mano-coding 0.1.15 → 0.1.16
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/bin.js +35 -26
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module';
|
|
2
2
|
const require = __createRequire(import.meta.url);
|
|
3
|
+
import * as __manoNodeUtil from 'node:util';
|
|
3
4
|
|
|
4
5
|
var __create = Object.create;
|
|
5
6
|
var __defProp = Object.defineProperty;
|
|
@@ -3504,7 +3505,7 @@ var init_zh = __esm({
|
|
|
3504
3505
|
"upgrade.dryRunPlan": "CLI \u5347\u7EA7\u8BA1\u5212\uFF1A\n current: {0}\n target: {1}\n integrity: {2}\n manager: {3}\n bin: {4}\n",
|
|
3505
3506
|
"upgrade.alreadyCurrent": "aicoding \u5DF2\u662F {0}\u3002",
|
|
3506
3507
|
// self-upgrade.ts
|
|
3507
|
-
"selfUpgrade.description": "\u68C0\u67E5\u6216\u5347\u7EA7\u7531 npm/pnpm \u5B89\u88C5\u7684
|
|
3508
|
+
"selfUpgrade.description": "\u68C0\u67E5\u6216\u5347\u7EA7\u7531 npm/pnpm \u5B89\u88C5\u7684 mano-coding CLI",
|
|
3508
3509
|
"selfUpgrade.optionCheck": "\u4EC5\u5237\u65B0\u7248\u672C\u4FE1\u606F",
|
|
3509
3510
|
"selfUpgrade.optionTo": "\u5347\u7EA7\u5230\u7CBE\u786E\u7684 CLI \u7248\u672C",
|
|
3510
3511
|
"selfUpgrade.optionAllowDowngrade": "\u5141\u8BB8\u663E\u5F0F\u964D\u7EA7",
|
|
@@ -3513,8 +3514,8 @@ var init_zh = __esm({
|
|
|
3513
3514
|
"selfUpgrade.checkConflict": "--check \u4E0D\u80FD\u4E0E\u5347\u7EA7\u9009\u9879\u7EC4\u5408\u4F7F\u7528",
|
|
3514
3515
|
"selfUpgrade.invalidRegistry": "AICODING_NPM_REGISTRY \u5FC5\u987B\u662F\u4E0D\u5E26\u51ED\u636E\u7684 HTTPS URL\u3002",
|
|
3515
3516
|
"selfUpgrade.noUpdateInfo": "\u65E0\u53EF\u7528\u66F4\u65B0\u4FE1\u606F\u3002",
|
|
3516
|
-
"selfUpgrade.updateAvailable": "
|
|
3517
|
-
"selfUpgrade.unsupportedInstall": "\u5F53\u524D CLI \u5B89\u88C5\u672A\u88AB\u9A8C\u8BC1\u4E3A npm \u6216 pnpm \u5168\u5C40\u5B89\u88C5\u7684
|
|
3517
|
+
"selfUpgrade.updateAvailable": "mano-coding {0} \u53EF\u7528\uFF08\u5F53\u524D {1}\uFF09\u3002",
|
|
3518
|
+
"selfUpgrade.unsupportedInstall": "\u5F53\u524D CLI \u5B89\u88C5\u672A\u88AB\u9A8C\u8BC1\u4E3A npm \u6216 pnpm \u5168\u5C40\u5B89\u88C5\u7684 mano-coding\u3002\u8BF7\u4F7F\u7528\u4F60\u7684\u5305\u7BA1\u7406\u5668\u91CD\u65B0\u5B89\u88C5\u3002",
|
|
3518
3519
|
"selfUpgrade.auditUnavailable": "\u5BA1\u8BA1\u65E5\u5FD7\u4E0D\u53EF\u7528\uFF1A{0}",
|
|
3519
3520
|
"selfUpgrade.alreadyInProgress": "\u53E6\u4E00\u4E2A CLI \u5347\u7EA7\u6B63\u5728\u8FDB\u884C\u3002",
|
|
3520
3521
|
"selfUpgrade.nodeVersionMismatch": "CLI {0} \u9700\u8981 Node {1}\uFF1B\u5F53\u524D Node \u4E3A {2}",
|
|
@@ -3529,7 +3530,7 @@ var init_zh = __esm({
|
|
|
3529
3530
|
"selfUpgrade.rollbackFailed": "CLI \u5347\u7EA7\u548C\u56DE\u6EDA\u5747\u5931\u8D25\u3002\u8BF7\u624B\u52A8\u91CD\u65B0\u5B89\u88C5 {0}@{1}\u3002",
|
|
3530
3531
|
"selfUpgrade.upgradeFailed": "CLI \u5347\u7EA7\u5931\u8D25\u5E76\u5DF2\u56DE\u6EDA\u3002",
|
|
3531
3532
|
"selfUpgrade.confirmPrompt": "\u5347\u7EA7\u6B64\u5168\u5C40 CLI \u5B89\u88C5\uFF1F[y/N] ",
|
|
3532
|
-
"selfUpgrade.upgraded": "\u5DF2\u5347\u7EA7
|
|
3533
|
+
"selfUpgrade.upgraded": "\u5DF2\u5347\u7EA7 mano-coding {0} -> {1}",
|
|
3533
3534
|
// cache.ts
|
|
3534
3535
|
"cache.description": "\u7BA1\u7406\u7528\u6237\u7EA7\u5B89\u88C5\u7F13\u5B58",
|
|
3535
3536
|
"cache.gc.description": "\u6E05\u7406\u65E0\u5F15\u7528\u7684\u7528\u6237\u7EA7\u5B89\u88C5",
|
|
@@ -27830,16 +27831,16 @@ var init_config_manager = __esm({
|
|
|
27830
27831
|
DEFAULT_GITLAB_HOST = "git.iec.io";
|
|
27831
27832
|
DEFAULT_PUBLIC_REGISTRY_URL = "https://git.iec.io/farris-public/extension-registry";
|
|
27832
27833
|
ConfigManager = class {
|
|
27833
|
-
|
|
27834
|
+
customPath;
|
|
27834
27835
|
constructor(customPath) {
|
|
27835
|
-
this.
|
|
27836
|
+
this.customPath = customPath;
|
|
27836
27837
|
}
|
|
27837
27838
|
get path() {
|
|
27838
|
-
return this.
|
|
27839
|
+
return this.customPath ?? process.env["MANO_CONFIG_PATH"] ?? join7(homedir(), ".manorc");
|
|
27839
27840
|
}
|
|
27840
27841
|
async read() {
|
|
27841
27842
|
try {
|
|
27842
|
-
const content = await readFile10(this.
|
|
27843
|
+
const content = await readFile10(this.path, "utf-8");
|
|
27843
27844
|
const parsed = JSON.parse(content);
|
|
27844
27845
|
return typeof parsed === "object" && parsed !== null ? parsed : {};
|
|
27845
27846
|
} catch {
|
|
@@ -27847,9 +27848,10 @@ var init_config_manager = __esm({
|
|
|
27847
27848
|
}
|
|
27848
27849
|
}
|
|
27849
27850
|
async write(config) {
|
|
27850
|
-
|
|
27851
|
+
const configDir = join7(this.path, "..");
|
|
27852
|
+
await mkdir8(configDir, { recursive: true }).catch(() => {
|
|
27851
27853
|
});
|
|
27852
|
-
await writeFile4(this.
|
|
27854
|
+
await writeFile4(this.path, JSON.stringify(config, null, 2), "utf-8");
|
|
27853
27855
|
}
|
|
27854
27856
|
async get(key) {
|
|
27855
27857
|
const config = await this.read();
|
|
@@ -33367,8 +33369,8 @@ var init_self_update = __esm({
|
|
|
33367
33369
|
"packages/core/src/self-update.ts"() {
|
|
33368
33370
|
"use strict";
|
|
33369
33371
|
import_semver7 = __toESM(require_semver2(), 1);
|
|
33370
|
-
CLI_PACKAGE_NAME = "
|
|
33371
|
-
CLI_BIN_NAME = "
|
|
33372
|
+
CLI_PACKAGE_NAME = "mano-coding";
|
|
33373
|
+
CLI_BIN_NAME = "mano-coding";
|
|
33372
33374
|
}
|
|
33373
33375
|
});
|
|
33374
33376
|
|
|
@@ -34164,7 +34166,7 @@ var init_dist = __esm({
|
|
|
34164
34166
|
});
|
|
34165
34167
|
|
|
34166
34168
|
// node_modules/@inquirer/core/dist/lib/theme.js
|
|
34167
|
-
|
|
34169
|
+
const styleText = __manoNodeUtil.styleText ?? ((_fmt, txt) => (typeof txt === "string" ? txt : String(txt)));
|
|
34168
34170
|
function getDefaultTheme() {
|
|
34169
34171
|
return {
|
|
34170
34172
|
...defaultTheme,
|
|
@@ -35463,7 +35465,7 @@ var init_create_prompt = __esm({
|
|
|
35463
35465
|
});
|
|
35464
35466
|
|
|
35465
35467
|
// node_modules/@inquirer/core/dist/lib/Separator.js
|
|
35466
|
-
|
|
35468
|
+
const styleText2 = __manoNodeUtil.styleText ?? ((_fmt, txt) => (typeof txt === "string" ? txt : String(txt)));
|
|
35467
35469
|
var Separator;
|
|
35468
35470
|
var init_Separator = __esm({
|
|
35469
35471
|
"node_modules/@inquirer/core/dist/lib/Separator.js"() {
|
|
@@ -35502,7 +35504,7 @@ var init_dist5 = __esm({
|
|
|
35502
35504
|
});
|
|
35503
35505
|
|
|
35504
35506
|
// node_modules/@inquirer/checkbox/dist/index.js
|
|
35505
|
-
|
|
35507
|
+
const styleText3 = __manoNodeUtil.styleText ?? ((_fmt, txt) => (typeof txt === "string" ? txt : String(txt)));
|
|
35506
35508
|
function isSelectable(item) {
|
|
35507
35509
|
return !Separator.isSeparator(item) && !item.disabled;
|
|
35508
35510
|
}
|
|
@@ -35700,7 +35702,7 @@ var init_dist6 = __esm({
|
|
|
35700
35702
|
});
|
|
35701
35703
|
|
|
35702
35704
|
// node_modules/@inquirer/confirm/dist/index.js
|
|
35703
|
-
|
|
35705
|
+
const styleText4 = __manoNodeUtil.styleText ?? ((_fmt, txt) => (typeof txt === "string" ? txt : String(txt)));
|
|
35704
35706
|
var confirmTheme, dist_default5;
|
|
35705
35707
|
var init_dist7 = __esm({
|
|
35706
35708
|
"node_modules/@inquirer/confirm/dist/index.js"() {
|
|
@@ -35865,7 +35867,7 @@ var init_dist8 = __esm({
|
|
|
35865
35867
|
});
|
|
35866
35868
|
|
|
35867
35869
|
// node_modules/@inquirer/select/dist/index.js
|
|
35868
|
-
|
|
35870
|
+
const styleText5 = __manoNodeUtil.styleText ?? ((_fmt, txt) => (typeof txt === "string" ? txt : String(txt)));
|
|
35869
35871
|
function isSelectable2(item) {
|
|
35870
35872
|
return !Separator.isSeparator(item) && !item.disabled;
|
|
35871
35873
|
}
|
|
@@ -41041,9 +41043,9 @@ async function executeUpgrade(opts, cliVersion) {
|
|
|
41041
41043
|
);
|
|
41042
41044
|
addRollback(userLifecycle.rollback);
|
|
41043
41045
|
const updatedLock = await buildLock("upgrade", templateResolution, addonResolutions, projectTargets, planResult.plan, cliVersion, desiredTemplate.inputs, service, intents, userInstallationKeys);
|
|
41044
|
-
for (const desired of [updatedLock.desired.template, ...updatedLock.desired.addons]) {
|
|
41046
|
+
for (const desired of [updatedLock.desired.template, ...updatedLock.desired.addons ?? []]) {
|
|
41045
41047
|
if (!desired) continue;
|
|
41046
|
-
desired.inputs = [lock.desired.template, ...lock.desired.addons].find((item) => item?.id === desired.id)?.inputs ?? {};
|
|
41048
|
+
desired.inputs = [lock.desired.template, ...lock.desired.addons ?? []].find((item) => item?.id === desired.id)?.inputs ?? {};
|
|
41047
41049
|
}
|
|
41048
41050
|
await lockRepo.write(updatedLock);
|
|
41049
41051
|
addRollback(() => lockRepo.write(lock));
|
|
@@ -41443,10 +41445,17 @@ import { homedir as homedir4 } from "node:os";
|
|
|
41443
41445
|
import { join as join19 } from "node:path";
|
|
41444
41446
|
function createLaunchCommand() {
|
|
41445
41447
|
const cmd = new Command("_launch");
|
|
41446
|
-
cmd.description(t("launch.description")).option("--kind <kind>", t("launch.optionKind")).option("--package <package-id>", t("launch.optionPackage")).option("--id <id>", t("launch.optionId")).option("--version <version>", t("launch.optionVersion")).option("--command <name>", t("launch.optionCommand")).allowUnknownOption(true).allowExcessArguments(true).action(async () => {
|
|
41447
|
-
const
|
|
41448
|
-
const
|
|
41449
|
-
|
|
41448
|
+
cmd.description(t("launch.description")).option("--kind <kind>", t("launch.optionKind")).option("--package <package-id>", t("launch.optionPackage")).option("--id <id>", t("launch.optionId")).option("--version <version>", t("launch.optionVersion")).option("--command <name>", t("launch.optionCommand")).allowUnknownOption(true).allowExcessArguments(true).action(async (_opts, command) => {
|
|
41449
|
+
const opts = command.opts();
|
|
41450
|
+
const launcherArgs = [];
|
|
41451
|
+
if (opts.kind) launcherArgs.push("--kind", opts.kind);
|
|
41452
|
+
if (opts.package) launcherArgs.push("--package", opts.package);
|
|
41453
|
+
if (opts.id) launcherArgs.push("--id", opts.id);
|
|
41454
|
+
if (opts.version) launcherArgs.push("--version", opts.version);
|
|
41455
|
+
if (opts.command) launcherArgs.push("--command", opts.command);
|
|
41456
|
+
if (command.args.length > 0) {
|
|
41457
|
+
launcherArgs.push("--", ...command.args);
|
|
41458
|
+
}
|
|
41450
41459
|
try {
|
|
41451
41460
|
await executeLaunch(launcherArgs);
|
|
41452
41461
|
} catch (error) {
|
|
@@ -41839,7 +41848,7 @@ import { createRequire as createRequire2 } from "node:module";
|
|
|
41839
41848
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
41840
41849
|
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
41841
41850
|
function resolveVersion() {
|
|
41842
|
-
if (true) return "0.1.
|
|
41851
|
+
if (true) return "0.1.16";
|
|
41843
41852
|
const candidates = [
|
|
41844
41853
|
new URL("../package.json", import.meta.url),
|
|
41845
41854
|
new URL("../../package.json", import.meta.url),
|
|
@@ -41893,14 +41902,14 @@ async function run(argv) {
|
|
|
41893
41902
|
program2.addCommand(createInfoCommand(CLI_VERSION));
|
|
41894
41903
|
program2.addCommand(createVersionCommand(CLI_VERSION));
|
|
41895
41904
|
program2.addCommand(createDoctorCommand(CLI_VERSION));
|
|
41896
|
-
const extensionCommand = new Command("extension").description("\u6269\u5C55\u5F00\u53D1\u5DE5\u5177\u94FE");
|
|
41905
|
+
const extensionCommand = new Command("extension").description("\u6269\u5C55\u5F00\u53D1\u5DE5\u5177\u94FE").exitOverride();
|
|
41897
41906
|
extensionCommand.addCommand(createExtensionCreateCommand());
|
|
41898
41907
|
extensionCommand.addCommand(createExtensionDevCommand());
|
|
41899
41908
|
extensionCommand.addCommand(createExtensionValidateCommand(CLI_VERSION));
|
|
41900
41909
|
extensionCommand.addCommand(createExtensionTestCommand(CLI_VERSION));
|
|
41901
41910
|
extensionCommand.addCommand(createExtensionPackCommand(CLI_VERSION));
|
|
41902
41911
|
extensionCommand.addCommand(createExtensionSubmitCommand(CLI_VERSION));
|
|
41903
|
-
const adapterCommand = new Command("adapter").description("\u7B2C\u4E09\u65B9 Adapter \u5F00\u53D1\u5DE5\u5177\u94FE");
|
|
41912
|
+
const adapterCommand = new Command("adapter").description("\u7B2C\u4E09\u65B9 Adapter \u5F00\u53D1\u5DE5\u5177\u94FE").exitOverride();
|
|
41904
41913
|
adapterCommand.addCommand(createExtensionAdapterValidateCommand());
|
|
41905
41914
|
adapterCommand.addCommand(createExtensionAdapterTestCommand());
|
|
41906
41915
|
adapterCommand.addCommand(createExtensionAdapterPackCommand());
|
package/dist/index.js
CHANGED