@wirecat/zoom-cli 0.83.0 → 0.84.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 +10 -10
- package/contracts/wirecat.json +34 -1
- package/dist/account-removal.d.ts +1 -1
- package/dist/account-removal.d.ts.map +1 -1
- package/dist/account-removal.js +1 -1
- package/dist/account-removal.js.map +1 -1
- package/dist/agent-skill.js +1 -1
- package/dist/agent-skill.js.map +1 -1
- package/dist/answer-entities.d.ts +1 -1
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/answer-entities.js +1 -1
- package/dist/answer-entities.js.map +1 -1
- package/dist/answer-output.d.ts +2 -2
- package/dist/answer-output.d.ts.map +1 -1
- package/dist/answer-output.js +1 -1
- package/dist/answer-output.js.map +1 -1
- package/dist/answer-policy.d.ts.map +1 -1
- package/dist/answer-policy.js +1 -2
- package/dist/answer-policy.js.map +1 -1
- package/dist/answers.js +1 -1
- package/dist/answers.js.map +1 -1
- package/dist/api.d.ts +2 -2
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +1 -1
- package/dist/api.js.map +1 -1
- package/dist/archive-commands.d.ts +1 -1
- package/dist/archive-commands.d.ts.map +1 -1
- package/dist/archive-commands.js +1 -2
- package/dist/archive-commands.js.map +1 -1
- package/dist/archive-import.d.ts +1 -1
- package/dist/archive-import.d.ts.map +1 -1
- package/dist/archive-import.js +1 -1
- package/dist/archive-import.js.map +1 -1
- package/dist/archive-transcripts.d.ts +1 -1
- package/dist/archive-transcripts.d.ts.map +1 -1
- package/dist/archive-transcripts.js +1 -2
- package/dist/archive-transcripts.js.map +1 -1
- package/dist/bin/main.js +3 -3
- package/dist/bin/main.js.map +1 -1
- package/dist/bin/zm.js +11 -11
- package/dist/bundle/answer-policy-OQQWAUHH.js +33 -0
- package/dist/bundle/chunk-3YDF76DP.js +922 -0
- package/dist/bundle/chunk-AEWYRB6F.js +8 -0
- package/dist/bundle/{chunk-OGTN2KVG.js → chunk-AF2Z6VOG.js} +4 -14
- package/dist/bundle/{chunk-26TW5RZ6.js → chunk-DAYBU7WR.js} +61 -94
- package/dist/bundle/{chunk-2DK5BBFF.js → chunk-JD63PEI3.js} +3 -8
- package/dist/bundle/{chunk-H6A4NWYJ.js → chunk-L5ZYKXAY.js} +114 -128
- package/dist/bundle/{chunk-R6IA5UQB.js → chunk-W4TDCCT3.js} +8 -2
- package/dist/bundle/{chunk-XEOZTA3H.js → chunk-W6YFWJDR.js} +2 -5
- package/dist/bundle/{chunk-434YFJAE.js → chunk-WSGD5Q6L.js} +3 -9
- package/dist/bundle/config-MP5YLHEY.js +29 -0
- package/dist/bundle/{folders-ROKVKSCT.js → folders-B2GKJOC2.js} +2 -7
- package/dist/bundle/{main-GCK3VYAA.js → main-YZPLPXB7.js} +19 -41
- package/dist/bundle/{output-file-RYIOIXMD.js → output-file-PKA7MJEP.js} +3 -11
- package/dist/bundle/{program-OYLVYA4Z.js → program-7JY6XJ6K.js} +642 -801
- package/dist/bundle/run-log-ML7ZCWXD.js +54 -0
- package/dist/bundle/store-connection-LQGKS3DN.js +21 -0
- package/dist/bundle/streaming-PRGWGNHY.js +12 -0
- package/dist/bundle/tokens-57RJVBK6.js +18 -0
- package/dist/bundle/zm.js +4 -161
- package/dist/bundle/{zoom-app-4F4YY4OI.js → zoom-app-EYJST6GF.js} +5 -13
- package/dist/chat-file.d.ts +1 -1
- package/dist/chat-file.d.ts.map +1 -1
- package/dist/commands.js +1 -1
- package/dist/commands.js.map +1 -1
- package/dist/config-issues.d.ts +1 -1
- package/dist/config-issues.d.ts.map +1 -1
- package/dist/config-issues.js +1 -1
- package/dist/config-issues.js.map +1 -1
- package/dist/config.d.ts +1 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -2
- package/dist/config.js.map +1 -1
- package/dist/contacts-commands.d.ts +1 -1
- package/dist/contacts-commands.d.ts.map +1 -1
- package/dist/contacts-commands.js +1 -1
- package/dist/contacts-commands.js.map +1 -1
- package/dist/contract-overrides.js +1 -1
- package/dist/contract-overrides.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/execution.d.ts +1 -1
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +1 -1
- package/dist/execution.js.map +1 -1
- package/dist/files.d.ts +2 -2
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +1 -1
- package/dist/files.js.map +1 -1
- package/dist/first-screen.js +1 -1
- package/dist/first-screen.js.map +1 -1
- package/dist/identity.d.ts +1 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +6 -0
- package/dist/identity.js.map +1 -1
- package/dist/ingestion-search-commands.d.ts +1 -1
- package/dist/ingestion-search-commands.d.ts.map +1 -1
- package/dist/ingestion-search-commands.js +1 -1
- package/dist/ingestion-search-commands.js.map +1 -1
- package/dist/local-transcription-commands.d.ts +1 -1
- package/dist/local-transcription-commands.d.ts.map +1 -1
- package/dist/local-transcription-commands.js +1 -2
- package/dist/local-transcription-commands.js.map +1 -1
- package/dist/local-transcription.d.ts +1 -2
- package/dist/local-transcription.d.ts.map +1 -1
- package/dist/local-transcription.js +3 -3
- package/dist/local-transcription.js.map +1 -1
- package/dist/meeting-commands.d.ts +1 -1
- package/dist/meeting-commands.d.ts.map +1 -1
- package/dist/meeting-commands.js +1 -2
- package/dist/meeting-commands.js.map +1 -1
- package/dist/meeting-communications-binding.d.ts +1 -2
- package/dist/meeting-communications-binding.d.ts.map +1 -1
- package/dist/meeting-communications-binding.js.map +1 -1
- package/dist/meeting-context-commands.d.ts +1 -1
- package/dist/meeting-context-commands.d.ts.map +1 -1
- package/dist/meeting-context-commands.js +1 -1
- package/dist/meeting-context-commands.js.map +1 -1
- package/dist/meeting-context.d.ts +2 -4
- package/dist/meeting-context.d.ts.map +1 -1
- package/dist/meeting-context.js +1 -1
- package/dist/meeting-context.js.map +1 -1
- package/dist/meeting-integration-commands.d.ts +1 -1
- package/dist/meeting-integration-commands.d.ts.map +1 -1
- package/dist/meeting-integration-commands.js +1 -2
- package/dist/meeting-integration-commands.js.map +1 -1
- package/dist/meeting-integration.d.ts +1 -1
- package/dist/meeting-integration.d.ts.map +1 -1
- package/dist/meeting-integration.js +1 -1
- package/dist/meeting-integration.js.map +1 -1
- package/dist/meeting-inventory.d.ts +1 -1
- package/dist/meeting-inventory.d.ts.map +1 -1
- package/dist/meeting-inventory.js +1 -1
- package/dist/meeting-inventory.js.map +1 -1
- package/dist/meeting-preparation.d.ts +1 -2
- package/dist/meeting-preparation.d.ts.map +1 -1
- package/dist/meeting-preparation.js +1 -1
- package/dist/meeting-preparation.js.map +1 -1
- package/dist/meeting-project-candidates.d.ts +1 -1
- package/dist/meeting-project-candidates.d.ts.map +1 -1
- package/dist/meeting-project-evidence-commands.d.ts +1 -1
- package/dist/meeting-project-evidence-commands.d.ts.map +1 -1
- package/dist/meeting-project-evidence-commands.js +1 -2
- package/dist/meeting-project-evidence-commands.js.map +1 -1
- package/dist/meeting-read-command-bindings.js +1 -1
- package/dist/meeting-read-command-bindings.js.map +1 -1
- package/dist/meeting-review-commands.d.ts +1 -3
- package/dist/meeting-review-commands.d.ts.map +1 -1
- package/dist/meeting-review-commands.js +1 -2
- package/dist/meeting-review-commands.js.map +1 -1
- package/dist/meeting-search-commands.d.ts +2 -3
- package/dist/meeting-search-commands.d.ts.map +1 -1
- package/dist/meeting-search-commands.js +2 -4
- package/dist/meeting-search-commands.js.map +1 -1
- package/dist/meeting-searches-commands.d.ts +1 -2
- package/dist/meeting-searches-commands.d.ts.map +1 -1
- package/dist/meeting-searches-commands.js +1 -2
- package/dist/meeting-searches-commands.js.map +1 -1
- package/dist/meeting-selection-options.d.ts +1 -1
- package/dist/meeting-selection-options.d.ts.map +1 -1
- package/dist/meeting-selection-options.js +1 -2
- package/dist/meeting-selection-options.js.map +1 -1
- package/dist/meeting-semantic-commands.d.ts +1 -2
- package/dist/meeting-semantic-commands.d.ts.map +1 -1
- package/dist/meeting-semantic-commands.js +1 -1
- package/dist/meeting-semantic-commands.js.map +1 -1
- package/dist/meeting-semantic.d.ts +2 -2
- package/dist/meeting-semantic.d.ts.map +1 -1
- package/dist/meeting-semantic.js +1 -1
- package/dist/meeting-semantic.js.map +1 -1
- package/dist/meeting-source.d.ts +1 -1
- package/dist/meeting-source.d.ts.map +1 -1
- package/dist/meeting-stats-commands.d.ts +1 -3
- package/dist/meeting-stats-commands.d.ts.map +1 -1
- package/dist/meeting-stats-commands.js +1 -2
- package/dist/meeting-stats-commands.js.map +1 -1
- package/dist/models-commands.d.ts +1 -1
- package/dist/models-commands.d.ts.map +1 -1
- package/dist/models-commands.js +1 -1
- package/dist/models-commands.js.map +1 -1
- package/dist/occurrence-schedule.d.ts +1 -1
- package/dist/occurrence-schedule.d.ts.map +1 -1
- package/dist/permissions.d.ts +1 -1
- package/dist/permissions.d.ts.map +1 -1
- package/dist/permissions.js +1 -2
- package/dist/permissions.js.map +1 -1
- package/dist/profile.js +1 -1
- package/dist/profile.js.map +1 -1
- package/dist/program-bindings.js +1 -1
- package/dist/program-bindings.js.map +1 -1
- package/dist/program.d.ts +1 -2
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +1 -1
- package/dist/program.js.map +1 -1
- package/dist/progress-commands.d.ts +1 -1
- package/dist/progress-commands.d.ts.map +1 -1
- package/dist/progress-commands.js +1 -2
- package/dist/progress-commands.js.map +1 -1
- package/dist/read-only.js +1 -1
- package/dist/read-only.js.map +1 -1
- package/dist/recording-archive.d.ts.map +1 -1
- package/dist/recording-archive.js +1 -2
- package/dist/recording-archive.js.map +1 -1
- package/dist/recording-manifest.js +1 -1
- package/dist/recording-manifest.js.map +1 -1
- package/dist/recording-partial-store.d.ts +2 -3
- package/dist/recording-partial-store.d.ts.map +1 -1
- package/dist/recording-partial-store.js +1 -1
- package/dist/recording-partial-store.js.map +1 -1
- package/dist/recording-promotion-store.d.ts +1 -2
- package/dist/recording-promotion-store.d.ts.map +1 -1
- package/dist/recording-promotion-store.js +1 -2
- package/dist/recording-promotion-store.js.map +1 -1
- package/dist/recording-schedule-commands.d.ts +1 -1
- package/dist/recording-schedule-commands.d.ts.map +1 -1
- package/dist/recording-schedule-commands.js +1 -1
- package/dist/recording-schedule-commands.js.map +1 -1
- package/dist/recording-schedule-store.js +1 -1
- package/dist/recording-schedule-store.js.map +1 -1
- package/dist/recording-schedule-systemd.js +1 -1
- package/dist/recording-schedule-systemd.js.map +1 -1
- package/dist/recording-schedule.d.ts +1 -1
- package/dist/recording-schedule.d.ts.map +1 -1
- package/dist/recording-schedule.js +1 -1
- package/dist/recording-schedule.js.map +1 -1
- package/dist/recording-sync-store.d.ts +1 -1
- package/dist/recording-sync-store.d.ts.map +1 -1
- package/dist/recording-sync-store.js +1 -2
- package/dist/recording-sync-store.js.map +1 -1
- package/dist/recording-sync.d.ts +1 -1
- package/dist/recording-sync.d.ts.map +1 -1
- package/dist/recording-sync.js +1 -1
- package/dist/recording-sync.js.map +1 -1
- package/dist/recording-writer-lease.d.ts +1 -1
- package/dist/recording-writer-lease.d.ts.map +1 -1
- package/dist/recording-writer-lease.js +1 -1
- package/dist/recording-writer-lease.js.map +1 -1
- package/dist/recordings.d.ts +1 -1
- package/dist/recordings.d.ts.map +1 -1
- package/dist/recordings.js.map +1 -1
- package/dist/remote-meetings.d.ts +19 -19
- package/dist/remote-meetings.d.ts.map +1 -1
- package/dist/remote-meetings.js +1 -1
- package/dist/remote-meetings.js.map +1 -1
- package/dist/request-events.d.ts +1 -1
- package/dist/request-events.d.ts.map +1 -1
- package/dist/request-events.js +1 -1
- package/dist/request-events.js.map +1 -1
- package/dist/run-log.d.ts +1 -1
- package/dist/run-log.d.ts.map +1 -1
- package/dist/run-log.js +1 -1
- package/dist/run-log.js.map +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +1 -2
- package/dist/run.js.map +1 -1
- package/dist/series-inventory.d.ts +2 -2
- package/dist/series-inventory.js +1 -1
- package/dist/series-inventory.js.map +1 -1
- package/dist/setup-commands.d.ts +1 -1
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +1 -1
- package/dist/setup-commands.js.map +1 -1
- package/dist/store-commands.d.ts +1 -1
- package/dist/store-commands.d.ts.map +1 -1
- package/dist/store-commands.js +1 -2
- package/dist/store-commands.js.map +1 -1
- package/dist/store-connection.d.ts +1 -3
- package/dist/store-connection.d.ts.map +1 -1
- package/dist/store-connection.js +14 -14
- package/dist/store-connection.js.map +1 -1
- package/dist/sync-progress.d.ts +4 -4
- package/dist/sync-progress.d.ts.map +1 -1
- package/dist/sync-progress.js +1 -1
- package/dist/sync-progress.js.map +1 -1
- package/dist/tokens.d.ts +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +1 -1
- package/dist/tokens.js.map +1 -1
- package/dist/unified-search.d.ts +1 -1
- package/dist/unified-search.d.ts.map +1 -1
- package/dist/upcoming-meetings.d.ts +2 -2
- package/dist/upcoming-meetings.js +1 -1
- package/dist/upcoming-meetings.js.map +1 -1
- package/dist/upgrade.d.ts.map +1 -1
- package/dist/upgrade.js +1 -2
- package/dist/upgrade.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/watch-commands.d.ts +1 -2
- package/dist/watch-commands.d.ts.map +1 -1
- package/dist/watch-commands.js +1 -2
- package/dist/watch-commands.js.map +1 -1
- package/dist/watch-service.d.ts +1 -1
- package/dist/watch-service.d.ts.map +1 -1
- package/dist/watch-service.js +1 -1
- package/dist/watch-service.js.map +1 -1
- package/dist/zoom-app.d.ts +2 -2
- package/dist/zoom-app.d.ts.map +1 -1
- package/dist/zoom-app.js +1 -1
- package/dist/zoom-app.js.map +1 -1
- package/dist/zoom-search-commands.d.ts +1 -1
- package/dist/zoom-search-commands.d.ts.map +1 -1
- package/dist/zoom-search-commands.js +1 -1
- package/dist/zoom-search-commands.js.map +1 -1
- package/dist/zoom-session.d.ts +1 -1
- package/dist/zoom-session.d.ts.map +1 -1
- package/dist/zoom-session.js +1 -1
- package/dist/zoom-session.js.map +1 -1
- package/package.json +3 -3
- package/scenarios/person-in-meetings.md +1 -1
- package/skills/zoom-cli/SKILL.md +1 -1
- package/skills/zoom-cli/references/people-and-projects.md +5 -5
- package/skills/zoom-cli/references/prepare.md +2 -2
- package/dist/bundle/agent-3HDWEZ5M.js +0 -47
- package/dist/bundle/all-profiles-RY2OMSDL.js +0 -321
- package/dist/bundle/answer-policy-IFVXPPGW.js +0 -131
- package/dist/bundle/anthropic-36VPSF7B.js +0 -91
- package/dist/bundle/app-server-ZVJVUGB7.js +0 -267
- package/dist/bundle/bun-F4M4KCNA.js +0 -169
- package/dist/bundle/bun-sqlite-IOPYIUA7.js +0 -76
- package/dist/bundle/chunk-2IBKKVVZ.js +0 -335
- package/dist/bundle/chunk-2S54TM4N.js +0 -230
- package/dist/bundle/chunk-3AQHKXVR.js +0 -161
- package/dist/bundle/chunk-3CW2C7ZA.js +0 -217
- package/dist/bundle/chunk-3KUEZK5Z.js +0 -73
- package/dist/bundle/chunk-3PXUQFHX.js +0 -2333
- package/dist/bundle/chunk-3QN5KDFZ.js +0 -3012
- package/dist/bundle/chunk-575JMTDR.js +0 -562
- package/dist/bundle/chunk-5B2LV4MS.js +0 -26
- package/dist/bundle/chunk-5WL5RHOO.js +0 -167
- package/dist/bundle/chunk-6C7ESL5N.js +0 -295
- package/dist/bundle/chunk-6E4KLYNP.js +0 -229
- package/dist/bundle/chunk-7JDXR75Q.js +0 -465
- package/dist/bundle/chunk-AK3H2C65.js +0 -1349
- package/dist/bundle/chunk-AQ5RIOUE.js +0 -633
- package/dist/bundle/chunk-AQLUAQXJ.js +0 -1259
- package/dist/bundle/chunk-ASTLGFTR.js +0 -12270
- package/dist/bundle/chunk-ATHBB7OU.js +0 -106
- package/dist/bundle/chunk-B2NM65RD.js +0 -80
- package/dist/bundle/chunk-B4KHDXJE.js +0 -64
- package/dist/bundle/chunk-BAFC7WNI.js +0 -276
- package/dist/bundle/chunk-BBGJQMRI.js +0 -34
- package/dist/bundle/chunk-BTLZYRIW.js +0 -1007
- package/dist/bundle/chunk-BZDS2X6Y.js +0 -5150
- package/dist/bundle/chunk-C7JPYWYQ.js +0 -77
- package/dist/bundle/chunk-CDQUW25G.js +0 -3752
- package/dist/bundle/chunk-CJWGJBHW.js +0 -1044
- package/dist/bundle/chunk-D72URWJE.js +0 -532
- package/dist/bundle/chunk-D7RCUODT.js +0 -185
- package/dist/bundle/chunk-DFDN6AUB.js +0 -21
- package/dist/bundle/chunk-DNCLQPOM.js +0 -7
- package/dist/bundle/chunk-DQJECJUE.js +0 -2257
- package/dist/bundle/chunk-E4JQ3MCW.js +0 -2338
- package/dist/bundle/chunk-E4ODYLEK.js +0 -209
- package/dist/bundle/chunk-EE45N67Q.js +0 -86
- package/dist/bundle/chunk-EEEU4MKK.js +0 -210
- package/dist/bundle/chunk-ESN3W2MZ.js +0 -2624
- package/dist/bundle/chunk-ETIZGA4P.js +0 -340
- package/dist/bundle/chunk-F44QK6CK.js +0 -52
- package/dist/bundle/chunk-FH2UFNH6.js +0 -54
- package/dist/bundle/chunk-FTH6WGYO.js +0 -24
- package/dist/bundle/chunk-FWACRG4X.js +0 -160
- package/dist/bundle/chunk-FXBHOCJK.js +0 -24600
- package/dist/bundle/chunk-G5SZL7G2.js +0 -150
- package/dist/bundle/chunk-G6CHEFAG.js +0 -108
- package/dist/bundle/chunk-GHJD7PE6.js +0 -1068
- package/dist/bundle/chunk-GZ7WBU5Y.js +0 -18
- package/dist/bundle/chunk-HKLRI2LB.js +0 -555
- package/dist/bundle/chunk-HMD4FZYY.js +0 -133
- package/dist/bundle/chunk-HO4JGD4Q.js +0 -16
- package/dist/bundle/chunk-HTQTIKWP.js +0 -928
- package/dist/bundle/chunk-HUAHLO6N.js +0 -29
- package/dist/bundle/chunk-IANKXHSE.js +0 -46
- package/dist/bundle/chunk-IQZXFWFI.js +0 -170
- package/dist/bundle/chunk-ISQ23VKV.js +0 -123
- package/dist/bundle/chunk-JEH33ZCD.js +0 -58
- package/dist/bundle/chunk-JUNQYWQ2.js +0 -228
- package/dist/bundle/chunk-JUXMVQWJ.js +0 -799
- package/dist/bundle/chunk-KHQDWYCG.js +0 -82
- package/dist/bundle/chunk-KYRYD4CR.js +0 -38
- package/dist/bundle/chunk-LBGT6W4R.js +0 -377
- package/dist/bundle/chunk-LN7HRYTH.js +0 -80
- package/dist/bundle/chunk-MEB7HBTM.js +0 -95
- package/dist/bundle/chunk-MEEFWYX3.js +0 -388
- package/dist/bundle/chunk-MNOAMJ6H.js +0 -94
- package/dist/bundle/chunk-MYHPXJDG.js +0 -142
- package/dist/bundle/chunk-NGI37RFW.js +0 -692
- package/dist/bundle/chunk-NZMWD7Y3.js +0 -68149
- package/dist/bundle/chunk-O6IECJRM.js +0 -54
- package/dist/bundle/chunk-OBWL3BUV.js +0 -800
- package/dist/bundle/chunk-OEEWVKJX.js +0 -53
- package/dist/bundle/chunk-OQYZ3W4K.js +0 -374
- package/dist/bundle/chunk-P3ZCTYGW.js +0 -101
- package/dist/bundle/chunk-PL5P7UKW.js +0 -25216
- package/dist/bundle/chunk-PVEBAHFU.js +0 -100
- package/dist/bundle/chunk-R2B6PUVI.js +0 -206
- package/dist/bundle/chunk-RLOH7RDN.js +0 -362
- package/dist/bundle/chunk-RQ4AXSCJ.js +0 -616
- package/dist/bundle/chunk-RYGTCRFZ.js +0 -140
- package/dist/bundle/chunk-S4PXWIE4.js +0 -408
- package/dist/bundle/chunk-SDZZYZLL.js +0 -58
- package/dist/bundle/chunk-SHQAYUK6.js +0 -1199
- package/dist/bundle/chunk-T3W4V4A6.js +0 -63
- package/dist/bundle/chunk-TCT5D2X2.js +0 -6848
- package/dist/bundle/chunk-TDWPOSPR.js +0 -198
- package/dist/bundle/chunk-TER3N27H.js +0 -353
- package/dist/bundle/chunk-TMTNP7QN.js +0 -214
- package/dist/bundle/chunk-TO5UEWXR.js +0 -288
- package/dist/bundle/chunk-TXDR6YSF.js +0 -23
- package/dist/bundle/chunk-TY7NDMFY.js +0 -46
- package/dist/bundle/chunk-UAWSINMC.js +0 -875
- package/dist/bundle/chunk-UBH7YF3C.js +0 -9354
- package/dist/bundle/chunk-UEAE3JUU.js +0 -46576
- package/dist/bundle/chunk-UHR363OD.js +0 -357
- package/dist/bundle/chunk-UM52A76S.js +0 -259
- package/dist/bundle/chunk-URP6BTHN.js +0 -624
- package/dist/bundle/chunk-UWQEAA6S.js +0 -13
- package/dist/bundle/chunk-VR7QZGRU.js +0 -185
- package/dist/bundle/chunk-VRH5PBSL.js +0 -755
- package/dist/bundle/chunk-VTLQTQKY.js +0 -1756
- package/dist/bundle/chunk-VTYNLTDW.js +0 -331
- package/dist/bundle/chunk-WY7XG6TE.js +0 -76
- package/dist/bundle/chunk-XH23ML2V.js +0 -195
- package/dist/bundle/chunk-XYF76A26.js +0 -27556
- package/dist/bundle/chunk-Y5E2WNWB.js +0 -35
- package/dist/bundle/chunk-ZDYJAEVB.js +0 -84
- package/dist/bundle/chunk-ZJ63HDBT.js +0 -71
- package/dist/bundle/chunk-ZT4ZPUIO.js +0 -218
- package/dist/bundle/chunk-ZVVMGPBJ.js +0 -50
- package/dist/bundle/cli-JK6PQSSN.js +0 -1270
- package/dist/bundle/command-contract-F3QNBKPX.js +0 -46
- package/dist/bundle/command-server-entry-DJLGN62J.js +0 -176
- package/dist/bundle/config-TYYMV3HV.js +0 -118
- package/dist/bundle/decode-ZZICNNFF.js +0 -31
- package/dist/bundle/dispatch-FKMIPCPQ.js +0 -412
- package/dist/bundle/dist-NQPF25XI.js +0 -322
- package/dist/bundle/dist-PAKDDIBT.js +0 -191
- package/dist/bundle/dist-XUFQCJXW.js +0 -7577
- package/dist/bundle/echarts-QMAA7HH5.js +0 -42501
- package/dist/bundle/embed-T64EUKUI.js +0 -38
- package/dist/bundle/embedder-ZEKISZXI.js +0 -111
- package/dist/bundle/failure-XTWBYI2A.js +0 -25
- package/dist/bundle/first-run-ZFNY4RRH.js +0 -29
- package/dist/bundle/first-screen-LPGCHRHZ.js +0 -47
- package/dist/bundle/instructions-4H7UREH2.js +0 -11
- package/dist/bundle/mcp-5HFPWC3W.js +0 -167
- package/dist/bundle/meeting-combined-7HDPOUPB.js +0 -28
- package/dist/bundle/meeting-model-MVUW7UPQ.js +0 -26
- package/dist/bundle/meeting-semantic-IF633WGX.js +0 -23
- package/dist/bundle/meetings-RY2AAPHV.js +0 -332
- package/dist/bundle/node-KM3CUABH.js +0 -2340
- package/dist/bundle/node-P3PUHKYH.js +0 -176
- package/dist/bundle/node-TLZSIHIJ.js +0 -21
- package/dist/bundle/node-sqlite-ASAZJNHE.js +0 -74
- package/dist/bundle/oauth-4U3OCK3W.js +0 -20
- package/dist/bundle/oauth-AJARLPSY.js +0 -46
- package/dist/bundle/open-SEJRY2ZI.js +0 -23
- package/dist/bundle/openai-FZDSC2AA.js +0 -28
- package/dist/bundle/process-AFIXYXWL.js +0 -91
- package/dist/bundle/prompt-BCRD64F4.js +0 -17
- package/dist/bundle/public-SVJILCNI.js +0 -206
- package/dist/bundle/recognize-25ITJWGX.js +0 -26
- package/dist/bundle/remote-5FBAJX7O.js +0 -32
- package/dist/bundle/rerank-2HGWWORY.js +0 -52
- package/dist/bundle/run-log-7HRF4Y47.js +0 -145
- package/dist/bundle/serve-RL35MSJD.js +0 -199
- package/dist/bundle/server-QUSBWACP.js +0 -229
- package/dist/bundle/server-SCK2SRDK.js +0 -96
- package/dist/bundle/services-BGRIQNDC.js +0 -609
- package/dist/bundle/speech-4W3ZMTFK.js +0 -89
- package/dist/bundle/sqlite-runtime-K3KLRZCV.js +0 -20
- package/dist/bundle/state-GYL4C74G.js +0 -36
- package/dist/bundle/store-27UQMNEO.js +0 -189
- package/dist/bundle/store-NLYH5SQX.js +0 -316
- package/dist/bundle/store-connection-CZILWRSR.js +0 -112
- package/dist/bundle/store-maintenance-command-Z3QLNSXJ.js +0 -84
- package/dist/bundle/streaming-73EKEGPF.js +0 -18
- package/dist/bundle/surface-CV3C4RV2.js +0 -82
- package/dist/bundle/tokens-PY3S22LY.js +0 -27
- /package/dist/bundle/{chunk-7ECP5ZQR.js → chunk-7O7XM37N.js} +0 -0
|
@@ -1,875 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
RegistryError,
|
|
5
|
-
SNAKE_CASE,
|
|
6
|
-
array,
|
|
7
|
-
boolean,
|
|
8
|
-
defineReasons,
|
|
9
|
-
duplicates,
|
|
10
|
-
integer,
|
|
11
|
-
lazy,
|
|
12
|
-
literal,
|
|
13
|
-
minValue,
|
|
14
|
-
number,
|
|
15
|
-
object,
|
|
16
|
-
optional,
|
|
17
|
-
picklist,
|
|
18
|
-
pipe,
|
|
19
|
-
reference,
|
|
20
|
-
string,
|
|
21
|
-
variant
|
|
22
|
-
} from "./chunk-ESN3W2MZ.js";
|
|
23
|
-
import {
|
|
24
|
-
CliError,
|
|
25
|
-
isCliError
|
|
26
|
-
} from "./chunk-IANKXHSE.js";
|
|
27
|
-
import {
|
|
28
|
-
__name
|
|
29
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
30
|
-
|
|
31
|
-
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
|
|
32
|
-
var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
|
|
33
|
-
var leftOut = /* @__PURE__ */ __name((fields) => fields.filter((field) => field.negatable).map((field) => field.name), "leftOut");
|
|
34
|
-
var has = /* @__PURE__ */ __name((fields, operator) => fields.some((field) => field.operators.includes(operator)), "has");
|
|
35
|
-
var syntaxOf = /* @__PURE__ */ __name((shown, backend) => [
|
|
36
|
-
"field:value",
|
|
37
|
-
...has(shown, "phrase") ? ['"a phrase"'] : [],
|
|
38
|
-
...has(shown, "wildcard") ? ["word*"] : [],
|
|
39
|
-
...backend === "native" ? ["terms joined by AND"] : ["AND OR NOT", "( )"],
|
|
40
|
-
...has(shown, "range") ? ["[a TO b] \xB7 > >= < <="] : []
|
|
41
|
-
].join(" \xB7 "), "syntaxOf");
|
|
42
|
-
var kindOf = /* @__PURE__ */ __name((field) => field.values ? `${field.type}: ${field.values.join("|")}` : `${field.type}: ${field.operators.join(", ")}`, "kindOf");
|
|
43
|
-
var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
|
|
44
|
-
const shown = shownOf(registry);
|
|
45
|
-
const negatable = leftOut(shown);
|
|
46
|
-
const rows = shown.map((field) => [field.name, kindOf(field), field.example]);
|
|
47
|
-
const widths = [0, 1].map((at) => Math.max(...rows.map((row) => (row[at] ?? "").length)));
|
|
48
|
-
return [
|
|
49
|
-
"Fields:",
|
|
50
|
-
...rows.map(([name = "", kind = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
|
|
51
|
-
...registry.defaults && registry.defaults.length > 0 ? [`Defaults: ${registry.defaults.join(" ")} \u2014 name the field to change it`] : [],
|
|
52
|
-
...negatable.length > 0 ? [`Leave out: -${negatable[0]}:value or NOT ${negatable[0]}:value, for ${negatable.join(", ")}`] : [],
|
|
53
|
-
`Syntax: ${syntaxOf(shown, registry.backend)}`,
|
|
54
|
-
...guide ? [`Guide: ${guide}`] : []
|
|
55
|
-
].join("\n");
|
|
56
|
-
}, "fieldsHelp");
|
|
57
|
-
var queryDescription = /* @__PURE__ */ __name((registry) => {
|
|
58
|
-
const shown = shownOf(registry);
|
|
59
|
-
if (shown.length === 0)
|
|
60
|
-
return "field:value terms; this list filters by none yet, so any term is refused";
|
|
61
|
-
const negatable = leftOut(shown);
|
|
62
|
-
const terms = registry.backend === "native" ? `field:value terms joined by AND that narrow the list${negatable.length > 0 ? `; -field:value or NOT field:value leaves out what matches, for ${negatable.join(", ")} only` : ""}` : `field:value terms that narrow the list (Lucene: AND OR NOT, -field:value${has(shown, "range") ? ", [a TO b], > <" : ""})`;
|
|
63
|
-
const fields = shown.map((field) => field.values ? `${field.name} (${field.values.join("|")})` : field.name);
|
|
64
|
-
const defaults = registry.defaults?.length ? `; unless named: ${registry.defaults.join(" ")}` : "";
|
|
65
|
-
return `${terms}; fields: ${fields.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
|
|
66
|
-
}, "queryDescription");
|
|
67
|
-
|
|
68
|
-
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
|
|
69
|
-
var QUERY_LIMITS = {
|
|
70
|
-
bytes: 8192,
|
|
71
|
-
depth: 32,
|
|
72
|
-
nodes: 256
|
|
73
|
-
};
|
|
74
|
-
var spanSchema = object({ start: number(), end: number() });
|
|
75
|
-
var predicateSchema = object({
|
|
76
|
-
kind: literal("predicate"),
|
|
77
|
-
field: string(),
|
|
78
|
-
operator: picklist(["term", "phrase", "wildcard", "regex", "range"]),
|
|
79
|
-
value: string(),
|
|
80
|
-
upper: optional(string()),
|
|
81
|
-
lower_inclusive: optional(boolean()),
|
|
82
|
-
upper_inclusive: optional(boolean()),
|
|
83
|
-
span: spanSchema,
|
|
84
|
-
implicit: optional(literal(true)),
|
|
85
|
-
slop: optional(pipe(number(), integer(), minValue(0)))
|
|
86
|
-
});
|
|
87
|
-
var queryNodeSchema = variant("kind", [
|
|
88
|
-
predicateSchema,
|
|
89
|
-
object({
|
|
90
|
-
kind: literal("boolean"),
|
|
91
|
-
clauses: array(object({ occur: picklist(["must", "should", "must_not"]), node: lazy(() => queryNodeSchema) })),
|
|
92
|
-
span: spanSchema
|
|
93
|
-
})
|
|
94
|
-
]);
|
|
95
|
-
var queryAstSchema = object({
|
|
96
|
-
version: literal(1),
|
|
97
|
-
language: literal("lucene-v1"),
|
|
98
|
-
root: queryNodeSchema
|
|
99
|
-
});
|
|
100
|
-
function queryError(reason, span, alternative, context = {}, details = {}) {
|
|
101
|
-
throw new CliError("validation_error", `${context.command ?? "query"}: ${reason} at position ${span.start + 1}${alternative ? ` \u2014 ${alternative}` : ""}`, {
|
|
102
|
-
reason,
|
|
103
|
-
span,
|
|
104
|
-
...alternative ? { alternative } : {},
|
|
105
|
-
...context.guide ? { guide: context.guide } : {},
|
|
106
|
-
...details
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
__name(queryError, "queryError");
|
|
110
|
-
var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
|
|
111
|
-
|
|
112
|
-
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
|
|
113
|
-
var timezoneOf = /* @__PURE__ */ __name((given) => {
|
|
114
|
-
const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
|
|
115
|
-
try {
|
|
116
|
-
new Intl.DateTimeFormat("en", { timeZone: zone }).format(0);
|
|
117
|
-
} catch {
|
|
118
|
-
queryError("query.invalid-timezone", { start: 0, end: 0 }, "use an IANA timezone such as Europe/Madrid");
|
|
119
|
-
}
|
|
120
|
-
return zone;
|
|
121
|
-
}, "timezoneOf");
|
|
122
|
-
var calendar = /* @__PURE__ */ __name((value, span) => {
|
|
123
|
-
if (!/^\d{4}-\d{2}-\d{2}$/u.test(value))
|
|
124
|
-
queryError("query.invalid-date", span, "use an ISO date such as 2026-10-01");
|
|
125
|
-
const year = Number(value.slice(0, 4)), month = Number(value.slice(5, 7)), day = Number(value.slice(8, 10));
|
|
126
|
-
const date = /* @__PURE__ */ new Date(0);
|
|
127
|
-
date.setUTCFullYear(year, month - 1, day);
|
|
128
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
129
|
-
if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month - 1 || date.getUTCDate() !== day)
|
|
130
|
-
queryError("query.invalid-date", span);
|
|
131
|
-
return date;
|
|
132
|
-
}, "calendar");
|
|
133
|
-
var dayBoundary = /* @__PURE__ */ __name((value, zone, next, span) => {
|
|
134
|
-
const date = calendar(value, span);
|
|
135
|
-
if (next)
|
|
136
|
-
date.setUTCDate(date.getUTCDate() + 1);
|
|
137
|
-
const wanted = date.getUTCFullYear() * 1e4 + (date.getUTCMonth() + 1) * 100 + date.getUTCDate();
|
|
138
|
-
const formatter = new Intl.DateTimeFormat("en-CA", {
|
|
139
|
-
timeZone: zone,
|
|
140
|
-
year: "numeric",
|
|
141
|
-
month: "2-digit",
|
|
142
|
-
day: "2-digit",
|
|
143
|
-
era: "short"
|
|
144
|
-
});
|
|
145
|
-
const dayAt = /* @__PURE__ */ __name((time) => {
|
|
146
|
-
const parts = formatter.formatToParts(time);
|
|
147
|
-
const value2 = /* @__PURE__ */ __name((name) => Number(parts.find((p) => p.type === name)?.value), "value");
|
|
148
|
-
const year = parts.find((p) => p.type === "era")?.value === "BC" ? 1 - value2("year") : value2("year");
|
|
149
|
-
return year * 1e4 + value2("month") * 100 + value2("day");
|
|
150
|
-
}, "dayAt");
|
|
151
|
-
let lo = date.getTime() - 2 * 864e5, hi = date.getTime() + 2 * 864e5;
|
|
152
|
-
while (lo < hi) {
|
|
153
|
-
const mid = Math.floor((lo + hi) / 2);
|
|
154
|
-
if (dayAt(mid) < wanted)
|
|
155
|
-
lo = mid + 1;
|
|
156
|
-
else
|
|
157
|
-
hi = mid;
|
|
158
|
-
}
|
|
159
|
-
if (dayAt(lo) !== wanted)
|
|
160
|
-
queryError("query.invalid-date", span, "this calendar day does not exist in the selected timezone");
|
|
161
|
-
return lo;
|
|
162
|
-
}, "dayBoundary");
|
|
163
|
-
var WALL = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/u;
|
|
164
|
-
var wallTime = /* @__PURE__ */ __name((value, zone, span) => {
|
|
165
|
-
const [, year, month, day, hour, minute, second = "0", fraction = "0"] = WALL.exec(value) ?? [];
|
|
166
|
-
if (year === void 0)
|
|
167
|
-
queryError("query.invalid-date", span, "use YYYY-MM-DDTHH:mm, with optional seconds");
|
|
168
|
-
const wanted = Date.UTC(Number(year), Number(month) - 1, Number(day), Number(hour), Number(minute), Number(second), Number(fraction.padEnd(3, "0")));
|
|
169
|
-
const check = new Date(wanted);
|
|
170
|
-
if (check.getUTCDate() !== Number(day) || check.getUTCHours() !== Number(hour) || check.getUTCMinutes() !== Number(minute) || check.getUTCSeconds() !== Number(second))
|
|
171
|
-
queryError("query.invalid-date", span);
|
|
172
|
-
const formatter = new Intl.DateTimeFormat("en-CA", {
|
|
173
|
-
timeZone: zone,
|
|
174
|
-
year: "numeric",
|
|
175
|
-
month: "2-digit",
|
|
176
|
-
day: "2-digit",
|
|
177
|
-
hour: "2-digit",
|
|
178
|
-
minute: "2-digit",
|
|
179
|
-
second: "2-digit",
|
|
180
|
-
hourCycle: "h23"
|
|
181
|
-
});
|
|
182
|
-
const shown = /* @__PURE__ */ __name((instant) => {
|
|
183
|
-
const parts = Object.fromEntries(formatter.formatToParts(instant).map((part) => [part.type, Number(part.value)]));
|
|
184
|
-
return Date.UTC(parts.year ?? 0, (parts.month ?? 1) - 1, parts.day, parts.hour, parts.minute, parts.second) + (instant % 1e3 + 1e3) % 1e3;
|
|
185
|
-
}, "shown");
|
|
186
|
-
const found = /* @__PURE__ */ new Set();
|
|
187
|
-
for (const probe of [wanted - 864e5, wanted, wanted + 864e5]) {
|
|
188
|
-
const candidate = wanted - (shown(probe) - probe);
|
|
189
|
-
if (shown(candidate) === wanted)
|
|
190
|
-
found.add(candidate);
|
|
191
|
-
}
|
|
192
|
-
if (found.size !== 1)
|
|
193
|
-
queryError("query.invalid-date", span, "this local time is skipped or repeated by daylight saving; add an offset");
|
|
194
|
-
return [...found][0];
|
|
195
|
-
}, "wallTime");
|
|
196
|
-
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/iu;
|
|
197
|
-
var zonedMoment = /* @__PURE__ */ __name((value, zone, span, { end = false } = {}) => {
|
|
198
|
-
if (/^\d{4}-\d{2}-\d{2}$/u.test(value))
|
|
199
|
-
return dayBoundary(value, zone, end, span) - (end ? 1 : 0);
|
|
200
|
-
if (!ZONED.test(value))
|
|
201
|
-
return wallTime(value, zone, span);
|
|
202
|
-
const time = Date.parse(value);
|
|
203
|
-
if (!/^\d{4}-\d{2}-\d{2}T/u.test(value) || !Number.isFinite(time))
|
|
204
|
-
queryError("query.invalid-date", span);
|
|
205
|
-
calendar(value.slice(0, 10), span);
|
|
206
|
-
return time;
|
|
207
|
-
}, "zonedMoment");
|
|
208
|
-
var AGO = /^(\d+)(m|h|d)$/u;
|
|
209
|
-
var MOMENT = /^(\d{4}-\d{2}-\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})?$/u;
|
|
210
|
-
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
211
|
-
var dayOf = /* @__PURE__ */ __name((word, zone, now, span) => {
|
|
212
|
-
const today = new Intl.DateTimeFormat("en-CA", {
|
|
213
|
-
timeZone: zone,
|
|
214
|
-
year: "numeric",
|
|
215
|
-
month: "2-digit",
|
|
216
|
-
day: "2-digit"
|
|
217
|
-
}).format(now);
|
|
218
|
-
if (word === "today")
|
|
219
|
-
return today;
|
|
220
|
-
const date = calendar(today, span);
|
|
221
|
-
date.setUTCDate(date.getUTCDate() - 1);
|
|
222
|
-
return date.toISOString().slice(0, 10);
|
|
223
|
-
}, "dayOf");
|
|
224
|
-
var dateEndpoint = /* @__PURE__ */ __name((value, zone, side, inclusive, span, now = Date.now()) => {
|
|
225
|
-
if (value === "*")
|
|
226
|
-
return { inclusive };
|
|
227
|
-
const word = value.toLowerCase();
|
|
228
|
-
if (word === "today" || word === "yesterday")
|
|
229
|
-
return dateEndpoint(dayOf(word, zone, now, span), zone, side, inclusive, span);
|
|
230
|
-
const [, amount, unit] = AGO.exec(word) ?? [];
|
|
231
|
-
if (amount && unit)
|
|
232
|
-
return { time: now - Number(amount) * (AGO_MS[unit] ?? 0), inclusive };
|
|
233
|
-
if (/^\d{4}-\d{2}-\d{2}$/u.test(value))
|
|
234
|
-
return {
|
|
235
|
-
time: dayBoundary(value, zone, side === "lower" ? !inclusive : inclusive, span),
|
|
236
|
-
inclusive: side === "lower"
|
|
237
|
-
};
|
|
238
|
-
const [, day, hour, minute, second = "0", offset] = MOMENT.exec(value) ?? [];
|
|
239
|
-
if (day === void 0)
|
|
240
|
-
queryError("query.invalid-date", span, "use an ISO date, a date and time such as 2026-10-01T09:00 (optional seconds and offset), today, yesterday or 30m/2h/7d ago");
|
|
241
|
-
const moment = value.replace(" ", "T");
|
|
242
|
-
if (offset === void 0)
|
|
243
|
-
return { time: wallTime(moment, zone, span), inclusive };
|
|
244
|
-
calendar(day, span);
|
|
245
|
-
const time = Date.parse(moment);
|
|
246
|
-
if (!Number.isFinite(time) || Number(hour) > 23 || Number(minute) > 59 || Number(second) > 59)
|
|
247
|
-
queryError("query.invalid-date", span);
|
|
248
|
-
return { time, inclusive };
|
|
249
|
-
}, "dateEndpoint");
|
|
250
|
-
var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclusive, zone, span, now = Date.now()) => {
|
|
251
|
-
const since = lower === upper && AGO.test(lower.toLowerCase());
|
|
252
|
-
const lo = dateEndpoint(lower, zone, "lower", lowerInclusive, span, now);
|
|
253
|
-
const hi = dateEndpoint(since ? "*" : upper, zone, "upper", upperInclusive, span, now);
|
|
254
|
-
return {
|
|
255
|
-
...lo.time === void 0 ? {} : { lower: lo.time },
|
|
256
|
-
...hi.time === void 0 ? {} : { upper: hi.time },
|
|
257
|
-
lower_inclusive: lo.inclusive,
|
|
258
|
-
upper_inclusive: hi.inclusive
|
|
259
|
-
};
|
|
260
|
-
}, "dateRange");
|
|
261
|
-
|
|
262
|
-
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
|
|
263
|
-
var wordsOf = /* @__PURE__ */ __name((text) => text.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
|
|
264
|
-
var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
|
|
265
|
-
var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
|
|
266
|
-
var matchOne = /* @__PURE__ */ __name((field, node, value, options) => {
|
|
267
|
-
if (!present(value))
|
|
268
|
-
return false;
|
|
269
|
-
if (node.operator === "wildcard" && node.value === "*")
|
|
270
|
-
return true;
|
|
271
|
-
const text = String(value);
|
|
272
|
-
switch (field.type) {
|
|
273
|
-
case "txt": {
|
|
274
|
-
const words = wordsOf(text);
|
|
275
|
-
if (node.operator === "wildcard")
|
|
276
|
-
return words.some((word) => pattern(node.value).test(word));
|
|
277
|
-
const wanted = wordsOf(node.value);
|
|
278
|
-
return words.some((_, at) => wanted.every((word, offset) => words[at + offset] === word));
|
|
279
|
-
}
|
|
280
|
-
case "num": {
|
|
281
|
-
const number2 = Number(value);
|
|
282
|
-
if (node.operator !== "range")
|
|
283
|
-
return number2 === Number(node.value);
|
|
284
|
-
const { value: lower, upper = "*", lower_inclusive: lowerInclusive, upper_inclusive: upperInclusive } = node;
|
|
285
|
-
return (lower === "*" || (lowerInclusive ? number2 >= Number(lower) : number2 > Number(lower))) && (upper === "*" || (upperInclusive ? number2 <= Number(upper) : number2 < Number(upper)));
|
|
286
|
-
}
|
|
287
|
-
case "time": {
|
|
288
|
-
const time = Date.parse(text);
|
|
289
|
-
const [lower, upper, lowerInclusive, upperInclusive] = node.operator === "range" ? [node.value, node.upper ?? "*", node.lower_inclusive ?? true, node.upper_inclusive ?? true] : [node.value, node.value, true, true];
|
|
290
|
-
const range = dateRange(lower, upper, lowerInclusive, upperInclusive, options.zone ?? "UTC", node.span, options.now);
|
|
291
|
-
return (range.lower === void 0 || (range.lower_inclusive ? time >= range.lower : time > range.lower)) && (range.upper === void 0 || (range.upper_inclusive ? time <= range.upper : time < range.upper));
|
|
292
|
-
}
|
|
293
|
-
default:
|
|
294
|
-
return node.operator === "wildcard" ? pattern(node.value).test(text) : text.toLowerCase() === node.value.toLowerCase();
|
|
295
|
-
}
|
|
296
|
-
}, "matchOne");
|
|
297
|
-
var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
|
|
298
|
-
if (node.kind === "boolean") {
|
|
299
|
-
const by = /* @__PURE__ */ __name((occur) => node.clauses.filter((clause) => clause.occur === occur), "by");
|
|
300
|
-
const [must, should, mustNot] = [by("must"), by("should"), by("must_not")];
|
|
301
|
-
const holds = /* @__PURE__ */ __name((clause) => matches(clause.node, item, byName, options), "holds");
|
|
302
|
-
return must.every(holds) && !mustNot.some(holds) && (should.length === 0 || must.length > 0 || should.some(holds));
|
|
303
|
-
}
|
|
304
|
-
const field = byName.get(node.field);
|
|
305
|
-
if (!field)
|
|
306
|
-
throw new Error(`evaluate: no field "${node.field}"; validate the query first`);
|
|
307
|
-
if (field.relation !== void 0) {
|
|
308
|
-
if (!options.relation)
|
|
309
|
-
throw new Error(`evaluate: "${node.field}" is a relation; pass options.relation`);
|
|
310
|
-
return options.relation(node, item);
|
|
311
|
-
}
|
|
312
|
-
const value = item[node.field];
|
|
313
|
-
return Array.isArray(value) ? value.some((one) => matchOne(field, node, one, options)) : matchOne(field, node, value, options);
|
|
314
|
-
}, "matches");
|
|
315
|
-
var evaluate = /* @__PURE__ */ __name((ast, fields, item, options = {}) => matches(ast.root, item, new Map(fields.map((field) => [field.name, field])), options), "evaluate");
|
|
316
|
-
|
|
317
|
-
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
|
|
318
|
-
var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
|
|
319
|
-
var OPERATORS_BY_TYPE = {
|
|
320
|
-
kw: ["term", "phrase", "wildcard"],
|
|
321
|
-
txt: ["term", "phrase", "wildcard"],
|
|
322
|
-
enum: ["term"],
|
|
323
|
-
num: ["term", "range"],
|
|
324
|
-
time: ["term", "range"],
|
|
325
|
-
bool: ["term"],
|
|
326
|
-
ref: ["term", "phrase"]
|
|
327
|
-
};
|
|
328
|
-
var QUERY_BACKENDS = ["sql", "native"];
|
|
329
|
-
var unwrap = /* @__PURE__ */ __name((schema) => schema.wrapped ? unwrap(schema.wrapped) : schema, "unwrap");
|
|
330
|
-
var REFERENCE_SOURCE = reference.pipe[1].requirement.source;
|
|
331
|
-
var typeOf = /* @__PURE__ */ __name((schema) => {
|
|
332
|
-
const plain = unwrap(schema);
|
|
333
|
-
const actions = plain.pipe ?? [];
|
|
334
|
-
switch (plain.type) {
|
|
335
|
-
case "picklist":
|
|
336
|
-
return { type: "enum", values: (plain.options ?? []).map(String) };
|
|
337
|
-
case "number":
|
|
338
|
-
return { type: "num" };
|
|
339
|
-
case "boolean":
|
|
340
|
-
return { type: "bool" };
|
|
341
|
-
case "string":
|
|
342
|
-
if (actions.some((action) => action.type === "iso_timestamp"))
|
|
343
|
-
return { type: "time" };
|
|
344
|
-
if (actions.some((action) => action.requirement instanceof RegExp && action.requirement.source === REFERENCE_SOURCE))
|
|
345
|
-
return { type: "ref" };
|
|
346
|
-
return { type: "kw" };
|
|
347
|
-
case "array":
|
|
348
|
-
return plain.item ? typeOf(plain.item) : void 0;
|
|
349
|
-
default:
|
|
350
|
-
return void 0;
|
|
351
|
-
}
|
|
352
|
-
}, "typeOf");
|
|
353
|
-
var exampleOf = /* @__PURE__ */ __name((name, type, values) => ({
|
|
354
|
-
kw: `${name}:abc`,
|
|
355
|
-
txt: `${name}:word*`,
|
|
356
|
-
enum: `${name}:${values?.[0] ?? "x"}`,
|
|
357
|
-
num: `${name}>0`,
|
|
358
|
-
time: `${name}>=7d`,
|
|
359
|
-
bool: `${name}:true`,
|
|
360
|
-
ref: `${name}:"note:42"`
|
|
361
|
-
})[type], "exampleOf");
|
|
362
|
-
var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
|
|
363
|
-
const entries = unwrap(schema).entries ?? {};
|
|
364
|
-
const excluded = new Set(annotations.exclude ?? []);
|
|
365
|
-
const words = new Set(annotations.text ?? []);
|
|
366
|
-
const native = new Set(annotations.native ?? []);
|
|
367
|
-
const negatable = new Set(annotations.negatable ?? []);
|
|
368
|
-
const finish = /* @__PURE__ */ __name((field) => ({
|
|
369
|
-
...field,
|
|
370
|
-
operators: OPERATORS_BY_TYPE[field.type],
|
|
371
|
-
example: annotations.examples?.[field.name] ?? field.example ?? exampleOf(field.name, field.type, field.values),
|
|
372
|
-
...native.has(field.name) ? { native: true } : {},
|
|
373
|
-
...negatable.has(field.name) ? { negatable: true } : {},
|
|
374
|
-
...annotations.validate?.[field.name] ? { validate: annotations.validate[field.name] } : {}
|
|
375
|
-
}), "finish");
|
|
376
|
-
const own = Object.entries(entries).flatMap(([name, entry]) => {
|
|
377
|
-
if (excluded.has(name))
|
|
378
|
-
return [];
|
|
379
|
-
const found = typeOf(entry);
|
|
380
|
-
if (!found)
|
|
381
|
-
return [];
|
|
382
|
-
return [finish({ name, ...found, ...words.has(name) && found.type === "kw" ? { type: "txt" } : {} })];
|
|
383
|
-
});
|
|
384
|
-
const relations = Object.entries(annotations.relations ?? {}).map(([name, relation]) => finish({ name, ...relation }));
|
|
385
|
-
const states = annotations.states ? [
|
|
386
|
-
finish({
|
|
387
|
-
name: "is",
|
|
388
|
-
type: "enum",
|
|
389
|
-
values: Object.keys(annotations.states),
|
|
390
|
-
relation: Object.entries(annotations.states).map(([state, meaning]) => `${state}: ${meaning}`).join("; ")
|
|
391
|
-
})
|
|
392
|
-
] : [];
|
|
393
|
-
return [...own, ...relations, ...states];
|
|
394
|
-
}, "queryFieldsOf");
|
|
395
|
-
|
|
396
|
-
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
|
|
397
|
-
var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
|
|
398
|
-
var reserved = /* @__PURE__ */ new Set([
|
|
399
|
-
"+",
|
|
400
|
-
"-",
|
|
401
|
-
"!",
|
|
402
|
-
"(",
|
|
403
|
-
")",
|
|
404
|
-
":",
|
|
405
|
-
"=",
|
|
406
|
-
"^",
|
|
407
|
-
"@",
|
|
408
|
-
"<",
|
|
409
|
-
">",
|
|
410
|
-
"[",
|
|
411
|
-
"]",
|
|
412
|
-
'"',
|
|
413
|
-
"{",
|
|
414
|
-
"}",
|
|
415
|
-
"~",
|
|
416
|
-
"\\",
|
|
417
|
-
"/"
|
|
418
|
-
]);
|
|
419
|
-
var decodeEscapes = /* @__PURE__ */ __name((raw, span, fail) => {
|
|
420
|
-
let out = "";
|
|
421
|
-
for (let at = 0; at < raw.length; at++) {
|
|
422
|
-
if (raw[at] !== "\\") {
|
|
423
|
-
out += raw[at];
|
|
424
|
-
continue;
|
|
425
|
-
}
|
|
426
|
-
if (++at >= raw.length)
|
|
427
|
-
fail("query.invalid-escape", span);
|
|
428
|
-
if (raw[at] === "u") {
|
|
429
|
-
const hex = raw.slice(at + 1, at + 5);
|
|
430
|
-
if (!/^[0-9a-fA-F]{4}$/.test(hex))
|
|
431
|
-
fail("query.invalid-escape", span);
|
|
432
|
-
out += String.fromCharCode(Number.parseInt(hex, 16));
|
|
433
|
-
at += 4;
|
|
434
|
-
} else
|
|
435
|
-
out += raw[at];
|
|
436
|
-
}
|
|
437
|
-
return out;
|
|
438
|
-
}, "decodeEscapes");
|
|
439
|
-
var tokensOf = /* @__PURE__ */ __name((text, fail = queryError) => {
|
|
440
|
-
const tokens = [];
|
|
441
|
-
let at = 0;
|
|
442
|
-
let range = false;
|
|
443
|
-
while (at < text.length) {
|
|
444
|
-
const start = at;
|
|
445
|
-
const c = text[at] ?? "";
|
|
446
|
-
if (whitespace(c)) {
|
|
447
|
-
at++;
|
|
448
|
-
continue;
|
|
449
|
-
}
|
|
450
|
-
let kind = c;
|
|
451
|
-
if (c === '"' || !range && c === "/") {
|
|
452
|
-
at++;
|
|
453
|
-
while (at < text.length && text[at] !== c) {
|
|
454
|
-
if (text[at] === "\\" && (c === '"' || text[at + 1] === "/"))
|
|
455
|
-
at++;
|
|
456
|
-
at++;
|
|
457
|
-
}
|
|
458
|
-
if (at >= text.length)
|
|
459
|
-
fail("query.unclosed-literal", { start, end: at }, c === "/" ? regexHint(text, start) : void 0);
|
|
460
|
-
at++;
|
|
461
|
-
if (c === "/" && /^[dgimsuvy]+(?:$|[ \t\n\r)])/.test(text.slice(at)))
|
|
462
|
-
fail("query.unsupported-regex-flags", { start: at, end: at + 1 }, "Lucene regex does not take JavaScript flags");
|
|
463
|
-
kind = c === '"' ? "quoted" : "regex";
|
|
464
|
-
} else if (range && c !== "]" && c !== "}") {
|
|
465
|
-
while (at < text.length && !whitespace(text[at] ?? "") && !["]", "}"].includes(text[at] ?? ""))
|
|
466
|
-
at++;
|
|
467
|
-
kind = "rangeValue";
|
|
468
|
-
} else if (reserved.has(c)) {
|
|
469
|
-
if (c === "\\") {
|
|
470
|
-
at += 2;
|
|
471
|
-
while (at < text.length && !whitespace(text[at] ?? "") && (!reserved.has(text[at] ?? "") || ["+", "-"].includes(text[at] ?? "")))
|
|
472
|
-
at++;
|
|
473
|
-
kind = "term";
|
|
474
|
-
} else {
|
|
475
|
-
at++;
|
|
476
|
-
if ((c === "<" || c === ">") && text[at] === "=") {
|
|
477
|
-
at++;
|
|
478
|
-
kind += "=";
|
|
479
|
-
}
|
|
480
|
-
if (c === "[" || c === "{")
|
|
481
|
-
range = true;
|
|
482
|
-
if (c === "]" || c === "}")
|
|
483
|
-
range = false;
|
|
484
|
-
}
|
|
485
|
-
} else {
|
|
486
|
-
at++;
|
|
487
|
-
while (at < text.length) {
|
|
488
|
-
const next = text[at] ?? "";
|
|
489
|
-
if (next === "\\") {
|
|
490
|
-
if (at + 1 >= text.length)
|
|
491
|
-
fail("query.invalid-escape", { start: at, end: at + 1 });
|
|
492
|
-
at += 2;
|
|
493
|
-
continue;
|
|
494
|
-
}
|
|
495
|
-
if (next === "@" && new RegExp("^@(?:\\p{L}|[\\p{L}\\p{N}][^\\s@]*\\.[\\p{L}\\p{N}])", "u").test(text.slice(at))) {
|
|
496
|
-
at++;
|
|
497
|
-
continue;
|
|
498
|
-
}
|
|
499
|
-
if (whitespace(next) || reserved.has(next) && next !== "+" && next !== "-")
|
|
500
|
-
break;
|
|
501
|
-
at++;
|
|
502
|
-
}
|
|
503
|
-
const [field, colon] = tokens.slice(-2);
|
|
504
|
-
if (field?.kind === "term" && colon?.kind === ":" && colon.span.end === start && text[at] === ":" && /^[a-z][a-z_-]*$/u.test(text.slice(start, at)) && /^:[^\s()"]/u.test(text.slice(at)))
|
|
505
|
-
while (at < text.length && !whitespace(text[at] ?? "") && !["(", ")", '"'].includes(text[at] ?? ""))
|
|
506
|
-
at++;
|
|
507
|
-
const raw = text.slice(start, at);
|
|
508
|
-
kind = { AND: "AND", OR: "OR", NOT: "NOT", "&&": "AND", "||": "OR" }[raw] ?? (/^\d+(?:\.\d+)?$/u.test(raw) ? "number" : "term");
|
|
509
|
-
}
|
|
510
|
-
tokens.push({ kind, raw: text.slice(start, at), span: { start, end: at } });
|
|
511
|
-
}
|
|
512
|
-
tokens.push({ kind: "EOF", raw: "", span: { start: at, end: at } });
|
|
513
|
-
return tokens;
|
|
514
|
-
}, "tokensOf");
|
|
515
|
-
var quoteHint = /* @__PURE__ */ __name((text, at) => {
|
|
516
|
-
for (const match of text.matchAll(/(?<=^|[\s(])([\p{L}\p{N}_.-]+):([^\s"()]+)/gu)) {
|
|
517
|
-
const [whole, field, value = ""] = match;
|
|
518
|
-
if (at < match.index || at > match.index + whole.length)
|
|
519
|
-
continue;
|
|
520
|
-
return /[:=/?*~^@<>![\]{}\\]/u.test(value) ? `put the value in quotes: ${field}:"${value}"` : void 0;
|
|
521
|
-
}
|
|
522
|
-
return void 0;
|
|
523
|
-
}, "quoteHint");
|
|
524
|
-
var regexHint = /* @__PURE__ */ __name((text, at) => {
|
|
525
|
-
const word = `${/[^\s()"]*$/u.exec(text.slice(0, at))?.[0] ?? ""}${/^[^\s()"]*/u.exec(text.slice(at))?.[0] ?? ""}`;
|
|
526
|
-
return quoteHint(text, at) ?? `/ starts a regular expression; put the value in quotes: "${word}"`;
|
|
527
|
-
}, "regexHint");
|
|
528
|
-
var parseLucene = /* @__PURE__ */ __name((text, { defaultField = "text", proximity = false, ...context } = {}) => {
|
|
529
|
-
const fail = /* @__PURE__ */ __name((reason, span, alternative) => queryError(reason, span, alternative ?? quoteHint(text, span.start), context), "fail");
|
|
530
|
-
if (text.length > QUERY_LIMITS.bytes || new TextEncoder().encode(text).length > QUERY_LIMITS.bytes)
|
|
531
|
-
fail("query.too-large", { start: 0, end: text.length });
|
|
532
|
-
const tokens = tokensOf(text, fail);
|
|
533
|
-
let at = 0;
|
|
534
|
-
let count = 0;
|
|
535
|
-
let depth = 0;
|
|
536
|
-
const peek = /* @__PURE__ */ __name(() => tokens[at], "peek");
|
|
537
|
-
const take = /* @__PURE__ */ __name(() => tokens[at++], "take");
|
|
538
|
-
const expect = /* @__PURE__ */ __name((kind) => {
|
|
539
|
-
if (peek().kind !== kind)
|
|
540
|
-
fail("query.invalid-syntax", peek().span);
|
|
541
|
-
return take();
|
|
542
|
-
}, "expect");
|
|
543
|
-
const built = /* @__PURE__ */ __name((node) => {
|
|
544
|
-
if (++count > QUERY_LIMITS.nodes)
|
|
545
|
-
fail("query.too-large", node.span);
|
|
546
|
-
return node;
|
|
547
|
-
}, "built");
|
|
548
|
-
const combine = /* @__PURE__ */ __name((clauses, occur) => {
|
|
549
|
-
const first = clauses[0];
|
|
550
|
-
const last = clauses.at(-1);
|
|
551
|
-
if (!first || !last)
|
|
552
|
-
fail("query.invalid-syntax", peek().span);
|
|
553
|
-
if (clauses.length === 1)
|
|
554
|
-
return first;
|
|
555
|
-
return {
|
|
556
|
-
node: built({
|
|
557
|
-
kind: "boolean",
|
|
558
|
-
clauses: clauses.map(({ node, modifier }) => ({ node, occur: modifier ?? occur })),
|
|
559
|
-
span: { start: first.node.span.start, end: last.node.span.end }
|
|
560
|
-
})
|
|
561
|
-
};
|
|
562
|
-
}, "combine");
|
|
563
|
-
const query = /* @__PURE__ */ __name((field, implicit = false) => {
|
|
564
|
-
if (++depth > QUERY_LIMITS.depth)
|
|
565
|
-
fail("query.too-large", peek().span);
|
|
566
|
-
const clauses = [];
|
|
567
|
-
do {
|
|
568
|
-
clauses.push(disjunction(field, implicit));
|
|
569
|
-
} while (!["EOF", ")"].includes(peek().kind));
|
|
570
|
-
const result = combine(clauses, "must");
|
|
571
|
-
depth--;
|
|
572
|
-
if (result.modifier === "must_not")
|
|
573
|
-
return built({ kind: "boolean", clauses: [{ node: result.node, occur: "must_not" }], span: result.node.span });
|
|
574
|
-
return result.node;
|
|
575
|
-
}, "query");
|
|
576
|
-
const disjunction = /* @__PURE__ */ __name((field, implicit) => {
|
|
577
|
-
const clauses = [conjunction(field, implicit)];
|
|
578
|
-
while (peek().kind === "OR") {
|
|
579
|
-
take();
|
|
580
|
-
clauses.push(conjunction(field, implicit));
|
|
581
|
-
}
|
|
582
|
-
return combine(clauses, "should");
|
|
583
|
-
}, "disjunction");
|
|
584
|
-
const conjunction = /* @__PURE__ */ __name((field, implicit) => {
|
|
585
|
-
const clauses = [clause(field, implicit)];
|
|
586
|
-
while (peek().kind === "AND") {
|
|
587
|
-
take();
|
|
588
|
-
clauses.push(clause(field, implicit));
|
|
589
|
-
}
|
|
590
|
-
return combine(clauses, "must");
|
|
591
|
-
}, "conjunction");
|
|
592
|
-
const clause = /* @__PURE__ */ __name((inherited, inheritedImplicit) => {
|
|
593
|
-
let modifier;
|
|
594
|
-
if (["+", "-", "NOT", "!"].includes(peek().kind))
|
|
595
|
-
modifier = take().kind === "+" ? "must" : "must_not";
|
|
596
|
-
let field = inherited;
|
|
597
|
-
let start;
|
|
598
|
-
let implicit = inheritedImplicit;
|
|
599
|
-
if (peek().kind === "term" && [":", "=", "<", ">", "<=", ">="].includes(tokens[at + 1]?.kind ?? "")) {
|
|
600
|
-
const token = take();
|
|
601
|
-
field = decodeEscapes(token.raw, token.span, fail);
|
|
602
|
-
start = token.span.start;
|
|
603
|
-
implicit = false;
|
|
604
|
-
let operator = take();
|
|
605
|
-
if (operator.kind === ":" && ["<", ">", "<=", ">="].includes(peek().kind))
|
|
606
|
-
operator = take();
|
|
607
|
-
if (["<", ">", "<=", ">="].includes(operator.kind)) {
|
|
608
|
-
const value = take();
|
|
609
|
-
if (!["term", "number", "quoted"].includes(value.kind))
|
|
610
|
-
fail("query.invalid-syntax", value.span);
|
|
611
|
-
const decoded = decodeEscapes(value.kind === "quoted" ? value.raw.slice(1, -1) : value.raw, value.span, fail);
|
|
612
|
-
const lower = operator.kind.startsWith(">");
|
|
613
|
-
const node2 = built({
|
|
614
|
-
kind: "predicate",
|
|
615
|
-
field,
|
|
616
|
-
operator: "range",
|
|
617
|
-
value: lower ? decoded : "*",
|
|
618
|
-
upper: lower ? "*" : decoded,
|
|
619
|
-
lower_inclusive: !lower || operator.kind.endsWith("="),
|
|
620
|
-
upper_inclusive: lower || operator.kind.endsWith("="),
|
|
621
|
-
span: { start: token.span.start, end: value.span.end }
|
|
622
|
-
});
|
|
623
|
-
return { node: node2, ...modifier ? { modifier } : {} };
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
let node;
|
|
627
|
-
if (peek().kind === "(") {
|
|
628
|
-
const start2 = take().span.start;
|
|
629
|
-
node = query(field, implicit);
|
|
630
|
-
const end = expect(")").span.end;
|
|
631
|
-
node = { ...node, span: { start: start2, end } };
|
|
632
|
-
} else if (["[", "{"].includes(peek().kind)) {
|
|
633
|
-
const opening = take();
|
|
634
|
-
const lower = take();
|
|
635
|
-
if (!["rangeValue", "quoted"].includes(lower.kind))
|
|
636
|
-
fail("query.invalid-syntax", lower.span);
|
|
637
|
-
const separator = take();
|
|
638
|
-
if (separator.raw !== "TO")
|
|
639
|
-
fail("query.invalid-syntax", separator.span);
|
|
640
|
-
const upper = take();
|
|
641
|
-
if (!["rangeValue", "quoted"].includes(upper.kind))
|
|
642
|
-
fail("query.invalid-syntax", upper.span);
|
|
643
|
-
const closing = take();
|
|
644
|
-
if (!["]", "}"].includes(closing.kind))
|
|
645
|
-
fail("query.invalid-syntax", closing.span);
|
|
646
|
-
const decode = /* @__PURE__ */ __name((t) => decodeEscapes(t.kind === "quoted" ? t.raw.slice(1, -1) : t.raw, t.span, fail), "decode");
|
|
647
|
-
node = built({
|
|
648
|
-
kind: "predicate",
|
|
649
|
-
field,
|
|
650
|
-
operator: "range",
|
|
651
|
-
value: decode(lower),
|
|
652
|
-
upper: decode(upper),
|
|
653
|
-
lower_inclusive: opening.kind === "[",
|
|
654
|
-
upper_inclusive: closing.kind === "]",
|
|
655
|
-
span: { start: start ?? opening.span.start, end: closing.span.end }
|
|
656
|
-
});
|
|
657
|
-
} else {
|
|
658
|
-
const token = take();
|
|
659
|
-
if (!["term", "number", "quoted", "regex"].includes(token.kind))
|
|
660
|
-
fail("query.invalid-syntax", token.span);
|
|
661
|
-
const raw = ["term", "number"].includes(token.kind) ? token.raw : token.raw.slice(1, -1);
|
|
662
|
-
if (field === "fn")
|
|
663
|
-
fail("query.unsupported-operator", token.span, "interval functions are not supported");
|
|
664
|
-
const wildcard = ["term", "number"].includes(token.kind) && /(?<!\\)[*?]/u.test(raw);
|
|
665
|
-
node = built({
|
|
666
|
-
kind: "predicate",
|
|
667
|
-
field,
|
|
668
|
-
operator: token.kind === "regex" ? "regex" : token.kind === "quoted" ? "phrase" : wildcard ? "wildcard" : "term",
|
|
669
|
-
value: token.kind === "regex" || wildcard ? raw : decodeEscapes(raw, token.span, fail),
|
|
670
|
-
span: { start: start ?? token.span.start, end: token.span.end },
|
|
671
|
-
...implicit ? { implicit: true } : {}
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
if (proximity && peek().kind === "~" && node.kind === "predicate" && node.operator === "phrase") {
|
|
675
|
-
take();
|
|
676
|
-
const distance = take();
|
|
677
|
-
if (distance.kind !== "number" || !/^\d+$/u.test(distance.raw))
|
|
678
|
-
fail("query.invalid-syntax", distance.span, 'write the distance as a whole number: "a b"~3');
|
|
679
|
-
node = { ...node, slop: Number(distance.raw), span: { start: node.span.start, end: distance.span.end } };
|
|
680
|
-
}
|
|
681
|
-
if (peek().kind === "~")
|
|
682
|
-
fail("query.unsupported-operator", peek().span, node.kind === "predicate" && node.operator === "phrase" ? "proximity (~) is not supported \u2014 drop the ~ for the exact phrase, or join the words with AND" : "fuzzy matching (~) is not supported \u2014 use a prefix such as word* to catch word forms");
|
|
683
|
-
if (["^", "@"].includes(peek().kind))
|
|
684
|
-
fail("query.unsupported-operator", peek().span, "boost and minimum-should-match are not supported");
|
|
685
|
-
return { node, ...modifier ? { modifier } : {} };
|
|
686
|
-
}, "clause");
|
|
687
|
-
const root = query(defaultField, true);
|
|
688
|
-
expect("EOF");
|
|
689
|
-
if (defaultField === "none") {
|
|
690
|
-
const bare = walkQuery(root).find((node) => node.implicit);
|
|
691
|
-
if (bare)
|
|
692
|
-
queryError("query.bare-word", bare.span, `"${bare.value}" has no field; write field:value`, context, {
|
|
693
|
-
word: bare.value
|
|
694
|
-
});
|
|
695
|
-
}
|
|
696
|
-
return { version: 1, language: "lucene-v1", root };
|
|
697
|
-
}, "parseLucene");
|
|
698
|
-
var implicitTextTerms = /* @__PURE__ */ __name((text) => {
|
|
699
|
-
const tokens = tokensOf(text);
|
|
700
|
-
if (tokens.some(({ kind }) => ["AND", "OR", "NOT", "+", "-", "!", "(", ")"].includes(kind)))
|
|
701
|
-
return /* @__PURE__ */ new Set();
|
|
702
|
-
return new Set(tokens.flatMap((token, index) => (token.kind === "term" || token.kind === "number") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index - 1]?.kind ?? "") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index + 1]?.kind ?? "") ? [token.span.start] : []));
|
|
703
|
-
}, "implicitTextTerms");
|
|
704
|
-
|
|
705
|
-
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
|
|
706
|
-
var inContext = /* @__PURE__ */ __name((context, run) => {
|
|
707
|
-
try {
|
|
708
|
-
run();
|
|
709
|
-
} catch (failure) {
|
|
710
|
-
if (!isCliError(failure) || typeof failure.details.reason !== "string" || failure.details.span === void 0)
|
|
711
|
-
throw failure;
|
|
712
|
-
const { reason, span, alternative } = failure.details;
|
|
713
|
-
queryError(reason, span, alternative, context);
|
|
714
|
-
}
|
|
715
|
-
}, "inContext");
|
|
716
|
-
var bounds = /* @__PURE__ */ __name((node) => node.operator === "range" ? [node.value, node.upper ?? "*"].filter((bound) => bound !== "*") : [node.value], "bounds");
|
|
717
|
-
var checkValue = /* @__PURE__ */ __name((field, node, options) => {
|
|
718
|
-
const fail = /* @__PURE__ */ __name((reason, alternative) => queryError(reason, node.span, alternative, options), "fail");
|
|
719
|
-
if (node.value === "" && field.type !== "txt")
|
|
720
|
-
fail("query.missing-value");
|
|
721
|
-
if (node.operator === "wildcard")
|
|
722
|
-
return;
|
|
723
|
-
switch (field.type) {
|
|
724
|
-
case "enum":
|
|
725
|
-
if (!field.values?.includes(node.value.toLowerCase()))
|
|
726
|
-
fail("query.unknown-value", `${field.name} takes ${field.values?.join(", ")}`);
|
|
727
|
-
return;
|
|
728
|
-
case "bool":
|
|
729
|
-
if (!["true", "false"].includes(node.value.toLowerCase()))
|
|
730
|
-
fail("query.unknown-value", `${field.name} takes true, false`);
|
|
731
|
-
return;
|
|
732
|
-
case "num":
|
|
733
|
-
for (const bound of bounds(node))
|
|
734
|
-
if (!Number.isFinite(Number(bound)) || bound.trim() === "")
|
|
735
|
-
fail("query.invalid-number", `${field.name} takes a number`);
|
|
736
|
-
return;
|
|
737
|
-
case "time":
|
|
738
|
-
inContext(options, () => {
|
|
739
|
-
for (const bound of bounds(node))
|
|
740
|
-
dateEndpoint(bound, options.zone ?? "UTC", "lower", true, node.span);
|
|
741
|
-
});
|
|
742
|
-
return;
|
|
743
|
-
default:
|
|
744
|
-
return;
|
|
745
|
-
}
|
|
746
|
-
}, "checkValue");
|
|
747
|
-
var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
|
|
748
|
-
const byName = new Map(registry.fields.map((field) => [field.name, field]));
|
|
749
|
-
const visit = /* @__PURE__ */ __name((node, required) => {
|
|
750
|
-
if (node.kind === "boolean") {
|
|
751
|
-
for (const clause of node.clauses)
|
|
752
|
-
visit(clause.node, required && clause.occur === "must");
|
|
753
|
-
return;
|
|
754
|
-
}
|
|
755
|
-
const field = byName.get(node.field);
|
|
756
|
-
if (!field)
|
|
757
|
-
queryError("query.unknown-field", node.span, `no field "${node.field}"`, options, {
|
|
758
|
-
fields: registry.fields.map((one) => one.name)
|
|
759
|
-
});
|
|
760
|
-
if (registry.backend === "native" && !field.native)
|
|
761
|
-
queryError("query.unsupported-field", node.span, `the source cannot filter by ${field.name}`, options, {
|
|
762
|
-
supported: registry.fields.filter((one) => one.native).map((one) => one.name)
|
|
763
|
-
});
|
|
764
|
-
const presence = node.operator === "wildcard" && node.value === "*";
|
|
765
|
-
if (!presence && !field.operators.includes(node.operator))
|
|
766
|
-
queryError("query.unsupported-operator", node.span, `${field.name} takes ${field.operators.join(", ")}`, options);
|
|
767
|
-
if (field.placement === "and" && !required)
|
|
768
|
-
queryError("query.unsupported-placement", node.span, `${field.name} only as a required term, not under OR or NOT`, options);
|
|
769
|
-
if (presence)
|
|
770
|
-
return;
|
|
771
|
-
checkValue(field, node, options);
|
|
772
|
-
if (field.validate)
|
|
773
|
-
inContext(options, () => field.validate?.(node));
|
|
774
|
-
}, "visit");
|
|
775
|
-
visit(ast.root, true);
|
|
776
|
-
return ast;
|
|
777
|
-
}, "validateQuery");
|
|
778
|
-
var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
|
|
779
|
-
|
|
780
|
-
// node_modules/.pnpm/@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
|
|
781
|
-
var describeQuery = /* @__PURE__ */ __name((registry) => ({
|
|
782
|
-
entity: registry.entity,
|
|
783
|
-
backend: registry.backend,
|
|
784
|
-
fields: registry.fields.map(({ validate: _, ...field }) => field),
|
|
785
|
-
...registry.defaults && registry.defaults.length > 0 ? { defaults: [...registry.defaults] } : {}
|
|
786
|
-
}), "describeQuery");
|
|
787
|
-
var exampleProblems = /* @__PURE__ */ __name((registry) => {
|
|
788
|
-
const syntaxOnly = { ...registry, backend: "sql" };
|
|
789
|
-
const problem = /* @__PURE__ */ __name((text, field) => {
|
|
790
|
-
try {
|
|
791
|
-
const named = walkQuery(validateQuery(parseLucene(text, { defaultField: "none" }), syntaxOnly).root);
|
|
792
|
-
return named.every((node) => node.field === field) ? void 0 : `"${text}" does not name ${field}`;
|
|
793
|
-
} catch (failure) {
|
|
794
|
-
if (!isCliError(failure))
|
|
795
|
-
throw failure;
|
|
796
|
-
return `"${text}": ${failure.message}`;
|
|
797
|
-
}
|
|
798
|
-
}, "problem");
|
|
799
|
-
const defaults = (registry.defaults ?? []).map((term) => {
|
|
800
|
-
const field = term.replace(/^-/, "").split(/[:<>=]/)[0] ?? "";
|
|
801
|
-
return { field, problem: problem(term.replace(/^-/, ""), field) };
|
|
802
|
-
});
|
|
803
|
-
return [
|
|
804
|
-
...registry.fields.map((field) => ({ field: field.name, problem: problem(field.example, field.name) })),
|
|
805
|
-
...defaults
|
|
806
|
-
].filter((entry) => entry.problem !== void 0);
|
|
807
|
-
}, "exampleProblems");
|
|
808
|
-
var checked = /* @__PURE__ */ new WeakSet();
|
|
809
|
-
var defineQuery = /* @__PURE__ */ __name((registry) => {
|
|
810
|
-
if (checked.has(registry))
|
|
811
|
-
return registry;
|
|
812
|
-
const names = registry.fields.map((field) => field.name);
|
|
813
|
-
const problems = [
|
|
814
|
-
...duplicates(names).map((name) => `"${name}" is listed twice`),
|
|
815
|
-
...names.filter((name) => !SNAKE_CASE.test(name)).map((name) => `"${name}" is not snake_case`),
|
|
816
|
-
...exampleProblems(registry).map(({ field, problem }) => `${field}: ${problem}`)
|
|
817
|
-
];
|
|
818
|
-
if (problems.length > 0)
|
|
819
|
-
throw new RegistryError(`${registry.entity} query`, problems);
|
|
820
|
-
checked.add(registry);
|
|
821
|
-
return registry;
|
|
822
|
-
}, "defineQuery");
|
|
823
|
-
var SPAN = ["span", "alternative", "guide"];
|
|
824
|
-
var QUERY_REASONS = defineReasons([
|
|
825
|
-
["query.bare-word", "a word in the query has no field", ["word"]],
|
|
826
|
-
["query.invalid-ast", "the query tree is not valid", []],
|
|
827
|
-
["query.invalid-date", "a date in the query cannot be read", []],
|
|
828
|
-
["query.invalid-escape", "an escape in the query is not valid", []],
|
|
829
|
-
["query.invalid-number", "a number in the query cannot be read", []],
|
|
830
|
-
["query.invalid-regex", "a regular expression in the query is not valid", []],
|
|
831
|
-
["query.invalid-syntax", "the query cannot be parsed", []],
|
|
832
|
-
["query.invalid-timezone", "the time zone is not known", []],
|
|
833
|
-
["query.missing-value", "a field in the query has no value", []],
|
|
834
|
-
["query.too-large", "the query is over one of its limits", []],
|
|
835
|
-
["query.unclosed-literal", "a quote or bracket in the query is not closed", []],
|
|
836
|
-
["query.unknown-field", "a field in the query is not known", ["fields"]],
|
|
837
|
-
["query.unknown-value", "a value in the query is not known", []],
|
|
838
|
-
["query.unsupported-field", "this list cannot filter by that field", ["supported"]],
|
|
839
|
-
["query.unsupported-operator", "this field does not take that operator", []],
|
|
840
|
-
["query.unsupported-placement", "this field works only as a required term", []],
|
|
841
|
-
["query.unsupported-regex", "that regular expression is not supported", []],
|
|
842
|
-
["query.unsupported-regex-flags", "regular expression flags are not supported", []],
|
|
843
|
-
["query.unsupported-version", "the query version is not supported", []]
|
|
844
|
-
].map(([reason, message, details]) => ({
|
|
845
|
-
reason,
|
|
846
|
-
code: "validation_error",
|
|
847
|
-
message,
|
|
848
|
-
details: [...SPAN, ...details]
|
|
849
|
-
})));
|
|
850
|
-
|
|
851
|
-
export {
|
|
852
|
-
FIELD_TYPES,
|
|
853
|
-
OPERATORS_BY_TYPE,
|
|
854
|
-
QUERY_BACKENDS,
|
|
855
|
-
queryFieldsOf,
|
|
856
|
-
QUERY_LIMITS,
|
|
857
|
-
queryAstSchema,
|
|
858
|
-
queryError,
|
|
859
|
-
walkQuery,
|
|
860
|
-
parseLucene,
|
|
861
|
-
implicitTextTerms,
|
|
862
|
-
timezoneOf,
|
|
863
|
-
dayBoundary,
|
|
864
|
-
wallTime,
|
|
865
|
-
zonedMoment,
|
|
866
|
-
dateRange,
|
|
867
|
-
validateQuery,
|
|
868
|
-
fieldsNamed,
|
|
869
|
-
describeQuery,
|
|
870
|
-
defineQuery,
|
|
871
|
-
QUERY_REASONS,
|
|
872
|
-
evaluate,
|
|
873
|
-
fieldsHelp,
|
|
874
|
-
queryDescription
|
|
875
|
-
};
|