@gjsify/rolldown-plugin-gjsify 0.64.1-next.248 → 0.64.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/README.md +4 -0
- package/package.json +16 -13
- package/types/gresource.d.ts +9 -0
package/README.md
CHANGED
|
@@ -51,6 +51,10 @@ For a GJS build the bundle records the addon's **package identity**, not a path
|
|
|
51
51
|
- A cross-build works when the target's binary is installed on the builder: a multi-platform npm package, or `gjsify install`, which materialises every platform package.
|
|
52
52
|
- `runtimeResolve` (set from `format === 'esm'` by `gjsify build`) gates the whole mechanism: without the bundle-URL banner there is nothing to anchor on, so the rewrite is declined with a warning rather than emitting a path that would only be right on the build machine.
|
|
53
53
|
|
|
54
|
+
## `.gresource.xml` imports
|
|
55
|
+
|
|
56
|
+
`import bytes from './data/app.data.gresource.xml'` yields the compiled GResource as a `Uint8Array` ([ADR 0116](../../../docs/adr/0116-app-gresources-are-embedded-at-build-time-for-web-and-nativescript.md)). To type it, add `"@gjsify/rolldown-plugin-gjsify/types"` to your `tsconfig.json` `compilerOptions.types`.
|
|
57
|
+
|
|
54
58
|
## License
|
|
55
59
|
|
|
56
60
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/rolldown-plugin-gjsify",
|
|
3
|
-
"version": "0.64.1
|
|
3
|
+
"version": "0.64.1",
|
|
4
4
|
"description": "Rolldown / Rollup / Vite plugin orchestrator for GJS, Node, and Browser targets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
"types": "./lib/utils/runtime.d.ts",
|
|
20
20
|
"default": "./lib/utils/runtime.js"
|
|
21
21
|
},
|
|
22
|
+
"./types": {
|
|
23
|
+
"types": "./types/gresource.d.ts"
|
|
24
|
+
},
|
|
22
25
|
"./shims/console-gjs": {
|
|
23
26
|
"default": "./lib/shims/console-gjs.js"
|
|
24
27
|
},
|
|
@@ -33,7 +36,8 @@
|
|
|
33
36
|
}
|
|
34
37
|
},
|
|
35
38
|
"files": [
|
|
36
|
-
"lib"
|
|
39
|
+
"lib",
|
|
40
|
+
"types"
|
|
37
41
|
],
|
|
38
42
|
"scripts": {
|
|
39
43
|
"clear": "gjsify clear lib tsconfig.tsbuildinfo test.node.mjs",
|
|
@@ -63,12 +67,12 @@
|
|
|
63
67
|
],
|
|
64
68
|
"license": "MIT",
|
|
65
69
|
"dependencies": {
|
|
66
|
-
"@gjsify/console": "0.64.1
|
|
67
|
-
"@gjsify/resolve-npm": "0.64.1
|
|
68
|
-
"@gjsify/rolldown-plugin-deepkit": "0.64.1
|
|
69
|
-
"@gjsify/rolldown-plugin-pnp": "0.64.1
|
|
70
|
-
"@gjsify/utils": "0.64.1
|
|
71
|
-
"@gjsify/vite-plugin-blueprint": "0.64.1
|
|
70
|
+
"@gjsify/console": "^0.64.1",
|
|
71
|
+
"@gjsify/resolve-npm": "^0.64.1",
|
|
72
|
+
"@gjsify/rolldown-plugin-deepkit": "^0.64.1",
|
|
73
|
+
"@gjsify/rolldown-plugin-pnp": "^0.64.1",
|
|
74
|
+
"@gjsify/utils": "^0.64.1",
|
|
75
|
+
"@gjsify/vite-plugin-blueprint": "^0.64.1",
|
|
72
76
|
"@rollup/pluginutils": "^5.4.0",
|
|
73
77
|
"acorn": "^8.17.0",
|
|
74
78
|
"acorn-typescript": "^1.4.13",
|
|
@@ -78,7 +82,7 @@
|
|
|
78
82
|
"sass": "^1.101.0"
|
|
79
83
|
},
|
|
80
84
|
"peerDependencies": {
|
|
81
|
-
"@gjsify/lightningcss-native": "0.64.1
|
|
85
|
+
"@gjsify/lightningcss-native": "^0.64.1",
|
|
82
86
|
"rolldown": "^1.1.4"
|
|
83
87
|
},
|
|
84
88
|
"peerDependenciesMeta": {
|
|
@@ -90,8 +94,8 @@
|
|
|
90
94
|
}
|
|
91
95
|
},
|
|
92
96
|
"devDependencies": {
|
|
93
|
-
"@gjsify/cli": "0.64.1
|
|
94
|
-
"@gjsify/unit": "0.64.1
|
|
97
|
+
"@gjsify/cli": "^0.64.1",
|
|
98
|
+
"@gjsify/unit": "^0.64.1",
|
|
95
99
|
"@types/node": "^25.9.2",
|
|
96
100
|
"rolldown": "^1.1.4",
|
|
97
101
|
"typescript": "^6.0.3"
|
|
@@ -103,6 +107,5 @@
|
|
|
103
107
|
"darwin": "supported",
|
|
104
108
|
"win32": "supported"
|
|
105
109
|
}
|
|
106
|
-
}
|
|
107
|
-
"gitHead": "4f1f2d4d5330581f496a627fa33133d2769af1a2"
|
|
110
|
+
}
|
|
108
111
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `import bytes from './data/<app-id>.data.gresource.xml'` (ADR 0116 § 1): the loader in
|
|
3
|
+
* `plugins/gresource.ts` compiles the descriptor with `glib-compile-resources` and the module's
|
|
4
|
+
* default export is the compiled GResource, for `Gio.Resource.new_from_data(bytes)`.
|
|
5
|
+
*/
|
|
6
|
+
declare module '*.gresource.xml' {
|
|
7
|
+
const bytes: Uint8Array;
|
|
8
|
+
export default bytes;
|
|
9
|
+
}
|