anhedral 0.15.0 → 0.17.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 +82 -34
- 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/UPSTREAM.json +0 -11
- package/assets/ui/catalog.json +891 -0
- package/assets/ui/extensions/registry.json +6 -0
- package/dist/bin.js +7 -12
- package/dist/capabilities.d.ts +4 -33
- package/dist/capabilities.js +2 -66
- 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 +39 -322
- package/dist/dependencies.d.ts +29 -9
- package/dist/dependencies.js +57 -64
- package/dist/index.d.ts +1 -42
- package/dist/index.js +1 -27
- package/dist/platforms/web.d.ts +1 -1
- package/dist/platforms/web.js +27 -75
- package/dist/project-config.d.ts +2 -13
- package/dist/project-config.js +10 -82
- package/dist/registry/options.js +1 -5
- package/dist/registry/resolve.d.ts +1 -1
- package/dist/registry/resolve.js +4 -10
- package/dist/registry/usage.js +3 -9
- package/dist/scaffold/backend.js +0 -3
- package/dist/scaffold/database.js +2 -1
- package/dist/scaffold/documentation.js +56 -25
- package/dist/scaffold/stack-documentation.js +1 -1
- package/dist/scaffold/storage.d.ts +2 -0
- package/dist/scaffold/storage.js +21 -0
- package/dist/scaffold/workspace.js +21 -22
- package/dist/stack-registry.d.ts +2 -10
- package/dist/stack-registry.js +12 -98
- package/dist/standard.js +1 -11
- 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 +12 -23
- package/docs/assets/anhedral-stack-light.png +0 -0
- package/docs/assets/anhedral-stack.png +0 -0
- package/docs/capabilities.md +110 -0
- package/docs/native-ui.md +47 -0
- package/docs/software-factory.md +35 -50
- package/docs/stack-standard.md +19 -70
- package/docs/ui.md +33 -0
- package/docs/verification.md +6 -876
- package/package.json +21 -16
- package/assets/ui/native/button.tsx +0 -85
- package/assets/ui/native/card.tsx +0 -33
- package/assets/ui/native/dialog.tsx +0 -75
- package/assets/ui/native/input.tsx +0 -27
- package/assets/ui/native/label.tsx +0 -4
- package/assets/ui/native/layout.tsx +0 -26
- package/assets/ui/native/text.tsx +0 -20
- package/assets/ui/native/theme-switcher.tsx +0 -22
- package/assets/ui/theme-storage.ts +0 -25
- package/assets/ui/theme.tsx +0 -66
- 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 -129
- 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 -112
- 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 -157
- package/dist/delivery.d.ts +0 -82
- package/dist/delivery.js +0 -489
- package/dist/inspector-model.d.ts +0 -123
- package/dist/inspector-model.js +0 -1
- package/dist/integration-service-readers.d.ts +0 -12
- package/dist/integration-service-readers.js +0 -92
- 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 -370
- package/dist/platforms/mobile.d.ts +0 -2
- package/dist/platforms/mobile.js +0 -156
- 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 -671
- package/dist/project-lifecycle.d.ts +0 -25
- package/dist/project-lifecycle.js +0 -57
- package/dist/project-state.d.ts +0 -47
- package/dist/project-state.js +0 -480
- package/dist/provider-auth.d.ts +0 -41
- package/dist/provider-auth.js +0 -180
- package/dist/provider-readiness.d.ts +0 -30
- package/dist/provider-readiness.js +0 -85
- package/dist/providers/adapters.d.ts +0 -17
- package/dist/providers/adapters.js +0 -103
- 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 -136
- package/dist/providers/definitions.d.ts +0 -115
- package/dist/providers/definitions.js +0 -42
- 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 -56
- package/dist/providers/recovery-verification.d.ts +0 -7
- package/dist/providers/recovery-verification.js +0 -52
- 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 -234
- 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 -283
- package/dist/provision.d.ts +0 -47
- package/dist/provision.js +0 -208
- 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 -117
- package/dist/registry/add.d.ts +0 -24
- package/dist/registry/add.js +0 -210
- package/dist/registry/bootstrap.d.ts +0 -3
- package/dist/registry/bootstrap.js +0 -5
- package/dist/registry/commands.d.ts +0 -3
- package/dist/registry/commands.js +0 -83
- 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 -2
- package/dist/scaffold/auth.js +0 -76
- 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 -208
- package/dist/scaffold/expo-auth.d.ts +0 -3
- package/dist/scaffold/expo-auth.js +0 -203
- package/dist/scaffold/expo-billing.d.ts +0 -3
- package/dist/scaffold/expo-billing.js +0 -257
- package/dist/scaffold/expo-runtime.d.ts +0 -3
- package/dist/scaffold/expo-runtime.js +0 -43
- package/dist/scaffold/integrations.d.ts +0 -2
- package/dist/scaffold/integrations.js +0 -11
- package/dist/scaffold/managed-email.d.ts +0 -3
- package/dist/scaffold/managed-email.js +0 -47
- package/dist/scaffold/native-ui.d.ts +0 -2
- package/dist/scaffold/native-ui.js +0 -69
- package/dist/scaffold/password-reset.d.ts +0 -1
- package/dist/scaffold/password-reset.js +0 -99
- package/dist/scaffold/private-files.d.ts +0 -2
- package/dist/scaffold/private-files.js +0 -78
- package/dist/scaffold/web-billing.d.ts +0 -2
- package/dist/scaffold/web-billing.js +0 -48
- 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 -71
- 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 -48
- package/dist/service-readers.d.ts +0 -8
- package/dist/service-readers.js +0 -216
- package/dist/services-command.d.ts +0 -39
- package/dist/services-command.js +0 -96
- package/dist/ship.d.ts +0 -35
- package/dist/ship.js +0 -107
package/dist/auth-schema.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { betterAuthSqliteSnapshot } from './auth-schema-snapshot.js';
|
|
3
|
-
import { writeFile } from './util.js';
|
|
4
|
-
// Better Auth 1.7.7 core user/session/account/verification schema, without plugins.
|
|
5
|
-
// Product plugins/additional fields require a reviewed schema regeneration/migration.
|
|
6
|
-
export function writeBetterAuthSchema(root, postgres) {
|
|
7
|
-
const table = postgres ? 'pgTable' : 'sqliteTable';
|
|
8
|
-
const date = (column) => postgres
|
|
9
|
-
? `timestamp('${column}', { withTimezone: true })`
|
|
10
|
-
: `integer('${column}', { mode: 'timestamp_ms' })`;
|
|
11
|
-
const bool = postgres
|
|
12
|
-
? "boolean('email_verified')"
|
|
13
|
-
: "integer('email_verified', { mode: 'boolean' })";
|
|
14
|
-
const updated = `${date('updated_at')}.notNull().$defaultFn(() => new Date()).$onUpdate(() => new Date())`;
|
|
15
|
-
const created = `${date('created_at')}.notNull().$defaultFn(() => new Date())`;
|
|
16
|
-
const schema = `import { ${table}, text, ${postgres ? 'timestamp, boolean' : 'integer'}, index } from 'drizzle-orm/${postgres ? 'pg-core' : 'sqlite-core'}';
|
|
17
|
-
export const user = ${table}('user', {
|
|
18
|
-
id: text('id').primaryKey(), name: text('name').notNull(), email: text('email').notNull().unique(),
|
|
19
|
-
emailVerified: ${bool}.notNull().default(false), image: text('image'), createdAt: ${created}, updatedAt: ${updated},
|
|
20
|
-
});
|
|
21
|
-
export const session = ${table}('session', {
|
|
22
|
-
id: text('id').primaryKey(), expiresAt: ${date('expires_at')}.notNull(), token: text('token').notNull().unique(),
|
|
23
|
-
createdAt: ${created}, updatedAt: ${updated}, ipAddress: text('ip_address'), userAgent: text('user_agent'),
|
|
24
|
-
userId: text('user_id').notNull().references(() => user.id, { onDelete: 'cascade' }),
|
|
25
|
-
}, (table) => [index('session_user_id_idx').on(table.userId)]);
|
|
26
|
-
export const account = ${table}('account', {
|
|
27
|
-
id: text('id').primaryKey(), accountId: text('account_id').notNull(), providerId: text('provider_id').notNull(),
|
|
28
|
-
userId: text('user_id').notNull().references(() => user.id, { onDelete: 'cascade' }),
|
|
29
|
-
accessToken: text('access_token'), refreshToken: text('refresh_token'), idToken: text('id_token'),
|
|
30
|
-
accessTokenExpiresAt: ${date('access_token_expires_at')}, refreshTokenExpiresAt: ${date('refresh_token_expires_at')},
|
|
31
|
-
scope: text('scope'), password: text('password'), createdAt: ${created}, updatedAt: ${updated},
|
|
32
|
-
}, (table) => [index('account_user_id_idx').on(table.userId)]);
|
|
33
|
-
export const verification = ${table}('verification', {
|
|
34
|
-
id: text('id').primaryKey(), identifier: text('identifier').notNull(), value: text('value').notNull(),
|
|
35
|
-
expiresAt: ${date('expires_at')}.notNull(), createdAt: ${created}, updatedAt: ${updated},
|
|
36
|
-
}, (table) => [index('verification_identifier_idx').on(table.identifier)]);
|
|
37
|
-
`;
|
|
38
|
-
writeFile(path.join(root, 'packages/db/src/schema.ts'), schema);
|
|
39
|
-
if (!postgres) {
|
|
40
|
-
writeFile(path.join(root, 'packages/db/drizzle/meta/0000_snapshot.json'), JSON.stringify(betterAuthSqliteSnapshot, null, 2) + '\n');
|
|
41
|
-
writeFile(path.join(root, 'packages/db/drizzle/meta/_journal.json'), JSON.stringify({
|
|
42
|
-
version: '7',
|
|
43
|
-
dialect: 'sqlite',
|
|
44
|
-
entries: [
|
|
45
|
-
{
|
|
46
|
-
idx: 0,
|
|
47
|
-
version: '6',
|
|
48
|
-
when: 1791504000000,
|
|
49
|
-
tag: '0000_better_auth',
|
|
50
|
-
breakpoints: true,
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
}, null, 2) + '\n');
|
|
54
|
-
}
|
|
55
|
-
if (!postgres)
|
|
56
|
-
writeFile(path.join(root, 'packages/db/drizzle/0000_better_auth.sql'), 'CREATE TABLE `account` (\n\t`id` text PRIMARY KEY NOT NULL,\n\t`account_id` text NOT NULL,\n\t`provider_id` text NOT NULL,\n\t`user_id` text NOT NULL,\n\t`access_token` text,\n\t`refresh_token` text,\n\t`id_token` text,\n\t`access_token_expires_at` integer,\n\t`refresh_token_expires_at` integer,\n\t`scope` text,\n\t`password` text,\n\t`created_at` integer NOT NULL,\n\t`updated_at` integer NOT NULL,\n\tFOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade\n);\n--> statement-breakpoint\nCREATE INDEX `account_user_id_idx` ON `account` (`user_id`);--> statement-breakpoint\nCREATE TABLE `session` (\n\t`id` text PRIMARY KEY NOT NULL,\n\t`expires_at` integer NOT NULL,\n\t`token` text NOT NULL,\n\t`created_at` integer NOT NULL,\n\t`updated_at` integer NOT NULL,\n\t`ip_address` text,\n\t`user_agent` text,\n\t`user_id` text NOT NULL,\n\tFOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade\n);\n--> statement-breakpoint\nCREATE UNIQUE INDEX `session_token_unique` ON `session` (`token`);--> statement-breakpoint\nCREATE INDEX `session_user_id_idx` ON `session` (`user_id`);--> statement-breakpoint\nCREATE TABLE `user` (\n\t`id` text PRIMARY KEY NOT NULL,\n\t`name` text NOT NULL,\n\t`email` text NOT NULL,\n\t`email_verified` integer DEFAULT false NOT NULL,\n\t`image` text,\n\t`created_at` integer NOT NULL,\n\t`updated_at` integer NOT NULL\n);\n--> statement-breakpoint\nCREATE UNIQUE INDEX `user_email_unique` ON `user` (`email`);--> statement-breakpoint\nCREATE TABLE `verification` (\n\t`id` text PRIMARY KEY NOT NULL,\n\t`identifier` text NOT NULL,\n\t`value` text NOT NULL,\n\t`expires_at` integer NOT NULL,\n\t`created_at` integer NOT NULL,\n\t`updated_at` integer NOT NULL\n);\n--> statement-breakpoint\nCREATE INDEX `verification_identifier_idx` ON `verification` (`identifier`);');
|
|
57
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { StackSelection, StandardProduct } from './registry/types.js';
|
|
2
|
-
export type CapabilitySupport = 'implemented' | 'scaffold-only' | 'unsupported' | 'not-applicable';
|
|
3
|
-
export type CapabilityEvidence = 'local-contract' | 'unverified';
|
|
4
|
-
export interface CapabilityStage {
|
|
5
|
-
support: CapabilitySupport;
|
|
6
|
-
evidence: CapabilityEvidence;
|
|
7
|
-
scope: string;
|
|
8
|
-
}
|
|
9
|
-
export interface ProductCapability {
|
|
10
|
-
id: StandardProduct;
|
|
11
|
-
description: string;
|
|
12
|
-
targets: readonly string[];
|
|
13
|
-
registryDependencies: readonly string[];
|
|
14
|
-
selection: StackSelection;
|
|
15
|
-
scaffold: CapabilityStage;
|
|
16
|
-
provisioning: CapabilityStage;
|
|
17
|
-
delivery: CapabilityStage;
|
|
18
|
-
limits: readonly string[];
|
|
19
|
-
}
|
|
20
|
-
/** Advertises implemented scope and the evidence level separately. This catalog is
|
|
21
|
-
* pure metadata; consulting it never authenticates, provisions, or verifies a live account. */
|
|
22
|
-
export declare const CAPABILITY_CONTRACT: {
|
|
23
|
-
schemaVersion: number;
|
|
24
|
-
cliVersion: string;
|
|
25
|
-
mutation: boolean;
|
|
26
|
-
liveAcceptance: "unverified";
|
|
27
|
-
products: ProductCapability[];
|
|
28
|
-
providers: {
|
|
29
|
-
id: string;
|
|
30
|
-
managementCredential: "STRIPE_SECRET_KEY" | "RC_API_KEY";
|
|
31
|
-
resources: readonly ["account verification", "webhook"] | readonly ["project", "application", "SDK keys"];
|
|
32
|
-
provisioning: CapabilityStage;
|
|
33
|
-
liveAcceptance: "unverified";
|
|
34
|
-
ownerSteps: readonly ["Complete account activation; define products, prices, and purchase behavior."] | readonly ["Configure store credentials or Stripe, products, offerings, and entitlements; verify purchases."];
|
|
35
|
-
}[];
|
|
36
|
-
hosts: {
|
|
37
|
-
id: string;
|
|
38
|
-
delivery: CapabilityStage;
|
|
39
|
-
liveAcceptance: "unverified";
|
|
40
|
-
}[];
|
|
41
|
-
plugin: {
|
|
42
|
-
id: string;
|
|
43
|
-
capability: CapabilityStage;
|
|
44
|
-
}[];
|
|
45
|
-
limits: string[];
|
|
46
|
-
};
|
|
47
|
-
export declare function formatCapabilityContract(): string;
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { STANDARD_PRODUCTS, getStackItem } from './stack-registry.js';
|
|
2
|
-
import { PROVIDER_DEFINITIONS } from './providers/definitions.js';
|
|
3
|
-
import { GENERATOR_VERSION } from './version.js';
|
|
4
|
-
const stage = (support, scope, evidence = 'local-contract') => ({ support, evidence, scope });
|
|
5
|
-
const none = (scope) => stage('not-applicable', scope, 'unverified');
|
|
6
|
-
const cloudflareResources = ['d1', 'r2'];
|
|
7
|
-
function integration(id) {
|
|
8
|
-
const provider = id;
|
|
9
|
-
return Object.hasOwn(PROVIDER_DEFINITIONS, provider)
|
|
10
|
-
? provider
|
|
11
|
-
: undefined;
|
|
12
|
-
}
|
|
13
|
-
function productCapability(id) {
|
|
14
|
-
const item = getStackItem(id);
|
|
15
|
-
const provider = integration(id);
|
|
16
|
-
let provisioning = none('No separately provisioned resource.');
|
|
17
|
-
let delivery = none('Delivered as part of the selected application.');
|
|
18
|
-
const limits = [
|
|
19
|
-
'Generated primitives require application feature development and acceptance checks.',
|
|
20
|
-
];
|
|
21
|
-
if (provider) {
|
|
22
|
-
provisioning = stage('implemented', `Selected ${PROVIDER_DEFINITIONS[provider].resources.join(', ')} through provider APIs.`);
|
|
23
|
-
limits.push(...PROVIDER_DEFINITIONS[provider].ownerSteps, 'Live account permissions and provider behavior require authorized acceptance.');
|
|
24
|
-
}
|
|
25
|
-
if (cloudflareResources.includes(id)) {
|
|
26
|
-
provisioning = stage('implemented', 'Selected Cloudflare resource and checked Worker binding.');
|
|
27
|
-
limits.push('Account eligibility, quotas, and live runtime behavior require authorized acceptance.');
|
|
28
|
-
}
|
|
29
|
-
if (id === 'next') {
|
|
30
|
-
delivery = stage('implemented', 'Full Next.js OpenNext Worker and assets deployed through Wrangler with an API service binding.');
|
|
31
|
-
limits.push('Default adapter caching is not persistent ISR; provision separately scoped cache infrastructure before adding persistent ISR.');
|
|
32
|
-
}
|
|
33
|
-
if (id === 'hono')
|
|
34
|
-
delivery = stage('implemented', 'Cloudflare Worker deployment with provider identity and source checks.');
|
|
35
|
-
if (id === 'expo') {
|
|
36
|
-
delivery = stage('implemented', 'EAS build request, build receipt verification, and artifact link.');
|
|
37
|
-
limits.push('No store submission; signing, enrollment, device testing, and store distribution remain developer responsibilities.');
|
|
38
|
-
}
|
|
39
|
-
if (id === 'better-auth')
|
|
40
|
-
limits.push('Configure private authentication secret and public origin; apply and verify database migrations and authorization rules.');
|
|
41
|
-
return {
|
|
42
|
-
id,
|
|
43
|
-
description: item.description,
|
|
44
|
-
targets: item.targets,
|
|
45
|
-
registryDependencies: item.registryDependencies,
|
|
46
|
-
selection: item.selection,
|
|
47
|
-
scaffold: stage('implemented', 'Bundled source recipe and stack composition.'),
|
|
48
|
-
provisioning,
|
|
49
|
-
delivery,
|
|
50
|
-
limits,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
/** Advertises implemented scope and the evidence level separately. This catalog is
|
|
54
|
-
* pure metadata; consulting it never authenticates, provisions, or verifies a live account. */
|
|
55
|
-
export const CAPABILITY_CONTRACT = {
|
|
56
|
-
schemaVersion: 1,
|
|
57
|
-
cliVersion: GENERATOR_VERSION,
|
|
58
|
-
mutation: false,
|
|
59
|
-
liveAcceptance: 'unverified',
|
|
60
|
-
products: STANDARD_PRODUCTS.map(productCapability),
|
|
61
|
-
providers: Object.entries(PROVIDER_DEFINITIONS).map(([id, definition]) => ({
|
|
62
|
-
id,
|
|
63
|
-
managementCredential: definition.credential,
|
|
64
|
-
resources: definition.resources,
|
|
65
|
-
provisioning: stage('implemented', 'Selected resources through provider APIs; fixture-tested local contracts.'),
|
|
66
|
-
liveAcceptance: 'unverified',
|
|
67
|
-
ownerSteps: definition.ownerSteps,
|
|
68
|
-
})),
|
|
69
|
-
hosts: [
|
|
70
|
-
{
|
|
71
|
-
id: 'cloudflare',
|
|
72
|
-
delivery: stage('implemented', 'Provision selected resources, configure bindings/secrets, deploy Workers, inspect provider identity and source receipts.'),
|
|
73
|
-
liveAcceptance: 'unverified',
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
plugin: [
|
|
77
|
-
{
|
|
78
|
-
id: 'project-inspection',
|
|
79
|
-
capability: stage('implemented', 'Offline versioned stack, setup prerequisites and target-specific recorded delivery evidence, shared by CLI and optional UI.'),
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
id: 'project-catalog',
|
|
83
|
-
capability: stage('implemented', 'Local projects, configuration, and recorded delivery receipts.'),
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
id: 'native-host-installation',
|
|
87
|
-
capability: stage('implemented', 'Packaged plugin and host integration.', 'unverified'),
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: 'live-analytics',
|
|
91
|
-
capability: stage('implemented', 'Explicit selected-resource analytics for Cloudflare Workers/D1; provider access and metric availability require live acceptance.'),
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
id: 'live-database-reader',
|
|
95
|
-
capability: stage('implemented', 'Explicit bounded D1 data reads; masked rows and schema are private app metadata.'),
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: 'live-provider-health',
|
|
99
|
-
capability: stage('implemented', 'Explicit resource existence, identity and recorded deployment status checks; these do not certify application health.'),
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
id: 'schedule-execution',
|
|
103
|
-
capability: stage('unsupported', 'Schedules are declared configuration; no execution-history reader is implemented.', 'unverified'),
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
limits: [
|
|
107
|
-
'Local contract tests are separate from live provider acceptance and completed application verification.',
|
|
108
|
-
'Account selection, enrollment, billing approval, DNS ownership, and signing can require owner action.',
|
|
109
|
-
'The CLI scaffolds supported primitives; customer application features remain development work.',
|
|
110
|
-
],
|
|
111
|
-
};
|
|
112
|
-
export function formatCapabilityContract() {
|
|
113
|
-
return [
|
|
114
|
-
`Anhedral ${CAPABILITY_CONTRACT.cliVersion} capabilities`,
|
|
115
|
-
'Evidence: local contracts; live provider acceptance remains unverified.',
|
|
116
|
-
'',
|
|
117
|
-
'Product Provisioning Delivery',
|
|
118
|
-
...CAPABILITY_CONTRACT.products.map((product) => `${product.id.padEnd(20)}${product.provisioning.support.padEnd(20)}${product.delivery.support}`),
|
|
119
|
-
'',
|
|
120
|
-
'Providers: ' + CAPABILITY_CONTRACT.providers.map((provider) => provider.id).join(', '),
|
|
121
|
-
'Expo delivery returns EAS artifacts; it does not submit to stores.',
|
|
122
|
-
'Plugin: explicit selected-resource analytics, bounded database reads and provider status checks; live acceptance remains unverified.',
|
|
123
|
-
'Resource status does not certify application health.',
|
|
124
|
-
'',
|
|
125
|
-
...CAPABILITY_CONTRACT.limits,
|
|
126
|
-
'',
|
|
127
|
-
'Use --json for scope, owner steps, and evidence for every capability.',
|
|
128
|
-
].join('\n');
|
|
129
|
-
}
|
package/dist/catalog-model.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ProjectInspection } from './inspector-model.js';
|
|
2
|
-
export interface ProjectSummary {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
sourceName: string;
|
|
6
|
-
updatedAt: string;
|
|
7
|
-
products: string[];
|
|
8
|
-
status: 'recorded' | 'source' | 'unavailable';
|
|
9
|
-
message?: string;
|
|
10
|
-
inspection?: ProjectInspection;
|
|
11
|
-
}
|
|
12
|
-
export interface Dashboard {
|
|
13
|
-
projects: ProjectSummary[];
|
|
14
|
-
selectedId: string | null;
|
|
15
|
-
preferences: {
|
|
16
|
-
view: 'list' | 'grid';
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export interface ToolArguments {
|
|
20
|
-
id?: string;
|
|
21
|
-
name?: string;
|
|
22
|
-
view?: 'list' | 'grid';
|
|
23
|
-
}
|
|
24
|
-
export type DashboardTool = 'list_projects' | 'get_project' | 'rename_project' | 'forget_project' | 'set_view';
|
package/dist/catalog-model.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare function catalogDirectory(env?: NodeJS.ProcessEnv): string;
|
|
2
|
-
/** Every successful CLI init records a local app unless explicitly disabled.
|
|
3
|
-
* Registration failure never undoes generated source. */
|
|
4
|
-
export declare function registerGeneratedProject(root: string, env?: NodeJS.ProcessEnv): {
|
|
5
|
-
state: "not-enabled";
|
|
6
|
-
id?: undefined;
|
|
7
|
-
nextAction?: undefined;
|
|
8
|
-
} | {
|
|
9
|
-
state: "registered";
|
|
10
|
-
id: string;
|
|
11
|
-
nextAction?: undefined;
|
|
12
|
-
} | {
|
|
13
|
-
state: "pending";
|
|
14
|
-
nextAction: string;
|
|
15
|
-
id?: undefined;
|
|
16
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { homedir } from 'node:os';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { ProjectStore } from './project-catalog.js';
|
|
4
|
-
export function catalogDirectory(env = process.env) {
|
|
5
|
-
return (env.ANHEDRAL_PLUGIN_DATA ?? path.join(homedir(), '.local', 'share', 'anhedral', 'projects'));
|
|
6
|
-
}
|
|
7
|
-
/** Every successful CLI init records a local app unless explicitly disabled.
|
|
8
|
-
* Registration failure never undoes generated source. */
|
|
9
|
-
export function registerGeneratedProject(root, env = process.env) {
|
|
10
|
-
const directory = catalogDirectory(env);
|
|
11
|
-
if (env.ANHEDRAL_DISABLE_CATALOG === '1')
|
|
12
|
-
return { state: 'not-enabled' };
|
|
13
|
-
try {
|
|
14
|
-
return { state: 'registered', id: new ProjectStore(directory).register(root) };
|
|
15
|
-
}
|
|
16
|
-
catch {
|
|
17
|
-
return {
|
|
18
|
-
state: 'pending',
|
|
19
|
-
nextAction: 'Project generated. Catalog registration could not complete; refresh or register the source after restoring catalog access.',
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ProjectSummary } from './catalog-model.js';
|
|
2
|
-
import type { ProjectEntry } from './project-catalog.js';
|
|
3
|
-
/** List views read bounded package and project configuration; detailed evidence is opt-in by ID. */
|
|
4
|
-
export declare function projectSnapshot(entry: ProjectEntry, detail?: boolean): ProjectSummary;
|
|
5
|
-
export declare function readCatalogSourceIdentity(root: string): string | undefined;
|
package/dist/catalog-snapshot.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { lstatSync, realpathSync } from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { readBoundedFile } from './bounded-file.js';
|
|
4
|
-
import { readProjectConfig, projectConfigPath } from './project-config.js';
|
|
5
|
-
import { inspectApplication } from './project-inspector.js';
|
|
6
|
-
import { STANDARD_PRODUCTS } from './stack-registry.js';
|
|
7
|
-
import { z } from 'zod';
|
|
8
|
-
/** List views read bounded package and project configuration; detailed evidence is opt-in by ID. */
|
|
9
|
-
export function projectSnapshot(entry, detail = false) {
|
|
10
|
-
const summary = {
|
|
11
|
-
id: entry.id,
|
|
12
|
-
name: entry.name,
|
|
13
|
-
sourceName: '',
|
|
14
|
-
updatedAt: entry.updatedAt,
|
|
15
|
-
products: [],
|
|
16
|
-
status: 'source',
|
|
17
|
-
};
|
|
18
|
-
try {
|
|
19
|
-
if (realpathSync(entry.root) !== entry.root)
|
|
20
|
-
throw new Error();
|
|
21
|
-
const configuration = catalogConfiguration(entry.root);
|
|
22
|
-
if (entry.sourceIdentity !== sourceIdentity(configuration))
|
|
23
|
-
return {
|
|
24
|
-
...summary,
|
|
25
|
-
status: 'unavailable',
|
|
26
|
-
message: 'This directory contains a different app. Select its new catalog entry or restore the registered source.',
|
|
27
|
-
};
|
|
28
|
-
if (realpathSync(entry.root) !== entry.root)
|
|
29
|
-
throw new Error();
|
|
30
|
-
const read = (relative) => {
|
|
31
|
-
const file = path.join(entry.root, relative);
|
|
32
|
-
if (!realpathSync(file).startsWith(entry.root + path.sep))
|
|
33
|
-
throw new Error();
|
|
34
|
-
return JSON.parse(readBoundedFile(file, 256 * 1024).toString('utf8'));
|
|
35
|
-
};
|
|
36
|
-
const manifest = read('package.json');
|
|
37
|
-
if (typeof manifest.name !== 'string' ||
|
|
38
|
-
!/^(@[a-z0-9._-]+\/)?[a-z0-9._-]+$/i.test(manifest.name) ||
|
|
39
|
-
manifest.name.length > 214)
|
|
40
|
-
throw new Error();
|
|
41
|
-
summary.sourceName = manifest.name;
|
|
42
|
-
const rawSetup = configuration?.setup;
|
|
43
|
-
if (rawSetup !== undefined) {
|
|
44
|
-
if (!rawSetup || typeof rawSetup !== 'object' || Array.isArray(rawSetup))
|
|
45
|
-
throw new Error();
|
|
46
|
-
if (Buffer.byteLength(JSON.stringify(rawSetup)) > 256 * 1024)
|
|
47
|
-
throw new Error();
|
|
48
|
-
const setup = rawSetup;
|
|
49
|
-
summary.products = Array.isArray(setup.products)
|
|
50
|
-
? setup.products
|
|
51
|
-
.filter((p) => typeof p === 'string' &&
|
|
52
|
-
STANDARD_PRODUCTS.includes(p))
|
|
53
|
-
.slice(0, 100)
|
|
54
|
-
: [];
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
catch {
|
|
58
|
-
summary.status = 'unavailable';
|
|
59
|
-
summary.message =
|
|
60
|
-
'Source summary is unavailable. Restore or inspect the registered source, then refresh.';
|
|
61
|
-
}
|
|
62
|
-
if (detail) {
|
|
63
|
-
try {
|
|
64
|
-
if (realpathSync(entry.root) !== entry.root)
|
|
65
|
-
throw new Error();
|
|
66
|
-
summary.inspection = inspectApplication(entry.root);
|
|
67
|
-
summary.status =
|
|
68
|
-
summary.status !== 'unavailable' &&
|
|
69
|
-
summary.inspection.targets.data.some((target) => target.latestAttempt || target.lastSuccessful)
|
|
70
|
-
? 'recorded'
|
|
71
|
-
: summary.status;
|
|
72
|
-
}
|
|
73
|
-
catch {
|
|
74
|
-
summary.status = 'unavailable';
|
|
75
|
-
summary.message = 'Registered source is unavailable. Restore the directory, then refresh.';
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return summary;
|
|
79
|
-
}
|
|
80
|
-
function catalogConfiguration(root) {
|
|
81
|
-
return lstatSync(projectConfigPath(root), { throwIfNoEntry: false })
|
|
82
|
-
? readProjectConfig(root)
|
|
83
|
-
: null;
|
|
84
|
-
}
|
|
85
|
-
function sourceIdentity(configuration) {
|
|
86
|
-
if (configuration?.identity === undefined)
|
|
87
|
-
return undefined;
|
|
88
|
-
if (Buffer.byteLength(JSON.stringify(configuration.identity)) > 4096)
|
|
89
|
-
throw new Error('Project identity exceeds its size limit.');
|
|
90
|
-
return z
|
|
91
|
-
.object({ schemaVersion: z.literal(1), id: z.string().uuid() })
|
|
92
|
-
.strict()
|
|
93
|
-
.parse(configuration.identity).id;
|
|
94
|
-
}
|
|
95
|
-
export function readCatalogSourceIdentity(root) {
|
|
96
|
-
return sourceIdentity(catalogConfiguration(root));
|
|
97
|
-
}
|
package/dist/cli-delivery.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type OutputOptions } from './cli-output.js';
|
|
2
|
-
export declare const DELIVERY_COMMANDS: readonly ["register", "connect", "provision", "ship", "status", "manage", "verify", "rollback", "recover"];
|
|
3
|
-
export declare function runDelivery(command: string, args: string[], output: OutputOptions): Promise<void>;
|
package/dist/cli-delivery.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { commandArguments, commandArgumentError } from './cli-arguments.js';
|
|
3
|
-
import { printResult } from './cli-output.js';
|
|
4
|
-
import { recoverDeliveryLock } from './project-state.js';
|
|
5
|
-
import { readLifecycleOperation } from './lifecycle.js';
|
|
6
|
-
import { buildMobileApplication } from './mobile-delivery.js';
|
|
7
|
-
import { shipCloudflareApplication } from './ship.js';
|
|
8
|
-
import { planProvisioning, provisionApplication } from './provision.js';
|
|
9
|
-
import { writeManagementOverview } from './management.js';
|
|
10
|
-
import { registerApplication, connectApplication, applicationStatus, verifyApplication, rollbackApplication, recoverApplication, } from './delivery.js';
|
|
11
|
-
export const DELIVERY_COMMANDS = [
|
|
12
|
-
'register',
|
|
13
|
-
'connect',
|
|
14
|
-
'provision',
|
|
15
|
-
'ship',
|
|
16
|
-
'status',
|
|
17
|
-
'manage',
|
|
18
|
-
'verify',
|
|
19
|
-
'rollback',
|
|
20
|
-
'recover',
|
|
21
|
-
];
|
|
22
|
-
function deliveryOptions(command, args) {
|
|
23
|
-
const options = commandArguments(command, args);
|
|
24
|
-
const error = (message) => commandArgumentError(command, message);
|
|
25
|
-
if (options.positional.length > 1)
|
|
26
|
-
throw error('Specify at most one application directory.');
|
|
27
|
-
function choice(flag, choices, message) {
|
|
28
|
-
const value = options.value(flag);
|
|
29
|
-
if (value === undefined)
|
|
30
|
-
return undefined;
|
|
31
|
-
if (!choices.includes(value))
|
|
32
|
-
throw error(message);
|
|
33
|
-
return value;
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
root: path.resolve(options.positional[0] ?? process.cwd()),
|
|
37
|
-
account: options.value('--account'),
|
|
38
|
-
audience: choice('--audience', ['public', 'private'], 'Specify --audience public or private.'),
|
|
39
|
-
emails: options.values('--allow-email'),
|
|
40
|
-
provider: choice('--provider', ['cloudflare'], 'Only Cloudflare hosting is supported.'),
|
|
41
|
-
platform: choice('--platform', ['ios', 'android'], 'Select one mobile platform.'),
|
|
42
|
-
profile: options.value('--profile'),
|
|
43
|
-
releaseId: options.value('--release'),
|
|
44
|
-
dryRun: options.has('--dry-run'),
|
|
45
|
-
refresh: options.has('--refresh'),
|
|
46
|
-
local: options.has('--local'),
|
|
47
|
-
lock: options.has('--lock'),
|
|
48
|
-
dataCompatible: options.has('--data-compatible'),
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function releaseId(command, options) {
|
|
52
|
-
if (!options.releaseId)
|
|
53
|
-
throw commandArgumentError(command, 'Rollback requires --release <recorded-id>.');
|
|
54
|
-
return options.releaseId;
|
|
55
|
-
}
|
|
56
|
-
async function cloudflareCommand(command, options) {
|
|
57
|
-
const { root, account, audience, emails, dryRun, refresh, local } = options;
|
|
58
|
-
switch (command) {
|
|
59
|
-
case 'register':
|
|
60
|
-
return registerApplication(root);
|
|
61
|
-
case 'connect':
|
|
62
|
-
return connectApplication(root, account, audience, undefined, emails);
|
|
63
|
-
case 'provision':
|
|
64
|
-
return dryRun ? planProvisioning(root) : provisionApplication(root);
|
|
65
|
-
case 'ship':
|
|
66
|
-
return shipCloudflareApplication(root, dryRun);
|
|
67
|
-
case 'recover':
|
|
68
|
-
return recoverApplication(root);
|
|
69
|
-
case 'verify':
|
|
70
|
-
return verifyApplication(root);
|
|
71
|
-
case 'rollback':
|
|
72
|
-
return rollbackApplication(root, releaseId(command, options), options.dataCompatible);
|
|
73
|
-
case 'manage': {
|
|
74
|
-
const snapshot = await applicationStatus(root, !local);
|
|
75
|
-
return { file: writeManagementOverview(root, snapshot), evidence: snapshot.evidence };
|
|
76
|
-
}
|
|
77
|
-
default:
|
|
78
|
-
return applicationStatus(root, refresh);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
async function executeDelivery(command, options) {
|
|
82
|
-
const { root, provider, platform, profile, dryRun, lock, refresh } = options;
|
|
83
|
-
if (command === 'recover' && lock) {
|
|
84
|
-
if (provider || refresh)
|
|
85
|
-
throw commandArgumentError(command, 'Local lock recovery cannot be combined with provider recovery or --refresh.');
|
|
86
|
-
return { result: recoverDeliveryLock(root), blockedStates: [] };
|
|
87
|
-
}
|
|
88
|
-
if (platform || profile) {
|
|
89
|
-
if (!platform || !profile || provider)
|
|
90
|
-
throw commandArgumentError(command, 'Mobile shipping requires --platform and --profile, without --provider.');
|
|
91
|
-
return {
|
|
92
|
-
result: await buildMobileApplication(root, { platform, profile, dryRun }),
|
|
93
|
-
blockedStates: ['configuration-required', 'provider-configuration-required'],
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
let result = await cloudflareCommand(command, options);
|
|
97
|
-
if (command === 'status')
|
|
98
|
-
result = { ...result, operation: readLifecycleOperation(root) };
|
|
99
|
-
return {
|
|
100
|
-
result,
|
|
101
|
-
blockedStates: ['configuration-required', 'provider-configuration-required'],
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
export async function runDelivery(command, args, output) {
|
|
105
|
-
const { result, blockedStates } = await executeDelivery(command, deliveryOptions(command, args));
|
|
106
|
-
printResult(command, result, output);
|
|
107
|
-
if (result &&
|
|
108
|
-
typeof result === 'object' &&
|
|
109
|
-
'state' in result &&
|
|
110
|
-
blockedStates.includes(String(result.state)))
|
|
111
|
-
process.exitCode = 1;
|
|
112
|
-
}
|
package/dist/cloudflare.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ApplicationProject, DeliveryRunner } from './project-state.js';
|
|
2
|
-
export interface CloudflareResponse {
|
|
3
|
-
result: unknown;
|
|
4
|
-
result_info?: {
|
|
5
|
-
page?: number;
|
|
6
|
-
total_pages?: number;
|
|
7
|
-
count?: number;
|
|
8
|
-
per_page?: number;
|
|
9
|
-
cursor?: string;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export type CloudflareRequest = (method: 'GET' | 'POST' | 'DELETE', endpoint: string, body?: unknown) => Promise<CloudflareResponse>;
|
|
13
|
-
export interface CloudflareRequestOptions {
|
|
14
|
-
send?: typeof fetch;
|
|
15
|
-
timeoutMs?: number;
|
|
16
|
-
analytics?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare class CloudflareRequestError extends Error {
|
|
19
|
-
readonly status: number;
|
|
20
|
-
constructor(message: string, status: number);
|
|
21
|
-
}
|
|
22
|
-
/** Credentials stay in this closure. Fixed account paths, bounded response reads and
|
|
23
|
-
* a whole-request deadline apply to reads and mutations; mutations never retry. */
|
|
24
|
-
export declare function cloudflareRequest(project: ApplicationProject, directory: string, run: DeliveryRunner, env: NodeJS.ProcessEnv, options?: CloudflareRequestOptions): Promise<CloudflareRequest>;
|
|
25
|
-
export declare function listCloudflare(request: CloudflareRequest, endpoint: string): Promise<Record<string, unknown>[]>;
|