@bookshop/hugo-engine 3.14.0 → 3.15.0-alpha.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.
- package/LICENSE +21 -0
- package/full-hugo-renderer/hugo_renderer.wasm.gz +0 -0
- package/package.json +7 -8
- package/.npmrc +0 -1
- package/.nyc_output/132e7b4a-afdf-418e-b365-774d529faa43.json +0 -1
- package/.nyc_output/2c506fb0-f1f8-47d7-af8c-ccdd651ee51d.json +0 -1
- package/.nyc_output/5e37d726-0046-4e64-9faa-5f344cb00c97.json +0 -1
- package/.nyc_output/95826c24-bb14-4904-85da-cb2e4024b1a9.json +0 -1
- package/.nyc_output/b070f025-72c1-460d-b0a9-3b685ed91a62.json +0 -1
- package/.nyc_output/processinfo/132e7b4a-afdf-418e-b365-774d529faa43.json +0 -1
- package/.nyc_output/processinfo/2c506fb0-f1f8-47d7-af8c-ccdd651ee51d.json +0 -1
- package/.nyc_output/processinfo/5e37d726-0046-4e64-9faa-5f344cb00c97.json +0 -1
- package/.nyc_output/processinfo/95826c24-bb14-4904-85da-cb2e4024b1a9.json +0 -1
- package/.nyc_output/processinfo/b070f025-72c1-460d-b0a9-3b685ed91a62.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/full-hugo-renderer/build.sh +0 -34
- package/full-hugo-renderer/go.mod +0 -109
- package/full-hugo-renderer/go.sum +0 -780
- package/full-hugo-renderer/hugo_renderer.wasm +0 -0
- package/full-hugo-renderer/main.go +0 -219
- package/full-hugo-renderer/wasm_exec.js +0 -568
- package/lib/engine.test.js +0 -82
- package/lib/engine__test__.js +0 -461
- package/lib/hugoIdentifierParser.test.js +0 -110
- package/lib/translateTextTemplate.test.js +0 -229
- package/main.test.js +0 -5
- package/prep__test__.js +0 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 CloudCannon
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bookshop/hugo-engine",
|
|
3
|
-
"
|
|
4
|
-
"version": "3.14.0",
|
|
3
|
+
"version": "3.15.0-alpha.3",
|
|
5
4
|
"description": "Bookshop frontend Hugo renderer",
|
|
6
5
|
"type": "module",
|
|
7
6
|
"sideEffects": false,
|
|
@@ -18,9 +17,6 @@
|
|
|
18
17
|
"full-hugo-renderer/hugo_renderer.wasm.gz",
|
|
19
18
|
"bookshop-hugo-templates/**/*"
|
|
20
19
|
],
|
|
21
|
-
"scripts": {
|
|
22
|
-
"test": "node prep__test__.js && nyc ava -v"
|
|
23
|
-
},
|
|
24
20
|
"author": "@bglw",
|
|
25
21
|
"license": "MIT",
|
|
26
22
|
"publishConfig": {
|
|
@@ -31,12 +27,15 @@
|
|
|
31
27
|
"nyc": "^15.1.0"
|
|
32
28
|
},
|
|
33
29
|
"dependencies": {
|
|
34
|
-
"@bookshop/helpers": "3.14.0",
|
|
35
30
|
"esbuild": "^0.19.3",
|
|
36
31
|
"fflate": "^0.7.3",
|
|
37
|
-
"liquidjs": "10.17.0"
|
|
32
|
+
"liquidjs": "10.17.0",
|
|
33
|
+
"@bookshop/helpers": "3.15.0-alpha.3"
|
|
38
34
|
},
|
|
39
35
|
"engines": {
|
|
40
36
|
"node": ">=14.16"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"test": "node prep__test__.js && nyc ava -v"
|
|
41
40
|
}
|
|
42
|
-
}
|
|
41
|
+
}
|
package/.npmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
engine-strict = true
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"parent":"b070f025-72c1-460d-b0a9-3b685ed91a62","pid":6345,"argv":["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/lib/worker/base.js"],"execArgv":["--enable-source-maps"],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1741141795897,"ppid":6334,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/132e7b4a-afdf-418e-b365-774d529faa43.json","externalId":"","uuid":"132e7b4a-afdf-418e-b365-774d529faa43","files":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"parent":"b070f025-72c1-460d-b0a9-3b685ed91a62","pid":6345,"argv":["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/lib/worker/base.js"],"execArgv":["--enable-source-maps"],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1741141796150,"ppid":6334,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/2c506fb0-f1f8-47d7-af8c-ccdd651ee51d.json","externalId":"","uuid":"2c506fb0-f1f8-47d7-af8c-ccdd651ee51d","files":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"parent":"b070f025-72c1-460d-b0a9-3b685ed91a62","pid":6345,"argv":["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/lib/worker/base.js"],"execArgv":["--enable-source-maps"],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1741141796165,"ppid":6334,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/5e37d726-0046-4e64-9faa-5f344cb00c97.json","externalId":"","uuid":"5e37d726-0046-4e64-9faa-5f344cb00c97","files":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"parent":"b070f025-72c1-460d-b0a9-3b685ed91a62","pid":6345,"argv":["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/lib/worker/base.js"],"execArgv":["--enable-source-maps"],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1741141795895,"ppid":6334,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/95826c24-bb14-4904-85da-cb2e4024b1a9.json","externalId":"","uuid":"95826c24-bb14-4904-85da-cb2e4024b1a9","files":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"parent":null,"pid":6345,"argv":["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/bookshop/bookshop/javascript-modules/node_modules/ava/entrypoints/cli.mjs","-v"],"execArgv":[],"cwd":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine","time":1741141795602,"ppid":6334,"coverageFilename":"/home/runner/work/bookshop/bookshop/javascript-modules/engines/hugo-engine/.nyc_output/b070f025-72c1-460d-b0a9-3b685ed91a62.json","externalId":"","uuid":"b070f025-72c1-460d-b0a9-3b685ed91a62","files":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"processes":{"132e7b4a-afdf-418e-b365-774d529faa43":{"parent":"b070f025-72c1-460d-b0a9-3b685ed91a62","children":[]},"2c506fb0-f1f8-47d7-af8c-ccdd651ee51d":{"parent":"b070f025-72c1-460d-b0a9-3b685ed91a62","children":[]},"5e37d726-0046-4e64-9faa-5f344cb00c97":{"parent":"b070f025-72c1-460d-b0a9-3b685ed91a62","children":[]},"95826c24-bb14-4904-85da-cb2e4024b1a9":{"parent":"b070f025-72c1-460d-b0a9-3b685ed91a62","children":[]},"b070f025-72c1-460d-b0a9-3b685ed91a62":{"parent":null,"children":["132e7b4a-afdf-418e-b365-774d529faa43","2c506fb0-f1f8-47d7-af8c-ccdd651ee51d","5e37d726-0046-4e64-9faa-5f344cb00c97","95826c24-bb14-4904-85da-cb2e4024b1a9"]}},"files":{},"externalIds":{}}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
TMPFILENAME="hugo_renderer_$(date +%s).wasm"
|
|
4
|
-
OUTPUTFILENAME="hugo_renderer.wasm"
|
|
5
|
-
|
|
6
|
-
# Clean
|
|
7
|
-
rm -f $OUTPUTFILENAME
|
|
8
|
-
if [ -f $OUTPUTFILENAME ]; then
|
|
9
|
-
echo "ERROR: previous $OUTPUTFILENAME still in directory"
|
|
10
|
-
exit 1
|
|
11
|
-
fi
|
|
12
|
-
rm -f $OUTPUTFILENAME.gz
|
|
13
|
-
if [ -f $OUTPUTFILENAME.gz ]; then
|
|
14
|
-
echo "ERROR: previous $OUTPUTFILENAME.gz still in directory"
|
|
15
|
-
exit 1
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
# Build temp module (For Windows use `$Env:GOOS = "js"; $Env:GOARCH = "wasm"` )
|
|
19
|
-
GOOS=js GOARCH=wasm go build -tags nodeploy -o $TMPFILENAME
|
|
20
|
-
printf "Built Hugo WASM via $TMPFILENAME : "
|
|
21
|
-
ls -lh $TMPFILENAME | awk '{print $5}'
|
|
22
|
-
|
|
23
|
-
# Link module
|
|
24
|
-
mv $TMPFILENAME $OUTPUTFILENAME
|
|
25
|
-
if [ ! -f $OUTPUTFILENAME ]; then
|
|
26
|
-
echo "ERROR: hugo_renderer.wasm not complete"
|
|
27
|
-
exit 1
|
|
28
|
-
fi
|
|
29
|
-
printf "Hugo WASM available at $OUTPUTFILENAME : "
|
|
30
|
-
ls -lh $OUTPUTFILENAME | awk '{print $5}'
|
|
31
|
-
|
|
32
|
-
gzip --keep $OUTPUTFILENAME
|
|
33
|
-
printf "Compressed Hugo WASM available at $OUTPUTFILENAME.gz : "
|
|
34
|
-
ls -lh $OUTPUTFILENAME.gz | awk '{print $5}'
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
module hugo-renderer
|
|
2
|
-
|
|
3
|
-
go 1.22.6
|
|
4
|
-
|
|
5
|
-
toolchain go1.23.2
|
|
6
|
-
|
|
7
|
-
require (
|
|
8
|
-
github.com/gohugoio/hugo v0.136.1
|
|
9
|
-
github.com/spf13/afero v1.11.0
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
require github.com/fsnotify/fsnotify v1.7.0
|
|
13
|
-
|
|
14
|
-
require (
|
|
15
|
-
github.com/BurntSushi/locker v0.0.0-20171006230638-a6e239ea1c69 // indirect
|
|
16
|
-
github.com/BurntSushi/toml v1.2.1 // indirect
|
|
17
|
-
github.com/PuerkitoBio/purell v1.2.0 // indirect
|
|
18
|
-
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
|
19
|
-
github.com/alecthomas/chroma v0.10.0 // indirect
|
|
20
|
-
github.com/alecthomas/chroma/v2 v2.14.0 // indirect
|
|
21
|
-
github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c // indirect
|
|
22
|
-
github.com/bep/clock v0.4.0 // indirect
|
|
23
|
-
github.com/bep/clocks v0.5.0 // indirect
|
|
24
|
-
github.com/bep/debounce v1.2.1 // indirect
|
|
25
|
-
github.com/bep/gitmap v1.6.0 // indirect
|
|
26
|
-
github.com/bep/goat v0.5.0 // indirect
|
|
27
|
-
github.com/bep/godartsass v1.2.0 // indirect
|
|
28
|
-
github.com/bep/godartsass/v2 v2.1.0 // indirect
|
|
29
|
-
github.com/bep/golibsass v1.2.0 // indirect
|
|
30
|
-
github.com/bep/gowebp v0.3.0 // indirect
|
|
31
|
-
github.com/bep/imagemeta v0.8.1 // indirect
|
|
32
|
-
github.com/bep/lazycache v0.4.0 // indirect
|
|
33
|
-
github.com/bep/logg v0.4.0 // indirect
|
|
34
|
-
github.com/bep/overlayfs v0.9.2 // indirect
|
|
35
|
-
github.com/bep/tmc v0.5.1 // indirect
|
|
36
|
-
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
37
|
-
github.com/clbanning/mxj/v2 v2.7.0 // indirect
|
|
38
|
-
github.com/cli/safeexec v1.0.1 // indirect
|
|
39
|
-
github.com/disintegration/gift v1.2.1 // indirect
|
|
40
|
-
github.com/dlclark/regexp2 v1.11.0 // indirect
|
|
41
|
-
github.com/evanw/esbuild v0.24.0 // indirect
|
|
42
|
-
github.com/fatih/color v1.17.0 // indirect
|
|
43
|
-
github.com/frankban/quicktest v1.14.6 // indirect
|
|
44
|
-
github.com/getkin/kin-openapi v0.123.0 // indirect
|
|
45
|
-
github.com/ghodss/yaml v1.0.0 // indirect
|
|
46
|
-
github.com/go-openapi/jsonpointer v0.20.2 // indirect
|
|
47
|
-
github.com/go-openapi/swag v0.22.8 // indirect
|
|
48
|
-
github.com/gobuffalo/flect v1.0.3 // indirect
|
|
49
|
-
github.com/gobwas/glob v0.2.3 // indirect
|
|
50
|
-
github.com/gohugoio/go-i18n/v2 v2.1.3-0.20230805085216-e63c13218d0e // indirect
|
|
51
|
-
github.com/gohugoio/hashstructure v0.1.0 // indirect
|
|
52
|
-
github.com/gohugoio/httpcache v0.7.0 // indirect
|
|
53
|
-
github.com/gohugoio/hugo-goldmark-extensions/extras v0.2.0 // indirect
|
|
54
|
-
github.com/gohugoio/hugo-goldmark-extensions/passthrough v0.3.0 // indirect
|
|
55
|
-
github.com/gohugoio/locales v0.14.0 // indirect
|
|
56
|
-
github.com/gohugoio/localescompressed v1.0.1 // indirect
|
|
57
|
-
github.com/google/go-cmp v0.6.0 // indirect
|
|
58
|
-
github.com/hairyhenderson/go-codeowners v0.6.0 // indirect
|
|
59
|
-
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
|
|
60
|
-
github.com/invopop/yaml v0.2.0 // indirect
|
|
61
|
-
github.com/jdkato/prose v1.2.1 // indirect
|
|
62
|
-
github.com/josharian/intern v1.0.0 // indirect
|
|
63
|
-
github.com/kr/pretty v0.3.1 // indirect
|
|
64
|
-
github.com/kr/text v0.2.0 // indirect
|
|
65
|
-
github.com/kyokomi/emoji/v2 v2.2.13 // indirect
|
|
66
|
-
github.com/mailru/easyjson v0.7.7 // indirect
|
|
67
|
-
github.com/makeworld-the-better-one/dither/v2 v2.4.0 // indirect
|
|
68
|
-
github.com/marekm4/color-extractor v1.2.1 // indirect
|
|
69
|
-
github.com/mattn/go-colorable v0.1.13 // indirect
|
|
70
|
-
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
71
|
-
github.com/mattn/go-runewidth v0.0.14 // indirect
|
|
72
|
-
github.com/miekg/mmark v1.3.6 // indirect
|
|
73
|
-
github.com/mitchellh/hashstructure v1.1.0 // indirect
|
|
74
|
-
github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect
|
|
75
|
-
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
|
|
76
|
-
github.com/muesli/smartcrop v0.3.0 // indirect
|
|
77
|
-
github.com/niklasfasching/go-org v1.7.0 // indirect
|
|
78
|
-
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
|
79
|
-
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
|
|
80
|
-
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
|
|
81
|
-
github.com/perimeterx/marshmallow v1.1.5 // indirect
|
|
82
|
-
github.com/pkg/errors v0.9.1 // indirect
|
|
83
|
-
github.com/rivo/uniseg v0.4.3 // indirect
|
|
84
|
-
github.com/rogpeppe/go-internal v1.13.1 // indirect
|
|
85
|
-
github.com/russross/blackfriday v1.6.0 // indirect
|
|
86
|
-
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd // indirect
|
|
87
|
-
github.com/sanity-io/litter v1.5.5 // indirect
|
|
88
|
-
github.com/spf13/cast v1.7.0 // indirect
|
|
89
|
-
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
|
90
|
-
github.com/spf13/pflag v1.0.5 // indirect
|
|
91
|
-
github.com/tdewolff/minify/v2 v2.20.37 // indirect
|
|
92
|
-
github.com/tdewolff/parse/v2 v2.7.15 // indirect
|
|
93
|
-
github.com/tetratelabs/wazero v1.8.1 // indirect
|
|
94
|
-
github.com/yuin/goldmark v1.7.4 // indirect
|
|
95
|
-
github.com/yuin/goldmark-emoji v1.0.4 // indirect
|
|
96
|
-
github.com/yuin/goldmark-highlighting v0.0.0-20220208100518-594be1970594 // indirect
|
|
97
|
-
go.uber.org/atomic v1.10.0 // indirect
|
|
98
|
-
golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 // indirect
|
|
99
|
-
golang.org/x/image v0.21.0 // indirect
|
|
100
|
-
golang.org/x/mod v0.21.0 // indirect
|
|
101
|
-
golang.org/x/net v0.30.0 // indirect
|
|
102
|
-
golang.org/x/sync v0.8.0 // indirect
|
|
103
|
-
golang.org/x/sys v0.26.0 // indirect
|
|
104
|
-
golang.org/x/text v0.19.0 // indirect
|
|
105
|
-
golang.org/x/tools v0.26.0 // indirect
|
|
106
|
-
google.golang.org/protobuf v1.34.2 // indirect
|
|
107
|
-
gopkg.in/yaml.v2 v2.4.0 // indirect
|
|
108
|
-
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
109
|
-
)
|