@primate/native 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/desktop.js +5 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primate/native",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Primate native applications",
5
5
  "homepage": "https://primatejs.com/modules/native",
6
6
  "bugs": "https://github.com/primatejs/primate/issues",
@@ -16,10 +16,10 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@rcompat/cli": "^0.5.1",
19
- "@rcompat/fs": "^0.4.1",
19
+ "@rcompat/fs": "^0.5.0",
20
20
  "@rcompat/stdio": "^0.5.0",
21
21
  "@rcompat/webview": "^0.7.0",
22
- "@primate/core": "^0.1.2"
22
+ "@primate/core": "^0.1.5"
23
23
  },
24
24
  "type": "module",
25
25
  "exports": {
package/src/desktop.js CHANGED
@@ -1,4 +1,6 @@
1
1
  import collect from "@rcompat/fs/collect";
2
+ import webpath from "@rcompat/fs/webpath";
3
+
2
4
  const html = /^.*.html$/u;
3
5
 
4
6
  export default async app => {
@@ -8,8 +10,8 @@ export default async app => {
8
10
  const re = /app..*(?:js|css)$/u;
9
11
 
10
12
  const import_statics = (await client.collect()).map((path, i) => `
11
- import static${i} from "./client${path.debase(client)}" with { type: "file" };
12
- statics["${path.debase(client)}"] = await file(static${i});`)
13
+ import static${i} from "${webpath(`./client${path.debase(client)}`)}" with { type: "file" };
14
+ statics["${webpath(path.debase(client))}"] = await file(static${i});`)
13
15
  .join("\n");
14
16
 
15
17
  const $imports = (await Promise.all((await client.collect(re, { recursive: false }))
@@ -74,7 +76,7 @@ export default async app => {
74
76
  });`}
75
77
 
76
78
  ${pages.map((page, i) =>
77
- `import i_page${i} from "./${location.pages}/${page}" with { type: "file" };
79
+ `import i_page${i} from "${webpath(`./${location.pages}/${page}`)}" with { type: "file" };
78
80
  const page${i} = await file(i_page${i}).text();`).join("\n ")}
79
81
 
80
82
  const pages = {