@kevisual/cli 0.0.67 → 0.0.68
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 +31 -7
- package/dist/assistant.js +8 -6
- package/dist/envision.js +2 -2
- package/package.json +1 -1
package/dist/assistant-server.js
CHANGED
|
@@ -67103,7 +67103,7 @@ var wsProxy = (server, config2) => {
|
|
|
67103
67103
|
wssApp.upgrade(request, socket, head);
|
|
67104
67104
|
});
|
|
67105
67105
|
};
|
|
67106
|
-
// ../node_modules/.pnpm/@kevisual+local-app-manager@0.1.
|
|
67106
|
+
// ../node_modules/.pnpm/@kevisual+local-app-manager@0.1.29_supports-color@10.2.2/node_modules/@kevisual/local-app-manager/dist/manager.mjs
|
|
67107
67107
|
var exports_manager = {};
|
|
67108
67108
|
__export(exports_manager, {
|
|
67109
67109
|
onAppShowInfo: () => onAppShowInfo,
|
|
@@ -67180,7 +67180,7 @@ var getConfigFile = (opts) => {
|
|
|
67180
67180
|
return "";
|
|
67181
67181
|
};
|
|
67182
67182
|
|
|
67183
|
-
// ../node_modules/.pnpm/@kevisual+local-app-manager@0.1.
|
|
67183
|
+
// ../node_modules/.pnpm/@kevisual+local-app-manager@0.1.29_supports-color@10.2.2/node_modules/@kevisual/local-app-manager/dist/manager.mjs
|
|
67184
67184
|
import path$1 from "node:path";
|
|
67185
67185
|
import fs$4 from "node:fs";
|
|
67186
67186
|
import { fork } from "node:child_process";
|
|
@@ -74113,7 +74113,9 @@ var installAppFromKey = async (key, _appPath) => {
|
|
|
74113
74113
|
var getAppPathKeys = async (_appPath) => {
|
|
74114
74114
|
const directory = path$1.resolve(_appPath);
|
|
74115
74115
|
const root3 = directory;
|
|
74116
|
-
const
|
|
74116
|
+
const path1 = path$1.join(directory, "*/package.json");
|
|
74117
|
+
const path22 = path$1.join(directory, "*/*/package.json");
|
|
74118
|
+
const appsPackages = await glob([path1, path22], {
|
|
74117
74119
|
cwd: root3,
|
|
74118
74120
|
onlyFiles: true,
|
|
74119
74121
|
absolute: false,
|
|
@@ -74135,7 +74137,7 @@ var clearMicroApp = (link) => {
|
|
|
74135
74137
|
console.error(`Failed to unload module ${link}:`, error2);
|
|
74136
74138
|
}
|
|
74137
74139
|
};
|
|
74138
|
-
// ../node_modules/.pnpm/@kevisual+local-app-manager@0.1.
|
|
74140
|
+
// ../node_modules/.pnpm/@kevisual+local-app-manager@0.1.29_supports-color@10.2.2/node_modules/@kevisual/local-app-manager/dist/pm2.mjs
|
|
74139
74141
|
import pm22 from "pm2";
|
|
74140
74142
|
import { promisify as promisify2 } from "node:util";
|
|
74141
74143
|
var disconnect = promisify2(pm22.disconnect).bind(pm22);
|
|
@@ -80490,7 +80492,7 @@ app.route({
|
|
|
80490
80492
|
// src/routes/index.ts
|
|
80491
80493
|
import os4 from "node:os";
|
|
80492
80494
|
|
|
80493
|
-
// ../node_modules/.pnpm/lru-cache@11.2.
|
|
80495
|
+
// ../node_modules/.pnpm/lru-cache@11.2.4/node_modules/lru-cache/dist/esm/index.js
|
|
80494
80496
|
var defaultPerf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
|
|
80495
80497
|
var warned = new Set;
|
|
80496
80498
|
var PROCESS = typeof process === "object" && !!process ? process : {};
|
|
@@ -80614,6 +80616,7 @@ class LRUCache {
|
|
|
80614
80616
|
#sizes;
|
|
80615
80617
|
#starts;
|
|
80616
80618
|
#ttls;
|
|
80619
|
+
#autopurgeTimers;
|
|
80617
80620
|
#hasDispose;
|
|
80618
80621
|
#hasFetchMethod;
|
|
80619
80622
|
#hasDisposeAfter;
|
|
@@ -80622,6 +80625,7 @@ class LRUCache {
|
|
|
80622
80625
|
return {
|
|
80623
80626
|
starts: c.#starts,
|
|
80624
80627
|
ttls: c.#ttls,
|
|
80628
|
+
autopurgeTimers: c.#autopurgeTimers,
|
|
80625
80629
|
sizes: c.#sizes,
|
|
80626
80630
|
keyMap: c.#keyMap,
|
|
80627
80631
|
keyList: c.#keyList,
|
|
@@ -80782,10 +80786,16 @@ class LRUCache {
|
|
|
80782
80786
|
const starts = new ZeroArray(this.#max);
|
|
80783
80787
|
this.#ttls = ttls;
|
|
80784
80788
|
this.#starts = starts;
|
|
80789
|
+
const purgeTimers = this.ttlAutopurge ? new Array(this.#max) : undefined;
|
|
80790
|
+
this.#autopurgeTimers = purgeTimers;
|
|
80785
80791
|
this.#setItemTTL = (index, ttl, start3 = this.#perf.now()) => {
|
|
80786
80792
|
starts[index] = ttl !== 0 ? start3 : 0;
|
|
80787
80793
|
ttls[index] = ttl;
|
|
80788
|
-
if (
|
|
80794
|
+
if (purgeTimers?.[index]) {
|
|
80795
|
+
clearTimeout(purgeTimers[index]);
|
|
80796
|
+
purgeTimers[index] = undefined;
|
|
80797
|
+
}
|
|
80798
|
+
if (ttl !== 0 && purgeTimers) {
|
|
80789
80799
|
const t = setTimeout(() => {
|
|
80790
80800
|
if (this.#isStale(index)) {
|
|
80791
80801
|
this.#delete(this.#keyList[index], "expire");
|
|
@@ -80794,6 +80804,7 @@ class LRUCache {
|
|
|
80794
80804
|
if (t.unref) {
|
|
80795
80805
|
t.unref();
|
|
80796
80806
|
}
|
|
80807
|
+
purgeTimers[index] = t;
|
|
80797
80808
|
}
|
|
80798
80809
|
};
|
|
80799
80810
|
this.#updateItemAge = (index) => {
|
|
@@ -81206,6 +81217,10 @@ class LRUCache {
|
|
|
81206
81217
|
}
|
|
81207
81218
|
}
|
|
81208
81219
|
this.#removeItemSize(head);
|
|
81220
|
+
if (this.#autopurgeTimers?.[head]) {
|
|
81221
|
+
clearTimeout(this.#autopurgeTimers[head]);
|
|
81222
|
+
this.#autopurgeTimers[head] = undefined;
|
|
81223
|
+
}
|
|
81209
81224
|
if (free) {
|
|
81210
81225
|
this.#keyList[head] = undefined;
|
|
81211
81226
|
this.#valList[head] = undefined;
|
|
@@ -81540,6 +81555,10 @@ class LRUCache {
|
|
|
81540
81555
|
if (this.#size !== 0) {
|
|
81541
81556
|
const index = this.#keyMap.get(k);
|
|
81542
81557
|
if (index !== undefined) {
|
|
81558
|
+
if (this.#autopurgeTimers?.[index]) {
|
|
81559
|
+
clearTimeout(this.#autopurgeTimers?.[index]);
|
|
81560
|
+
this.#autopurgeTimers[index] = undefined;
|
|
81561
|
+
}
|
|
81543
81562
|
deleted = true;
|
|
81544
81563
|
if (this.#size === 1) {
|
|
81545
81564
|
this.#clear(reason);
|
|
@@ -81607,6 +81626,11 @@ class LRUCache {
|
|
|
81607
81626
|
if (this.#ttls && this.#starts) {
|
|
81608
81627
|
this.#ttls.fill(0);
|
|
81609
81628
|
this.#starts.fill(0);
|
|
81629
|
+
for (const t of this.#autopurgeTimers ?? []) {
|
|
81630
|
+
if (t !== undefined)
|
|
81631
|
+
clearTimeout(t);
|
|
81632
|
+
}
|
|
81633
|
+
this.#autopurgeTimers?.fill(undefined);
|
|
81610
81634
|
}
|
|
81611
81635
|
if (this.#sizes) {
|
|
81612
81636
|
this.#sizes.fill(0);
|
|
@@ -81938,7 +81962,7 @@ program.description("启动服务").option("-d, --daemon", "是否以守护进
|
|
|
81938
81962
|
console.log("启动服务", source_default.green(assistantConfig2.configDir));
|
|
81939
81963
|
const config3 = assistantConfig2.getCacheAssistantConfig();
|
|
81940
81964
|
const listenPort = options.port || config3?.server?.port;
|
|
81941
|
-
const listenPath = config3?.server?.path || "
|
|
81965
|
+
const listenPath = config3?.server?.path || "::";
|
|
81942
81966
|
const server = await runServer(listenPort, listenPath);
|
|
81943
81967
|
} else {
|
|
81944
81968
|
console.log("请使用 -s 参数启动服务");
|
package/dist/assistant.js
CHANGED
|
@@ -41648,7 +41648,7 @@ var import_websocket_server = __toESM(require_websocket_server(), 1);
|
|
|
41648
41648
|
var wss = new import_websocket_server.default({
|
|
41649
41649
|
noServer: true
|
|
41650
41650
|
});
|
|
41651
|
-
// ../node_modules/.pnpm/@kevisual+local-app-manager@0.1.
|
|
41651
|
+
// ../node_modules/.pnpm/@kevisual+local-app-manager@0.1.29_supports-color@10.2.2/node_modules/@kevisual/local-app-manager/dist/manager.mjs
|
|
41652
41652
|
var exports_manager = {};
|
|
41653
41653
|
__export(exports_manager, {
|
|
41654
41654
|
onAppShowInfo: () => onAppShowInfo,
|
|
@@ -41725,7 +41725,7 @@ var getConfigFile = (opts) => {
|
|
|
41725
41725
|
return "";
|
|
41726
41726
|
};
|
|
41727
41727
|
|
|
41728
|
-
// ../node_modules/.pnpm/@kevisual+local-app-manager@0.1.
|
|
41728
|
+
// ../node_modules/.pnpm/@kevisual+local-app-manager@0.1.29_supports-color@10.2.2/node_modules/@kevisual/local-app-manager/dist/manager.mjs
|
|
41729
41729
|
import path$1 from "node:path";
|
|
41730
41730
|
import fs$4 from "node:fs";
|
|
41731
41731
|
import { fork } from "node:child_process";
|
|
@@ -48658,7 +48658,9 @@ var installAppFromKey = async (key, _appPath) => {
|
|
|
48658
48658
|
var getAppPathKeys = async (_appPath) => {
|
|
48659
48659
|
const directory = path$1.resolve(_appPath);
|
|
48660
48660
|
const root2 = directory;
|
|
48661
|
-
const
|
|
48661
|
+
const path1 = path$1.join(directory, "*/package.json");
|
|
48662
|
+
const path22 = path$1.join(directory, "*/*/package.json");
|
|
48663
|
+
const appsPackages = await glob([path1, path22], {
|
|
48662
48664
|
cwd: root2,
|
|
48663
48665
|
onlyFiles: true,
|
|
48664
48666
|
absolute: false,
|
|
@@ -48680,7 +48682,7 @@ var clearMicroApp = (link) => {
|
|
|
48680
48682
|
console.error(`Failed to unload module ${link}:`, error2);
|
|
48681
48683
|
}
|
|
48682
48684
|
};
|
|
48683
|
-
// ../node_modules/.pnpm/@kevisual+local-app-manager@0.1.
|
|
48685
|
+
// ../node_modules/.pnpm/@kevisual+local-app-manager@0.1.29_supports-color@10.2.2/node_modules/@kevisual/local-app-manager/dist/pm2.mjs
|
|
48684
48686
|
import pm22 from "pm2";
|
|
48685
48687
|
import { promisify as promisify2 } from "node:util";
|
|
48686
48688
|
var disconnect = promisify2(pm22.disconnect).bind(pm22);
|
|
@@ -48984,8 +48986,8 @@ var assistantConfig2 = new AssistantConfig({
|
|
|
48984
48986
|
import fs7 from "fs";
|
|
48985
48987
|
var version = "0.0.1";
|
|
48986
48988
|
try {
|
|
48987
|
-
if ("0.0.
|
|
48988
|
-
version = "0.0.
|
|
48989
|
+
if ("0.0.6")
|
|
48990
|
+
version = "0.0.6";
|
|
48989
48991
|
} catch (e) {}
|
|
48990
48992
|
program.name("asst").description("A CLI tool with envison").version(version, "-v, --version", "output the current version");
|
|
48991
48993
|
var ls = new Command("ls").description("List files in the current directory").action(() => {
|
package/dist/envision.js
CHANGED
|
@@ -40643,8 +40643,8 @@ InitEnv.init();
|
|
|
40643
40643
|
var version = useContextKey("version", () => {
|
|
40644
40644
|
let version2 = "0.0.64";
|
|
40645
40645
|
try {
|
|
40646
|
-
if ("0.0.
|
|
40647
|
-
version2 = "0.0.
|
|
40646
|
+
if ("0.0.68")
|
|
40647
|
+
version2 = "0.0.68";
|
|
40648
40648
|
} catch (e) {}
|
|
40649
40649
|
return version2;
|
|
40650
40650
|
});
|