@theholocron/holocron-plugin-infisical 5.0.0-alpha.20 → 5.0.0-alpha.200

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/README.md CHANGED
@@ -160,7 +160,7 @@ Set the `baseUrl` option in `holocron.config.json`:
160
160
 
161
161
  ## Status
162
162
 
163
- **`v2.0.0-alpha.1`** — scaffolded via `holocron plugin create` (see
163
+ **`v2.0.0-alpha.1`** — scaffolded via `holocron new plugin` (see
164
164
  `docs/wiki/specifications/tool-plugin-create.spec.md` — this is the first real
165
165
  production use of that command, doubling as its acceptance test in
166
166
  a live scenario). Not yet published on npm; capability methods are
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 { InfisicalClient, InfisicalClient as InfisicalClient$1, InfisicalClientOptions, createInfisicalClient } from "@theholocron/infisical-client";
3
3
  //#region src/auth.d.ts
4
4
  declare const resolveToken: (input?: ResolveTokenInput) => string;
@@ -18,7 +18,7 @@ declare class InfisicalVault implements Vault {
18
18
  private readonly environment;
19
19
  /**
20
20
  * Cache of resolved workspace name/slug → id. `ensureEnvironment`
21
- * is called once per environment during `holocron setup` (dev / stg
21
+ * is called once per environment during `holocron repo setup` (dev / stg
22
22
  * / prd), so a single `GET /v1/workspace` lookup covers all three
23
23
  * calls in the same run.
24
24
  */
@@ -35,36 +35,11 @@ declare class InfisicalVault implements Vault {
35
35
  }
36
36
  //#endregion
37
37
  //#region src/verify-token.d.ts
38
- /**
39
- * `verifyToken` — plugin-level export used by `holocron auth set` +
40
- * `holocron auth check`. Hits `GET /v1/workspace` and interprets the
41
- * response permissively:
42
- *
43
- * - 200 → token is valid AND has workspace-list scope; report the
44
- * workspace count + first workspace name.
45
- * - 403 → token is valid (authenticated) but doesn't have scope
46
- * to list workspaces at the org level. This is normal for
47
- * Universal Auth machine-identity tokens that are scoped to a
48
- * specific workspace rather than org-wide. Return ok with a
49
- * "scope-limited" subject — the operator's `holocron.config.json`
50
- * will name the specific workspace + environment the token
51
- * actually has access to.
52
- * - 401 or other → token is invalid.
53
- */
54
- interface VerifyTokenSuccess {
55
- ok: true;
56
- subject: string;
57
- }
58
- interface VerifyTokenFailure {
59
- ok: false;
60
- message: string;
61
- }
62
- type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure;
63
38
  interface VerifyTokenOptions {
64
39
  baseUrl?: string;
65
40
  fetch?: typeof fetch;
66
41
  }
67
- declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult>;
42
+ declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
68
43
  //#endregion
69
44
  //#region src/index.d.ts
70
45
  interface InfisicalPluginOptions extends ResolveTokenInput, InfisicalVaultOptions {
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  import { AuthError, ProviderApiError, createResolveToken } from "@theholocron/cli";
2
2
  import { createInfisicalClient } from "@theholocron/infisical-client";
3
+ import { errorMessage } from "@theholocron/misc-utils";
3
4
  //#region src/auth.ts
4
5
  const resolveToken = createResolveToken({
5
6
  envName: "HOLOCRON_INFISICAL_TOKEN",
@@ -17,7 +18,7 @@ var InfisicalVault = class {
17
18
  environment;
18
19
  /**
19
20
  * Cache of resolved workspace name/slug → id. `ensureEnvironment`
20
- * is called once per environment during `holocron setup` (dev / stg
21
+ * is called once per environment during `holocron repo setup` (dev / stg
21
22
  * / prd), so a single `GET /v1/workspace` lookup covers all three
22
23
  * calls in the same run.
23
24
  */
@@ -175,7 +176,7 @@ async function verifyToken(token, opts = {}) {
175
176
  };
176
177
  return {
177
178
  ok: false,
178
- message: err instanceof Error ? err.message : String(err)
179
+ message: errorMessage(err)
179
180
  };
180
181
  }
181
182
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-infisical",
3
- "version": "5.0.0-alpha.20",
3
+ "version": "5.0.0-alpha.200",
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",
@@ -8,12 +8,12 @@
8
8
  "plugin",
9
9
  "vault"
10
10
  ],
11
- "homepage": "https://github.com/theholocron/holocron/tree/main/packages/holocron-plugin-infisical#readme",
11
+ "homepage": "https://github.com/theholocron/holocron/tree/main/plugins/holocron-plugin-infisical#readme",
12
12
  "bugs": "https://github.com/theholocron/holocron/issues",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git+https://github.com/theholocron/holocron.git",
16
- "directory": "packages/holocron-plugin-infisical"
16
+ "directory": "plugins/holocron-plugin-infisical"
17
17
  },
18
18
  "license": "MIT",
19
19
  "author": "Newton Koumantzelis",
@@ -30,12 +30,13 @@
30
30
  "dist"
31
31
  ],
32
32
  "devDependencies": {
33
- "@theholocron/eslint-config": "^8.0.0",
34
- "@theholocron/http-client": "^1.20.0",
35
- "@theholocron/infisical-client": "^1.20.0",
36
- "@theholocron/tsconfig": "^8.0.0",
37
- "@theholocron/tsdown-config": "^8.0.0",
38
- "@theholocron/vitest-config": "^8.0.0",
33
+ "@theholocron/eslint-config": "^8.8.2",
34
+ "@theholocron/http-client": "^1.43.1",
35
+ "@theholocron/infisical-client": "^1.43.1",
36
+ "@theholocron/misc-utils": "^1.16.0",
37
+ "@theholocron/tsconfig": "^8.8.2",
38
+ "@theholocron/tsdown-config": "^8.8.2",
39
+ "@theholocron/vitest-config": "^8.8.2",
39
40
  "@types/node": "^26",
40
41
  "@vitest/coverage-v8": "^4.1.11",
41
42
  "@vitest/eslint-plugin": "^1.6.27",
@@ -43,14 +44,15 @@
43
44
  "eslint-plugin-n": "^18.3.0",
44
45
  "globals": "^17.11.0",
45
46
  "tsdown": "^0.22.14",
46
- "tsx": "4.23.12",
47
+ "tsx": "4.23.15",
47
48
  "typescript": "^5.9.3",
48
49
  "vitest": "^4.1.11",
49
- "@theholocron/cli": "5.0.0-alpha.20"
50
+ "@theholocron/cli": "5.0.0-alpha.200"
50
51
  },
51
52
  "peerDependencies": {
52
- "@theholocron/infisical-client": "^1.20.0",
53
- "@theholocron/cli": "5.0.0-alpha.20"
53
+ "@theholocron/infisical-client": "^1.43.1",
54
+ "@theholocron/misc-utils": "^1.16.0",
55
+ "@theholocron/cli": "5.0.0-alpha.200"
54
56
  },
55
57
  "peerDependenciesMeta": {
56
58
  "@theholocron/infisical-client": {}