@wirecat/zoom-cli 0.69.0 → 0.70.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/README.md +1 -1
- package/dist/account-removal.d.ts +6 -0
- package/dist/account-removal.d.ts.map +1 -0
- package/dist/account-removal.js +43 -0
- package/dist/account-removal.js.map +1 -0
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-ZQWPCJEK.js → all-profiles-GE2TFJJP.js} +9 -9
- package/dist/bundle/answer-policy-GOXSDYDD.js +104 -0
- package/dist/bundle/{anthropic-7FUQ2HYJ.js → anthropic-FA6NHENI.js} +9 -7
- package/dist/bundle/{app-server-DNPE2EQB.js → app-server-IRADMSNX.js} +50 -50
- package/dist/bundle/{bun-ZVQFCFCC.js → bun-ZYZGGCX5.js} +2 -2
- package/dist/bundle/{bun-sqlite-EB2UMUPJ.js → bun-sqlite-Y24TUIGS.js} +4 -4
- package/dist/bundle/{chunk-B5D7NZI7.js → chunk-2JEM2YNV.js} +1 -1
- package/dist/bundle/{chunk-JX5JJZC3.js → chunk-2QFPVUM3.js} +2 -2
- package/dist/bundle/{chunk-KAPJQGHE.js → chunk-2U6SER67.js} +1 -1
- package/dist/bundle/{chunk-TWIC6JJG.js → chunk-3KC7C465.js} +7 -7
- package/dist/bundle/{chunk-MOTKS7XG.js → chunk-4DSIWYGO.js} +863 -423
- package/dist/bundle/{chunk-LEA4BGK7.js → chunk-56OV5ASY.js} +11 -11
- package/dist/bundle/{chunk-TN77LX6W.js → chunk-5XWCBLUR.js} +1 -1
- package/dist/bundle/{chunk-SZ3Z4ZNO.js → chunk-6HJFIMT7.js} +1 -1
- package/dist/bundle/{chunk-SQT47CFW.js → chunk-6IF5ZHDS.js} +1 -1
- package/dist/bundle/{chunk-BOAMDYLY.js → chunk-7QC4M4HS.js} +2 -2
- package/dist/bundle/{chunk-MSDCZ6GT.js → chunk-AISJCF7A.js} +4 -4
- package/dist/bundle/{chunk-F5DYBWH7.js → chunk-AT2XKNFN.js} +51 -8
- package/dist/bundle/{chunk-V74QFMSL.js → chunk-AUNW7N4I.js} +1 -1
- package/dist/bundle/{chunk-6TICX3MN.js → chunk-BSS6HX4O.js} +2 -2
- package/dist/bundle/{chunk-5ZJXKASF.js → chunk-BVWF4B33.js} +10 -10
- package/dist/bundle/{chunk-GXDOTUUO.js → chunk-CEJJBZAE.js} +9 -9
- package/dist/bundle/{chunk-IPBZKUC3.js → chunk-CHGUNZ3L.js} +3 -3
- package/dist/bundle/{chunk-O7L44JK2.js → chunk-CIZ25UPK.js} +2259 -1046
- package/dist/bundle/{chunk-JHFP3Z5S.js → chunk-CSEBB4OP.js} +8 -8
- package/dist/bundle/{chunk-RPQ3JOD3.js → chunk-D3PNCJD5.js} +5 -5
- package/dist/bundle/{chunk-R2ULMWB4.js → chunk-DCUWJITQ.js} +29 -29
- package/dist/bundle/{chunk-R3JYPY3J.js → chunk-DNR4B5YV.js} +2 -2
- package/dist/bundle/{chunk-EPPSMCEV.js → chunk-DXCTW3MV.js} +1 -1
- package/dist/bundle/{chunk-B6JMVB6R.js → chunk-EOSVN2ER.js} +1 -1
- package/dist/bundle/{chunk-QW5VPZEH.js → chunk-GB5X3GBE.js} +23 -1
- package/dist/bundle/{chunk-CKK6JOC4.js → chunk-GVT5363M.js} +2 -2
- package/dist/bundle/{chunk-C6TEYKXV.js → chunk-IINZIP73.js} +7 -7
- package/dist/bundle/{chunk-H3MFBYTQ.js → chunk-IS3ZTT2Z.js} +5 -5
- package/dist/bundle/{chunk-HW5QTRFF.js → chunk-IWPXWGF7.js} +33 -33
- package/dist/bundle/{chunk-CUZHKYC2.js → chunk-J3SKXICS.js} +350 -136
- package/dist/bundle/{chunk-ZRHMB3LQ.js → chunk-JRO2FWO2.js} +1 -1
- package/dist/bundle/chunk-JULBAECW.js +126 -0
- package/dist/bundle/{chunk-XITUFTON.js → chunk-KM736RMJ.js} +1 -1
- package/dist/bundle/{chunk-S2EAGDS7.js → chunk-KWRCP55G.js} +11 -11
- package/dist/bundle/{chunk-6KMTQX3D.js → chunk-L24UOUWG.js} +1 -1
- package/dist/bundle/{chunk-G6IX2MD2.js → chunk-LAG5O2FV.js} +180 -222
- package/dist/bundle/{chunk-XRZDYWF6.js → chunk-LXXCLQCW.js} +2 -2
- package/dist/bundle/{chunk-IEC4E65G.js → chunk-M6JIXMQZ.js} +5 -1
- package/dist/bundle/{chunk-QXM7S3Y3.js → chunk-M7E44TMT.js} +5 -5
- package/dist/bundle/{chunk-Z6TTGTMU.js → chunk-M7VUXXGS.js} +19 -4
- package/dist/bundle/{chunk-MNOVYS43.js → chunk-MVOMLJYQ.js} +3 -3
- package/dist/bundle/{chunk-MVDPZRFE.js → chunk-OA37BWE5.js} +1 -1
- package/dist/bundle/{chunk-5H6VTEEC.js → chunk-OAQLVV6W.js} +2 -2
- package/dist/bundle/{chunk-KNE6VFHZ.js → chunk-OORMSM6O.js} +1 -1
- package/dist/bundle/{chunk-UEZ6URJR.js → chunk-PV6OHXHN.js} +16 -16
- package/dist/bundle/{chunk-TFFEFEG2.js → chunk-QL7EMFIC.js} +18 -18
- package/dist/bundle/{chunk-HSI7YOYK.js → chunk-QO2KPU26.js} +16 -16
- package/dist/bundle/{chunk-XJBYGMZ4.js → chunk-RB33VTUW.js} +243 -387
- package/dist/bundle/{chunk-HC56J5LB.js → chunk-RIPAUCKJ.js} +54 -54
- package/dist/bundle/{chunk-WY4NYPPS.js → chunk-RO3ZR4VP.js} +12 -12
- package/dist/bundle/{chunk-BL36NSV5.js → chunk-RQG5VOGH.js} +12 -2
- package/dist/bundle/{chunk-JZ4YOAHA.js → chunk-RRRJCHUC.js} +1767 -1038
- package/dist/bundle/{chunk-37B7A4RP.js → chunk-RWIILYKW.js} +1 -1
- package/dist/bundle/{chunk-3TPRYZUW.js → chunk-SNIY3JDN.js} +18 -18
- package/dist/bundle/{chunk-TKXLWFM2.js → chunk-SVF3NDAO.js} +3 -3
- package/dist/bundle/{chunk-GR3QDHBU.js → chunk-UVPL7YAY.js} +5 -5
- package/dist/bundle/{chunk-6N2D6JGX.js → chunk-V2E7QFZ3.js} +1 -1
- package/dist/bundle/{chunk-4APZQYCH.js → chunk-V5GRSOCZ.js} +4 -4
- package/dist/bundle/{chunk-T5X4LGXE.js → chunk-VE2VNECR.js} +12 -12
- package/dist/bundle/{chunk-QLGG7S6F.js → chunk-VJ5ZU4UF.js} +22 -4
- package/dist/bundle/{chunk-52DCABMU.js → chunk-VNU5L37V.js} +26 -26
- package/dist/bundle/{chunk-LDRQ5NAP.js → chunk-VSLDWT4E.js} +3 -3
- package/dist/bundle/{chunk-LQX74VKG.js → chunk-W7ZEEC4K.js} +1 -1
- package/dist/bundle/{chunk-NRRI37NJ.js → chunk-WOIHSQAL.js} +44 -0
- package/dist/bundle/{chunk-V4MM6GST.js → chunk-X4ZF4XXI.js} +1 -1
- package/dist/bundle/{chunk-FBLUKCIR.js → chunk-XRFHQGOD.js} +1 -1
- package/dist/bundle/{chunk-5GOE6PQK.js → chunk-XWQNJKTP.js} +5 -5
- package/dist/bundle/{chunk-6AMMTXEA.js → chunk-Y6C3N7YG.js} +26 -65
- package/dist/bundle/{chunk-KX5MZVPX.js → chunk-YJSPBUGB.js} +50 -32
- package/dist/bundle/{chunk-MJMVIFSC.js → chunk-YTN2JN6N.js} +7 -7
- package/dist/bundle/{chunk-OSBHEM2A.js → chunk-YUHM2OJM.js} +10 -10
- package/dist/bundle/{chunk-7AUP2WT3.js → chunk-ZBKWRYRS.js} +2 -2
- package/dist/bundle/{chunk-DHD25JII.js → chunk-ZS55EERO.js} +1 -1
- package/dist/bundle/{chunk-L62EJDNZ.js → chunk-ZSKE7N2U.js} +3 -3
- package/dist/bundle/{chunk-5ZF6QVMC.js → chunk-ZV3INEKM.js} +4 -4
- package/dist/bundle/{cli-P3BZUE6S.js → cli-VRSQ7HAE.js} +60 -58
- package/dist/bundle/command-contract-RPRKHVU6.js +41 -0
- package/dist/bundle/config-QU6A6VIO.js +90 -0
- package/dist/bundle/{decode-QWOQXM7M.js → decode-523PUQMR.js} +4 -4
- package/dist/bundle/{dispatch-5MGDLOK4.js → dispatch-IZCAK47P.js} +1 -1
- package/dist/bundle/{dist-OUE4MF37.js → dist-6WWKPEVW.js} +41 -25
- package/dist/bundle/{echarts-65IMPY43.js → echarts-S5UMX2D3.js} +2 -2
- package/dist/bundle/{embed-4IULBCKL.js → embed-ODPDVHUK.js} +5 -5
- package/dist/bundle/{embedder-JW4W6IZI.js → embedder-PAXRBSZE.js} +8 -8
- package/dist/bundle/{failure-CR64C4XA.js → failure-R2OIHCE5.js} +1 -1
- package/dist/bundle/{first-run-CH6C674R.js → first-run-NVTDR5VO.js} +8 -8
- package/dist/bundle/first-screen-5RWZDWLK.js +39 -0
- package/dist/bundle/{folders-VU4IN35Y.js → folders-ZXTOFY4T.js} +3 -3
- package/dist/bundle/{instructions-G5QIH2TM.js → instructions-DUB7E6C5.js} +1 -1
- package/dist/bundle/{main-O4ZJIEWP.js → main-A7JSYQI6.js} +18 -18
- package/dist/bundle/{meetings-77CCAVYD.js → meetings-BDZQV3HR.js} +4 -4
- package/dist/bundle/{node-E6VQHU4Y.js → node-E25KP53H.js} +2 -2
- package/dist/bundle/{node-sqlite-RJZ4PGLD.js → node-sqlite-PHWDFZCP.js} +5 -5
- package/dist/bundle/{oauth-F4JKNRW4.js → oauth-G2K46IYP.js} +6 -6
- package/dist/bundle/{open-NYOGMIAA.js → open-INWS5HIZ.js} +4 -4
- package/dist/bundle/{openai-5U6EQTFQ.js → openai-T44ORVGQ.js} +10 -10
- package/dist/bundle/{output-file-6COFGPUL.js → output-file-YGQYZCBJ.js} +4 -4
- package/dist/bundle/{process-OBWUKBMX.js → process-UJ2JHMJN.js} +1 -1
- package/dist/bundle/{program-MU7DEJTO.js → program-LYTGFV6L.js} +115 -72
- package/dist/bundle/{prompt-2QWQTHWT.js → prompt-VTUCRCE4.js} +6 -4
- package/dist/bundle/{recognize-SNUNTUC3.js → recognize-3CEPOW2F.js} +3 -3
- package/dist/bundle/{remote-2CTCIQGF.js → remote-DRQEXEZL.js} +6 -6
- package/dist/bundle/{rerank-XDA7NJNH.js → rerank-UL4KNNVN.js} +6 -6
- package/dist/bundle/{run-log-NSG3DJVX.js → run-log-UZAB5CWF.js} +54 -54
- package/dist/bundle/{serve-TWQFHOV2.js → serve-P5UWUOWQ.js} +8 -8
- package/dist/bundle/server-F3NPVMS2.js +72 -0
- package/dist/bundle/{server-RIQ6HMH2.js → server-M6XK2Y3X.js} +42 -42
- package/dist/bundle/{services-NKZQJQIV.js → services-4HRYNY62.js} +60 -30
- package/dist/bundle/{speech-ZOB76SXA.js → speech-BBPBMFAO.js} +12 -12
- package/dist/bundle/{state-7YYEIXQ5.js → state-GDSUNUSY.js} +5 -5
- package/dist/bundle/{store-E6RTSSNR.js → store-LBQ6FZP2.js} +33 -16
- package/dist/bundle/{store-OX4HRBLO.js → store-VWLABMLF.js} +27 -18
- package/dist/bundle/store-connection-XEBFP56U.js +83 -0
- package/dist/bundle/store-maintenance-command-G43JN57J.js +61 -0
- package/dist/bundle/{streaming-O53PIORL.js → streaming-EJ3NM2C2.js} +5 -5
- package/dist/bundle/{tokens-QKNEP2GJ.js → tokens-BE6CJMR5.js} +5 -5
- package/dist/bundle/zm.js +3 -3
- package/dist/bundle/{zoom-app-TSI2MGVK.js → zoom-app-YIEJLWCW.js} +6 -6
- package/dist/first-screen.d.ts.map +1 -1
- package/dist/first-screen.js +1 -0
- package/dist/first-screen.js.map +1 -1
- package/dist/permissions.js +1 -1
- package/dist/permissions.js.map +1 -1
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +11 -0
- package/dist/setup-commands.js.map +1 -1
- package/dist/tokens.d.ts +2 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +11 -0
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/answer-policy-VBDYLUXI.js +0 -104
- package/dist/bundle/chunk-2SYWVIQJ.js +0 -33
- package/dist/bundle/command-contract-TOLB32NJ.js +0 -41
- package/dist/bundle/config-4KLLIADY.js +0 -90
- package/dist/bundle/first-screen-OCAW5ZN6.js +0 -39
- package/dist/bundle/server-XO6XQQTJ.js +0 -72
- package/dist/bundle/store-connection-55QPNUDS.js +0 -83
- package/dist/bundle/store-maintenance-command-Q5MSU6OK.js +0 -62
|
@@ -2,11 +2,11 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
renderMessages
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KM736RMJ.js";
|
|
6
6
|
import {
|
|
7
7
|
answerOf,
|
|
8
8
|
messengerContext
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DCUWJITQ.js";
|
|
10
10
|
import {
|
|
11
11
|
chatEventAnswer,
|
|
12
12
|
memberAnswer,
|
|
@@ -15,19 +15,22 @@ import {
|
|
|
15
15
|
serveRelay,
|
|
16
16
|
typedQuery,
|
|
17
17
|
withQuery
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QL7EMFIC.js";
|
|
19
19
|
import {
|
|
20
20
|
holdLock,
|
|
21
21
|
lockPath,
|
|
22
22
|
releaseLock,
|
|
23
23
|
servingProfiles,
|
|
24
24
|
takeLock
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-SVF3NDAO.js";
|
|
26
26
|
import {
|
|
27
27
|
FETCHING,
|
|
28
28
|
RULES_VERSION,
|
|
29
29
|
applyTaskRulesOnArrival,
|
|
30
30
|
capability,
|
|
31
|
+
embeddingKeys,
|
|
32
|
+
endpointKeyName,
|
|
33
|
+
modelGateway,
|
|
31
34
|
newSendId,
|
|
32
35
|
onlineDeps,
|
|
33
36
|
openRequestTask,
|
|
@@ -36,14 +39,14 @@ import {
|
|
|
36
39
|
servicesFor,
|
|
37
40
|
syncsOneChat,
|
|
38
41
|
withTimeLimit
|
|
39
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-RRRJCHUC.js";
|
|
40
43
|
import {
|
|
41
44
|
QUICK_HEALTH_CHECKS,
|
|
42
45
|
explainDamage,
|
|
43
46
|
fts5Tables,
|
|
44
47
|
invalidJson,
|
|
45
48
|
storeHealth
|
|
46
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-QO2KPU26.js";
|
|
47
50
|
import {
|
|
48
51
|
Command,
|
|
49
52
|
LOCAL_READ,
|
|
@@ -52,13 +55,11 @@ import {
|
|
|
52
55
|
REMOTE_WRITE,
|
|
53
56
|
annotate,
|
|
54
57
|
destroysNothing,
|
|
55
|
-
endpoint,
|
|
56
58
|
environmentOf,
|
|
57
59
|
itemOf,
|
|
58
60
|
jsonlRecords,
|
|
59
61
|
lineOf,
|
|
60
62
|
listOf,
|
|
61
|
-
modelTarget,
|
|
62
63
|
nextStep,
|
|
63
64
|
outputFor,
|
|
64
65
|
recalledAccount,
|
|
@@ -67,21 +68,19 @@ import {
|
|
|
67
68
|
snakeKeys,
|
|
68
69
|
storeTable,
|
|
69
70
|
withoutProviderRefs
|
|
70
|
-
} from "./chunk-
|
|
71
|
-
import {
|
|
72
|
-
envName
|
|
73
|
-
} from "./chunk-TN77LX6W.js";
|
|
71
|
+
} from "./chunk-LAG5O2FV.js";
|
|
74
72
|
import {
|
|
75
73
|
holdersOf
|
|
76
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-OA37BWE5.js";
|
|
77
75
|
import {
|
|
78
76
|
codeOf,
|
|
79
77
|
currentRun,
|
|
78
|
+
modelTarget,
|
|
80
79
|
parseDuration
|
|
81
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-J3SKXICS.js";
|
|
82
81
|
import {
|
|
83
82
|
levelFor
|
|
84
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-M6JIXMQZ.js";
|
|
85
84
|
import {
|
|
86
85
|
CORPORA,
|
|
87
86
|
MIGRATIONS,
|
|
@@ -115,57 +114,44 @@ import {
|
|
|
115
114
|
storeClients,
|
|
116
115
|
storeContents,
|
|
117
116
|
vectorIndexCounts
|
|
118
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-4DSIWYGO.js";
|
|
119
118
|
import {
|
|
120
119
|
formatLocator,
|
|
121
120
|
parseLocator
|
|
122
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-Y6C3N7YG.js";
|
|
123
122
|
import {
|
|
124
123
|
readDamageMark,
|
|
125
124
|
readHealthMark,
|
|
126
125
|
recordDeepCheck
|
|
127
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-VE2VNECR.js";
|
|
128
127
|
import {
|
|
129
128
|
failureKey,
|
|
130
129
|
isStoreDamage
|
|
131
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-RWIILYKW.js";
|
|
132
131
|
import {
|
|
133
132
|
readSecret
|
|
134
|
-
} from "./chunk-
|
|
135
|
-
import {
|
|
136
|
-
checkedOptions,
|
|
137
|
-
range
|
|
138
|
-
} from "./chunk-2SYWVIQJ.js";
|
|
139
|
-
import {
|
|
140
|
-
messagesFor,
|
|
141
|
-
systemFor,
|
|
142
|
-
validateImages
|
|
143
|
-
} from "./chunk-QW5VPZEH.js";
|
|
133
|
+
} from "./chunk-VJ5ZU4UF.js";
|
|
144
134
|
import {
|
|
145
135
|
storePath
|
|
146
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-GVT5363M.js";
|
|
147
137
|
import {
|
|
148
138
|
openCache
|
|
149
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-M7E44TMT.js";
|
|
150
140
|
import {
|
|
151
141
|
queryFieldsOf
|
|
152
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-EOSVN2ER.js";
|
|
153
143
|
import {
|
|
154
|
-
Credentials,
|
|
155
|
-
pathsAreOverridden,
|
|
156
144
|
resolvePaths,
|
|
157
145
|
writeSecurely
|
|
158
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-OORMSM6O.js";
|
|
159
147
|
import {
|
|
160
148
|
array,
|
|
161
149
|
boolean,
|
|
162
150
|
check,
|
|
163
151
|
forward,
|
|
164
152
|
getDotPath,
|
|
165
|
-
integer,
|
|
166
153
|
minLength,
|
|
167
154
|
nullable,
|
|
168
|
-
number,
|
|
169
155
|
object,
|
|
170
156
|
optional,
|
|
171
157
|
parse,
|
|
@@ -177,9 +163,8 @@ import {
|
|
|
177
163
|
strictObject,
|
|
178
164
|
string,
|
|
179
165
|
transform,
|
|
180
|
-
trim
|
|
181
|
-
|
|
182
|
-
} from "./chunk-NRRI37NJ.js";
|
|
166
|
+
trim
|
|
167
|
+
} from "./chunk-WOIHSQAL.js";
|
|
183
168
|
import {
|
|
184
169
|
CliError
|
|
185
170
|
} from "./chunk-FEM2JQN2.js";
|
|
@@ -360,14 +345,14 @@ var require_liquid_node = __commonJS({
|
|
|
360
345
|
return value !== null && (type === "object" || type === "function");
|
|
361
346
|
}
|
|
362
347
|
__name(isObject, "isObject");
|
|
363
|
-
function
|
|
348
|
+
function range(start, stop, step = 1) {
|
|
364
349
|
const arr = [];
|
|
365
350
|
for (let i = start; i < stop; i += step) {
|
|
366
351
|
arr.push(i);
|
|
367
352
|
}
|
|
368
353
|
return arr;
|
|
369
354
|
}
|
|
370
|
-
__name(
|
|
355
|
+
__name(range, "range");
|
|
371
356
|
function padStart(str, length, ch = " ") {
|
|
372
357
|
return pad(str, length, ch, (str2, ch2) => ch2 + str2);
|
|
373
358
|
}
|
|
@@ -561,7 +546,7 @@ var require_liquid_node = __commonJS({
|
|
|
561
546
|
const lines = token.input.split("\n");
|
|
562
547
|
const begin = Math.max(line - 2, 1);
|
|
563
548
|
const end = Math.min(line + 3, lines.length);
|
|
564
|
-
const context =
|
|
549
|
+
const context = range(begin, end + 1).map((lineNumber) => {
|
|
565
550
|
const rowIndicator = lineNumber === line ? ">> " : " ";
|
|
566
551
|
const num = padStart(String(lineNumber), String(end).length);
|
|
567
552
|
let text = `${rowIndicator}${num}| `;
|
|
@@ -1139,8 +1124,8 @@ var require_liquid_node = __commonJS({
|
|
|
1139
1124
|
valid() {
|
|
1140
1125
|
return !isNaN(this.getTime());
|
|
1141
1126
|
}
|
|
1142
|
-
format(
|
|
1143
|
-
return this.DateTimeFormat && this.DateTimeFormat(this.locale,
|
|
1127
|
+
format(options) {
|
|
1128
|
+
return this.DateTimeFormat && this.DateTimeFormat(this.locale, options).format(this.displayDate);
|
|
1144
1129
|
}
|
|
1145
1130
|
/**
|
|
1146
1131
|
* Create a Date object fixed to it's declared Timezone. Both
|
|
@@ -1224,11 +1209,11 @@ var require_liquid_node = __commonJS({
|
|
|
1224
1209
|
static {
|
|
1225
1210
|
__name(this, "TagToken");
|
|
1226
1211
|
}
|
|
1227
|
-
constructor(input, begin, end,
|
|
1228
|
-
const { trimTagLeft, trimTagRight, tagDelimiterLeft, tagDelimiterRight } =
|
|
1212
|
+
constructor(input, begin, end, options, file2) {
|
|
1213
|
+
const { trimTagLeft, trimTagRight, tagDelimiterLeft, tagDelimiterRight } = options;
|
|
1229
1214
|
const [valueBegin, valueEnd] = [begin + tagDelimiterLeft.length, end - tagDelimiterRight.length];
|
|
1230
1215
|
super(exports.TokenKind.Tag, [valueBegin, valueEnd], input, begin, end, trimTagLeft, trimTagRight, file2);
|
|
1231
|
-
this.tokenizer = new Tokenizer(input,
|
|
1216
|
+
this.tokenizer = new Tokenizer(input, options.operators, file2, this.contentRange, options.groupedExpressions);
|
|
1232
1217
|
this.name = this.tokenizer.readTagName();
|
|
1233
1218
|
this.tokenizer.assert(this.name, `illegal tag syntax, tag name expected`);
|
|
1234
1219
|
this.tokenizer.skipBlank();
|
|
@@ -1239,8 +1224,8 @@ var require_liquid_node = __commonJS({
|
|
|
1239
1224
|
static {
|
|
1240
1225
|
__name(this, "OutputToken");
|
|
1241
1226
|
}
|
|
1242
|
-
constructor(input, begin, end,
|
|
1243
|
-
const { trimOutputLeft, trimOutputRight, outputDelimiterLeft, outputDelimiterRight } =
|
|
1227
|
+
constructor(input, begin, end, options, file2) {
|
|
1228
|
+
const { trimOutputLeft, trimOutputRight, outputDelimiterLeft, outputDelimiterRight } = options;
|
|
1244
1229
|
const valueRange = [begin + outputDelimiterLeft.length, end - outputDelimiterRight.length];
|
|
1245
1230
|
super(exports.TokenKind.Output, valueRange, input, begin, end, trimOutputLeft, trimOutputRight, file2);
|
|
1246
1231
|
}
|
|
@@ -1459,9 +1444,9 @@ var require_liquid_node = __commonJS({
|
|
|
1459
1444
|
static {
|
|
1460
1445
|
__name(this, "LiquidTagToken");
|
|
1461
1446
|
}
|
|
1462
|
-
constructor(input, begin, end,
|
|
1447
|
+
constructor(input, begin, end, options, file2) {
|
|
1463
1448
|
super(exports.TokenKind.Tag, [begin, end], input, begin, end, false, false, file2);
|
|
1464
|
-
this.tokenizer = new Tokenizer(input,
|
|
1449
|
+
this.tokenizer = new Tokenizer(input, options.operators, file2, this.contentRange, options.groupedExpressions);
|
|
1465
1450
|
this.name = this.tokenizer.readTagName();
|
|
1466
1451
|
this.tokenizer.assert(this.name, "illegal liquid tag syntax");
|
|
1467
1452
|
this.tokenizer.skipBlank();
|
|
@@ -1535,11 +1520,11 @@ var require_liquid_node = __commonJS({
|
|
|
1535
1520
|
static {
|
|
1536
1521
|
__name(this, "Filter");
|
|
1537
1522
|
}
|
|
1538
|
-
constructor(token,
|
|
1523
|
+
constructor(token, options, liquid) {
|
|
1539
1524
|
this.token = token;
|
|
1540
1525
|
this.name = token.name;
|
|
1541
|
-
this.handler = isFunction(
|
|
1542
|
-
this.raw = !isFunction(
|
|
1526
|
+
this.handler = isFunction(options) ? options : isFunction(options?.handler) ? options.handler : identify;
|
|
1527
|
+
this.raw = !isFunction(options) && !!options?.raw;
|
|
1543
1528
|
this.args = token.args;
|
|
1544
1529
|
this.liquid = liquid;
|
|
1545
1530
|
}
|
|
@@ -1642,7 +1627,7 @@ var require_liquid_node = __commonJS({
|
|
|
1642
1627
|
const low = yield evalTokenValue(token.lhs, ctx);
|
|
1643
1628
|
const high = yield evalTokenValue(token.rhs, ctx);
|
|
1644
1629
|
ctx.memoryLimit.use(high - low + 1);
|
|
1645
|
-
return
|
|
1630
|
+
return range(+low, +high + 1);
|
|
1646
1631
|
}
|
|
1647
1632
|
__name(evalRangeToken, "evalRangeToken");
|
|
1648
1633
|
function* toPostfix(tokens) {
|
|
@@ -2123,41 +2108,41 @@ var require_liquid_node = __commonJS({
|
|
|
2123
2108
|
parseLimit: Infinity,
|
|
2124
2109
|
renderLimit: Infinity
|
|
2125
2110
|
};
|
|
2126
|
-
function normalize(
|
|
2127
|
-
if (
|
|
2128
|
-
if (!
|
|
2129
|
-
|
|
2130
|
-
if (!
|
|
2131
|
-
|
|
2132
|
-
}
|
|
2133
|
-
if (
|
|
2111
|
+
function normalize(options) {
|
|
2112
|
+
if (options.hasOwnProperty("root")) {
|
|
2113
|
+
if (!options.hasOwnProperty("partials"))
|
|
2114
|
+
options.partials = options.root;
|
|
2115
|
+
if (!options.hasOwnProperty("layouts"))
|
|
2116
|
+
options.layouts = options.root;
|
|
2117
|
+
}
|
|
2118
|
+
if (options.hasOwnProperty("cache")) {
|
|
2134
2119
|
let cache;
|
|
2135
|
-
if (typeof
|
|
2136
|
-
cache =
|
|
2137
|
-
else if (typeof
|
|
2138
|
-
cache =
|
|
2120
|
+
if (typeof options.cache === "number")
|
|
2121
|
+
cache = options.cache > 0 ? new LRU(options.cache) : void 0;
|
|
2122
|
+
else if (typeof options.cache === "object")
|
|
2123
|
+
cache = options.cache;
|
|
2139
2124
|
else
|
|
2140
|
-
cache =
|
|
2141
|
-
|
|
2125
|
+
cache = options.cache ? new LRU(1024) : void 0;
|
|
2126
|
+
options.cache = cache;
|
|
2142
2127
|
}
|
|
2143
|
-
|
|
2144
|
-
if ((!
|
|
2128
|
+
options = { ...defaultOptions, ...options.jekyllInclude ? { dynamicPartials: false } : {}, ...options };
|
|
2129
|
+
if ((!options.fs.dirname || !options.fs.sep) && options.relativeReference) {
|
|
2145
2130
|
console.warn("[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning");
|
|
2146
|
-
|
|
2131
|
+
options.relativeReference = false;
|
|
2147
2132
|
}
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
if (!
|
|
2153
|
-
|
|
2133
|
+
options.root = normalizeDirectoryList(options.root);
|
|
2134
|
+
options.partials = normalizeDirectoryList(options.partials);
|
|
2135
|
+
options.layouts = normalizeDirectoryList(options.layouts);
|
|
2136
|
+
options.outputEscape = options.outputEscape && getOutputEscapeFunction(options.outputEscape);
|
|
2137
|
+
if (!options.locale) {
|
|
2138
|
+
options.locale = getDateTimeFormat()?.().resolvedOptions().locale ?? "en-US";
|
|
2154
2139
|
}
|
|
2155
|
-
if (
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2140
|
+
if (options.templates) {
|
|
2141
|
+
options.fs = new MapFS(options.templates);
|
|
2142
|
+
options.relativeReference = true;
|
|
2143
|
+
options.root = options.partials = options.layouts = ".";
|
|
2159
2144
|
}
|
|
2160
|
-
return
|
|
2145
|
+
return options;
|
|
2161
2146
|
}
|
|
2162
2147
|
__name(normalize, "normalize");
|
|
2163
2148
|
function getOutputEscapeFunction(nameOrFunction) {
|
|
@@ -2178,14 +2163,14 @@ var require_liquid_node = __commonJS({
|
|
|
2178
2163
|
return list;
|
|
2179
2164
|
}
|
|
2180
2165
|
__name(normalizeDirectoryList, "normalizeDirectoryList");
|
|
2181
|
-
function whiteSpaceCtrl(tokens,
|
|
2166
|
+
function whiteSpaceCtrl(tokens, options) {
|
|
2182
2167
|
let inRaw = false;
|
|
2183
2168
|
for (let i = 0; i < tokens.length; i++) {
|
|
2184
2169
|
const token = tokens[i];
|
|
2185
2170
|
if (!isDelimitedToken(token))
|
|
2186
2171
|
continue;
|
|
2187
2172
|
if (!inRaw && token.trimLeft) {
|
|
2188
|
-
trimLeft(tokens[i - 1],
|
|
2173
|
+
trimLeft(tokens[i - 1], options.greedy);
|
|
2189
2174
|
}
|
|
2190
2175
|
if (isTagToken(token)) {
|
|
2191
2176
|
if (token.name === "raw")
|
|
@@ -2194,7 +2179,7 @@ var require_liquid_node = __commonJS({
|
|
|
2194
2179
|
inRaw = false;
|
|
2195
2180
|
}
|
|
2196
2181
|
if (!inRaw && token.trimRight) {
|
|
2197
|
-
trimRight(tokens[i + 1],
|
|
2182
|
+
trimRight(tokens[i + 1], options.greedy);
|
|
2198
2183
|
}
|
|
2199
2184
|
}
|
|
2200
2185
|
}
|
|
@@ -2221,12 +2206,12 @@ var require_liquid_node = __commonJS({
|
|
|
2221
2206
|
static {
|
|
2222
2207
|
__name(this, "Tokenizer");
|
|
2223
2208
|
}
|
|
2224
|
-
constructor(input, operators = defaultOptions.operators, file2,
|
|
2209
|
+
constructor(input, operators = defaultOptions.operators, file2, range2, groupedExpressions = false) {
|
|
2225
2210
|
this.input = input;
|
|
2226
2211
|
this.file = file2;
|
|
2227
2212
|
this.rawBeginAt = -1;
|
|
2228
|
-
this.p =
|
|
2229
|
-
this.N =
|
|
2213
|
+
this.p = range2 ? range2[0] : 0;
|
|
2214
|
+
this.N = range2 ? range2[1] : input.length;
|
|
2230
2215
|
this.opTrie = createTrie(operators);
|
|
2231
2216
|
this.literalTrie = createTrie(literalValues);
|
|
2232
2217
|
this.groupedExpressions = groupedExpressions;
|
|
@@ -2326,23 +2311,23 @@ var require_liquid_node = __commonJS({
|
|
|
2326
2311
|
const value = this.readValue();
|
|
2327
2312
|
return [key.getText(), value];
|
|
2328
2313
|
}
|
|
2329
|
-
readTopLevelTokens(
|
|
2314
|
+
readTopLevelTokens(options = defaultOptions) {
|
|
2330
2315
|
const tokens = [];
|
|
2331
2316
|
while (this.p < this.N) {
|
|
2332
|
-
const token = this.readTopLevelToken(
|
|
2317
|
+
const token = this.readTopLevelToken(options);
|
|
2333
2318
|
tokens.push(token);
|
|
2334
2319
|
}
|
|
2335
|
-
whiteSpaceCtrl(tokens,
|
|
2320
|
+
whiteSpaceCtrl(tokens, options);
|
|
2336
2321
|
return tokens;
|
|
2337
2322
|
}
|
|
2338
|
-
readTopLevelToken(
|
|
2339
|
-
const { tagDelimiterLeft, outputDelimiterLeft } =
|
|
2323
|
+
readTopLevelToken(options) {
|
|
2324
|
+
const { tagDelimiterLeft, outputDelimiterLeft } = options;
|
|
2340
2325
|
if (this.rawBeginAt > -1)
|
|
2341
|
-
return this.readEndrawOrRawContent(
|
|
2326
|
+
return this.readEndrawOrRawContent(options);
|
|
2342
2327
|
if (this.match(tagDelimiterLeft))
|
|
2343
|
-
return this.readTagToken(
|
|
2328
|
+
return this.readTagToken(options);
|
|
2344
2329
|
if (this.match(outputDelimiterLeft))
|
|
2345
|
-
return this.readOutputToken(
|
|
2330
|
+
return this.readOutputToken(options);
|
|
2346
2331
|
return this.readHTMLToken([tagDelimiterLeft, outputDelimiterLeft]);
|
|
2347
2332
|
}
|
|
2348
2333
|
readHTMLToken(stopStrings) {
|
|
@@ -2354,13 +2339,13 @@ var require_liquid_node = __commonJS({
|
|
|
2354
2339
|
}
|
|
2355
2340
|
return new HTMLToken(this.input, begin, this.p, this.file);
|
|
2356
2341
|
}
|
|
2357
|
-
readTagToken(
|
|
2342
|
+
readTagToken(options) {
|
|
2358
2343
|
const { file: file2, input } = this;
|
|
2359
2344
|
const begin = this.p;
|
|
2360
|
-
if (this.readToDelimiter(
|
|
2345
|
+
if (this.readToDelimiter(options.tagDelimiterRight) === -1) {
|
|
2361
2346
|
throw this.error(`tag ${this.snapshot(begin)} not closed`, begin);
|
|
2362
2347
|
}
|
|
2363
|
-
const token = new TagToken(input, begin, this.p,
|
|
2348
|
+
const token = new TagToken(input, begin, this.p, options, file2);
|
|
2364
2349
|
if (token.name === "raw")
|
|
2365
2350
|
this.rawBeginAt = begin;
|
|
2366
2351
|
return token;
|
|
@@ -2378,17 +2363,17 @@ var require_liquid_node = __commonJS({
|
|
|
2378
2363
|
}
|
|
2379
2364
|
return -1;
|
|
2380
2365
|
}
|
|
2381
|
-
readOutputToken(
|
|
2366
|
+
readOutputToken(options = defaultOptions) {
|
|
2382
2367
|
const { file: file2, input } = this;
|
|
2383
|
-
const { outputDelimiterRight } =
|
|
2368
|
+
const { outputDelimiterRight } = options;
|
|
2384
2369
|
const begin = this.p;
|
|
2385
2370
|
if (this.readToDelimiter(outputDelimiterRight, true) === -1) {
|
|
2386
2371
|
throw this.error(`output ${this.snapshot(begin)} not closed`, begin);
|
|
2387
2372
|
}
|
|
2388
|
-
return new OutputToken(input, begin, this.p,
|
|
2373
|
+
return new OutputToken(input, begin, this.p, options, file2);
|
|
2389
2374
|
}
|
|
2390
|
-
readEndrawOrRawContent(
|
|
2391
|
-
const { tagDelimiterLeft, tagDelimiterRight } =
|
|
2375
|
+
readEndrawOrRawContent(options) {
|
|
2376
|
+
const { tagDelimiterLeft, tagDelimiterRight } = options;
|
|
2392
2377
|
const begin = this.p;
|
|
2393
2378
|
let leftPos = this.readTo(tagDelimiterLeft) - tagDelimiterLeft.length;
|
|
2394
2379
|
while (this.p < this.N) {
|
|
@@ -2401,7 +2386,7 @@ var require_liquid_node = __commonJS({
|
|
|
2401
2386
|
const end = this.p;
|
|
2402
2387
|
if (begin === leftPos) {
|
|
2403
2388
|
this.rawBeginAt = -1;
|
|
2404
|
-
return new TagToken(this.input, begin, end,
|
|
2389
|
+
return new TagToken(this.input, begin, end, options, this.file);
|
|
2405
2390
|
} else {
|
|
2406
2391
|
this.p = leftPos;
|
|
2407
2392
|
return new HTMLToken(this.input, begin, leftPos, this.file);
|
|
@@ -2414,22 +2399,22 @@ var require_liquid_node = __commonJS({
|
|
|
2414
2399
|
}
|
|
2415
2400
|
throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`, begin);
|
|
2416
2401
|
}
|
|
2417
|
-
readLiquidTagTokens(
|
|
2402
|
+
readLiquidTagTokens(options = defaultOptions) {
|
|
2418
2403
|
const tokens = [];
|
|
2419
2404
|
while (this.p < this.N) {
|
|
2420
|
-
const token = this.readLiquidTagToken(
|
|
2405
|
+
const token = this.readLiquidTagToken(options);
|
|
2421
2406
|
token && tokens.push(token);
|
|
2422
2407
|
}
|
|
2423
2408
|
return tokens;
|
|
2424
2409
|
}
|
|
2425
|
-
readLiquidTagToken(
|
|
2410
|
+
readLiquidTagToken(options) {
|
|
2426
2411
|
this.skipBlank();
|
|
2427
2412
|
if (this.end())
|
|
2428
2413
|
return;
|
|
2429
2414
|
const begin = this.p;
|
|
2430
2415
|
this.readToDelimiter("\n");
|
|
2431
2416
|
const end = this.p;
|
|
2432
|
-
return new LiquidTagToken(this.input, begin, end,
|
|
2417
|
+
return new LiquidTagToken(this.input, begin, end, options, this.file);
|
|
2433
2418
|
}
|
|
2434
2419
|
error(msg, pos = this.p) {
|
|
2435
2420
|
return new TokenizationError(msg, new IdentifierToken(this.input, pos, this.N, this.file));
|
|
@@ -2641,12 +2626,12 @@ var require_liquid_node = __commonJS({
|
|
|
2641
2626
|
}
|
|
2642
2627
|
return new QuotedToken(this.input, begin, this.p, this.file);
|
|
2643
2628
|
}
|
|
2644
|
-
*readFileNameTemplate(
|
|
2645
|
-
const { outputDelimiterLeft } =
|
|
2629
|
+
*readFileNameTemplate(options) {
|
|
2630
|
+
const { outputDelimiterLeft } = options;
|
|
2646
2631
|
const htmlStopStrings = [",", " ", "\r", "\n", " ", outputDelimiterLeft];
|
|
2647
2632
|
const htmlStopStringSet = new Set(htmlStopStrings);
|
|
2648
2633
|
while (this.p < this.N && !htmlStopStringSet.has(this.peek())) {
|
|
2649
|
-
yield this.match(outputDelimiterLeft) ? this.readOutputToken(
|
|
2634
|
+
yield this.match(outputDelimiterLeft) ? this.readOutputToken(options) : this.readHTMLToken(htmlStopStrings);
|
|
2650
2635
|
}
|
|
2651
2636
|
}
|
|
2652
2637
|
match(word) {
|
|
@@ -2721,7 +2706,7 @@ var require_liquid_node = __commonJS({
|
|
|
2721
2706
|
this.token = token;
|
|
2722
2707
|
}
|
|
2723
2708
|
};
|
|
2724
|
-
var
|
|
2709
|
+
var Tag3 = class extends TemplateImpl {
|
|
2725
2710
|
static {
|
|
2726
2711
|
__name(this, "Tag");
|
|
2727
2712
|
}
|
|
@@ -2751,17 +2736,17 @@ var require_liquid_node = __commonJS({
|
|
|
2751
2736
|
return hash;
|
|
2752
2737
|
}
|
|
2753
2738
|
};
|
|
2754
|
-
function createTagClass(
|
|
2755
|
-
return class extends
|
|
2739
|
+
function createTagClass(options) {
|
|
2740
|
+
return class extends Tag3 {
|
|
2756
2741
|
constructor(token, tokens, liquid) {
|
|
2757
2742
|
super(token, tokens, liquid);
|
|
2758
|
-
if (isFunction(
|
|
2759
|
-
|
|
2743
|
+
if (isFunction(options.parse)) {
|
|
2744
|
+
options.parse.call(this, token, tokens);
|
|
2760
2745
|
}
|
|
2761
2746
|
}
|
|
2762
2747
|
*render(ctx, emitter) {
|
|
2763
2748
|
const hash = yield new Hash(this.token.args, ctx.opts.keyValueSeparator).render(ctx);
|
|
2764
|
-
return yield
|
|
2749
|
+
return yield options.render.call(this, ctx, emitter, hash);
|
|
2765
2750
|
}
|
|
2766
2751
|
};
|
|
2767
2752
|
}
|
|
@@ -2978,13 +2963,13 @@ var require_liquid_node = __commonJS({
|
|
|
2978
2963
|
};
|
|
2979
2964
|
}
|
|
2980
2965
|
__name(_analyze, "_analyze");
|
|
2981
|
-
function analyze(template2,
|
|
2982
|
-
const opts = { ...defaultStaticAnalysisOptions, ...
|
|
2966
|
+
function analyze(template2, options = {}) {
|
|
2967
|
+
const opts = { ...defaultStaticAnalysisOptions, ...options };
|
|
2983
2968
|
return toPromise(_analyze(template2, opts.partials, false));
|
|
2984
2969
|
}
|
|
2985
2970
|
__name(analyze, "analyze");
|
|
2986
|
-
function analyzeSync(template2,
|
|
2987
|
-
const opts = { ...defaultStaticAnalysisOptions, ...
|
|
2971
|
+
function analyzeSync(template2, options = {}) {
|
|
2972
|
+
const opts = { ...defaultStaticAnalysisOptions, ...options };
|
|
2988
2973
|
return toValueSync(_analyze(template2, opts.partials, true));
|
|
2989
2974
|
}
|
|
2990
2975
|
__name(analyzeSync, "analyzeSync");
|
|
@@ -3160,17 +3145,17 @@ var require_liquid_node = __commonJS({
|
|
|
3160
3145
|
static {
|
|
3161
3146
|
__name(this, "Loader");
|
|
3162
3147
|
}
|
|
3163
|
-
constructor(
|
|
3164
|
-
this.options =
|
|
3165
|
-
if (
|
|
3166
|
-
const sep =
|
|
3148
|
+
constructor(options) {
|
|
3149
|
+
this.options = options;
|
|
3150
|
+
if (options.relativeReference) {
|
|
3151
|
+
const sep = options.fs.sep;
|
|
3167
3152
|
assert(sep, "`fs.sep` is required for relative reference");
|
|
3168
3153
|
const prefixes = ["." + sep, ".." + sep, "./", "../"];
|
|
3169
3154
|
this.shouldLoadRelative = (referencedFile) => prefixes.some((prefix) => referencedFile.startsWith(prefix));
|
|
3170
3155
|
} else {
|
|
3171
3156
|
this.shouldLoadRelative = (_referencedFile) => false;
|
|
3172
3157
|
}
|
|
3173
|
-
const fs2 =
|
|
3158
|
+
const fs2 = options.fs;
|
|
3174
3159
|
this.contains = toLiquidAsync(fs2.contains?.bind(fs2) || (async () => true), fs2.containsSync?.bind(fs2) || (() => true));
|
|
3175
3160
|
this.exists = toLiquidAsync(fs2.exists?.bind(fs2) || (async () => false), fs2.existsSync?.bind(fs2));
|
|
3176
3161
|
}
|
|
@@ -4320,7 +4305,7 @@ var require_liquid_node = __commonJS({
|
|
|
4320
4305
|
...cryptoFilters,
|
|
4321
4306
|
...misc
|
|
4322
4307
|
};
|
|
4323
|
-
var AssignTag = class extends
|
|
4308
|
+
var AssignTag = class extends Tag3 {
|
|
4324
4309
|
static {
|
|
4325
4310
|
__name(this, "AssignTag");
|
|
4326
4311
|
}
|
|
@@ -4345,7 +4330,7 @@ var require_liquid_node = __commonJS({
|
|
|
4345
4330
|
}
|
|
4346
4331
|
};
|
|
4347
4332
|
var MODIFIERS = ["offset", "limit", "reversed"];
|
|
4348
|
-
var ForTag = class extends
|
|
4333
|
+
var ForTag = class extends Tag3 {
|
|
4349
4334
|
static {
|
|
4350
4335
|
__name(this, "ForTag");
|
|
4351
4336
|
}
|
|
@@ -4438,7 +4423,7 @@ var require_liquid_node = __commonJS({
|
|
|
4438
4423
|
return arr.slice(0, count3);
|
|
4439
4424
|
}
|
|
4440
4425
|
__name(limit2, "limit");
|
|
4441
|
-
var CaptureTag = class extends
|
|
4426
|
+
var CaptureTag = class extends Tag3 {
|
|
4442
4427
|
static {
|
|
4443
4428
|
__name(this, "CaptureTag");
|
|
4444
4429
|
}
|
|
@@ -4476,7 +4461,7 @@ var require_liquid_node = __commonJS({
|
|
|
4476
4461
|
yield this.identifier;
|
|
4477
4462
|
}
|
|
4478
4463
|
};
|
|
4479
|
-
var CaseTag = class extends
|
|
4464
|
+
var CaseTag = class extends Tag3 {
|
|
4480
4465
|
static {
|
|
4481
4466
|
__name(this, "CaseTag");
|
|
4482
4467
|
}
|
|
@@ -4549,7 +4534,7 @@ var require_liquid_node = __commonJS({
|
|
|
4549
4534
|
return templates;
|
|
4550
4535
|
}
|
|
4551
4536
|
};
|
|
4552
|
-
var CommentTag = class extends
|
|
4537
|
+
var CommentTag = class extends Tag3 {
|
|
4553
4538
|
static {
|
|
4554
4539
|
__name(this, "CommentTag");
|
|
4555
4540
|
}
|
|
@@ -4565,7 +4550,7 @@ var require_liquid_node = __commonJS({
|
|
|
4565
4550
|
render() {
|
|
4566
4551
|
}
|
|
4567
4552
|
};
|
|
4568
|
-
var RenderTag = class extends
|
|
4553
|
+
var RenderTag = class extends Tag3 {
|
|
4569
4554
|
static {
|
|
4570
4555
|
__name(this, "RenderTag");
|
|
4571
4556
|
}
|
|
@@ -4712,7 +4697,7 @@ var require_liquid_node = __commonJS({
|
|
|
4712
4697
|
return yield evalToken(file2, ctx);
|
|
4713
4698
|
}
|
|
4714
4699
|
__name(renderFilePath, "renderFilePath");
|
|
4715
|
-
var IncludeTag = class extends
|
|
4700
|
+
var IncludeTag = class extends Tag3 {
|
|
4716
4701
|
static {
|
|
4717
4702
|
__name(this, "IncludeTag");
|
|
4718
4703
|
}
|
|
@@ -4780,7 +4765,7 @@ var require_liquid_node = __commonJS({
|
|
|
4780
4765
|
}
|
|
4781
4766
|
}
|
|
4782
4767
|
};
|
|
4783
|
-
var DecrementTag = class extends
|
|
4768
|
+
var DecrementTag = class extends Tag3 {
|
|
4784
4769
|
static {
|
|
4785
4770
|
__name(this, "DecrementTag");
|
|
4786
4771
|
}
|
|
@@ -4800,7 +4785,7 @@ var require_liquid_node = __commonJS({
|
|
|
4800
4785
|
yield this.identifier;
|
|
4801
4786
|
}
|
|
4802
4787
|
};
|
|
4803
|
-
var CycleTag = class extends
|
|
4788
|
+
var CycleTag = class extends Tag3 {
|
|
4804
4789
|
static {
|
|
4805
4790
|
__name(this, "CycleTag");
|
|
4806
4791
|
}
|
|
@@ -4844,7 +4829,7 @@ var require_liquid_node = __commonJS({
|
|
|
4844
4829
|
}
|
|
4845
4830
|
}
|
|
4846
4831
|
};
|
|
4847
|
-
var IfTag = class extends
|
|
4832
|
+
var IfTag = class extends Tag3 {
|
|
4848
4833
|
static {
|
|
4849
4834
|
__name(this, "IfTag");
|
|
4850
4835
|
}
|
|
@@ -4894,7 +4879,7 @@ var require_liquid_node = __commonJS({
|
|
|
4894
4879
|
return this.branches.map((b) => b.value);
|
|
4895
4880
|
}
|
|
4896
4881
|
};
|
|
4897
|
-
var IncrementTag = class extends
|
|
4882
|
+
var IncrementTag = class extends Tag3 {
|
|
4898
4883
|
static {
|
|
4899
4884
|
__name(this, "IncrementTag");
|
|
4900
4885
|
}
|
|
@@ -4916,7 +4901,7 @@ var require_liquid_node = __commonJS({
|
|
|
4916
4901
|
yield this.identifier;
|
|
4917
4902
|
}
|
|
4918
4903
|
};
|
|
4919
|
-
var LayoutTag = class extends
|
|
4904
|
+
var LayoutTag = class extends Tag3 {
|
|
4920
4905
|
static {
|
|
4921
4906
|
__name(this, "LayoutTag");
|
|
4922
4907
|
}
|
|
@@ -4971,7 +4956,7 @@ var require_liquid_node = __commonJS({
|
|
|
4971
4956
|
}
|
|
4972
4957
|
}
|
|
4973
4958
|
};
|
|
4974
|
-
var BlockTag = class extends
|
|
4959
|
+
var BlockTag = class extends Tag3 {
|
|
4975
4960
|
static {
|
|
4976
4961
|
__name(this, "BlockTag");
|
|
4977
4962
|
}
|
|
@@ -5020,7 +5005,7 @@ var require_liquid_node = __commonJS({
|
|
|
5020
5005
|
return ["block"];
|
|
5021
5006
|
}
|
|
5022
5007
|
};
|
|
5023
|
-
var RawTag = class extends
|
|
5008
|
+
var RawTag = class extends Tag3 {
|
|
5024
5009
|
static {
|
|
5025
5010
|
__name(this, "RawTag");
|
|
5026
5011
|
}
|
|
@@ -5064,7 +5049,7 @@ var require_liquid_node = __commonJS({
|
|
|
5064
5049
|
return this.col() === this.cols;
|
|
5065
5050
|
}
|
|
5066
5051
|
};
|
|
5067
|
-
var TablerowTag = class extends
|
|
5052
|
+
var TablerowTag = class extends Tag3 {
|
|
5068
5053
|
static {
|
|
5069
5054
|
__name(this, "TablerowTag");
|
|
5070
5055
|
}
|
|
@@ -5128,7 +5113,7 @@ var require_liquid_node = __commonJS({
|
|
|
5128
5113
|
return [this.variable, "tablerowloop"];
|
|
5129
5114
|
}
|
|
5130
5115
|
};
|
|
5131
|
-
var UnlessTag = class extends
|
|
5116
|
+
var UnlessTag = class extends Tag3 {
|
|
5132
5117
|
static {
|
|
5133
5118
|
__name(this, "UnlessTag");
|
|
5134
5119
|
}
|
|
@@ -5187,7 +5172,7 @@ var require_liquid_node = __commonJS({
|
|
|
5187
5172
|
return this.branches.map((b) => b.value);
|
|
5188
5173
|
}
|
|
5189
5174
|
};
|
|
5190
|
-
var BreakTag = class extends
|
|
5175
|
+
var BreakTag = class extends Tag3 {
|
|
5191
5176
|
static {
|
|
5192
5177
|
__name(this, "BreakTag");
|
|
5193
5178
|
}
|
|
@@ -5195,7 +5180,7 @@ var require_liquid_node = __commonJS({
|
|
|
5195
5180
|
ctx.breakCalled = true;
|
|
5196
5181
|
}
|
|
5197
5182
|
};
|
|
5198
|
-
var ContinueTag = class extends
|
|
5183
|
+
var ContinueTag = class extends Tag3 {
|
|
5199
5184
|
static {
|
|
5200
5185
|
__name(this, "ContinueTag");
|
|
5201
5186
|
}
|
|
@@ -5203,7 +5188,7 @@ var require_liquid_node = __commonJS({
|
|
|
5203
5188
|
ctx.continueCalled = true;
|
|
5204
5189
|
}
|
|
5205
5190
|
};
|
|
5206
|
-
var EchoTag = class extends
|
|
5191
|
+
var EchoTag = class extends Tag3 {
|
|
5207
5192
|
static {
|
|
5208
5193
|
__name(this, "EchoTag");
|
|
5209
5194
|
}
|
|
@@ -5226,7 +5211,7 @@ var require_liquid_node = __commonJS({
|
|
|
5226
5211
|
}
|
|
5227
5212
|
}
|
|
5228
5213
|
};
|
|
5229
|
-
var LiquidTag = class extends
|
|
5214
|
+
var LiquidTag = class extends Tag3 {
|
|
5230
5215
|
static {
|
|
5231
5216
|
__name(this, "LiquidTag");
|
|
5232
5217
|
}
|
|
@@ -5242,7 +5227,7 @@ var require_liquid_node = __commonJS({
|
|
|
5242
5227
|
return this.templates;
|
|
5243
5228
|
}
|
|
5244
5229
|
};
|
|
5245
|
-
var InlineCommentTag = class extends
|
|
5230
|
+
var InlineCommentTag = class extends Tag3 {
|
|
5246
5231
|
static {
|
|
5247
5232
|
__name(this, "InlineCommentTag");
|
|
5248
5233
|
}
|
|
@@ -5385,76 +5370,76 @@ var require_liquid_node = __commonJS({
|
|
|
5385
5370
|
self.renderFile(filePath, ctx).then((html) => callback(null, html), callback);
|
|
5386
5371
|
};
|
|
5387
5372
|
}
|
|
5388
|
-
async analyze(template2,
|
|
5389
|
-
return analyze(template2,
|
|
5373
|
+
async analyze(template2, options = {}) {
|
|
5374
|
+
return analyze(template2, options);
|
|
5390
5375
|
}
|
|
5391
|
-
analyzeSync(template2,
|
|
5392
|
-
return analyzeSync(template2,
|
|
5376
|
+
analyzeSync(template2, options = {}) {
|
|
5377
|
+
return analyzeSync(template2, options);
|
|
5393
5378
|
}
|
|
5394
|
-
async parseAndAnalyze(html, filename,
|
|
5395
|
-
return analyze(this.parse(html, filename),
|
|
5379
|
+
async parseAndAnalyze(html, filename, options = {}) {
|
|
5380
|
+
return analyze(this.parse(html, filename), options);
|
|
5396
5381
|
}
|
|
5397
|
-
parseAndAnalyzeSync(html, filename,
|
|
5398
|
-
return analyzeSync(this.parse(html, filename),
|
|
5382
|
+
parseAndAnalyzeSync(html, filename, options = {}) {
|
|
5383
|
+
return analyzeSync(this.parse(html, filename), options);
|
|
5399
5384
|
}
|
|
5400
5385
|
/** Return an array of all variables without their properties. */
|
|
5401
|
-
async variables(template2,
|
|
5402
|
-
const analysis = await analyze(isString(template2) ? this.parse(template2) : template2,
|
|
5386
|
+
async variables(template2, options = {}) {
|
|
5387
|
+
const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options);
|
|
5403
5388
|
return Object.keys(analysis.variables);
|
|
5404
5389
|
}
|
|
5405
5390
|
/** Return an array of all variables without their properties. */
|
|
5406
|
-
variablesSync(template2,
|
|
5407
|
-
const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2,
|
|
5391
|
+
variablesSync(template2, options = {}) {
|
|
5392
|
+
const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options);
|
|
5408
5393
|
return Object.keys(analysis.variables);
|
|
5409
5394
|
}
|
|
5410
5395
|
/** Return an array of all variables including their properties/paths. */
|
|
5411
|
-
async fullVariables(template2,
|
|
5412
|
-
const analysis = await analyze(isString(template2) ? this.parse(template2) : template2,
|
|
5396
|
+
async fullVariables(template2, options = {}) {
|
|
5397
|
+
const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options);
|
|
5413
5398
|
return Array.from(new Set(Object.values(analysis.variables).flatMap((a) => a.map((v) => String(v)))));
|
|
5414
5399
|
}
|
|
5415
5400
|
/** Return an array of all variables including their properties/paths. */
|
|
5416
|
-
fullVariablesSync(template2,
|
|
5417
|
-
const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2,
|
|
5401
|
+
fullVariablesSync(template2, options = {}) {
|
|
5402
|
+
const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options);
|
|
5418
5403
|
return Array.from(new Set(Object.values(analysis.variables).flatMap((a) => a.map((v) => String(v)))));
|
|
5419
5404
|
}
|
|
5420
5405
|
/** Return an array of all variables, each as an array of properties/segments. */
|
|
5421
|
-
async variableSegments(template2,
|
|
5422
|
-
const analysis = await analyze(isString(template2) ? this.parse(template2) : template2,
|
|
5406
|
+
async variableSegments(template2, options = {}) {
|
|
5407
|
+
const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options);
|
|
5423
5408
|
return Array.from(strictUniq(Object.values(analysis.variables).flatMap((a) => a.map((v) => v.toArray()))));
|
|
5424
5409
|
}
|
|
5425
5410
|
/** Return an array of all variables, each as an array of properties/segments. */
|
|
5426
|
-
variableSegmentsSync(template2,
|
|
5427
|
-
const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2,
|
|
5411
|
+
variableSegmentsSync(template2, options = {}) {
|
|
5412
|
+
const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options);
|
|
5428
5413
|
return Array.from(strictUniq(Object.values(analysis.variables).flatMap((a) => a.map((v) => v.toArray()))));
|
|
5429
5414
|
}
|
|
5430
5415
|
/** Return an array of all expected context variables without their properties. */
|
|
5431
|
-
async globalVariables(template2,
|
|
5432
|
-
const analysis = await analyze(isString(template2) ? this.parse(template2) : template2,
|
|
5416
|
+
async globalVariables(template2, options = {}) {
|
|
5417
|
+
const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options);
|
|
5433
5418
|
return Object.keys(analysis.globals);
|
|
5434
5419
|
}
|
|
5435
5420
|
/** Return an array of all expected context variables without their properties. */
|
|
5436
|
-
globalVariablesSync(template2,
|
|
5437
|
-
const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2,
|
|
5421
|
+
globalVariablesSync(template2, options = {}) {
|
|
5422
|
+
const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options);
|
|
5438
5423
|
return Object.keys(analysis.globals);
|
|
5439
5424
|
}
|
|
5440
5425
|
/** Return an array of all expected context variables including their properties/paths. */
|
|
5441
|
-
async globalFullVariables(template2,
|
|
5442
|
-
const analysis = await analyze(isString(template2) ? this.parse(template2) : template2,
|
|
5426
|
+
async globalFullVariables(template2, options = {}) {
|
|
5427
|
+
const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options);
|
|
5443
5428
|
return Array.from(new Set(Object.values(analysis.globals).flatMap((a) => a.map((v) => String(v)))));
|
|
5444
5429
|
}
|
|
5445
5430
|
/** Return an array of all expected context variables including their properties/paths. */
|
|
5446
|
-
globalFullVariablesSync(template2,
|
|
5447
|
-
const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2,
|
|
5431
|
+
globalFullVariablesSync(template2, options = {}) {
|
|
5432
|
+
const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options);
|
|
5448
5433
|
return Array.from(new Set(Object.values(analysis.globals).flatMap((a) => a.map((v) => String(v)))));
|
|
5449
5434
|
}
|
|
5450
5435
|
/** Return an array of all expected context variables, each as an array of properties/segments. */
|
|
5451
|
-
async globalVariableSegments(template2,
|
|
5452
|
-
const analysis = await analyze(isString(template2) ? this.parse(template2) : template2,
|
|
5436
|
+
async globalVariableSegments(template2, options = {}) {
|
|
5437
|
+
const analysis = await analyze(isString(template2) ? this.parse(template2) : template2, options);
|
|
5453
5438
|
return Array.from(strictUniq(Object.values(analysis.globals).flatMap((a) => a.map((v) => v.toArray()))));
|
|
5454
5439
|
}
|
|
5455
5440
|
/** Return an array of all expected context variables, each as an array of properties/segments. */
|
|
5456
|
-
globalVariableSegmentsSync(template2,
|
|
5457
|
-
const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2,
|
|
5441
|
+
globalVariableSegmentsSync(template2, options = {}) {
|
|
5442
|
+
const analysis = analyzeSync(isString(template2) ? this.parse(template2) : template2, options);
|
|
5458
5443
|
return Array.from(strictUniq(Object.values(analysis.globals).flatMap((a) => a.map((v) => v.toArray()))));
|
|
5459
5444
|
}
|
|
5460
5445
|
};
|
|
@@ -5492,7 +5477,7 @@ var require_liquid_node = __commonJS({
|
|
|
5492
5477
|
exports.RenderError = RenderError;
|
|
5493
5478
|
exports.RenderTag = RenderTag;
|
|
5494
5479
|
exports.TablerowTag = TablerowTag;
|
|
5495
|
-
exports.Tag =
|
|
5480
|
+
exports.Tag = Tag3;
|
|
5496
5481
|
exports.TagToken = TagToken;
|
|
5497
5482
|
exports.Token = Token;
|
|
5498
5483
|
exports.TokenizationError = TokenizationError;
|
|
@@ -5522,11 +5507,11 @@ var require_liquid_node = __commonJS({
|
|
|
5522
5507
|
}
|
|
5523
5508
|
});
|
|
5524
5509
|
|
|
5525
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
5526
5511
|
import { chmodSync, constants, copyFileSync, existsSync as existsSync9, mkdirSync, realpathSync as realpathSync2, renameSync as renameSync3, rmSync as rmSync3, statfsSync as statfsSync2, statSync as statSync4, writeFileSync as writeFileSync2 } from "node:fs";
|
|
5527
5512
|
import { dirname as dirname2, resolve } from "node:path";
|
|
5528
5513
|
|
|
5529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/sealed.js
|
|
5530
5515
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
5531
5516
|
import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
|
|
5532
5517
|
import { Transform } from "node:stream";
|
|
@@ -5633,7 +5618,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
|
|
|
5633
5618
|
renameSync(pending, to);
|
|
5634
5619
|
}, "unsealFile");
|
|
5635
5620
|
|
|
5636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5621
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/compatibility.js
|
|
5637
5622
|
var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
|
|
5638
5623
|
var fileSchemaOf = /* @__PURE__ */ __name((database) => {
|
|
5639
5624
|
const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
|
|
@@ -5657,7 +5642,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
|
|
|
5657
5642
|
};
|
|
5658
5643
|
}, "compatibilityOf");
|
|
5659
5644
|
|
|
5660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5645
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/repair.js
|
|
5661
5646
|
import { createHash as createHash2 } from "node:crypto";
|
|
5662
5647
|
var COPY_MARK = "__repair_";
|
|
5663
5648
|
var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
|
|
@@ -5911,13 +5896,13 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
|
|
|
5911
5896
|
return found;
|
|
5912
5897
|
}, "deleteCopy");
|
|
5913
5898
|
|
|
5914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
5915
5900
|
import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
|
|
5916
5901
|
|
|
5917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5902
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
5918
5903
|
import { existsSync as existsSync3 } from "node:fs";
|
|
5919
5904
|
|
|
5920
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
5921
5906
|
import { execFileSync, spawn } from "node:child_process";
|
|
5922
5907
|
import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
|
|
5923
5908
|
import { basename, dirname, join } from "node:path";
|
|
@@ -6249,7 +6234,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6249
6234
|
let kept;
|
|
6250
6235
|
let dangling;
|
|
6251
6236
|
let json;
|
|
6252
|
-
let
|
|
6237
|
+
let fetch;
|
|
6253
6238
|
let schema;
|
|
6254
6239
|
try {
|
|
6255
6240
|
kept = tableRows(opened.database);
|
|
@@ -6259,7 +6244,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6259
6244
|
rebuilt = rebuildDerived(opened.database, { now, note });
|
|
6260
6245
|
note("looking for rows that point at rows that were lost");
|
|
6261
6246
|
dangling = danglingRows(opened.database);
|
|
6262
|
-
|
|
6247
|
+
fetch = mailToFetch(opened.database);
|
|
6263
6248
|
schema = fileSchemaOf(opened.database).version;
|
|
6264
6249
|
opened.database.exec("PRAGMA wal_checkpoint(TRUNCATE)");
|
|
6265
6250
|
} catch (error) {
|
|
@@ -6298,7 +6283,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6298
6283
|
lost,
|
|
6299
6284
|
dangling,
|
|
6300
6285
|
invalidJson: json,
|
|
6301
|
-
mailToFetch:
|
|
6286
|
+
mailToFetch: fetch,
|
|
6302
6287
|
rebuilt,
|
|
6303
6288
|
copyErrors,
|
|
6304
6289
|
health,
|
|
@@ -6314,7 +6299,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6314
6299
|
}
|
|
6315
6300
|
}, "recoverLocked");
|
|
6316
6301
|
|
|
6317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6302
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
6318
6303
|
var COUNTED = [
|
|
6319
6304
|
"accounts",
|
|
6320
6305
|
"chats",
|
|
@@ -6447,7 +6432,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
|
|
|
6447
6432
|
return recover;
|
|
6448
6433
|
}, "storeRecoverCommand");
|
|
6449
6434
|
|
|
6450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
6451
6436
|
var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
|
|
6452
6437
|
var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
|
|
6453
6438
|
var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
|
|
@@ -6497,7 +6482,7 @@ var sharedStoreCommand = /* @__PURE__ */ __name((app) => {
|
|
|
6497
6482
|
return app ? store.addCommand(storeRecoverCommand(app)) : store;
|
|
6498
6483
|
}, "sharedStoreCommand");
|
|
6499
6484
|
|
|
6500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6485
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
|
|
6501
6486
|
var ENCRYPT_OPTION = [
|
|
6502
6487
|
"--encrypt",
|
|
6503
6488
|
"compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept \u2014 lose it and the file cannot be opened"
|
|
@@ -6516,7 +6501,7 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
|
|
|
6516
6501
|
return password;
|
|
6517
6502
|
}, "passwordOf");
|
|
6518
6503
|
|
|
6519
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/replies/rules.js
|
|
6520
6505
|
import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
|
|
6521
6506
|
import { join as join2 } from "node:path";
|
|
6522
6507
|
var REPLY_ACTIONS = ["reply", "task"];
|
|
@@ -6687,7 +6672,7 @@ var problem = /* @__PURE__ */ __name((issue) => {
|
|
|
6687
6672
|
}, "problem");
|
|
6688
6673
|
var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
|
|
6689
6674
|
|
|
6690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/replies/state.js
|
|
6691
6676
|
import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
|
|
6692
6677
|
import { join as join3 } from "node:path";
|
|
6693
6678
|
var ANSWERED_KEPT = 1e3;
|
|
@@ -6740,7 +6725,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
|
|
|
6740
6725
|
}, "recordReply");
|
|
6741
6726
|
var broken2 = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply state ${path} cannot be read (${why}) \u2014 fix or move the file`), "broken");
|
|
6742
6727
|
|
|
6743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/replies/decide.js
|
|
6744
6729
|
var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
|
|
6745
6730
|
var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
|
|
6746
6731
|
const { message, chat, owner, sender } = incoming;
|
|
@@ -6846,8 +6831,37 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
|
|
|
6846
6831
|
return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
|
|
6847
6832
|
}, "filled");
|
|
6848
6833
|
|
|
6849
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
6835
|
+
var import_liquidjs2 = __toESM(require_liquid_node(), 1);
|
|
6836
|
+
|
|
6837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/render/liquid.js
|
|
6850
6838
|
var import_liquidjs = __toESM(require_liquid_node(), 1);
|
|
6839
|
+
var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
6840
|
+
const engine = new import_liquidjs.Liquid({
|
|
6841
|
+
ownPropertyOnly: true,
|
|
6842
|
+
strictVariables: true,
|
|
6843
|
+
strictFilters: true,
|
|
6844
|
+
lenientIf: false,
|
|
6845
|
+
parseLimit: limits.parse,
|
|
6846
|
+
renderLimit: limits.milliseconds,
|
|
6847
|
+
memoryLimit: limits.memory,
|
|
6848
|
+
preserveTimezones: true
|
|
6849
|
+
});
|
|
6850
|
+
for (const name of ["include", "render", "layout"]) {
|
|
6851
|
+
engine.registerTag(name, class extends import_liquidjs.Tag {
|
|
6852
|
+
constructor(token, tokens, liquid) {
|
|
6853
|
+
super(token, tokens, liquid);
|
|
6854
|
+
throw new Error("templates cannot read files");
|
|
6855
|
+
}
|
|
6856
|
+
render() {
|
|
6857
|
+
return "";
|
|
6858
|
+
}
|
|
6859
|
+
});
|
|
6860
|
+
}
|
|
6861
|
+
return engine;
|
|
6862
|
+
}, "safeLiquid");
|
|
6863
|
+
|
|
6864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
6851
6865
|
var TEMPLATE_LIMITS = {
|
|
6852
6866
|
parse: 32768,
|
|
6853
6867
|
renders: 2e3,
|
|
@@ -6901,28 +6915,8 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
6901
6915
|
hourCycle: "h23"
|
|
6902
6916
|
}).formatToParts(input.now).map(({ type, value }) => [type, value]));
|
|
6903
6917
|
const localTime = `${parts.year}-${parts.month}-${parts.day}T${parts.hour}:${parts.minute}:${parts.second}${parts.timeZoneName?.replace("GMT", "") || "+00:00"}`;
|
|
6904
|
-
const engine =
|
|
6905
|
-
|
|
6906
|
-
strictVariables: true,
|
|
6907
|
-
strictFilters: true,
|
|
6908
|
-
lenientIf: false,
|
|
6909
|
-
parseLimit: limits.parse,
|
|
6910
|
-
renderLimit: limits.milliseconds,
|
|
6911
|
-
memoryLimit: limits.memory,
|
|
6912
|
-
preserveTimezones: true
|
|
6913
|
-
});
|
|
6914
|
-
for (const name2 of ["include", "render", "layout"]) {
|
|
6915
|
-
engine.registerTag(name2, class extends import_liquidjs.Tag {
|
|
6916
|
-
constructor(token, tokens, liquid) {
|
|
6917
|
-
super(token, tokens, liquid);
|
|
6918
|
-
throw new Error("reply templates cannot read files");
|
|
6919
|
-
}
|
|
6920
|
-
render() {
|
|
6921
|
-
return "";
|
|
6922
|
-
}
|
|
6923
|
-
});
|
|
6924
|
-
}
|
|
6925
|
-
engine.registerTag("ai", class extends import_liquidjs.Tag {
|
|
6918
|
+
const engine = safeLiquid({ parse: limits.parse, memory: limits.memory, milliseconds: limits.milliseconds });
|
|
6919
|
+
engine.registerTag("ai", class extends import_liquidjs2.Tag {
|
|
6926
6920
|
body = [];
|
|
6927
6921
|
fallback = null;
|
|
6928
6922
|
constructor(token, tokens, liquid, parser) {
|
|
@@ -6983,7 +6977,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
6983
6977
|
});
|
|
6984
6978
|
const templates = engine.parse(source);
|
|
6985
6979
|
const name = input.senderName?.trim() ?? "";
|
|
6986
|
-
const context = new
|
|
6980
|
+
const context = new import_liquidjs2.Context({
|
|
6987
6981
|
sender: { firstName: name.split(/\s+/)[0] ?? "", name },
|
|
6988
6982
|
chat: { title: input.chat.title ?? "", kind: input.chat.kind },
|
|
6989
6983
|
now: localTime
|
|
@@ -7006,7 +7000,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
7006
7000
|
}
|
|
7007
7001
|
}, "renderReplyTemplate");
|
|
7008
7002
|
|
|
7009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
|
|
7010
7004
|
var DRY_RUN_DAYS = 7;
|
|
7011
7005
|
var PAGE = 500;
|
|
7012
7006
|
var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
|
|
@@ -7120,143 +7114,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
|
|
|
7120
7114
|
}
|
|
7121
7115
|
}, "storedSince");
|
|
7122
7116
|
|
|
7123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7124
|
-
var endpointKeyName = /* @__PURE__ */ __name((baseUrl) => {
|
|
7125
|
-
const host = new URL(baseUrl).host;
|
|
7126
|
-
return ["openai", "anthropic"].includes(host) ? `endpoint:${host}` : host;
|
|
7127
|
-
}, "endpointKeyName");
|
|
7128
|
-
var embeddingKeys = /* @__PURE__ */ __name((app, env = process.env, keyring) => {
|
|
7129
|
-
const where = { appName: app.appName, prefix: app.envPrefix, env };
|
|
7130
|
-
const credentials = /* @__PURE__ */ __name((provider) => new Credentials({
|
|
7131
|
-
configDir: resolvePaths(where).config,
|
|
7132
|
-
service: app.appName,
|
|
7133
|
-
...["openai", "anthropic"].includes(provider) ? { envVar: envName(app, `${provider.toUpperCase()}_API_KEY`) } : {},
|
|
7134
|
-
isolated: pathsAreOverridden(where),
|
|
7135
|
-
env,
|
|
7136
|
-
...keyring ? { keyring } : {},
|
|
7137
|
-
warn: /* @__PURE__ */ __name((message) => process.stderr.write(`${message}
|
|
7138
|
-
`), "warn")
|
|
7139
|
-
}), "credentials");
|
|
7140
|
-
const account = /* @__PURE__ */ __name((provider) => `embeddings:${provider}`, "account");
|
|
7141
|
-
return {
|
|
7142
|
-
read: /* @__PURE__ */ __name((provider) => {
|
|
7143
|
-
const stored = credentials(provider).read(account(provider));
|
|
7144
|
-
if (stored)
|
|
7145
|
-
return { key: stored.secret, source: stored.source };
|
|
7146
|
-
const shared = ["openai", "anthropic"].includes(provider) ? env[`${provider.toUpperCase()}_API_KEY`]?.trim() : void 0;
|
|
7147
|
-
return shared ? { key: shared, source: "env" } : void 0;
|
|
7148
|
-
}, "read"),
|
|
7149
|
-
write: /* @__PURE__ */ __name((provider, key) => credentials(provider).write(account(provider), key, { signIn: true }), "write"),
|
|
7150
|
-
remove: /* @__PURE__ */ __name((provider) => credentials(provider).remove(account(provider)), "remove")
|
|
7151
|
-
};
|
|
7152
|
-
}, "embeddingKeys");
|
|
7153
|
-
|
|
7154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/models/openai.js
|
|
7155
|
-
var options = strictObject({
|
|
7156
|
-
temperature: range(0, 2),
|
|
7157
|
-
top_p: range(0, 1),
|
|
7158
|
-
presence_penalty: range(-2, 2),
|
|
7159
|
-
frequency_penalty: range(-2, 2),
|
|
7160
|
-
seed: optional(pipe(number(), integer())),
|
|
7161
|
-
stop: optional(union([string(), array(string())])),
|
|
7162
|
-
response_format: optional(strictObject({ type: picklist(["text", "json_object"]) }))
|
|
7163
|
-
});
|
|
7164
|
-
var openai = {
|
|
7165
|
-
images: true,
|
|
7166
|
-
baseUrl: "https://api.openai.com/v1",
|
|
7167
|
-
validate: /* @__PURE__ */ __name((given) => checkedOptions("openai", options, given), "validate"),
|
|
7168
|
-
complete: /* @__PURE__ */ __name((target, request, checked, apiKey, fetcher) => withTimeLimit(12e4, async (deadline) => {
|
|
7169
|
-
const response = await fetcher(`${target.baseUrl.replace(/\/+$/, "")}/chat/completions`, {
|
|
7170
|
-
method: "POST",
|
|
7171
|
-
headers: { "Content-Type": "application/json", ...apiKey ? { Authorization: `Bearer ${apiKey}` } : {} },
|
|
7172
|
-
body: JSON.stringify({
|
|
7173
|
-
...checked,
|
|
7174
|
-
model: target.model,
|
|
7175
|
-
messages: [
|
|
7176
|
-
{ role: "system", content: systemFor(request) },
|
|
7177
|
-
...messagesFor(request),
|
|
7178
|
-
...request.images === void 0 ? [] : [
|
|
7179
|
-
{
|
|
7180
|
-
role: "user",
|
|
7181
|
-
content: request.images.map((image) => ({
|
|
7182
|
-
type: "image_url",
|
|
7183
|
-
image_url: { url: `data:${image.mimeType};base64,${image.data}`, detail: "high" }
|
|
7184
|
-
}))
|
|
7185
|
-
}
|
|
7186
|
-
]
|
|
7187
|
-
],
|
|
7188
|
-
...new URL(target.baseUrl).hostname === "api.openai.com" ? { max_completion_tokens: request.maxTokens } : { max_tokens: request.maxTokens }
|
|
7189
|
-
}),
|
|
7190
|
-
signal: deadline,
|
|
7191
|
-
redirect: "error"
|
|
7192
|
-
});
|
|
7193
|
-
if (!response.ok)
|
|
7194
|
-
throw new Error("provider rejected request");
|
|
7195
|
-
const body = await response.json();
|
|
7196
|
-
const choice = body.choices?.[0];
|
|
7197
|
-
if (choice?.finish_reason !== "stop" || typeof choice.message?.content !== "string" || !Number.isInteger(body.usage?.total_tokens) || (body.usage?.total_tokens ?? 0) < 1)
|
|
7198
|
-
throw new Error("incomplete response");
|
|
7199
|
-
return { text: choice.message.content, tokens: body.usage?.total_tokens };
|
|
7200
|
-
}), "complete")
|
|
7201
|
-
};
|
|
7202
|
-
|
|
7203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/models/index.js
|
|
7204
|
-
var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
7205
|
-
complete: /* @__PURE__ */ __name(async (request) => {
|
|
7206
|
-
if (deps.signal?.aborted)
|
|
7207
|
-
throw new CliError("cancelled", "model request cancelled");
|
|
7208
|
-
const target = deps.resolve(request.purpose);
|
|
7209
|
-
if (!target || target.provider === "off")
|
|
7210
|
-
throw new CliError("configuration_error", `models.${request.purpose}.provider is not configured; no model was called`);
|
|
7211
|
-
if (!request.purpose || !Number.isSafeInteger(request.maxTokens) || request.maxTokens < 1 || typeof request.prompt !== "string")
|
|
7212
|
-
throw new CliError("validation_error", "a model request needs a purpose, prompt and positive whole maxTokens");
|
|
7213
|
-
validateImages(request.images);
|
|
7214
|
-
let adapter = deps.adapters?.[target.provider];
|
|
7215
|
-
if (!adapter && target.provider === "openai")
|
|
7216
|
-
adapter = openai;
|
|
7217
|
-
if (!adapter && target.provider === "anthropic")
|
|
7218
|
-
adapter = (await import("./anthropic-7FUQ2HYJ.js")).anthropic;
|
|
7219
|
-
if (!adapter)
|
|
7220
|
-
throw new CliError("validation_error", `no model adapter for ${target.provider}`);
|
|
7221
|
-
if (request.images !== void 0 && adapter.images !== true)
|
|
7222
|
-
throw new CliError("validation_error", "the model adapter does not support image inputs");
|
|
7223
|
-
const options2 = adapter.validate(request.options ?? {});
|
|
7224
|
-
const baseUrl = target.baseUrl ?? adapter.baseUrl;
|
|
7225
|
-
if (!target.model.trim() || !endpoint(baseUrl))
|
|
7226
|
-
throw new CliError("validation_error", "a model target needs a model and an HTTP/S endpoint without credentials, query or fragment");
|
|
7227
|
-
if (!await deps.consent(request, { ...target, baseUrl }))
|
|
7228
|
-
throw new CliError("permission_error", `model consent for ${request.purpose} is missing; no data was sent`);
|
|
7229
|
-
const apiKey = await deps.key?.(target.provider, target);
|
|
7230
|
-
if (deps.signal?.aborted)
|
|
7231
|
-
throw new CliError("cancelled", "model request cancelled");
|
|
7232
|
-
const fetcher = deps.fetch ?? fetch;
|
|
7233
|
-
let limited = false;
|
|
7234
|
-
const cancellable = /* @__PURE__ */ __name(async (input, init) => {
|
|
7235
|
-
const signal = init?.signal ?? (input instanceof Request ? input.signal : void 0);
|
|
7236
|
-
const response = await fetcher(input, {
|
|
7237
|
-
...init,
|
|
7238
|
-
signal: deps.signal ? AbortSignal.any([deps.signal, ...signal ? [signal] : []]) : signal
|
|
7239
|
-
});
|
|
7240
|
-
if (response.status === 429)
|
|
7241
|
-
limited = true;
|
|
7242
|
-
return response;
|
|
7243
|
-
}, "cancellable");
|
|
7244
|
-
try {
|
|
7245
|
-
const answer = await adapter.complete({ ...target, baseUrl }, request, options2, apiKey, cancellable);
|
|
7246
|
-
if (deps.signal?.aborted)
|
|
7247
|
-
throw new Error("cancelled");
|
|
7248
|
-
if (typeof answer.text !== "string" || !Number.isSafeInteger(answer.tokens) || answer.tokens < 1)
|
|
7249
|
-
throw new Error("incomplete");
|
|
7250
|
-
return { ...answer, provider: target.provider, model: target.model };
|
|
7251
|
-
} catch {
|
|
7252
|
-
if (limited)
|
|
7253
|
-
throw new CliError("rate_limited", `${request.purpose} provider rate limit reached; no result was stored`);
|
|
7254
|
-
throw new CliError("invalid_response", `${request.purpose} provider failed or returned an incomplete response; no result was stored`);
|
|
7255
|
-
}
|
|
7256
|
-
}, "complete")
|
|
7257
|
-
}), "modelGateway");
|
|
7258
|
-
|
|
7259
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/replies/consents.js
|
|
7117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/replies/consents.js
|
|
7260
7118
|
import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
|
|
7261
7119
|
import { join as join4 } from "node:path";
|
|
7262
7120
|
var shape = strictObject({
|
|
@@ -7281,21 +7139,21 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
|
|
|
7281
7139
|
return consent.provider === provider && !consent.deniedChats.includes(chat);
|
|
7282
7140
|
}, "mayModelReply");
|
|
7283
7141
|
|
|
7284
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7285
|
-
var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn,
|
|
7142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/replies/rendering.js
|
|
7143
|
+
var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
|
|
7286
7144
|
ai: true
|
|
7287
7145
|
}) => async (rule2, message, chat, now) => {
|
|
7288
7146
|
let called;
|
|
7289
7147
|
const gateway = modelGateway({
|
|
7290
|
-
signal:
|
|
7148
|
+
signal: options.signal,
|
|
7291
7149
|
resolve: /* @__PURE__ */ __name((purpose) => {
|
|
7292
7150
|
called = modelTarget(settings(), purpose);
|
|
7293
7151
|
return called;
|
|
7294
7152
|
}, "resolve"),
|
|
7295
7153
|
consent: /* @__PURE__ */ __name((_request, target) => mayModelReply(replyConsentPathFor(app, profile, env), replyModelIdentity(target.provider, target.baseUrl ?? ""), message.chatId), "consent"),
|
|
7296
|
-
key: /* @__PURE__ */ __name((provider, target) => embeddingKeys(app, env,
|
|
7154
|
+
key: /* @__PURE__ */ __name((provider, target) => embeddingKeys(app, env, options.keyring).read(target.baseUrl === void 0 ? provider : endpointKeyName(target.baseUrl))?.key, "key")
|
|
7297
7155
|
});
|
|
7298
|
-
if (
|
|
7156
|
+
if (options.signal?.aborted)
|
|
7299
7157
|
throw new CliError("cancelled", "reply rendering cancelled");
|
|
7300
7158
|
const result2 = await renderReplyTemplate(rule2.reply, {
|
|
7301
7159
|
senderName: message.senderName,
|
|
@@ -7303,8 +7161,8 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
|
|
|
7303
7161
|
now,
|
|
7304
7162
|
timezone: rule2.when.hours?.timezone,
|
|
7305
7163
|
data: message.text,
|
|
7306
|
-
allowAI:
|
|
7307
|
-
preview:
|
|
7164
|
+
allowAI: options.ai === true,
|
|
7165
|
+
preview: options.preview === true,
|
|
7308
7166
|
complete: /* @__PURE__ */ __name(async (prompt, data) => {
|
|
7309
7167
|
const result3 = await gateway.complete({
|
|
7310
7168
|
purpose: "replies",
|
|
@@ -7313,7 +7171,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
|
|
|
7313
7171
|
data,
|
|
7314
7172
|
maxTokens: 512
|
|
7315
7173
|
});
|
|
7316
|
-
if (
|
|
7174
|
+
if (options.signal?.aborted)
|
|
7317
7175
|
throw new CliError("cancelled", "reply rendering cancelled");
|
|
7318
7176
|
const current = modelTarget(settings(), "replies");
|
|
7319
7177
|
const baseUrl = called?.baseUrl ?? (called?.provider === "anthropic" ? "https://api.anthropic.com" : "https://api.openai.com/v1");
|
|
@@ -7328,7 +7186,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
|
|
|
7328
7186
|
return result2;
|
|
7329
7187
|
}, "replyRenderer");
|
|
7330
7188
|
|
|
7331
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/replies/serve.js
|
|
7332
7190
|
var NOT_ALLOWED = "replies.send is not allow";
|
|
7333
7191
|
var NO_RULES = "no rules";
|
|
7334
7192
|
var ONLY_TASK = "opened a task, sent nothing";
|
|
@@ -7421,12 +7279,12 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
|
|
|
7421
7279
|
return { skip: why };
|
|
7422
7280
|
}, "replyTo");
|
|
7423
7281
|
|
|
7424
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7282
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
|
|
7425
7283
|
var START_SYNC_DELAY_MS = 3e4;
|
|
7426
7284
|
var START_SYNC_BUDGET_MS = 5 * 6e4;
|
|
7427
7285
|
var START_SYNC_WINDOW_MS = 7 * 864e5;
|
|
7428
7286
|
var START_SYNC_PER_CHAT = 500;
|
|
7429
|
-
var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch
|
|
7287
|
+
var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn, delayMs = START_SYNC_DELAY_MS, budgetMs = START_SYNC_BUDGET_MS, windowMs = START_SYNC_WINDOW_MS, now = Date.now }) => {
|
|
7430
7288
|
const controller = new AbortController();
|
|
7431
7289
|
let timer;
|
|
7432
7290
|
let pass = Promise.resolve();
|
|
@@ -7454,7 +7312,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch: fetch2, note
|
|
|
7454
7312
|
if (stop.aborted)
|
|
7455
7313
|
break;
|
|
7456
7314
|
try {
|
|
7457
|
-
summary.fetched += (await
|
|
7315
|
+
summary.fetched += (await fetch(chat.id, Math.max(held ?? anywhere, floor), stop)).fetched;
|
|
7458
7316
|
summary.chats += 1;
|
|
7459
7317
|
} catch (error) {
|
|
7460
7318
|
if (stop.aborted)
|
|
@@ -7498,10 +7356,10 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch: fetch2, note
|
|
|
7498
7356
|
};
|
|
7499
7357
|
}, "startSync");
|
|
7500
7358
|
|
|
7501
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
|
|
7502
7360
|
var FIRST_FETCH_MS = 6e4;
|
|
7503
7361
|
var DAY_MS = 864e5;
|
|
7504
|
-
var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch
|
|
7362
|
+
var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
|
|
7505
7363
|
let timer;
|
|
7506
7364
|
let round = Promise.resolve();
|
|
7507
7365
|
let stopped = false;
|
|
@@ -7514,7 +7372,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch: fetch2, warn, fi
|
|
|
7514
7372
|
if (lastCount?.day === today)
|
|
7515
7373
|
continue;
|
|
7516
7374
|
try {
|
|
7517
|
-
await
|
|
7375
|
+
await fetch(store, account, chatId);
|
|
7518
7376
|
done.fetched += 1;
|
|
7519
7377
|
} catch (error) {
|
|
7520
7378
|
done.failed += 1;
|
|
@@ -7552,7 +7410,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch: fetch2, warn, fi
|
|
|
7552
7410
|
};
|
|
7553
7411
|
}, "memberFetches");
|
|
7554
7412
|
|
|
7555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
|
|
7556
7414
|
var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
|
|
7557
7415
|
var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
|
|
7558
7416
|
if (context.format === "pretty") {
|
|
@@ -7585,7 +7443,7 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
|
|
|
7585
7443
|
return context;
|
|
7586
7444
|
}, "recordDiagnostics");
|
|
7587
7445
|
|
|
7588
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7446
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
|
|
7589
7447
|
var STEMS_EVERY_MS = 3e4;
|
|
7590
7448
|
var STEMS_SLICE_MS = 2e3;
|
|
7591
7449
|
var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
|
|
@@ -7625,7 +7483,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
|
|
|
7625
7483
|
};
|
|
7626
7484
|
}, "stemFills");
|
|
7627
7485
|
|
|
7628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
|
|
7629
7487
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
|
|
7630
7488
|
var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
7631
7489
|
kind: attachment.kind,
|
|
@@ -7720,7 +7578,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
|
|
|
7720
7578
|
locale: messenger.app.locale
|
|
7721
7579
|
}), "viewOf");
|
|
7722
7580
|
|
|
7723
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7581
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
|
|
7724
7582
|
var observed = /* @__PURE__ */ __name((value) => ({
|
|
7725
7583
|
value: value.value,
|
|
7726
7584
|
observed_at: value.observedAt,
|
|
@@ -7787,7 +7645,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
|
|
|
7787
7645
|
}
|
|
7788
7646
|
}, "watchEventItem");
|
|
7789
7647
|
|
|
7790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
|
|
7791
7649
|
var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
|
|
7792
7650
|
output: { entity: "watch_item" },
|
|
7793
7651
|
effects: REMOTE_READ,
|
|
@@ -7942,7 +7800,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
|
|
|
7942
7800
|
}
|
|
7943
7801
|
}, "describe");
|
|
7944
7802
|
|
|
7945
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7803
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
|
|
7946
7804
|
var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
7947
7805
|
const command = annotate(new Command("serve"), {
|
|
7948
7806
|
output: { entity: "serve_summary" },
|
|
@@ -8206,7 +8064,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
|
|
|
8206
8064
|
};
|
|
8207
8065
|
}, "tasking");
|
|
8208
8066
|
|
|
8209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
|
|
8210
8068
|
import { existsSync as existsSync8 } from "node:fs";
|
|
8211
8069
|
var PATH = "store tables list";
|
|
8212
8070
|
var STORE_TABLES_QUERY = {
|
|
@@ -8249,7 +8107,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((messenger) => {
|
|
|
8249
8107
|
return tables;
|
|
8250
8108
|
}, "storeTablesCommand");
|
|
8251
8109
|
|
|
8252
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3bb6323e04e526bd9df39f840434b06b/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
8253
8111
|
var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
|
|
8254
8112
|
var WORD_INDEX = "message_words";
|
|
8255
8113
|
var schemaOf = /* @__PURE__ */ __name((database) => {
|
|
@@ -8940,12 +8798,10 @@ export {
|
|
|
8940
8798
|
readRepliesState,
|
|
8941
8799
|
writeRepliesState,
|
|
8942
8800
|
paused,
|
|
8801
|
+
safeLiquid,
|
|
8943
8802
|
DRY_RUN_DAYS,
|
|
8944
8803
|
dryRun,
|
|
8945
8804
|
senderFacts,
|
|
8946
|
-
endpointKeyName,
|
|
8947
|
-
embeddingKeys,
|
|
8948
|
-
modelGateway,
|
|
8949
8805
|
replyConsentPathFor,
|
|
8950
8806
|
readReplyConsent,
|
|
8951
8807
|
writeReplyConsent,
|