@kevisual/cli 0.1.21 → 0.1.23
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-opencode.js +910 -866
- package/dist/assistant-server.js +1166 -1065
- package/dist/assistant.js +917 -873
- package/dist/envision.js +86 -57
- package/package.json +3 -3
package/dist/envision.js
CHANGED
|
@@ -4,15 +4,29 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
7
12
|
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
8
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
22
|
for (let key of __getOwnPropNames(mod))
|
|
11
23
|
if (!__hasOwnProp.call(to, key))
|
|
12
24
|
__defProp(to, key, {
|
|
13
|
-
get: (
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
14
26
|
enumerable: true
|
|
15
27
|
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
16
30
|
return to;
|
|
17
31
|
};
|
|
18
32
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
@@ -22490,8 +22504,8 @@ InitEnv.init();
|
|
|
22490
22504
|
var version = useContextKey("version", () => {
|
|
22491
22505
|
let version2 = "0.0.64";
|
|
22492
22506
|
try {
|
|
22493
|
-
if ("0.1.
|
|
22494
|
-
version2 = "0.1.
|
|
22507
|
+
if ("0.1.23")
|
|
22508
|
+
version2 = "0.1.23";
|
|
22495
22509
|
} catch (e) {}
|
|
22496
22510
|
return version2;
|
|
22497
22511
|
});
|
|
@@ -23607,15 +23621,14 @@ var getEnvToken = () => {
|
|
|
23607
23621
|
const envTokne = useKey("KEVISUAL_TOKEN") || "";
|
|
23608
23622
|
return envTokne;
|
|
23609
23623
|
};
|
|
23610
|
-
|
|
23611
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.4.0/node_modules/@inquirer/core/dist/lib/key.js
|
|
23624
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/key.js
|
|
23612
23625
|
var isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
|
|
23613
23626
|
var isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
|
|
23614
23627
|
var isBackspaceKey = (key) => key.name === "backspace";
|
|
23615
23628
|
var isTabKey = (key) => key.name === "tab";
|
|
23616
23629
|
var isNumberKey = (key) => "1234567890".includes(key.name);
|
|
23617
23630
|
var isEnterKey = (key) => key.name === "enter" || key.name === "return";
|
|
23618
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
23631
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/errors.js
|
|
23619
23632
|
class AbortPromptError extends Error {
|
|
23620
23633
|
name = "AbortPromptError";
|
|
23621
23634
|
message = "Prompt was aborted";
|
|
@@ -23641,10 +23654,10 @@ class HookError extends Error {
|
|
|
23641
23654
|
class ValidationError extends Error {
|
|
23642
23655
|
name = "ValidationError";
|
|
23643
23656
|
}
|
|
23644
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
23657
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
23645
23658
|
import { AsyncResource as AsyncResource2 } from "node:async_hooks";
|
|
23646
23659
|
|
|
23647
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
23660
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/hook-engine.js
|
|
23648
23661
|
import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
|
|
23649
23662
|
var hookStorage = new AsyncLocalStorage;
|
|
23650
23663
|
function createStore(rl) {
|
|
@@ -23749,7 +23762,7 @@ var effectScheduler = {
|
|
|
23749
23762
|
}
|
|
23750
23763
|
};
|
|
23751
23764
|
|
|
23752
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
23765
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/use-state.js
|
|
23753
23766
|
function useState(defaultValue) {
|
|
23754
23767
|
return withPointer((pointer) => {
|
|
23755
23768
|
const setState = AsyncResource2.bind(function setState2(newValue) {
|
|
@@ -23767,7 +23780,7 @@ function useState(defaultValue) {
|
|
|
23767
23780
|
});
|
|
23768
23781
|
}
|
|
23769
23782
|
|
|
23770
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
23783
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/use-effect.js
|
|
23771
23784
|
function useEffect(cb, depArray) {
|
|
23772
23785
|
withPointer((pointer) => {
|
|
23773
23786
|
const oldDeps = pointer.get();
|
|
@@ -23779,7 +23792,7 @@ function useEffect(cb, depArray) {
|
|
|
23779
23792
|
});
|
|
23780
23793
|
}
|
|
23781
23794
|
|
|
23782
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
23795
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/theme.js
|
|
23783
23796
|
import { styleText } from "node:util";
|
|
23784
23797
|
|
|
23785
23798
|
// node_modules/.pnpm/@inquirer+figures@2.0.3/node_modules/@inquirer/figures/dist/index.js
|
|
@@ -24071,7 +24084,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
|
24071
24084
|
var dist_default = figures;
|
|
24072
24085
|
var replacements = Object.entries(specialMainSymbols);
|
|
24073
24086
|
|
|
24074
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
24087
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/theme.js
|
|
24075
24088
|
var defaultTheme = {
|
|
24076
24089
|
prefix: {
|
|
24077
24090
|
idle: styleText("blue", "?"),
|
|
@@ -24092,7 +24105,7 @@ var defaultTheme = {
|
|
|
24092
24105
|
}
|
|
24093
24106
|
};
|
|
24094
24107
|
|
|
24095
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
24108
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/make-theme.js
|
|
24096
24109
|
function isPlainObject(value) {
|
|
24097
24110
|
if (typeof value !== "object" || value === null)
|
|
24098
24111
|
return false;
|
|
@@ -24120,7 +24133,7 @@ function makeTheme(...themes) {
|
|
|
24120
24133
|
return deepMerge(...themesToMerge);
|
|
24121
24134
|
}
|
|
24122
24135
|
|
|
24123
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
24136
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/use-prefix.js
|
|
24124
24137
|
function usePrefix({ status = "idle", theme }) {
|
|
24125
24138
|
const [showLoader, setShowLoader] = useState(false);
|
|
24126
24139
|
const [tick, setTick] = useState(0);
|
|
@@ -24150,7 +24163,7 @@ function usePrefix({ status = "idle", theme }) {
|
|
|
24150
24163
|
const iconName = status === "loading" ? "idle" : status;
|
|
24151
24164
|
return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
|
|
24152
24165
|
}
|
|
24153
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
24166
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/use-memo.js
|
|
24154
24167
|
function useMemo(fn, dependencies) {
|
|
24155
24168
|
return withPointer((pointer) => {
|
|
24156
24169
|
const prev = pointer.get();
|
|
@@ -24162,11 +24175,11 @@ function useMemo(fn, dependencies) {
|
|
|
24162
24175
|
return prev.value;
|
|
24163
24176
|
});
|
|
24164
24177
|
}
|
|
24165
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
24178
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/use-ref.js
|
|
24166
24179
|
function useRef(val) {
|
|
24167
24180
|
return useState({ current: val })[0];
|
|
24168
24181
|
}
|
|
24169
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
24182
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/use-keypress.js
|
|
24170
24183
|
function useKeypress(userHandler) {
|
|
24171
24184
|
const signal = useRef(userHandler);
|
|
24172
24185
|
signal.current = userHandler;
|
|
@@ -24184,7 +24197,7 @@ function useKeypress(userHandler) {
|
|
|
24184
24197
|
};
|
|
24185
24198
|
}, []);
|
|
24186
24199
|
}
|
|
24187
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
24200
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/utils.js
|
|
24188
24201
|
var import_cli_width = __toESM(require_cli_width(), 1);
|
|
24189
24202
|
|
|
24190
24203
|
// node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
|
|
@@ -24528,7 +24541,7 @@ function wrapAnsi(string, columns, options) {
|
|
|
24528
24541
|
`);
|
|
24529
24542
|
}
|
|
24530
24543
|
|
|
24531
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
24544
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/utils.js
|
|
24532
24545
|
function breakLines(content, width) {
|
|
24533
24546
|
return content.split(`
|
|
24534
24547
|
`).flatMap((line) => wrapAnsi(line, width, { trim: false, hard: true }).split(`
|
|
@@ -24539,7 +24552,7 @@ function readlineWidth() {
|
|
|
24539
24552
|
return import_cli_width.default({ defaultWidth: 80, output: readline().output });
|
|
24540
24553
|
}
|
|
24541
24554
|
|
|
24542
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
24555
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
|
|
24543
24556
|
function usePointerPosition({ active, renderedItems, pageSize, loop }) {
|
|
24544
24557
|
const state = useRef({
|
|
24545
24558
|
lastPointer: active,
|
|
@@ -24605,7 +24618,7 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
|
|
|
24605
24618
|
return pageBuffer.filter((line) => typeof line === "string").join(`
|
|
24606
24619
|
`);
|
|
24607
24620
|
}
|
|
24608
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
24621
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
24609
24622
|
var import_mute_stream = __toESM(require_lib(), 1);
|
|
24610
24623
|
import * as readline2 from "node:readline";
|
|
24611
24624
|
import { AsyncResource as AsyncResource3 } from "node:async_hooks";
|
|
@@ -24818,7 +24831,7 @@ var {
|
|
|
24818
24831
|
unload
|
|
24819
24832
|
} = signalExitWrap(processOk(process3) ? new SignalExit(process3) : new SignalExitFallback);
|
|
24820
24833
|
|
|
24821
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
24834
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
24822
24835
|
import { stripVTControlCharacters } from "node:util";
|
|
24823
24836
|
|
|
24824
24837
|
// node_modules/.pnpm/@inquirer+ansi@2.0.3/node_modules/@inquirer/ansi/dist/index.js
|
|
@@ -24837,7 +24850,7 @@ var cursorTo = (x, y) => {
|
|
|
24837
24850
|
var eraseLine = ESC2 + "2K";
|
|
24838
24851
|
var eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "";
|
|
24839
24852
|
|
|
24840
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
24853
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/screen-manager.js
|
|
24841
24854
|
var height = (content) => content.split(`
|
|
24842
24855
|
`).length;
|
|
24843
24856
|
var lastLine = (content) => content.split(`
|
|
@@ -24902,7 +24915,7 @@ class ScreenManager {
|
|
|
24902
24915
|
}
|
|
24903
24916
|
}
|
|
24904
24917
|
|
|
24905
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
24918
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
|
|
24906
24919
|
class PromisePolyfill extends Promise {
|
|
24907
24920
|
static withResolver() {
|
|
24908
24921
|
let resolve;
|
|
@@ -24915,7 +24928,7 @@ class PromisePolyfill extends Promise {
|
|
|
24915
24928
|
}
|
|
24916
24929
|
}
|
|
24917
24930
|
|
|
24918
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
24931
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/create-prompt.js
|
|
24919
24932
|
var nativeSetImmediate = globalThis.setImmediate;
|
|
24920
24933
|
function getCallSites() {
|
|
24921
24934
|
const _prepareStackTrace = Error.prepareStackTrace;
|
|
@@ -25010,7 +25023,7 @@ function createPrompt(view) {
|
|
|
25010
25023
|
};
|
|
25011
25024
|
return prompt;
|
|
25012
25025
|
}
|
|
25013
|
-
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.
|
|
25026
|
+
// node_modules/.pnpm/@inquirer+core@11.1.5_@types+node@25.5.0/node_modules/@inquirer/core/dist/lib/Separator.js
|
|
25014
25027
|
import { styleText as styleText2 } from "node:util";
|
|
25015
25028
|
class Separator {
|
|
25016
25029
|
separator = styleText2("dim", Array.from({ length: 15 }).join(dist_default.line));
|
|
@@ -25024,7 +25037,7 @@ class Separator {
|
|
|
25024
25037
|
return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
|
|
25025
25038
|
}
|
|
25026
25039
|
}
|
|
25027
|
-
// node_modules/.pnpm/@inquirer+confirm@6.0.8_@types+node@25.
|
|
25040
|
+
// node_modules/.pnpm/@inquirer+confirm@6.0.8_@types+node@25.5.0/node_modules/@inquirer/confirm/dist/index.js
|
|
25028
25041
|
function getBooleanValue(value, defaultValue) {
|
|
25029
25042
|
let answer = defaultValue !== false;
|
|
25030
25043
|
if (/^(y|yes)/i.test(value))
|
|
@@ -25069,7 +25082,7 @@ var dist_default4 = createPrompt((config, done) => {
|
|
|
25069
25082
|
const message = theme.style.message(config.message, status);
|
|
25070
25083
|
return `${prefix} ${message}${defaultValue} ${formattedValue}`;
|
|
25071
25084
|
});
|
|
25072
|
-
// node_modules/.pnpm/@inquirer+input@5.0.8_@types+node@25.
|
|
25085
|
+
// node_modules/.pnpm/@inquirer+input@5.0.8_@types+node@25.5.0/node_modules/@inquirer/input/dist/index.js
|
|
25073
25086
|
var inputTheme = {
|
|
25074
25087
|
validationFailureMode: "keep"
|
|
25075
25088
|
};
|
|
@@ -25153,7 +25166,7 @@ var dist_default5 = createPrompt((config, done) => {
|
|
|
25153
25166
|
error
|
|
25154
25167
|
];
|
|
25155
25168
|
});
|
|
25156
|
-
// node_modules/.pnpm/@inquirer+select@5.1.0_@types+node@25.
|
|
25169
|
+
// node_modules/.pnpm/@inquirer+select@5.1.0_@types+node@25.5.0/node_modules/@inquirer/select/dist/index.js
|
|
25157
25170
|
import { styleText as styleText3 } from "node:util";
|
|
25158
25171
|
var selectTheme = {
|
|
25159
25172
|
icon: { cursor: dist_default.pointer },
|
|
@@ -25936,7 +25949,7 @@ class BaseQuery {
|
|
|
25936
25949
|
}
|
|
25937
25950
|
}
|
|
25938
25951
|
|
|
25939
|
-
// node_modules/.pnpm/@kevisual+api@0.0.
|
|
25952
|
+
// node_modules/.pnpm/@kevisual+api@0.0.64_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-login/login-cache.ts
|
|
25940
25953
|
var defaultCacheData = {
|
|
25941
25954
|
loginUsers: [],
|
|
25942
25955
|
user: undefined,
|
|
@@ -26507,7 +26520,7 @@ class BaseLoad3 {
|
|
|
26507
26520
|
// node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.mjs
|
|
26508
26521
|
var import__2 = __toESM(require_eventemitter3(), 1);
|
|
26509
26522
|
|
|
26510
|
-
// node_modules/.pnpm/@kevisual+api@0.0.
|
|
26523
|
+
// node_modules/.pnpm/@kevisual+api@0.0.64_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-login/query-login.ts
|
|
26511
26524
|
class QueryLogin extends BaseQuery {
|
|
26512
26525
|
cacheStore;
|
|
26513
26526
|
isBrowser;
|
|
@@ -26916,7 +26929,7 @@ class QueryLogin extends BaseQuery {
|
|
|
26916
26929
|
}
|
|
26917
26930
|
}
|
|
26918
26931
|
|
|
26919
|
-
// node_modules/.pnpm/@kevisual+api@0.0.
|
|
26932
|
+
// node_modules/.pnpm/@kevisual+api@0.0.64_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-login/login-node-cache.ts
|
|
26920
26933
|
import { homedir } from "node:os";
|
|
26921
26934
|
import { join, dirname } from "node:path";
|
|
26922
26935
|
import fs4 from "node:fs";
|
|
@@ -27060,7 +27073,7 @@ class LoginNodeCache {
|
|
|
27060
27073
|
}
|
|
27061
27074
|
}
|
|
27062
27075
|
|
|
27063
|
-
// node_modules/.pnpm/@kevisual+api@0.0.
|
|
27076
|
+
// node_modules/.pnpm/@kevisual+api@0.0.64_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-login/query-login-node.ts
|
|
27064
27077
|
var cache = new LoginNodeCache;
|
|
27065
27078
|
|
|
27066
27079
|
class QueryLoginNode extends QueryLogin {
|
|
@@ -30197,7 +30210,9 @@ var DEFAULT_IGNORE = [
|
|
|
30197
30210
|
".git/**",
|
|
30198
30211
|
".next/**",
|
|
30199
30212
|
".astro/**",
|
|
30200
|
-
".pack-dist/**"
|
|
30213
|
+
".pack-dist/**",
|
|
30214
|
+
"dist/**",
|
|
30215
|
+
".swc/**"
|
|
30201
30216
|
];
|
|
30202
30217
|
|
|
30203
30218
|
class SyncBase {
|
|
@@ -30449,8 +30464,9 @@ import path10 from "node:path";
|
|
|
30449
30464
|
var command7 = new Command("sync").option("-d --dir <dir>").description("同步项目").action(() => {
|
|
30450
30465
|
console.log("同步项目");
|
|
30451
30466
|
});
|
|
30452
|
-
var syncUpload = new Command("upload").option("-d --dir <dir>", "配置目录").option("-c --config <config>", "配置文件的名字", "kevisual.json").option("-f --file <file>", "操作的对应的文件名").description("上传项目, 上传需要和registry的地址同步。").action(async (opts) => {
|
|
30467
|
+
var syncUpload = new Command("upload").option("-d --dir <dir>", "配置目录").option("-c --config <config>", "配置文件的名字", "kevisual.json").option("-f --file <file>", "操作的对应的文件名").option("-l --list", "显示上传列表,不上传文件").description("上传项目, 上传需要和registry的地址同步。").action(async (opts) => {
|
|
30453
30468
|
console.log("上传项目");
|
|
30469
|
+
const isUpload = opts.list ? false : true;
|
|
30454
30470
|
const sync = new SyncBase({ dir: opts.dir, baseURL, configFilename: opts.config });
|
|
30455
30471
|
const syncList = await sync.getSyncList({ getFile: true });
|
|
30456
30472
|
logger.debug(syncList);
|
|
@@ -30485,6 +30501,10 @@ var syncUpload = new Command("upload").option("-d --dir <dir>", "配置目录").
|
|
|
30485
30501
|
if (filepath && item.filepath !== filepath.absolute) {
|
|
30486
30502
|
continue;
|
|
30487
30503
|
}
|
|
30504
|
+
if (!isUpload) {
|
|
30505
|
+
console.log("上传列表", item.key, chalk2.green(item.url));
|
|
30506
|
+
continue;
|
|
30507
|
+
}
|
|
30488
30508
|
const res = await upload({
|
|
30489
30509
|
token: token2,
|
|
30490
30510
|
file: fs14.readFileSync(item.filepath),
|
|
@@ -30546,9 +30566,10 @@ var syncDownload = new Command("download").option("-d --dir <dir>", "配置目
|
|
|
30546
30566
|
logger.warn("以下文件未下载", nodonwArr.map((item) => item.key).join(","));
|
|
30547
30567
|
}
|
|
30548
30568
|
});
|
|
30549
|
-
var syncList = new Command("list").option("-d --dir <dir>", "配置目录").option("-c --config <config>", "配置文件的名字", "kevisual.json").option("-a --all", "显示所有的文件").description("列出同步列表").action(async (opts) => {
|
|
30569
|
+
var syncList = new Command("list").option("-d --dir <dir>", "配置目录").option("-c --config <config>", "配置文件的名字", "kevisual.json").option("-a --all", "显示所有的文件").option("-l --local", "显示本地的文件列表").description("列出同步列表").action(async (opts) => {
|
|
30550
30570
|
const sync = new SyncBase({ dir: opts.dir, baseURL, configFilename: opts.config });
|
|
30551
|
-
|
|
30571
|
+
let getLocalFile = opts?.local ? true : false;
|
|
30572
|
+
const syncList2 = await sync.getSyncList({ getFile: true, getLocalFile });
|
|
30552
30573
|
logger.debug(syncList2);
|
|
30553
30574
|
logger.info(`同步列表
|
|
30554
30575
|
`);
|
|
@@ -30854,7 +30875,7 @@ var download = new Command("download").option("-d --dir <dir>", "配置目录").
|
|
|
30854
30875
|
command8.addCommand(download);
|
|
30855
30876
|
program.addCommand(command8);
|
|
30856
30877
|
|
|
30857
|
-
// node_modules/.pnpm/@kevisual+api@0.0.
|
|
30878
|
+
// node_modules/.pnpm/@kevisual+api@0.0.64_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/dist/query-config.js
|
|
30858
30879
|
var isTextForContentType3 = (contentType) => {
|
|
30859
30880
|
if (!contentType)
|
|
30860
30881
|
return false;
|
|
@@ -31057,6 +31078,10 @@ class Query3 {
|
|
|
31057
31078
|
});
|
|
31058
31079
|
}
|
|
31059
31080
|
}
|
|
31081
|
+
const headers2 = req.headers || {};
|
|
31082
|
+
if (options?.token && !headers2["Authorization"]) {
|
|
31083
|
+
headers2["Authorization"] = `Bearer ${options.token}`;
|
|
31084
|
+
}
|
|
31060
31085
|
} catch (e) {
|
|
31061
31086
|
console.error("request beforeFn error", e, req);
|
|
31062
31087
|
return wrapperError3({
|
|
@@ -31117,20 +31142,20 @@ class Query3 {
|
|
|
31117
31142
|
this.afterResponse = fn;
|
|
31118
31143
|
}
|
|
31119
31144
|
async fetchText(urlOrOptions, options) {
|
|
31120
|
-
let _options = { ...options };
|
|
31145
|
+
let _options = { method: "GET", ...options };
|
|
31121
31146
|
if (typeof urlOrOptions === "string" && !_options.url) {
|
|
31122
31147
|
_options.url = urlOrOptions;
|
|
31123
31148
|
}
|
|
31124
31149
|
if (typeof urlOrOptions === "object") {
|
|
31125
31150
|
_options = { ...urlOrOptions, ..._options };
|
|
31126
31151
|
}
|
|
31152
|
+
const headers = { ...this.headers, ..._options.headers };
|
|
31153
|
+
if (options?.token && !headers["Authorization"] && _options.method !== "GET") {
|
|
31154
|
+
headers["Authorization"] = `Bearer ${options.token}`;
|
|
31155
|
+
}
|
|
31127
31156
|
const res = await adapter3({
|
|
31128
|
-
method: "GET",
|
|
31129
31157
|
..._options,
|
|
31130
|
-
headers
|
|
31131
|
-
...this.headers,
|
|
31132
|
-
..._options?.headers || {}
|
|
31133
|
-
}
|
|
31158
|
+
headers
|
|
31134
31159
|
});
|
|
31135
31160
|
if (res && !res.code) {
|
|
31136
31161
|
return {
|
|
@@ -31284,7 +31309,7 @@ command9.addCommand(updateCommand);
|
|
|
31284
31309
|
command9.addCommand(deleteCommand);
|
|
31285
31310
|
program.addCommand(command9);
|
|
31286
31311
|
|
|
31287
|
-
// node_modules/.pnpm/@kevisual+api@0.0.
|
|
31312
|
+
// node_modules/.pnpm/@kevisual+api@0.0.64_@types+react@19.2.10_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/dist/query-secret.js
|
|
31288
31313
|
var isTextForContentType4 = (contentType) => {
|
|
31289
31314
|
if (!contentType)
|
|
31290
31315
|
return false;
|
|
@@ -31487,6 +31512,10 @@ class Query4 {
|
|
|
31487
31512
|
});
|
|
31488
31513
|
}
|
|
31489
31514
|
}
|
|
31515
|
+
const headers2 = req.headers || {};
|
|
31516
|
+
if (options?.token && !headers2["Authorization"]) {
|
|
31517
|
+
headers2["Authorization"] = `Bearer ${options.token}`;
|
|
31518
|
+
}
|
|
31490
31519
|
} catch (e) {
|
|
31491
31520
|
console.error("request beforeFn error", e, req);
|
|
31492
31521
|
return wrapperError4({
|
|
@@ -31547,20 +31576,20 @@ class Query4 {
|
|
|
31547
31576
|
this.afterResponse = fn;
|
|
31548
31577
|
}
|
|
31549
31578
|
async fetchText(urlOrOptions, options) {
|
|
31550
|
-
let _options = { ...options };
|
|
31579
|
+
let _options = { method: "GET", ...options };
|
|
31551
31580
|
if (typeof urlOrOptions === "string" && !_options.url) {
|
|
31552
31581
|
_options.url = urlOrOptions;
|
|
31553
31582
|
}
|
|
31554
31583
|
if (typeof urlOrOptions === "object") {
|
|
31555
31584
|
_options = { ...urlOrOptions, ..._options };
|
|
31556
31585
|
}
|
|
31586
|
+
const headers = { ...this.headers, ..._options.headers };
|
|
31587
|
+
if (options?.token && !headers["Authorization"] && _options.method !== "GET") {
|
|
31588
|
+
headers["Authorization"] = `Bearer ${options.token}`;
|
|
31589
|
+
}
|
|
31557
31590
|
const res = await adapter4({
|
|
31558
|
-
method: "GET",
|
|
31559
31591
|
..._options,
|
|
31560
|
-
headers
|
|
31561
|
-
...this.headers,
|
|
31562
|
-
..._options?.headers || {}
|
|
31563
|
-
}
|
|
31592
|
+
headers
|
|
31564
31593
|
});
|
|
31565
31594
|
if (res && !res.code) {
|
|
31566
31595
|
return {
|
|
@@ -34601,22 +34630,22 @@ var getJWKS = new Command("get").description("获取 JWKS 内容").option("-d ,
|
|
|
34601
34630
|
jwksCmd.addCommand(getJWKS);
|
|
34602
34631
|
program.addCommand(jwksCmd);
|
|
34603
34632
|
|
|
34604
|
-
// node_modules/.pnpm/@kevisual+cnb@0.0.
|
|
34633
|
+
// node_modules/.pnpm/@kevisual+cnb@0.0.45_dotenv@17.3.1_idb-keyval@6.2.2_ioredis@5.9.3/node_modules/@kevisual/cnb/dist/keep.js
|
|
34605
34634
|
import { createRequire as createRequire3 } from "node:module";
|
|
34606
34635
|
var __create3 = Object.create;
|
|
34607
34636
|
var __getProtoOf3 = Object.getPrototypeOf;
|
|
34608
34637
|
var __defProp4 = Object.defineProperty;
|
|
34609
34638
|
var __getOwnPropNames3 = Object.getOwnPropertyNames;
|
|
34610
34639
|
var __hasOwnProp3 = Object.prototype.hasOwnProperty;
|
|
34611
|
-
function
|
|
34640
|
+
function __accessProp2(key) {
|
|
34612
34641
|
return this[key];
|
|
34613
34642
|
}
|
|
34614
|
-
var
|
|
34615
|
-
var
|
|
34643
|
+
var __toESMCache_node2;
|
|
34644
|
+
var __toESMCache_esm2;
|
|
34616
34645
|
var __toESM3 = (mod, isNodeMode, target) => {
|
|
34617
34646
|
var canCache = mod != null && typeof mod === "object";
|
|
34618
34647
|
if (canCache) {
|
|
34619
|
-
var cache3 = isNodeMode ?
|
|
34648
|
+
var cache3 = isNodeMode ? __toESMCache_node2 ??= new WeakMap : __toESMCache_esm2 ??= new WeakMap;
|
|
34620
34649
|
var cached = cache3.get(mod);
|
|
34621
34650
|
if (cached)
|
|
34622
34651
|
return cached;
|
|
@@ -34626,7 +34655,7 @@ var __toESM3 = (mod, isNodeMode, target) => {
|
|
|
34626
34655
|
for (let key of __getOwnPropNames3(mod))
|
|
34627
34656
|
if (!__hasOwnProp3.call(to, key))
|
|
34628
34657
|
__defProp4(to, key, {
|
|
34629
|
-
get:
|
|
34658
|
+
get: __accessProp2.bind(mod, key),
|
|
34630
34659
|
enumerable: true
|
|
34631
34660
|
});
|
|
34632
34661
|
if (canCache)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevisual/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"description": "envision 命令行工具",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"basename": "/root/cli",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@kevisual/api": "^0.0.64",
|
|
65
|
-
"@kevisual/cnb": "^0.0.
|
|
65
|
+
"@kevisual/cnb": "^0.0.45",
|
|
66
66
|
"@kevisual/dts": "^0.0.4",
|
|
67
67
|
"@kevisual/load": "^0.0.6",
|
|
68
68
|
"@kevisual/logger": "^0.0.4",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@types/crypto-js": "^4.2.2",
|
|
72
72
|
"@types/jsonwebtoken": "^9.0.10",
|
|
73
73
|
"@types/micromatch": "^4.0.10",
|
|
74
|
-
"@types/node": "^25.
|
|
74
|
+
"@types/node": "^25.5.0",
|
|
75
75
|
"@types/semver": "^7.7.1",
|
|
76
76
|
"chalk": "^5.6.2",
|
|
77
77
|
"commander": "^14.0.3",
|