@ringozz/godot 4.7.2-604 → 4.7.2-612
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/package.json +4 -4
- package/src/preload.ts +9 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ringozz/godot",
|
|
3
3
|
"author": "Vladimir Davidovich",
|
|
4
|
-
"version": "4.7.2-
|
|
4
|
+
"version": "4.7.2-612",
|
|
5
5
|
"description": "Node-API bindings for Godot Engine — call Godot classes from JavaScript",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"precision": "single"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
61
|
-
"@ringozz/godot-macos-arm64": "^4.7.2-
|
|
62
|
-
"@ringozz/godot-windows-x86_64": "^4.7.2-
|
|
63
|
-
"@ringozz/godot-web-wasm32": "^4.7.2-
|
|
61
|
+
"@ringozz/godot-macos-arm64": "^4.7.2-612",
|
|
62
|
+
"@ringozz/godot-windows-x86_64": "^4.7.2-612",
|
|
63
|
+
"@ringozz/godot-web-wasm32": "^4.7.2-612"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@types/bun": "*"
|
package/src/preload.ts
CHANGED
|
@@ -88,8 +88,15 @@ function parseSidecarDest(text: string): string | null {
|
|
|
88
88
|
// shifted a scan's results). The `//` fragment right after `res:` is a mere
|
|
89
89
|
// path remainder of the `res://` match, not a real relative ref, so it's
|
|
90
90
|
// skipped (otherwise it mis-resolves as a Windows UNC `\\…` path).
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
//
|
|
92
|
+
// The extension must TERMINATE a token: `(?![\w.])` rejects matches where the
|
|
93
|
+
// extension is only the head of a longer identifier or a dotted sub-field, e.g.
|
|
94
|
+
// `X.po` in `X.position`, `foo.gd` in `foo.gd.position`, or `scene.tscn2`. A
|
|
95
|
+
// real relative ref (`foo.po`, `x.gd`, `ui/scene.tscn`) always ends its token.
|
|
96
|
+
// `String.raw` keeps the `\w` escapes intact — a plain template literal would
|
|
97
|
+
// drop the backslashes, turning `\w` into `w` (a wrong guard `(?![w.])`).
|
|
98
|
+
const REL_TERM = String.raw`(?![\w.])`;
|
|
99
|
+
const REL_PATTERN = String.raw`([\w./\\-]+\.(?:` + Object.keys(FORMATS).join('|') + `))` + REL_TERM;
|
|
93
100
|
function extractRefs(text: string): string[] {
|
|
94
101
|
const refs: string[] = [];
|
|
95
102
|
for (const m of text.matchAll(/res:\/\/[\w./\\-]+/g)) refs.push(m[0]);
|