@wirecat/attio-cli 0.8.0 → 0.10.0
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/CHANGELOG.md +23 -0
- package/contracts/wirecat.json +1 -0
- package/dist/bin/attio.js +11 -11
- package/dist/bundle/attio.js +5 -166
- package/dist/bundle/{chunk-UXJZISVL.js → chunk-OGWKDPR5.js} +2 -1
- package/dist/bundle/chunk-TQAECZFO.js +13 -0
- package/dist/bundle/{definitions-FODOIPM2.js → definitions-J73IBAHT.js} +1 -1
- package/dist/bundle/program-NSBWZ25F.js +6201 -0
- package/dist/bundle/{schemas-YGSTNU6F.js → schemas-G3HFAS45.js} +576 -29
- package/dist/commands/api.js +1 -2
- package/dist/commands/crm.js +1 -4
- package/dist/commands/schedule.js +1 -1
- package/dist/commands/session.js +1 -2
- package/dist/config.js +1 -2
- package/dist/context.js +1 -1
- package/dist/identity.js +1 -0
- package/dist/program.js +1 -2
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/dist/activities.d.ts +0 -4
- package/dist/activities.d.ts.map +0 -1
- package/dist/activities.js.map +0 -1
- package/dist/bin/attio.d.ts +0 -3
- package/dist/bin/attio.d.ts.map +0 -1
- package/dist/bin/attio.js.map +0 -1
- package/dist/bundle/agent-GUXXSLT5.js +0 -38
- package/dist/bundle/all-profiles-63N3EQ46.js +0 -320
- package/dist/bundle/anthropic-B4W7MZQE.js +0 -91
- package/dist/bundle/app-server-EXNGTHWO.js +0 -250
- package/dist/bundle/bun-OPDGMZZQ.js +0 -169
- package/dist/bundle/bun-sqlite-NBAY7FR2.js +0 -76
- package/dist/bundle/chunk-2JHVQMVC.js +0 -16
- package/dist/bundle/chunk-2QDUP74I.js +0 -794
- package/dist/bundle/chunk-2XBDILVW.js +0 -53
- package/dist/bundle/chunk-3HC5F3P7.js +0 -24
- package/dist/bundle/chunk-3MSHGNVE.js +0 -1243
- package/dist/bundle/chunk-3YM4B2GT.js +0 -63
- package/dist/bundle/chunk-4N7PP76S.js +0 -6848
- package/dist/bundle/chunk-4RBMCXZT.js +0 -1337
- package/dist/bundle/chunk-4RSWOPKL.js +0 -323
- package/dist/bundle/chunk-5JKTVAXX.js +0 -2788
- package/dist/bundle/chunk-5N2V6XO7.js +0 -119
- package/dist/bundle/chunk-5WD22IXQ.js +0 -66
- package/dist/bundle/chunk-6K4Z6CAM.js +0 -43997
- package/dist/bundle/chunk-6TD3DCWC.js +0 -106
- package/dist/bundle/chunk-7Z53MLQP.js +0 -388
- package/dist/bundle/chunk-AATTOFNY.js +0 -2045
- package/dist/bundle/chunk-APARYILG.js +0 -743
- package/dist/bundle/chunk-D72URWJE.js +0 -532
- package/dist/bundle/chunk-DFDN6AUB.js +0 -21
- package/dist/bundle/chunk-DM7KWVDZ.js +0 -3752
- package/dist/bundle/chunk-DNCLQPOM.js +0 -7
- package/dist/bundle/chunk-DPD4FMHN.js +0 -388
- package/dist/bundle/chunk-DPV53EZC.js +0 -206
- package/dist/bundle/chunk-DURNR4RO.js +0 -353
- package/dist/bundle/chunk-EH6ZEJGT.js +0 -932
- package/dist/bundle/chunk-EVUMQKV7.js +0 -76
- package/dist/bundle/chunk-EY36BTKZ.js +0 -108
- package/dist/bundle/chunk-FH6OEGGN.js +0 -557
- package/dist/bundle/chunk-FOP6G45D.js +0 -358
- package/dist/bundle/chunk-GGMAIIVE.js +0 -38
- package/dist/bundle/chunk-GTEX4IUO.js +0 -334
- package/dist/bundle/chunk-HZ3C4WXD.js +0 -142
- package/dist/bundle/chunk-IA7LLLEI.js +0 -100
- package/dist/bundle/chunk-J6GVVISK.js +0 -185
- package/dist/bundle/chunk-JG6LCSEX.js +0 -407
- package/dist/bundle/chunk-JIGEJZ4I.js +0 -68943
- package/dist/bundle/chunk-KVTNYRDO.js +0 -1007
- package/dist/bundle/chunk-L45WN3AR.js +0 -80
- package/dist/bundle/chunk-L72WUJAS.js +0 -54
- package/dist/bundle/chunk-LKH3UKLO.js +0 -230
- package/dist/bundle/chunk-LM3W7YOM.js +0 -274
- package/dist/bundle/chunk-M4AC55ZB.js +0 -12733
- package/dist/bundle/chunk-MCLQTCGH.js +0 -1202
- package/dist/bundle/chunk-NB7EOAUZ.js +0 -123
- package/dist/bundle/chunk-NISH4UXM.js +0 -58
- package/dist/bundle/chunk-OYEVYOCL.js +0 -259
- package/dist/bundle/chunk-P7G5HFY3.js +0 -288
- package/dist/bundle/chunk-PAEKXVJW.js +0 -188
- package/dist/bundle/chunk-PL5P7UKW.js +0 -25216
- package/dist/bundle/chunk-PLPBEWD4.js +0 -170
- package/dist/bundle/chunk-PMQ7GP6X.js +0 -95
- package/dist/bundle/chunk-Q7ICVP25.js +0 -18
- package/dist/bundle/chunk-QPPOIWPY.js +0 -1246
- package/dist/bundle/chunk-QSJKSPWF.js +0 -131
- package/dist/bundle/chunk-RDVTHFPP.js +0 -338
- package/dist/bundle/chunk-RQORQN2V.js +0 -4072
- package/dist/bundle/chunk-RRTMPSQR.js +0 -29
- package/dist/bundle/chunk-S4UUN6LD.js +0 -1410
- package/dist/bundle/chunk-S6JG4YUH.js +0 -72
- package/dist/bundle/chunk-SCI7QEHF.js +0 -362
- package/dist/bundle/chunk-SSA6JBPA.js +0 -778
- package/dist/bundle/chunk-T4J7XFXT.js +0 -9667
- package/dist/bundle/chunk-TTF5DP4V.js +0 -1197
- package/dist/bundle/chunk-TXDR6YSF.js +0 -23
- package/dist/bundle/chunk-TY7NDMFY.js +0 -46
- package/dist/bundle/chunk-UDSL3MUU.js +0 -2333
- package/dist/bundle/chunk-UKHF37ZU.js +0 -1068
- package/dist/bundle/chunk-V57E7PJQ.js +0 -161
- package/dist/bundle/chunk-V7IF2K3P.js +0 -52
- package/dist/bundle/chunk-VB7FZOYX.js +0 -633
- package/dist/bundle/chunk-VZ5PPYDG.js +0 -77
- package/dist/bundle/chunk-WOPVBRPV.js +0 -29
- package/dist/bundle/chunk-WXQGA6XK.js +0 -50
- package/dist/bundle/chunk-XQGN2D44.js +0 -86
- package/dist/bundle/chunk-XQUUANA2.js +0 -24600
- package/dist/bundle/chunk-Y5E2WNWB.js +0 -35
- package/dist/bundle/chunk-YNGU36GW.js +0 -218
- package/dist/bundle/chunk-YWDFYQOU.js +0 -82
- package/dist/bundle/chunk-ZVVMGPBJ.js +0 -50
- package/dist/bundle/chunk-ZZD2YPOX.js +0 -156
- package/dist/bundle/command-contract-KCCW4LNI.js +0 -37
- package/dist/bundle/command-server-entry-3NPPABQQ.js +0 -166
- package/dist/bundle/decode-26M7XE2B.js +0 -297
- package/dist/bundle/dispatch-2FTOHA5D.js +0 -411
- package/dist/bundle/dist-EM7KLEG4.js +0 -7577
- package/dist/bundle/dist-PAKDDIBT.js +0 -191
- package/dist/bundle/echarts-O3TNDAXJ.js +0 -42501
- package/dist/bundle/embed-XJLEAWXE.js +0 -38
- package/dist/bundle/embedder-OEL6PXEH.js +0 -111
- package/dist/bundle/failure-OHIXWTR6.js +0 -25
- package/dist/bundle/first-run-CIXGBXY6.js +0 -29
- package/dist/bundle/first-screen-5FK4D45F.js +0 -38
- package/dist/bundle/instructions-AMH5RWVJ.js +0 -11
- package/dist/bundle/mcp-5HFPWC3W.js +0 -167
- package/dist/bundle/meeting-combined-DMVGQNJ7.js +0 -24
- package/dist/bundle/meeting-model-2THAT7OH.js +0 -25
- package/dist/bundle/meeting-semantic-Q6XYFYUD.js +0 -22
- package/dist/bundle/node-EGMCBAO7.js +0 -176
- package/dist/bundle/node-KM3CUABH.js +0 -2340
- package/dist/bundle/node-TLZSIHIJ.js +0 -21
- package/dist/bundle/node-sqlite-2SWWGW6H.js +0 -74
- package/dist/bundle/oauth-V5LGTXF2.js +0 -20
- package/dist/bundle/open-25EKOTZA.js +0 -23
- package/dist/bundle/openai-VX3OLIHM.js +0 -238
- package/dist/bundle/process-SGHEN6MQ.js +0 -91
- package/dist/bundle/program-Z5NUNXME.js +0 -34214
- package/dist/bundle/prompt-2VSPX5S7.js +0 -17
- package/dist/bundle/recognize-NA5XUFKK.js +0 -26
- package/dist/bundle/remote-BOME6XOE.js +0 -31
- package/dist/bundle/rerank-NG3XMFCV.js +0 -52
- package/dist/bundle/serve-MR67OBED.js +0 -199
- package/dist/bundle/server-4BWAGJQO.js +0 -80
- package/dist/bundle/server-OP2HJNXD.js +0 -213
- package/dist/bundle/sqlite-runtime-V5U6F5EB.js +0 -20
- package/dist/bundle/state-L4MWAATO.js +0 -36
- package/dist/bundle/store-2ALTEH55.js +0 -181
- package/dist/bundle/store-CXZFRG5D.js +0 -297
- package/dist/bundle/store-maintenance-command-LC55DRQA.js +0 -67
- package/dist/bundle/surface-3GRJ7473.js +0 -66
- package/dist/commands/api.d.ts +0 -12
- package/dist/commands/api.d.ts.map +0 -1
- package/dist/commands/api.js.map +0 -1
- package/dist/commands/crm.d.ts +0 -7
- package/dist/commands/crm.d.ts.map +0 -1
- package/dist/commands/crm.js.map +0 -1
- package/dist/commands/schedule.d.ts +0 -3
- package/dist/commands/schedule.d.ts.map +0 -1
- package/dist/commands/schedule.js.map +0 -1
- package/dist/commands/session.d.ts +0 -8
- package/dist/commands/session.d.ts.map +0 -1
- package/dist/commands/session.js.map +0 -1
- package/dist/config.d.ts +0 -13
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/context.d.ts +0 -37
- package/dist/context.d.ts.map +0 -1
- package/dist/context.js.map +0 -1
- package/dist/generated/definitions.d.ts +0 -3
- package/dist/generated/definitions.d.ts.map +0 -1
- package/dist/generated/definitions.js.map +0 -1
- package/dist/generated/manifest.d.ts +0 -6
- package/dist/generated/manifest.d.ts.map +0 -1
- package/dist/generated/manifest.js.map +0 -1
- package/dist/generated/schemas.d.ts +0 -383
- package/dist/generated/schemas.d.ts.map +0 -1
- package/dist/generated/schemas.js.map +0 -1
- package/dist/generated/types.d.ts +0 -10166
- package/dist/generated/types.d.ts.map +0 -1
- package/dist/generated/types.js.map +0 -1
- package/dist/generated/wirecat-config.d.ts +0 -15
- package/dist/generated/wirecat-config.d.ts.map +0 -1
- package/dist/generated/wirecat-config.js.map +0 -1
- package/dist/hooks.d.ts +0 -33
- package/dist/hooks.d.ts.map +0 -1
- package/dist/hooks.js.map +0 -1
- package/dist/identity.d.ts +0 -33
- package/dist/identity.d.ts.map +0 -1
- package/dist/identity.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/links.d.ts +0 -10
- package/dist/links.d.ts.map +0 -1
- package/dist/links.js.map +0 -1
- package/dist/meetings.d.ts +0 -57
- package/dist/meetings.d.ts.map +0 -1
- package/dist/meetings.js.map +0 -1
- package/dist/program.d.ts +0 -6
- package/dist/program.d.ts.map +0 -1
- package/dist/program.js.map +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js.map +0 -1
- package/dist/wcat.d.ts +0 -3
- package/dist/wcat.d.ts.map +0 -1
- package/dist/wcat.js.map +0 -1
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
holdLock,
|
|
5
|
-
readLock,
|
|
6
|
-
releaseLock,
|
|
7
|
-
takeLock
|
|
8
|
-
} from "./chunk-XQGN2D44.js";
|
|
9
|
-
import {
|
|
10
|
-
__name
|
|
11
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
12
|
-
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
|
|
14
|
-
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
15
|
-
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
|
|
17
|
-
import { randomBytes } from "node:crypto";
|
|
18
|
-
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
19
|
-
import { dirname } from "node:path";
|
|
20
|
-
var WRITE_EVERY_MS = 2e3;
|
|
21
|
-
var TOOL_NAME = /^[A-Za-z0-9_.-]{1,64}$/;
|
|
22
|
-
var httpActivityFile = /* @__PURE__ */ __name((tokenFile) => `${tokenFile.replace(/\.json$/, "")}.activity.json`, "httpActivityFile");
|
|
23
|
-
var localDay = /* @__PURE__ */ __name((ms) => {
|
|
24
|
-
const d = new Date(ms);
|
|
25
|
-
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
|
|
26
|
-
}, "localDay");
|
|
27
|
-
var readActivity = /* @__PURE__ */ __name((path) => {
|
|
28
|
-
if (!existsSync(path))
|
|
29
|
-
return {};
|
|
30
|
-
try {
|
|
31
|
-
const parsed = JSON.parse(readFileSync(path, "utf8"));
|
|
32
|
-
return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
|
|
33
|
-
} catch {
|
|
34
|
-
return {};
|
|
35
|
-
}
|
|
36
|
-
}, "readActivity");
|
|
37
|
-
var calledTools = /* @__PURE__ */ __name((body) => (Array.isArray(body) ? body : [body]).flatMap((message) => {
|
|
38
|
-
if (!message || typeof message !== "object")
|
|
39
|
-
return [];
|
|
40
|
-
const { method, params } = message;
|
|
41
|
-
const name = params?.name;
|
|
42
|
-
return method === "tools/call" && typeof name === "string" && TOOL_NAME.test(name) ? [name] : [];
|
|
43
|
-
}), "calledTools");
|
|
44
|
-
var activityRecorder = /* @__PURE__ */ __name((path, now = Date.now) => {
|
|
45
|
-
const activity = readActivity(path);
|
|
46
|
-
let timer;
|
|
47
|
-
const write = /* @__PURE__ */ __name(() => {
|
|
48
|
-
timer = void 0;
|
|
49
|
-
try {
|
|
50
|
-
mkdirSync(dirname(path), { recursive: true, mode: 448 });
|
|
51
|
-
const temporary = `${path}.${randomBytes(8).toString("hex")}.tmp`;
|
|
52
|
-
writeFileSync(temporary, JSON.stringify(activity), { mode: 384, flag: "wx" });
|
|
53
|
-
chmodSync(temporary, 384);
|
|
54
|
-
renameSync(temporary, path);
|
|
55
|
-
} catch {
|
|
56
|
-
}
|
|
57
|
-
}, "write");
|
|
58
|
-
return {
|
|
59
|
-
record: /* @__PURE__ */ __name((clientId, tools) => {
|
|
60
|
-
const at = now();
|
|
61
|
-
const iso = new Date(at).toISOString();
|
|
62
|
-
const day = localDay(at);
|
|
63
|
-
const before = activity[clientId];
|
|
64
|
-
const counted = before?.day === day ? before.toolCalls : 0;
|
|
65
|
-
const last = tools.at(-1);
|
|
66
|
-
activity[clientId] = {
|
|
67
|
-
lastRequestAt: iso,
|
|
68
|
-
day,
|
|
69
|
-
toolCalls: counted + tools.length,
|
|
70
|
-
...last ? { lastTool: last, lastToolAt: iso } : before?.lastTool ? { lastTool: before.lastTool, ...before.lastToolAt ? { lastToolAt: before.lastToolAt } : {} } : {}
|
|
71
|
-
};
|
|
72
|
-
if (last) {
|
|
73
|
-
clearTimeout(timer);
|
|
74
|
-
write();
|
|
75
|
-
} else if (!timer) {
|
|
76
|
-
timer = setTimeout(write, WRITE_EVERY_MS);
|
|
77
|
-
timer.unref();
|
|
78
|
-
}
|
|
79
|
-
}, "record"),
|
|
80
|
-
flush: /* @__PURE__ */ __name(() => {
|
|
81
|
-
if (!timer)
|
|
82
|
-
return;
|
|
83
|
-
clearTimeout(timer);
|
|
84
|
-
write();
|
|
85
|
-
}, "flush")
|
|
86
|
-
};
|
|
87
|
-
}, "activityRecorder");
|
|
88
|
-
|
|
89
|
-
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
|
|
90
|
-
var ACCESS_SECONDS = 60 * 60;
|
|
91
|
-
var REFRESH_SECONDS = 30 * 24 * 60 * 60;
|
|
92
|
-
var readStored = /* @__PURE__ */ __name((path) => existsSync2(path) ? JSON.parse(readFileSync2(path, "utf8")) : { clients: [], tokens: [] }, "readStored");
|
|
93
|
-
var mcpHttpMarker = /* @__PURE__ */ __name((envPrefix) => `${envPrefix}_MCP_HTTP`, "mcpHttpMarker");
|
|
94
|
-
var httpLogFile = /* @__PURE__ */ __name((tokenFile) => `${tokenFile.replace(/\.json$/, "")}.log`, "httpLogFile");
|
|
95
|
-
var httpLockFile = /* @__PURE__ */ __name((tokenFile) => `${tokenFile.replace(/\.json$/, "")}.lock`, "httpLockFile");
|
|
96
|
-
var httpLaunchFile = /* @__PURE__ */ __name((lockFile) => `${lockFile.replace(/\.lock$/, "")}.launch.json`, "httpLaunchFile");
|
|
97
|
-
var readHttpLaunch = /* @__PURE__ */ __name((path) => {
|
|
98
|
-
try {
|
|
99
|
-
const launch = JSON.parse(readFileSync2(path, "utf8"));
|
|
100
|
-
return typeof launch.invocation === "string" && Array.isArray(launch.argv) && launch.argv.every((word) => typeof word === "string") && typeof launch.env === "object" && launch.env !== null ? launch : void 0;
|
|
101
|
-
} catch {
|
|
102
|
-
return void 0;
|
|
103
|
-
}
|
|
104
|
-
}, "readHttpLaunch");
|
|
105
|
-
var readHttpLock = /* @__PURE__ */ __name((path) => {
|
|
106
|
-
const lock = readLock(path);
|
|
107
|
-
return lock && typeof lock.port === "number" && typeof lock.publicUrl === "string" ? lock : void 0;
|
|
108
|
-
}, "readHttpLock");
|
|
109
|
-
var httpLock = /* @__PURE__ */ __name((path, first) => {
|
|
110
|
-
let current = first;
|
|
111
|
-
const held = takeLock(path, current);
|
|
112
|
-
return {
|
|
113
|
-
held,
|
|
114
|
-
update: /* @__PURE__ */ __name((change) => {
|
|
115
|
-
current = { ...current, ...change };
|
|
116
|
-
holdLock(path, current);
|
|
117
|
-
}, "update"),
|
|
118
|
-
release: /* @__PURE__ */ __name(() => releaseLock(path), "release")
|
|
119
|
-
};
|
|
120
|
-
}, "httpLock");
|
|
121
|
-
var signedInClients = /* @__PURE__ */ __name((tokenFile, now = Date.now()) => {
|
|
122
|
-
const seconds = Math.floor(now / 1e3);
|
|
123
|
-
const { clients, tokens } = readStored(tokenFile);
|
|
124
|
-
const activity = readActivity(httpActivityFile(tokenFile));
|
|
125
|
-
const today = localDay(now);
|
|
126
|
-
const last = /* @__PURE__ */ new Map();
|
|
127
|
-
for (const token of tokens) {
|
|
128
|
-
if (token.expiresAt <= seconds)
|
|
129
|
-
continue;
|
|
130
|
-
const issued = token.expiresAt - (token.kind === "access" ? ACCESS_SECONDS : REFRESH_SECONDS);
|
|
131
|
-
last.set(token.clientId, Math.max(last.get(token.clientId) ?? 0, issued));
|
|
132
|
-
}
|
|
133
|
-
return clients.filter((client) => last.has(client.id)).map((client) => {
|
|
134
|
-
const did = activity[client.id];
|
|
135
|
-
return {
|
|
136
|
-
claimedName: client.name ?? null,
|
|
137
|
-
lastLoginAt: new Date((last.get(client.id) ?? 0) * 1e3).toISOString(),
|
|
138
|
-
lastRequestAt: did?.lastRequestAt ?? null,
|
|
139
|
-
lastTool: did?.lastTool ?? null,
|
|
140
|
-
lastToolAt: did?.lastToolAt ?? null,
|
|
141
|
-
toolCallsToday: did?.day === today ? did.toolCalls : 0
|
|
142
|
-
};
|
|
143
|
-
}).sort((a, b) => b.lastLoginAt.localeCompare(a.lastLoginAt));
|
|
144
|
-
}, "signedInClients");
|
|
145
|
-
|
|
146
|
-
export {
|
|
147
|
-
httpActivityFile,
|
|
148
|
-
calledTools,
|
|
149
|
-
activityRecorder,
|
|
150
|
-
ACCESS_SECONDS,
|
|
151
|
-
REFRESH_SECONDS,
|
|
152
|
-
readStored,
|
|
153
|
-
mcpHttpMarker,
|
|
154
|
-
httpLogFile,
|
|
155
|
-
httpLockFile,
|
|
156
|
-
httpLaunchFile,
|
|
157
|
-
readHttpLaunch,
|
|
158
|
-
readHttpLock,
|
|
159
|
-
httpLock,
|
|
160
|
-
signedInClients
|
|
161
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
readSharedSection,
|
|
5
|
-
writeSharedSection
|
|
6
|
-
} from "./chunk-TTF5DP4V.js";
|
|
7
|
-
import {
|
|
8
|
-
CliError
|
|
9
|
-
} from "./chunk-S6JG4YUH.js";
|
|
10
|
-
import {
|
|
11
|
-
__name
|
|
12
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
13
|
-
|
|
14
|
-
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
|
|
15
|
-
var PERMISSION_ANSWERS = ["readonly", "allow"];
|
|
16
|
-
var QUESTIONS = ["languages", "tools", "permissions"];
|
|
17
|
-
var SECTION = "setup";
|
|
18
|
-
var readSetupAnswers = /* @__PURE__ */ __name((path) => {
|
|
19
|
-
const section = readSharedSection(path, SECTION);
|
|
20
|
-
if (section === void 0)
|
|
21
|
-
return {};
|
|
22
|
-
const answers = section;
|
|
23
|
-
if (section === null || typeof section !== "object" || Array.isArray(section) || answers.languages !== void 0 && answers.languages !== true || answers.tools !== void 0 && answers.tools !== true || answers.permissions !== void 0 && !PERMISSION_ANSWERS.includes(answers.permissions))
|
|
24
|
-
throw new CliError("configuration_error", `${path}: ${SECTION} holds what setup asked \u2014 languages: true, tools: true, permissions: ${PERMISSION_ANSWERS.join(" | ")}`);
|
|
25
|
-
return answers;
|
|
26
|
-
}, "readSetupAnswers");
|
|
27
|
-
var unanswered = /* @__PURE__ */ __name((answers) => QUESTIONS.filter((question) => answers[question] === void 0), "unanswered");
|
|
28
|
-
var writeSetupAnswers = /* @__PURE__ */ __name((path, answers) => {
|
|
29
|
-
let kept = {};
|
|
30
|
-
try {
|
|
31
|
-
kept = readSetupAnswers(path);
|
|
32
|
-
} catch (error) {
|
|
33
|
-
if (!(error instanceof CliError) || !error.message.includes(`${SECTION} holds`))
|
|
34
|
-
throw error;
|
|
35
|
-
}
|
|
36
|
-
writeSharedSection(path, SECTION, { ...kept, ...answers });
|
|
37
|
-
}, "writeSetupAnswers");
|
|
38
|
-
var permissionCeiling = /* @__PURE__ */ __name((path) => {
|
|
39
|
-
try {
|
|
40
|
-
return readSetupAnswers(path).permissions === "readonly" ? "readonly" : void 0;
|
|
41
|
-
} catch {
|
|
42
|
-
return void 0;
|
|
43
|
-
}
|
|
44
|
-
}, "permissionCeiling");
|
|
45
|
-
|
|
46
|
-
export {
|
|
47
|
-
QUESTIONS,
|
|
48
|
-
readSetupAnswers,
|
|
49
|
-
unanswered,
|
|
50
|
-
writeSetupAnswers,
|
|
51
|
-
permissionCeiling
|
|
52
|
-
};
|