@vercel/board 0.43.0 → 0.43.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.
@@ -1,2 +1,2 @@
1
- import { t as local } from "./local-0TVbQkzW.mjs";
1
+ import { t as local } from "./local-yB2DFcRi.mjs";
2
2
  export { local };
@@ -1,5 +1,5 @@
1
- import { r as stoppedBy } from "./exports-S2AJNE_O.mjs";
2
- import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure, n as commandWord, o as exitCode, r as main, s as failureDocument, t as Failed } from "./main-CM0_uZ7w.mjs";
1
+ import { r as stoppedBy } from "./exports-BVgUNVsP.mjs";
2
+ import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure, n as commandWord, o as exitCode, r as main, s as failureDocument, t as Failed } from "./main-DjEJPCgo.mjs";
3
3
  //#region src/cli/embedded.ts
4
4
  /**
5
5
  * Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
package/dist/cli.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { a as option } from "./commands-C4fR0md0.mjs";
3
- import { f as projectDir } from "./server-CD7qe_Pl.mjs";
4
- import { r as main } from "./main-CM0_uZ7w.mjs";
5
- import { n as stopped, r as startInspector } from "./inspect-ByIt7CxV.mjs";
3
+ import { f as projectDir } from "./server-BHpUqip5.mjs";
4
+ import { r as main } from "./main-DjEJPCgo.mjs";
5
+ import { n as stopped, r as startInspector } from "./inspect-ZGkTJl3f.mjs";
6
6
  import { appendFile, readFile } from "node:fs/promises";
7
7
  import { join } from "node:path";
8
8
  //#region src/cli/local.ts
@@ -30,7 +30,7 @@ const local = {
30
30
  },
31
31
  async run(args, context) {
32
32
  if (args.length > 0) throw context.usage("inspect takes no arguments: pass its port with --port.");
33
- return (await import("./inspect-BjDlPHjE.mjs")).inspect(context);
33
+ return (await import("./inspect-DRPRCOaV.mjs")).inspect(context);
34
34
  }
35
35
  },
36
36
  serve: {
@@ -53,7 +53,7 @@ const local = {
53
53
  if (args.length > 0) throw usage("serve takes no arguments: pass its port with --port, and its directory with --dir.");
54
54
  const port = portFlag();
55
55
  const root = projectDir();
56
- const { serveLocal } = await import("./serve-p_KKFTWm.mjs");
56
+ const { serveLocal } = await import("./serve-Cnb4TpaJ.mjs");
57
57
  const local = await serveLocal({
58
58
  dir: flags.dir ?? join(root, ".board"),
59
59
  ...port !== void 0 ? { port } : {}
@@ -1,7 +1,7 @@
1
1
  import { _ as IMPORT_BYTES_MAX, a as forbidden, b as mediaType, c as toErrorResponse, d as createBoardClient, f as duration, h as ATTACHMENT_BYTES_MAX, l as unauthorized, n as RejectedError, o as json, p as formatProfileHeader, r as badRequest, s as notFound, t as HttpError, u as BoardError, v as fileName } from "./errors-DUzpDSrJ.mjs";
2
2
  import { h as RemoteWatcherId } from "./schemas-DAzSsgWk.mjs";
3
- import { f as schemaId, n as blocksIn, r as findBlocks } from "./blocks-CVoBC7ur.mjs";
4
- import { A as MessagesQuery, B as SyncBody, C as InboxAckBody, D as LabelBody, E as InboxQuery, F as ScheduleBody, G as ThreadsQuery, H as SyncFindQuery, I as SchedulesQuery, J as UploadStartBody, K as TypingBody, L as SchemaBody, M as ReactBody, N as Ref, O as LinkedQuery, P as RegisterBody, R as SourceJoinBody, S as GrantBody, T as InboxPushBody, U as SyncImportBody, V as SyncCopiesQuery, W as SyncReceiptBody, Y as routes, _ as CreateChannelBody, a as compileWatcher, b as EventsQuery, c as METHODS, d as queryObject, f as readCapped, g as AckBody, h as VERSION, i as runMatch, j as PostBody, k as MatchesQuery, l as createRouter, m as SYNC, n as syncTarget, p as readJson, q as UpdateGrantBody, r as canonicalWatchers, t as SYNC_ACTOR, u as openapi, v as DeleteBody, w as InboxNextQuery, x as ExplainQuery, y as EditBody, z as SourceReadQuery } from "./origin-DoRR9yql.mjs";
3
+ import { n as blocksIn, r as findBlocks } from "./blocks-CVoBC7ur.mjs";
4
+ import { A as MessagesQuery, B as SyncBody, C as InboxAckBody, D as LabelBody, E as InboxQuery, F as ScheduleBody, G as ThreadsQuery, H as SyncFindQuery, I as SchedulesQuery, J as UploadStartBody, K as TypingBody, L as SchemaBody, M as ReactBody, N as Ref, O as LinkedQuery, P as RegisterBody, R as SourceJoinBody, S as GrantBody, T as InboxPushBody, U as SyncImportBody, V as SyncCopiesQuery, W as SyncReceiptBody, Y as routes, _ as CreateChannelBody, a as compileWatcher, b as EventsQuery, c as METHODS, d as queryObject, f as readCapped, g as AckBody, h as VERSION, i as runMatch, j as PostBody, k as MatchesQuery, l as createRouter, m as SYNC, n as syncTarget, p as readJson, q as UpdateGrantBody, r as canonicalWatchers, t as SYNC_ACTOR, u as openapi, v as DeleteBody, w as InboxNextQuery, x as ExplainQuery, y as EditBody, z as SourceReadQuery } from "./origin-9Ch-Zonv.mjs";
5
5
  import { _ as sha256, a as waitUntil, c as platformProfile, d as userIdOf, m as derivedId, o as actorParts, r as runMiddleware, s as importedHandle, t as DroppedError, u as underPrincipal } from "./middleware-0DUFrav-.mjs";
6
6
  import { a as canText, c as compileAccess, d as parsePattern, n as InvalidCan, r as PERMISSIONS, t as FULL_ACCESS, u as parseCan } from "./access-BgBiaCyx.mjs";
7
7
  import { C as explainGrants, b as verifiesTokens, d as grantIssuers, f as hostPrincipal, i as VERCEL_ISSUER, l as createAuthority, t as DEFAULT_CAN$1, u as fromTokens, y as verifiedIssuers } from "./auth-Ft4AJptx.mjs";
@@ -2793,21 +2793,18 @@ function createVercel(options, environment) {
2793
2793
  });
2794
2794
  },
2795
2795
  async schemas(caller, _input, signal) {
2796
- const schemas = (await all(whoOf(caller), "/schemas", "schemas", {}, signal)).map(schemaFrom);
2796
+ const who = whoOf(caller);
2797
+ const schemas = (await all(who, await onBoard(who, "/schemas"), "schemas", {}, signal)).map(schemaFrom);
2797
2798
  const order = (schema) => schema.builtIn ? 0 : 1;
2798
2799
  return { schemas: schemas.sort((a, b) => order(a) - order(b) || (a.builtIn ? 0 : a.name < b.name ? -1 : a.name > b.name ? 1 : a.version - b.version)) };
2799
2800
  },
2800
2801
  async schema(caller, { id }, signal) {
2801
- const { schema } = await api(whoOf(caller), "GET", `/schemas/${encodeURIComponent(id)}`, signal ? { signal } : {});
2802
+ const who = whoOf(caller);
2803
+ const { schema } = await api(who, "GET", await onBoard(who, `/schemas/${encodeURIComponent(id)}`), signal ? { signal } : {});
2802
2804
  return { schema: schemaFrom(schema) };
2803
2805
  },
2804
2806
  async createSchema(caller, input, signal) {
2805
- const who = whoOf(caller);
2806
- const there = await api(who, "GET", `/schemas/${encodeURIComponent(schemaId(input.name, input.version))}`, signal ? { signal } : {}).then(() => true, (error) => {
2807
- if (error instanceof HttpError && error.code === "schema_not_found") return false;
2808
- throw error;
2809
- });
2810
- const { schema } = await api(who, "POST", "/schemas", {
2807
+ const { schema, created } = await api(whoOf(caller), "POST", "/schemas", {
2811
2808
  body: {
2812
2809
  operationId: operationId(),
2813
2810
  ...input
@@ -2816,7 +2813,7 @@ function createVercel(options, environment) {
2816
2813
  });
2817
2814
  return {
2818
2815
  schema: schemaFrom(schema),
2819
- created: !there
2816
+ created
2820
2817
  };
2821
2818
  },
2822
2819
  async schedule(caller, input, signal) {
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { f as duration, t as HttpError, u as BoardError } from "./errors-DUzpDSrJ.mjs";
2
2
  import { t as block } from "./blocks-CVoBC7ur.mjs";
3
3
  import { t as DroppedError } from "./middleware-0DUFrav-.mjs";
4
- import { i as createVercel, t as createBoard } from "./exports-S2AJNE_O.mjs";
4
+ import { i as createVercel, t as createBoard } from "./exports-BVgUNVsP.mjs";
5
5
  //#region src/backend-vercel/index.default.ts
6
6
  /**
7
7
  * Your team's board, in Vercel's API. Outside Node there's no environment to find credentials or
@@ -1,5 +1,5 @@
1
1
  import { f as duration, t as HttpError, u as BoardError } from "./errors-DUzpDSrJ.mjs";
2
2
  import { t as block } from "./blocks-CVoBC7ur.mjs";
3
3
  import { t as DroppedError } from "./middleware-0DUFrav-.mjs";
4
- import { t as board } from "./server-CD7qe_Pl.mjs";
4
+ import { t as board } from "./server-BHpUqip5.mjs";
5
5
  export { BoardError, DroppedError, HttpError, block, board, duration };