@modern-js/module-tools 2.15.0 → 2.16.0
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/CHANGELOG.md +38 -0
- package/compiled/postcss-custom-properties/index.js +1 -1
- package/compiled/postcss-custom-properties/package.json +1 -1
- package/dist/build.js +23 -66
- package/dist/build.js.map +1 -1
- package/dist/builder/build.js +114 -170
- package/dist/builder/build.js.map +1 -1
- package/dist/builder/clear.js +23 -65
- package/dist/builder/clear.js.map +1 -1
- package/dist/builder/copy.js +83 -164
- package/dist/builder/copy.js.map +1 -1
- package/dist/builder/dts/index.js +15 -28
- package/dist/builder/dts/index.js.map +1 -1
- package/dist/builder/dts/rollup.js +46 -120
- package/dist/builder/dts/rollup.js.map +1 -1
- package/dist/builder/dts/tsc.js +82 -141
- package/dist/builder/dts/tsc.js.map +1 -1
- package/dist/builder/index.js +34 -85
- package/dist/builder/index.js.map +1 -1
- package/dist/builder/platform.js +40 -93
- package/dist/builder/platform.js.map +1 -1
- package/dist/cli.js +35 -84
- package/dist/cli.js.map +1 -1
- package/dist/command.js +56 -136
- package/dist/command.js.map +1 -1
- package/dist/config/defineConfig.js +13 -42
- package/dist/config/defineConfig.js.map +1 -1
- package/dist/config/legacySchema.js +96 -52
- package/dist/config/legacySchema.js.map +1 -1
- package/dist/config/normalize.js +73 -149
- package/dist/config/normalize.js.map +1 -1
- package/dist/config/schema.d.ts +36 -0
- package/dist/config/schema.js +118 -56
- package/dist/config/schema.js.map +1 -1
- package/dist/config/transformLegacyConfig.js +152 -203
- package/dist/config/transformLegacyConfig.js.map +1 -1
- package/dist/constants/build.js +15 -27
- package/dist/constants/build.js.map +1 -1
- package/dist/constants/buildPresets.js +71 -84
- package/dist/constants/buildPresets.js.map +1 -1
- package/dist/constants/colors.js +28 -30
- package/dist/constants/colors.js.map +1 -1
- package/dist/constants/dts.js +13 -28
- package/dist/constants/dts.js.map +1 -1
- package/dist/constants/file.js +27 -30
- package/dist/constants/file.js.map +1 -1
- package/dist/constants/legacyBuildPresets.js +33 -49
- package/dist/constants/legacyBuildPresets.js.map +1 -1
- package/dist/constants/log.js +15 -33
- package/dist/constants/log.js.map +1 -1
- package/dist/dev.js +45 -91
- package/dist/dev.js.map +1 -1
- package/dist/error.js +37 -54
- package/dist/error.js.map +1 -1
- package/dist/hooks/build.js +22 -35
- package/dist/hooks/build.js.map +1 -1
- package/dist/hooks/dev.js +15 -33
- package/dist/hooks/dev.js.map +1 -1
- package/dist/hooks/index.js +15 -42
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/misc.js +10 -28
- package/dist/hooks/misc.js.map +1 -1
- package/dist/index.js +21 -35
- package/dist/index.js.map +1 -1
- package/dist/locale/en.d.ts +7 -2
- package/dist/locale/en.js +25 -32
- package/dist/locale/en.js.map +1 -1
- package/dist/locale/index.d.ts +14 -4
- package/dist/locale/index.js +18 -31
- package/dist/locale/index.js.map +1 -1
- package/dist/locale/zh.d.ts +7 -2
- package/dist/locale/zh.js +25 -32
- package/dist/locale/zh.js.map +1 -1
- package/dist/plugins.js +16 -39
- package/dist/plugins.js.map +1 -1
- package/dist/types/color.js +4 -15
- package/dist/types/color.js.map +1 -1
- package/dist/types/command.js +4 -15
- package/dist/types/command.js.map +1 -1
- package/dist/types/config/index.d.ts +6 -0
- package/dist/types/config/index.js +6 -17
- package/dist/types/config/index.js.map +1 -1
- package/dist/types/config/style.js +4 -15
- package/dist/types/config/style.js.map +1 -1
- package/dist/types/context.js +4 -15
- package/dist/types/context.js.map +1 -1
- package/dist/types/copy.js +4 -15
- package/dist/types/copy.js.map +1 -1
- package/dist/types/dts.js +4 -15
- package/dist/types/dts.js.map +1 -1
- package/dist/types/hooks.js +4 -15
- package/dist/types/hooks.js.map +1 -1
- package/dist/types/index.js +11 -22
- package/dist/types/index.js.map +1 -1
- package/dist/types/legacyConfig/index.js +4 -15
- package/dist/types/legacyConfig/index.js.map +1 -1
- package/dist/types/legacyConfig/output.js +4 -15
- package/dist/types/legacyConfig/output.js.map +1 -1
- package/dist/types/legacyConfig/source.js +4 -15
- package/dist/types/legacyConfig/source.js.map +1 -1
- package/dist/types/legacyConfig/tools.js +4 -15
- package/dist/types/legacyConfig/tools.js.map +1 -1
- package/dist/types/utils.js +4 -17
- package/dist/utils/builder.d.ts +20 -2
- package/dist/utils/builder.js +81 -68
- package/dist/utils/builder.js.map +1 -1
- package/dist/utils/common.js +10 -44
- package/dist/utils/common.js.map +1 -1
- package/dist/utils/config.js +108 -144
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/context.js +16 -59
- package/dist/utils/context.js.map +1 -1
- package/dist/utils/dts.js +69 -146
- package/dist/utils/dts.js.map +1 -1
- package/dist/utils/input.js +44 -87
- package/dist/utils/input.js.map +1 -1
- package/dist/utils/language.js +15 -60
- package/dist/utils/language.js.map +1 -1
- package/dist/utils/libuildPlugins.js +27 -67
- package/dist/utils/libuildPlugins.js.map +1 -1
- package/dist/utils/log.js +14 -61
- package/dist/utils/log.js.map +1 -1
- package/dist/utils/onExit.js +14 -61
- package/dist/utils/onExit.js.map +1 -1
- package/dist/utils/path.js +13 -59
- package/dist/utils/path.js.map +1 -1
- package/dist/utils/print.js +57 -105
- package/dist/utils/print.js.map +1 -1
- package/dist/utils/style.js +54 -106
- package/dist/utils/style.js.map +1 -1
- package/dist/utils/tspathsTransform.js +44 -81
- package/dist/utils/tspathsTransform.js.map +1 -1
- package/package.json +25 -20
- package/scripts/debug-mode.js +23 -21
- package/dist/types/utils.js.map +0 -1
package/dist/error.js
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
6
|
for (var name in all)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var error_exports = {};
|
|
19
|
-
__export(error_exports, {
|
|
7
|
+
Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: all[name]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
padSpaceWith: () => padSpaceWith,
|
|
20
14
|
InternalBuildError: () => InternalBuildError,
|
|
21
15
|
InternalDTSError: () => InternalDTSError,
|
|
22
16
|
ModuleBuildError: () => ModuleBuildError,
|
|
23
|
-
isExecaError: () => isExecaError,
|
|
24
17
|
isInternalError: () => isInternalError,
|
|
25
|
-
|
|
18
|
+
isExecaError: () => isExecaError
|
|
26
19
|
});
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
const _define_property = require("@swc/helpers/_/_define_property");
|
|
21
|
+
const _utils = require("@modern-js/utils");
|
|
29
22
|
const padSpaceWith = (str, targetL, opts = {}) => {
|
|
30
23
|
const { endStr = "|", style } = opts;
|
|
31
24
|
const l = str.length;
|
|
@@ -44,14 +37,6 @@ const padSpaceWith = (str, targetL, opts = {}) => {
|
|
|
44
37
|
return str;
|
|
45
38
|
};
|
|
46
39
|
class InternalBuildError extends Error {
|
|
47
|
-
constructor(e, opts) {
|
|
48
|
-
super(e.message);
|
|
49
|
-
Error.captureStackTrace(this, this.constructor);
|
|
50
|
-
this.e = e;
|
|
51
|
-
this.buildType = opts.buildType;
|
|
52
|
-
this.target = opts.target;
|
|
53
|
-
this.format = opts.format;
|
|
54
|
-
}
|
|
55
40
|
toString() {
|
|
56
41
|
return this.formatError().join("\n");
|
|
57
42
|
}
|
|
@@ -60,7 +45,7 @@ class InternalBuildError extends Error {
|
|
|
60
45
|
const { e, buildType, target, format } = this;
|
|
61
46
|
const textL = 25;
|
|
62
47
|
const title = `│ ${padSpaceWith(`${buildType} failed:`, textL - 2, {
|
|
63
|
-
style:
|
|
48
|
+
style: _utils.chalk.red.underline,
|
|
64
49
|
endStr: "│"
|
|
65
50
|
})}`;
|
|
66
51
|
const formatMsg = padSpaceWith(`│ - format is "${format}"`, textL, {
|
|
@@ -75,44 +60,51 @@ class InternalBuildError extends Error {
|
|
|
75
60
|
const endLine = padSpaceWith("╰".padEnd(textL - 1, "─"), textL, {
|
|
76
61
|
endStr: "╯"
|
|
77
62
|
});
|
|
78
|
-
msgs.push(
|
|
79
|
-
|
|
80
|
-
title,
|
|
81
|
-
formatMsg,
|
|
82
|
-
targetMsg,
|
|
83
|
-
endLine,
|
|
84
|
-
import_utils.chalk.blue.bold.underline(`
|
|
85
|
-
Detailed Information: `)
|
|
86
|
-
);
|
|
63
|
+
msgs.push(startLine, title, formatMsg, targetMsg, endLine, _utils.chalk.blue.bold.underline(`
|
|
64
|
+
Detailed Information: `));
|
|
87
65
|
msgs.push(e.toString());
|
|
88
66
|
msgs.push(e.stack || "");
|
|
89
67
|
return msgs;
|
|
90
68
|
}
|
|
91
|
-
}
|
|
92
|
-
class InternalDTSError extends Error {
|
|
93
69
|
constructor(e, opts) {
|
|
94
70
|
super(e.message);
|
|
71
|
+
_define_property._(this, "buildType", void 0);
|
|
72
|
+
_define_property._(this, "target", void 0);
|
|
73
|
+
_define_property._(this, "format", void 0);
|
|
74
|
+
_define_property._(this, "e", void 0);
|
|
95
75
|
Error.captureStackTrace(this, this.constructor);
|
|
96
76
|
this.e = e;
|
|
97
77
|
this.buildType = opts.buildType;
|
|
78
|
+
this.target = opts.target;
|
|
79
|
+
this.format = opts.format;
|
|
98
80
|
}
|
|
81
|
+
}
|
|
82
|
+
class InternalDTSError extends Error {
|
|
99
83
|
toString() {
|
|
100
84
|
return this.formatError().join("\n");
|
|
101
85
|
}
|
|
102
86
|
formatError() {
|
|
103
|
-
var _a;
|
|
104
87
|
const msgs = [];
|
|
105
88
|
const { e, buildType } = this;
|
|
106
|
-
msgs.push(
|
|
89
|
+
msgs.push(_utils.chalk.red.bold(`${buildType} DTS failed:`));
|
|
107
90
|
if (isExecaError(e)) {
|
|
108
91
|
if (e.stack) {
|
|
109
|
-
|
|
92
|
+
var _e_stack;
|
|
93
|
+
msgs.push((_e_stack = e.stack) === null || _e_stack === void 0 ? void 0 : _e_stack.replace(`${e.name}: ${e.shortMessage}`, ""));
|
|
110
94
|
}
|
|
111
95
|
} else {
|
|
112
96
|
msgs.push(e.stack);
|
|
113
97
|
}
|
|
114
98
|
return msgs;
|
|
115
99
|
}
|
|
100
|
+
constructor(e, opts) {
|
|
101
|
+
super(e.message);
|
|
102
|
+
_define_property._(this, "buildType", void 0);
|
|
103
|
+
_define_property._(this, "e", void 0);
|
|
104
|
+
Error.captureStackTrace(this, this.constructor);
|
|
105
|
+
this.e = e;
|
|
106
|
+
this.buildType = opts.buildType;
|
|
107
|
+
}
|
|
116
108
|
}
|
|
117
109
|
class ModuleBuildError extends Error {
|
|
118
110
|
constructor(e) {
|
|
@@ -135,14 +127,5 @@ const isExecaError = (e) => {
|
|
|
135
127
|
}
|
|
136
128
|
return false;
|
|
137
129
|
};
|
|
138
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
139
|
-
0 && (module.exports = {
|
|
140
|
-
InternalBuildError,
|
|
141
|
-
InternalDTSError,
|
|
142
|
-
ModuleBuildError,
|
|
143
|
-
isExecaError,
|
|
144
|
-
isInternalError,
|
|
145
|
-
padSpaceWith
|
|
146
|
-
});
|
|
147
130
|
|
|
148
131
|
//# sourceMappingURL=error.js.map
|
package/dist/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"mappings":"
|
|
1
|
+
{"version":3,"file":null,"mappings":"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","names":["padSpaceWith","InternalBuildError","InternalDTSError","ModuleBuildError","isInternalError","isExecaError","str","targetL","opts","endStr","style","l","length","endStrL","resetL","padStr","padEnd","replace","Error","toString","formatError","join","msgs","e","buildType","target","format","textL","title","chalk","red","underline","formatMsg","targetMsg","startLine","endLine","push","blue","bold","stack","constructor","message","captureStackTrace","name","shortMessage","stdout"],"sources":["../src/home/runner/work/modern.js/modern.js/packages/solutions/module-tools/src/error.ts"],"sourcesContent":["import { chalk } from '@modern-js/utils';\nimport type { ExecaError } from '@modern-js/utils';\nimport type { BuildType, Format, Target } from './types';\n\nexport const padSpaceWith = (\n str: string,\n targetL: number,\n opts: {\n endStr?: string;\n style?: (s: string) => string;\n } = {},\n) => {\n const { endStr = '|', style } = opts;\n const l = str.length;\n const endStrL = endStr.length;\n const resetL = targetL - l - endStrL;\n\n // str is 'aaa', targetL is 4, result is 'aaa|'\n if (resetL === 0) {\n return (style ? style(str) : str) + endStr;\n }\n\n // str is 'aaa', targetL is 5, result is 'aaa |'\n if (resetL > 0) {\n const padStr = str.padEnd(targetL - 1, ' ');\n if (style) {\n return style(str) + padStr.replace(str, '') + endStr;\n }\n return padStr + endStr;\n }\n\n return str;\n};\n\nexport class InternalBuildError extends Error {\n public buildType: BuildType;\n\n public target: Target;\n\n public format: Format;\n\n private e: Error;\n\n constructor(\n e: Error,\n opts: {\n buildType: BuildType;\n format: Format;\n target: Target;\n },\n ) {\n super(e.message);\n\n Error.captureStackTrace(this, this.constructor);\n\n this.e = e;\n this.buildType = opts.buildType;\n this.target = opts.target;\n this.format = opts.format;\n }\n\n toString() {\n return this.formatError().join('\\n');\n }\n\n formatError() {\n const msgs: string[] = [];\n const { e, buildType, target, format } = this;\n const textL = 25;\n const title = `│ ${padSpaceWith(`${buildType} failed:`, textL - 2, {\n style: chalk.red.underline,\n endStr: '│',\n })}`;\n const formatMsg = padSpaceWith(`│ - format is \"${format}\"`, textL, {\n endStr: '│',\n });\n const targetMsg = padSpaceWith(`│ - target is \"${target}\"`, textL, {\n endStr: '│',\n });\n const startLine = padSpaceWith('╭'.padEnd(textL - 1, '─'), textL, {\n endStr: '╮',\n });\n const endLine = padSpaceWith('╰'.padEnd(textL - 1, '─'), textL, {\n endStr: '╯',\n });\n msgs.push(\n startLine,\n title,\n formatMsg,\n targetMsg,\n endLine,\n chalk.blue.bold.underline(`\\nDetailed Information: `),\n );\n msgs.push(e.toString());\n msgs.push(e.stack || '');\n\n return msgs;\n }\n}\n\nexport class InternalDTSError extends Error {\n public buildType: BuildType;\n\n private e: Error;\n\n constructor(e: Error | ExecaError, opts: { buildType: BuildType }) {\n super(e.message);\n\n Error.captureStackTrace(this, this.constructor);\n\n this.e = e;\n this.buildType = opts.buildType;\n }\n\n toString() {\n return this.formatError().join('\\n');\n }\n\n formatError() {\n const msgs: string[] = [];\n const { e, buildType } = this;\n msgs.push(chalk.red.bold(`${buildType} DTS failed:`));\n if (isExecaError(e)) {\n /**\n * `shortMeessage` content like:\n * 'Command failed with exit code 2: /Users/github/modern.js/playground/module/node_modules/.bin/tsc -p /Users/github/modern.js/playground/module/node_modules/tsconfig.temp.json --pretty'\n * Don`t need it.\n */\n if (e.stack) {\n msgs.push(e.stack?.replace(`${e.name}: ${e.shortMessage}`, ''));\n }\n } else {\n msgs.push(e.stack!);\n }\n\n return msgs;\n }\n}\n\nexport class ModuleBuildError extends Error {\n constructor(e: InternalBuildError | InternalDTSError) {\n super(`\\n\\n${e}`);\n Error.captureStackTrace(this, this.constructor);\n this.name = 'ModuleBuildError';\n }\n}\n\nexport const isInternalError = (\n e: unknown,\n): e is InternalDTSError | InternalBuildError => {\n if (e instanceof InternalBuildError || e instanceof InternalDTSError) {\n return true;\n }\n\n return false;\n};\n\nexport const isExecaError = (e: any): e is ExecaError => {\n if (e.stdout) {\n return true;\n }\n\n return false;\n};\n"]}
|
package/dist/hooks/build.js
CHANGED
|
@@ -1,45 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
6
|
for (var name in all)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var build_exports = {};
|
|
19
|
-
__export(build_exports, {
|
|
7
|
+
Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: all[name]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
20
13
|
buildHooks: () => buildHooks,
|
|
21
14
|
buildWatchHooks: () => buildWatchHooks
|
|
22
15
|
});
|
|
23
|
-
|
|
24
|
-
var import_plugin = require("@modern-js/plugin");
|
|
16
|
+
const _plugin = require("@modern-js/plugin");
|
|
25
17
|
const buildHooks = {
|
|
26
|
-
beforeBuild: (0,
|
|
27
|
-
beforeBuildTask: (0,
|
|
28
|
-
afterBuildTask: (0,
|
|
29
|
-
afterBuild: (0,
|
|
30
|
-
registerBuildPlatform: (0,
|
|
31
|
-
beforeBuildPlatform: (0,
|
|
32
|
-
buildPlatform: (0,
|
|
33
|
-
afterBuildPlatform: (0,
|
|
18
|
+
beforeBuild: (0, _plugin.createParallelWorkflow)(),
|
|
19
|
+
beforeBuildTask: (0, _plugin.createAsyncWaterfall)(),
|
|
20
|
+
afterBuildTask: (0, _plugin.createParallelWorkflow)(),
|
|
21
|
+
afterBuild: (0, _plugin.createParallelWorkflow)(),
|
|
22
|
+
registerBuildPlatform: (0, _plugin.createParallelWorkflow)(),
|
|
23
|
+
beforeBuildPlatform: (0, _plugin.createParallelWorkflow)(),
|
|
24
|
+
buildPlatform: (0, _plugin.createParallelWorkflow)(),
|
|
25
|
+
afterBuildPlatform: (0, _plugin.createParallelWorkflow)()
|
|
34
26
|
};
|
|
35
27
|
const buildWatchHooks = {
|
|
36
|
-
buildWatchJs: (0,
|
|
37
|
-
buildWatchDts: (0,
|
|
28
|
+
buildWatchJs: (0, _plugin.createParallelWorkflow)(),
|
|
29
|
+
buildWatchDts: (0, _plugin.createParallelWorkflow)()
|
|
38
30
|
};
|
|
39
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
-
0 && (module.exports = {
|
|
41
|
-
buildHooks,
|
|
42
|
-
buildWatchHooks
|
|
43
|
-
});
|
|
44
31
|
|
|
45
32
|
//# sourceMappingURL=build.js.map
|
package/dist/hooks/build.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"mappings":"
|
|
1
|
+
{"version":3,"file":null,"mappings":";;;;;;;;;;;;EAeaA,YAAU,MAAVA;EAoBAC,iBAAe,MAAfA;;wBAhCN;AAYA,MAAMD,aAAa;EACxBE,cAAaC,mCAAsB;EAInCC,kBAAiBC,iCAAoB;EACrCC,iBAAgBH,mCAAsB;EACtCI,aAAYJ,mCAAsB;EAClCK,wBAAuBL,mCAAsB;EAI7CM,sBAAqBN,mCAAsB;EAI3CO,gBAAeP,mCAAsB;EACrCQ,qBAAoBR,mCAAsB;AAC5C;AAEO,MAAMF,kBAAkB;EAC7BW,eAAcT,mCAAsB;EACpCU,gBAAeV,mCAAsB;AACvC;","names":["buildHooks","buildWatchHooks","beforeBuild","createParallelWorkflow","beforeBuildTask","createAsyncWaterfall","afterBuildTask","afterBuild","registerBuildPlatform","beforeBuildPlatform","buildPlatform","afterBuildPlatform","buildWatchJs","buildWatchDts"],"sources":["../../src/hooks/home/runner/work/modern.js/modern.js/packages/solutions/module-tools/src/hooks/build.ts"],"sourcesContent":["import {\n createParallelWorkflow,\n createAsyncWaterfall,\n} from '@modern-js/plugin';\nimport type { RegisterBuildPlatformResult } from '@modern-js/core';\nimport { BuildCommandOptions } from '../types';\nimport type { BuildConfig, BaseBuildConfig } from '../types/config';\nimport type {\n BuildTaskResult,\n BuildResult,\n BuildPlatformResult,\n WatchDtsHookContext,\n WatchJsHookContext,\n} from '../types/hooks';\n\nexport const buildHooks = {\n beforeBuild: createParallelWorkflow<\n { config: BuildConfig; cliOptions: BuildCommandOptions },\n void\n >(),\n beforeBuildTask: createAsyncWaterfall<BaseBuildConfig>(),\n afterBuildTask: createParallelWorkflow<BuildTaskResult, void>(),\n afterBuild: createParallelWorkflow<BuildResult, void>(),\n registerBuildPlatform: createParallelWorkflow<\n void,\n RegisterBuildPlatformResult\n >(),\n beforeBuildPlatform: createParallelWorkflow<\n RegisterBuildPlatformResult[],\n void\n >(),\n buildPlatform: createParallelWorkflow<{ platform: string }, void>(),\n afterBuildPlatform: createParallelWorkflow<BuildPlatformResult, void>(),\n};\n\nexport const buildWatchHooks = {\n buildWatchJs: createParallelWorkflow<WatchJsHookContext, void>(),\n buildWatchDts: createParallelWorkflow<WatchDtsHookContext, void>(),\n};\n"]}
|
package/dist/hooks/dev.js
CHANGED
|
@@ -1,39 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var dev_exports = {};
|
|
19
|
-
__export(dev_exports, {
|
|
20
|
-
devHooks: () => devHooks
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
21
4
|
});
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
Object.defineProperty(exports, "devHooks", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: () => devHooks
|
|
8
|
+
});
|
|
9
|
+
const _plugin = require("@modern-js/plugin");
|
|
24
10
|
const devHooks = {
|
|
25
|
-
registerDev: (0,
|
|
26
|
-
beforeDev: (0,
|
|
27
|
-
beforeDevMenu: (0,
|
|
28
|
-
afterDevMenu: (0,
|
|
29
|
-
beforeDevTask: (0,
|
|
30
|
-
afterDev: (0,
|
|
11
|
+
registerDev: (0, _plugin.createParallelWorkflow)(),
|
|
12
|
+
beforeDev: (0, _plugin.createParallelWorkflow)(),
|
|
13
|
+
beforeDevMenu: (0, _plugin.createAsyncWaterfall)(),
|
|
14
|
+
afterDevMenu: (0, _plugin.createParallelWorkflow)(),
|
|
15
|
+
beforeDevTask: (0, _plugin.createParallelWorkflow)(),
|
|
16
|
+
afterDev: (0, _plugin.createParallelWorkflow)(),
|
|
31
17
|
// Special and rarely used hooks
|
|
32
|
-
noDevTools: (0,
|
|
18
|
+
noDevTools: (0, _plugin.createAsyncWaterfall)()
|
|
33
19
|
};
|
|
34
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
-
0 && (module.exports = {
|
|
36
|
-
devHooks
|
|
37
|
-
});
|
|
38
20
|
|
|
39
21
|
//# sourceMappingURL=dev.js.map
|
package/dist/hooks/dev.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"mappings":"
|
|
1
|
+
{"version":3,"file":null,"mappings":";;;;+BAOaA;;aAAAA;;wBAJN;AAIA,MAAMA,WAAW;EACtBC,cAAaC,mCAAsB;EACnCC,YAAWD,mCAAsB;EACjCE,gBAAeC,iCAAoB;EACnCC,eAAcJ,mCAAsB;EAIpCK,gBAAeL,mCAAsB;EACrCM,WAAUN,mCAAsB;;EAEhCO,aAAYJ,iCAAoB;AAClC;","names":["devHooks","registerDev","createParallelWorkflow","beforeDev","beforeDevMenu","createAsyncWaterfall","afterDevMenu","beforeDevTask","afterDev","noDevTools"],"sources":["../../src/hooks/home/runner/work/modern.js/modern.js/packages/solutions/module-tools/src/hooks/dev.ts"],"sourcesContent":["import {\n createParallelWorkflow,\n createAsyncWaterfall,\n} from '@modern-js/plugin';\nimport type { QuestionCollection } from '@modern-js/utils/compiled/inquirer';\nimport type { DevToolData, PromptResult } from '../types/hooks';\n\nexport const devHooks = {\n registerDev: createParallelWorkflow<void, DevToolData>(),\n beforeDev: createParallelWorkflow<DevToolData[], void>(),\n beforeDevMenu: createAsyncWaterfall<QuestionCollection>(),\n afterDevMenu: createParallelWorkflow<\n { result: PromptResult; devTools: DevToolData[] },\n void\n >(),\n beforeDevTask: createParallelWorkflow<DevToolData, void>(),\n afterDev: createParallelWorkflow<void, void>(),\n // Special and rarely used hooks\n noDevTools: createAsyncWaterfall<string>(),\n};\n"]}
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,46 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __export = (target, all) => {
|
|
20
|
-
for (var name in all)
|
|
21
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
22
|
-
};
|
|
23
|
-
var __copyProps = (to, from, except, desc) => {
|
|
24
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
25
|
-
for (let key of __getOwnPropNames(from))
|
|
26
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
27
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
28
|
-
}
|
|
29
|
-
return to;
|
|
30
|
-
};
|
|
31
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
|
-
var hooks_exports = {};
|
|
33
|
-
__export(hooks_exports, {
|
|
34
|
-
registerHook: () => registerHook
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
35
4
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var import_misc = require("./misc");
|
|
40
|
-
const registerHook = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, import_build.buildHooks), import_dev.devHooks), import_misc.miscHooks), import_build.buildWatchHooks);
|
|
41
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
-
0 && (module.exports = {
|
|
43
|
-
registerHook
|
|
5
|
+
Object.defineProperty(exports, "registerHook", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: () => registerHook
|
|
44
8
|
});
|
|
9
|
+
const _build = require("./build");
|
|
10
|
+
const _dev = require("./dev");
|
|
11
|
+
const _misc = require("./misc");
|
|
12
|
+
const registerHook = {
|
|
13
|
+
..._build.buildHooks,
|
|
14
|
+
..._dev.devHooks,
|
|
15
|
+
..._misc.miscHooks,
|
|
16
|
+
..._build.buildWatchHooks
|
|
17
|
+
};
|
|
45
18
|
|
|
46
19
|
//# sourceMappingURL=index.js.map
|
package/dist/hooks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"mappings":"
|
|
1
|
+
{"version":3,"file":null,"mappings":";;;;+BAIaA;;aAAAA;;uBAJ+B;qBACnB;sBACC;AAEnB,MAAMA,eAAe;EAC1B,GAAGC;EACH,GAAGC;EACH,GAAGC;EACH,GAAGC;AACL;","names":["registerHook","buildHooks","devHooks","miscHooks","buildWatchHooks"],"sources":["../../src/hooks/home/runner/work/modern.js/modern.js/packages/solutions/module-tools/src/hooks/index.ts"],"sourcesContent":["import { buildHooks, buildWatchHooks } from './build';\nimport { devHooks } from './dev';\nimport { miscHooks } from './misc';\n\nexport const registerHook = {\n ...buildHooks,\n ...devHooks,\n ...miscHooks,\n ...buildWatchHooks,\n};\n"]}
|
package/dist/hooks/misc.js
CHANGED
|
@@ -1,33 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var misc_exports = {};
|
|
19
|
-
__export(misc_exports, {
|
|
20
|
-
miscHooks: () => miscHooks
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
21
4
|
});
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
Object.defineProperty(exports, "miscHooks", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: () => miscHooks
|
|
8
|
+
});
|
|
9
|
+
const _plugin = require("@modern-js/plugin");
|
|
24
10
|
const miscHooks = {
|
|
25
|
-
addRuntimeExports: (0,
|
|
26
|
-
modifyLibuild: (0,
|
|
11
|
+
addRuntimeExports: (0, _plugin.createAsyncWaterfall)(),
|
|
12
|
+
modifyLibuild: (0, _plugin.createAsyncPipeline)()
|
|
27
13
|
};
|
|
28
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
-
0 && (module.exports = {
|
|
30
|
-
miscHooks
|
|
31
|
-
});
|
|
32
14
|
|
|
33
15
|
//# sourceMappingURL=misc.js.map
|
package/dist/hooks/misc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"mappings":"
|
|
1
|
+
{"version":3,"file":null,"mappings":";;;;+BAGaA;;aAAAA;;wBAH6C;AAGnD,MAAMA,YAAY;EACvBC,oBAAmBC,iCAAoB;EACvCC,gBAAeC,gCAAmB;AACpC;","names":["miscHooks","addRuntimeExports","createAsyncWaterfall","modifyLibuild","createAsyncPipeline"],"sources":["../../src/hooks/home/runner/work/modern.js/modern.js/packages/solutions/module-tools/src/hooks/misc.ts"],"sourcesContent":["import { createAsyncPipeline, createAsyncWaterfall } from '@modern-js/plugin';\nimport type { CLIConfig } from '@modern-js/libuild';\n\nexport const miscHooks = {\n addRuntimeExports: createAsyncWaterfall(),\n modifyLibuild: createAsyncPipeline<CLIConfig, CLIConfig>(),\n};\n"]}
|
package/dist/index.js
CHANGED
|
@@ -1,39 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var src_exports = {};
|
|
20
|
-
__export(src_exports, {
|
|
21
|
-
default: () => src_default,
|
|
22
|
-
defineConfig: () => import_defineConfig.defineConfig,
|
|
23
|
-
defineLegacyConfig: () => import_defineConfig.defineLegacyConfig,
|
|
24
|
-
legacyPresets: () => import_legacyBuildPresets.legacyPresets
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
25
4
|
});
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
defineConfig,
|
|
35
|
-
defineLegacyConfig,
|
|
36
|
-
legacyPresets
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: all[name]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
defineConfig: () => _defineConfig.defineConfig,
|
|
14
|
+
defineLegacyConfig: () => _defineConfig.defineLegacyConfig,
|
|
15
|
+
legacyPresets: () => _legacyBuildPresets.legacyPresets,
|
|
16
|
+
default: () => _default
|
|
37
17
|
});
|
|
18
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
19
|
+
const _cli = require("./cli");
|
|
20
|
+
const _defineConfig = require("./config/defineConfig");
|
|
21
|
+
const _legacyBuildPresets = require("./constants/legacyBuildPresets");
|
|
22
|
+
_export_star._(require("./types"), exports);
|
|
23
|
+
const _default = _cli.cli;
|
|
38
24
|
|
|
39
25
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"mappings":"
|
|
1
|
+
{"version":3,"file":null,"mappings":";;;;;;;;;;;;EAESA,cAAY,MAAZA;EAAcC,oBAAkB,MAAlBA;EACdC,eAAa,MAAbA;EAET,SAAmB,MAAnB;;;qBALoB;8BAE6B;oCACnB;uBAChB;MACd,WAAeC;","names":["defineConfig","defineLegacyConfig","legacyPresets","cli"],"sources":["../src/home/runner/work/modern.js/modern.js/packages/solutions/module-tools/src/index.ts"],"sourcesContent":["import { cli } from './cli';\n\nexport { defineConfig, defineLegacyConfig } from './config/defineConfig';\nexport { legacyPresets } from './constants/legacyBuildPresets';\nexport * from './types';\nexport default cli;\n"]}
|
package/dist/locale/en.d.ts
CHANGED
package/dist/locale/en.js
CHANGED
|
@@ -1,31 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var en_exports = {};
|
|
19
|
-
__export(en_exports, {
|
|
20
|
-
EN_LOCALE: () => EN_LOCALE
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
21
4
|
});
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
Object.defineProperty(exports, "EN_LOCALE", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: () => EN_LOCALE
|
|
8
|
+
});
|
|
9
|
+
const _utils = require("@modern-js/utils");
|
|
24
10
|
const noDevTools = `There are no DevTools available, you can learn about them and choose to use them by following the link options.
|
|
25
|
-
- ${
|
|
26
|
-
import_utils.chalk.blue("[Storybook]"),
|
|
27
|
-
"https://modernjs.dev/module-tools/guide/basic/using-storybook.html"
|
|
28
|
-
)}
|
|
11
|
+
- ${_utils.chalk.underline(_utils.chalk.blue("[Storybook]"), "https://modernjs.dev/module-tools/guide/basic/using-storybook.html")}
|
|
29
12
|
`;
|
|
30
13
|
const EN_LOCALE = {
|
|
31
14
|
command: {
|
|
@@ -58,13 +41,23 @@ const EN_LOCALE = {
|
|
|
58
41
|
noDevtools: noDevTools
|
|
59
42
|
}
|
|
60
43
|
},
|
|
61
|
-
|
|
62
|
-
|
|
44
|
+
errors: {
|
|
45
|
+
externalHelpers: `The 'externalHelpers' configuration is currently enabled, but the "@swc/helpers" dependency declaration was not found. This will cause issues with the build output.Use the following for installation:
|
|
46
|
+
${_utils.chalk.blue("Package Manager is npm:")}
|
|
47
|
+
${_utils.chalk.yellow("`npm i @swc/helpers`")} Or ${_utils.chalk.yellow("`npm i @swc/helpers -D`")}
|
|
48
|
+
|
|
49
|
+
${_utils.chalk.blue("Package Manager is pnpm:")}
|
|
50
|
+
${_utils.chalk.yellow("`pnpm i @swc/helpers`")} Or ${_utils.chalk.yellow("`pnpm i @swc/helpers -D`")}
|
|
51
|
+
|
|
52
|
+
${_utils.chalk.blue("Package Manager is yarn:")}
|
|
53
|
+
${_utils.chalk.yellow("`yarn add @swc/helpers`")} Or ${_utils.chalk.yellow("`yarn add @swc/helpers -D`")}
|
|
54
|
+
`
|
|
55
|
+
},
|
|
56
|
+
warns: {
|
|
57
|
+
dts: {
|
|
58
|
+
abortOnError: "With the `dts.abortOnError` configuration currently turned off, type errors do not cause build failures, but they do not guarantee proper type file output"
|
|
59
|
+
}
|
|
63
60
|
}
|
|
64
61
|
};
|
|
65
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
-
0 && (module.exports = {
|
|
67
|
-
EN_LOCALE
|
|
68
|
-
});
|
|
69
62
|
|
|
70
63
|
//# sourceMappingURL=en.js.map
|