@theholocron/holocron-plugin-infisical 5.0.0-alpha.12 → 5.0.0-alpha.121
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 +2 -27
- package/dist/index.mjs +2 -1
- package/package.json +12 -9
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;
|
|
@@ -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",
|
|
@@ -175,7 +176,7 @@ async function verifyToken(token, opts = {}) {
|
|
|
175
176
|
};
|
|
176
177
|
return {
|
|
177
178
|
ok: false,
|
|
178
|
-
message:
|
|
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.
|
|
3
|
+
"version": "5.0.0-alpha.121",
|
|
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",
|
|
@@ -30,11 +30,13 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@theholocron/eslint-config": "^8.
|
|
34
|
-
"@theholocron/
|
|
35
|
-
"@theholocron/
|
|
36
|
-
"@theholocron/
|
|
37
|
-
"@theholocron/
|
|
33
|
+
"@theholocron/eslint-config": "^8.7.0",
|
|
34
|
+
"@theholocron/http-client": "^1.38.0",
|
|
35
|
+
"@theholocron/infisical-client": "^1.38.0",
|
|
36
|
+
"@theholocron/misc-utils": "^1.9.2",
|
|
37
|
+
"@theholocron/tsconfig": "^8.7.0",
|
|
38
|
+
"@theholocron/tsdown-config": "^8.7.0",
|
|
39
|
+
"@theholocron/vitest-config": "^8.7.0",
|
|
38
40
|
"@types/node": "^26",
|
|
39
41
|
"@vitest/coverage-v8": "^4.1.11",
|
|
40
42
|
"@vitest/eslint-plugin": "^1.6.27",
|
|
@@ -45,11 +47,12 @@
|
|
|
45
47
|
"tsx": "4.23.12",
|
|
46
48
|
"typescript": "^5.9.3",
|
|
47
49
|
"vitest": "^4.1.11",
|
|
48
|
-
"@theholocron/cli": "5.0.0-alpha.
|
|
50
|
+
"@theholocron/cli": "5.0.0-alpha.121"
|
|
49
51
|
},
|
|
50
52
|
"peerDependencies": {
|
|
51
|
-
"@theholocron/infisical-client": "^1.
|
|
52
|
-
"@theholocron/
|
|
53
|
+
"@theholocron/infisical-client": "^1.38.0",
|
|
54
|
+
"@theholocron/misc-utils": "^1.9.2",
|
|
55
|
+
"@theholocron/cli": "5.0.0-alpha.121"
|
|
53
56
|
},
|
|
54
57
|
"peerDependenciesMeta": {
|
|
55
58
|
"@theholocron/infisical-client": {}
|