@gjsify/cli 0.64.19 → 0.64.20

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.
@@ -8,8 +8,11 @@ interface FlatpakCheckOptions {
8
8
  strict?: boolean;
9
9
  json?: boolean;
10
10
  qualityNetwork?: boolean;
11
+ appstreamNetwork?: boolean;
11
12
  builderLint?: boolean;
12
13
  verbose?: boolean;
13
14
  }
15
+ /** argv for `appstreamcli`; offline unless the caller opts in to URL reachability checks. */
16
+ export declare function appstreamValidateArgs(metainfoAbs: string, network?: boolean): string[];
14
17
  export declare const flatpakCheckCommand: Command<unknown, FlatpakCheckOptions>;
15
18
  export {};
@@ -1,8 +1,9 @@
1
1
  // `gjsify flatpak check` — run Flathub's pre-submission linters locally.
2
2
  //
3
3
  // Wraps two tools:
4
- // - `appstreamcli validate --strict <metainfo>` — MetaInfo XML
5
- // correctness check
4
+ // - `appstreamcli validate --strict --no-net <metainfo>` — MetaInfo XML
5
+ // correctness check; offline unless `--appstream-network` (a URL that
6
+ // is merely unreachable from the runner must not fail the gate)
6
7
  // - `flatpak-builder-lint manifest <manifest.json>` — manifest
7
8
  // correctness check (and optionally `repo` for built artefacts)
8
9
  //
@@ -15,6 +16,10 @@ import { spawnToCompletion } from '../../utils/spawn.js';
15
16
  import { readPackageJson, looksLikeAppId } from './utils.js';
16
17
  import { Config } from '../../config.js';
17
18
  import { formatFinding, lintMetainfo, readImageInfo, summarizeFindings, } from '../../utils/metainfo-quality.js';
19
+ /** argv for `appstreamcli`; offline unless the caller opts in to URL reachability checks. */
20
+ export function appstreamValidateArgs(metainfoAbs, network = false) {
21
+ return ['validate', '--strict', ...(network ? [] : ['--no-net']), metainfoAbs];
22
+ }
18
23
  export const flatpakCheckCommand = {
19
24
  command: 'check [manifest]',
20
25
  description: 'Run Flathub pre-submission linters: appstreamcli validate + flatpak-builder-lint.',
@@ -36,7 +41,7 @@ export const flatpakCheckCommand = {
36
41
  normalize: true,
37
42
  })
38
43
  .option('appstream', {
39
- description: 'Run `appstreamcli validate --strict` (default: true).',
44
+ description: 'Run `appstreamcli validate --strict --no-net` (default: true).',
40
45
  type: 'boolean',
41
46
  default: true,
42
47
  })
@@ -59,6 +64,11 @@ export const flatpakCheckCommand = {
59
64
  description: 'Let the quality check fetch http(s) screenshot/icon URLs to measure their size.',
60
65
  type: 'boolean',
61
66
  default: false,
67
+ })
68
+ .option('appstream-network', {
69
+ description: 'Let `appstreamcli` fetch the MetaInfo URLs to check they are reachable.',
70
+ type: 'boolean',
71
+ default: false,
62
72
  })
63
73
  .option('builder-lint', {
64
74
  description: 'Run `flatpak-builder-lint manifest` (default: true).',
@@ -86,7 +96,7 @@ export const flatpakCheckCommand = {
86
96
  console.warn(`[gjsify flatpak check] skipping appstreamcli — ${metainfoAbs} not found`);
87
97
  }
88
98
  else {
89
- const ok = await runLinter('appstreamcli', ['validate', '--strict', metainfoAbs], args.verbose ?? false);
99
+ const ok = await runLinter('appstreamcli', appstreamValidateArgs(metainfoAbs, args.appstreamNetwork === true), args.verbose ?? false);
90
100
  if (!ok)
91
101
  failures++;
92
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/cli",
3
- "version": "0.64.19",
3
+ "version": "0.64.20",
4
4
  "description": "CLI for Gjsify",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -142,22 +142,22 @@
142
142
  "cli"
143
143
  ],
144
144
  "dependencies": {
145
- "@gjsify/blueprint": "^0.64.19",
146
- "@gjsify/buffer": "^0.64.19",
147
- "@gjsify/create-app": "^0.64.19",
148
- "@gjsify/node-globals": "^0.64.19",
149
- "@gjsify/node-polyfills": "^0.64.19",
150
- "@gjsify/npm-registry": "^0.64.19",
151
- "@gjsify/resolve-npm": "^0.64.19",
152
- "@gjsify/rolldown-plugin-gjsify": "^0.64.19",
153
- "@gjsify/vite-plugin-blueprint": "^0.64.19",
154
- "@gjsify/rolldown-plugin-pnp": "^0.64.19",
155
- "@gjsify/semver": "^0.64.19",
156
- "@gjsify/tar": "^0.64.19",
157
- "@gjsify/tsc": "^0.64.19",
158
- "@gjsify/utils": "^0.64.19",
159
- "@gjsify/web-polyfills": "^0.64.19",
160
- "@gjsify/workspace": "^0.64.19",
145
+ "@gjsify/blueprint": "^0.64.20",
146
+ "@gjsify/buffer": "^0.64.20",
147
+ "@gjsify/create-app": "^0.64.20",
148
+ "@gjsify/node-globals": "^0.64.20",
149
+ "@gjsify/node-polyfills": "^0.64.20",
150
+ "@gjsify/npm-registry": "^0.64.20",
151
+ "@gjsify/resolve-npm": "^0.64.20",
152
+ "@gjsify/rolldown-plugin-gjsify": "^0.64.20",
153
+ "@gjsify/vite-plugin-blueprint": "^0.64.20",
154
+ "@gjsify/rolldown-plugin-pnp": "^0.64.20",
155
+ "@gjsify/semver": "^0.64.20",
156
+ "@gjsify/tar": "^0.64.20",
157
+ "@gjsify/tsc": "^0.64.20",
158
+ "@gjsify/utils": "^0.64.20",
159
+ "@gjsify/web-polyfills": "^0.64.20",
160
+ "@gjsify/workspace": "^0.64.20",
161
161
  "acorn": "^8.17.0",
162
162
  "cosmiconfig": "^9.0.2",
163
163
  "get-tsconfig": "^4.14.0",
@@ -166,13 +166,13 @@
166
166
  "yargs": "^18.0.0"
167
167
  },
168
168
  "devDependencies": {
169
- "@gjsify/unit": "^0.64.19",
169
+ "@gjsify/unit": "^0.64.20",
170
170
  "@types/yargs": "^17.0.35",
171
171
  "typescript": "^6.0.3"
172
172
  },
173
173
  "peerDependencies": {
174
- "@gjsify/oxfmt-native": "^0.64.19",
175
- "@gjsify/rolldown-native": "^0.64.19"
174
+ "@gjsify/oxfmt-native": "^0.64.20",
175
+ "@gjsify/rolldown-native": "^0.64.20"
176
176
  },
177
177
  "peerDependenciesMeta": {
178
178
  "@gjsify/oxfmt-native": {