run402-mcp 2.0.1 → 2.2.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.
Files changed (47) hide show
  1. package/README.md +14 -11
  2. package/dist/index.js +6 -0
  3. package/dist/index.js.map +1 -1
  4. package/dist/tools/assets-put.d.ts.map +1 -1
  5. package/dist/tools/assets-put.js +16 -112
  6. package/dist/tools/assets-put.js.map +1 -1
  7. package/dist/tools/deploy.d.ts +175 -0
  8. package/dist/tools/deploy.d.ts.map +1 -1
  9. package/dist/tools/deploy.js +38 -0
  10. package/dist/tools/deploy.js.map +1 -1
  11. package/dist/tools/jobs.d.ts +90 -0
  12. package/dist/tools/jobs.d.ts.map +1 -0
  13. package/dist/tools/jobs.js +102 -0
  14. package/dist/tools/jobs.js.map +1 -0
  15. package/package.json +1 -1
  16. package/schemas/release-spec.v1.json +70 -0
  17. package/sdk/README.md +5 -4
  18. package/sdk/dist/index.d.ts +3 -0
  19. package/sdk/dist/index.d.ts.map +1 -1
  20. package/sdk/dist/index.js +3 -0
  21. package/sdk/dist/index.js.map +1 -1
  22. package/sdk/dist/namespaces/assets.d.ts +13 -9
  23. package/sdk/dist/namespaces/assets.d.ts.map +1 -1
  24. package/sdk/dist/namespaces/assets.js +68 -89
  25. package/sdk/dist/namespaces/assets.js.map +1 -1
  26. package/sdk/dist/namespaces/deploy.d.ts.map +1 -1
  27. package/sdk/dist/namespaces/deploy.js +202 -2
  28. package/sdk/dist/namespaces/deploy.js.map +1 -1
  29. package/sdk/dist/namespaces/deploy.types.d.ts +102 -1
  30. package/sdk/dist/namespaces/deploy.types.d.ts.map +1 -1
  31. package/sdk/dist/namespaces/deploy.types.js.map +1 -1
  32. package/sdk/dist/namespaces/jobs.d.ts +74 -0
  33. package/sdk/dist/namespaces/jobs.d.ts.map +1 -0
  34. package/sdk/dist/namespaces/jobs.js +82 -0
  35. package/sdk/dist/namespaces/jobs.js.map +1 -0
  36. package/sdk/dist/node/assets-node.d.ts +12 -7
  37. package/sdk/dist/node/assets-node.d.ts.map +1 -1
  38. package/sdk/dist/node/assets-node.js +91 -143
  39. package/sdk/dist/node/assets-node.js.map +1 -1
  40. package/sdk/dist/node/deploy-manifest.d.ts +25 -2
  41. package/sdk/dist/node/deploy-manifest.d.ts.map +1 -1
  42. package/sdk/dist/node/deploy-manifest.js +116 -0
  43. package/sdk/dist/node/deploy-manifest.js.map +1 -1
  44. package/sdk/dist/scoped.d.ts +11 -0
  45. package/sdk/dist/scoped.d.ts.map +1 -1
  46. package/sdk/dist/scoped.js +22 -0
  47. package/sdk/dist/scoped.js.map +1 -1
@@ -14,8 +14,6 @@
14
14
  import { Assets } from "../namespaces/assets.js";
15
15
  import { Deploy } from "../namespaces/deploy.js";
16
16
  import { LocalError } from "../errors.js";
17
- import { createHash } from "node:crypto";
18
- import { readFile } from "node:fs/promises";
19
17
  import { fileSetFromDir } from "./files.js";
