arcadible 1.0.44 → 1.0.45

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/account.js CHANGED
@@ -15,8 +15,11 @@ const DIR_MODE = 0o700;
15
15
  const FILE = "account.json";
16
16
  const FILE_MODE = 0o600;
17
17
  // [declare]
18
- // the statuses that mean the refresh token itself was refused.
19
- const REJECTED = [400, 401, 403];
18
+ // the API's codes for a session's token it refused: one whose time ran out,
19
+ // which a refresh mends, and one that's no account's (a deleted account's),
20
+ // which ends the session, as a refresh token Supabase doesn't take does.
21
+ const EXPIRED = "expired";
22
+ const UNAUTHORIZED = "unauthorized";
20
23
  // [declare]
21
24
  const TOKEN_USER = { display_name: `${title} Token`, id: null };
22
25
  // [define]
@@ -74,7 +77,7 @@ function refresh({ session, ...current }) {
74
77
  const form = new FormData();
75
78
  form.append("refresh_token", String(session.refresh_token));
76
79
  return postAuthRefresh(form).then((data) => save({ ...current, session: data }), (ex) => {
77
- if (ex instanceof HttpError && REJECTED.includes(ex.status)) {
80
+ if (ex instanceof HttpError && ex.code === UNAUTHORIZED) {
78
81
  return expire(ex);
79
82
  }
80
83
  throw ex;
@@ -134,19 +137,23 @@ export function get(onRefresh) {
134
137
  }
135
138
  // [function]
136
139
  // a failed request's handler for commands that send the saved session's
137
- // token. The API refuses it (401) only when Supabase does: for a deleted
138
- // account, or a token that expired by the server's clock though not by
139
- // this one's. A refresh tells them apart: refused, the session is over, so
140
- // it's removed and the error says to log in (session_expired); renewed, the
141
- // session is kept, and the request's own error stands, so running the
142
- // command again works. An ARCADIBLE_TOKEN's refusal stays as it is, since
143
- // logging in doesn't change the token.
140
+ // token, by the API's code: `unauthorized`, a token that's no account's (a
141
+ // deleted account's), ends the session, so it's removed and the error says
142
+ // to log in (session_expired); `expired`, a token that ran out by the
143
+ // server's clock though not by this one's, is refreshed: refused, the
144
+ // session is over, as above; renewed, the session is kept, and the
145
+ // request's own error stands, so running the command again works. An
146
+ // ARCADIBLE_TOKEN's refusal stays as it is, since logging in doesn't change
147
+ // the token.
144
148
  export function ended(current) {
145
149
  return (ex) => {
146
- if (!current?.session ||
147
- current.token ||
148
- !(ex instanceof HttpError) ||
149
- ex.status !== 401) {
150
+ if (!current?.session || current.token || !(ex instanceof HttpError)) {
151
+ throw ex;
152
+ }
153
+ if (ex.code === UNAUTHORIZED) {
154
+ return expire(ex);
155
+ }
156
+ if (ex.code !== EXPIRED) {
150
157
  throw ex;
151
158
  }
152
159
  return refresh(current).then(() => {
@@ -172,12 +179,13 @@ async function renew(current) {
172
179
  return refresh(base);
173
180
  }
174
181
  // [function]
175
- // sends `call` with the account's access token, and when the API refuses it
176
- // (401) for the saved session, renews the session and sends it once more. A
177
- // token can expire during a long command (a deploy's build, upload, and
178
- // wait), where `get` renews it only at the start. Renewed, `current` holds
179
- // the new session, so the calls after it send that. An ARCADIBLE_TOKEN's
180
- // refusal stands, as does a second refusal, which `ended` then reads.
182
+ // sends `call` with the account's access token, and when the API says it
183
+ // ran out (`expired`) for the saved session, renews the session and sends it
184
+ // once more. A token can expire during a long command (a deploy's build,
185
+ // upload, and wait), where `get` renews it only at the start. Renewed,
186
+ // `current` holds the new session, so the calls after it send that. An
187
+ // ARCADIBLE_TOKEN's refusal stands, as does any other, and a second, which
188
+ // `ended` then reads.
181
189
  export async function authed(current, call) {
182
190
  try {
183
191
  return await call(auth(current?.session.access_token));
@@ -186,7 +194,7 @@ export async function authed(current, call) {
186
194
  if (!current?.session ||
187
195
  current.token ||
188
196
  !(ex instanceof HttpError) ||
189
- ex.status !== 401) {
197
+ ex.code !== EXPIRED) {
190
198
  throw ex;
191
199
  }
192
200
  }
@@ -4,7 +4,7 @@
4
4
  import { deleteGame } from "../../api.js";
5
5
  import { GAME_ID_MISSING, GAME_NOT_FOUND } from "../../config/code.js";
6
6
  import { ArcError } from "../../util/error.js";
7
- import { headersOf, isStatus } from "../game.js";
7
+ import { headersOf, isRefused, REFUSED } from "../game.js";
8
8
  import { given } from "../../parser/given.js";
9
9
  import { gameIdMissing, gameNotOwned } from "../../phrase/index.js";
10
10
  import { textOf } from "../../util/objs.js";
@@ -37,7 +37,7 @@ export async function deleteTool(current, { id }) {
37
37
  return { game: id };
38
38
  }
39
39
  catch (err) {
40
- if (isStatus(err, 404)) {
40
+ if (isRefused(err, REFUSED.NOT_FOUND)) {
41
41
  throw new ArcError(GAME_NOT_FOUND, gameNotOwned(id), {
42
42
  cause: err,
43
43
  });
@@ -22,12 +22,12 @@ function uploadBuild(current, artifact, { id, version }, onProgress) {
22
22
  // the API refuses a game that was deleted or is another account's
23
23
  // (404), and the same version deployed again within 5 minutes (429),
24
24
  // each by its code.
25
- if (isRefused(err, GAME_NOT_FOUND, 404)) {
25
+ if (isRefused(err, GAME_NOT_FOUND)) {
26
26
  throw new ArcError(GAME_NOT_FOUND, gameDeletedOrNotOwned(id), {
27
27
  cause: err,
28
28
  });
29
29
  }
30
- if (isRefused(err, DEPLOY_RATE_LIMITED, 429)) {
30
+ if (isRefused(err, DEPLOY_RATE_LIMITED)) {
31
31
  throw new ArcError(DEPLOY_RATE_LIMITED, deployRateLimited(version), {
32
32
  cause: err,
33
33
  });
@@ -11,7 +11,7 @@ import { ArcError, codeOf } from "../../util/error.js";
11
11
  import { HttpError } from "../../util/http.js";
12
12
  import { sleep } from "../../util/delay.js";
13
13
  import { isTable } from "../../util/objs.js";
14
- import { channelOf, gameOf, headersOf, isStatus } from "../game.js";
14
+ import { channelOf, gameOf, headersOf, isRefused, REFUSED } from "../game.js";
15
15
  import { answerUnread, functionLogsFull, functionLogsRefused, functionLogsSinceInvalid, functionLogsVersionInvalid, gameNotOwned, unableToReach, } from "../../phrase/index.js";
16
16
  // [declare]
17
17
  // the protocol a follow speaks, offered with the token beside it, and the
@@ -136,7 +136,7 @@ async function tokenOf(id, headers) {
136
136
  return await postGameFunctionLogsToken(id, null, headers);
137
137
  }
138
138
  catch (err) {
139
- if (isStatus(err, 404)) {
139
+ if (isRefused(err, REFUSED.NOT_FOUND)) {
140
140
  throw new ArcError(GAME_NOT_FOUND, gameNotOwned(id), { cause: err });
141
141
  }
142
142
  throw err;
@@ -165,7 +165,7 @@ async function pageOf(token, query, last) {
165
165
  }, () => null);
166
166
  if (!res.ok) {
167
167
  const told = toldIn(body);
168
- if (res.status === 401 && told.code === "expired") {
168
+ if (told.code === "expired") {
169
169
  if (last)
170
170
  throw tokenRefused(told);
171
171
  return null;
@@ -294,7 +294,7 @@ export async function follow(current, { channel, ...conf }, shown) {
294
294
  status: status ?? 507,
295
295
  });
296
296
  }
297
- const expired = status === 401 && code === "expired";
297
+ const expired = code === "expired";
298
298
  if (status && status < 500 && !expired) {
299
299
  throw refused(status, closed);
300
300
  }
@@ -5,7 +5,7 @@
5
5
  import { deleteGameFunctionPause, discoverGameBuilds, gameFunctionPauses, gameFunctionUsages, putGameFunctionPause, } from "../../api.js";
6
6
  import { FUNCTION_PAUSE_NOT_OWNED, GAME_NOT_FOUND } from "../../config/code.js";
7
7
  import { ArcError } from "../../util/error.js";
8
- import { channelOf, CHANNELS, gameOf, headersOf, isStatus, needOf, ownedOf, } from "../game.js";
8
+ import { channelOf, CHANNELS, gameOf, headersOf, isRefused, REFUSED, needOf, ownedOf, } from "../game.js";
9
9
  import { functionPauseNotOwned, gameNotOwned } from "../../phrase/index.js";
10
10
  // [declare]
11
11
  // the reasons a function is paused for, the one that holds longest first:
@@ -61,7 +61,7 @@ export async function pause(current, { channel, ...conf }) {
61
61
  };
62
62
  }
63
63
  catch (err) {
64
- if (isStatus(err, 404)) {
64
+ if (isRefused(err, REFUSED.NOT_FOUND)) {
65
65
  throw new ArcError(GAME_NOT_FOUND, gameNotOwned(id), {
66
66
  cause: err,
67
67
  });
@@ -85,7 +85,7 @@ export async function resume(current, { channel, ...conf }) {
85
85
  await deleteGameFunctionPause(id, where, null, headers);
86
86
  }
87
87
  catch (err) {
88
- if (!isStatus(err, 404)) {
88
+ if (!isRefused(err, REFUSED.NOT_FOUND)) {
89
89
  throw err;
90
90
  }
91
91
  lifted = false;
@@ -67,21 +67,23 @@ export async function ownedOf(id, headers) {
67
67
  throw new ArcError(GAME_NOT_FOUND, gameNotOwned(id));
68
68
  }
69
69
  }
70
+ // [declare]
71
+ // the API's own words for a refusal the CLI reads (ERRORS.md, The
72
+ // vocabulary), each said by a command in one of its own codes.
73
+ export const REFUSED = {
74
+ FULL: "full",
75
+ INVALID: "invalid",
76
+ NOT_FOUND: "not_found",
77
+ TOO_LARGE: "too_large",
78
+ };
70
79
  // [function]
71
- // whether a failure is the API's refusal with this status.
72
- export function isStatus(err, status) {
73
- return err instanceof HttpError && err.status === status;
74
- }
75
- // [function]
76
- // whether a failure is the API's refusal with this code, which the
77
- // database names (ERRORS.md): the code alone when the answer says one, and
78
- // its status only when it says none (a proxy's page, which names nothing).
79
- // Another code with the same status is another refusal: a 429 `busy` on an
80
- // upload is never `deploy_rate_limited`.
81
- export function isRefused(err, code, status) {
82
- if (!(err instanceof HttpError))
83
- return false;
84
- if (err.code !== undefined)
85
- return err.code === code;
86
- return err.status === status;
80
+ // whether a failure is the API's refusal with this code: its own
81
+ // (`game_not_found`) or its class's word (`not_found`). An answer with no
82
+ // code at all (a proxy's page, which names nothing) is none of them: it goes
83
+ // on to the catch-all (`codeOf`), `unavailable` for a 5xx and `api_refused`
84
+ // otherwise, never guessed from its status. Another code with the same
85
+ // status is another refusal: a 429 `busy` on an upload is never
86
+ // `deploy_rate_limited`.
87
+ export function isRefused(err, code) {
88
+ return err instanceof HttpError && err.code === code;
87
89
  }
@@ -4,7 +4,7 @@
4
4
  import { deleteKey, gameKeys, postGameKey, } from "../../api.js";
5
5
  import { ARGUMENT_INVALID, GAME_NOT_FOUND, KEY_QUOTA_FULL, KEY_NOT_FOUND, } from "../../config/code.js";
6
6
  import { ArcError } from "../../util/error.js";
7
- import { channelOf, gameOf, headersOf, isRefused, isStatus, needOf, ownedOf, } from "../game.js";
7
+ import { channelOf, gameOf, headersOf, isRefused, REFUSED, needOf, ownedOf, } from "../game.js";
8
8
  import { gameNotOwned, keyQuotaFull, keyNameInvalid, keyNotFound, } from "../../phrase/index.js";
9
9
  // [declare]
10
10
  const NAME_MAX = 64;
@@ -35,12 +35,12 @@ export async function create(current, { channel, name, ...conf }) {
35
35
  };
36
36
  }
37
37
  catch (err) {
38
- if (isStatus(err, 404)) {
38
+ if (isRefused(err, REFUSED.NOT_FOUND)) {
39
39
  throw new ArcError(GAME_NOT_FOUND, gameNotOwned(id), {
40
40
  cause: err,
41
41
  });
42
42
  }
43
- if (isRefused(err, KEY_QUOTA_FULL, 507)) {
43
+ if (isRefused(err, KEY_QUOTA_FULL)) {
44
44
  throw new ArcError(KEY_QUOTA_FULL, keyQuotaFull(where), {
45
45
  cause: err,
46
46
  });
@@ -87,7 +87,7 @@ export async function revoke(current, { id, ...conf }) {
87
87
  return { id: gone.id };
88
88
  }
89
89
  catch (err) {
90
- if (isStatus(err, 404) || isStatus(err, 400)) {
90
+ if (isRefused(err, REFUSED.NOT_FOUND) || isRefused(err, REFUSED.INVALID)) {
91
91
  throw new ArcError(KEY_NOT_FOUND, keyNotFound(id), {
92
92
  cause: err,
93
93
  });
@@ -2,18 +2,18 @@
2
2
  import { discoverGame, discoverGameBuilds } from "../../api.js";
3
3
  import { GAME_NOT_FOUND } from "../../config/code.js";
4
4
  import { ArcError } from "../../util/error.js";
5
- import { HttpError } from "../../util/http.js";
6
5
  import { gameNotFound } from "../../phrase/index.js";
7
6
  import { playUrl, PRODUCTION, STAGING } from "../../util/links.js";
8
7
  import { textOf } from "../../util/objs.js";
9
8
  import { self } from "../../parser/self.js";
9
+ import { isRefused, REFUSED } from "../game.js";
10
10
  // [function]
11
- // the game, `select`ed, or null when the API can't be reached. It rejects
12
- // when the game isn't on Arcadible: its builds can't say, since a game that
13
- // doesn't exist has none.
11
+ // the game, `select`ed, or null when the API can't be reached, or answers
12
+ // with no code (a proxy's page). It rejects when the game isn't on
13
+ // Arcadible: its builds can't say, since a game that doesn't exist has none.
14
14
  function findGame(id, select) {
15
15
  return discoverGame(id, { select }).catch((err) => {
16
- if (err instanceof HttpError && err.status === 404) {
16
+ if (isRefused(err, REFUSED.NOT_FOUND)) {
17
17
  throw new ArcError(GAME_NOT_FOUND, gameNotFound(id));
18
18
  }
19
19
  return null;
@@ -4,16 +4,17 @@ import { GAME_HANDLE_CHANGED, GAME_NOT_DEPLOYED, REPO_NOT_CONNECTED, WARNING, }
4
4
  import { ArcError } from "../../util/error.js";
5
5
  import { releasing } from "./game.js";
6
6
  import { ensureClean, ensureRemote, ensureRepo, ensureRoot, ensureTagFree, ensureWorkflow, originRepo, } from "./git.js";
7
- import { HttpError } from "../../util/http.js";
8
7
  import { gameHandleChanged, gameNotDeployed, repoNotConnected, versionUnchecked, } from "../../phrase/index.js";
9
8
  import { studioUrl } from "../../util/links.js";
9
+ import { isRefused, REFUSED } from "../game.js";
10
10
  import { ensureLockFile } from "./pm.js";
11
11
  import { refuse } from "./published.js";
12
12
  // [function]
13
- // a public lookup's answer: found (200, with its data), missing (404), or
14
- // null for any other answer, such as when the API can't be reached.
13
+ // a public lookup's answer: found (200, with its data), missing (the API's
14
+ // `not_found`), or null for any other answer, such as when the API can't be
15
+ // reached, or a proxy's page with no code.
15
16
  function answerOf(request) {
16
- return request.then((data) => ({ data, status: 200 }), (err) => err instanceof HttpError && err.status === 404 ? { status: 404 } : null);
17
+ return request.then((data) => ({ data, status: 200 }), (err) => isRefused(err, REFUSED.NOT_FOUND) ? { status: 404 } : null);
17
18
  }
18
19
  // [function]
19
20
  // what Arcadible would refuse in the release, refused before the tag is pushed: a
@@ -6,8 +6,8 @@ import { deleteGameFunctionSecret, gameFunctionSecrets, putGameFunctionSecret, }
6
6
  import { ARGUMENT_INVALID, GAME_NOT_FOUND, SECRET_QUOTA_FULL, SECRET_NOT_FOUND, SECRET_TOO_LARGE, } from "../../config/code.js";
7
7
  import { SECRET_NAME } from "../../config/limit.js";
8
8
  import { ArcError } from "../../util/error.js";
9
- import { channelOf, gameOf, headersOf, isRefused, isStatus, needOf, ownedOf, } from "../game.js";
10
- import { gameNotOwned, secretQuotaFull, secretNameInvalid, secretNotFound, secretValueInvalid, } from "../../phrase/index.js";
9
+ import { channelOf, gameOf, headersOf, isRefused, REFUSED, needOf, ownedOf, } from "../game.js";
10
+ import { gameNotOwned, secretQuotaFull, secretNameInvalid, secretNotFound, secretTooLarge, secretValueInvalid, } from "../../phrase/index.js";
11
11
  // [declare]
12
12
  const VALUE_MAX = 4096;
13
13
  // [function]
@@ -31,7 +31,7 @@ export async function set(current, { channel, name, value, ...conf }) {
31
31
  throw new ArcError(ARGUMENT_INVALID, secretValueInvalid());
32
32
  }
33
33
  if (Buffer.byteLength(secret) > VALUE_MAX) {
34
- throw new ArcError(SECRET_TOO_LARGE, secretValueInvalid());
34
+ throw new ArcError(SECRET_TOO_LARGE, secretTooLarge());
35
35
  }
36
36
  const form = new FormData();
37
37
  form.append("value", secret);
@@ -40,12 +40,12 @@ export async function set(current, { channel, name, value, ...conf }) {
40
40
  return { channel: kept.channel, name: kept.name };
41
41
  }
42
42
  catch (err) {
43
- if (isStatus(err, 404)) {
43
+ if (isRefused(err, REFUSED.NOT_FOUND)) {
44
44
  throw new ArcError(GAME_NOT_FOUND, gameNotOwned(id), {
45
45
  cause: err,
46
46
  });
47
47
  }
48
- if (isRefused(err, SECRET_QUOTA_FULL, 507)) {
48
+ if (isRefused(err, SECRET_QUOTA_FULL)) {
49
49
  throw new ArcError(SECRET_QUOTA_FULL, secretQuotaFull(where), {
50
50
  cause: err,
51
51
  });
@@ -83,7 +83,7 @@ export async function remove(current, { channel, name, ...conf }) {
83
83
  return { channel: gone.channel, name: gone.name };
84
84
  }
85
85
  catch (err) {
86
- if (isStatus(err, 404)) {
86
+ if (isRefused(err, REFUSED.NOT_FOUND)) {
87
87
  throw new ArcError(SECRET_NOT_FOUND, secretNotFound({ channel: where, name: named }), { cause: err });
88
88
  }
89
89
  throw err;
@@ -9,7 +9,7 @@ import { gameValuesList, gameValuesRead, gameValuesRemove, gameValuesWrite, game
9
9
  import { ARGUMENT_INVALID, GAME_NOT_FOUND, LIMIT_REACHED, PARSE_FAILED, PATH_NOT_FOUND, VALUE_NOT_FOUND, VALUE_STORAGE_QUOTA_FULL, VALUE_TOO_LARGE, } from "../../config/code.js";
10
10
  import { ArcError } from "../../util/error.js";
11
11
  import { HttpError } from "../../util/http.js";
12
- import { gameOf, headersOf, isStatus, needOf } from "../game.js";
12
+ import { gameOf, headersOf, isRefused, needOf, REFUSED } from "../game.js";
13
13
  import { gameNotOwned, valueCallsSpent, valueDirEmpty, valueFileUnread, valueFull, valueHolds, valueKeyInvalid, valueNotFound, valueNotJson, valueSetWhat, valueTooLarge, } from "../../phrase/index.js";
14
14
  // [declare]
15
15
  // a key, as Arcadible takes one (db/function/game_value.sql, value_keys).
@@ -111,12 +111,12 @@ async function holds(id, channel, headers) {
111
111
  // says `limit_reached`, never a minute's).
112
112
  function refused(id, channel, headers) {
113
113
  return async (err) => {
114
- if (isStatus(err, 404)) {
114
+ if (isRefused(err, REFUSED.NOT_FOUND)) {
115
115
  throw new ArcError(GAME_NOT_FOUND, gameNotOwned(id), {
116
116
  cause: err,
117
117
  });
118
118
  }
119
- if (isStatus(err, 507)) {
119
+ if (isRefused(err, REFUSED.FULL)) {
120
120
  throw new ArcError(VALUE_STORAGE_QUOTA_FULL, valueFull(channel, await holds(id, channel, headers)), { cause: err });
121
121
  }
122
122
  if (err instanceof HttpError && err.code === LIMIT_REACHED) {
@@ -150,7 +150,7 @@ export async function set(current, { channel, dir, file, input, key, ...conf })
150
150
  ];
151
151
  for (const batch of batches(items)) {
152
152
  await gameValuesWrite(id, where, batch, headers).catch((err) => {
153
- if (isStatus(err, 413)) {
153
+ if (isRefused(err, REFUSED.TOO_LARGE)) {
154
154
  // a batch is under what a call holds, so it's one value's own size
155
155
  const [largest] = [...batch].sort((a, b) => JSON.stringify(b.value).length - JSON.stringify(a.value).length);
156
156
  throw new ArcError(VALUE_TOO_LARGE, valueTooLarge(largest?.key ?? ""), {
@@ -139,6 +139,10 @@ export function secretNameInvalid() {
139
139
  ].join("\n");
140
140
  }
141
141
  // [function]
142
+ export function secretTooLarge() {
143
+ return blocks("A secret's value is up to 4096 bytes.", "Keep a larger one where the function can fetch it, and set the secret to what it needs to get there, such as a key.");
144
+ }
145
+ // [function]
142
146
  export function secretValueInvalid() {
143
147
  return blocks("A secret's value is 1 to 4096 bytes, on standard input.", 'Such as: printf %s "$EXAMPLE_KEY" | arc unstable function secret set EXAMPLE_KEY');
144
148
  }
@@ -20,11 +20,10 @@ export const FUNCTION_MODULE = "function.js";
20
20
  // with none; it resolves with the answer, and never throws (Arcadible
21
21
  // unreached is a 503). `version` is raised whenever the transport gains
22
22
  // something, and never goes down: every Function SDK published reads it.
23
- // Until online Reversi is released on the Function SDK, the entry also
24
- // keeps the Server SDK's old way: its mark, and the claim and arc serve's
25
- // address in a `process.env` of the entry's making. A function's secrets
26
- // arrive as a header too (x-arcadible-secrets, opened by the dispatcher),
27
- // and are added to what the code is given, `env`. Neither header reaches
23
+ // It's the one thing the entry sets where the code can see it: no mark, and
24
+ // no `process.env`. A function's secrets arrive as a header too
25
+ // (x-arcadible-secrets, opened by the dispatcher), and are added to what
26
+ // the code is given, `env`. Neither header reaches
28
27
  // the developer's code. Under arc serve they're the script's own bindings,
29
28
  // named by ARCADIBLE_SECRETS, which the code isn't given, nor ARCADIBLE_SERVE,
30
29
  // as on Arcadible. Whatever the code logs has the secrets' values it was
@@ -183,24 +182,12 @@ globalThis[Symbol.for("arcadible.function.api")] = {
183
182
  }
184
183
  },
185
184
  };
186
- // the old mark, which says the code is running as a function
187
- globalThis[Symbol.for("arcadible.function")] = true;
188
185
  export default {
189
186
  async fetch(request, env, ctx) {
190
- const process = (globalThis.process ??= {});
191
- const set = (process.env ??= {});
192
- if (env.ARCADIBLE_SERVE) {
193
- serve = env.ARCADIBLE_SERVE;
194
- set.ARCADIBLE_SERVE = env.ARCADIBLE_SERVE;
195
- }
187
+ if (env.ARCADIBLE_SERVE) serve = env.ARCADIBLE_SERVE;
196
188
  const claim = request.headers.get(CLAIM);
197
189
  const secrets = request.headers.get(SECRETS);
198
- if (claim) {
199
- claimed = claim;
200
- set.ARCADIBLE_CLAIM = claim;
201
- } else {
202
- delete set.ARCADIBLE_CLAIM;
203
- }
190
+ if (claim) claimed = claim;
204
191
  // what the code is given: the script's bindings, but the entry's own
205
192
  // two under arc serve, which Arcadible's env doesn't have
206
193
  let given = env;
@@ -53,7 +53,6 @@ export const CLOSED = {
53
53
  denied: 4403,
54
54
  expired: 4401,
55
55
  invalid: 4400,
56
- too_large: 4413,
57
56
  too_many: 4409,
58
57
  unavailable: 4503,
59
58
  };
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "license": "Apache-2.0",
44
44
  "name": "arcadible",
45
- "version": "1.0.44"
45
+ "version": "1.0.45"
46
46
  },
47
47
  "node_modules/@cacheable/memory": {
48
48
  "dependencies": {
@@ -2433,5 +2433,5 @@
2433
2433
  }
2434
2434
  },
2435
2435
  "requires": true,
2436
- "version": "1.0.44"
2436
+ "version": "1.0.45"
2437
2437
  }
package/package.json CHANGED
@@ -66,5 +66,5 @@
66
66
  "test": "tsc && npm run lint && node --test \"test/**/*.test.js\" \"test/**/*.test.mjs\""
67
67
  },
68
68
  "type": "module",
69
- "version": "1.0.44"
69
+ "version": "1.0.45"
70
70
  }