@theholocron/holocron-plugin-infisical 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 { InfisicalClient, InfisicalClient as InfisicalClient$1, InfisicalClientOptions, createInfisicalClient } from "@theholocron/infisical-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 InfisicalVaultOptions {
8
5
  /** Default workspace (project) id — read/list/etc. operate here unless overridden. */
9
6
  workspace: string;
10
7
  /** Default environment slug — e.g., "dev", "stg", "prd". */
11
8
  environment: string;
12
9
  }
13
- declare class InfisicalVault implements Vault {
10
+ export declare class InfisicalVault implements Vault {
14
11
  private readonly client;
15
12
  readonly key: "vault";
16
13
  readonly providerName = "infisical";
@@ -33,28 +30,24 @@ declare class InfisicalVault implements Vault {
33
30
  ensureEnvironment(project: string, name: string): Promise<EnsureResult>;
34
31
  private resolveWorkspaceId;
35
32
  }
36
- //#endregion
37
- //#region src/verify-token.d.ts
38
33
  interface VerifyTokenOptions {
39
34
  baseUrl?: string;
40
35
  fetch?: typeof fetch;
41
36
  }
42
- declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
43
- //#endregion
44
- //#region src/index.d.ts
45
- interface InfisicalPluginOptions extends ResolveTokenInput, InfisicalVaultOptions {
37
+ export declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
38
+ export interface InfisicalPluginOptions extends ResolveTokenInput, InfisicalVaultOptions {
46
39
  /** Override base URL for tests (or self-hosted Infisical). */
47
40
  baseUrl?: string;
48
41
  /** Override `fetch` for tests. */
49
42
  fetch?: typeof fetch;
50
43
  }
51
- interface PluginContext {
44
+ export interface PluginContext {
52
45
  options: InfisicalPluginOptions;
53
46
  client: () => InfisicalClient;
54
47
  }
55
- declare function createContext(options: InfisicalPluginOptions): PluginContext;
56
- declare function vault(ctx: PluginContext): Vault;
57
- declare function createPlugin(options: InfisicalPluginOptions): {
48
+ export declare function createContext(options: InfisicalPluginOptions): PluginContext;
49
+ export declare function vault(ctx: PluginContext): Vault;
50
+ export declare function createPlugin(options: InfisicalPluginOptions): {
58
51
  name: string;
59
52
  probes: {
60
53
  connection: import("@theholocron/cli").Probe;
@@ -67,6 +60,5 @@ declare function createPlugin(options: InfisicalPluginOptions): {
67
60
  * One-line hint printed by `holocron auth set infisical` when no
68
61
  * token is supplied or the supplied token is rejected.
69
62
  */
70
- declare const AUTH_HINT: string;
71
- //#endregion
72
- export { AUTH_HINT, AuthError, type InfisicalClient, type InfisicalClientOptions, InfisicalPluginOptions, InfisicalVault, PluginContext, type ResolveTokenInput, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, createContext, createInfisicalClient, createPlugin, resolveToken, vault, verifyToken };
63
+ export declare const AUTH_HINT: string;
64
+ export { AuthError, type InfisicalClient, type InfisicalClientOptions, type ResolveTokenInput, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, createInfisicalClient };
package/dist/index.mjs CHANGED
@@ -1,15 +1,14 @@
1
1
  import { AuthError, ProviderApiError, connectionProbe, createResolveToken } from "@theholocron/cli";
2
2
  import { createInfisicalClient } from "@theholocron/infisical-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_INFISICAL_TOKEN",
7
7
  vendorEnvName: "INFISICAL_TOKEN",
8
8
  keyringService: "infisical",
9
9
  errorMessage: "no Infisical token found. Pass --token <TOKEN>, set HOLOCRON_INFISICAL_TOKEN / INFISICAL_TOKEN, or run: holocron auth set infisical <TOKEN>"
10
10
  });
11
- //#endregion
12
- //#region src/capabilities/vault.ts
11
+ // src/capabilities/vault.ts
13
12
  var InfisicalVault = class {
14
13
  client;
15
14
  key = "vault";
@@ -136,8 +135,7 @@ function hasAlreadyExistsBody(details) {
136
135
  if (typeof details !== "string") return false;
137
136
  return /already exists|duplicate/i.test(details);
138
137
  }
139
- //#endregion
140
- //#region src/verify-token.ts
138
+ // src/verify-token.ts
141
139
  /**
142
140
  * `verifyToken` — plugin-level export used by `holocron auth set` +
143
141
  * `holocron auth check`. Hits `GET /v1/workspace` and interprets the
@@ -180,8 +178,7 @@ async function verifyToken(token, opts = {}) {
180
178
  };
181
179
  }
182
180
  }
183
- //#endregion
184
- //#region src/index.ts
181
+ // src/index.ts
185
182
  function createContext(options) {
186
183
  let client;
187
184
  return {
@@ -221,5 +218,4 @@ function createPlugin(options) {
221
218
  * token is supplied or the supplied token is rejected.
222
219
  */
223
220
  const AUTH_HINT = "generate a Token Auth token on your machine identity (organization → access control → identities → your identity → add auth method → Token Auth → create token) OR a Personal API Token, then: holocron auth set infisical <TOKEN>. NOT Universal Auth's Client Secret — that needs a login exchange this plugin doesn't do yet.";
224
- //#endregion
225
221
  export { AUTH_HINT, AuthError, InfisicalVault, createContext, createInfisicalClient, createPlugin, resolveToken, vault, verifyToken };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-infisical",
3
- "version": "5.0.0-alpha.246",
3
+ "version": "5.0.0-alpha.248",
4
4
  "description": "Holocron plugin for Infisical. Implements the vault capability against Infisical's REST API, plus exports verifyToken + AUTH_HINT for `holocron auth`.",
5
5
  "keywords": [
6
6
  "holocron",
@@ -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/infisical-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
  "peerDependenciesMeta": {
58
58
  "@theholocron/infisical-client": {}