20
18
  /**
21
19
  * Build a `LocalDirRef` for the given filesystem path. Synchronous — the
@@ -40,71 +38,20 @@ export function dir(path, opts = {}) {
40
38
  };
41
39
  }
42
40
  // ───────────────────────────────────────────────────────────────────────────
43
- // Asset slice normalization (SDK input → wire)
41
+ // Asset slice input building (SDK input → AssetPutEntryInput)
44
42
  // ───────────────────────────────────────────────────────────────────────────
45
43
  /**
46
- * Normalize one disk entry into a wire-shaped `AssetPutEntry`. Reads the
47
- * file once, streams SHA-256, captures size, infers content_type from
48
- * extension via the existing `guessContentType` table. Defaults
49
- * `immutable: true` and `visibility: "public"`.
50
- */
51
- async function entryFromFile(absolutePath, key, contentType) {
52
- const buf = await readFile(absolutePath);
53
- const sha = createHash("sha256").update(buf).digest("hex");
54
- return {
55
- key,
56
- sha256: sha,
57
- size_bytes: buf.length,
58
- content_type: contentType,
59
- visibility: "public",
60
- immutable: true,
61
- };
62
- }
63
- /**
64
- * Normalize one in-memory `ContentSource` into a wire-shaped entry.
65
- * Buffers the bytes (compatible with Uint8Array, ArrayBuffer, Blob,
66
- * string). Streams aren't supported here yet — pass a Blob or pre-read.
67
- */
68
- async function entryFromContent(key, source, contentType, immutable, visibility) {
69
- const bytes = await readContentSourceBytes(source);
70
- const sha = createHash("sha256").update(bytes).digest("hex");
71
- return {
72
- key,
73
- sha256: sha,
74
- size_bytes: bytes.length,
75
- content_type: contentType ?? "application/octet-stream",
76
- visibility: visibility ?? "public",
77
- immutable: immutable ?? true,
78
- };
79
- }
80
- async function readContentSourceBytes(src) {
81
- if (typeof src === "string")
82
- return new TextEncoder().encode(src);
83
- if (src instanceof Uint8Array)
84
- return src;
85
- if (src instanceof ArrayBuffer)
86
- return new Uint8Array(src);
87
- if (typeof Blob !== "undefined" && src instanceof Blob) {
88
- return new Uint8Array(await src.arrayBuffer());
89
- }
90
- if (typeof src === "object" && src !== null && "data" in src) {
91
- return readContentSourceBytes(src.data);
92
- }
93
- if (typeof src === "object" && src !== null && "__source" in src) {
94
- const fs = src;
95
- if (fs.__source === "fs-file") {
96
- return await readFile(fs.path);
97
- }
98
- }
99
- throw new LocalError("Unsupported ContentSource for asset put (Streams not yet supported; pass a Blob or pre-read bytes)", "normalizing asset entry");
100
- }
101
- /**
102
- * Walk a `LocalDirRef`, hash every file, and return wire-shaped
103
- * `AssetPutEntry[]`. The prefix is applied to relative keys.
44
+ * Walk a `LocalDirRef` and emit `AssetPutEntryInput[]` carrying a
45
+ * `ContentSource` per file (rather than a pre-computed SHA). The actual
46
+ * hashing + byte-reader registration happens inside the SDK's
47
+ * `normalizeAssetSlice` pipeline so the bytes are uploaded via the shared
48
+ * `byteReaders` map (v1.48 unified-apply). Returning wire-shaped entries
49
+ * here would skip byte-reader registration and the deploy would fail with
50
+ * `Missing bytes for sha=<...>` at upload time.
104
51
  *
105
- * This is the single normalization point — uploadDir/syncDir/prepareDir
106
- * /putMany all funnel through here so the wire submission carries
107
- * normalized entries only (gateway rejects LocalDirRef objects).
52
+ * The prefix is applied to relative keys. content_type/visibility/immutable
53
+ * are left to the normalizer's defaults (visibility=public, immutable=true,
54
+ * content_type derived from extension).
108
55
  */
