alchemy 0.21.0 → 0.22.1
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/lib/ai/astro-file.d.ts +4 -4
- package/lib/ai/client.d.ts +1 -1
- package/lib/ai/css-file.d.ts +4 -4
- package/lib/ai/data.d.ts +4 -4
- package/lib/ai/document.d.ts +5 -5
- package/lib/ai/html-file.d.ts +4 -4
- package/lib/ai/index.d.ts +10 -10
- package/lib/ai/json-file.d.ts +4 -4
- package/lib/ai/typescript-file.d.ts +4 -4
- package/lib/ai/vue-file.d.ts +4 -4
- package/lib/ai/yaml-file.d.ts +4 -4
- package/lib/alchemy.d.ts +5 -5
- package/lib/apply.d.ts +2 -2
- package/lib/aws/bucket.d.ts +2 -2
- package/lib/aws/control/error.d.ts +1 -1
- package/lib/aws/control/index.d.ts +4 -4
- package/lib/aws/control/resource.d.ts +2 -2
- package/lib/aws/credentials.d.ts +1 -1
- package/lib/aws/function.d.ts +3 -3
- package/lib/aws/index.d.ts +9 -9
- package/lib/aws/oidc/github-oidc-provider.d.ts +1 -1
- package/lib/aws/oidc/index.d.ts +2 -2
- package/lib/aws/oidc/oidc-provider.d.ts +2 -2
- package/lib/aws/policy-attachment.d.ts +2 -2
- package/lib/aws/policy.d.ts +2 -2
- package/lib/aws/queue.d.ts +2 -2
- package/lib/aws/role.d.ts +3 -3
- package/lib/aws/ses.d.ts +2 -2
- package/lib/aws/table.d.ts +2 -2
- package/lib/cloudflare/account-api-token.d.ts +5 -5
- package/lib/cloudflare/account-id.d.ts +1 -1
- package/lib/cloudflare/ai-gateway.d.ts +3 -3
- package/lib/cloudflare/api.d.ts +2 -2
- package/lib/cloudflare/assets.d.ts +2 -2
- package/lib/cloudflare/auth.d.ts +1 -1
- package/lib/cloudflare/bindings.d.ts +18 -18
- package/lib/cloudflare/bound.d.ts +16 -16
- package/lib/cloudflare/bucket.d.ts +4 -4
- package/lib/cloudflare/bundle/bundle-worker.d.ts +2 -2
- package/lib/cloudflare/bundle/bundle-worker.d.ts.map +1 -1
- package/lib/cloudflare/bundle/bundle-worker.js +4 -0
- package/lib/cloudflare/bundle/bundle-worker.js.map +1 -1
- package/lib/cloudflare/bundle/wasm-plugin.d.ts +3 -0
- package/lib/cloudflare/bundle/wasm-plugin.d.ts.map +1 -0
- package/lib/cloudflare/bundle/wasm-plugin.js +53 -0
- package/lib/cloudflare/bundle/wasm-plugin.js.map +1 -0
- package/lib/cloudflare/custom-domain.d.ts +3 -3
- package/lib/cloudflare/custom-domain.js.map +1 -1
- package/lib/cloudflare/d1-clone.d.ts +3 -3
- package/lib/cloudflare/d1-database.d.ts +3 -3
- package/lib/cloudflare/d1-export.d.ts +1 -1
- package/lib/cloudflare/d1-import.d.ts +1 -1
- package/lib/cloudflare/d1-migrations.d.ts +1 -1
- package/lib/cloudflare/dns-records.d.ts +4 -4
- package/lib/cloudflare/durable-object-namespace.d.ts +1 -1
- package/lib/cloudflare/event-source.d.ts +2 -2
- package/lib/cloudflare/hyperdrive.d.ts +4 -4
- package/lib/cloudflare/index.d.ts +40 -39
- package/lib/cloudflare/index.d.ts.map +1 -1
- package/lib/cloudflare/index.js +1 -0
- package/lib/cloudflare/index.js.map +1 -1
- package/lib/cloudflare/kv-namespace.d.ts +3 -3
- package/lib/cloudflare/nuxt.d.ts +4 -4
- package/lib/cloudflare/nuxt.d.ts.map +1 -1
- package/lib/cloudflare/nuxt.js +2 -1
- package/lib/cloudflare/nuxt.js.map +1 -1
- package/lib/cloudflare/permission-groups.d.ts +3 -3
- package/lib/cloudflare/pipeline.d.ts +4 -4
- package/lib/cloudflare/queue-consumer.d.ts +4 -4
- package/lib/cloudflare/queue.d.ts +3 -3
- package/lib/cloudflare/r2-rest-state-store.d.ts +3 -3
- package/lib/cloudflare/react-router.d.ts +13 -0
- package/lib/cloudflare/react-router.d.ts.map +1 -0
- package/lib/cloudflare/react-router.js +29 -0
- package/lib/cloudflare/react-router.js.map +1 -0
- package/lib/cloudflare/redwood.d.ts +4 -4
- package/lib/cloudflare/route.d.ts +4 -4
- package/lib/cloudflare/tanstack-start.d.ts +4 -4
- package/lib/cloudflare/user.d.ts +2 -2
- package/lib/cloudflare/vectorize-index.d.ts +3 -3
- package/lib/cloudflare/vectorize-metadata-index.d.ts +4 -4
- package/lib/cloudflare/vite.d.ts +4 -4
- package/lib/cloudflare/website.d.ts +3 -3
- package/lib/cloudflare/website.d.ts.map +1 -1
- package/lib/cloudflare/website.js +30 -35
- package/lib/cloudflare/website.js.map +1 -1
- package/lib/cloudflare/worker-assets.d.ts +3 -3
- package/lib/cloudflare/worker-metadata.d.ts +5 -5
- package/lib/cloudflare/worker-stub.d.ts +3 -3
- package/lib/cloudflare/worker.d.ts +12 -11
- package/lib/cloudflare/worker.d.ts.map +1 -1
- package/lib/cloudflare/worker.js +2 -1
- package/lib/cloudflare/worker.js.map +1 -1
- package/lib/cloudflare/workflow.d.ts +2 -2
- package/lib/cloudflare/wrangler.json.d.ts +13 -2
- package/lib/cloudflare/wrangler.json.d.ts.map +1 -1
- package/lib/cloudflare/wrangler.json.js +1 -0
- package/lib/cloudflare/wrangler.json.js.map +1 -1
- package/lib/cloudflare/zone.d.ts +4 -4
- package/lib/context.d.ts +3 -3
- package/lib/destroy.d.ts +2 -2
- package/lib/dns/import-dns.d.ts +3 -3
- package/lib/dns/index.d.ts +2 -2
- package/lib/esbuild/bundle.d.ts +2 -2
- package/lib/esbuild/index.d.ts +1 -1
- package/lib/fs/copy-file.d.ts +2 -2
- package/lib/fs/file-system-state-store.d.ts +2 -2
- package/lib/fs/file.d.ts +5 -5
- package/lib/fs/folder.d.ts +2 -2
- package/lib/fs/index.d.ts +14 -14
- package/lib/fs/static-astro-file.d.ts +1 -1
- package/lib/fs/static-css-file.d.ts +1 -1
- package/lib/fs/static-html-file.d.ts +1 -1
- package/lib/fs/static-json-file.d.ts +1 -1
- package/lib/fs/static-text-file.d.ts +1 -1
- package/lib/fs/static-typescript-file.d.ts +1 -1
- package/lib/fs/static-vue-file.d.ts +1 -1
- package/lib/fs/static-yaml-file.d.ts +1 -1
- package/lib/github/index.d.ts +2 -2
- package/lib/github/repository-environment.d.ts +2 -2
- package/lib/github/secret.d.ts +3 -3
- package/lib/index.d.ts +10 -10
- package/lib/internal/docs/providers.d.ts +2 -2
- package/lib/neon/api.d.ts +1 -1
- package/lib/neon/index.d.ts +3 -3
- package/lib/neon/project.d.ts +4 -4
- package/lib/os/exec.d.ts +2 -2
- package/lib/os/index.d.ts +1 -1
- package/lib/resource.d.ts +2 -2
- package/lib/runtime/bind.d.ts +3 -3
- package/lib/runtime/global.d.ts +1 -1
- package/lib/runtime/state.d.ts +1 -1
- package/lib/scope.d.ts +3 -3
- package/lib/sentry/api.d.ts +1 -1
- package/lib/sentry/client-key.d.ts +3 -3
- package/lib/sentry/index.d.ts +4 -4
- package/lib/sentry/project.d.ts +3 -3
- package/lib/sentry/team.d.ts +3 -3
- package/lib/serde.d.ts +3 -3
- package/lib/state.d.ts +2 -2
- package/lib/stripe/index.d.ts +4 -4
- package/lib/stripe/index.d.ts.map +1 -1
- package/lib/stripe/index.js +1 -1
- package/lib/stripe/index.js.map +1 -1
- package/lib/stripe/meter.d.ts +2 -2
- package/lib/stripe/price.d.ts +2 -2
- package/lib/stripe/product.d.ts +2 -2
- package/lib/stripe/webhook.d.ts +2 -2
- package/lib/test/bun.d.ts +3 -3
- package/lib/upstash/api.d.ts +1 -1
- package/lib/upstash/index.d.ts +3 -3
- package/lib/upstash/redis.d.ts +4 -4
- package/lib/vercel/api.d.ts +1 -1
- package/lib/vercel/index.d.ts +3 -3
- package/lib/vercel/project-domain.d.ts +3 -3
- package/lib/vercel/project.d.ts +4 -4
- package/lib/web/astro.d.ts +2 -2
- package/lib/web/shadcn-component.d.ts +2 -2
- package/lib/web/shadcn.d.ts +3 -3
- package/lib/web/tailwind.d.ts +2 -2
- package/lib/web/vite.d.ts +2 -2
- package/lib/web/vitepress/config.d.ts +1 -1
- package/lib/web/vitepress/custom-theme.d.ts +4 -4
- package/lib/web/vitepress/dependencies.d.ts +2 -2
- package/lib/web/vitepress/home-page.d.ts +3 -3
- package/lib/web/vitepress/index.d.ts +5 -5
- package/lib/web/vitepress/vitepress.d.ts +2 -2
- package/package.json +7 -7
- package/src/ai/astro-file.ts +5 -5
- package/src/ai/client.ts +1 -1
- package/src/ai/css-file.ts +5 -5
- package/src/ai/data.ts +5 -5
- package/src/ai/document.ts +5 -5
- package/src/ai/html-file.ts +5 -5
- package/src/ai/index.ts +10 -10
- package/src/ai/json-file.ts +6 -6
- package/src/ai/typescript-file.ts +5 -5
- package/src/ai/vue-file.ts +5 -5
- package/src/ai/yaml-file.ts +6 -6
- package/src/alchemy.ts +9 -9
- package/src/apply.ts +6 -6
- package/src/aws/bucket.ts +3 -3
- package/src/aws/control/client.ts +1 -1
- package/src/aws/control/error.ts +1 -1
- package/src/aws/control/index.ts +4 -4
- package/src/aws/control/proxy.ts +1 -1
- package/src/aws/control/resource.ts +5 -5
- package/src/aws/credentials.ts +1 -1
- package/src/aws/function.ts +4 -4
- package/src/aws/index.ts +9 -9
- package/src/aws/oidc/github-oidc-provider.ts +1 -1
- package/src/aws/oidc/index.ts +2 -2
- package/src/aws/oidc/oidc-provider.ts +3 -3
- package/src/aws/policy-attachment.ts +3 -3
- package/src/aws/policy.ts +2 -2
- package/src/aws/queue.ts +2 -2
- package/src/aws/role.ts +4 -4
- package/src/aws/ses.ts +3 -3
- package/src/aws/table.ts +4 -4
- package/src/cloudflare/account-api-token.ts +7 -7
- package/src/cloudflare/account-id.ts +1 -1
- package/src/cloudflare/ai-gateway.ts +6 -6
- package/src/cloudflare/api.ts +5 -5
- package/src/cloudflare/assets.ts +3 -3
- package/src/cloudflare/auth.ts +1 -1
- package/src/cloudflare/bindings.ts +18 -18
- package/src/cloudflare/bound.ts +16 -16
- package/src/cloudflare/bucket.ts +7 -7
- package/src/cloudflare/bundle/bundle-worker.ts +12 -8
- package/src/cloudflare/bundle/local-dev-cloudflare-shim.ts +1 -1
- package/src/cloudflare/bundle/nodejs-compat.ts +1 -1
- package/src/cloudflare/bundle/wasm-plugin.ts +57 -0
- package/src/cloudflare/custom-domain.ts +5 -5
- package/src/cloudflare/d1-clone.ts +3 -3
- package/src/cloudflare/d1-database.ts +7 -7
- package/src/cloudflare/d1-export.ts +1 -1
- package/src/cloudflare/d1-import.ts +1 -1
- package/src/cloudflare/d1-migrations.ts +2 -2
- package/src/cloudflare/dns-records.ts +5 -5
- package/src/cloudflare/durable-object-namespace.ts +1 -1
- package/src/cloudflare/event-source.ts +2 -2
- package/src/cloudflare/hyperdrive.ts +7 -7
- package/src/cloudflare/index.ts +40 -39
- package/src/cloudflare/kv-namespace.ts +7 -7
- package/src/cloudflare/nuxt.ts +6 -5
- package/src/cloudflare/permission-groups.ts +3 -3
- package/src/cloudflare/pipeline.ts +7 -7
- package/src/cloudflare/queue-consumer.ts +5 -5
- package/src/cloudflare/queue.ts +6 -6
- package/src/cloudflare/r2-rest-state-store.ts +8 -8
- package/src/cloudflare/react-router.ts +45 -0
- package/src/cloudflare/redwood.ts +4 -4
- package/src/cloudflare/route.ts +5 -5
- package/src/cloudflare/tanstack-start.ts +4 -4
- package/src/cloudflare/user.ts +3 -3
- package/src/cloudflare/vectorize-index.ts +6 -6
- package/src/cloudflare/vectorize-metadata-index.ts +5 -5
- package/src/cloudflare/vite.ts +4 -4
- package/src/cloudflare/website.ts +42 -48
- package/src/cloudflare/worker-assets.ts +4 -4
- package/src/cloudflare/worker-metadata.ts +7 -7
- package/src/cloudflare/worker-stub.ts +4 -4
- package/src/cloudflare/worker.ts +36 -33
- package/src/cloudflare/workflow.ts +3 -3
- package/src/cloudflare/wrangler.json.ts +17 -2
- package/src/cloudflare/zone.ts +5 -5
- package/src/context.ts +4 -4
- package/src/destroy.ts +4 -4
- package/src/dns/import-dns.ts +3 -3
- package/src/dns/index.ts +2 -2
- package/src/esbuild/bundle.ts +2 -2
- package/src/esbuild/index.ts +1 -1
- package/src/fs/copy-file.ts +3 -3
- package/src/fs/file-system-state-store.ts +5 -5
- package/src/fs/file.ts +7 -7
- package/src/fs/folder.ts +3 -3
- package/src/fs/index.ts +14 -14
- package/src/fs/static-astro-file.ts +1 -1
- package/src/fs/static-css-file.ts +1 -1
- package/src/fs/static-html-file.ts +1 -1
- package/src/fs/static-json-file.ts +1 -1
- package/src/fs/static-text-file.ts +1 -1
- package/src/fs/static-typescript-file.ts +1 -1
- package/src/fs/static-vue-file.ts +1 -1
- package/src/fs/static-yaml-file.ts +1 -1
- package/src/github/index.ts +2 -2
- package/src/github/repository-environment.ts +3 -3
- package/src/github/secret.ts +4 -4
- package/src/index.ts +10 -10
- package/src/internal/docs/providers.ts +4 -4
- package/src/neon/api.ts +2 -2
- package/src/neon/index.ts +3 -3
- package/src/neon/project.ts +6 -6
- package/src/os/exec.ts +2 -2
- package/src/os/index.ts +1 -1
- package/src/resource.ts +3 -3
- package/src/runtime/bind.ts +7 -7
- package/src/runtime/global.ts +1 -1
- package/src/runtime/state.ts +1 -1
- package/src/scope.ts +5 -5
- package/src/secret.ts +1 -1
- package/src/sentry/api.ts +2 -2
- package/src/sentry/client-key.ts +4 -4
- package/src/sentry/index.ts +4 -4
- package/src/sentry/project.ts +4 -4
- package/src/sentry/team.ts +4 -4
- package/src/serde.ts +4 -4
- package/src/state.ts +3 -3
- package/src/stripe/index.ts +4 -4
- package/src/stripe/meter.ts +2 -2
- package/src/stripe/price.ts +2 -2
- package/src/stripe/product.ts +2 -2
- package/src/stripe/webhook.ts +2 -2
- package/src/test/bun.ts +5 -5
- package/src/upstash/api.ts +1 -1
- package/src/upstash/index.ts +3 -3
- package/src/upstash/redis.ts +6 -6
- package/src/vercel/api.ts +2 -2
- package/src/vercel/index.ts +3 -3
- package/src/vercel/project-domain.ts +4 -4
- package/src/vercel/project.ts +4 -4
- package/src/web/astro.ts +7 -7
- package/src/web/shadcn-component.ts +3 -3
- package/src/web/shadcn.ts +6 -6
- package/src/web/tailwind.ts +4 -4
- package/src/web/vite.ts +8 -8
- package/src/web/vitepress/config.ts +1 -1
- package/src/web/vitepress/custom-theme.ts +10 -10
- package/src/web/vitepress/dependencies.ts +2 -2
- package/src/web/vitepress/home-page.ts +4 -4
- package/src/web/vitepress/index.ts +5 -5
- package/src/web/vitepress/vitepress.ts +7 -7
- package/lib/runtime/shims.d.ts +0 -6
- package/lib/runtime/shims.d.ts.map +0 -1
- package/lib/runtime/shims.js +0 -27
- package/lib/runtime/shims.js.map +0 -1
package/lib/ai/astro-file.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import prettier from "prettier";
|
|
2
|
-
import type { Context } from "../context.
|
|
3
|
-
import { Resource } from "../resource.
|
|
4
|
-
import type { Secret } from "../secret.
|
|
5
|
-
import { type ModelConfig } from "./client.
|
|
2
|
+
import type { Context } from "../context.ts";
|
|
3
|
+
import { Resource } from "../resource.ts";
|
|
4
|
+
import type { Secret } from "../secret.ts";
|
|
5
|
+
import { type ModelConfig } from "./client.ts";
|
|
6
6
|
/**
|
|
7
7
|
* Properties for creating or updating an AstroFile
|
|
8
8
|
*/
|
package/lib/ai/client.d.ts
CHANGED
package/lib/ai/css-file.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Context } from "../context.
|
|
2
|
-
import { Resource } from "../resource.
|
|
3
|
-
import type { Secret } from "../secret.
|
|
4
|
-
import { type ModelConfig } from "./client.
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import { Resource } from "../resource.ts";
|
|
3
|
+
import type { Secret } from "../secret.ts";
|
|
4
|
+
import { type ModelConfig } from "./client.ts";
|
|
5
5
|
/**
|
|
6
6
|
* Properties for creating or updating a CSSFile
|
|
7
7
|
*/
|
package/lib/ai/data.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type CoreMessage } from "ai";
|
|
2
2
|
import type { JsonSchema, Type, type } from "arktype";
|
|
3
|
-
import type { Context } from "../context.
|
|
4
|
-
import { Resource } from "../resource.
|
|
5
|
-
import type { Secret } from "../secret.
|
|
6
|
-
import { type ModelConfig } from "./client.
|
|
3
|
+
import type { Context } from "../context.ts";
|
|
4
|
+
import { Resource } from "../resource.ts";
|
|
5
|
+
import type { Secret } from "../secret.ts";
|
|
6
|
+
import { type ModelConfig } from "./client.ts";
|
|
7
7
|
/**
|
|
8
8
|
* Properties for creating or updating an AI Object
|
|
9
9
|
*/
|
package/lib/ai/document.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type CoreMessage } from "ai";
|
|
2
|
-
import type { Context } from "../context.
|
|
3
|
-
import { StaticTextFile } from "../fs/static-text-file.
|
|
4
|
-
import { Resource } from "../resource.
|
|
5
|
-
import type { Secret } from "../secret.
|
|
6
|
-
import { type ModelConfig } from "./client.
|
|
2
|
+
import type { Context } from "../context.ts";
|
|
3
|
+
import { StaticTextFile } from "../fs/static-text-file.ts";
|
|
4
|
+
import { Resource } from "../resource.ts";
|
|
5
|
+
import type { Secret } from "../secret.ts";
|
|
6
|
+
import { type ModelConfig } from "./client.ts";
|
|
7
7
|
/**
|
|
8
8
|
* Properties for creating or updating a Document
|
|
9
9
|
*/
|
package/lib/ai/html-file.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Context } from "../context.
|
|
2
|
-
import { Resource } from "../resource.
|
|
3
|
-
import type { Secret } from "../secret.
|
|
4
|
-
import { type ModelConfig } from "./client.
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import { Resource } from "../resource.ts";
|
|
3
|
+
import type { Secret } from "../secret.ts";
|
|
4
|
+
import { type ModelConfig } from "./client.ts";
|
|
5
5
|
/**
|
|
6
6
|
* Properties for creating or updating an HTMLFile
|
|
7
7
|
*/
|
package/lib/ai/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from "./ark.
|
|
2
|
-
export * from "./astro-file.
|
|
3
|
-
export * from "./css-file.
|
|
4
|
-
export * from "./data.
|
|
5
|
-
export * from "./document.
|
|
6
|
-
export * from "./html-file.
|
|
7
|
-
export * from "./json-file.
|
|
8
|
-
export * from "./typescript-file.
|
|
9
|
-
export * from "./vue-file.
|
|
10
|
-
export * from "./yaml-file.
|
|
1
|
+
export * from "./ark.ts";
|
|
2
|
+
export * from "./astro-file.ts";
|
|
3
|
+
export * from "./css-file.ts";
|
|
4
|
+
export * from "./data.ts";
|
|
5
|
+
export * from "./document.ts";
|
|
6
|
+
export * from "./html-file.ts";
|
|
7
|
+
export * from "./json-file.ts";
|
|
8
|
+
export * from "./typescript-file.ts";
|
|
9
|
+
export * from "./vue-file.ts";
|
|
10
|
+
export * from "./yaml-file.ts";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/ai/json-file.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { JsonSchema, Type, type } from "arktype";
|
|
2
|
-
import type { Context } from "../context.
|
|
3
|
-
import { Resource } from "../resource.
|
|
4
|
-
import type { Secret } from "../secret.
|
|
5
|
-
import { type ModelConfig } from "./client.
|
|
2
|
+
import type { Context } from "../context.ts";
|
|
3
|
+
import { Resource } from "../resource.ts";
|
|
4
|
+
import type { Secret } from "../secret.ts";
|
|
5
|
+
import { type ModelConfig } from "./client.ts";
|
|
6
6
|
/**
|
|
7
7
|
* Properties for creating or updating a JSONFile
|
|
8
8
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Context } from "../context.
|
|
2
|
-
import { Resource } from "../resource.
|
|
3
|
-
import type { Secret } from "../secret.
|
|
4
|
-
import { type ModelConfig } from "./client.
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import { Resource } from "../resource.ts";
|
|
3
|
+
import type { Secret } from "../secret.ts";
|
|
4
|
+
import { type ModelConfig } from "./client.ts";
|
|
5
5
|
/**
|
|
6
6
|
* Properties for creating or updating a TypeScriptFile
|
|
7
7
|
*/
|
package/lib/ai/vue-file.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Context } from "../context.
|
|
2
|
-
import { Resource } from "../resource.
|
|
3
|
-
import type { Secret } from "../secret.
|
|
4
|
-
import { type ModelConfig } from "./client.
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import { Resource } from "../resource.ts";
|
|
3
|
+
import type { Secret } from "../secret.ts";
|
|
4
|
+
import { type ModelConfig } from "./client.ts";
|
|
5
5
|
/**
|
|
6
6
|
* Properties for creating or updating a VueFile
|
|
7
7
|
*/
|
package/lib/ai/yaml-file.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { JsonSchema, Type, type } from "arktype";
|
|
2
|
-
import type { Context } from "../context.
|
|
3
|
-
import { Resource } from "../resource.
|
|
4
|
-
import type { Secret } from "../secret.
|
|
5
|
-
import { type ModelConfig } from "./client.
|
|
2
|
+
import type { Context } from "../context.ts";
|
|
3
|
+
import { Resource } from "../resource.ts";
|
|
4
|
+
import type { Secret } from "../secret.ts";
|
|
5
|
+
import { type ModelConfig } from "./client.ts";
|
|
6
6
|
/**
|
|
7
7
|
* Properties for creating or updating a YAMLFile
|
|
8
8
|
*/
|
package/lib/alchemy.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { destroy } from "./destroy.
|
|
2
|
-
import { env } from "./env.
|
|
3
|
-
import { Scope } from "./scope.
|
|
4
|
-
import { secret } from "./secret.
|
|
5
|
-
import type { StateStoreType } from "./state.
|
|
1
|
+
import { destroy } from "./destroy.ts";
|
|
2
|
+
import { env } from "./env.ts";
|
|
3
|
+
import { Scope } from "./scope.ts";
|
|
4
|
+
import { secret } from "./secret.ts";
|
|
5
|
+
import type { StateStoreType } from "./state.ts";
|
|
6
6
|
/**
|
|
7
7
|
* Type alias for semantic highlighting of `alchemy` as a type keyword
|
|
8
8
|
*/
|
package/lib/apply.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type PendingResource, type Resource, type ResourceProps } from "./resource.
|
|
2
|
-
import { Scope } from "./scope.
|
|
1
|
+
import { type PendingResource, type Resource, type ResourceProps } from "./resource.ts";
|
|
2
|
+
import { Scope } from "./scope.ts";
|
|
3
3
|
export interface ApplyOptions {
|
|
4
4
|
quiet?: boolean;
|
|
5
5
|
alwaysUpdate?: boolean;
|
package/lib/aws/bucket.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./client.
|
|
2
|
-
export * from "./proxy.
|
|
3
|
-
export * from "./resource.
|
|
4
|
-
import { AWS } from "./proxy.
|
|
1
|
+
export * from "./client.ts";
|
|
2
|
+
export * from "./proxy.ts";
|
|
3
|
+
export * from "./resource.ts";
|
|
4
|
+
import { AWS } from "./proxy.ts";
|
|
5
5
|
export default AWS;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Context } from "../../context.
|
|
2
|
-
import { Resource } from "../../resource.
|
|
1
|
+
import type { Context } from "../../context.ts";
|
|
2
|
+
import { Resource } from "../../resource.ts";
|
|
3
3
|
/**
|
|
4
4
|
* Properties for creating or updating a Cloud Control resource
|
|
5
5
|
*/
|
package/lib/aws/credentials.d.ts
CHANGED
package/lib/aws/function.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Architecture, Runtime } from "@aws-sdk/client-lambda";
|
|
2
|
-
import type { Context } from "../context.
|
|
3
|
-
import type { Bundle } from "../esbuild/bundle.
|
|
4
|
-
import { Resource } from "../resource.
|
|
2
|
+
import type { Context } from "../context.ts";
|
|
3
|
+
import type { Bundle } from "../esbuild/bundle.ts";
|
|
4
|
+
import { Resource } from "../resource.ts";
|
|
5
5
|
/**
|
|
6
6
|
* Properties for creating or updating a Lambda function
|
|
7
7
|
*/
|
package/lib/aws/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from "./account-id.
|
|
2
|
-
export * from "./bucket.
|
|
3
|
-
export * from "./function.
|
|
4
|
-
export * from "./policy-attachment.
|
|
5
|
-
export * from "./policy.
|
|
6
|
-
export * from "./queue.
|
|
7
|
-
export * from "./role.
|
|
8
|
-
export * from "./ses.
|
|
9
|
-
export * from "./table.
|
|
1
|
+
export * from "./account-id.ts";
|
|
2
|
+
export * from "./bucket.ts";
|
|
3
|
+
export * from "./function.ts";
|
|
4
|
+
export * from "./policy-attachment.ts";
|
|
5
|
+
export * from "./policy.ts";
|
|
6
|
+
export * from "./queue.ts";
|
|
7
|
+
export * from "./role.ts";
|
|
8
|
+
export * from "./ses.ts";
|
|
9
|
+
export * from "./table.ts";
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OIDCProvider, type OIDCProviderProps } from "./oidc-provider.
|
|
1
|
+
import { OIDCProvider, type OIDCProviderProps } from "./oidc-provider.ts";
|
|
2
2
|
/**
|
|
3
3
|
* Properties for configuring GitHub-specific OIDC provider
|
|
4
4
|
* Simplified version of OIDCProviderProps that omits the thumbprint
|
package/lib/aws/oidc/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./github-oidc-provider.
|
|
2
|
-
export * from "./oidc-provider.
|
|
1
|
+
export * from "./github-oidc-provider.ts";
|
|
2
|
+
export * from "./oidc-provider.ts";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Context } from "../../context.
|
|
2
|
-
import { Resource } from "../../resource.
|
|
1
|
+
import type { Context } from "../../context.ts";
|
|
2
|
+
import { Resource } from "../../resource.ts";
|
|
3
3
|
/**
|
|
4
4
|
* Properties for configuring an AWS OIDC provider for GitHub Actions
|
|
5
5
|
*/
|
package/lib/aws/policy.d.ts
CHANGED
package/lib/aws/queue.d.ts
CHANGED
package/lib/aws/role.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Context } from "../context.
|
|
2
|
-
import { Resource } from "../resource.
|
|
3
|
-
import type { PolicyDocument } from "./policy.
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import { Resource } from "../resource.ts";
|
|
3
|
+
import type { PolicyDocument } from "./policy.ts";
|
|
4
4
|
/**
|
|
5
5
|
* Properties for creating or updating an IAM role
|
|
6
6
|
*/
|
package/lib/aws/ses.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DeliveryOptions, type ReputationOptions, type SendingOptions, type SuppressionOptions, type TrackingOptions } from "@aws-sdk/client-sesv2";
|
|
2
|
-
import type { Context } from "../context.
|
|
3
|
-
import { Resource } from "../resource.
|
|
2
|
+
import type { Context } from "../context.ts";
|
|
3
|
+
import { Resource } from "../resource.ts";
|
|
4
4
|
/**
|
|
5
5
|
* Properties for configuring AWS SES resources
|
|
6
6
|
*/
|
package/lib/aws/table.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Context } from "../context.
|
|
2
|
-
import { Resource } from "../resource.
|
|
3
|
-
import type { Secret } from "../secret.
|
|
4
|
-
import { type CloudflareApiOptions } from "./api.
|
|
5
|
-
import { type PermissionGroupName } from "./permission-groups.
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import { Resource } from "../resource.ts";
|
|
3
|
+
import type { Secret } from "../secret.ts";
|
|
4
|
+
import { type CloudflareApiOptions } from "./api.ts";
|
|
5
|
+
import { type PermissionGroupName } from "./permission-groups.ts";
|
|
6
6
|
/**
|
|
7
7
|
* Permission group for a token policy
|
|
8
8
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Resource } from "../resource.
|
|
2
|
-
import { type CloudflareApiOptions } from "./api.
|
|
3
|
-
import type { Bound } from "./bound.
|
|
1
|
+
import { Resource } from "../resource.ts";
|
|
2
|
+
import { type CloudflareApiOptions } from "./api.ts";
|
|
3
|
+
import type { Bound } from "./bound.ts";
|
|
4
4
|
/**
|
|
5
5
|
* Properties for creating or updating a Cloudflare AI Gateway.
|
|
6
6
|
*/
|
package/lib/cloudflare/api.d.ts
CHANGED
package/lib/cloudflare/auth.d.ts
CHANGED
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
* Based on Cloudflare API documentation:
|
|
4
4
|
* https://developers.cloudflare.com/api/resources/workers/subresources/scripts/methods/update/
|
|
5
5
|
*/
|
|
6
|
-
import type { Secret } from "../secret.
|
|
7
|
-
import type { AiGatewayResource } from "./ai-gateway.
|
|
8
|
-
import type { Ai } from "./ai.
|
|
9
|
-
import type { AnalyticsEngineDataset } from "./analytics-engine.
|
|
10
|
-
import type { Assets } from "./assets.
|
|
11
|
-
import type { Bound } from "./bound.
|
|
12
|
-
import type { BrowserRendering } from "./browser-rendering.
|
|
13
|
-
import type { R2BucketResource } from "./bucket.
|
|
14
|
-
import type { D1DatabaseResource } from "./d1-database.
|
|
15
|
-
import type { DurableObjectNamespace } from "./durable-object-namespace.
|
|
16
|
-
import type { HyperdriveResource } from "./hyperdrive.
|
|
17
|
-
import type { KVNamespaceResource } from "./kv-namespace.
|
|
18
|
-
import type { PipelineResource } from "./pipeline.
|
|
19
|
-
import type { QueueResource } from "./queue.
|
|
20
|
-
import type { VectorizeIndexResource } from "./vectorize-index.
|
|
21
|
-
import type { WorkerStub } from "./worker-stub.
|
|
22
|
-
import type { Worker } from "./worker.
|
|
23
|
-
import type { Workflow } from "./workflow.
|
|
6
|
+
import type { Secret } from "../secret.ts";
|
|
7
|
+
import type { AiGatewayResource } from "./ai-gateway.ts";
|
|
8
|
+
import type { Ai } from "./ai.ts";
|
|
9
|
+
import type { AnalyticsEngineDataset } from "./analytics-engine.ts";
|
|
10
|
+
import type { Assets } from "./assets.ts";
|
|
11
|
+
import type { Bound } from "./bound.ts";
|
|
12
|
+
import type { BrowserRendering } from "./browser-rendering.ts";
|
|
13
|
+
import type { R2BucketResource } from "./bucket.ts";
|
|
14
|
+
import type { D1DatabaseResource } from "./d1-database.ts";
|
|
15
|
+
import type { DurableObjectNamespace } from "./durable-object-namespace.ts";
|
|
16
|
+
import type { HyperdriveResource } from "./hyperdrive.ts";
|
|
17
|
+
import type { KVNamespaceResource } from "./kv-namespace.ts";
|
|
18
|
+
import type { PipelineResource } from "./pipeline.ts";
|
|
19
|
+
import type { QueueResource } from "./queue.ts";
|
|
20
|
+
import type { VectorizeIndexResource } from "./vectorize-index.ts";
|
|
21
|
+
import type { WorkerStub } from "./worker-stub.ts";
|
|
22
|
+
import type { Worker } from "./worker.ts";
|
|
23
|
+
import type { Workflow } from "./workflow.ts";
|
|
24
24
|
export type Bindings = {
|
|
25
25
|
[bindingName: string]: Binding;
|
|
26
26
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { Pipeline } from "cloudflare:pipelines";
|
|
2
|
-
import type { Secret } from "../secret.
|
|
3
|
-
import type { AiGatewayResource as _AiGateway } from "./ai-gateway.
|
|
4
|
-
import type { Ai as _Ai } from "./ai.
|
|
5
|
-
import type { AnalyticsEngineDataset as _AnalyticsEngineDataset } from "./analytics-engine.
|
|
6
|
-
import type { Assets } from "./assets.
|
|
7
|
-
import type { Binding, Json, Self } from "./bindings.
|
|
8
|
-
import type { BrowserRendering } from "./browser-rendering.
|
|
9
|
-
import type { R2BucketResource as _R2Bucket } from "./bucket.
|
|
10
|
-
import type { D1DatabaseResource } from "./d1-database.
|
|
11
|
-
import type { DurableObjectNamespace as _DurableObjectNamespace } from "./durable-object-namespace.
|
|
12
|
-
import type { HyperdriveResource as _Hyperdrive } from "./hyperdrive.
|
|
13
|
-
import type { PipelineResource as _Pipeline } from "./pipeline.
|
|
14
|
-
import type { QueueResource as _Queue } from "./queue.
|
|
15
|
-
import type { VectorizeIndexResource as _VectorizeIndex } from "./vectorize-index.
|
|
16
|
-
import type { Worker as _Worker } from "./worker.
|
|
17
|
-
import type { Workflow as _Workflow } from "./workflow.
|
|
2
|
+
import type { Secret } from "../secret.ts";
|
|
3
|
+
import type { AiGatewayResource as _AiGateway } from "./ai-gateway.ts";
|
|
4
|
+
import type { Ai as _Ai } from "./ai.ts";
|
|
5
|
+
import type { AnalyticsEngineDataset as _AnalyticsEngineDataset } from "./analytics-engine.ts";
|
|
6
|
+
import type { Assets } from "./assets.ts";
|
|
7
|
+
import type { Binding, Json, Self } from "./bindings.ts";
|
|
8
|
+
import type { BrowserRendering } from "./browser-rendering.ts";
|
|
9
|
+
import type { R2BucketResource as _R2Bucket } from "./bucket.ts";
|
|
10
|
+
import type { D1DatabaseResource } from "./d1-database.ts";
|
|
11
|
+
import type { DurableObjectNamespace as _DurableObjectNamespace } from "./durable-object-namespace.ts";
|
|
12
|
+
import type { HyperdriveResource as _Hyperdrive } from "./hyperdrive.ts";
|
|
13
|
+
import type { PipelineResource as _Pipeline } from "./pipeline.ts";
|
|
14
|
+
import type { QueueResource as _Queue } from "./queue.ts";
|
|
15
|
+
import type { VectorizeIndexResource as _VectorizeIndex } from "./vectorize-index.ts";
|
|
16
|
+
import type { Worker as _Worker } from "./worker.ts";
|
|
17
|
+
import type { Workflow as _Workflow } from "./workflow.ts";
|
|
18
18
|
export type Bound<T extends Binding> = T extends _DurableObjectNamespace<infer O> ? DurableObjectNamespace<O> : T extends {
|
|
19
19
|
type: "kv_namespace";
|
|
20
20
|
} ? KVNamespace : T extends _Worker<any, infer RPC> ? Service<RPC> & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AwsClient } from "aws4fetch";
|
|
2
|
-
import { Resource } from "../resource.
|
|
3
|
-
import type { Secret } from "../secret.
|
|
4
|
-
import { type CloudflareApi } from "./api.
|
|
5
|
-
import type { Bound } from "./bound.
|
|
2
|
+
import { Resource } from "../resource.ts";
|
|
3
|
+
import type { Secret } from "../secret.ts";
|
|
4
|
+
import { type CloudflareApi } from "./api.ts";
|
|
5
|
+
import type { Bound } from "./bound.ts";
|
|
6
6
|
/**
|
|
7
7
|
* Properties for creating or updating an R2 Bucket
|
|
8
8
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Bindings } from "../bindings.
|
|
2
|
-
import type { WorkerProps } from "../worker.
|
|
1
|
+
import type { Bindings } from "../bindings.ts";
|
|
2
|
+
import type { WorkerProps } from "../worker.ts";
|
|
3
3
|
export declare function bundleWorkerScript<B extends Bindings>(props: WorkerProps<B> & {
|
|
4
4
|
entrypoint: string;
|
|
5
5
|
compatibilityDate: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-worker.d.ts","sourceRoot":"","sources":["../../../src/cloudflare/bundle/bundle-worker.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"bundle-worker.d.ts","sourceRoot":"","sources":["../../../src/cloudflare/bundle/bundle-worker.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAWhD,wBAAsB,kBAAkB,CAAC,CAAC,SAAS,QAAQ,EACzD,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B,mBA4EF"}
|
|
@@ -5,6 +5,7 @@ import { isBuildFailure, rewriteNodeCompatBuildFailure, } from "./build-failures
|
|
|
5
5
|
import { external, external_als } from "./external.js";
|
|
6
6
|
import { getNodeJSCompatMode } from "./nodejs-compat-mode.js";
|
|
7
7
|
import { nodeJsCompatPlugin } from "./nodejs-compat.js";
|
|
8
|
+
import { wasmPlugin } from "./wasm-plugin.js";
|
|
8
9
|
export async function bundleWorkerScript(props) {
|
|
9
10
|
const projectRoot = props.projectRoot ?? process.cwd();
|
|
10
11
|
const nodeJsCompatMode = await getNodeJSCompatMode(props.compatibilityDate, props.compatibilityFlags);
|
|
@@ -28,8 +29,11 @@ export async function bundleWorkerScript(props) {
|
|
|
28
29
|
loader: {
|
|
29
30
|
".sql": "text",
|
|
30
31
|
".json": "json",
|
|
32
|
+
...props.bundle?.loader,
|
|
33
|
+
...props.bundle?.options?.loader,
|
|
31
34
|
},
|
|
32
35
|
plugins: [
|
|
36
|
+
wasmPlugin,
|
|
33
37
|
...(props.bundle?.plugins ?? []),
|
|
34
38
|
...(nodeJsCompatMode === "v2" ? [await nodeJsCompatPlugin()] : []),
|
|
35
39
|
...(props.bundle?.alias
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-worker.js","sourceRoot":"","sources":["../../../src/cloudflare/bundle/bundle-worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,cAAc,EACd,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"bundle-worker.js","sourceRoot":"","sources":["../../../src/cloudflare/bundle/bundle-worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,cAAc,EACd,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,KAIC;IAED,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAEvD,MAAM,gBAAgB,GAAG,MAAM,mBAAmB,CAChD,KAAK,CAAC,iBAAiB,EACvB,KAAK,CAAC,kBAAkB,CACzB,CAAC;IAEF,IAAI,gBAAgB,KAAK,IAAI,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CACb,iGAAiG,CAClG,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC;IAE9B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,EAAE;YACpC,UAAU,EAAE,IAAI;YAChB,MAAM,EAAE,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,6CAA6C;YAC7F,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,MAAM;YAChB,MAAM,EAAE,KAAK;YACb,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;YACvB,UAAU,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;YAC5C,OAAO,EAAE;gBACP,aAAa,EAAE,WAAW;gBAC1B,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,EAAE,CAAC;gBAChC,SAAS,EAAE,IAAI,EAAE,uCAAuC;gBACxD,MAAM,EAAE;oBACN,MAAM,EAAE,MAAM;oBACd,OAAO,EAAE,MAAM;oBACf,GAAG,KAAK,CAAC,MAAM,EAAE,MAAM;oBACvB,GAAG,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM;iBACjC;gBACD,OAAO,EAAE;oBACP,UAAU;oBACV,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,EAAE,CAAC;oBAChC,GAAG,CAAC,gBAAgB,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,kBAAkB,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBAClE,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK;wBACrB,CAAC,CAAC;4BACE,iBAAiB,CAAC;gCAChB,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK;gCAC1B,WAAW;6BACZ,CAAC;yBACH;wBACH,CAAC,CAAC,EAAE,CAAC;iBACR;aACF;YACD,QAAQ,EAAE;gBACR,GAAG,CAAC,gBAAgB,KAAK,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC;gBACzD,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,IAAI,EAAE,CAAC;gBACjC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,IAAI,EAAE,CAAC;aAC3C;SACF,CAAC,CAAC;QACH,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,OAAO,MAAM,CAAC,OAAO,CAAC;QACxB,CAAC;QACD,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YAChB,OAAO,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACjD,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,uBAAuB,CAAC,EAAE,CAAC;YACjD,MAAM,IAAI,KAAK,CACb,GAAG,CAAC,CAAC,OAAO,2FAA2F,EACvG,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAC;QACJ,CAAC;QACD,IAAI,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;YACtB,6BAA6B,CAAC,CAAC,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;YAC1D,MAAM,CAAC,CAAC;QACV,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wasm-plugin.d.ts","sourceRoot":"","sources":["../../../src/cloudflare/bundle/wasm-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAInC,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,MAoDhC,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
export const wasmPlugin = {
|
|
4
|
+
name: "wasm",
|
|
5
|
+
setup(build) {
|
|
6
|
+
// Resolve ".wasm" files to a path with a namespace
|
|
7
|
+
build.onResolve({ filter: /\.wasm$/ }, (args) => {
|
|
8
|
+
// If this is the import inside the stub module, import the
|
|
9
|
+
// binary itself. Put the path in the "wasm-binary" namespace
|
|
10
|
+
// to tell our binary load callback to load the binary file.
|
|
11
|
+
if (args.namespace === "wasm-stub") {
|
|
12
|
+
return {
|
|
13
|
+
path: args.path,
|
|
14
|
+
namespace: "wasm-binary",
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
// Otherwise, generate the JavaScript stub module for this
|
|
18
|
+
// ".wasm" file. Put it in the "wasm-stub" namespace to tell
|
|
19
|
+
// our stub load callback to fill it with JavaScript.
|
|
20
|
+
//
|
|
21
|
+
// Resolve relative paths to absolute paths here since this
|
|
22
|
+
// resolve callback is given "resolveDir", the directory to
|
|
23
|
+
// resolve imports against.
|
|
24
|
+
if (args.resolveDir === "") {
|
|
25
|
+
return; // Ignore unresolvable paths
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
path: path.isAbsolute(args.path)
|
|
29
|
+
? args.path
|
|
30
|
+
: path.join(args.resolveDir, args.path),
|
|
31
|
+
namespace: "wasm-stub",
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
// Virtual modules in the "wasm-stub" namespace are filled with
|
|
35
|
+
// the JavaScript code for compiling the WebAssembly binary. The
|
|
36
|
+
// binary itself is imported from a second virtual module.
|
|
37
|
+
build.onLoad({ filter: /.*/, namespace: "wasm-stub" }, async (args) => ({
|
|
38
|
+
contents: `import wasm from ${JSON.stringify(args.path)}
|
|
39
|
+
export default (imports) =>
|
|
40
|
+
WebAssembly.instantiate(wasm, imports).then(
|
|
41
|
+
result => result.instance.exports)`,
|
|
42
|
+
}));
|
|
43
|
+
// Virtual modules in the "wasm-binary" namespace contain the
|
|
44
|
+
// actual bytes of the WebAssembly file. This uses esbuild's
|
|
45
|
+
// built-in "binary" loader instead of manually embedding the
|
|
46
|
+
// binary data inside JavaScript code ourselves.
|
|
47
|
+
build.onLoad({ filter: /.*/, namespace: "wasm-binary" }, async (args) => ({
|
|
48
|
+
contents: await fs.promises.readFile(args.path),
|
|
49
|
+
loader: "binary",
|
|
50
|
+
}));
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=wasm-plugin.js.map
|