alchemy 0.62.2 → 0.63.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 +1518 -1204
- package/bin/commands/deploy.ts +2 -0
- package/bin/commands/dev.ts +2 -0
- package/bin/services/execute-alchemy.ts +11 -0
- package/bin/services/template-manager.ts +2 -0
- package/bin/types.ts +2 -1
- package/lib/alchemy.d.ts +6 -22
- package/lib/alchemy.d.ts.map +1 -1
- package/lib/alchemy.js +65 -169
- package/lib/alchemy.js.map +1 -1
- package/lib/apply.d.ts +0 -2
- package/lib/apply.d.ts.map +1 -1
- package/lib/apply.js +2 -16
- package/lib/apply.js.map +1 -1
- package/lib/aws/account-id.d.ts.map +1 -1
- package/lib/aws/account-id.js +3 -2
- package/lib/aws/account-id.js.map +1 -1
- package/lib/aws/bucket.d.ts +8 -2
- package/lib/aws/bucket.d.ts.map +1 -1
- package/lib/aws/bucket.js +21 -14
- package/lib/aws/bucket.js.map +1 -1
- package/lib/aws/ec2/security-group.d.ts +8 -2
- package/lib/aws/ec2/security-group.d.ts.map +1 -1
- package/lib/aws/ec2/security-group.js +7 -2
- package/lib/aws/ec2/security-group.js.map +1 -1
- package/lib/aws/function.d.ts +9 -3
- package/lib/aws/function.d.ts.map +1 -1
- package/lib/aws/function.js +35 -26
- package/lib/aws/function.js.map +1 -1
- package/lib/aws/policy-attachment.d.ts.map +1 -1
- package/lib/aws/policy-attachment.js +2 -1
- package/lib/aws/policy-attachment.js.map +1 -1
- package/lib/aws/policy.d.ts +8 -2
- package/lib/aws/policy.d.ts.map +1 -1
- package/lib/aws/policy.js +13 -4
- package/lib/aws/policy.js.map +1 -1
- package/lib/aws/queue.d.ts +8 -2
- package/lib/aws/queue.d.ts.map +1 -1
- package/lib/aws/queue.js +22 -14
- package/lib/aws/queue.js.map +1 -1
- package/lib/aws/role.d.ts +8 -2
- package/lib/aws/role.d.ts.map +1 -1
- package/lib/aws/role.js +10 -3
- package/lib/aws/role.js.map +1 -1
- package/lib/aws/ses.d.ts +1 -1
- package/lib/aws/ses.d.ts.map +1 -1
- package/lib/aws/ses.js +2 -1
- package/lib/aws/ses.js.map +1 -1
- package/lib/aws/ssm-parameter.d.ts +8 -2
- package/lib/aws/ssm-parameter.d.ts.map +1 -1
- package/lib/aws/ssm-parameter.js +15 -10
- package/lib/aws/ssm-parameter.js.map +1 -1
- package/lib/aws/table.d.ts +8 -2
- package/lib/aws/table.d.ts.map +1 -1
- package/lib/aws/table.js +17 -9
- package/lib/aws/table.js.map +1 -1
- package/lib/cloudflare/account-api-token.d.ts +2 -2
- package/lib/cloudflare/account-api-token.d.ts.map +1 -1
- package/lib/cloudflare/account-api-token.js +7 -6
- package/lib/cloudflare/account-api-token.js.map +1 -1
- package/lib/cloudflare/ai-gateway.d.ts +9 -4
- package/lib/cloudflare/ai-gateway.d.ts.map +1 -1
- package/lib/cloudflare/ai-gateway.js +20 -24
- package/lib/cloudflare/ai-gateway.js.map +1 -1
- package/lib/cloudflare/api-schema.d.ts +2 -2
- package/lib/cloudflare/api-schema.d.ts.map +1 -1
- package/lib/cloudflare/api-schema.js +6 -2
- package/lib/cloudflare/api-schema.js.map +1 -1
- package/lib/cloudflare/api-shield.d.ts +5 -1
- package/lib/cloudflare/api-shield.d.ts.map +1 -1
- package/lib/cloudflare/api-shield.js +6 -1
- package/lib/cloudflare/api-shield.js.map +1 -1
- package/lib/cloudflare/assets.d.ts +1 -1
- package/lib/cloudflare/assets.d.ts.map +1 -1
- package/lib/cloudflare/astro/astro.d.ts.map +1 -1
- package/lib/cloudflare/astro/astro.js +3 -1
- package/lib/cloudflare/astro/astro.js.map +1 -1
- package/lib/cloudflare/astro/plugin.d.ts +2 -1
- package/lib/cloudflare/astro/plugin.d.ts.map +1 -1
- package/lib/cloudflare/astro/plugin.js.map +1 -1
- package/lib/cloudflare/bindings.d.ts +2 -2
- package/lib/cloudflare/bindings.d.ts.map +1 -1
- package/lib/cloudflare/bound.d.ts +1 -1
- package/lib/cloudflare/bound.d.ts.map +1 -1
- package/lib/cloudflare/bucket.d.ts +120 -1
- package/lib/cloudflare/bucket.d.ts.map +1 -1
- package/lib/cloudflare/bucket.js +80 -2
- package/lib/cloudflare/bucket.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/container.d.ts +10 -4
- package/lib/cloudflare/container.d.ts.map +1 -1
- package/lib/cloudflare/container.js +12 -9
- package/lib/cloudflare/container.js.map +1 -1
- package/lib/cloudflare/custom-domain.js +2 -1
- package/lib/cloudflare/custom-domain.js.map +1 -1
- package/lib/cloudflare/d1-database.d.ts +1 -1
- package/lib/cloudflare/d1-database.d.ts.map +1 -1
- package/lib/cloudflare/d1-database.js +7 -3
- package/lib/cloudflare/d1-database.js.map +1 -1
- package/lib/cloudflare/dispatch-namespace.d.ts +2 -0
- package/lib/cloudflare/dispatch-namespace.d.ts.map +1 -1
- package/lib/cloudflare/dispatch-namespace.js +7 -5
- package/lib/cloudflare/dispatch-namespace.js.map +1 -1
- package/lib/cloudflare/hyperdrive.d.ts +7 -1
- package/lib/cloudflare/hyperdrive.d.ts.map +1 -1
- package/lib/cloudflare/hyperdrive.js +2 -1
- package/lib/cloudflare/hyperdrive.js.map +1 -1
- package/lib/cloudflare/kv-namespace.d.ts +3 -0
- package/lib/cloudflare/kv-namespace.d.ts.map +1 -1
- package/lib/cloudflare/kv-namespace.js +11 -2
- package/lib/cloudflare/kv-namespace.js.map +1 -1
- package/lib/cloudflare/miniflare/miniflare-worker-proxy.js +3 -1
- package/lib/cloudflare/miniflare/miniflare-worker-proxy.js.map +1 -1
- package/lib/cloudflare/miniflare/paths.d.ts +4 -0
- package/lib/cloudflare/miniflare/paths.d.ts.map +1 -1
- package/lib/cloudflare/miniflare/paths.js +11 -0
- package/lib/cloudflare/miniflare/paths.js.map +1 -1
- package/lib/cloudflare/pipeline.d.ts +14 -3
- package/lib/cloudflare/pipeline.d.ts.map +1 -1
- package/lib/cloudflare/pipeline.js +31 -2
- package/lib/cloudflare/pipeline.js.map +1 -1
- package/lib/cloudflare/queue-consumer.js +1 -1
- package/lib/cloudflare/queue-consumer.js.map +1 -1
- package/lib/cloudflare/queue.d.ts +6 -4
- package/lib/cloudflare/queue.d.ts.map +1 -1
- package/lib/cloudflare/queue.js +13 -9
- package/lib/cloudflare/queue.js.map +1 -1
- package/lib/cloudflare/react-router/plugin.d.ts +1 -1
- package/lib/cloudflare/react-router/plugin.d.ts.map +1 -1
- package/lib/cloudflare/react-router/react-router.d.ts.map +1 -1
- package/lib/cloudflare/react-router/react-router.js +32 -2
- package/lib/cloudflare/react-router/react-router.js.map +1 -1
- package/lib/cloudflare/redwood/plugin.d.ts +2 -1
- package/lib/cloudflare/redwood/plugin.d.ts.map +1 -1
- package/lib/cloudflare/redwood/plugin.js.map +1 -1
- package/lib/cloudflare/route.js +1 -1
- package/lib/cloudflare/route.js.map +1 -1
- package/lib/cloudflare/ruleset.d.ts +3 -1
- package/lib/cloudflare/ruleset.d.ts.map +1 -1
- package/lib/cloudflare/ruleset.js +3 -2
- package/lib/cloudflare/ruleset.js.map +1 -1
- package/lib/cloudflare/secret.d.ts +6 -23
- package/lib/cloudflare/secret.d.ts.map +1 -1
- package/lib/cloudflare/secret.js +8 -4
- package/lib/cloudflare/secret.js.map +1 -1
- package/lib/cloudflare/secrets-store.d.ts +1 -1
- package/lib/cloudflare/secrets-store.d.ts.map +1 -1
- package/lib/cloudflare/secrets-store.js +5 -2
- package/lib/cloudflare/secrets-store.js.map +1 -1
- package/lib/cloudflare/tunnel.d.ts +5 -1
- package/lib/cloudflare/tunnel.d.ts.map +1 -1
- package/lib/cloudflare/tunnel.js +5 -1
- package/lib/cloudflare/tunnel.js.map +1 -1
- package/lib/cloudflare/vectorize-index.d.ts +7 -1
- package/lib/cloudflare/vectorize-index.d.ts.map +1 -1
- package/lib/cloudflare/vectorize-index.js +5 -2
- package/lib/cloudflare/vectorize-index.js.map +1 -1
- package/lib/cloudflare/vite/plugin.d.ts +2 -1
- package/lib/cloudflare/vite/plugin.d.ts.map +1 -1
- package/lib/cloudflare/vite/plugin.js.map +1 -1
- package/lib/cloudflare/vite/vite.d.ts +1 -1
- package/lib/cloudflare/vite/vite.d.ts.map +1 -1
- package/lib/cloudflare/vite/vite.js +1 -1
- package/lib/cloudflare/vite/vite.js.map +1 -1
- package/lib/cloudflare/website.js +1 -1
- package/lib/cloudflare/website.js.map +1 -1
- package/lib/cloudflare/worker.d.ts +1 -1
- package/lib/cloudflare/worker.d.ts.map +1 -1
- package/lib/cloudflare/worker.js +12 -7
- package/lib/cloudflare/worker.js.map +1 -1
- package/lib/cloudflare/wrangler.json.d.ts +1 -1
- package/lib/cloudflare/wrangler.json.d.ts.map +1 -1
- package/lib/cloudflare/wrangler.json.js +5 -3
- package/lib/cloudflare/wrangler.json.js.map +1 -1
- package/lib/docker/container.d.ts +6 -0
- package/lib/docker/container.d.ts.map +1 -1
- package/lib/docker/container.js +5 -1
- package/lib/docker/container.js.map +1 -1
- package/lib/docker/network.d.ts +8 -2
- package/lib/docker/network.d.ts.map +1 -1
- package/lib/docker/network.js +7 -2
- package/lib/docker/network.js.map +1 -1
- package/lib/docker/volume.d.ts +8 -2
- package/lib/docker/volume.d.ts.map +1 -1
- package/lib/docker/volume.js +6 -4
- package/lib/docker/volume.js.map +1 -1
- package/lib/esbuild/bundle.d.ts +1 -1
- package/lib/fs/index.d.ts +0 -8
- package/lib/fs/index.d.ts.map +1 -1
- package/lib/fs/index.js +0 -8
- package/lib/fs/index.js.map +1 -1
- package/lib/github/client.d.ts +1 -1
- package/lib/github/client.d.ts.map +1 -1
- package/lib/github/client.js +2 -1
- package/lib/github/client.js.map +1 -1
- package/lib/github/repository-environment.d.ts +8 -2
- package/lib/github/repository-environment.d.ts.map +1 -1
- package/lib/github/repository-environment.js +16 -12
- package/lib/github/repository-environment.js.map +1 -1
- package/lib/neon/project.d.ts +7 -1
- package/lib/neon/project.d.ts.map +1 -1
- package/lib/neon/project.js +10 -6
- package/lib/neon/project.js.map +1 -1
- package/lib/planetscale/branch.d.ts +4 -2
- package/lib/planetscale/branch.d.ts.map +1 -1
- package/lib/planetscale/branch.js +18 -12
- package/lib/planetscale/branch.js.map +1 -1
- package/lib/planetscale/database.d.ts +8 -2
- package/lib/planetscale/database.d.ts.map +1 -1
- package/lib/planetscale/database.js +24 -16
- package/lib/planetscale/database.js.map +1 -1
- package/lib/planetscale/password.d.ts +8 -2
- package/lib/planetscale/password.d.ts.map +1 -1
- package/lib/planetscale/password.js +2 -2
- package/lib/planetscale/password.js.map +1 -1
- package/lib/resource.d.ts +0 -2
- package/lib/resource.d.ts.map +1 -1
- package/lib/resource.js +1 -9
- package/lib/resource.js.map +1 -1
- package/lib/scope.d.ts +9 -3
- package/lib/scope.d.ts.map +1 -1
- package/lib/scope.js +21 -34
- package/lib/scope.js.map +1 -1
- package/lib/sentry/client-key.d.ts +7 -1
- package/lib/sentry/client-key.d.ts.map +1 -1
- package/lib/sentry/client-key.js +45 -6
- package/lib/sentry/client-key.js.map +1 -1
- package/lib/sentry/project.d.ts +8 -2
- package/lib/sentry/project.d.ts.map +1 -1
- package/lib/sentry/project.js +35 -5
- package/lib/sentry/project.js.map +1 -1
- package/lib/sentry/team.d.ts +8 -2
- package/lib/sentry/team.d.ts.map +1 -1
- package/lib/sentry/team.js +36 -6
- package/lib/sentry/team.js.map +1 -1
- package/lib/serde.d.ts +0 -5
- package/lib/serde.d.ts.map +1 -1
- package/lib/serde.js +0 -28
- package/lib/serde.js.map +1 -1
- package/lib/state/d1-state-store.d.ts +1 -1
- package/lib/state/d1-state-store.d.ts.map +1 -1
- package/lib/state/d1-state-store.js +5 -5
- package/lib/state/d1-state-store.js.map +1 -1
- package/lib/state/sqlite-state-store.d.ts.map +1 -1
- package/lib/state/sqlite-state-store.js +7 -11
- package/lib/state/sqlite-state-store.js.map +1 -1
- package/lib/stripe/card.d.ts.map +1 -1
- package/lib/stripe/card.js +3 -2
- package/lib/stripe/card.js.map +1 -1
- package/lib/stripe/client.d.ts +2 -2
- package/lib/stripe/client.d.ts.map +1 -1
- package/lib/stripe/client.js +4 -3
- package/lib/stripe/client.js.map +1 -1
- package/lib/stripe/coupon.d.ts.map +1 -1
- package/lib/stripe/coupon.js +4 -3
- package/lib/stripe/coupon.js.map +1 -1
- package/lib/stripe/customer.js +2 -2
- package/lib/stripe/customer.js.map +1 -1
- package/lib/stripe/entitlements-feature.d.ts.map +1 -1
- package/lib/stripe/entitlements-feature.js +3 -2
- package/lib/stripe/entitlements-feature.js.map +1 -1
- package/lib/stripe/file.d.ts.map +1 -1
- package/lib/stripe/file.js +3 -2
- package/lib/stripe/file.js.map +1 -1
- package/lib/stripe/meter.js +2 -2
- package/lib/stripe/meter.js.map +1 -1
- package/lib/stripe/portal-configuration.d.ts.map +1 -1
- package/lib/stripe/portal-configuration.js +3 -2
- package/lib/stripe/portal-configuration.js.map +1 -1
- package/lib/stripe/price.d.ts.map +1 -1
- package/lib/stripe/price.js +3 -2
- package/lib/stripe/price.js.map +1 -1
- package/lib/stripe/product-feature.d.ts.map +1 -1
- package/lib/stripe/product-feature.js +3 -2
- package/lib/stripe/product-feature.js.map +1 -1
- package/lib/stripe/product.d.ts.map +1 -1
- package/lib/stripe/product.js +3 -2
- package/lib/stripe/product.js.map +1 -1
- package/lib/stripe/promotion-code.d.ts.map +1 -1
- package/lib/stripe/promotion-code.js +3 -2
- package/lib/stripe/promotion-code.js.map +1 -1
- package/lib/stripe/shipping-rate.d.ts.map +1 -1
- package/lib/stripe/shipping-rate.js +4 -3
- package/lib/stripe/shipping-rate.js.map +1 -1
- package/lib/stripe/tax-rate.d.ts.map +1 -1
- package/lib/stripe/tax-rate.js +3 -2
- package/lib/stripe/tax-rate.js.map +1 -1
- package/lib/stripe/webhook.d.ts.map +1 -1
- package/lib/stripe/webhook.js +4 -3
- package/lib/stripe/webhook.js.map +1 -1
- package/lib/test/vitest.d.ts.map +1 -1
- package/lib/test/vitest.js +1 -0
- package/lib/test/vitest.js.map +1 -1
- package/lib/upstash/redis.d.ts +8 -2
- package/lib/upstash/redis.d.ts.map +1 -1
- package/lib/upstash/redis.js +5 -4
- package/lib/upstash/redis.js.map +1 -1
- package/lib/util/ignore-matcher.d.ts.map +1 -1
- package/lib/util/ignore-matcher.js +3 -1
- package/lib/util/ignore-matcher.js.map +1 -1
- package/lib/util/peer.d.ts +10 -0
- package/lib/util/peer.d.ts.map +1 -0
- package/lib/util/peer.js +42 -0
- package/lib/util/peer.js.map +1 -0
- package/lib/util/telemetry/constants.d.ts.map +1 -1
- package/lib/util/telemetry/constants.js +2 -2
- package/lib/util/telemetry/constants.js.map +1 -1
- package/lib/vercel/project.d.ts +7 -1
- package/lib/vercel/project.d.ts.map +1 -1
- package/lib/vercel/project.js +28 -0
- package/lib/vercel/project.js.map +1 -1
- package/package.json +88 -74
- package/src/alchemy.ts +76 -222
- package/src/apply.ts +6 -19
- package/src/aws/account-id.ts +6 -3
- package/src/aws/bucket.ts +43 -32
- package/src/aws/ec2/security-group.ts +15 -3
- package/src/aws/function.ts +65 -39
- package/src/aws/policy-attachment.ts +10 -6
- package/src/aws/policy.ts +33 -15
- package/src/aws/queue.ts +50 -29
- package/src/aws/role.ts +37 -20
- package/src/aws/ses.ts +24 -20
- package/src/aws/ssm-parameter.ts +40 -20
- package/src/aws/table.ts +35 -17
- package/src/cloudflare/account-api-token.ts +9 -7
- package/src/cloudflare/ai-gateway.ts +37 -34
- package/src/cloudflare/api-schema.ts +33 -26
- package/src/cloudflare/api-shield.ts +15 -2
- package/src/cloudflare/astro/astro.ts +5 -1
- package/src/cloudflare/astro/plugin.ts +2 -1
- package/src/cloudflare/bindings.ts +2 -2
- package/src/cloudflare/bound.ts +1 -1
- package/src/cloudflare/bucket.ts +242 -3
- package/src/cloudflare/compatibility-date.gen.ts +1 -1
- package/src/cloudflare/container.ts +23 -12
- package/src/cloudflare/custom-domain.ts +2 -2
- package/src/cloudflare/d1-database.ts +11 -4
- package/src/cloudflare/dispatch-namespace.ts +10 -7
- package/src/cloudflare/hyperdrive.ts +13 -3
- package/src/cloudflare/kv-namespace.ts +25 -2
- package/src/cloudflare/miniflare/miniflare-worker-proxy.ts +3 -1
- package/src/cloudflare/miniflare/paths.ts +13 -0
- package/src/cloudflare/pipeline.ts +76 -28
- package/src/cloudflare/queue-consumer.ts +1 -1
- package/src/cloudflare/queue.ts +65 -54
- package/src/cloudflare/react-router/react-router.ts +28 -2
- package/src/cloudflare/redwood/plugin.ts +3 -2
- package/src/cloudflare/route.ts +1 -1
- package/src/cloudflare/ruleset.ts +7 -2
- package/src/cloudflare/secret.ts +20 -31
- package/src/cloudflare/secrets-store.ts +7 -3
- package/src/cloudflare/tunnel.ts +13 -2
- package/src/cloudflare/vectorize-index.ts +14 -3
- package/src/cloudflare/vite/plugin.ts +3 -2
- package/src/cloudflare/vite/vite.ts +2 -3
- package/src/cloudflare/website.ts +1 -1
- package/src/cloudflare/worker.ts +35 -23
- package/src/cloudflare/wrangler.json.ts +7 -4
- package/src/docker/container.ts +13 -1
- package/src/docker/network.ts +18 -3
- package/src/docker/volume.ts +17 -6
- package/src/fs/index.ts +0 -8
- package/src/github/client.ts +6 -2
- package/src/github/repository-environment.ts +27 -13
- package/src/neon/project.ts +20 -6
- package/src/planetscale/branch.ts +24 -13
- package/src/planetscale/database.ts +38 -17
- package/src/planetscale/password.ts +10 -3
- package/src/resource.ts +1 -10
- package/src/scope.ts +29 -38
- package/src/sentry/client-key.ts +74 -6
- package/src/sentry/project.ts +59 -6
- package/src/sentry/team.ts +55 -7
- package/src/serde.ts +0 -44
- package/src/state/d1-state-store.ts +13 -6
- package/src/state/sqlite-state-store.ts +16 -17
- package/src/stripe/card.ts +5 -2
- package/src/stripe/client.ts +10 -3
- package/src/stripe/coupon.ts +4 -3
- package/src/stripe/customer.ts +2 -2
- package/src/stripe/entitlements-feature.ts +5 -2
- package/src/stripe/file.ts +3 -2
- package/src/stripe/meter.ts +2 -2
- package/src/stripe/portal-configuration.ts +5 -2
- package/src/stripe/price.ts +3 -2
- package/src/stripe/product-feature.ts +5 -2
- package/src/stripe/product.ts +3 -2
- package/src/stripe/promotion-code.ts +3 -2
- package/src/stripe/shipping-rate.ts +4 -3
- package/src/stripe/tax-rate.ts +3 -2
- package/src/stripe/webhook.ts +4 -3
- package/src/test/vitest.ts +1 -0
- package/src/upstash/redis.ts +15 -5
- package/src/util/ignore-matcher.ts +3 -1
- package/src/util/peer.ts +53 -0
- package/src/util/telemetry/constants.ts +2 -2
- package/src/vercel/project.ts +46 -1
- package/templates/astro/_gitignore +2 -1
- package/templates/hono/README.md +19 -0
- package/templates/hono/_env +1 -0
- package/templates/hono/_env.example +1 -0
- package/templates/hono/_gitignore +34 -0
- package/templates/hono/alchemy.run.ts +22 -0
- package/templates/hono/package.json +18 -0
- package/templates/hono/src/index.ts +17 -0
- package/templates/hono/tsconfig.json +13 -0
- package/templates/hono/types/env.d.ts +16 -0
- package/templates/nuxt/_gitignore +2 -1
- package/templates/react-router/_gitignore +1 -0
- package/templates/react-router/vite.config.ts +5 -3
- package/templates/rwsdk/_gitignore +2 -3
- package/templates/sveltekit/_gitignore +2 -1
- package/templates/tanstack-start/_gitignore +2 -1
- package/templates/typescript/_gitignore +2 -1
- package/templates/vite/_gitignore +2 -1
- package/workers/cloudflare-state-store.js +69 -74
- package/workers/dofs-state-store.js +1 -1
- package/bin/bootstrap-s3.ts +0 -255
- package/lib/ai/ark.d.ts +0 -12
- package/lib/ai/ark.d.ts.map +0 -1
- package/lib/ai/ark.js +0 -87
- package/lib/ai/ark.js.map +0 -1
- package/lib/ai/astro-file.d.ts +0 -138
- package/lib/ai/astro-file.d.ts.map +0 -1
- package/lib/ai/astro-file.js +0 -158
- package/lib/ai/astro-file.js.map +0 -1
- package/lib/ai/client.d.ts +0 -51
- package/lib/ai/client.d.ts.map +0 -1
- package/lib/ai/client.js +0 -58
- package/lib/ai/client.js.map +0 -1
- package/lib/ai/css-file.d.ts +0 -132
- package/lib/ai/css-file.d.ts.map +0 -1
- package/lib/ai/css-file.js +0 -142
- package/lib/ai/css-file.js.map +0 -1
- package/lib/ai/data.d.ts +0 -152
- package/lib/ai/data.d.ts.map +0 -1
- package/lib/ai/data.js +0 -120
- package/lib/ai/data.js.map +0 -1
- package/lib/ai/document.d.ts +0 -208
- package/lib/ai/document.d.ts.map +0 -1
- package/lib/ai/document.js +0 -206
- package/lib/ai/document.js.map +0 -1
- package/lib/ai/html-file.d.ts +0 -129
- package/lib/ai/html-file.d.ts.map +0 -1
- package/lib/ai/html-file.js +0 -139
- package/lib/ai/html-file.js.map +0 -1
- package/lib/ai/index.d.ts +0 -11
- package/lib/ai/index.d.ts.map +0 -1
- package/lib/ai/index.js +0 -11
- package/lib/ai/index.js.map +0 -1
- package/lib/ai/json-file.d.ts +0 -161
- package/lib/ai/json-file.d.ts.map +0 -1
- package/lib/ai/json-file.js +0 -188
- package/lib/ai/json-file.js.map +0 -1
- package/lib/ai/typescript-file.d.ts +0 -140
- package/lib/ai/typescript-file.d.ts.map +0 -1
- package/lib/ai/typescript-file.js +0 -146
- package/lib/ai/typescript-file.js.map +0 -1
- package/lib/ai/vue-file.d.ts +0 -127
- package/lib/ai/vue-file.d.ts.map +0 -1
- package/lib/ai/vue-file.js +0 -137
- package/lib/ai/vue-file.js.map +0 -1
- package/lib/ai/yaml-file.d.ts +0 -170
- package/lib/ai/yaml-file.d.ts.map +0 -1
- package/lib/ai/yaml-file.js +0 -201
- package/lib/ai/yaml-file.js.map +0 -1
- package/lib/fs/static-astro-file.d.ts +0 -35
- package/lib/fs/static-astro-file.d.ts.map +0 -1
- package/lib/fs/static-astro-file.js +0 -40
- package/lib/fs/static-astro-file.js.map +0 -1
- package/lib/fs/static-css-file.d.ts +0 -25
- package/lib/fs/static-css-file.d.ts.map +0 -1
- package/lib/fs/static-css-file.js +0 -30
- package/lib/fs/static-css-file.js.map +0 -1
- package/lib/fs/static-html-file.d.ts +0 -32
- package/lib/fs/static-html-file.d.ts.map +0 -1
- package/lib/fs/static-html-file.js +0 -37
- package/lib/fs/static-html-file.js.map +0 -1
- package/lib/fs/static-json-file.d.ts +0 -18
- package/lib/fs/static-json-file.d.ts.map +0 -1
- package/lib/fs/static-json-file.js +0 -19
- package/lib/fs/static-json-file.js.map +0 -1
- package/lib/fs/static-text-file.d.ts +0 -13
- package/lib/fs/static-text-file.d.ts.map +0 -1
- package/lib/fs/static-text-file.js +0 -9
- package/lib/fs/static-text-file.js.map +0 -1
- package/lib/fs/static-typescript-file.d.ts +0 -20
- package/lib/fs/static-typescript-file.d.ts.map +0 -1
- package/lib/fs/static-typescript-file.js +0 -16
- package/lib/fs/static-typescript-file.js.map +0 -1
- package/lib/fs/static-vue-file.d.ts +0 -29
- package/lib/fs/static-vue-file.d.ts.map +0 -1
- package/lib/fs/static-vue-file.js +0 -34
- package/lib/fs/static-vue-file.js.map +0 -1
- package/lib/fs/static-yaml-file.d.ts +0 -23
- package/lib/fs/static-yaml-file.d.ts.map +0 -1
- package/lib/fs/static-yaml-file.js +0 -10
- package/lib/fs/static-yaml-file.js.map +0 -1
- package/lib/internal/docs/providers.d.ts +0 -34
- package/lib/internal/docs/providers.d.ts.map +0 -1
- package/lib/internal/docs/providers.js +0 -200
- package/lib/internal/docs/providers.js.map +0 -1
- package/lib/runtime/bind.d.ts +0 -25
- package/lib/runtime/bind.d.ts.map +0 -1
- package/lib/runtime/bind.js +0 -76
- package/lib/runtime/bind.js.map +0 -1
- package/lib/runtime/global.d.ts +0 -8
- package/lib/runtime/global.d.ts.map +0 -1
- package/lib/runtime/global.js +0 -3
- package/lib/runtime/global.js.map +0 -1
- package/lib/runtime/plugin.d.ts +0 -35
- package/lib/runtime/plugin.d.ts.map +0 -1
- package/lib/runtime/plugin.js +0 -134
- package/lib/runtime/plugin.js.map +0 -1
- 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/runtime/state.d.ts +0 -5
- package/lib/runtime/state.d.ts.map +0 -1
- package/lib/runtime/state.js +0 -4
- package/lib/runtime/state.js.map +0 -1
- package/lib/web/astro.d.ts +0 -148
- package/lib/web/astro.d.ts.map +0 -1
- package/lib/web/astro.js +0 -419
- package/lib/web/astro.js.map +0 -1
- package/lib/web/shadcn-component.d.ts +0 -30
- package/lib/web/shadcn-component.d.ts.map +0 -1
- package/lib/web/shadcn-component.js +0 -25
- package/lib/web/shadcn-component.js.map +0 -1
- package/lib/web/shadcn.d.ts +0 -98
- package/lib/web/shadcn.d.ts.map +0 -1
- package/lib/web/shadcn.js +0 -102
- package/lib/web/shadcn.js.map +0 -1
- package/lib/web/tailwind.d.ts +0 -65
- package/lib/web/tailwind.d.ts.map +0 -1
- package/lib/web/tailwind.js +0 -98
- package/lib/web/tailwind.js.map +0 -1
- package/lib/web/vite.d.ts +0 -96
- package/lib/web/vite.d.ts.map +0 -1
- package/lib/web/vite.js +0 -232
- package/lib/web/vite.js.map +0 -1
- package/lib/web/vitepress/config.d.ts +0 -12
- package/lib/web/vitepress/config.d.ts.map +0 -1
- package/lib/web/vitepress/config.js +0 -33
- package/lib/web/vitepress/config.js.map +0 -1
- package/lib/web/vitepress/custom-theme.d.ts +0 -174
- package/lib/web/vitepress/custom-theme.d.ts.map +0 -1
- package/lib/web/vitepress/custom-theme.js +0 -337
- package/lib/web/vitepress/custom-theme.js.map +0 -1
- package/lib/web/vitepress/dependencies.d.ts +0 -13
- package/lib/web/vitepress/dependencies.d.ts.map +0 -1
- package/lib/web/vitepress/dependencies.js +0 -37
- package/lib/web/vitepress/dependencies.js.map +0 -1
- package/lib/web/vitepress/home-page.d.ts +0 -247
- package/lib/web/vitepress/home-page.d.ts.map +0 -1
- package/lib/web/vitepress/home-page.js +0 -146
- package/lib/web/vitepress/home-page.js.map +0 -1
- package/lib/web/vitepress/index.d.ts +0 -6
- package/lib/web/vitepress/index.d.ts.map +0 -1
- package/lib/web/vitepress/index.js +0 -6
- package/lib/web/vitepress/index.js.map +0 -1
- package/lib/web/vitepress/process-front-matter-files.d.ts +0 -19
- package/lib/web/vitepress/process-front-matter-files.d.ts.map +0 -1
- package/lib/web/vitepress/process-front-matter-files.js +0 -73
- package/lib/web/vitepress/process-front-matter-files.js.map +0 -1
- package/lib/web/vitepress/vitepress.d.ts +0 -75
- package/lib/web/vitepress/vitepress.d.ts.map +0 -1
- package/lib/web/vitepress/vitepress.js +0 -254
- package/lib/web/vitepress/vitepress.js.map +0 -1
- package/src/ai/ark.ts +0 -118
- package/src/ai/astro-file.ts +0 -270
- package/src/ai/client.ts +0 -117
- package/src/ai/css-file.ts +0 -247
- package/src/ai/data.ts +0 -221
- package/src/ai/document.ts +0 -367
- package/src/ai/html-file.ts +0 -244
- package/src/ai/index.ts +0 -10
- package/src/ai/json-file.ts +0 -325
- package/src/ai/typescript-file.ts +0 -259
- package/src/ai/vue-file.ts +0 -242
- package/src/ai/yaml-file.ts +0 -328
- package/src/fs/static-astro-file.ts +0 -45
- package/src/fs/static-css-file.ts +0 -35
- package/src/fs/static-html-file.ts +0 -42
- package/src/fs/static-json-file.ts +0 -38
- package/src/fs/static-text-file.ts +0 -23
- package/src/fs/static-typescript-file.ts +0 -37
- package/src/fs/static-vue-file.ts +0 -39
- package/src/fs/static-yaml-file.ts +0 -33
- package/src/internal/docs/providers.ts +0 -286
- package/src/runtime/bind.ts +0 -95
- package/src/runtime/global.ts +0 -10
- package/src/runtime/plugin.ts +0 -163
- package/src/runtime/shims.js +0 -34
- package/src/runtime/state.ts +0 -9
- package/src/web/astro.ts +0 -643
- package/src/web/shadcn-component.ts +0 -72
- package/src/web/shadcn.ts +0 -221
- package/src/web/tailwind.ts +0 -167
- package/src/web/vite.ts +0 -407
- package/src/web/vitepress/config.ts +0 -50
- package/src/web/vitepress/custom-theme.ts +0 -514
- package/src/web/vitepress/dependencies.ts +0 -69
- package/src/web/vitepress/home-page.ts +0 -378
- package/src/web/vitepress/index.ts +0 -5
- package/src/web/vitepress/process-front-matter-files.ts +0 -107
- package/src/web/vitepress/vitepress.ts +0 -372
- package/templates/sveltekit/bun.lock +0 -1099
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import yaml from "yaml";
|
|
2
|
-
import { Document } from "../../ai/document.js";
|
|
3
|
-
import { alchemy } from "../../alchemy.js";
|
|
4
|
-
import { StaticTextFile } from "../../fs/static-text-file.js";
|
|
5
|
-
/**
|
|
6
|
-
* Parse YAML frontmatter to home page config
|
|
7
|
-
*/
|
|
8
|
-
export function parseHomePage(content) {
|
|
9
|
-
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
|
10
|
-
if (!match) {
|
|
11
|
-
throw new Error("Invalid frontmatter format");
|
|
12
|
-
}
|
|
13
|
-
return yaml.parse(match[1]);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Resource for generating a VitePress homepage using AI.
|
|
17
|
-
* Creates an index.md file with the appropriate frontmatter and content
|
|
18
|
-
* based on the provided prompt and configuration.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* // Create a basic home page with just a prompt
|
|
22
|
-
* const homePage = await HomePage("docs-home", {
|
|
23
|
-
* outDir: "./docs",
|
|
24
|
-
* title: "My Project Documentation",
|
|
25
|
-
* prompt: "Create a welcoming homepage for a JavaScript utility library with modern design"
|
|
26
|
-
* });
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* // Create a home page with hero and features configuration
|
|
30
|
-
* const detailedHome = await HomePage("product-home", {
|
|
31
|
-
* outDir: "./website",
|
|
32
|
-
* title: "Product Landing Page",
|
|
33
|
-
* prompt: "Create an engaging product page for our cloud database service",
|
|
34
|
-
* hero: {
|
|
35
|
-
* name: "CloudDB",
|
|
36
|
-
* text: "The database built for the cloud era",
|
|
37
|
-
* tagline: "Scalable, reliable, and developer-friendly",
|
|
38
|
-
* image: "/images/cloud-db-logo.png",
|
|
39
|
-
* actions: [
|
|
40
|
-
* { text: "Get Started", link: "/guide/", theme: "brand" },
|
|
41
|
-
* { text: "View on GitHub", link: "https://github.com/org/cloud-db" }
|
|
42
|
-
* ]
|
|
43
|
-
* },
|
|
44
|
-
* features: [
|
|
45
|
-
* {
|
|
46
|
-
* icon: "🚀",
|
|
47
|
-
* title: "Lightning Fast",
|
|
48
|
-
* details: "Optimized for performance at any scale"
|
|
49
|
-
* },
|
|
50
|
-
* {
|
|
51
|
-
* icon: "🔒",
|
|
52
|
-
* title: "Secure by Default",
|
|
53
|
-
* details: "Enterprise-grade security built in"
|
|
54
|
-
* }
|
|
55
|
-
* ]
|
|
56
|
-
* });
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* // Create a home page with custom model settings
|
|
60
|
-
* const customHome = await HomePage("docs-home", {
|
|
61
|
-
* outDir: "./docs",
|
|
62
|
-
* title: "API Documentation",
|
|
63
|
-
* prompt: "Create a technical homepage for our REST API documentation",
|
|
64
|
-
* model: {
|
|
65
|
-
* id: "gpt-4o",
|
|
66
|
-
* provider: "openai"
|
|
67
|
-
* },
|
|
68
|
-
* temperature: 0.3,
|
|
69
|
-
* systemPromptExtension: "Make sure to use technical terminology appropriate for developers."
|
|
70
|
-
* });
|
|
71
|
-
*/
|
|
72
|
-
export async function HomePage(id, props) {
|
|
73
|
-
// Build the system prompt with optional extension
|
|
74
|
-
const systemPrompt = `
|
|
75
|
-
You are creating a VitePress homepage (index.md file).
|
|
76
|
-
|
|
77
|
-
VitePress uses YAML frontmatter to configure the homepage.
|
|
78
|
-
The homepage must have "layout: home" in its frontmatter.
|
|
79
|
-
|
|
80
|
-
The homepage can include:
|
|
81
|
-
- A hero section with name, text, tagline, image, and action buttons
|
|
82
|
-
- A features section with multiple feature items (title, icon, details)
|
|
83
|
-
- Additional markdown content below the frontmatter
|
|
84
|
-
|
|
85
|
-
Follow these guidelines:
|
|
86
|
-
1. Start with YAML frontmatter (--- at beginning and end)
|
|
87
|
-
2. Include "layout: home" in the frontmatter
|
|
88
|
-
3. Use the provided hero and features configuration if supplied
|
|
89
|
-
4. Add any additional sections or content based on the user's prompt
|
|
90
|
-
5. Create visually appealing, well-structured content
|
|
91
|
-
6. Ensure all links are properly formatted
|
|
92
|
-
7. Use appropriate markdown formatting for headings, lists, etc.
|
|
93
|
-
|
|
94
|
-
${props.system || ""}
|
|
95
|
-
`;
|
|
96
|
-
// Convert hero and features to YAML strings if provided
|
|
97
|
-
const heroYaml = props.hero ? JSON.stringify(props.hero, null, 2) : "";
|
|
98
|
-
const featuresYaml = props.features
|
|
99
|
-
? JSON.stringify(props.features, null, 2)
|
|
100
|
-
: "";
|
|
101
|
-
if (props.prompt) {
|
|
102
|
-
return Document(id, {
|
|
103
|
-
title: props.title,
|
|
104
|
-
path: props.outFile,
|
|
105
|
-
baseURL: props.baseURL,
|
|
106
|
-
apiKey: props.apiKey,
|
|
107
|
-
model: props.model ?? {
|
|
108
|
-
id: "claude-3-7-sonnet-latest",
|
|
109
|
-
provider: "anthropic",
|
|
110
|
-
},
|
|
111
|
-
temperature: props.temperature ?? 0.7,
|
|
112
|
-
prompt: await alchemy `
|
|
113
|
-
${systemPrompt}
|
|
114
|
-
|
|
115
|
-
Create a VitePress homepage based on the following description:
|
|
116
|
-
${props.prompt}
|
|
117
|
-
|
|
118
|
-
${props.hero
|
|
119
|
-
? `Use this hero section configuration:
|
|
120
|
-
\`\`\`json
|
|
121
|
-
${heroYaml}
|
|
122
|
-
\`\`\``
|
|
123
|
-
: ""}
|
|
124
|
-
|
|
125
|
-
${props.features
|
|
126
|
-
? `Use these features:
|
|
127
|
-
\`\`\`json
|
|
128
|
-
${featuresYaml}
|
|
129
|
-
\`\`\``
|
|
130
|
-
: ""}
|
|
131
|
-
|
|
132
|
-
The output should be a complete index.md file with proper YAML frontmatter and markdown content.
|
|
133
|
-
`,
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
return StaticTextFile(id, props.outFile, `---
|
|
137
|
-
${yaml.stringify({
|
|
138
|
-
layout: "home",
|
|
139
|
-
name: props.title,
|
|
140
|
-
hero: props.hero,
|
|
141
|
-
features: props.features,
|
|
142
|
-
})}
|
|
143
|
-
---
|
|
144
|
-
`);
|
|
145
|
-
}
|
|
146
|
-
//# sourceMappingURL=home-page.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"home-page.js","sourceRoot":"","sources":["../../../src/web/vitepress/home-page.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AA4N9D;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;IACrD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAmB,CAAC;AAChD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,EAAU,EACV,KAAoB;IAEpB,kDAAkD;IAClD,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;EAoBrB,KAAK,CAAC,MAAM,IAAI,EAAE;CACnB,CAAC;IAEA,wDAAwD;IACxD,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACvE,MAAM,YAAY,GAAG,KAAK,CAAC,QAAQ;QACj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B,cAAc,iCAAiC,CAAC;AAChD,cAAc,gBAAgB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/web/vitepress/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iCAAiC,CAAC;AAChD,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Process markdown files with frontmatter to generate navigation items
|
|
3
|
-
* @param directoryPath The directory containing markdown files
|
|
4
|
-
* @param linkPrefix The prefix for navigation links
|
|
5
|
-
* @returns Sorted array of navigation items with text and link properties
|
|
6
|
-
*/
|
|
7
|
-
export declare function processFrontmatterFiles(directoryPath: string, linkPrefix: string): Promise<{
|
|
8
|
-
text: string;
|
|
9
|
-
link: string;
|
|
10
|
-
items?: {
|
|
11
|
-
text: string;
|
|
12
|
-
link: string;
|
|
13
|
-
items?: {
|
|
14
|
-
text: string;
|
|
15
|
-
link: string;
|
|
16
|
-
}[];
|
|
17
|
-
}[];
|
|
18
|
-
}[]>;
|
|
19
|
-
//# sourceMappingURL=process-front-matter-files.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"process-front-matter-files.d.ts","sourceRoot":"","sources":["../../../src/web/vitepress/process-front-matter-files.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,GACjB,OAAO,CACR;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KAC1C,EAAE,CAAC;CACL,EAAE,CACJ,CAmFA"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs/promises";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { parse as parseYaml } from "yaml";
|
|
4
|
-
/**
|
|
5
|
-
* Process markdown files with frontmatter to generate navigation items
|
|
6
|
-
* @param directoryPath The directory containing markdown files
|
|
7
|
-
* @param linkPrefix The prefix for navigation links
|
|
8
|
-
* @returns Sorted array of navigation items with text and link properties
|
|
9
|
-
*/
|
|
10
|
-
export async function processFrontmatterFiles(directoryPath, linkPrefix) {
|
|
11
|
-
const entries = await fs.readdir(directoryPath, { withFileTypes: true });
|
|
12
|
-
const processedEntries = await Promise.all(entries
|
|
13
|
-
.filter((entry) => !entry.name.endsWith("index.md"))
|
|
14
|
-
.map(async (entry) => {
|
|
15
|
-
const fullPath = path.join(directoryPath, entry.name);
|
|
16
|
-
if (entry.isDirectory()) {
|
|
17
|
-
// Process subdirectory recursively
|
|
18
|
-
const items = await processFrontmatterFiles(fullPath, `${linkPrefix}/${entry.name}`);
|
|
19
|
-
// Create section for subdirectory
|
|
20
|
-
return {
|
|
21
|
-
text: entry.name.charAt(0).toUpperCase() + entry.name.slice(1),
|
|
22
|
-
collapsed: false,
|
|
23
|
-
items,
|
|
24
|
-
order: 10000, // Default order for directories
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
// Process markdown file
|
|
28
|
-
if (!entry.name.endsWith(".md")) {
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
const content = await fs.readFile(fullPath, "utf-8");
|
|
32
|
-
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
33
|
-
let order = 10000;
|
|
34
|
-
let title;
|
|
35
|
-
if (frontmatterMatch) {
|
|
36
|
-
const frontmatter = parseYaml(frontmatterMatch[1]);
|
|
37
|
-
// Parse order as a number (supports both integers and floats)
|
|
38
|
-
if (frontmatter.order !== undefined) {
|
|
39
|
-
if (typeof frontmatter.order !== "number") {
|
|
40
|
-
throw new Error(`Invalid order field in ${fullPath}: expected number, got ${typeof frontmatter.order}`);
|
|
41
|
-
}
|
|
42
|
-
order = frontmatter.order;
|
|
43
|
-
}
|
|
44
|
-
// Get title from frontmatter
|
|
45
|
-
if (frontmatter.title) {
|
|
46
|
-
title = String(frontmatter.title).trim();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
// If no title in frontmatter, try to get first heading
|
|
50
|
-
if (!title) {
|
|
51
|
-
const headingMatch = content.match(/^#\s+(.+)$/m);
|
|
52
|
-
if (headingMatch) {
|
|
53
|
-
title = headingMatch[1].trim();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
// Fall back to filename if no title found
|
|
57
|
-
if (!title) {
|
|
58
|
-
const name = entry.name.replace(".md", "");
|
|
59
|
-
title = name.charAt(0).toUpperCase() + name.slice(1);
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
text: title,
|
|
63
|
-
link: `${linkPrefix}/${entry.name}`,
|
|
64
|
-
order,
|
|
65
|
-
};
|
|
66
|
-
}));
|
|
67
|
-
// Filter out null entries and sort by order
|
|
68
|
-
return processedEntries
|
|
69
|
-
.filter((entry) => entry !== null)
|
|
70
|
-
.sort((a, b) => a.order - b.order)
|
|
71
|
-
.map(({ text, link, items }) => items ? { text, items, collapsed: true } : { text, link });
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=process-front-matter-files.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"process-front-matter-files.js","sourceRoot":"","sources":["../../../src/web/vitepress/process-front-matter-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,CAAC,KA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CACL,CAAC;IAEF,4CAA4C;IAC5C,OAAO,gBAAgB;SACpB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;SACjC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;SACjC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAC7B,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CACnD,CAAC;AACb,CAAC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import type { Context } from "../../context.ts";
|
|
2
|
-
import { Resource } from "../../resource.ts";
|
|
3
|
-
export interface VitePressProjectProps {
|
|
4
|
-
/**
|
|
5
|
-
* The name/path of the project
|
|
6
|
-
*/
|
|
7
|
-
name: string;
|
|
8
|
-
/**
|
|
9
|
-
* The title of the documentation site
|
|
10
|
-
*/
|
|
11
|
-
title?: string;
|
|
12
|
-
/**
|
|
13
|
-
* The description of the documentation site
|
|
14
|
-
*/
|
|
15
|
-
description?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Whether to use TypeScript for config and theme files
|
|
18
|
-
* @default true
|
|
19
|
-
*/
|
|
20
|
-
typescript?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* The scripts to add to the project
|
|
23
|
-
*/
|
|
24
|
-
scripts?: Record<string, string>;
|
|
25
|
-
/**
|
|
26
|
-
* The tsconfig to use
|
|
27
|
-
*/
|
|
28
|
-
tsconfig?: {
|
|
29
|
-
extends?: string;
|
|
30
|
-
references?: string[];
|
|
31
|
-
compilerOptions?: Record<string, any>;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Force overwrite the project config files during the update phase
|
|
35
|
-
* @default false
|
|
36
|
-
*/
|
|
37
|
-
overwrite?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* The dependencies to install
|
|
40
|
-
*/
|
|
41
|
-
dependencies?: Record<string, string>;
|
|
42
|
-
/**
|
|
43
|
-
* The dev dependencies to install
|
|
44
|
-
*/
|
|
45
|
-
devDependencies?: Record<string, string>;
|
|
46
|
-
/**
|
|
47
|
-
* The theme options to use
|
|
48
|
-
*/
|
|
49
|
-
/**
|
|
50
|
-
* The theme config to use
|
|
51
|
-
*/
|
|
52
|
-
/**
|
|
53
|
-
* Whether to delete the project folder during the delete phase
|
|
54
|
-
* @default true
|
|
55
|
-
*/
|
|
56
|
-
delete?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* The directory to initialize the project in.
|
|
59
|
-
*
|
|
60
|
-
* @default {@link name}
|
|
61
|
-
*/
|
|
62
|
-
dir?: string;
|
|
63
|
-
}
|
|
64
|
-
export interface VitePressProject extends VitePressProjectProps, Resource {
|
|
65
|
-
/**
|
|
66
|
-
* The name/path of the project
|
|
67
|
-
*/
|
|
68
|
-
name: string;
|
|
69
|
-
/**
|
|
70
|
-
* The directory of the project
|
|
71
|
-
*/
|
|
72
|
-
dir: string;
|
|
73
|
-
}
|
|
74
|
-
export declare const VitepressProject: (((this: any, id: string, props?: {}) => never) & (new (_: never) => never)) | ((this: Context<VitePressProject>, id: string, props: VitePressProjectProps) => Promise<VitePressProject>);
|
|
75
|
-
//# sourceMappingURL=vitepress.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vitepress.d.ts","sourceRoot":"","sources":["../../../src/web/vitepress/vitepress.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAKhD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAM7C,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QACtB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACvC,CAAC;IAEF;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEtC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEzC;;OAEG;IAGH;;OAEG;IAGH;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAiB,SAAQ,qBAAqB,EAAE,QAAQ;IACvE;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,gBAAgB,yFAMnB,OAAO,CAAC,gBAAgB,CAAC,MAC3B,MAAM,SACH,qBAAqB,KAC3B,OAAO,CAAC,gBAAgB,CAAC,CAmQ7B,CAAC"}
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import { exec } from "node:child_process";
|
|
2
|
-
import fs from "node:fs/promises";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { promisify } from "node:util";
|
|
5
|
-
import { Folder } from "../../fs/folder.js";
|
|
6
|
-
import { StaticJsonFile } from "../../fs/static-json-file.js";
|
|
7
|
-
import { StaticTextFile } from "../../fs/static-text-file.js";
|
|
8
|
-
import { StaticTypeScriptFile } from "../../fs/static-typescript-file.js";
|
|
9
|
-
import { Resource } from "../../resource.js";
|
|
10
|
-
import { logger } from "../../util/logger.js";
|
|
11
|
-
import { InstallDependencies, fixedDependencies } from "./dependencies.js";
|
|
12
|
-
const _execAsync = promisify(exec);
|
|
13
|
-
export const VitepressProject = Resource("project::VitepressProject", {
|
|
14
|
-
alwaysUpdate: true,
|
|
15
|
-
}, async function (id, props) {
|
|
16
|
-
const dir = props.dir ?? props.name;
|
|
17
|
-
if (this.phase === "delete") {
|
|
18
|
-
try {
|
|
19
|
-
if (props.delete !== false) {
|
|
20
|
-
if (await fs.exists(dir)) {
|
|
21
|
-
await fs.rm(dir, { recursive: true, force: true });
|
|
22
|
-
// // Delete the entire project directory
|
|
23
|
-
// await execAsync(`rm -rf ${dir}`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
logger.error(`Error deleting VitePress project ${id}:`, error);
|
|
29
|
-
}
|
|
30
|
-
return this.destroy();
|
|
31
|
-
}
|
|
32
|
-
const cwd = path.relative(process.cwd(), (await Folder("dir", {
|
|
33
|
-
path: dir,
|
|
34
|
-
delete: props.delete,
|
|
35
|
-
})).path);
|
|
36
|
-
// Initialize package.json
|
|
37
|
-
await StaticJsonFile(path.join(cwd, "package.json"), {
|
|
38
|
-
name: props.name,
|
|
39
|
-
scripts: {
|
|
40
|
-
"docs:gen": "bun alchemy.run.ts",
|
|
41
|
-
"docs:dev": "vitepress dev",
|
|
42
|
-
"docs:build": "vitepress build",
|
|
43
|
-
"docs:preview": "vitepress preview",
|
|
44
|
-
...props.scripts,
|
|
45
|
-
},
|
|
46
|
-
dependencies: fixedDependencies(props.dependencies || {}),
|
|
47
|
-
devDependencies: fixedDependencies(props.devDependencies || {}),
|
|
48
|
-
});
|
|
49
|
-
await InstallDependencies("dependencies", {
|
|
50
|
-
cwd,
|
|
51
|
-
dependencies: props.dependencies,
|
|
52
|
-
devDependencies: {
|
|
53
|
-
vue: "latest",
|
|
54
|
-
vitepress: "latest",
|
|
55
|
-
"@shikijs/vitepress-twoslash": "latest",
|
|
56
|
-
"markdown-it-footnote": "latest",
|
|
57
|
-
...props.devDependencies,
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
// Create .vitepress directory and config
|
|
61
|
-
await Folder(path.join(cwd, ".vitepress"));
|
|
62
|
-
await Folder(path.join(cwd, ".vitepress", "theme"));
|
|
63
|
-
await Promise.all([
|
|
64
|
-
StaticTextFile(path.join(cwd, ".gitignore"), ".vitepress/cache\n"),
|
|
65
|
-
// StaticJsonFile(path.join(cwd, "tsconfig.json"), {
|
|
66
|
-
// extends: props.tsconfig?.extends,
|
|
67
|
-
// references: props.tsconfig?.references?.map((path) => ({ path })),
|
|
68
|
-
// compilerOptions: props.tsconfig?.compilerOptions ?? {
|
|
69
|
-
// target: "ES2020",
|
|
70
|
-
// module: "ESNext",
|
|
71
|
-
// moduleResolution: "Node",
|
|
72
|
-
// allowJs: true,
|
|
73
|
-
// skipLibCheck: true,
|
|
74
|
-
// forceConsistentCasingInFileNames: true,
|
|
75
|
-
// },
|
|
76
|
-
// }),
|
|
77
|
-
// TypeScriptFile(
|
|
78
|
-
// path.join(cwd, "alchemy.run.ts"),
|
|
79
|
-
// `import alchemy from "alchemy";
|
|
80
|
-
// import { Folder } from "alchemy/fs";
|
|
81
|
-
// import { Document } from "alchemy/docs";
|
|
82
|
-
// import path from "node:path";
|
|
83
|
-
// const app = await alchemy("alchemy.run", {
|
|
84
|
-
// stage: "prod",
|
|
85
|
-
// phase: process.argv.includes("--destroy") ? "destroy" : "up",
|
|
86
|
-
// password: process.env.SECRET_PASSPHRASE,
|
|
87
|
-
// quiet: !process.argv.includes("--verbose"),
|
|
88
|
-
// });
|
|
89
|
-
// const docs = await Folder(path.join("alchemy.run", "docs"));
|
|
90
|
-
// await Document("home.md", {
|
|
91
|
-
// path: path.join(docs.path, "home.md"),
|
|
92
|
-
// prompt: await alchemy\`Generate a landing page.\`,
|
|
93
|
-
// });
|
|
94
|
-
// `,
|
|
95
|
-
// ),
|
|
96
|
-
StaticTypeScriptFile(path.join(cwd, ".vitepress", "theme", "index.ts"), `import TwoslashFloatingVue from "@shikijs/vitepress-twoslash/client";
|
|
97
|
-
import "@shikijs/vitepress-twoslash/style.css";
|
|
98
|
-
import type { Theme as ThemeConfig } from "vitepress";
|
|
99
|
-
import Theme from "vitepress/theme-without-fonts";
|
|
100
|
-
import "./style.css";
|
|
101
|
-
|
|
102
|
-
export default {
|
|
103
|
-
extends: Theme,
|
|
104
|
-
enhanceApp(ctx) {
|
|
105
|
-
ctx.app.use(TwoslashFloatingVue);
|
|
106
|
-
},
|
|
107
|
-
} satisfies ThemeConfig;
|
|
108
|
-
`),
|
|
109
|
-
StaticTextFile(path.join(cwd, ".vitepress", "theme", "style.css"), `/**
|
|
110
|
-
* Customize default theme styling by overriding CSS variables:
|
|
111
|
-
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Colors
|
|
116
|
-
*
|
|
117
|
-
* Each colors have exact same color scale system with 3 levels of solid
|
|
118
|
-
* colors with different brightness, and 1 soft color.
|
|
119
|
-
*
|
|
120
|
-
* - \`XXX-1\`: The most solid color used mainly for colored text. It must
|
|
121
|
-
* satisfy the contrast ratio against when used on top of \`XXX-soft\`.
|
|
122
|
-
*
|
|
123
|
-
* - \`XXX-2\`: The color used mainly for hover state of the button.
|
|
124
|
-
*
|
|
125
|
-
* - \`XXX-3\`: The color for solid background, such as bg color of the button.
|
|
126
|
-
* It must satisfy the contrast ratio with pure white (#ffffff) text on
|
|
127
|
-
* top of it.
|
|
128
|
-
*
|
|
129
|
-
* - \`XXX-soft\`: The color used for subtle background such as custom container
|
|
130
|
-
* or badges. It must satisfy the contrast ratio when putting \`XXX-1\` colors
|
|
131
|
-
* on top of it.
|
|
132
|
-
*
|
|
133
|
-
* The soft color must be semi transparent alpha channel. This is crucial
|
|
134
|
-
* because it allows adding multiple "soft" colors on top of each other
|
|
135
|
-
* to create a accent, such as when having inline code block inside
|
|
136
|
-
* custom containers.
|
|
137
|
-
*
|
|
138
|
-
* - \`default\`: The color used purely for subtle indication without any
|
|
139
|
-
* special meanings attached to it such as bg color for menu hover state.
|
|
140
|
-
*
|
|
141
|
-
* - \`brand\`: Used for primary brand colors, such as link text, button with
|
|
142
|
-
* brand theme, etc.
|
|
143
|
-
*
|
|
144
|
-
* - \`tip\`: Used to indicate useful information. The default theme uses the
|
|
145
|
-
* brand color for this by default.
|
|
146
|
-
*
|
|
147
|
-
* - \`warning\`: Used to indicate warning to the users. Used in custom
|
|
148
|
-
* container, badges, etc.
|
|
149
|
-
*
|
|
150
|
-
* - \`danger\`: Used to show error, or dangerous message to the users. Used
|
|
151
|
-
* in custom container, badges, etc.
|
|
152
|
-
* -------------------------------------------------------------------------- */
|
|
153
|
-
|
|
154
|
-
:root {
|
|
155
|
-
--vp-c-default-1: var(--vp-c-gray-1);
|
|
156
|
-
--vp-c-default-2: var(--vp-c-gray-2);
|
|
157
|
-
--vp-c-default-3: var(--vp-c-gray-3);
|
|
158
|
-
--vp-c-default-soft: var(--vp-c-gray-soft);
|
|
159
|
-
|
|
160
|
-
--vp-c-brand-1: var(--vp-c-indigo-1);
|
|
161
|
-
--vp-c-brand-2: var(--vp-c-indigo-2);
|
|
162
|
-
--vp-c-brand-3: var(--vp-c-indigo-3);
|
|
163
|
-
--vp-c-brand-soft: var(--vp-c-indigo-soft);
|
|
164
|
-
|
|
165
|
-
--vp-c-tip-1: var(--vp-c-brand-1);
|
|
166
|
-
--vp-c-tip-2: var(--vp-c-brand-2);
|
|
167
|
-
--vp-c-tip-3: var(--vp-c-brand-3);
|
|
168
|
-
--vp-c-tip-soft: var(--vp-c-brand-soft);
|
|
169
|
-
|
|
170
|
-
--vp-c-warning-1: var(--vp-c-yellow-1);
|
|
171
|
-
--vp-c-warning-2: var(--vp-c-yellow-2);
|
|
172
|
-
--vp-c-warning-3: var(--vp-c-yellow-3);
|
|
173
|
-
--vp-c-warning-soft: var(--vp-c-yellow-soft);
|
|
174
|
-
|
|
175
|
-
--vp-c-danger-1: var(--vp-c-red-1);
|
|
176
|
-
--vp-c-danger-2: var(--vp-c-red-2);
|
|
177
|
-
--vp-c-danger-3: var(--vp-c-red-3);
|
|
178
|
-
--vp-c-danger-soft: var(--vp-c-red-soft);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Component: Button
|
|
183
|
-
* -------------------------------------------------------------------------- */
|
|
184
|
-
|
|
185
|
-
:root {
|
|
186
|
-
--vp-button-brand-border: transparent;
|
|
187
|
-
--vp-button-brand-text: var(--vp-c-white);
|
|
188
|
-
--vp-button-brand-bg: var(--vp-c-brand-3);
|
|
189
|
-
--vp-button-brand-hover-border: transparent;
|
|
190
|
-
--vp-button-brand-hover-text: var(--vp-c-white);
|
|
191
|
-
--vp-button-brand-hover-bg: var(--vp-c-brand-2);
|
|
192
|
-
--vp-button-brand-active-border: transparent;
|
|
193
|
-
--vp-button-brand-active-text: var(--vp-c-white);
|
|
194
|
-
--vp-button-brand-active-bg: var(--vp-c-brand-1);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Component: Home
|
|
199
|
-
* -------------------------------------------------------------------------- */
|
|
200
|
-
|
|
201
|
-
:root {
|
|
202
|
-
--vp-home-hero-name-color: transparent;
|
|
203
|
-
--vp-home-hero-name-background: -webkit-linear-gradient(
|
|
204
|
-
120deg,
|
|
205
|
-
#bd34fe 30%,
|
|
206
|
-
#41d1ff
|
|
207
|
-
);
|
|
208
|
-
|
|
209
|
-
--vp-home-hero-image-background-image: linear-gradient(
|
|
210
|
-
-45deg,
|
|
211
|
-
#bd34fe 50%,
|
|
212
|
-
#47caff 50%
|
|
213
|
-
);
|
|
214
|
-
--vp-home-hero-image-filter: blur(44px);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
@media (min-width: 640px) {
|
|
218
|
-
:root {
|
|
219
|
-
--vp-home-hero-image-filter: blur(56px);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
@media (min-width: 960px) {
|
|
224
|
-
:root {
|
|
225
|
-
--vp-home-hero-image-filter: blur(68px);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Component: Custom Block
|
|
231
|
-
* -------------------------------------------------------------------------- */
|
|
232
|
-
|
|
233
|
-
:root {
|
|
234
|
-
--vp-custom-block-tip-border: transparent;
|
|
235
|
-
--vp-custom-block-tip-text: var(--vp-c-text-1);
|
|
236
|
-
--vp-custom-block-tip-bg: var(--vp-c-brand-soft);
|
|
237
|
-
--vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Component: Algolia
|
|
242
|
-
* -------------------------------------------------------------------------- */
|
|
243
|
-
|
|
244
|
-
.DocSearch {
|
|
245
|
-
--docsearch-primary-color: var(--vp-c-brand-1) !important;
|
|
246
|
-
}
|
|
247
|
-
`),
|
|
248
|
-
]);
|
|
249
|
-
return this({
|
|
250
|
-
...props,
|
|
251
|
-
dir,
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
//# sourceMappingURL=vitepress.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vitepress.js","sourceRoot":"","sources":["../../../src/web/vitepress/vitepress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,MAA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