vaultkeeper 0.5.0 → 0.5.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.
package/dist/index.d.cts CHANGED
@@ -650,7 +650,7 @@ declare class VaultKeeper {
650
650
  /** Run doctor checks without full initialization. */
651
651
  static doctor(): Promise<PreflightResult>;
652
652
  /**
653
- * Store a secret and return a JWE token that encapsulates it.
653
+ * Retrieve a secret from the backend and return a JWE token that encapsulates it.
654
654
  *
655
655
  * @param secretName - Identifier for the secret
656
656
  * @param options - Setup options
@@ -793,4 +793,31 @@ declare class VaultKeeper {
793
793
  setDevelopmentMode(executablePath: string, enabled: boolean): Promise<void>;
794
794
  }
795
795
 
796
- export { AuthorizationDeniedError, type BackendConfig, type BackendFactory, BackendLockedError, BackendRegistry, type BackendSetupFactory, BackendUnavailableError, CapabilityToken, DeviceNotPresentError, type ExecRequest, type ExecResult, type FetchRequest, FilesystemError, IdentityMismatchError, InvalidAlgorithmError, KeyRevokedError, KeyRotatedError, type KeyStatus, type ListableBackend, PluginNotFoundError, type PreflightCheck, type PreflightCheckStatus, type PreflightResult, RotationInProgressError, type SecretAccessor, type SecretBackend, SecretNotFoundError, type SetupChoice, SetupError, type SetupOptions, type SetupQuestion, type SetupResult, type SignRequest, type SignResult, TokenExpiredError, TokenRevokedError, type TrustTier, UsageLimitExceededError, type VaultConfig, VaultError, VaultKeeper, type VaultKeeperOptions, type VaultResponse, type VerifyRequest, isListableBackend };
796
+ /**
797
+ * Platform detection utilities.
798
+ */
799
+ /**
800
+ * The OS platform identifier used for platform-specific behavior.
801
+ * @public
802
+ */
803
+ type Platform = 'darwin' | 'win32' | 'linux';
804
+
805
+ /**
806
+ * Doctor runner: orchestrates platform-appropriate checks and aggregates results.
807
+ */
808
+
809
+ /**
810
+ * Options for running the doctor.
811
+ * @public
812
+ */
813
+ interface RunDoctorOptions {
814
+ /** Override the platform detection (useful for testing). */
815
+ platform?: Platform;
816
+ }
817
+ /**
818
+ * Run all platform-appropriate preflight checks and aggregate the results.
819
+ * @public
820
+ */
821
+ declare function runDoctor(options?: RunDoctorOptions): Promise<PreflightResult>;
822
+
823
+ export { AuthorizationDeniedError, type BackendConfig, type BackendFactory, BackendLockedError, BackendRegistry, type BackendSetupFactory, BackendUnavailableError, CapabilityToken, DeviceNotPresentError, type ExecRequest, type ExecResult, type FetchRequest, FilesystemError, IdentityMismatchError, InvalidAlgorithmError, KeyRevokedError, KeyRotatedError, type KeyStatus, type ListableBackend, type Platform, PluginNotFoundError, type PreflightCheck, type PreflightCheckStatus, type PreflightResult, RotationInProgressError, type RunDoctorOptions, type SecretAccessor, type SecretBackend, SecretNotFoundError, type SetupChoice, SetupError, type SetupOptions, type SetupQuestion, type SetupResult, type SignRequest, type SignResult, TokenExpiredError, TokenRevokedError, type TrustTier, UsageLimitExceededError, type VaultConfig, VaultError, VaultKeeper, type VaultKeeperOptions, type VaultResponse, type VerifyRequest, isListableBackend, runDoctor };
package/dist/index.d.ts CHANGED
@@ -650,7 +650,7 @@ declare class VaultKeeper {
650
650
  /** Run doctor checks without full initialization. */
651
651
  static doctor(): Promise<PreflightResult>;
652
652
  /**
653
- * Store a secret and return a JWE token that encapsulates it.
653
+ * Retrieve a secret from the backend and return a JWE token that encapsulates it.
654
654
  *
655
655
  * @param secretName - Identifier for the secret
656
656
  * @param options - Setup options
@@ -793,4 +793,31 @@ declare class VaultKeeper {
793
793
  setDevelopmentMode(executablePath: string, enabled: boolean): Promise<void>;
794
794
  }
795
795
 
796
- export { AuthorizationDeniedError, type BackendConfig, type BackendFactory, BackendLockedError, BackendRegistry, type BackendSetupFactory, BackendUnavailableError, CapabilityToken, DeviceNotPresentError, type ExecRequest, type ExecResult, type FetchRequest, FilesystemError, IdentityMismatchError, InvalidAlgorithmError, KeyRevokedError, KeyRotatedError, type KeyStatus, type ListableBackend, PluginNotFoundError, type PreflightCheck, type PreflightCheckStatus, type PreflightResult, RotationInProgressError, type SecretAccessor, type SecretBackend, SecretNotFoundError, type SetupChoice, SetupError, type SetupOptions, type SetupQuestion, type SetupResult, type SignRequest, type SignResult, TokenExpiredError, TokenRevokedError, type TrustTier, UsageLimitExceededError, type VaultConfig, VaultError, VaultKeeper, type VaultKeeperOptions, type VaultResponse, type VerifyRequest, isListableBackend };
796
+ /**
797
+ * Platform detection utilities.
798
+ */
799
+ /**
800
+ * The OS platform identifier used for platform-specific behavior.
801
+ * @public
802
+ */
803
+ type Platform = 'darwin' | 'win32' | 'linux';
804
+
805
+ /**
806
+ * Doctor runner: orchestrates platform-appropriate checks and aggregates results.
807
+ */
808
+
809
+ /**
810
+ * Options for running the doctor.
811
+ * @public
812
+ */
813
+ interface RunDoctorOptions {
814
+ /** Override the platform detection (useful for testing). */
815
+ platform?: Platform;
816
+ }
817
+ /**
818
+ * Run all platform-appropriate preflight checks and aggregate the results.
819
+ * @public
820
+ */
821
+ declare function runDoctor(options?: RunDoctorOptions): Promise<PreflightResult>;
822
+
823
+ export { AuthorizationDeniedError, type BackendConfig, type BackendFactory, BackendLockedError, BackendRegistry, type BackendSetupFactory, BackendUnavailableError, CapabilityToken, DeviceNotPresentError, type ExecRequest, type ExecResult, type FetchRequest, FilesystemError, IdentityMismatchError, InvalidAlgorithmError, KeyRevokedError, KeyRotatedError, type KeyStatus, type ListableBackend, type Platform, PluginNotFoundError, type PreflightCheck, type PreflightCheckStatus, type PreflightResult, RotationInProgressError, type RunDoctorOptions, type SecretAccessor, type SecretBackend, SecretNotFoundError, type SetupChoice, SetupError, type SetupOptions, type SetupQuestion, type SetupResult, type SignRequest, type SignResult, TokenExpiredError, TokenRevokedError, type TrustTier, UsageLimitExceededError, type VaultConfig, VaultError, VaultKeeper, type VaultKeeperOptions, type VaultResponse, type VerifyRequest, isListableBackend, runDoctor };
package/dist/index.js CHANGED
@@ -2248,7 +2248,17 @@ function currentPlatform() {
2248
2248
 
2249
2249
  // src/doctor/runner.ts
2250
2250
  async function runDoctor(options) {
2251
- const platform = currentPlatform();
2251
+ let platform;
2252
+ try {
2253
+ platform = options?.platform ?? currentPlatform();
2254
+ } catch {
2255
+ return {
2256
+ checks: [],
2257
+ ready: false,
2258
+ warnings: [],
2259
+ nextSteps: ["Unsupported platform. vaultkeeper supports macOS, Linux, and Windows."]
2260
+ };
2261
+ }
2252
2262
  const entries = buildCheckList(platform);
2253
2263
  const resolved = await Promise.all(
2254
2264
  entries.map(async ({ check, required }) => {
@@ -2337,7 +2347,7 @@ var VaultKeeper = class _VaultKeeper {
2337
2347
  return runDoctor();
2338
2348
  }
2339
2349
  /**
2340
- * Store a secret and return a JWE token that encapsulates it.
2350
+ * Retrieve a secret from the backend and return a JWE token that encapsulates it.
2341
2351
  *
2342
2352
  * @param secretName - Identifier for the secret
2343
2353
  * @param options - Setup options
@@ -2636,6 +2646,6 @@ var VaultKeeper = class _VaultKeeper {
2636
2646
  }
2637
2647
  };
2638
2648
 
2639
- export { AuthorizationDeniedError, BackendLockedError, BackendRegistry, BackendUnavailableError, CapabilityToken, DeviceNotPresentError, FilesystemError, IdentityMismatchError, InvalidAlgorithmError, KeyRevokedError, KeyRotatedError, PluginNotFoundError, RotationInProgressError, SecretNotFoundError, SetupError, TokenExpiredError, TokenRevokedError, UsageLimitExceededError, VaultError, VaultKeeper, isListableBackend };
2649
+ export { AuthorizationDeniedError, BackendLockedError, BackendRegistry, BackendUnavailableError, CapabilityToken, DeviceNotPresentError, FilesystemError, IdentityMismatchError, InvalidAlgorithmError, KeyRevokedError, KeyRotatedError, PluginNotFoundError, RotationInProgressError, SecretNotFoundError, SetupError, TokenExpiredError, TokenRevokedError, UsageLimitExceededError, VaultError, VaultKeeper, isListableBackend, runDoctor };
2640
2650
  //# sourceMappingURL=index.js.map
2641
2651
  //# sourceMappingURL=index.js.map