@treeseed/sdk 0.4.13 → 0.5.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/dist/control-plane-client.d.ts +60 -1
- package/dist/control-plane-client.js +59 -0
- package/dist/control-plane.d.ts +1 -1
- package/dist/control-plane.js +11 -4
- package/dist/d1-store.d.ts +58 -0
- package/dist/d1-store.js +64 -0
- package/dist/dispatch.js +6 -0
- package/dist/graph/schema.js +4 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +32 -0
- package/dist/knowledge-coop.d.ts +223 -0
- package/dist/knowledge-coop.js +82 -0
- package/dist/model-registry.js +79 -0
- package/dist/operations/providers/default.js +126 -7
- package/dist/operations/services/config-runtime.d.ts +102 -24
- package/dist/operations/services/config-runtime.js +896 -160
- package/dist/operations/services/deploy.d.ts +223 -15
- package/dist/operations/services/deploy.js +626 -55
- package/dist/operations/services/github-automation.d.ts +60 -0
- package/dist/operations/services/github-automation.js +138 -0
- package/dist/operations/services/key-agent.d.ts +118 -0
- package/dist/operations/services/key-agent.js +476 -0
- package/dist/operations/services/knowledge-coop-launch.d.ts +90 -0
- package/dist/operations/services/knowledge-coop-launch.js +753 -0
- package/dist/operations/services/knowledge-coop-packaging.d.ts +59 -0
- package/dist/operations/services/knowledge-coop-packaging.js +234 -0
- package/dist/operations/services/local-dev.d.ts +0 -1
- package/dist/operations/services/local-dev.js +1 -14
- package/dist/operations/services/project-platform.d.ts +42 -182
- package/dist/operations/services/project-platform.js +162 -59
- package/dist/operations/services/railway-deploy.d.ts +1 -0
- package/dist/operations/services/railway-deploy.js +31 -13
- package/dist/operations/services/runtime-tools.d.ts +52 -5
- package/dist/operations/services/runtime-tools.js +186 -26
- package/dist/operations/services/watch-dev.js +2 -4
- package/dist/operations/services/workspace-preflight.d.ts +4 -4
- package/dist/operations/services/workspace-preflight.js +22 -20
- package/dist/operations-registry.js +7 -2
- package/dist/platform/contracts.d.ts +39 -3
- package/dist/platform/deploy-config.d.ts +12 -1
- package/dist/platform/deploy-config.js +214 -15
- package/dist/platform/deploy-runtime.d.ts +1 -0
- package/dist/platform/deploy-runtime.js +10 -2
- package/dist/platform/env.yaml +93 -61
- package/dist/platform/environment.d.ts +13 -2
- package/dist/platform/environment.js +90 -20
- package/dist/platform/plugins/constants.d.ts +1 -0
- package/dist/platform/plugins/constants.js +7 -6
- package/dist/platform/tenant/runtime-config.js +8 -1
- package/dist/platform/tenant-config.js +4 -0
- package/dist/platform/utils/site-config-schema.js +18 -0
- package/dist/plugin-default.js +2 -2
- package/dist/scripts/key-agent.js +165 -0
- package/dist/scripts/tenant-build.js +4 -1
- package/dist/scripts/tenant-check.js +4 -1
- package/dist/scripts/tenant-deploy.js +43 -4
- package/dist/scripts/tenant-dev.js +0 -1
- package/dist/sdk-types.d.ts +2 -2
- package/dist/sdk-types.js +2 -0
- package/dist/sdk.d.ts +13 -0
- package/dist/sdk.js +40 -0
- package/dist/stores/knowledge-coop-store.d.ts +56 -0
- package/dist/stores/knowledge-coop-store.js +482 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/package.json +6 -2
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/api/server.js +4 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/config.yaml +25 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/decisions/adopt-initial-proposal-loop.mdx +22 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/people/starter-steward.mdx +11 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/content/proposals/establish-initial-proposal-loop.mdx +17 -0
- package/dist/treeseed/template-catalog/templates/starter-basic/template/src/manifest.yaml +17 -10
- package/dist/treeseed/template-catalog/templates/starter-basic/template/treeseed.site.yaml +69 -7
- package/dist/treeseed/template-catalog/templates/starter-basic/template.config.json +1 -0
- package/dist/verification.js +90 -2
- package/dist/workflow/operations.d.ts +98 -0
- package/dist/workflow/operations.js +229 -7
- package/dist/workflow-state.d.ts +54 -2
- package/dist/workflow-state.js +170 -24
- package/dist/workflow-support.d.ts +1 -1
- package/dist/workflow-support.js +32 -2
- package/dist/workflow.d.ts +29 -0
- package/package.json +1 -1
- package/templates/github/deploy.workflow.yml +11 -1
- package/dist/scripts/sync-dev-vars.js +0 -6
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface KnowledgeCoopPackageManifest {
|
|
2
|
+
schemaVersion: 1;
|
|
3
|
+
kind: 'template' | 'knowledge_pack';
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
summary: string | null;
|
|
7
|
+
version: string;
|
|
8
|
+
generatedAt: string;
|
|
9
|
+
projectSlug: string;
|
|
10
|
+
sourceProjectRoot: string;
|
|
11
|
+
payloadRoot: string;
|
|
12
|
+
files: string[];
|
|
13
|
+
compatibility: {
|
|
14
|
+
minCliVersion: string;
|
|
15
|
+
minCoreVersion: string;
|
|
16
|
+
minSdkVersion: string;
|
|
17
|
+
};
|
|
18
|
+
sourceSelection: {
|
|
19
|
+
includedPaths: string[];
|
|
20
|
+
};
|
|
21
|
+
market: {
|
|
22
|
+
publisherId: string | null;
|
|
23
|
+
publisherName: string | null;
|
|
24
|
+
publishMetadata: Record<string, unknown>;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface KnowledgeCoopPackageBuildResult {
|
|
28
|
+
outputRoot: string;
|
|
29
|
+
payloadRoot: string;
|
|
30
|
+
manifestPath: string;
|
|
31
|
+
files: string[];
|
|
32
|
+
manifest: KnowledgeCoopPackageManifest;
|
|
33
|
+
}
|
|
34
|
+
export interface KnowledgeCoopKnowledgePackImportResult {
|
|
35
|
+
manifest: KnowledgeCoopPackageManifest;
|
|
36
|
+
manifestPath: string;
|
|
37
|
+
payloadRoot: string;
|
|
38
|
+
importedPaths: string[];
|
|
39
|
+
}
|
|
40
|
+
export declare function resolveKnowledgeCoopPackageOutputRoot(projectRoot: string, kind: 'template' | 'knowledge_pack', slug: string): string;
|
|
41
|
+
export declare function buildKnowledgeCoopTemplatePackage(projectRoot: string, input?: {
|
|
42
|
+
id?: string;
|
|
43
|
+
title?: string;
|
|
44
|
+
summary?: string | null;
|
|
45
|
+
outputRoot?: string | null;
|
|
46
|
+
projectSlug?: string | null;
|
|
47
|
+
market?: KnowledgeCoopPackageManifest['market'];
|
|
48
|
+
}): KnowledgeCoopPackageBuildResult;
|
|
49
|
+
export declare function buildKnowledgeCoopKnowledgePackPackage(projectRoot: string, input?: {
|
|
50
|
+
id?: string;
|
|
51
|
+
title?: string;
|
|
52
|
+
summary?: string | null;
|
|
53
|
+
outputRoot?: string | null;
|
|
54
|
+
projectSlug?: string | null;
|
|
55
|
+
includePaths?: string[];
|
|
56
|
+
market?: KnowledgeCoopPackageManifest['market'];
|
|
57
|
+
}): KnowledgeCoopPackageBuildResult;
|
|
58
|
+
export declare function importKnowledgeCoopKnowledgePack(targetRoot: string, sourcePath: string): KnowledgeCoopKnowledgePackImportResult;
|
|
59
|
+
export declare function relativePackageFiles(outputRoot: string): string[];
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { basename, dirname, resolve, relative } from "node:path";
|
|
3
|
+
import { cliPackageVersion, corePackageVersion, sdkPackageVersion } from "./runtime-paths.js";
|
|
4
|
+
const TEMPLATE_IGNORES = [
|
|
5
|
+
".git",
|
|
6
|
+
".github",
|
|
7
|
+
".astro",
|
|
8
|
+
".wrangler",
|
|
9
|
+
"node_modules",
|
|
10
|
+
"dist",
|
|
11
|
+
".treeseed/state",
|
|
12
|
+
".treeseed/generated"
|
|
13
|
+
];
|
|
14
|
+
const KNOWLEDGE_PACK_DEFAULT_PATHS = [
|
|
15
|
+
"src/content/objectives",
|
|
16
|
+
"src/content/questions",
|
|
17
|
+
"src/content/notes",
|
|
18
|
+
"src/content/proposals",
|
|
19
|
+
"src/content/decisions",
|
|
20
|
+
"src/content/knowledge",
|
|
21
|
+
"src/content/pages"
|
|
22
|
+
];
|
|
23
|
+
function nowStamp(date = /* @__PURE__ */ new Date()) {
|
|
24
|
+
const year = date.getUTCFullYear();
|
|
25
|
+
const month = `${date.getUTCMonth() + 1}`.padStart(2, "0");
|
|
26
|
+
const day = `${date.getUTCDate()}`.padStart(2, "0");
|
|
27
|
+
const hour = `${date.getUTCHours()}`.padStart(2, "0");
|
|
28
|
+
const minute = `${date.getUTCMinutes()}`.padStart(2, "0");
|
|
29
|
+
const second = `${date.getUTCSeconds()}`.padStart(2, "0");
|
|
30
|
+
return `${year}${month}${day}${hour}${minute}${second}`;
|
|
31
|
+
}
|
|
32
|
+
function slugify(value, fallback = "package") {
|
|
33
|
+
return String(value ?? "").trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 80) || fallback;
|
|
34
|
+
}
|
|
35
|
+
function ensureDir(path) {
|
|
36
|
+
mkdirSync(path, { recursive: true });
|
|
37
|
+
}
|
|
38
|
+
function shouldIgnore(relativePath, ignorePatterns) {
|
|
39
|
+
return ignorePatterns.some((pattern) => relativePath === pattern || relativePath.startsWith(`${pattern}/`));
|
|
40
|
+
}
|
|
41
|
+
function listFiles(root, relativeRoot = "", ignorePatterns = []) {
|
|
42
|
+
if (!existsSync(root)) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
const entries = readdirSync(root, { withFileTypes: true });
|
|
46
|
+
const files = [];
|
|
47
|
+
for (const entry of entries) {
|
|
48
|
+
const nextRelative = relativeRoot ? `${relativeRoot}/${entry.name}` : entry.name;
|
|
49
|
+
if (shouldIgnore(nextRelative, ignorePatterns)) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
const nextAbsolute = resolve(root, entry.name);
|
|
53
|
+
if (entry.isDirectory()) {
|
|
54
|
+
files.push(...listFiles(nextAbsolute, nextRelative, ignorePatterns));
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
files.push(nextRelative);
|
|
58
|
+
}
|
|
59
|
+
return files.sort((left, right) => left.localeCompare(right));
|
|
60
|
+
}
|
|
61
|
+
function writeManifest(outputRoot, manifest) {
|
|
62
|
+
const manifestPath = resolve(outputRoot, "manifest.json");
|
|
63
|
+
writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}
|
|
64
|
+
`, "utf8");
|
|
65
|
+
return manifestPath;
|
|
66
|
+
}
|
|
67
|
+
function normalizeVersion(value, fallback = "0.1.0") {
|
|
68
|
+
return typeof value === "string" && value.trim() ? value.trim() : fallback;
|
|
69
|
+
}
|
|
70
|
+
function loadProjectPackageVersion(projectRoot) {
|
|
71
|
+
try {
|
|
72
|
+
const packageJson = JSON.parse(readFileSync(resolve(projectRoot, "package.json"), "utf8"));
|
|
73
|
+
return normalizeVersion(packageJson.version, "0.1.0");
|
|
74
|
+
} catch {
|
|
75
|
+
return "0.1.0";
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function copySelectedPaths(projectRoot, payloadRoot, relativePaths, ignorePatterns = []) {
|
|
79
|
+
const copied = [];
|
|
80
|
+
for (const relativePath of relativePaths) {
|
|
81
|
+
const sourcePath = resolve(projectRoot, relativePath);
|
|
82
|
+
if (!existsSync(sourcePath)) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
const targetPath = resolve(payloadRoot, relativePath);
|
|
86
|
+
const stats = statSync(sourcePath);
|
|
87
|
+
if (stats.isDirectory()) {
|
|
88
|
+
for (const file of listFiles(sourcePath, relativePath, ignorePatterns)) {
|
|
89
|
+
const absoluteSource = resolve(projectRoot, file);
|
|
90
|
+
const absoluteTarget = resolve(payloadRoot, file);
|
|
91
|
+
ensureDir(dirname(absoluteTarget));
|
|
92
|
+
cpSync(absoluteSource, absoluteTarget, { force: true });
|
|
93
|
+
copied.push(file);
|
|
94
|
+
}
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
ensureDir(dirname(targetPath));
|
|
98
|
+
cpSync(sourcePath, targetPath, { force: true });
|
|
99
|
+
copied.push(relativePath);
|
|
100
|
+
}
|
|
101
|
+
return copied.sort((left, right) => left.localeCompare(right));
|
|
102
|
+
}
|
|
103
|
+
function defaultTemplatePaths(projectRoot) {
|
|
104
|
+
const preferred = [
|
|
105
|
+
"package.json",
|
|
106
|
+
"astro.config.ts",
|
|
107
|
+
"tsconfig.json",
|
|
108
|
+
"treeseed.site.yaml",
|
|
109
|
+
"src",
|
|
110
|
+
"public"
|
|
111
|
+
];
|
|
112
|
+
return preferred.filter((relativePath) => existsSync(resolve(projectRoot, relativePath)));
|
|
113
|
+
}
|
|
114
|
+
function buildManifest(projectRoot, input) {
|
|
115
|
+
return {
|
|
116
|
+
schemaVersion: 1,
|
|
117
|
+
kind: input.kind,
|
|
118
|
+
id: input.id,
|
|
119
|
+
title: input.title,
|
|
120
|
+
summary: input.summary ?? null,
|
|
121
|
+
version: loadProjectPackageVersion(projectRoot),
|
|
122
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
123
|
+
projectSlug: input.projectSlug,
|
|
124
|
+
sourceProjectRoot: projectRoot,
|
|
125
|
+
payloadRoot: "payload",
|
|
126
|
+
files: [...input.files],
|
|
127
|
+
compatibility: {
|
|
128
|
+
minCliVersion: normalizeVersion(cliPackageVersion),
|
|
129
|
+
minCoreVersion: normalizeVersion(corePackageVersion),
|
|
130
|
+
minSdkVersion: normalizeVersion(sdkPackageVersion)
|
|
131
|
+
},
|
|
132
|
+
sourceSelection: {
|
|
133
|
+
includedPaths: [...input.sourceSelection]
|
|
134
|
+
},
|
|
135
|
+
market: input.market ?? {
|
|
136
|
+
publisherId: null,
|
|
137
|
+
publisherName: null,
|
|
138
|
+
publishMetadata: {}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function resolveKnowledgeCoopPackageOutputRoot(projectRoot, kind, slug) {
|
|
143
|
+
return resolve(projectRoot, ".treeseed", "packages", kind, `${slug}-${nowStamp()}`);
|
|
144
|
+
}
|
|
145
|
+
function buildKnowledgeCoopTemplatePackage(projectRoot, input = {}) {
|
|
146
|
+
const projectSlug = slugify(input.projectSlug ?? basename(projectRoot), "project");
|
|
147
|
+
const packageId = slugify(input.id ?? `${projectSlug}-template`, "template");
|
|
148
|
+
const outputRoot = resolve(input.outputRoot ?? resolveKnowledgeCoopPackageOutputRoot(projectRoot, "template", packageId));
|
|
149
|
+
const payloadRoot = resolve(outputRoot, "payload");
|
|
150
|
+
ensureDir(payloadRoot);
|
|
151
|
+
const files = copySelectedPaths(projectRoot, payloadRoot, defaultTemplatePaths(projectRoot), TEMPLATE_IGNORES);
|
|
152
|
+
const manifest = buildManifest(projectRoot, {
|
|
153
|
+
kind: "template",
|
|
154
|
+
id: packageId,
|
|
155
|
+
title: input.title ?? `${projectSlug} template`,
|
|
156
|
+
summary: input.summary ?? null,
|
|
157
|
+
projectSlug,
|
|
158
|
+
files,
|
|
159
|
+
sourceSelection: defaultTemplatePaths(projectRoot),
|
|
160
|
+
market: input.market
|
|
161
|
+
});
|
|
162
|
+
const manifestPath = writeManifest(outputRoot, manifest);
|
|
163
|
+
return {
|
|
164
|
+
outputRoot,
|
|
165
|
+
payloadRoot,
|
|
166
|
+
manifestPath,
|
|
167
|
+
files,
|
|
168
|
+
manifest
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function buildKnowledgeCoopKnowledgePackPackage(projectRoot, input = {}) {
|
|
172
|
+
const projectSlug = slugify(input.projectSlug ?? basename(projectRoot), "project");
|
|
173
|
+
const packageId = slugify(input.id ?? `${projectSlug}-knowledge-pack`, "knowledge-pack");
|
|
174
|
+
const outputRoot = resolve(input.outputRoot ?? resolveKnowledgeCoopPackageOutputRoot(projectRoot, "knowledge_pack", packageId));
|
|
175
|
+
const payloadRoot = resolve(outputRoot, "payload");
|
|
176
|
+
ensureDir(payloadRoot);
|
|
177
|
+
const includePaths = (input.includePaths ?? KNOWLEDGE_PACK_DEFAULT_PATHS).filter((relativePath) => existsSync(resolve(projectRoot, relativePath)));
|
|
178
|
+
const files = copySelectedPaths(projectRoot, payloadRoot, includePaths);
|
|
179
|
+
const manifest = buildManifest(projectRoot, {
|
|
180
|
+
kind: "knowledge_pack",
|
|
181
|
+
id: packageId,
|
|
182
|
+
title: input.title ?? `${projectSlug} knowledge pack`,
|
|
183
|
+
summary: input.summary ?? null,
|
|
184
|
+
projectSlug,
|
|
185
|
+
files,
|
|
186
|
+
sourceSelection: includePaths,
|
|
187
|
+
market: input.market
|
|
188
|
+
});
|
|
189
|
+
const manifestPath = writeManifest(outputRoot, manifest);
|
|
190
|
+
return {
|
|
191
|
+
outputRoot,
|
|
192
|
+
payloadRoot,
|
|
193
|
+
manifestPath,
|
|
194
|
+
files,
|
|
195
|
+
manifest
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function importKnowledgeCoopKnowledgePack(targetRoot, sourcePath) {
|
|
199
|
+
const resolvedSource = resolve(sourcePath);
|
|
200
|
+
const manifestPath = statSync(resolvedSource).isDirectory() ? resolve(resolvedSource, "manifest.json") : resolvedSource;
|
|
201
|
+
const manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
|
|
202
|
+
const sourceRoot = dirname(manifestPath);
|
|
203
|
+
const payloadRoot = resolve(sourceRoot, manifest.payloadRoot || "payload");
|
|
204
|
+
if (!existsSync(payloadRoot)) {
|
|
205
|
+
throw new Error(`Knowledge pack payload directory is missing: ${payloadRoot}`);
|
|
206
|
+
}
|
|
207
|
+
const importedPaths = [];
|
|
208
|
+
for (const file of manifest.files) {
|
|
209
|
+
const sourceFile = resolve(payloadRoot, file);
|
|
210
|
+
if (!existsSync(sourceFile)) {
|
|
211
|
+
continue;
|
|
212
|
+
}
|
|
213
|
+
const targetFile = resolve(targetRoot, file);
|
|
214
|
+
ensureDir(dirname(targetFile));
|
|
215
|
+
cpSync(sourceFile, targetFile, { recursive: true, force: true });
|
|
216
|
+
importedPaths.push(file);
|
|
217
|
+
}
|
|
218
|
+
return {
|
|
219
|
+
manifest,
|
|
220
|
+
manifestPath,
|
|
221
|
+
payloadRoot,
|
|
222
|
+
importedPaths: importedPaths.sort((left, right) => left.localeCompare(right))
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
function relativePackageFiles(outputRoot) {
|
|
226
|
+
return listFiles(outputRoot).map((entry) => relative(outputRoot, resolve(outputRoot, entry)) || basename(entry));
|
|
227
|
+
}
|
|
228
|
+
export {
|
|
229
|
+
buildKnowledgeCoopKnowledgePackPackage,
|
|
230
|
+
buildKnowledgeCoopTemplatePackage,
|
|
231
|
+
importKnowledgeCoopKnowledgePack,
|
|
232
|
+
relativePackageFiles,
|
|
233
|
+
resolveKnowledgeCoopPackageOutputRoot
|
|
234
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export declare function runStep(command: any, args: any, options?: {}): void;
|
|
2
2
|
export declare function runNodeScript(scriptRelativePath: any, args?: never[], options?: {}): void;
|
|
3
3
|
export declare function spawnProcess(command: any, args: any, options?: {}): import("child_process").ChildProcessWithoutNullStreams;
|
|
4
|
-
export declare function syncDevVars(overrides?: {}): void;
|
|
5
4
|
export declare function runLocalD1Migration(persistTo: any): void;
|
|
6
5
|
export declare function prepareCloudflareLocalRuntime({ envOverrides, persistTo, outDir }?: {
|
|
7
6
|
envOverrides?: {} | undefined;
|
|
@@ -36,14 +36,6 @@ function spawnProcess(command, args, options = {}) {
|
|
|
36
36
|
detached: options.detached ?? false
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
function syncDevVars(overrides = {}) {
|
|
40
|
-
const overrideEntries = Object.entries(overrides);
|
|
41
|
-
runNodeScript(
|
|
42
|
-
"./scripts/sync-dev-vars.js",
|
|
43
|
-
overrideEntries.map(([key, value]) => `${key}=${value}`),
|
|
44
|
-
{ cwd: fixtureRoot }
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
39
|
function runLocalD1Migration(persistTo) {
|
|
48
40
|
applyLocalD1Migrations({
|
|
49
41
|
cwd: fixtureRoot,
|
|
@@ -61,10 +53,6 @@ function prepareCloudflareLocalRuntime({ envOverrides = {}, persistTo, outDir }
|
|
|
61
53
|
runNodeScript("./scripts/patch-starlight-content-path.js");
|
|
62
54
|
runNodeScript("./scripts/aggregate-book.js");
|
|
63
55
|
runNodeScript("./scripts/ensure-mailpit.js");
|
|
64
|
-
syncDevVars({
|
|
65
|
-
TREESEED_LOCAL_DEV_MODE: "cloudflare",
|
|
66
|
-
...mergedEnvOverrides
|
|
67
|
-
});
|
|
68
56
|
runLocalD1Migration(persistTo);
|
|
69
57
|
const astroArgs = ["astro", "build", "--root", fixtureRoot];
|
|
70
58
|
if (outDir) {
|
|
@@ -101,6 +89,5 @@ export {
|
|
|
101
89
|
runNodeScript,
|
|
102
90
|
runStep,
|
|
103
91
|
spawnProcess,
|
|
104
|
-
startWranglerDev
|
|
105
|
-
syncDevVars
|
|
92
|
+
startWranglerDev
|
|
106
93
|
};
|
|
@@ -26,6 +26,26 @@ export declare function provisionProjectPlatform(options: ProjectPlatformActionO
|
|
|
26
26
|
siteDataDb: any;
|
|
27
27
|
queue: any;
|
|
28
28
|
content: any;
|
|
29
|
+
webCache: {
|
|
30
|
+
webHost: any;
|
|
31
|
+
contentHost: any;
|
|
32
|
+
rulesManaged: boolean;
|
|
33
|
+
lastSyncedAt: any;
|
|
34
|
+
lastError: any;
|
|
35
|
+
policy: {
|
|
36
|
+
sourcePages: {
|
|
37
|
+
paths: string[];
|
|
38
|
+
browserTtlSeconds: number;
|
|
39
|
+
edgeTtlSeconds: number;
|
|
40
|
+
staleWhileRevalidateSeconds: number;
|
|
41
|
+
staleIfErrorSeconds: number;
|
|
42
|
+
};
|
|
43
|
+
contentPages: Required<import("../../platform/contracts.ts").TreeseedWebCachePolicyConfig>;
|
|
44
|
+
r2PublishedObjects: Required<import("../../platform/contracts.ts").TreeseedWebCachePolicyConfig>;
|
|
45
|
+
};
|
|
46
|
+
deployPurge: any;
|
|
47
|
+
contentPurge: any;
|
|
48
|
+
};
|
|
29
49
|
};
|
|
30
50
|
verification: {
|
|
31
51
|
ok: boolean;
|
|
@@ -38,6 +58,7 @@ export declare function provisionProjectPlatform(options: ProjectPlatformActionO
|
|
|
38
58
|
queue: boolean;
|
|
39
59
|
dlq: boolean;
|
|
40
60
|
r2: boolean;
|
|
61
|
+
webCache: boolean;
|
|
41
62
|
};
|
|
42
63
|
state: any;
|
|
43
64
|
};
|
|
@@ -59,23 +80,6 @@ export declare function provisionProjectPlatform(options: ProjectPlatformActionO
|
|
|
59
80
|
logicalName: string;
|
|
60
81
|
}[];
|
|
61
82
|
verification: {
|
|
62
|
-
ok: boolean;
|
|
63
|
-
checks: {
|
|
64
|
-
id: any;
|
|
65
|
-
ok: boolean;
|
|
66
|
-
service: string;
|
|
67
|
-
projectId: string | null;
|
|
68
|
-
projectName: string | null;
|
|
69
|
-
serviceId: string | null;
|
|
70
|
-
serviceName: string | null;
|
|
71
|
-
environment: string;
|
|
72
|
-
environmentId: string | null;
|
|
73
|
-
expression: string;
|
|
74
|
-
command: string | null;
|
|
75
|
-
enabled: boolean;
|
|
76
|
-
logicalName: string;
|
|
77
|
-
}[];
|
|
78
|
-
} | {
|
|
79
83
|
ok: boolean;
|
|
80
84
|
checks: {
|
|
81
85
|
id: any;
|
|
@@ -136,43 +140,6 @@ export declare function deployProjectPlatform(options: ProjectPlatformActionOpti
|
|
|
136
140
|
skipped: boolean;
|
|
137
141
|
reason: string;
|
|
138
142
|
};
|
|
139
|
-
runner: {
|
|
140
|
-
ok: boolean;
|
|
141
|
-
skipped: boolean;
|
|
142
|
-
reason: string;
|
|
143
|
-
status?: undefined;
|
|
144
|
-
payload?: undefined;
|
|
145
|
-
heartbeatPresent?: undefined;
|
|
146
|
-
attempt?: undefined;
|
|
147
|
-
error?: undefined;
|
|
148
|
-
} | {
|
|
149
|
-
ok: any;
|
|
150
|
-
status: number;
|
|
151
|
-
payload: any;
|
|
152
|
-
heartbeatPresent: any;
|
|
153
|
-
attempt: number;
|
|
154
|
-
skipped?: undefined;
|
|
155
|
-
reason?: undefined;
|
|
156
|
-
error?: undefined;
|
|
157
|
-
} | {
|
|
158
|
-
ok: boolean;
|
|
159
|
-
reason: string;
|
|
160
|
-
skipped?: undefined;
|
|
161
|
-
status?: undefined;
|
|
162
|
-
payload?: undefined;
|
|
163
|
-
heartbeatPresent?: undefined;
|
|
164
|
-
attempt?: undefined;
|
|
165
|
-
error?: undefined;
|
|
166
|
-
} | {
|
|
167
|
-
ok: boolean;
|
|
168
|
-
error: string;
|
|
169
|
-
skipped?: undefined;
|
|
170
|
-
reason?: undefined;
|
|
171
|
-
status?: undefined;
|
|
172
|
-
payload?: undefined;
|
|
173
|
-
heartbeatPresent?: undefined;
|
|
174
|
-
attempt?: undefined;
|
|
175
|
-
};
|
|
176
143
|
pages: {
|
|
177
144
|
ok: boolean;
|
|
178
145
|
status: number;
|
|
@@ -307,43 +274,6 @@ export declare function monitorProjectPlatform(options: ProjectPlatformActionOpt
|
|
|
307
274
|
skipped: boolean;
|
|
308
275
|
reason: string;
|
|
309
276
|
};
|
|
310
|
-
runner: {
|
|
311
|
-
ok: boolean;
|
|
312
|
-
skipped: boolean;
|
|
313
|
-
reason: string;
|
|
314
|
-
status?: undefined;
|
|
315
|
-
payload?: undefined;
|
|
316
|
-
heartbeatPresent?: undefined;
|
|
317
|
-
attempt?: undefined;
|
|
318
|
-
error?: undefined;
|
|
319
|
-
} | {
|
|
320
|
-
ok: any;
|
|
321
|
-
status: number;
|
|
322
|
-
payload: any;
|
|
323
|
-
heartbeatPresent: any;
|
|
324
|
-
attempt: number;
|
|
325
|
-
skipped?: undefined;
|
|
326
|
-
reason?: undefined;
|
|
327
|
-
error?: undefined;
|
|
328
|
-
} | {
|
|
329
|
-
ok: boolean;
|
|
330
|
-
reason: string;
|
|
331
|
-
skipped?: undefined;
|
|
332
|
-
status?: undefined;
|
|
333
|
-
payload?: undefined;
|
|
334
|
-
heartbeatPresent?: undefined;
|
|
335
|
-
attempt?: undefined;
|
|
336
|
-
error?: undefined;
|
|
337
|
-
} | {
|
|
338
|
-
ok: boolean;
|
|
339
|
-
error: string;
|
|
340
|
-
skipped?: undefined;
|
|
341
|
-
reason?: undefined;
|
|
342
|
-
status?: undefined;
|
|
343
|
-
payload?: undefined;
|
|
344
|
-
heartbeatPresent?: undefined;
|
|
345
|
-
attempt?: undefined;
|
|
346
|
-
};
|
|
347
277
|
pages: {
|
|
348
278
|
ok: boolean;
|
|
349
279
|
status: number;
|
|
@@ -447,6 +377,26 @@ export declare function runProjectPlatformAction(action: ProjectPlatformAction,
|
|
|
447
377
|
siteDataDb: any;
|
|
448
378
|
queue: any;
|
|
449
379
|
content: any;
|
|
380
|
+
webCache: {
|
|
381
|
+
webHost: any;
|
|
382
|
+
contentHost: any;
|
|
383
|
+
rulesManaged: boolean;
|
|
384
|
+
lastSyncedAt: any;
|
|
385
|
+
lastError: any;
|
|
386
|
+
policy: {
|
|
387
|
+
sourcePages: {
|
|
388
|
+
paths: string[];
|
|
389
|
+
browserTtlSeconds: number;
|
|
390
|
+
edgeTtlSeconds: number;
|
|
391
|
+
staleWhileRevalidateSeconds: number;
|
|
392
|
+
staleIfErrorSeconds: number;
|
|
393
|
+
};
|
|
394
|
+
contentPages: Required<import("../../platform/contracts.ts").TreeseedWebCachePolicyConfig>;
|
|
395
|
+
r2PublishedObjects: Required<import("../../platform/contracts.ts").TreeseedWebCachePolicyConfig>;
|
|
396
|
+
};
|
|
397
|
+
deployPurge: any;
|
|
398
|
+
contentPurge: any;
|
|
399
|
+
};
|
|
450
400
|
};
|
|
451
401
|
verification: {
|
|
452
402
|
ok: boolean;
|
|
@@ -459,6 +409,7 @@ export declare function runProjectPlatformAction(action: ProjectPlatformAction,
|
|
|
459
409
|
queue: boolean;
|
|
460
410
|
dlq: boolean;
|
|
461
411
|
r2: boolean;
|
|
412
|
+
webCache: boolean;
|
|
462
413
|
};
|
|
463
414
|
state: any;
|
|
464
415
|
};
|
|
@@ -480,23 +431,6 @@ export declare function runProjectPlatformAction(action: ProjectPlatformAction,
|
|
|
480
431
|
logicalName: string;
|
|
481
432
|
}[];
|
|
482
433
|
verification: {
|
|
483
|
-
ok: boolean;
|
|
484
|
-
checks: {
|
|
485
|
-
id: any;
|
|
486
|
-
ok: boolean;
|
|
487
|
-
service: string;
|
|
488
|
-
projectId: string | null;
|
|
489
|
-
projectName: string | null;
|
|
490
|
-
serviceId: string | null;
|
|
491
|
-
serviceName: string | null;
|
|
492
|
-
environment: string;
|
|
493
|
-
environmentId: string | null;
|
|
494
|
-
expression: string;
|
|
495
|
-
command: string | null;
|
|
496
|
-
enabled: boolean;
|
|
497
|
-
logicalName: string;
|
|
498
|
-
}[];
|
|
499
|
-
} | {
|
|
500
434
|
ok: boolean;
|
|
501
435
|
checks: {
|
|
502
436
|
id: any;
|
|
@@ -553,43 +487,6 @@ export declare function runProjectPlatformAction(action: ProjectPlatformAction,
|
|
|
553
487
|
skipped: boolean;
|
|
554
488
|
reason: string;
|
|
555
489
|
};
|
|
556
|
-
runner: {
|
|
557
|
-
ok: boolean;
|
|
558
|
-
skipped: boolean;
|
|
559
|
-
reason: string;
|
|
560
|
-
status?: undefined;
|
|
561
|
-
payload?: undefined;
|
|
562
|
-
heartbeatPresent?: undefined;
|
|
563
|
-
attempt?: undefined;
|
|
564
|
-
error?: undefined;
|
|
565
|
-
} | {
|
|
566
|
-
ok: any;
|
|
567
|
-
status: number;
|
|
568
|
-
payload: any;
|
|
569
|
-
heartbeatPresent: any;
|
|
570
|
-
attempt: number;
|
|
571
|
-
skipped?: undefined;
|
|
572
|
-
reason?: undefined;
|
|
573
|
-
error?: undefined;
|
|
574
|
-
} | {
|
|
575
|
-
ok: boolean;
|
|
576
|
-
reason: string;
|
|
577
|
-
skipped?: undefined;
|
|
578
|
-
status?: undefined;
|
|
579
|
-
payload?: undefined;
|
|
580
|
-
heartbeatPresent?: undefined;
|
|
581
|
-
attempt?: undefined;
|
|
582
|
-
error?: undefined;
|
|
583
|
-
} | {
|
|
584
|
-
ok: boolean;
|
|
585
|
-
error: string;
|
|
586
|
-
skipped?: undefined;
|
|
587
|
-
reason?: undefined;
|
|
588
|
-
status?: undefined;
|
|
589
|
-
payload?: undefined;
|
|
590
|
-
heartbeatPresent?: undefined;
|
|
591
|
-
attempt?: undefined;
|
|
592
|
-
};
|
|
593
490
|
pages: {
|
|
594
491
|
ok: boolean;
|
|
595
492
|
status: number;
|
|
@@ -709,43 +606,6 @@ export declare function runProjectPlatformAction(action: ProjectPlatformAction,
|
|
|
709
606
|
skipped: boolean;
|
|
710
607
|
reason: string;
|
|
711
608
|
};
|
|
712
|
-
runner: {
|
|
713
|
-
ok: boolean;
|
|
714
|
-
skipped: boolean;
|
|
715
|
-
reason: string;
|
|
716
|
-
status?: undefined;
|
|
717
|
-
payload?: undefined;
|
|
718
|
-
heartbeatPresent?: undefined;
|
|
719
|
-
attempt?: undefined;
|
|
720
|
-
error?: undefined;
|
|
721
|
-
} | {
|
|
722
|
-
ok: any;
|
|
723
|
-
status: number;
|
|
724
|
-
payload: any;
|
|
725
|
-
heartbeatPresent: any;
|
|
726
|
-
attempt: number;
|
|
727
|
-
skipped?: undefined;
|
|
728
|
-
reason?: undefined;
|
|
729
|
-
error?: undefined;
|
|
730
|
-
} | {
|
|
731
|
-
ok: boolean;
|
|
732
|
-
reason: string;
|
|
733
|
-
skipped?: undefined;
|
|
734
|
-
status?: undefined;
|
|
735
|
-
payload?: undefined;
|
|
736
|
-
heartbeatPresent?: undefined;
|
|
737
|
-
attempt?: undefined;
|
|
738
|
-
error?: undefined;
|
|
739
|
-
} | {
|
|
740
|
-
ok: boolean;
|
|
741
|
-
error: string;
|
|
742
|
-
skipped?: undefined;
|
|
743
|
-
reason?: undefined;
|
|
744
|
-
status?: undefined;
|
|
745
|
-
payload?: undefined;
|
|
746
|
-
heartbeatPresent?: undefined;
|
|
747
|
-
attempt?: undefined;
|
|
748
|
-
};
|
|
749
609
|
pages: {
|
|
750
610
|
ok: boolean;
|
|
751
611
|
status: number;
|