@treeseed/sdk 0.1.2 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -506
- package/dist/{src/cli-tools.d.ts → cli-tools.d.ts} +1 -1
- package/dist/cli-tools.js +5 -3
- package/dist/{src/content-store.d.ts → content-store.d.ts} +3 -2
- package/dist/content-store.js +52 -20
- package/dist/{src/d1-store.d.ts → d1-store.d.ts} +62 -1
- package/dist/d1-store.js +625 -65
- package/dist/field-aliases.d.ts +11 -0
- package/dist/field-aliases.js +41 -0
- package/dist/graph/build.d.ts +19 -0
- package/dist/graph/build.js +949 -0
- package/dist/graph/dsl.d.ts +2 -0
- package/dist/graph/dsl.js +243 -0
- package/dist/graph/query.d.ts +47 -0
- package/dist/graph/query.js +447 -0
- package/dist/graph/ranking.d.ts +3 -0
- package/dist/graph/ranking.js +483 -0
- package/dist/graph/schema.d.ts +142 -0
- package/dist/graph/schema.js +133 -0
- package/dist/graph.d.ts +52 -0
- package/dist/graph.js +133 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +91 -2
- package/dist/model-registry.d.ts +8 -0
- package/dist/model-registry.js +351 -25
- package/dist/operations/providers/default.d.ts +10 -0
- package/dist/operations/providers/default.js +514 -0
- package/dist/operations/runtime.d.ts +7 -0
- package/dist/operations/runtime.js +60 -0
- package/dist/operations/services/config-runtime.d.ts +269 -0
- package/dist/operations/services/config-runtime.js +1397 -0
- package/dist/operations/services/d1-migration.d.ts +6 -0
- package/dist/operations/services/d1-migration.js +89 -0
- package/dist/operations/services/deploy.d.ts +371 -0
- package/dist/operations/services/deploy.js +981 -0
- package/dist/operations/services/git-workflow.d.ts +49 -0
- package/dist/operations/services/git-workflow.js +218 -0
- package/dist/operations/services/github-automation.d.ts +156 -0
- package/dist/operations/services/github-automation.js +256 -0
- package/dist/operations/services/local-dev.d.ts +9 -0
- package/dist/operations/services/local-dev.js +106 -0
- package/dist/operations/services/mailpit-runtime.d.ts +4 -0
- package/dist/operations/services/mailpit-runtime.js +59 -0
- package/dist/operations/services/railway-deploy.d.ts +53 -0
- package/dist/operations/services/railway-deploy.js +123 -0
- package/dist/operations/services/runtime-paths.d.ts +19 -0
- package/dist/operations/services/runtime-paths.js +54 -0
- package/dist/operations/services/runtime-tools.d.ts +117 -0
- package/dist/operations/services/runtime-tools.js +358 -0
- package/dist/operations/services/save-deploy-preflight.d.ts +34 -0
- package/dist/operations/services/save-deploy-preflight.js +76 -0
- package/dist/operations/services/template-registry.d.ts +88 -0
- package/dist/operations/services/template-registry.js +407 -0
- package/dist/operations/services/watch-dev.d.ts +21 -0
- package/dist/operations/services/watch-dev.js +284 -0
- package/dist/operations/services/workspace-preflight.d.ts +40 -0
- package/dist/operations/services/workspace-preflight.js +165 -0
- package/dist/operations/services/workspace-save.d.ts +42 -0
- package/dist/operations/services/workspace-save.js +235 -0
- package/dist/operations/services/workspace-tools.d.ts +16 -0
- package/dist/operations/services/workspace-tools.js +270 -0
- package/dist/operations-registry.d.ts +5 -0
- package/dist/operations-registry.js +68 -0
- package/dist/operations-types.d.ts +71 -0
- package/dist/operations-types.js +17 -0
- package/dist/operations.d.ts +6 -0
- package/dist/operations.js +16 -0
- package/dist/platform/books-data.d.ts +1 -0
- package/dist/platform/books-data.js +1 -0
- package/dist/platform/contracts.d.ts +158 -0
- package/dist/platform/contracts.js +0 -0
- package/dist/platform/deploy/config.d.ts +4 -0
- package/dist/platform/deploy/config.js +222 -0
- package/dist/platform/deploy-config.d.ts +1 -0
- package/dist/platform/deploy-config.js +1 -0
- package/dist/platform/deploy-runtime.d.ts +18 -0
- package/dist/platform/deploy-runtime.js +78 -0
- package/dist/platform/env.yaml +394 -0
- package/dist/platform/environment.d.ts +130 -0
- package/dist/platform/environment.js +331 -0
- package/dist/platform/plugin.d.ts +2 -0
- package/dist/platform/plugin.js +4 -0
- package/dist/platform/plugins/constants.d.ts +22 -0
- package/dist/platform/plugins/constants.js +29 -0
- package/dist/platform/plugins/plugin.d.ts +51 -0
- package/dist/platform/plugins/plugin.js +6 -0
- package/dist/platform/plugins/runtime.d.ts +35 -0
- package/dist/platform/plugins/runtime.js +161 -0
- package/dist/platform/plugins.d.ts +6 -0
- package/dist/platform/plugins.js +38 -0
- package/dist/platform/site-config-schema.js +1 -0
- package/dist/platform/tenant/config.d.ts +9 -0
- package/dist/platform/tenant/config.js +154 -0
- package/dist/platform/tenant/runtime-config.d.ts +4 -0
- package/dist/platform/tenant/runtime-config.js +20 -0
- package/dist/platform/tenant-config.d.ts +1 -0
- package/dist/platform/tenant-config.js +1 -0
- package/dist/platform/utils/books-data.d.ts +29 -0
- package/dist/platform/utils/books-data.js +82 -0
- package/dist/platform/utils/site-config-schema.js +321 -0
- package/dist/remote.d.ts +175 -0
- package/dist/remote.js +202 -0
- package/dist/runtime.js +35 -22
- package/dist/scripts/aggregate-book.js +121 -0
- package/dist/scripts/build-dist.js +54 -13
- package/dist/scripts/build-tenant-worker.js +36 -0
- package/dist/scripts/cleanup-markdown.js +373 -0
- package/dist/scripts/cli-test-fixtures.js +48 -0
- package/dist/scripts/config-treeseed.js +95 -0
- package/dist/scripts/ensure-mailpit.js +29 -0
- package/dist/scripts/local-dev.js +129 -0
- package/dist/scripts/logs-mailpit.js +2 -0
- package/dist/scripts/patch-starlight-content-path.js +172 -0
- package/dist/scripts/release-verify.js +34 -6
- package/dist/scripts/run-fixture-astro-command.js +18 -0
- package/dist/scripts/scaffold-site.js +65 -0
- package/dist/scripts/stop-mailpit.js +5 -0
- package/dist/scripts/sync-dev-vars.js +6 -0
- package/dist/scripts/sync-template.js +20 -0
- package/dist/scripts/template-catalog.test.js +100 -0
- package/dist/scripts/template-command.js +31 -0
- package/dist/scripts/tenant-astro-command.js +3 -0
- package/dist/scripts/tenant-build.js +16 -0
- package/dist/scripts/tenant-check.js +7 -0
- package/dist/scripts/tenant-d1-migrate-local.js +11 -0
- package/dist/scripts/tenant-deploy.js +180 -0
- package/dist/scripts/tenant-destroy.js +104 -0
- package/dist/scripts/tenant-dev.js +171 -0
- package/dist/scripts/tenant-lint.js +4 -0
- package/dist/scripts/tenant-test.js +4 -0
- package/dist/scripts/test-cloudflare-local.js +212 -0
- package/dist/scripts/test-scaffold.js +314 -0
- package/dist/scripts/test-smoke.js +71 -13
- package/dist/scripts/treeseed-assert-release-tag-version.js +21 -0
- package/dist/scripts/treeseed-build-dist.js +134 -0
- package/dist/scripts/treeseed-publish-package.js +19 -0
- package/dist/scripts/treeseed-release-verify.js +131 -0
- package/dist/scripts/treeseed-run-ts.js +45 -0
- package/dist/scripts/validate-templates.js +6 -0
- package/dist/scripts/verify-driver.js +29 -0
- package/dist/scripts/workflow-commands.test.js +39 -0
- package/dist/scripts/workspace-close.js +24 -0
- package/dist/scripts/workspace-command-e2e.js +718 -0
- package/dist/scripts/workspace-lint.js +9 -0
- package/dist/scripts/workspace-preflight.js +22 -0
- package/dist/scripts/workspace-publish-changed-packages.js +16 -0
- package/dist/scripts/workspace-release-verify.js +81 -0
- package/dist/scripts/workspace-release.js +42 -0
- package/dist/scripts/workspace-save.js +124 -0
- package/dist/scripts/workspace-start-warning.js +3 -0
- package/dist/scripts/workspace-start.js +71 -0
- package/dist/scripts/workspace-test-unit.js +4 -0
- package/dist/scripts/workspace-test.js +11 -0
- package/dist/sdk-fields.d.ts +11 -0
- package/dist/sdk-fields.js +169 -0
- package/dist/sdk-filters.d.ts +4 -0
- package/dist/sdk-filters.js +12 -15
- package/dist/sdk-types.d.ts +796 -0
- package/dist/sdk-types.js +7 -1
- package/dist/sdk-version.d.ts +2 -0
- package/dist/sdk-version.js +42 -0
- package/dist/sdk.d.ts +215 -0
- package/dist/sdk.js +235 -11
- package/dist/stores/cursor-store.js +9 -3
- package/dist/stores/lease-store.js +8 -2
- package/dist/{src/stores → stores}/message-store.d.ts +1 -1
- package/dist/stores/message-store.js +27 -3
- package/dist/stores/operational-store.d.ts +24 -0
- package/dist/stores/operational-store.js +279 -0
- package/dist/stores/run-store.js +8 -1
- package/dist/stores/subscription-store.js +7 -5
- package/dist/template-catalog.d.ts +13 -0
- package/dist/template-catalog.js +141 -0
- package/dist/treeseed/services/compose.yml +7 -0
- package/dist/treeseed/template-catalog/catalog.fixture.json +55 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/astro.config.d.ts +2 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/astro.config.ts +3 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/package.json +32 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/config.yaml +40 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/empty/.gitkeep +1 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/knowledge/handbook/index.mdx +11 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/pages/welcome.mdx +11 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content.config.d.ts +1 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content.config.ts +3 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/env.yaml +1 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/manifest.yaml +19 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/treeseed.site.yaml +26 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/tsconfig.json +9 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template.config.json +90 -0
- package/dist/utils/agents/contracts/messages.d.ts +88 -0
- package/dist/utils/agents/contracts/messages.js +138 -0
- package/dist/utils/agents/contracts/run.d.ts +20 -0
- package/dist/utils/agents/contracts/run.js +0 -0
- package/dist/utils/agents/runtime-types.d.ts +117 -0
- package/dist/utils/agents/runtime-types.js +4 -0
- package/dist/verification.d.ts +20 -0
- package/dist/verification.js +98 -0
- package/dist/workflow/operations.d.ts +396 -0
- package/dist/workflow/operations.js +841 -0
- package/dist/workflow-state.d.ts +56 -0
- package/dist/workflow-state.js +195 -0
- package/dist/workflow-support.d.ts +9 -0
- package/dist/workflow-support.js +176 -0
- package/dist/workflow.d.ts +111 -0
- package/dist/workflow.js +97 -0
- package/package.json +111 -5
- package/scripts/verify-driver.mjs +29 -0
- package/dist/scripts/.ts-run-1775630384291-crtqr3izsa.js +0 -22
- package/dist/scripts/.ts-run-1775630388025-vnjle0z75a.js +0 -129
- package/dist/scripts/assert-release-tag-version.d.ts +0 -1
- package/dist/scripts/build-dist.d.ts +0 -1
- package/dist/scripts/fixture-tools.d.ts +0 -5
- package/dist/scripts/package-tools.d.ts +0 -15
- package/dist/scripts/publish-package.d.ts +0 -1
- package/dist/scripts/release-verify.d.ts +0 -1
- package/dist/scripts/test-smoke.d.ts +0 -1
- package/dist/src/index.d.ts +0 -6
- package/dist/src/model-registry.d.ts +0 -4
- package/dist/src/sdk-filters.d.ts +0 -4
- package/dist/src/sdk-types.d.ts +0 -285
- package/dist/src/sdk.d.ts +0 -109
- package/dist/test/test-fixture.d.ts +0 -1
- package/dist/test/utils/envelopes.test.d.ts +0 -1
- package/dist/test/utils/sdk.test.d.ts +0 -1
- package/dist/vitest.config.d.ts +0 -2
- /package/dist/{src/frontmatter.d.ts → frontmatter.d.ts} +0 -0
- /package/dist/{src/git-runtime.d.ts → git-runtime.d.ts} +0 -0
- /package/dist/{src/runtime.d.ts → runtime.d.ts} +0 -0
- /package/dist/{src/stores → stores}/cursor-store.d.ts +0 -0
- /package/dist/{src/stores → stores}/envelopes.d.ts +0 -0
- /package/dist/{src/stores → stores}/helpers.d.ts +0 -0
- /package/dist/{src/stores → stores}/lease-store.d.ts +0 -0
- /package/dist/{src/stores → stores}/run-store.d.ts +0 -0
- /package/dist/{src/stores → stores}/subscription-store.d.ts +0 -0
- /package/dist/{src/types → types}/agents.d.ts +0 -0
- /package/dist/{src/types → types}/cloudflare.d.ts +0 -0
- /package/dist/{src/wrangler-d1.d.ts → wrangler-d1.d.ts} +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { existsSync, readdirSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
import { resolveWranglerBin } from "./runtime-tools.js";
|
|
5
|
+
const DATABASE_BINDING = "SITE_DATA_DB";
|
|
6
|
+
function runWrangler(args, { cwd, capture = false } = {}) {
|
|
7
|
+
return spawnSync(process.execPath, [resolveWranglerBin(), ...args], {
|
|
8
|
+
cwd,
|
|
9
|
+
env: { ...process.env },
|
|
10
|
+
stdio: capture ? ["ignore", "pipe", "pipe"] : "inherit",
|
|
11
|
+
encoding: capture ? "utf8" : void 0
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function executeSqlFile({ cwd, wranglerConfig, filePath, persistTo }) {
|
|
15
|
+
const args = ["d1", "execute", DATABASE_BINDING, "--local", "--config", wranglerConfig, "--file", filePath];
|
|
16
|
+
if (persistTo) {
|
|
17
|
+
args.push("--persist-to", persistTo);
|
|
18
|
+
}
|
|
19
|
+
const result = runWrangler(args, { cwd });
|
|
20
|
+
if (result.status !== 0) {
|
|
21
|
+
process.exit(result.status ?? 1);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function executeSqlCommand({ cwd, wranglerConfig, command, persistTo, capture = false }) {
|
|
25
|
+
const args = ["d1", "execute", DATABASE_BINDING, "--local", "--config", wranglerConfig, "--command", command];
|
|
26
|
+
if (persistTo) {
|
|
27
|
+
args.push("--persist-to", persistTo);
|
|
28
|
+
}
|
|
29
|
+
const result = runWrangler(args, { cwd, capture });
|
|
30
|
+
if (result.status !== 0) {
|
|
31
|
+
if (capture) {
|
|
32
|
+
if (result.stdout) process.stdout.write(result.stdout);
|
|
33
|
+
if (result.stderr) process.stderr.write(result.stderr);
|
|
34
|
+
}
|
|
35
|
+
process.exit(result.status ?? 1);
|
|
36
|
+
}
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
39
|
+
function ensureSchemaMigrationsTable({ cwd, wranglerConfig, persistTo }) {
|
|
40
|
+
executeSqlCommand({
|
|
41
|
+
cwd,
|
|
42
|
+
wranglerConfig,
|
|
43
|
+
persistTo,
|
|
44
|
+
command: `CREATE TABLE IF NOT EXISTS treeseed_schema_migrations (
|
|
45
|
+
name TEXT PRIMARY KEY,
|
|
46
|
+
applied_at TEXT NOT NULL
|
|
47
|
+
);`
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function loadAppliedMigrations({ cwd, wranglerConfig, persistTo }) {
|
|
51
|
+
const result = executeSqlCommand({
|
|
52
|
+
cwd,
|
|
53
|
+
wranglerConfig,
|
|
54
|
+
persistTo,
|
|
55
|
+
capture: true,
|
|
56
|
+
command: "SELECT name FROM treeseed_schema_migrations ORDER BY name ASC;"
|
|
57
|
+
});
|
|
58
|
+
const parsed = JSON.parse(result.stdout);
|
|
59
|
+
const rows = (Array.isArray(parsed) ? parsed : [parsed]).flatMap((entry) => entry.results ?? []);
|
|
60
|
+
return new Set(rows.map((row) => row.name).filter(Boolean));
|
|
61
|
+
}
|
|
62
|
+
function markMigrationApplied({ cwd, wranglerConfig, persistTo, migration }) {
|
|
63
|
+
executeSqlCommand({
|
|
64
|
+
cwd,
|
|
65
|
+
wranglerConfig,
|
|
66
|
+
persistTo,
|
|
67
|
+
command: `INSERT OR REPLACE INTO treeseed_schema_migrations (name, applied_at) VALUES ('${migration.replace(/'/g, "''")}', datetime('now'));`
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function runLocalD1Migrations({ cwd, wranglerConfig, migrationsRoot, persistTo }) {
|
|
71
|
+
ensureSchemaMigrationsTable({ cwd, wranglerConfig, persistTo });
|
|
72
|
+
const appliedMigrations = loadAppliedMigrations({ cwd, wranglerConfig, persistTo });
|
|
73
|
+
const migrations = readdirSync(migrationsRoot).filter((entry) => /^\d+.*\.sql$/i.test(entry)).sort((left, right) => left.localeCompare(right, void 0, { numeric: true }));
|
|
74
|
+
for (const migration of migrations) {
|
|
75
|
+
if (appliedMigrations.has(migration)) {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
const filePath = resolve(migrationsRoot, migration);
|
|
79
|
+
if (!existsSync(filePath)) {
|
|
80
|
+
console.error(`Unable to find migration file at ${filePath}.`);
|
|
81
|
+
process.exit(1);
|
|
82
|
+
}
|
|
83
|
+
executeSqlFile({ cwd, wranglerConfig, filePath, persistTo });
|
|
84
|
+
markMigrationApplied({ cwd, wranglerConfig, persistTo, migration });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
runLocalD1Migrations
|
|
89
|
+
};
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
export declare function normalizePersistentScope(scope?: string): string;
|
|
2
|
+
export declare function createPersistentDeployTarget(scope?: string): {
|
|
3
|
+
kind: string;
|
|
4
|
+
scope: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function createBranchPreviewDeployTarget(branchName: any): {
|
|
7
|
+
kind: string;
|
|
8
|
+
branchName: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function scopeFromTarget(target: any): any;
|
|
11
|
+
export declare function deployTargetLabel(scopeOrTarget?: string): any;
|
|
12
|
+
export declare function loadDeployState(tenantRoot: any, deployConfig: any, options?: {}): any;
|
|
13
|
+
export declare function writeDeployState(tenantRoot: any, state: any, options?: {}): void;
|
|
14
|
+
export declare function resolveGeneratedWranglerPath(tenantRoot: any, options?: {}): string;
|
|
15
|
+
export declare function buildWranglerConfigContents(tenantRoot: any, deployConfig: any, state: any, options?: {}): string;
|
|
16
|
+
export declare function ensureGeneratedWranglerConfig(tenantRoot: any, options?: {}): {
|
|
17
|
+
wranglerPath: string;
|
|
18
|
+
deployConfig: {
|
|
19
|
+
name: string;
|
|
20
|
+
slug: string;
|
|
21
|
+
siteUrl: string;
|
|
22
|
+
contactEmail: string;
|
|
23
|
+
cloudflare: {
|
|
24
|
+
accountId: string;
|
|
25
|
+
workerName: string | undefined;
|
|
26
|
+
gatewayWorkerName: string | undefined;
|
|
27
|
+
queueName: string | undefined;
|
|
28
|
+
dlqName: string | undefined;
|
|
29
|
+
d1Binding: string | undefined;
|
|
30
|
+
queueBinding: string | undefined;
|
|
31
|
+
};
|
|
32
|
+
plugins: {
|
|
33
|
+
package: string;
|
|
34
|
+
enabled: boolean;
|
|
35
|
+
}[] | {
|
|
36
|
+
package: string;
|
|
37
|
+
enabled: boolean | undefined;
|
|
38
|
+
config: any;
|
|
39
|
+
}[];
|
|
40
|
+
providers: {
|
|
41
|
+
forms: string;
|
|
42
|
+
agents: {
|
|
43
|
+
execution: string;
|
|
44
|
+
mutation: string;
|
|
45
|
+
repository: string;
|
|
46
|
+
verification: string;
|
|
47
|
+
notification: string;
|
|
48
|
+
research: string;
|
|
49
|
+
};
|
|
50
|
+
deploy: string;
|
|
51
|
+
content: {
|
|
52
|
+
docs: string;
|
|
53
|
+
};
|
|
54
|
+
site: string;
|
|
55
|
+
};
|
|
56
|
+
services: {
|
|
57
|
+
[k: string]: {
|
|
58
|
+
enabled: boolean | undefined;
|
|
59
|
+
provider: string | undefined;
|
|
60
|
+
rootDir: string | undefined;
|
|
61
|
+
publicBaseUrl: string | undefined;
|
|
62
|
+
cloudflare: {
|
|
63
|
+
workerName: string | undefined;
|
|
64
|
+
};
|
|
65
|
+
railway: {
|
|
66
|
+
projectId: string | undefined;
|
|
67
|
+
projectName: string | undefined;
|
|
68
|
+
serviceId: string | undefined;
|
|
69
|
+
serviceName: string | undefined;
|
|
70
|
+
rootDir: string | undefined;
|
|
71
|
+
buildCommand: string | undefined;
|
|
72
|
+
startCommand: string | undefined;
|
|
73
|
+
};
|
|
74
|
+
environments: {
|
|
75
|
+
local: {
|
|
76
|
+
baseUrl: string | undefined;
|
|
77
|
+
domain: string | undefined;
|
|
78
|
+
railwayEnvironment: string | undefined;
|
|
79
|
+
};
|
|
80
|
+
staging: {
|
|
81
|
+
baseUrl: string | undefined;
|
|
82
|
+
domain: string | undefined;
|
|
83
|
+
railwayEnvironment: string | undefined;
|
|
84
|
+
};
|
|
85
|
+
prod: {
|
|
86
|
+
baseUrl: string | undefined;
|
|
87
|
+
domain: string | undefined;
|
|
88
|
+
railwayEnvironment: string | undefined;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
} | undefined;
|
|
92
|
+
} | undefined;
|
|
93
|
+
smtp: {
|
|
94
|
+
enabled: boolean | undefined;
|
|
95
|
+
};
|
|
96
|
+
turnstile: {
|
|
97
|
+
enabled: boolean;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
state: any;
|
|
101
|
+
manifestFingerprint: string;
|
|
102
|
+
target: {
|
|
103
|
+
kind: string;
|
|
104
|
+
scope: string;
|
|
105
|
+
} | {
|
|
106
|
+
kind: string;
|
|
107
|
+
branchName: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
export declare function collectMissingDeployInputs(tenantRoot: any): {
|
|
111
|
+
key: string;
|
|
112
|
+
label: string;
|
|
113
|
+
message: string;
|
|
114
|
+
}[];
|
|
115
|
+
export declare function promptForMissingDeployInputs(tenantRoot: any): Promise<{
|
|
116
|
+
prompted: boolean;
|
|
117
|
+
provided: string[];
|
|
118
|
+
}>;
|
|
119
|
+
export declare function validateDeployPrerequisites(tenantRoot: any, { requireRemote }?: {
|
|
120
|
+
requireRemote?: boolean | undefined;
|
|
121
|
+
}): {
|
|
122
|
+
name: string;
|
|
123
|
+
slug: string;
|
|
124
|
+
siteUrl: string;
|
|
125
|
+
contactEmail: string;
|
|
126
|
+
cloudflare: {
|
|
127
|
+
accountId: string;
|
|
128
|
+
workerName: string | undefined;
|
|
129
|
+
gatewayWorkerName: string | undefined;
|
|
130
|
+
queueName: string | undefined;
|
|
131
|
+
dlqName: string | undefined;
|
|
132
|
+
d1Binding: string | undefined;
|
|
133
|
+
queueBinding: string | undefined;
|
|
134
|
+
};
|
|
135
|
+
plugins: {
|
|
136
|
+
package: string;
|
|
137
|
+
enabled: boolean;
|
|
138
|
+
}[] | {
|
|
139
|
+
package: string;
|
|
140
|
+
enabled: boolean | undefined;
|
|
141
|
+
config: any;
|
|
142
|
+
}[];
|
|
143
|
+
providers: {
|
|
144
|
+
forms: string;
|
|
145
|
+
agents: {
|
|
146
|
+
execution: string;
|
|
147
|
+
mutation: string;
|
|
148
|
+
repository: string;
|
|
149
|
+
verification: string;
|
|
150
|
+
notification: string;
|
|
151
|
+
research: string;
|
|
152
|
+
};
|
|
153
|
+
deploy: string;
|
|
154
|
+
content: {
|
|
155
|
+
docs: string;
|
|
156
|
+
};
|
|
157
|
+
site: string;
|
|
158
|
+
};
|
|
159
|
+
services: {
|
|
160
|
+
[k: string]: {
|
|
161
|
+
enabled: boolean | undefined;
|
|
162
|
+
provider: string | undefined;
|
|
163
|
+
rootDir: string | undefined;
|
|
164
|
+
publicBaseUrl: string | undefined;
|
|
165
|
+
cloudflare: {
|
|
166
|
+
workerName: string | undefined;
|
|
167
|
+
};
|
|
168
|
+
railway: {
|
|
169
|
+
projectId: string | undefined;
|
|
170
|
+
projectName: string | undefined;
|
|
171
|
+
serviceId: string | undefined;
|
|
172
|
+
serviceName: string | undefined;
|
|
173
|
+
rootDir: string | undefined;
|
|
174
|
+
buildCommand: string | undefined;
|
|
175
|
+
startCommand: string | undefined;
|
|
176
|
+
};
|
|
177
|
+
environments: {
|
|
178
|
+
local: {
|
|
179
|
+
baseUrl: string | undefined;
|
|
180
|
+
domain: string | undefined;
|
|
181
|
+
railwayEnvironment: string | undefined;
|
|
182
|
+
};
|
|
183
|
+
staging: {
|
|
184
|
+
baseUrl: string | undefined;
|
|
185
|
+
domain: string | undefined;
|
|
186
|
+
railwayEnvironment: string | undefined;
|
|
187
|
+
};
|
|
188
|
+
prod: {
|
|
189
|
+
baseUrl: string | undefined;
|
|
190
|
+
domain: string | undefined;
|
|
191
|
+
railwayEnvironment: string | undefined;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
} | undefined;
|
|
195
|
+
} | undefined;
|
|
196
|
+
smtp: {
|
|
197
|
+
enabled: boolean | undefined;
|
|
198
|
+
};
|
|
199
|
+
turnstile: {
|
|
200
|
+
enabled: boolean;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
export declare function validateDestroyPrerequisites(tenantRoot: any, { requireRemote }?: {
|
|
204
|
+
requireRemote?: boolean | undefined;
|
|
205
|
+
}): {
|
|
206
|
+
name: string;
|
|
207
|
+
slug: string;
|
|
208
|
+
siteUrl: string;
|
|
209
|
+
contactEmail: string;
|
|
210
|
+
cloudflare: {
|
|
211
|
+
accountId: string;
|
|
212
|
+
workerName: string | undefined;
|
|
213
|
+
gatewayWorkerName: string | undefined;
|
|
214
|
+
queueName: string | undefined;
|
|
215
|
+
dlqName: string | undefined;
|
|
216
|
+
d1Binding: string | undefined;
|
|
217
|
+
queueBinding: string | undefined;
|
|
218
|
+
};
|
|
219
|
+
plugins: {
|
|
220
|
+
package: string;
|
|
221
|
+
enabled: boolean;
|
|
222
|
+
}[] | {
|
|
223
|
+
package: string;
|
|
224
|
+
enabled: boolean | undefined;
|
|
225
|
+
config: any;
|
|
226
|
+
}[];
|
|
227
|
+
providers: {
|
|
228
|
+
forms: string;
|
|
229
|
+
agents: {
|
|
230
|
+
execution: string;
|
|
231
|
+
mutation: string;
|
|
232
|
+
repository: string;
|
|
233
|
+
verification: string;
|
|
234
|
+
notification: string;
|
|
235
|
+
research: string;
|
|
236
|
+
};
|
|
237
|
+
deploy: string;
|
|
238
|
+
content: {
|
|
239
|
+
docs: string;
|
|
240
|
+
};
|
|
241
|
+
site: string;
|
|
242
|
+
};
|
|
243
|
+
services: {
|
|
244
|
+
[k: string]: {
|
|
245
|
+
enabled: boolean | undefined;
|
|
246
|
+
provider: string | undefined;
|
|
247
|
+
rootDir: string | undefined;
|
|
248
|
+
publicBaseUrl: string | undefined;
|
|
249
|
+
cloudflare: {
|
|
250
|
+
workerName: string | undefined;
|
|
251
|
+
};
|
|
252
|
+
railway: {
|
|
253
|
+
projectId: string | undefined;
|
|
254
|
+
projectName: string | undefined;
|
|
255
|
+
serviceId: string | undefined;
|
|
256
|
+
serviceName: string | undefined;
|
|
257
|
+
rootDir: string | undefined;
|
|
258
|
+
buildCommand: string | undefined;
|
|
259
|
+
startCommand: string | undefined;
|
|
260
|
+
};
|
|
261
|
+
environments: {
|
|
262
|
+
local: {
|
|
263
|
+
baseUrl: string | undefined;
|
|
264
|
+
domain: string | undefined;
|
|
265
|
+
railwayEnvironment: string | undefined;
|
|
266
|
+
};
|
|
267
|
+
staging: {
|
|
268
|
+
baseUrl: string | undefined;
|
|
269
|
+
domain: string | undefined;
|
|
270
|
+
railwayEnvironment: string | undefined;
|
|
271
|
+
};
|
|
272
|
+
prod: {
|
|
273
|
+
baseUrl: string | undefined;
|
|
274
|
+
domain: string | undefined;
|
|
275
|
+
railwayEnvironment: string | undefined;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
} | undefined;
|
|
279
|
+
} | undefined;
|
|
280
|
+
smtp: {
|
|
281
|
+
enabled: boolean | undefined;
|
|
282
|
+
};
|
|
283
|
+
turnstile: {
|
|
284
|
+
enabled: boolean;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
export declare function destroyCloudflareResources(tenantRoot: any, options?: {}): {
|
|
288
|
+
target: {
|
|
289
|
+
kind: string;
|
|
290
|
+
scope: string;
|
|
291
|
+
} | {
|
|
292
|
+
kind: string;
|
|
293
|
+
branchName: string;
|
|
294
|
+
};
|
|
295
|
+
summary: {
|
|
296
|
+
target: any;
|
|
297
|
+
workerName: any;
|
|
298
|
+
siteUrl: any;
|
|
299
|
+
accountId: any;
|
|
300
|
+
formGuardKv: any;
|
|
301
|
+
sessionKv: any;
|
|
302
|
+
siteDataDb: any;
|
|
303
|
+
};
|
|
304
|
+
operations: {
|
|
305
|
+
worker: {
|
|
306
|
+
status: string;
|
|
307
|
+
name: any;
|
|
308
|
+
};
|
|
309
|
+
formGuard: {
|
|
310
|
+
status: string;
|
|
311
|
+
id: any;
|
|
312
|
+
preview?: undefined;
|
|
313
|
+
} | {
|
|
314
|
+
status: string;
|
|
315
|
+
id: any;
|
|
316
|
+
preview: boolean;
|
|
317
|
+
};
|
|
318
|
+
formGuardPreview: {
|
|
319
|
+
status: string;
|
|
320
|
+
id: any;
|
|
321
|
+
preview?: undefined;
|
|
322
|
+
} | {
|
|
323
|
+
status: string;
|
|
324
|
+
id: any;
|
|
325
|
+
preview: boolean;
|
|
326
|
+
} | null;
|
|
327
|
+
session: {
|
|
328
|
+
status: string;
|
|
329
|
+
id: any;
|
|
330
|
+
preview?: undefined;
|
|
331
|
+
} | {
|
|
332
|
+
status: string;
|
|
333
|
+
id: any;
|
|
334
|
+
preview: boolean;
|
|
335
|
+
};
|
|
336
|
+
sessionPreview: {
|
|
337
|
+
status: string;
|
|
338
|
+
id: any;
|
|
339
|
+
preview?: undefined;
|
|
340
|
+
} | {
|
|
341
|
+
status: string;
|
|
342
|
+
id: any;
|
|
343
|
+
preview: boolean;
|
|
344
|
+
} | null;
|
|
345
|
+
database: {
|
|
346
|
+
status: string;
|
|
347
|
+
name: any;
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
export declare function cleanupDestroyedState(tenantRoot: any, options?: {}): void;
|
|
352
|
+
export declare function provisionCloudflareResources(tenantRoot: any, options?: {}): {
|
|
353
|
+
target: any;
|
|
354
|
+
workerName: any;
|
|
355
|
+
siteUrl: any;
|
|
356
|
+
accountId: any;
|
|
357
|
+
formGuardKv: any;
|
|
358
|
+
sessionKv: any;
|
|
359
|
+
siteDataDb: any;
|
|
360
|
+
};
|
|
361
|
+
export declare function syncCloudflareSecrets(tenantRoot: any, options?: {}): string[];
|
|
362
|
+
export declare function runRemoteD1Migrations(tenantRoot: any, options?: {}): {
|
|
363
|
+
databaseName: any;
|
|
364
|
+
dryRun: boolean;
|
|
365
|
+
};
|
|
366
|
+
export declare function markDeploymentInitialized(tenantRoot: any, options?: {}): any;
|
|
367
|
+
export declare function markManagedServicesInitialized(tenantRoot: any, options?: {}): any;
|
|
368
|
+
export declare function assertDeploymentInitialized(tenantRoot: any, options?: {}): any;
|
|
369
|
+
export declare function finalizeDeploymentState(tenantRoot: any, options?: {}): any;
|
|
370
|
+
export declare function printDeploySummary(summary: any): void;
|
|
371
|
+
export declare function printDestroySummary(result: any): void;
|