@theholocron/holocron-plugin-vercel 5.0.0-alpha.483 → 5.0.0-alpha.484

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
@@ -54,6 +54,10 @@ export declare class VercelDeployment implements Deployment {
54
54
  * only this project's deployments are ever candidates. A production or staging deployment is never one.
55
55
  */
56
56
  listPreviewDeployments(projectId: string, branch: string): Promise<DeploymentRecord[]>;
57
+ /** The newest production deployment of the project in its latest page of deployments, or null. Reads only. */
58
+ latestDeployment(projectId: string): Promise<DeploymentRecord | null>;
59
+ /** The hostnames attached to the project. Reads only. */
60
+ listDomains(projectId: string): Promise<string[]>;
57
61
  /** Deletes the deployments by id; one already gone (404) is not counted and is not an error. */
58
62
  deletePreviewDeployments(_projectId: string, deploymentIds: string[]): Promise<number>;
59
63
  /**
package/dist/index.mjs CHANGED
@@ -135,6 +135,20 @@ var VercelDeployment = class {
135
135
  }
136
136
  return found;
137
137
  }
138
+ /** The newest production deployment of the project in its latest page of deployments, or null. Reads only. */
139
+ async latestDeployment(projectId) {
140
+ const { deployments } = await this.client().deployments.list({ projectId });
141
+ const newest = deployments.find((d) => d.target === "production");
142
+ if (!newest) return null;
143
+ return {
144
+ ...mapDeployment(newest, newest.meta?.githubCommitRef ?? null),
145
+ ...newest.createdAt ? { createdAt: new Date(newest.createdAt).toISOString() } : {}
146
+ };
147
+ }
148
+ /** The hostnames attached to the project. Reads only. */
149
+ async listDomains(projectId) {
150
+ return (await this.client().domains.list(projectId)).domains.map((d) => d.name);
151
+ }
138
152
  /** Deletes the deployments by id; one already gone (404) is not counted and is not an error. */
139
153
  async deletePreviewDeployments(_projectId, deploymentIds) {
140
154
  let deleted = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-vercel",
3
- "version": "5.0.0-alpha.483",
3
+ "version": "5.0.0-alpha.484",
4
4
  "description": "Holocron plugin for Vercel. Implements the deployment capability against the Vercel REST API.",
5
5
  "keywords": [
6
6
  "deployment",
@@ -40,19 +40,19 @@
40
40
  "tsx": "4.23.15",
41
41
  "typescript": "^5.9.3",
42
42
  "vitest": "^5.1.0",
43
- "@theholocron/cli": "5.0.0-alpha.483",
44
- "@theholocron/tsconfig": "^8.9.0-alpha.21",
45
- "@theholocron/http-client": "^1.58.0-alpha.41",
46
- "@theholocron/tsdown-config": "^8.9.0-alpha.21",
43
+ "@theholocron/cli": "5.0.0-alpha.484",
47
44
  "@theholocron/eslint-config": "^8.9.0-alpha.21",
48
- "@theholocron/vercel-client": "^1.58.0-alpha.41",
45
+ "@theholocron/http-client": "^1.58.0-alpha.42",
46
+ "@theholocron/misc-utils": "^1.17.0-alpha.5",
47
+ "@theholocron/tsdown-config": "^8.9.0-alpha.21",
48
+ "@theholocron/vercel-client": "^1.58.0-alpha.42",
49
49
  "@theholocron/vitest-config": "^8.9.0-alpha.21",
50
- "@theholocron/misc-utils": "^1.17.0-alpha.5"
50
+ "@theholocron/tsconfig": "^8.9.0-alpha.21"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@theholocron/misc-utils": "^1.16.0",
54
54
  "@theholocron/vercel-client": "^1.43.1",
55
- "@theholocron/cli": "5.0.0-alpha.483"
55
+ "@theholocron/cli": "5.0.0-alpha.484"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "@theholocron/vercel-client": {}