respec 35.0.1 → 35.1.0
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/README.md +8 -8
- package/builds/respec-aom.js +5 -5
- package/builds/respec-aom.js.map +1 -1
- package/builds/respec-dini.js +5 -5
- package/builds/respec-dini.js.map +1 -1
- package/builds/respec-geonovum.js +4 -4
- package/builds/respec-geonovum.js.map +1 -1
- package/builds/respec-w3c.js +6 -6
- package/builds/respec-w3c.js.map +1 -1
- package/package.json +9 -9
- package/tools/respec2html.js +12 -2
- package/tools/respecDocWriter.js +6 -4
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "respec",
|
|
3
|
-
"version": "35.0
|
|
3
|
+
"version": "35.1.0",
|
|
4
4
|
"license": "W3C",
|
|
5
5
|
"description": "A technical specification pre-processor.",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=20.12.1"
|
|
8
8
|
},
|
|
9
|
-
"packageManager": "pnpm@
|
|
9
|
+
"packageManager": "pnpm@9.0.6",
|
|
10
10
|
"bin": {
|
|
11
11
|
"respec": "tools/respec2html.js",
|
|
12
12
|
"respec2html": "tools/respec2html.js"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"type": "module",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
|
-
"url": "git://github.com/
|
|
18
|
+
"url": "git://github.com/speced/respec.git"
|
|
19
19
|
},
|
|
20
20
|
"contributors": [
|
|
21
21
|
"Marcos Cáceres <marcos@marcosc.com> (https://marcosc.com/)",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@rollup/plugin-alias": "^5.1.0",
|
|
28
|
-
"@rollup/plugin-commonjs": "^25.0.
|
|
28
|
+
"@rollup/plugin-commonjs": "^25.0.8",
|
|
29
29
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
30
30
|
"@rollup/plugin-terser": "^0.4.4",
|
|
31
31
|
"@types/pluralize": "0.0.33",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"karma-safari-launcher": "^1.0.0",
|
|
53
53
|
"loading-indicator": "^2.0.0",
|
|
54
54
|
"pluralize": "^8.0.0",
|
|
55
|
-
"prettier": "^3.
|
|
55
|
+
"prettier": "^3.3.0",
|
|
56
56
|
"prompt": "^1.3.0",
|
|
57
|
-
"rollup": "^4.
|
|
57
|
+
"rollup": "^4.18.0",
|
|
58
58
|
"rollup-plugin-minify-html-literals": "^1.2.6",
|
|
59
|
-
"serve": "^14.2.
|
|
59
|
+
"serve": "^14.2.3",
|
|
60
60
|
"serve-handler": "^6.1.5",
|
|
61
61
|
"sniffy-mimetype": "^1.1.1",
|
|
62
62
|
"typescript": "^5.4.5",
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"colors": "1.4.0",
|
|
90
90
|
"finalhandler": "^1.2.0",
|
|
91
|
-
"marked": "^12.0.
|
|
92
|
-
"puppeteer": "^22.
|
|
91
|
+
"marked": "^12.0.2",
|
|
92
|
+
"puppeteer": "^22.10.0",
|
|
93
93
|
"sade": "^1.8.1",
|
|
94
94
|
"serve-static": "^1.15.0"
|
|
95
95
|
},
|
package/tools/respec2html.js
CHANGED
|
@@ -184,7 +184,12 @@ cli
|
|
|
184
184
|
"Abort if ReSpec generates warnings (or errors).",
|
|
185
185
|
false
|
|
186
186
|
)
|
|
187
|
-
.option(
|
|
187
|
+
.option(
|
|
188
|
+
"--sandbox",
|
|
189
|
+
"Disable Chromium sandboxing if needed, with --no-sandbox.",
|
|
190
|
+
true
|
|
191
|
+
)
|
|
192
|
+
.option("--disable-sandbox", "Alias of --no-sandbox.", false)
|
|
188
193
|
.option("--devtools", "Enable debugging and show Chrome's DevTools.", false)
|
|
189
194
|
.option("--verbose", "Log processing status to stdout.", false)
|
|
190
195
|
.option("--localhost", "Spin up a local server to perform processing.", false)
|
|
@@ -201,6 +206,11 @@ cli.action(async (source, destination, opts) => {
|
|
|
201
206
|
process.exit(1);
|
|
202
207
|
}
|
|
203
208
|
|
|
209
|
+
if (opts["disable-sandbox"]) {
|
|
210
|
+
opts.sandbox = false;
|
|
211
|
+
delete opts["disable-sandbox"];
|
|
212
|
+
}
|
|
213
|
+
|
|
204
214
|
try {
|
|
205
215
|
await run(source, destination, opts, log);
|
|
206
216
|
process.exit(0);
|
|
@@ -247,7 +257,7 @@ async function run(source, destination, options, log) {
|
|
|
247
257
|
onError: log.error.bind(log),
|
|
248
258
|
onWarning: log.warn.bind(log),
|
|
249
259
|
onProgress: log.info.bind(log),
|
|
250
|
-
disableSandbox: options
|
|
260
|
+
disableSandbox: !options.sandbox,
|
|
251
261
|
devtools: options.devtools,
|
|
252
262
|
});
|
|
253
263
|
|
package/tools/respecDocWriter.js
CHANGED
|
@@ -116,12 +116,13 @@ export async function toHTML(src, options = {}) {
|
|
|
116
116
|
* useful in CI env or when you want to pin the ReSpec version.
|
|
117
117
|
*
|
|
118
118
|
* @assumption The ReSpec script being used in the document is hosted on either
|
|
119
|
-
* w3.org or w3c.github.io. If this assumption doesn't hold
|
|
120
|
-
* fails), this function will timeout.
|
|
119
|
+
* w3.org or w3c.github.io or speced.github.io. If this assumption doesn't hold
|
|
120
|
+
* true (interception fails), this function will timeout.
|
|
121
121
|
*
|
|
122
122
|
* The following ReSpec URLs are supported:
|
|
123
123
|
* https://www.w3.org/Tools/respec/${profile}
|
|
124
124
|
* https://w3c.github.io/respec/builds/${profile}.js
|
|
125
|
+
* https://speced.github.io/respec/builds/${profile}.js
|
|
125
126
|
* file:///home/path-to-respec/builds/${profile}.js
|
|
126
127
|
* http://localhost:PORT/builds/${profile}.js
|
|
127
128
|
* https://example.com/builds/${profile}.js
|
|
@@ -162,6 +163,7 @@ function isRespecScript(req) {
|
|
|
162
163
|
case "www.w3.org":
|
|
163
164
|
return path.startsWith("/Tools/respec/");
|
|
164
165
|
case "w3c.github.io":
|
|
166
|
+
case "speced.github.io":
|
|
165
167
|
return path.startsWith("/respec/builds/");
|
|
166
168
|
default:
|
|
167
169
|
// localhost, file://, and everything else
|
|
@@ -226,7 +228,7 @@ async function generateHTML(page, timer, version, url) {
|
|
|
226
228
|
const msg = `\n😭 Sorry, there was an error generating the HTML. Please report this issue!\n${`${
|
|
227
229
|
`Specification: ${url}\n` +
|
|
228
230
|
`ReSpec version: ${version.join(".")}\n` +
|
|
229
|
-
"File a bug: https://github.com/
|
|
231
|
+
"File a bug: https://github.com/speced/respec/\n"
|
|
230
232
|
}${err ? `Error: ${err.stack}\n` : ""}`}`;
|
|
231
233
|
throw new Error(msg);
|
|
232
234
|
}
|
|
@@ -320,7 +322,7 @@ function handleConsoleMessages(page, onError, onWarning) {
|
|
|
320
322
|
const text = args.filter(msg => msg !== "undefined")[0] || "";
|
|
321
323
|
const type = message.type();
|
|
322
324
|
if (
|
|
323
|
-
(type === "error" || type === "warning") &&
|
|
325
|
+
(type === "error" || type === "warning" || type === "warn") &&
|
|
324
326
|
msgText && // browser errors have text
|
|
325
327
|
!message.args().length // browser errors/warnings have no arguments
|
|
326
328
|
) {
|