@theholocron/holocron-plugin-vercel 5.0.0-alpha.115 → 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,4 +1,4 @@
1
- import { AuthError, DeployFunctionConfig, DeployFunctionResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DnsRecordRequest, ResolveTokenInput } from "@theholocron/cli";
1
+ import { AuthError, DeployFunctionConfig, DeployFunctionResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DnsRecordRequest, ResolveTokenInput, VerifyTokenFailure, VerifyTokenResult, VerifyTokenResult as VerifyTokenResult$1, VerifyTokenSuccess } from "@theholocron/cli";
2
2
  import { VercelClient, VercelClient as VercelClient$1, VercelClientOptions, createVercelClient } from "@theholocron/vercel-client";
3
3
  //#region src/auth.d.ts
4
4
  declare const resolveToken: (input?: ResolveTokenInput) => string;
@@ -58,25 +58,11 @@ declare class VercelDeployment implements Deployment {
58
58
  }
59
59
  //#endregion
60
60
  //#region src/verify-token.d.ts
61
- /**
62
- * `verifyToken` — plugin-level export used by `holocron auth set` +
63
- * `holocron auth check`. Hits `GET /v2/user` and translates the
64
- * response into the normalized `VerifyTokenResult` shape.
65
- */
66
- interface VerifyTokenSuccess {
67
- ok: true;
68
- subject: string;
69
- }
70
- interface VerifyTokenFailure {
71
- ok: false;
72
- message: string;
73
- }
74
- type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure;
75
61
  interface VerifyTokenOptions {
76
62
  baseUrl?: string;
77
63
  fetch?: typeof fetch;
78
64
  }
79
- declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult>;
65
+ declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise<VerifyTokenResult$1>;
80
66
  //#endregion
81
67
  //#region src/index.d.ts
82
68
  interface VercelPluginOptions extends ResolveTokenInput {
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  import { AuthError, ProviderApiError, createResolveToken } from "@theholocron/cli";
2
2
  import { createVercelClient } from "@theholocron/vercel-client";
3
+ import { errorMessage } from "@theholocron/misc-utils";
3
4
  //#region src/auth.ts
4
5
  const resolveToken = createResolveToken({
5
6
  envName: "HOLOCRON_VERCEL_TOKEN",
@@ -162,11 +163,6 @@ function normalizeState(s) {
162
163
  }
163
164
  //#endregion
164
165
  //#region src/verify-token.ts
165
- /**
166
- * `verifyToken` — plugin-level export used by `holocron auth set` +
167
- * `holocron auth check`. Hits `GET /v2/user` and translates the
168
- * response into the normalized `VerifyTokenResult` shape.
169
- */
170
166
  async function verifyToken(token, opts = {}) {
171
167
  const client = createVercelClient({
172
168
  token,
@@ -182,7 +178,7 @@ async function verifyToken(token, opts = {}) {
182
178
  } catch (err) {
183
179
  return {
184
180
  ok: false,
185
- message: err instanceof Error ? err.message : String(err)
181
+ message: errorMessage(err)
186
182
  };
187
183
  }
188
184
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-vercel",
3
- "version": "5.0.0-alpha.115",
3
+ "version": "5.0.0-alpha.116",
4
4
  "description": "Holocron plugin for Vercel. Implements the deployment capability against the Vercel REST API.",
5
5
  "keywords": [
6
6
  "deployment",
@@ -32,6 +32,7 @@
32
32
  "devDependencies": {
33
33
  "@theholocron/eslint-config": "^8.7.0",
34
34
  "@theholocron/http-client": "^1.37.1",
35
+ "@theholocron/misc-utils": "^1.9.2",
35
36
  "@theholocron/tsconfig": "^8.7.0",
36
37
  "@theholocron/tsdown-config": "^8.7.0",
37
38
  "@theholocron/vercel-client": "^1.37.1",
@@ -46,11 +47,12 @@
46
47
  "tsx": "4.23.12",
47
48
  "typescript": "^5.9.3",
48
49
  "vitest": "^4.1.11",
49
- "@theholocron/cli": "5.0.0-alpha.115"
50
+ "@theholocron/cli": "5.0.0-alpha.116"
50
51
  },
51
52
  "peerDependencies": {
53
+ "@theholocron/misc-utils": "^1.9.2",
52
54
  "@theholocron/vercel-client": "^1.37.1",
53
- "@theholocron/cli": "5.0.0-alpha.115"
55
+ "@theholocron/cli": "5.0.0-alpha.116"
54
56
  },
55
57
  "peerDependenciesMeta": {
56
58
  "@theholocron/vercel-client": {}