@theholocron/holocron-plugin-vercel 5.0.0-alpha.21 → 5.0.0-alpha.22

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
@@ -55,6 +55,14 @@ Capability covers:
55
55
  - `updateProjectSettings()` — toggle preview deploys, git-creates-deploys
56
56
  - `setEnvVar()` / `listEnvVars()` — per-target env vars
57
57
  - `triggerDeployment()` — branch deploys with optional named target
58
+ (requires a project already linked to a Git repo)
59
+ - `deployFunction()` — deploy directly from source files, bypassing Git
60
+ entirely: `POST /v13/deployments` with an inline `files` array, no
61
+ linked repo required. For a consumer with no repo to deploy from — a
62
+ webhook receiver shipped as an npm package, for instance. Always
63
+ deploys with `projectSettings.framework: null` (a bare function, not
64
+ an app) — `defaultFramework` only applies to `ensureProject()`'s
65
+ Git-linked path.
58
66
  - `getDeployment()` — fetch a deployment by id
59
67
 
60
68
  Out of scope for alpha.0 (file a follow-up if needed):
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { AuthError, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, ResolveTokenInput } from "@theholocron/cli";
1
+ import { AuthError, DeployFunctionConfig, DeployFunctionResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, ResolveTokenInput } 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;
@@ -30,6 +30,7 @@ declare class VercelDeployment implements Deployment {
30
30
  target?: DeploymentTrigger;
31
31
  }): Promise<DeploymentRecord>;
32
32
  getDeployment(deploymentId: string): Promise<DeploymentRecord>;
33
+ deployFunction(projectId: string, config: DeployFunctionConfig): Promise<DeployFunctionResult>;
33
34
  private getProjectByName;
34
35
  }
35
36
  //#endregion
package/dist/index.mjs CHANGED
@@ -60,6 +60,21 @@ var VercelDeployment = class {
60
60
  const raw = await this.client().deployments.get(deploymentId);
61
61
  return mapDeployment(raw, raw.meta?.githubCommitRef ?? null);
62
62
  }
63
+ async deployFunction(projectId, config) {
64
+ const raw = await this.client().deployments.create({
65
+ projectName: projectId,
66
+ files: Object.entries(config.files).map(([file, content]) => ({
67
+ file,
68
+ content
69
+ })),
70
+ framework: null,
71
+ target: config.target
72
+ });
73
+ return {
74
+ deploymentId: raw.id,
75
+ url: raw.url
76
+ };
77
+ }
63
78
  async getProjectByName(name) {
64
79
  try {
65
80
  return mapProject(await this.client().projects.get(name));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-vercel",
3
- "version": "5.0.0-alpha.21",
3
+ "version": "5.0.0-alpha.22",
4
4
  "description": "Holocron plugin for Vercel. Implements the deployment capability against the Vercel REST API.",
5
5
  "keywords": [
6
6
  "deployment",
@@ -31,10 +31,10 @@
31
31
  ],
32
32
  "devDependencies": {
33
33
  "@theholocron/eslint-config": "^8.0.0",
34
- "@theholocron/http-client": "^1.21.0",
34
+ "@theholocron/http-client": "^1.22.0",
35
35
  "@theholocron/tsconfig": "^8.0.0",
36
36
  "@theholocron/tsdown-config": "^8.0.0",
37
- "@theholocron/vercel-client": "^1.21.0",
37
+ "@theholocron/vercel-client": "^1.22.0",
38
38
  "@theholocron/vitest-config": "^8.0.0",
39
39
  "@types/node": "^26",
40
40
  "@vitest/coverage-v8": "^4.1.11",
@@ -46,11 +46,11 @@
46
46
  "tsx": "4.23.12",
47
47
  "typescript": "^5.9.3",
48
48
  "vitest": "^4.1.11",
49
- "@theholocron/cli": "5.0.0-alpha.21"
49
+ "@theholocron/cli": "5.0.0-alpha.22"
50
50
  },
51
51
  "peerDependencies": {
52
- "@theholocron/vercel-client": "^1.21.0",
53
- "@theholocron/cli": "5.0.0-alpha.21"
52
+ "@theholocron/vercel-client": "^1.22.0",
53
+ "@theholocron/cli": "5.0.0-alpha.22"
54
54
  },
55
55
  "peerDependenciesMeta": {
56
56
  "@theholocron/vercel-client": {}