@datamoc/mw_games 0.17.0 → 0.18.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/CHANGELOG.md +39 -0
- package/README.md +1 -1
- package/dist/audio/Channels.d.ts +198 -0
- package/dist/audio/Channels.d.ts.map +1 -0
- package/dist/audio/Channels.js +456 -0
- package/dist/audio/Channels.js.map +1 -0
- package/dist/audio/Midi.d.ts +71 -9
- package/dist/audio/Midi.d.ts.map +1 -1
- package/dist/audio/Midi.js +107 -15
- package/dist/audio/Midi.js.map +1 -1
- package/dist/audio/MidiRender.d.ts +57 -0
- package/dist/audio/MidiRender.d.ts.map +1 -0
- package/dist/audio/MidiRender.js +261 -0
- package/dist/audio/MidiRender.js.map +1 -0
- package/dist/audio/SoundFont.d.ts +64 -0
- package/dist/audio/SoundFont.d.ts.map +1 -0
- package/dist/audio/SoundFont.js +219 -0
- package/dist/audio/SoundFont.js.map +1 -0
- package/dist/audio/index.d.ts +9 -2
- package/dist/audio/index.d.ts.map +1 -1
- package/dist/audio/index.js +4 -1
- package/dist/audio/index.js.map +1 -1
- package/dist/mw_games.global.js +10 -10
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/sbom.cdx.json +6 -6
- package/tools/csp.mjs +10 -1
- package/tools/sbom.mjs +3 -1
package/dist/version.d.ts
CHANGED
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* this from `package.json` automatically, chosen because this project's own build already
|
|
10
10
|
* has no step before `tsc`/`vite` that this would need to run ahead of.
|
|
11
11
|
*/
|
|
12
|
-
export declare const version = "0.
|
|
12
|
+
export declare const version = "0.18.0";
|
|
13
13
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* this from `package.json` automatically, chosen because this project's own build already
|
|
10
10
|
* has no step before `tsc`/`vite` that this would need to run ahead of.
|
|
11
11
|
*/
|
|
12
|
-
export const version = '0.
|
|
12
|
+
export const version = '0.18.0';
|
|
13
13
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datamoc/mw_games",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "A local-file game framework: renderer-free game logic, drawn through PixiJS in 2D or Babylon.js in 3D, with mobile and desktop packaging.",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"repository": {
|
package/sbom.cdx.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bomFormat": "CycloneDX",
|
|
3
3
|
"specVersion": "1.6",
|
|
4
|
-
"serialNumber": "urn:uuid:
|
|
4
|
+
"serialNumber": "urn:uuid:41a4c04b-a4b7-51d1-8ed7-ef7398a60e44",
|
|
5
5
|
"version": 1,
|
|
6
6
|
"metadata": {
|
|
7
7
|
"tools": {
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
"type": "application",
|
|
11
11
|
"group": "datamoc",
|
|
12
12
|
"name": "tools/sbom.mjs",
|
|
13
|
-
"version": "0.
|
|
13
|
+
"version": "0.18.0"
|
|
14
14
|
}
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"component": {
|
|
18
18
|
"type": "library",
|
|
19
|
-
"bom-ref": "pkg:npm/%40datamoc/mw_games@0.
|
|
19
|
+
"bom-ref": "pkg:npm/%40datamoc/mw_games@0.18.0",
|
|
20
20
|
"name": "@datamoc/mw_games",
|
|
21
|
-
"version": "0.
|
|
22
|
-
"purl": "pkg:npm/%40datamoc/mw_games@0.
|
|
21
|
+
"version": "0.18.0",
|
|
22
|
+
"purl": "pkg:npm/%40datamoc/mw_games@0.18.0",
|
|
23
23
|
"description": "A local-file game framework: renderer-free game logic, drawn through PixiJS in 2D or Babylon.js in 3D, with mobile and desktop packaging.",
|
|
24
24
|
"licenses": [
|
|
25
25
|
{
|
|
@@ -4453,7 +4453,7 @@
|
|
|
4453
4453
|
]
|
|
4454
4454
|
},
|
|
4455
4455
|
{
|
|
4456
|
-
"ref": "pkg:npm/%40datamoc/mw_games@0.
|
|
4456
|
+
"ref": "pkg:npm/%40datamoc/mw_games@0.18.0",
|
|
4457
4457
|
"dependsOn": [
|
|
4458
4458
|
"pkg:npm/%40babylonjs/core@9.26.0",
|
|
4459
4459
|
"pkg:npm/%40babylonjs/loaders@9.26.0",
|
package/tools/csp.mjs
CHANGED
|
@@ -21,7 +21,16 @@ import { createHash } from 'node:crypto';
|
|
|
21
21
|
* extra script texts to allow by hash (a single-file loader's unpacked scripts)
|
|
22
22
|
*/
|
|
23
23
|
export function contentSecurityPolicy(html, { connect = [], eval: allowEval = true, scripts = [] } = {}) {
|
|
24
|
-
|
|
24
|
+
//The HTML parser normalises newlines before it hashes an inline script: CRLF and lone CR
|
|
25
|
+
//become LF. A checkout with core.autocrlf=true (every Windows clone) hands the source page
|
|
26
|
+
//over with CRLF, so hashing the bytes on disk here would emit a policy Chrome computes
|
|
27
|
+
//differently from the file it just parsed, and the page refuses its own script while
|
|
28
|
+
//`file://` on Linux stays quiet. Hash the text the browser will see.
|
|
29
|
+
const inline = [...html.matchAll(/<script(?![^>]*\bsrc=)[^>]*>([\s\S]*?)<\/script>/gi)].map((match) =>
|
|
30
|
+
match[1].replace(/\r\n?/g, '\n'),
|
|
31
|
+
);
|
|
32
|
+
//`scripts` are texts the standalone page's unpacker sets on a script element at runtime
|
|
33
|
+
//(`s.text = code`), where no parser runs: those are hashed exactly as they are written.
|
|
25
34
|
const hashes = [...new Set([...inline, ...scripts].map((text) => `'sha256-${sha256(text)}'`))];
|
|
26
35
|
const directives = {
|
|
27
36
|
'default-src': ["'none'"],
|
package/tools/sbom.mjs
CHANGED
|
@@ -313,7 +313,9 @@ async function main(argv) {
|
|
|
313
313
|
|
|
314
314
|
if (argv.includes('--check')) {
|
|
315
315
|
const committed = await readFile(out, 'utf8').catch(() => undefined);
|
|
316
|
-
|
|
316
|
+
//CRLF is a Windows checkout's doing, not a difference in the BOM itself (and a missing
|
|
317
|
+
//file still reads as out of date: '' never equals the serialized BOM)
|
|
318
|
+
if ((committed ?? '').replace(/\r\n/g, '\n') !== json.replace(/\r\n/g, '\n')) {
|
|
317
319
|
console.error(`${name} is out of date with package-lock.json. Run "npm run sbom" and commit the result.`);
|
|
318
320
|
process.exitCode = 1;
|
|
319
321
|
} else {
|