@gjsify/cli 0.22.0 → 0.24.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 +28 -1
- package/dist/cli.gjs.mjs +265 -184
- package/lib/actions/build.d.ts +12 -0
- package/lib/actions/build.js +26 -0
- package/lib/bundler-pick.js +56 -7
- package/lib/commands/affected.js +84 -14
- package/lib/commands/check.js +38 -29
- package/lib/commands/flatpak/build.js +19 -18
- package/lib/commands/foreach.js +119 -42
- package/lib/commands/info.js +11 -5
- package/lib/commands/install.d.ts +16 -0
- package/lib/commands/install.js +123 -36
- package/lib/commands/onboard.js +6 -1
- package/lib/commands/pack.js +69 -4
- package/lib/commands/run.js +26 -14
- package/lib/commands/showcase.js +17 -13
- package/lib/commands/storybook.js +5 -2
- package/lib/commands/trust.js +4 -62
- package/lib/commands/workspace.js +49 -30
- package/lib/utils/bin-shim.d.ts +66 -0
- package/lib/utils/bin-shim.js +246 -0
- package/lib/utils/build-cache.d.ts +42 -6
- package/lib/utils/build-cache.js +114 -42
- package/lib/utils/detect-native-packages.d.ts +118 -7
- package/lib/utils/detect-native-packages.js +213 -29
- package/lib/utils/gjs-bundle-guard.d.ts +32 -0
- package/lib/utils/gjs-bundle-guard.js +103 -0
- package/lib/utils/install-backend-native.d.ts +24 -0
- package/lib/utils/install-backend-native.js +89 -16
- package/lib/utils/install-global.d.ts +16 -0
- package/lib/utils/install-global.js +58 -8
- package/lib/utils/oxc-resolve.js +25 -57
- package/lib/utils/publish-headers.d.ts +2 -3
- package/lib/utils/publish-headers.js +64 -3
- package/lib/utils/publishable-packages.d.ts +22 -0
- package/lib/utils/publishable-packages.js +93 -0
- package/lib/utils/run-gjs.d.ts +6 -7
- package/lib/utils/run-gjs.js +4 -3
- package/lib/utils/run-node.d.ts +16 -0
- package/lib/utils/run-node.js +28 -7
- package/lib/utils/runtimes.d.ts +21 -0
- package/lib/utils/runtimes.js +23 -0
- package/lib/utils/spawn.d.ts +82 -0
- package/lib/utils/spawn.js +139 -0
- package/lib/utils/stdin.d.ts +25 -0
- package/lib/utils/stdin.js +132 -0
- package/package.json +23 -18
package/README.md
CHANGED
|
@@ -20,13 +20,40 @@ yarn add @gjsify/cli
|
|
|
20
20
|
# Build a GJS application
|
|
21
21
|
npx @gjsify/cli build src/index.ts
|
|
22
22
|
|
|
23
|
-
# Run a built GJS application (sets up
|
|
23
|
+
# Run a built GJS application (sets up the native-prebuild environment)
|
|
24
24
|
npx @gjsify/cli run dist/index.js
|
|
25
25
|
|
|
26
26
|
# Show environment info for a bundle
|
|
27
27
|
npx @gjsify/cli info dist/index.js
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
## Native prebuilds
|
|
31
|
+
|
|
32
|
+
Packages that ship compiled artifacts declare them with
|
|
33
|
+
`"gjsify": { "prebuilds": "prebuilds", "platforms": ["linux-x64", "darwin-arm64", …] }`
|
|
34
|
+
and stage them under `prebuilds/<os>-<arch>/`. `run`, `info`, `tsc` and the bin launchers
|
|
35
|
+
`install` writes all resolve that directory for the running host.
|
|
36
|
+
|
|
37
|
+
There is ONE `<os>-<arch>` spelling: `${process.platform}-${process.arch}` — `linux-x64`,
|
|
38
|
+
`linux-arm64`, `darwin-arm64`, `win32-x64`. It is what a running process can compute about
|
|
39
|
+
itself, so resolution needs no translation. (`ppc64`, `s390x` and `riscv64` are spelled the
|
|
40
|
+
same in every vocabulary.) The resolver still probes a package's own `gjsify.platforms`
|
|
41
|
+
entry first, and falls back to the retired uname spelling (`linux-x86_64`), so a tarball
|
|
42
|
+
published before the rename keeps loading.
|
|
43
|
+
|
|
44
|
+
The environment they export is `GI_TYPELIB_PATH` plus the library-search variable the host's
|
|
45
|
+
dynamic loader actually reads:
|
|
46
|
+
|
|
47
|
+
| host | variable | separator |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| Linux | `LD_LIBRARY_PATH` | `:` |
|
|
50
|
+
| macOS | `DYLD_LIBRARY_PATH` (`dyld` ignores `LD_LIBRARY_PATH`) | `:` |
|
|
51
|
+
| Windows | `PATH` (`LoadLibrary` has no dedicated variable) | `;` |
|
|
52
|
+
|
|
53
|
+
A package with no artifact for your host is skipped — every native bridge is optional at
|
|
54
|
+
runtime. Which artifacts exist per package is tracked in
|
|
55
|
+
[Platform Support](https://gjsify.github.io/gjsify/platform-support/).
|
|
56
|
+
|
|
30
57
|
## License
|
|
31
58
|
|
|
32
59
|
MIT
|