@nestjs/cli 11.0.16 → 12.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions/abstract.action.d.ts +1 -2
- package/actions/abstract.action.js +1 -5
- package/actions/add.action.d.ts +3 -4
- package/actions/add.action.js +38 -52
- package/actions/build.action.d.ts +11 -10
- package/actions/build.action.js +85 -72
- package/actions/generate.action.d.ts +3 -3
- package/actions/generate.action.js +56 -59
- package/actions/index.d.ts +7 -7
- package/actions/index.js +7 -23
- package/actions/info.action.d.ts +12 -28
- package/actions/info.action.js +47 -55
- package/actions/new.action.d.ts +3 -3
- package/actions/new.action.js +75 -105
- package/actions/start.action.d.ts +4 -7
- package/actions/start.action.js +36 -46
- package/bin/nest.js +14 -10
- package/commands/abstract.command.d.ts +3 -3
- package/commands/abstract.command.js +2 -5
- package/commands/add.command.d.ts +3 -3
- package/commands/add.command.js +13 -20
- package/commands/build.command.d.ts +3 -3
- package/commands/build.command.js +25 -54
- package/commands/command.input.js +1 -2
- package/commands/command.loader.d.ts +2 -2
- package/commands/command.loader.js +18 -22
- package/commands/context/add.context.d.ts +7 -0
- package/commands/context/add.context.js +1 -0
- package/commands/context/build.context.d.ts +13 -0
- package/commands/context/build.context.js +1 -0
- package/commands/context/generate.context.d.ts +15 -0
- package/commands/context/generate.context.js +1 -0
- package/commands/context/index.d.ts +5 -0
- package/commands/context/index.js +5 -0
- package/commands/context/new.context.d.ts +11 -0
- package/commands/context/new.context.js +1 -0
- package/commands/context/start.context.d.ts +19 -0
- package/commands/context/start.context.js +1 -0
- package/commands/generate.command.d.ts +3 -3
- package/commands/generate.command.js +26 -54
- package/commands/index.d.ts +3 -2
- package/commands/index.js +3 -18
- package/commands/info.command.d.ts +3 -3
- package/commands/info.command.js +2 -6
- package/commands/new.command.d.ts +3 -3
- package/commands/new.command.js +24 -33
- package/commands/start.command.d.ts +3 -3
- package/commands/start.command.js +34 -71
- package/lib/compiler/assets-manager.d.ts +1 -1
- package/lib/compiler/assets-manager.js +27 -33
- package/lib/compiler/base-compiler.d.ts +5 -5
- package/lib/compiler/base-compiler.js +10 -13
- package/lib/compiler/compiler.d.ts +6 -6
- package/lib/compiler/compiler.js +7 -9
- package/lib/compiler/defaults/rspack-defaults.d.ts +2 -0
- package/lib/compiler/defaults/rspack-defaults.js +138 -0
- package/lib/compiler/defaults/swc-defaults.d.ts +1 -1
- package/lib/compiler/defaults/swc-defaults.js +1 -5
- package/lib/compiler/defaults/webpack-defaults.d.ts +3 -3
- package/lib/compiler/defaults/webpack-defaults.js +36 -18
- package/lib/compiler/helpers/append-extension.js +3 -6
- package/lib/compiler/helpers/copy-path-resolve.js +2 -5
- package/lib/compiler/helpers/delete-out-dir.d.ts +1 -1
- package/lib/compiler/helpers/delete-out-dir.js +5 -8
- package/lib/compiler/helpers/get-builder.d.ts +9 -7
- package/lib/compiler/helpers/get-builder.js +3 -6
- package/lib/compiler/helpers/get-rspack-config-path.d.ts +9 -0
- package/lib/compiler/helpers/get-rspack-config-path.js +15 -0
- package/lib/compiler/helpers/get-tsc-config.path.d.ts +2 -3
- package/lib/compiler/helpers/get-tsc-config.path.js +6 -9
- package/lib/compiler/helpers/get-value-or-default.d.ts +2 -3
- package/lib/compiler/helpers/get-value-or-default.js +3 -8
- package/lib/compiler/helpers/get-webpack-config-path.d.ts +2 -3
- package/lib/compiler/helpers/get-webpack-config-path.js +4 -7
- package/lib/compiler/helpers/manual-restart.js +4 -8
- package/lib/compiler/helpers/tsconfig-provider.d.ts +1 -1
- package/lib/compiler/helpers/tsconfig-provider.js +8 -11
- package/lib/compiler/hooks/tsconfig-paths.hook.js +13 -13
- package/lib/compiler/interfaces/readonly-visitor.interface.js +1 -2
- package/lib/compiler/plugins/plugin-metadata-generator.d.ts +1 -1
- package/lib/compiler/plugins/plugin-metadata-generator.js +10 -13
- package/lib/compiler/plugins/plugin-metadata-printer.d.ts +1 -1
- package/lib/compiler/plugins/plugin-metadata-printer.js +5 -9
- package/lib/compiler/plugins/plugins-loader.d.ts +2 -2
- package/lib/compiler/plugins/plugins-loader.js +13 -13
- package/lib/compiler/rspack-compiler.d.ts +19 -0
- package/lib/compiler/rspack-compiler.js +105 -0
- package/lib/compiler/swc/constants.d.ts +0 -1
- package/lib/compiler/swc/constants.js +9 -13
- package/lib/compiler/swc/forked-type-checker.js +13 -18
- package/lib/compiler/swc/swc-compiler.d.ts +4 -4
- package/lib/compiler/swc/swc-compiler.js +41 -39
- package/lib/compiler/swc/type-checker-host.js +12 -18
- package/lib/compiler/typescript-loader.js +5 -7
- package/lib/compiler/watch-compiler.d.ts +5 -5
- package/lib/compiler/watch-compiler.js +14 -18
- package/lib/compiler/webpack-compiler.d.ts +6 -7
- package/lib/compiler/webpack-compiler.js +30 -22
- package/lib/configuration/configuration.d.ts +9 -4
- package/lib/configuration/configuration.js +1 -2
- package/lib/configuration/configuration.loader.d.ts +1 -1
- package/lib/configuration/configuration.loader.js +1 -2
- package/lib/configuration/defaults.d.ts +2 -1
- package/lib/configuration/defaults.js +8 -10
- package/lib/configuration/index.d.ts +3 -3
- package/lib/configuration/index.js +3 -19
- package/lib/configuration/nest-configuration.loader.d.ts +3 -3
- package/lib/configuration/nest-configuration.loader.js +11 -20
- package/lib/package-managers/abstract.package-manager.d.ts +4 -4
- package/lib/package-managers/abstract.package-manager.js +19 -30
- package/lib/package-managers/index.d.ts +8 -8
- package/lib/package-managers/index.js +8 -24
- package/lib/package-managers/npm.package-manager.d.ts +2 -2
- package/lib/package-managers/npm.package-manager.js +6 -10
- package/lib/package-managers/package-manager-commands.js +1 -2
- package/lib/package-managers/package-manager.factory.d.ts +2 -2
- package/lib/package-managers/package-manager.factory.js +16 -20
- package/lib/package-managers/package-manager.js +2 -5
- package/lib/package-managers/pnpm.package-manager.d.ts +2 -2
- package/lib/package-managers/pnpm.package-manager.js +6 -10
- package/lib/package-managers/project.dependency.js +1 -2
- package/lib/package-managers/yarn.package-manager.d.ts +2 -2
- package/lib/package-managers/yarn.package-manager.js +6 -10
- package/lib/questions/questions.d.ts +5 -1
- package/lib/questions/questions.js +2 -7
- package/lib/readers/file-system.reader.d.ts +1 -1
- package/lib/readers/file-system.reader.js +6 -9
- package/lib/readers/index.d.ts +2 -2
- package/lib/readers/index.js +2 -18
- package/lib/readers/reader.js +3 -5
- package/lib/runners/abstract.runner.js +10 -12
- package/lib/runners/git.runner.d.ts +1 -1
- package/lib/runners/git.runner.js +2 -6
- package/lib/runners/index.d.ts +3 -3
- package/lib/runners/index.js +3 -19
- package/lib/runners/npm.runner.d.ts +1 -1
- package/lib/runners/npm.runner.js +2 -6
- package/lib/runners/pnpm.runner.d.ts +1 -1
- package/lib/runners/pnpm.runner.js +2 -6
- package/lib/runners/runner.factory.d.ts +6 -6
- package/lib/runners/runner.factory.js +15 -20
- package/lib/runners/runner.js +2 -5
- package/lib/runners/schematic.runner.d.ts +1 -1
- package/lib/runners/schematic.runner.js +5 -7
- package/lib/runners/yarn.runner.d.ts +1 -1
- package/lib/runners/yarn.runner.js +2 -6
- package/lib/schematics/abstract.collection.d.ts +3 -3
- package/lib/schematics/abstract.collection.js +3 -5
- package/lib/schematics/collection.factory.d.ts +2 -2
- package/lib/schematics/collection.factory.js +9 -13
- package/lib/schematics/collection.js +2 -5
- package/lib/schematics/custom.collection.d.ts +2 -2
- package/lib/schematics/custom.collection.js +4 -8
- package/lib/schematics/index.d.ts +4 -4
- package/lib/schematics/index.js +4 -20
- package/lib/schematics/nest.collection.d.ts +3 -3
- package/lib/schematics/nest.collection.js +104 -108
- package/lib/schematics/schematic.option.js +7 -9
- package/lib/ui/banner.js +1 -4
- package/lib/ui/emojis.d.ts +17 -17
- package/lib/ui/emojis.js +19 -22
- package/lib/ui/errors.js +1 -5
- package/lib/ui/index.d.ts +5 -5
- package/lib/ui/index.js +5 -21
- package/lib/ui/messages.js +15 -19
- package/lib/ui/prefixes.js +3 -6
- package/lib/utils/formatting.js +1 -4
- package/lib/utils/get-default-tsconfig-path.js +4 -7
- package/lib/utils/gracefully-exit-on-prompt-error.js +1 -4
- package/lib/utils/is-esm-project.d.ts +5 -0
- package/lib/utils/is-esm-project.js +16 -0
- package/lib/utils/is-module-available.js +3 -4
- package/lib/utils/load-configuration.d.ts +1 -1
- package/lib/utils/load-configuration.js +4 -7
- package/lib/utils/local-binaries.d.ts +1 -1
- package/lib/utils/local-binaries.js +8 -11
- package/lib/utils/os-info.utils.js +1 -4
- package/lib/utils/project-utils.d.ts +1 -3
- package/lib/utils/project-utils.js +16 -28
- package/lib/utils/remaining-flags.d.ts +2 -2
- package/lib/utils/remaining-flags.js +2 -5
- package/lib/utils/tree-kill.js +7 -10
- package/lib/utils/type-assertions.js +1 -4
- package/package.json +59 -38
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
function tsconfigPathsBeforeHookFactory(compilerOptions) {
|
|
9
|
-
const tsBinary = new typescript_loader_1.TypeScriptBinaryLoader().load();
|
|
1
|
+
import { createRequire } from 'module';
|
|
2
|
+
import { dirname, posix } from 'path';
|
|
3
|
+
import * as tsPaths from 'tsconfig-paths';
|
|
4
|
+
import { TypeScriptBinaryLoader } from '../typescript-loader.js';
|
|
5
|
+
const require = createRequire(import.meta.url);
|
|
6
|
+
export function tsconfigPathsBeforeHookFactory(compilerOptions) {
|
|
7
|
+
const tsBinary = new TypeScriptBinaryLoader().load();
|
|
10
8
|
const { paths = {}, baseUrl = './' } = compilerOptions;
|
|
11
9
|
const matcher = tsPaths.createMatchPath(baseUrl, paths, ['main']);
|
|
12
10
|
return (ctx) => {
|
|
@@ -57,20 +55,22 @@ function getNotAliasedPath(sf, matcher, text) {
|
|
|
57
55
|
if (!result) {
|
|
58
56
|
return;
|
|
59
57
|
}
|
|
60
|
-
if (
|
|
58
|
+
if (process.platform === 'win32') {
|
|
61
59
|
result = result.replace(/\\/g, '/');
|
|
62
60
|
}
|
|
63
61
|
try {
|
|
64
62
|
// Installed packages (node modules) should take precedence over root files with the same name.
|
|
65
63
|
// Ref: https://github.com/nestjs/nest-cli/issues/838
|
|
66
64
|
const packagePath = require.resolve(text, {
|
|
67
|
-
paths: [process.cwd(), ...
|
|
65
|
+
paths: [process.cwd(), ...(require.resolve.paths(text) ?? [])],
|
|
68
66
|
});
|
|
69
67
|
if (packagePath) {
|
|
70
68
|
return text;
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
|
-
catch {
|
|
74
|
-
|
|
71
|
+
catch {
|
|
72
|
+
// package resolution failed, fall through to relative path
|
|
73
|
+
}
|
|
74
|
+
const resolvedPath = posix.relative(dirname(sf.fileName), result) || './';
|
|
75
75
|
return resolvedPath[0] === '.' ? resolvedPath : './' + resolvedPath;
|
|
76
76
|
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ts from 'typescript';
|
|
2
|
-
import { ReadonlyVisitor } from '../interfaces/readonly-visitor.interface';
|
|
2
|
+
import { ReadonlyVisitor } from '../interfaces/readonly-visitor.interface.js';
|
|
3
3
|
export interface PluginMetadataGenerateOptions {
|
|
4
4
|
/**
|
|
5
5
|
* The visitors to use to generate the metadata.
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const type_checker_host_1 = require("../swc/type-checker-host");
|
|
6
|
-
const typescript_loader_1 = require("../typescript-loader");
|
|
7
|
-
const plugin_metadata_printer_1 = require("./plugin-metadata-printer");
|
|
1
|
+
import { FOUND_NO_ISSUES_GENERATING_METADATA } from '../swc/constants.js';
|
|
2
|
+
import { TypeCheckerHost } from '../swc/type-checker-host.js';
|
|
3
|
+
import { TypeScriptBinaryLoader } from '../typescript-loader.js';
|
|
4
|
+
import { PluginMetadataPrinter } from './plugin-metadata-printer.js';
|
|
8
5
|
/**
|
|
9
6
|
* Generates plugins metadata by traversing the AST of the project.
|
|
10
7
|
* @example
|
|
@@ -20,11 +17,12 @@ const plugin_metadata_printer_1 = require("./plugin-metadata-printer");
|
|
|
20
17
|
* });
|
|
21
18
|
* ```
|
|
22
19
|
*/
|
|
23
|
-
class PluginMetadataGenerator {
|
|
20
|
+
export class PluginMetadataGenerator {
|
|
21
|
+
pluginMetadataPrinter = new PluginMetadataPrinter();
|
|
22
|
+
typeCheckerHost = new TypeCheckerHost();
|
|
23
|
+
typescriptLoader = new TypeScriptBinaryLoader();
|
|
24
|
+
tsBinary;
|
|
24
25
|
constructor() {
|
|
25
|
-
this.pluginMetadataPrinter = new plugin_metadata_printer_1.PluginMetadataPrinter();
|
|
26
|
-
this.typeCheckerHost = new type_checker_host_1.TypeCheckerHost();
|
|
27
|
-
this.typescriptLoader = new typescript_loader_1.TypeScriptBinaryLoader();
|
|
28
26
|
this.tsBinary = this.typescriptLoader.load();
|
|
29
27
|
}
|
|
30
28
|
generate(options) {
|
|
@@ -50,7 +48,7 @@ class PluginMetadataGenerator {
|
|
|
50
48
|
console.log(tsBinary.formatDiagnosticsWithColorAndContext(diagnostics, formatDiagnosticsHost));
|
|
51
49
|
}
|
|
52
50
|
else {
|
|
53
|
-
console.log(
|
|
51
|
+
console.log(FOUND_NO_ISSUES_GENERATING_METADATA);
|
|
54
52
|
}
|
|
55
53
|
}
|
|
56
54
|
};
|
|
@@ -81,4 +79,3 @@ class PluginMetadataGenerator {
|
|
|
81
79
|
}, this.tsBinary);
|
|
82
80
|
}
|
|
83
81
|
}
|
|
84
|
-
exports.PluginMetadataGenerator = PluginMetadataGenerator;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ts from 'typescript';
|
|
2
|
-
import { DeepPluginMeta } from '../interfaces/readonly-visitor.interface';
|
|
2
|
+
import { DeepPluginMeta } from '../interfaces/readonly-visitor.interface.js';
|
|
3
3
|
export interface PluginMetadataPrintOptions {
|
|
4
4
|
outputDir: string;
|
|
5
5
|
filename?: string;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.PluginMetadataPrinter = void 0;
|
|
4
|
-
const fs_1 = require("fs");
|
|
5
|
-
const path_1 = require("path");
|
|
1
|
+
import { writeFileSync } from 'fs';
|
|
2
|
+
import { join } from 'path';
|
|
6
3
|
const SERIALIZED_METADATA_FILENAME = 'metadata.ts';
|
|
7
4
|
const TYPE_IMPORT_VARIABLE_NAME = 't';
|
|
8
5
|
/**
|
|
9
6
|
* Prints the metadata to a file.
|
|
10
7
|
*/
|
|
11
|
-
class PluginMetadataPrinter {
|
|
8
|
+
export class PluginMetadataPrinter {
|
|
12
9
|
print(metadata, typeImports, options, tsBinary) {
|
|
13
10
|
const objectLiteralExpr = tsBinary.factory.createObjectLiteralExpression(Object.keys(metadata).map((key) => this.recursivelyCreatePropertyAssignment(key, metadata[key], tsBinary)));
|
|
14
11
|
const exportAssignment = tsBinary.factory.createExportAssignment(undefined, undefined, tsBinary.factory.createArrowFunction([tsBinary.factory.createToken(tsBinary.SyntaxKind.AsyncKeyword)], undefined, [], undefined, tsBinary.factory.createToken(tsBinary.SyntaxKind.EqualsGreaterThanToken), tsBinary.factory.createBlock([
|
|
@@ -20,9 +17,9 @@ class PluginMetadataPrinter {
|
|
|
20
17
|
});
|
|
21
18
|
const resultFile = tsBinary.createSourceFile('file.ts', '', tsBinary.ScriptTarget.Latest,
|
|
22
19
|
/*setParentNodes*/ false, tsBinary.ScriptKind.TS);
|
|
23
|
-
const filename =
|
|
20
|
+
const filename = join(options.outputDir, options.filename ?? SERIALIZED_METADATA_FILENAME);
|
|
24
21
|
const eslintPrefix = `/* eslint-disable */\n`;
|
|
25
|
-
|
|
22
|
+
writeFileSync(filename, eslintPrefix +
|
|
26
23
|
printer.printNode(tsBinary.EmitHint.Unspecified, exportAssignment, resultFile));
|
|
27
24
|
}
|
|
28
25
|
recursivelyCreatePropertyAssignment(identifier, meta, tsBinary) {
|
|
@@ -48,4 +45,3 @@ class PluginMetadataPrinter {
|
|
|
48
45
|
return tsBinary.factory.createPropertyAssignment(tsBinary.factory.createComputedPropertyName(tsBinary.factory.createStringLiteral(identifier)), tsBinary.factory.createIdentifier(target));
|
|
49
46
|
}
|
|
50
47
|
}
|
|
51
|
-
exports.PluginMetadataPrinter = PluginMetadataPrinter;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as ts from 'typescript';
|
|
2
|
-
import { ReadonlyVisitor } from '../interfaces/readonly-visitor.interface';
|
|
2
|
+
import { ReadonlyVisitor } from '../interfaces/readonly-visitor.interface.js';
|
|
3
3
|
type Transformer = ts.TransformerFactory<any> | ts.CustomTransformerFactory;
|
|
4
4
|
type PluginEntry = string | PluginAndOptions;
|
|
5
5
|
type PluginOptions = Record<string, any>;
|
|
6
6
|
interface PluginAndOptions {
|
|
7
|
-
name:
|
|
7
|
+
name: string;
|
|
8
8
|
options: PluginOptions;
|
|
9
9
|
}
|
|
10
10
|
export interface NestCompilerPlugin {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const ui_1 = require("../../ui");
|
|
1
|
+
import { createRequire } from 'module';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
import { CLI_ERRORS } from '../../ui/index.js';
|
|
4
|
+
const require = createRequire(import.meta.url);
|
|
6
5
|
const PLUGIN_ENTRY_FILENAME = 'plugin';
|
|
7
|
-
class PluginsLoader {
|
|
6
|
+
export class PluginsLoader {
|
|
8
7
|
load(plugins = [], extras = {}) {
|
|
9
8
|
const pluginNames = plugins.map((entry) => typeof entry === 'object'
|
|
10
9
|
? entry.name
|
|
@@ -18,7 +17,7 @@ class PluginsLoader {
|
|
|
18
17
|
};
|
|
19
18
|
pluginRefs.forEach((plugin, index) => {
|
|
20
19
|
if (!plugin.before && !plugin.after && !plugin.afterDeclarations) {
|
|
21
|
-
throw new Error(
|
|
20
|
+
throw new Error(CLI_ERRORS.WRONG_PLUGIN(pluginNames[index]));
|
|
22
21
|
}
|
|
23
22
|
const options = typeof plugins[index] === 'object'
|
|
24
23
|
? plugins[index].options || {}
|
|
@@ -46,25 +45,26 @@ class PluginsLoader {
|
|
|
46
45
|
}
|
|
47
46
|
resolvePluginReferences(pluginNames) {
|
|
48
47
|
const nodeModulePaths = [
|
|
49
|
-
|
|
50
|
-
...
|
|
48
|
+
join(process.cwd(), 'node_modules'),
|
|
49
|
+
...(require.resolve.paths('typescript') ?? []),
|
|
51
50
|
];
|
|
52
51
|
return pluginNames.map((item) => {
|
|
53
52
|
try {
|
|
54
53
|
try {
|
|
55
|
-
const binaryPath = require.resolve(
|
|
54
|
+
const binaryPath = require.resolve(join(item, PLUGIN_ENTRY_FILENAME), {
|
|
56
55
|
paths: nodeModulePaths,
|
|
57
56
|
});
|
|
58
57
|
return require(binaryPath);
|
|
59
58
|
}
|
|
60
|
-
catch {
|
|
59
|
+
catch {
|
|
60
|
+
// entry-point resolution failed, try bare module resolve
|
|
61
|
+
}
|
|
61
62
|
const binaryPath = require.resolve(item, { paths: nodeModulePaths });
|
|
62
63
|
return require(binaryPath);
|
|
63
64
|
}
|
|
64
65
|
catch (e) {
|
|
65
|
-
throw new Error(`"${item}" plugin is not installed
|
|
66
|
+
throw new Error(`"${item}" plugin is not installed.`, { cause: e });
|
|
66
67
|
}
|
|
67
68
|
});
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
|
-
exports.PluginsLoader = PluginsLoader;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Configuration } from '../configuration/index.js';
|
|
2
|
+
import { AssetsManager } from './assets-manager.js';
|
|
3
|
+
import { BaseCompiler } from './base-compiler.js';
|
|
4
|
+
import { PluginsLoader } from './plugins/plugins-loader.js';
|
|
5
|
+
type RspackConfigFactory = (config: Record<string, any>, rspackRef: any) => Record<string, any>;
|
|
6
|
+
type RspackConfigFactoryOrConfig = RspackConfigFactory | Record<string, any>;
|
|
7
|
+
type RspackCompilerExtras = {
|
|
8
|
+
options: Record<string, any>;
|
|
9
|
+
assetsManager: AssetsManager;
|
|
10
|
+
rspackConfigFactoryOrConfig: RspackConfigFactoryOrConfig | RspackConfigFactoryOrConfig[];
|
|
11
|
+
debug?: boolean;
|
|
12
|
+
watchMode?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare class RspackCompiler extends BaseCompiler<RspackCompilerExtras> {
|
|
15
|
+
constructor(pluginsLoader: PluginsLoader);
|
|
16
|
+
run(configuration: Required<Configuration>, tsConfigPath: string, appName: string | undefined, extras: RspackCompilerExtras, onSuccess?: () => void): void;
|
|
17
|
+
private createAfterCallback;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { existsSync } from 'fs';
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import { join } from 'path';
|
|
4
|
+
import { INFO_PREFIX } from '../ui/index.js';
|
|
5
|
+
import { isEsmProject } from '../utils/is-esm-project.js';
|
|
6
|
+
import { BaseCompiler } from './base-compiler.js';
|
|
7
|
+
import { rspackDefaultsFactory } from './defaults/rspack-defaults.js';
|
|
8
|
+
import { getValueOrDefault } from './helpers/get-value-or-default.js';
|
|
9
|
+
const require = createRequire(import.meta.url);
|
|
10
|
+
export class RspackCompiler extends BaseCompiler {
|
|
11
|
+
constructor(pluginsLoader) {
|
|
12
|
+
super(pluginsLoader);
|
|
13
|
+
}
|
|
14
|
+
run(configuration, tsConfigPath, appName, extras, onSuccess) {
|
|
15
|
+
const cwd = process.cwd();
|
|
16
|
+
const configPath = join(cwd, tsConfigPath);
|
|
17
|
+
if (!existsSync(configPath)) {
|
|
18
|
+
throw new Error(`Could not find TypeScript configuration file "${tsConfigPath}".`);
|
|
19
|
+
}
|
|
20
|
+
const plugins = this.loadPlugins(configuration, tsConfigPath, appName);
|
|
21
|
+
const pathToSource = this.getPathToSource(configuration, tsConfigPath, appName);
|
|
22
|
+
const entryFile = getValueOrDefault(configuration, 'entryFile', appName, 'entryFile', extras.options);
|
|
23
|
+
const entryFileRoot = getValueOrDefault(configuration, 'root', appName) || '';
|
|
24
|
+
const defaultOptions = rspackDefaultsFactory(pathToSource, entryFileRoot, entryFile, extras.debug ?? false, tsConfigPath, plugins, isEsmProject());
|
|
25
|
+
let rspack;
|
|
26
|
+
try {
|
|
27
|
+
rspack = require('@rspack/core');
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
throw new Error('@rspack/core is not installed. To use the rspack compiler, install the required packages:\n\n' +
|
|
31
|
+
' npm install --save-dev @rspack/core webpack-node-externals tsconfig-paths-webpack-plugin\n');
|
|
32
|
+
}
|
|
33
|
+
let compiler;
|
|
34
|
+
let watchOptions;
|
|
35
|
+
let watch;
|
|
36
|
+
if (Array.isArray(extras.rspackConfigFactoryOrConfig)) {
|
|
37
|
+
const rspackConfigurations = extras.rspackConfigFactoryOrConfig.map((configOrFactory) => {
|
|
38
|
+
const unwrappedConfig = typeof configOrFactory !== 'function'
|
|
39
|
+
? configOrFactory
|
|
40
|
+
: configOrFactory(defaultOptions, rspack);
|
|
41
|
+
return {
|
|
42
|
+
...defaultOptions,
|
|
43
|
+
mode: extras.watchMode ? 'development' : defaultOptions.mode,
|
|
44
|
+
...unwrappedConfig,
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
compiler = rspack.rspack(rspackConfigurations);
|
|
48
|
+
watchOptions = rspackConfigurations.map((config) => config.watchOptions || {});
|
|
49
|
+
watch = rspackConfigurations.some((config) => config.watch);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
const projectRspackOptions = typeof extras.rspackConfigFactoryOrConfig !== 'function'
|
|
53
|
+
? extras.rspackConfigFactoryOrConfig
|
|
54
|
+
: extras.rspackConfigFactoryOrConfig(defaultOptions, rspack);
|
|
55
|
+
const rspackConfiguration = {
|
|
56
|
+
...defaultOptions,
|
|
57
|
+
mode: extras.watchMode ? 'development' : defaultOptions.mode,
|
|
58
|
+
...projectRspackOptions,
|
|
59
|
+
};
|
|
60
|
+
compiler = rspack.rspack(rspackConfiguration);
|
|
61
|
+
watchOptions = rspackConfiguration.watchOptions;
|
|
62
|
+
watch = rspackConfiguration.watch;
|
|
63
|
+
}
|
|
64
|
+
const afterCallback = this.createAfterCallback(onSuccess, extras.assetsManager, extras.watchMode ?? false, watch);
|
|
65
|
+
if (extras.watchMode || watch) {
|
|
66
|
+
compiler.hooks.watchRun.tapAsync('Rebuild info', (params, callback) => {
|
|
67
|
+
console.log(`\n${INFO_PREFIX} Rspack is building your sources...\n`);
|
|
68
|
+
callback();
|
|
69
|
+
});
|
|
70
|
+
compiler.watch(watchOptions || {}, afterCallback);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
compiler.run(afterCallback);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
createAfterCallback(onSuccess, assetsManager, watchMode, watch) {
|
|
77
|
+
return (err, stats) => {
|
|
78
|
+
if (err && stats === undefined) {
|
|
79
|
+
// Could not complete the compilation
|
|
80
|
+
// The error caught is most likely thrown by underlying tasks
|
|
81
|
+
console.log(err);
|
|
82
|
+
return process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
const statsOutput = stats.toString({
|
|
85
|
+
chunks: false,
|
|
86
|
+
colors: true,
|
|
87
|
+
modules: false,
|
|
88
|
+
assets: false,
|
|
89
|
+
});
|
|
90
|
+
if (!err && !stats.hasErrors()) {
|
|
91
|
+
if (!onSuccess) {
|
|
92
|
+
assetsManager.closeWatchers();
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
onSuccess();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else if (!watchMode && !watch) {
|
|
99
|
+
console.log(statsOutput);
|
|
100
|
+
return process.exit(1);
|
|
101
|
+
}
|
|
102
|
+
console.log(statsOutput);
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const TSC_NO_ERRORS_MESSAGE = "Found 0 errors. Watching for file changes.";
|
|
2
|
-
export declare const TSC_COMPILATION_STARTED_MESSAGE = "Starting compilation in watch mode...";
|
|
3
2
|
export declare const SWC_LOG_PREFIX: string;
|
|
4
3
|
export declare const TSC_LOG_PREFIX: string;
|
|
5
4
|
export declare const TSC_LOG_ERROR_PREFIX: string;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.TSC_LOG_SUCCESS_PREFIX = (0, ansis_1.green)('> ') + ansis_1.bgGreen.bold(' TSC ');
|
|
11
|
-
exports.INITIALIZING_TYPE_CHECKER = ansis_1.bgCyan.bold(' TSC ') + (0, ansis_1.cyan)(' Initializing type checker...');
|
|
12
|
-
exports.FOUND_NO_ISSUES_METADATA_GENERATION_SKIPPED = exports.TSC_LOG_SUCCESS_PREFIX + (0, ansis_1.green)(' Found 0 issues.');
|
|
13
|
-
exports.FOUND_NO_ISSUES_GENERATING_METADATA = exports.TSC_LOG_SUCCESS_PREFIX + (0, ansis_1.green)(' Found 0 issues. Generating metadata...');
|
|
1
|
+
import { bgCyan, bgGreen, bgRed, cyan, green, red } from 'ansis';
|
|
2
|
+
export const TSC_NO_ERRORS_MESSAGE = 'Found 0 errors. Watching for file changes.';
|
|
3
|
+
export const SWC_LOG_PREFIX = cyan('> ') + bgCyan.bold(' SWC ');
|
|
4
|
+
export const TSC_LOG_PREFIX = cyan('> ') + bgCyan.bold(' TSC ');
|
|
5
|
+
export const TSC_LOG_ERROR_PREFIX = red('> ') + bgRed.bold(' TSC ');
|
|
6
|
+
export const TSC_LOG_SUCCESS_PREFIX = green('> ') + bgGreen.bold(' TSC ');
|
|
7
|
+
export const INITIALIZING_TYPE_CHECKER = bgCyan.bold(' TSC ') + cyan(' Initializing type checker...');
|
|
8
|
+
export const FOUND_NO_ISSUES_METADATA_GENERATION_SKIPPED = TSC_LOG_SUCCESS_PREFIX + green(' Found 0 issues.');
|
|
9
|
+
export const FOUND_NO_ISSUES_GENERATING_METADATA = TSC_LOG_SUCCESS_PREFIX + green(' Found 0 issues. Generating metadata...');
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const constants_1 = require("./constants");
|
|
8
|
-
const type_checker_host_1 = require("./type-checker-host");
|
|
1
|
+
import { ERROR_PREFIX } from '../../ui/index.js';
|
|
2
|
+
import { BaseCompiler } from '../base-compiler.js';
|
|
3
|
+
import { PluginMetadataGenerator } from '../plugins/plugin-metadata-generator.js';
|
|
4
|
+
import { PluginsLoader } from '../plugins/plugins-loader.js';
|
|
5
|
+
import { FOUND_NO_ISSUES_GENERATING_METADATA, FOUND_NO_ISSUES_METADATA_GENERATION_SKIPPED, } from './constants.js';
|
|
6
|
+
import { TypeCheckerHost } from './type-checker-host.js';
|
|
9
7
|
const [tsConfigPath, appName, sourceRoot, plugins] = process.argv.slice(2);
|
|
10
|
-
class ForkedTypeChecker extends
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
this.pluginMetadataGenerator = new plugin_metadata_generator_1.PluginMetadataGenerator();
|
|
14
|
-
this.typeCheckerHost = new type_checker_host_1.TypeCheckerHost();
|
|
15
|
-
}
|
|
8
|
+
class ForkedTypeChecker extends BaseCompiler {
|
|
9
|
+
pluginMetadataGenerator = new PluginMetadataGenerator();
|
|
10
|
+
typeCheckerHost = new TypeCheckerHost();
|
|
16
11
|
async run(configuration, tsConfigPath, appName, extras) {
|
|
17
12
|
const { readonlyVisitors } = this.loadPlugins(configuration, tsConfigPath, appName);
|
|
18
13
|
const outputDir = this.getPathToSource(configuration, tsConfigPath, appName);
|
|
19
14
|
try {
|
|
20
15
|
const onTypeCheckOrProgramInit = (program) => {
|
|
21
16
|
if (readonlyVisitors.length > 0) {
|
|
22
|
-
console.log(
|
|
17
|
+
console.log(FOUND_NO_ISSUES_GENERATING_METADATA);
|
|
23
18
|
this.pluginMetadataGenerator.generate({
|
|
24
19
|
outputDir,
|
|
25
20
|
visitors: readonlyVisitors,
|
|
@@ -27,7 +22,7 @@ class ForkedTypeChecker extends base_compiler_1.BaseCompiler {
|
|
|
27
22
|
});
|
|
28
23
|
}
|
|
29
24
|
else {
|
|
30
|
-
console.log(
|
|
25
|
+
console.log(FOUND_NO_ISSUES_METADATA_GENERATION_SKIPPED);
|
|
31
26
|
}
|
|
32
27
|
};
|
|
33
28
|
this.typeCheckerHost.run(tsConfigPath, {
|
|
@@ -37,11 +32,11 @@ class ForkedTypeChecker extends base_compiler_1.BaseCompiler {
|
|
|
37
32
|
});
|
|
38
33
|
}
|
|
39
34
|
catch (err) {
|
|
40
|
-
console.
|
|
35
|
+
console.error(ERROR_PREFIX, err.message);
|
|
41
36
|
}
|
|
42
37
|
}
|
|
43
38
|
}
|
|
44
|
-
const pluginsLoader = new
|
|
39
|
+
const pluginsLoader = new PluginsLoader();
|
|
45
40
|
const forkedTypeChecker = new ForkedTypeChecker(pluginsLoader);
|
|
46
41
|
const applicationName = appName === 'undefined' ? '' : appName;
|
|
47
42
|
const options = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as ts from 'typescript';
|
|
2
|
-
import { Configuration } from '../../configuration';
|
|
3
|
-
import { AssetsManager } from '../assets-manager';
|
|
4
|
-
import { BaseCompiler } from '../base-compiler';
|
|
5
|
-
import { PluginsLoader } from '../plugins/plugins-loader';
|
|
2
|
+
import { Configuration } from '../../configuration/index.js';
|
|
3
|
+
import { AssetsManager } from '../assets-manager.js';
|
|
4
|
+
import { BaseCompiler } from '../base-compiler.js';
|
|
5
|
+
import { PluginsLoader } from '../plugins/plugins-loader.js';
|
|
6
6
|
export type SwcCompilerExtras = {
|
|
7
7
|
watch: boolean;
|
|
8
8
|
typeCheck: boolean;
|
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { cyan } from 'ansis';
|
|
2
|
+
import { fork } from 'child_process';
|
|
3
|
+
import * as chokidar from 'chokidar';
|
|
4
|
+
import { readFileSync } from 'fs';
|
|
5
|
+
import { stat } from 'fs/promises';
|
|
6
|
+
import { createRequire } from 'module';
|
|
7
|
+
import * as path from 'path';
|
|
8
|
+
import { isAbsolute, join } from 'path';
|
|
9
|
+
import { fileURLToPath } from 'url';
|
|
10
|
+
import { dirname } from 'path';
|
|
11
|
+
import { ERROR_PREFIX } from '../../ui/index.js';
|
|
12
|
+
import { treeKillSync } from '../../utils/tree-kill.js';
|
|
13
|
+
import { BaseCompiler } from '../base-compiler.js';
|
|
14
|
+
import { swcDefaultsFactory } from '../defaults/swc-defaults.js';
|
|
15
|
+
import { getValueOrDefault } from '../helpers/get-value-or-default.js';
|
|
16
|
+
import { PluginMetadataGenerator } from '../plugins/plugin-metadata-generator.js';
|
|
17
|
+
import { FOUND_NO_ISSUES_GENERATING_METADATA, FOUND_NO_ISSUES_METADATA_GENERATION_SKIPPED, SWC_LOG_PREFIX, } from './constants.js';
|
|
18
|
+
import { TypeCheckerHost } from './type-checker-host.js';
|
|
19
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
20
|
+
const __dirname = dirname(__filename);
|
|
21
|
+
const require = createRequire(import.meta.url);
|
|
22
|
+
export class SwcCompiler extends BaseCompiler {
|
|
23
|
+
pluginMetadataGenerator = new PluginMetadataGenerator();
|
|
24
|
+
typeCheckerHost = new TypeCheckerHost();
|
|
20
25
|
constructor(pluginsLoader) {
|
|
21
26
|
super(pluginsLoader);
|
|
22
|
-
this.pluginMetadataGenerator = new plugin_metadata_generator_1.PluginMetadataGenerator();
|
|
23
|
-
this.typeCheckerHost = new type_checker_host_1.TypeCheckerHost();
|
|
24
27
|
}
|
|
25
28
|
async run(configuration, tsConfigPath, appName, extras, onSuccess) {
|
|
26
|
-
const swcOptions =
|
|
27
|
-
const swcrcFilePath =
|
|
29
|
+
const swcOptions = swcDefaultsFactory(extras.tsOptions, configuration);
|
|
30
|
+
const swcrcFilePath = getValueOrDefault(configuration, 'compilerOptions.builder.options.swcrcPath', appName);
|
|
28
31
|
if (extras.watch) {
|
|
29
32
|
if (extras.typeCheck) {
|
|
30
33
|
this.runTypeChecker(configuration, tsConfigPath, appName, extras);
|
|
@@ -56,10 +59,10 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
|
|
|
56
59
|
configuration.sourceRoot ?? 'src',
|
|
57
60
|
JSON.stringify(configuration.compilerOptions.plugins ?? []),
|
|
58
61
|
];
|
|
59
|
-
const childProcessRef =
|
|
62
|
+
const childProcessRef = fork(join(__dirname, 'forked-type-checker.js'), args, {
|
|
60
63
|
cwd: process.cwd(),
|
|
61
64
|
});
|
|
62
|
-
process.on('exit', () => childProcessRef &&
|
|
65
|
+
process.on('exit', () => childProcessRef && treeKillSync(childProcessRef.pid));
|
|
63
66
|
}
|
|
64
67
|
else {
|
|
65
68
|
const { readonlyVisitors } = this.loadPlugins(configuration, tsConfigPath, appName);
|
|
@@ -75,7 +78,7 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
|
|
|
75
78
|
resolve();
|
|
76
79
|
}
|
|
77
80
|
if (readonlyVisitors.length > 0) {
|
|
78
|
-
process.nextTick(() => console.log(
|
|
81
|
+
process.nextTick(() => console.log(FOUND_NO_ISSUES_GENERATING_METADATA));
|
|
79
82
|
this.pluginMetadataGenerator.generate({
|
|
80
83
|
outputDir,
|
|
81
84
|
visitors: readonlyVisitors,
|
|
@@ -83,7 +86,7 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
|
|
|
83
86
|
});
|
|
84
87
|
}
|
|
85
88
|
else {
|
|
86
|
-
process.nextTick(() => console.log(
|
|
89
|
+
process.nextTick(() => console.log(FOUND_NO_ISSUES_METADATA_GENERATION_SKIPPED));
|
|
87
90
|
}
|
|
88
91
|
},
|
|
89
92
|
});
|
|
@@ -98,11 +101,11 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
|
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
103
|
async runSwc(options, extras, swcrcFilePath) {
|
|
101
|
-
process.nextTick(() => console.log(
|
|
104
|
+
process.nextTick(() => console.log(SWC_LOG_PREFIX, cyan('Running...')));
|
|
102
105
|
const swcCli = this.loadSwcCliBinary();
|
|
103
106
|
const swcRcFile = await this.getSwcRcFileContentIfExists(swcrcFilePath);
|
|
104
107
|
const swcOptions = this.deepMerge(options.swcOptions, swcRcFile);
|
|
105
|
-
if (swcOptions?.jsc?.baseUrl && !
|
|
108
|
+
if (swcOptions?.jsc?.baseUrl && !isAbsolute(swcOptions?.jsc?.baseUrl)) {
|
|
106
109
|
// jsc.baseUrl should be resolved by the caller, if it's passed as an object.
|
|
107
110
|
// https://github.com/swc-project/swc/pull/7827
|
|
108
111
|
const rootDir = process.cwd();
|
|
@@ -136,19 +139,19 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
|
|
|
136
139
|
try {
|
|
137
140
|
return require('@swc/cli/lib/swc/dir');
|
|
138
141
|
}
|
|
139
|
-
catch
|
|
140
|
-
console.error(
|
|
142
|
+
catch {
|
|
143
|
+
console.error(ERROR_PREFIX +
|
|
141
144
|
' Failed to load "@swc/cli" and/or "@swc/core" required packages. Please, make sure to install them as development dependencies.');
|
|
142
145
|
process.exit(1);
|
|
143
146
|
}
|
|
144
147
|
}
|
|
145
148
|
getSwcRcFileContentIfExists(swcrcFilePath) {
|
|
146
149
|
try {
|
|
147
|
-
return JSON.parse(
|
|
150
|
+
return JSON.parse(readFileSync(join(process.cwd(), swcrcFilePath ?? '.swcrc'), 'utf8'));
|
|
148
151
|
}
|
|
149
|
-
catch
|
|
152
|
+
catch {
|
|
150
153
|
if (swcrcFilePath !== undefined) {
|
|
151
|
-
console.error(
|
|
154
|
+
console.error(ERROR_PREFIX +
|
|
152
155
|
` Failed to load "${swcrcFilePath}". Please, check if the file exists and is valid JSON.`);
|
|
153
156
|
process.exit(1);
|
|
154
157
|
}
|
|
@@ -170,7 +173,7 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
|
|
|
170
173
|
}
|
|
171
174
|
const merged = { ...target };
|
|
172
175
|
for (const key in source) {
|
|
173
|
-
if (
|
|
176
|
+
if (Object.hasOwn(source, key)) {
|
|
174
177
|
if (key in target) {
|
|
175
178
|
merged[key] = this.deepMerge(target[key], source[key]);
|
|
176
179
|
}
|
|
@@ -190,7 +193,7 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
|
|
|
190
193
|
}
|
|
191
194
|
async watchFilesInSrcDir(options, onFileAdded) {
|
|
192
195
|
const srcDir = options.cliOptions?.filenames?.[0];
|
|
193
|
-
const isDirectory = await
|
|
196
|
+
const isDirectory = await stat(srcDir)
|
|
194
197
|
.then((stats) => stats.isDirectory())
|
|
195
198
|
.catch(() => false);
|
|
196
199
|
if (!srcDir || !isDirectory) {
|
|
@@ -211,9 +214,9 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
|
|
|
211
214
|
watcher.on('add', async (file) => onFileAdded(file));
|
|
212
215
|
}
|
|
213
216
|
watchFilesInOutDir(options, onChange) {
|
|
214
|
-
const dir =
|
|
217
|
+
const dir = isAbsolute(options.cliOptions.outDir)
|
|
215
218
|
? options.cliOptions.outDir
|
|
216
|
-
:
|
|
219
|
+
: join(process.cwd(), options.cliOptions.outDir);
|
|
217
220
|
const watcher = chokidar.watch(dir, {
|
|
218
221
|
ignored: (file, stats) => (stats?.isFile() &&
|
|
219
222
|
!(file.endsWith('.js') || file.endsWith('.mjs'))),
|
|
@@ -228,4 +231,3 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
|
|
|
228
231
|
}
|
|
229
232
|
}
|
|
230
233
|
}
|
|
231
|
-
exports.SwcCompiler = SwcCompiler;
|