@camstack/system 1.0.3 → 1.0.5
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/addon-runner.js +27 -1
- package/dist/addon-runner.mjs +27 -1
- package/dist/builtins/local-auth/local-auth.addon.js +5 -1518
- package/dist/builtins/local-auth/local-auth.addon.mjs +2 -1503
- package/dist/framework-resolver-hook.mjs +48 -0
- package/dist/graceful-fs-BoR9GuPS.mjs +1423 -0
- package/dist/graceful-fs-lg19SZNz.js +1434 -0
- package/dist/index.js +710 -1751
- package/dist/index.mjs +815 -1849
- package/dist/kernel/addon-installer.d.ts +31 -0
- package/dist/kernel/addon-manifest.d.ts +21 -0
- package/dist/kernel/host-externals.d.ts +12 -0
- package/dist/kernel/index.d.ts +7 -0
- package/dist/kernel/lifecycle/framework-staging.d.ts +15 -0
- package/dist/kernel/lifecycle/job-journal.d.ts +19 -0
- package/dist/kernel/lifecycle/lifecycle-job-engine.d.ts +98 -0
- package/dist/kernel/lifecycle/staging-area.d.ts +22 -0
- package/dist/kernel/moleculer/addon-context-factory.d.ts +13 -1
- package/dist/kernel/moleculer/register-framework-resolver.d.ts +8 -0
- package/dist/{main-rtjOwPBR.mjs → main-BOG1xxwD.mjs} +2 -2
- package/dist/{main-DNnMW7Z2.js → main-B_G1JH3Q.js} +31 -31
- package/dist/{manifest-python-deps-D1DbAQEv.js → manifest-python-deps-B4BmMoGT.js} +259 -0
- package/dist/{manifest-python-deps-DZsKTbs1.mjs → manifest-python-deps-CXbKrOdk.mjs} +256 -2
- package/dist/semver-BQBSy1FJ.mjs +1504 -0
- package/dist/semver-D3n3E_fi.js +1515 -0
- package/package.json +3 -2
|
@@ -86,6 +86,17 @@ export declare class AddonInstaller {
|
|
|
86
86
|
* @param packages — optional custom package list (default: REQUIRED_PACKAGES)
|
|
87
87
|
*/
|
|
88
88
|
ensureRequiredPackages(packages?: readonly string[]): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Reconcile the install manifest with the addons actually present on
|
|
91
|
+
* disk. Seeded addons (baked into the image and copied verbatim by the
|
|
92
|
+
* container entrypoint) never pass through an `install*` codepath, so
|
|
93
|
+
* they are missing from `manifest.json` and `applyUpdate` would reject
|
|
94
|
+
* them with "not currently tracked in manifest". Call this once after
|
|
95
|
+
* `ensureRequiredPackages` so every on-disk addon is updatable.
|
|
96
|
+
*
|
|
97
|
+
* Returns the number of manifest entries added.
|
|
98
|
+
*/
|
|
99
|
+
reconcileManifest(): number;
|
|
89
100
|
/**
|
|
90
101
|
* Install a single addon — on-demand installer used by AddonPackageService
|
|
91
102
|
* (admin UI "Install addon" / "Reinstall" buttons).
|
|
@@ -182,6 +193,26 @@ export declare class AddonInstaller {
|
|
|
182
193
|
version: string;
|
|
183
194
|
backupDir: string;
|
|
184
195
|
}>;
|
|
196
|
+
/**
|
|
197
|
+
* Apply an update from a pre-validated staged directory — the fast
|
|
198
|
+
* swap-from-staged path that skips npm entirely.
|
|
199
|
+
*
|
|
200
|
+
* Mirrors `applyUpdate` exactly for backup/restore/manifest, but
|
|
201
|
+
* replaces step 2 ("install new version") with an atomic directory
|
|
202
|
+
* move of `stagedPath` into `addonDir`.
|
|
203
|
+
*
|
|
204
|
+
* On cross-device move (EXDEV) falls back to a recursive copy followed
|
|
205
|
+
* by removal of the staged directory. On any swap failure the backup is
|
|
206
|
+
* restored and the error is rethrown — identical recovery to `applyUpdate`.
|
|
207
|
+
*
|
|
208
|
+
* Throws if the package is not tracked in the manifest or if `addonDir`
|
|
209
|
+
* is missing (same preconditions as `applyUpdate`).
|
|
210
|
+
*/
|
|
211
|
+
applyUpdateFromStaged(packageName: string, version: string, stagedPath: string): Promise<{
|
|
212
|
+
name: string;
|
|
213
|
+
version: string;
|
|
214
|
+
backupDir: string;
|
|
215
|
+
}>;
|
|
185
216
|
/**
|
|
186
217
|
* Roll back an addon to its most recent backup. Used after an update
|
|
187
218
|
* passes installation but fails its post-restart health check.
|
|
@@ -66,6 +66,27 @@ export declare class AddonManifest {
|
|
|
66
66
|
* Useful when an external process may have written the manifest.
|
|
67
67
|
*/
|
|
68
68
|
invalidate(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Reconcile the manifest with what is actually present on disk.
|
|
71
|
+
*
|
|
72
|
+
* For every `@scope/<pkg>` directory under `addonsDir` that has a
|
|
73
|
+
* readable `package.json` but NO manifest entry yet, add one with
|
|
74
|
+
* source `'seed'`. Existing entries are left untouched (their source,
|
|
75
|
+
* version and timestamps are authoritative — a later install/update
|
|
76
|
+
* overwrites them through `upsert`).
|
|
77
|
+
*
|
|
78
|
+
* Why this exists: addons baked into the Docker/Electron image are
|
|
79
|
+
* copied straight into `addonsDir` by the container entrypoint (the
|
|
80
|
+
* launcher's `ensureRequiredPackages` then sees `package.json` already
|
|
81
|
+
* present and skips, never calling `upsert`). Without this reconcile
|
|
82
|
+
* those seeded addons stay absent from the manifest, so `applyUpdate`
|
|
83
|
+
* rejects them with "not currently tracked in manifest" — which is
|
|
84
|
+
* exactly what broke "Update all" on a fresh image. Idempotent and
|
|
85
|
+
* safe to run on every boot.
|
|
86
|
+
*
|
|
87
|
+
* Returns the number of entries added.
|
|
88
|
+
*/
|
|
89
|
+
reconcileFromDisk(addonsDir: string): number;
|
|
69
90
|
/**
|
|
70
91
|
* Migration helper: if the manifest is empty but the addons directory
|
|
71
92
|
* has packages with `.install-source` markers (the legacy per-addon
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The bare specifiers an ESM addon may leave unbundled and expect the HOST
|
|
3
|
+
* framework to provide. Self-contained addons (the standard) inline
|
|
4
|
+
* @camstack/types, @camstack/sdk, zod, @trpc/* — so for them only
|
|
5
|
+
* @camstack/system + @camstack/shm-ring survive. Framework-mode (legacy)
|
|
6
|
+
* addons additionally leave the types/sdk/zod/trpc set external. Listing the
|
|
7
|
+
* full union here lets one resolver hook serve both modes: for a self-contained
|
|
8
|
+
* addon the extra entries simply never appear as live imports.
|
|
9
|
+
*/
|
|
10
|
+
export declare const HOST_EXTERNAL_SPECIFIERS: readonly string[];
|
|
11
|
+
/** True when `specifier` is one of the host-provided packages or a subpath of one. */
|
|
12
|
+
export declare function isHostExternal(specifier: string): boolean;
|
package/dist/kernel/index.d.ts
CHANGED
|
@@ -72,3 +72,10 @@ export { RingBuffer } from './utils/ring-buffer.js';
|
|
|
72
72
|
export * from './transport/index.js';
|
|
73
73
|
export { ReadinessRegistry, ReadinessTimeoutError, readinessKey, scopeKey, emitDownForOwnedCaps, } from '@camstack/types';
|
|
74
74
|
export type { ReadinessHandler, ReadinessTransition, AwaitReadyOptions, ReadinessRegistryOptions, } from '@camstack/types';
|
|
75
|
+
export { JobJournal } from './lifecycle/job-journal.js';
|
|
76
|
+
export { StagingArea } from './lifecycle/staging-area.js';
|
|
77
|
+
export { LifecycleJobEngine } from './lifecycle/lifecycle-job-engine.js';
|
|
78
|
+
export type { ApplyAddonUpdateFn, EmitFn, StageFrameworkFn, RequestFrameworkSwapFn, } from './lifecycle/lifecycle-job-engine.js';
|
|
79
|
+
export type { TarballFetcher, ExtractFn } from './lifecycle/staging-area.js';
|
|
80
|
+
export { stageFrameworkLockstep, FRAMEWORK_LOCKSTEP } from './lifecycle/framework-staging.js';
|
|
81
|
+
export type { StageFrameworkInput } from './lifecycle/framework-staging.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TarballFetcher, ExtractFn } from './staging-area.js';
|
|
2
|
+
import { FrameworkSwapPackage } from '@camstack/types';
|
|
3
|
+
export declare const FRAMEWORK_LOCKSTEP: readonly ["@camstack/system", "@camstack/types", "@camstack/sdk", "@camstack/shm-ring"];
|
|
4
|
+
export interface StageFrameworkInput {
|
|
5
|
+
readonly jobId: string;
|
|
6
|
+
readonly toVersion: string;
|
|
7
|
+
readonly frameworkDir: string;
|
|
8
|
+
readonly stagingDir: string;
|
|
9
|
+
readonly fetchTarball: TarballFetcher;
|
|
10
|
+
readonly extract: ExtractFn;
|
|
11
|
+
readonly resolveVersion: (name: string) => Promise<string>;
|
|
12
|
+
readonly currentVersionOf: (name: string) => string | null;
|
|
13
|
+
readonly signal: AbortSignal;
|
|
14
|
+
}
|
|
15
|
+
export declare function stageFrameworkLockstep(input: StageFrameworkInput): Promise<FrameworkSwapPackage[]>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LifecycleJob, LifecycleTask, TaskLogEntry } from '@camstack/types';
|
|
2
|
+
export declare class JobJournal {
|
|
3
|
+
private readonly jobsDir;
|
|
4
|
+
private readonly indexPath;
|
|
5
|
+
constructor(jobsDir: string);
|
|
6
|
+
private jobPath;
|
|
7
|
+
private writeAtomic;
|
|
8
|
+
private readIndex;
|
|
9
|
+
private addToIndex;
|
|
10
|
+
createJob(job: LifecycleJob): void;
|
|
11
|
+
getJob(id: string): LifecycleJob | null;
|
|
12
|
+
listJobs(opts?: {
|
|
13
|
+
activeOnly?: boolean;
|
|
14
|
+
}): LifecycleJob[];
|
|
15
|
+
private mutate;
|
|
16
|
+
patchTask(jobId: string, taskId: string, patch: Partial<LifecycleTask>): LifecycleJob;
|
|
17
|
+
appendLog(jobId: string, taskId: string, entry: TaskLogEntry): LifecycleJob;
|
|
18
|
+
setJobState(jobId: string, state: LifecycleJob['state']): LifecycleJob;
|
|
19
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { JobJournal } from './job-journal.js';
|
|
2
|
+
import { StagingArea } from './staging-area.js';
|
|
3
|
+
import { LifecycleJob, LifecycleTask, TaskLogEntry, FrameworkSwapPackage } from '@camstack/types';
|
|
4
|
+
export type ApplyAddonUpdateFn = (input: {
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
stagedPath: string;
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
export type EmitFn = (kind: 'progress' | 'log', job: LifecycleJob, entry?: TaskLogEntry) => void;
|
|
10
|
+
export type StageFrameworkFn = (task: LifecycleTask, signal: AbortSignal) => Promise<FrameworkSwapPackage[]>;
|
|
11
|
+
export type RequestFrameworkSwapFn = (input: {
|
|
12
|
+
jobId: string;
|
|
13
|
+
taskId: string;
|
|
14
|
+
packages: FrameworkSwapPackage[];
|
|
15
|
+
}) => void;
|
|
16
|
+
interface Deps {
|
|
17
|
+
readonly journal: JobJournal;
|
|
18
|
+
readonly staging: StagingArea;
|
|
19
|
+
readonly applyAddonUpdate: ApplyAddonUpdateFn;
|
|
20
|
+
readonly emit: EmitFn;
|
|
21
|
+
readonly now: () => number;
|
|
22
|
+
readonly fetchTimeoutMs?: number;
|
|
23
|
+
readonly fetchConcurrency?: number;
|
|
24
|
+
readonly stageFramework?: StageFrameworkFn;
|
|
25
|
+
readonly requestFrameworkSwap?: RequestFrameworkSwapFn;
|
|
26
|
+
/**
|
|
27
|
+
* Predicate used by `reconcileJob` to decide whether a task's recorded
|
|
28
|
+
* `stagedPath` directory still exists on disk (so apply can reuse it instead
|
|
29
|
+
* of re-fetching). Defaults to `fs.existsSync`.
|
|
30
|
+
*/
|
|
31
|
+
readonly stagedPathExists?: (p: string) => boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare class LifecycleJobEngine {
|
|
34
|
+
private readonly deps;
|
|
35
|
+
constructor(deps: Deps);
|
|
36
|
+
private advance;
|
|
37
|
+
/**
|
|
38
|
+
* Fetch + stage a single addon task (advancing it to `staged`), wrapped in a
|
|
39
|
+
* per-task abort timeout. On success the resolved `stagedPath` is returned; on
|
|
40
|
+
* failure the task is marked `failed` and `null` is returned (so the apply
|
|
41
|
+
* phase skips it). Other tasks are unaffected.
|
|
42
|
+
*/
|
|
43
|
+
private fetchAddonTask;
|
|
44
|
+
/**
|
|
45
|
+
* Apply a single already-staged addon task serially:
|
|
46
|
+
* `validating` → `applying` → applyAddonUpdate → `restarting` → `done`.
|
|
47
|
+
* Returns true on success, false if the apply throws (task marked `failed`).
|
|
48
|
+
*/
|
|
49
|
+
private applyAddonTask;
|
|
50
|
+
/**
|
|
51
|
+
* Run the framework task: stage lockstep → `staged` → requestFrameworkSwap.
|
|
52
|
+
* In production the process exits after requestFrameworkSwap and the reboot
|
|
53
|
+
* finalizes the job, so this returns the current durable job WITHOUT
|
|
54
|
+
* finalization. Returns null only if the framework deps are not wired (the
|
|
55
|
+
* task is marked `failed` and the caller finalizes the job).
|
|
56
|
+
*/
|
|
57
|
+
private runFrameworkTask;
|
|
58
|
+
/**
|
|
59
|
+
* Run the addon fetch phase with a bounded-concurrency worker pool. At most
|
|
60
|
+
* `fetchConcurrency` fetches are in flight at once; completion order may vary
|
|
61
|
+
* but the returned outcomes preserve the input task order.
|
|
62
|
+
*/
|
|
63
|
+
private fetchAddonsBounded;
|
|
64
|
+
/**
|
|
65
|
+
* §10 boot reconcile: re-drive every NON-TERMINAL addon task of a job that
|
|
66
|
+
* was interrupted mid-flight (e.g. a crash) from its on-disk checkpoint.
|
|
67
|
+
*
|
|
68
|
+
* Framework tasks are LEFT UNTOUCHED — they are owned by the F2
|
|
69
|
+
* `resumeFrameworkSwapJob` path (which marks `applied`→`done` on a healthy
|
|
70
|
+
* reboot). Terminal addon tasks (`done`/`failed`/`skipped`) are skipped.
|
|
71
|
+
*
|
|
72
|
+
* Apply is idempotent (`applyAddonUpdate` backs up the live dir + restores on
|
|
73
|
+
* failure), so every non-terminal addon phase collapses to:
|
|
74
|
+
* ensure staged (reuse a still-valid `stagedPath` or re-fetch) → apply → done;
|
|
75
|
+
* on failure → `failed`.
|
|
76
|
+
*
|
|
77
|
+
* The job is finalized (`completed`/`partially-failed`/`failed` + staging
|
|
78
|
+
* cleanup) ONLY when ALL tasks — including any framework task — are terminal.
|
|
79
|
+
* If a framework task is still non-terminal the job is LEFT `running` (the
|
|
80
|
+
* reboot/F2 path finalizes it).
|
|
81
|
+
*/
|
|
82
|
+
reconcileJob(job: LifecycleJob): Promise<LifecycleJob>;
|
|
83
|
+
private isTerminal;
|
|
84
|
+
/**
|
|
85
|
+
* Re-drive a single non-terminal addon task: reuse a still-valid `stagedPath`
|
|
86
|
+
* when present (idempotent re-apply), otherwise re-fetch + stage, then apply.
|
|
87
|
+
*/
|
|
88
|
+
private reconcileAddonTask;
|
|
89
|
+
/**
|
|
90
|
+
* Finalize a reconciled job: `completed` if all addon tasks succeeded,
|
|
91
|
+
* `failed` if all failed, `partially-failed` if mixed — but ONLY when every
|
|
92
|
+
* task (including framework) is terminal. If any task is still non-terminal
|
|
93
|
+
* (a framework task pending its reboot resume), leave the job `running`.
|
|
94
|
+
*/
|
|
95
|
+
private finalizeReconciledJob;
|
|
96
|
+
runJob(job: LifecycleJob): Promise<LifecycleJob>;
|
|
97
|
+
}
|
|
98
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type TarballFetcher = (name: string, version: string, signal: AbortSignal) => Promise<Buffer>;
|
|
2
|
+
export type ExtractFn = (tgz: Buffer, destDir: string) => Promise<void>;
|
|
3
|
+
interface StagingAreaDeps {
|
|
4
|
+
readonly fetchTarball: TarballFetcher;
|
|
5
|
+
readonly extract: ExtractFn;
|
|
6
|
+
}
|
|
7
|
+
interface FetchAndStageInput {
|
|
8
|
+
readonly jobId: string;
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly version: string;
|
|
11
|
+
readonly signal: AbortSignal;
|
|
12
|
+
}
|
|
13
|
+
export declare class StagingArea {
|
|
14
|
+
private readonly stagingDir;
|
|
15
|
+
private readonly deps;
|
|
16
|
+
constructor(stagingDir: string, deps: StagingAreaDeps);
|
|
17
|
+
fetchAndStage(input: FetchAndStageInput): Promise<{
|
|
18
|
+
stagedPath: string;
|
|
19
|
+
}>;
|
|
20
|
+
cleanup(jobId: string): void;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ServiceBroker } from 'moleculer';
|
|
2
|
-
import { InternalAddonContext, AddonDeclaration, IStorageProvider, IScopedLogger, IClusterBroker } from '@camstack/types';
|
|
2
|
+
import { InternalAddonContext, AddonDeclaration, IStorageProvider, IScopedLogger, IClusterBroker, StorageLocationDeclaration } from '@camstack/types';
|
|
3
3
|
import { DeviceRegistry } from '../device-registry.js';
|
|
4
4
|
import { CapabilityRegistry } from '../capability-registry.js';
|
|
5
5
|
import { CapCallInput } from '../transport/index.js';
|
|
@@ -65,6 +65,18 @@ interface AddonContextOptions {
|
|
|
65
65
|
* facility still serves locally but nothing advertises it (tests/isolation).
|
|
66
66
|
*/
|
|
67
67
|
readonly dataPlaneSink?: DataPlaneSink;
|
|
68
|
+
/**
|
|
69
|
+
* Per-addon storage-location declarations (one inner array per addon's
|
|
70
|
+
* `camstack.addons[].storageLocations`). Surfaced on
|
|
71
|
+
* `ctx.kernel.listStorageLocationDeclarations` so the storage-orchestrator
|
|
72
|
+
* can seed the default locations (`addons-data:default`, …) on this node.
|
|
73
|
+
*
|
|
74
|
+
* The hub wires this from its AddonRegistry; agents/forked workers (which
|
|
75
|
+
* build their context through this factory) MUST pass it too, or the
|
|
76
|
+
* orchestrator seeds nothing and `sqlite-settings` aborts boot with
|
|
77
|
+
* "No default storage location configured for type addons-data".
|
|
78
|
+
*/
|
|
79
|
+
readonly listStorageLocationDeclarations?: () => StorageLocationDeclaration[][];
|
|
68
80
|
}
|
|
69
81
|
/**
|
|
70
82
|
* Broker-mode entry point — UNCHANGED public signature. The hub
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the ESM resolver hook so this runner's addon imports of the
|
|
3
|
+
* host-provided packages (@camstack/system, @camstack/shm-ring, …) resolve from
|
|
4
|
+
* `frameworkDir/node_modules` instead of failing to walk up from the addon's
|
|
5
|
+
* isolated `/data/addons/<addon>` folder. No-op in dev (frameworkDir unset),
|
|
6
|
+
* where workspace symlinks already resolve the framework.
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerFrameworkResolver(frameworkDir: string | undefined): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, r as __exportAll, t as __commonJSMin } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as require_src$5, t as require_graceful_fs } from "./
|
|
2
|
+
import { t as require_semver } from "./semver-BQBSy1FJ.mjs";
|
|
3
|
+
import { n as require_src$5, t as require_graceful_fs } from "./graceful-fs-BoR9GuPS.mjs";
|
|
4
4
|
import { t as require_tar } from "./tar-ByMOPNM0.mjs";
|
|
5
5
|
//#region ../../node_modules/universalify/index.js
|
|
6
6
|
var require_universalify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const
|
|
3
|
-
const
|
|
2
|
+
const require_semver$1 = require("./semver-D3n3E_fi.js");
|
|
3
|
+
const require_graceful_fs$1 = require("./graceful-fs-lg19SZNz.js");
|
|
4
4
|
const require_tar$1 = require("./tar-BgAEMRBR.js");
|
|
5
5
|
//#region ../../node_modules/universalify/index.js
|
|
6
6
|
var require_universalify = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
|
|
@@ -28,7 +28,7 @@ var require_universalify = /* @__PURE__ */ require_chunk.__commonJSMin(((exports
|
|
|
28
28
|
//#region ../../node_modules/fs-extra/lib/fs/index.js
|
|
29
29
|
var require_fs = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
|
|
30
30
|
var u = require_universalify().fromCallback;
|
|
31
|
-
var fs =
|
|
31
|
+
var fs = require_graceful_fs$1.require_graceful_fs();
|
|
32
32
|
var api = [
|
|
33
33
|
"access",
|
|
34
34
|
"appendFile",
|
|
@@ -189,7 +189,7 @@ var require_path_exists = /* @__PURE__ */ require_chunk.__commonJSMin(((exports,
|
|
|
189
189
|
//#endregion
|
|
190
190
|
//#region ../../node_modules/fs-extra/lib/util/utimes.js
|
|
191
191
|
var require_utimes = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
192
|
-
var fs =
|
|
192
|
+
var fs = require_graceful_fs$1.require_graceful_fs();
|
|
193
193
|
function utimesMillis(path, atime, mtime, callback) {
|
|
194
194
|
fs.open(path, "r+", (err, fd) => {
|
|
195
195
|
if (err) return callback(err);
|
|
@@ -341,7 +341,7 @@ var require_stat = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module
|
|
|
341
341
|
//#endregion
|
|
342
342
|
//#region ../../node_modules/fs-extra/lib/copy/copy.js
|
|
343
343
|
var require_copy$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
344
|
-
var fs =
|
|
344
|
+
var fs = require_graceful_fs$1.require_graceful_fs();
|
|
345
345
|
var path$20 = require("path");
|
|
346
346
|
var mkdirs = require_mkdirs().mkdirs;
|
|
347
347
|
var pathExists = require_path_exists().pathExists;
|
|
@@ -510,7 +510,7 @@ var require_copy$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
510
510
|
//#endregion
|
|
511
511
|
//#region ../../node_modules/fs-extra/lib/copy/copy-sync.js
|
|
512
512
|
var require_copy_sync = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
513
|
-
var fs =
|
|
513
|
+
var fs = require_graceful_fs$1.require_graceful_fs();
|
|
514
514
|
var path$19 = require("path");
|
|
515
515
|
var mkdirsSync = require_mkdirs().mkdirsSync;
|
|
516
516
|
var utimesMillisSync = require_utimes().utimesMillisSync;
|
|
@@ -630,7 +630,7 @@ var require_copy = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module
|
|
|
630
630
|
//#endregion
|
|
631
631
|
//#region ../../node_modules/fs-extra/lib/remove/rimraf.js
|
|
632
632
|
var require_rimraf = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
633
|
-
var fs =
|
|
633
|
+
var fs = require_graceful_fs$1.require_graceful_fs();
|
|
634
634
|
var path$18 = require("path");
|
|
635
635
|
var assert = require("assert");
|
|
636
636
|
var isWindows = process.platform === "win32";
|
|
@@ -805,7 +805,7 @@ var require_rimraf = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
805
805
|
//#endregion
|
|
806
806
|
//#region ../../node_modules/fs-extra/lib/remove/index.js
|
|
807
807
|
var require_remove = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
808
|
-
var fs =
|
|
808
|
+
var fs = require_graceful_fs$1.require_graceful_fs();
|
|
809
809
|
var u = require_universalify().fromCallback;
|
|
810
810
|
var rimraf = require_rimraf();
|
|
811
811
|
function remove(path, callback) {
|
|
@@ -868,7 +868,7 @@ var require_empty = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
868
868
|
var require_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
869
869
|
var u = require_universalify().fromCallback;
|
|
870
870
|
var path$16 = require("path");
|
|
871
|
-
var fs =
|
|
871
|
+
var fs = require_graceful_fs$1.require_graceful_fs();
|
|
872
872
|
var mkdir = require_mkdirs();
|
|
873
873
|
function createFile(file, callback) {
|
|
874
874
|
function makeFile() {
|
|
@@ -920,7 +920,7 @@ var require_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module
|
|
|
920
920
|
var require_link = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
921
921
|
var u = require_universalify().fromCallback;
|
|
922
922
|
var path$15 = require("path");
|
|
923
|
-
var fs =
|
|
923
|
+
var fs = require_graceful_fs$1.require_graceful_fs();
|
|
924
924
|
var mkdir = require_mkdirs();
|
|
925
925
|
var pathExists = require_path_exists().pathExists;
|
|
926
926
|
var { areIdentical } = require_stat();
|
|
@@ -976,7 +976,7 @@ var require_link = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module
|
|
|
976
976
|
//#region ../../node_modules/fs-extra/lib/ensure/symlink-paths.js
|
|
977
977
|
var require_symlink_paths = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
978
978
|
var path$14 = require("path");
|
|
979
|
-
var fs =
|
|
979
|
+
var fs = require_graceful_fs$1.require_graceful_fs();
|
|
980
980
|
var pathExists = require_path_exists().pathExists;
|
|
981
981
|
/**
|
|
982
982
|
* Function that returns two types of paths, one relative to symlink, and one
|
|
@@ -1067,7 +1067,7 @@ var require_symlink_paths = /* @__PURE__ */ require_chunk.__commonJSMin(((export
|
|
|
1067
1067
|
//#endregion
|
|
1068
1068
|
//#region ../../node_modules/fs-extra/lib/ensure/symlink-type.js
|
|
1069
1069
|
var require_symlink_type = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
1070
|
-
var fs =
|
|
1070
|
+
var fs = require_graceful_fs$1.require_graceful_fs();
|
|
1071
1071
|
function symlinkType(srcpath, type, callback) {
|
|
1072
1072
|
callback = typeof type === "function" ? type : callback;
|
|
1073
1073
|
type = typeof type === "function" ? false : type;
|
|
@@ -1204,7 +1204,7 @@ var require_utils = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
1204
1204
|
var require_jsonfile$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
1205
1205
|
var _fs;
|
|
1206
1206
|
try {
|
|
1207
|
-
_fs =
|
|
1207
|
+
_fs = require_graceful_fs$1.require_graceful_fs();
|
|
1208
1208
|
} catch (_) {
|
|
1209
1209
|
_fs = require("fs");
|
|
1210
1210
|
}
|
|
@@ -1276,7 +1276,7 @@ var require_jsonfile = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
1276
1276
|
//#region ../../node_modules/fs-extra/lib/output-file/index.js
|
|
1277
1277
|
var require_output_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
1278
1278
|
var u = require_universalify().fromCallback;
|
|
1279
|
-
var fs =
|
|
1279
|
+
var fs = require_graceful_fs$1.require_graceful_fs();
|
|
1280
1280
|
var path$12 = require("path");
|
|
1281
1281
|
var mkdir = require_mkdirs();
|
|
1282
1282
|
var pathExists = require_path_exists().pathExists;
|
|
@@ -1344,7 +1344,7 @@ var require_json = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module
|
|
|
1344
1344
|
//#endregion
|
|
1345
1345
|
//#region ../../node_modules/fs-extra/lib/move/move.js
|
|
1346
1346
|
var require_move$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
1347
|
-
var fs =
|
|
1347
|
+
var fs = require_graceful_fs$1.require_graceful_fs();
|
|
1348
1348
|
var path$11 = require("path");
|
|
1349
1349
|
var copy = require_copy().copy;
|
|
1350
1350
|
var remove = require_remove().remove;
|
|
@@ -1408,7 +1408,7 @@ var require_move$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
1408
1408
|
//#endregion
|
|
1409
1409
|
//#region ../../node_modules/fs-extra/lib/move/move-sync.js
|
|
1410
1410
|
var require_move_sync = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
1411
|
-
var fs =
|
|
1411
|
+
var fs = require_graceful_fs$1.require_graceful_fs();
|
|
1412
1412
|
var path$10 = require("path");
|
|
1413
1413
|
var copySync = require_copy().copySync;
|
|
1414
1414
|
var removeSync = require_remove().removeSync;
|
|
@@ -1908,7 +1908,7 @@ var init_abi_registry = require_chunk.__esmMin((() => {
|
|
|
1908
1908
|
//#endregion
|
|
1909
1909
|
//#region ../../node_modules/node-abi/index.js
|
|
1910
1910
|
var require_node_abi = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
|
|
1911
|
-
var semver =
|
|
1911
|
+
var semver = require_semver$1.require_semver();
|
|
1912
1912
|
function getNextTarget(runtime, targets) {
|
|
1913
1913
|
if (targets == null) targets = allTargets;
|
|
1914
1914
|
var latest = targets.filter(function(t) {
|
|
@@ -2247,7 +2247,7 @@ var require_cache = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
|
|
|
2247
2247
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2248
2248
|
exports.generateCacheKey = exports.lookupModuleState = exports.cacheModuleState = void 0;
|
|
2249
2249
|
var crypto_1 = __importDefault(require("crypto"));
|
|
2250
|
-
var debug_1 = __importDefault(
|
|
2250
|
+
var debug_1 = __importDefault(require_graceful_fs$1.require_src());
|
|
2251
2251
|
var fs_extra_1 = __importDefault(require_lib());
|
|
2252
2252
|
var path_1$5 = __importDefault(require("path"));
|
|
2253
2253
|
var zlib_1 = __importDefault(require("zlib"));
|
|
@@ -8135,7 +8135,7 @@ var require_fetcher = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) =>
|
|
|
8135
8135
|
};
|
|
8136
8136
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8137
8137
|
exports.fetch = void 0;
|
|
8138
|
-
var debug_1 = __importDefault(
|
|
8138
|
+
var debug_1 = __importDefault(require_graceful_fs$1.require_src());
|
|
8139
8139
|
var got_1 = __importDefault(require_source());
|
|
8140
8140
|
var d = (0, debug_1.default)("electron-rebuild");
|
|
8141
8141
|
function sleep(n) {
|
|
@@ -8695,7 +8695,7 @@ var require_sysroot_fetcher = /* @__PURE__ */ require_chunk.__commonJSMin(((expo
|
|
|
8695
8695
|
exports.downloadLinuxSysroot = void 0;
|
|
8696
8696
|
var cross_spawn_promise_1 = require_src();
|
|
8697
8697
|
var crypto = __importStar(require("crypto"));
|
|
8698
|
-
var debug_1 = __importDefault(
|
|
8698
|
+
var debug_1 = __importDefault(require_graceful_fs$1.require_src());
|
|
8699
8699
|
var fs = __importStar(require_lib());
|
|
8700
8700
|
var path$5 = __importStar(require("path"));
|
|
8701
8701
|
var constants_1 = require_constants();
|
|
@@ -8775,7 +8775,7 @@ var require_clang_fetcher = /* @__PURE__ */ require_chunk.__commonJSMin(((export
|
|
|
8775
8775
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8776
8776
|
exports.getClangEnvironmentVars = void 0;
|
|
8777
8777
|
var cp = __importStar(require("child_process"));
|
|
8778
|
-
var debug_1 = __importDefault(
|
|
8778
|
+
var debug_1 = __importDefault(require_graceful_fs$1.require_src());
|
|
8779
8779
|
var fs = __importStar(require_lib());
|
|
8780
8780
|
var path$4 = __importStar(require("path"));
|
|
8781
8781
|
var tar = __importStar(require_tar$1.require_tar());
|
|
@@ -8876,7 +8876,7 @@ var require_clang_fetcher = /* @__PURE__ */ require_chunk.__commonJSMin(((export
|
|
|
8876
8876
|
//#endregion
|
|
8877
8877
|
//#region ../../node_modules/node-api-version/index.js
|
|
8878
8878
|
var require_node_api_version = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
|
|
8879
|
-
var semver =
|
|
8879
|
+
var semver = require_semver$1.require_semver();
|
|
8880
8880
|
var nodeApiVersionRanges = [
|
|
8881
8881
|
[">=24 || ^22.14 || ^23.6", 10],
|
|
8882
8882
|
[">=21 || ^18.17 || ^20.3", 9],
|
|
@@ -9045,10 +9045,10 @@ var require_node_gyp = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) =>
|
|
|
9045
9045
|
};
|
|
9046
9046
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9047
9047
|
exports.NodeGyp = void 0;
|
|
9048
|
-
var debug_1 = __importDefault(
|
|
9048
|
+
var debug_1 = __importDefault(require_graceful_fs$1.require_src());
|
|
9049
9049
|
var detect_libc_1 = __importDefault(require_detect_libc());
|
|
9050
9050
|
var path_1$3 = __importDefault(require("path"));
|
|
9051
|
-
var semver_1 = __importDefault(
|
|
9051
|
+
var semver_1 = __importDefault(require_semver$1.require_semver());
|
|
9052
9052
|
var constants_1 = require_constants();
|
|
9053
9053
|
var clang_fetcher_1 = require_clang_fetcher();
|
|
9054
9054
|
var __1 = require_module_type();
|
|
@@ -9171,7 +9171,7 @@ var require_prebuildify = /* @__PURE__ */ require_chunk.__commonJSMin(((exports)
|
|
|
9171
9171
|
};
|
|
9172
9172
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9173
9173
|
exports.Prebuildify = exports.determineNativePrebuildExtension = exports.determineNativePrebuildArch = void 0;
|
|
9174
|
-
var debug_1 = __importDefault(
|
|
9174
|
+
var debug_1 = __importDefault(require_graceful_fs$1.require_src());
|
|
9175
9175
|
var fs_extra_1 = __importDefault(require_lib());
|
|
9176
9176
|
var path_1$2 = __importDefault(require("path"));
|
|
9177
9177
|
var arch_1 = require_arch();
|
|
@@ -9232,7 +9232,7 @@ var require_prebuild_install = /* @__PURE__ */ require_chunk.__commonJSMin(((exp
|
|
|
9232
9232
|
};
|
|
9233
9233
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9234
9234
|
exports.PrebuildInstall = void 0;
|
|
9235
|
-
var debug_1 = __importDefault(
|
|
9235
|
+
var debug_1 = __importDefault(require_graceful_fs$1.require_src());
|
|
9236
9236
|
var fs_extra_1 = __importDefault(require_lib());
|
|
9237
9237
|
var path_1$1 = __importDefault(require("path"));
|
|
9238
9238
|
var cross_spawn_promise_1 = require_src();
|
|
@@ -9291,7 +9291,7 @@ var require_read_binary_file_arch = /* @__PURE__ */ require_chunk.__commonJSMin(
|
|
|
9291
9291
|
var { exec } = require("child_process");
|
|
9292
9292
|
var { promises: fs } = require("fs");
|
|
9293
9293
|
var execAsync = promisify(exec);
|
|
9294
|
-
var debug =
|
|
9294
|
+
var debug = require_graceful_fs$1.require_src()("read-binary-file-arch");
|
|
9295
9295
|
var SUPPORTED_ARCH = [
|
|
9296
9296
|
"arm",
|
|
9297
9297
|
"arm64",
|
|
@@ -9378,7 +9378,7 @@ var require_node_pre_gyp = /* @__PURE__ */ require_chunk.__commonJSMin(((exports
|
|
|
9378
9378
|
};
|
|
9379
9379
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9380
9380
|
exports.NodePreGyp = void 0;
|
|
9381
|
-
var debug_1 = __importDefault(
|
|
9381
|
+
var debug_1 = __importDefault(require_graceful_fs$1.require_src());
|
|
9382
9382
|
var cross_spawn_promise_1 = require_src();
|
|
9383
9383
|
var read_binary_file_arch_1 = require_read_binary_file_arch();
|
|
9384
9384
|
var _1 = require_module_type();
|
|
@@ -9503,7 +9503,7 @@ var require_module_rebuilder = /* @__PURE__ */ require_chunk.__commonJSMin(((exp
|
|
|
9503
9503
|
};
|
|
9504
9504
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9505
9505
|
exports.ModuleRebuilder = void 0;
|
|
9506
|
-
var debug_1 = __importDefault(
|
|
9506
|
+
var debug_1 = __importDefault(require_graceful_fs$1.require_src());
|
|
9507
9507
|
var fs = __importStar(require_lib());
|
|
9508
9508
|
var path$2 = __importStar(require("path"));
|
|
9509
9509
|
var cache_1 = require_cache();
|
|
@@ -9721,7 +9721,7 @@ var require_module_walker = /* @__PURE__ */ require_chunk.__commonJSMin(((export
|
|
|
9721
9721
|
};
|
|
9722
9722
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9723
9723
|
exports.ModuleWalker = void 0;
|
|
9724
|
-
var debug_1 = __importDefault(
|
|
9724
|
+
var debug_1 = __importDefault(require_graceful_fs$1.require_src());
|
|
9725
9725
|
var fs_extra_1 = __importDefault(require_lib());
|
|
9726
9726
|
var path_1 = __importDefault(require("path"));
|
|
9727
9727
|
var read_package_json_1 = require_read_package_json();
|
|
@@ -9835,7 +9835,7 @@ var require_rebuild = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) =>
|
|
|
9835
9835
|
};
|
|
9836
9836
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9837
9837
|
exports.rebuild = exports.Rebuilder = void 0;
|
|
9838
|
-
var debug_1 = __importDefault(
|
|
9838
|
+
var debug_1 = __importDefault(require_graceful_fs$1.require_src());
|
|
9839
9839
|
var events_1 = require("events");
|
|
9840
9840
|
var fs = __importStar(require_lib());
|
|
9841
9841
|
var nodeAbi = __importStar(require_node_abi());
|