@modern-js/repo-generator 3.1.21 → 3.1.22
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/dist/index.js +17 -273
- package/package.json +14 -13
package/dist/index.js
CHANGED
@@ -42247,7 +42247,7 @@ var require_parse = __commonJS({
|
|
42247
42247
|
return current.type === "Punctuator" ? current.value : current.type;
|
42248
42248
|
};
|
42249
42249
|
var is = (t) => type() === t;
|
42250
|
-
var
|
42250
|
+
var expect = (a) => {
|
42251
42251
|
if (!is(a)) {
|
42252
42252
|
unexpected();
|
42253
42253
|
}
|
@@ -42329,7 +42329,7 @@ var require_parse = __commonJS({
|
|
42329
42329
|
while (!is(CURLY_BRACKET_CLOSE)) {
|
42330
42330
|
if (started) {
|
42331
42331
|
assign_comments(PREFIX_AFTER_VALUE);
|
42332
|
-
|
42332
|
+
expect(COMMA);
|
42333
42333
|
next();
|
42334
42334
|
parse_comments();
|
42335
42335
|
assign_after_comments();
|
@@ -42338,13 +42338,13 @@ var require_parse = __commonJS({
|
|
42338
42338
|
}
|
42339
42339
|
}
|
42340
42340
|
started = true;
|
42341
|
-
|
42341
|
+
expect("String");
|
42342
42342
|
name = JSON.parse(current.value);
|
42343
42343
|
set_prop(name);
|
42344
42344
|
assign_comments(PREFIX_BEFORE);
|
42345
42345
|
next();
|
42346
42346
|
parse_comments(PREFIX_AFTER_PROP);
|
42347
|
-
|
42347
|
+
expect(COLON);
|
42348
42348
|
next();
|
42349
42349
|
parse_comments(PREFIX_AFTER_COLON);
|
42350
42350
|
obj[name] = transform(name, walk());
|
@@ -42372,7 +42372,7 @@ var require_parse = __commonJS({
|
|
42372
42372
|
while (!is(BRACKET_CLOSE)) {
|
42373
42373
|
if (started) {
|
42374
42374
|
assign_comments(PREFIX_AFTER_VALUE);
|
42375
|
-
|
42375
|
+
expect(COMMA);
|
42376
42376
|
next();
|
42377
42377
|
parse_comments();
|
42378
42378
|
assign_after_comments();
|
@@ -122814,6 +122814,9 @@ var require_constants2 = __commonJS({
|
|
122814
122814
|
ROUTE_SPEC_FILE: function() {
|
122815
122815
|
return ROUTE_SPEC_FILE;
|
122816
122816
|
},
|
122817
|
+
NESTED_ROUTE_SPEC_FILE: function() {
|
122818
|
+
return NESTED_ROUTE_SPEC_FILE;
|
122819
|
+
},
|
122817
122820
|
MAIN_ENTRY_NAME: function() {
|
122818
122821
|
return MAIN_ENTRY_NAME;
|
122819
122822
|
},
|
@@ -122898,9 +122901,6 @@ var require_constants2 = __commonJS({
|
|
122898
122901
|
INTERNAL_SERVER_PLUGINS: function() {
|
122899
122902
|
return INTERNAL_SERVER_PLUGINS;
|
122900
122903
|
},
|
122901
|
-
PLUGIN_SCHEMAS: function() {
|
122902
|
-
return PLUGIN_SCHEMAS;
|
122903
|
-
},
|
122904
122904
|
DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: function() {
|
122905
122905
|
return DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS;
|
122906
122906
|
}
|
@@ -122908,6 +122908,7 @@ var require_constants2 = __commonJS({
|
|
122908
122908
|
var _export_star = require_export_star();
|
122909
122909
|
_export_star._(require_chainId(), exports);
|
122910
122910
|
var ROUTE_SPEC_FILE = "route.json";
|
122911
|
+
var NESTED_ROUTE_SPEC_FILE = "nestedRoutes.json";
|
122911
122912
|
var MAIN_ENTRY_NAME = "main";
|
122912
122913
|
var SERVER_BUNDLE_DIRECTORY = "bundles";
|
122913
122914
|
var SERVER_WORKER_BUNDLE_DIRECTORY = "worker";
|
@@ -122954,8 +122955,6 @@ var require_constants2 = __commonJS({
|
|
122954
122955
|
"@modern-js/plugin-testing": "@modern-js/plugin-testing/cli",
|
122955
122956
|
"@modern-js/plugin-storybook": "@modern-js/plugin-storybook/cli",
|
122956
122957
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
122957
|
-
// TODO: Maybe can remove it
|
122958
|
-
"@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
|
122959
122958
|
// legacy router (inner react-router-dom v5)
|
122960
122959
|
"@modern-js/plugin-router-legacy": "@modern-js/plugin-router-legacy/cli"
|
122961
122960
|
};
|
@@ -122986,8 +122985,6 @@ var require_constants2 = __commonJS({
|
|
122986
122985
|
"@modern-js/plugin-garfish": "@modern-js/plugin-garfish/cli",
|
122987
122986
|
"@modern-js/plugin-tailwindcss": "@modern-js/plugin-tailwindcss/cli",
|
122988
122987
|
"@modern-js/plugin-polyfill": "@modern-js/plugin-polyfill/cli",
|
122989
|
-
// TODO: Maybe can remove it
|
122990
|
-
"@modern-js/plugin-nocode": "@modern-js/plugin-nocode/cli",
|
122991
122988
|
// legacy router (inner react-router-dom v5)
|
122992
122989
|
"@modern-js/plugin-router-v5": "@modern-js/plugin-router-v5/cli"
|
122993
122990
|
};
|
@@ -123003,214 +123000,6 @@ var require_constants2 = __commonJS({
|
|
123003
123000
|
[SERVER_PLUGIN_SERVER]: "@modern-js/plugin-server/server",
|
123004
123001
|
[SERVER_PLUGIN_POLYFILL]: "@modern-js/plugin-polyfill/server"
|
123005
123002
|
};
|
123006
|
-
var PLUGIN_SCHEMAS = {
|
123007
|
-
"@modern-js/runtime": [
|
123008
|
-
{
|
123009
|
-
target: "runtime",
|
123010
|
-
schema: {
|
123011
|
-
type: "object",
|
123012
|
-
additionalProperties: false
|
123013
|
-
}
|
123014
|
-
},
|
123015
|
-
{
|
123016
|
-
target: "runtimeByEntries",
|
123017
|
-
schema: {
|
123018
|
-
type: "object",
|
123019
|
-
patternProperties: {
|
123020
|
-
[ENTRY_NAME_PATTERN]: {
|
123021
|
-
type: "object"
|
123022
|
-
}
|
123023
|
-
},
|
123024
|
-
additionalProperties: false
|
123025
|
-
}
|
123026
|
-
}
|
123027
|
-
],
|
123028
|
-
"@modern-js/plugin-swc": [
|
123029
|
-
{
|
123030
|
-
target: "tools.swc",
|
123031
|
-
schema: {
|
123032
|
-
typeof: [
|
123033
|
-
"object"
|
123034
|
-
]
|
123035
|
-
}
|
123036
|
-
}
|
123037
|
-
],
|
123038
|
-
"@modern-js/plugin-bff": [
|
123039
|
-
{
|
123040
|
-
target: "bff",
|
123041
|
-
schema: {
|
123042
|
-
type: "object",
|
123043
|
-
properties: {
|
123044
|
-
prefix: {
|
123045
|
-
type: [
|
123046
|
-
"string",
|
123047
|
-
"array"
|
123048
|
-
],
|
123049
|
-
items: {
|
123050
|
-
type: "string"
|
123051
|
-
}
|
123052
|
-
},
|
123053
|
-
fetcher: {
|
123054
|
-
type: "string"
|
123055
|
-
},
|
123056
|
-
proxy: {
|
123057
|
-
type: "object"
|
123058
|
-
},
|
123059
|
-
requestCreator: {
|
123060
|
-
type: "string"
|
123061
|
-
}
|
123062
|
-
}
|
123063
|
-
}
|
123064
|
-
}
|
123065
|
-
],
|
123066
|
-
"@modern-js/plugin-tailwindcss": [
|
123067
|
-
{
|
123068
|
-
target: "tools.tailwindcss",
|
123069
|
-
schema: {
|
123070
|
-
typeof: [
|
123071
|
-
"object",
|
123072
|
-
"function"
|
123073
|
-
]
|
123074
|
-
}
|
123075
|
-
}
|
123076
|
-
],
|
123077
|
-
"@modern-js/plugin-proxy": [
|
123078
|
-
{
|
123079
|
-
target: "dev.proxy",
|
123080
|
-
schema: {
|
123081
|
-
typeof: [
|
123082
|
-
"string",
|
123083
|
-
"object"
|
123084
|
-
]
|
123085
|
-
}
|
123086
|
-
}
|
123087
|
-
],
|
123088
|
-
"@modern-js/plugin-ssg": [
|
123089
|
-
{
|
123090
|
-
target: "output.ssg",
|
123091
|
-
schema: {
|
123092
|
-
oneOf: [
|
123093
|
-
{
|
123094
|
-
type: "boolean"
|
123095
|
-
},
|
123096
|
-
{
|
123097
|
-
type: "object"
|
123098
|
-
},
|
123099
|
-
{
|
123100
|
-
instanceof: "Function"
|
123101
|
-
}
|
123102
|
-
]
|
123103
|
-
}
|
123104
|
-
}
|
123105
|
-
],
|
123106
|
-
"@modern-js/plugin-state": [
|
123107
|
-
{
|
123108
|
-
target: "runtime.state",
|
123109
|
-
schema: {
|
123110
|
-
type: [
|
123111
|
-
"boolean",
|
123112
|
-
"object"
|
123113
|
-
]
|
123114
|
-
}
|
123115
|
-
}
|
123116
|
-
],
|
123117
|
-
"@modern-js/plugin-design-token": [
|
123118
|
-
// Legacy Features
|
123119
|
-
{
|
123120
|
-
target: "source.designSystem",
|
123121
|
-
schema: {
|
123122
|
-
typeof: [
|
123123
|
-
"object"
|
123124
|
-
]
|
123125
|
-
}
|
123126
|
-
},
|
123127
|
-
{
|
123128
|
-
target: "source.designSystem.supportStyledComponents",
|
123129
|
-
schema: {
|
123130
|
-
type: [
|
123131
|
-
"boolean"
|
123132
|
-
]
|
123133
|
-
}
|
123134
|
-
},
|
123135
|
-
{
|
123136
|
-
target: "designSystem",
|
123137
|
-
schema: {
|
123138
|
-
typeof: [
|
123139
|
-
"object"
|
123140
|
-
]
|
123141
|
-
}
|
123142
|
-
}
|
123143
|
-
],
|
123144
|
-
"@modern-js/plugin-router": [
|
123145
|
-
{
|
123146
|
-
target: "runtime.router",
|
123147
|
-
schema: {
|
123148
|
-
type: [
|
123149
|
-
"boolean",
|
123150
|
-
"object"
|
123151
|
-
]
|
123152
|
-
}
|
123153
|
-
}
|
123154
|
-
],
|
123155
|
-
"@modern-js/plugin-testing": [
|
123156
|
-
{
|
123157
|
-
target: "testing",
|
123158
|
-
schema: {
|
123159
|
-
typeof: [
|
123160
|
-
"object"
|
123161
|
-
]
|
123162
|
-
}
|
123163
|
-
},
|
123164
|
-
{
|
123165
|
-
target: "tools.jest",
|
123166
|
-
schema: {
|
123167
|
-
typeof: [
|
123168
|
-
"object",
|
123169
|
-
"function"
|
123170
|
-
]
|
123171
|
-
}
|
123172
|
-
}
|
123173
|
-
],
|
123174
|
-
"@modern-js/plugin-garfish": [
|
123175
|
-
{
|
123176
|
-
target: "runtime.masterApp",
|
123177
|
-
schema: {
|
123178
|
-
type: [
|
123179
|
-
"boolean",
|
123180
|
-
"object"
|
123181
|
-
]
|
123182
|
-
}
|
123183
|
-
},
|
123184
|
-
{
|
123185
|
-
target: "dev.withMasterApp",
|
123186
|
-
schema: {
|
123187
|
-
type: [
|
123188
|
-
"object"
|
123189
|
-
]
|
123190
|
-
}
|
123191
|
-
},
|
123192
|
-
{
|
123193
|
-
target: "deploy.microFrontend",
|
123194
|
-
schema: {
|
123195
|
-
type: [
|
123196
|
-
"boolean",
|
123197
|
-
"object"
|
123198
|
-
]
|
123199
|
-
}
|
123200
|
-
}
|
123201
|
-
],
|
123202
|
-
"@modern-js/plugin-nocode": [],
|
123203
|
-
"@modern-js/plugin-worker": [
|
123204
|
-
{
|
123205
|
-
target: "deploy.worker.ssr",
|
123206
|
-
schema: {
|
123207
|
-
type: [
|
123208
|
-
"boolean"
|
123209
|
-
]
|
123210
|
-
}
|
123211
|
-
}
|
123212
|
-
]
|
123213
|
-
};
|
123214
123003
|
var DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
|
123215
123004
|
allowNamespaces: true,
|
123216
123005
|
allExtensions: true,
|
@@ -123665,11 +123454,14 @@ var require_project = __commonJS({
|
|
123665
123454
|
return false;
|
123666
123455
|
}
|
123667
123456
|
};
|
123668
|
-
var isApiOnly = (appDirectory, entryDir) => __async(exports, null, function* () {
|
123669
|
-
const
|
123670
|
-
const existSrc = yield _compiled.fs.pathExists(
|
123457
|
+
var isApiOnly = (appDirectory, entryDir, apiDir) => __async(exports, null, function* () {
|
123458
|
+
const existApi = yield _compiled.fs.pathExists(apiDir !== null && apiDir !== void 0 ? apiDir : _path.default.join(appDirectory, "api"));
|
123459
|
+
const existSrc = yield _compiled.fs.pathExists(_path.default.join(appDirectory, entryDir !== null && entryDir !== void 0 ? entryDir : "src"));
|
123671
123460
|
const options = (0, _compiled.minimist)((0, _commands.getArgv)());
|
123672
|
-
|
123461
|
+
if (options["api-only"]) {
|
123462
|
+
return true;
|
123463
|
+
}
|
123464
|
+
return existApi && !existSrc;
|
123673
123465
|
});
|
123674
123466
|
var isWebOnly = () => __async(exports, null, function* () {
|
123675
123467
|
const options = (0, _compiled.minimist)((0, _commands.getArgv)());
|
@@ -124003,21 +123795,6 @@ var require_get2 = __commonJS({
|
|
124003
123795
|
}
|
124004
123796
|
});
|
124005
123797
|
|
124006
|
-
// ../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs
|
124007
|
-
var require_define_property = __commonJS({
|
124008
|
-
"../../../../node_modules/.pnpm/@swc+helpers@0.5.1/node_modules/@swc/helpers/cjs/_define_property.cjs"(exports) {
|
124009
|
-
"use strict";
|
124010
|
-
exports._ = exports._define_property = _define_property22;
|
124011
|
-
function _define_property22(obj, key, value) {
|
124012
|
-
if (key in obj) {
|
124013
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
124014
|
-
} else
|
124015
|
-
obj[key] = value;
|
124016
|
-
return obj;
|
124017
|
-
}
|
124018
|
-
}
|
124019
|
-
});
|
124020
|
-
|
124021
123798
|
// ../../../toolkit/utils/dist/cjs/cli/logger.js
|
124022
123799
|
var require_logger2 = __commonJS({
|
124023
123800
|
"../../../toolkit/utils/dist/cjs/cli/logger.js"(exports) {
|
@@ -124040,7 +123817,6 @@ var require_logger2 = __commonJS({
|
|
124040
123817
|
return logger2;
|
124041
123818
|
}
|
124042
123819
|
});
|
124043
|
-
var _define_property22 = require_define_property();
|
124044
123820
|
var _interop_require_default = require_interop_require_default();
|
124045
123821
|
var _chalk = /* @__PURE__ */ _interop_require_default._(require_chalk2());
|
124046
123822
|
var LOG_LEVEL = {
|
@@ -124126,10 +123902,6 @@ ${_chalk.default.grey(rest.join("\n"))}`;
|
|
124126
123902
|
return longestLabel;
|
124127
123903
|
}
|
124128
123904
|
constructor(options = {}) {
|
124129
|
-
_define_property22._(this, "level", void 0);
|
124130
|
-
_define_property22._(this, "config", void 0);
|
124131
|
-
_define_property22._(this, "types", void 0);
|
124132
|
-
_define_property22._(this, "longestLabel", void 0);
|
124133
123905
|
this.level = options.level || LOG_TYPES.log.level;
|
124134
123906
|
this.config = __spreadValues(__spreadValues({}, DEFAULT_CONFIG), options.config || {});
|
124135
123907
|
this.types = __spreadValues(__spreadValues({}, LOG_TYPES), options.types || {});
|
@@ -125059,31 +124831,6 @@ var require_runtimeExports = __commonJS({
|
|
125059
124831
|
}
|
125060
124832
|
});
|
125061
124833
|
|
125062
|
-
// ../../../toolkit/utils/dist/cjs/cli/test.js
|
125063
|
-
var require_test = __commonJS({
|
125064
|
-
"../../../toolkit/utils/dist/cjs/cli/test.js"(exports) {
|
125065
|
-
"use strict";
|
125066
|
-
Object.defineProperty(exports, "__esModule", {
|
125067
|
-
value: true
|
125068
|
-
});
|
125069
|
-
Object.defineProperty(exports, "initSnapshotSerializer", {
|
125070
|
-
enumerable: true,
|
125071
|
-
get: function() {
|
125072
|
-
return initSnapshotSerializer;
|
125073
|
-
}
|
125074
|
-
});
|
125075
|
-
var initSnapshotSerializer = (root) => {
|
125076
|
-
expect.addSnapshotSerializer({
|
125077
|
-
test: (val) => typeof val === "string" && (val.includes("modern.js") || val.includes("node_modules") || val.includes(root)),
|
125078
|
-
print: (val) => (
|
125079
|
-
// eslint-disable-next-line no-nested-ternary
|
125080
|
-
typeof val === "string" ? val.includes("node_modules") ? `"${val.replace(/.+node_modules/, ``).replace(/\\/g, "/")}"` : val.includes("modern.js") ? `"${val.replace(/.+modern\.js/, ``).replace(/\\/g, "/")}"` : `"${val.replace(root, "").replace(/\\/g, "/")}"` : val
|
125081
|
-
)
|
125082
|
-
});
|
125083
|
-
};
|
125084
|
-
}
|
125085
|
-
});
|
125086
|
-
|
125087
124834
|
// ../../../toolkit/utils/dist/cjs/cli/watch.js
|
125088
124835
|
var require_watch = __commonJS({
|
125089
124836
|
"../../../toolkit/utils/dist/cjs/cli/watch.js"(exports) {
|
@@ -125180,7 +124927,6 @@ var require_cli = __commonJS({
|
|
125180
124927
|
_export_star._(require_require(), exports);
|
125181
124928
|
_export_star._(require_routes(), exports);
|
125182
124929
|
_export_star._(require_runtimeExports(), exports);
|
125183
|
-
_export_star._(require_test(), exports);
|
125184
124930
|
_export_star._(require_watch(), exports);
|
125185
124931
|
}
|
125186
124932
|
});
|
@@ -144557,7 +144303,7 @@ var ZH_LOCALE2 = {
|
|
144557
144303
|
function: {
|
144558
144304
|
self: "启用可选功能",
|
144559
144305
|
question: "请选择功能名称",
|
144560
|
-
tailwindcss: "
|
144306
|
+
tailwindcss: "启用「Tailwind CSS」 支持",
|
144561
144307
|
bff: "启用「BFF」功能",
|
144562
144308
|
micro_frontend: "启用「微前端」模式",
|
144563
144309
|
i18n: "启用「国际化(i18n)」功能",
|
@@ -148631,8 +148377,6 @@ var src_default = (context, generator) => __async(void 0, null, function* () {
|
|
148631
148377
|
}
|
148632
148378
|
generator.logger.debug(`forge @modern-js/repo-generator succeed `);
|
148633
148379
|
});
|
148634
|
-
// Annotate the CommonJS export names for ESM import in node:
|
148635
|
-
0 && (module.exports = {});
|
148636
148380
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
148637
148381
|
/*!
|
148638
148382
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "3.1.
|
18
|
+
"version": "3.1.22",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"main": "./dist/index.js",
|
21
21
|
"files": [
|
@@ -29,22 +29,23 @@
|
|
29
29
|
"@types/node": "^14",
|
30
30
|
"jest": "^29",
|
31
31
|
"typescript": "^5",
|
32
|
-
"@modern-js/generator-common": "3.1.
|
33
|
-
"@modern-js/module-generator": "3.1.
|
34
|
-
"@modern-js/monorepo-generator": "3.1.
|
35
|
-
"@modern-js/mwa-generator": "3.1.
|
36
|
-
"@modern-js/doc-generator": "3.1.
|
37
|
-
"@modern-js/
|
38
|
-
"@modern-js/generator-plugin": "3.1.
|
39
|
-
"@modern-js/base-generator": "3.1.
|
40
|
-
"@modern-js/utils": "
|
41
|
-
"@scripts/
|
42
|
-
"@scripts/
|
32
|
+
"@modern-js/generator-common": "3.1.22",
|
33
|
+
"@modern-js/module-generator": "3.1.22",
|
34
|
+
"@modern-js/monorepo-generator": "3.1.22",
|
35
|
+
"@modern-js/mwa-generator": "3.1.22",
|
36
|
+
"@modern-js/doc-generator": "3.1.22",
|
37
|
+
"@modern-js/utils": "2.23.0",
|
38
|
+
"@modern-js/generator-plugin": "3.1.22",
|
39
|
+
"@modern-js/base-generator": "3.1.22",
|
40
|
+
"@modern-js/generator-utils": "3.1.22",
|
41
|
+
"@scripts/jest-config": "2.23.0",
|
42
|
+
"@scripts/build": "2.23.0"
|
43
43
|
},
|
44
44
|
"sideEffects": false,
|
45
45
|
"publishConfig": {
|
46
46
|
"registry": "https://registry.npmjs.org/",
|
47
|
-
"access": "public"
|
47
|
+
"access": "public",
|
48
|
+
"provenance": true
|
48
49
|
},
|
49
50
|
"types": "./src/index.ts",
|
50
51
|
"scripts": {
|