109
56
  export async function entriesFromLocalDir(ref) {
110
57
  const fileSetOpts = {
@@ -118,12 +65,15 @@ export async function entriesFromLocalDir(ref) {
118
65
  if (typeof source === "object" && source !== null && "__source" in source) {
119
66
  const fs = source;
120
67
  if (fs.__source === "fs-file") {
121
- const contentType = fs.contentType ?? "application/octet-stream";
122
- entries.push(await entryFromFile(fs.path, key, contentType));
68
+ entries.push({
69
+ key,
70
+ source: fs,
71
+ content_type: fs.contentType,
72
+ });
123
73
  continue;
124
74
  }
125
75
  }
126
- entries.push(await entryFromContent(key, source));
76
+ entries.push({ key, source });
127
77
  }
128
78
  return entries;
129
79
  }
@@ -132,75 +82,33 @@ function applyPrefix(prefix, relPath) {
132
82
  return relPath;
133
83
  return prefix.endsWith("/") ? `${prefix}${relPath}` : `${prefix}/${relPath}`;
134
84
  }
135
- function buildAssetManifest(releaseResult, entries, pruned, durationMs) {
136
- const projectPublicId = releaseResult.urls?.project_public_id ?? "";
137
- return buildManifestFromEntries(entries, projectPublicId, pruned, durationMs);
138
- }
139
- function buildManifestFromEntries(entries, projectPublicId, pruned, durationMs) {
140
- const list = [];
141
- const byKey = Object.create(null);
142
- const manifest = Object.create(null);
143
- for (const entry of entries) {
144
- const e = buildEntryFromAssetPut(entry, projectPublicId);
145
- list.push(e);
146
- byKey[entry.key] = e;
147
- manifest[entry.key] = e;
85
+ /**
86
+ * Build an `AssetManifest` from a `DeployResult`. The gateway plan
87
+ * response is the authoritative source — `result.assets` is populated by
88
+ * `buildAssetManifestFromPlanEntries` in deploy.ts from
89
+ * `plan.asset_entries[].asset_ref`. Throws if the result has no `assets`
90
+ * (which would mean the gateway didn't echo asset_entries — older
91
+ * gateway pre-v1.48 or a release-only apply where the spec carried no
92
+ * assets slice).
93
+ */
94
+ function manifestFromResult(result, pruned, durationMs) {
95
+ if (!result.assets) {
96
+ throw new LocalError("Deploy result missing `assets` — gateway plan response did not include asset_entries. Requires gateway v1.48+.", "building asset manifest");
148
97
  }
149
- const result = {
150
- list,
151
- byKey,
152
- manifest,
98
+ const out = {
99
+ list: result.assets.list,
100
+ byKey: result.assets.byKey,
101
+ manifest: result.assets.manifest,
153
102
  totals: {
154
- files: entries.length,
155
- // Byte counts come from the activation-transaction promote
156
- // response; the SDK doesn't yet thread them through DeployResult
157
- // (the gateway plan-response enrichment is a separate follow-up).
158
- // Placeholder 0 keeps the shape stable.
159
- bytes_uploaded: 0,
160
- bytes_reused: 0,
103
+ files: result.assets.totals?.files ?? result.assets.list.length,
104
+ bytes_uploaded: result.assets.totals?.bytes_uploaded ?? 0,
105
+ bytes_reused: result.assets.totals?.bytes_reused ?? 0,
161
106
  duration_ms: durationMs,
162
107
  },
163
108
  };
164
109
  if (pruned)
165
- result.pruned = pruned;
166
- return result;
167
- }
168
- /**
169
- * Build an `AssetManifestEntry` from an `AssetPutEntry` and the
170
- * project's public id. The URL form mirrors the gateway's
171
- * `buildAssetRefForPlan` — deterministic from `(project_public_id, key,
172
- * content_sha256)`. Private assets return null for all public URL
173
- * fields per the visibility-aware URL matrix (design D6/D8).
174
- */
175
- function buildEntryFromAssetPut(entry, projectPublicId) {
176
- const visibility = entry.visibility ?? "public";
177
- const immutable = entry.immutable ?? true;
178
- const isPublic = visibility === "public";
179
- const suffix = entry.sha256.slice(0, 8);
180
- const dotIdx = entry.key.lastIndexOf(".");
181
- const suffixedKey = dotIdx > 0
182
- ? `${entry.key.slice(0, dotIdx)}-${suffix}${entry.key.slice(dotIdx)}`
183
- : `${entry.key}-${suffix}`;
184
- const host = projectPublicId ? `pr-${projectPublicId}.run402.com` : "";
185
- const url = isPublic && host ? `https://${host}/_blob/${entry.key}` : null;
186
- const immutableUrl = isPublic && immutable && host
187
- ? `https://${host}/_blob/${suffixedKey}`
188
- : null;
189
- const contentDigest = `sha-256=:${Buffer.from(entry.sha256, "hex").toString("base64")}:`;
190
- return {
191
- key: entry.key,
192
- sha256: entry.sha256,
193
- size_bytes: entry.size_bytes,
194
- content_type: entry.content_type ?? "application/octet-stream",
195
- visibility,
196
- url,
197
- immutable_url: immutableUrl,
198
- cdn_url: url,
199
- cdn_immutable_url: immutableUrl,
200
- sri: null,
201
- etag: `"sha256-${entry.sha256}"`,
202
- content_digest: contentDigest,
203
- };
110
+ out.pruned = pruned;
111
+ return out;
204
112
  }
205
113
  /**
206
114
  * Error thrown by `syncDir({ prune: true })` when called without a
@@ -241,7 +149,7 @@ export class NodeAssets extends Assets {
241
149
  throw new LocalError(`No files found under ${path} (after applying the ignore list)`, "uploading asset directory");
242
150
  }
243
151
  const result = await this.applyEngine().apply({ project: opts.project, assets: { put: entries } }, { onEvent: opts.onEvent });
244
- return buildAssetManifest(result, entries, undefined, Date.now() - start);
152
+ return manifestFromResult(result, undefined, Date.now() - start);
245
153
  }
246
154
  /**
247
155
  * Declarative directory sync. Per design D10:
@@ -266,7 +174,7 @@ export class NodeAssets extends Assets {
266
174
  if (!opts.prune) {
267
175
  // Additive sync — same path as uploadDir.
268
176
  const result = await this.applyEngine().apply({ project: opts.project, assets: { put: entries } }, { onEvent: opts.onEvent });
269
- return buildAssetManifest(result, entries, undefined, Date.now() - start);
177
+ return manifestFromResult(result, undefined, Date.now() - start);
270
178
  }
271
179
  if (!opts.prefix) {
272
180
  throw new LocalError("syncDir({ prune: true }) requires an explicit prefix (no implicit project-root prune)", "preparing destructive asset sync");
@@ -304,7 +212,7 @@ export class NodeAssets extends Assets {
304
212
  },
305
213
  },
306
214
  }, { onEvent: opts.onEvent });
307
- return buildAssetManifest(result, entries,
215
+ return manifestFromResult(result,
308
216
  // pruned[] is populated by the activation transaction (gateway-
309
217
  // side asset slice promotion). Without the enriched plan response
310
218
  // (follow-up), we don't yet have the materialized list here.
@@ -329,12 +237,49 @@ export class NodeAssets extends Assets {
329
237
  if (entries.length === 0) {
330
238
  throw new LocalError(`No files found under ${path} (after applying the ignore list)`, "preparing asset directory");
331
239
  }
332
- // Plan-only via the engine. The result's URLs are best-effort
333
- // built locally until the gateway plan-response enrichment lands.
334
- const plan = await this.applyEngine().plan({ project: opts.project, assets: { put: entries } }, { dryRun: true });
335
- void plan; // referenced for type-check; consumed by URL-enrich follow-up
240
+ // Plan-only via the engine the gateway resolves URLs at plan time
241
+ // (URLs are deterministic from `(project_public_id, key,
242
+ // content_sha256)` per design D8). The caller renders HTML against
243
+ // these resolved URLs, then calls `apply()` with the returned
244
+ // `applySlice` to commit. We return the original input entries (with
245
+ // sources retained) as the applySlice so the SDK normalizer can
246
+ // register byte readers when the caller commits.
247
+ const { plan } = await this.applyEngine().plan({ project: opts.project, assets: { put: entries } }, { dryRun: true });
248
+ const planEntries = plan.asset_entries ?? [];
249
+ const list = [];
250
+ const byKey = Object.create(null);
251
+ const manifest = Object.create(null);
252
+ for (const entry of planEntries) {
253
+ const e = {
254
+ key: entry.key,
255
+ sha256: entry.sha256,
256
+ size_bytes: entry.size_bytes,
257
+ content_type: entry.content_type,
258
+ visibility: entry.visibility,
259
+ url: entry.asset_ref.url,
260
+ immutable_url: entry.asset_ref.immutable_url,
261
+ cdn_url: entry.asset_ref.cdn_url,
262
+ cdn_immutable_url: entry.asset_ref.cdn_immutable_url,
263
+ sri: entry.asset_ref.sri,
264
+ etag: entry.asset_ref.etag,
265
+ content_digest: entry.asset_ref.content_digest,
266
+ };
267
+ list.push(e);
268
+ byKey[entry.key] = e;
269
+ manifest[entry.key] = e;
270
+ }
336
271
  return {
337
- manifest: buildManifestFromEntries(entries, "", undefined, Date.now() - start),
272
+ manifest: {
273
+ list,
274
+ byKey,
275
+ manifest,
276
+ totals: {
277
+ files: planEntries.length,
278
+ bytes_uploaded: 0,
279
+ bytes_reused: 0,
280
+ duration_ms: Date.now() - start,
281
+ },
282
+ },
338
283
  applySlice: { put: entries },
339
284
  };
340
285
  }
@@ -349,12 +294,15 @@ export class NodeAssets extends Assets {
349
294
  if (items.length === 0) {
350
295
  throw new LocalError("putMany() requires at least one item", "uploading asset batch");
351
296
  }
352
- const entries = [];
353
- for (const item of items) {
354
- entries.push(await entryFromContent(item.key, item.source, item.contentType, item.immutable, item.visibility));
355
- }
297
+ const entries = items.map((item) => ({
298
+ key: item.key,
299
+ source: item.source,
300
+ content_type: item.contentType,
301
+ visibility: item.visibility,
302
+ immutable: item.immutable,
303
+ }));
356
304
  const result = await this.applyEngine().apply({ project: opts.project, assets: { put: entries } }, { onEvent: opts.onEvent });
357
- return buildAssetManifest(result, entries, undefined, Date.now() - start);
305
+ return manifestFromResult(result, undefined, Date.now() - start);
358
306
  }
359
307
  /**
360
308
  * Internal: instantiate a Deploy (engine) bound to the same Client
@@ -1 +1 @@
1
- {"version":3,"file":"assets-node.js","sourceRoot":"","sources":["../../src/node/assets-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAY5C,OAAO,EAAE,cAAc,EAA8B,MAAM,YAAY,CAAC;AAoCxE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,OAAmB,EAAE;IACrD,OAAO;QACL,QAAQ,EAAE,WAAW;QACrB,IAAI;QACJ,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;KACxC,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,+CAA+C;AAC/C,8EAA8E;AAE9E;;;;;GAKG;AACH,KAAK,UAAU,aAAa,CAC1B,YAAoB,EACpB,GAAW,EACX,WAAmB;IAEnB,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,YAAY,CAAC,CAAC;IACzC,MAAM,GAAG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ACvB,MAAM,IAAI,UAAU,CAClB,sCAAsC,EACtC,uBAAuB,CACxB,CAAC;QACJ,CAAC;QACD,MAAM,OAAO,GAAyB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACzD,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,YAAY,EAAE,IAAI,CAAC,WAAW;YAC9B,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAC,CAAC;QACJ,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAC3C,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EACnD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAC1B,CAAC;QACF,OAAO,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;IACnE,CAAC;IAED;;;;OAIG;IACK,WAAW;QACjB,OAAO,IAAI,MAAM,CAAE,IAAsC,CAAC,MAAM,CAAC,CAAC;IACpE,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
- import type { ContentRef, ContentSource, DatabaseSpec, FunctionSpec, ReleaseSpec, SitePublicPathsSpec } from "../namespaces/deploy.types.js";
1
+ import type { AssetSyncPruneConfirm, ContentRef, ContentSource, DatabaseSpec, FunctionSpec, ReleaseSpec, SitePublicPathsSpec } from "../namespaces/deploy.types.js";
2
2
  export type DeployManifestFileEntry = ContentSource | {
3
3
  path: string;
4
4
  contentType?: string;
@@ -50,7 +50,29 @@ export type DeployManifestSiteSpec = {
50
50
  replace?: never;
51
51
  patch?: never;
52
52
  };
53
- export interface DeployManifestInput extends Omit<ReleaseSpec, "project" | "database" | "functions" | "site"> {
53
+ export interface DeployManifestAssetPutEntry {
54
+ key: string;
55
+ /** SDK-input form. Either:
56
+ * - `source` = ContentSource (string / Uint8Array / { path }) — the
57
+ * SDK normalizer hashes + uploads via /content/v1/plans
58
+ * - `sha256` + `size_bytes` = wire form (bytes already in CAS) */
59
+ source?: DeployManifestFileEntry;
60
+ sha256?: string;
61
+ size_bytes?: number;
62
+ content_type?: string;
63
+ visibility?: "public" | "private";
64
+ immutable?: boolean;
65
+ }
66
+ export interface DeployManifestAssetSpec {
67
+ put?: DeployManifestAssetPutEntry[];
68
+ delete?: string[];
69
+ sync?: {
70
+ prefix: string;
71
+ prune: true;
72
+ confirm?: AssetSyncPruneConfirm;
73
+ };
74
+ }
75
+ export interface DeployManifestInput extends Omit<ReleaseSpec, "project" | "database" | "functions" | "site" | "assets"> {
54
76
  /** JSON Schema metadata for editors. Stripped before deploy planning. */
55
77
  $schema?: string;
56
78
  /** SDK-native project field. `project_id` is also accepted for MCP/CLI parity. */
@@ -60,6 +82,7 @@ export interface DeployManifestInput extends Omit<ReleaseSpec, "project" | "data
60
82
  database?: DeployManifestDatabaseSpec;
61
83
  functions?: DeployManifestFunctionsSpec;
62
84
  site?: DeployManifestSiteSpec;
85
+ assets?: DeployManifestAssetSpec;
63
86
  /** CLI/MCP manifest idempotency key, returned separately for deploy options. */
64
87
  idempotency_key?: string;
65
88
  /** JS-friendly alias for `idempotency_key`. */
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-manifest.d.ts","sourceRoot":"","sources":["../../src/node/deploy-manifest.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,YAAY,EAEZ,YAAY,EAEZ,WAAW,EACX,mBAAmB,EACpB,MAAM,+BAA+B,CAAC;AAiDvC,MAAM,MAAM,uBAAuB,GAC/B,aAAa,GACb;IACE,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC;CACd,GACD;IACE,IAAI,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M,CAAC;IACxB,yEAAyE;IACzE,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,yBAA8B,GACnC,OAAO,CAAC,wBAAwB,CAAC,CA6BnC;AAED,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,mBAAmB,EAC1B,IAAI,GAAE,8BAAmC,GACxC,OAAO,CAAC,wBAAwB,CAAC,CAiCnC"}
@@ -14,6 +14,7 @@ const MANIFEST_FIELDS = new Set([
14
14
  "secrets",
15
15
  "functions",
16
16
  "site",
17
+ "assets",
17
18
  "subdomains",
18
19
  "routes",
19
20
  "checks",
@@ -42,6 +43,22 @@ const MANIFEST_SITE_FIELDS = new Set(["replace", "patch", "public_paths"]);
42
43
  const MANIFEST_SITE_PATCH_FIELDS = new Set(["put", "delete"]);
43
44
  const MANIFEST_SITE_PUBLIC_PATHS_FIELDS = new Set(["mode", "replace"]);
44
45
  const MANIFEST_PUBLIC_STATIC_PATH_FIELDS = new Set(["asset", "cache_class"]);
46
+ const MANIFEST_ASSETS_FIELDS = new Set(["put", "delete", "sync"]);
47
+ const MANIFEST_ASSETS_PUT_ENTRY_FIELDS = new Set([
48
+ "key",
49
+ "source",
50
+ "sha256",
51
+ "size_bytes",
52
+ "content_type",
53
+ "visibility",
54
+ "immutable",
55
+ ]);
56
+ const MANIFEST_ASSETS_SYNC_FIELDS = new Set(["prefix", "prune", "confirm"]);
57
+ const MANIFEST_ASSETS_SYNC_CONFIRM_FIELDS = new Set([
58
+ "base_revision",
59
+ "delete_set_digest",
60
+ "expected_delete_count",
61
+ ]);
45
62
  const MANIFEST_ROUTES_FIELDS = new Set(["replace"]);
46
63
  const MANIFEST_ROUTE_ENTRY_FIELDS = new Set(["pattern", "methods", "target", "acknowledge_readonly"]);
47
64
  const MANIFEST_FUNCTION_ROUTE_TARGET_FIELDS = new Set(["type", "name"]);
@@ -96,6 +113,9 @@ export async function normalizeDeployManifest(input, opts = {}) {
96
113
  if (manifest.site !== undefined) {
97
114
  spec.site = mapSite(manifest.site, opts);
98
115
  }
116
+ if (manifest.assets !== undefined) {
117
+ spec.assets = mapAssets(manifest.assets, opts);
118
+ }
99
119
  const idempotencyKey = resolveIdempotencyKey(manifest);
100
120
  return idempotencyKey === undefined
101
121
  ? { spec, manifest }
@@ -315,6 +335,102 @@ function mapSitePublicPaths(value) {
315
335
  }
316
336
  return { mode: "explicit", replace };
317
337
  }
338
+ function mapAssets(assets, opts) {
339
+ assertPlainRecord(assets, "Deploy manifest assets");
340
+ assertKnownFields(assets, "Deploy manifest assets", MANIFEST_ASSETS_FIELDS);
341
+ const out = {};
342
+ if (assets.put !== undefined) {
343
+ if (!Array.isArray(assets.put)) {
344
+ throw new LocalError("Deploy manifest assets.put must be an array of put entries", CONTEXT);
345
+ }
346
+ const put = [];
347
+ for (let idx = 0; idx < assets.put.length; idx++) {
348
+ const rawEntry = assets.put[idx];
349
+ const label = `Deploy manifest assets.put[${idx}]`;
350
+ assertPlainRecord(rawEntry, label);
351
+ assertKnownFields(rawEntry, label, MANIFEST_ASSETS_PUT_ENTRY_FIELDS);
352
+ const entry = rawEntry;
353
+ if (typeof entry.key !== "string" || entry.key.length === 0) {
354
+ throw new LocalError(`${label}.key is required and must be a non-empty string`, CONTEXT);
355
+ }
356
+ const hasSource = entry.source !== undefined;
357
+ const hasSha = entry.sha256 !== undefined;
358
+ if (hasSource === hasSha) {
359
+ throw new LocalError(`${label} must include exactly one of \`source\` or \`sha256\``, CONTEXT);
360
+ }
361
+ if (hasSource) {
362
+ const source = fileEntryToContentSource(entry.source, opts, `${label}.source`);
363
+ const input = {
364
+ key: entry.key,
365
+ source,
366
+ };
367
+ if (entry.content_type !== undefined)
368
+ input.content_type = entry.content_type;
369
+ if (entry.visibility !== undefined)
370
+ input.visibility = entry.visibility;
371
+ if (entry.immutable !== undefined)
372
+ input.immutable = entry.immutable;
373
+ put.push(input);
374
+ }
375
+ else {
376
+ if (typeof entry.size_bytes !== "number") {
377
+ throw new LocalError(`${label}.size_bytes is required when using the wire form (sha256 set)`, CONTEXT);
378
+ }
379
+ // Wire shape — typed as AssetPutEntryInput but the SDK's
380
+ // normalizeAssetSlice accepts the wire form too (it discriminates
381
+ // on the presence of `source`).
382
+ const wire = {
383
+ key: entry.key,
384
+ sha256: entry.sha256,
385
+ size_bytes: entry.size_bytes,
386
+ content_type: entry.content_type,
387
+ visibility: entry.visibility,
388
+ immutable: entry.immutable,
389
+ };
390
+ put.push(wire);
391
+ }
392
+ }
393
+ out.put = put;
394
+ }
395
+ if (assets.delete !== undefined) {
396
+ if (!Array.isArray(assets.delete)) {
397
+ throw new LocalError("Deploy manifest assets.delete must be an array of keys", CONTEXT);
398
+ }
399
+ out.delete = [...assets.delete];
400
+ }
401
+ if (assets.sync !== undefined) {
402
+ assertPlainRecord(assets.sync, "Deploy manifest assets.sync");
403
+ assertKnownFields(assets.sync, "Deploy manifest assets.sync", MANIFEST_ASSETS_SYNC_FIELDS);
404
+ const rawSync = assets.sync;
405
+ if (typeof rawSync.prefix !== "string" || rawSync.prefix.length === 0) {
406
+ throw new LocalError("Deploy manifest assets.sync.prefix is required", CONTEXT);
407
+ }
408
+ if (rawSync.prune !== true) {
409
+ throw new LocalError("Deploy manifest assets.sync.prune must be `true`", CONTEXT);
410
+ }
411
+ const sync = {
412
+ prefix: rawSync.prefix,
413
+ prune: true,
414
+ };
415
+ if (rawSync.confirm !== undefined) {
416
+ assertPlainRecord(rawSync.confirm, "Deploy manifest assets.sync.confirm");
417
+ assertKnownFields(rawSync.confirm, "Deploy manifest assets.sync.confirm", MANIFEST_ASSETS_SYNC_CONFIRM_FIELDS);
418
+ const confirm = rawSync.confirm;
419
+ if (typeof confirm.base_revision !== "string" ||
420
+ typeof confirm.delete_set_digest !== "string" ||
421
+ typeof confirm.expected_delete_count !== "number") {
422
+ throw new LocalError("Deploy manifest assets.sync.confirm requires base_revision (string), delete_set_digest (string), expected_delete_count (number)", CONTEXT);
423
+ }
424
+ sync.confirm = {
425
+ base_revision: confirm.base_revision,
426
+ delete_set_digest: confirm.delete_set_digest,
427
+ expected_delete_count: confirm.expected_delete_count,
428
+ };
429
+ }
430
+ out.sync = sync;
431
+ }
432
+ return out;
433
+ }
318
434
  function mapRoutes(routes) {
319
435
  if (routes === null)
320
436
  return null;