Skip to content

Commit

Permalink
fix: module resolution
Browse files Browse the repository at this point in the history
style: change DelayHandler into DelayClass
  • Loading branch information
CAIMEOX committed Feb 24, 2024
1 parent eb32a72 commit f74507b
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 30 deletions.
1 change: 1 addition & 0 deletions src/base/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const TSCONFIG = {
noImplicitAny: true,
rootDir: '.',
listFiles: false,
moduleResolution: 'node',
noEmitHelpers: true
},
include: [],
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/code.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { existsSync } from 'fs';
import IO from '../base/io.js';
import DelayHandlerWithInfo from './delayInfo.js';
import DelayClassWithInfo from './delayInfo.js';
import { DefaultCode, TSCONFIG } from '../base/constants.js';

class CodeClass extends DelayHandlerWithInfo {
class CodeClass extends DelayClassWithInfo {
constructor() {
super();
this.tsconfig = {};
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import IO from '../base/io.js';
import DelayHandler from './delay.js';
import DelayClass from './delay.js';
import InfoHandler from './information.js';
import { existsSync, readFileSync } from 'fs';

class ConfigClass extends DelayHandler {
class ConfigClass extends DelayClass {
constructor() {
super();
this.context = {};
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/delay.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class DelayHandler {
class DelayClass {
constructor() {
this.updated = false;
}
Expand All @@ -17,4 +17,4 @@ class DelayHandler {
}
}

export default DelayHandler;
export default DelayClass;
4 changes: 2 additions & 2 deletions src/handlers/delayInfo.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import InfoHandler from './information.js';

class DelayHandlerWithInfo {
class DelayClassWithInfo {
constructor() {
this.updated = false;
this.info = {};
Expand All @@ -27,4 +27,4 @@ class DelayHandlerWithInfo {
}
}

export default DelayHandlerWithInfo;
export default DelayClassWithInfo;
8 changes: 4 additions & 4 deletions src/handlers/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import Others from './others.js';
import NpmHandler from './npm.js';
import LogoHandler from './logo.js';
import GulpHandler from './gulp.js';
import DelayHandler from './delay.js';
import DelayClass from './delay.js';
import ConfigRender from './config.js';
import MirrorHandler from './mirror.js';
import NetWork from '../base/network.js';
import ModuleResolver from './module.js';
import InfoHandler from './information.js';
import VersionsHandler from './versions.js';
import ManifestHandler from './manifest.js';
import DelayHandlerWithInfo from './delayInfo.js';
import DelayClassWithInfo from './delayInfo.js';
import { done, error, start } from '../base/console.js';

class ExtensionClass {
Expand Down Expand Up @@ -72,15 +72,15 @@ class ExtensionClass {
NpmHandler,
LogoHandler,
GulpHandler,
DelayHandler,
DelayHandler: DelayClass,
ConfigRender,
MirrorHandler,
NetWork,
ModuleResolver,
InfoHandler,
VersionsHandler,
ManifestHandler,
DelayHandlerWithInfo
DelayHandlerWithInfo: DelayClassWithInfo
});
}
} catch (e) {
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/gulp.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import IO from '../base/io.js';
import NetWork from '../base/network.js';
import DelayHandler from './delayInfo.js';
import DelayClass from './delayInfo.js';
import { start, done } from '../base/console.js';

class GulpClass extends DelayHandler {
class GulpClass extends DelayClass {
constructor() {
super();
this.context = '';
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/information.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-mixed-spaces-and-tabs */
/* eslint-disable indent */
import DelayHandler from './delay.js';
import DelayClass from './delay.js';
import { basename, join } from 'path';
import ConfigRender from './config.js';
import { magenta } from '../base/console.js';
Expand All @@ -12,7 +12,7 @@ import {
askProjectInfo
} from '../base/inquirer.js';

class InfoClass extends DelayHandler {
class InfoClass extends DelayClass {
constructor() {
super();
this.info = {};
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/logo.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import IO from '../base/io.js';
import Fractal from '../base/fractal.js';
import { start, done } from '../base/console.js';
import DelayHandlerWithInfo from './delayInfo.js';
import DelayClassWithInfo from './delayInfo.js';

class LogoClass extends DelayHandlerWithInfo {
class LogoClass extends DelayClassWithInfo {
constructor() {
super();
this.png = '';
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import IO from '../base/io.js';
import { existsSync } from 'fs';
import { v4 as uuid } from 'uuid';
import InfoHandler from './information.js';
import DelayHandlerWithInfo from './delayInfo.js';
import DelayClassWithInfo from './delayInfo.js';

class ManifestClass extends DelayHandlerWithInfo {
class ManifestClass extends DelayClassWithInfo {
constructor() {
super();
this.behContext = {};
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/mirror.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import axios from 'axios';
import DelayHandler from './delay.js';
import DelayClass from './delay.js';
import { Mirrors } from '../base/constants.js';
import { magenta, done, start } from '../base/console.js';

class MirrorClass extends DelayHandler {
class MirrorClass extends DelayClass {
constructor(mirror) {
super();
this.mirrors = mirror;
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import NpmHandler from './npm.js';
import NetWork from '../base/network.js';
import VersionsHandler from './versions.js';
import { warning } from '../base/console.js';
import DelayHandlerWithInfo from './delayInfo.js';
import DelayClassWithInfo from './delayInfo.js';
import { SERVER, ALL } from '../base/constants.js';

class ModuleClass extends DelayHandlerWithInfo {
class ModuleClass extends DelayClassWithInfo {
constructor() {
super();
this.packages = {};
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { existsSync } from 'fs';
import { deleteSync } from 'del';
import MirrorHandler from './mirror.js';
import { ALL } from '../base/constants.js';
import DelayHandlerWithInfo from './delayInfo.js';
import DelayClassWithInfo from './delayInfo.js';
import { accept, start, done } from '../base/console.js';

function checkPnpm() {
Expand All @@ -15,7 +15,7 @@ function checkPnpm() {
return true;
}

class NpmClass extends DelayHandlerWithInfo {
class NpmClass extends DelayClassWithInfo {
constructor() {
super();
this.package = {};
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/others.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import IO from '../base/io.js';
import DelayHandlerWithInfo from './delayInfo.js';
import DelayClassWithInfo from './delayInfo.js';
import { MCATTRIBUTES } from '../base/constants.js';

class OthersClass extends DelayHandlerWithInfo {
class OthersClass extends DelayClassWithInfo {
constructor() {
super();
}
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-disable indent */
import inquirer from 'inquirer';
import NetWork from '../base/network.js';
import DelayHandlerWithInfo from './delayInfo.js';
import DelayClassWithInfo from './delayInfo.js';
import { DATA, SERVER } from '../base/constants.js';
import { start, done, magenta } from '../base/console.js';

Expand All @@ -18,7 +18,7 @@ async function promptUser(message, choices) {
return selected;
}

class Versions extends DelayHandlerWithInfo {
class Versions extends DelayClassWithInfo {
constructor() {
super();
}
Expand Down

0 comments on commit f74507b

Please sign in to comment.