@gjsify/cli 0.3.17 → 0.3.18
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/lib/commands/showcase.js +9 -6
- package/package.json +10 -10
- package/src/commands/showcase.ts +8 -6
package/lib/commands/showcase.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { discoverShowcases, findShowcase } from '../utils/discover-showcases.js';
|
|
2
|
-
import { runMinimalChecks,
|
|
2
|
+
import { runMinimalChecks, detectPackageManager, buildInstallCommand, } from '../utils/check-system-deps.js';
|
|
3
3
|
import { spawn } from 'node:child_process';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
5
|
export const showcaseCommand = {
|
|
@@ -58,12 +58,15 @@ export const showcaseCommand = {
|
|
|
58
58
|
console.error('Run "gjsify showcase" to list available showcases.');
|
|
59
59
|
process.exit(1);
|
|
60
60
|
}
|
|
61
|
-
// System dependency check before delegating — only
|
|
61
|
+
// System dependency check before delegating — only system libs (gjs,
|
|
62
|
+
// gtk4, …). The showcase's npm deps (incl. `@gjsify/webgl` with the
|
|
63
|
+
// gwebgl Vala prebuild) are fetched by `gjsify dlx` into the npm
|
|
64
|
+
// cache, and `runGjsBundle()` picks the prebuild up from the bundle
|
|
65
|
+
// dir via `detectNativePackages()`. Pre-flight-checking npm deps
|
|
66
|
+
// here would fail for `npx @gjsify/cli showcase` (no project
|
|
67
|
+
// node_modules, CLI doesn't dep on the showcase libs).
|
|
62
68
|
const results = runMinimalChecks();
|
|
63
|
-
|
|
64
|
-
results.push(checkGwebgl(process.cwd()));
|
|
65
|
-
}
|
|
66
|
-
const missingHard = results.filter((r) => !r.found && (r.severity === 'required' || r.id === 'gwebgl'));
|
|
69
|
+
const missingHard = results.filter((r) => !r.found && r.severity === 'required');
|
|
67
70
|
if (missingHard.length > 0) {
|
|
68
71
|
console.error('Missing system dependencies:\n');
|
|
69
72
|
for (const dep of missingHard) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.18",
|
|
4
4
|
"description": "CLI for Gjsify",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"cli"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@gjsify/create-app": "^0.3.
|
|
27
|
-
"@gjsify/node-polyfills": "^0.3.
|
|
28
|
-
"@gjsify/npm-registry": "^0.3.
|
|
29
|
-
"@gjsify/resolve-npm": "^0.3.
|
|
30
|
-
"@gjsify/rolldown-plugin-gjsify": "^0.3.
|
|
31
|
-
"@gjsify/rolldown-plugin-pnp": "^0.3.
|
|
32
|
-
"@gjsify/semver": "^0.3.
|
|
33
|
-
"@gjsify/tar": "^0.3.
|
|
34
|
-
"@gjsify/web-polyfills": "^0.3.
|
|
26
|
+
"@gjsify/create-app": "^0.3.18",
|
|
27
|
+
"@gjsify/node-polyfills": "^0.3.18",
|
|
28
|
+
"@gjsify/npm-registry": "^0.3.18",
|
|
29
|
+
"@gjsify/resolve-npm": "^0.3.18",
|
|
30
|
+
"@gjsify/rolldown-plugin-gjsify": "^0.3.18",
|
|
31
|
+
"@gjsify/rolldown-plugin-pnp": "^0.3.18",
|
|
32
|
+
"@gjsify/semver": "^0.3.18",
|
|
33
|
+
"@gjsify/tar": "^0.3.18",
|
|
34
|
+
"@gjsify/web-polyfills": "^0.3.18",
|
|
35
35
|
"cosmiconfig": "^9.0.1",
|
|
36
36
|
"get-tsconfig": "^4.14.0",
|
|
37
37
|
"pkg-types": "^2.3.1",
|
package/src/commands/showcase.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type { Command } from '../types/index.js';
|
|
|
2
2
|
import { discoverShowcases, findShowcase } from '../utils/discover-showcases.js';
|
|
3
3
|
import {
|
|
4
4
|
runMinimalChecks,
|
|
5
|
-
checkGwebgl,
|
|
6
5
|
detectPackageManager,
|
|
7
6
|
buildInstallCommand,
|
|
8
7
|
} from '../utils/check-system-deps.js';
|
|
@@ -79,13 +78,16 @@ export const showcaseCommand: Command<any, ShowcaseOptions> = {
|
|
|
79
78
|
process.exit(1);
|
|
80
79
|
}
|
|
81
80
|
|
|
82
|
-
// System dependency check before delegating — only
|
|
81
|
+
// System dependency check before delegating — only system libs (gjs,
|
|
82
|
+
// gtk4, …). The showcase's npm deps (incl. `@gjsify/webgl` with the
|
|
83
|
+
// gwebgl Vala prebuild) are fetched by `gjsify dlx` into the npm
|
|
84
|
+
// cache, and `runGjsBundle()` picks the prebuild up from the bundle
|
|
85
|
+
// dir via `detectNativePackages()`. Pre-flight-checking npm deps
|
|
86
|
+
// here would fail for `npx @gjsify/cli showcase` (no project
|
|
87
|
+
// node_modules, CLI doesn't dep on the showcase libs).
|
|
83
88
|
const results = runMinimalChecks();
|
|
84
|
-
if (showcase.needsWebgl) {
|
|
85
|
-
results.push(checkGwebgl(process.cwd()));
|
|
86
|
-
}
|
|
87
89
|
const missingHard = results.filter(
|
|
88
|
-
(r) => !r.found &&
|
|
90
|
+
(r) => !r.found && r.severity === 'required',
|
|
89
91
|
);
|
|
90
92
|
if (missingHard.length > 0) {
|
|
91
93
|
console.error('Missing system dependencies:\n');
|