@yolo-labs/yolo-cli 1.0.0 → 1.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.
- package/README.md +17 -2
- package/dist/api-env.js +99 -0
- package/dist/api-url.js +16 -0
- package/dist/auth-context.js +95 -7
- package/dist/cli.js +100 -27
- package/dist/context.js +3 -4
- package/dist/deploy-cli.js +22 -3
- package/dist/deploy-client.js +31 -13
- package/dist/deploy-config.js +15 -1
- package/dist/deploy-detect.js +97 -0
- package/dist/deploy-ship.js +28 -1
- package/dist/mcp-scopes.js +2 -2
- package/dist/pod-owner-approval.js +47 -0
- package/dist/tileapp-developer.js +11 -10
- package/dist/tileapp-personal.js +325 -98
- package/dist/tileapp-publisher.js +20 -9
- package/dist/tileapp-validator.js +103 -6
- package/dist/tileapp-workspace.js +7 -7
- package/dist/work-client.js +8 -1
- package/package.json +1 -1
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
* Both use the user JWT directly (the publisher endpoints are user-authed), so
|
|
14
14
|
* no MCP delegation. The HTTP transport is injectable for unit tests.
|
|
15
15
|
*/
|
|
16
|
+
import { missingUserTokenMessage } from './api-env.js';
|
|
16
17
|
import fs from 'node:fs';
|
|
17
|
-
import { resolveUserToken } from './auth-context.js';
|
|
18
|
+
import { podSessionTelemetryHeaders, resolveUserToken } from './auth-context.js';
|
|
19
|
+
import { resolveCommonApiUrl } from './api-url.js';
|
|
18
20
|
function resolvePublisherAuth(env) {
|
|
19
|
-
const commonApiUrl = env
|
|
20
|
-
if (!commonApiUrl)
|
|
21
|
-
return { ok: false, message: 'YOLO_COMMON_API_URL (or YOLO_API_URL) env var is required' };
|
|
21
|
+
const commonApiUrl = resolveCommonApiUrl(env);
|
|
22
22
|
const userToken = resolveUserToken(env);
|
|
23
23
|
if (!userToken) {
|
|
24
|
-
return { ok: false, message:
|
|
24
|
+
return { ok: false, message: missingUserTokenMessage(env) };
|
|
25
25
|
}
|
|
26
26
|
return { ok: true, commonApiUrl, userToken };
|
|
27
27
|
}
|
|
@@ -68,7 +68,7 @@ export async function runTileAppSign(opts) {
|
|
|
68
68
|
try {
|
|
69
69
|
res = await fetchImpl(`${apiBase(auth.commonApiUrl)}/publisher/sign`, {
|
|
70
70
|
method: 'POST',
|
|
71
|
-
headers: { 'content-type': 'application/json', authorization: `Bearer ${auth.userToken}
|
|
71
|
+
headers: { 'content-type': 'application/json', authorization: `Bearer ${auth.userToken}`, ...podSessionTelemetryHeaders() },
|
|
72
72
|
body: JSON.stringify({ publisherId: opts.publisherId, keyId: opts.keyId, manifest: read.manifest }),
|
|
73
73
|
});
|
|
74
74
|
}
|
|
@@ -76,7 +76,7 @@ export async function runTileAppSign(opts) {
|
|
|
76
76
|
return { ok: false, kind: 'http', message: `sign request failed: ${e.message}` };
|
|
77
77
|
}
|
|
78
78
|
if (!res.ok)
|
|
79
|
-
return { ok: false, kind: 'http', message:
|
|
79
|
+
return { ok: false, kind: 'http', message: podRefusalMessage('sign', res.status, await safeText(res)) };
|
|
80
80
|
const json = (await res.json());
|
|
81
81
|
if (!json.signature || !json.publisherKeyId)
|
|
82
82
|
return { ok: false, kind: 'http', message: 'sign response missing signature/publisherKeyId' };
|
|
@@ -115,7 +115,7 @@ export async function runTileAppPublish(opts) {
|
|
|
115
115
|
body.imageDigest = opts.imageDigest;
|
|
116
116
|
res = await fetchImpl(`${apiBase(auth.commonApiUrl)}/publisher/publish`, {
|
|
117
117
|
method: 'POST',
|
|
118
|
-
headers: { 'content-type': 'application/json', authorization: `Bearer ${auth.userToken}
|
|
118
|
+
headers: { 'content-type': 'application/json', authorization: `Bearer ${auth.userToken}`, ...podSessionTelemetryHeaders() },
|
|
119
119
|
body: JSON.stringify(body),
|
|
120
120
|
});
|
|
121
121
|
}
|
|
@@ -123,12 +123,23 @@ export async function runTileAppPublish(opts) {
|
|
|
123
123
|
return { ok: false, kind: 'http', message: `publish request failed: ${e.message}` };
|
|
124
124
|
}
|
|
125
125
|
if (!res.ok)
|
|
126
|
-
return { ok: false, kind: 'http', message:
|
|
126
|
+
return { ok: false, kind: 'http', message: podRefusalMessage('publish', res.status, await safeText(res)) };
|
|
127
127
|
const json = (await res.json());
|
|
128
128
|
if (!json.releaseId)
|
|
129
129
|
return { ok: false, kind: 'http', message: 'publish response missing releaseId' };
|
|
130
130
|
return { ok: true, output: `Submitted ${json.releaseId} (status: ${json.status ?? 'submitted'}) — awaiting review` };
|
|
131
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* MOGUL-D040 P2 / OD-5: marketplace sign/publish is a human act and is refused
|
|
134
|
+
* to a workspace pod's credential (403 POD_TOKEN_FORBIDDEN). Say so plainly
|
|
135
|
+
* instead of dumping the JSON body.
|
|
136
|
+
*/
|
|
137
|
+
function podRefusalMessage(step, status, body) {
|
|
138
|
+
if (status === 403 && body.includes('POD_TOKEN_FORBIDDEN')) {
|
|
139
|
+
return `${step} refused: marketplace publishing cannot be done from a workspace pod. The owner publishes from Studio (or a signed-in terminal outside the workspace); use \`yolo tileapp publish --personal\` for a personal app.`;
|
|
140
|
+
}
|
|
141
|
+
return `${step} failed: HTTP ${status} — ${body}`;
|
|
142
|
+
}
|
|
132
143
|
export function exitCodeForFailure(kind) {
|
|
133
144
|
return kind === 'http' ? 1 : 64;
|
|
134
145
|
}
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
* confirmed authoritatively at publish — `validate` says so in its output.
|
|
16
16
|
*/
|
|
17
17
|
const ID_RE = /^[a-z0-9][a-z0-9-]{1,63}$/;
|
|
18
|
+
/** A personal app's local slug (`PERSONAL_LOCAL_ID_RE` server-side). */
|
|
19
|
+
const PERSONAL_LOCAL_ID_RE = /^[a-z0-9][a-z0-9-]{1,31}$/;
|
|
18
20
|
// ── Store screenshots ───────────────────────────────────────────────────────
|
|
19
21
|
// Mirror of `common-api/src/types/tileapp-screenshots.ts`. The rules a
|
|
20
22
|
// publisher needs BEFORE uploading (count, ref form, extension) are checked
|
|
@@ -155,13 +157,20 @@ export function validateManifest(raw, opts = {}) {
|
|
|
155
157
|
const errors = [];
|
|
156
158
|
if (!isObj(raw))
|
|
157
159
|
return { ok: false, errors: ['manifest is not an object'] };
|
|
158
|
-
if (
|
|
160
|
+
if (opts.personal) {
|
|
161
|
+
// The local slug: the server namespaces it to `pa-<ownerId>-<id>` (the CLI
|
|
162
|
+
// reads it from the manifest; `studio.create_personal_app` takes it as its `id` argument).
|
|
163
|
+
if (!isStr(raw.id) || !PERSONAL_LOCAL_ID_RE.test(raw.id))
|
|
164
|
+
errors.push('id must be a lowercase kebab-case slug, 2-32 chars (the app\'s local name; the server namespaces it)');
|
|
165
|
+
}
|
|
166
|
+
else if (!isStr(raw.id) || !ID_RE.test(raw.id))
|
|
159
167
|
errors.push('id must be a lowercase kebab-case slug (2-64 chars)');
|
|
160
168
|
if (!isStr(raw.version) || !SEMVER_RE.test(raw.version))
|
|
161
169
|
errors.push('version must be semver (e.g. 1.0.0)');
|
|
162
170
|
if (!isStr(raw.displayName))
|
|
163
171
|
errors.push('displayName is required');
|
|
164
|
-
|
|
172
|
+
// Personal: optional and ignored — the server always stamps `personal:<ownerId>`.
|
|
173
|
+
if (!opts.personal && !isStr(raw.publisher))
|
|
165
174
|
errors.push('publisher is required');
|
|
166
175
|
if (!isStr(raw.description))
|
|
167
176
|
errors.push('description is required');
|
|
@@ -188,10 +197,15 @@ export function validateManifest(raw, opts = {}) {
|
|
|
188
197
|
errors.push('runtime must be an object when present');
|
|
189
198
|
}
|
|
190
199
|
else {
|
|
191
|
-
|
|
200
|
+
// A worker (Cloudflare edge backend) listens on no port: `port` is optional
|
|
201
|
+
// there and ignored if given. Process/container runtimes still need it.
|
|
202
|
+
if (raw.runtime.kind !== 'worker' && (typeof raw.runtime.port !== 'number' || raw.runtime.port <= 0))
|
|
192
203
|
errors.push('runtime.port must be a positive number');
|
|
193
204
|
if (raw.runtime.exec !== undefined && !isStr(raw.runtime.exec))
|
|
194
205
|
errors.push('runtime.exec must be a non-empty string when present');
|
|
206
|
+
if (raw.runtime.kind !== undefined && raw.runtime.kind !== 'process' && raw.runtime.kind !== 'worker') {
|
|
207
|
+
errors.push("runtime.kind must be 'process' | 'worker' when present");
|
|
208
|
+
}
|
|
195
209
|
}
|
|
196
210
|
}
|
|
197
211
|
if (raw.image !== undefined) {
|
|
@@ -210,9 +224,21 @@ export function validateManifest(raw, opts = {}) {
|
|
|
210
224
|
}
|
|
211
225
|
}
|
|
212
226
|
}
|
|
213
|
-
|
|
227
|
+
// A worker has neither: it is an edge backend uploaded from the bundle's `_worker/`.
|
|
228
|
+
if (isObj(raw.runtime) && raw.image === undefined && !isStr(raw.runtime.exec) && !isWorkerRuntimeManifest(raw)) {
|
|
214
229
|
errors.push('runtime requires either `image` (OCI image, recommended) or `runtime.exec` (bare-process override)');
|
|
215
230
|
}
|
|
231
|
+
// Publish-time rule (`validateManifestForPublish`): an image or exec on a
|
|
232
|
+
// worker would be silently ignored, so refuse it.
|
|
233
|
+
if (isWorkerRuntimeManifest(raw)) {
|
|
234
|
+
if (raw.image !== undefined)
|
|
235
|
+
errors.push("runtime.kind 'worker' runs from the bundle's _worker/ modules — remove `image`, it would be ignored");
|
|
236
|
+
if (raw.runtime.exec !== undefined)
|
|
237
|
+
errors.push("runtime.kind 'worker' runs from the bundle's _worker/ modules — remove `runtime.exec`, it would be ignored");
|
|
238
|
+
}
|
|
239
|
+
if (raw.isolation !== undefined && raw.isolation !== 'shared' && raw.isolation !== 'dedicated' && raw.isolation !== 'edge') {
|
|
240
|
+
errors.push("isolation must be 'shared' | 'dedicated' | 'edge' when present");
|
|
241
|
+
}
|
|
216
242
|
const allPerms = [];
|
|
217
243
|
if (!isObj(raw.permissions)) {
|
|
218
244
|
errors.push('permissions is required');
|
|
@@ -301,8 +327,79 @@ export function publishGateErrors(manifest) {
|
|
|
301
327
|
}
|
|
302
328
|
return errors;
|
|
303
329
|
}
|
|
330
|
+
/** The schema error a runtime manifest without `image`/`runtime.exec` gets (the personal publish fills `image`). */
|
|
331
|
+
export const RUNTIME_NEEDS_IMAGE_PREFIX = 'runtime requires either `image`';
|
|
332
|
+
/**
|
|
333
|
+
* Whether a manifest is linted as a PERSONAL app when no `--personal` /
|
|
334
|
+
* `--marketplace` flag says otherwise. The rule (one rule for init, validate,
|
|
335
|
+
* publish and `studio.create_personal_app`): a personal app OMITS `publisher`
|
|
336
|
+
* (the server stamps `personal:<ownerId>`); `"personal"` or `"personal:<id>"`
|
|
337
|
+
* also mean personal. Any other publisher is a marketplace publisher id, linted
|
|
338
|
+
* with the marketplace rules.
|
|
339
|
+
*/
|
|
340
|
+
export function isPersonalManifest(manifest) {
|
|
341
|
+
if (!isObj(manifest))
|
|
342
|
+
return false;
|
|
343
|
+
const p = manifest.publisher;
|
|
344
|
+
if (p === undefined || p === null || p === '')
|
|
345
|
+
return true;
|
|
346
|
+
return typeof p === 'string' && (p === 'personal' || p.startsWith('personal:'));
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Every lint error for `manifest` under the personal or the marketplace rules —
|
|
350
|
+
* what `validate` and `dev` report. Personal mirrors `publish --personal`: no
|
|
351
|
+
* `publisher`, a local-slug `id`, `media/<file>` screenshots for a bundle app,
|
|
352
|
+
* and no signed-image digest gate (a worker ships its backend in the bundle; a
|
|
353
|
+
* runtime app's `image` is filled server-side from the pushed digest).
|
|
354
|
+
* Marketplace adds the publish gate (`publishGateErrors`).
|
|
355
|
+
*/
|
|
356
|
+
export function lintManifest(manifest, opts) {
|
|
357
|
+
if (!opts.personal)
|
|
358
|
+
return [...validateManifest(manifest).errors, ...publishGateErrors(manifest)];
|
|
359
|
+
const runtime = isRuntimeManifest(manifest);
|
|
360
|
+
const subject = runtime && isObj(manifest) ? (({ image: _image, ...rest }) => rest)(manifest) : manifest;
|
|
361
|
+
const errors = validateManifest(subject, { personal: true, allowPlatformHostedScreenshots: !runtime }).errors;
|
|
362
|
+
return runtime ? errors.filter((e) => !e.startsWith(RUNTIME_NEEDS_IMAGE_PREFIX)) : errors;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* True for a `runtime.kind: 'worker'` manifest: a Cloudflare edge tile whose
|
|
366
|
+
* backend ships IN the bundle under `_worker/` — no image, no podman build.
|
|
367
|
+
* The server additionally requires its worker placement (`TILEAPP_CF_PLACEMENTS`)
|
|
368
|
+
* to be on, which the CLI cannot see; with it off the server rejects the
|
|
369
|
+
* manifest at register and says why.
|
|
370
|
+
*/
|
|
371
|
+
export function isWorkerRuntimeManifest(manifest) {
|
|
372
|
+
return isObj(manifest) && isObj(manifest.runtime) && manifest.runtime.kind === 'worker';
|
|
373
|
+
}
|
|
374
|
+
/** Directory (in the bundle) holding a worker tile's backend; never served as a static asset. */
|
|
375
|
+
export const TILE_WORKER_BUNDLE_DIR = '_worker/';
|
|
376
|
+
/** The worker backend's main module, relative to the bundle root. */
|
|
377
|
+
export const TILE_WORKER_BUNDLE_ENTRY = `${TILE_WORKER_BUNDLE_DIR}index.js`;
|
|
378
|
+
/**
|
|
379
|
+
* What a worker bundle needs, from its file paths alone. Mirrors the server's
|
|
380
|
+
* `workerBundleErrors` (`common-api/src/types/tileapp.ts`), which refuses the
|
|
381
|
+
* upload with `INVALID_WORKER_BUNDLE` — checked here first so a bad bundle
|
|
382
|
+
* fails before the manifest is registered.
|
|
383
|
+
*/
|
|
384
|
+
export function workerBundleErrors(paths) {
|
|
385
|
+
const errors = [];
|
|
386
|
+
const backend = paths.filter((p) => p.startsWith(TILE_WORKER_BUNDLE_DIR));
|
|
387
|
+
if (!backend.includes(TILE_WORKER_BUNDLE_ENTRY)) {
|
|
388
|
+
errors.push(`a worker tile needs a backend entry module at ${TILE_WORKER_BUNDLE_ENTRY}`);
|
|
389
|
+
}
|
|
390
|
+
for (const p of backend) {
|
|
391
|
+
if (!/\.m?js$/.test(p))
|
|
392
|
+
errors.push(`backend files must be .js or .mjs modules: ${JSON.stringify(p)}`);
|
|
393
|
+
}
|
|
394
|
+
if (paths.length === backend.length)
|
|
395
|
+
errors.push(`a worker tile needs UI files outside ${TILE_WORKER_BUNDLE_DIR}`);
|
|
396
|
+
return errors;
|
|
397
|
+
}
|
|
304
398
|
/**
|
|
305
|
-
* True if the manifest declares a server-side runtime
|
|
399
|
+
* True if the manifest declares a server-side runtime built as a container
|
|
400
|
+
* image. A worker runtime (`isWorkerRuntimeManifest`) is NOT one: it ships as a
|
|
401
|
+
* bundle with its backend under `_worker/`, so it needs `surface.entry` on disk
|
|
402
|
+
* like a pure-UI app. Otherwise keyed on `runtime` ONLY
|
|
306
403
|
* — matching the launcher, which serves a static surface bundle for any manifest
|
|
307
404
|
* WITHOUT `runtime` (`common-api/src/services/tileapp/launcher.ts`: `if
|
|
308
405
|
* (!manifest.runtime) → staticSurfaceUrl`). An `image`-only manifest (no
|
|
@@ -311,5 +408,5 @@ export function publishGateErrors(manifest) {
|
|
|
311
408
|
* skip the bundle check on an app that fails to render in prod).
|
|
312
409
|
*/
|
|
313
410
|
export function isRuntimeManifest(manifest) {
|
|
314
|
-
return isObj(manifest) && isObj(manifest.runtime);
|
|
411
|
+
return isObj(manifest) && isObj(manifest.runtime) && !isWorkerRuntimeManifest(manifest);
|
|
315
412
|
}
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
* Auth: user JWT (no SESSION_ID needed — these are user-authed /v1 routes),
|
|
22
22
|
* same resolution as `tileapp publish --personal`.
|
|
23
23
|
*/
|
|
24
|
-
import {
|
|
24
|
+
import { missingUserTokenMessage } from './api-env.js';
|
|
25
|
+
import { podSessionTelemetryHeaders, resolveUserToken } from './auth-context.js';
|
|
26
|
+
import { resolveCommonApiUrl } from './api-url.js';
|
|
25
27
|
export function exitCodeForFailure(kind) {
|
|
26
28
|
return kind === 'http' ? 1 : 64; // EX_USAGE for usage/auth (tileapp-personal precedent)
|
|
27
29
|
}
|
|
@@ -30,12 +32,10 @@ function apiBase(commonApiUrl) {
|
|
|
30
32
|
return base.endsWith('/v1') ? base : `${base}/v1`;
|
|
31
33
|
}
|
|
32
34
|
function resolveAuth(env) {
|
|
33
|
-
const commonApiUrl = env
|
|
34
|
-
if (!commonApiUrl)
|
|
35
|
-
return { ok: false, message: 'YOLO_COMMON_API_URL (or YOLO_API_URL) env var is required' };
|
|
35
|
+
const commonApiUrl = resolveCommonApiUrl(env);
|
|
36
36
|
const userToken = resolveUserToken(env);
|
|
37
37
|
if (!userToken)
|
|
38
|
-
return { ok: false, message:
|
|
38
|
+
return { ok: false, message: missingUserTokenMessage(env) };
|
|
39
39
|
return { ok: true, commonApiUrl, userToken };
|
|
40
40
|
}
|
|
41
41
|
async function safeText(res) {
|
|
@@ -60,7 +60,7 @@ export async function runTileAppInstall(opts) {
|
|
|
60
60
|
try {
|
|
61
61
|
const res = await fetchImpl(`${base}/tileapps/${encodeURIComponent(opts.appId)}/install`, {
|
|
62
62
|
method: 'POST',
|
|
63
|
-
headers: { 'content-type': 'application/json', authorization: `Bearer ${auth.userToken}
|
|
63
|
+
headers: { 'content-type': 'application/json', authorization: `Bearer ${auth.userToken}`, ...podSessionTelemetryHeaders() },
|
|
64
64
|
body: JSON.stringify(body),
|
|
65
65
|
});
|
|
66
66
|
if (!res.ok)
|
|
@@ -97,7 +97,7 @@ export async function runTileAppAddTile(opts) {
|
|
|
97
97
|
return { ok: false, kind: 'auth', message: auth.message };
|
|
98
98
|
const fetchImpl = opts.fetchImpl ?? fetch;
|
|
99
99
|
const base = apiBase(auth.commonApiUrl);
|
|
100
|
-
const headers = { 'content-type': 'application/json', authorization: `Bearer ${auth.userToken}
|
|
100
|
+
const headers = { 'content-type': 'application/json', authorization: `Bearer ${auth.userToken}`, ...podSessionTelemetryHeaders() };
|
|
101
101
|
// Preflight 1 — the app must EXIST. Always performed (even with explicit
|
|
102
102
|
// --version/--name): the tiles route validates only the tile shape, so
|
|
103
103
|
// skipping this would persist a tile for a nonexistent appId that can never
|
package/dist/work-client.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** Session-bound delegated authentication and workspace artifact transport. */
|
|
2
|
+
import { inRestrictedExecution, podSessionTelemetryHeaders, RESTRICTED_EXECUTION_MESSAGE } from './auth-context.js';
|
|
2
3
|
export const SUBSTRATE_CLI_AGENT_ID = 'substrate-cli';
|
|
3
4
|
export const SUBSTRATE_CLI_ARTIFACT_SCOPES = [
|
|
4
5
|
'work.get_artifact',
|
|
@@ -27,6 +28,11 @@ export async function mintSubstrateToken(options) {
|
|
|
27
28
|
if (!fetchImpl) {
|
|
28
29
|
throw new WorkClientError('fetch is not available; substrate CLI requires Node 20+', 0, 'INTERNAL');
|
|
29
30
|
}
|
|
31
|
+
// A restricted execution mints nothing here, whatever token the caller came by: this route answers with
|
|
32
|
+
// the workspace owner's authority, which is not the execution's. Checked before any request is made.
|
|
33
|
+
if ((options.restrictedExecution ?? (() => inRestrictedExecution(process.env)))()) {
|
|
34
|
+
throw new WorkClientError(RESTRICTED_EXECUTION_MESSAGE, 0, 'EXECUTION_RESTRICTED');
|
|
35
|
+
}
|
|
30
36
|
if (!options.userToken) {
|
|
31
37
|
throw new WorkClientError('no user token available to mint a substrate token', 0, 'INTERNAL');
|
|
32
38
|
}
|
|
@@ -36,6 +42,7 @@ export async function mintSubstrateToken(options) {
|
|
|
36
42
|
headers: {
|
|
37
43
|
'Content-Type': 'application/json',
|
|
38
44
|
Authorization: `Bearer ${options.userToken}`,
|
|
45
|
+
...podSessionTelemetryHeaders(),
|
|
39
46
|
},
|
|
40
47
|
body: JSON.stringify({
|
|
41
48
|
sessionId: options.sessionId,
|
|
@@ -118,7 +125,7 @@ export async function userRouteRequest(options, routePath, init = {}) {
|
|
|
118
125
|
if (!options.userToken) {
|
|
119
126
|
throw new WorkClientError('no user token available for user-route request', 0, 'INTERNAL');
|
|
120
127
|
}
|
|
121
|
-
const authHeaders = { Authorization: `Bearer ${options.userToken}
|
|
128
|
+
const authHeaders = { Authorization: `Bearer ${options.userToken}`, ...podSessionTelemetryHeaders() };
|
|
122
129
|
const url = `${stripTrailingSlash(options.commonApiUrl)}/v1${routePath}`;
|
|
123
130
|
const headers = {
|
|
124
131
|
...(init.headers ?? {}),
|