@theholocron/holocron-plugin-doppler 5.0.0-alpha.246 → 5.0.0-alpha.248

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.mts CHANGED
@@ -1,16 +1,13 @@
1
1
  import { AuthError, EnsureResult, ResolveTokenInput, Vault, VerifyTokenFailure, VerifyTokenResult, VerifyTokenResult as VerifyTokenResult$1, VerifyTokenSuccess } from "@theholocron/cli";
2
2
  import { DopplerClient, DopplerClientOptions, createDopplerClient } from "@theholocron/doppler-client";
3
- //#region src/auth.d.ts
4
- declare const resolveToken: (input?: ResolveTokenInput) => string;
5
- //#endregion
6
- //#region src/capabilities/vault.d.ts
3
+ export declare const resolveToken: (input?: ResolveTokenInput) => string;
7
4
  interface DopplerVaultOptions {
8
5
  /** Default project — read/list/etc. operate here unless overridden. */
9
6
  project: string;
10
7
  /** Default config name — dev / stg / prd, etc. */
11
8
  config: string;
12
9
  }
13
- declare class DopplerVault implements Vault {
10
+ export declare class DopplerVault implements Vault {
14
11
  private readonly client;
15
12
  readonly key: "vault";
16
13
  readonly providerName = "doppler";
@@ -26,28 +23,24 @@ declare class DopplerVault implements Vault {
26
23
  ensureProject(name: string): Promise<EnsureResult>;
27
24
  ensureEnvironment(project: string, name: string): Promise<EnsureResult>;
28
25
  }
29
- //#endregion
30
- //#region src/verify-token.d.ts
31
26
  interface VerifyTokenOptions {
32
27
  baseUrl?: string;
33
28
  fetch?: typeof fetch;
34
29
  }
35
- declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
36
- //#endregion
37
- //#region src/index.d.ts
38
- interface DopplerPluginOptions extends ResolveTokenInput, DopplerVaultOptions {
30
+ export declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
31
+ export interface DopplerPluginOptions extends ResolveTokenInput, DopplerVaultOptions {
39
32
  /** Override base URL for tests. */
40
33
  baseUrl?: string;
41
34
  /** Override `fetch` for tests. */
42
35
  fetch?: typeof fetch;
43
36
  }
44
- interface PluginContext {
37
+ export interface PluginContext {
45
38
  options: DopplerPluginOptions;
46
39
  client: () => DopplerClient;
47
40
  }
48
- declare function createContext(options: DopplerPluginOptions): PluginContext;
49
- declare function vault(ctx: PluginContext): Vault;
50
- declare function createPlugin(options: DopplerPluginOptions): {
41
+ export declare function createContext(options: DopplerPluginOptions): PluginContext;
42
+ export declare function vault(ctx: PluginContext): Vault;
43
+ export declare function createPlugin(options: DopplerPluginOptions): {
51
44
  name: string;
52
45
  probes: {
53
46
  connection: import("@theholocron/cli").Probe;
@@ -60,6 +53,5 @@ declare function createPlugin(options: DopplerPluginOptions): {
60
53
  * One-line hint shown by `holocron auth set doppler` when no token is
61
54
  * supplied or when the supplied token is rejected.
62
55
  */
63
- declare const AUTH_HINT: string;
64
- //#endregion
65
- export { AUTH_HINT, AuthError, type DopplerClientOptions, DopplerPluginOptions, DopplerVault, PluginContext, type ResolveTokenInput, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, createContext, createDopplerClient, createPlugin, resolveToken, vault, verifyToken };
56
+ export declare const AUTH_HINT: string;
57
+ export { AuthError, type DopplerClientOptions, type ResolveTokenInput, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, createDopplerClient };
package/dist/index.mjs CHANGED
@@ -1,15 +1,14 @@
1
1
  import { AuthError, ProviderApiError, connectionProbe, createResolveToken } from "@theholocron/cli";
2
2
  import { createDopplerClient } from "@theholocron/doppler-client";
3
3
  import { errorMessage } from "@theholocron/misc-utils";
4
- //#region src/auth.ts
4
+ // src/auth.ts
5
5
  const resolveToken = createResolveToken({
6
6
  envName: "HOLOCRON_DOPPLER_TOKEN",
7
7
  vendorEnvName: "DOPPLER_TOKEN",
8
8
  keyringService: "doppler",
9
9
  errorMessage: "no Doppler token found. Pass --token <TOKEN>, set HOLOCRON_DOPPLER_TOKEN / DOPPLER_TOKEN, or run: holocron auth set doppler $(doppler configure get token --plain)"
10
10
  });
11
- //#endregion
12
- //#region src/capabilities/vault.ts
11
+ // src/capabilities/vault.ts
13
12
  /**
14
13
  * Doppler auto-injects these into every config's secrets download —
15
14
  * bookkeeping about the config itself, not something any caller
@@ -121,8 +120,7 @@ function hasAlreadyExistsBody(details) {
121
120
  if (typeof details !== "string") return false;
122
121
  return /already exists/i.test(details);
123
122
  }
124
- //#endregion
125
- //#region src/verify-token.ts
123
+ // src/verify-token.ts
126
124
  async function verifyToken(token, opts = {}) {
127
125
  const client = createDopplerClient({
128
126
  token,
@@ -143,8 +141,7 @@ async function verifyToken(token, opts = {}) {
143
141
  };
144
142
  }
145
143
  }
146
- //#endregion
147
- //#region src/index.ts
144
+ // src/index.ts
148
145
  function createContext(options) {
149
146
  let client;
150
147
  return {
@@ -184,5 +181,4 @@ function createPlugin(options) {
184
181
  * supplied or when the supplied token is rejected.
185
182
  */
186
183
  const AUTH_HINT = "install the Doppler CLI (`brew install dopplerhq/cli/doppler`), run `doppler login`, then `holocron auth set doppler $(doppler configure get token --plain)`";
187
- //#endregion
188
184
  export { AUTH_HINT, AuthError, DopplerVault, createContext, createDopplerClient, createPlugin, resolveToken, vault, verifyToken };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-doppler",
3
- "version": "5.0.0-alpha.246",
3
+ "version": "5.0.0-alpha.248",
4
4
  "description": "Holocron plugin for Doppler. Implements the vault capability against Doppler's REST API — projects, configs, secrets, plus verifyToken + AUTH_HINT for `holocron auth`.",
5
5
  "keywords": [
6
6
  "doppler",
@@ -38,21 +38,21 @@
38
38
  "@theholocron/tsdown-config": "^8.8.2",
39
39
  "@theholocron/vitest-config": "^8.8.2",
40
40
  "@types/node": "^26",
41
- "@vitest/coverage-v8": "^4.1.11",
41
+ "@vitest/coverage-v8": "^5.0.5",
42
42
  "@vitest/eslint-plugin": "^1.6.27",
43
43
  "eslint": "^10.8.1",
44
44
  "eslint-plugin-n": "^18.3.0",
45
45
  "globals": "^17.11.0",
46
- "tsdown": "^0.22.14",
46
+ "tsdown": "^0.23.3",
47
47
  "tsx": "4.23.15",
48
48
  "typescript": "^5.9.3",
49
- "vitest": "^4.1.11",
50
- "@theholocron/cli": "5.0.0-alpha.246"
49
+ "vitest": "^5.0.5",
50
+ "@theholocron/cli": "5.0.0-alpha.248"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@theholocron/doppler-client": "^1.43.1",
54
54
  "@theholocron/misc-utils": "^1.16.0",
55
- "@theholocron/cli": "5.0.0-alpha.246"
55
+ "@theholocron/cli": "5.0.0-alpha.248"
56
56
  },
57
57
  "engines": {
58
58
  "node": ">=22"