@modern-js/create 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/dist/index.js +30 -30
- package/package.json +12 -8
package/dist/index.js
CHANGED
|
@@ -76513,7 +76513,9 @@ var lazy = (moduleName, requireFn) => {
|
|
|
76513
76513
|
const importLazyLocal = require_import_lazy()(requireFn);
|
|
76514
76514
|
return importLazyLocal(moduleName);
|
|
76515
76515
|
};
|
|
76516
|
-
var Import = {
|
|
76516
|
+
var Import = {
|
|
76517
|
+
lazy
|
|
76518
|
+
};
|
|
76517
76519
|
|
|
76518
76520
|
// ../utils/dist/esm/compiled.js
|
|
76519
76521
|
var import_fs_extra = __toESM(require_fs_extra());
|
|
@@ -76545,18 +76547,9 @@ var import_browserslist = __toESM(require_browserslist());
|
|
|
76545
76547
|
var import_recursive_readdir = __toESM(require_recursive_readdir());
|
|
76546
76548
|
var import_commander = __toESM(require_commander());
|
|
76547
76549
|
var import_signale2 = __toESM(require_signale());
|
|
76548
|
-
var mime = Import.lazy(
|
|
76549
|
-
|
|
76550
|
-
|
|
76551
|
-
);
|
|
76552
|
-
var chokidar = Import.lazy(
|
|
76553
|
-
"../compiled/chokidar",
|
|
76554
|
-
require
|
|
76555
|
-
);
|
|
76556
|
-
var inquirer = Import.lazy(
|
|
76557
|
-
"../compiled/inquirer",
|
|
76558
|
-
require
|
|
76559
|
-
);
|
|
76550
|
+
var mime = Import.lazy("../compiled/mime-types", require);
|
|
76551
|
+
var chokidar = Import.lazy("../compiled/chokidar", require);
|
|
76552
|
+
var inquirer = Import.lazy("../compiled/inquirer", require);
|
|
76560
76553
|
|
|
76561
76554
|
// ../../cli/plugin-i18n/dist/esm-node/languageDetector.js
|
|
76562
76555
|
var I18CLILanguageDetector = class {
|
|
@@ -76572,8 +76565,8 @@ var I18CLILanguageDetector = class {
|
|
|
76572
76565
|
return LC;
|
|
76573
76566
|
}
|
|
76574
76567
|
detect() {
|
|
76575
|
-
var
|
|
76576
|
-
const shellLocale = (
|
|
76568
|
+
var _process_env_LC_ALL, _ref, _ref1, _ref2;
|
|
76569
|
+
const shellLocale = (_ref2 = (_ref1 = (_ref = (_process_env_LC_ALL = process.env.LC_ALL) !== null && _process_env_LC_ALL !== void 0 ? _process_env_LC_ALL : process.env.LC_MESSAGES) !== null && _ref !== void 0 ? _ref : process.env.LANG) !== null && _ref1 !== void 0 ? _ref1 : process.env.LANGUAGE) !== null && _ref2 !== void 0 ? _ref2 : Intl.DateTimeFormat().resolvedOptions().locale;
|
|
76577
76570
|
return this.formatShellLocale(shellLocale);
|
|
76578
76571
|
}
|
|
76579
76572
|
};
|
|
@@ -80048,7 +80041,7 @@ var CodeSmith = /* @__PURE__ */ function() {
|
|
|
80048
80041
|
}();
|
|
80049
80042
|
|
|
80050
80043
|
// package.json
|
|
80051
|
-
var version = "2.
|
|
80044
|
+
var version = "2.16.0";
|
|
80052
80045
|
|
|
80053
80046
|
// ../../cli/plugin-i18n/dist/esm-node/index.js
|
|
80054
80047
|
var import_lodash3 = __toESM(require_lodash4());
|
|
@@ -80061,26 +80054,29 @@ function getObjKeyMap(obj, prefix = "") {
|
|
|
80061
80054
|
if ((0, import_lodash2.isString)(obj[key])) {
|
|
80062
80055
|
result[key] = prefix ? `${prefix}.${key}` : key;
|
|
80063
80056
|
} else if ((0, import_lodash2.isObject)(obj[key])) {
|
|
80064
|
-
result[key] = getObjKeyMap(
|
|
80065
|
-
obj[key],
|
|
80066
|
-
prefix ? `${prefix}.${key}` : key
|
|
80067
|
-
);
|
|
80057
|
+
result[key] = getObjKeyMap(obj[key], prefix ? `${prefix}.${key}` : key);
|
|
80068
80058
|
}
|
|
80069
80059
|
});
|
|
80070
80060
|
return result;
|
|
80071
80061
|
}
|
|
80072
80062
|
|
|
80073
80063
|
// ../../cli/plugin-i18n/dist/esm-node/index.js
|
|
80074
|
-
|
|
80075
|
-
|
|
80076
|
-
|
|
80077
|
-
|
|
80064
|
+
function _define_property(obj, key, value) {
|
|
80065
|
+
if (key in obj) {
|
|
80066
|
+
Object.defineProperty(obj, key, {
|
|
80067
|
+
value,
|
|
80068
|
+
enumerable: true,
|
|
80069
|
+
configurable: true,
|
|
80070
|
+
writable: true
|
|
80071
|
+
});
|
|
80072
|
+
} else {
|
|
80073
|
+
obj[key] = value;
|
|
80078
80074
|
}
|
|
80075
|
+
return obj;
|
|
80076
|
+
}
|
|
80077
|
+
var I18n = class {
|
|
80079
80078
|
format(msg, vars) {
|
|
80080
|
-
return msg.replace(
|
|
80081
|
-
/\{(\w+)\}/g,
|
|
80082
|
-
(_match, capture) => Object.prototype.hasOwnProperty.call(vars, capture) ? vars[capture] : capture
|
|
80083
|
-
);
|
|
80079
|
+
return msg.replace(/\{(\w+)\}/g, (_match, capture) => Object.prototype.hasOwnProperty.call(vars, capture) ? vars[capture] : capture);
|
|
80084
80080
|
}
|
|
80085
80081
|
getMessage(lang, key, vars, fallbackText) {
|
|
80086
80082
|
const languages = Object.keys(this.languageMap);
|
|
@@ -80117,6 +80113,10 @@ var I18n = class {
|
|
|
80117
80113
|
t: (key, vars, fallbackText) => this.getMessage(lang, key, vars, fallbackText)
|
|
80118
80114
|
};
|
|
80119
80115
|
}
|
|
80116
|
+
constructor() {
|
|
80117
|
+
_define_property(this, "language", "en");
|
|
80118
|
+
_define_property(this, "languageMap", {});
|
|
80119
|
+
}
|
|
80120
80120
|
};
|
|
80121
80121
|
|
|
80122
80122
|
// src/locale/zh.ts
|
|
@@ -80347,7 +80347,7 @@ function src_default() {
|
|
|
80347
80347
|
i18n.changeLanguage({ locale: getLocaleLanguage() });
|
|
80348
80348
|
const program3 = new import_commander.Command();
|
|
80349
80349
|
program3.command("clean-cache").description(i18n.t(localeKeys.command.cleanCache)).action(cleanCacheAction);
|
|
80350
|
-
program3.usage("[projectDir]").description(i18n.t(localeKeys.command.description)).argument("[projectDir]").option("-c, --config <config>", i18n.t(localeKeys.command.config), "{}").option("
|
|
80350
|
+
program3.usage("[projectDir]").description(i18n.t(localeKeys.command.description)).argument("[projectDir]").option("--version", i18n.t(localeKeys.command.version)).option("--lang <lang>", i18n.t(localeKeys.command.lang)).option("-c, --config <config>", i18n.t(localeKeys.command.config), "{}").option("-d,--debug", i18n.t(localeKeys.command.debug), false).option("--mwa", i18n.t(localeKeys.command.mwa), false).option("--module", i18n.t(localeKeys.command.module), false).option("--monorepo", i18n.t(localeKeys.command.monorepo), false).option("--generator <generator>", i18n.t(localeKeys.command.generator)).option(
|
|
80351
80351
|
"-p, --plugin <plugin>",
|
|
80352
80352
|
i18n.t(localeKeys.command.plugin),
|
|
80353
80353
|
(val, memo) => {
|
|
@@ -80355,7 +80355,7 @@ function src_default() {
|
|
|
80355
80355
|
return memo;
|
|
80356
80356
|
},
|
|
80357
80357
|
[]
|
|
80358
|
-
).option("--dist-tag <distTag>", i18n.t(localeKeys.command.distTag), "").option("--
|
|
80358
|
+
).option("--dist-tag <distTag>", i18n.t(localeKeys.command.distTag), "").option("--packages <packages>", i18n.t(localeKeys.command.packages), "{}").option("--registry <registry>", i18n.t(localeKeys.command.registry), "").option("--no-need-install", i18n.t(localeKeys.command.noNeedInstall)).action(createAction);
|
|
80359
80359
|
program3.parse(process.argv);
|
|
80360
80360
|
}
|
|
80361
80361
|
// Annotate the CommonJS export names for ESM import in node:
|
package/package.json
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
"description": "A Progressive React Framework for modern web development.",
|
|
4
4
|
"homepage": "https://modernjs.dev",
|
|
5
5
|
"bugs": "https://github.com/web-infra-dev/modern.js/issues",
|
|
6
|
-
"repository":
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/web-infra-dev/modern.js",
|
|
9
|
+
"directory": "packages/toolkit/create"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"keywords": [
|
|
9
13
|
"react",
|
|
@@ -11,7 +15,7 @@
|
|
|
11
15
|
"modern",
|
|
12
16
|
"modern.js"
|
|
13
17
|
],
|
|
14
|
-
"version": "2.
|
|
18
|
+
"version": "2.16.0",
|
|
15
19
|
"jsnext:source": "./src/index.ts",
|
|
16
20
|
"types": "./dist/types/index.d.ts",
|
|
17
21
|
"main": "./dist/index.js",
|
|
@@ -40,12 +44,12 @@
|
|
|
40
44
|
"jest": "^29",
|
|
41
45
|
"ts-node": "^10.1.0",
|
|
42
46
|
"typescript": "^4",
|
|
43
|
-
"@modern-js/generator-plugin-plugin": "3.1.
|
|
44
|
-
"@modern-js/plugin-i18n": "2.
|
|
45
|
-
"@modern-js/repo-generator": "3.1.
|
|
46
|
-
"@modern-js/utils": "2.
|
|
47
|
-
"@scripts/build": "2.
|
|
48
|
-
"@scripts/jest-config": "2.
|
|
47
|
+
"@modern-js/generator-plugin-plugin": "3.1.10",
|
|
48
|
+
"@modern-js/plugin-i18n": "2.16.0",
|
|
49
|
+
"@modern-js/repo-generator": "3.1.10",
|
|
50
|
+
"@modern-js/utils": "2.16.0",
|
|
51
|
+
"@scripts/build": "2.16.0",
|
|
52
|
+
"@scripts/jest-config": "2.16.0"
|
|
49
53
|
},
|
|
50
54
|
"sideEffects": false,
|
|
51
55
|
"publishConfig": {
|