@gjsify/vite-plugin-gjsify 0.64.3-next.258 → 0.64.3-next.260

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 CHANGED
@@ -45,6 +45,8 @@ Both presets resolve `@girs/*` / `gi://` imports to an empty module (those are G
45
45
 
46
46
  Both presets also embed `*.gresource.xml` imports ([ADR 0116](../../../docs/adr/0116-app-gresources-are-embedded-at-build-time-for-web-and-nativescript.md) §§ 1, 7): `import bytes from './data/app.data.gresource.xml'` yields the `Uint8Array` that `gjsify build` yields, ready for `Gio.resources_register(Gio.Resource.new_from_data(bytes))`. `glib-compile-resources` must be on the build host, `compressed="true"` is dropped (the web and NativeScript cannot inflate synchronously), and the dev server reloads the module when the XML or a file it lists changes. Type the import with `@gjsify/rolldown-plugin-gjsify/types`.
47
47
 
48
+ They carry `*.gschema.xml?schema` imports the same way ([ADR 0099](../../../docs/adr/0099-gio-settings-runs-on-the-browser-and-nativescript.md) § 1): the import registers the schema with `@gjsify/app-settings`, as under `gjsify build`, so `new Gio.Settings(...)` finds it. The same `types` entry declares the specifier.
49
+
48
50
  ## License
49
51
 
50
52
  MIT
package/lib/index.js CHANGED
@@ -20,6 +20,7 @@
20
20
  // matching aliases and conditions can paper over.
21
21
  // - blueprintPlugin() → compile `.blp` GNOME Blueprint files to XML
22
22
  // - gresourcePlugin() → `import bytes from './x.gresource.xml'` (ADR 0116)
23
+ // - gschemaPlugin() → `import './x.gschema.xml?schema'` (ADR 0099)
23
24
  // - deepkitPlugin() → optional Deepkit type reflection (opt-in)
24
25
  // - an inline Vite config hook supplying the browser-target resolve aliases,
25
26
  // conditions, mainFields, defines and build target.
@@ -39,7 +40,7 @@
39
40
  import { createRequire } from 'node:module';
40
41
  import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
41
42
  import * as nodePath from 'node:path';
42
- import { gjsImportsEmptyPlugin, giRendererPlugin, platformResolvePlugin, nativescriptSuffixChain, browserSuffixChain, BROWSER_REFUSED_SUFFIXES, detectNativescriptPlatform, nativescriptPlatformDefines, cssAsStringPlugin, gresourcePlugin, } from '@gjsify/rolldown-plugin-gjsify';
43
+ import { gjsImportsEmptyPlugin, giRendererPlugin, platformResolvePlugin, nativescriptSuffixChain, browserSuffixChain, BROWSER_REFUSED_SUFFIXES, detectNativescriptPlatform, nativescriptPlatformDefines, cssAsStringPlugin, gresourcePlugin, gschemaPlugin, GSCHEMA_REGISTER, } from '@gjsify/rolldown-plugin-gjsify';
43
44
  import blueprintPlugin from '@gjsify/vite-plugin-blueprint';
44
45
  import { deepkitPlugin } from '@gjsify/rolldown-plugin-deepkit';
45
46
  import { ALIASES_NODE_FOR_NATIVESCRIPT, GI_RENDERERS } from '@gjsify/resolve-npm';
@@ -138,6 +139,8 @@ export function gjsifyBrowser(options = {}) {
138
139
  // `import bytes from './x.gresource.xml'` (ADR 0116 §§ 1, 7): the same `Uint8Array` as
139
140
  // `--app browser`, with `compressed="true"` stripped (no synchronous inflate on the web).
140
141
  gresourcePlugin({ compressed: 'strip' }),
142
+ // `import './x.gschema.xml?schema'` registers the schema (ADR 0099 § 1), as `--app browser`.
143
+ gschemaPlugin({ mode: 'emit', register: GSCHEMA_REGISTER.browser }),
141
144
  deepkitPlugin({ reflection: options.reflection }),
142
145
  // Opt-in: mirror `--app browser`'s css-as-string so `import css from
143
146
  // './x.css'` yields the CSS string in dev too (unify with the native
@@ -460,6 +463,8 @@ export function gjsifyNativescript(options = {}) {
460
463
  // `import bytes from './x.gresource.xml'` (ADR 0116 §§ 1, 7), as `--app nativescript`;
461
464
  // no synchronous inflate on NativeScript either, so `compressed="true"` is stripped.
462
465
  gresourcePlugin({ compressed: 'strip' }),
466
+ // `import './x.gschema.xml?schema'` registers the schema (ADR 0099 § 1), as `--app nativescript`.
467
+ gschemaPlugin({ mode: 'emit', register: GSCHEMA_REGISTER.nativescript }),
463
468
  deepkitPlugin({ reflection: options.reflection }),
464
469
  configPlugin,
465
470
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/vite-plugin-gjsify",
3
- "version": "0.64.3-next.258",
3
+ "version": "0.64.3-next.260",
4
4
  "description": "Vite plugin presets mirroring `gjsify build --app browser` / `--app nativescript` — dev (Vite/HMR) parity with the gjsify CLI targets.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -43,11 +43,11 @@
43
43
  ],
44
44
  "license": "MIT",
45
45
  "dependencies": {
46
- "@gjsify/empty": "0.64.3-next.258",
47
- "@gjsify/resolve-npm": "0.64.3-next.258",
48
- "@gjsify/rolldown-plugin-deepkit": "0.64.3-next.258",
49
- "@gjsify/rolldown-plugin-gjsify": "0.64.3-next.258",
50
- "@gjsify/vite-plugin-blueprint": "0.64.3-next.258"
46
+ "@gjsify/empty": "0.64.3-next.260",
47
+ "@gjsify/resolve-npm": "0.64.3-next.260",
48
+ "@gjsify/rolldown-plugin-deepkit": "0.64.3-next.260",
49
+ "@gjsify/rolldown-plugin-gjsify": "0.64.3-next.260",
50
+ "@gjsify/vite-plugin-blueprint": "0.64.3-next.260"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "vite": "^8.1.3"
@@ -58,8 +58,8 @@
58
58
  }
59
59
  },
60
60
  "devDependencies": {
61
- "@gjsify/cli": "0.64.3-next.258",
62
- "@gjsify/unit": "0.64.3-next.258",
61
+ "@gjsify/cli": "0.64.3-next.260",
62
+ "@gjsify/unit": "0.64.3-next.260",
63
63
  "@types/node": "^25.9.2",
64
64
  "typescript": "^6.0.3",
65
65
  "vite": "^8.1.3"
@@ -67,5 +67,5 @@
67
67
  "gjsify": {
68
68
  "tier": 1
69
69
  },
70
- "gitHead": "6d2fc430ffaa180a765c59d33c8fa1d5b410b364"
70
+ "gitHead": "886de21be840429ce043cdbf8195172530e230d4"
71
71
  }