@vesk/adapter 0.2.20 → 0.2.21

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.
@@ -11,8 +11,9 @@ export interface DeployContext extends PlatformBuildContext {
11
11
  * (Coxmos, Deno Deploy) share the exact same shell.
12
12
  *
13
13
  * Every artifact is written under `.vesk/<platform>/`; Vercel additionally gets
14
- * a gitignored `.vercel/output` symlink because the Build Output API is keyed on
15
- * that literal directory.
14
+ * a gitignored `.vercel/output` mirror because the Build Output API is keyed on
15
+ * that literal directory (and its runner rmdirs it — so it is a real directory,
16
+ * not a symlink).
16
17
  */
17
18
  export declare function emitPlatformOutput(platform: Platform, ctx: DeployContext): Promise<string | null>;
18
19
  //# sourceMappingURL=platform-deploy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform-deploy.d.ts","sourceRoot":"","sources":["../src/platform-deploy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwD,KAAK,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAErI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,WAAW,aAAc,SAAQ,oBAAoB;IACzD,iBAAiB,EAAE,cAAc,EAAE,CAAC;CACrC;AA0BD;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA2EvG"}
1
+ {"version":3,"file":"platform-deploy.d.ts","sourceRoot":"","sources":["../src/platform-deploy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwD,KAAK,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAErI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,WAAW,aAAc,SAAQ,oBAAoB;IACzD,iBAAiB,EAAE,cAAc,EAAE,CAAC;CACrC;AA0BD;;;;;;;;;;GAUG;AACH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA8EvG"}
@@ -1,5 +1,5 @@
1
- import { writeFileSync, mkdirSync, rmSync, symlinkSync } from 'node:fs';
2
- import { resolve, dirname, relative } from 'node:path';
1
+ import { writeFileSync, mkdirSync, rmSync, cpSync } from 'node:fs';
2
+ import { resolve } from 'node:path';
3
3
  import { generatePlatformHandlerSource, bundlePlatformHandler } from '@vesk/adapter/src/platform-handler';
4
4
  import { ensureCleanDir, writePlatformStatic, writePrerenderedStatic, listStaticDir, mimeFor } from '@vesk/adapter/src/platform-output';
5
5
  /**
@@ -9,8 +9,9 @@ import { ensureCleanDir, writePlatformStatic, writePrerenderedStatic, listStatic
9
9
  * (Coxmos, Deno Deploy) share the exact same shell.
10
10
  *
11
11
  * Every artifact is written under `.vesk/<platform>/`; Vercel additionally gets
12
- * a gitignored `.vercel/output` symlink because the Build Output API is keyed on
13
- * that literal directory.
12
+ * a gitignored `.vercel/output` mirror because the Build Output API is keyed on
13
+ * that literal directory (and its runner rmdirs it — so it is a real directory,
14
+ * not a symlink).
14
15
  */
15
16
  export async function emitPlatformOutput(platform, ctx) {
16
17
  if (platform === 'node')
@@ -76,10 +77,13 @@ export async function emitPlatformOutput(platform, ctx) {
76
77
  }, null, 2), 'utf-8');
77
78
  if (platform === 'vercel') {
78
79
  const vercelDir = resolve(projectRoot, '.vercel');
79
- mkdirSync(vercelDir, { recursive: true });
80
- const linkPath = resolve(vercelDir, 'output');
81
- rmSync(linkPath, { recursive: true, force: true });
82
- symlinkSync(relative(dirname(linkPath), outRoot), linkPath, 'dir');
80
+ const outputPath = resolve(vercelDir, 'output');
81
+ // The Vercel build runner keys the Build Output API on the literal
82
+ // `.vercel/output` directory and rmdir()s it after ingesting. A symlink
83
+ // breaks that (rmdir on a symlink → ENOTDIR), so mirror the artifact root
84
+ // into a real directory. `.vesk/vercel` stays the canonical artifact tree.
85
+ rmSync(outputPath, { recursive: true, force: true });
86
+ cpSync(outRoot, outputPath, { recursive: true });
83
87
  }
84
88
  rmSync(entry, { force: true });
85
89
  return outRoot;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vesk/adapter",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "type": "module",
5
5
  "description": "Vesk adapter — builds deployable .vesk/ output for Deno and Node serverless",
6
6
  "main": "./dist/index.js",
@@ -23,9 +23,9 @@
23
23
  "sharp": "^0.35.3"
24
24
  },
25
25
  "dependencies": {
26
- "@vesk/compiler": "^0.2.20",
27
- "@vesk/runtime": "^0.2.20",
28
- "@vesk/types": "^0.2.20"
26
+ "@vesk/compiler": "^0.2.21",
27
+ "@vesk/runtime": "^0.2.21",
28
+ "@vesk/types": "^0.2.21"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/ws": "^8.18.1",