@modern-js/ssg-generator 3.3.8 → 3.3.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +24 -26
- package/package.json +10 -10
package/dist/index.js
CHANGED
@@ -51065,12 +51065,12 @@ function _define_property(obj, key, value) {
|
|
51065
51065
|
return obj;
|
51066
51066
|
}
|
51067
51067
|
|
51068
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
51068
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
51069
51069
|
var import_utils13 = require("@modern-js/utils");
|
51070
51070
|
var import_lodash5 = require("@modern-js/utils/lodash");
|
51071
51071
|
var import_comment_json = __toESM(require_src2());
|
51072
51072
|
|
51073
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
51073
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.4/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
51074
51074
|
var import_utils = require("@modern-js/utils");
|
51075
51075
|
async function canUseNvm() {
|
51076
51076
|
try {
|
@@ -51120,7 +51120,7 @@ async function canUsePnpm() {
|
|
51120
51120
|
}
|
51121
51121
|
}
|
51122
51122
|
|
51123
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
51123
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.4/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
51124
51124
|
var import_utils2 = require("@modern-js/utils");
|
51125
51125
|
function execaWithStreamLog(command, args, options) {
|
51126
51126
|
const promise = (0, import_utils2.execa)(command, args, {
|
@@ -51216,7 +51216,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
51216
51216
|
throw new Error("please install pnpm first");
|
51217
51217
|
}
|
51218
51218
|
|
51219
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.
|
51219
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.3.4/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
51220
51220
|
var NpmAPI = class {
|
51221
51221
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
51222
51222
|
return npmInstall({
|
@@ -51245,7 +51245,7 @@ var NpmAPI = class {
|
|
51245
51245
|
}
|
51246
51246
|
};
|
51247
51247
|
|
51248
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
51248
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
|
51249
51249
|
var import_utils4 = require("@modern-js/utils");
|
51250
51250
|
async function canUseGit() {
|
51251
51251
|
try {
|
@@ -51320,7 +51320,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
51320
51320
|
});
|
51321
51321
|
}
|
51322
51322
|
|
51323
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.
|
51323
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
|
51324
51324
|
var GitAPI = class {
|
51325
51325
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
51326
51326
|
const canUse = await canUseGit();
|
@@ -51372,12 +51372,12 @@ var GitAPI = class {
|
|
51372
51372
|
}
|
51373
51373
|
};
|
51374
51374
|
|
51375
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
51375
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
51376
51376
|
var import_path = __toESM(require("path"));
|
51377
51377
|
var import_utils6 = require("@modern-js/utils");
|
51378
51378
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
51379
51379
|
|
51380
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.
|
51380
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
51381
51381
|
var import_utils7 = require("@modern-js/utils");
|
51382
51382
|
async function fsExists(path6) {
|
51383
51383
|
try {
|
@@ -51388,7 +51388,7 @@ async function fsExists(path6) {
|
|
51388
51388
|
}
|
51389
51389
|
}
|
51390
51390
|
|
51391
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
51391
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
|
51392
51392
|
var import_handlebars = __toESM(require_lib());
|
51393
51393
|
function renderString(template, fullData, registers) {
|
51394
51394
|
const helpers = {
|
@@ -51402,7 +51402,7 @@ function renderString(template, fullData, registers) {
|
|
51402
51402
|
return import_handlebars.default.compile(template)(fullData) || "";
|
51403
51403
|
}
|
51404
51404
|
|
51405
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.
|
51405
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
|
51406
51406
|
var HandlebarsAPI = class {
|
51407
51407
|
async registerHelp(helpers) {
|
51408
51408
|
this.registers.helpers = {
|
@@ -51452,13 +51452,13 @@ var HandlebarsAPI = class {
|
|
51452
51452
|
}
|
51453
51453
|
};
|
51454
51454
|
|
51455
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
51455
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
|
51456
51456
|
var import_ejs = __toESM(require_ejs());
|
51457
51457
|
function renderString2(template, fullData) {
|
51458
51458
|
return import_ejs.default.render(template, fullData) || "";
|
51459
51459
|
}
|
51460
51460
|
|
51461
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.
|
51461
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
|
51462
51462
|
var EjsAPI = class {
|
51463
51463
|
async renderTemplate(templateResource, target, parameters = {}) {
|
51464
51464
|
if (templateResource._type !== FS_RESOURCE) {
|
@@ -51491,7 +51491,7 @@ var EjsAPI = class {
|
|
51491
51491
|
}
|
51492
51492
|
};
|
51493
51493
|
|
51494
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.
|
51494
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.3.4_@modern-js+codesmith@2.3.4/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
|
51495
51495
|
var import_path2 = __toESM(require("path"));
|
51496
51496
|
var import_utils10 = require("@modern-js/utils");
|
51497
51497
|
var FsAPI = class {
|
@@ -61075,10 +61075,10 @@ var Schema = (
|
|
61075
61075
|
}()
|
61076
61076
|
);
|
61077
61077
|
|
61078
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
61078
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
61079
61079
|
var import_inquirer = __toESM(require_inquirer());
|
61080
61080
|
|
61081
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
61081
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
|
61082
61082
|
var import_lodash = require("@modern-js/utils/lodash");
|
61083
61083
|
function validateSchema(schema) {
|
61084
61084
|
const { type, properties } = schema;
|
@@ -61170,7 +61170,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
61170
61170
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
61171
61171
|
}
|
61172
61172
|
|
61173
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
61173
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
61174
61174
|
var compileRule = (rule, scope) => {
|
61175
61175
|
const state = Schema.compile(rule, {
|
61176
61176
|
$self: {},
|
@@ -61274,7 +61274,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
61274
61274
|
return answers;
|
61275
61275
|
}
|
61276
61276
|
|
61277
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.
|
61277
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
|
61278
61278
|
var CLIReader = class {
|
61279
61279
|
getAnswers() {
|
61280
61280
|
return this.answers;
|
@@ -61305,7 +61305,7 @@ var CLIReader = class {
|
|
61305
61305
|
}
|
61306
61306
|
};
|
61307
61307
|
|
61308
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
61308
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
61309
61309
|
var import_inquirer2 = __toESM(require_inquirer2());
|
61310
61310
|
|
61311
61311
|
// ../../../../node_modules/.pnpm/@modern-js+plugin-i18n@2.37.2/node_modules/@modern-js/plugin-i18n/dist/esm-node/index.js
|
@@ -61371,7 +61371,7 @@ var I18n = class {
|
|
61371
61371
|
}
|
61372
61372
|
};
|
61373
61373
|
|
61374
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
61374
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
|
61375
61375
|
var ZH_LOCALE = {
|
61376
61376
|
environment: {
|
61377
61377
|
node_version: "请升级 Node 版本至 LIS",
|
@@ -61398,7 +61398,7 @@ var ZH_LOCALE = {
|
|
61398
61398
|
}
|
61399
61399
|
};
|
61400
61400
|
|
61401
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
61401
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
|
61402
61402
|
var EN_LOCALE = {
|
61403
61403
|
environment: {
|
61404
61404
|
node_version: "please upgrade node to lts version",
|
@@ -61425,14 +61425,14 @@ var EN_LOCALE = {
|
|
61425
61425
|
}
|
61426
61426
|
};
|
61427
61427
|
|
61428
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
61428
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
|
61429
61429
|
var i18n = new I18n();
|
61430
61430
|
var localeKeys = i18n.init("zh", {
|
61431
61431
|
zh: ZH_LOCALE,
|
61432
61432
|
en: EN_LOCALE
|
61433
61433
|
});
|
61434
61434
|
|
61435
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
61435
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
|
61436
61436
|
var import_lodash4 = require("@modern-js/utils/lodash");
|
61437
61437
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
61438
61438
|
for (const question of questions) {
|
@@ -61460,7 +61460,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
61460
61460
|
return questions;
|
61461
61461
|
}
|
61462
61462
|
|
61463
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
61463
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
|
61464
61464
|
var import_path4 = __toESM(require("path"));
|
61465
61465
|
var import_utils12 = require("@modern-js/utils");
|
61466
61466
|
var NODE_MAJOR_VERSION_MAP = {
|
@@ -61508,7 +61508,7 @@ async function checkUseNvm(cwd, logger) {
|
|
61508
61508
|
}
|
61509
61509
|
}
|
61510
61510
|
|
61511
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.
|
61511
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.3.4_@modern-js+codesmith@2.3.4_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
61512
61512
|
var AppAPI = class {
|
61513
61513
|
async checkEnvironment(nodeVersion) {
|
61514
61514
|
if (import_utils13.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
@@ -61861,7 +61861,6 @@ var ZH_LOCALE2 = {
|
|
61861
61861
|
polyfill: "启用「基于 UA 的 Polyfill」功能",
|
61862
61862
|
proxy: "启用「全局代理」",
|
61863
61863
|
swc: "启用「SWC 编译」",
|
61864
|
-
rspack: "启用「Rspack 构建」(实验性)",
|
61865
61864
|
module_doc: "启动「模块文档」功能"
|
61866
61865
|
},
|
61867
61866
|
element: {
|
@@ -61960,7 +61959,6 @@ var EN_LOCALE2 = {
|
|
61960
61959
|
polyfill: "Enable UA-based Polyfill Feature",
|
61961
61960
|
proxy: "Enable Global Proxy",
|
61962
61961
|
swc: "Enable SWC Compile",
|
61963
|
-
rspack: "Enable Rspack Build (experimental)",
|
61964
61962
|
module_doc: "Enable Module Doc"
|
61965
61963
|
},
|
61966
61964
|
element: {
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "3.3.
|
18
|
+
"version": "3.3.9",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"main": "./dist/index.js",
|
21
21
|
"files": [
|
@@ -23,21 +23,21 @@
|
|
23
23
|
"/dist/index.js"
|
24
24
|
],
|
25
25
|
"dependencies": {
|
26
|
-
"@modern-js/utils": "2.
|
26
|
+
"@modern-js/utils": "2.47.0"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
|
-
"@modern-js/codesmith": "2.3.
|
30
|
-
"@modern-js/codesmith-api-app": "2.3.
|
29
|
+
"@modern-js/codesmith": "2.3.4",
|
30
|
+
"@modern-js/codesmith-api-app": "2.3.4",
|
31
31
|
"@types/jest": "^29",
|
32
32
|
"@types/node": "^14",
|
33
33
|
"jest": "^29",
|
34
34
|
"typescript": "^5",
|
35
|
-
"@modern-js/generator
|
36
|
-
"@modern-js/generator-
|
37
|
-
"@modern-js/
|
38
|
-
"@modern-js/
|
39
|
-
"@scripts/
|
40
|
-
"@scripts/
|
35
|
+
"@modern-js/dependence-generator": "3.3.9",
|
36
|
+
"@modern-js/generator-common": "3.3.9",
|
37
|
+
"@modern-js/plugin-i18n": "2.47.0",
|
38
|
+
"@modern-js/generator-utils": "3.3.9",
|
39
|
+
"@scripts/build": "2.47.0",
|
40
|
+
"@scripts/jest-config": "2.47.0"
|
41
41
|
},
|
42
42
|
"sideEffects": false,
|
43
43
|
"publishConfig": {
|