@gjsify/cli 0.42.0 → 0.44.0
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/dist/cli.gjs.mjs +444 -415
- package/lib/actions/build.d.ts +6 -0
- package/lib/actions/build.js +66 -9
- package/lib/commands/affected-classify.js +7 -5
- package/lib/commands/build.js +6 -0
- package/lib/commands/flatpak/ci.js +10 -2
- package/lib/commands/flatpak/init.js +15 -16
- package/lib/commands/flatpak/utils.d.ts +0 -26
- package/lib/commands/flatpak/utils.js +4 -29
- package/lib/commands/ship.d.ts +2 -0
- package/lib/commands/ship.js +358 -104
- package/lib/config.js +25 -0
- package/lib/types/cli-build-options.d.ts +11 -0
- package/lib/types/config-data.d.ts +106 -2
- package/lib/utils/flatpak-runtime.d.ts +41 -0
- package/lib/utils/flatpak-runtime.js +54 -0
- package/lib/utils/gjs-bundle-guard.d.ts +57 -3
- package/lib/utils/gjs-bundle-guard.js +122 -13
- package/lib/utils/jsx-config.d.ts +45 -0
- package/lib/utils/jsx-config.js +98 -0
- package/lib/utils/onboard-probe.d.ts +23 -0
- package/lib/utils/onboard-probe.js +65 -0
- package/lib/utils/ship/deb.d.ts +3 -3
- package/lib/utils/ship/deb.js +6 -2
- package/lib/utils/ship/depends.d.ts +13 -13
- package/lib/utils/ship/depends.js +25 -3
- package/lib/utils/ship/discover.js +72 -6
- package/lib/utils/ship/flatpak-config.d.ts +66 -0
- package/lib/utils/ship/flatpak-config.js +132 -0
- package/lib/utils/ship/flatpak.d.ts +45 -0
- package/lib/utils/ship/flatpak.js +148 -0
- package/lib/utils/ship/formats.d.ts +35 -0
- package/lib/utils/ship/formats.js +152 -5
- package/lib/utils/ship/mime.d.ts +19 -0
- package/lib/utils/ship/mime.js +89 -0
- package/lib/utils/ship/payload.d.ts +76 -0
- package/lib/utils/ship/payload.js +91 -1
- package/lib/utils/ship/plan.d.ts +30 -1
- package/lib/utils/ship/plan.js +54 -2
- package/lib/utils/ship/rpm.d.ts +3 -3
- package/lib/utils/ship/rpm.js +20 -3
- package/lib/utils/ship/scripts.d.ts +14 -4
- package/lib/utils/ship/scripts.js +26 -8
- package/lib/utils/ship/settings.js +20 -0
- package/lib/utils/ship/stage-manifest.d.ts +163 -0
- package/lib/utils/ship/stage-manifest.js +445 -0
- package/lib/utils/ship/stage-writer.d.ts +30 -3
- package/lib/utils/ship/stage-writer.js +76 -9
- package/lib/utils/ship/types.d.ts +203 -27
- package/lib/utils/ship/types.js +5 -0
- package/package.json +19 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RolldownOptions, OutputOptions, RolldownPluginOption } from 'rolldown';
|
|
2
|
-
import type { App } from '@gjsify/rolldown-plugin-gjsify';
|
|
2
|
+
import type { App, SourceDialect } from '@gjsify/rolldown-plugin-gjsify';
|
|
3
3
|
import type { ConfigDataLibrary, ConfigDataTypescript } from './index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Plugin entry resolvable by package name from the project's `node_modules`, so
|
|
@@ -82,6 +82,20 @@ export interface ConfigData {
|
|
|
82
82
|
* working ANSI colors). Default: true.
|
|
83
83
|
*/
|
|
84
84
|
consoleShim?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* The dialect the SOURCE is written in (ADR 0032 § 2 + § 8). `'react-native'`
|
|
87
|
+
* aliases `react-native` onto `@gjsify/react-native` and gates every named
|
|
88
|
+
* import against the support table at BUILD time. `gjs` and `node` app builds.
|
|
89
|
+
* Default: unset.
|
|
90
|
+
*
|
|
91
|
+
* Opt-in and never inferred from the dependency list: a monorepo with a phone
|
|
92
|
+
* leg installs the real `react-native` on purpose, and redirecting the
|
|
93
|
+
* specifier for every build in that tree would change what that leg resolves.
|
|
94
|
+
*
|
|
95
|
+
* NOT `gjsify.runtimes['react-native']`, which answers the opposite question —
|
|
96
|
+
* see the header of `SourceDialect`.
|
|
97
|
+
*/
|
|
98
|
+
dialect?: SourceDialect;
|
|
85
99
|
/** Comma-separated global identifiers to register. Format: see CliBuildOptions. */
|
|
86
100
|
globals?: string;
|
|
87
101
|
/**
|
|
@@ -328,6 +342,38 @@ export interface AppMetadata {
|
|
|
328
342
|
* https://www.freedesktop.org/software/appstream/docs/sect-Metadata-DesktopApps.html#tag-dapp-kudos
|
|
329
343
|
*/
|
|
330
344
|
kudos?: string[];
|
|
345
|
+
/**
|
|
346
|
+
* File types this package DEFINES for the whole system — a shared-mime-info
|
|
347
|
+
* document staged into `share/mime/packages/`.
|
|
348
|
+
*
|
|
349
|
+
* Distinct from `provides.mimetypes`, which only says the app HANDLES a type.
|
|
350
|
+
* For a standard type (`text/plain`, `application/pdf`) handling is all you
|
|
351
|
+
* need: the distribution already defines it. For a type of your own
|
|
352
|
+
* (`application/x-bauplan`) handling it is not enough and the failure is
|
|
353
|
+
* silent — nothing on the system knows the type exists, so a `.bauplan` file
|
|
354
|
+
* is never recognised as one, `MimeType=` in the desktop entry matches
|
|
355
|
+
* nothing, and double-clicking the file does nothing at all. No error, no
|
|
356
|
+
* log line: the association simply never fires.
|
|
357
|
+
*
|
|
358
|
+
* Every type declared here is added to the handled set automatically, because
|
|
359
|
+
* defining a file type in your own package and then not opening it is not a
|
|
360
|
+
* thing anyone means to do.
|
|
361
|
+
*/
|
|
362
|
+
mimeTypes?: Array<{
|
|
363
|
+
/** `<media>/<subtype>`, e.g. `application/x-bauplan`. */
|
|
364
|
+
type: string;
|
|
365
|
+
/**
|
|
366
|
+
* What a file manager shows instead of the raw type string. Required:
|
|
367
|
+
* a type with no comment is listed to the user as `application/x-bauplan`.
|
|
368
|
+
*/
|
|
369
|
+
comment: string;
|
|
370
|
+
/** Filename patterns, e.g. `["*.bauplan"]`. */
|
|
371
|
+
globs?: string[];
|
|
372
|
+
/** A registered type to inherit from, e.g. `application/zip` for a zip container. */
|
|
373
|
+
subClassOf?: string;
|
|
374
|
+
/** Fallback icon name when no type-specific icon is installed. */
|
|
375
|
+
genericIcon?: string;
|
|
376
|
+
}>;
|
|
331
377
|
/**
|
|
332
378
|
* What this app provides to the system. `<binary>` is auto-included with the
|
|
333
379
|
* value of `command` when omitted — AppStream needs it to register the binary
|
|
@@ -464,8 +510,66 @@ export interface ConfigDataShip extends AppMetadata {
|
|
|
464
510
|
extraFiles?: Record<string, string>;
|
|
465
511
|
/** Arguments the launcher appends before the user's own. */
|
|
466
512
|
execArgs?: string[];
|
|
513
|
+
/**
|
|
514
|
+
* How `--target flatpak` builds the app: the runtime it links against and
|
|
515
|
+
* what the finished app is allowed to do.
|
|
516
|
+
*
|
|
517
|
+
* The new home of the `gjsify.flatpak` BUILD keys (ADR 0024 § 8). The old
|
|
518
|
+
* spelling still resolves and warns — the window, and what deliberately did
|
|
519
|
+
* NOT move, is `utils/ship/flatpak-config.ts`.
|
|
520
|
+
*/
|
|
521
|
+
flatpak?: ShipFlatpakOptions;
|
|
467
522
|
}
|
|
468
|
-
/**
|
|
523
|
+
/**
|
|
524
|
+
* The Flatpak knobs `gjsify ship` reads. Every one has a derived default.
|
|
525
|
+
*
|
|
526
|
+
* There is no `modules` / `extraModules` here, and that is a decision rather
|
|
527
|
+
* than an omission: under `ship` the module list IS the staged payload
|
|
528
|
+
* (`buildsystem: simple` + `cp -a stage/.`), and an escape hatch injecting
|
|
529
|
+
* arbitrary build modules would put the second staging model back in the tree —
|
|
530
|
+
* the one thing ADR 0024 § 8 gates the whole migration on. A project that has
|
|
531
|
+
* to BUILD something inside the sandbox still has `gjsify flatpak init` +
|
|
532
|
+
* `gjsify flatpak build`, unchanged.
|
|
533
|
+
*/
|
|
534
|
+
export interface ShipFlatpakOptions {
|
|
535
|
+
/**
|
|
536
|
+
* Runtime family. Default `'gnome'` — a GJS bundle needs GLib/GObject/GIO at
|
|
537
|
+
* runtime, and no GJS interpreter ships in the Freedesktop runtime.
|
|
538
|
+
*/
|
|
539
|
+
runtime?: 'gnome' | 'freedesktop';
|
|
540
|
+
/** Runtime/SDK version, e.g. `'50'` for GNOME or `'24.08'` for Freedesktop. */
|
|
541
|
+
runtimeVersion?: string;
|
|
542
|
+
/**
|
|
543
|
+
* The branch the app is exported under — the last segment of
|
|
544
|
+
* `app/<id>/<arch>/<branch>`. Default `'stable'`, which is what Flathub
|
|
545
|
+
* publishes and what `flatpak install` resolves without being told.
|
|
546
|
+
*/
|
|
547
|
+
branch?: string;
|
|
548
|
+
/** Extra SDK extensions, e.g. `['org.freedesktop.Sdk.Extension.llvm17']`. */
|
|
549
|
+
sdkExtensions?: string[];
|
|
550
|
+
/**
|
|
551
|
+
* Path components prepended to `PATH` inside the build sandbox. Derived from
|
|
552
|
+
* `sdkExtensions` when unset, because an extension whose `bin` is not on
|
|
553
|
+
* PATH is one the build cannot use.
|
|
554
|
+
*/
|
|
555
|
+
appendPath?: string[];
|
|
556
|
+
/** Finish-args (capabilities). Default depends on `kind`: GUI args for an app, none for a CLI. */
|
|
557
|
+
finishArgs?: string[];
|
|
558
|
+
/** Cleanup globs applied to `/app`, e.g. `['/include', '/lib/pkgconfig']`. */
|
|
559
|
+
cleanup?: string[];
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Flatpak-toolchain config for the `gjsify flatpak` subcommand group.
|
|
563
|
+
*
|
|
564
|
+
* Six of these keys — `runtime`, `runtimeVersion`, `sdkExtensions`,
|
|
565
|
+
* `appendPath`, `finishArgs`, `cleanup` — have a second home at
|
|
566
|
+
* {@link ShipFlatpakOptions}, and `gjsify ship` warns when it reads them from
|
|
567
|
+
* here (ADR 0024 § 8; the window is `utils/ship/flatpak-config.ts`). They are
|
|
568
|
+
* NOT marked `@deprecated`: for the subcommands in this group they are still
|
|
569
|
+
* the only spelling, and those commands have not moved under `ship` yet
|
|
570
|
+
* (`status/open-todos.md`). Nothing else in this block is deprecated at all —
|
|
571
|
+
* the {@link AppMetadata} half is a designed alias, not a legacy one.
|
|
572
|
+
*/
|
|
469
573
|
export interface ConfigDataFlatpak extends AppMetadata {
|
|
470
574
|
/** Reverse-DNS app id, e.g. `eu.jumplink.Learn6502`. Defaults to `package.json#name` if it looks like a reverse-DNS id. */
|
|
471
575
|
appId?: string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default GNOME-Platform runtime version. Bumped per release window.
|
|
3
|
+
* GNOME 50 = April 2026 stable; tracked in
|
|
4
|
+
* https://docs.flathub.org/docs/for-app-authors/requirements.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DEFAULT_GNOME_RUNTIME_VERSION = "50";
|
|
7
|
+
/** Default Freedesktop-Platform runtime version (LTS-ish). */
|
|
8
|
+
export declare const DEFAULT_FREEDESKTOP_RUNTIME_VERSION = "24.08";
|
|
9
|
+
/** Permissive GUI defaults for GTK4 + Adwaita apps. */
|
|
10
|
+
export declare const DEFAULT_GUI_FINISH_ARGS: string[];
|
|
11
|
+
/** Lean defaults for headless CLI tools — no display, no GPU. */
|
|
12
|
+
export declare const DEFAULT_CLI_FINISH_ARGS: string[];
|
|
13
|
+
/**
|
|
14
|
+
* The runtime keys, structurally — not `ConfigDataFlatpak`.
|
|
15
|
+
*
|
|
16
|
+
* Two config blocks answer this question now (`gjsify.flatpak` and
|
|
17
|
+
* `gjsify.ship.flatpak`, § the deprecation window in `utils/ship/flatpak-config.ts`),
|
|
18
|
+
* and a resolver typed to one of them would have to be duplicated for the other.
|
|
19
|
+
*/
|
|
20
|
+
export interface RuntimeSelection {
|
|
21
|
+
runtime?: string;
|
|
22
|
+
runtimeVersion?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ResolvedRuntime {
|
|
25
|
+
runtime: 'gnome' | 'freedesktop';
|
|
26
|
+
runtimeId: string;
|
|
27
|
+
sdk: string;
|
|
28
|
+
runtimeVersion: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Pick the runtime + sdk + version triple from config + CLI overrides.
|
|
32
|
+
* `--runtime` and `--runtime-version` flags win over config values.
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveRuntime(config: RuntimeSelection | undefined, overrides: RuntimeSelection): ResolvedRuntime;
|
|
35
|
+
/**
|
|
36
|
+
* `append-path` for the build sandbox, derived from the declared SDK extensions.
|
|
37
|
+
*
|
|
38
|
+
* `/app/bin` is appended last so a build command finds the app's own binaries
|
|
39
|
+
* without knowing where they landed.
|
|
40
|
+
*/
|
|
41
|
+
export declare function deriveAppendPath(sdkExtensions: readonly string[]): string[];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Which runtime a Flatpak is built against, and what the finished app may do.
|
|
2
|
+
//
|
|
3
|
+
// Lifted out of `commands/flatpak/` when `gjsify ship --target flatpak` became
|
|
4
|
+
// the second caller (ADR 0024 § 8). Same move, same reason, as
|
|
5
|
+
// `utils/app-metadata.ts`: these are facts about the APP, not about whichever
|
|
6
|
+
// command happens to render them, and the second copy is the one that drifts —
|
|
7
|
+
// a `DEFAULT_GNOME_RUNTIME_VERSION` bumped in one place and not the other
|
|
8
|
+
// produces a `ship` Flatpak and a `flatpak init` Flatpak targeting different
|
|
9
|
+
// GNOME releases from the same `package.json`.
|
|
10
|
+
/**
|
|
11
|
+
* Default GNOME-Platform runtime version. Bumped per release window.
|
|
12
|
+
* GNOME 50 = April 2026 stable; tracked in
|
|
13
|
+
* https://docs.flathub.org/docs/for-app-authors/requirements.
|
|
14
|
+
*/
|
|
15
|
+
export const DEFAULT_GNOME_RUNTIME_VERSION = '50';
|
|
16
|
+
/** Default Freedesktop-Platform runtime version (LTS-ish). */
|
|
17
|
+
export const DEFAULT_FREEDESKTOP_RUNTIME_VERSION = '24.08';
|
|
18
|
+
/** Permissive GUI defaults for GTK4 + Adwaita apps. */
|
|
19
|
+
export const DEFAULT_GUI_FINISH_ARGS = ['--device=dri', '--share=ipc', '--socket=fallback-x11', '--socket=wayland'];
|
|
20
|
+
/** Lean defaults for headless CLI tools — no display, no GPU. */
|
|
21
|
+
export const DEFAULT_CLI_FINISH_ARGS = [];
|
|
22
|
+
/**
|
|
23
|
+
* Pick the runtime + sdk + version triple from config + CLI overrides.
|
|
24
|
+
* `--runtime` and `--runtime-version` flags win over config values.
|
|
25
|
+
*/
|
|
26
|
+
export function resolveRuntime(config, overrides) {
|
|
27
|
+
const runtime = (overrides.runtime ?? config?.runtime ?? 'gnome');
|
|
28
|
+
if (runtime !== 'gnome' && runtime !== 'freedesktop') {
|
|
29
|
+
throw new Error(`gjsify flatpak: unknown runtime "${runtime}" (expected "gnome" or "freedesktop")`);
|
|
30
|
+
}
|
|
31
|
+
const runtimeVersion = overrides.runtimeVersion ??
|
|
32
|
+
config?.runtimeVersion ??
|
|
33
|
+
(runtime === 'gnome' ? DEFAULT_GNOME_RUNTIME_VERSION : DEFAULT_FREEDESKTOP_RUNTIME_VERSION);
|
|
34
|
+
if (runtime === 'gnome') {
|
|
35
|
+
return { runtime, runtimeId: 'org.gnome.Platform', sdk: 'org.gnome.Sdk', runtimeVersion };
|
|
36
|
+
}
|
|
37
|
+
return { runtime, runtimeId: 'org.freedesktop.Platform', sdk: 'org.freedesktop.Sdk', runtimeVersion };
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* `append-path` for the build sandbox, derived from the declared SDK extensions.
|
|
41
|
+
*
|
|
42
|
+
* `/app/bin` is appended last so a build command finds the app's own binaries
|
|
43
|
+
* without knowing where they landed.
|
|
44
|
+
*/
|
|
45
|
+
export function deriveAppendPath(sdkExtensions) {
|
|
46
|
+
const out = [];
|
|
47
|
+
for (const ext of sdkExtensions) {
|
|
48
|
+
const m = /^org\.freedesktop\.Sdk\.Extension\.([A-Za-z0-9-]+)$/.exec(ext);
|
|
49
|
+
if (m)
|
|
50
|
+
out.push(`/usr/lib/sdk/${m[1]}/bin`);
|
|
51
|
+
}
|
|
52
|
+
out.push('/app/bin');
|
|
53
|
+
return out;
|
|
54
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
/** The
|
|
1
|
+
/** The bundler-output fields this guard needs, from either engine. */
|
|
2
2
|
export interface GuardedChunk {
|
|
3
3
|
/** Emitted chunk name, for the error message. */
|
|
4
4
|
fileName?: string;
|
|
5
5
|
/** External specifiers the chunk STATICALLY imports (rollup/rolldown contract). */
|
|
6
6
|
imports?: readonly string[];
|
|
7
|
+
/** Emitted source, for the syntax check. Present on a written chunk on both engines. */
|
|
8
|
+
code?: string;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* Bare `node:` specifiers a `--app gjs` bundle may keep as static imports.
|
|
@@ -20,5 +22,57 @@ export declare const GJS_ALLOWED_NODE_IMPORTS: readonly string[];
|
|
|
20
22
|
* allowlist. Sorted, so the error message and any test are stable.
|
|
21
23
|
*/
|
|
22
24
|
export declare function findDisallowedNodeImports(chunks: readonly GuardedChunk[], allowed?: readonly string[]): string[];
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Is `id` a BARE package specifier — the only shape GJS's ESM loader cannot resolve on
|
|
27
|
+
* its own?
|
|
28
|
+
*
|
|
29
|
+
* Relative and absolute paths name a file; anything carrying a URL scheme names a
|
|
30
|
+
* loader GJS either has (`gi:`, `file:`, `resource:`) or will report itself. `node:` is
|
|
31
|
+
* classified BEFORE this, because it has its own message and its own symptom.
|
|
32
|
+
* A win32 drive path (`C:\…`) matches the scheme test, which is the intended answer.
|
|
33
|
+
*/
|
|
34
|
+
export declare function isBareSpecifier(id: string): boolean;
|
|
35
|
+
/** What the caller must tell the guard about this build's own promises. */
|
|
36
|
+
export interface GjsImportPolicy {
|
|
37
|
+
/**
|
|
38
|
+
* The target's own externals predicate — pass
|
|
39
|
+
* `createGjsExternalsPredicate(userExternal)`, the same one `externalsPlugin`
|
|
40
|
+
* enforces, so the guard and the build cannot disagree about what was declared.
|
|
41
|
+
* Omitted, nothing counts as declared.
|
|
42
|
+
*/
|
|
43
|
+
isExternal?: (id: string) => boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Every fileName the build emitted. `chunk.imports` lists sibling CHUNKS by fileName
|
|
46
|
+
* with no `./` prefix, which is indistinguishable from a bare package specifier — so
|
|
47
|
+
* the set is excluded by name rather than guessed at by shape.
|
|
48
|
+
*/
|
|
49
|
+
emitted?: readonly string[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The distinct bare specifiers `chunks` statically import that nothing in this build
|
|
53
|
+
* promised to provide. Sorted, so the error message and any test are stable.
|
|
54
|
+
*/
|
|
55
|
+
export declare function findUnresolvableBareImports(chunks: readonly GuardedChunk[], policy?: GjsImportPolicy): string[];
|
|
56
|
+
/**
|
|
57
|
+
* Throw when a built `--app gjs` bundle statically imports something GJS cannot
|
|
58
|
+
* resolve — a bare `node:` builtin, or any other bare specifier this build did not
|
|
59
|
+
* declare external.
|
|
60
|
+
*
|
|
61
|
+
* The two are reported separately because they have different symptoms and different
|
|
62
|
+
* fixes: a `node:` specifier aborts with "Unsupported URI scheme", any other bare one
|
|
63
|
+
* with "Module not found", and the first means an alias target failed while the second
|
|
64
|
+
* means the dependency is simply not there.
|
|
65
|
+
*/
|
|
66
|
+
export declare function assertGjsBundleLoadable(chunks: readonly GuardedChunk[], outfile: string, policy?: GjsImportPolicy): void;
|
|
67
|
+
/**
|
|
68
|
+
* Throw when a written `--app gjs` chunk is not parseable JavaScript because raw JSX
|
|
69
|
+
* survived into it. See `@gjsify/rolldown-plugin-gjsify`'s `utils/jsx-survival.ts` for
|
|
70
|
+
* why the oracle is a parse and not a pattern, and for the measurement.
|
|
71
|
+
*
|
|
72
|
+
* Called ONLY when the effective JSX setting PRESERVES JSX, which is the only way it can
|
|
73
|
+
* reach an artifact: oxc compiles it otherwise. That is not a cost dodge but the precise
|
|
74
|
+
* condition — though the cost is real, and measured: parsing the repo's largest bundle
|
|
75
|
+
* (`dist/cli.gjs.mjs`, 6.8 MB) takes ~850 ms, which is not worth paying on every GJS
|
|
76
|
+
* build to re-answer a question the transform already settled.
|
|
77
|
+
*/
|
|
78
|
+
export declare function assertGjsBundleParses(chunks: readonly GuardedChunk[], label: string): void;
|
|
@@ -37,6 +37,29 @@
|
|
|
37
37
|
// links the module, so one bad specifier kills the whole bundle. A dynamic
|
|
38
38
|
// `import('node:x')` throws lazily at its call site — a real bug, but not "the artifact
|
|
39
39
|
// cannot load", and not what this gate is for.
|
|
40
|
+
// ## `node:` was never the general case
|
|
41
|
+
//
|
|
42
|
+
// A bare `node:` specifier is one shape of ONE defect: the emitted module imports
|
|
43
|
+
// something the GJS loader cannot resolve. GJS's ESM loader has no node_modules walker
|
|
44
|
+
// and does not follow `package.json#exports`, so ANY bare specifier that survives into a
|
|
45
|
+
// `--app gjs` bundle is dead on arrival — `ImportError: Module not found: <specifier>`,
|
|
46
|
+
// again before one line runs. MEASURED: a `.tsx` entry with no JSX configuration makes
|
|
47
|
+
// oxc default to the automatic runtime with `importSource: 'react'`, the bundle carries
|
|
48
|
+
// `import { jsx } from "react/jsx-runtime"`, rolldown reports that as an
|
|
49
|
+
// `UNRESOLVED_IMPORT` **warning**, `gjsify build` exits 0, and `gjs -m` on the artifact
|
|
50
|
+
// dies with `ImportError: Module not found: react/jsx-runtime`. The `node:`-only guard
|
|
51
|
+
// saw none of it.
|
|
52
|
+
//
|
|
53
|
+
// The legitimate-vs-broken line is the same one `plugins/unresolved-workspace-import.ts`
|
|
54
|
+
// draws one layer up, and for the same reason a blanket "fail on any external" cannot be
|
|
55
|
+
// used: a DECLARED external is a promise the caller made and must be honoured. So the
|
|
56
|
+
// guard asks the target's OWN externals predicate (`createGjsExternalsPredicate`, the one
|
|
57
|
+
// `externalsPlugin` enforces) rather than a second list that can drift, and it ignores
|
|
58
|
+
// everything that is not a bare specifier — `gi://Gtk?version=4.0`, `file:`/`resource:`
|
|
59
|
+
// URLs and relative sibling-chunk paths all name something GJS can resolve on its own.
|
|
60
|
+
// `chunk.imports` also carries the fileNames of other EMITTED chunks, un-prefixed, so the
|
|
61
|
+
// emitted set is passed in and excluded by name.
|
|
62
|
+
import { locateSurvivingJsx, formatSurvivingJsx } from '@gjsify/rolldown-plugin-gjsify';
|
|
40
63
|
/**
|
|
41
64
|
* Bare `node:` specifiers a `--app gjs` bundle may keep as static imports.
|
|
42
65
|
*
|
|
@@ -64,18 +87,104 @@ export function findDisallowedNodeImports(chunks, allowed = GJS_ALLOWED_NODE_IMP
|
|
|
64
87
|
}
|
|
65
88
|
return [...found].sort();
|
|
66
89
|
}
|
|
67
|
-
/**
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
90
|
+
/**
|
|
91
|
+
* Is `id` a BARE package specifier — the only shape GJS's ESM loader cannot resolve on
|
|
92
|
+
* its own?
|
|
93
|
+
*
|
|
94
|
+
* Relative and absolute paths name a file; anything carrying a URL scheme names a
|
|
95
|
+
* loader GJS either has (`gi:`, `file:`, `resource:`) or will report itself. `node:` is
|
|
96
|
+
* classified BEFORE this, because it has its own message and its own symptom.
|
|
97
|
+
* A win32 drive path (`C:\…`) matches the scheme test, which is the intended answer.
|
|
98
|
+
*/
|
|
99
|
+
export function isBareSpecifier(id) {
|
|
100
|
+
if (id.startsWith('.') || id.startsWith('/') || id.startsWith('\\'))
|
|
101
|
+
return false;
|
|
102
|
+
return !/^[A-Za-z][A-Za-z0-9+.-]*:/.test(id);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* The distinct bare specifiers `chunks` statically import that nothing in this build
|
|
106
|
+
* promised to provide. Sorted, so the error message and any test are stable.
|
|
107
|
+
*/
|
|
108
|
+
export function findUnresolvableBareImports(chunks, policy = {}) {
|
|
109
|
+
const emitted = new Set(policy.emitted ?? []);
|
|
110
|
+
const found = new Set();
|
|
111
|
+
for (const chunk of chunks) {
|
|
112
|
+
for (const specifier of chunk.imports ?? []) {
|
|
113
|
+
// `node:` has its own diagnosis; classifying it here too would report one
|
|
114
|
+
// defect twice with two different fixes.
|
|
115
|
+
if (specifier.startsWith('node:'))
|
|
116
|
+
continue;
|
|
117
|
+
if (!isBareSpecifier(specifier))
|
|
118
|
+
continue;
|
|
119
|
+
if (emitted.has(specifier))
|
|
120
|
+
continue;
|
|
121
|
+
if (policy.isExternal?.(specifier))
|
|
122
|
+
continue;
|
|
123
|
+
found.add(specifier);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return [...found].sort();
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Throw when a built `--app gjs` bundle statically imports something GJS cannot
|
|
130
|
+
* resolve — a bare `node:` builtin, or any other bare specifier this build did not
|
|
131
|
+
* declare external.
|
|
132
|
+
*
|
|
133
|
+
* The two are reported separately because they have different symptoms and different
|
|
134
|
+
* fixes: a `node:` specifier aborts with "Unsupported URI scheme", any other bare one
|
|
135
|
+
* with "Module not found", and the first means an alias target failed while the second
|
|
136
|
+
* means the dependency is simply not there.
|
|
137
|
+
*/
|
|
138
|
+
export function assertGjsBundleLoadable(chunks, outfile, policy = {}) {
|
|
139
|
+
const nodeOffenders = findDisallowedNodeImports(chunks);
|
|
140
|
+
if (nodeOffenders.length > 0) {
|
|
141
|
+
throw new Error(`gjsify build --app gjs: ${outfile} still imports ${nodeOffenders.length} bare \`node:\` module(s), ` +
|
|
142
|
+
'which stock GJS cannot resolve — it would fail at load with ' +
|
|
143
|
+
'"ImportError: Unsupported URI scheme for importing: node".\n' +
|
|
144
|
+
nodeOffenders.map((s) => ` - ${s}`).join('\n') +
|
|
145
|
+
'\n\nThese should have been aliased to their `@gjsify/*` polyfills. The usual cause is that the ' +
|
|
146
|
+
'alias TARGET could not be resolved, so the bundler externalised the import instead (look for ' +
|
|
147
|
+
'UNRESOLVED_IMPORT warnings above): e.g. a workspace checkout whose `@gjsify/*` packages have no ' +
|
|
148
|
+
'built `lib/`. Build the workspace first (`gjsify run build:infra`), or fix the resolution, then ' +
|
|
149
|
+
'rebuild.');
|
|
150
|
+
}
|
|
151
|
+
const bareOffenders = findUnresolvableBareImports(chunks, policy);
|
|
152
|
+
if (bareOffenders.length === 0)
|
|
71
153
|
return;
|
|
72
|
-
throw new Error(`gjsify build --app gjs: ${outfile}
|
|
73
|
-
'
|
|
74
|
-
'
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
'
|
|
78
|
-
'
|
|
79
|
-
'
|
|
80
|
-
'
|
|
154
|
+
throw new Error(`gjsify build --app gjs: ${outfile} statically imports ${bareOffenders.length} bare package ` +
|
|
155
|
+
'specifier(s) nothing in this build resolves or declares external. GJS has no node_modules walker ' +
|
|
156
|
+
'and does not follow `package.json#exports`, so it aborts the whole module graph at load with ' +
|
|
157
|
+
'"ImportError: Module not found: <specifier>".\n' +
|
|
158
|
+
bareOffenders.map((s) => ` - ${s}`).join('\n') +
|
|
159
|
+
'\n\nRolldown reports these as UNRESOLVED_IMPORT WARNINGS and re-emits the original specifier, ' +
|
|
160
|
+
'which is why the build reached this point at all. Likely causes:\n' +
|
|
161
|
+
' - the package is not installed — add it as a dependency and `gjsify install`.\n' +
|
|
162
|
+
' - a JSX entry with no JSX configuration: oxc then defaults to the automatic runtime with ' +
|
|
163
|
+
'`importSource: "react"`, so the bundle imports `react/jsx-runtime`. Point ' +
|
|
164
|
+
'`gjsify.bundler.transform.jsx.importSource` (or tsconfig `"jsxImportSource"`) at a runtime ' +
|
|
165
|
+
'this project HAS, or use `"jsx": "preserve"` plus the framework compiler that consumes it.\n' +
|
|
166
|
+
' - the specifier is meant to be provided by the host at runtime — then say so, with ' +
|
|
167
|
+
'`gjsify.bundler.external`.');
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Throw when a written `--app gjs` chunk is not parseable JavaScript because raw JSX
|
|
171
|
+
* survived into it. See `@gjsify/rolldown-plugin-gjsify`'s `utils/jsx-survival.ts` for
|
|
172
|
+
* why the oracle is a parse and not a pattern, and for the measurement.
|
|
173
|
+
*
|
|
174
|
+
* Called ONLY when the effective JSX setting PRESERVES JSX, which is the only way it can
|
|
175
|
+
* reach an artifact: oxc compiles it otherwise. That is not a cost dodge but the precise
|
|
176
|
+
* condition — though the cost is real, and measured: parsing the repo's largest bundle
|
|
177
|
+
* (`dist/cli.gjs.mjs`, 6.8 MB) takes ~850 ms, which is not worth paying on every GJS
|
|
178
|
+
* build to re-answer a question the transform already settled.
|
|
179
|
+
*/
|
|
180
|
+
export function assertGjsBundleParses(chunks, label) {
|
|
181
|
+
for (const chunk of chunks) {
|
|
182
|
+
const code = chunk.code;
|
|
183
|
+
if (typeof code !== 'string' || code.length === 0)
|
|
184
|
+
continue;
|
|
185
|
+
const found = locateSurvivingJsx(code);
|
|
186
|
+
if (found === null)
|
|
187
|
+
continue;
|
|
188
|
+
throw new Error(formatSurvivingJsx(found, chunk.fileName ? `${label} (${chunk.fileName})` : label));
|
|
189
|
+
}
|
|
81
190
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface JsxConfigInput {
|
|
2
|
+
/** `gjsify.bundler.transform.jsx`, exactly as configured (any of oxc's shapes). */
|
|
3
|
+
transformJsx?: unknown;
|
|
4
|
+
/** tsconfig `compilerOptions.jsx`. */
|
|
5
|
+
tsconfigJsx?: string | undefined;
|
|
6
|
+
/** tsconfig `compilerOptions.jsxImportSource` — names the runtime on its own. */
|
|
7
|
+
tsconfigJsxImportSource?: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface JsxConfigVerdict {
|
|
10
|
+
/** Did anything at all name a JSX policy? `false` means oxc's react default applies. */
|
|
11
|
+
configured: boolean;
|
|
12
|
+
/** Will JSX survive the transform, so that a compiler downstream must consume it? */
|
|
13
|
+
preserves: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Read the effective JSX policy.
|
|
17
|
+
*
|
|
18
|
+
* `configured` is deliberately satisfied by ANY value, `false` and an unrecognised string
|
|
19
|
+
* included: the gate's subject is a project that said nothing, not one whose setting this
|
|
20
|
+
* function fails to recognise. `transform.jsx: false` already fails the build loudly from
|
|
21
|
+
* inside oxc (measured: exit 1), which is a legitimate way to answer the question.
|
|
22
|
+
*/
|
|
23
|
+
export declare function describeJsxConfig(input: JsxConfigInput): JsxConfigVerdict;
|
|
24
|
+
/**
|
|
25
|
+
* Flatten Rolldown's three `input` shapes (string, array, name→path record) into the
|
|
26
|
+
* paths themselves. Takes `unknown` on purpose: the caller holds a post-glob-expansion
|
|
27
|
+
* `EntryPoints` from the bundler package, and this module has no business importing that
|
|
28
|
+
* type to look at strings.
|
|
29
|
+
*/
|
|
30
|
+
export declare function collectEntryPaths(entryPoints: unknown): string[];
|
|
31
|
+
/** The first entry point whose extension carries JSX, or `undefined`. */
|
|
32
|
+
export declare function findJsxEntryPoint(entryPoints: readonly string[]): string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* The refusal. Names the file, what the default would do to it, and the routes that answer
|
|
35
|
+
* the question — PRESERVE-plus-compiler first, because that is the one a GTK host wants:
|
|
36
|
+
* `@gjsify/gtk-host/jsx-runtime` is a TYPE surface whose `jsx()`/`jsxs()` THROW on purpose
|
|
37
|
+
* ("a TYPE surface, not an automatic JSX runtime"), so naming it as an `importSource`
|
|
38
|
+
* trades a build that fails for a build that dies at the first element. An error message
|
|
39
|
+
* that recommends the wrong fix is worse than one that recommends none.
|
|
40
|
+
*
|
|
41
|
+
* Scoped to `--app gjs` by its caller: on `--app node`/`--app browser` the react default
|
|
42
|
+
* is a legitimate answer for a project that has react installed, and refusing there would
|
|
43
|
+
* break real builds for a mistake they did not make.
|
|
44
|
+
*/
|
|
45
|
+
export declare function jsxConfigMissingError(entry: string): Error;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// The pre-build JSX question: has this project configured JSX AT ALL, and does what it
|
|
2
|
+
// configured PRESERVE JSX?
|
|
3
|
+
//
|
|
4
|
+
// Neither answer is available from the bundler, and both decide whether a `--app gjs`
|
|
5
|
+
// build can produce anything loadable:
|
|
6
|
+
//
|
|
7
|
+
// - NOTHING configured. oxc's transformer then applies its own default — the AUTOMATIC
|
|
8
|
+
// runtime with `importSource: 'react'` — so a `.tsx` entry emits
|
|
9
|
+
// `import { jsx } from "react/jsx-runtime"`. Rolldown reports the miss as an
|
|
10
|
+
// `UNRESOLVED_IMPORT` WARNING, re-emits the specifier, and the build exits 0; `gjs -m`
|
|
11
|
+
// on the artifact then dies with `ImportError: Module not found: react/jsx-runtime`.
|
|
12
|
+
// MEASURED end to end on a two-line `.tsx` (exit 0, then exit 1 under gjs). The
|
|
13
|
+
// artifact gate in `gjs-bundle-guard.ts` catches it too — but AFTER a full bundle, and
|
|
14
|
+
// it can only name `react/jsx-runtime`, not the `.tsx` the reader has to fix. And the
|
|
15
|
+
// default is never right for this target: `react/jsx-runtime` builds React elements,
|
|
16
|
+
// which render NOTHING on a GTK host even on the project that happens to have react
|
|
17
|
+
// installed.
|
|
18
|
+
// - `preserve` configured. JSX is meant to survive the transform so a framework compiler
|
|
19
|
+
// can take it (`babel-preset-solid`, the Vue SFC compiler). Whether one is REGISTERED
|
|
20
|
+
// is not knowable here — a plugin declares no JSX capability — so this only reports
|
|
21
|
+
// that JSX may survive, and the post-bundle syntax check decides.
|
|
22
|
+
//
|
|
23
|
+
// Both `gjsify.bundler.transform.jsx` and tsconfig `compilerOptions.jsx` reach oxc, and
|
|
24
|
+
// the explicit `transform.jsx` WINS: measured with tsconfig `"jsx": "react-jsx"` +
|
|
25
|
+
// `"jsxImportSource": "solid-js"` and `bundler.transform.jsx: "preserve"` — the artifact
|
|
26
|
+
// kept raw JSX. Measured too, and the reason `preserve` is matched literally rather than
|
|
27
|
+
// by "TS spellings that keep JSX": tsconfig `"jsx": "react-native"`, which TypeScript
|
|
28
|
+
// documents as preserving, is NOT preserved by oxc — it compiled to runtime calls.
|
|
29
|
+
/** The JSX-bearing extensions oxc classifies as JSX-capable. */
|
|
30
|
+
const JSX_SOURCE_RE = /\.(?:jsx|tsx|mjsx|cjsx|mtsx|ctsx)$/i;
|
|
31
|
+
/**
|
|
32
|
+
* Read the effective JSX policy.
|
|
33
|
+
*
|
|
34
|
+
* `configured` is deliberately satisfied by ANY value, `false` and an unrecognised string
|
|
35
|
+
* included: the gate's subject is a project that said nothing, not one whose setting this
|
|
36
|
+
* function fails to recognise. `transform.jsx: false` already fails the build loudly from
|
|
37
|
+
* inside oxc (measured: exit 1), which is a legitimate way to answer the question.
|
|
38
|
+
*/
|
|
39
|
+
export function describeJsxConfig(input) {
|
|
40
|
+
const { transformJsx, tsconfigJsx, tsconfigJsxImportSource } = input;
|
|
41
|
+
const configured = transformJsx !== undefined || tsconfigJsx !== undefined || tsconfigJsxImportSource !== undefined;
|
|
42
|
+
const preserves = transformJsx !== undefined ? transformJsx === 'preserve' : tsconfigJsx === 'preserve';
|
|
43
|
+
return { configured, preserves };
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Flatten Rolldown's three `input` shapes (string, array, name→path record) into the
|
|
47
|
+
* paths themselves. Takes `unknown` on purpose: the caller holds a post-glob-expansion
|
|
48
|
+
* `EntryPoints` from the bundler package, and this module has no business importing that
|
|
49
|
+
* type to look at strings.
|
|
50
|
+
*/
|
|
51
|
+
export function collectEntryPaths(entryPoints) {
|
|
52
|
+
if (typeof entryPoints === 'string')
|
|
53
|
+
return [entryPoints];
|
|
54
|
+
if (Array.isArray(entryPoints))
|
|
55
|
+
return entryPoints.filter((e) => typeof e === 'string');
|
|
56
|
+
if (entryPoints !== null && typeof entryPoints === 'object') {
|
|
57
|
+
return Object.values(entryPoints).filter((e) => typeof e === 'string');
|
|
58
|
+
}
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
/** The first entry point whose extension carries JSX, or `undefined`. */
|
|
62
|
+
export function findJsxEntryPoint(entryPoints) {
|
|
63
|
+
return entryPoints.find((entry) => JSX_SOURCE_RE.test(entry));
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The refusal. Names the file, what the default would do to it, and the routes that answer
|
|
67
|
+
* the question — PRESERVE-plus-compiler first, because that is the one a GTK host wants:
|
|
68
|
+
* `@gjsify/gtk-host/jsx-runtime` is a TYPE surface whose `jsx()`/`jsxs()` THROW on purpose
|
|
69
|
+
* ("a TYPE surface, not an automatic JSX runtime"), so naming it as an `importSource`
|
|
70
|
+
* trades a build that fails for a build that dies at the first element. An error message
|
|
71
|
+
* that recommends the wrong fix is worse than one that recommends none.
|
|
72
|
+
*
|
|
73
|
+
* Scoped to `--app gjs` by its caller: on `--app node`/`--app browser` the react default
|
|
74
|
+
* is a legitimate answer for a project that has react installed, and refusing there would
|
|
75
|
+
* break real builds for a mistake they did not make.
|
|
76
|
+
*/
|
|
77
|
+
export function jsxConfigMissingError(entry) {
|
|
78
|
+
return new Error(`gjsify build --app gjs: ${entry} contains JSX, but nothing configures a JSX transform — not ` +
|
|
79
|
+
'`gjsify.bundler.transform.jsx`, and not tsconfig `compilerOptions.jsx`.\n\n' +
|
|
80
|
+
"Left unset, the bundler's transformer defaults to the automatic runtime with " +
|
|
81
|
+
'`importSource: "react"`, so the bundle would import `react/jsx-runtime`. GJS cannot resolve a ' +
|
|
82
|
+
'bare specifier at all (no node_modules walker, no `exports` map), so the build would exit 0 with ' +
|
|
83
|
+
'an UNRESOLVED_IMPORT warning and the artifact would abort at load with "ImportError: Module not ' +
|
|
84
|
+
'found: react/jsx-runtime" — and where react IS installed it would render React elements, which a ' +
|
|
85
|
+
'GTK host does nothing with.\n\n' +
|
|
86
|
+
'Configure one of:\n' +
|
|
87
|
+
' - PRESERVED JSX plus the framework compiler that consumes it — the route a GTK host wants.\n' +
|
|
88
|
+
' Set `"jsx": "preserve"` (in `gjsify.bundler.transform.jsx` or tsconfig\n' +
|
|
89
|
+
' `compilerOptions.jsx`) and register the compiler under `gjsify.bundler.plugins`:\n' +
|
|
90
|
+
' `babel-preset-solid` for Solid, the Vue SFC compiler for Vue. Pair it with tsconfig\n' +
|
|
91
|
+
' `"jsxImportSource": "@gjsify/gtk-host"` for the TYPES.\n' +
|
|
92
|
+
' - an automatic JSX runtime this project actually has:\n' +
|
|
93
|
+
' "bundler": { "transform": { "jsx": { "importSource": "<pkg exporting ./jsx-runtime>" } } }\n' +
|
|
94
|
+
' or the same in tsconfig: `"jsx": "react-jsx"` + `"jsxImportSource": "<pkg>"`. NOT\n' +
|
|
95
|
+
' `@gjsify/gtk-host` — its `/jsx-runtime` is a TYPE surface and throws when called.\n' +
|
|
96
|
+
' - `"jsx": false`, if this entry should contain no JSX at all: the transformer then\n' +
|
|
97
|
+
' reports the JSX itself instead of compiling it for a runtime that is not there.');
|
|
98
|
+
}
|
|
@@ -26,8 +26,31 @@ export interface ProbeOptions {
|
|
|
26
26
|
retryDelayMs?: number;
|
|
27
27
|
/** Injected delay (tests pass a no-op). Default: real `setTimeout`. */
|
|
28
28
|
sleep?: (ms: number) => Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Does this name exist on the registry? The PACKUMENT oracle — see
|
|
31
|
+
* {@link packumentExists}. Tests inject it; production uses the real fetch.
|
|
32
|
+
*/
|
|
33
|
+
exists?: (registry: string, name: string) => Promise<boolean | null>;
|
|
29
34
|
}
|
|
30
35
|
export declare const PROBE_RETRY_DELAY_MS = 400;
|
|
36
|
+
/**
|
|
37
|
+
* Does the registry serve a packument for this name?
|
|
38
|
+
*
|
|
39
|
+
* THE ORACLE, and the reason it exists: npm's trust endpoint answers `2xx` with an
|
|
40
|
+
* EMPTY LIST for a name that was never published. `classifyTrustList` reads that as
|
|
41
|
+
* `untrusted`, so `gjsify onboard` planned "already on npm, just needs trust" for a
|
|
42
|
+
* package that did not exist — it trusted the name, reported `0 to publish+trust`
|
|
43
|
+
* and published NOTHING. A bootstrap command reporting its own gap as closed, and
|
|
44
|
+
* it is why the v0.36.0 repair failed twice before anyone looked at the registry.
|
|
45
|
+
*
|
|
46
|
+
* `GET <registry>/<name>` is unauthenticated and needs no OTP, so it answers in the
|
|
47
|
+
* one situation that matters: a `--dry-run` before the maintainer has an OTP to
|
|
48
|
+
* hand, where every trust read is `401` and the plan is otherwise empty.
|
|
49
|
+
*
|
|
50
|
+
* `null` means UNDECIDED (network or an unexpected status) — never "absent". A
|
|
51
|
+
* bootstrap that publishes on a failed probe is worse than one that reports blocked.
|
|
52
|
+
*/
|
|
53
|
+
export declare function packumentExists(registry: string, name: string): Promise<boolean | null>;
|
|
31
54
|
/** Default probe concurrency — kept SMALL so a single token never bursts npm. */
|
|
32
55
|
export declare const DEFAULT_PROBE_CONCURRENCY = 4;
|
|
33
56
|
/** Map a classified trust state to the action the onboard sweep should take. */
|