@kevisual/cli 0.0.54 → 0.0.55
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/assistant-server.js +14075 -237
- package/dist/assistant.js +1467 -180
- package/dist/envision.mjs +115 -68
- package/package.json +6 -6
package/dist/envision.mjs
CHANGED
|
@@ -41913,8 +41913,8 @@ var {
|
|
|
41913
41913
|
import fs from "fs";
|
|
41914
41914
|
var version = "0.0.1";
|
|
41915
41915
|
try {
|
|
41916
|
-
if ("0.0.
|
|
41917
|
-
version = "0.0.
|
|
41916
|
+
if ("0.0.55")
|
|
41917
|
+
version = "0.0.55";
|
|
41918
41918
|
} catch (e) {}
|
|
41919
41919
|
program.name("app").description("A CLI tool with envison").version(version, "-V, --version");
|
|
41920
41920
|
var ls = new Command("ls").description("List files in the current directory").action(() => {
|
|
@@ -41959,14 +41959,14 @@ var writeConfig = (config) => {
|
|
|
41959
41959
|
return config;
|
|
41960
41960
|
};
|
|
41961
41961
|
|
|
41962
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
41962
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/key.js
|
|
41963
41963
|
var isUpKey = (key) => key.name === "up" || key.name === "k" || key.ctrl && key.name === "p";
|
|
41964
41964
|
var isDownKey = (key) => key.name === "down" || key.name === "j" || key.ctrl && key.name === "n";
|
|
41965
41965
|
var isSpaceKey = (key) => key.name === "space";
|
|
41966
41966
|
var isBackspaceKey = (key) => key.name === "backspace";
|
|
41967
41967
|
var isNumberKey = (key) => "1234567890".includes(key.name);
|
|
41968
41968
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
41969
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
41969
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/errors.js
|
|
41970
41970
|
class AbortPromptError extends Error {
|
|
41971
41971
|
name = "AbortPromptError";
|
|
41972
41972
|
message = "Prompt was aborted";
|
|
@@ -41992,10 +41992,10 @@ class HookError extends Error {
|
|
|
41992
41992
|
class ValidationError extends Error {
|
|
41993
41993
|
name = "ValidationError";
|
|
41994
41994
|
}
|
|
41995
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
41995
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
41996
41996
|
import { AsyncResource as AsyncResource2 } from "node:async_hooks";
|
|
41997
41997
|
|
|
41998
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
41998
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/hook-engine.js
|
|
41999
41999
|
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
|
42000
42000
|
var hookStorage = new AsyncLocalStorage;
|
|
42001
42001
|
function createStore(rl) {
|
|
@@ -42100,7 +42100,7 @@ var effectScheduler = {
|
|
|
42100
42100
|
}
|
|
42101
42101
|
};
|
|
42102
42102
|
|
|
42103
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42103
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-state.js
|
|
42104
42104
|
function useState(defaultValue) {
|
|
42105
42105
|
return withPointer((pointer) => {
|
|
42106
42106
|
const setFn = (newValue) => {
|
|
@@ -42118,7 +42118,7 @@ function useState(defaultValue) {
|
|
|
42118
42118
|
});
|
|
42119
42119
|
}
|
|
42120
42120
|
|
|
42121
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42121
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-effect.js
|
|
42122
42122
|
function useEffect(cb, depArray) {
|
|
42123
42123
|
withPointer((pointer) => {
|
|
42124
42124
|
const oldDeps = pointer.get();
|
|
@@ -42130,7 +42130,7 @@ function useEffect(cb, depArray) {
|
|
|
42130
42130
|
});
|
|
42131
42131
|
}
|
|
42132
42132
|
|
|
42133
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42133
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
42134
42134
|
var import_yoctocolors_cjs = __toESM(require_yoctocolors_cjs(), 1);
|
|
42135
42135
|
|
|
42136
42136
|
// node_modules/.pnpm/@inquirer+figures@1.0.11/node_modules/@inquirer/figures/dist/esm/index.js
|
|
@@ -42419,7 +42419,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
|
42419
42419
|
var esm_default = figures;
|
|
42420
42420
|
var replacements = Object.entries(specialMainSymbols);
|
|
42421
42421
|
|
|
42422
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42422
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/theme.js
|
|
42423
42423
|
var defaultTheme = {
|
|
42424
42424
|
prefix: {
|
|
42425
42425
|
idle: import_yoctocolors_cjs.default.blue("?"),
|
|
@@ -42440,7 +42440,7 @@ var defaultTheme = {
|
|
|
42440
42440
|
}
|
|
42441
42441
|
};
|
|
42442
42442
|
|
|
42443
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42443
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/make-theme.js
|
|
42444
42444
|
function isPlainObject(value) {
|
|
42445
42445
|
if (typeof value !== "object" || value === null)
|
|
42446
42446
|
return false;
|
|
@@ -42468,7 +42468,7 @@ function makeTheme(...themes) {
|
|
|
42468
42468
|
return deepMerge(...themesToMerge);
|
|
42469
42469
|
}
|
|
42470
42470
|
|
|
42471
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42471
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-prefix.js
|
|
42472
42472
|
function usePrefix({ status = "idle", theme }) {
|
|
42473
42473
|
const [showLoader, setShowLoader] = useState(false);
|
|
42474
42474
|
const [tick, setTick] = useState(0);
|
|
@@ -42498,7 +42498,7 @@ function usePrefix({ status = "idle", theme }) {
|
|
|
42498
42498
|
const iconName = status === "loading" ? "idle" : status;
|
|
42499
42499
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
42500
42500
|
}
|
|
42501
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42501
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-memo.js
|
|
42502
42502
|
function useMemo(fn, dependencies) {
|
|
42503
42503
|
return withPointer((pointer) => {
|
|
42504
42504
|
const prev = pointer.get();
|
|
@@ -42510,11 +42510,11 @@ function useMemo(fn, dependencies) {
|
|
|
42510
42510
|
return prev.value;
|
|
42511
42511
|
});
|
|
42512
42512
|
}
|
|
42513
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42513
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-ref.js
|
|
42514
42514
|
function useRef(val) {
|
|
42515
42515
|
return useState({ current: val })[0];
|
|
42516
42516
|
}
|
|
42517
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42517
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/use-keypress.js
|
|
42518
42518
|
function useKeypress(userHandler) {
|
|
42519
42519
|
const signal = useRef(userHandler);
|
|
42520
42520
|
signal.current = userHandler;
|
|
@@ -42532,7 +42532,7 @@ function useKeypress(userHandler) {
|
|
|
42532
42532
|
};
|
|
42533
42533
|
}, []);
|
|
42534
42534
|
}
|
|
42535
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42535
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/utils.js
|
|
42536
42536
|
var import_cli_width = __toESM(require_cli_width(), 1);
|
|
42537
42537
|
var import_wrap_ansi = __toESM(require_wrap_ansi(), 1);
|
|
42538
42538
|
function breakLines(content, width) {
|
|
@@ -42545,7 +42545,7 @@ function readlineWidth() {
|
|
|
42545
42545
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
|
42546
42546
|
}
|
|
42547
42547
|
|
|
42548
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42548
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/pagination/lines.js
|
|
42549
42549
|
function split(content, width) {
|
|
42550
42550
|
return breakLines(content, width).split(`
|
|
42551
42551
|
`);
|
|
@@ -42590,7 +42590,7 @@ function lines({ items, width, renderItem, active, position: requested, pageSize
|
|
|
42590
42590
|
return pageBuffer.filter((line) => typeof line === "string");
|
|
42591
42591
|
}
|
|
42592
42592
|
|
|
42593
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42593
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/pagination/position.js
|
|
42594
42594
|
function finite({ active, pageSize, total }) {
|
|
42595
42595
|
const middle = Math.floor(pageSize / 2);
|
|
42596
42596
|
if (total <= pageSize || active < middle)
|
|
@@ -42608,7 +42608,7 @@ function infinite({ active, lastActive, total, pageSize, pointer }) {
|
|
|
42608
42608
|
return pointer;
|
|
42609
42609
|
}
|
|
42610
42610
|
|
|
42611
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42611
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/pagination/use-pagination.js
|
|
42612
42612
|
function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
42613
42613
|
const state = useRef({ position: 0, lastActive: 0 });
|
|
42614
42614
|
const position = loop ? infinite({
|
|
@@ -42634,7 +42634,7 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
|
42634
42634
|
}).join(`
|
|
42635
42635
|
`);
|
|
42636
42636
|
}
|
|
42637
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42637
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
42638
42638
|
var import_mute_stream = __toESM(require_lib(), 1);
|
|
42639
42639
|
import * as readline2 from "node:readline";
|
|
42640
42640
|
import { AsyncResource as AsyncResource3 } from "node:async_hooks";
|
|
@@ -42847,7 +42847,7 @@ var {
|
|
|
42847
42847
|
unload
|
|
42848
42848
|
} = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback);
|
|
42849
42849
|
|
|
42850
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42850
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/screen-manager.js
|
|
42851
42851
|
var import_ansi_escapes = __toESM(require_ansi_escapes(), 1);
|
|
42852
42852
|
import { stripVTControlCharacters } from "node:util";
|
|
42853
42853
|
var height = (content) => content.split(`
|
|
@@ -42917,7 +42917,7 @@ class ScreenManager {
|
|
|
42917
42917
|
}
|
|
42918
42918
|
}
|
|
42919
42919
|
|
|
42920
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42920
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/promise-polyfill.js
|
|
42921
42921
|
class PromisePolyfill extends Promise {
|
|
42922
42922
|
static withResolver() {
|
|
42923
42923
|
let resolve;
|
|
@@ -42930,7 +42930,7 @@ class PromisePolyfill extends Promise {
|
|
|
42930
42930
|
}
|
|
42931
42931
|
}
|
|
42932
42932
|
|
|
42933
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
42933
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/create-prompt.js
|
|
42934
42934
|
function getCallSites() {
|
|
42935
42935
|
const _prepareStackTrace = Error.prepareStackTrace;
|
|
42936
42936
|
let result = [];
|
|
@@ -43016,7 +43016,7 @@ function createPrompt(view) {
|
|
|
43016
43016
|
};
|
|
43017
43017
|
return prompt;
|
|
43018
43018
|
}
|
|
43019
|
-
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.
|
|
43019
|
+
// node_modules/.pnpm/@inquirer+core@10.1.11_@types+node@22.15.21/node_modules/@inquirer/core/dist/esm/lib/Separator.js
|
|
43020
43020
|
var import_yoctocolors_cjs2 = __toESM(require_yoctocolors_cjs(), 1);
|
|
43021
43021
|
class Separator {
|
|
43022
43022
|
separator = import_yoctocolors_cjs2.default.dim(Array.from({ length: 15 }).join(esm_default.line));
|
|
@@ -43030,7 +43030,7 @@ class Separator {
|
|
|
43030
43030
|
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
|
43031
43031
|
}
|
|
43032
43032
|
}
|
|
43033
|
-
// node_modules/.pnpm/@inquirer+checkbox@4.1.6_@types+node@22.15.
|
|
43033
|
+
// node_modules/.pnpm/@inquirer+checkbox@4.1.6_@types+node@22.15.21/node_modules/@inquirer/checkbox/dist/esm/index.js
|
|
43034
43034
|
var import_yoctocolors_cjs3 = __toESM(require_yoctocolors_cjs(), 1);
|
|
43035
43035
|
var import_ansi_escapes2 = __toESM(require_ansi_escapes(), 1);
|
|
43036
43036
|
var checkboxTheme = {
|
|
@@ -43204,7 +43204,7 @@ ${theme.style.error(errorMsg)}`;
|
|
|
43204
43204
|
return `${prefix} ${message}${helpTipTop}
|
|
43205
43205
|
${page}${helpTipBottom}${choiceDescription}${error}${import_ansi_escapes2.default.cursorHide}`;
|
|
43206
43206
|
});
|
|
43207
|
-
// node_modules/.pnpm/@inquirer+editor@4.2.11_@types+node@22.15.
|
|
43207
|
+
// node_modules/.pnpm/@inquirer+editor@4.2.11_@types+node@22.15.21/node_modules/@inquirer/editor/dist/esm/index.js
|
|
43208
43208
|
var import_external_editor = __toESM(require_main(), 1);
|
|
43209
43209
|
import { AsyncResource as AsyncResource4 } from "node:async_hooks";
|
|
43210
43210
|
var editorTheme = {
|
|
@@ -43273,7 +43273,7 @@ var esm_default3 = createPrompt((config, done) => {
|
|
|
43273
43273
|
}
|
|
43274
43274
|
return [[prefix, message, helpTip].filter(Boolean).join(" "), error];
|
|
43275
43275
|
});
|
|
43276
|
-
// node_modules/.pnpm/@inquirer+confirm@5.1.10_@types+node@22.15.
|
|
43276
|
+
// node_modules/.pnpm/@inquirer+confirm@5.1.10_@types+node@22.15.21/node_modules/@inquirer/confirm/dist/esm/index.js
|
|
43277
43277
|
function getBooleanValue(value, defaultValue) {
|
|
43278
43278
|
let answer = defaultValue !== false;
|
|
43279
43279
|
if (/^(y|yes)/i.test(value))
|
|
@@ -43316,7 +43316,7 @@ var esm_default4 = createPrompt((config, done) => {
|
|
|
43316
43316
|
const message = theme.style.message(config.message, status);
|
|
43317
43317
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
|
43318
43318
|
});
|
|
43319
|
-
// node_modules/.pnpm/@inquirer+input@4.1.10_@types+node@22.15.
|
|
43319
|
+
// node_modules/.pnpm/@inquirer+input@4.1.10_@types+node@22.15.21/node_modules/@inquirer/input/dist/esm/index.js
|
|
43320
43320
|
var inputTheme = {
|
|
43321
43321
|
validationFailureMode: "keep"
|
|
43322
43322
|
};
|
|
@@ -43381,7 +43381,7 @@ var esm_default5 = createPrompt((config, done) => {
|
|
|
43381
43381
|
error
|
|
43382
43382
|
];
|
|
43383
43383
|
});
|
|
43384
|
-
// node_modules/.pnpm/@inquirer+number@3.0.13_@types+node@22.15.
|
|
43384
|
+
// node_modules/.pnpm/@inquirer+number@3.0.13_@types+node@22.15.21/node_modules/@inquirer/number/dist/esm/index.js
|
|
43385
43385
|
function isStepOf(value, step, min) {
|
|
43386
43386
|
const valuePow = value * Math.pow(10, 6);
|
|
43387
43387
|
const stepPow = step * Math.pow(10, 6);
|
|
@@ -43461,7 +43461,7 @@ var esm_default6 = createPrompt((config, done) => {
|
|
|
43461
43461
|
error
|
|
43462
43462
|
];
|
|
43463
43463
|
});
|
|
43464
|
-
// node_modules/.pnpm/@inquirer+expand@4.0.13_@types+node@22.15.
|
|
43464
|
+
// node_modules/.pnpm/@inquirer+expand@4.0.13_@types+node@22.15.21/node_modules/@inquirer/expand/dist/esm/index.js
|
|
43465
43465
|
var import_yoctocolors_cjs4 = __toESM(require_yoctocolors_cjs(), 1);
|
|
43466
43466
|
function normalizeChoices2(choices) {
|
|
43467
43467
|
return choices.map((choice) => {
|
|
@@ -43558,7 +43558,7 @@ var esm_default7 = createPrompt((config, done) => {
|
|
|
43558
43558
|
`)
|
|
43559
43559
|
];
|
|
43560
43560
|
});
|
|
43561
|
-
// node_modules/.pnpm/@inquirer+rawlist@4.1.1_@types+node@22.15.
|
|
43561
|
+
// node_modules/.pnpm/@inquirer+rawlist@4.1.1_@types+node@22.15.21/node_modules/@inquirer/rawlist/dist/esm/index.js
|
|
43562
43562
|
var import_yoctocolors_cjs5 = __toESM(require_yoctocolors_cjs(), 1);
|
|
43563
43563
|
var numberRegex = /\d+/;
|
|
43564
43564
|
function isSelectableChoice(choice) {
|
|
@@ -43670,7 +43670,7 @@ var esm_default8 = createPrompt((config, done) => {
|
|
|
43670
43670
|
`)
|
|
43671
43671
|
];
|
|
43672
43672
|
});
|
|
43673
|
-
// node_modules/.pnpm/@inquirer+password@4.0.13_@types+node@22.15.
|
|
43673
|
+
// node_modules/.pnpm/@inquirer+password@4.0.13_@types+node@22.15.21/node_modules/@inquirer/password/dist/esm/index.js
|
|
43674
43674
|
var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
|
|
43675
43675
|
var esm_default9 = createPrompt((config, done) => {
|
|
43676
43676
|
const { validate = () => true } = config;
|
|
@@ -43719,7 +43719,7 @@ var esm_default9 = createPrompt((config, done) => {
|
|
|
43719
43719
|
}
|
|
43720
43720
|
return [[prefix, message, config.mask ? formattedValue : helpTip].join(" "), error];
|
|
43721
43721
|
});
|
|
43722
|
-
// node_modules/.pnpm/@inquirer+search@3.0.13_@types+node@22.15.
|
|
43722
|
+
// node_modules/.pnpm/@inquirer+search@3.0.13_@types+node@22.15.21/node_modules/@inquirer/search/dist/esm/index.js
|
|
43723
43723
|
var import_yoctocolors_cjs6 = __toESM(require_yoctocolors_cjs(), 1);
|
|
43724
43724
|
var searchTheme = {
|
|
43725
43725
|
icon: { cursor: esm_default.pointer },
|
|
@@ -43884,7 +43884,7 @@ ${theme.style.description(selectedChoice.description)}` : ``;
|
|
|
43884
43884
|
`${error ?? page}${helpTip}${choiceDescription}`
|
|
43885
43885
|
];
|
|
43886
43886
|
});
|
|
43887
|
-
// node_modules/.pnpm/@inquirer+select@4.2.1_@types+node@22.15.
|
|
43887
|
+
// node_modules/.pnpm/@inquirer+select@4.2.1_@types+node@22.15.21/node_modules/@inquirer/select/dist/esm/index.js
|
|
43888
43888
|
var import_yoctocolors_cjs7 = __toESM(require_yoctocolors_cjs(), 1);
|
|
43889
43889
|
var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
|
|
43890
43890
|
var selectTheme = {
|
|
@@ -44030,7 +44030,7 @@ ${theme.style.description(selectedChoice.description)}` : ``;
|
|
|
44030
44030
|
return `${[prefix, message, helpTipTop].filter(Boolean).join(" ")}
|
|
44031
44031
|
${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes4.default.cursorHide}`;
|
|
44032
44032
|
});
|
|
44033
|
-
// node_modules/.pnpm/inquirer@12.6.1_@types+node@22.15.
|
|
44033
|
+
// node_modules/.pnpm/inquirer@12.6.1_@types+node@22.15.21/node_modules/inquirer/dist/esm/ui/prompt.js
|
|
44034
44034
|
var import_rxjs = __toESM(require_cjs(), 1);
|
|
44035
44035
|
var import_run_async = __toESM(require_run_async(), 1);
|
|
44036
44036
|
var import_mute_stream2 = __toESM(require_lib(), 1);
|
|
@@ -44242,7 +44242,7 @@ class PromptsRunner {
|
|
|
44242
44242
|
};
|
|
44243
44243
|
}
|
|
44244
44244
|
|
|
44245
|
-
// node_modules/.pnpm/inquirer@12.6.1_@types+node@22.15.
|
|
44245
|
+
// node_modules/.pnpm/inquirer@12.6.1_@types+node@22.15.21/node_modules/inquirer/dist/esm/index.js
|
|
44246
44246
|
var builtInPrompts = {
|
|
44247
44247
|
input: esm_default5,
|
|
44248
44248
|
select: esm_default11,
|
|
@@ -44641,7 +44641,7 @@ class BaseQuery {
|
|
|
44641
44641
|
}
|
|
44642
44642
|
}
|
|
44643
44643
|
|
|
44644
|
-
// node_modules/.pnpm/@kevisual+query-login@0.0.
|
|
44644
|
+
// node_modules/.pnpm/@kevisual+query-login@0.0.6_@kevisual+query@0.0.18_encoding@0.1.13_ws@8.18.0__rollup@4.41.0_tslib@2.8.1_typescript@5.8.2/node_modules/@kevisual/query-login/dist/query-login-node.js
|
|
44645
44645
|
import { homedir } from "node:os";
|
|
44646
44646
|
import { join, dirname } from "node:path";
|
|
44647
44647
|
import fs3 from "node:fs";
|
|
@@ -44795,6 +44795,11 @@ var QueryLogin = class extends BaseQuery {
|
|
|
44795
44795
|
}
|
|
44796
44796
|
return res;
|
|
44797
44797
|
}
|
|
44798
|
+
async setLoginToken(token) {
|
|
44799
|
+
const { accessToken, refreshToken } = token;
|
|
44800
|
+
this.storage.setItem("token", accessToken || "");
|
|
44801
|
+
await this.beforeSetLoginUser({ accessToken, refreshToken });
|
|
44802
|
+
}
|
|
44798
44803
|
async loginByWechat(data) {
|
|
44799
44804
|
const res = await this.post({ path: "wx", key: "open-login", code: data.code });
|
|
44800
44805
|
if (res.code === 200) {
|
|
@@ -52309,6 +52314,7 @@ ${filesString}
|
|
|
52309
52314
|
fs15.writeFileSync(indexHtmlPath, indexHtmlContent);
|
|
52310
52315
|
};
|
|
52311
52316
|
var pack2 = async (opts) => {
|
|
52317
|
+
const isTar = opts.isTar;
|
|
52312
52318
|
const cwd = process.cwd();
|
|
52313
52319
|
const collection = {};
|
|
52314
52320
|
const packageJsonPath = path9.join(cwd, "package.json");
|
|
@@ -52355,8 +52361,8 @@ var pack2 = async (opts) => {
|
|
|
52355
52361
|
Tarball Details`);
|
|
52356
52362
|
console.log(`name: ${packageJson.name}`);
|
|
52357
52363
|
console.log(`version: ${packageJson.version}`);
|
|
52358
|
-
console.log(`filename: ${outputFileName}`);
|
|
52359
|
-
console.log(`package size: ${packageSize}`);
|
|
52364
|
+
isTar && console.log(`filename: ${outputFileName}`);
|
|
52365
|
+
isTar && console.log(`package size: ${packageSize}`);
|
|
52360
52366
|
console.log(`total files: ${allFiles.length}`);
|
|
52361
52367
|
opts?.isTar && console.log(`Created package: ${outputFileName}`);
|
|
52362
52368
|
try {
|
|
@@ -52543,10 +52549,9 @@ var packCommand = new Command("pack").description("打包应用, 默认使用 pa
|
|
|
52543
52549
|
fs15.writeFileSync(path9.join(process.cwd(), "pack-dist", "package.json"), JSON.stringify(newPackageJson, null, 2));
|
|
52544
52550
|
}
|
|
52545
52551
|
if (opts.publish) {
|
|
52546
|
-
const runDeployCommand = "envision pack-deploy " + value.outputFilePath + " -k " + appKey;
|
|
52547
52552
|
const [_app, _command] = process.argv;
|
|
52548
52553
|
let deployDist = opts.isTar ? value.outputFilePath : packDist;
|
|
52549
|
-
const deployCommand = [_app, _command, "deploy", deployDist, "-k", appKey, "-v", version3, "-u"];
|
|
52554
|
+
const deployCommand = [_app, _command, "deploy", deployDist, "-k", appKey, "-v", version3, "-u", "-d"];
|
|
52550
52555
|
if (opts.org) {
|
|
52551
52556
|
deployCommand.push("-o", opts.org);
|
|
52552
52557
|
}
|
|
@@ -52557,9 +52562,7 @@ var packCommand = new Command("pack").description("打包应用, 默认使用 pa
|
|
|
52557
52562
|
deployCommand.push("-y", "yes");
|
|
52558
52563
|
}
|
|
52559
52564
|
console.log(chalk2.blue("deploy doing: "), deployCommand.slice(2).join(" "), `
|
|
52560
|
-
|
|
52561
52565
|
`);
|
|
52562
|
-
console.log("pack deploy services", chalk2.blue("example: "), runDeployCommand);
|
|
52563
52566
|
program.parse(deployCommand);
|
|
52564
52567
|
}
|
|
52565
52568
|
});
|
|
@@ -52735,7 +52738,7 @@ var getBufferHash = (buffer) => {
|
|
|
52735
52738
|
// src/module/download/upload.ts
|
|
52736
52739
|
var import_form_data = __toESM(require_form_data(), 1);
|
|
52737
52740
|
|
|
52738
|
-
// node_modules/.pnpm/@kevisual+logger@0.0.
|
|
52741
|
+
// node_modules/.pnpm/@kevisual+logger@0.0.4/node_modules/@kevisual/logger/dist/logger-node.mjs
|
|
52739
52742
|
import process5 from "node:process";
|
|
52740
52743
|
import os3 from "node:os";
|
|
52741
52744
|
import tty2 from "node:tty";
|
|
@@ -52783,7 +52786,16 @@ class Logger {
|
|
|
52783
52786
|
showTime;
|
|
52784
52787
|
format;
|
|
52785
52788
|
constructor(opts) {
|
|
52786
|
-
|
|
52789
|
+
if (opts?.level) {
|
|
52790
|
+
const normalizedLevel = opts.level.toLowerCase();
|
|
52791
|
+
if (logLevel.includes(normalizedLevel)) {
|
|
52792
|
+
this.level = normalizedLevel;
|
|
52793
|
+
} else {
|
|
52794
|
+
this.level = "info";
|
|
52795
|
+
}
|
|
52796
|
+
} else {
|
|
52797
|
+
this.level = "info";
|
|
52798
|
+
}
|
|
52787
52799
|
this.printer = opts?.printer ?? new Printer;
|
|
52788
52800
|
this.showTime = opts?.showTime ?? false;
|
|
52789
52801
|
this.format = opts?.format ?? "HH:mm:ss";
|
|
@@ -53310,6 +53322,21 @@ class Printer2 extends Printer {
|
|
|
53310
53322
|
error(...args) {
|
|
53311
53323
|
console.log(source_default2.red(this.getNewArgs(...args)));
|
|
53312
53324
|
}
|
|
53325
|
+
green(...args) {
|
|
53326
|
+
console.log(source_default2.green(this.getNewArgs(...args)));
|
|
53327
|
+
}
|
|
53328
|
+
red(...args) {
|
|
53329
|
+
console.log(source_default2.red(this.getNewArgs(...args)));
|
|
53330
|
+
}
|
|
53331
|
+
blue(...args) {
|
|
53332
|
+
console.log(source_default2.blue(this.getNewArgs(...args)));
|
|
53333
|
+
}
|
|
53334
|
+
chalk(fn, ...args) {
|
|
53335
|
+
const show = source_default2[fn];
|
|
53336
|
+
if (show) {
|
|
53337
|
+
console.log(show(this.getNewArgs(...args)));
|
|
53338
|
+
}
|
|
53339
|
+
}
|
|
53313
53340
|
}
|
|
53314
53341
|
|
|
53315
53342
|
class Logger2 extends Logger {
|
|
@@ -53394,6 +53421,26 @@ var upload = (opts) => {
|
|
|
53394
53421
|
});
|
|
53395
53422
|
};
|
|
53396
53423
|
|
|
53424
|
+
// src/query/app-manager/query-app.ts
|
|
53425
|
+
var queryApp = async (params, opts) => {
|
|
53426
|
+
return await query.post({
|
|
53427
|
+
path: "app",
|
|
53428
|
+
key: "getApp",
|
|
53429
|
+
data: {
|
|
53430
|
+
...params
|
|
53431
|
+
}
|
|
53432
|
+
}, opts);
|
|
53433
|
+
};
|
|
53434
|
+
var queryAppVersion = async (params, opts) => {
|
|
53435
|
+
return await query.post({
|
|
53436
|
+
path: "app",
|
|
53437
|
+
key: "get",
|
|
53438
|
+
data: {
|
|
53439
|
+
...params
|
|
53440
|
+
}
|
|
53441
|
+
}, opts);
|
|
53442
|
+
};
|
|
53443
|
+
|
|
53397
53444
|
// src/command/deploy.ts
|
|
53398
53445
|
var getPackageJson = () => {
|
|
53399
53446
|
const filePath = path10.join(process.cwd(), "package.json");
|
|
@@ -53482,7 +53529,15 @@ var command2 = new Command("deploy").description("把前端文件传到服务器
|
|
|
53482
53529
|
res.data?.upload?.map?.((d) => {
|
|
53483
53530
|
console.log(source_default.green("uploaded file", d?.name, d?.path));
|
|
53484
53531
|
});
|
|
53485
|
-
const
|
|
53532
|
+
const res2 = await queryAppVersion({
|
|
53533
|
+
key: key2,
|
|
53534
|
+
version: version3
|
|
53535
|
+
});
|
|
53536
|
+
if (res2.code !== 200) {
|
|
53537
|
+
console.error(source_default.red("查询应用版本失败"), res2.message);
|
|
53538
|
+
return;
|
|
53539
|
+
}
|
|
53540
|
+
const { id, data, ...rest } = res2.data || {};
|
|
53486
53541
|
if (id && !update3) {
|
|
53487
53542
|
console.log(source_default.green("id: "), id);
|
|
53488
53543
|
if (!org) {
|
|
@@ -53493,6 +53548,7 @@ var command2 = new Command("deploy").description("把前端文件传到服务器
|
|
|
53493
53548
|
} else if (id && update3) {
|
|
53494
53549
|
deployLoadFn2(id);
|
|
53495
53550
|
} else {}
|
|
53551
|
+
logger.debug("deploy success", res2.data);
|
|
53496
53552
|
if (id && showBackend) {
|
|
53497
53553
|
console.log(`
|
|
53498
53554
|
`);
|
|
@@ -53516,7 +53572,6 @@ var command2 = new Command("deploy").description("把前端文件传到服务器
|
|
|
53516
53572
|
});
|
|
53517
53573
|
var uploadFiles = async (files, directory, opts) => {
|
|
53518
53574
|
const { key: key2, version: version3, username } = opts || {};
|
|
53519
|
-
const config2 = await getConfig();
|
|
53520
53575
|
const form = new import_form_data2.default;
|
|
53521
53576
|
const data = { files: [] };
|
|
53522
53577
|
for (const file of files) {
|
|
@@ -54458,7 +54513,7 @@ class SyncBase {
|
|
|
54458
54513
|
let obj = {};
|
|
54459
54514
|
const keys = [];
|
|
54460
54515
|
for (let item of syncDirectory) {
|
|
54461
|
-
const { registry, ignore: ignore2 = [], files = [], replace: replace3 = {} } = item;
|
|
54516
|
+
const { registry, ignore: ignore2 = [], files = [], replace: replace3 = {}, metadata } = item;
|
|
54462
54517
|
const cwd = this.#dir;
|
|
54463
54518
|
const glob_files = await import_fast_glob3.default(files, {
|
|
54464
54519
|
ignore: this.getIngore(ignore2),
|
|
@@ -54485,7 +54540,10 @@ class SyncBase {
|
|
|
54485
54540
|
const pathname = path14.join(_registryURL.pathname, newKey);
|
|
54486
54541
|
_registryURL.pathname = pathname;
|
|
54487
54542
|
keys.push(key2);
|
|
54488
|
-
obj[key2] = _registryURL.toString();
|
|
54543
|
+
obj[key2] = { url: _registryURL.toString() };
|
|
54544
|
+
if (metadata) {
|
|
54545
|
+
obj[key2] = { ...obj[key2], metadata };
|
|
54546
|
+
}
|
|
54489
54547
|
}
|
|
54490
54548
|
}
|
|
54491
54549
|
return { sync: obj, keys };
|
|
@@ -54749,7 +54807,7 @@ import path16 from "node:path";
|
|
|
54749
54807
|
var command8 = new Command("sync").option("-d --dir <dir>").description("同步项目").action(() => {
|
|
54750
54808
|
console.log("同步项目");
|
|
54751
54809
|
});
|
|
54752
|
-
var syncUpload = new Command("upload").option("-d --dir <dir>", "配置目录").option("-
|
|
54810
|
+
var syncUpload = new Command("upload").option("-d --dir <dir>", "配置目录").option("-c --config <config>", "配置文件的名字", "kevisual.json").option("-f --file <file>", "操作的对应的文件名").description("上传项目").action(async (opts) => {
|
|
54753
54811
|
console.log("上传项目");
|
|
54754
54812
|
const sync = new SyncBase({ dir: opts.dir, baseURL, configFilename: opts.config });
|
|
54755
54813
|
const syncList = await sync.getSyncList({ getFile: true });
|
|
@@ -54759,9 +54817,6 @@ var syncUpload = new Command("upload").option("-d --dir <dir>", "配置目录").
|
|
|
54759
54817
|
const meta = {
|
|
54760
54818
|
...sync.config.metadata
|
|
54761
54819
|
};
|
|
54762
|
-
if (opts.share) {
|
|
54763
|
-
meta.share = opts.share;
|
|
54764
|
-
}
|
|
54765
54820
|
const filepath = sync.getRelativePath(opts.file);
|
|
54766
54821
|
for (const item of syncList) {
|
|
54767
54822
|
if (!item.auth || !item.exist) {
|
|
@@ -54781,7 +54836,7 @@ var syncUpload = new Command("upload").option("-d --dir <dir>", "配置目录").
|
|
|
54781
54836
|
url: item.url,
|
|
54782
54837
|
needHash: true,
|
|
54783
54838
|
hash: item.hash,
|
|
54784
|
-
meta
|
|
54839
|
+
meta: item.metadata ?? meta
|
|
54785
54840
|
});
|
|
54786
54841
|
if (res.code === 200) {
|
|
54787
54842
|
if (res.data?.isNew) {
|
|
@@ -54829,17 +54884,20 @@ var syncDownload = new Command("download").option("-d --dir <dir>", "配置目
|
|
|
54829
54884
|
logger.warn("以下文件未下载", nodonwArr.map((item) => item.key).join(","));
|
|
54830
54885
|
}
|
|
54831
54886
|
});
|
|
54832
|
-
var syncList = new Command("list").option("-d --dir <dir>", "配置目录").option("-c --config <config>", "配置文件的名字", "kevisual.json").description("列出同步列表").action(async (opts) => {
|
|
54887
|
+
var syncList = new Command("list").option("-d --dir <dir>", "配置目录").option("-c --config <config>", "配置文件的名字", "kevisual.json").option("-a --all", "显示所有的文件").description("列出同步列表").action(async (opts) => {
|
|
54833
54888
|
const sync = new SyncBase({ dir: opts.dir, baseURL, configFilename: opts.config });
|
|
54834
54889
|
const syncList2 = await sync.getSyncList();
|
|
54835
54890
|
logger.debug(syncList2);
|
|
54836
54891
|
logger.info(`同步列表
|
|
54837
54892
|
`);
|
|
54838
54893
|
syncList2.forEach((item) => {
|
|
54839
|
-
|
|
54894
|
+
if (opts.all) {
|
|
54895
|
+
logger.info(item);
|
|
54896
|
+
} else
|
|
54897
|
+
logger.info(chalk2.blue(item.key), chalk2.gray(item.type), chalk2.green(item.url));
|
|
54840
54898
|
});
|
|
54841
54899
|
});
|
|
54842
|
-
var syncCreateList = new Command("create").option("-d --dir <dir>", "配置目录").option("-c --config <config>", "配置文件的名字", "kevisual.json").option("-o --output <output>", "输出文件").description("
|
|
54900
|
+
var syncCreateList = new Command("create").option("-d --dir <dir>", "配置目录").option("-c --config <config>", "配置文件的名字", "kevisual.json").option("-o --output <output>", "输出文件").description("创建文件, 获取远程的目录列表,然后创建新的配置文件").action(async (opts) => {
|
|
54843
54901
|
const sync = new SyncBase({ dir: opts.dir, baseURL, configFilename: opts.config });
|
|
54844
54902
|
const syncList2 = await sync.getSyncList();
|
|
54845
54903
|
logger.debug(syncList2);
|
|
@@ -54932,17 +54990,6 @@ command8.addCommand(syncCreateList);
|
|
|
54932
54990
|
command8.addCommand(checkDir);
|
|
54933
54991
|
program.addCommand(command8);
|
|
54934
54992
|
|
|
54935
|
-
// src/query/app-manager/query-app.ts
|
|
54936
|
-
var queryApp = async (params, opts) => {
|
|
54937
|
-
return await query.post({
|
|
54938
|
-
path: "app",
|
|
54939
|
-
key: "getApp",
|
|
54940
|
-
data: {
|
|
54941
|
-
...params
|
|
54942
|
-
}
|
|
54943
|
-
}, opts);
|
|
54944
|
-
};
|
|
54945
|
-
|
|
54946
54993
|
// src/command/app/front-app/index.ts
|
|
54947
54994
|
import fs24 from "fs";
|
|
54948
54995
|
import path17 from "path";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevisual/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.55",
|
|
4
4
|
"description": "envision command tools",
|
|
5
5
|
"main": "dist/app.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@kevisual/load": "^0.0.6",
|
|
49
|
-
"@kevisual/logger": "^0.0.
|
|
49
|
+
"@kevisual/logger": "^0.0.4",
|
|
50
50
|
"@kevisual/query": "0.0.18",
|
|
51
|
-
"@kevisual/query-login": "0.0.
|
|
52
|
-
"@types/bun": "^1.2.
|
|
51
|
+
"@kevisual/query-login": "0.0.6",
|
|
52
|
+
"@types/bun": "^1.2.14",
|
|
53
53
|
"@types/crypto-js": "^4.2.2",
|
|
54
54
|
"@types/jsonwebtoken": "^9.0.9",
|
|
55
55
|
"@types/micromatch": "^4.0.9",
|
|
56
|
-
"@types/node": "^22.15.
|
|
56
|
+
"@types/node": "^22.15.21",
|
|
57
57
|
"chalk": "^5.4.1",
|
|
58
58
|
"commander": "^14.0.0",
|
|
59
59
|
"crypto-js": "^4.2.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"rollup": "^4.41.0",
|
|
67
67
|
"rollup-plugin-dts": "^6.2.1",
|
|
68
68
|
"tar": "^7.4.3",
|
|
69
|
-
"zustand": "^5.0.
|
|
69
|
+
"zustand": "^5.0.5"
|
|
70
70
|
},
|
|
71
71
|
"engines": {
|
|
72
72
|
"node": ">=22.0.0"
|