@icebreakers/monorepo 3.1.11 → 3.1.12
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/assets/package.json +8 -8
- package/dist/cli.cjs +8 -8
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{upgrade-CaZT1d_7.mjs → upgrade-B-J_xIMc.mjs} +28 -33
- package/dist/{upgrade-B4VYs4jD.cjs → upgrade-DOEN4Wos.cjs} +39 -44
- package/package.json +4 -4
- package/templates/apps/client/package.json +8 -8
- package/templates/apps/server/package.json +1 -1
- package/templates/apps/website/package.json +1 -1
- package/templates/packages/vue-lib-template/package.json +2 -2
package/assets/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
|
-
"packageManager": "pnpm@10.26.
|
|
6
|
+
"packageManager": "pnpm@10.26.1",
|
|
7
7
|
"author": "ice breaker <1324318532@qq.com>",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -44,20 +44,20 @@
|
|
|
44
44
|
"@changesets/cli": "^2.29.8",
|
|
45
45
|
"@commitlint/cli": "^20.2.0",
|
|
46
46
|
"@icebreakers/commitlint-config": "^1.2.3",
|
|
47
|
-
"@icebreakers/eslint-config": "^1.6.
|
|
47
|
+
"@icebreakers/eslint-config": "^1.6.8",
|
|
48
48
|
"@icebreakers/monorepo": "workspace:*",
|
|
49
49
|
"@icebreakers/stylelint-config": "^1.2.4",
|
|
50
50
|
"@types/fs-extra": "^11.0.4",
|
|
51
|
-
"@types/node": "^25.0.
|
|
51
|
+
"@types/node": "^25.0.3",
|
|
52
52
|
"@types/semver": "^7.7.1",
|
|
53
|
-
"@vitest/coverage-v8": "~4.0.
|
|
53
|
+
"@vitest/coverage-v8": "~4.0.16",
|
|
54
54
|
"ci-info": "^4.3.1",
|
|
55
55
|
"cross-env": "^10.1.0",
|
|
56
56
|
"defu": "^6.1.4",
|
|
57
57
|
"es-toolkit": "^1.43.0",
|
|
58
58
|
"eslint": "^9.39.2",
|
|
59
59
|
"execa": "^9.6.1",
|
|
60
|
-
"fs-extra": "^11.3.
|
|
60
|
+
"fs-extra": "^11.3.3",
|
|
61
61
|
"husky": "^9.1.7",
|
|
62
62
|
"lint-staged": "^16.2.7",
|
|
63
63
|
"only-allow": "^1.2.2",
|
|
@@ -65,15 +65,15 @@
|
|
|
65
65
|
"pkg-types": "^2.3.0",
|
|
66
66
|
"rimraf": "^6.1.2",
|
|
67
67
|
"stylelint": "^16.26.1",
|
|
68
|
-
"tsdown": "0.18.
|
|
68
|
+
"tsdown": "0.18.2",
|
|
69
69
|
"tslib": "^2.8.1",
|
|
70
70
|
"tsup": "^8.5.1",
|
|
71
71
|
"tsx": "^4.21.0",
|
|
72
|
-
"turbo": "^2.
|
|
72
|
+
"turbo": "^2.7.1",
|
|
73
73
|
"type-fest": "^5.3.1",
|
|
74
74
|
"typescript": "^5.9.3",
|
|
75
75
|
"unbuild": "^3.6.1",
|
|
76
|
-
"vitest": "~4.0.
|
|
76
|
+
"vitest": "~4.0.16",
|
|
77
77
|
"yaml": "^2.8.2"
|
|
78
78
|
},
|
|
79
79
|
"publishConfig": {
|
package/dist/cli.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_upgrade = require('./upgrade-
|
|
1
|
+
const require_upgrade = require('./upgrade-DOEN4Wos.cjs');
|
|
2
2
|
let node_process = require("node:process");
|
|
3
3
|
node_process = require_upgrade.__toESM(node_process);
|
|
4
|
-
let
|
|
5
|
-
|
|
6
|
-
let
|
|
7
|
-
|
|
4
|
+
let _inquirer_input = require("@inquirer/input");
|
|
5
|
+
_inquirer_input = require_upgrade.__toESM(_inquirer_input);
|
|
6
|
+
let _inquirer_select = require("@inquirer/select");
|
|
7
|
+
_inquirer_select = require_upgrade.__toESM(_inquirer_select);
|
|
8
8
|
let commander = require("commander");
|
|
9
9
|
|
|
10
10
|
//#region src/cli/program.ts
|
|
@@ -62,7 +62,7 @@ commander.program.command("ai").description("AI 助手工具集").command("creat
|
|
|
62
62
|
let folderName;
|
|
63
63
|
if (!output && !name$1) {
|
|
64
64
|
const generated = require_upgrade.createTimestampFolderName();
|
|
65
|
-
folderName = ((await (0,
|
|
65
|
+
folderName = ((await (0, _inquirer_input.default)({
|
|
66
66
|
message: "提示词将写入哪个文件夹?(可回车确认或自定义)",
|
|
67
67
|
default: generated
|
|
68
68
|
}))?.trim?.() ?? generated) || generated;
|
|
@@ -79,11 +79,11 @@ commander.program.command("ai").description("AI 助手工具集").command("creat
|
|
|
79
79
|
});
|
|
80
80
|
commander.program.command("new").description("创建一个新的子包").alias("create").argument("[name]").action(async (name$1) => {
|
|
81
81
|
const createConfig = await require_upgrade.resolveCommandConfig("create", cwd);
|
|
82
|
-
if (!name$1) name$1 = await (0,
|
|
82
|
+
if (!name$1) name$1 = await (0, _inquirer_input.default)({
|
|
83
83
|
message: "请输入包名",
|
|
84
84
|
default: createConfig?.name ?? "my-package"
|
|
85
85
|
});
|
|
86
|
-
const type = await (0,
|
|
86
|
+
const type = await (0, _inquirer_select.default)({
|
|
87
87
|
message: "请选择模板类型",
|
|
88
88
|
choices: require_upgrade.getCreateChoices(createConfig?.choices),
|
|
89
89
|
default: createConfig?.type ?? createConfig?.defaultTemplate ?? require_upgrade.defaultTemplate
|
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as createTimestampFolderName, E as cleanProjects, F as logger, M as generateAgenticTemplate, N as generateAgenticTemplates, P as loadAgenticTasks, T as version, c as getCreateChoices, i as init, j as defaultAgenticBaseDir, k as resolveCommandConfig, n as syncNpmMirror, o as createNewProject, r as setVscodeBinaryMirror, s as defaultTemplate, t as upgradeMonorepo, w as name } from "./upgrade-
|
|
1
|
+
import { A as createTimestampFolderName, E as cleanProjects, F as logger, M as generateAgenticTemplate, N as generateAgenticTemplates, P as loadAgenticTasks, T as version, c as getCreateChoices, i as init, j as defaultAgenticBaseDir, k as resolveCommandConfig, n as syncNpmMirror, o as createNewProject, r as setVscodeBinaryMirror, s as defaultTemplate, t as upgradeMonorepo, w as name } from "./upgrade-B-J_xIMc.mjs";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import input from "@inquirer/input";
|
|
4
4
|
import select from "@inquirer/select";
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as createTimestampFolderName, C as templatesDir, D as defineMonorepoConfig, E as cleanProjects, F as logger, I as getWorkspaceData, L as getWorkspacePackages, M as generateAgenticTemplate, N as generateAgenticTemplates, O as loadMonorepoConfig, P as loadAgenticTasks, R as GitClient, S as rootDir, T as version, _ as toWorkspaceGitignorePath, a as createContext, b as assetsDir, c as getCreateChoices, d as escapeStringRegexp, f as isMatch, g as toPublishGitignorePath, h as isGitignoreFile, i as init, j as defaultAgenticBaseDir, k as resolveCommandConfig, l as getTemplateMap, m as isFileChanged, n as syncNpmMirror, o as createNewProject, p as getFileHash, r as setVscodeBinaryMirror, t as upgradeMonorepo, u as templateMap, v as updateIssueTemplateConfig, w as name, x as packageDir, y as isIgnorableFsError } from "./upgrade-
|
|
1
|
+
import { A as createTimestampFolderName, C as templatesDir, D as defineMonorepoConfig, E as cleanProjects, F as logger, I as getWorkspaceData, L as getWorkspacePackages, M as generateAgenticTemplate, N as generateAgenticTemplates, O as loadMonorepoConfig, P as loadAgenticTasks, R as GitClient, S as rootDir, T as version, _ as toWorkspaceGitignorePath, a as createContext, b as assetsDir, c as getCreateChoices, d as escapeStringRegexp, f as isMatch, g as toPublishGitignorePath, h as isGitignoreFile, i as init, j as defaultAgenticBaseDir, k as resolveCommandConfig, l as getTemplateMap, m as isFileChanged, n as syncNpmMirror, o as createNewProject, p as getFileHash, r as setVscodeBinaryMirror, t as upgradeMonorepo, u as templateMap, v as updateIssueTemplateConfig, w as name, x as packageDir, y as isIgnorableFsError } from "./upgrade-B-J_xIMc.mjs";
|
|
2
2
|
|
|
3
3
|
export { GitClient, assetsDir, cleanProjects, createContext, createNewProject, createTimestampFolderName, defaultAgenticBaseDir, defineMonorepoConfig, escapeStringRegexp, generateAgenticTemplate, generateAgenticTemplates, getCreateChoices, getFileHash, getTemplateMap, getWorkspaceData, getWorkspacePackages, init, isFileChanged, isGitignoreFile, isIgnorableFsError, isMatch, loadAgenticTasks, loadMonorepoConfig, logger, name, packageDir, resolveCommandConfig, rootDir, setVscodeBinaryMirror, syncNpmMirror, templateMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath, updateIssueTemplateConfig, upgradeMonorepo, version };
|
|
@@ -57,12 +57,12 @@ var __name = (target, value) => __defProp(target, "name", {
|
|
|
57
57
|
value,
|
|
58
58
|
configurable: true
|
|
59
59
|
});
|
|
60
|
-
var isObject
|
|
60
|
+
var isObject = /* @__PURE__ */ __name((v) => v !== null && typeof v === "object", "isObject");
|
|
61
61
|
var join = /* @__PURE__ */ __name((segs, joinChar, options) => {
|
|
62
62
|
if (typeof options.join === "function") return options.join(segs);
|
|
63
63
|
return segs[0] + joinChar + segs[1];
|
|
64
64
|
}, "join");
|
|
65
|
-
var split
|
|
65
|
+
var split = /* @__PURE__ */ __name((path$2, splitChar, options) => {
|
|
66
66
|
if (typeof options.split === "function") return options.split(path$2);
|
|
67
67
|
return path$2.split(splitChar);
|
|
68
68
|
}, "split");
|
|
@@ -71,10 +71,10 @@ var isValid = /* @__PURE__ */ __name((key, target = {}, options) => {
|
|
|
71
71
|
return true;
|
|
72
72
|
}, "isValid");
|
|
73
73
|
var isValidObject = /* @__PURE__ */ __name((v) => {
|
|
74
|
-
return isObject
|
|
74
|
+
return isObject(v) || typeof v === "function";
|
|
75
75
|
}, "isValidObject");
|
|
76
76
|
var index_default = /* @__PURE__ */ __name((target, path$2, options = {}) => {
|
|
77
|
-
if (!isObject
|
|
77
|
+
if (!isObject(options)) options = { default: options };
|
|
78
78
|
if (!isValidObject(target)) return typeof options.default !== "undefined" ? options.default : target;
|
|
79
79
|
if (typeof path$2 === "number") path$2 = String(path$2);
|
|
80
80
|
const pathIsArray = Array.isArray(path$2);
|
|
@@ -83,7 +83,7 @@ var index_default = /* @__PURE__ */ __name((target, path$2, options = {}) => {
|
|
|
83
83
|
const joinChar = options.joinChar || (typeof splitChar === "string" ? splitChar : ".");
|
|
84
84
|
if (!pathIsString && !pathIsArray) return target;
|
|
85
85
|
if (target[path$2] !== void 0) return isValid(path$2, target, options) ? target[path$2] : options.default;
|
|
86
|
-
const segs = pathIsArray ? path$2 : split
|
|
86
|
+
const segs = pathIsArray ? path$2 : split(path$2, splitChar, options);
|
|
87
87
|
const len = segs.length;
|
|
88
88
|
let idx = 0;
|
|
89
89
|
do {
|
|
@@ -188,7 +188,7 @@ var GitClient = class {
|
|
|
188
188
|
|
|
189
189
|
//#endregion
|
|
190
190
|
//#region ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
|
|
191
|
-
function isPlainObject$
|
|
191
|
+
function isPlainObject$1(value) {
|
|
192
192
|
if (value === null || typeof value !== "object") return false;
|
|
193
193
|
const prototype = Object.getPrototypeOf(value);
|
|
194
194
|
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false;
|
|
@@ -197,7 +197,7 @@ function isPlainObject$2(value) {
|
|
|
197
197
|
return true;
|
|
198
198
|
}
|
|
199
199
|
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
200
|
-
if (!isPlainObject$
|
|
200
|
+
if (!isPlainObject$1(defaults)) return _defu(baseObject, {}, namespace, merger);
|
|
201
201
|
const object = Object.assign({}, defaults);
|
|
202
202
|
for (const key in baseObject) {
|
|
203
203
|
if (key === "__proto__" || key === "constructor") continue;
|
|
@@ -205,7 +205,7 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
|
205
205
|
if (value === null || value === void 0) continue;
|
|
206
206
|
if (merger && merger(object, key, value, namespace)) continue;
|
|
207
207
|
if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
|
|
208
|
-
else if (isPlainObject$
|
|
208
|
+
else if (isPlainObject$1(value) && isPlainObject$1(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
|
|
209
209
|
else object[key] = value;
|
|
210
210
|
}
|
|
211
211
|
return object;
|
|
@@ -352,7 +352,7 @@ async function generateAgenticTemplates(tasks, defaults = {}) {
|
|
|
352
352
|
* Released under the MIT License.
|
|
353
353
|
*/
|
|
354
354
|
var require_is_primitive = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
355
|
-
module.exports = function isPrimitive
|
|
355
|
+
module.exports = function isPrimitive(val) {
|
|
356
356
|
if (typeof val === "object") return val === null;
|
|
357
357
|
return typeof val !== "function";
|
|
358
358
|
};
|
|
@@ -367,7 +367,7 @@ var require_is_primitive = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
367
367
|
* Released under the MIT License.
|
|
368
368
|
*/
|
|
369
369
|
var require_isobject = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
370
|
-
module.exports = function isObject$
|
|
370
|
+
module.exports = function isObject$1(val) {
|
|
371
371
|
return val != null && typeof val === "object" && Array.isArray(val) === false;
|
|
372
372
|
};
|
|
373
373
|
}));
|
|
@@ -381,11 +381,11 @@ var require_isobject = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
381
381
|
* Released under the MIT License.
|
|
382
382
|
*/
|
|
383
383
|
var require_is_plain_object = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
384
|
-
var isObject
|
|
384
|
+
var isObject = require_isobject();
|
|
385
385
|
function isObjectObject(o) {
|
|
386
|
-
return isObject
|
|
386
|
+
return isObject(o) === true && Object.prototype.toString.call(o) === "[object Object]";
|
|
387
387
|
}
|
|
388
|
-
module.exports = function isPlainObject$
|
|
388
|
+
module.exports = function isPlainObject$2(o) {
|
|
389
389
|
var ctor, prot;
|
|
390
390
|
if (isObjectObject(o) === false) return false;
|
|
391
391
|
ctor = o.constructor;
|
|
@@ -408,7 +408,7 @@ var require_is_plain_object = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
408
408
|
var require_set_value = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
409
409
|
const { deleteProperty } = Reflect;
|
|
410
410
|
const isPrimitive = require_is_primitive();
|
|
411
|
-
const isPlainObject
|
|
411
|
+
const isPlainObject = require_is_plain_object();
|
|
412
412
|
const isObject = (value) => {
|
|
413
413
|
return typeof value === "object" && value !== null || typeof value === "function";
|
|
414
414
|
};
|
|
@@ -477,7 +477,7 @@ var require_set_value = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
477
477
|
if (value === void 0) deleteProperty(obj, prop);
|
|
478
478
|
else if (options && options.merge) {
|
|
479
479
|
const merge = options.merge === "function" ? options.merge : Object.assign;
|
|
480
|
-
if (merge && isPlainObject
|
|
480
|
+
if (merge && isPlainObject(obj[prop]) && isPlainObject(value)) obj[prop] = merge(obj[prop], value);
|
|
481
481
|
else obj[prop] = value;
|
|
482
482
|
} else obj[prop] = value;
|
|
483
483
|
return obj;
|
|
@@ -558,7 +558,7 @@ async function resolveCommandConfig(name$1, cwd) {
|
|
|
558
558
|
|
|
559
559
|
//#endregion
|
|
560
560
|
//#region src/commands/clean.ts
|
|
561
|
-
var import_set_value
|
|
561
|
+
var import_set_value = /* @__PURE__ */ __toESM(require_set_value(), 1);
|
|
562
562
|
function mergeCleanConfig(base, overrides) {
|
|
563
563
|
const normalizedBase = base ?? {};
|
|
564
564
|
if (!overrides) return normalizedBase;
|
|
@@ -600,14 +600,14 @@ async function cleanProjects(cwd, overrides) {
|
|
|
600
600
|
}));
|
|
601
601
|
const name$1 = path.resolve(workspaceDir, "package.json");
|
|
602
602
|
const pkgJson = await fs.readJson(name$1);
|
|
603
|
-
(0, import_set_value
|
|
603
|
+
(0, import_set_value.default)(pkgJson, "devDependencies.@icebreakers/monorepo", cleanConfig?.pinnedVersion ?? "latest", { preservePaths: false });
|
|
604
604
|
await fs.outputJson(name$1, pkgJson, { spaces: 2 });
|
|
605
605
|
}
|
|
606
606
|
|
|
607
607
|
//#endregion
|
|
608
608
|
//#region package.json
|
|
609
609
|
var name = "@icebreakers/monorepo";
|
|
610
|
-
var version = "3.1.
|
|
610
|
+
var version = "3.1.12";
|
|
611
611
|
|
|
612
612
|
//#endregion
|
|
613
613
|
//#region src/constants.ts
|
|
@@ -770,7 +770,6 @@ function isMatch(str, arr) {
|
|
|
770
770
|
|
|
771
771
|
//#endregion
|
|
772
772
|
//#region src/commands/create.ts
|
|
773
|
-
var import_set_value$4 = /* @__PURE__ */ __toESM(require_set_value(), 1);
|
|
774
773
|
/**
|
|
775
774
|
* 内置模板映射表,value 指向仓库中对应模板所在路径。
|
|
776
775
|
*/
|
|
@@ -842,7 +841,7 @@ async function applyGitMetadata(pkgJson, repoDir, targetDir) {
|
|
|
842
841
|
const git = new GitClient({ baseDir: repoDir });
|
|
843
842
|
const repoName = await git.getRepoName();
|
|
844
843
|
if (!repoName) return;
|
|
845
|
-
(0, import_set_value
|
|
844
|
+
(0, import_set_value.default)(pkgJson, ["bugs", "url"], `https://github.com/${repoName}/issues`);
|
|
846
845
|
const repository = {
|
|
847
846
|
type: "git",
|
|
848
847
|
url: `git+https://github.com/${repoName}.git`
|
|
@@ -850,9 +849,9 @@ async function applyGitMetadata(pkgJson, repoDir, targetDir) {
|
|
|
850
849
|
const directoryBase = await git.getRepoRoot() ?? repoDir;
|
|
851
850
|
const relative = path.relative(directoryBase, targetDir);
|
|
852
851
|
if (relative && relative !== ".") repository.directory = relative.split(path.sep).join("/");
|
|
853
|
-
(0, import_set_value
|
|
852
|
+
(0, import_set_value.default)(pkgJson, "repository", repository);
|
|
854
853
|
const gitUser = await git.getUser();
|
|
855
|
-
if (gitUser?.name && gitUser?.email) (0, import_set_value
|
|
854
|
+
if (gitUser?.name && gitUser?.email) (0, import_set_value.default)(pkgJson, "author", `${gitUser.name} <${gitUser.email}>`);
|
|
856
855
|
} catch {}
|
|
857
856
|
}
|
|
858
857
|
/**
|
|
@@ -890,8 +889,8 @@ async function createNewProject(options) {
|
|
|
890
889
|
if (filelist.includes("package.json")) {
|
|
891
890
|
const sourceJsonPath = path.resolve(from, "package.json");
|
|
892
891
|
const sourceJson = await fs.readJson(sourceJsonPath);
|
|
893
|
-
(0, import_set_value
|
|
894
|
-
(0, import_set_value
|
|
892
|
+
(0, import_set_value.default)(sourceJson, "version", "0.0.0");
|
|
893
|
+
(0, import_set_value.default)(sourceJson, "name", name$1?.startsWith("@") ? name$1 : path.basename(targetName));
|
|
895
894
|
await applyGitMetadata(sourceJson, cwd, to);
|
|
896
895
|
await fs.outputJson(path.resolve(to, renameJson ? "package.mock.json" : "package.json"), sourceJson, { spaces: 2 });
|
|
897
896
|
}
|
|
@@ -921,7 +920,6 @@ async function createContext(cwd) {
|
|
|
921
920
|
|
|
922
921
|
//#endregion
|
|
923
922
|
//#region src/commands/init/setChangeset.ts
|
|
924
|
-
var import_set_value$3 = /* @__PURE__ */ __toESM(require_set_value(), 1);
|
|
925
923
|
/**
|
|
926
924
|
* 将 changeset 配置中的仓库地址指向当前项目,方便自动生成变更日志链接。
|
|
927
925
|
*/
|
|
@@ -932,7 +930,7 @@ async function setChangeset_default(ctx) {
|
|
|
932
930
|
if (await fs.exists(changesetConfigPath)) {
|
|
933
931
|
const changesetConfig = await fs.readJson(changesetConfigPath);
|
|
934
932
|
if (gitUrl.full_name) {
|
|
935
|
-
(0, import_set_value
|
|
933
|
+
(0, import_set_value.default)(changesetConfig, "changelog.1.repo", gitUrl.full_name);
|
|
936
934
|
await fs.outputJson(changesetConfigPath, changesetConfig, { spaces: 2 });
|
|
937
935
|
}
|
|
938
936
|
}
|
|
@@ -956,7 +954,6 @@ async function setIssueTemplateConfig_default(ctx) {
|
|
|
956
954
|
|
|
957
955
|
//#endregion
|
|
958
956
|
//#region src/commands/init/setPkgJson.ts
|
|
959
|
-
var import_set_value$2 = /* @__PURE__ */ __toESM(require_set_value(), 1);
|
|
960
957
|
/**
|
|
961
958
|
* 根据当前仓库信息同步 package.json 的仓库、作者等字段。
|
|
962
959
|
*/
|
|
@@ -967,14 +964,14 @@ async function setPkgJson_default(ctx) {
|
|
|
967
964
|
if (!await fs.pathExists(pkg.pkgJsonPath)) return;
|
|
968
965
|
const pkgJson = JSON.parse(JSON.stringify(pkg.manifest));
|
|
969
966
|
const directory = path.relative(cwd, pkg.rootDir);
|
|
970
|
-
(0, import_set_value
|
|
967
|
+
(0, import_set_value.default)(pkgJson, ["bugs", "url"], `https://github.com/${gitUrl.full_name}/issues`);
|
|
971
968
|
const repository = {
|
|
972
969
|
type: "git",
|
|
973
970
|
url: `git+https://github.com/${gitUrl.full_name}.git`
|
|
974
971
|
};
|
|
975
972
|
if (directory) repository.directory = directory;
|
|
976
|
-
(0, import_set_value
|
|
977
|
-
if (gitUser?.name && gitUser?.email) (0, import_set_value
|
|
973
|
+
(0, import_set_value.default)(pkgJson, "repository", repository);
|
|
974
|
+
if (gitUser?.name && gitUser?.email) (0, import_set_value.default)(pkgJson, "author", `${gitUser.name} <${gitUser.email}>`);
|
|
978
975
|
const nextContent = `${JSON.stringify(pkgJson, void 0, 2)}\n`;
|
|
979
976
|
if (await fs.readFile(pkg.pkgJsonPath, "utf8") !== nextContent) await fs.writeFile(pkg.pkgJsonPath, nextContent, "utf8");
|
|
980
977
|
}));
|
|
@@ -1074,7 +1071,6 @@ const chinaMirrorsEnvs = {
|
|
|
1074
1071
|
|
|
1075
1072
|
//#endregion
|
|
1076
1073
|
//#region src/commands/mirror/utils.ts
|
|
1077
|
-
var import_set_value$1 = /* @__PURE__ */ __toESM(require_set_value(), 1);
|
|
1078
1074
|
/**
|
|
1079
1075
|
* 在 vscode 里面设置镜像下载地址的环境变量,避免下载缓慢
|
|
1080
1076
|
*/
|
|
@@ -1085,7 +1081,7 @@ function setMirror(obj, envs = chinaMirrorsEnvs) {
|
|
|
1085
1081
|
"osx"
|
|
1086
1082
|
];
|
|
1087
1083
|
const prefix = "terminal.integrated.env";
|
|
1088
|
-
if (typeof obj === "object" && obj) for (const platform of platforms) (0, import_set_value
|
|
1084
|
+
if (typeof obj === "object" && obj) for (const platform of platforms) (0, import_set_value.default)(obj, [prefix, platform].join(".").replaceAll(".", "\\."), envs);
|
|
1089
1085
|
}
|
|
1090
1086
|
|
|
1091
1087
|
//#endregion
|
|
@@ -1371,7 +1367,6 @@ function mergeWorkspaceManifest(source, target) {
|
|
|
1371
1367
|
|
|
1372
1368
|
//#endregion
|
|
1373
1369
|
//#region src/commands/upgrade/index.ts
|
|
1374
|
-
var import_set_value = /* @__PURE__ */ __toESM(require_set_value(), 1);
|
|
1375
1370
|
/**
|
|
1376
1371
|
* 将 assets 目录的模版文件同步到工程中,实现一键升级脚手架能力。
|
|
1377
1372
|
*/
|
|
@@ -29,9 +29,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
let git_url_parse = require("git-url-parse");
|
|
30
30
|
git_url_parse = __toESM(git_url_parse);
|
|
31
31
|
let simple_git = require("simple-git");
|
|
32
|
-
let
|
|
33
|
-
let
|
|
34
|
-
let
|
|
32
|
+
let _pnpm_find_workspace_dir = require("@pnpm/find-workspace-dir");
|
|
33
|
+
let _pnpm_workspace_find_packages = require("@pnpm/workspace.find-packages");
|
|
34
|
+
let _pnpm_workspace_read_manifest = require("@pnpm/workspace.read-manifest");
|
|
35
35
|
let pathe = require("pathe");
|
|
36
36
|
pathe = __toESM(pathe);
|
|
37
37
|
let node_process = require("node:process");
|
|
@@ -39,8 +39,8 @@ node_process = __toESM(node_process);
|
|
|
39
39
|
let fs_extra = require("fs-extra");
|
|
40
40
|
fs_extra = __toESM(fs_extra);
|
|
41
41
|
let consola = require("consola");
|
|
42
|
-
let
|
|
43
|
-
|
|
42
|
+
let _inquirer_checkbox = require("@inquirer/checkbox");
|
|
43
|
+
_inquirer_checkbox = __toESM(_inquirer_checkbox);
|
|
44
44
|
let c12 = require("c12");
|
|
45
45
|
let picocolors = require("picocolors");
|
|
46
46
|
picocolors = __toESM(picocolors);
|
|
@@ -69,12 +69,12 @@ var __name = (target, value) => __defProp(target, "name", {
|
|
|
69
69
|
value,
|
|
70
70
|
configurable: true
|
|
71
71
|
});
|
|
72
|
-
var isObject
|
|
72
|
+
var isObject = /* @__PURE__ */ __name((v) => v !== null && typeof v === "object", "isObject");
|
|
73
73
|
var join = /* @__PURE__ */ __name((segs, joinChar, options) => {
|
|
74
74
|
if (typeof options.join === "function") return options.join(segs);
|
|
75
75
|
return segs[0] + joinChar + segs[1];
|
|
76
76
|
}, "join");
|
|
77
|
-
var split
|
|
77
|
+
var split = /* @__PURE__ */ __name((path$14, splitChar, options) => {
|
|
78
78
|
if (typeof options.split === "function") return options.split(path$14);
|
|
79
79
|
return path$14.split(splitChar);
|
|
80
80
|
}, "split");
|
|
@@ -83,10 +83,10 @@ var isValid = /* @__PURE__ */ __name((key, target = {}, options) => {
|
|
|
83
83
|
return true;
|
|
84
84
|
}, "isValid");
|
|
85
85
|
var isValidObject = /* @__PURE__ */ __name((v) => {
|
|
86
|
-
return isObject
|
|
86
|
+
return isObject(v) || typeof v === "function";
|
|
87
87
|
}, "isValidObject");
|
|
88
88
|
var index_default = /* @__PURE__ */ __name((target, path$14, options = {}) => {
|
|
89
|
-
if (!isObject
|
|
89
|
+
if (!isObject(options)) options = { default: options };
|
|
90
90
|
if (!isValidObject(target)) return typeof options.default !== "undefined" ? options.default : target;
|
|
91
91
|
if (typeof path$14 === "number") path$14 = String(path$14);
|
|
92
92
|
const pathIsArray = Array.isArray(path$14);
|
|
@@ -95,7 +95,7 @@ var index_default = /* @__PURE__ */ __name((target, path$14, options = {}) => {
|
|
|
95
95
|
const joinChar = options.joinChar || (typeof splitChar === "string" ? splitChar : ".");
|
|
96
96
|
if (!pathIsString && !pathIsArray) return target;
|
|
97
97
|
if (target[path$14] !== void 0) return isValid(path$14, target, options) ? target[path$14] : options.default;
|
|
98
|
-
const segs = pathIsArray ? path$14 : split
|
|
98
|
+
const segs = pathIsArray ? path$14 : split(path$14, splitChar, options);
|
|
99
99
|
const len = segs.length;
|
|
100
100
|
let idx = 0;
|
|
101
101
|
do {
|
|
@@ -200,7 +200,7 @@ var GitClient = class {
|
|
|
200
200
|
|
|
201
201
|
//#endregion
|
|
202
202
|
//#region ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
|
|
203
|
-
function isPlainObject$
|
|
203
|
+
function isPlainObject$1(value) {
|
|
204
204
|
if (value === null || typeof value !== "object") return false;
|
|
205
205
|
const prototype = Object.getPrototypeOf(value);
|
|
206
206
|
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false;
|
|
@@ -209,7 +209,7 @@ function isPlainObject$2(value) {
|
|
|
209
209
|
return true;
|
|
210
210
|
}
|
|
211
211
|
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
212
|
-
if (!isPlainObject$
|
|
212
|
+
if (!isPlainObject$1(defaults)) return _defu(baseObject, {}, namespace, merger);
|
|
213
213
|
const object = Object.assign({}, defaults);
|
|
214
214
|
for (const key in baseObject) {
|
|
215
215
|
if (key === "__proto__" || key === "constructor") continue;
|
|
@@ -217,7 +217,7 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
|
217
217
|
if (value === null || value === void 0) continue;
|
|
218
218
|
if (merger && merger(object, key, value, namespace)) continue;
|
|
219
219
|
if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
|
|
220
|
-
else if (isPlainObject$
|
|
220
|
+
else if (isPlainObject$1(value) && isPlainObject$1(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
|
|
221
221
|
else object[key] = value;
|
|
222
222
|
}
|
|
223
223
|
return object;
|
|
@@ -249,8 +249,8 @@ async function getWorkspacePackages(workspaceDir, options) {
|
|
|
249
249
|
ignoreRootPackage: true,
|
|
250
250
|
ignorePrivatePackage: true
|
|
251
251
|
});
|
|
252
|
-
const manifest = await (0,
|
|
253
|
-
let pkgs = (await (0,
|
|
252
|
+
const manifest = await (0, _pnpm_workspace_read_manifest.readWorkspaceManifest)(workspaceDir);
|
|
253
|
+
let pkgs = (await (0, _pnpm_workspace_find_packages.findWorkspacePackages)(workspaceDir, { patterns: patterns ?? manifest?.packages })).filter((x) => {
|
|
254
254
|
if (ignorePrivatePackage && x.manifest.private) return false;
|
|
255
255
|
return true;
|
|
256
256
|
}).map((project) => {
|
|
@@ -269,7 +269,7 @@ async function getWorkspacePackages(workspaceDir, options) {
|
|
|
269
269
|
* 将工作区绝对路径、包列表与当前 cwd 打包返回,方便调用方一次获取所有信息。
|
|
270
270
|
*/
|
|
271
271
|
async function getWorkspaceData(cwd, options) {
|
|
272
|
-
const workspaceDir = await (0,
|
|
272
|
+
const workspaceDir = await (0, _pnpm_find_workspace_dir.findWorkspaceDir)(cwd) ?? cwd;
|
|
273
273
|
return {
|
|
274
274
|
cwd,
|
|
275
275
|
workspaceDir,
|
|
@@ -364,7 +364,7 @@ async function generateAgenticTemplates(tasks, defaults = {}) {
|
|
|
364
364
|
* Released under the MIT License.
|
|
365
365
|
*/
|
|
366
366
|
var require_is_primitive = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
367
|
-
module.exports = function isPrimitive
|
|
367
|
+
module.exports = function isPrimitive(val) {
|
|
368
368
|
if (typeof val === "object") return val === null;
|
|
369
369
|
return typeof val !== "function";
|
|
370
370
|
};
|
|
@@ -379,7 +379,7 @@ var require_is_primitive = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
379
379
|
* Released under the MIT License.
|
|
380
380
|
*/
|
|
381
381
|
var require_isobject = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
382
|
-
module.exports = function isObject$
|
|
382
|
+
module.exports = function isObject$1(val) {
|
|
383
383
|
return val != null && typeof val === "object" && Array.isArray(val) === false;
|
|
384
384
|
};
|
|
385
385
|
}));
|
|
@@ -393,11 +393,11 @@ var require_isobject = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
393
393
|
* Released under the MIT License.
|
|
394
394
|
*/
|
|
395
395
|
var require_is_plain_object = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
396
|
-
var isObject
|
|
396
|
+
var isObject = require_isobject();
|
|
397
397
|
function isObjectObject(o) {
|
|
398
|
-
return isObject
|
|
398
|
+
return isObject(o) === true && Object.prototype.toString.call(o) === "[object Object]";
|
|
399
399
|
}
|
|
400
|
-
module.exports = function isPlainObject$
|
|
400
|
+
module.exports = function isPlainObject$2(o) {
|
|
401
401
|
var ctor, prot;
|
|
402
402
|
if (isObjectObject(o) === false) return false;
|
|
403
403
|
ctor = o.constructor;
|
|
@@ -420,7 +420,7 @@ var require_is_plain_object = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
420
420
|
var require_set_value = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
421
421
|
const { deleteProperty } = Reflect;
|
|
422
422
|
const isPrimitive = require_is_primitive();
|
|
423
|
-
const isPlainObject
|
|
423
|
+
const isPlainObject = require_is_plain_object();
|
|
424
424
|
const isObject = (value) => {
|
|
425
425
|
return typeof value === "object" && value !== null || typeof value === "function";
|
|
426
426
|
};
|
|
@@ -489,7 +489,7 @@ var require_set_value = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
489
489
|
if (value === void 0) deleteProperty(obj, prop);
|
|
490
490
|
else if (options && options.merge) {
|
|
491
491
|
const merge = options.merge === "function" ? options.merge : Object.assign;
|
|
492
|
-
if (merge && isPlainObject
|
|
492
|
+
if (merge && isPlainObject(obj[prop]) && isPlainObject(value)) obj[prop] = merge(obj[prop], value);
|
|
493
493
|
else obj[prop] = value;
|
|
494
494
|
} else obj[prop] = value;
|
|
495
495
|
return obj;
|
|
@@ -570,7 +570,7 @@ async function resolveCommandConfig(name$1, cwd) {
|
|
|
570
570
|
|
|
571
571
|
//#endregion
|
|
572
572
|
//#region src/commands/clean.ts
|
|
573
|
-
var import_set_value
|
|
573
|
+
var import_set_value = /* @__PURE__ */ __toESM(require_set_value(), 1);
|
|
574
574
|
function mergeCleanConfig(base, overrides) {
|
|
575
575
|
const normalizedBase = base ?? {};
|
|
576
576
|
if (!overrides) return normalizedBase;
|
|
@@ -594,7 +594,7 @@ async function cleanProjects(cwd, overrides) {
|
|
|
594
594
|
});
|
|
595
595
|
let cleanDirs = [];
|
|
596
596
|
if (cleanConfig?.autoConfirm) cleanDirs = filteredPackages.map((pkg) => pkg.rootDir);
|
|
597
|
-
else cleanDirs = await (0,
|
|
597
|
+
else cleanDirs = await (0, _inquirer_checkbox.default)({
|
|
598
598
|
message: "请选择需要清理的目录",
|
|
599
599
|
choices: filteredPackages.map((x) => {
|
|
600
600
|
return {
|
|
@@ -612,14 +612,14 @@ async function cleanProjects(cwd, overrides) {
|
|
|
612
612
|
}));
|
|
613
613
|
const name$1 = pathe.default.resolve(workspaceDir, "package.json");
|
|
614
614
|
const pkgJson = await fs_extra.default.readJson(name$1);
|
|
615
|
-
(0, import_set_value
|
|
615
|
+
(0, import_set_value.default)(pkgJson, "devDependencies.@icebreakers/monorepo", cleanConfig?.pinnedVersion ?? "latest", { preservePaths: false });
|
|
616
616
|
await fs_extra.default.outputJson(name$1, pkgJson, { spaces: 2 });
|
|
617
617
|
}
|
|
618
618
|
|
|
619
619
|
//#endregion
|
|
620
620
|
//#region package.json
|
|
621
621
|
var name = "@icebreakers/monorepo";
|
|
622
|
-
var version = "3.1.
|
|
622
|
+
var version = "3.1.12";
|
|
623
623
|
|
|
624
624
|
//#endregion
|
|
625
625
|
//#region src/constants.ts
|
|
@@ -782,7 +782,6 @@ function isMatch(str, arr) {
|
|
|
782
782
|
|
|
783
783
|
//#endregion
|
|
784
784
|
//#region src/commands/create.ts
|
|
785
|
-
var import_set_value$4 = /* @__PURE__ */ __toESM(require_set_value(), 1);
|
|
786
785
|
/**
|
|
787
786
|
* 内置模板映射表,value 指向仓库中对应模板所在路径。
|
|
788
787
|
*/
|
|
@@ -854,7 +853,7 @@ async function applyGitMetadata(pkgJson, repoDir, targetDir) {
|
|
|
854
853
|
const git = new GitClient({ baseDir: repoDir });
|
|
855
854
|
const repoName = await git.getRepoName();
|
|
856
855
|
if (!repoName) return;
|
|
857
|
-
(0, import_set_value
|
|
856
|
+
(0, import_set_value.default)(pkgJson, ["bugs", "url"], `https://github.com/${repoName}/issues`);
|
|
858
857
|
const repository = {
|
|
859
858
|
type: "git",
|
|
860
859
|
url: `git+https://github.com/${repoName}.git`
|
|
@@ -862,9 +861,9 @@ async function applyGitMetadata(pkgJson, repoDir, targetDir) {
|
|
|
862
861
|
const directoryBase = await git.getRepoRoot() ?? repoDir;
|
|
863
862
|
const relative = pathe.default.relative(directoryBase, targetDir);
|
|
864
863
|
if (relative && relative !== ".") repository.directory = relative.split(pathe.default.sep).join("/");
|
|
865
|
-
(0, import_set_value
|
|
864
|
+
(0, import_set_value.default)(pkgJson, "repository", repository);
|
|
866
865
|
const gitUser = await git.getUser();
|
|
867
|
-
if (gitUser?.name && gitUser?.email) (0, import_set_value
|
|
866
|
+
if (gitUser?.name && gitUser?.email) (0, import_set_value.default)(pkgJson, "author", `${gitUser.name} <${gitUser.email}>`);
|
|
868
867
|
} catch {}
|
|
869
868
|
}
|
|
870
869
|
/**
|
|
@@ -902,8 +901,8 @@ async function createNewProject(options) {
|
|
|
902
901
|
if (filelist.includes("package.json")) {
|
|
903
902
|
const sourceJsonPath = pathe.default.resolve(from, "package.json");
|
|
904
903
|
const sourceJson = await fs_extra.default.readJson(sourceJsonPath);
|
|
905
|
-
(0, import_set_value
|
|
906
|
-
(0, import_set_value
|
|
904
|
+
(0, import_set_value.default)(sourceJson, "version", "0.0.0");
|
|
905
|
+
(0, import_set_value.default)(sourceJson, "name", name$1?.startsWith("@") ? name$1 : pathe.default.basename(targetName));
|
|
907
906
|
await applyGitMetadata(sourceJson, cwd, to);
|
|
908
907
|
await fs_extra.default.outputJson(pathe.default.resolve(to, renameJson ? "package.mock.json" : "package.json"), sourceJson, { spaces: 2 });
|
|
909
908
|
}
|
|
@@ -933,7 +932,6 @@ async function createContext(cwd) {
|
|
|
933
932
|
|
|
934
933
|
//#endregion
|
|
935
934
|
//#region src/commands/init/setChangeset.ts
|
|
936
|
-
var import_set_value$3 = /* @__PURE__ */ __toESM(require_set_value(), 1);
|
|
937
935
|
/**
|
|
938
936
|
* 将 changeset 配置中的仓库地址指向当前项目,方便自动生成变更日志链接。
|
|
939
937
|
*/
|
|
@@ -944,7 +942,7 @@ async function setChangeset_default(ctx) {
|
|
|
944
942
|
if (await fs_extra.default.exists(changesetConfigPath)) {
|
|
945
943
|
const changesetConfig = await fs_extra.default.readJson(changesetConfigPath);
|
|
946
944
|
if (gitUrl.full_name) {
|
|
947
|
-
(0, import_set_value
|
|
945
|
+
(0, import_set_value.default)(changesetConfig, "changelog.1.repo", gitUrl.full_name);
|
|
948
946
|
await fs_extra.default.outputJson(changesetConfigPath, changesetConfig, { spaces: 2 });
|
|
949
947
|
}
|
|
950
948
|
}
|
|
@@ -968,7 +966,6 @@ async function setIssueTemplateConfig_default(ctx) {
|
|
|
968
966
|
|
|
969
967
|
//#endregion
|
|
970
968
|
//#region src/commands/init/setPkgJson.ts
|
|
971
|
-
var import_set_value$2 = /* @__PURE__ */ __toESM(require_set_value(), 1);
|
|
972
969
|
/**
|
|
973
970
|
* 根据当前仓库信息同步 package.json 的仓库、作者等字段。
|
|
974
971
|
*/
|
|
@@ -979,14 +976,14 @@ async function setPkgJson_default(ctx) {
|
|
|
979
976
|
if (!await fs_extra.default.pathExists(pkg.pkgJsonPath)) return;
|
|
980
977
|
const pkgJson = JSON.parse(JSON.stringify(pkg.manifest));
|
|
981
978
|
const directory = pathe.default.relative(cwd, pkg.rootDir);
|
|
982
|
-
(0, import_set_value
|
|
979
|
+
(0, import_set_value.default)(pkgJson, ["bugs", "url"], `https://github.com/${gitUrl.full_name}/issues`);
|
|
983
980
|
const repository = {
|
|
984
981
|
type: "git",
|
|
985
982
|
url: `git+https://github.com/${gitUrl.full_name}.git`
|
|
986
983
|
};
|
|
987
984
|
if (directory) repository.directory = directory;
|
|
988
|
-
(0, import_set_value
|
|
989
|
-
if (gitUser?.name && gitUser?.email) (0, import_set_value
|
|
985
|
+
(0, import_set_value.default)(pkgJson, "repository", repository);
|
|
986
|
+
if (gitUser?.name && gitUser?.email) (0, import_set_value.default)(pkgJson, "author", `${gitUser.name} <${gitUser.email}>`);
|
|
990
987
|
const nextContent = `${JSON.stringify(pkgJson, void 0, 2)}\n`;
|
|
991
988
|
if (await fs_extra.default.readFile(pkg.pkgJsonPath, "utf8") !== nextContent) await fs_extra.default.writeFile(pkg.pkgJsonPath, nextContent, "utf8");
|
|
992
989
|
}));
|
|
@@ -1086,7 +1083,6 @@ const chinaMirrorsEnvs = {
|
|
|
1086
1083
|
|
|
1087
1084
|
//#endregion
|
|
1088
1085
|
//#region src/commands/mirror/utils.ts
|
|
1089
|
-
var import_set_value$1 = /* @__PURE__ */ __toESM(require_set_value(), 1);
|
|
1090
1086
|
/**
|
|
1091
1087
|
* 在 vscode 里面设置镜像下载地址的环境变量,避免下载缓慢
|
|
1092
1088
|
*/
|
|
@@ -1097,7 +1093,7 @@ function setMirror(obj, envs = chinaMirrorsEnvs) {
|
|
|
1097
1093
|
"osx"
|
|
1098
1094
|
];
|
|
1099
1095
|
const prefix = "terminal.integrated.env";
|
|
1100
|
-
if (typeof obj === "object" && obj) for (const platform of platforms) (0, import_set_value
|
|
1096
|
+
if (typeof obj === "object" && obj) for (const platform of platforms) (0, import_set_value.default)(obj, [prefix, platform].join(".").replaceAll(".", "\\."), envs);
|
|
1101
1097
|
}
|
|
1102
1098
|
|
|
1103
1099
|
//#endregion
|
|
@@ -1202,7 +1198,7 @@ async function scheduleOverwrite(intent, options) {
|
|
|
1202
1198
|
}
|
|
1203
1199
|
async function flushPendingOverwrites(pending) {
|
|
1204
1200
|
if (!pending.length) return;
|
|
1205
|
-
const selected = await (0,
|
|
1201
|
+
const selected = await (0, _inquirer_checkbox.default)({
|
|
1206
1202
|
message: "检测到以下文件内容与当前仓库不同,选择需要覆盖的文件",
|
|
1207
1203
|
choices: pending.map((item) => ({
|
|
1208
1204
|
name: picocolors.default.greenBright(item.relPath),
|
|
@@ -1383,7 +1379,6 @@ function mergeWorkspaceManifest(source, target) {
|
|
|
1383
1379
|
|
|
1384
1380
|
//#endregion
|
|
1385
1381
|
//#region src/commands/upgrade/index.ts
|
|
1386
|
-
var import_set_value = /* @__PURE__ */ __toESM(require_set_value(), 1);
|
|
1387
1382
|
/**
|
|
1388
1383
|
* 将 assets 目录的模版文件同步到工程中,实现一键升级脚手架能力。
|
|
1389
1384
|
*/
|
|
@@ -1405,7 +1400,7 @@ async function upgradeMonorepo(opts) {
|
|
|
1405
1400
|
const configTargets = upgradeConfig?.targets ?? [];
|
|
1406
1401
|
const mergeTargets = upgradeConfig?.mergeTargets;
|
|
1407
1402
|
let targets = configTargets.length ? mergeTargets === false ? [...configTargets] : Array.from(new Set([...baseTargets, ...configTargets])) : baseTargets;
|
|
1408
|
-
if (merged.interactive) targets = await (0,
|
|
1403
|
+
if (merged.interactive) targets = await (0, _inquirer_checkbox.default)({
|
|
1409
1404
|
message: "选择你需要的文件",
|
|
1410
1405
|
choices: targets.map((x) => {
|
|
1411
1406
|
return {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/monorepo",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.12",
|
|
5
5
|
"description": "The icebreaker's monorepo manager",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -65,14 +65,14 @@
|
|
|
65
65
|
"@pnpm/logger": "^1001.0.1",
|
|
66
66
|
"@pnpm/types": "^1001.2.0",
|
|
67
67
|
"@pnpm/worker": "^1000.5.0",
|
|
68
|
-
"@pnpm/workspace.find-packages": "^1000.0.
|
|
68
|
+
"@pnpm/workspace.find-packages": "^1000.0.51",
|
|
69
69
|
"@pnpm/workspace.read-manifest": "^1000.2.9",
|
|
70
|
-
"c12": "^3.3.
|
|
70
|
+
"c12": "^3.3.3",
|
|
71
71
|
"commander": "^14.0.2",
|
|
72
72
|
"comment-json": "^4.5.0",
|
|
73
73
|
"consola": "^3.4.2",
|
|
74
74
|
"execa": "^9.6.1",
|
|
75
|
-
"fs-extra": "^11.3.
|
|
75
|
+
"fs-extra": "^11.3.3",
|
|
76
76
|
"git-url-parse": "^16.1.0",
|
|
77
77
|
"klaw": "^4.1.0",
|
|
78
78
|
"p-queue": "^9.0.1",
|
|
@@ -19,21 +19,21 @@
|
|
|
19
19
|
"@tanstack/vue-query-devtools": "^6.1.2",
|
|
20
20
|
"@tanstack/vue-table": "^8.21.3",
|
|
21
21
|
"@tanstack/vue-virtual": "^3.13.13",
|
|
22
|
-
"@trpc/client": "^11.8.
|
|
22
|
+
"@trpc/client": "^11.8.1",
|
|
23
23
|
"clsx": "^2.1.1",
|
|
24
24
|
"pinia": "^3.0.4",
|
|
25
25
|
"tailwind-merge": "^3.4.0",
|
|
26
26
|
"tailwind-variants": "^3.2.2",
|
|
27
|
-
"vue": "^3.5.
|
|
28
|
-
"vue-i18n": "^11.2.
|
|
27
|
+
"vue": "^3.5.26",
|
|
28
|
+
"vue-i18n": "^11.2.7",
|
|
29
29
|
"vue-router": "^4.6.4"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@cloudflare/vite-plugin": "^1.
|
|
32
|
+
"@cloudflare/vite-plugin": "^1.19.0",
|
|
33
33
|
"@hono/node-server": "^1.19.7",
|
|
34
34
|
"@hono/trpc-server": "^0.4.1",
|
|
35
35
|
"@tailwindcss/vite": "^4.1.18",
|
|
36
|
-
"@trpc/server": "^11.8.
|
|
36
|
+
"@trpc/server": "^11.8.1",
|
|
37
37
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
38
38
|
"@vitejs/plugin-vue-jsx": "^5.1.2",
|
|
39
39
|
"@vue/tsconfig": "^0.8.1",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"unplugin-vue-router": "^0.19.1",
|
|
44
44
|
"vite": "^7.3.0",
|
|
45
45
|
"vite-plugin-vue-devtools": "^8.0.5",
|
|
46
|
-
"vite-tsconfig-paths": "^6.0.
|
|
47
|
-
"vue-tsc": "3.
|
|
48
|
-
"wrangler": "^4.
|
|
46
|
+
"vite-tsconfig-paths": "^6.0.3",
|
|
47
|
+
"vue-tsc": "3.2.0",
|
|
48
|
+
"wrangler": "^4.56.0",
|
|
49
49
|
"zod": "^4.2.1"
|
|
50
50
|
}
|
|
51
51
|
}
|