@coffre/vault 0.4.5 → 0.5.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.
@@ -1,5 +1,5 @@
1
1
  import { a as KekUnavailableError, c as awsKms, d as Kek, f as VaultConfig, i as KekProvider, l as checkpointMessage, n as AwsKmsOptions, o as SecretContext, p as derivedSigningKey, r as KekBadClaimError, s as WrappedDek, t as AwsCredentials, u as verifyCheckpoint } from "./index-CGVAd1mz.js";
2
- import { AdmitInput, EndReferencesInput, ReferenceInput, RemoveInput, RewrapInput, SetAccessInput, UnwrapInput, Vault, VerifyLogInput, WrapInput } from "@coffre/core/vault";
2
+ import { AdmitInput, EndReferencesInput, ReferenceInput, RemoveInput, RewrapInput, SetAccessInput, SetSettingsInput, UnwrapInput, Vault, VerifyLogInput, WrapInput } from "@coffre/core/vault";
3
3
  import { PostgresDatabase, PostgresDatabase as PostgresDatabase$1, postgres } from "@coffre/db/hyperdrive";
4
4
  import { WorkerEntrypoint } from "cloudflare:workers";
5
5
  export * from "@coffre/core/vault";
@@ -39,13 +39,18 @@ export declare class VaultEntrypoint extends WorkerEntrypoint implements Vault {
39
39
  }>>;
40
40
  admit(input: AdmitInput): Promise<import("@coffre/core/vault").Outcome<{
41
41
  created: boolean;
42
- owner: boolean;
42
+ role: import("@coffre/core/access").InstanceRole;
43
+ scope: import("@coffre/core/access").Scope;
43
44
  generation: number;
44
45
  }>>;
45
46
  remove(input: RemoveInput): Promise<import("@coffre/core/vault").Outcome<{
46
47
  revoked: import("@coffre/core/vault").Grant[];
47
48
  generation: number;
48
49
  }>>;
50
+ settings(): Promise<import("@coffre/core/vault").Settings>;
51
+ setSettings(input: SetSettingsInput): Promise<import("@coffre/core/vault").Outcome<{
52
+ settings: import("@coffre/core/vault").Settings;
53
+ }>>;
49
54
  checkpoint(): Promise<import("@coffre/core/vault").Outcome<{
50
55
  checkpoint: import("@coffre/core/vault").Checkpoint;
51
56
  }>>;
@@ -1,5 +1,5 @@
1
1
  import { a as verifyCheckpoint, i as checkpointMessage, n as KekUnavailableError, o as derivedSigningKey, r as awsKms, s as resolveVaultConfig, t as KekBadClaimError } from "./src-1yVV2L0_.js";
2
- import { n as prepareVault, t as openVault } from "./vault-CeKwkzSV.js";
2
+ import { n as prepareVault, t as openVault } from "./vault-CP8yU8xq.js";
3
3
  import { createDatabase } from "@coffre/db";
4
4
  import { HyperdrivePool, postgres } from "@coffre/db/hyperdrive";
5
5
  import { WorkerEntrypoint } from "cloudflare:workers";
@@ -70,6 +70,12 @@ var VaultEntrypoint = class extends WorkerEntrypoint {
70
70
  async remove(input) {
71
71
  return this.#call((vault) => vault.remove(input));
72
72
  }
73
+ async settings() {
74
+ return this.#call((vault) => vault.settings());
75
+ }
76
+ async setSettings(input) {
77
+ return this.#call((vault) => vault.setSettings(input));
78
+ }
73
79
  async checkpoint() {
74
80
  return this.#call((vault) => vault.checkpoint());
75
81
  }
package/dist/node.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as verifyCheckpoint, i as checkpointMessage, n as KekUnavailableError, o as derivedSigningKey, r as awsKms, s as resolveVaultConfig, t as KekBadClaimError } from "./src-1yVV2L0_.js";
2
- import { n as prepareVault, t as openVault } from "./vault-CeKwkzSV.js";
2
+ import { n as prepareVault, t as openVault } from "./vault-CP8yU8xq.js";
3
3
  import { chmodSync, existsSync, lstatSync, rmSync } from "node:fs";
4
4
  import { Agent, createServer, request } from "node:http";
5
5
  import { openDatabase } from "@coffre/db/connect";
@@ -15,6 +15,8 @@ const METHODS = [
15
15
  "setAccess",
16
16
  "admit",
17
17
  "remove",
18
+ "settings",
19
+ "setSettings",
18
20
  "checkpoint",
19
21
  "about",
20
22
  "keyChecks",