@theholocron/holocron-plugin-netlify 5.0.0-alpha.114 → 5.0.0-alpha.116

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,5 @@
1
1
  import { NetlifyClient } from "@theholocron/netlify-client";
2
- import { AuthError, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DnsRecordRequest, ResolveTokenInput } from "@theholocron/cli";
2
+ import { AuthError, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DnsRecordRequest, ResolveTokenInput, VerifyTokenFailure, VerifyTokenResult, VerifyTokenResult as VerifyTokenResult$1, VerifyTokenSuccess } from "@theholocron/cli";
3
3
  //#region src/auth.d.ts
4
4
  declare const resolveToken: (input?: ResolveTokenInput) => string;
5
5
  //#endregion
@@ -67,31 +67,11 @@ declare class NetlifyDeployment implements Deployment {
67
67
  }
68
68
  //#endregion
69
69
  //#region src/verify-token.d.ts
70
- /**
71
- * `verifyToken` — plugin-level export used by `holocron auth set` +
72
- * `holocron auth check`. Hits Netlify's `GET /user` (current token's
73
- * identity) and translates the response into the normalized
74
- * `VerifyTokenResult` shape.
75
- *
76
- * Kept as a standalone function (not a capability method) so the auth
77
- * command can call it without initializing the full plugin — plugin
78
- * construction requires an already-resolved token, which is exactly
79
- * what we don't have yet at bootstrap time.
80
- */
81
- interface VerifyTokenSuccess {
82
- ok: true;
83
- subject: string;
84
- }
85
- interface VerifyTokenFailure {
86
- ok: false;
87
- message: string;
88
- }
89
- type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure;
90
70
  interface VerifyTokenOptions {
91
71
  baseUrl?: string;
92
72
  fetch?: typeof fetch;
93
73
  }
94
- declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult>;
74
+ declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
95
75
  //#endregion
96
76
  //#region src/index.d.ts
97
77
  interface NetlifyPluginOptions extends ResolveTokenInput, NetlifyDeploymentOptions {
package/dist/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import { createNetlifyClient } from "@theholocron/netlify-client";
2
2
  import { AuthError, createResolveToken } from "@theholocron/cli";
3
3
  import { ProviderApiError } from "@theholocron/http-client";
4
+ import { errorMessage } from "@theholocron/misc-utils";
4
5
  //#region src/auth.ts
5
6
  const resolveToken = createResolveToken({
6
7
  envName: "HOLOCRON_NETLIFY_TOKEN",
@@ -127,17 +128,6 @@ var NetlifyDeployment = class {
127
128
  };
128
129
  //#endregion
129
130
  //#region src/verify-token.ts
130
- /**
131
- * `verifyToken` — plugin-level export used by `holocron auth set` +
132
- * `holocron auth check`. Hits Netlify's `GET /user` (current token's
133
- * identity) and translates the response into the normalized
134
- * `VerifyTokenResult` shape.
135
- *
136
- * Kept as a standalone function (not a capability method) so the auth
137
- * command can call it without initializing the full plugin — plugin
138
- * construction requires an already-resolved token, which is exactly
139
- * what we don't have yet at bootstrap time.
140
- */
141
131
  async function verifyToken(token, opts = {}) {
142
132
  const client = createNetlifyClient({
143
133
  token,
@@ -153,7 +143,7 @@ async function verifyToken(token, opts = {}) {
153
143
  } catch (err) {
154
144
  return {
155
145
  ok: false,
156
- message: err instanceof Error ? err.message : String(err)
146
+ message: errorMessage(err)
157
147
  };
158
148
  }
159
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-netlify",
3
- "version": "5.0.0-alpha.114",
3
+ "version": "5.0.0-alpha.116",
4
4
  "description": "Holocron plugin for Netlify. Implements the deployment capability against Netlify's REST API, plus exports verifyToken + AUTH_HINT for `holocron auth`.",
5
5
  "keywords": [
6
6
  "deployment",
@@ -30,9 +30,10 @@
30
30
  "dist"
31
31
  ],
32
32
  "devDependencies": {
33
- "@theholocron/http-client": "^1.36.0",
34
- "@theholocron/netlify-client": "^1.36.0",
35
- "@theholocron/tsconfig": "^8.4.5",
33
+ "@theholocron/http-client": "^1.37.1",
34
+ "@theholocron/misc-utils": "^1.9.2",
35
+ "@theholocron/netlify-client": "^1.37.1",
36
+ "@theholocron/tsconfig": "^8.7.0",
36
37
  "@types/node": "^26",
37
38
  "@vitest/coverage-v8": "^4.1.11",
38
39
  "eslint": "^10.8.1",
@@ -41,11 +42,12 @@
41
42
  "tsx": "4.23.12",
42
43
  "typescript": "^5.9.3",
43
44
  "vitest": "^4.1.11",
44
- "@theholocron/cli": "5.0.0-alpha.114"
45
+ "@theholocron/cli": "5.0.0-alpha.116"
45
46
  },
46
47
  "peerDependencies": {
47
- "@theholocron/netlify-client": "^1.36.0",
48
- "@theholocron/cli": "5.0.0-alpha.114"
48
+ "@theholocron/misc-utils": "^1.9.2",
49
+ "@theholocron/netlify-client": "^1.37.1",
50
+ "@theholocron/cli": "5.0.0-alpha.116"
49
51
  },
50
52
  "peerDependenciesMeta": {
51
53
  "@theholocron/netlify-client": {}