anhedral 0.13.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -229
- package/assets/patches/audit-deps.mjs +12 -2
- package/assets/stack/ai-schema.ts.txt +5 -0
- package/assets/stack/ai.ts.txt +30 -0
- package/assets/stack/api-index.ts.txt +15 -0
- package/assets/stack/auth-features.ts.txt +4 -0
- package/assets/stack/auth-journal.json.txt +13 -0
- package/assets/stack/auth-migration.sql.txt +53 -0
- package/assets/stack/auth-routes.ts.txt +11 -0
- package/assets/stack/auth-schema.ts.txt +64 -0
- package/assets/stack/auth-snapshot.json.txt +346 -0
- package/assets/stack/auth.ts.txt +32 -0
- package/assets/stack/billing-mode.ts.txt +8 -0
- package/assets/stack/billing-schema.ts.txt +11 -0
- package/assets/stack/desktop.rs.txt +21 -0
- package/assets/stack/entitlement-guard.ts.txt +32 -0
- package/assets/stack/entitlements.ts.txt +8 -0
- package/assets/stack/events-schema.ts.txt +12 -0
- package/assets/stack/events.ts.txt +59 -0
- package/assets/stack/mobile-auth.ts.txt +25 -0
- package/assets/stack/mobile-billing.tsx.txt +63 -0
- package/assets/stack/mobile-session.tsx.txt +83 -0
- package/assets/stack/native-button.tsx.txt +108 -0
- package/assets/stack/native-global.css.txt +4 -0
- package/assets/stack/native-lib-utils.ts.txt +5 -0
- package/assets/stack/native-metro.config.js.txt +6 -0
- package/assets/stack/native-nativewind-env.d.ts.txt +1 -0
- package/assets/stack/native-tailwind.config.js.txt +73 -0
- package/assets/stack/native-text.tsx.txt +89 -0
- package/assets/stack/purchases.ts.txt +65 -0
- package/assets/stack/revenuecat.ts.txt +88 -0
- package/assets/stack/rtc-schema.ts.txt +10 -0
- package/assets/stack/rtc.ts.txt +122 -0
- package/assets/stack/security.ts.txt +31 -0
- package/assets/stack/storage.ts.txt +36 -0
- package/assets/stack/stripe.ts.txt +126 -0
- package/assets/stack/web-sign-in.tsx.txt +51 -0
- package/assets/ui/LICENSE.react-native-reusables +21 -0
- package/assets/ui/LICENSE.shadcn +21 -0
- package/assets/ui/UPSTREAM.json +39 -0
- package/assets/ui/catalog.json +891 -0
- package/assets/ui/extensions/registry.json +6 -0
- package/assets/ui/native/_controls.tsx +521 -0
- package/assets/ui/native/_core.tsx +118 -0
- package/assets/ui/native/_data.tsx +200 -0
- package/assets/ui/native/_display.tsx +453 -0
- package/assets/ui/native/_feedback.tsx +242 -0
- package/assets/ui/native/_legacy-dialog.tsx +38 -0
- package/assets/ui/native/_motion.tsx +520 -0
- package/assets/ui/native/_overlay.tsx +402 -0
- package/assets/ui/native/_selection.tsx +366 -0
- package/assets/ui/native/accordion.tsx +1 -0
- package/assets/ui/native/alert-dialog.tsx +11 -0
- package/assets/ui/native/alert.tsx +1 -0
- package/assets/ui/native/aspect-ratio.tsx +1 -0
- package/assets/ui/native/attachment.tsx +8 -0
- package/assets/ui/native/avatar.tsx +8 -0
- package/assets/ui/native/badge.tsx +1 -0
- package/assets/ui/native/breadcrumb.tsx +9 -0
- package/assets/ui/native/bubble.tsx +1 -0
- package/assets/ui/native/button-group.tsx +1 -0
- package/assets/ui/native/button.tsx +86 -0
- package/assets/ui/native/calendar.tsx +170 -0
- package/assets/ui/native/card.tsx +44 -0
- package/assets/ui/native/carousel.tsx +1 -0
- package/assets/ui/native/chart.tsx +193 -0
- package/assets/ui/native/checkbox.tsx +1 -0
- package/assets/ui/native/code-block.tsx +137 -0
- package/assets/ui/native/collapsible.tsx +1 -0
- package/assets/ui/native/combobox.tsx +1 -0
- package/assets/ui/native/command.tsx +11 -0
- package/assets/ui/native/context-menu.tsx +16 -0
- package/assets/ui/native/data-table.tsx +1 -0
- package/assets/ui/native/date-picker.tsx +43 -0
- package/assets/ui/native/dialog.tsx +15 -0
- package/assets/ui/native/direction.tsx +1 -0
- package/assets/ui/native/drawer.tsx +10 -0
- package/assets/ui/native/dropdown-menu.tsx +16 -0
- package/assets/ui/native/empty.tsx +8 -0
- package/assets/ui/native/field.tsx +13 -0
- package/assets/ui/native/hover-card.tsx +1 -0
- package/assets/ui/native/input-group.tsx +8 -0
- package/assets/ui/native/input-otp.tsx +1 -0
- package/assets/ui/native/input.tsx +28 -0
- package/assets/ui/native/item.tsx +12 -0
- package/assets/ui/native/kbd.tsx +1 -0
- package/assets/ui/native/label.tsx +4 -0
- package/assets/ui/native/layout.tsx +26 -0
- package/assets/ui/native/marker.tsx +1 -0
- package/assets/ui/native/menubar.tsx +17 -0
- package/assets/ui/native/message-scroller.tsx +6 -0
- package/assets/ui/native/message.tsx +10 -0
- package/assets/ui/native/native-select.tsx +1 -0
- package/assets/ui/native/navigation-menu.tsx +10 -0
- package/assets/ui/native/pagination.tsx +9 -0
- package/assets/ui/native/popover.tsx +1 -0
- package/assets/ui/native/progress.tsx +1 -0
- package/assets/ui/native/questionnaire.tsx +130 -0
- package/assets/ui/native/radio-group.tsx +1 -0
- package/assets/ui/native/registry.json +1103 -0
- package/assets/ui/native/resizable.tsx +1 -0
- package/assets/ui/native/scroll-area.tsx +1 -0
- package/assets/ui/native/select.tsx +11 -0
- package/assets/ui/native/separator.tsx +1 -0
- package/assets/ui/native/sheet.tsx +10 -0
- package/assets/ui/native/sidebar.tsx +22 -0
- package/assets/ui/native/skeleton.tsx +1 -0
- package/assets/ui/native/slider.tsx +1 -0
- package/assets/ui/native/spinner.tsx +1 -0
- package/assets/ui/native/switch.tsx +1 -0
- package/assets/ui/native/table.tsx +10 -0
- package/assets/ui/native/tabs.tsx +1 -0
- package/assets/ui/native/text.tsx +20 -0
- package/assets/ui/native/textarea.tsx +1 -0
- package/assets/ui/native/theme-switcher.tsx +22 -0
- package/assets/ui/native/toast.tsx +11 -0
- package/assets/ui/native/toggle-group.tsx +1 -0
- package/assets/ui/native/toggle.tsx +1 -0
- package/assets/ui/native/tooltip.tsx +1 -0
- package/assets/ui/native/trace.tsx +20 -0
- package/assets/ui/native/typography.tsx +15 -0
- package/assets/ui/theme-storage.ts +25 -0
- package/assets/ui/theme.tsx +66 -0
- package/assets/ui/web/button.tsx +59 -0
- package/assets/ui/web/input.tsx +21 -0
- package/assets/ui/web/label.tsx +19 -0
- package/dist/bin.js +7 -12
- package/dist/capabilities.d.ts +4 -33
- package/dist/capabilities.js +2 -84
- package/dist/capability-catalog.d.ts +83 -0
- package/dist/capability-catalog.js +121 -0
- package/dist/capability-command.d.ts +3 -0
- package/dist/capability-command.js +188 -0
- package/dist/capability-editor.d.ts +17 -0
- package/dist/capability-editor.js +97 -0
- package/dist/capability-recipes.d.ts +4 -0
- package/dist/capability-recipes.js +520 -0
- package/dist/capability-references.d.ts +4 -0
- package/dist/capability-references.js +7 -0
- package/dist/cli-commands.d.ts +1 -2
- package/dist/cli-commands.js +10 -104
- package/dist/cli-output.d.ts +1 -2
- package/dist/cli-output.js +6 -251
- package/dist/command-schema.js +40 -374
- package/dist/dependencies.d.ts +34 -62
- package/dist/dependencies.js +112 -199
- package/dist/index.d.ts +1 -45
- package/dist/index.js +1 -30
- package/dist/platforms/mobile.js +29 -139
- package/dist/platforms/web.d.ts +3 -0
- package/dist/platforms/web.js +251 -0
- package/dist/project-config.d.ts +2 -13
- package/dist/project-config.js +10 -83
- package/dist/registry/context.js +0 -1
- package/dist/registry/options.js +6 -40
- package/dist/registry/resolve.d.ts +3 -4
- package/dist/registry/resolve.js +18 -108
- package/dist/registry/types.d.ts +1 -7
- package/dist/registry/usage.js +3 -9
- package/dist/runtime-policy.d.ts +0 -2
- package/dist/runtime-policy.js +0 -16
- package/dist/scaffold/backend.d.ts +0 -4
- package/dist/scaffold/backend.js +1 -189
- package/dist/scaffold/bootstrap.d.ts +2 -3
- package/dist/scaffold/bootstrap.js +37 -43
- package/dist/scaffold/compose.js +2 -14
- package/dist/scaffold/database.d.ts +1 -1
- package/dist/scaffold/database.js +19 -126
- package/dist/scaffold/documentation.d.ts +0 -1
- package/dist/scaffold/documentation.js +82 -84
- package/dist/scaffold/expo-runtime.d.ts +2 -2
- package/dist/scaffold/expo-runtime.js +9 -101
- package/dist/scaffold/native-ui.d.ts +2 -0
- package/dist/scaffold/native-ui.js +74 -0
- package/dist/scaffold/stack-documentation.d.ts +0 -1
- package/dist/scaffold/stack-documentation.js +3 -49
- package/dist/scaffold/storage.d.ts +2 -0
- package/dist/scaffold/storage.js +21 -0
- package/dist/scaffold/styling.d.ts +1 -1
- package/dist/scaffold/styling.js +20 -28
- package/dist/scaffold/workspace.js +63 -199
- package/dist/stack-registry.d.ts +2 -58
- package/dist/stack-registry.js +22 -446
- package/dist/standard.js +7 -24
- package/dist/ui-catalog.d.ts +26 -0
- package/dist/ui-catalog.js +31 -0
- package/dist/ui-command.d.ts +3 -0
- package/dist/ui-command.js +219 -0
- package/dist/ui-project.d.ts +22 -0
- package/dist/ui-project.js +110 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/anhedral-stack.md +4 -119
- package/docs/capabilities.md +110 -0
- package/docs/native-ui.md +102 -0
- package/docs/software-factory.md +16 -577
- package/docs/stack-standard.md +11 -307
- package/docs/ui.md +33 -0
- package/docs/verification.md +511 -0
- package/package.json +26 -27
- package/dist/access.d.ts +0 -10
- package/dist/access.js +0 -93
- package/dist/auth-schema-snapshot.d.ts +0 -346
- package/dist/auth-schema-snapshot.js +0 -347
- package/dist/auth-schema.d.ts +0 -1
- package/dist/auth-schema.js +0 -57
- package/dist/capability-contract.d.ts +0 -47
- package/dist/capability-contract.js +0 -168
- package/dist/catalog-model.d.ts +0 -24
- package/dist/catalog-model.js +0 -1
- package/dist/catalog-registration.d.ts +0 -16
- package/dist/catalog-registration.js +0 -22
- package/dist/catalog-snapshot.d.ts +0 -5
- package/dist/catalog-snapshot.js +0 -97
- package/dist/cli-delivery.d.ts +0 -3
- package/dist/cli-delivery.js +0 -172
- package/dist/cloudflare.d.ts +0 -25
- package/dist/cloudflare.js +0 -226
- package/dist/delivery-evidence.d.ts +0 -62
- package/dist/delivery-evidence.js +0 -186
- package/dist/delivery.d.ts +0 -88
- package/dist/delivery.js +0 -570
- package/dist/inspector-model.d.ts +0 -123
- package/dist/inspector-model.js +0 -1
- package/dist/integration-service-readers.d.ts +0 -13
- package/dist/integration-service-readers.js +0 -173
- package/dist/lifecycle-model.d.ts +0 -15
- package/dist/lifecycle-model.js +0 -20
- package/dist/lifecycle.d.ts +0 -11
- package/dist/lifecycle.js +0 -91
- package/dist/management.d.ts +0 -3
- package/dist/management.js +0 -47
- package/dist/mobile-delivery.d.ts +0 -77
- package/dist/mobile-delivery.js +0 -366
- package/dist/neon-service-data.d.ts +0 -8
- package/dist/neon-service-data.js +0 -117
- package/dist/platforms/desktop.d.ts +0 -2
- package/dist/platforms/desktop.js +0 -415
- package/dist/platforms/extension.d.ts +0 -2
- package/dist/platforms/extension.js +0 -328
- package/dist/project-catalog.d.ts +0 -41
- package/dist/project-catalog.js +0 -288
- package/dist/project-inspector.d.ts +0 -4
- package/dist/project-inspector.js +0 -702
- package/dist/project-lifecycle.d.ts +0 -25
- package/dist/project-lifecycle.js +0 -57
- package/dist/project-state.d.ts +0 -49
- package/dist/project-state.js +0 -563
- package/dist/provider-auth.d.ts +0 -41
- package/dist/provider-auth.js +0 -215
- package/dist/provider-readiness.d.ts +0 -30
- package/dist/provider-readiness.js +0 -104
- package/dist/providers/adapters.d.ts +0 -17
- package/dist/providers/adapters.js +0 -278
- package/dist/providers/api.d.ts +0 -29
- package/dist/providers/api.js +0 -253
- package/dist/providers/config.d.ts +0 -15
- package/dist/providers/config.js +0 -182
- package/dist/providers/definitions.d.ts +0 -318
- package/dist/providers/definitions.js +0 -127
- package/dist/providers/provision.d.ts +0 -24
- package/dist/providers/provision.js +0 -76
- package/dist/providers/receipts.d.ts +0 -20
- package/dist/providers/receipts.js +0 -66
- package/dist/providers/recovery-verification.d.ts +0 -7
- package/dist/providers/recovery-verification.js +0 -112
- package/dist/providers/recovery.d.ts +0 -30
- package/dist/providers/recovery.js +0 -34
- package/dist/providers/runtime.d.ts +0 -10
- package/dist/providers/runtime.js +0 -265
- package/dist/providers/schema.d.ts +0 -28
- package/dist/providers/schema.js +0 -49
- package/dist/providers/state.d.ts +0 -55
- package/dist/providers/state.js +0 -289
- package/dist/provision.d.ts +0 -55
- package/dist/provision.js +0 -284
- package/dist/r2-service-data.d.ts +0 -2
- package/dist/r2-service-data.js +0 -136
- package/dist/readiness.d.ts +0 -23
- package/dist/readiness.js +0 -122
- package/dist/registry/add.d.ts +0 -24
- package/dist/registry/add.js +0 -270
- package/dist/registry/bootstrap.d.ts +0 -2
- package/dist/registry/bootstrap.js +0 -14
- package/dist/registry/commands.d.ts +0 -3
- package/dist/registry/commands.js +0 -85
- package/dist/registry/presets.d.ts +0 -4
- package/dist/registry/presets.js +0 -41
- package/dist/registry/preview.d.ts +0 -11
- package/dist/registry/preview.js +0 -91
- package/dist/registry/receipt.d.ts +0 -3
- package/dist/registry/receipt.js +0 -68
- package/dist/repository.d.ts +0 -24
- package/dist/repository.js +0 -96
- package/dist/scaffold/auth.d.ts +0 -3
- package/dist/scaffold/auth.js +0 -151
- package/dist/scaffold/billing-config.d.ts +0 -1
- package/dist/scaffold/billing-config.js +0 -73
- package/dist/scaffold/billing-contracts.d.ts +0 -2
- package/dist/scaffold/billing-contracts.js +0 -48
- package/dist/scaffold/billing-providers.d.ts +0 -1
- package/dist/scaffold/billing-providers.js +0 -249
- package/dist/scaffold/billing-schema.d.ts +0 -1
- package/dist/scaffold/billing-schema.js +0 -34
- package/dist/scaffold/billing-security.d.ts +0 -1
- package/dist/scaffold/billing-security.js +0 -46
- package/dist/scaffold/billing-server.d.ts +0 -1
- package/dist/scaffold/billing-server.js +0 -139
- package/dist/scaffold/billing-store.d.ts +0 -1
- package/dist/scaffold/billing-store.js +0 -72
- package/dist/scaffold/billing.d.ts +0 -2
- package/dist/scaffold/billing.js +0 -216
- package/dist/scaffold/cloudflare-services.d.ts +0 -8
- package/dist/scaffold/cloudflare-services.js +0 -198
- package/dist/scaffold/expo-auth.d.ts +0 -3
- package/dist/scaffold/expo-auth.js +0 -192
- package/dist/scaffold/expo-billing.d.ts +0 -3
- package/dist/scaffold/expo-billing.js +0 -292
- package/dist/scaffold/integrations.d.ts +0 -4
- package/dist/scaffold/integrations.js +0 -12
- package/dist/scaffold/lint.d.ts +0 -4
- package/dist/scaffold/lint.js +0 -56
- package/dist/scaffold/neon-realtime.d.ts +0 -2
- package/dist/scaffold/neon-realtime.js +0 -97
- package/dist/scaffold/services.d.ts +0 -5
- package/dist/scaffold/services.js +0 -108
- package/dist/scaffold/stream.d.ts +0 -2
- package/dist/scaffold/stream.js +0 -114
- package/dist/scaffold/void.d.ts +0 -4
- package/dist/scaffold/void.js +0 -264
- package/dist/scaffold/web.d.ts +0 -2
- package/dist/scaffold/web.js +0 -130
- package/dist/service-deletion.d.ts +0 -29
- package/dist/service-deletion.js +0 -195
- package/dist/service-descriptor.d.ts +0 -10
- package/dist/service-descriptor.js +0 -78
- package/dist/service-model.d.ts +0 -49
- package/dist/service-model.js +0 -8
- package/dist/service-operations.d.ts +0 -29
- package/dist/service-operations.js +0 -78
- package/dist/service-readers.d.ts +0 -8
- package/dist/service-readers.js +0 -247
- package/dist/services-command.d.ts +0 -39
- package/dist/services-command.js +0 -102
- package/dist/ship.d.ts +0 -348
- package/dist/ship.js +0 -239
- package/dist/vercel-project.d.ts +0 -101
- package/dist/vercel-project.js +0 -305
- package/dist/vercel.d.ts +0 -67
- package/dist/vercel.js +0 -581
- package/dist/vinext.d.ts +0 -2
- package/dist/vinext.js +0 -86
- package/dist/void-execution.d.ts +0 -10
- package/dist/void-execution.js +0 -94
- package/dist/void-migrations.d.ts +0 -6
- package/dist/void-migrations.js +0 -110
- package/dist/void-state.d.ts +0 -16
- package/dist/void-state.js +0 -65
- package/dist/void.d.ts +0 -3
- package/dist/void.js +0 -5
package/dist/stack-registry.js
CHANGED
|
@@ -1,47 +1,19 @@
|
|
|
1
|
-
import { scaffoldCloudflareTransport, scaffoldAnalyticsEngine, scaffoldImages, scaffoldRealtimeKit, scaffoldVideo, } from './scaffold/cloudflare-services.js';
|
|
2
|
-
import { usesVoidSelection } from './runtime-policy.js';
|
|
3
1
|
import { scaffoldStyling } from './scaffold/styling.js';
|
|
4
2
|
import { resourceName } from './render.js';
|
|
5
|
-
import { STACK_DEPENDENCIES } from './dependencies.js';
|
|
6
3
|
import { dependencyOrder } from './dependency-order.js';
|
|
7
4
|
import { GENERATOR_VERSION } from './version.js';
|
|
8
|
-
import { scaffoldWeb } from './scaffold/web.js';
|
|
9
5
|
import { scaffoldApi } from './scaffold/api.js';
|
|
10
6
|
import { scaffoldDatabase } from './scaffold/database.js';
|
|
11
|
-
import {
|
|
12
|
-
import { scaffoldNeonRealtime } from './scaffold/neon-realtime.js';
|
|
13
|
-
import { scaffoldBetterAuth, scaffoldClerk } from './scaffold/auth.js';
|
|
14
|
-
import { scaffoldRealtime, scaffoldQueues, scaffoldCron, scaffoldWorkflows, } from './scaffold/services.js';
|
|
7
|
+
import { scaffoldWeb } from './platforms/web.js';
|
|
15
8
|
import { scaffoldExpo } from './platforms/mobile.js';
|
|
16
|
-
import {
|
|
17
|
-
import { scaffoldWxt } from './platforms/extension.js';
|
|
18
|
-
import { scaffoldPrivateFiles, scaffoldStripe, scaffoldRevenueCat, } from './scaffold/integrations.js';
|
|
9
|
+
import { scaffoldPrivateStorage } from './scaffold/storage.js';
|
|
19
10
|
import { sharedPackage } from './scaffold/files.js';
|
|
20
11
|
function requirements(purpose, tools, access, credentials, resources, verify) {
|
|
21
12
|
return { purpose, tools, access, credentials, resources, verify };
|
|
22
13
|
}
|
|
23
|
-
function billingDependencies({ has }) {
|
|
24
|
-
return [
|
|
25
|
-
'hono',
|
|
26
|
-
has('neon') ? 'neon' : 'd1',
|
|
27
|
-
has('clerk') ? 'clerk' : 'better-auth',
|
|
28
|
-
...(has('expo') ? ['expo'] : []),
|
|
29
|
-
];
|
|
30
|
-
}
|
|
31
|
-
const BILLING_ENVIRONMENT_KEYS = [
|
|
32
|
-
'BILLING_ORIGIN',
|
|
33
|
-
'BILLING_ENVIRONMENT',
|
|
34
|
-
'BILLING_PLANS_JSON',
|
|
35
|
-
'BILLING_ENTITLEMENTS_JSON',
|
|
36
|
-
'BILLING_PREMIUM_ENTITLEMENT',
|
|
37
|
-
];
|
|
38
14
|
function packageSource(name, source, dependencies) {
|
|
39
15
|
return { name, source, dependencies };
|
|
40
16
|
}
|
|
41
|
-
function runtimeConfiguration({ runtimeApp, options }) {
|
|
42
|
-
const legacy = !usesVoidSelection(options.products, options.hosting);
|
|
43
|
-
return `apps/${runtimeApp}/${legacy ? 'wrangler.jsonc' : 'anhedral.cloudflare.json'}`;
|
|
44
|
-
}
|
|
45
17
|
function defineItems(configurations) {
|
|
46
18
|
return Object.fromEntries(Object.entries(configurations).map(([name, configuration]) => [
|
|
47
19
|
name,
|
|
@@ -58,100 +30,38 @@ function defineItems(configurations) {
|
|
|
58
30
|
}
|
|
59
31
|
/** Every product owns its source recipe, setup requirements and composition policy here. */
|
|
60
32
|
const PRODUCT_ITEMS = defineItems({
|
|
61
|
-
vinext: {
|
|
62
|
-
type: 'application',
|
|
63
|
-
description: 'Vinext web application on Cloudflare Workers',
|
|
64
|
-
targets: ['apps/web'],
|
|
65
|
-
selection: { conflicts: ['next'] },
|
|
66
|
-
registryDependencies: ['ui'],
|
|
67
|
-
setup: requirements('Web application on Cloudflare', ['Browser control', 'Wrangler'], [], [], ['Vinext React application and Cloudflare Worker'], ['Web flows, accessibility, production Worker build and deployed preview']),
|
|
68
|
-
install: scaffoldWeb,
|
|
69
|
-
},
|
|
70
33
|
next: {
|
|
71
34
|
type: 'application',
|
|
72
|
-
description: 'Next.js web application on
|
|
35
|
+
description: 'Full Next.js App Router web application on Cloudflare OpenNext',
|
|
73
36
|
targets: ['apps/web'],
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
setup: requirements('Web application', ['Browser control'], [], [], ['Next.js app; configure the selected hosting provider'], ['Web flows, accessibility, production hosting build and deployed preview']),
|
|
37
|
+
registryDependencies: ['workspace', 'typescript', 'eslint', 'styling'],
|
|
38
|
+
setup: requirements('Server-rendered web application', ['Browser control', 'Wrangler'], ['Cloudflare Workers deployment access'], [], ['Next.js Worker and assets; no backend or database provisioned'], ['Request-rendered HTML, RSC and editable Anhedral UI source']),
|
|
77
39
|
install: scaffoldWeb,
|
|
40
|
+
environment: ['ANHEDRAL_PREVIEW_ORIGIN'],
|
|
78
41
|
},
|
|
79
42
|
expo: {
|
|
80
43
|
type: 'application',
|
|
81
|
-
description: '
|
|
82
|
-
targets: ['apps/mobile'],
|
|
44
|
+
description: 'Native Expo iOS and Android application with Anhedral native shadcn UI',
|
|
45
|
+
targets: ['apps/mobile', 'packages/native-ui'],
|
|
83
46
|
registryDependencies: ['workspace', 'typescript', 'eslint', 'styling'],
|
|
84
|
-
setup: requirements('
|
|
85
|
-
'Expo universal client, Cloudflare web assets/API gateway; native adapters, signing and store configuration',
|
|
86
|
-
], [
|
|
87
|
-
'Static web export/runtime; requested native delivery additionally needs simulator/device and signed-build acceptance',
|
|
88
|
-
]),
|
|
47
|
+
setup: requirements('Native iOS and Android application', ['Simulator or device'], ['For requested native distribution only: client-owned Apple/Google developer accounts'], ['For requested native builds only: platform signing credentials and EAS access when used'], ['Expo native client; signing and store configuration'], ['Simulator/device and signed-build acceptance']),
|
|
89
48
|
install: scaffoldExpo,
|
|
90
|
-
environment: [],
|
|
91
|
-
resolveEnvironment: ({ has }) => (has('hono') ? ['EXPO_PUBLIC_API_URL'] : []),
|
|
92
|
-
},
|
|
93
|
-
electron: {
|
|
94
|
-
type: 'application',
|
|
95
|
-
description: 'Electron desktop application with its own web UI',
|
|
96
|
-
targets: ['apps/desktop'],
|
|
97
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
98
|
-
setup: requirements('Desktop application', ['Electron tooling', 'Platform packaging tools'], ['Signing/notarization account for the target platform'], ['Signing credentials; notarization credentials when required'], ['Electron app; packaging and distribution configuration'], ['Packaged desktop app, permissions, update/recovery behavior']),
|
|
99
|
-
install: scaffoldElectron,
|
|
100
|
-
},
|
|
101
|
-
wxt: {
|
|
102
|
-
type: 'application',
|
|
103
|
-
description: 'WXT browser side-panel extension',
|
|
104
|
-
targets: ['apps/extension'],
|
|
105
|
-
registryDependencies: ['workspace', 'typescript', 'eslint', 'styling'],
|
|
106
|
-
setup: requirements('Chrome side-panel extension', ['Chrome', 'WXT'], ['Extension store publisher access for distribution'], ['Store publishing credentials when required'], ['Extension app; minimal browser permissions and store package'], ['Installed side panel, background/content messaging and permission behavior']),
|
|
107
|
-
install: scaffoldWxt,
|
|
49
|
+
environment: ['EXPO_PUBLIC_API_URL'],
|
|
108
50
|
},
|
|
109
51
|
hono: {
|
|
110
52
|
type: 'application',
|
|
111
53
|
description: 'Shared Hono OpenAPI Worker',
|
|
112
54
|
targets: ['apps/api'],
|
|
113
55
|
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
114
|
-
setup: requirements('Shared OpenAPI backend', ['Wrangler'], ['Cloudflare Workers deployment access'], [], ['API Worker; application routes and authorization'], ['
|
|
56
|
+
setup: requirements('Shared OpenAPI backend', ['Wrangler'], ['Cloudflare Workers deployment access'], [], ['API Worker; application routes and authorization'], ['Health contract and application-owned authorization']),
|
|
115
57
|
install: scaffoldApi,
|
|
116
58
|
},
|
|
117
|
-
neon: {
|
|
118
|
-
type: 'package',
|
|
119
|
-
description: 'Reusable server database package with Neon HTTP, Drizzle and explicit migrations',
|
|
120
|
-
targets: ['packages/db'],
|
|
121
|
-
selection: { conflicts: ['d1'] },
|
|
122
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
123
|
-
setup: requirements('PostgreSQL persistence through direct Neon HTTP and Drizzle', ['Neon integration or API'], ['Client-owned Neon project/branch access'], [
|
|
124
|
-
'Server-side DATABASE_URL; direct DATABASE_URL_UNPOOLED for migrations; separate environment roles',
|
|
125
|
-
], ['Neon project/branches, database roles and reviewed migrations'], ['Migration, runtime connectivity and authorization; HTTP has no interactive transactions']),
|
|
126
|
-
install: scaffoldDatabase,
|
|
127
|
-
environment: ['DATABASE_URL', 'DATABASE_URL_UNPOOLED'],
|
|
128
|
-
runtime: 'server',
|
|
129
|
-
resolveTargets: ({ runtimeApp }) => ['packages/db', `apps/${runtimeApp}`],
|
|
130
|
-
},
|
|
131
|
-
'neon-realtime': {
|
|
132
|
-
type: 'integration',
|
|
133
|
-
description: 'Neon live SQL with server-sealed Drizzle queries and a browser-safe subscription client (beta)',
|
|
134
|
-
targets: ['packages/neon-realtime'],
|
|
135
|
-
selection: { requiresAny: ['neon'] },
|
|
136
|
-
registryDependencies: ['workspace', 'typescript', 'eslint', 'neon'],
|
|
137
|
-
fallbackDependency: 'neon',
|
|
138
|
-
runtime: 'server',
|
|
139
|
-
environment: ['NEON_REALTIME_SECRET', 'NEON_REALTIME_URL'],
|
|
140
|
-
setup: requirements('Live PostgreSQL query results on the selected Neon branch', ['Neon Console or Neon CLI', 'Browser control'], ['Client-owned Neon project and branch with Realtime beta availability'], ['Server-only NEON_REALTIME_SECRET; public NEON_REALTIME_URL; existing server DATABASE_URL'], [
|
|
141
|
-
'Manually enable Realtime and logical replication on the selected branch; configure allowed browser origins',
|
|
142
|
-
'Tables with stable replica identity; authorized deterministic SELECT queries sealed on the server',
|
|
143
|
-
], [
|
|
144
|
-
'Authorized row isolation, access revocation, capability renewal, disconnect/reconnect and subscription cleanup',
|
|
145
|
-
'Beta has no RLS or performance guarantees; database compute and egress remain billable',
|
|
146
|
-
]),
|
|
147
|
-
install: scaffoldNeonRealtime,
|
|
148
|
-
},
|
|
149
59
|
d1: {
|
|
150
60
|
type: 'package',
|
|
151
61
|
description: 'Reusable Drizzle D1 database package and explicit migration tooling',
|
|
152
|
-
targets: ['packages/db'],
|
|
153
|
-
selection: {
|
|
154
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
62
|
+
targets: ['packages/db', 'apps/api'],
|
|
63
|
+
selection: {},
|
|
64
|
+
registryDependencies: ['workspace', 'typescript', 'eslint', 'hono'],
|
|
155
65
|
setup: requirements('SQLite-compatible hosted persistence', ['Wrangler'], ['Cloudflare D1 access'], [], ['D1 database, DB binding and reviewed migrations'], ['Migration, constraints, transactional behavior and runtime queries']),
|
|
156
66
|
install: scaffoldDatabase,
|
|
157
67
|
configure: ({ options }) => ({
|
|
@@ -165,347 +75,27 @@ const PRODUCT_ITEMS = defineItems({
|
|
|
165
75
|
],
|
|
166
76
|
}),
|
|
167
77
|
runtime: 'worker',
|
|
168
|
-
resolveTargets: ({ runtimeApp }) => ['packages/db', `apps/${runtimeApp}`],
|
|
169
|
-
},
|
|
170
|
-
'local-data': {
|
|
171
|
-
type: 'package',
|
|
172
|
-
description: 'Interface for platform-specific local persistence adapters',
|
|
173
|
-
targets: ['packages/local-data'],
|
|
174
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
175
|
-
setup: requirements('Device-local SQLite and files', ['Selected platform database/filesystem tooling'], [], [], ['Integration boundary; implement platform adapters and explicit synchronization if needed'], ['Persistence, offline writes and recovery on the selected device']),
|
|
176
|
-
package: packageSource('local-data', `// Device-local SQLite and filesystem need platform-specific adapters.
|
|
177
|
-
export interface LocalDataStore {
|
|
178
|
-
read(key: string): Promise<string | null>;
|
|
179
|
-
write(key: string, value: string): Promise<void>;
|
|
180
|
-
}
|
|
181
|
-
`, {}),
|
|
182
|
-
},
|
|
183
|
-
clerk: {
|
|
184
|
-
type: 'integration',
|
|
185
|
-
description: 'Managed identity starter and runtime integration',
|
|
186
|
-
targets: ['apps/web', 'packages/auth'],
|
|
187
|
-
selection: { conflicts: ['better-auth'], requiresAny: ['vinext', 'next', 'hono'] },
|
|
188
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
189
|
-
setup: requirements('Managed identity', ['Clerk integration or dashboard'], ['Client-owned Clerk project access'], ['Clerk publishable key; server secret key; webhook secret when used'], ['Identity project, allowed URLs, SDK setup and protected routes'], ['Sign-in/out, session expiry, resource authorization and selected native client flows']),
|
|
190
|
-
install: scaffoldClerk,
|
|
191
|
-
environment: [
|
|
192
|
-
'NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY',
|
|
193
|
-
'EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY',
|
|
194
|
-
'CLERK_PUBLISHABLE_KEY',
|
|
195
|
-
'CLERK_SECRET_KEY',
|
|
196
|
-
],
|
|
197
|
-
resolveEnvironment: ({ has }) => [
|
|
198
|
-
'CLERK_SECRET_KEY',
|
|
199
|
-
...(has('vinext') || has('next') ? ['NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY'] : []),
|
|
200
|
-
...(has('hono') ? ['CLERK_PUBLISHABLE_KEY'] : []),
|
|
201
|
-
],
|
|
202
|
-
runtime: 'server',
|
|
203
|
-
resolveDependencies: ({ has }) => ['vinext', 'next', 'hono'].filter((id) => has(id)),
|
|
204
|
-
resolveTargets: ({ has }) => [
|
|
205
|
-
...(has('vinext') || has('next') ? ['apps/web'] : []),
|
|
206
|
-
...(has('hono') ? ['packages/auth'] : []),
|
|
207
|
-
],
|
|
208
|
-
},
|
|
209
|
-
'better-auth': {
|
|
210
|
-
type: 'integration',
|
|
211
|
-
description: 'Database-backed identity schema and runtime routes',
|
|
212
|
-
targets: ['packages/auth', 'packages/db', 'apps/web', 'apps/api'],
|
|
213
|
-
selection: { conflicts: ['clerk'], requiresAny: ['neon', 'd1'] },
|
|
214
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
215
|
-
setup: requirements('Application-managed identity', ['Selected database tooling'], ['Selected database migration/runtime access'], ['BETTER_AUTH_SECRET; BETTER_AUTH_URL'], ['Selected Neon or D1 database, auth schema, trusted origins and application routes'], ['Sign-in/out, session expiry, sign-up policy and resource authorization']),
|
|
216
|
-
install: scaffoldBetterAuth,
|
|
217
|
-
fallbackDependency: 'd1',
|
|
218
|
-
environment: ['BETTER_AUTH_SECRET', 'BETTER_AUTH_URL'],
|
|
219
|
-
runtime: 'server',
|
|
220
|
-
resolveDependencies: ({ has }) => [
|
|
221
|
-
has('neon') ? 'neon' : 'd1',
|
|
222
|
-
...(has('expo') ? ['expo'] : []),
|
|
223
|
-
],
|
|
224
|
-
resolveTargets: ({ runtimeApp, has }) => [
|
|
225
|
-
'packages/auth',
|
|
226
|
-
'packages/db',
|
|
227
|
-
`apps/${runtimeApp}`,
|
|
228
|
-
...(has('expo') ? ['apps/mobile'] : []),
|
|
229
|
-
],
|
|
230
78
|
},
|
|
231
79
|
r2: {
|
|
232
80
|
type: 'integration',
|
|
233
|
-
description: '
|
|
234
|
-
targets: ['apps/
|
|
235
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
236
|
-
setup: requirements('Private remote files', ['Wrangler'], ['Cloudflare R2 bucket/binding access'], [], ['Private R2 bucket and FILES binding;
|
|
237
|
-
'
|
|
81
|
+
description: 'Server-only private R2 storage foundation',
|
|
82
|
+
targets: ['apps/api/src/private-storage.ts'],
|
|
83
|
+
registryDependencies: ['workspace', 'typescript', 'eslint', 'hono'],
|
|
84
|
+
setup: requirements('Private remote files', ['Wrangler'], ['Cloudflare R2 bucket/binding access'], [], ['Private R2 bucket and FILES binding; no public object routes'], [
|
|
85
|
+
'Keep public access disabled; implement application authorization before adding object routes',
|
|
238
86
|
]),
|
|
239
|
-
install:
|
|
87
|
+
install: scaffoldPrivateStorage,
|
|
240
88
|
configure: ({ options }) => ({
|
|
241
89
|
r2_buckets: [{ binding: 'FILES', bucket_name: resourceName(options.name, 'private-files') }],
|
|
242
90
|
}),
|
|
243
91
|
runtime: 'worker',
|
|
244
|
-
resolveTargets: ({ runtimeApp }) => [`apps/${runtimeApp}/private-files.md`],
|
|
245
|
-
},
|
|
246
|
-
kv: {
|
|
247
|
-
type: 'integration',
|
|
248
|
-
description: 'Eventually consistent cache binding',
|
|
249
|
-
targets: ['apps/web', 'apps/api'],
|
|
250
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
251
|
-
setup: requirements('Eventually consistent cache/configuration', ['Wrangler'], ['Cloudflare KV namespace access'], [], ['KV namespace and CONFIG binding'], ['TTL and propagation behavior; never use KV as transactional authority']),
|
|
252
|
-
configure: () => ({ kv_namespaces: [{ binding: 'CONFIG', id: 'REPLACE_WITH_KV_ID' }] }),
|
|
253
|
-
installer: 'configuration',
|
|
254
|
-
runtime: 'worker',
|
|
255
|
-
resolveTargets: (context) => [runtimeConfiguration(context)],
|
|
256
|
-
},
|
|
257
|
-
realtime: {
|
|
258
|
-
type: 'service',
|
|
259
|
-
description: 'Durable Object room Worker with authorization boundary',
|
|
260
|
-
targets: ['apps/realtime'],
|
|
261
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
262
|
-
setup: requirements('Rooms and collaboration', ['Wrangler', 'Browser control'], ['Cloudflare Durable Objects deployment access'], [], ['Realtime Worker, Durable Object namespace/migration and WebSocket authorization'], ['Authorized room isolation, disconnect/reconnect and deployed WebSockets']),
|
|
263
|
-
install: scaffoldRealtime,
|
|
264
|
-
},
|
|
265
|
-
stream: {
|
|
266
|
-
type: 'integration',
|
|
267
|
-
description: 'Cloudflare Stream one-to-many live video with WHIP ingest and WHEP playback (GA)',
|
|
268
|
-
targets: ['packages/stream'],
|
|
269
|
-
runtime: 'server',
|
|
270
|
-
environment: ['STREAM_ACCOUNT_ID', 'STREAM_API_TOKEN'],
|
|
271
|
-
setup: requirements('Ultra-low latency one-to-many live video', ['Cloudflare Stream API or dashboard', 'Browser control'], ['Client-owned Cloudflare account with Stream enabled; usage-based delivery billing'], [
|
|
272
|
-
'Server-only STREAM_ACCOUNT_ID and account-scoped STREAM_API_TOKEN with Stream Write permission',
|
|
273
|
-
], [
|
|
274
|
-
'Manual Stream activation and live input setup; server management factory with secret WHIP and WHEP endpoints',
|
|
275
|
-
], [
|
|
276
|
-
'Creator/input ownership, viewer authorization and signed playback when private, browser media/ICE, reconnect and session cleanup; live behavior unverified',
|
|
277
|
-
]),
|
|
278
|
-
install: scaffoldStream,
|
|
279
|
-
},
|
|
280
|
-
queues: {
|
|
281
|
-
type: 'service',
|
|
282
|
-
description: 'Queue producer binding, consumer and dead-letter handling',
|
|
283
|
-
targets: ['apps/jobs', 'apps/web', 'apps/api'],
|
|
284
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
285
|
-
setup: requirements('Deferred jobs', ['Wrangler'], ['Cloudflare Queues configuration access'], [], ['Queue, producer/consumer bindings and failure handling'], ['Retries, idempotency, concurrency and dead-letter recovery']),
|
|
286
|
-
install: scaffoldQueues,
|
|
287
|
-
configure: ({ options }) => ({
|
|
288
|
-
queues: { producers: [{ binding: 'JOBS', queue: resourceName(options.name, 'jobs') }] },
|
|
289
|
-
}),
|
|
290
|
-
runtime: 'optional-worker',
|
|
291
|
-
resolveTargets: (context) => [
|
|
292
|
-
'apps/jobs',
|
|
293
|
-
...(context.has('hono') || context.has('vinext') || context.has('next')
|
|
294
|
-
? [runtimeConfiguration(context)]
|
|
295
|
-
: []),
|
|
296
|
-
],
|
|
297
|
-
},
|
|
298
|
-
cron: {
|
|
299
|
-
type: 'service',
|
|
300
|
-
description: 'Scheduled Worker',
|
|
301
|
-
targets: ['apps/scheduled'],
|
|
302
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
303
|
-
setup: requirements('Scheduled work', ['Wrangler'], ['Cloudflare Worker deployment access'], [], ['Scheduled Worker and environment-specific Cron Triggers'], ['Schedule, idempotency, failure visibility and overlapping runs']),
|
|
304
|
-
install: scaffoldCron,
|
|
305
|
-
},
|
|
306
|
-
workflows: {
|
|
307
|
-
type: 'service',
|
|
308
|
-
description: 'Durable multi-step Worker',
|
|
309
|
-
targets: ['apps/workflows'],
|
|
310
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
311
|
-
setup: requirements('Durable multi-step processing', ['Wrangler'], ['Cloudflare Workflows deployment access'], [], ['Workflow Worker/binding and resumable steps'], ['Retry/resume, idempotency, cancellation and failure recovery']),
|
|
312
|
-
install: scaffoldWorkflows,
|
|
313
|
-
},
|
|
314
|
-
'analytics-engine': {
|
|
315
|
-
selection: { requiresAll: ['hono'] },
|
|
316
|
-
type: 'integration',
|
|
317
|
-
description: 'Workers Analytics Engine dataset binding and server event helper',
|
|
318
|
-
targets: ['packages/analytics-engine'],
|
|
319
|
-
runtime: 'worker',
|
|
320
|
-
install: scaffoldAnalyticsEngine,
|
|
321
|
-
configure: ({ options }) => ({
|
|
322
|
-
analytics_engine_datasets: [
|
|
323
|
-
{ binding: 'EVENTS', dataset: resourceName(options.name, 'events').replaceAll('-', '_') },
|
|
324
|
-
],
|
|
325
|
-
}),
|
|
326
|
-
setup: requirements('Custom server-side analytics', ['Wrangler'], ['Cloudflare Analytics Engine access'], [], ['EVENTS dataset binding; define event semantics and privacy policy'], [
|
|
327
|
-
'Dataset ingestion, sampled query semantics and privacy filtering; not transactional billing state',
|
|
328
|
-
]),
|
|
329
|
-
},
|
|
330
|
-
images: {
|
|
331
|
-
selection: { requiresAll: ['hono'] },
|
|
332
|
-
type: 'integration',
|
|
333
|
-
description: 'Cloudflare Images binding and private image transform helper',
|
|
334
|
-
targets: ['packages/images'],
|
|
335
|
-
runtime: 'worker',
|
|
336
|
-
install: scaffoldImages,
|
|
337
|
-
configure: () => ({ images: { binding: 'IMAGES' } }),
|
|
338
|
-
setup: requirements('Image optimization', ['Wrangler'], ['Cloudflare Images account eligibility'], [], ['IMAGES binding; authorize source objects and define transform/usage limits'], ['Real transforms, source ownership and cache isolation']),
|
|
339
|
-
},
|
|
340
|
-
realtimekit: {
|
|
341
|
-
registryDependencies: ['workspace', 'typescript', 'eslint', 'cloudflare-api'],
|
|
342
|
-
selection: { requiresAll: ['hono'] },
|
|
343
|
-
type: 'integration',
|
|
344
|
-
description: 'Cloudflare RealtimeKit server meeting and participant-token helpers',
|
|
345
|
-
targets: ['packages/realtimekit'],
|
|
346
|
-
runtime: 'worker',
|
|
347
|
-
install: scaffoldRealtimeKit,
|
|
348
|
-
environment: ['REALTIMEKIT_ACCOUNT_ID', 'REALTIMEKIT_APP_ID', 'REALTIMEKIT_API_TOKEN'],
|
|
349
|
-
setup: requirements('Audio/video conferencing', ['Cloudflare RealtimeKit API or dashboard'], ['Cloudflare RealtimeKit app and scoped Realtime permissions'], ['Server-only account/app ID and API token'], [
|
|
350
|
-
'Manual app activation and presets; implement authorized token routes and platform client SDK',
|
|
351
|
-
], ['Meeting isolation, permissions, reconnect and actual device media/teardown']),
|
|
352
|
-
},
|
|
353
|
-
video: {
|
|
354
|
-
registryDependencies: ['workspace', 'typescript', 'eslint', 'cloudflare-api'],
|
|
355
|
-
selection: { requiresAll: ['hono'] },
|
|
356
|
-
type: 'integration',
|
|
357
|
-
description: 'Cloudflare Stream private on-demand direct video upload helper',
|
|
358
|
-
targets: ['packages/video'],
|
|
359
|
-
runtime: 'worker',
|
|
360
|
-
install: scaffoldVideo,
|
|
361
|
-
environment: ['STREAM_ACCOUNT_ID', 'STREAM_API_TOKEN'],
|
|
362
|
-
setup: requirements('Uploaded video processing and delivery', ['Cloudflare Stream API or dashboard'], ['Cloudflare Stream activation and scoped Stream Write access'], ['Server-only Stream account ID and API token'], [
|
|
363
|
-
'Authorized one-time upload issuance; implement processing checks, signed playback and retention',
|
|
364
|
-
], ['Creator ownership, upload/processing limits and private playback on selected devices']),
|
|
365
|
-
},
|
|
366
|
-
openai: {
|
|
367
|
-
type: 'package',
|
|
368
|
-
runtime: 'server',
|
|
369
|
-
description: 'Server-side OpenAI SDK factory',
|
|
370
|
-
targets: ['packages/ai'],
|
|
371
|
-
selection: { conflicts: ['ai-sdk'] },
|
|
372
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
373
|
-
setup: requirements('Direct OpenAI integration', ['OpenAI integration or API'], ['Client-owned OpenAI project and model access'], ['OPENAI_API_KEY'], ['Server SDK factory; implement application behavior and spending limits'], ['Selected model, failure handling, private inputs and cost controls']),
|
|
374
|
-
package: packageSource('ai', "import OpenAI from 'openai';\nexport function createAI(apiKey: string) { return new OpenAI({ apiKey }); }\n", { openai: STACK_DEPENDENCIES['openai'] }),
|
|
375
|
-
environment: ['OPENAI_API_KEY'],
|
|
376
|
-
},
|
|
377
|
-
'ai-sdk': {
|
|
378
|
-
type: 'package',
|
|
379
|
-
runtime: 'server',
|
|
380
|
-
description: 'Server-side AI SDK and provider exports',
|
|
381
|
-
targets: ['packages/ai'],
|
|
382
|
-
selection: { conflicts: ['openai'] },
|
|
383
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
384
|
-
setup: requirements('Streaming AI and provider abstraction', ['Selected AI provider integration or API'], ['Selected provider project/model access'], ['OPENAI_API_KEY for the generated default; selected provider credentials otherwise'], ['Server SDK factory; implement streaming, tools and application behavior'], ['Streaming, tool authorization, interruption and spending limits']),
|
|
385
|
-
package: packageSource('ai', "export { generateText, streamText } from 'ai';\nexport { createOpenAI } from '@ai-sdk/openai';\n", { ai: STACK_DEPENDENCIES['ai'], '@ai-sdk/openai': STACK_DEPENDENCIES['@ai-sdk/openai'] }),
|
|
386
|
-
environment: ['OPENAI_API_KEY'],
|
|
387
|
-
},
|
|
388
|
-
'workers-ai': {
|
|
389
|
-
type: 'integration',
|
|
390
|
-
description: 'Workers AI runtime binding',
|
|
391
|
-
targets: ['apps/web', 'apps/api'],
|
|
392
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
393
|
-
setup: requirements('Cloudflare-hosted inference', ['Wrangler'], ['Cloudflare Workers AI model access'], [], ['AI binding and selected model invocation'], ['Supported model behavior, authorization and usage limits']),
|
|
394
|
-
configure: () => ({ ai: { binding: 'AI' } }),
|
|
395
|
-
installer: 'configuration',
|
|
396
|
-
runtime: 'worker',
|
|
397
|
-
resolveTargets: (context) => [runtimeConfiguration(context)],
|
|
398
|
-
},
|
|
399
|
-
resend: {
|
|
400
|
-
type: 'package',
|
|
401
|
-
runtime: 'server',
|
|
402
|
-
description: 'Server-side email SDK factory',
|
|
403
|
-
targets: ['packages/email'],
|
|
404
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
405
|
-
setup: requirements('Outbound application email', ['Resend integration or API'], ['Client-owned Resend project; sending-domain DNS access'], ['RESEND_API_KEY; webhook secret when used'], ['Verified sending domain, sender and server integration'], [
|
|
406
|
-
'Delivery, suppression/bounce handling and webhook verification; inbound routing is separate',
|
|
407
|
-
]),
|
|
408
|
-
package: packageSource('email', "import { Resend } from 'resend';\nexport function createEmail(apiKey: string) { return new Resend(apiKey); }\n", { resend: STACK_DEPENDENCIES['resend'] }),
|
|
409
|
-
environment: ['RESEND_API_KEY'],
|
|
410
|
-
},
|
|
411
|
-
stripe: {
|
|
412
|
-
type: 'integration',
|
|
413
|
-
description: 'Authenticated Stripe checkout, portal and server entitlement projection',
|
|
414
|
-
targets: ['packages/billing', 'packages/contracts', 'apps/api'],
|
|
415
|
-
selection: { requiresAll: ['hono'], requiresAny: ['better-auth', 'clerk'] },
|
|
416
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
417
|
-
resolveDependencies: billingDependencies,
|
|
418
|
-
resolveTargets: ({ has }) => [
|
|
419
|
-
'packages/billing',
|
|
420
|
-
'packages/contracts',
|
|
421
|
-
'apps/api',
|
|
422
|
-
...(has('expo') ? ['apps/mobile'] : []),
|
|
423
|
-
],
|
|
424
|
-
setup: requirements('Web payments and subscriptions', ['Stripe integration or CLI'], ['Client-owned Stripe account; test/live access as required'], ['STRIPE_SECRET_KEY; STRIPE_WEBHOOK_SECRET'], ['Products/prices, signed webhooks and entitlement implementation'], ['Test purchase/cancellation, webhook replay and transactional idempotency']),
|
|
425
|
-
install: scaffoldStripe,
|
|
426
|
-
environment: [...BILLING_ENVIRONMENT_KEYS, 'STRIPE_SECRET_KEY', 'STRIPE_WEBHOOK_SECRET'],
|
|
427
|
-
},
|
|
428
|
-
revenuecat: {
|
|
429
|
-
type: 'integration',
|
|
430
|
-
description: 'Native purchases, restore and server-enforced cross-store entitlements',
|
|
431
|
-
targets: ['packages/billing', 'packages/contracts', 'apps/api'],
|
|
432
|
-
selection: { requiresAll: ['hono'], requiresAny: ['better-auth', 'clerk'] },
|
|
433
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
434
|
-
resolveDependencies: billingDependencies,
|
|
435
|
-
resolveTargets: ({ has }) => [
|
|
436
|
-
'packages/billing',
|
|
437
|
-
'packages/contracts',
|
|
438
|
-
'apps/api',
|
|
439
|
-
...(has('expo') ? ['apps/mobile'] : []),
|
|
440
|
-
],
|
|
441
|
-
setup: requirements('Cross-store subscription entitlements; Stripe is optional', ['RevenueCat integration or API', 'Selected mobile store tooling'], ['RevenueCat project; App Store/Play Store product access'], ['Platform public SDK keys; server API/webhook credentials as required'], [
|
|
442
|
-
'Native purchase SDK and authenticated entitlement APIs; configure offerings/store products before acceptance',
|
|
443
|
-
], ['Sandbox purchase/restore, verified webhooks and entitlement reconciliation']),
|
|
444
|
-
install: scaffoldRevenueCat,
|
|
445
|
-
environment: [
|
|
446
|
-
...BILLING_ENVIRONMENT_KEYS,
|
|
447
|
-
'REVENUECAT_SECRET_KEY',
|
|
448
|
-
'REVENUECAT_WEBHOOK_AUTHORIZATION',
|
|
449
|
-
'REVENUECAT_WEBHOOK_SIGNING_SECRET',
|
|
450
|
-
'REVENUECAT_APP_IDS_JSON',
|
|
451
|
-
'REVENUECAT_PROJECT_ID',
|
|
452
|
-
'EXPO_PUBLIC_REVENUECAT_IOS_API_KEY',
|
|
453
|
-
'EXPO_PUBLIC_REVENUECAT_ANDROID_API_KEY',
|
|
454
|
-
],
|
|
455
|
-
},
|
|
456
|
-
sentry: {
|
|
457
|
-
type: 'package',
|
|
458
|
-
description: 'Platform-specific monitoring integration boundary',
|
|
459
|
-
targets: ['packages/observability'],
|
|
460
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
461
|
-
setup: requirements('Additional runtime/crash diagnostics', ['Sentry integration or API'], ['Client-owned Sentry project access'], ['SENTRY_DSN; source-map upload token when required'], ['Integration boundary; install/init runtime SDKs and configure private source-map uploads'], ['Captured runtime errors, source maps, privacy filtering and alert delivery']),
|
|
462
|
-
package: packageSource('observability', "// Initialize the platform-specific Sentry SDK in each application's runtime entrypoint.\nexport const redactFields = ['authorization', 'cookie', 'password', 'token'];\n", {}),
|
|
463
|
-
environment: ['SENTRY_DSN'],
|
|
464
|
-
},
|
|
465
|
-
basin: {
|
|
466
|
-
type: 'package',
|
|
467
|
-
description: 'Cloudflare analytical stream binding and event helper',
|
|
468
|
-
targets: ['packages/analytics', 'packages/basin'],
|
|
469
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
470
|
-
setup: requirements('Cloudflare analytical events', ['Wrangler', 'Cloudflare integration or API'], [
|
|
471
|
-
'Cloudflare analytics/Pipelines access; plan supporting selected services; Pipelines Setup grant for managed R2 sink setup',
|
|
472
|
-
], [], [
|
|
473
|
-
'Basin dataset/stream, ANALYTICS binding, optional private R2 sink and authorized sink writes',
|
|
474
|
-
], ['Private ingestion, event delivery, query results and archive retrieval when selected']),
|
|
475
|
-
package: packageSource('analytics', `export interface EventStream { send(events: Record<string, unknown>[]): Promise<void> }
|
|
476
|
-
export async function recordEvents(stream: EventStream, events: Record<string, unknown>[]) {
|
|
477
|
-
await stream.send(events);
|
|
478
|
-
}
|
|
479
|
-
`, {}),
|
|
480
|
-
resolvePackage: ({ has }, recipe) => ({
|
|
481
|
-
...recipe,
|
|
482
|
-
name: has('posthog') ? 'basin' : 'analytics',
|
|
483
|
-
}),
|
|
484
|
-
resolveDependencies: ({ has }) => (has('posthog') ? ['posthog'] : []),
|
|
485
|
-
resolveTargets: ({ has }) => [has('posthog') ? 'packages/basin' : 'packages/analytics'],
|
|
486
|
-
configure: () => ({
|
|
487
|
-
pipelines: [{ binding: 'ANALYTICS', stream: 'REPLACE_WITH_BASIN_STREAM_ID' }],
|
|
488
|
-
}),
|
|
489
|
-
runtime: 'worker',
|
|
490
|
-
},
|
|
491
|
-
posthog: {
|
|
492
|
-
type: 'package',
|
|
493
|
-
runtime: 'server',
|
|
494
|
-
description: 'Server-side product analytics factory',
|
|
495
|
-
targets: ['packages/analytics'],
|
|
496
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
497
|
-
setup: requirements('Specialized product analytics', ['PostHog integration or API'], ['Client-owned PostHog project access'], ['POSTHOG_API_KEY; POSTHOG_HOST; separate privileged key if needed'], ['Analytics client factory; implement consent, event schema and privacy filtering'], ['Event receipt, consent behavior and redaction of private data']),
|
|
498
|
-
package: packageSource('analytics', "import { PostHog } from 'posthog-node';\nexport function createAnalytics(apiKey: string, host: string) { return new PostHog(apiKey, { host }); }\n", { 'posthog-node': STACK_DEPENDENCIES['posthog-node'] }),
|
|
499
|
-
environment: ['POSTHOG_API_KEY', 'POSTHOG_HOST'],
|
|
500
92
|
},
|
|
501
93
|
styling: {
|
|
502
94
|
type: 'package',
|
|
503
95
|
description: 'Shared platform-independent styling tokens',
|
|
504
96
|
targets: ['packages/styling'],
|
|
505
97
|
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
506
|
-
setup: requirements('Shared styling definitions', [], [], [], [
|
|
507
|
-
'Shared light/dark tokens and Tailwind v3 preset for Expo/WXT; adapt platform typography and components',
|
|
508
|
-
], ['Consistency across selected interfaces; preserve platform-specific components']),
|
|
98
|
+
setup: requirements('Shared styling definitions', [], [], [], ['Shared light/dark tokens, web CSS and Anhedral native shadcn port'], ['Consistency across selected interfaces; preserve platform-specific components']),
|
|
509
99
|
package: packageSource('styling', `import { light, dark, spacing } from './tokens.cjs';
|
|
510
100
|
|
|
511
101
|
export const styling = {
|
|
@@ -540,20 +130,6 @@ const FOUNDATION_ITEMS = defineItems({
|
|
|
540
130
|
targets: ['packages/eslint-config'],
|
|
541
131
|
registryDependencies: ['workspace'],
|
|
542
132
|
},
|
|
543
|
-
'cloudflare-api': {
|
|
544
|
-
type: 'foundation',
|
|
545
|
-
installer: 'recipe',
|
|
546
|
-
description: 'Shared server-only Cloudflare media management transport',
|
|
547
|
-
targets: ['packages/cloudflare-api'],
|
|
548
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
549
|
-
install: scaffoldCloudflareTransport,
|
|
550
|
-
},
|
|
551
|
-
ui: {
|
|
552
|
-
type: 'foundation',
|
|
553
|
-
description: 'Shared shadcn/ui, React, Tailwind and Lucide foundation for web apps',
|
|
554
|
-
targets: ['packages/ui'],
|
|
555
|
-
registryDependencies: ['workspace', 'typescript', 'eslint'],
|
|
556
|
-
},
|
|
557
133
|
});
|
|
558
134
|
function freeze(value) {
|
|
559
135
|
if (value && typeof value === 'object') {
|
|
@@ -565,7 +141,7 @@ function freeze(value) {
|
|
|
565
141
|
}
|
|
566
142
|
const DEFINITIONS = freeze({ ...FOUNDATION_ITEMS, ...PRODUCT_ITEMS });
|
|
567
143
|
function describe(definition) {
|
|
568
|
-
const { install: _install, configure: _configure,
|
|
144
|
+
const { install: _install, configure: _configure, ...metadata } = definition;
|
|
569
145
|
return structuredClone(metadata);
|
|
570
146
|
}
|
|
571
147
|
export function getStackDefinition(name) {
|
package/dist/standard.js
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { writeProjectSection } from './project-config.js';
|
|
2
|
-
import { usesVoidSelection } from './runtime-policy.js';
|
|
3
2
|
import { configureDependencyPatches } from './dependency-patches.js';
|
|
4
3
|
import { randomUUID } from 'node:crypto';
|
|
5
|
-
import { registerGeneratedProject } from './catalog-registration.js';
|
|
6
|
-
import { recordScaffoldFiles } from './registry/receipt.js';
|
|
7
4
|
import { existsSync, lstatSync, mkdirSync, readdirSync, realpathSync, rmdirSync } from 'node:fs';
|
|
8
5
|
import path from 'node:path';
|
|
9
6
|
import { spawnSync } from 'node:child_process';
|
|
10
7
|
import { execFile } from './util.js';
|
|
11
|
-
import { supportsVoidRuntime } from './void.js';
|
|
12
|
-
import { registerVercelApplication } from './vercel.js';
|
|
13
|
-
import { registerApplication } from './delivery.js';
|
|
14
8
|
import { runStagedTransaction } from './transaction.js';
|
|
15
9
|
import { createSetupPlan } from './capabilities.js';
|
|
16
|
-
import { bootstrapWorkspace,
|
|
10
|
+
import { bootstrapWorkspace, assertWorkspaceRuntime } from './scaffold/bootstrap.js';
|
|
17
11
|
import { composeStack } from './scaffold/compose.js';
|
|
18
12
|
import { parseStandardOptions } from './registry/options.js';
|
|
19
13
|
import { STANDARD_USAGE } from './registry/usage.js';
|
|
@@ -27,11 +21,7 @@ export async function scaffoldStandardProject(options, run = execFile, output =
|
|
|
27
21
|
printResult('init', plan, { ...output, json: options.json });
|
|
28
22
|
return;
|
|
29
23
|
}
|
|
30
|
-
assertBootstrapPlatform(run);
|
|
31
24
|
assertWorkspaceRuntime(run);
|
|
32
|
-
const voidWorkspace = usesVoidSelection(options.products, options.hosting);
|
|
33
|
-
if (voidWorkspace && run === execFile && !supportsVoidRuntime(process.versions.node))
|
|
34
|
-
throw new Error('New Cloudflare workspaces use Void and require Node.js 24.21.0 or newer. Planning remains available on older CLI-supported versions.');
|
|
35
25
|
const root = options.root;
|
|
36
26
|
const previousQuiet = process.env.ANHEDRAL_QUIET;
|
|
37
27
|
if (options.json)
|
|
@@ -57,7 +47,7 @@ export async function scaffoldStandardProject(options, run = execFile, output =
|
|
|
57
47
|
throw new Error('Destination changed before generation.');
|
|
58
48
|
},
|
|
59
49
|
build: async (stageRoot) => {
|
|
60
|
-
printProgress('Creating the
|
|
50
|
+
printProgress('Creating the Next.js and Anhedral UI workspace…', display);
|
|
61
51
|
bootstrapWorkspace(stageRoot, options.name, run);
|
|
62
52
|
printProgress('Composing the selected stack…', display);
|
|
63
53
|
await composeStack(stageRoot, options, plan.registry);
|
|
@@ -65,16 +55,12 @@ export async function scaffoldStandardProject(options, run = execFile, output =
|
|
|
65
55
|
schemaVersion: 1,
|
|
66
56
|
id: randomUUID(),
|
|
67
57
|
});
|
|
68
|
-
if (options.
|
|
69
|
-
|
|
70
|
-
if (readdirSync(path.join(stageRoot, 'apps')).some((app) => existsSync(path.join(stageRoot, 'apps', app, 'wrangler.jsonc')) ||
|
|
71
|
-
existsSync(path.join(stageRoot, 'apps', app, 'anhedral.cloudflare.json'))))
|
|
72
|
-
registerApplication(stageRoot);
|
|
73
|
-
printProgress('Resolving pinned dependencies…', display);
|
|
74
|
-
run('pnpm', ['install', '--lockfile-only', '--no-frozen-lockfile'], stageRoot);
|
|
75
|
-
if (configureDependencyPatches(stageRoot))
|
|
58
|
+
if (!options.skipInstall) {
|
|
59
|
+
printProgress('Resolving pinned dependencies…', display);
|
|
76
60
|
run('pnpm', ['install', '--lockfile-only', '--no-frozen-lockfile'], stageRoot);
|
|
77
|
-
|
|
61
|
+
if (configureDependencyPatches(stageRoot))
|
|
62
|
+
run('pnpm', ['install', '--lockfile-only', '--no-frozen-lockfile'], stageRoot);
|
|
63
|
+
}
|
|
78
64
|
commitPaths.push(...readdirSync(stageRoot).filter((name) => name !== 'node_modules'));
|
|
79
65
|
},
|
|
80
66
|
afterCommit: () => {
|
|
@@ -95,9 +81,6 @@ export async function scaffoldStandardProject(options, run = execFile, output =
|
|
|
95
81
|
printResult('init', {
|
|
96
82
|
...plan,
|
|
97
83
|
generated: true,
|
|
98
|
-
catalog: run === execFile || process.env.ANHEDRAL_PLUGIN_DATA || process.env.PLUGIN_DATA
|
|
99
|
-
? registerGeneratedProject(root)
|
|
100
|
-
: { state: 'not-enabled' },
|
|
101
84
|
}, { ...output, json: options.json });
|
|
102
85
|
}
|
|
103
86
|
finally {
|