@bookshop/hugo-engine 3.8.0 → 3.8.1
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/.nyc_output/processinfo/290d41a5-d1b8-4756-b4d6-c59a0caf93bd.json +1 -0
- package/.nyc_output/processinfo/6c969e10-a8fd-4f52-a14f-9f6835f261f4.json +1 -0
- package/.nyc_output/processinfo/7dda525f-6b92-4c58-8bae-a852bd1f6075.json +1 -0
- package/.nyc_output/processinfo/a85a395c-56a3-46a2-b1bb-015aca6c3a60.json +1 -0
- package/.nyc_output/processinfo/db2df211-95ee-400f-a27a-0cb714927a4c.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/full-hugo-renderer/hugo_renderer.wasm +0 -0
- package/full-hugo-renderer/hugo_renderer.wasm.gz +0 -0
- package/lib/engine.js +8 -3
- package/lib/engine__test__.js +8 -3
- package/package.json +2 -2
- package/.nyc_output/processinfo/215b16ae-ddd2-4dc0-9c2c-2c6bb8341985.json +0 -1
- package/.nyc_output/processinfo/2e514177-1a1b-4d9a-91cb-6601dcb5bda9.json +0 -1
- package/.nyc_output/processinfo/34147300-5a6e-47e7-a3b1-e36f26e209fb.json +0 -1
- package/.nyc_output/processinfo/e24d6687-3cfb-4df8-9720-525e69486736.json +0 -1
- package/.nyc_output/processinfo/e9995778-da78-445d-b37f-f9884def2467.json +0 -1
- /package/.nyc_output/{215b16ae-ddd2-4dc0-9c2c-2c6bb8341985.json → 290d41a5-d1b8-4756-b4d6-c59a0caf93bd.json} +0 -0
- /package/.nyc_output/{2e514177-1a1b-4d9a-91cb-6601dcb5bda9.json → 6c969e10-a8fd-4f52-a14f-9f6835f261f4.json} +0 -0
- /package/.nyc_output/{34147300-5a6e-47e7-a3b1-e36f26e209fb.json → 7dda525f-6b92-4c58-8bae-a852bd1f6075.json} +0 -0
- /package/.nyc_output/{e24d6687-3cfb-4df8-9720-525e69486736.json → a85a395c-56a3-46a2-b1bb-015aca6c3a60.json} +0 -0
- /package/.nyc_output/{e9995778-da78-445d-b37f-f9884def2467.json → db2df211-95ee-400f-a27a-0cb714927a4c.json} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"parent":"a85a395c-56a3-46a2-b1bb-015aca6c3a60","pid":6378,"argv":["/opt/hostedtoolcache/node/18.18.0/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/lib/worker/subprocess.js"],"execArgv":[],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1696480170882,"ppid":6342,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/290d41a5-d1b8-4756-b4d6-c59a0caf93bd.json","externalId":"","uuid":"290d41a5-d1b8-4756-b4d6-c59a0caf93bd","files":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"parent":"a85a395c-56a3-46a2-b1bb-015aca6c3a60","pid":6358,"argv":["/opt/hostedtoolcache/node/18.18.0/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/lib/worker/subprocess.js"],"execArgv":[],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1696480170513,"ppid":6342,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/6c969e10-a8fd-4f52-a14f-9f6835f261f4.json","externalId":"","uuid":"6c969e10-a8fd-4f52-a14f-9f6835f261f4","files":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"parent":"a85a395c-56a3-46a2-b1bb-015aca6c3a60","pid":6390,"argv":["/opt/hostedtoolcache/node/18.18.0/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/lib/worker/subprocess.js"],"execArgv":[],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1696480170963,"ppid":6342,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/7dda525f-6b92-4c58-8bae-a852bd1f6075.json","externalId":"","uuid":"7dda525f-6b92-4c58-8bae-a852bd1f6075","files":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"parent":null,"pid":6342,"argv":["/opt/hostedtoolcache/node/18.18.0/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/cli.js","-v"],"execArgv":[],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1696480170053,"ppid":6331,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/a85a395c-56a3-46a2-b1bb-015aca6c3a60.json","externalId":"","uuid":"a85a395c-56a3-46a2-b1bb-015aca6c3a60","files":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"parent":"a85a395c-56a3-46a2-b1bb-015aca6c3a60","pid":6357,"argv":["/opt/hostedtoolcache/node/18.18.0/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/lib/worker/subprocess.js"],"execArgv":[],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1696480170507,"ppid":6342,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/db2df211-95ee-400f-a27a-0cb714927a4c.json","externalId":"","uuid":"db2df211-95ee-400f-a27a-0cb714927a4c","files":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"processes":{"
|
|
1
|
+
{"processes":{"290d41a5-d1b8-4756-b4d6-c59a0caf93bd":{"parent":"a85a395c-56a3-46a2-b1bb-015aca6c3a60","children":[]},"6c969e10-a8fd-4f52-a14f-9f6835f261f4":{"parent":"a85a395c-56a3-46a2-b1bb-015aca6c3a60","children":[]},"7dda525f-6b92-4c58-8bae-a852bd1f6075":{"parent":"a85a395c-56a3-46a2-b1bb-015aca6c3a60","children":[]},"a85a395c-56a3-46a2-b1bb-015aca6c3a60":{"parent":null,"children":["290d41a5-d1b8-4756-b4d6-c59a0caf93bd","6c969e10-a8fd-4f52-a14f-9f6835f261f4","7dda525f-6b92-4c58-8bae-a852bd1f6075","db2df211-95ee-400f-a27a-0cb714927a4c"]},"db2df211-95ee-400f-a27a-0cb714927a4c":{"parent":"a85a395c-56a3-46a2-b1bb-015aca6c3a60","children":[]}},"files":{},"externalIds":{}}
|
|
Binary file
|
|
Binary file
|
package/lib/engine.js
CHANGED
|
@@ -72,7 +72,7 @@ export class Engine {
|
|
|
72
72
|
if (compressedHugoWasm?.constructor === Uint8Array) {
|
|
73
73
|
await this.initializeInlineHugo();
|
|
74
74
|
} else {
|
|
75
|
-
await this.initializeLocalCompressedHugo();
|
|
75
|
+
await this.initializeLocalCompressedHugo(true);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
// TODO: Tidy
|
|
@@ -100,7 +100,7 @@ export class Engine {
|
|
|
100
100
|
}));
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
async initializeLocalCompressedHugo() {
|
|
103
|
+
async initializeLocalCompressedHugo(usePrefetch) {
|
|
104
104
|
try {
|
|
105
105
|
|
|
106
106
|
let prefetched = {};
|
|
@@ -114,7 +114,7 @@ export class Engine {
|
|
|
114
114
|
const compressedWasmPath = (new URL(compressedWasmOrigin)).pathname;
|
|
115
115
|
|
|
116
116
|
let compressedBuffer;
|
|
117
|
-
if (prefetched[compressedWasmPath]) {
|
|
117
|
+
if (usePrefetch && prefetched[compressedWasmPath]) {
|
|
118
118
|
compressedBuffer = await prefetched[compressedWasmPath]?.arrayBuffer();
|
|
119
119
|
this.loadedFrom = "prefetch";
|
|
120
120
|
} else {
|
|
@@ -134,6 +134,11 @@ export class Engine {
|
|
|
134
134
|
} catch (e) {
|
|
135
135
|
console.error("Couldn't load the local compressed Hugo WASM");
|
|
136
136
|
console.error(e);
|
|
137
|
+
|
|
138
|
+
// If our prefetch fails, fall back to loading the wasm ourselves
|
|
139
|
+
if (usePrefetch) {
|
|
140
|
+
await this.initializeLocalCompressedHugo(false);
|
|
141
|
+
}
|
|
137
142
|
}
|
|
138
143
|
}
|
|
139
144
|
|
package/lib/engine__test__.js
CHANGED
|
@@ -72,7 +72,7 @@ export class Engine {
|
|
|
72
72
|
if (compressedHugoWasm?.constructor === Uint8Array) {
|
|
73
73
|
await this.initializeInlineHugo();
|
|
74
74
|
} else {
|
|
75
|
-
await this.initializeLocalCompressedHugo();
|
|
75
|
+
await this.initializeLocalCompressedHugo(true);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
// TODO: Tidy
|
|
@@ -100,7 +100,7 @@ export class Engine {
|
|
|
100
100
|
}));
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
async initializeLocalCompressedHugo() {
|
|
103
|
+
async initializeLocalCompressedHugo(usePrefetch) {
|
|
104
104
|
try {
|
|
105
105
|
|
|
106
106
|
let prefetched = {};
|
|
@@ -114,7 +114,7 @@ export class Engine {
|
|
|
114
114
|
const compressedWasmPath = (new URL(compressedWasmOrigin)).pathname;
|
|
115
115
|
|
|
116
116
|
let compressedBuffer;
|
|
117
|
-
if (prefetched[compressedWasmPath]) {
|
|
117
|
+
if (usePrefetch && prefetched[compressedWasmPath]) {
|
|
118
118
|
compressedBuffer = await prefetched[compressedWasmPath]?.arrayBuffer();
|
|
119
119
|
this.loadedFrom = "prefetch";
|
|
120
120
|
} else {
|
|
@@ -134,6 +134,11 @@ export class Engine {
|
|
|
134
134
|
} catch (e) {
|
|
135
135
|
console.error("Couldn't load the local compressed Hugo WASM");
|
|
136
136
|
console.error(e);
|
|
137
|
+
|
|
138
|
+
// If our prefetch fails, fall back to loading the wasm ourselves
|
|
139
|
+
if (usePrefetch) {
|
|
140
|
+
await this.initializeLocalCompressedHugo(false);
|
|
141
|
+
}
|
|
137
142
|
}
|
|
138
143
|
}
|
|
139
144
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bookshop/hugo-engine",
|
|
3
3
|
"packageManager": "yarn@3.0.0",
|
|
4
|
-
"version": "3.8.
|
|
4
|
+
"version": "3.8.1",
|
|
5
5
|
"description": "Bookshop frontend Hugo renderer",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"nyc": "^15.1.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@bookshop/helpers": "3.8.
|
|
34
|
+
"@bookshop/helpers": "3.8.1",
|
|
35
35
|
"esbuild": "^0.19.3",
|
|
36
36
|
"fflate": "^0.7.3",
|
|
37
37
|
"liquidjs": "9.28.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"parent":"34147300-5a6e-47e7-a3b1-e36f26e209fb","pid":5914,"argv":["/opt/hostedtoolcache/node/18.17.1/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/lib/worker/subprocess.js"],"execArgv":[],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1695777994131,"ppid":5881,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/215b16ae-ddd2-4dc0-9c2c-2c6bb8341985.json","externalId":"","uuid":"215b16ae-ddd2-4dc0-9c2c-2c6bb8341985","files":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"parent":"34147300-5a6e-47e7-a3b1-e36f26e209fb","pid":5920,"argv":["/opt/hostedtoolcache/node/18.17.1/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/lib/worker/subprocess.js"],"execArgv":[],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1695777994146,"ppid":5881,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/2e514177-1a1b-4d9a-91cb-6601dcb5bda9.json","externalId":"","uuid":"2e514177-1a1b-4d9a-91cb-6601dcb5bda9","files":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"parent":null,"pid":5881,"argv":["/opt/hostedtoolcache/node/18.17.1/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/cli.js","-v"],"execArgv":[],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1695777993172,"ppid":5870,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/34147300-5a6e-47e7-a3b1-e36f26e209fb.json","externalId":"","uuid":"34147300-5a6e-47e7-a3b1-e36f26e209fb","files":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"parent":"34147300-5a6e-47e7-a3b1-e36f26e209fb","pid":5892,"argv":["/opt/hostedtoolcache/node/18.17.1/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/lib/worker/subprocess.js"],"execArgv":[],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1695777993731,"ppid":5881,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/e24d6687-3cfb-4df8-9720-525e69486736.json","externalId":"","uuid":"e24d6687-3cfb-4df8-9720-525e69486736","files":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"parent":"34147300-5a6e-47e7-a3b1-e36f26e209fb","pid":5893,"argv":["/opt/hostedtoolcache/node/18.17.1/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/lib/worker/subprocess.js"],"execArgv":[],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1695777993731,"ppid":5881,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/e9995778-da78-445d-b37f-f9884def2467.json","externalId":"","uuid":"e9995778-da78-445d-b37f-f9884def2467","files":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|