@theholocron/holocron-plugin-doppler 5.0.0-alpha.115 → 5.0.0-alpha.117

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,4 +1,4 @@
1
- import { AuthError, EnsureResult, ResolveTokenInput, Vault } from "@theholocron/cli";
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
3
  //#region src/auth.d.ts
4
4
  declare const resolveToken: (input?: ResolveTokenInput) => string;
@@ -27,30 +27,11 @@ declare class DopplerVault implements Vault {
27
27
  }
28
28
  //#endregion
29
29
  //#region src/verify-token.d.ts
30
- /**
31
- * `verifyToken` — plugin-level export used by `holocron auth set` +
32
- * `holocron auth check`. Hits `GET /v3/me` and translates the response
33
- * into the normalized `VerifyTokenResult` shape.
34
- *
35
- * Kept as a standalone function (not a capability method) so the auth
36
- * command can call it without initializing the full plugin — plugin
37
- * construction requires an already-resolved token, which is exactly
38
- * what we don't have yet at bootstrap time.
39
- */
40
- interface VerifyTokenSuccess {
41
- ok: true;
42
- subject: string;
43
- }
44
- interface VerifyTokenFailure {
45
- ok: false;
46
- message: string;
47
- }
48
- type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure;
49
30
  interface VerifyTokenOptions {
50
31
  baseUrl?: string;
51
32
  fetch?: typeof fetch;
52
33
  }
53
- declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult>;
34
+ declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
54
35
  //#endregion
55
36
  //#region src/index.d.ts
56
37
  interface DopplerPluginOptions extends ResolveTokenInput, DopplerVaultOptions {
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  import { AuthError, ProviderApiError, createResolveToken } from "@theholocron/cli";
2
2
  import { createDopplerClient } from "@theholocron/doppler-client";
3
+ import { errorMessage } from "@theholocron/misc-utils";
3
4
  //#region src/auth.ts
4
5
  const resolveToken = createResolveToken({
5
6
  envName: "HOLOCRON_DOPPLER_TOKEN",
@@ -118,16 +119,6 @@ function hasAlreadyExistsBody(details) {
118
119
  }
119
120
  //#endregion
120
121
  //#region src/verify-token.ts
121
- /**
122
- * `verifyToken` — plugin-level export used by `holocron auth set` +
123
- * `holocron auth check`. Hits `GET /v3/me` and translates the response
124
- * into the normalized `VerifyTokenResult` shape.
125
- *
126
- * Kept as a standalone function (not a capability method) so the auth
127
- * command can call it without initializing the full plugin — plugin
128
- * construction requires an already-resolved token, which is exactly
129
- * what we don't have yet at bootstrap time.
130
- */
131
122
  async function verifyToken(token, opts = {}) {
132
123
  const client = createDopplerClient({
133
124
  token,
@@ -144,7 +135,7 @@ async function verifyToken(token, opts = {}) {
144
135
  } catch (err) {
145
136
  return {
146
137
  ok: false,
147
- message: err instanceof Error ? err.message : String(err)
138
+ message: errorMessage(err)
148
139
  };
149
140
  }
150
141
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-doppler",
3
- "version": "5.0.0-alpha.115",
3
+ "version": "5.0.0-alpha.117",
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",
@@ -30,9 +30,10 @@
30
30
  "dist"
31
31
  ],
32
32
  "devDependencies": {
33
- "@theholocron/doppler-client": "^1.37.1",
33
+ "@theholocron/doppler-client": "^1.38.0",
34
34
  "@theholocron/eslint-config": "^8.7.0",
35
- "@theholocron/http-client": "^1.37.1",
35
+ "@theholocron/http-client": "^1.38.0",
36
+ "@theholocron/misc-utils": "^1.9.2",
36
37
  "@theholocron/tsconfig": "^8.7.0",
37
38
  "@theholocron/tsdown-config": "^8.7.0",
38
39
  "@theholocron/vitest-config": "^8.7.0",
@@ -46,11 +47,12 @@
46
47
  "tsx": "4.23.12",
47
48
  "typescript": "^5.9.3",
48
49
  "vitest": "^4.1.11",
49
- "@theholocron/cli": "5.0.0-alpha.115"
50
+ "@theholocron/cli": "5.0.0-alpha.117"
50
51
  },
51
52
  "peerDependencies": {
52
- "@theholocron/doppler-client": "^1.37.1",
53
- "@theholocron/cli": "5.0.0-alpha.115"
53
+ "@theholocron/doppler-client": "^1.38.0",
54
+ "@theholocron/misc-utils": "^1.9.2",
55
+ "@theholocron/cli": "5.0.0-alpha.117"
54
56
  },
55
57
  "engines": {
56
58
  "node": ">=22"