@theholocron/holocron-plugin-vercel 2.0.0-alpha.0 → 2.0.0-alpha.1

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
@@ -3,6 +3,12 @@
3
3
  Vercel plugin for [Holocron](../cli). Implements the `deployment`
4
4
  capability against the [Vercel REST API](https://vercel.com/docs/rest-api).
5
5
 
6
+ ## Install
7
+
8
+ ```bash
9
+ pnpm add -D @theholocron/holocron-plugin-vercel@alpha
10
+ ```
11
+
6
12
  ## Auth
7
13
 
8
14
  Token resolution order:
@@ -20,18 +26,22 @@ always cover what holocron needs at the API level. Explicit token only.
20
26
  ```jsonc
21
27
  // holocron.config.json
22
28
  {
23
- "providers": {
24
- "deployment": ["vercel", { "teamId": "team_xxx" }]
25
- }
29
+ "providers": {
30
+ "deployment": ["vercel", { "teamId": "team_xxx" }],
31
+ },
26
32
  }
27
33
  ```
28
34
 
29
35
  - `teamId` (optional) — Vercel team id. When set, all requests are
30
- scoped to that team. Leave unset for personal-account projects.
36
+ scoped to that team. Leave unset for personal-account projects.
31
37
 
32
38
  ## Status
33
39
 
34
- **v0.0.0 — first port.** Capability covers:
40
+ **`v2.0.0-alpha.0`**published on npm under the `alpha` dist-tag.
41
+ [Release notes](https://github.com/theholocron/holocron/releases/tag/v2.0.0-alpha.0).
42
+ APIs may still shift before stable v2.0.0.
43
+
44
+ Capability covers:
35
45
 
36
46
  - `listProjects()` / `ensureProject()` — idempotent project create
37
47
  - `updateProjectSettings()` — toggle preview deploys, git-creates-deploys
@@ -39,7 +49,7 @@ always cover what holocron needs at the API level. Explicit token only.
39
49
  - `triggerDeployment()` — branch deploys with optional named target
40
50
  - `getDeployment()` — fetch a deployment by id
41
51
 
42
- Out of scope for v1 (file a follow-up if needed):
52
+ Out of scope for alpha.0 (file a follow-up if needed):
43
53
 
44
54
  - Domain management (`addDomain` / `removeDomain`)
45
55
  - Deletion (`deleteProject`)
package/dist/index.d.mts CHANGED
@@ -43,7 +43,7 @@ interface RestClientOptions {
43
43
  baseUrl?: string;
44
44
  }
45
45
  interface RequestOptions {
46
- method?: 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
46
+ method?: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
47
47
  body?: unknown;
48
48
  /** Additional query-string params. */
49
49
  query?: Record<string, string>;
package/dist/index.mjs CHANGED
@@ -176,7 +176,9 @@ var VercelRestClient = class {
176
176
  this.token = opts.token;
177
177
  if (opts.teamId !== void 0) this.teamId = opts.teamId;
178
178
  this.fetchImpl = opts.fetch ?? globalThis.fetch;
179
- this.baseUrl = (opts.baseUrl ?? "https://api.vercel.com").replace(/\/+$/, "");
179
+ let url = opts.baseUrl ?? "https://api.vercel.com";
180
+ while (url.endsWith("/")) url = url.slice(0, -1);
181
+ this.baseUrl = url;
180
182
  }
181
183
  async request(path, opts = {}) {
182
184
  const url = new URL(`${this.baseUrl}${path.startsWith("/") ? path : "/" + path}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-vercel",
3
- "version": "2.0.0-alpha.0",
3
+ "version": "2.0.0-alpha.1",
4
4
  "description": "Holocron plugin for Vercel. Implements the deployment capability against the Vercel REST API.",
5
5
  "homepage": "https://github.com/theholocron/holocron/tree/main/packages/holocron-plugin-vercel#readme",
6
6
  "bugs": "https://github.com/theholocron/holocron/issues",
@@ -21,7 +21,7 @@
21
21
  }
22
22
  },
23
23
  "peerDependencies": {
24
- "@theholocron/cli": "2.0.0-alpha.0"
24
+ "@theholocron/cli": "2.0.0-alpha.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@theholocron/tsconfig": "^4.1.0",
@@ -32,7 +32,7 @@
32
32
  "typescript": "^5.9.3",
33
33
  "vitest": "^3.2.6",
34
34
  "tsdown": "^0.22.3",
35
- "@theholocron/cli": "2.0.0-alpha.0"
35
+ "@theholocron/cli": "2.0.0-alpha.1"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"