clawdlets 0.0.1 → 0.2.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 +58 -12
- package/dist/commands/bootstrap.d.ts +43 -0
- package/dist/commands/bootstrap.d.ts.map +1 -0
- package/dist/commands/bootstrap.js +318 -0
- package/dist/commands/bootstrap.js.map +1 -0
- package/dist/commands/bot.d.ts +2 -0
- package/dist/commands/bot.d.ts.map +1 -0
- package/dist/commands/bot.js +97 -0
- package/dist/commands/bot.js.map +1 -0
- package/dist/commands/cattle/common.d.ts +29 -0
- package/dist/commands/cattle/common.d.ts.map +1 -0
- package/dist/commands/cattle/common.js +102 -0
- package/dist/commands/cattle/common.js.map +1 -0
- package/dist/commands/cattle/destroy.d.ts +33 -0
- package/dist/commands/cattle/destroy.d.ts.map +1 -0
- package/dist/commands/cattle/destroy.js +72 -0
- package/dist/commands/cattle/destroy.js.map +1 -0
- package/dist/commands/cattle/list.d.ts +20 -0
- package/dist/commands/cattle/list.d.ts.map +1 -0
- package/dist/commands/cattle/list.js +78 -0
- package/dist/commands/cattle/list.js.map +1 -0
- package/dist/commands/cattle/logs.d.ts +34 -0
- package/dist/commands/cattle/logs.d.ts.map +1 -0
- package/dist/commands/cattle/logs.js +55 -0
- package/dist/commands/cattle/logs.js.map +1 -0
- package/dist/commands/cattle/persona.d.ts +2 -0
- package/dist/commands/cattle/persona.d.ts.map +1 -0
- package/dist/commands/cattle/persona.js +85 -0
- package/dist/commands/cattle/persona.js.map +1 -0
- package/dist/commands/cattle/reap.d.ts +20 -0
- package/dist/commands/cattle/reap.d.ts.map +1 -0
- package/dist/commands/cattle/reap.js +60 -0
- package/dist/commands/cattle/reap.js.map +1 -0
- package/dist/commands/cattle/spawn.d.ts +73 -0
- package/dist/commands/cattle/spawn.d.ts.map +1 -0
- package/dist/commands/cattle/spawn.js +147 -0
- package/dist/commands/cattle/spawn.js.map +1 -0
- package/dist/commands/cattle/ssh.d.ts +20 -0
- package/dist/commands/cattle/ssh.d.ts.map +1 -0
- package/dist/commands/cattle/ssh.js +37 -0
- package/dist/commands/cattle/ssh.js.map +1 -0
- package/dist/commands/cattle.d.ts +2 -0
- package/dist/commands/cattle.d.ts.map +1 -0
- package/dist/commands/cattle.js +21 -0
- package/dist/commands/cattle.js.map +1 -0
- package/dist/commands/config.d.ts +2 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +148 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/doctor.d.ts +35 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +65 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/env.d.ts +22 -0
- package/dist/commands/env.d.ts.map +1 -0
- package/dist/commands/env.js +132 -0
- package/dist/commands/env.js.map +1 -0
- package/dist/commands/fleet.d.ts +2 -0
- package/dist/commands/fleet.d.ts.map +1 -0
- package/dist/commands/fleet.js +61 -0
- package/dist/commands/fleet.js.map +1 -0
- package/dist/commands/host.d.ts +2 -0
- package/dist/commands/host.d.ts.map +1 -0
- package/dist/commands/host.js +277 -0
- package/dist/commands/host.js.map +1 -0
- package/dist/commands/image.d.ts +2 -0
- package/dist/commands/image.d.ts.map +1 -0
- package/dist/commands/image.js +133 -0
- package/dist/commands/image.js.map +1 -0
- package/dist/commands/infra.d.ts +2 -0
- package/dist/commands/infra.d.ts.map +1 -0
- package/dist/commands/infra.js +171 -0
- package/dist/commands/infra.js.map +1 -0
- package/dist/commands/lockdown.d.ts +25 -0
- package/dist/commands/lockdown.d.ts.map +1 -0
- package/dist/commands/lockdown.js +93 -0
- package/dist/commands/lockdown.js.map +1 -0
- package/dist/commands/project.d.ts +2 -0
- package/dist/commands/project.d.ts.map +1 -0
- package/dist/commands/project.js +264 -0
- package/dist/commands/project.js.map +1 -0
- package/dist/commands/secrets/common.d.ts +8 -0
- package/dist/commands/secrets/common.d.ts.map +1 -0
- package/dist/commands/secrets/common.js +20 -0
- package/dist/commands/secrets/common.js.map +1 -0
- package/dist/commands/secrets/init.d.ts +39 -0
- package/dist/commands/secrets/init.d.ts.map +1 -0
- package/dist/commands/secrets/init.js +455 -0
- package/dist/commands/secrets/init.js.map +1 -0
- package/dist/commands/secrets/path.d.ts +11 -0
- package/dist/commands/secrets/path.d.ts.map +1 -0
- package/dist/commands/secrets/path.js +24 -0
- package/dist/commands/secrets/path.js.map +1 -0
- package/dist/commands/secrets/sync.d.ts +25 -0
- package/dist/commands/secrets/sync.d.ts.map +1 -0
- package/dist/commands/secrets/sync.js +67 -0
- package/dist/commands/secrets/sync.js.map +1 -0
- package/dist/commands/secrets/verify.d.ts +28 -0
- package/dist/commands/secrets/verify.d.ts.map +1 -0
- package/dist/commands/secrets/verify.js +118 -0
- package/dist/commands/secrets/verify.js.map +1 -0
- package/dist/commands/secrets.d.ts +2 -0
- package/dist/commands/secrets.d.ts.map +1 -0
- package/dist/commands/secrets.js +18 -0
- package/dist/commands/secrets.js.map +1 -0
- package/dist/commands/server/common.d.ts +3 -0
- package/dist/commands/server/common.d.ts.map +1 -0
- package/dist/commands/server/common.js +3 -0
- package/dist/commands/server/common.js.map +1 -0
- package/dist/commands/server/deploy.d.ts +53 -0
- package/dist/commands/server/deploy.d.ts.map +1 -0
- package/dist/commands/server/deploy.js +177 -0
- package/dist/commands/server/deploy.js.map +1 -0
- package/dist/commands/server/github-sync.d.ts +2 -0
- package/dist/commands/server/github-sync.d.ts.map +1 -0
- package/dist/commands/server/github-sync.js +166 -0
- package/dist/commands/server/github-sync.js.map +1 -0
- package/dist/commands/server/manifest.d.ts +28 -0
- package/dist/commands/server/manifest.d.ts.map +1 -0
- package/dist/commands/server/manifest.js +82 -0
- package/dist/commands/server/manifest.js.map +1 -0
- package/dist/commands/server.d.ts +2 -0
- package/dist/commands/server.d.ts.map +1 -0
- package/dist/commands/server.js +267 -0
- package/dist/commands/server.js.map +1 -0
- package/dist/commands/ssh-target.d.ts +3 -0
- package/dist/commands/ssh-target.d.ts.map +1 -0
- package/dist/commands/ssh-target.js +15 -0
- package/dist/commands/ssh-target.js.map +1 -0
- package/dist/config/template-source.json +5 -0
- package/dist/lib/context.d.ts +21 -0
- package/dist/lib/context.d.ts.map +1 -0
- package/dist/lib/context.js +19 -0
- package/dist/lib/context.js.map +1 -0
- package/dist/lib/deploy-gate.d.ts +9 -0
- package/dist/lib/deploy-gate.d.ts.map +1 -0
- package/dist/lib/deploy-gate.js +20 -0
- package/dist/lib/deploy-gate.js.map +1 -0
- package/dist/lib/deploy-manifest.d.ts +11 -0
- package/dist/lib/deploy-manifest.d.ts.map +1 -0
- package/dist/lib/deploy-manifest.js +46 -0
- package/dist/lib/deploy-manifest.js.map +1 -0
- package/dist/lib/doctor-render.d.ts +14 -0
- package/dist/lib/doctor-render.d.ts.map +1 -0
- package/dist/lib/doctor-render.js +131 -0
- package/dist/lib/doctor-render.js.map +1 -0
- package/dist/lib/host-resolve.d.ts +6 -0
- package/dist/lib/host-resolve.d.ts.map +1 -0
- package/dist/lib/host-resolve.js +20 -0
- package/dist/lib/host-resolve.js.map +1 -0
- package/dist/lib/linux-build.d.ts +8 -0
- package/dist/lib/linux-build.d.ts.map +1 -0
- package/dist/lib/linux-build.js +15 -0
- package/dist/lib/linux-build.js.map +1 -0
- package/dist/lib/manifest-signature.d.ts +17 -0
- package/dist/lib/manifest-signature.d.ts.map +1 -0
- package/dist/lib/manifest-signature.js +52 -0
- package/dist/lib/manifest-signature.js.map +1 -0
- package/dist/lib/template-spec.d.ts +9 -0
- package/dist/lib/template-spec.d.ts.map +1 -0
- package/dist/lib/template-spec.js +50 -0
- package/dist/lib/template-spec.js.map +1 -0
- package/dist/lib/wizard.d.ts +10 -0
- package/dist/lib/wizard.d.ts.map +1 -0
- package/dist/lib/wizard.js +25 -0
- package/dist/lib/wizard.js.map +1 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +44 -0
- package/dist/main.js.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/client.d.ts +21 -0
- package/node_modules/@clawdlets/clf-queue/dist/client.d.ts.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/client.js +132 -0
- package/node_modules/@clawdlets/clf-queue/dist/client.js.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/index.d.ts +9 -0
- package/node_modules/@clawdlets/clf-queue/dist/index.d.ts.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/index.js +5 -0
- package/node_modules/@clawdlets/clf-queue/dist/index.js.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/jobs.d.ts +32 -0
- package/node_modules/@clawdlets/clf-queue/dist/jobs.d.ts.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/jobs.js +24 -0
- package/node_modules/@clawdlets/clf-queue/dist/jobs.js.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/protocol.d.ts +118 -0
- package/node_modules/@clawdlets/clf-queue/dist/protocol.d.ts.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/protocol.js +46 -0
- package/node_modules/@clawdlets/clf-queue/dist/protocol.js.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/bootstrap-tokens.d.ts +3 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/bootstrap-tokens.d.ts.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/bootstrap-tokens.js +112 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/bootstrap-tokens.js.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/jobs.d.ts +3 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/jobs.d.ts.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/jobs.js +313 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/jobs.js.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/migrate.d.ts +2 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/migrate.d.ts.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/migrate.js +74 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/migrate.js.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/open.d.ts +3 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/open.d.ts.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/open.js +27 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/open.js.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/types.d.ts +113 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/types.d.ts.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/types.js +2 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/types.js.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/util.d.ts +10 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/util.d.ts.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/util.js +30 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue/util.js.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue.d.ts +3 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue.d.ts.map +1 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue.js +2 -0
- package/node_modules/@clawdlets/clf-queue/dist/queue.js.map +1 -0
- package/node_modules/@clawdlets/clf-queue/package.json +34 -0
- package/node_modules/@clawdlets/core/dist/assets/opentofu/.terraform.lock.hcl +24 -0
- package/node_modules/@clawdlets/core/dist/assets/opentofu/README.md +16 -0
- package/node_modules/@clawdlets/core/dist/assets/opentofu/main.tf +92 -0
- package/node_modules/@clawdlets/core/dist/assets/opentofu/modules/bot_host/main.tf +120 -0
- package/node_modules/@clawdlets/core/dist/assets/opentofu/outputs.tf +3 -0
- package/node_modules/@clawdlets/core/dist/doctor/cattle-checks.d.ts +12 -0
- package/node_modules/@clawdlets/core/dist/doctor/cattle-checks.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/doctor/cattle-checks.js +65 -0
- package/node_modules/@clawdlets/core/dist/doctor/cattle-checks.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/doctor/deploy-checks.d.ts +17 -0
- package/node_modules/@clawdlets/core/dist/doctor/deploy-checks.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/doctor/deploy-checks.js +465 -0
- package/node_modules/@clawdlets/core/dist/doctor/deploy-checks.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/doctor/repo-checks.d.ts +16 -0
- package/node_modules/@clawdlets/core/dist/doctor/repo-checks.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/doctor/repo-checks.js +510 -0
- package/node_modules/@clawdlets/core/dist/doctor/repo-checks.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/doctor/types.d.ts +8 -0
- package/node_modules/@clawdlets/core/dist/doctor/types.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/doctor/types.js +2 -0
- package/node_modules/@clawdlets/core/dist/doctor/types.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/doctor/util.d.ts +8 -0
- package/node_modules/@clawdlets/core/dist/doctor/util.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/doctor/util.js +82 -0
- package/node_modules/@clawdlets/core/dist/doctor/util.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/doctor.d.ts +11 -0
- package/node_modules/@clawdlets/core/dist/doctor.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/doctor.js +88 -0
- package/node_modules/@clawdlets/core/dist/doctor.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/index.d.ts +4 -0
- package/node_modules/@clawdlets/core/dist/index.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/index.js +4 -0
- package/node_modules/@clawdlets/core/dist/index.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/age-keygen.d.ts +4 -0
- package/node_modules/@clawdlets/core/dist/lib/age-keygen.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/age-keygen.js +13 -0
- package/node_modules/@clawdlets/core/dist/lib/age-keygen.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/age.d.ts +8 -0
- package/node_modules/@clawdlets/core/dist/lib/age.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/age.js +21 -0
- package/node_modules/@clawdlets/core/dist/lib/age.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/base-flake.d.ts +9 -0
- package/node_modules/@clawdlets/core/dist/lib/base-flake.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/base-flake.js +11 -0
- package/node_modules/@clawdlets/core/dist/lib/base-flake.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-cloudinit.d.ts +21 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-cloudinit.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-cloudinit.js +122 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-cloudinit.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-planner.d.ts +3 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-planner.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-planner.js +17 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-planner.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-state.d.ts +25 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-state.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-state.js +136 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-state.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-task.d.ts +11 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-task.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-task.js +10 -0
- package/node_modules/@clawdlets/core/dist/lib/cattle-task.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/clawdlets-config.d.ts +206 -0
- package/node_modules/@clawdlets/core/dist/lib/clawdlets-config.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/clawdlets-config.js +506 -0
- package/node_modules/@clawdlets/core/dist/lib/clawdlets-config.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/deploy-creds.d.ts +29 -0
- package/node_modules/@clawdlets/core/dist/lib/deploy-creds.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/deploy-creds.js +111 -0
- package/node_modules/@clawdlets/core/dist/lib/deploy-creds.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/docs-index.d.ts +13 -0
- package/node_modules/@clawdlets/core/dist/lib/docs-index.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/docs-index.js +116 -0
- package/node_modules/@clawdlets/core/dist/lib/docs-index.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/dot-path.d.ts +2 -0
- package/node_modules/@clawdlets/core/dist/lib/dot-path.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/dot-path.js +19 -0
- package/node_modules/@clawdlets/core/dist/lib/dot-path.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/dotenv-file.d.ts +6 -0
- package/node_modules/@clawdlets/core/dist/lib/dotenv-file.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/dotenv-file.js +55 -0
- package/node_modules/@clawdlets/core/dist/lib/dotenv-file.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/fleet-nix-eval.d.ts +6 -0
- package/node_modules/@clawdlets/core/dist/lib/fleet-nix-eval.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/fleet-nix-eval.js +33 -0
- package/node_modules/@clawdlets/core/dist/lib/fleet-nix-eval.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/fleet-policy.d.ts +28 -0
- package/node_modules/@clawdlets/core/dist/lib/fleet-policy.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/fleet-policy.js +67 -0
- package/node_modules/@clawdlets/core/dist/lib/fleet-policy.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/fleet-secrets.d.ts +23 -0
- package/node_modules/@clawdlets/core/dist/lib/fleet-secrets.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/fleet-secrets.js +114 -0
- package/node_modules/@clawdlets/core/dist/lib/fleet-secrets.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/fs-private.d.ts +3 -0
- package/node_modules/@clawdlets/core/dist/lib/fs-private.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/fs-private.js +35 -0
- package/node_modules/@clawdlets/core/dist/lib/fs-private.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/fs-safe.d.ts +8 -0
- package/node_modules/@clawdlets/core/dist/lib/fs-safe.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/fs-safe.js +40 -0
- package/node_modules/@clawdlets/core/dist/lib/fs-safe.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/git.d.ts +3 -0
- package/node_modules/@clawdlets/core/dist/lib/git.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/git.js +30 -0
- package/node_modules/@clawdlets/core/dist/lib/git.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/github.d.ts +30 -0
- package/node_modules/@clawdlets/core/dist/lib/github.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/github.js +58 -0
- package/node_modules/@clawdlets/core/dist/lib/github.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/hcloud-cattle.d.ts +56 -0
- package/node_modules/@clawdlets/core/dist/lib/hcloud-cattle.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/hcloud-cattle.js +184 -0
- package/node_modules/@clawdlets/core/dist/lib/hcloud-cattle.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/hcloud-labels.d.ts +14 -0
- package/node_modules/@clawdlets/core/dist/lib/hcloud-labels.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/hcloud-labels.js +99 -0
- package/node_modules/@clawdlets/core/dist/lib/hcloud-labels.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/hcloud.d.ts +71 -0
- package/node_modules/@clawdlets/core/dist/lib/hcloud.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/hcloud.js +316 -0
- package/node_modules/@clawdlets/core/dist/lib/hcloud.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/identifiers.d.ts +13 -0
- package/node_modules/@clawdlets/core/dist/lib/identifiers.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/identifiers.js +59 -0
- package/node_modules/@clawdlets/core/dist/lib/identifiers.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/inline-script-ban.d.ts +10 -0
- package/node_modules/@clawdlets/core/dist/lib/inline-script-ban.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/inline-script-ban.js +70 -0
- package/node_modules/@clawdlets/core/dist/lib/inline-script-ban.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/llm-provider-env.d.ts +4 -0
- package/node_modules/@clawdlets/core/dist/lib/llm-provider-env.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/llm-provider-env.js +25 -0
- package/node_modules/@clawdlets/core/dist/lib/llm-provider-env.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/mkpasswd.d.ts +3 -0
- package/node_modules/@clawdlets/core/dist/lib/mkpasswd.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/mkpasswd.js +17 -0
- package/node_modules/@clawdlets/core/dist/lib/mkpasswd.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/nix-flakes.d.ts +2 -0
- package/node_modules/@clawdlets/core/dist/lib/nix-flakes.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/nix-flakes.js +17 -0
- package/node_modules/@clawdlets/core/dist/lib/nix-flakes.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/nix-host.d.ts +6 -0
- package/node_modules/@clawdlets/core/dist/lib/nix-host.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/nix-host.js +23 -0
- package/node_modules/@clawdlets/core/dist/lib/nix-host.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/nix-tools.d.ts +12 -0
- package/node_modules/@clawdlets/core/dist/lib/nix-tools.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/nix-tools.js +20 -0
- package/node_modules/@clawdlets/core/dist/lib/nix-tools.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/opentofu.d.ts +28 -0
- package/node_modules/@clawdlets/core/dist/lib/opentofu.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/opentofu.js +173 -0
- package/node_modules/@clawdlets/core/dist/lib/opentofu.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/path-expand.d.ts +2 -0
- package/node_modules/@clawdlets/core/dist/lib/path-expand.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/path-expand.js +15 -0
- package/node_modules/@clawdlets/core/dist/lib/path-expand.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/persona-loader.d.ts +34 -0
- package/node_modules/@clawdlets/core/dist/lib/persona-loader.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/persona-loader.js +72 -0
- package/node_modules/@clawdlets/core/dist/lib/persona-loader.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/repo.d.ts +2 -0
- package/node_modules/@clawdlets/core/dist/lib/repo.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/repo.js +16 -0
- package/node_modules/@clawdlets/core/dist/lib/repo.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/run.d.ts +14 -0
- package/node_modules/@clawdlets/core/dist/lib/run.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/run.js +161 -0
- package/node_modules/@clawdlets/core/dist/lib/run.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-init.d.ts +33 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-init.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-init.js +139 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-init.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-migrate.d.ts +9 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-migrate.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-migrate.js +20 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-migrate.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-policy.d.ts +12 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-policy.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-policy.js +54 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-policy.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-tar.d.ts +9 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-tar.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-tar.js +61 -0
- package/node_modules/@clawdlets/core/dist/lib/secrets-tar.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/sops-config.d.ts +26 -0
- package/node_modules/@clawdlets/core/dist/lib/sops-config.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/sops-config.js +106 -0
- package/node_modules/@clawdlets/core/dist/lib/sops-config.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/sops-path.d.ts +6 -0
- package/node_modules/@clawdlets/core/dist/lib/sops-path.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/sops-path.js +42 -0
- package/node_modules/@clawdlets/core/dist/lib/sops-path.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/sops-rules.d.ts +6 -0
- package/node_modules/@clawdlets/core/dist/lib/sops-rules.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/sops-rules.js +21 -0
- package/node_modules/@clawdlets/core/dist/lib/sops-rules.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/sops.d.ts +16 -0
- package/node_modules/@clawdlets/core/dist/lib/sops.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/sops.js +96 -0
- package/node_modules/@clawdlets/core/dist/lib/sops.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/ssh-remote.d.ts +14 -0
- package/node_modules/@clawdlets/core/dist/lib/ssh-remote.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/ssh-remote.js +39 -0
- package/node_modules/@clawdlets/core/dist/lib/ssh-remote.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/ssh.d.ts +9 -0
- package/node_modules/@clawdlets/core/dist/lib/ssh.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/ssh.js +79 -0
- package/node_modules/@clawdlets/core/dist/lib/ssh.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/template-source.d.ts +16 -0
- package/node_modules/@clawdlets/core/dist/lib/template-source.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/template-source.js +42 -0
- package/node_modules/@clawdlets/core/dist/lib/template-source.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/template-test-dir.d.ts +5 -0
- package/node_modules/@clawdlets/core/dist/lib/template-test-dir.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/template-test-dir.js +28 -0
- package/node_modules/@clawdlets/core/dist/lib/template-test-dir.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/ttl.d.ts +13 -0
- package/node_modules/@clawdlets/core/dist/lib/ttl.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/ttl.js +49 -0
- package/node_modules/@clawdlets/core/dist/lib/ttl.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/yaml-scalar.d.ts +5 -0
- package/node_modules/@clawdlets/core/dist/lib/yaml-scalar.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/lib/yaml-scalar.js +26 -0
- package/node_modules/@clawdlets/core/dist/lib/yaml-scalar.js.map +1 -0
- package/node_modules/@clawdlets/core/dist/repo-layout.d.ts +31 -0
- package/node_modules/@clawdlets/core/dist/repo-layout.d.ts.map +1 -0
- package/node_modules/@clawdlets/core/dist/repo-layout.js +79 -0
- package/node_modules/@clawdlets/core/dist/repo-layout.js.map +1 -0
- package/node_modules/@clawdlets/core/package.json +43 -0
- package/node_modules/better-sqlite3/LICENSE +21 -0
- package/node_modules/better-sqlite3/README.md +99 -0
- package/node_modules/better-sqlite3/binding.gyp +38 -0
- package/node_modules/better-sqlite3/deps/common.gypi +68 -0
- package/node_modules/better-sqlite3/deps/copy.js +31 -0
- package/node_modules/better-sqlite3/deps/defines.gypi +41 -0
- package/node_modules/better-sqlite3/deps/download.sh +122 -0
- package/node_modules/better-sqlite3/deps/patches/1208.patch +15 -0
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c +265969 -0
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.h +13968 -0
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3ext.h +730 -0
- package/node_modules/better-sqlite3/deps/sqlite3.gyp +80 -0
- package/node_modules/better-sqlite3/deps/test_extension.c +21 -0
- package/node_modules/better-sqlite3/lib/database.js +90 -0
- package/node_modules/better-sqlite3/lib/index.js +3 -0
- package/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
- package/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
- package/node_modules/better-sqlite3/lib/methods/function.js +31 -0
- package/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
- package/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
- package/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
- package/node_modules/better-sqlite3/lib/methods/table.js +189 -0
- package/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
- package/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
- package/node_modules/better-sqlite3/lib/sqlite-error.js +20 -0
- package/node_modules/better-sqlite3/lib/util.js +12 -0
- package/node_modules/better-sqlite3/package.json +59 -0
- package/node_modules/better-sqlite3/src/addon.cpp +47 -0
- package/node_modules/better-sqlite3/src/better_sqlite3.cpp +74 -0
- package/node_modules/better-sqlite3/src/objects/backup.cpp +120 -0
- package/node_modules/better-sqlite3/src/objects/backup.hpp +36 -0
- package/node_modules/better-sqlite3/src/objects/database.cpp +417 -0
- package/node_modules/better-sqlite3/src/objects/database.hpp +103 -0
- package/node_modules/better-sqlite3/src/objects/statement-iterator.cpp +113 -0
- package/node_modules/better-sqlite3/src/objects/statement-iterator.hpp +50 -0
- package/node_modules/better-sqlite3/src/objects/statement.cpp +383 -0
- package/node_modules/better-sqlite3/src/objects/statement.hpp +58 -0
- package/node_modules/better-sqlite3/src/util/bind-map.cpp +73 -0
- package/node_modules/better-sqlite3/src/util/binder.cpp +193 -0
- package/node_modules/better-sqlite3/src/util/constants.cpp +172 -0
- package/node_modules/better-sqlite3/src/util/custom-aggregate.cpp +121 -0
- package/node_modules/better-sqlite3/src/util/custom-function.cpp +59 -0
- package/node_modules/better-sqlite3/src/util/custom-table.cpp +409 -0
- package/node_modules/better-sqlite3/src/util/data-converter.cpp +17 -0
- package/node_modules/better-sqlite3/src/util/data.cpp +194 -0
- package/node_modules/better-sqlite3/src/util/helpers.cpp +109 -0
- package/node_modules/better-sqlite3/src/util/macros.cpp +70 -0
- package/node_modules/better-sqlite3/src/util/query-macros.cpp +71 -0
- package/node_modules/better-sqlite3/src/util/row-builder.cpp +49 -0
- package/node_modules/dotenv/CHANGELOG.md +598 -0
- package/node_modules/dotenv/LICENSE +23 -0
- package/node_modules/dotenv/README-es.md +405 -0
- package/node_modules/dotenv/README.md +692 -0
- package/node_modules/dotenv/SECURITY.md +1 -0
- package/node_modules/dotenv/config.d.ts +1 -0
- package/node_modules/dotenv/config.js +9 -0
- package/node_modules/dotenv/lib/cli-options.js +17 -0
- package/node_modules/dotenv/lib/env-options.js +28 -0
- package/node_modules/dotenv/lib/main.d.ts +179 -0
- package/node_modules/dotenv/lib/main.js +434 -0
- package/node_modules/dotenv/package.json +62 -0
- package/node_modules/yaml/LICENSE +13 -0
- package/node_modules/yaml/README.md +172 -0
- package/node_modules/yaml/bin.mjs +11 -0
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/node_modules/yaml/browser/dist/compose/compose-node.js +102 -0
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/node_modules/yaml/browser/dist/compose/composer.js +217 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +223 -0
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/node_modules/yaml/browser/dist/errors.js +57 -0
- package/node_modules/yaml/browser/dist/index.js +17 -0
- package/node_modules/yaml/browser/dist/log.js +11 -0
- package/node_modules/yaml/browser/dist/nodes/Alias.js +114 -0
- package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/node_modules/yaml/browser/dist/parse/lexer.js +717 -0
- package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/node_modules/yaml/browser/dist/parse/parser.js +967 -0
- package/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +64 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/node_modules/yaml/browser/dist/stringify/stringify.js +128 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +143 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +24 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/node_modules/yaml/browser/dist/util.js +11 -0
- package/node_modules/yaml/browser/dist/visit.js +233 -0
- package/node_modules/yaml/browser/index.js +5 -0
- package/node_modules/yaml/browser/package.json +3 -0
- package/node_modules/yaml/dist/cli.d.ts +8 -0
- package/node_modules/yaml/dist/cli.mjs +201 -0
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/node_modules/yaml/dist/compose/compose-node.js +105 -0
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/node_modules/yaml/dist/compose/composer.js +222 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +225 -0
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/node_modules/yaml/dist/doc/Document.js +337 -0
- package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/node_modules/yaml/dist/doc/directives.js +178 -0
- package/node_modules/yaml/dist/errors.d.ts +21 -0
- package/node_modules/yaml/dist/errors.js +62 -0
- package/node_modules/yaml/dist/index.d.ts +25 -0
- package/node_modules/yaml/dist/index.js +50 -0
- package/node_modules/yaml/dist/log.d.ts +3 -0
- package/node_modules/yaml/dist/log.js +19 -0
- package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/Alias.js +116 -0
- package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +43 -0
- package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/node_modules/yaml/dist/options.d.ts +344 -0
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/node_modules/yaml/dist/parse/cst.js +112 -0
- package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/node_modules/yaml/dist/parse/lexer.js +719 -0
- package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/node_modules/yaml/dist/parse/parser.js +972 -0
- package/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/node_modules/yaml/dist/public-api.js +107 -0
- package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/node_modules/yaml/dist/schema/tags.js +99 -0
- package/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +68 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/node_modules/yaml/dist/stringify/stringify.js +131 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.js +145 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +26 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/node_modules/yaml/dist/test-events.js +134 -0
- package/node_modules/yaml/dist/util.d.ts +16 -0
- package/node_modules/yaml/dist/util.js +28 -0
- package/node_modules/yaml/dist/visit.d.ts +102 -0
- package/node_modules/yaml/dist/visit.js +236 -0
- package/node_modules/yaml/package.json +97 -0
- package/node_modules/yaml/util.js +2 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +208 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/locales/index.cjs +17 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +6 -0
- package/node_modules/zod/mini/index.cjs +17 -0
- package/node_modules/zod/mini/index.d.cts +1 -0
- package/node_modules/zod/mini/index.d.ts +1 -0
- package/node_modules/zod/mini/index.js +1 -0
- package/node_modules/zod/mini/package.json +6 -0
- package/node_modules/zod/package.json +135 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +1 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +32 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +70 -0
- package/node_modules/zod/src/v4/classic/errors.ts +82 -0
- package/node_modules/zod/src/v4/classic/external.ts +51 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +643 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +82 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2409 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +276 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +562 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +365 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +661 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +595 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +734 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +270 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +640 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +223 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +427 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +282 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +600 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +582 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +570 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +1175 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2975 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +361 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +183 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +219 -0
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1798 -0
- package/node_modules/zod/src/v4/core/checks.ts +1293 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +138 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +448 -0
- package/node_modules/zod/src/v4/core/index.ts +16 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +667 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
- package/node_modules/zod/src/v4/core/parse.ts +195 -0
- package/node_modules/zod/src/v4/core/regexes.ts +183 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +4543 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +83 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +67 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +613 -0
- package/node_modules/zod/src/v4/core/util.ts +966 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +115 -0
- package/node_modules/zod/src/v4/locales/az.ts +111 -0
- package/node_modules/zod/src/v4/locales/be.ts +176 -0
- package/node_modules/zod/src/v4/locales/bg.ts +128 -0
- package/node_modules/zod/src/v4/locales/ca.ts +116 -0
- package/node_modules/zod/src/v4/locales/cs.ts +118 -0
- package/node_modules/zod/src/v4/locales/da.ts +123 -0
- package/node_modules/zod/src/v4/locales/de.ts +116 -0
- package/node_modules/zod/src/v4/locales/en.ts +119 -0
- package/node_modules/zod/src/v4/locales/eo.ts +118 -0
- package/node_modules/zod/src/v4/locales/es.ts +141 -0
- package/node_modules/zod/src/v4/locales/fa.ts +126 -0
- package/node_modules/zod/src/v4/locales/fi.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
- package/node_modules/zod/src/v4/locales/fr.ts +116 -0
- package/node_modules/zod/src/v4/locales/he.ts +246 -0
- package/node_modules/zod/src/v4/locales/hu.ts +117 -0
- package/node_modules/zod/src/v4/locales/hy.ts +164 -0
- package/node_modules/zod/src/v4/locales/id.ts +115 -0
- package/node_modules/zod/src/v4/locales/index.ts +49 -0
- package/node_modules/zod/src/v4/locales/is.ts +119 -0
- package/node_modules/zod/src/v4/locales/it.ts +116 -0
- package/node_modules/zod/src/v4/locales/ja.ts +114 -0
- package/node_modules/zod/src/v4/locales/ka.ts +123 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +119 -0
- package/node_modules/zod/src/v4/locales/ko.ts +121 -0
- package/node_modules/zod/src/v4/locales/lt.ts +239 -0
- package/node_modules/zod/src/v4/locales/mk.ts +118 -0
- package/node_modules/zod/src/v4/locales/ms.ts +115 -0
- package/node_modules/zod/src/v4/locales/nl.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +116 -0
- package/node_modules/zod/src/v4/locales/ota.ts +117 -0
- package/node_modules/zod/src/v4/locales/pl.ts +118 -0
- package/node_modules/zod/src/v4/locales/ps.ts +126 -0
- package/node_modules/zod/src/v4/locales/pt.ts +116 -0
- package/node_modules/zod/src/v4/locales/ru.ts +176 -0
- package/node_modules/zod/src/v4/locales/sl.ts +118 -0
- package/node_modules/zod/src/v4/locales/sv.ts +119 -0
- package/node_modules/zod/src/v4/locales/ta.ts +118 -0
- package/node_modules/zod/src/v4/locales/th.ts +119 -0
- package/node_modules/zod/src/v4/locales/tr.ts +111 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +117 -0
- package/node_modules/zod/src/v4/locales/ur.ts +119 -0
- package/node_modules/zod/src/v4/locales/uz.ts +116 -0
- package/node_modules/zod/src/v4/locales/vi.ts +117 -0
- package/node_modules/zod/src/v4/locales/yo.ts +124 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +14 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1916 -0
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +529 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +963 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +347 -0
- package/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +6 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3777 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3695 -0
- package/node_modules/zod/v4/classic/checks.cjs +33 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +61 -0
- package/node_modules/zod/v4/classic/compat.d.cts +50 -0
- package/node_modules/zod/v4/classic/compat.d.ts +50 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/errors.cjs +74 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +48 -0
- package/node_modules/zod/v4/classic/external.cjs +73 -0
- package/node_modules/zod/v4/classic/external.d.cts +15 -0
- package/node_modules/zod/v4/classic/external.d.ts +15 -0
- package/node_modules/zod/v4/classic/external.js +20 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +610 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +584 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/package.json +6 -0
- package/node_modules/zod/v4/classic/parse.cjs +41 -0
- package/node_modules/zod/v4/classic/parse.d.cts +31 -0
- package/node_modules/zod/v4/classic/parse.d.ts +31 -0
- package/node_modules/zod/v4/classic/parse.js +15 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1272 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +739 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +739 -0
- package/node_modules/zod/v4/classic/schemas.js +1157 -0
- package/node_modules/zod/v4/core/api.cjs +1222 -0
- package/node_modules/zod/v4/core/api.d.cts +304 -0
- package/node_modules/zod/v4/core/api.d.ts +304 -0
- package/node_modules/zod/v4/core/api.js +1082 -0
- package/node_modules/zod/v4/core/checks.cjs +601 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +575 -0
- package/node_modules/zod/v4/core/core.cjs +83 -0
- package/node_modules/zod/v4/core/core.d.cts +70 -0
- package/node_modules/zod/v4/core/core.d.ts +70 -0
- package/node_modules/zod/v4/core/core.js +76 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +213 -0
- package/node_modules/zod/v4/core/errors.d.cts +220 -0
- package/node_modules/zod/v4/core/errors.d.ts +220 -0
- package/node_modules/zod/v4/core/errors.js +182 -0
- package/node_modules/zod/v4/core/index.cjs +47 -0
- package/node_modules/zod/v4/core/index.d.cts +16 -0
- package/node_modules/zod/v4/core/index.d.ts +16 -0
- package/node_modules/zod/v4/core/index.js +16 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +648 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +605 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/package.json +6 -0
- package/node_modules/zod/v4/core/parse.cjs +131 -0
- package/node_modules/zod/v4/core/parse.d.cts +49 -0
- package/node_modules/zod/v4/core/parse.d.ts +49 -0
- package/node_modules/zod/v4/core/parse.js +93 -0
- package/node_modules/zod/v4/core/regexes.cjs +166 -0
- package/node_modules/zod/v4/core/regexes.d.cts +79 -0
- package/node_modules/zod/v4/core/regexes.d.ts +79 -0
- package/node_modules/zod/v4/core/regexes.js +133 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2126 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1146 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1146 -0
- package/node_modules/zod/v4/core/schemas.js +2095 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +446 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.js +437 -0
- package/node_modules/zod/v4/core/util.cjs +710 -0
- package/node_modules/zod/v4/core/util.d.cts +199 -0
- package/node_modules/zod/v4/core/util.d.ts +199 -0
- package/node_modules/zod/v4/core/util.js +651 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +133 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +106 -0
- package/node_modules/zod/v4/locales/az.cjs +132 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +105 -0
- package/node_modules/zod/v4/locales/be.cjs +183 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +156 -0
- package/node_modules/zod/v4/locales/bg.cjs +147 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +120 -0
- package/node_modules/zod/v4/locales/ca.cjs +134 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +107 -0
- package/node_modules/zod/v4/locales/cs.cjs +138 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +111 -0
- package/node_modules/zod/v4/locales/da.cjs +142 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +115 -0
- package/node_modules/zod/v4/locales/de.cjs +135 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +108 -0
- package/node_modules/zod/v4/locales/en.cjs +136 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +109 -0
- package/node_modules/zod/v4/locales/eo.cjs +136 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +109 -0
- package/node_modules/zod/v4/locales/es.cjs +159 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +132 -0
- package/node_modules/zod/v4/locales/fa.cjs +141 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +114 -0
- package/node_modules/zod/v4/locales/fi.cjs +139 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +112 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/node_modules/zod/v4/locales/fr.cjs +135 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +108 -0
- package/node_modules/zod/v4/locales/he.cjs +241 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +214 -0
- package/node_modules/zod/v4/locales/hu.cjs +135 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +108 -0
- package/node_modules/zod/v4/locales/hy.cjs +174 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +147 -0
- package/node_modules/zod/v4/locales/id.cjs +133 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +106 -0
- package/node_modules/zod/v4/locales/index.cjs +104 -0
- package/node_modules/zod/v4/locales/index.d.cts +49 -0
- package/node_modules/zod/v4/locales/index.d.ts +49 -0
- package/node_modules/zod/v4/locales/index.js +49 -0
- package/node_modules/zod/v4/locales/is.cjs +136 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +109 -0
- package/node_modules/zod/v4/locales/it.cjs +135 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +108 -0
- package/node_modules/zod/v4/locales/ja.cjs +134 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +107 -0
- package/node_modules/zod/v4/locales/ka.cjs +139 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +112 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +137 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +110 -0
- package/node_modules/zod/v4/locales/ko.cjs +138 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +111 -0
- package/node_modules/zod/v4/locales/lt.cjs +230 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +203 -0
- package/node_modules/zod/v4/locales/mk.cjs +136 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +109 -0
- package/node_modules/zod/v4/locales/ms.cjs +134 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +107 -0
- package/node_modules/zod/v4/locales/nl.cjs +137 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +110 -0
- package/node_modules/zod/v4/locales/no.cjs +135 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +108 -0
- package/node_modules/zod/v4/locales/ota.cjs +136 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +109 -0
- package/node_modules/zod/v4/locales/package.json +6 -0
- package/node_modules/zod/v4/locales/pl.cjs +136 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +109 -0
- package/node_modules/zod/v4/locales/ps.cjs +141 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +114 -0
- package/node_modules/zod/v4/locales/pt.cjs +135 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +108 -0
- package/node_modules/zod/v4/locales/ru.cjs +183 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +156 -0
- package/node_modules/zod/v4/locales/sl.cjs +136 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +109 -0
- package/node_modules/zod/v4/locales/sv.cjs +137 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +110 -0
- package/node_modules/zod/v4/locales/ta.cjs +137 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +110 -0
- package/node_modules/zod/v4/locales/th.cjs +137 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +110 -0
- package/node_modules/zod/v4/locales/tr.cjs +132 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +105 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +135 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +108 -0
- package/node_modules/zod/v4/locales/ur.cjs +137 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +110 -0
- package/node_modules/zod/v4/locales/uz.cjs +136 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +109 -0
- package/node_modules/zod/v4/locales/vi.cjs +135 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +108 -0
- package/node_modules/zod/v4/locales/yo.cjs +134 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +107 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +52 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/external.cjs +63 -0
- package/node_modules/zod/v4/mini/external.d.cts +12 -0
- package/node_modules/zod/v4/mini/external.d.ts +12 -0
- package/node_modules/zod/v4/mini/external.js +14 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +64 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +6 -0
- package/node_modules/zod/v4/mini/parse.cjs +16 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1046 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +427 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +427 -0
- package/node_modules/zod/v4/mini/schemas.js +925 -0
- package/node_modules/zod/v4/package.json +6 -0
- package/node_modules/zod/v4-mini/index.cjs +17 -0
- package/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/node_modules/zod/v4-mini/index.js +1 -0
- package/node_modules/zod/v4-mini/package.json +6 -0
- package/package.json +56 -7
- package/index.js +0 -3
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { computeBackoffMs, isSqliteUniqueConstraintError, safeParseJson } from "./util.js";
|
|
3
|
+
function rowToJob(row) {
|
|
4
|
+
return {
|
|
5
|
+
jobId: row.job_id,
|
|
6
|
+
kind: row.kind,
|
|
7
|
+
payload: safeParseJson(row.payload_json),
|
|
8
|
+
requester: row.requester,
|
|
9
|
+
idempotencyKey: row.idempotency_key,
|
|
10
|
+
status: row.status,
|
|
11
|
+
priority: row.priority,
|
|
12
|
+
runAt: row.run_at,
|
|
13
|
+
createdAt: row.created_at,
|
|
14
|
+
updatedAt: row.updated_at,
|
|
15
|
+
attempt: row.attempt,
|
|
16
|
+
maxAttempts: row.max_attempts,
|
|
17
|
+
lockedBy: row.locked_by,
|
|
18
|
+
leaseUntil: row.lease_until,
|
|
19
|
+
lastError: String(row.last_error || ""),
|
|
20
|
+
result: safeParseJson(row.result_json),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export function createQueueJobOps(db) {
|
|
24
|
+
const insertJob = db.prepare(`
|
|
25
|
+
insert into jobs (
|
|
26
|
+
job_id, kind, payload_json,
|
|
27
|
+
requester, idempotency_key,
|
|
28
|
+
status, priority, run_at,
|
|
29
|
+
created_at, updated_at,
|
|
30
|
+
attempt, max_attempts,
|
|
31
|
+
locked_by, lease_until,
|
|
32
|
+
last_error, result_json
|
|
33
|
+
)
|
|
34
|
+
values (
|
|
35
|
+
@job_id, @kind, @payload_json,
|
|
36
|
+
@requester, @idempotency_key,
|
|
37
|
+
@status, @priority, @run_at,
|
|
38
|
+
@created_at, @updated_at,
|
|
39
|
+
@attempt, @max_attempts,
|
|
40
|
+
null, null,
|
|
41
|
+
'', null
|
|
42
|
+
)
|
|
43
|
+
`);
|
|
44
|
+
const findByIdempotency = db.prepare(`select job_id from jobs where requester = @requester and idempotency_key = @idempotency_key limit 1`);
|
|
45
|
+
const getJob = db.prepare(`select * from jobs where job_id = @job_id limit 1`);
|
|
46
|
+
const listJobsBase = (filters) => {
|
|
47
|
+
const where = [];
|
|
48
|
+
const params = {};
|
|
49
|
+
if (filters?.requester) {
|
|
50
|
+
where.push("requester = @requester");
|
|
51
|
+
params.requester = filters.requester;
|
|
52
|
+
}
|
|
53
|
+
if (filters?.statuses && filters.statuses.length > 0) {
|
|
54
|
+
where.push(`status in (${filters.statuses.map((_, i) => `@s${i}`).join(",")})`);
|
|
55
|
+
filters.statuses.forEach((s, i) => (params[`s${i}`] = s));
|
|
56
|
+
}
|
|
57
|
+
if (filters?.kinds && filters.kinds.length > 0) {
|
|
58
|
+
where.push(`kind in (${filters.kinds.map((_, i) => `@k${i}`).join(",")})`);
|
|
59
|
+
filters.kinds.forEach((k, i) => (params[`k${i}`] = k));
|
|
60
|
+
}
|
|
61
|
+
const whereSql = where.length > 0 ? `where ${where.join(" and ")}` : "";
|
|
62
|
+
const limit = Math.max(1, Math.min(500, Math.floor(filters?.limit ?? 50)));
|
|
63
|
+
params.limit = limit;
|
|
64
|
+
return {
|
|
65
|
+
sql: `select * from jobs ${whereSql} order by created_at desc, job_id asc limit @limit`,
|
|
66
|
+
params,
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
const selectNext = db.prepare(`
|
|
70
|
+
select job_id
|
|
71
|
+
from (
|
|
72
|
+
select job_id, priority, run_at, created_at
|
|
73
|
+
from jobs
|
|
74
|
+
where status = 'queued' and run_at <= @now
|
|
75
|
+
union all
|
|
76
|
+
select job_id, priority, run_at, created_at
|
|
77
|
+
from jobs
|
|
78
|
+
where status = 'running' and lease_until is not null and lease_until <= @now
|
|
79
|
+
) ready
|
|
80
|
+
order by priority desc, run_at asc, created_at asc, job_id asc
|
|
81
|
+
limit 1
|
|
82
|
+
`);
|
|
83
|
+
const claimJob = db.prepare(`
|
|
84
|
+
update jobs
|
|
85
|
+
set
|
|
86
|
+
status = 'running',
|
|
87
|
+
locked_by = @worker_id,
|
|
88
|
+
lease_until = @lease_until,
|
|
89
|
+
updated_at = @now,
|
|
90
|
+
attempt = attempt + 1
|
|
91
|
+
where
|
|
92
|
+
job_id = @job_id
|
|
93
|
+
and (
|
|
94
|
+
(status = 'queued' and run_at <= @now)
|
|
95
|
+
or (status = 'running' and lease_until is not null and lease_until <= @now)
|
|
96
|
+
)
|
|
97
|
+
`);
|
|
98
|
+
const updateLease = db.prepare(`
|
|
99
|
+
update jobs
|
|
100
|
+
set lease_until = @lease_until,
|
|
101
|
+
updated_at = @now
|
|
102
|
+
where job_id = @job_id
|
|
103
|
+
and status = 'running'
|
|
104
|
+
and locked_by = @worker_id
|
|
105
|
+
`);
|
|
106
|
+
const ackJob = db.prepare(`
|
|
107
|
+
update jobs
|
|
108
|
+
set
|
|
109
|
+
status = 'done',
|
|
110
|
+
updated_at = @now,
|
|
111
|
+
locked_by = null,
|
|
112
|
+
lease_until = null,
|
|
113
|
+
result_json = @result_json
|
|
114
|
+
where job_id = @job_id
|
|
115
|
+
and status = 'running'
|
|
116
|
+
and locked_by = @worker_id
|
|
117
|
+
`);
|
|
118
|
+
const failToRetry = db.prepare(`
|
|
119
|
+
update jobs
|
|
120
|
+
set
|
|
121
|
+
status = 'queued',
|
|
122
|
+
updated_at = @now,
|
|
123
|
+
locked_by = null,
|
|
124
|
+
lease_until = null,
|
|
125
|
+
run_at = @run_at,
|
|
126
|
+
last_error = @last_error
|
|
127
|
+
where job_id = @job_id
|
|
128
|
+
and status = 'running'
|
|
129
|
+
and locked_by = @worker_id
|
|
130
|
+
`);
|
|
131
|
+
const failTerminal = db.prepare(`
|
|
132
|
+
update jobs
|
|
133
|
+
set
|
|
134
|
+
status = 'failed',
|
|
135
|
+
updated_at = @now,
|
|
136
|
+
locked_by = null,
|
|
137
|
+
lease_until = null,
|
|
138
|
+
last_error = @last_error
|
|
139
|
+
where job_id = @job_id
|
|
140
|
+
and status = 'running'
|
|
141
|
+
and locked_by = @worker_id
|
|
142
|
+
`);
|
|
143
|
+
const cancelJob = db.prepare(`
|
|
144
|
+
update jobs
|
|
145
|
+
set
|
|
146
|
+
status = 'canceled',
|
|
147
|
+
updated_at = @now,
|
|
148
|
+
locked_by = null,
|
|
149
|
+
lease_until = null
|
|
150
|
+
where job_id = @job_id
|
|
151
|
+
and status in ('queued','running')
|
|
152
|
+
`);
|
|
153
|
+
const insertEvent = db.prepare(`insert into job_events (job_id, at, type, message, attempt) values (@job_id, @at, @type, @message, @attempt)`);
|
|
154
|
+
const pruneJobs = db.prepare(`delete from jobs where created_at < @cutoff and status in ('done','failed','canceled')`);
|
|
155
|
+
const enqueueTx = db.transaction((params) => {
|
|
156
|
+
if (params.idempotencyKey) {
|
|
157
|
+
const existing = findByIdempotency.get({ requester: params.requester, idempotency_key: params.idempotencyKey });
|
|
158
|
+
if (existing?.job_id)
|
|
159
|
+
return { jobId: existing.job_id, deduped: true };
|
|
160
|
+
}
|
|
161
|
+
const jobId = randomUUID();
|
|
162
|
+
try {
|
|
163
|
+
insertJob.run({
|
|
164
|
+
job_id: jobId,
|
|
165
|
+
kind: params.kind,
|
|
166
|
+
payload_json: JSON.stringify(params.payload ?? null),
|
|
167
|
+
requester: params.requester,
|
|
168
|
+
idempotency_key: params.idempotencyKey,
|
|
169
|
+
status: "queued",
|
|
170
|
+
priority: params.priority,
|
|
171
|
+
run_at: params.runAt,
|
|
172
|
+
created_at: params.now,
|
|
173
|
+
updated_at: params.now,
|
|
174
|
+
attempt: 0,
|
|
175
|
+
max_attempts: params.maxAttempts,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
catch (e) {
|
|
179
|
+
if (params.idempotencyKey && isSqliteUniqueConstraintError(e)) {
|
|
180
|
+
const existing = findByIdempotency.get({ requester: params.requester, idempotency_key: params.idempotencyKey });
|
|
181
|
+
if (existing?.job_id)
|
|
182
|
+
return { jobId: existing.job_id, deduped: true };
|
|
183
|
+
}
|
|
184
|
+
throw e;
|
|
185
|
+
}
|
|
186
|
+
insertEvent.run({ job_id: jobId, at: params.now, type: "enqueue", message: "", attempt: 0 });
|
|
187
|
+
return { jobId, deduped: false };
|
|
188
|
+
});
|
|
189
|
+
const claimTx = db.transaction((params) => {
|
|
190
|
+
const picked = selectNext.get({ now: params.now });
|
|
191
|
+
if (!picked?.job_id)
|
|
192
|
+
return null;
|
|
193
|
+
const leaseUntil = params.now + params.leaseMs;
|
|
194
|
+
const res = claimJob.run({ job_id: picked.job_id, now: params.now, worker_id: params.workerId, lease_until: leaseUntil });
|
|
195
|
+
if (res.changes !== 1)
|
|
196
|
+
return null;
|
|
197
|
+
const row = getJob.get({ job_id: picked.job_id });
|
|
198
|
+
if (!row)
|
|
199
|
+
return null;
|
|
200
|
+
insertEvent.run({ job_id: picked.job_id, at: params.now, type: "claim", message: params.workerId, attempt: row.attempt });
|
|
201
|
+
return rowToJob(row);
|
|
202
|
+
});
|
|
203
|
+
return {
|
|
204
|
+
enqueue: (params) => {
|
|
205
|
+
const kind = String(params.kind || "").trim();
|
|
206
|
+
if (!kind)
|
|
207
|
+
throw new Error("enqueue.kind missing");
|
|
208
|
+
const requester = String(params.requester || "").trim();
|
|
209
|
+
if (!requester)
|
|
210
|
+
throw new Error("enqueue.requester missing");
|
|
211
|
+
const idempotencyKey = String(params.idempotencyKey || "").trim();
|
|
212
|
+
const now = Date.now();
|
|
213
|
+
const runAt = Number.isFinite(params.runAt) && params.runAt > 0 ? Math.floor(params.runAt) : now;
|
|
214
|
+
const priority = Number.isFinite(params.priority) ? Math.floor(params.priority) : 0;
|
|
215
|
+
const maxAttempts = Number.isFinite(params.maxAttempts) && params.maxAttempts > 0 ? Math.floor(params.maxAttempts) : 1;
|
|
216
|
+
return enqueueTx({ kind, payload: params.payload ?? null, requester, idempotencyKey, runAt, priority, maxAttempts, now });
|
|
217
|
+
},
|
|
218
|
+
get: (jobId) => {
|
|
219
|
+
const v = String(jobId || "").trim();
|
|
220
|
+
if (!v)
|
|
221
|
+
return null;
|
|
222
|
+
const row = getJob.get({ job_id: v });
|
|
223
|
+
return row ? rowToJob(row) : null;
|
|
224
|
+
},
|
|
225
|
+
list: (filters) => {
|
|
226
|
+
const { sql, params } = listJobsBase(filters);
|
|
227
|
+
const stmt = db.prepare(sql);
|
|
228
|
+
return stmt.all(params).map(rowToJob);
|
|
229
|
+
},
|
|
230
|
+
claimNext: (params) => {
|
|
231
|
+
const workerId = String(params.workerId || "").trim();
|
|
232
|
+
if (!workerId)
|
|
233
|
+
throw new Error("claimNext.workerId missing");
|
|
234
|
+
const now = params.now ?? Date.now();
|
|
235
|
+
const leaseMs = Math.max(5_000, Math.min(60 * 60_000, Math.floor(params.leaseMs ?? 120_000)));
|
|
236
|
+
return claimTx({ workerId, now, leaseMs });
|
|
237
|
+
},
|
|
238
|
+
extendLease: (params) => {
|
|
239
|
+
const jobId = String(params.jobId || "").trim();
|
|
240
|
+
const workerId = String(params.workerId || "").trim();
|
|
241
|
+
if (!jobId || !workerId)
|
|
242
|
+
return false;
|
|
243
|
+
const now = Date.now();
|
|
244
|
+
const res = updateLease.run({ job_id: jobId, worker_id: workerId, lease_until: params.leaseUntil, now });
|
|
245
|
+
return res.changes === 1;
|
|
246
|
+
},
|
|
247
|
+
ack: (params) => {
|
|
248
|
+
const jobId = String(params.jobId || "").trim();
|
|
249
|
+
const workerId = String(params.workerId || "").trim();
|
|
250
|
+
if (!jobId || !workerId)
|
|
251
|
+
return false;
|
|
252
|
+
const now = params.now ?? Date.now();
|
|
253
|
+
const row = getJob.get({ job_id: jobId });
|
|
254
|
+
if (!row)
|
|
255
|
+
return false;
|
|
256
|
+
const res = ackJob.run({ job_id: jobId, worker_id: workerId, now, result_json: JSON.stringify(params.result ?? null) });
|
|
257
|
+
if (res.changes === 1)
|
|
258
|
+
insertEvent.run({ job_id: jobId, at: now, type: "ack", message: "", attempt: row.attempt });
|
|
259
|
+
return res.changes === 1;
|
|
260
|
+
},
|
|
261
|
+
fail: (params) => {
|
|
262
|
+
const jobId = String(params.jobId || "").trim();
|
|
263
|
+
const workerId = String(params.workerId || "").trim();
|
|
264
|
+
if (!jobId || !workerId)
|
|
265
|
+
return null;
|
|
266
|
+
const now = params.now ?? Date.now();
|
|
267
|
+
const row = getJob.get({ job_id: jobId });
|
|
268
|
+
if (!row)
|
|
269
|
+
return null;
|
|
270
|
+
const err = String(params.error || "").trim() || "unknown error";
|
|
271
|
+
const attempt = Math.max(1, row.attempt);
|
|
272
|
+
const maxAttempts = Math.max(1, row.max_attempts);
|
|
273
|
+
if (attempt < maxAttempts) {
|
|
274
|
+
const baseMs = params.retry?.baseMs ?? 5_000;
|
|
275
|
+
const maxMs = params.retry?.maxMs ?? 5 * 60_000;
|
|
276
|
+
const delay = computeBackoffMs({ attempt, baseMs, maxMs });
|
|
277
|
+
const res = failToRetry.run({ job_id: jobId, worker_id: workerId, now, run_at: now + delay, last_error: err });
|
|
278
|
+
if (res.changes === 1) {
|
|
279
|
+
insertEvent.run({ job_id: jobId, at: now, type: "retry", message: err, attempt });
|
|
280
|
+
return { status: "queued" };
|
|
281
|
+
}
|
|
282
|
+
return null;
|
|
283
|
+
}
|
|
284
|
+
const res = failTerminal.run({ job_id: jobId, worker_id: workerId, now, last_error: err });
|
|
285
|
+
if (res.changes === 1) {
|
|
286
|
+
insertEvent.run({ job_id: jobId, at: now, type: "fail", message: err, attempt });
|
|
287
|
+
return { status: "failed" };
|
|
288
|
+
}
|
|
289
|
+
return null;
|
|
290
|
+
},
|
|
291
|
+
cancel: (params) => {
|
|
292
|
+
const jobId = String(params.jobId || "").trim();
|
|
293
|
+
if (!jobId)
|
|
294
|
+
return false;
|
|
295
|
+
const now = params.now ?? Date.now();
|
|
296
|
+
const row = getJob.get({ job_id: jobId });
|
|
297
|
+
if (!row)
|
|
298
|
+
return false;
|
|
299
|
+
const res = cancelJob.run({ job_id: jobId, now });
|
|
300
|
+
if (res.changes === 1)
|
|
301
|
+
insertEvent.run({ job_id: jobId, at: now, type: "cancel", message: "", attempt: row.attempt });
|
|
302
|
+
return res.changes === 1;
|
|
303
|
+
},
|
|
304
|
+
prune: (params) => {
|
|
305
|
+
const now = params.now ?? Date.now();
|
|
306
|
+
const keepDays = Math.max(1, Math.floor(params.keepDays));
|
|
307
|
+
const cutoff = now - keepDays * 86400_000;
|
|
308
|
+
const res = pruneJobs.run({ cutoff });
|
|
309
|
+
return res.changes;
|
|
310
|
+
},
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
//# sourceMappingURL=jobs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../src/queue/jobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAqB3F,SAAS,QAAQ,CAAC,GAAW;IAC3B,OAAO;QACL,KAAK,EAAE,GAAG,CAAC,MAAM;QACjB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC;QACxC,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,cAAc,EAAE,GAAG,CAAC,eAAe;QACnC,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,KAAK,EAAE,GAAG,CAAC,MAAM;QACjB,SAAS,EAAE,GAAG,CAAC,UAAU;QACzB,SAAS,EAAE,GAAG,CAAC,UAAU;QACzB,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,WAAW,EAAE,GAAG,CAAC,YAAY;QAC7B,QAAQ,EAAE,GAAG,CAAC,SAAS;QACvB,UAAU,EAAE,GAAG,CAAC,WAAW;QAC3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AAG,CAAC,OAAO,EAAE,CAAC,CAAC;YACtH,OAAO,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC;QAC3B,CAAC;QAED,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE;YAChB,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC1D,MAAM,MAAM,GAAG,GAAG,GAAG,QAAQ,GAAG,SAAS,CAAC;YAC1C,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;YACtC,OAAO,GAAG,CAAC,OAAO,CAAC;QACrB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/queue/migrate.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,EAAE,EAAE,OAAO,gBAAgB,EAAE,QAAQ,GAAG,IAAI,CA0E3E"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export function migrateClfQueue(db) {
|
|
2
|
+
let version = db.pragma("user_version", { simple: true });
|
|
3
|
+
if (version === 0) {
|
|
4
|
+
db.exec(`
|
|
5
|
+
pragma foreign_keys = on;
|
|
6
|
+
|
|
7
|
+
create table jobs (
|
|
8
|
+
job_id text primary key,
|
|
9
|
+
kind text not null,
|
|
10
|
+
payload_json text not null,
|
|
11
|
+
requester text not null,
|
|
12
|
+
idempotency_key text not null,
|
|
13
|
+
status text not null,
|
|
14
|
+
priority integer not null,
|
|
15
|
+
run_at integer not null,
|
|
16
|
+
created_at integer not null,
|
|
17
|
+
updated_at integer not null,
|
|
18
|
+
attempt integer not null,
|
|
19
|
+
max_attempts integer not null,
|
|
20
|
+
locked_by text,
|
|
21
|
+
lease_until integer,
|
|
22
|
+
last_error text,
|
|
23
|
+
result_json text
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
create unique index jobs_by_idempotency on jobs(requester, idempotency_key) where idempotency_key != '';
|
|
27
|
+
create index jobs_by_status_run_at on jobs(status, run_at);
|
|
28
|
+
create index jobs_by_requester on jobs(requester, created_at desc);
|
|
29
|
+
create index jobs_by_kind on jobs(kind, created_at desc);
|
|
30
|
+
|
|
31
|
+
create table job_events (
|
|
32
|
+
id integer primary key autoincrement,
|
|
33
|
+
job_id text not null,
|
|
34
|
+
at integer not null,
|
|
35
|
+
type text not null,
|
|
36
|
+
message text not null,
|
|
37
|
+
attempt integer not null,
|
|
38
|
+
foreign key(job_id) references jobs(job_id) on delete cascade
|
|
39
|
+
);
|
|
40
|
+
create index job_events_by_job_id on job_events(job_id, at);
|
|
41
|
+
`);
|
|
42
|
+
db.pragma("user_version = 1");
|
|
43
|
+
version = 1;
|
|
44
|
+
}
|
|
45
|
+
if (version === 1) {
|
|
46
|
+
db.exec(`
|
|
47
|
+
create table cattle_bootstrap_tokens (
|
|
48
|
+
token_hash text primary key,
|
|
49
|
+
created_at integer not null,
|
|
50
|
+
expires_at integer not null,
|
|
51
|
+
used_at integer,
|
|
52
|
+
job_id text not null,
|
|
53
|
+
requester text not null,
|
|
54
|
+
cattle_name text not null,
|
|
55
|
+
env_keys_json text not null,
|
|
56
|
+
public_env_json text not null
|
|
57
|
+
);
|
|
58
|
+
create index cattle_bootstrap_tokens_by_expires_at on cattle_bootstrap_tokens(expires_at);
|
|
59
|
+
create index cattle_bootstrap_tokens_by_job_id on cattle_bootstrap_tokens(job_id);
|
|
60
|
+
`);
|
|
61
|
+
db.pragma("user_version = 2");
|
|
62
|
+
version = 2;
|
|
63
|
+
}
|
|
64
|
+
if (version === 2) {
|
|
65
|
+
db.exec(`
|
|
66
|
+
create index jobs_by_status_lease_until on jobs(status, lease_until);
|
|
67
|
+
`);
|
|
68
|
+
db.pragma("user_version = 3");
|
|
69
|
+
version = 3;
|
|
70
|
+
}
|
|
71
|
+
if (version !== 3)
|
|
72
|
+
throw new Error(`unsupported clf queue schema version: ${version}`);
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=migrate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/queue/migrate.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,eAAe,CAAC,EAAqC;IACnE,IAAI,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAW,CAAC;IACpE,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;QAClB,EAAE,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqCP,CAAC,CAAC;QACH,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAC9B,OAAO,GAAG,CAAC,CAAC;IACd,CAAC;IAED,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;QAClB,EAAE,CAAC,IAAI,CAAC;;;;;;;;;;;;;;KAcP,CAAC,CAAC;QACH,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAC9B,OAAO,GAAG,CAAC,CAAC;IACd,CAAC;IAED,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;QAClB,EAAE,CAAC,IAAI,CAAC;;KAEP,CAAC,CAAC;QACH,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAC9B,OAAO,GAAG,CAAC,CAAC;IACd,CAAC;IAED,IAAI,OAAO,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,yCAAyC,OAAO,EAAE,CAAC,CAAC;AACzF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../../src/queue/open.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAS3C,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAoBrD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import process from "node:process";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
|
+
import { ensurePrivateDir, ensurePrivateFile } from "@clawdlets/core/lib/fs-private";
|
|
5
|
+
import { migrateClfQueue } from "./migrate.js";
|
|
6
|
+
import { createQueueJobOps } from "./jobs.js";
|
|
7
|
+
import { createBootstrapTokenOps } from "./bootstrap-tokens.js";
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
const BetterSqlite3 = require("better-sqlite3");
|
|
10
|
+
export function openClfQueue(dbPath) {
|
|
11
|
+
const abs = path.isAbsolute(dbPath) ? dbPath : path.resolve(process.cwd(), dbPath);
|
|
12
|
+
ensurePrivateDir(path.dirname(abs));
|
|
13
|
+
const db = new BetterSqlite3(abs);
|
|
14
|
+
ensurePrivateFile(abs);
|
|
15
|
+
db.pragma("journal_mode = WAL");
|
|
16
|
+
db.pragma("synchronous = NORMAL");
|
|
17
|
+
db.pragma("foreign_keys = ON");
|
|
18
|
+
migrateClfQueue(db);
|
|
19
|
+
const jobs = createQueueJobOps(db);
|
|
20
|
+
const tokens = createBootstrapTokenOps(db);
|
|
21
|
+
return {
|
|
22
|
+
close: () => db.close(),
|
|
23
|
+
...jobs,
|
|
24
|
+
...tokens,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=open.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open.js","sourceRoot":"","sources":["../../src/queue/open.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,gB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"canceled";
|
|
2
|
+
export type ClfQueueJob = {
|
|
3
|
+
jobId: string;
|
|
4
|
+
kind: string;
|
|
5
|
+
payload: unknown;
|
|
6
|
+
requester: string;
|
|
7
|
+
idempotencyKey: string;
|
|
8
|
+
status: ClfQueueJobStatus;
|
|
9
|
+
priority: number;
|
|
10
|
+
runAt: number;
|
|
11
|
+
createdAt: number;
|
|
12
|
+
updatedAt: number;
|
|
13
|
+
attempt: number;
|
|
14
|
+
maxAttempts: number;
|
|
15
|
+
lockedBy: string | null;
|
|
16
|
+
leaseUntil: number | null;
|
|
17
|
+
lastError: string;
|
|
18
|
+
result: unknown | null;
|
|
19
|
+
};
|
|
20
|
+
export type ClfQueueClaimedJob = {
|
|
21
|
+
job: ClfQueueJob;
|
|
22
|
+
workerId: string;
|
|
23
|
+
leaseUntil: number;
|
|
24
|
+
};
|
|
25
|
+
export type ClfQueueFilters = {
|
|
26
|
+
requester?: string;
|
|
27
|
+
statuses?: ClfQueueJobStatus[];
|
|
28
|
+
kinds?: string[];
|
|
29
|
+
limit?: number;
|
|
30
|
+
};
|
|
31
|
+
export type ClfCattleBootstrapToken = {
|
|
32
|
+
jobId: string;
|
|
33
|
+
requester: string;
|
|
34
|
+
cattleName: string;
|
|
35
|
+
envKeys: string[];
|
|
36
|
+
publicEnv: Record<string, string>;
|
|
37
|
+
createdAt: number;
|
|
38
|
+
expiresAt: number;
|
|
39
|
+
usedAt: number | null;
|
|
40
|
+
};
|
|
41
|
+
export type ClfQueue = {
|
|
42
|
+
close(): void;
|
|
43
|
+
enqueue(params: {
|
|
44
|
+
kind: string;
|
|
45
|
+
payload: unknown;
|
|
46
|
+
requester: string;
|
|
47
|
+
idempotencyKey?: string;
|
|
48
|
+
runAt?: number;
|
|
49
|
+
priority?: number;
|
|
50
|
+
maxAttempts?: number;
|
|
51
|
+
}): {
|
|
52
|
+
jobId: string;
|
|
53
|
+
deduped: boolean;
|
|
54
|
+
};
|
|
55
|
+
get(jobId: string): ClfQueueJob | null;
|
|
56
|
+
list(filters?: ClfQueueFilters): ClfQueueJob[];
|
|
57
|
+
claimNext(params: {
|
|
58
|
+
workerId: string;
|
|
59
|
+
now?: number;
|
|
60
|
+
leaseMs?: number;
|
|
61
|
+
}): ClfQueueJob | null;
|
|
62
|
+
extendLease(params: {
|
|
63
|
+
jobId: string;
|
|
64
|
+
workerId: string;
|
|
65
|
+
leaseUntil: number;
|
|
66
|
+
}): boolean;
|
|
67
|
+
ack(params: {
|
|
68
|
+
jobId: string;
|
|
69
|
+
workerId: string;
|
|
70
|
+
now?: number;
|
|
71
|
+
result?: unknown;
|
|
72
|
+
}): boolean;
|
|
73
|
+
fail(params: {
|
|
74
|
+
jobId: string;
|
|
75
|
+
workerId: string;
|
|
76
|
+
now?: number;
|
|
77
|
+
error: string;
|
|
78
|
+
retry?: {
|
|
79
|
+
baseMs?: number;
|
|
80
|
+
maxMs?: number;
|
|
81
|
+
};
|
|
82
|
+
}): {
|
|
83
|
+
status: "queued" | "failed";
|
|
84
|
+
} | null;
|
|
85
|
+
cancel(params: {
|
|
86
|
+
jobId: string;
|
|
87
|
+
now?: number;
|
|
88
|
+
}): boolean;
|
|
89
|
+
prune(params: {
|
|
90
|
+
now?: number;
|
|
91
|
+
keepDays: number;
|
|
92
|
+
}): number;
|
|
93
|
+
createCattleBootstrapToken(params: {
|
|
94
|
+
jobId: string;
|
|
95
|
+
requester: string;
|
|
96
|
+
cattleName: string;
|
|
97
|
+
envKeys: string[];
|
|
98
|
+
publicEnv?: Record<string, string>;
|
|
99
|
+
now?: number;
|
|
100
|
+
ttlMs?: number;
|
|
101
|
+
}): {
|
|
102
|
+
token: string;
|
|
103
|
+
expiresAt: number;
|
|
104
|
+
};
|
|
105
|
+
consumeCattleBootstrapToken(params: {
|
|
106
|
+
token: string;
|
|
107
|
+
now?: number;
|
|
108
|
+
}): ClfCattleBootstrapToken | null;
|
|
109
|
+
pruneCattleBootstrapTokens(params: {
|
|
110
|
+
now?: number;
|
|
111
|
+
}): number;
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AAM,CAAA;KAAE,GAAG,MAAM,CAAC;CAC9D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/queue/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function safeParseJson(value: string | null): unknown;
|
|
2
|
+
export declare function isSafeEnvVarName(value: string): boolean;
|
|
3
|
+
export declare function computeBackoffMs(params: {
|
|
4
|
+
attempt: number;
|
|
5
|
+
baseMs: number;
|
|
6
|
+
maxMs: number;
|
|
7
|
+
}): number;
|
|
8
|
+
export declare function sha256Hex(value: string): string;
|
|
9
|
+
export declare function isSqliteUniqueConstraintError(err: unknown): boolean;
|
|
10
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/queue/util.ts"],"names":[],"mappings":"AAGA,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAO3D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAMnG;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAGnE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { EnvVarNameSchema } from "@clawdlets/core/lib/identifiers";
|
|
3
|
+
export function safeParseJson(value) {
|
|
4
|
+
if (!value)
|
|
5
|
+
return null;
|
|
6
|
+
try {
|
|
7
|
+
return JSON.parse(value);
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export function isSafeEnvVarName(value) {
|
|
14
|
+
return EnvVarNameSchema.safeParse(value).success;
|
|
15
|
+
}
|
|
16
|
+
export function computeBackoffMs(params) {
|
|
17
|
+
const a = Math.max(1, Math.floor(params.attempt));
|
|
18
|
+
const base = Math.max(1, Math.floor(params.baseMs));
|
|
19
|
+
const max = Math.max(base, Math.floor(params.maxMs));
|
|
20
|
+
const factor = 2 ** (a - 1);
|
|
21
|
+
return Math.min(max, base * factor);
|
|
22
|
+
}
|
|
23
|
+
export function sha256Hex(value) {
|
|
24
|
+
return createHash("sha256").update(value).digest("hex");
|
|
25
|
+
}
|
|
26
|
+
export function isSqliteUniqueConstraintError(err) {
|
|
27
|
+
const code = String(err?.code || "");
|
|
28
|
+
return code === "SQLITE_CONSTRAINT_UNIQUE" || code === "SQLITE_CONSTRAINT_PRIMARYKEY";
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/queue/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,MAAM,UAAU,aAAa,CAAC,KAAoB;IAChD,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,OAAO,gBAAgB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAA0D;IACzF,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACpD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACrD,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,GAAY;IACxD,MAAM,IAAI,GAAG,MAAM,CAAE,GAAW,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IAC9C,OAAO,IAAI,KAAK,0BAA0B,IAAI,IAAI,KAAK,8BAA8B,CAAC;AACxF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../src/queue.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,uBAAuB,EACvB,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../src/queue.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|