@theholocron/doppler-client 1.58.0-alpha.3 → 1.58.0-alpha.8

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,5 +1,6 @@
1
1
  import "@theholocron/http-client";
2
2
  import { ErrorSink, Logger } from "@theholocron/observability/core";
3
+ /** Options for `createDopplerClient`. */
3
4
  interface DopplerClientOptions {
4
5
  /** Doppler service token or personal token. */
5
6
  token: string;
@@ -12,14 +13,21 @@ interface DopplerClientOptions {
12
13
  /** Reports transport failures and unexpected 5xx. Defaults to a no-op. */
13
14
  errors?: ErrorSink;
14
15
  }
16
+ /** A Doppler environment of a project. */
15
17
  interface DopplerEnvironment {
18
+ /** The environment id. */
16
19
  id?: string;
20
+ /** The environment name. */
17
21
  name?: string;
22
+ /** The environment slug. */
18
23
  slug?: string;
19
24
  }
25
+ /** The response of listing or creating environments. */
20
26
  interface DopplerEnvironmentsResponse {
27
+ /** The environments the API returned. */
21
28
  environments?: DopplerEnvironment[];
22
29
  }
30
+ /** The identity of the token, from Doppler's `/me` endpoint. */
23
31
  interface DopplerMe {
24
32
  /** Token type: "cli" | "personal" | "service" | "service_account". */
25
33
  type?: string;
@@ -27,32 +35,50 @@ interface DopplerMe {
27
35
  slug?: string;
28
36
  /** Present on account-level tokens. */
29
37
  workplace?: {
38
+ /** The workplace name. */
30
39
  name?: string;
40
+ /** The workplace slug. */
31
41
  slug?: string;
32
42
  };
33
43
  /** Present on user tokens. */
34
44
  name?: string;
35
45
  }
46
+ /** A Doppler project. */
36
47
  interface DopplerProject {
48
+ /** The project id. */
37
49
  id?: string;
50
+ /** The project name. */
38
51
  name?: string;
52
+ /** The project slug. */
39
53
  slug?: string;
54
+ /** The project description. */
40
55
  description?: string;
41
56
  }
57
+ /** The response of creating a project. */
42
58
  interface DopplerProjectResponse {
59
+ /** The project that was created. */
43
60
  project?: DopplerProject;
44
61
  }
62
+ /** A secret's value in its two forms. */
45
63
  interface DopplerSecretValue {
64
+ /** The value as stored, with references such as `${OTHER}` left unexpanded. */
46
65
  raw?: string;
66
+ /** The value with references expanded. */
47
67
  computed?: string;
48
68
  }
69
+ /** One secret, as returned when reading it by name. */
49
70
  interface DopplerSecret {
71
+ /** The secret's name. */
50
72
  name?: string;
73
+ /** The secret's value; `null` or `undefined` when it has none. */
51
74
  value?: DopplerSecretValue | null;
52
75
  }
76
+ /** The secrets of a config, keyed by name. */
53
77
  interface DopplerSecretsMap {
78
+ /** Each secret's value by name; a secret with no value is `null`. */
54
79
  secrets?: Record<string, DopplerSecretValue | null>;
55
80
  }
81
+ /** Creates a Doppler API client with `environments`, `me`, `projects` and `secrets` groups, all sharing one REST client. */
56
82
  export declare function createDopplerClient(opts: DopplerClientOptions): {
57
83
  environments: {
58
84
  list: (project: string) => Promise<DopplerEnvironmentsResponse>;
@@ -71,5 +97,6 @@ export declare function createDopplerClient(opts: DopplerClientOptions): {
71
97
  download: (project: string, config: string) => Promise<Record<string, string>>;
72
98
  };
73
99
  };
100
+ /** The client `createDopplerClient` returns. */
74
101
  export type DopplerClient = ReturnType<typeof createDopplerClient>;
75
102
  export type { DopplerClientOptions, DopplerEnvironment, DopplerEnvironmentsResponse, DopplerMe, DopplerProject, DopplerProjectResponse, DopplerSecret, DopplerSecretValue, DopplerSecretsMap };
package/dist/index.mjs CHANGED
@@ -66,6 +66,7 @@ function createDopplerRestClient(opts) {
66
66
  });
67
67
  }
68
68
  // src/index.ts
69
+ /** Creates a Doppler API client with `environments`, `me`, `projects` and `secrets` groups, all sharing one REST client. */
69
70
  function createDopplerClient(opts) {
70
71
  const rest = createDopplerRestClient(opts);
71
72
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/doppler-client",
3
- "version": "1.58.0-alpha.3",
3
+ "version": "1.58.0-alpha.8",
4
4
  "description": "A TypeScript client for the Doppler API",
5
5
  "keywords": [
6
6
  "doppler",
@@ -32,23 +32,23 @@
32
32
  "dist"
33
33
  ],
34
34
  "dependencies": {
35
- "@theholocron/http-client": "^1.58.0-alpha.3",
36
- "@theholocron/observability": "^0.6.1-alpha.1"
35
+ "@theholocron/http-client": "^1.58.0-alpha.8",
36
+ "@theholocron/observability": "^0.7.0-alpha.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^26",
40
40
  "@vitest/coverage-v8": "^5.0.5",
41
- "@vitest/eslint-plugin": "^1.6.27",
42
- "eslint": "^10.8.1",
43
- "eslint-plugin-n": "^18.3.0",
44
- "globals": "^17.11.0",
45
- "tsdown": "^0.23.3",
41
+ "@vitest/eslint-plugin": "^1.6.28",
42
+ "eslint": "^10.14.0",
43
+ "eslint-plugin-n": "^18.5.0",
44
+ "globals": "^17.14.0",
45
+ "tsdown": "^0.23.4",
46
46
  "typescript": "^5.9.3",
47
47
  "vitest": "^5.0.5",
48
- "@theholocron/eslint-config": "^8.9.0-alpha.3",
49
- "@theholocron/tsdown-config": "^8.9.0-alpha.3",
50
- "@theholocron/vitest-config": "^8.9.0-alpha.3",
51
- "@theholocron/tsconfig": "^8.9.0-alpha.3"
48
+ "@theholocron/eslint-config": "^8.9.0-alpha.8",
49
+ "@theholocron/tsconfig": "^8.9.0-alpha.8",
50
+ "@theholocron/vitest-config": "^8.9.0-alpha.8",
51
+ "@theholocron/tsdown-config": "^8.9.0-alpha.8"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=22.0.0"
@@ -57,10 +57,10 @@
57
57
  "access": "public"
58
58
  },
59
59
  "scripts": {
60
- "delivery.build": "tsdown && node ../scripts/check-bundle-size.mjs",
61
- "sourceQuality.staticAnalysis": "eslint .",
60
+ "build": "tsdown && node ../scripts/check-bundle-size.mjs",
61
+ "lint:code": "eslint .",
62
+ "test:unit": "vitest run --coverage",
62
63
  "test:watch": "vitest",
63
- "verification.typeSafety": "tsc --noEmit",
64
- "verification.unitTests": "vitest run"
64
+ "typecheck": "tsc --noEmit"
65
65
  }
66
66
  }