@coraltravelcenter/b2c-landing-builder 2.4.0 → 2.4.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coraltravelcenter/b2c-landing-builder",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "CLI and build toolkit for B2C landing projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -23,7 +23,7 @@
23
23
  "dev": "node scripts/run-fixture.mjs dev",
24
24
  "check": "node scripts/run-fixture.mjs check",
25
25
  "build": "node scripts/run-fixture.mjs build",
26
- "test": "node --test test/*.test.mjs",
26
+ "test": "node scripts/run-tests.mjs",
27
27
  "test:dev": "node scripts/smoke-dev.mjs",
28
28
  "pack:check": "npm pack --dry-run"
29
29
  },
@@ -1,5 +1,5 @@
1
+ import fs from "node:fs";
1
2
  import {fileURLToPath} from "node:url";
2
- import path from "node:path";
3
3
 
4
4
  import {createServer} from "vite";
5
5
 
@@ -9,9 +9,13 @@ import {landingBlocksPlugin} from "../lib/landingBlocksPlugin.mjs";
9
9
  import {loadProjectVuePlugin} from "../lib/loadProjectVuePlugin.mjs";
10
10
  import {resolveScriptStack} from "../config/script-stack.mjs";
11
11
 
12
- const clientEntry = fileURLToPath(new URL("./client.js", import.meta.url));
13
- const builderRoot = fileURLToPath(new URL("../../", import.meta.url));
14
- const clientEntryUrl = `/@fs${clientEntry.replaceAll("\\", "/")}`;
12
+ const clientEntry = fs.realpathSync.native(fileURLToPath(new URL("./client.js", import.meta.url)));
13
+ const builderRoot = fs.realpathSync.native(fileURLToPath(new URL("../../", import.meta.url)));
14
+ export function toViteFsUrl(filePath) {
15
+ return `/@fs/${filePath.replaceAll("\\", "/").replace(/^\/+/, "")}`;
16
+ }
17
+
18
+ const clientEntryUrl = toViteFsUrl(clientEntry);
15
19
  let monkeyPlugin;
16
20
 
17
21
  async function loadMonkeyPlugin() {
@@ -51,7 +55,7 @@ export async function createViteConfig(root = process.cwd()) {
51
55
  vue && vue(),
52
56
  landingBlocksPlugin({root, stack: config.stack}),
53
57
  monkey({
54
- entry: path.normalize(clientEntryUrl),
58
+ entry: clientEntryUrl,
55
59
  server: {open: shouldOpen, prefix: false},
56
60
  userscript: {
57
61
  name: config.project.name,