alchemy 0.75.0 → 0.76.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/bin/alchemy.js +302 -287
- package/bin/commands/util.ts +8 -4
- package/bin/services/execute-alchemy.ts +4 -2
- package/bin/services/github-workflow.ts +2 -3
- package/bin/services/package-manager.ts +1 -5
- package/lib/alchemy.d.ts +1 -1
- package/lib/alchemy.d.ts.map +1 -1
- package/lib/alchemy.js +1 -1
- package/lib/alchemy.js.map +1 -1
- package/lib/apply.js +10 -0
- package/lib/apply.js.map +1 -1
- package/lib/aws/control/types.d.ts.map +1 -1
- package/lib/aws/control/types.js.map +1 -1
- package/lib/clickhouse/api/sdk.gen.d.ts.map +1 -1
- package/lib/clickhouse/api/sdk.gen.js.map +1 -1
- package/lib/cloudflare/account-api-token.d.ts.map +1 -1
- package/lib/cloudflare/account-api-token.js.map +1 -1
- package/lib/cloudflare/bound.d.ts.map +1 -1
- package/lib/cloudflare/bucket.d.ts +1 -1
- package/lib/cloudflare/bucket.d.ts.map +1 -1
- package/lib/cloudflare/bucket.js +1 -1
- package/lib/cloudflare/bucket.js.map +1 -1
- package/lib/cloudflare/cloudflare-env-proxy.d.ts.map +1 -1
- package/lib/cloudflare/cloudflare-env-proxy.js +3 -3
- package/lib/cloudflare/cloudflare-env-proxy.js.map +1 -1
- package/lib/cloudflare/compatibility-date.gen.d.ts +1 -1
- package/lib/cloudflare/compatibility-date.gen.js +1 -1
- package/lib/cloudflare/d1-database.d.ts.map +1 -1
- package/lib/cloudflare/d1-database.js +0 -4
- package/lib/cloudflare/d1-database.js.map +1 -1
- package/lib/cloudflare/dns-records.js.map +1 -1
- package/lib/cloudflare/hyperdrive.d.ts +0 -1
- package/lib/cloudflare/hyperdrive.d.ts.map +1 -1
- package/lib/cloudflare/hyperdrive.js.map +1 -1
- package/lib/cloudflare/miniflare/delete.d.ts.map +1 -1
- package/lib/cloudflare/miniflare/delete.js +3 -0
- package/lib/cloudflare/miniflare/delete.js.map +1 -1
- package/lib/cloudflare/miniflare/paths.d.ts +0 -1
- package/lib/cloudflare/miniflare/paths.d.ts.map +1 -1
- package/lib/cloudflare/miniflare/paths.js +4 -17
- package/lib/cloudflare/miniflare/paths.js.map +1 -1
- package/lib/cloudflare/nuxt/plugin.d.ts.map +1 -1
- package/lib/cloudflare/nuxt/plugin.js +2 -2
- package/lib/cloudflare/nuxt/plugin.js.map +1 -1
- package/lib/cloudflare/queue-consumer.d.ts.map +1 -1
- package/lib/cloudflare/queue-consumer.js +0 -2
- package/lib/cloudflare/queue-consumer.js.map +1 -1
- package/lib/cloudflare/react-router/plugin.d.ts.map +1 -1
- package/lib/cloudflare/react-router/plugin.js +0 -1
- package/lib/cloudflare/react-router/plugin.js.map +1 -1
- package/lib/cloudflare/vite/plugin.d.ts.map +1 -1
- package/lib/cloudflare/vite/plugin.js +3 -3
- package/lib/cloudflare/vite/plugin.js.map +1 -1
- package/lib/cloudflare/website.d.ts.map +1 -1
- package/lib/cloudflare/website.js +0 -4
- package/lib/cloudflare/website.js.map +1 -1
- package/lib/cloudflare/worker-assets.d.ts +1 -1
- package/lib/cloudflare/worker-assets.d.ts.map +1 -1
- package/lib/cloudflare/worker-assets.js +1 -1
- package/lib/cloudflare/worker-assets.js.map +1 -1
- package/lib/cloudflare/worker-metadata.d.ts.map +1 -1
- package/lib/cloudflare/worker-metadata.js.map +1 -1
- package/lib/cloudflare/worker-tail.d.ts.map +1 -1
- package/lib/cloudflare/worker-tail.js.map +1 -1
- package/lib/cloudflare/worker.d.ts.map +1 -1
- package/lib/cloudflare/worker.js +3 -1
- package/lib/cloudflare/worker.js.map +1 -1
- package/lib/cloudflare/wrangler.json.js +0 -1
- package/lib/cloudflare/wrangler.json.js.map +1 -1
- package/lib/cloudflare/zone.d.ts +1 -1
- package/lib/cloudflare/zone.d.ts.map +1 -1
- package/lib/cloudflare/zone.js +3 -28
- package/lib/cloudflare/zone.js.map +1 -1
- package/lib/coinbase/evm-account.d.ts.map +1 -1
- package/lib/coinbase/evm-account.js.map +1 -1
- package/lib/coinbase/evm-smart-account.d.ts.map +1 -1
- package/lib/coinbase/evm-smart-account.js.map +1 -1
- package/lib/docker/api.d.ts.map +1 -1
- package/lib/docker/api.js.map +1 -1
- package/lib/github/secret.d.ts.map +1 -1
- package/lib/github/secret.js.map +1 -1
- package/lib/neon/api/sdk.gen.d.ts.map +1 -1
- package/lib/neon/api/sdk.gen.js.map +1 -1
- package/lib/os/exec.d.ts.map +1 -1
- package/lib/os/exec.js.map +1 -1
- package/lib/planetscale/api/sdk.gen.d.ts.map +1 -1
- package/lib/planetscale/api/sdk.gen.js.map +1 -1
- package/lib/prisma-postgres/api/sdk.gen.d.ts.map +1 -1
- package/lib/prisma-postgres/api/sdk.gen.js.map +1 -1
- package/lib/scope.d.ts.map +1 -1
- package/lib/scope.js +2 -2
- package/lib/scope.js.map +1 -1
- package/lib/sentry/client-key.js +1 -1
- package/lib/sentry/client-key.js.map +1 -1
- package/lib/test/bun.d.ts.map +1 -1
- package/lib/test/bun.js.map +1 -1
- package/lib/test/vitest.d.ts.map +1 -1
- package/lib/test/vitest.js.map +1 -1
- package/lib/util/api/client/client.gen.d.ts +1 -1
- package/lib/util/api/client/client.gen.js +45 -45
- package/lib/util/api/client/types.gen.d.ts +22 -22
- package/lib/util/api/client/utils.gen.d.ts +3 -3
- package/lib/util/api/client/utils.gen.d.ts.map +1 -1
- package/lib/util/api/client/utils.gen.js +34 -34
- package/lib/util/api/client/utils.gen.js.map +1 -1
- package/lib/util/api/core/auth.gen.d.ts +3 -3
- package/lib/util/api/core/auth.gen.js +3 -3
- package/lib/util/api/core/bodySerializer.gen.d.ts +1 -1
- package/lib/util/api/core/bodySerializer.gen.js +3 -3
- package/lib/util/api/core/params.gen.d.ts +3 -3
- package/lib/util/api/core/params.gen.js +7 -7
- package/lib/util/api/core/pathSerializer.gen.d.ts +3 -3
- package/lib/util/api/core/pathSerializer.gen.js +36 -36
- package/lib/util/api/core/serverSentEvents.gen.d.ts +3 -3
- package/lib/util/api/core/serverSentEvents.gen.js +18 -18
- package/lib/util/api/core/types.gen.d.ts +4 -4
- package/lib/util/api/core/utils.gen.d.ts +1 -1
- package/lib/util/api/core/utils.gen.js +17 -17
- package/lib/util/camel-to-snake.d.ts.map +1 -1
- package/lib/util/find-workspace-root.d.ts +3 -0
- package/lib/util/find-workspace-root.d.ts.map +1 -0
- package/lib/util/find-workspace-root.js +94 -0
- package/lib/util/find-workspace-root.js.map +1 -0
- package/lib/util/idempotent-spawn.d.ts.map +1 -1
- package/lib/util/idempotent-spawn.js +1 -1
- package/lib/util/idempotent-spawn.js.map +1 -1
- package/lib/util/peer.d.ts.map +1 -1
- package/lib/util/peer.js.map +1 -1
- package/package.json +1 -1
- package/src/alchemy.ts +4 -3
- package/src/apply.ts +16 -1
- package/src/aws/control/types.ts +87107 -85281
- package/src/clickhouse/api/sdk.gen.ts +1 -3
- package/src/cloudflare/account-api-token.ts +3 -1
- package/src/cloudflare/bound.ts +64 -65
- package/src/cloudflare/bucket.ts +4 -7
- package/src/cloudflare/cloudflare-env-proxy.ts +2 -4
- package/src/cloudflare/compatibility-date.gen.ts +1 -1
- package/src/cloudflare/d1-database.ts +0 -9
- package/src/cloudflare/dns-records.ts +3 -1
- package/src/cloudflare/hyperdrive.ts +0 -1
- package/src/cloudflare/miniflare/delete.ts +3 -0
- package/src/cloudflare/miniflare/paths.ts +4 -25
- package/src/cloudflare/nuxt/plugin.ts +1 -4
- package/src/cloudflare/queue-consumer.ts +0 -2
- package/src/cloudflare/react-router/plugin.ts +0 -1
- package/src/cloudflare/vite/plugin.ts +1 -3
- package/src/cloudflare/website.ts +0 -5
- package/src/cloudflare/worker-assets.ts +1 -6
- package/src/cloudflare/worker-metadata.ts +5 -3
- package/src/cloudflare/worker-tail.ts +3 -1
- package/src/cloudflare/worker.ts +3 -1
- package/src/cloudflare/wrangler.json.ts +0 -1
- package/src/cloudflare/zone.ts +6 -38
- package/src/coinbase/evm-account.ts +3 -1
- package/src/coinbase/evm-smart-account.ts +3 -1
- package/src/docker/api.ts +3 -1
- package/src/github/secret.ts +5 -1
- package/src/neon/api/sdk.gen.ts +1 -3
- package/src/os/exec.ts +3 -1
- package/src/planetscale/api/sdk.gen.ts +1 -3
- package/src/prisma-postgres/api/sdk.gen.ts +1 -3
- package/src/scope.ts +2 -2
- package/src/sentry/client-key.ts +1 -5
- package/src/test/bun.ts +3 -1
- package/src/test/vitest.ts +3 -1
- package/src/util/api/client/client.gen.ts +49 -49
- package/src/util/api/client/types.gen.ts +43 -43
- package/src/util/api/client/utils.gen.ts +47 -42
- package/src/util/api/core/auth.gen.ts +6 -6
- package/src/util/api/core/bodySerializer.gen.ts +4 -4
- package/src/util/api/core/params.gen.ts +10 -10
- package/src/util/api/core/pathSerializer.gen.ts +39 -39
- package/src/util/api/core/serverSentEvents.gen.ts +22 -22
- package/src/util/api/core/types.gen.ts +12 -12
- package/src/util/api/core/utils.gen.ts +18 -18
- package/src/util/camel-to-snake.ts +12 -10
- package/src/util/find-workspace-root.ts +112 -0
- package/src/util/idempotent-spawn.ts +1 -5
- package/src/util/peer.ts +3 -1
- package/templates/astro/astro.config.mjs +3 -3
- package/templates/astro/src/pages/api/hello.ts +16 -13
- package/templates/bun-spa/bun-env.d.ts +0 -1
- package/templates/bun-spa/eslint.config.js +11 -12
- package/templates/bun-spa/src/App.tsx +0 -1
- package/templates/bun-spa/src/frontend.tsx +0 -1
- package/templates/hono/src/index.ts +13 -13
- package/templates/nextjs/alchemy.run.ts +1 -1
- package/templates/nextjs/eslint.config.mjs +1 -1
- package/templates/nextjs/next-env.d.ts +1 -1
- package/templates/nextjs/next.config.ts +1 -1
- package/templates/nextjs/open-next.config.ts +1 -1
- package/templates/nextjs/src/app/api/hello/route.ts +2 -2
- package/templates/nextjs/src/app/layout.tsx +1 -1
- package/templates/nextjs/src/app/page.tsx +14 -15
- package/templates/nextjs/types/env.d.ts +4 -4
- package/templates/nuxt/server/middleware/auth.ts +1 -1
- package/templates/nuxt/server/middleware/hello.ts +2 -2
- package/templates/react-router/app/entry.server.tsx +2 -2
- package/templates/react-router/vite.config.ts +1 -1
- package/templates/react-router/workers/app.ts +2 -2
- package/templates/rwsdk/alchemy.run.ts +6 -3
- package/templates/sveltekit/src/app.d.ts +7 -7
- package/templates/sveltekit/svelte.config.js +4 -4
- package/templates/sveltekit/vite.config.ts +3 -3
- package/templates/tanstack-start/src/components/Header.tsx +2 -2
- package/templates/tanstack-start/src/router.tsx +4 -4
- package/templates/tanstack-start/src/routes/__root.tsx +10 -10
- package/templates/tanstack-start/src/routes/api.demo-names.ts +6 -6
- package/templates/tanstack-start/src/routes/demo.start.api-request.tsx +11 -11
- package/templates/tanstack-start/src/routes/demo.start.server-funcs.tsx +30 -30
- package/templates/tanstack-start/src/routes/index.tsx +5 -5
- package/templates/tanstack-start/vite.config.ts +9 -9
- package/templates/typescript/src/worker.ts +5 -1
- package/templates/vite/eslint.config.js +12 -12
- package/templates/vite/src/App.tsx +7 -7
- package/templates/vite/src/main.tsx +6 -6
- package/templates/vite/src/worker.ts +11 -12
- package/templates/vite/vite.config.ts +2 -2
- package/workers/tunnel-proxy.js +1 -1
- package/bin/services/find-workspace-root.ts +0 -48
- package/lib/cloudflare/miniflare/symlink-miniflare-state.d.ts +0 -2
- package/lib/cloudflare/miniflare/symlink-miniflare-state.d.ts.map +0 -1
- package/lib/cloudflare/miniflare/symlink-miniflare-state.js +0 -18
- package/lib/cloudflare/miniflare/symlink-miniflare-state.js.map +0 -1
- package/src/cloudflare/miniflare/symlink-miniflare-state.ts +0 -18
package/bin/alchemy.js
CHANGED
|
@@ -16169,14 +16169,14 @@ var require_types$1 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod@3
|
|
|
16169
16169
|
});
|
|
16170
16170
|
return handleResult$1(ctx, await ((0, parseUtil_js_1.isAsync)(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)));
|
|
16171
16171
|
}
|
|
16172
|
-
refine(check$
|
|
16172
|
+
refine(check$3, message) {
|
|
16173
16173
|
const getIssueProperties = (val) => {
|
|
16174
16174
|
if (typeof message === "string" || typeof message === "undefined") return { message };
|
|
16175
16175
|
else if (typeof message === "function") return message(val);
|
|
16176
16176
|
else return message;
|
|
16177
16177
|
};
|
|
16178
16178
|
return this._refinement((val, ctx) => {
|
|
16179
|
-
const result = check$
|
|
16179
|
+
const result = check$3(val);
|
|
16180
16180
|
const setError = () => ctx.addIssue({
|
|
16181
16181
|
code: ZodError_js_1.ZodIssueCode.custom,
|
|
16182
16182
|
...getIssueProperties(val)
|
|
@@ -16193,9 +16193,9 @@ var require_types$1 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod@3
|
|
|
16193
16193
|
} else return true;
|
|
16194
16194
|
});
|
|
16195
16195
|
}
|
|
16196
|
-
refinement(check$
|
|
16196
|
+
refinement(check$3, refinementData) {
|
|
16197
16197
|
return this._refinement((val, ctx) => {
|
|
16198
|
-
if (!check$
|
|
16198
|
+
if (!check$3(val)) {
|
|
16199
16199
|
ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData);
|
|
16200
16200
|
return false;
|
|
16201
16201
|
} else return true;
|
|
@@ -16404,275 +16404,275 @@ var require_types$1 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod@3
|
|
|
16404
16404
|
}
|
|
16405
16405
|
const status = new parseUtil_js_1.ParseStatus();
|
|
16406
16406
|
let ctx = void 0;
|
|
16407
|
-
for (const check$
|
|
16408
|
-
if (input.data.length < check$
|
|
16407
|
+
for (const check$3 of this._def.checks) if (check$3.kind === "min") {
|
|
16408
|
+
if (input.data.length < check$3.value) {
|
|
16409
16409
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16410
16410
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16411
16411
|
code: ZodError_js_1.ZodIssueCode.too_small,
|
|
16412
|
-
minimum: check$
|
|
16412
|
+
minimum: check$3.value,
|
|
16413
16413
|
type: "string",
|
|
16414
16414
|
inclusive: true,
|
|
16415
16415
|
exact: false,
|
|
16416
|
-
message: check$
|
|
16416
|
+
message: check$3.message
|
|
16417
16417
|
});
|
|
16418
16418
|
status.dirty();
|
|
16419
16419
|
}
|
|
16420
|
-
} else if (check$
|
|
16421
|
-
if (input.data.length > check$
|
|
16420
|
+
} else if (check$3.kind === "max") {
|
|
16421
|
+
if (input.data.length > check$3.value) {
|
|
16422
16422
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16423
16423
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16424
16424
|
code: ZodError_js_1.ZodIssueCode.too_big,
|
|
16425
|
-
maximum: check$
|
|
16425
|
+
maximum: check$3.value,
|
|
16426
16426
|
type: "string",
|
|
16427
16427
|
inclusive: true,
|
|
16428
16428
|
exact: false,
|
|
16429
|
-
message: check$
|
|
16429
|
+
message: check$3.message
|
|
16430
16430
|
});
|
|
16431
16431
|
status.dirty();
|
|
16432
16432
|
}
|
|
16433
|
-
} else if (check$
|
|
16434
|
-
const tooBig = input.data.length > check$
|
|
16435
|
-
const tooSmall = input.data.length < check$
|
|
16433
|
+
} else if (check$3.kind === "length") {
|
|
16434
|
+
const tooBig = input.data.length > check$3.value;
|
|
16435
|
+
const tooSmall = input.data.length < check$3.value;
|
|
16436
16436
|
if (tooBig || tooSmall) {
|
|
16437
16437
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16438
16438
|
if (tooBig) (0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16439
16439
|
code: ZodError_js_1.ZodIssueCode.too_big,
|
|
16440
|
-
maximum: check$
|
|
16440
|
+
maximum: check$3.value,
|
|
16441
16441
|
type: "string",
|
|
16442
16442
|
inclusive: true,
|
|
16443
16443
|
exact: true,
|
|
16444
|
-
message: check$
|
|
16444
|
+
message: check$3.message
|
|
16445
16445
|
});
|
|
16446
16446
|
else if (tooSmall) (0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16447
16447
|
code: ZodError_js_1.ZodIssueCode.too_small,
|
|
16448
|
-
minimum: check$
|
|
16448
|
+
minimum: check$3.value,
|
|
16449
16449
|
type: "string",
|
|
16450
16450
|
inclusive: true,
|
|
16451
16451
|
exact: true,
|
|
16452
|
-
message: check$
|
|
16452
|
+
message: check$3.message
|
|
16453
16453
|
});
|
|
16454
16454
|
status.dirty();
|
|
16455
16455
|
}
|
|
16456
|
-
} else if (check$
|
|
16456
|
+
} else if (check$3.kind === "email") {
|
|
16457
16457
|
if (!emailRegex.test(input.data)) {
|
|
16458
16458
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16459
16459
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16460
16460
|
validation: "email",
|
|
16461
16461
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16462
|
-
message: check$
|
|
16462
|
+
message: check$3.message
|
|
16463
16463
|
});
|
|
16464
16464
|
status.dirty();
|
|
16465
16465
|
}
|
|
16466
|
-
} else if (check$
|
|
16466
|
+
} else if (check$3.kind === "emoji") {
|
|
16467
16467
|
if (!emojiRegex$1) emojiRegex$1 = new RegExp(_emojiRegex, "u");
|
|
16468
16468
|
if (!emojiRegex$1.test(input.data)) {
|
|
16469
16469
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16470
16470
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16471
16471
|
validation: "emoji",
|
|
16472
16472
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16473
|
-
message: check$
|
|
16473
|
+
message: check$3.message
|
|
16474
16474
|
});
|
|
16475
16475
|
status.dirty();
|
|
16476
16476
|
}
|
|
16477
|
-
} else if (check$
|
|
16477
|
+
} else if (check$3.kind === "uuid") {
|
|
16478
16478
|
if (!uuidRegex.test(input.data)) {
|
|
16479
16479
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16480
16480
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16481
16481
|
validation: "uuid",
|
|
16482
16482
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16483
|
-
message: check$
|
|
16483
|
+
message: check$3.message
|
|
16484
16484
|
});
|
|
16485
16485
|
status.dirty();
|
|
16486
16486
|
}
|
|
16487
|
-
} else if (check$
|
|
16487
|
+
} else if (check$3.kind === "nanoid") {
|
|
16488
16488
|
if (!nanoidRegex.test(input.data)) {
|
|
16489
16489
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16490
16490
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16491
16491
|
validation: "nanoid",
|
|
16492
16492
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16493
|
-
message: check$
|
|
16493
|
+
message: check$3.message
|
|
16494
16494
|
});
|
|
16495
16495
|
status.dirty();
|
|
16496
16496
|
}
|
|
16497
|
-
} else if (check$
|
|
16497
|
+
} else if (check$3.kind === "cuid") {
|
|
16498
16498
|
if (!cuidRegex.test(input.data)) {
|
|
16499
16499
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16500
16500
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16501
16501
|
validation: "cuid",
|
|
16502
16502
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16503
|
-
message: check$
|
|
16503
|
+
message: check$3.message
|
|
16504
16504
|
});
|
|
16505
16505
|
status.dirty();
|
|
16506
16506
|
}
|
|
16507
|
-
} else if (check$
|
|
16507
|
+
} else if (check$3.kind === "cuid2") {
|
|
16508
16508
|
if (!cuid2Regex.test(input.data)) {
|
|
16509
16509
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16510
16510
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16511
16511
|
validation: "cuid2",
|
|
16512
16512
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16513
|
-
message: check$
|
|
16513
|
+
message: check$3.message
|
|
16514
16514
|
});
|
|
16515
16515
|
status.dirty();
|
|
16516
16516
|
}
|
|
16517
|
-
} else if (check$
|
|
16517
|
+
} else if (check$3.kind === "ulid") {
|
|
16518
16518
|
if (!ulidRegex.test(input.data)) {
|
|
16519
16519
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16520
16520
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16521
16521
|
validation: "ulid",
|
|
16522
16522
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16523
|
-
message: check$
|
|
16523
|
+
message: check$3.message
|
|
16524
16524
|
});
|
|
16525
16525
|
status.dirty();
|
|
16526
16526
|
}
|
|
16527
|
-
} else if (check$
|
|
16527
|
+
} else if (check$3.kind === "url") try {
|
|
16528
16528
|
new URL(input.data);
|
|
16529
16529
|
} catch {
|
|
16530
16530
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16531
16531
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16532
16532
|
validation: "url",
|
|
16533
16533
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16534
|
-
message: check$
|
|
16534
|
+
message: check$3.message
|
|
16535
16535
|
});
|
|
16536
16536
|
status.dirty();
|
|
16537
16537
|
}
|
|
16538
|
-
else if (check$
|
|
16539
|
-
check$
|
|
16540
|
-
if (!check$
|
|
16538
|
+
else if (check$3.kind === "regex") {
|
|
16539
|
+
check$3.regex.lastIndex = 0;
|
|
16540
|
+
if (!check$3.regex.test(input.data)) {
|
|
16541
16541
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16542
16542
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16543
16543
|
validation: "regex",
|
|
16544
16544
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16545
|
-
message: check$
|
|
16545
|
+
message: check$3.message
|
|
16546
16546
|
});
|
|
16547
16547
|
status.dirty();
|
|
16548
16548
|
}
|
|
16549
|
-
} else if (check$
|
|
16550
|
-
else if (check$
|
|
16551
|
-
if (!input.data.includes(check$
|
|
16549
|
+
} else if (check$3.kind === "trim") input.data = input.data.trim();
|
|
16550
|
+
else if (check$3.kind === "includes") {
|
|
16551
|
+
if (!input.data.includes(check$3.value, check$3.position)) {
|
|
16552
16552
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16553
16553
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16554
16554
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16555
16555
|
validation: {
|
|
16556
|
-
includes: check$
|
|
16557
|
-
position: check$
|
|
16556
|
+
includes: check$3.value,
|
|
16557
|
+
position: check$3.position
|
|
16558
16558
|
},
|
|
16559
|
-
message: check$
|
|
16559
|
+
message: check$3.message
|
|
16560
16560
|
});
|
|
16561
16561
|
status.dirty();
|
|
16562
16562
|
}
|
|
16563
|
-
} else if (check$
|
|
16564
|
-
else if (check$
|
|
16565
|
-
else if (check$
|
|
16566
|
-
if (!input.data.startsWith(check$
|
|
16563
|
+
} else if (check$3.kind === "toLowerCase") input.data = input.data.toLowerCase();
|
|
16564
|
+
else if (check$3.kind === "toUpperCase") input.data = input.data.toUpperCase();
|
|
16565
|
+
else if (check$3.kind === "startsWith") {
|
|
16566
|
+
if (!input.data.startsWith(check$3.value)) {
|
|
16567
16567
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16568
16568
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16569
16569
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16570
|
-
validation: { startsWith: check$
|
|
16571
|
-
message: check$
|
|
16570
|
+
validation: { startsWith: check$3.value },
|
|
16571
|
+
message: check$3.message
|
|
16572
16572
|
});
|
|
16573
16573
|
status.dirty();
|
|
16574
16574
|
}
|
|
16575
|
-
} else if (check$
|
|
16576
|
-
if (!input.data.endsWith(check$
|
|
16575
|
+
} else if (check$3.kind === "endsWith") {
|
|
16576
|
+
if (!input.data.endsWith(check$3.value)) {
|
|
16577
16577
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16578
16578
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16579
16579
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16580
|
-
validation: { endsWith: check$
|
|
16581
|
-
message: check$
|
|
16580
|
+
validation: { endsWith: check$3.value },
|
|
16581
|
+
message: check$3.message
|
|
16582
16582
|
});
|
|
16583
16583
|
status.dirty();
|
|
16584
16584
|
}
|
|
16585
|
-
} else if (check$
|
|
16586
|
-
if (!datetimeRegex(check$
|
|
16585
|
+
} else if (check$3.kind === "datetime") {
|
|
16586
|
+
if (!datetimeRegex(check$3).test(input.data)) {
|
|
16587
16587
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16588
16588
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16589
16589
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16590
16590
|
validation: "datetime",
|
|
16591
|
-
message: check$
|
|
16591
|
+
message: check$3.message
|
|
16592
16592
|
});
|
|
16593
16593
|
status.dirty();
|
|
16594
16594
|
}
|
|
16595
|
-
} else if (check$
|
|
16595
|
+
} else if (check$3.kind === "date") {
|
|
16596
16596
|
if (!dateRegex.test(input.data)) {
|
|
16597
16597
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16598
16598
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16599
16599
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16600
16600
|
validation: "date",
|
|
16601
|
-
message: check$
|
|
16601
|
+
message: check$3.message
|
|
16602
16602
|
});
|
|
16603
16603
|
status.dirty();
|
|
16604
16604
|
}
|
|
16605
|
-
} else if (check$
|
|
16606
|
-
if (!timeRegex(check$
|
|
16605
|
+
} else if (check$3.kind === "time") {
|
|
16606
|
+
if (!timeRegex(check$3).test(input.data)) {
|
|
16607
16607
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16608
16608
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16609
16609
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16610
16610
|
validation: "time",
|
|
16611
|
-
message: check$
|
|
16611
|
+
message: check$3.message
|
|
16612
16612
|
});
|
|
16613
16613
|
status.dirty();
|
|
16614
16614
|
}
|
|
16615
|
-
} else if (check$
|
|
16615
|
+
} else if (check$3.kind === "duration") {
|
|
16616
16616
|
if (!durationRegex.test(input.data)) {
|
|
16617
16617
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16618
16618
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16619
16619
|
validation: "duration",
|
|
16620
16620
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16621
|
-
message: check$
|
|
16621
|
+
message: check$3.message
|
|
16622
16622
|
});
|
|
16623
16623
|
status.dirty();
|
|
16624
16624
|
}
|
|
16625
|
-
} else if (check$
|
|
16626
|
-
if (!isValidIP(input.data, check$
|
|
16625
|
+
} else if (check$3.kind === "ip") {
|
|
16626
|
+
if (!isValidIP(input.data, check$3.version)) {
|
|
16627
16627
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16628
16628
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16629
16629
|
validation: "ip",
|
|
16630
16630
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16631
|
-
message: check$
|
|
16631
|
+
message: check$3.message
|
|
16632
16632
|
});
|
|
16633
16633
|
status.dirty();
|
|
16634
16634
|
}
|
|
16635
|
-
} else if (check$
|
|
16636
|
-
if (!isValidJWT$1(input.data, check$
|
|
16635
|
+
} else if (check$3.kind === "jwt") {
|
|
16636
|
+
if (!isValidJWT$1(input.data, check$3.alg)) {
|
|
16637
16637
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16638
16638
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16639
16639
|
validation: "jwt",
|
|
16640
16640
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16641
|
-
message: check$
|
|
16641
|
+
message: check$3.message
|
|
16642
16642
|
});
|
|
16643
16643
|
status.dirty();
|
|
16644
16644
|
}
|
|
16645
|
-
} else if (check$
|
|
16646
|
-
if (!isValidCidr(input.data, check$
|
|
16645
|
+
} else if (check$3.kind === "cidr") {
|
|
16646
|
+
if (!isValidCidr(input.data, check$3.version)) {
|
|
16647
16647
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16648
16648
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16649
16649
|
validation: "cidr",
|
|
16650
16650
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16651
|
-
message: check$
|
|
16651
|
+
message: check$3.message
|
|
16652
16652
|
});
|
|
16653
16653
|
status.dirty();
|
|
16654
16654
|
}
|
|
16655
|
-
} else if (check$
|
|
16655
|
+
} else if (check$3.kind === "base64") {
|
|
16656
16656
|
if (!base64Regex.test(input.data)) {
|
|
16657
16657
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16658
16658
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16659
16659
|
validation: "base64",
|
|
16660
16660
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16661
|
-
message: check$
|
|
16661
|
+
message: check$3.message
|
|
16662
16662
|
});
|
|
16663
16663
|
status.dirty();
|
|
16664
16664
|
}
|
|
16665
|
-
} else if (check$
|
|
16665
|
+
} else if (check$3.kind === "base64url") {
|
|
16666
16666
|
if (!base64urlRegex.test(input.data)) {
|
|
16667
16667
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16668
16668
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16669
16669
|
validation: "base64url",
|
|
16670
16670
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
16671
|
-
message: check$
|
|
16671
|
+
message: check$3.message
|
|
16672
16672
|
});
|
|
16673
16673
|
status.dirty();
|
|
16674
16674
|
}
|
|
16675
|
-
} else util_js_1.util.assertNever(check$
|
|
16675
|
+
} else util_js_1.util.assertNever(check$3);
|
|
16676
16676
|
return {
|
|
16677
16677
|
status: status.value,
|
|
16678
16678
|
value: input.data
|
|
@@ -16685,10 +16685,10 @@ var require_types$1 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod@3
|
|
|
16685
16685
|
...errorUtil_js_1.errorUtil.errToObj(message)
|
|
16686
16686
|
});
|
|
16687
16687
|
}
|
|
16688
|
-
_addCheck(check$
|
|
16688
|
+
_addCheck(check$3) {
|
|
16689
16689
|
return new ZodString$1({
|
|
16690
16690
|
...this._def,
|
|
16691
|
-
checks: [...this._def.checks, check$
|
|
16691
|
+
checks: [...this._def.checks, check$3]
|
|
16692
16692
|
});
|
|
16693
16693
|
}
|
|
16694
16694
|
email(message) {
|
|
@@ -16981,63 +16981,63 @@ var require_types$1 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod@3
|
|
|
16981
16981
|
}
|
|
16982
16982
|
let ctx = void 0;
|
|
16983
16983
|
const status = new parseUtil_js_1.ParseStatus();
|
|
16984
|
-
for (const check$
|
|
16984
|
+
for (const check$3 of this._def.checks) if (check$3.kind === "int") {
|
|
16985
16985
|
if (!util_js_1.util.isInteger(input.data)) {
|
|
16986
16986
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16987
16987
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16988
16988
|
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
16989
16989
|
expected: "integer",
|
|
16990
16990
|
received: "float",
|
|
16991
|
-
message: check$
|
|
16991
|
+
message: check$3.message
|
|
16992
16992
|
});
|
|
16993
16993
|
status.dirty();
|
|
16994
16994
|
}
|
|
16995
|
-
} else if (check$
|
|
16996
|
-
if (check$
|
|
16995
|
+
} else if (check$3.kind === "min") {
|
|
16996
|
+
if (check$3.inclusive ? input.data < check$3.value : input.data <= check$3.value) {
|
|
16997
16997
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
16998
16998
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
16999
16999
|
code: ZodError_js_1.ZodIssueCode.too_small,
|
|
17000
|
-
minimum: check$
|
|
17000
|
+
minimum: check$3.value,
|
|
17001
17001
|
type: "number",
|
|
17002
|
-
inclusive: check$
|
|
17002
|
+
inclusive: check$3.inclusive,
|
|
17003
17003
|
exact: false,
|
|
17004
|
-
message: check$
|
|
17004
|
+
message: check$3.message
|
|
17005
17005
|
});
|
|
17006
17006
|
status.dirty();
|
|
17007
17007
|
}
|
|
17008
|
-
} else if (check$
|
|
17009
|
-
if (check$
|
|
17008
|
+
} else if (check$3.kind === "max") {
|
|
17009
|
+
if (check$3.inclusive ? input.data > check$3.value : input.data >= check$3.value) {
|
|
17010
17010
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
17011
17011
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
17012
17012
|
code: ZodError_js_1.ZodIssueCode.too_big,
|
|
17013
|
-
maximum: check$
|
|
17013
|
+
maximum: check$3.value,
|
|
17014
17014
|
type: "number",
|
|
17015
|
-
inclusive: check$
|
|
17015
|
+
inclusive: check$3.inclusive,
|
|
17016
17016
|
exact: false,
|
|
17017
|
-
message: check$
|
|
17017
|
+
message: check$3.message
|
|
17018
17018
|
});
|
|
17019
17019
|
status.dirty();
|
|
17020
17020
|
}
|
|
17021
|
-
} else if (check$
|
|
17022
|
-
if (floatSafeRemainder$1(input.data, check$
|
|
17021
|
+
} else if (check$3.kind === "multipleOf") {
|
|
17022
|
+
if (floatSafeRemainder$1(input.data, check$3.value) !== 0) {
|
|
17023
17023
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
17024
17024
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
17025
17025
|
code: ZodError_js_1.ZodIssueCode.not_multiple_of,
|
|
17026
|
-
multipleOf: check$
|
|
17027
|
-
message: check$
|
|
17026
|
+
multipleOf: check$3.value,
|
|
17027
|
+
message: check$3.message
|
|
17028
17028
|
});
|
|
17029
17029
|
status.dirty();
|
|
17030
17030
|
}
|
|
17031
|
-
} else if (check$
|
|
17031
|
+
} else if (check$3.kind === "finite") {
|
|
17032
17032
|
if (!Number.isFinite(input.data)) {
|
|
17033
17033
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
17034
17034
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
17035
17035
|
code: ZodError_js_1.ZodIssueCode.not_finite,
|
|
17036
|
-
message: check$
|
|
17036
|
+
message: check$3.message
|
|
17037
17037
|
});
|
|
17038
17038
|
status.dirty();
|
|
17039
17039
|
}
|
|
17040
|
-
} else util_js_1.util.assertNever(check$
|
|
17040
|
+
} else util_js_1.util.assertNever(check$3);
|
|
17041
17041
|
return {
|
|
17042
17042
|
status: status.value,
|
|
17043
17043
|
value: input.data
|
|
@@ -17066,10 +17066,10 @@ var require_types$1 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod@3
|
|
|
17066
17066
|
}]
|
|
17067
17067
|
});
|
|
17068
17068
|
}
|
|
17069
|
-
_addCheck(check$
|
|
17069
|
+
_addCheck(check$3) {
|
|
17070
17070
|
return new ZodNumber$1({
|
|
17071
17071
|
...this._def,
|
|
17072
|
-
checks: [...this._def.checks, check$
|
|
17072
|
+
checks: [...this._def.checks, check$3]
|
|
17073
17073
|
});
|
|
17074
17074
|
}
|
|
17075
17075
|
int(message) {
|
|
@@ -17189,41 +17189,41 @@ var require_types$1 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod@3
|
|
|
17189
17189
|
if (this._getType(input) !== util_js_1.ZodParsedType.bigint) return this._getInvalidInput(input);
|
|
17190
17190
|
let ctx = void 0;
|
|
17191
17191
|
const status = new parseUtil_js_1.ParseStatus();
|
|
17192
|
-
for (const check$
|
|
17193
|
-
if (check$
|
|
17192
|
+
for (const check$3 of this._def.checks) if (check$3.kind === "min") {
|
|
17193
|
+
if (check$3.inclusive ? input.data < check$3.value : input.data <= check$3.value) {
|
|
17194
17194
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
17195
17195
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
17196
17196
|
code: ZodError_js_1.ZodIssueCode.too_small,
|
|
17197
17197
|
type: "bigint",
|
|
17198
|
-
minimum: check$
|
|
17199
|
-
inclusive: check$
|
|
17200
|
-
message: check$
|
|
17198
|
+
minimum: check$3.value,
|
|
17199
|
+
inclusive: check$3.inclusive,
|
|
17200
|
+
message: check$3.message
|
|
17201
17201
|
});
|
|
17202
17202
|
status.dirty();
|
|
17203
17203
|
}
|
|
17204
|
-
} else if (check$
|
|
17205
|
-
if (check$
|
|
17204
|
+
} else if (check$3.kind === "max") {
|
|
17205
|
+
if (check$3.inclusive ? input.data > check$3.value : input.data >= check$3.value) {
|
|
17206
17206
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
17207
17207
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
17208
17208
|
code: ZodError_js_1.ZodIssueCode.too_big,
|
|
17209
17209
|
type: "bigint",
|
|
17210
|
-
maximum: check$
|
|
17211
|
-
inclusive: check$
|
|
17212
|
-
message: check$
|
|
17210
|
+
maximum: check$3.value,
|
|
17211
|
+
inclusive: check$3.inclusive,
|
|
17212
|
+
message: check$3.message
|
|
17213
17213
|
});
|
|
17214
17214
|
status.dirty();
|
|
17215
17215
|
}
|
|
17216
|
-
} else if (check$
|
|
17217
|
-
if (input.data % check$
|
|
17216
|
+
} else if (check$3.kind === "multipleOf") {
|
|
17217
|
+
if (input.data % check$3.value !== BigInt(0)) {
|
|
17218
17218
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
17219
17219
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
17220
17220
|
code: ZodError_js_1.ZodIssueCode.not_multiple_of,
|
|
17221
|
-
multipleOf: check$
|
|
17222
|
-
message: check$
|
|
17221
|
+
multipleOf: check$3.value,
|
|
17222
|
+
message: check$3.message
|
|
17223
17223
|
});
|
|
17224
17224
|
status.dirty();
|
|
17225
17225
|
}
|
|
17226
|
-
} else util_js_1.util.assertNever(check$
|
|
17226
|
+
} else util_js_1.util.assertNever(check$3);
|
|
17227
17227
|
return {
|
|
17228
17228
|
status: status.value,
|
|
17229
17229
|
value: input.data
|
|
@@ -17261,10 +17261,10 @@ var require_types$1 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod@3
|
|
|
17261
17261
|
}]
|
|
17262
17262
|
});
|
|
17263
17263
|
}
|
|
17264
|
-
_addCheck(check$
|
|
17264
|
+
_addCheck(check$3) {
|
|
17265
17265
|
return new ZodBigInt$1({
|
|
17266
17266
|
...this._def,
|
|
17267
|
-
checks: [...this._def.checks, check$
|
|
17267
|
+
checks: [...this._def.checks, check$3]
|
|
17268
17268
|
});
|
|
17269
17269
|
}
|
|
17270
17270
|
positive(message) {
|
|
@@ -17372,42 +17372,42 @@ var require_types$1 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod@3
|
|
|
17372
17372
|
}
|
|
17373
17373
|
const status = new parseUtil_js_1.ParseStatus();
|
|
17374
17374
|
let ctx = void 0;
|
|
17375
|
-
for (const check$
|
|
17376
|
-
if (input.data.getTime() < check$
|
|
17375
|
+
for (const check$3 of this._def.checks) if (check$3.kind === "min") {
|
|
17376
|
+
if (input.data.getTime() < check$3.value) {
|
|
17377
17377
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
17378
17378
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
17379
17379
|
code: ZodError_js_1.ZodIssueCode.too_small,
|
|
17380
|
-
message: check$
|
|
17380
|
+
message: check$3.message,
|
|
17381
17381
|
inclusive: true,
|
|
17382
17382
|
exact: false,
|
|
17383
|
-
minimum: check$
|
|
17383
|
+
minimum: check$3.value,
|
|
17384
17384
|
type: "date"
|
|
17385
17385
|
});
|
|
17386
17386
|
status.dirty();
|
|
17387
17387
|
}
|
|
17388
|
-
} else if (check$
|
|
17389
|
-
if (input.data.getTime() > check$
|
|
17388
|
+
} else if (check$3.kind === "max") {
|
|
17389
|
+
if (input.data.getTime() > check$3.value) {
|
|
17390
17390
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
17391
17391
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
17392
17392
|
code: ZodError_js_1.ZodIssueCode.too_big,
|
|
17393
|
-
message: check$
|
|
17393
|
+
message: check$3.message,
|
|
17394
17394
|
inclusive: true,
|
|
17395
17395
|
exact: false,
|
|
17396
|
-
maximum: check$
|
|
17396
|
+
maximum: check$3.value,
|
|
17397
17397
|
type: "date"
|
|
17398
17398
|
});
|
|
17399
17399
|
status.dirty();
|
|
17400
17400
|
}
|
|
17401
|
-
} else util_js_1.util.assertNever(check$
|
|
17401
|
+
} else util_js_1.util.assertNever(check$3);
|
|
17402
17402
|
return {
|
|
17403
17403
|
status: status.value,
|
|
17404
17404
|
value: new Date(input.data.getTime())
|
|
17405
17405
|
};
|
|
17406
17406
|
}
|
|
17407
|
-
_addCheck(check$
|
|
17407
|
+
_addCheck(check$3) {
|
|
17408
17408
|
return new ZodDate$1({
|
|
17409
17409
|
...this._def,
|
|
17410
|
-
checks: [...this._def.checks, check$
|
|
17410
|
+
checks: [...this._def.checks, check$3]
|
|
17411
17411
|
});
|
|
17412
17412
|
}
|
|
17413
17413
|
min(minDate, message) {
|
|
@@ -19119,9 +19119,9 @@ var require_types$1 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod@3
|
|
|
19119
19119
|
const p$1 = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
|
|
19120
19120
|
return typeof p$1 === "string" ? { message: p$1 } : p$1;
|
|
19121
19121
|
}
|
|
19122
|
-
function custom$2(check$
|
|
19123
|
-
if (check$
|
|
19124
|
-
const r$1 = check$
|
|
19122
|
+
function custom$2(check$3, _params = {}, fatal) {
|
|
19123
|
+
if (check$3) return ZodAny$1.create().superRefine((data, ctx) => {
|
|
19124
|
+
const r$1 = check$3(data);
|
|
19125
19125
|
if (r$1 instanceof Promise) return r$1.then((r$2) => {
|
|
19126
19126
|
if (!r$2) {
|
|
19127
19127
|
const params = cleanParams(_params, data);
|
|
@@ -19414,25 +19414,25 @@ var require_bigint = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod-to
|
|
|
19414
19414
|
format: "int64"
|
|
19415
19415
|
};
|
|
19416
19416
|
if (!def.checks) return res;
|
|
19417
|
-
for (const check$
|
|
19417
|
+
for (const check$3 of def.checks) switch (check$3.kind) {
|
|
19418
19418
|
case "min":
|
|
19419
|
-
if (refs.target === "jsonSchema7") if (check$
|
|
19420
|
-
else (0, errorMessages_js_1$4.setResponseValueAndErrors)(res, "exclusiveMinimum", check$
|
|
19419
|
+
if (refs.target === "jsonSchema7") if (check$3.inclusive) (0, errorMessages_js_1$4.setResponseValueAndErrors)(res, "minimum", check$3.value, check$3.message, refs);
|
|
19420
|
+
else (0, errorMessages_js_1$4.setResponseValueAndErrors)(res, "exclusiveMinimum", check$3.value, check$3.message, refs);
|
|
19421
19421
|
else {
|
|
19422
|
-
if (!check$
|
|
19423
|
-
(0, errorMessages_js_1$4.setResponseValueAndErrors)(res, "minimum", check$
|
|
19422
|
+
if (!check$3.inclusive) res.exclusiveMinimum = true;
|
|
19423
|
+
(0, errorMessages_js_1$4.setResponseValueAndErrors)(res, "minimum", check$3.value, check$3.message, refs);
|
|
19424
19424
|
}
|
|
19425
19425
|
break;
|
|
19426
19426
|
case "max":
|
|
19427
|
-
if (refs.target === "jsonSchema7") if (check$
|
|
19428
|
-
else (0, errorMessages_js_1$4.setResponseValueAndErrors)(res, "exclusiveMaximum", check$
|
|
19427
|
+
if (refs.target === "jsonSchema7") if (check$3.inclusive) (0, errorMessages_js_1$4.setResponseValueAndErrors)(res, "maximum", check$3.value, check$3.message, refs);
|
|
19428
|
+
else (0, errorMessages_js_1$4.setResponseValueAndErrors)(res, "exclusiveMaximum", check$3.value, check$3.message, refs);
|
|
19429
19429
|
else {
|
|
19430
|
-
if (!check$
|
|
19431
|
-
(0, errorMessages_js_1$4.setResponseValueAndErrors)(res, "maximum", check$
|
|
19430
|
+
if (!check$3.inclusive) res.exclusiveMaximum = true;
|
|
19431
|
+
(0, errorMessages_js_1$4.setResponseValueAndErrors)(res, "maximum", check$3.value, check$3.message, refs);
|
|
19432
19432
|
}
|
|
19433
19433
|
break;
|
|
19434
19434
|
case "multipleOf":
|
|
19435
|
-
(0, errorMessages_js_1$4.setResponseValueAndErrors)(res, "multipleOf", check$
|
|
19435
|
+
(0, errorMessages_js_1$4.setResponseValueAndErrors)(res, "multipleOf", check$3.value, check$3.message, refs);
|
|
19436
19436
|
break;
|
|
19437
19437
|
}
|
|
19438
19438
|
return res;
|
|
@@ -19500,12 +19500,12 @@ var require_date = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod-to-j
|
|
|
19500
19500
|
format: "unix-time"
|
|
19501
19501
|
};
|
|
19502
19502
|
if (refs.target === "openApi3") return res;
|
|
19503
|
-
for (const check$
|
|
19503
|
+
for (const check$3 of def.checks) switch (check$3.kind) {
|
|
19504
19504
|
case "min":
|
|
19505
|
-
(0, errorMessages_js_1$3.setResponseValueAndErrors)(res, "minimum", check$
|
|
19505
|
+
(0, errorMessages_js_1$3.setResponseValueAndErrors)(res, "minimum", check$3.value, check$3.message, refs);
|
|
19506
19506
|
break;
|
|
19507
19507
|
case "max":
|
|
19508
|
-
(0, errorMessages_js_1$3.setResponseValueAndErrors)(res, "maximum", check$
|
|
19508
|
+
(0, errorMessages_js_1$3.setResponseValueAndErrors)(res, "maximum", check$3.value, check$3.message, refs);
|
|
19509
19509
|
break;
|
|
19510
19510
|
}
|
|
19511
19511
|
return res;
|
|
@@ -19652,106 +19652,106 @@ var require_string$1 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod-
|
|
|
19652
19652
|
};
|
|
19653
19653
|
function parseStringDef(def, refs) {
|
|
19654
19654
|
const res = { type: "string" };
|
|
19655
|
-
if (def.checks) for (const check$
|
|
19655
|
+
if (def.checks) for (const check$3 of def.checks) switch (check$3.kind) {
|
|
19656
19656
|
case "min":
|
|
19657
|
-
(0, errorMessages_js_1$2.setResponseValueAndErrors)(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check$
|
|
19657
|
+
(0, errorMessages_js_1$2.setResponseValueAndErrors)(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check$3.value) : check$3.value, check$3.message, refs);
|
|
19658
19658
|
break;
|
|
19659
19659
|
case "max":
|
|
19660
|
-
(0, errorMessages_js_1$2.setResponseValueAndErrors)(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check$
|
|
19660
|
+
(0, errorMessages_js_1$2.setResponseValueAndErrors)(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check$3.value) : check$3.value, check$3.message, refs);
|
|
19661
19661
|
break;
|
|
19662
19662
|
case "email":
|
|
19663
19663
|
switch (refs.emailStrategy) {
|
|
19664
19664
|
case "format:email":
|
|
19665
|
-
addFormat(res, "email", check$
|
|
19665
|
+
addFormat(res, "email", check$3.message, refs);
|
|
19666
19666
|
break;
|
|
19667
19667
|
case "format:idn-email":
|
|
19668
|
-
addFormat(res, "idn-email", check$
|
|
19668
|
+
addFormat(res, "idn-email", check$3.message, refs);
|
|
19669
19669
|
break;
|
|
19670
19670
|
case "pattern:zod":
|
|
19671
|
-
addPattern(res, exports.zodPatterns.email, check$
|
|
19671
|
+
addPattern(res, exports.zodPatterns.email, check$3.message, refs);
|
|
19672
19672
|
break;
|
|
19673
19673
|
}
|
|
19674
19674
|
break;
|
|
19675
19675
|
case "url":
|
|
19676
|
-
addFormat(res, "uri", check$
|
|
19676
|
+
addFormat(res, "uri", check$3.message, refs);
|
|
19677
19677
|
break;
|
|
19678
19678
|
case "uuid":
|
|
19679
|
-
addFormat(res, "uuid", check$
|
|
19679
|
+
addFormat(res, "uuid", check$3.message, refs);
|
|
19680
19680
|
break;
|
|
19681
19681
|
case "regex":
|
|
19682
|
-
addPattern(res, check$
|
|
19682
|
+
addPattern(res, check$3.regex, check$3.message, refs);
|
|
19683
19683
|
break;
|
|
19684
19684
|
case "cuid":
|
|
19685
|
-
addPattern(res, exports.zodPatterns.cuid, check$
|
|
19685
|
+
addPattern(res, exports.zodPatterns.cuid, check$3.message, refs);
|
|
19686
19686
|
break;
|
|
19687
19687
|
case "cuid2":
|
|
19688
|
-
addPattern(res, exports.zodPatterns.cuid2, check$
|
|
19688
|
+
addPattern(res, exports.zodPatterns.cuid2, check$3.message, refs);
|
|
19689
19689
|
break;
|
|
19690
19690
|
case "startsWith":
|
|
19691
|
-
addPattern(res, RegExp(`^${escapeLiteralCheckValue(check$
|
|
19691
|
+
addPattern(res, RegExp(`^${escapeLiteralCheckValue(check$3.value, refs)}`), check$3.message, refs);
|
|
19692
19692
|
break;
|
|
19693
19693
|
case "endsWith":
|
|
19694
|
-
addPattern(res, RegExp(`${escapeLiteralCheckValue(check$
|
|
19694
|
+
addPattern(res, RegExp(`${escapeLiteralCheckValue(check$3.value, refs)}$`), check$3.message, refs);
|
|
19695
19695
|
break;
|
|
19696
19696
|
case "datetime":
|
|
19697
|
-
addFormat(res, "date-time", check$
|
|
19697
|
+
addFormat(res, "date-time", check$3.message, refs);
|
|
19698
19698
|
break;
|
|
19699
19699
|
case "date":
|
|
19700
|
-
addFormat(res, "date", check$
|
|
19700
|
+
addFormat(res, "date", check$3.message, refs);
|
|
19701
19701
|
break;
|
|
19702
19702
|
case "time":
|
|
19703
|
-
addFormat(res, "time", check$
|
|
19703
|
+
addFormat(res, "time", check$3.message, refs);
|
|
19704
19704
|
break;
|
|
19705
19705
|
case "duration":
|
|
19706
|
-
addFormat(res, "duration", check$
|
|
19706
|
+
addFormat(res, "duration", check$3.message, refs);
|
|
19707
19707
|
break;
|
|
19708
19708
|
case "length":
|
|
19709
|
-
(0, errorMessages_js_1$2.setResponseValueAndErrors)(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check$
|
|
19710
|
-
(0, errorMessages_js_1$2.setResponseValueAndErrors)(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check$
|
|
19709
|
+
(0, errorMessages_js_1$2.setResponseValueAndErrors)(res, "minLength", typeof res.minLength === "number" ? Math.max(res.minLength, check$3.value) : check$3.value, check$3.message, refs);
|
|
19710
|
+
(0, errorMessages_js_1$2.setResponseValueAndErrors)(res, "maxLength", typeof res.maxLength === "number" ? Math.min(res.maxLength, check$3.value) : check$3.value, check$3.message, refs);
|
|
19711
19711
|
break;
|
|
19712
19712
|
case "includes":
|
|
19713
|
-
addPattern(res, RegExp(escapeLiteralCheckValue(check$
|
|
19713
|
+
addPattern(res, RegExp(escapeLiteralCheckValue(check$3.value, refs)), check$3.message, refs);
|
|
19714
19714
|
break;
|
|
19715
19715
|
case "ip":
|
|
19716
|
-
if (check$
|
|
19717
|
-
if (check$
|
|
19716
|
+
if (check$3.version !== "v6") addFormat(res, "ipv4", check$3.message, refs);
|
|
19717
|
+
if (check$3.version !== "v4") addFormat(res, "ipv6", check$3.message, refs);
|
|
19718
19718
|
break;
|
|
19719
19719
|
case "base64url":
|
|
19720
|
-
addPattern(res, exports.zodPatterns.base64url, check$
|
|
19720
|
+
addPattern(res, exports.zodPatterns.base64url, check$3.message, refs);
|
|
19721
19721
|
break;
|
|
19722
19722
|
case "jwt":
|
|
19723
|
-
addPattern(res, exports.zodPatterns.jwt, check$
|
|
19723
|
+
addPattern(res, exports.zodPatterns.jwt, check$3.message, refs);
|
|
19724
19724
|
break;
|
|
19725
19725
|
case "cidr":
|
|
19726
|
-
if (check$
|
|
19727
|
-
if (check$
|
|
19726
|
+
if (check$3.version !== "v6") addPattern(res, exports.zodPatterns.ipv4Cidr, check$3.message, refs);
|
|
19727
|
+
if (check$3.version !== "v4") addPattern(res, exports.zodPatterns.ipv6Cidr, check$3.message, refs);
|
|
19728
19728
|
break;
|
|
19729
19729
|
case "emoji":
|
|
19730
|
-
addPattern(res, exports.zodPatterns.emoji(), check$
|
|
19730
|
+
addPattern(res, exports.zodPatterns.emoji(), check$3.message, refs);
|
|
19731
19731
|
break;
|
|
19732
19732
|
case "ulid":
|
|
19733
|
-
addPattern(res, exports.zodPatterns.ulid, check$
|
|
19733
|
+
addPattern(res, exports.zodPatterns.ulid, check$3.message, refs);
|
|
19734
19734
|
break;
|
|
19735
19735
|
case "base64":
|
|
19736
19736
|
switch (refs.base64Strategy) {
|
|
19737
19737
|
case "format:binary":
|
|
19738
|
-
addFormat(res, "binary", check$
|
|
19738
|
+
addFormat(res, "binary", check$3.message, refs);
|
|
19739
19739
|
break;
|
|
19740
19740
|
case "contentEncoding:base64":
|
|
19741
|
-
(0, errorMessages_js_1$2.setResponseValueAndErrors)(res, "contentEncoding", "base64", check$
|
|
19741
|
+
(0, errorMessages_js_1$2.setResponseValueAndErrors)(res, "contentEncoding", "base64", check$3.message, refs);
|
|
19742
19742
|
break;
|
|
19743
19743
|
case "pattern:zod":
|
|
19744
|
-
addPattern(res, exports.zodPatterns.base64, check$
|
|
19744
|
+
addPattern(res, exports.zodPatterns.base64, check$3.message, refs);
|
|
19745
19745
|
break;
|
|
19746
19746
|
}
|
|
19747
19747
|
break;
|
|
19748
|
-
case "nanoid": addPattern(res, exports.zodPatterns.nanoid, check$
|
|
19748
|
+
case "nanoid": addPattern(res, exports.zodPatterns.nanoid, check$3.message, refs);
|
|
19749
19749
|
case "toLowerCase":
|
|
19750
19750
|
case "toUpperCase":
|
|
19751
19751
|
case "trim": break;
|
|
19752
19752
|
default:
|
|
19753
19753
|
/* c8 ignore next */
|
|
19754
|
-
((_$2) => {})(check$
|
|
19754
|
+
((_$2) => {})(check$3);
|
|
19755
19755
|
}
|
|
19756
19756
|
return res;
|
|
19757
19757
|
}
|
|
@@ -20134,29 +20134,29 @@ var require_number = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod-to
|
|
|
20134
20134
|
function parseNumberDef(def, refs) {
|
|
20135
20135
|
const res = { type: "number" };
|
|
20136
20136
|
if (!def.checks) return res;
|
|
20137
|
-
for (const check$
|
|
20137
|
+
for (const check$3 of def.checks) switch (check$3.kind) {
|
|
20138
20138
|
case "int":
|
|
20139
20139
|
res.type = "integer";
|
|
20140
|
-
(0, errorMessages_js_1$1.addErrorMessage)(res, "type", check$
|
|
20140
|
+
(0, errorMessages_js_1$1.addErrorMessage)(res, "type", check$3.message, refs);
|
|
20141
20141
|
break;
|
|
20142
20142
|
case "min":
|
|
20143
|
-
if (refs.target === "jsonSchema7") if (check$
|
|
20144
|
-
else (0, errorMessages_js_1$1.setResponseValueAndErrors)(res, "exclusiveMinimum", check$
|
|
20143
|
+
if (refs.target === "jsonSchema7") if (check$3.inclusive) (0, errorMessages_js_1$1.setResponseValueAndErrors)(res, "minimum", check$3.value, check$3.message, refs);
|
|
20144
|
+
else (0, errorMessages_js_1$1.setResponseValueAndErrors)(res, "exclusiveMinimum", check$3.value, check$3.message, refs);
|
|
20145
20145
|
else {
|
|
20146
|
-
if (!check$
|
|
20147
|
-
(0, errorMessages_js_1$1.setResponseValueAndErrors)(res, "minimum", check$
|
|
20146
|
+
if (!check$3.inclusive) res.exclusiveMinimum = true;
|
|
20147
|
+
(0, errorMessages_js_1$1.setResponseValueAndErrors)(res, "minimum", check$3.value, check$3.message, refs);
|
|
20148
20148
|
}
|
|
20149
20149
|
break;
|
|
20150
20150
|
case "max":
|
|
20151
|
-
if (refs.target === "jsonSchema7") if (check$
|
|
20152
|
-
else (0, errorMessages_js_1$1.setResponseValueAndErrors)(res, "exclusiveMaximum", check$
|
|
20151
|
+
if (refs.target === "jsonSchema7") if (check$3.inclusive) (0, errorMessages_js_1$1.setResponseValueAndErrors)(res, "maximum", check$3.value, check$3.message, refs);
|
|
20152
|
+
else (0, errorMessages_js_1$1.setResponseValueAndErrors)(res, "exclusiveMaximum", check$3.value, check$3.message, refs);
|
|
20153
20153
|
else {
|
|
20154
|
-
if (!check$
|
|
20155
|
-
(0, errorMessages_js_1$1.setResponseValueAndErrors)(res, "maximum", check$
|
|
20154
|
+
if (!check$3.inclusive) res.exclusiveMaximum = true;
|
|
20155
|
+
(0, errorMessages_js_1$1.setResponseValueAndErrors)(res, "maximum", check$3.value, check$3.message, refs);
|
|
20156
20156
|
}
|
|
20157
20157
|
break;
|
|
20158
20158
|
case "multipleOf":
|
|
20159
|
-
(0, errorMessages_js_1$1.setResponseValueAndErrors)(res, "multipleOf", check$
|
|
20159
|
+
(0, errorMessages_js_1$1.setResponseValueAndErrors)(res, "multipleOf", check$3.value, check$3.message, refs);
|
|
20160
20160
|
break;
|
|
20161
20161
|
}
|
|
20162
20162
|
return res;
|
|
@@ -22195,7 +22195,7 @@ var require_schemas = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod@3
|
|
|
22195
22195
|
exports.templateLiteral = templateLiteral$1;
|
|
22196
22196
|
exports.lazy = lazy$1;
|
|
22197
22197
|
exports.promise = promise$2;
|
|
22198
|
-
exports.check = check$
|
|
22198
|
+
exports.check = check$2;
|
|
22199
22199
|
exports.custom = custom$1;
|
|
22200
22200
|
exports.refine = refine$1;
|
|
22201
22201
|
exports.superRefine = superRefine$1;
|
|
@@ -22232,7 +22232,7 @@ var require_schemas = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod@3
|
|
|
22232
22232
|
inst.parseAsync = async (data, params) => parse$9.parseAsync(inst, data, params, { callee: inst.parseAsync });
|
|
22233
22233
|
inst.safeParseAsync = async (data, params) => parse$9.safeParseAsync(inst, data, params);
|
|
22234
22234
|
inst.spa = inst.safeParseAsync;
|
|
22235
|
-
inst.refine = (check$
|
|
22235
|
+
inst.refine = (check$3, params) => inst.check(refine$1(check$3, params));
|
|
22236
22236
|
inst.superRefine = (refinement) => inst.check(superRefine$1(refinement));
|
|
22237
22237
|
inst.overwrite = (fn) => inst.check(checks.overwrite(fn));
|
|
22238
22238
|
inst.optional = () => optional$1(inst);
|
|
@@ -23082,7 +23082,7 @@ var require_schemas = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod@3
|
|
|
23082
23082
|
core$3.$ZodCustom.init(inst, def);
|
|
23083
23083
|
exports.ZodType.init(inst, def);
|
|
23084
23084
|
});
|
|
23085
|
-
function check$
|
|
23085
|
+
function check$2(fn) {
|
|
23086
23086
|
const ch = new core$3.$ZodCheck({ check: "custom" });
|
|
23087
23087
|
ch._zod.check = fn;
|
|
23088
23088
|
return ch;
|
|
@@ -23094,7 +23094,7 @@ var require_schemas = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/zod@3
|
|
|
23094
23094
|
return core$3._refine(exports.ZodCustom, fn, _params);
|
|
23095
23095
|
}
|
|
23096
23096
|
function superRefine$1(fn) {
|
|
23097
|
-
const ch = check$
|
|
23097
|
+
const ch = check$2((payload) => {
|
|
23098
23098
|
payload.addIssue = (issue$2) => {
|
|
23099
23099
|
if (typeof issue$2 === "string") payload.issues.push(index_js_1$3.util.issue(issue$2, payload.value, ch._zod.def));
|
|
23100
23100
|
else {
|
|
@@ -35272,7 +35272,7 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
35272
35272
|
inst.safeDecode = (data, params) => safeDecode(inst, data, params);
|
|
35273
35273
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync(inst, data, params);
|
|
35274
35274
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync(inst, data, params);
|
|
35275
|
-
inst.refine = (check$
|
|
35275
|
+
inst.refine = (check$3, params) => inst.check(refine(check$3, params));
|
|
35276
35276
|
inst.superRefine = (refinement) => inst.check(superRefine(refinement));
|
|
35277
35277
|
inst.overwrite = (fn) => inst.check(_overwrite(fn));
|
|
35278
35278
|
inst.optional = () => optional(inst);
|
|
@@ -36161,7 +36161,7 @@ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
|
36161
36161
|
$ZodCustom.init(inst, def);
|
|
36162
36162
|
ZodType.init(inst, def);
|
|
36163
36163
|
});
|
|
36164
|
-
function check(fn) {
|
|
36164
|
+
function check$1(fn) {
|
|
36165
36165
|
const ch = new $ZodCheck({ check: "custom" });
|
|
36166
36166
|
ch._zod.check = fn;
|
|
36167
36167
|
return ch;
|
|
@@ -36352,7 +36352,7 @@ var external_exports = /* @__PURE__ */ __export({
|
|
|
36352
36352
|
bigint: () => bigint$1,
|
|
36353
36353
|
boolean: () => boolean$1,
|
|
36354
36354
|
catch: () => _catch,
|
|
36355
|
-
check: () => check,
|
|
36355
|
+
check: () => check$1,
|
|
36356
36356
|
cidrv4: () => cidrv4,
|
|
36357
36357
|
cidrv6: () => cidrv6,
|
|
36358
36358
|
clone: () => clone$2,
|
|
@@ -36780,7 +36780,7 @@ function envPaths(name$1, { suffix = "nodejs" } = {}) {
|
|
|
36780
36780
|
//#endregion
|
|
36781
36781
|
//#region package.json
|
|
36782
36782
|
var name = "alchemy";
|
|
36783
|
-
var version = "0.
|
|
36783
|
+
var version = "0.76.0";
|
|
36784
36784
|
var license = "Apache-2.0";
|
|
36785
36785
|
var author = "Sam Goodwin <sam@alchemy.run>";
|
|
36786
36786
|
var homepage = "https://alchemy.run";
|
|
@@ -38387,7 +38387,7 @@ async function _alchemy(appName, options) {
|
|
|
38387
38387
|
profile: parseOption("--profile"),
|
|
38388
38388
|
...options
|
|
38389
38389
|
};
|
|
38390
|
-
if (mergedOptions.stateStore === void 0 && process.env.CI && process.env.ALCHEMY_CI_STATE_STORE_CHECK !== "false") throw new Error(`You are running Alchemy in a CI environment with the default local state store.
|
|
38390
|
+
if (mergedOptions.stateStore === void 0 && process.env.CI && process.env.ALCHEMY_CI_STATE_STORE_CHECK !== "false") throw new Error(`You are running Alchemy in a CI environment with the default local state store.
|
|
38391
38391
|
This can lead to orphaned infrastructure and is rarely what you want to do.
|
|
38392
38392
|
|
|
38393
38393
|
Instead, you should choose a persistent state store:
|
|
@@ -38692,14 +38692,14 @@ let Path;
|
|
|
38692
38692
|
})(Path || (Path = {}));
|
|
38693
38693
|
let Config;
|
|
38694
38694
|
(function(_Config) {
|
|
38695
|
-
const read$
|
|
38695
|
+
const read$4 = _Config.read = async () => {
|
|
38696
38696
|
return await FS.readJSON(Path.configFile) ?? {
|
|
38697
38697
|
version: 1,
|
|
38698
38698
|
profiles: {}
|
|
38699
38699
|
};
|
|
38700
38700
|
};
|
|
38701
38701
|
_Config.patch = async (updater) => {
|
|
38702
|
-
const updated = updater(await read$
|
|
38702
|
+
const updated = updater(await read$4());
|
|
38703
38703
|
await FS.writeJSON(Path.configFile, updated);
|
|
38704
38704
|
};
|
|
38705
38705
|
})(Config || (Config = {}));
|
|
@@ -40088,7 +40088,7 @@ var require_polyfills = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/gra
|
|
|
40088
40088
|
return rename$1;
|
|
40089
40089
|
})(fs$33.rename);
|
|
40090
40090
|
fs$33.read = typeof fs$33.read !== "function" ? fs$33.read : (function(fs$read) {
|
|
40091
|
-
function read$
|
|
40091
|
+
function read$4(fd, buffer, offset, length, position, callback_) {
|
|
40092
40092
|
var callback;
|
|
40093
40093
|
if (callback_ && typeof callback_ === "function") {
|
|
40094
40094
|
var eagCounter = 0;
|
|
@@ -40102,8 +40102,8 @@ var require_polyfills = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/gra
|
|
|
40102
40102
|
}
|
|
40103
40103
|
return fs$read.call(fs$33, fd, buffer, offset, length, position, callback);
|
|
40104
40104
|
}
|
|
40105
|
-
if (Object.setPrototypeOf) Object.setPrototypeOf(read$
|
|
40106
|
-
return read$
|
|
40105
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(read$4, fs$read);
|
|
40106
|
+
return read$4;
|
|
40107
40107
|
})(fs$33.read);
|
|
40108
40108
|
fs$33.readSync = typeof fs$33.readSync !== "function" ? fs$33.readSync : (function(fs$readSync) {
|
|
40109
40109
|
return function(fd, buffer, offset, length, position) {
|
|
@@ -47538,7 +47538,7 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
47538
47538
|
const binary = binaryOption || BINARY_ENCODINGS.has(encoding);
|
|
47539
47539
|
const { subprocessStdout, waitReadableDestroy } = getSubprocessStdout(subprocess, from, concurrentStreams);
|
|
47540
47540
|
const { readableEncoding, readableObjectMode, readableHighWaterMark } = getReadableOptions(subprocessStdout, binary);
|
|
47541
|
-
const { read: read$
|
|
47541
|
+
const { read: read$4, onStdoutDataDone } = getReadableMethods({
|
|
47542
47542
|
subprocessStdout,
|
|
47543
47543
|
subprocess,
|
|
47544
47544
|
binary,
|
|
@@ -47546,7 +47546,7 @@ const createReadable = ({ subprocess, concurrentStreams, encoding }, { from, bin
|
|
|
47546
47546
|
preserveNewlines
|
|
47547
47547
|
});
|
|
47548
47548
|
const readable$1 = new Readable({
|
|
47549
|
-
read: read$
|
|
47549
|
+
read: read$4,
|
|
47550
47550
|
destroy: callbackify(onReadableDestroy.bind(void 0, {
|
|
47551
47551
|
subprocessStdout,
|
|
47552
47552
|
subprocess,
|
|
@@ -47693,7 +47693,7 @@ const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, b
|
|
|
47693
47693
|
const { subprocessStdout, waitReadableDestroy } = getSubprocessStdout(subprocess, from, concurrentStreams);
|
|
47694
47694
|
const { subprocessStdin, waitWritableFinal, waitWritableDestroy } = getSubprocessStdin(subprocess, to, concurrentStreams);
|
|
47695
47695
|
const { readableEncoding, readableObjectMode, readableHighWaterMark } = getReadableOptions(subprocessStdout, binary);
|
|
47696
|
-
const { read: read$
|
|
47696
|
+
const { read: read$4, onStdoutDataDone } = getReadableMethods({
|
|
47697
47697
|
subprocessStdout,
|
|
47698
47698
|
subprocess,
|
|
47699
47699
|
binary,
|
|
@@ -47701,7 +47701,7 @@ const createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, b
|
|
|
47701
47701
|
preserveNewlines
|
|
47702
47702
|
});
|
|
47703
47703
|
const duplex$1 = new Duplex({
|
|
47704
|
-
read: read$
|
|
47704
|
+
read: read$4,
|
|
47705
47705
|
...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
|
|
47706
47706
|
destroy: callbackify(onDuplexDestroy.bind(void 0, {
|
|
47707
47707
|
subprocessStdout,
|
|
@@ -48356,7 +48356,7 @@ import { CloudflareStateStore } from "alchemy/state";`);
|
|
|
48356
48356
|
const githubWorkflowCode = `
|
|
48357
48357
|
if (process.env.PULL_REQUEST) {
|
|
48358
48358
|
const previewUrl = worker.url;
|
|
48359
|
-
|
|
48359
|
+
|
|
48360
48360
|
await GitHubComment("pr-preview-comment", {
|
|
48361
48361
|
owner: process.env.GITHUB_REPOSITORY_OWNER || "your-username",
|
|
48362
48362
|
repository: process.env.GITHUB_REPOSITORY_NAME || "${context$1.name}",
|
|
@@ -48364,7 +48364,7 @@ if (process.env.PULL_REQUEST) {
|
|
|
48364
48364
|
body: \`
|
|
48365
48365
|
## 🚀 Preview Deployed
|
|
48366
48366
|
|
|
48367
|
-
Your preview is ready!
|
|
48367
|
+
Your preview is ready!
|
|
48368
48368
|
|
|
48369
48369
|
**Preview URL:** \${previewUrl}
|
|
48370
48370
|
|
|
@@ -48766,9 +48766,9 @@ var require_is_glob = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/is-gl
|
|
|
48766
48766
|
module.exports = function isGlob$1(str, options) {
|
|
48767
48767
|
if (typeof str !== "string" || str === "") return false;
|
|
48768
48768
|
if (isExtglob(str)) return true;
|
|
48769
|
-
var check$
|
|
48770
|
-
if (options && options.strict === false) check$
|
|
48771
|
-
return check$
|
|
48769
|
+
var check$3 = strictCheck;
|
|
48770
|
+
if (options && options.strict === false) check$3 = relaxedCheck;
|
|
48771
|
+
return check$3(str);
|
|
48772
48772
|
};
|
|
48773
48773
|
}) });
|
|
48774
48774
|
|
|
@@ -52346,7 +52346,7 @@ var require_tasks = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/fast-gl
|
|
|
52346
52346
|
//#region ../node_modules/.bun/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js
|
|
52347
52347
|
var require_async$5 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js": ((exports) => {
|
|
52348
52348
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52349
|
-
function read$
|
|
52349
|
+
function read$3(path$32, settings, callback) {
|
|
52350
52350
|
settings.fs.lstat(path$32, (lstatError, lstat) => {
|
|
52351
52351
|
if (lstatError !== null) {
|
|
52352
52352
|
callFailureCallback$2(callback, lstatError);
|
|
@@ -52370,7 +52370,7 @@ var require_async$5 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/@node
|
|
|
52370
52370
|
});
|
|
52371
52371
|
});
|
|
52372
52372
|
}
|
|
52373
|
-
exports.read = read$
|
|
52373
|
+
exports.read = read$3;
|
|
52374
52374
|
function callFailureCallback$2(callback, error$84) {
|
|
52375
52375
|
callback(error$84);
|
|
52376
52376
|
}
|
|
@@ -52383,7 +52383,7 @@ var require_async$5 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/@node
|
|
|
52383
52383
|
//#region ../node_modules/.bun/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js
|
|
52384
52384
|
var require_sync$5 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js": ((exports) => {
|
|
52385
52385
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52386
|
-
function read$
|
|
52386
|
+
function read$2(path$32, settings) {
|
|
52387
52387
|
const lstat = settings.fs.lstatSync(path$32);
|
|
52388
52388
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) return lstat;
|
|
52389
52389
|
try {
|
|
@@ -52395,7 +52395,7 @@ var require_sync$5 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/@nodel
|
|
|
52395
52395
|
throw error$84;
|
|
52396
52396
|
}
|
|
52397
52397
|
}
|
|
52398
|
-
exports.read = read$
|
|
52398
|
+
exports.read = read$2;
|
|
52399
52399
|
}) });
|
|
52400
52400
|
|
|
52401
52401
|
//#endregion
|
|
@@ -52589,14 +52589,14 @@ var require_async$4 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/@node
|
|
|
52589
52589
|
const constants_1$1 = require_constants();
|
|
52590
52590
|
const utils$8 = require_utils();
|
|
52591
52591
|
const common$5 = require_common$1();
|
|
52592
|
-
function read$
|
|
52592
|
+
function read$1(directory, settings, callback) {
|
|
52593
52593
|
if (!settings.stats && constants_1$1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
52594
52594
|
readdirWithFileTypes$1(directory, settings, callback);
|
|
52595
52595
|
return;
|
|
52596
52596
|
}
|
|
52597
52597
|
readdir$1(directory, settings, callback);
|
|
52598
52598
|
}
|
|
52599
|
-
exports.read = read$
|
|
52599
|
+
exports.read = read$1;
|
|
52600
52600
|
function readdirWithFileTypes$1(directory, settings, callback) {
|
|
52601
52601
|
settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
|
|
52602
52602
|
if (readdirError !== null) {
|
|
@@ -52691,11 +52691,11 @@ var require_sync$4 = /* @__PURE__ */ __commonJS$1({ "../node_modules/.bun/@nodel
|
|
|
52691
52691
|
const constants_1 = require_constants();
|
|
52692
52692
|
const utils$7 = require_utils();
|
|
52693
52693
|
const common$4 = require_common$1();
|
|
52694
|
-
function read
|
|
52694
|
+
function read(directory, settings) {
|
|
52695
52695
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) return readdirWithFileTypes(directory, settings);
|
|
52696
52696
|
return readdir(directory, settings);
|
|
52697
52697
|
}
|
|
52698
|
-
exports.read = read
|
|
52698
|
+
exports.read = read;
|
|
52699
52699
|
function readdirWithFileTypes(directory, settings) {
|
|
52700
52700
|
return settings.fs.readdirSync(directory, { withFileTypes: true }).map((dirent) => {
|
|
52701
52701
|
const entry = {
|
|
@@ -55132,6 +55132,42 @@ function detectRuntime() {
|
|
|
55132
55132
|
return "node";
|
|
55133
55133
|
}
|
|
55134
55134
|
|
|
55135
|
+
//#endregion
|
|
55136
|
+
//#region src/util/find-workspace-root.ts
|
|
55137
|
+
async function findWorkspaceRoot(directory = process.cwd()) {
|
|
55138
|
+
if ((await Promise.all(Object.entries(predicates).map(async ([file$2, predicate]) => {
|
|
55139
|
+
return await check(path$1.join(directory, file$2), predicate);
|
|
55140
|
+
}))).includes(true)) return directory;
|
|
55141
|
+
const parent = path$1.resolve(directory, "..");
|
|
55142
|
+
if (parent === directory) return directory;
|
|
55143
|
+
return await findWorkspaceRoot(parent);
|
|
55144
|
+
}
|
|
55145
|
+
async function check(filePath, predicate) {
|
|
55146
|
+
if (!await exists(filePath)) return false;
|
|
55147
|
+
if (typeof predicate === "function") try {
|
|
55148
|
+
const value = await fs$1.readFile(filePath, "utf-8");
|
|
55149
|
+
return predicate(JSON.parse(value));
|
|
55150
|
+
} catch {
|
|
55151
|
+
return false;
|
|
55152
|
+
}
|
|
55153
|
+
else return true;
|
|
55154
|
+
}
|
|
55155
|
+
const predicates = {
|
|
55156
|
+
"bun.lock": true,
|
|
55157
|
+
"bun.lockb": true,
|
|
55158
|
+
".git": true,
|
|
55159
|
+
"lerna.json": true,
|
|
55160
|
+
"package.json": (value) => "workspaces" in value,
|
|
55161
|
+
"package-lock.json": true,
|
|
55162
|
+
"nx.json": true,
|
|
55163
|
+
"pnpm-lock.yaml": true,
|
|
55164
|
+
"pnpm-workspace.yaml": true,
|
|
55165
|
+
"pnpm-workspace.yml": true,
|
|
55166
|
+
"rush.json": true,
|
|
55167
|
+
"turbo.json": (value) => !("extends" in value),
|
|
55168
|
+
"yarn.lock": true
|
|
55169
|
+
};
|
|
55170
|
+
|
|
55135
55171
|
//#endregion
|
|
55136
55172
|
//#region src/util/find-open-port.ts
|
|
55137
55173
|
async function findOpenPort(min = 1337, max = 65535) {
|
|
@@ -55301,27 +55337,6 @@ var CDPProxy = class extends CDPServer {
|
|
|
55301
55337
|
}
|
|
55302
55338
|
};
|
|
55303
55339
|
|
|
55304
|
-
//#endregion
|
|
55305
|
-
//#region bin/services/find-workspace-root.ts
|
|
55306
|
-
async function findWorkspaceRoot(dir = process.cwd()) {
|
|
55307
|
-
if ((await fs$1.stat(dir)).isDirectory()) {
|
|
55308
|
-
if (await exists$1(dir, ".git")) return dir;
|
|
55309
|
-
else if ((await read(dir, "package.json"))?.workspaces) return dir;
|
|
55310
|
-
else if (await anyExists(dir, ...rootFiles)) return dir;
|
|
55311
|
-
}
|
|
55312
|
-
return findWorkspaceRoot(path$1.resolve(dir, ".."));
|
|
55313
|
-
}
|
|
55314
|
-
const read = (...p$1) => fs$1.readFile(path$1.join(...p$1), "utf8").then(JSON.parse).catch(() => void 0);
|
|
55315
|
-
const exists$1 = (...p$1) => fs$1.access(path$1.join(...p$1)).then(() => true).catch(() => false);
|
|
55316
|
-
const anyExists = (base, ...files$1) => Promise.all(files$1.map((file$2) => exists$1(base, file$2))).then((results) => results.some(Boolean));
|
|
55317
|
-
const rootFiles = [
|
|
55318
|
-
"pnpm-workspace.yaml",
|
|
55319
|
-
"pnpm-workspace.yml",
|
|
55320
|
-
"lerna.json",
|
|
55321
|
-
"nx.json",
|
|
55322
|
-
"rush.json"
|
|
55323
|
-
];
|
|
55324
|
-
|
|
55325
55340
|
//#endregion
|
|
55326
55341
|
//#region bin/services/execute-alchemy.ts
|
|
55327
55342
|
const entrypoint = zod_default.string().optional().describe("Path to the entrypoint file");
|
|
@@ -55340,7 +55355,7 @@ const execArgs = {
|
|
|
55340
55355
|
rootDir: zod_default.string().optional().describe("Path to the root directory of the project"),
|
|
55341
55356
|
profile: zod_default.string().optional().describe("Alchemy profile to use for authorizing requests")
|
|
55342
55357
|
};
|
|
55343
|
-
async function execAlchemy(main, { cwd: cwd$1 = process.cwd(), quiet, force: force$1, stage, destroy: destroy$2, watch: watch$1, envFile, read: read$
|
|
55358
|
+
async function execAlchemy(main, { cwd: cwd$1 = process.cwd(), quiet, force: force$1, stage, destroy: destroy$2, watch: watch$1, envFile, read: read$4, dev: dev$1, inspect: inspect$1, inspectBrk, inspectWait, adopt: adopt$1, app, rootDir, profile }) {
|
|
55344
55359
|
const args = [];
|
|
55345
55360
|
const execArgs$1 = [];
|
|
55346
55361
|
const shouldInspect = (inspect$1 || inspectBrk || inspectWait) ?? false;
|
|
@@ -55348,7 +55363,7 @@ async function execAlchemy(main, { cwd: cwd$1 = process.cwd(), quiet, force: for
|
|
|
55348
55363
|
args.push(`--telemetry-session-id ${telemetryData.sessionId}`);
|
|
55349
55364
|
args.push(`--telemetry-ref ${telemetryData.referrer ? `${telemetryData.referrer}+cli` : "cli"}`);
|
|
55350
55365
|
if (quiet) args.push("--quiet");
|
|
55351
|
-
if (read$
|
|
55366
|
+
if (read$4) args.push("--read");
|
|
55352
55367
|
if (force$1) args.push("--force");
|
|
55353
55368
|
if (stage) args.push(`--stage ${stage}`);
|
|
55354
55369
|
if (destroy$2) args.push("--destroy");
|
|
@@ -83537,9 +83552,9 @@ ${lanes.join("\n")}
|
|
|
83537
83552
|
return isCommaSequence(skipPartiallyEmittedExpressions(branch)) ? factory2.createParenthesizedExpression(branch) : branch;
|
|
83538
83553
|
}
|
|
83539
83554
|
function parenthesizeExpressionOfExportDefault(expression) {
|
|
83540
|
-
const check$
|
|
83541
|
-
let needsParens = isCommaSequence(check$
|
|
83542
|
-
if (!needsParens) switch (getLeftmostExpression(check$
|
|
83555
|
+
const check$3 = skipPartiallyEmittedExpressions(expression);
|
|
83556
|
+
let needsParens = isCommaSequence(check$3);
|
|
83557
|
+
if (!needsParens) switch (getLeftmostExpression(check$3, false).kind) {
|
|
83543
83558
|
case 231:
|
|
83544
83559
|
case 218: needsParens = true;
|
|
83545
83560
|
}
|
|
@@ -109969,12 +109984,12 @@ ${lanes.join("\n")}
|
|
|
109969
109984
|
return getObjectFlags(type$1) & 4 ? type$1.target : type$1;
|
|
109970
109985
|
}
|
|
109971
109986
|
function hasBaseType(type$1, checkBase) {
|
|
109972
|
-
return check$
|
|
109973
|
-
function check$
|
|
109987
|
+
return check$3(type$1);
|
|
109988
|
+
function check$3(type2) {
|
|
109974
109989
|
if (getObjectFlags(type2) & 7) {
|
|
109975
109990
|
const target = getTargetType(type2);
|
|
109976
|
-
return target === checkBase || some(getBaseTypes(target), check$
|
|
109977
|
-
} else if (type2.flags & 2097152) return some(type2.types, check$
|
|
109991
|
+
return target === checkBase || some(getBaseTypes(target), check$3);
|
|
109992
|
+
} else if (type2.flags & 2097152) return some(type2.types, check$3);
|
|
109978
109993
|
return false;
|
|
109979
109994
|
}
|
|
109980
109995
|
}
|
|
@@ -127876,7 +127891,7 @@ ${lanes.join("\n")}
|
|
|
127876
127891
|
}
|
|
127877
127892
|
}
|
|
127878
127893
|
function isSymbolUsedInConditionBody(expr, body, testedNode, testedSymbol) {
|
|
127879
|
-
return !!forEachChild(body, function check$
|
|
127894
|
+
return !!forEachChild(body, function check$3(childNode) {
|
|
127880
127895
|
if (isIdentifier(childNode)) {
|
|
127881
127896
|
const childSymbol = getSymbolAtLocation(childNode);
|
|
127882
127897
|
if (childSymbol && childSymbol === testedSymbol) {
|
|
@@ -127894,7 +127909,7 @@ ${lanes.join("\n")}
|
|
|
127894
127909
|
} else return false;
|
|
127895
127910
|
}
|
|
127896
127911
|
}
|
|
127897
|
-
return forEachChild(childNode, check$
|
|
127912
|
+
return forEachChild(childNode, check$3);
|
|
127898
127913
|
});
|
|
127899
127914
|
}
|
|
127900
127915
|
function isSymbolUsedInBinaryExpressionChain(node, testedSymbol) {
|
|
@@ -156176,9 +156191,9 @@ ${lanes.join("\n")}
|
|
|
156176
156191
|
host.extraFileExtensions = extraFileExtensions;
|
|
156177
156192
|
return host;
|
|
156178
156193
|
}
|
|
156179
|
-
function createWatchCompilerHostOfFilesAndCompilerOptions({ rootFiles
|
|
156194
|
+
function createWatchCompilerHostOfFilesAndCompilerOptions({ rootFiles, options, watchOptions, projectReferences, system, createProgram: createProgram2, reportDiagnostic, reportWatchStatus: reportWatchStatus2 }) {
|
|
156180
156195
|
const host = createWatchCompilerHost(system, createProgram2, reportDiagnostic || createDiagnosticReporter(system), reportWatchStatus2);
|
|
156181
|
-
host.rootFiles = rootFiles
|
|
156196
|
+
host.rootFiles = rootFiles;
|
|
156182
156197
|
host.options = options;
|
|
156183
156198
|
host.watchOptions = watchOptions;
|
|
156184
156199
|
host.projectReferences = projectReferences;
|
|
@@ -158546,9 +158561,9 @@ ${lanes.join("\n")}
|
|
|
158546
158561
|
watchCompilerHost.extendedConfigCache = extendedConfigCache;
|
|
158547
158562
|
return createWatchProgram(watchCompilerHost);
|
|
158548
158563
|
}
|
|
158549
|
-
function createWatchOfFilesAndCompilerOptions(system, cb, reportDiagnostic, rootFiles
|
|
158564
|
+
function createWatchOfFilesAndCompilerOptions(system, cb, reportDiagnostic, rootFiles, options, watchOptions) {
|
|
158550
158565
|
const watchCompilerHost = createWatchCompilerHostOfFilesAndCompilerOptions({
|
|
158551
|
-
rootFiles
|
|
158566
|
+
rootFiles,
|
|
158552
158567
|
options,
|
|
158553
158568
|
watchOptions,
|
|
158554
158569
|
system,
|
|
@@ -164345,7 +164360,7 @@ ${lanes.join("\n")}
|
|
|
164345
164360
|
if (!(program.getImpliedNodeFormatForEmit(sourceFile) === 1 || fileExtensionIsOneOf(sourceFile.fileName, [".cts", ".cjs"])) && sourceFile.commonJsModuleIndicator && (programContainsEsModules(program) || compilerOptionsIndicateEsModules(program.getCompilerOptions())) && containsTopLevelCommonjs(sourceFile)) diags.push(createDiagnosticForNode(getErrorNodeFromCommonJsIndicator(sourceFile.commonJsModuleIndicator), Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module));
|
|
164346
164361
|
const isJsFile = isSourceFileJS(sourceFile);
|
|
164347
164362
|
visitedNestedConvertibleFunctions.clear();
|
|
164348
|
-
check$
|
|
164363
|
+
check$3(sourceFile);
|
|
164349
164364
|
if (getAllowSyntheticDefaultImports(program.getCompilerOptions())) for (const moduleSpecifier of sourceFile.imports) {
|
|
164350
164365
|
const name$1 = importNameForConvertToDefaultImport(importFromModuleSpecifier(moduleSpecifier));
|
|
164351
164366
|
if (!name$1) continue;
|
|
@@ -164357,7 +164372,7 @@ ${lanes.join("\n")}
|
|
|
164357
164372
|
addRange(diags, program.getSuggestionDiagnostics(sourceFile, cancellationToken));
|
|
164358
164373
|
diags.sort((d1, d2) => d1.start - d2.start);
|
|
164359
164374
|
return diags;
|
|
164360
|
-
function check$
|
|
164375
|
+
function check$3(node) {
|
|
164361
164376
|
if (isJsFile) {
|
|
164362
164377
|
if (canBeConvertedToClass(node, checker)) diags.push(createDiagnosticForNode(isVariableDeclaration(node.parent) ? node.parent.name : node, Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration));
|
|
164363
164378
|
} else {
|
|
@@ -164370,7 +164385,7 @@ ${lanes.join("\n")}
|
|
|
164370
164385
|
if (ts_codefix_exports.parameterShouldGetTypeFromJSDoc(node)) diags.push(createDiagnosticForNode(node.name || node, Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types));
|
|
164371
164386
|
}
|
|
164372
164387
|
if (canBeConvertedToAsync(node)) addConvertToAsyncFunctionDiagnostics(node, checker, diags);
|
|
164373
|
-
node.forEachChild(check$
|
|
164388
|
+
node.forEachChild(check$3);
|
|
164374
164389
|
}
|
|
164375
164390
|
}
|
|
164376
164391
|
function containsTopLevelCommonjs(sourceFile) {
|
|
@@ -168279,12 +168294,12 @@ ${newComment.split("\n").map((c$1) => ` * ${c$1}`).join("\n")}
|
|
|
168279
168294
|
thisNode = node2;
|
|
168280
168295
|
}
|
|
168281
168296
|
break;
|
|
168282
|
-
case 219: forEachChild(node2, function check$
|
|
168297
|
+
case 219: forEachChild(node2, function check$3(n$1) {
|
|
168283
168298
|
if (isThis(n$1)) {
|
|
168284
168299
|
rangeFacts |= 8;
|
|
168285
168300
|
thisNode = node2;
|
|
168286
168301
|
} else if (isClassLike(n$1) || isFunctionLike(n$1) && !isArrowFunction(n$1)) return false;
|
|
168287
|
-
else forEachChild(n$1, check$
|
|
168302
|
+
else forEachChild(n$1, check$3);
|
|
168288
168303
|
});
|
|
168289
168304
|
case 263:
|
|
168290
168305
|
case 262: if (isSourceFile(node2.parent) && node2.parent.externalModuleIndicator === void 0) (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.functionWillNotBeVisibleInTheNewScope));
|
|
@@ -196664,12 +196679,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
196664
196679
|
getFileNames(excludeFilesFromExternalLibraries, excludeConfigFiles) {
|
|
196665
196680
|
if (!this.program) return [];
|
|
196666
196681
|
if (!this.languageServiceEnabled) {
|
|
196667
|
-
let rootFiles
|
|
196682
|
+
let rootFiles = this.getRootFiles();
|
|
196668
196683
|
if (this.compilerOptions) {
|
|
196669
196684
|
const defaultLibrary = getDefaultLibFilePath(this.compilerOptions);
|
|
196670
|
-
if (defaultLibrary) (rootFiles
|
|
196685
|
+
if (defaultLibrary) (rootFiles || (rootFiles = [])).push(asNormalizedPath(defaultLibrary));
|
|
196671
196686
|
}
|
|
196672
|
-
return rootFiles
|
|
196687
|
+
return rootFiles;
|
|
196673
196688
|
}
|
|
196674
196689
|
const result = [];
|
|
196675
196690
|
for (const f of this.program.getSourceFiles()) {
|
|
@@ -198979,12 +198994,12 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
198979
198994
|
if (this.openFiles.has(info.path) && (!isAncestorConfigFileInfo(info) || info.isForDefaultProject)) if (configFileExistenceInfo) (configFileExistenceInfo.openFilesImpactedByConfigFile ?? (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Set())).add(info.path);
|
|
198980
198995
|
else (openFilesImpactedByConfigFile = /* @__PURE__ */ new Set()).add(info.path);
|
|
198981
198996
|
if (configFileExistenceInfo) return configFileExistenceInfo.exists;
|
|
198982
|
-
const exists$
|
|
198997
|
+
const exists$1 = this.host.fileExists(configFileName);
|
|
198983
198998
|
this.configFileExistenceInfoCache.set(canonicalConfigFilePath, {
|
|
198984
|
-
exists: exists$
|
|
198999
|
+
exists: exists$1,
|
|
198985
199000
|
openFilesImpactedByConfigFile
|
|
198986
199001
|
});
|
|
198987
|
-
return exists$
|
|
199002
|
+
return exists$1;
|
|
198988
199003
|
}
|
|
198989
199004
|
createConfigFileWatcherForParsedConfig(configFileName, canonicalConfigFilePath, forProject) {
|
|
198990
199005
|
var _a, _b;
|
|
@@ -199376,9 +199391,9 @@ ${options.prefix}` : "\n" : options.prefix
|
|
|
199376
199391
|
return configFileExistenceInfo;
|
|
199377
199392
|
}
|
|
199378
199393
|
/** @internal */
|
|
199379
|
-
watchWildcards(configFileName, { exists: exists$
|
|
199394
|
+
watchWildcards(configFileName, { exists: exists$1, config: config$2 }, forProject) {
|
|
199380
199395
|
config$2.projects.set(forProject.canonicalConfigFilePath, true);
|
|
199381
|
-
if (exists$
|
|
199396
|
+
if (exists$1) {
|
|
199382
199397
|
if (config$2.watchedDirectories && !config$2.watchedDirectoriesStale) return;
|
|
199383
199398
|
config$2.watchedDirectoriesStale = false;
|
|
199384
199399
|
updateWatchingWildcardDirectories(config$2.watchedDirectories || (config$2.watchedDirectories = /* @__PURE__ */ new Map()), config$2.parsedCommandLine.wildcardDirectories, (directory, flags) => this.watchWildcardDirectory(directory, flags, configFileName, config$2));
|
|
@@ -200505,11 +200520,11 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
200505
200520
|
const result = this.applySafeListWorker(proj, proj.rootFiles, typeAcquisition);
|
|
200506
200521
|
return (result == null ? void 0 : result.excludedFiles) ?? [];
|
|
200507
200522
|
}
|
|
200508
|
-
applySafeListWorker(proj, rootFiles
|
|
200523
|
+
applySafeListWorker(proj, rootFiles, typeAcquisition) {
|
|
200509
200524
|
if (typeAcquisition.enable === false || typeAcquisition.disableFilenameBasedTypeAcquisition) return;
|
|
200510
200525
|
const typeAcqInclude = typeAcquisition.include || (typeAcquisition.include = []);
|
|
200511
200526
|
const excludeRules = [];
|
|
200512
|
-
const normalizedNames = rootFiles
|
|
200527
|
+
const normalizedNames = rootFiles.map((f) => normalizeSlashes(f.fileName));
|
|
200513
200528
|
for (const name$1 of Object.keys(this.safelist)) {
|
|
200514
200529
|
const rule2 = this.safelist[name$1];
|
|
200515
200530
|
for (const root of normalizedNames) if (rule2.match.test(root)) {
|
|
@@ -200541,7 +200556,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
200541
200556
|
const excludeRegexes = excludeRules.map((e) => new RegExp(e, "i"));
|
|
200542
200557
|
let filesToKeep;
|
|
200543
200558
|
let excludedFiles;
|
|
200544
|
-
for (let i$2 = 0; i$2 < rootFiles
|
|
200559
|
+
for (let i$2 = 0; i$2 < rootFiles.length; i$2++) if (excludeRegexes.some((re) => re.test(normalizedNames[i$2]))) addExcludedFile(i$2);
|
|
200545
200560
|
else {
|
|
200546
200561
|
if (typeAcquisition.enable) {
|
|
200547
200562
|
const baseName = getBaseFileName(toFileNameLowerCase(normalizedNames[i$2]));
|
|
@@ -200557,7 +200572,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
200557
200572
|
}
|
|
200558
200573
|
}
|
|
200559
200574
|
if (/^.+[.-]min\.js$/.test(normalizedNames[i$2])) addExcludedFile(i$2);
|
|
200560
|
-
else filesToKeep?.push(rootFiles
|
|
200575
|
+
else filesToKeep?.push(rootFiles[i$2]);
|
|
200561
200576
|
}
|
|
200562
200577
|
return excludedFiles ? {
|
|
200563
200578
|
rootFiles: filesToKeep,
|
|
@@ -200566,7 +200581,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
200566
200581
|
function addExcludedFile(index) {
|
|
200567
200582
|
if (!excludedFiles) {
|
|
200568
200583
|
Debug.assert(!filesToKeep);
|
|
200569
|
-
filesToKeep = rootFiles
|
|
200584
|
+
filesToKeep = rootFiles.slice(0, index);
|
|
200570
200585
|
excludedFiles = [];
|
|
200571
200586
|
}
|
|
200572
200587
|
excludedFiles.push(normalizedNames[index]);
|
|
@@ -200575,7 +200590,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
200575
200590
|
openExternalProject(proj, cleanupAfter) {
|
|
200576
200591
|
const existingExternalProject = this.findExternalProjectByProjectName(proj.projectFileName);
|
|
200577
200592
|
let configuredProjects;
|
|
200578
|
-
let rootFiles
|
|
200593
|
+
let rootFiles = [];
|
|
200579
200594
|
for (const file$2 of proj.rootFiles) {
|
|
200580
200595
|
const normalized = toNormalizedPath(file$2.fileName);
|
|
200581
200596
|
if (getBaseConfigFileName(normalized)) {
|
|
@@ -200588,7 +200603,7 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
200588
200603
|
(configuredProjects ?? (configuredProjects = /* @__PURE__ */ new Set())).add(project);
|
|
200589
200604
|
Debug.assert(!project.isClosed());
|
|
200590
200605
|
}
|
|
200591
|
-
} else rootFiles
|
|
200606
|
+
} else rootFiles.push(file$2);
|
|
200592
200607
|
}
|
|
200593
200608
|
if (configuredProjects) {
|
|
200594
200609
|
this.externalProjectToConfiguredProjectMap.set(proj.projectFileName, configuredProjects);
|
|
@@ -200598,21 +200613,21 @@ Dynamic files must always be opened with service's current directory or service
|
|
|
200598
200613
|
const typeAcquisition = proj.typeAcquisition || {};
|
|
200599
200614
|
typeAcquisition.include = typeAcquisition.include || [];
|
|
200600
200615
|
typeAcquisition.exclude = typeAcquisition.exclude || [];
|
|
200601
|
-
if (typeAcquisition.enable === void 0) typeAcquisition.enable = hasNoTypeScriptSource(rootFiles
|
|
200602
|
-
const excludeResult = this.applySafeListWorker(proj, rootFiles
|
|
200616
|
+
if (typeAcquisition.enable === void 0) typeAcquisition.enable = hasNoTypeScriptSource(rootFiles.map((f) => f.fileName));
|
|
200617
|
+
const excludeResult = this.applySafeListWorker(proj, rootFiles, typeAcquisition);
|
|
200603
200618
|
const excludedFiles = (excludeResult == null ? void 0 : excludeResult.excludedFiles) ?? [];
|
|
200604
|
-
rootFiles
|
|
200619
|
+
rootFiles = (excludeResult == null ? void 0 : excludeResult.rootFiles) ?? rootFiles;
|
|
200605
200620
|
if (existingExternalProject) {
|
|
200606
200621
|
existingExternalProject.excludedFiles = excludedFiles;
|
|
200607
200622
|
const compilerOptions = convertCompilerOptions(proj.options);
|
|
200608
200623
|
const watchOptionsAndErrors = convertWatchOptions(proj.options, existingExternalProject.getCurrentDirectory());
|
|
200609
|
-
const lastFileExceededProgramSize = this.getFilenameForExceededTotalSizeLimitForNonTsFiles(proj.projectFileName, compilerOptions, rootFiles
|
|
200624
|
+
const lastFileExceededProgramSize = this.getFilenameForExceededTotalSizeLimitForNonTsFiles(proj.projectFileName, compilerOptions, rootFiles, externalFilePropertyReader);
|
|
200610
200625
|
if (lastFileExceededProgramSize) existingExternalProject.disableLanguageService(lastFileExceededProgramSize);
|
|
200611
200626
|
else existingExternalProject.enableLanguageService();
|
|
200612
200627
|
existingExternalProject.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors);
|
|
200613
|
-
this.updateRootAndOptionsOfNonInferredProject(existingExternalProject, rootFiles
|
|
200628
|
+
this.updateRootAndOptionsOfNonInferredProject(existingExternalProject, rootFiles, externalFilePropertyReader, compilerOptions, typeAcquisition, proj.options.compileOnSave, watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions);
|
|
200614
200629
|
existingExternalProject.updateGraph();
|
|
200615
|
-
} else this.createExternalProject(proj.projectFileName, rootFiles
|
|
200630
|
+
} else this.createExternalProject(proj.projectFileName, rootFiles, proj.options, typeAcquisition, excludedFiles).updateGraph();
|
|
200616
200631
|
}
|
|
200617
200632
|
if (cleanupAfter) {
|
|
200618
200633
|
this.cleanupConfiguredProjects(configuredProjects, /* @__PURE__ */ new Set([proj.projectFileName]));
|
|
@@ -230148,7 +230163,7 @@ async function updateNextjsProject(context$1) {
|
|
|
230148
230163
|
"cjs",
|
|
230149
230164
|
"mjs"
|
|
230150
230165
|
].map((ext$1) => resolve(context$1.cwd, `${name$1}.${ext$1}`));
|
|
230151
|
-
const foundIdx = (await Promise.all(candidates.map((candidate) => exists(candidate)))).findIndex((exists$
|
|
230166
|
+
const foundIdx = (await Promise.all(candidates.map((candidate) => exists(candidate)))).findIndex((exists$1) => exists$1);
|
|
230152
230167
|
if (foundIdx !== -1) return {
|
|
230153
230168
|
path: candidates[foundIdx],
|
|
230154
230169
|
exists: true
|
|
@@ -230676,7 +230691,7 @@ async function createToken(keyName, accountIds, permissionGroupIds, credentials)
|
|
|
230676
230691
|
}
|
|
230677
230692
|
async function createCloudflareGodToken() {
|
|
230678
230693
|
Ie(pc.cyan("🧪 Create Cloudflare God Token"));
|
|
230679
|
-
const apiKey = await ge({ message: "Enter Cloudflare API Key" });
|
|
230694
|
+
const apiKey = await ge({ message: "Enter Cloudflare Global API Key. It can be found in the cloudflare dashboard: https://dash.cloudflare.com/profile/api-tokens" });
|
|
230680
230695
|
if (pD(apiKey)) throw new CancelSignal();
|
|
230681
230696
|
const accountEmail = await he({
|
|
230682
230697
|
message: "Enter account email",
|
|
@@ -230705,7 +230720,7 @@ async function createCloudflareGodToken() {
|
|
|
230705
230720
|
M.info(pc.dim(`Added account ID: ${trimmedId}`));
|
|
230706
230721
|
}
|
|
230707
230722
|
}
|
|
230708
|
-
M.error(pc.red("
|
|
230723
|
+
M.error(pc.red("⚠️ This token has full access to your cloudflare account, make sure you keep it secure!"));
|
|
230709
230724
|
const confirmCreate = await ye({
|
|
230710
230725
|
message: "Do you understand the risks and want to proceed?",
|
|
230711
230726
|
initialValue: false
|
|
@@ -230738,7 +230753,7 @@ async function createCloudflareProfileToken(input) {
|
|
|
230738
230753
|
const ids = CLOUDFLARE_OAUTH_SCOPES_TO_PERMISSION_GROUP_IDS[scope];
|
|
230739
230754
|
if (ids != null) permissionGroupIds.push(...ids);
|
|
230740
230755
|
}
|
|
230741
|
-
const apiKey = await ge({ message: "Enter Cloudflare API Key" });
|
|
230756
|
+
const apiKey = await ge({ message: "Enter Cloudflare Global API Key. It can be found in the cloudflare dashboard: https://dash.cloudflare.com/profile/api-tokens" });
|
|
230742
230757
|
if (pD(apiKey)) throw new CancelSignal();
|
|
230743
230758
|
const accountEmail = await he({
|
|
230744
230759
|
message: "Enter account email",
|