@sjcx/vorma 0.0.0-pre.1 → 0.0.0-pre.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/dist/build/cli.js CHANGED
@@ -18,7 +18,9 @@ var version = "0.87.0-pre.0";
18
18
  //#endregion
19
19
  //#region src/build/development-artifacts.ts
20
20
  function toDevelopmentModuleUrl(input) {
21
- const pathname = input.id.startsWith("\0") ? `/@id/__x00__${input.id.slice(1)}` : `/@fs/${normalizePath(input.id).replace(/^\//, "")}`;
21
+ const id = normalizePath(input.id);
22
+ const root = `${normalizePath(input.root).replace(/\/$/, "")}/`;
23
+ const pathname = id.startsWith("\0") ? `/@id/__x00__${id.slice(1)}` : id.startsWith(root) ? `/${id.slice(root.length)}` : `/@fs/${id.replace(/^\//, "")}`;
22
24
  return input.origin + pathname.split("/").map(encodeURIComponent).join("/").replaceAll("%40", "@").replaceAll("%3A", ":");
23
25
  }
24
26
  /** Keeps source URLs and browser contracts on the server; responses project only requested views. */
@@ -28,6 +30,7 @@ function assembleDevelopmentArtifacts(input) {
28
30
  return {
29
31
  importUrl: toDevelopmentModuleUrl({
30
32
  origin: input.client.origin,
33
+ root: input.client.server.config.root,
31
34
  id
32
35
  }),
33
36
  depUrls: [],
@@ -2,6 +2,7 @@ import type { ClientModule } from "../universal/protocol.ts";
2
2
  import type { DevelopmentBuild, DevelopmentClient } from "./development-build.ts";
3
3
  export declare function toDevelopmentModuleUrl(input: {
4
4
  readonly origin: string;
5
+ readonly root: string;
5
6
  readonly id: string;
6
7
  }): string;
7
8
  /** Keeps source URLs and browser contracts on the server; responses project only requested views. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcx/vorma",
3
- "version": "0.0.0-pre.1",
3
+ "version": "0.0.0-pre.2",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",
@@ -42,7 +42,7 @@
42
42
  "@effect/platform-node-shared": "^4.0.0-rc.115",
43
43
  "@noble/hashes": "^2.4.0",
44
44
  "@scure/base": "^2.4.0",
45
- "@vorma/primitives": "npm:@sjcx/vorma-primitives@0.0.0-pre.1",
45
+ "@vorma/primitives": "npm:@sjcx/vorma-primitives@0.0.0-pre.2",
46
46
  "chokidar": "^5.0.0",
47
47
  "lightningcss": "^1.33.0",
48
48
  "rolldown": "^1.2.6",