@modern-js/ssg-generator 3.5.0 → 3.6.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +23 -23
- package/package.json +10 -10
package/dist/index.js
CHANGED
@@ -51055,12 +51055,12 @@ __export(src_exports, {
|
|
51055
51055
|
});
|
51056
51056
|
module.exports = __toCommonJS(src_exports);
|
51057
51057
|
|
51058
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
51058
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/materials/FsResource.js
|
51059
51059
|
var import_path = __toESM(require("path"));
|
51060
51060
|
var import_utils = require("@modern-js/utils");
|
51061
51061
|
var FS_RESOURCE = "_codesmith_core_fs_resource";
|
51062
51062
|
|
51063
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.
|
51063
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith/dist/esm-node/utils/fsExists.js
|
51064
51064
|
var import_utils2 = require("@modern-js/utils");
|
51065
51065
|
async function fsExists(path6) {
|
51066
51066
|
try {
|
@@ -51071,13 +51071,13 @@ async function fsExists(path6) {
|
|
51071
51071
|
}
|
51072
51072
|
}
|
51073
51073
|
|
51074
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
51074
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/utils/renderString.js
|
51075
51075
|
var import_ejs = __toESM(require_ejs());
|
51076
51076
|
function renderString(template, fullData) {
|
51077
51077
|
return import_ejs.default.render(template, fullData) || "";
|
51078
51078
|
}
|
51079
51079
|
|
51080
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.
|
51080
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-ejs@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-ejs/dist/esm-node/index.js
|
51081
51081
|
var EjsAPI = class {
|
51082
51082
|
async renderTemplate(templateResource, target, parameters = {}) {
|
51083
51083
|
if (templateResource._type !== FS_RESOURCE) {
|
@@ -51109,7 +51109,7 @@ var EjsAPI = class {
|
|
51109
51109
|
}
|
51110
51110
|
};
|
51111
51111
|
|
51112
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.
|
51112
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-fs@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-fs/dist/esm-node/index.js
|
51113
51113
|
var import_path2 = __toESM(require("path"));
|
51114
51114
|
var import_utils4 = require("@modern-js/utils");
|
51115
51115
|
var FsAPI = class {
|
@@ -51136,7 +51136,7 @@ var FsAPI = class {
|
|
51136
51136
|
}
|
51137
51137
|
};
|
51138
51138
|
|
51139
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
51139
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-git/dist/esm-node/utils/index.js
|
51140
51140
|
var import_utils5 = require("@modern-js/utils");
|
51141
51141
|
async function canUseGit() {
|
51142
51142
|
try {
|
@@ -51211,7 +51211,7 @@ async function gitCommit(cwd, commitMessage) {
|
|
51211
51211
|
});
|
51212
51212
|
}
|
51213
51213
|
|
51214
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.
|
51214
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-git@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-git/dist/esm-node/index.js
|
51215
51215
|
var GitAPI = class {
|
51216
51216
|
async isInGitRepo(cwd = this.generatorCore.outputPath) {
|
51217
51217
|
const canUse = await canUseGit();
|
@@ -51261,7 +51261,7 @@ var GitAPI = class {
|
|
51261
51261
|
}
|
51262
51262
|
};
|
51263
51263
|
|
51264
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
51264
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/utils/renderString.js
|
51265
51265
|
var import_handlebars = __toESM(require_lib());
|
51266
51266
|
function renderString2(template, fullData, registers) {
|
51267
51267
|
const helpers = {
|
@@ -51275,7 +51275,7 @@ function renderString2(template, fullData, registers) {
|
|
51275
51275
|
return import_handlebars.default.compile(template)(fullData) || "";
|
51276
51276
|
}
|
51277
51277
|
|
51278
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.
|
51278
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-handlebars@2.4.2_@modern-js+codesmith@2.4.2/node_modules/@modern-js/codesmith-api-handlebars/dist/esm-node/index.js
|
51279
51279
|
var HandlebarsAPI = class {
|
51280
51280
|
async registerHelp(helpers) {
|
51281
51281
|
this.registers.helpers = {
|
@@ -51323,7 +51323,7 @@ var HandlebarsAPI = class {
|
|
51323
51323
|
}
|
51324
51324
|
};
|
51325
51325
|
|
51326
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
51326
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/env.js
|
51327
51327
|
var import_utils8 = require("@modern-js/utils");
|
51328
51328
|
async function canUseNvm() {
|
51329
51329
|
try {
|
@@ -51373,7 +51373,7 @@ async function canUsePnpm() {
|
|
51373
51373
|
}
|
51374
51374
|
}
|
51375
51375
|
|
51376
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
51376
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/utils/install.js
|
51377
51377
|
var import_utils9 = require("@modern-js/utils");
|
51378
51378
|
function execaWithStreamLog(command, args, options) {
|
51379
51379
|
const promise = (0, import_utils9.execa)(command, args, {
|
@@ -51469,7 +51469,7 @@ async function pnpmInstall({ cwd, registryUrl, ignoreScripts, useNvm }) {
|
|
51469
51469
|
throw new Error("please install pnpm first");
|
51470
51470
|
}
|
51471
51471
|
|
51472
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.
|
51472
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-npm@2.4.2/node_modules/@modern-js/codesmith-api-npm/dist/esm-node/index.js
|
51473
51473
|
var NpmAPI = class {
|
51474
51474
|
npmInstall({ cwd, registryUrl, ignoreScripts }) {
|
51475
51475
|
return npmInstall({
|
@@ -61053,10 +61053,10 @@ var Schema = (
|
|
61053
61053
|
}()
|
61054
61054
|
);
|
61055
61055
|
|
61056
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
61056
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
61057
61057
|
var import_inquirer = __toESM(require_inquirer());
|
61058
61058
|
|
61059
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
61059
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/transform.js
|
61060
61060
|
var import_lodash = require("@modern-js/utils/lodash");
|
61061
61061
|
function validateSchema(schema) {
|
61062
61062
|
const { type, properties } = schema;
|
@@ -61148,7 +61148,7 @@ function transformForm(schema, configValue = {}, validateMap, initValue) {
|
|
61148
61148
|
return getQuestionFromSchema(schema, configValue, validateMap, initValue);
|
61149
61149
|
}
|
61150
61150
|
|
61151
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
61151
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/prompt.js
|
61152
61152
|
var compileRule = (rule, scope) => {
|
61153
61153
|
const state = Schema.compile(rule, {
|
61154
61154
|
$self: {},
|
@@ -61252,7 +61252,7 @@ async function prompt(schema, configValue = {}, validateMap, initValue) {
|
|
61252
61252
|
return answers;
|
61253
61253
|
}
|
61254
61254
|
|
61255
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.
|
61255
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-formily@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-formily/dist/esm-node/inquirer.js
|
61256
61256
|
var CLIReader = class {
|
61257
61257
|
getAnswers() {
|
61258
61258
|
return this.answers;
|
@@ -61281,7 +61281,7 @@ var CLIReader = class {
|
|
61281
61281
|
}
|
61282
61282
|
};
|
61283
61283
|
|
61284
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
61284
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
61285
61285
|
var import_utils13 = require("@modern-js/utils");
|
61286
61286
|
var import_lodash5 = require("@modern-js/utils/lodash");
|
61287
61287
|
var import_comment_json = __toESM(require_src2());
|
@@ -61350,7 +61350,7 @@ var I18n = class {
|
|
61350
61350
|
}
|
61351
61351
|
};
|
61352
61352
|
|
61353
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
61353
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/en.js
|
61354
61354
|
var EN_LOCALE = {
|
61355
61355
|
environment: {
|
61356
61356
|
node_version: "please upgrade node to lts version",
|
@@ -61377,7 +61377,7 @@ var EN_LOCALE = {
|
|
61377
61377
|
}
|
61378
61378
|
};
|
61379
61379
|
|
61380
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
61380
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/zh.js
|
61381
61381
|
var ZH_LOCALE = {
|
61382
61382
|
environment: {
|
61383
61383
|
node_version: "请升级 Node 版本至 LIS",
|
@@ -61404,14 +61404,14 @@ var ZH_LOCALE = {
|
|
61404
61404
|
}
|
61405
61405
|
};
|
61406
61406
|
|
61407
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
61407
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/locale/index.js
|
61408
61408
|
var i18n = new I18n();
|
61409
61409
|
var localeKeys = i18n.init("zh", {
|
61410
61410
|
zh: ZH_LOCALE,
|
61411
61411
|
en: EN_LOCALE
|
61412
61412
|
});
|
61413
61413
|
|
61414
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
61414
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/checkUseNvm.js
|
61415
61415
|
var import_path4 = __toESM(require("path"));
|
61416
61416
|
var import_utils12 = require("@modern-js/utils");
|
61417
61417
|
var NODE_MAJOR_VERSION_MAP = {
|
@@ -61459,7 +61459,7 @@ async function checkUseNvm(cwd, logger) {
|
|
61459
61459
|
}
|
61460
61460
|
}
|
61461
61461
|
|
61462
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
61462
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/utils/transform.js
|
61463
61463
|
var import_lodash4 = require("@modern-js/utils/lodash");
|
61464
61464
|
function transformInquirerSchema(questions, configValue = {}, validateMap = {}, initValue = {}) {
|
61465
61465
|
for (const question of questions) {
|
@@ -61487,7 +61487,7 @@ function transformInquirerSchema(questions, configValue = {}, validateMap = {},
|
|
61487
61487
|
return questions;
|
61488
61488
|
}
|
61489
61489
|
|
61490
|
-
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.
|
61490
|
+
// ../../../../node_modules/.pnpm/@modern-js+codesmith-api-app@2.4.2_@modern-js+codesmith@2.4.2_typescript@5.3.3/node_modules/@modern-js/codesmith-api-app/dist/esm-node/index.js
|
61491
61491
|
var AppAPI = class {
|
61492
61492
|
async checkEnvironment(nodeVersion) {
|
61493
61493
|
if (import_utils13.semver.lt(process.versions.node, nodeVersion || "12.22.12")) {
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "3.
|
18
|
+
"version": "3.6.1",
|
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.60.1"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
|
-
"@modern-js/codesmith": "2.4.
|
30
|
-
"@modern-js/codesmith-api-app": "2.4.
|
29
|
+
"@modern-js/codesmith": "2.4.2",
|
30
|
+
"@modern-js/codesmith-api-app": "2.4.2",
|
31
31
|
"@types/jest": "^29",
|
32
32
|
"@types/node": "^14",
|
33
33
|
"jest": "^29",
|
34
34
|
"typescript": "^5",
|
35
|
-
"@modern-js/
|
36
|
-
"@modern-js/generator-utils": "3.
|
37
|
-
"@modern-js/
|
38
|
-
"@
|
39
|
-
"@
|
40
|
-
"@scripts/jest-config": "2.
|
35
|
+
"@modern-js/generator-common": "3.6.1",
|
36
|
+
"@modern-js/generator-utils": "3.6.1",
|
37
|
+
"@modern-js/dependence-generator": "3.6.1",
|
38
|
+
"@scripts/build": "2.60.1",
|
39
|
+
"@modern-js/plugin-i18n": "2.60.1",
|
40
|
+
"@scripts/jest-config": "2.60.1"
|
41
41
|
},
|
42
42
|
"sideEffects": false,
|
43
43
|
"publishConfig": {
|