@coffre/client 0.1.18 → 0.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.
@@ -825,15 +825,7 @@ type ClientOptions = {
825
825
  transport?: Transport;
826
826
  };
827
827
  /** The API's error shape, `{ error, message }`, with the HTTP status. */
828
- declare const COFFRE_ERROR: unique symbol;
829
828
  declare class CoffreError extends Error {
830
- /**
831
- * `@coffre/ui`'s prebuilt pages bundle a copy of this class, and a page is
832
- * handed a client the server made with this package's. So `instanceof`
833
- * asks for the mark every copy leaves, rather than for this copy's prototype.
834
- */
835
- static [Symbol.hasInstance](value: unknown): boolean;
836
- readonly [COFFRE_ERROR] = true;
837
829
  readonly status: number;
838
830
  readonly code: string;
839
831
  /** The vault's own code when it refused: `no_grant`, `removed`, `bulk_limit`, ... */
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as SessionRow, C as Member, D as SecretKey, E as RemovedMember, M as WorkloadIds, O as SecretVersion, S as Me, T as ProjectSummary, _ as BindingView, a as Params, b as IdentityRow, c as RouteOutput, d as planImport, f as AccessValue, g as BindingPlan, h as AuthInfo, i as ImportAction, j as SetResult, k as ServiceTokenRow, l as Transport, m as AuditEntryView, n as CoffreClient, o as RouteInput, p as Api, r as CoffreError, s as RouteKey, t as ClientOptions, u as createClient, v as DryRunOutcome, w as OffboardingReport, x as InstanceState, y as DryRunResult } from "./index-BPCoQXwT.js";
1
+ import { A as SessionRow, C as Member, D as SecretKey, E as RemovedMember, M as WorkloadIds, O as SecretVersion, S as Me, T as ProjectSummary, _ as BindingView, a as Params, b as IdentityRow, c as RouteOutput, d as planImport, f as AccessValue, g as BindingPlan, h as AuthInfo, i as ImportAction, j as SetResult, k as ServiceTokenRow, l as Transport, m as AuditEntryView, n as CoffreClient, o as RouteInput, p as Api, r as CoffreError, s as RouteKey, t as ClientOptions, u as createClient, v as DryRunOutcome, w as OffboardingReport, x as InstanceState, y as DryRunResult } from "./index-BuMxAzSu.js";
2
2
  export { type AccessValue, type Api, type AuditEntryView, type AuthInfo, type BindingPlan, type BindingView, ClientOptions, CoffreClient, CoffreError, type DryRunOutcome, type DryRunResult, type IdentityRow, ImportAction, type InstanceState, type Me, type Member, type OffboardingReport, Params, type ProjectSummary, type RemovedMember, RouteInput, RouteKey, RouteOutput, type SecretKey, type SecretVersion, type ServiceTokenRow, type SessionRow, type SetResult, Transport, type WorkloadIds, createClient, planImport };
package/dist/index.js CHANGED
@@ -1,16 +1,6 @@
1
1
  //#region src/index.ts
2
2
  /** The API's error shape, `{ error, message }`, with the HTTP status. */
3
- const COFFRE_ERROR = Symbol.for("@coffre/client:CoffreError");
4
3
  var CoffreError = class extends Error {
5
- /**
6
- * `@coffre/ui`'s prebuilt pages bundle a copy of this class, and a page is
7
- * handed a client the server made with this package's. So `instanceof`
8
- * asks for the mark every copy leaves, rather than for this copy's prototype.
9
- */
10
- static [Symbol.hasInstance](value) {
11
- return typeof value === "object" && value !== null && COFFRE_ERROR in value;
12
- }
13
- [COFFRE_ERROR] = true;
14
4
  status;
15
5
  code;
16
6
  /** The vault's own code when it refused: `no_grant`, `removed`, `bulk_limit`, ... */
package/dist/routes.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as Params, o as RouteInput, s as RouteKey } from "./index-BPCoQXwT.js";
1
+ import { a as Params, o as RouteInput, s as RouteKey } from "./index-BuMxAzSu.js";
2
2
  //#region src/routes.d.ts
3
3
  export type GetKey = Extract<RouteKey, `GET ${string}`>;
4
4
  /** Each GET route, with what to ask it. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coffre/client",
3
- "version": "0.1.18",
3
+ "version": "0.2.0",
4
4
  "description": "The coffre API as typed function calls.",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/index.ts CHANGED
@@ -61,19 +61,7 @@ export type ClientOptions = {
61
61
  };
62
62
 
63
63
  /** The API's error shape, `{ error, message }`, with the HTTP status. */
64
- const COFFRE_ERROR = Symbol.for('@coffre/client:CoffreError');
65
-
66
64
  export class CoffreError extends Error {
67
- /**
68
- * `@coffre/ui`'s prebuilt pages bundle a copy of this class, and a page is
69
- * handed a client the server made with this package's. So `instanceof`
70
- * asks for the mark every copy leaves, rather than for this copy's prototype.
71
- */
72
- static [Symbol.hasInstance](value: unknown): boolean {
73
- return typeof value === 'object' && value !== null && COFFRE_ERROR in value;
74
- }
75
-
76
- readonly [COFFRE_ERROR] = true;
77
65
  readonly status: number;
78
66
  readonly code: string;
79
67
  /** The vault's own code when it refused: `no_grant`, `removed`, `bulk_limit`, ... */