@theholocron/holocron-plugin-doppler 5.0.0-alpha.245 → 5.0.0-alpha.247
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 +10 -18
- package/dist/index.mjs +4 -8
- package/package.json +6 -6
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "5.0.0-alpha.247",
|
|
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": "^
|
|
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.
|
|
46
|
+
"tsdown": "^0.23.3",
|
|
47
47
|
"tsx": "4.23.15",
|
|
48
48
|
"typescript": "^5.9.3",
|
|
49
|
-
"vitest": "^
|
|
50
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
49
|
+
"vitest": "^5.0.5",
|
|
50
|
+
"@theholocron/cli": "5.0.0-alpha.247"
|
|
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.
|
|
55
|
+
"@theholocron/cli": "5.0.0-alpha.247"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
58
58
|
"node": ">=22"
|