@camstack/server 1.2.823 → 1.2.824
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/CHANGELOG.md +6 -0
- package/dist/api/trpc/generated-cap-routers.js +0 -45
- package/package.json +11 -10
- package/system/dist/addon-runner.js +24 -2
- package/system/dist/addon-runner.mjs +25 -3
- package/system/dist/addon-utils.d.ts +1 -0
- package/system/dist/addon-utils.js +2 -0
- package/system/dist/addon-utils.mjs +3 -2
- package/system/dist/{agent-https-Df53Fvk1.js → agent-https-B2nqARmj.js} +1 -1
- package/system/dist/{agent-https-CDl7mB_F.mjs → agent-https-BBO2OtNH.mjs} +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +4 -4
- package/system/dist/builtins/composer/composer.addon.mjs +4 -4
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/actions-service.d.ts +8 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +78 -22
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +79 -23
- package/system/dist/builtins/core-blocks/record-kinds.d.ts +1 -0
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +8 -3
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +8 -3
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
- package/system/dist/builtins/local-network/local-network.addon.js +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +10 -10
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/cap-call-scope-8eiugfLl.js +46 -0
- package/system/dist/cap-call-scope-Bic6Ekfw.mjs +30 -0
- package/system/dist/{capture-engine-D_GQBgrZ.mjs → capture-engine-C-rHYVFq.mjs} +1 -1
- package/system/dist/{capture-engine-C0Z5rwCO.js → capture-engine-DP4HbT3W.js} +1 -1
- package/system/dist/{composition-sources-mx-2yCDv.mjs → composition-sources-CL9JFN4y.mjs} +1 -1
- package/system/dist/{composition-sources-DIZx3mW3.js → composition-sources-CM9c_jAj.js} +1 -1
- package/system/dist/{constants-BQlx9HDp.mjs → constants-DzGFnCKZ.mjs} +1 -1
- package/system/dist/{constants-CAOcKiWT.js → constants-jk7JccZ0.js} +1 -1
- package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
- package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
- package/system/dist/{device-ca-93LsCF_Q.js → device-ca-B7_R5WJh.js} +1 -1
- package/system/dist/{device-ca-CK6GTnNh.mjs → device-ca-DZ_OQiCc.mjs} +1 -1
- package/system/dist/{dist-BQiyo22b.mjs → dist-BgRMQHuL.mjs} +97 -160
- package/system/dist/{dist-izXDzt4g.js → dist-BpTL3uNe.js} +108 -159
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-srpOrqIP.mjs → hub-mdns-ciao-DIcBingB.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-Dt_tgvol.js → hub-mdns-ciao-DPUaYAD3.js} +2 -2
- package/system/dist/index.d.ts +1 -0
- package/system/dist/index.js +47 -29
- package/system/dist/index.mjs +257 -242
- package/system/dist/kernel/cap-call-scope.d.ts +10 -0
- package/system/dist/kernel/transport/cap-route-resolver.d.ts +27 -1
- package/system/dist/kernel/transport/child-cap-protocol.d.ts +1 -1
- package/system/dist/kernel/transport/parent-unowned-call.d.ts +0 -11
- package/system/dist/{legacy-integration-rows-door-wu2GWY6U.mjs → legacy-integration-rows-door-1GnkpMgH.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-BH43eDu6.js → legacy-integration-rows-door-DYNePgj4.js} +1 -1
- package/system/dist/{rename-composition-block-CH6ZoSJA.mjs → rename-composition-block-Cp0_nwAI.mjs} +1 -1
- package/system/dist/{rename-composition-block-6oLQVzft.js → rename-composition-block-Dn2z4fnA.js} +1 -1
- package/system/dist/{restore-archive-C4rR2SYV.mjs → restore-archive-B3FEpUfz.mjs} +94 -94
- package/system/dist/{restore-archive-DpZ2PbLN.js → restore-archive-BGa5pdp9.js} +1 -1
- package/system/dist/{wal-maintenance-CNfp0HHX.mjs → wal-maintenance-BLWLlVfF.mjs} +0 -0
- package/system/dist/{wal-maintenance-DAA2qJja.js → wal-maintenance-GWFxnSnE.js} +0 -0
- package/system/package.json +1 -1
package/system/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __require } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-
|
|
2
|
+
import { $s as collectSecretMarkerRefs, As as ReadinessTimeoutError, Ci as logLevelAtMost, Dn as bareAddonId, Fr as extractNestedAddonId, Gs as asNumber, Hi as objectInputDeclaresAddonId, Ic as parseJsonObject, It as PackageRequiresSchema, Jn as compareVersions, Ks as asString$1, La as scopesAllowAddon, Lc as parseJsonUnknown, O as CatalogFileSchema, Os as RUNTIME_DEFAULTS, Qc as userError, Qr as interpolate, Ra as scopesAllowDeviceCap, Ta as resolveMethodAuth, Tt as METHOD_ACCESS_MAP, Ui as objectInputDeclaresRequiredDeviceId, Vc as resolveCapMount, Wc as scopeKey, Ws as asJsonObject$1, Ya as splitTranslationRef, a as AGENT_MDNS_SERVICE_TYPE, al as errMsg$1, cc as defineRecordKinds, ci as isObjectInput, di as kebabToCamel$1, ds as DEVICE_SETTINGS_CONTRIBUTION_METHODS, el as withoutCallerStamp, fc as expandCapMethods, fs as DEVICE_STATUS_METHOD, gi as lifecycleJobSchema, gr as describeUnmet, ia as procedureAuthKey, io as supportedRuntimes, ks as ReadinessRegistry, lc as emitDownForOwnedCaps, ls as CALLER_STAMPED_CAPABILITIES$1, mc as getDebugInterest, mo as unmetRequirements, ni as isArrayOutputSchema, o as AGENT_MDNS_TXT_KEYS, rc as createEvent$1, ri as isCollectionArrayMethod, s as ALL_CAPABILITY_DEFINITIONS, sl as EventCategory$1, ui as isVoidInput, us as DATAPLANE_SECRET_HEADER$1, vn as addonSettingsCapability, wi as looseSchema, wt as LOG_LEVEL_RANK, x as CATALOG_LANGS, yc as isDebugChannelName, zc as readinessKey } from "./dist-BgRMQHuL.mjs";
|
|
3
|
+
import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-DZ_OQiCc.mjs";
|
|
4
4
|
import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
|
|
5
5
|
import { a as redactLogText, i as redactLogMeta, r as redactLogEntry, t as isCredentialKeyName } from "./log-redactor-XLDrPzOi.mjs";
|
|
6
6
|
import { AlertCenterAddon, n as lastCauseAfterChunk, r as readRunnerDisplayName, t as CRASH_BREAKER_ERROR_PREFIX } from "./builtins/alerts/alerts.addon.mjs";
|
|
@@ -12,6 +12,7 @@ import "./builtins/composer/index.mjs";
|
|
|
12
12
|
import { t as formatLogLine } from "./formatter-DkYZ4LXp.mjs";
|
|
13
13
|
import { ConsoleDestination, ConsoleLoggingAddon } from "./builtins/console-logging/index.mjs";
|
|
14
14
|
import { t as loadPrefixed } from "./prefix-walk-DAOBSyH1.mjs";
|
|
15
|
+
import { n as readCurrentCommandOrigin, r as runWithCapCallContext, t as currentCapCallContext } from "./cap-call-scope-Bic6Ekfw.mjs";
|
|
15
16
|
import { CoreBlocksAddon, c as readUnscopedAddonSettings, o as clearNodeSettings, s as createAddonSettingsStore } from "./builtins/core-blocks/core-blocks.addon.mjs";
|
|
16
17
|
import "./builtins/core-blocks/index.mjs";
|
|
17
18
|
import { DeviceManagerAddon, a as commandObserverLink, c as runObservedCommand, d as readDeviceOrThrow, f as setWrapperActive, i as commandActorFromContext, l as observable, n as __resetCommandObserverRegistryForTests, o as getCommandObserverRegistry, r as addonCommandActor, s as reportCommand, t as CommandObserverRegistry, u as createDeviceSettingsStore } from "./builtins/device-manager/device-manager.addon.mjs";
|
|
@@ -26,33 +27,33 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
|
|
|
26
27
|
import NativeMetricsAddon, { a as NativeMetricsProvider, i as parseProcStatusRss, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
|
|
27
28
|
import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
|
|
28
29
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
29
|
-
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-
|
|
30
|
-
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-
|
|
30
|
+
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-BLWLlVfF.mjs";
|
|
31
|
+
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-1GnkpMgH.mjs";
|
|
31
32
|
import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
32
33
|
import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
33
34
|
import { StorageOrchestratorAddon, a as createHubCapForwardService, i as HUB_CAP_FWD_SERVICE, o as stripForwardedCaller, r as HUB_CAP_FWD_ACTION, s as buildStorageLocationRegistry, t as StorageOrchestratorService, u as storageOrchestratorRecordKinds } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
34
35
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
35
|
-
import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-
|
|
36
|
-
import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-
|
|
36
|
+
import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-BBO2OtNH.mjs";
|
|
37
|
+
import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-DzGFnCKZ.mjs";
|
|
37
38
|
import { $ as caFingerprintCompact, A as getProcessNodeMeshTransport, B as MESH_NODE_CERTIFICATES_COLLECTION, C as MESH_TLS_PORT_HELLO_FIELD, Ct as readOriginSetting, D as setProcessMeshTlsEnabler, Dt as readCidrSetting, E as ServiceBroker, Et as parseCidrList, F as renewMeshCertificate, G as getProcessMeshCertificateRegistry, H as MeshCertificateRegistry, I as revokeMeshCertificate, J as processMeshCrl, K as setProcessMeshCertificateRegistry, L as getProcessMeshTlsListenerState, M as isProcessVerifiedMeshPeer, N as onProcessNodeRegistered, O as dropProcessPeer, P as setProcessMeshPeerTransportLookup, Q as caFingerprint, R as openMeshTlsWhenRevocationsLoaded, S as verifyMembershipAnswer, St as parseOriginList, SystemConfigAddon, T as Errors, Tt as normalizeIp, U as RENEWAL_ABANDONED, V as MESH_NODE_CERTIFICATES_COLUMNS, W as describeMeshLeaf, X as getProcessMeshCaState, Y as MeshCaKeeper, Z as requireProcessMeshCa, _ as signPairingProof, _t as verifyAgentUiUnlockTicket, a as hubHostFromMeshAddress, at as issueMeshLeafForNode, b as MembershipResponder, bt as isInsecureOrigin, c as PAIRING_MAX_SESSIONS, ct as AGENT_DASHBOARD_ORIGINS_FIELD, d as PAIRING_PROTOCOL, dt as AGENT_UI_UNLOCK_USE, et as createMeshCsrPem, f as PAIRING_TTL_MS, ft as AGENT_UI_UNLOCK_VERSION, g as keyFingerprintShort, gt as parseAgentDashboardOrigins, h as describeCsr, ht as mintAgentUiUnlockTicket, i as AgentPairing, it as isValidAgentNodeId, j as getProcessPeerLeaf, k as emitProcessNodeRegistered, l as PAIRING_PATHS, lt as AGENT_UI_UNLOCK_TTL_MS, m as computePairingSas, mt as isAllowedAgentDashboardReturnTo, n as HubPairing, nt as generateMeshCa, o as PAIRING_CODE_DIGITS, ot as issueMeshLeafFromCsr, p as computePairingCommitment, pt as UnlockTicketJtiStore, q as MeshCrl, r as PairingHttpError, rt as generateMeshKeyPair, s as PAIRING_MAX_CODE_ATTEMPTS, st as loadMeshCa, tt as exportMeshPrivateKeyPem, u as PAIRING_PIN_DIGITS, ut as AGENT_UI_UNLOCK_TYP, v as verifyPairingProof, vt as InvalidCorsOriginError, w as TlsTcpTransporter, wt as createCidrMatcher, x as signMembershipProof, xt as normalizeOrigin, y as MEMBERSHIP_PATHS, yt as OPAQUE_ORIGIN, z as setProcessMeshTlsListenerState } from "./builtins/system-config/system-config.addon.mjs";
|
|
38
39
|
import "./builtins/system-config/index.mjs";
|
|
39
40
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
40
|
-
import { C as isModelDownloaded, E as setHuggingFaceReachabilityObserver, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-
|
|
41
|
-
import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-
|
|
41
|
+
import { C as isModelDownloaded, E as setHuggingFaceReachabilityObserver, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-B9zFBNVa.mjs";
|
|
42
|
+
import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-DIcBingB.mjs";
|
|
42
43
|
import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
|
|
43
44
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
|
|
44
|
-
import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-
|
|
45
|
-
import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-
|
|
45
|
+
import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-B3FEpUfz.mjs";
|
|
46
|
+
import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-DBlgWB8k.mjs";
|
|
46
47
|
import { z } from "zod";
|
|
47
48
|
import * as crypto$1 from "node:crypto";
|
|
48
49
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
49
50
|
import { PYTHON_VERSION, buildBinaryPath, declaresEdgetpuDelegate, downloadBinary, ensureBinary, ensureBinary as ensureBinary$1, ensureEdgetpuDelegate, ensureFfmpeg, ensureFfmpeg as ensureFfmpeg$1, ensurePython, ensurePython as ensurePython$1, findInPath, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, installPythonPackages, installPythonPackages as installPythonPackages$1, installPythonRequirements, installPythonRequirements as installPythonRequirements$1 } from "@camstack/types/node";
|
|
50
51
|
import { connect, createConnection, createServer } from "node:net";
|
|
51
|
-
import * as fs from "node:fs";
|
|
52
|
+
import * as fs$1 from "node:fs";
|
|
52
53
|
import { accessSync, constants, createReadStream, createWriteStream, existsSync, readFileSync, readdirSync } from "node:fs";
|
|
53
54
|
import * as path$1 from "node:path";
|
|
54
55
|
import { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
55
|
-
import { BOOT_RECOVERY_BACKOFF_MS, CALLER_STAMPED_CAPABILITIES, CAP_METHOD_TIMEOUTS_MS, COLLECTION_ARRAY_METHODS, COMPOSED_DEVICE_STABLE_ID_PREFIX, CommandOriginClaimSchema, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DeviceType, DisposerChain, ErrorI18nPayloadSchema, EventCategory, MIGRATION_API_VERSION, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, ReadinessRegistry as ReadinessRegistry$1, addonSliceHandleApi, asJsonObject, asString, collectZodSecretPaths, createDebugEmitter, createDeviceProxy, createEvent, createEventBusSliceSource, createRecordsAccess, createSecretsAccess, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods as expandCapMethods$1, isCommand, readCommandOrigin, readErrorI18n, readNodePin, resolveDeviceSettings, scopeKey as scopeKey$1, sleep, withCapInputDefaults } from "@camstack/types/addon";
|
|
56
|
+
import { BOOT_RECOVERY_BACKOFF_MS, CALLER_STAMPED_CAPABILITIES, CAP_METHOD_TIMEOUTS_MS, COLLECTION_ARRAY_METHODS, COMPOSED_DEVICE_STABLE_ID_PREFIX, CommandOriginClaimSchema, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DeviceType, DisposerChain, ErrorI18nPayloadSchema, EventCategory, MIGRATION_API_VERSION, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, ReadinessRegistry as ReadinessRegistry$1, addonSliceHandleApi, asJsonObject, asString, collectZodSecretPaths, commandOrigin, createDebugEmitter, createDeviceProxy, createEvent, createEventBusSliceSource, createRecordsAccess, createSecretsAccess, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods as expandCapMethods$1, isCommand, readCommandOrigin, readErrorI18n, readNodePin, resolveDeviceSettings, scopeKey as scopeKey$1, sleep, withCapInputDefaults } from "@camstack/types/addon";
|
|
56
57
|
import { mkdir, rm, stat, unlink } from "node:fs/promises";
|
|
57
58
|
import * as util from "node:util";
|
|
58
59
|
import { promisify } from "node:util";
|
|
@@ -5021,7 +5022,7 @@ var PythonEnvManager = class {
|
|
|
5021
5022
|
async ensure(options) {
|
|
5022
5023
|
const probe = await this.probe();
|
|
5023
5024
|
if (!probe.available || !probe.path) throw userError("system.python-required", void 0, "Python 3.10+ is required but not found on this system");
|
|
5024
|
-
if (!fs.existsSync(path$1.join(this.venvPath, "bin", "python"))) await execFileAsync$7(probe.path, [
|
|
5025
|
+
if (!fs$1.existsSync(path$1.join(this.venvPath, "bin", "python"))) await execFileAsync$7(probe.path, [
|
|
5025
5026
|
"-m",
|
|
5026
5027
|
"venv",
|
|
5027
5028
|
this.venvPath
|
|
@@ -5044,7 +5045,7 @@ var PythonEnvManager = class {
|
|
|
5044
5045
|
}
|
|
5045
5046
|
spawn(script, args) {
|
|
5046
5047
|
const venvPython = path$1.join(this.venvPath, "bin", "python");
|
|
5047
|
-
if (!fs.existsSync(venvPython)) throw new Error("Python venv not initialized. Call ensure() first.");
|
|
5048
|
+
if (!fs$1.existsSync(venvPython)) throw new Error("Python venv not initialized. Call ensure() first.");
|
|
5048
5049
|
return spawn(venvPython, [script, ...args]);
|
|
5049
5050
|
}
|
|
5050
5051
|
};
|
|
@@ -5396,20 +5397,20 @@ var StorageManager = class {
|
|
|
5396
5397
|
const basePath = this.locationManager.getBackend(mappedName).basePath;
|
|
5397
5398
|
location.files = {
|
|
5398
5399
|
async readFile(p) {
|
|
5399
|
-
return fs.promises.readFile(path$1.join(basePath, p));
|
|
5400
|
+
return fs$1.promises.readFile(path$1.join(basePath, p));
|
|
5400
5401
|
},
|
|
5401
5402
|
async writeFile(p, data) {
|
|
5402
5403
|
const full = path$1.join(basePath, p);
|
|
5403
|
-
await fs.promises.mkdir(path$1.dirname(full), { recursive: true });
|
|
5404
|
-
await fs.promises.writeFile(full, data);
|
|
5404
|
+
await fs$1.promises.mkdir(path$1.dirname(full), { recursive: true });
|
|
5405
|
+
await fs$1.promises.writeFile(full, data);
|
|
5405
5406
|
},
|
|
5406
5407
|
async deleteFile(p) {
|
|
5407
|
-
await fs.promises.rm(path$1.join(basePath, p), { force: true });
|
|
5408
|
+
await fs$1.promises.rm(path$1.join(basePath, p), { force: true });
|
|
5408
5409
|
},
|
|
5409
5410
|
async listFiles(prefix) {
|
|
5410
5411
|
const dir = prefix ? path$1.join(basePath, prefix) : basePath;
|
|
5411
5412
|
try {
|
|
5412
|
-
return (await fs.promises.readdir(dir)).map((f) => prefix ? `${prefix}/${f}` : f);
|
|
5413
|
+
return (await fs$1.promises.readdir(dir)).map((f) => prefix ? `${prefix}/${f}` : f);
|
|
5413
5414
|
} catch {
|
|
5414
5415
|
return [];
|
|
5415
5416
|
}
|
|
@@ -5419,7 +5420,7 @@ var StorageManager = class {
|
|
|
5419
5420
|
},
|
|
5420
5421
|
async exists(p) {
|
|
5421
5422
|
try {
|
|
5422
|
-
await fs.promises.access(path$1.join(basePath, p));
|
|
5423
|
+
await fs$1.promises.access(path$1.join(basePath, p));
|
|
5423
5424
|
return true;
|
|
5424
5425
|
} catch {
|
|
5425
5426
|
return false;
|
|
@@ -5869,7 +5870,7 @@ var TRADITIONAL_NATIVE_PACKAGES = ["better-sqlite3"];
|
|
|
5869
5870
|
function hasDotNode(dir, maxDepth) {
|
|
5870
5871
|
let entries;
|
|
5871
5872
|
try {
|
|
5872
|
-
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
5873
|
+
entries = fs$1.readdirSync(dir, { withFileTypes: true });
|
|
5873
5874
|
} catch {
|
|
5874
5875
|
return false;
|
|
5875
5876
|
}
|
|
@@ -5880,7 +5881,7 @@ function hasDotNode(dir, maxDepth) {
|
|
|
5880
5881
|
}
|
|
5881
5882
|
/** Locate the bundled `prebuild-install` bin.js inside the staged closure. */
|
|
5882
5883
|
function resolvePrebuildInstallBin(closureDir, moduleDir) {
|
|
5883
|
-
return [path$1.join(moduleDir, "node_modules", "prebuild-install", "bin.js"), path$1.join(closureDir, "node_modules", "prebuild-install", "bin.js")].find((c) => fs.existsSync(c)) ?? null;
|
|
5884
|
+
return [path$1.join(moduleDir, "node_modules", "prebuild-install", "bin.js"), path$1.join(closureDir, "node_modules", "prebuild-install", "bin.js")].find((c) => fs$1.existsSync(c)) ?? null;
|
|
5884
5885
|
}
|
|
5885
5886
|
/**
|
|
5886
5887
|
* Default fetcher: run the closure's own `prebuild-install` under the CURRENT
|
|
@@ -5933,7 +5934,7 @@ async function ensureNativePrebuilds(closureDir, options) {
|
|
|
5933
5934
|
const fetched = [];
|
|
5934
5935
|
for (const pkg of packages) {
|
|
5935
5936
|
const moduleDir = path$1.join(nm, pkg);
|
|
5936
|
-
if (!fs.existsSync(moduleDir)) continue;
|
|
5937
|
+
if (!fs$1.existsSync(moduleDir)) continue;
|
|
5937
5938
|
if (hasDotNode(moduleDir, 4)) continue;
|
|
5938
5939
|
options.logger.warn("staged closure native prebuild missing — fetching for running ABI", { meta: {
|
|
5939
5940
|
pkg,
|
|
@@ -5996,12 +5997,12 @@ async function ensureNativePrebuilds(closureDir, options) {
|
|
|
5996
5997
|
function replantFromBundled(srcModuleDir, dstModuleDir, hasNative) {
|
|
5997
5998
|
if (!hasNative(srcModuleDir)) return false;
|
|
5998
5999
|
try {
|
|
5999
|
-
fs.rmSync(dstModuleDir, {
|
|
6000
|
+
fs$1.rmSync(dstModuleDir, {
|
|
6000
6001
|
recursive: true,
|
|
6001
6002
|
force: true
|
|
6002
6003
|
});
|
|
6003
|
-
fs.mkdirSync(path$1.dirname(dstModuleDir), { recursive: true });
|
|
6004
|
-
fs.cpSync(srcModuleDir, dstModuleDir, {
|
|
6004
|
+
fs$1.mkdirSync(path$1.dirname(dstModuleDir), { recursive: true });
|
|
6005
|
+
fs$1.cpSync(srcModuleDir, dstModuleDir, {
|
|
6005
6006
|
recursive: true,
|
|
6006
6007
|
dereference: true
|
|
6007
6008
|
});
|
|
@@ -6030,7 +6031,7 @@ async function ensureAddonNativePrebuilds(addonDir, options) {
|
|
|
6030
6031
|
const missing = [];
|
|
6031
6032
|
for (const pkg of packages) {
|
|
6032
6033
|
const moduleDir = path$1.join(nm, pkg);
|
|
6033
|
-
if (!fs.existsSync(moduleDir)) continue;
|
|
6034
|
+
if (!fs$1.existsSync(moduleDir)) continue;
|
|
6034
6035
|
if (hasNative(moduleDir)) {
|
|
6035
6036
|
results.push({
|
|
6036
6037
|
pkg,
|
|
@@ -6129,7 +6130,7 @@ async function defaultDownloadTarball(url, destTgz) {
|
|
|
6129
6130
|
const res = await fetch(url);
|
|
6130
6131
|
if (!res.ok || !res.body) throw new Error(`HTTP ${res.status} downloading ${url}`);
|
|
6131
6132
|
const bytes = Buffer.from(await res.arrayBuffer());
|
|
6132
|
-
await fs.promises.writeFile(destTgz, bytes);
|
|
6133
|
+
await fs$1.promises.writeFile(destTgz, bytes);
|
|
6133
6134
|
}
|
|
6134
6135
|
async function defaultExtractTarball(tgzPath, destDir) {
|
|
6135
6136
|
await execFileAsync$5("tar", [
|
|
@@ -6215,7 +6216,7 @@ async function resolveUncached(options) {
|
|
|
6215
6216
|
argsPrefix: []
|
|
6216
6217
|
};
|
|
6217
6218
|
const cliPath = bootstrappedCliPath(options.cacheDir);
|
|
6218
|
-
if (fs.existsSync(cliPath)) {
|
|
6219
|
+
if (fs$1.existsSync(cliPath)) {
|
|
6219
6220
|
options.logger.info("system npm unavailable — using bootstrapped npm", { meta: { cliPath } });
|
|
6220
6221
|
return {
|
|
6221
6222
|
command: process.execPath,
|
|
@@ -6227,12 +6228,12 @@ async function resolveUncached(options) {
|
|
|
6227
6228
|
const registry = (options.registry ?? DEFAULT_REGISTRY$1).replace(/\/+$/, "");
|
|
6228
6229
|
const tarballUrl = tarballUrlOf(await (options.fetchJson ?? defaultFetchJson)(`${registry}/npm/latest`));
|
|
6229
6230
|
if (!tarballUrl) throw new Error(`registry metadata for 'npm' carries no dist.tarball (${registry})`);
|
|
6230
|
-
await fs.promises.mkdir(options.cacheDir, { recursive: true });
|
|
6231
|
+
await fs$1.promises.mkdir(options.cacheDir, { recursive: true });
|
|
6231
6232
|
const tgzPath = path$1.join(options.cacheDir, "npm-bootstrap.tgz");
|
|
6232
6233
|
await (options.downloadTarball ?? defaultDownloadTarball)(tarballUrl, tgzPath);
|
|
6233
6234
|
await (options.extractTarball ?? defaultExtractTarball)(tgzPath, options.cacheDir);
|
|
6234
|
-
await fs.promises.rm(tgzPath, { force: true });
|
|
6235
|
-
if (!fs.existsSync(cliPath)) throw new Error(`extracted npm tarball is missing ${cliPath}`);
|
|
6235
|
+
await fs$1.promises.rm(tgzPath, { force: true });
|
|
6236
|
+
if (!fs$1.existsSync(cliPath)) throw new Error(`extracted npm tarball is missing ${cliPath}`);
|
|
6236
6237
|
options.logger.info("npm bootstrapped", { meta: { cliPath } });
|
|
6237
6238
|
return {
|
|
6238
6239
|
command: process.execPath,
|
|
@@ -6298,7 +6299,7 @@ function readOwningPackageVersion(entryPath) {
|
|
|
6298
6299
|
let dir = path$1.dirname(entryPath);
|
|
6299
6300
|
for (let hop = 0; hop < PACKAGE_JSON_LOOKUP_DEPTH; hop++) {
|
|
6300
6301
|
try {
|
|
6301
|
-
const version = asJsonObject$1(parseJsonUnknown(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8")))?.["version"];
|
|
6302
|
+
const version = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8")))?.["version"];
|
|
6302
6303
|
if (typeof version === "string" && version.length > 0) return version;
|
|
6303
6304
|
} catch {}
|
|
6304
6305
|
const parent = path$1.dirname(dir);
|
|
@@ -6342,14 +6343,14 @@ function readOwningPackageVersion(entryPath) {
|
|
|
6342
6343
|
function addonModuleCacheKey(entryPath) {
|
|
6343
6344
|
let stat;
|
|
6344
6345
|
try {
|
|
6345
|
-
stat = fs.statSync(entryPath);
|
|
6346
|
+
stat = fs$1.statSync(entryPath);
|
|
6346
6347
|
} catch {
|
|
6347
6348
|
return null;
|
|
6348
6349
|
}
|
|
6349
6350
|
const version = readOwningPackageVersion(entryPath) ?? `m${stat.mtimeMs}`;
|
|
6350
6351
|
let content;
|
|
6351
6352
|
try {
|
|
6352
|
-
content = createHash("sha1").update(fs.readFileSync(entryPath)).digest("hex").slice(0, 16);
|
|
6353
|
+
content = createHash("sha1").update(fs$1.readFileSync(entryPath)).digest("hex").slice(0, 16);
|
|
6353
6354
|
} catch {
|
|
6354
6355
|
content = `m${stat.mtimeMs}s${stat.size}`;
|
|
6355
6356
|
}
|
|
@@ -6453,14 +6454,14 @@ var AddonLoader = class {
|
|
|
6453
6454
|
* BUILTINS from the active closure, not the (now-inert) addons-dir copy, so
|
|
6454
6455
|
* the addons-dir `@camstack/server/system` must NOT be double-loaded here. */
|
|
6455
6456
|
async loadFromDirectory(addonsDir, skipPackages = []) {
|
|
6456
|
-
if (!fs.existsSync(addonsDir)) return;
|
|
6457
|
+
if (!fs$1.existsSync(addonsDir)) return;
|
|
6457
6458
|
const skip = new Set(skipPackages);
|
|
6458
|
-
const entries = fs.readdirSync(addonsDir, { withFileTypes: true });
|
|
6459
|
+
const entries = fs$1.readdirSync(addonsDir, { withFileTypes: true });
|
|
6459
6460
|
for (const entry of entries) {
|
|
6460
6461
|
if (!isDirectoryEntry(entry, addonsDir)) continue;
|
|
6461
6462
|
if (entry.name.startsWith("@")) {
|
|
6462
6463
|
const scopeDir = path$1.join(addonsDir, entry.name);
|
|
6463
|
-
const scopeEntries = fs.readdirSync(scopeDir, { withFileTypes: true });
|
|
6464
|
+
const scopeEntries = fs$1.readdirSync(scopeDir, { withFileTypes: true });
|
|
6464
6465
|
for (const scopeEntry of scopeEntries) {
|
|
6465
6466
|
if (!isDirectoryEntry(scopeEntry, scopeDir)) continue;
|
|
6466
6467
|
if (skip.has(`${entry.name}/${scopeEntry.name}`)) continue;
|
|
@@ -6474,7 +6475,7 @@ var AddonLoader = class {
|
|
|
6474
6475
|
}
|
|
6475
6476
|
async tryLoadAddon(addonDir) {
|
|
6476
6477
|
const pkgJsonPath = path$1.join(addonDir, "package.json");
|
|
6477
|
-
if (!fs.existsSync(pkgJsonPath)) return;
|
|
6478
|
+
if (!fs$1.existsSync(pkgJsonPath)) return;
|
|
6478
6479
|
try {
|
|
6479
6480
|
await this.loadFromAddonDir(addonDir);
|
|
6480
6481
|
} catch (err) {
|
|
@@ -6492,7 +6493,7 @@ var AddonLoader = class {
|
|
|
6492
6493
|
/** Load addon from a specific directory (package.json + dist/) */
|
|
6493
6494
|
async loadFromAddonDir(addonDir) {
|
|
6494
6495
|
const pkgJsonPath = path$1.join(addonDir, "package.json");
|
|
6495
|
-
const pkgJson = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8"))) ?? {};
|
|
6496
|
+
const pkgJson = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(pkgJsonPath, "utf-8"))) ?? {};
|
|
6496
6497
|
const packageNameRaw = pkgJson["name"];
|
|
6497
6498
|
const packageName = typeof packageNameRaw === "string" ? packageNameRaw : "";
|
|
6498
6499
|
const packageVersionRaw = pkgJson["version"];
|
|
@@ -6540,7 +6541,7 @@ var AddonLoader = class {
|
|
|
6540
6541
|
}
|
|
6541
6542
|
const entryFile = declaration.entry.replace(/^\.\//, "").replace(/^src\//, "dist/").replace(/\.ts$/, ".js");
|
|
6542
6543
|
let entryPath = path$1.resolve(addonDir, entryFile);
|
|
6543
|
-
if (!fs.existsSync(entryPath)) {
|
|
6544
|
+
if (!fs$1.existsSync(entryPath)) {
|
|
6544
6545
|
const base = entryPath.replace(/\.(js|cjs|mjs)$/, "");
|
|
6545
6546
|
entryPath = [
|
|
6546
6547
|
`${base}.cjs`,
|
|
@@ -6549,9 +6550,9 @@ var AddonLoader = class {
|
|
|
6549
6550
|
path$1.resolve(addonDir, "dist", "index.cjs"),
|
|
6550
6551
|
path$1.resolve(addonDir, "dist", "index.mjs"),
|
|
6551
6552
|
path$1.resolve(addonDir, declaration.entry)
|
|
6552
|
-
].find((p) => fs.existsSync(p)) ?? entryPath;
|
|
6553
|
+
].find((p) => fs$1.existsSync(p)) ?? entryPath;
|
|
6553
6554
|
}
|
|
6554
|
-
if (!fs.existsSync(entryPath)) throw new Error(`Entry not found: ${entryPath}`);
|
|
6555
|
+
if (!fs$1.existsSync(entryPath)) throw new Error(`Entry not found: ${entryPath}`);
|
|
6555
6556
|
const modUnknown = await importAddonModuleFresh(entryPath);
|
|
6556
6557
|
const mod = isRecord$5(modUnknown) ? modUnknown : {};
|
|
6557
6558
|
const AddonClass = resolveAddonClass(mod);
|
|
@@ -6663,7 +6664,7 @@ function isDirectoryEntry(entry, parentDir) {
|
|
|
6663
6664
|
if (entry.name.startsWith(".")) return false;
|
|
6664
6665
|
if (entry.isDirectory()) return true;
|
|
6665
6666
|
if (entry.isSymbolicLink()) try {
|
|
6666
|
-
return fs.statSync(path$1.join(parentDir, entry.name)).isDirectory();
|
|
6667
|
+
return fs$1.statSync(path$1.join(parentDir, entry.name)).isDirectory();
|
|
6667
6668
|
} catch {
|
|
6668
6669
|
return false;
|
|
6669
6670
|
}
|
|
@@ -6757,7 +6758,7 @@ var execFileAsync$4 = promisify(execFile);
|
|
|
6757
6758
|
* Single source of truth — replaces scattered mkdirSync calls.
|
|
6758
6759
|
*/
|
|
6759
6760
|
function ensureDir(dirPath) {
|
|
6760
|
-
fs.mkdirSync(dirPath, { recursive: true });
|
|
6761
|
+
fs$1.mkdirSync(dirPath, { recursive: true });
|
|
6761
6762
|
}
|
|
6762
6763
|
/**
|
|
6763
6764
|
* Copy a directory recursively — ASYNC so it never blocks the event loop.
|
|
@@ -6770,7 +6771,7 @@ function ensureDir(dirPath) {
|
|
|
6770
6771
|
* `fs.promises.cp` keeps the I/O off the event loop. (Node ≥18 stable.)
|
|
6771
6772
|
*/
|
|
6772
6773
|
async function copyDirRecursive(src, dest) {
|
|
6773
|
-
await fs.promises.cp(src, dest, {
|
|
6774
|
+
await fs$1.promises.cp(src, dest, {
|
|
6774
6775
|
recursive: true,
|
|
6775
6776
|
force: true
|
|
6776
6777
|
});
|
|
@@ -6875,13 +6876,13 @@ async function copyExtraFileDirs(pkgJson, sourceDir, destDir) {
|
|
|
6875
6876
|
if (typeof fileEntry !== "string") continue;
|
|
6876
6877
|
if (fileEntry === "dist" || fileEntry.includes("*")) continue;
|
|
6877
6878
|
const srcPath = path$1.join(sourceDir, fileEntry);
|
|
6878
|
-
if (!fs.existsSync(srcPath)) continue;
|
|
6879
|
+
if (!fs$1.existsSync(srcPath)) continue;
|
|
6879
6880
|
const destPath = path$1.join(destDir, fileEntry);
|
|
6880
|
-
const stat = await fs.promises.stat(srcPath);
|
|
6881
|
+
const stat = await fs$1.promises.stat(srcPath);
|
|
6881
6882
|
if (stat.isDirectory()) await copyDirRecursive(srcPath, destPath);
|
|
6882
6883
|
else if (stat.isFile()) {
|
|
6883
6884
|
ensureDir(path$1.dirname(destPath));
|
|
6884
|
-
await fs.promises.copyFile(srcPath, destPath);
|
|
6885
|
+
await fs$1.promises.copyFile(srcPath, destPath);
|
|
6885
6886
|
}
|
|
6886
6887
|
}
|
|
6887
6888
|
}
|
|
@@ -6892,10 +6893,10 @@ async function copyExtraFileDirs(pkgJson, sourceDir, destDir) {
|
|
|
6892
6893
|
function isSourceNewer(packageDir) {
|
|
6893
6894
|
const srcDir = path$1.join(packageDir, "src");
|
|
6894
6895
|
const distDir = path$1.join(packageDir, "dist");
|
|
6895
|
-
if (!fs.existsSync(srcDir) || !fs.existsSync(distDir)) return true;
|
|
6896
|
+
if (!fs$1.existsSync(srcDir) || !fs$1.existsSync(distDir)) return true;
|
|
6896
6897
|
try {
|
|
6897
|
-
const distMtime = fs.statSync(distDir).mtimeMs;
|
|
6898
|
-
const entries = fs.readdirSync(srcDir, {
|
|
6898
|
+
const distMtime = fs$1.statSync(distDir).mtimeMs;
|
|
6899
|
+
const entries = fs$1.readdirSync(srcDir, {
|
|
6899
6900
|
withFileTypes: true,
|
|
6900
6901
|
recursive: true
|
|
6901
6902
|
});
|
|
@@ -6903,7 +6904,7 @@ function isSourceNewer(packageDir) {
|
|
|
6903
6904
|
if (!entry.isFile()) continue;
|
|
6904
6905
|
const parentDir = entry.parentPath ?? String(Reflect.get(entry, "path") ?? "");
|
|
6905
6906
|
const filePath = path$1.join(parentDir, entry.name);
|
|
6906
|
-
if (fs.statSync(filePath).mtimeMs > distMtime) return true;
|
|
6907
|
+
if (fs$1.statSync(filePath).mtimeMs > distMtime) return true;
|
|
6907
6908
|
}
|
|
6908
6909
|
return false;
|
|
6909
6910
|
} catch {
|
|
@@ -6920,7 +6921,7 @@ function isSourceNewer(packageDir) {
|
|
|
6920
6921
|
* `copyDirRecursive` for the wedge this prevents.
|
|
6921
6922
|
*/
|
|
6922
6923
|
async function installPackageFromNpm(packageName, targetDir) {
|
|
6923
|
-
const tmpDir = await fs.promises.mkdtemp(path$1.join(os$1.tmpdir(), "camstack-install-"));
|
|
6924
|
+
const tmpDir = await fs$1.promises.mkdtemp(path$1.join(os$1.tmpdir(), "camstack-install-"));
|
|
6924
6925
|
try {
|
|
6925
6926
|
const { stdout } = await execFileAsync$4("npm", [
|
|
6926
6927
|
"pack",
|
|
@@ -6943,21 +6944,21 @@ async function installPackageFromNpm(packageName, targetDir) {
|
|
|
6943
6944
|
extractDir
|
|
6944
6945
|
], { timeout: 3e4 });
|
|
6945
6946
|
const packageSubDir = path$1.join(extractDir, "package");
|
|
6946
|
-
const srcPkgJsonDir = fs.existsSync(path$1.join(packageSubDir, "package.json")) ? packageSubDir : extractDir;
|
|
6947
|
-
await fs.promises.rm(targetDir, {
|
|
6947
|
+
const srcPkgJsonDir = fs$1.existsSync(path$1.join(packageSubDir, "package.json")) ? packageSubDir : extractDir;
|
|
6948
|
+
await fs$1.promises.rm(targetDir, {
|
|
6948
6949
|
recursive: true,
|
|
6949
6950
|
force: true
|
|
6950
6951
|
});
|
|
6951
6952
|
ensureDir(targetDir);
|
|
6952
|
-
await fs.promises.copyFile(path$1.join(srcPkgJsonDir, "package.json"), path$1.join(targetDir, "package.json"));
|
|
6953
|
+
await fs$1.promises.copyFile(path$1.join(srcPkgJsonDir, "package.json"), path$1.join(targetDir, "package.json"));
|
|
6953
6954
|
const distSrc = path$1.join(srcPkgJsonDir, "dist");
|
|
6954
|
-
if (fs.existsSync(distSrc)) await copyDirRecursive(distSrc, path$1.join(targetDir, "dist"));
|
|
6955
|
+
if (fs$1.existsSync(distSrc)) await copyDirRecursive(distSrc, path$1.join(targetDir, "dist"));
|
|
6955
6956
|
try {
|
|
6956
|
-
const npmPkg = asJsonObject$1(parseJsonUnknown(await fs.promises.readFile(path$1.join(srcPkgJsonDir, "package.json"), "utf-8")));
|
|
6957
|
+
const npmPkg = asJsonObject$1(parseJsonUnknown(await fs$1.promises.readFile(path$1.join(srcPkgJsonDir, "package.json"), "utf-8")));
|
|
6957
6958
|
if (npmPkg) await copyExtraFileDirs(npmPkg, srcPkgJsonDir, targetDir);
|
|
6958
6959
|
} catch {}
|
|
6959
6960
|
} finally {
|
|
6960
|
-
await fs.promises.rm(tmpDir, {
|
|
6961
|
+
await fs$1.promises.rm(tmpDir, {
|
|
6961
6962
|
recursive: true,
|
|
6962
6963
|
force: true
|
|
6963
6964
|
});
|
|
@@ -6982,7 +6983,7 @@ function packageDirName$1(declaredName) {
|
|
|
6982
6983
|
}
|
|
6983
6984
|
function isDirLike$1(p) {
|
|
6984
6985
|
try {
|
|
6985
|
-
return fs.statSync(p).isDirectory();
|
|
6986
|
+
return fs$1.statSync(p).isDirectory();
|
|
6986
6987
|
} catch {
|
|
6987
6988
|
return false;
|
|
6988
6989
|
}
|
|
@@ -7000,12 +7001,12 @@ var AddonManifest = class {
|
|
|
7000
7001
|
*/
|
|
7001
7002
|
read() {
|
|
7002
7003
|
if (this.cache != null) return this.cache;
|
|
7003
|
-
if (!fs.existsSync(this.manifestPath)) {
|
|
7004
|
+
if (!fs$1.existsSync(this.manifestPath)) {
|
|
7004
7005
|
this.cache = this.empty();
|
|
7005
7006
|
return this.cache;
|
|
7006
7007
|
}
|
|
7007
7008
|
try {
|
|
7008
|
-
const raw = fs.readFileSync(this.manifestPath, "utf-8");
|
|
7009
|
+
const raw = fs$1.readFileSync(this.manifestPath, "utf-8");
|
|
7009
7010
|
const parsed = JSON.parse(raw);
|
|
7010
7011
|
if (parsed.version !== MANIFEST_VERSION) {
|
|
7011
7012
|
process.stderr.write(`[AddonManifest] schema mismatch (file=${parsed.version} vs runtime=${MANIFEST_VERSION}); starting empty\n`);
|
|
@@ -7026,13 +7027,13 @@ var AddonManifest = class {
|
|
|
7026
7027
|
* a half-written file.
|
|
7027
7028
|
*/
|
|
7028
7029
|
write(manifest) {
|
|
7029
|
-
fs.mkdirSync(path$1.dirname(this.manifestPath), { recursive: true });
|
|
7030
|
+
fs$1.mkdirSync(path$1.dirname(this.manifestPath), { recursive: true });
|
|
7030
7031
|
const tmp = `${this.manifestPath}.tmp.${process.pid}.${Date.now()}`;
|
|
7031
|
-
fs.writeFileSync(tmp, JSON.stringify(manifest, null, 2), {
|
|
7032
|
+
fs$1.writeFileSync(tmp, JSON.stringify(manifest, null, 2), {
|
|
7032
7033
|
encoding: "utf-8",
|
|
7033
7034
|
mode: 384
|
|
7034
7035
|
});
|
|
7035
|
-
fs.renameSync(tmp, this.manifestPath);
|
|
7036
|
+
fs$1.renameSync(tmp, this.manifestPath);
|
|
7036
7037
|
this.cache = manifest;
|
|
7037
7038
|
}
|
|
7038
7039
|
/** Lookup a single addon's manifest entry, or `null` if not tracked. */
|
|
@@ -7107,22 +7108,22 @@ var AddonManifest = class {
|
|
|
7107
7108
|
* exactly what moved. Returns the total number of changes.
|
|
7108
7109
|
*/
|
|
7109
7110
|
reconcileFromDisk(addonsDir, onChange) {
|
|
7110
|
-
if (!fs.existsSync(addonsDir)) return 0;
|
|
7111
|
+
if (!fs$1.existsSync(addonsDir)) return 0;
|
|
7111
7112
|
const m = this.read();
|
|
7112
7113
|
let changes = 0;
|
|
7113
7114
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
7114
7115
|
/** Package name → version, for every ADDON package actually installed. */
|
|
7115
7116
|
const onDisk = /* @__PURE__ */ new Map();
|
|
7116
|
-
for (const scope of fs.readdirSync(addonsDir, { withFileTypes: true })) {
|
|
7117
|
+
for (const scope of fs$1.readdirSync(addonsDir, { withFileTypes: true })) {
|
|
7117
7118
|
if (!scope.name.startsWith("@") || !isDirLike$1(path$1.join(addonsDir, scope.name))) continue;
|
|
7118
7119
|
const scopeDir = path$1.join(addonsDir, scope.name);
|
|
7119
|
-
for (const pkg of fs.readdirSync(scopeDir, { withFileTypes: true })) {
|
|
7120
|
+
for (const pkg of fs$1.readdirSync(scopeDir, { withFileTypes: true })) {
|
|
7120
7121
|
if (!isDirLike$1(path$1.join(scopeDir, pkg.name))) continue;
|
|
7121
7122
|
const pkgJsonPath = path$1.join(scopeDir, pkg.name, "package.json");
|
|
7122
|
-
if (!fs.existsSync(pkgJsonPath)) continue;
|
|
7123
|
+
if (!fs$1.existsSync(pkgJsonPath)) continue;
|
|
7123
7124
|
let pkgJson;
|
|
7124
7125
|
try {
|
|
7125
|
-
const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
|
|
7126
|
+
const parsed = JSON.parse(fs$1.readFileSync(pkgJsonPath, "utf-8"));
|
|
7126
7127
|
if (typeof parsed !== "object" || parsed == null) continue;
|
|
7127
7128
|
pkgJson = parsed;
|
|
7128
7129
|
} catch {
|
|
@@ -7193,28 +7194,28 @@ var AddonManifest = class {
|
|
|
7193
7194
|
migrateFromInstallSourceMarkers(addonsDir) {
|
|
7194
7195
|
const m = this.read();
|
|
7195
7196
|
if (Object.keys(m.addons).length > 0) return 0;
|
|
7196
|
-
if (!fs.existsSync(addonsDir)) return 0;
|
|
7197
|
+
if (!fs$1.existsSync(addonsDir)) return 0;
|
|
7197
7198
|
let migrated = 0;
|
|
7198
7199
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
7199
|
-
for (const scope of fs.readdirSync(addonsDir, { withFileTypes: true })) {
|
|
7200
|
+
for (const scope of fs$1.readdirSync(addonsDir, { withFileTypes: true })) {
|
|
7200
7201
|
if (!scope.isDirectory() || !scope.name.startsWith("@")) continue;
|
|
7201
7202
|
const scopeDir = path$1.join(addonsDir, scope.name);
|
|
7202
|
-
for (const pkg of fs.readdirSync(scopeDir, { withFileTypes: true })) {
|
|
7203
|
+
for (const pkg of fs$1.readdirSync(scopeDir, { withFileTypes: true })) {
|
|
7203
7204
|
if (!pkg.isDirectory()) continue;
|
|
7204
7205
|
const pkgDir = path$1.join(scopeDir, pkg.name);
|
|
7205
7206
|
const markerPath = path$1.join(pkgDir, ".install-source");
|
|
7206
7207
|
const pkgJsonPath = path$1.join(pkgDir, "package.json");
|
|
7207
|
-
if (!fs.existsSync(pkgJsonPath)) continue;
|
|
7208
|
+
if (!fs$1.existsSync(pkgJsonPath)) continue;
|
|
7208
7209
|
let pkgJson;
|
|
7209
7210
|
try {
|
|
7210
|
-
const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
|
|
7211
|
+
const parsed = JSON.parse(fs$1.readFileSync(pkgJsonPath, "utf-8"));
|
|
7211
7212
|
if (typeof parsed !== "object" || parsed == null) continue;
|
|
7212
7213
|
pkgJson = parsed;
|
|
7213
7214
|
} catch {
|
|
7214
7215
|
continue;
|
|
7215
7216
|
}
|
|
7216
7217
|
if (!pkgJson.name || !pkgJson.version) continue;
|
|
7217
|
-
const source = fs.existsSync(markerPath) ? fs.readFileSync(markerPath, "utf-8").trim() : "bundled";
|
|
7218
|
+
const source = fs$1.existsSync(markerPath) ? fs$1.readFileSync(markerPath, "utf-8").trim() : "bundled";
|
|
7218
7219
|
m.addons[pkgJson.name] = {
|
|
7219
7220
|
name: pkgJson.name,
|
|
7220
7221
|
version: pkgJson.version,
|
|
@@ -7418,7 +7419,7 @@ function planClosureDedupe(input) {
|
|
|
7418
7419
|
function readTreeManifest(pkgJsonPath) {
|
|
7419
7420
|
let raw;
|
|
7420
7421
|
try {
|
|
7421
|
-
raw = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8")));
|
|
7422
|
+
raw = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(pkgJsonPath, "utf-8")));
|
|
7422
7423
|
} catch {
|
|
7423
7424
|
return null;
|
|
7424
7425
|
}
|
|
@@ -7443,7 +7444,7 @@ function readTreeManifest(pkgJsonPath) {
|
|
|
7443
7444
|
function listTopLevelEntries(nodeModulesDir) {
|
|
7444
7445
|
let entries;
|
|
7445
7446
|
try {
|
|
7446
|
-
entries = fs.readdirSync(nodeModulesDir, { withFileTypes: true });
|
|
7447
|
+
entries = fs$1.readdirSync(nodeModulesDir, { withFileTypes: true });
|
|
7447
7448
|
} catch {
|
|
7448
7449
|
return [];
|
|
7449
7450
|
}
|
|
@@ -7453,7 +7454,7 @@ function listTopLevelEntries(nodeModulesDir) {
|
|
|
7453
7454
|
if (entry.name.startsWith("@")) {
|
|
7454
7455
|
let inner;
|
|
7455
7456
|
try {
|
|
7456
|
-
inner = fs.readdirSync(path$1.join(nodeModulesDir, entry.name), { withFileTypes: true });
|
|
7457
|
+
inner = fs$1.readdirSync(path$1.join(nodeModulesDir, entry.name), { withFileTypes: true });
|
|
7457
7458
|
} catch {
|
|
7458
7459
|
continue;
|
|
7459
7460
|
}
|
|
@@ -7486,14 +7487,14 @@ function collectAddonTreeState(addonDir) {
|
|
|
7486
7487
|
const entryDir = path$1.join(nodeModulesDir, name);
|
|
7487
7488
|
let isLink = false;
|
|
7488
7489
|
try {
|
|
7489
|
-
isLink = fs.lstatSync(entryDir).isSymbolicLink();
|
|
7490
|
+
isLink = fs$1.lstatSync(entryDir).isSymbolicLink();
|
|
7490
7491
|
} catch {
|
|
7491
7492
|
continue;
|
|
7492
7493
|
}
|
|
7493
7494
|
if (isLink) {
|
|
7494
7495
|
let target = "";
|
|
7495
7496
|
try {
|
|
7496
|
-
target = fs.readlinkSync(entryDir);
|
|
7497
|
+
target = fs$1.readlinkSync(entryDir);
|
|
7497
7498
|
} catch {}
|
|
7498
7499
|
existingLinks.push({
|
|
7499
7500
|
name,
|
|
@@ -7507,7 +7508,7 @@ function collectAddonTreeState(addonDir) {
|
|
|
7507
7508
|
version: manifest.version
|
|
7508
7509
|
});
|
|
7509
7510
|
for (const [depName, range] of manifest.ranges) {
|
|
7510
|
-
if (fs.existsSync(path$1.join(entryDir, "node_modules", depName))) continue;
|
|
7511
|
+
if (fs$1.existsSync(path$1.join(entryDir, "node_modules", depName))) continue;
|
|
7511
7512
|
addRange(depName, range);
|
|
7512
7513
|
}
|
|
7513
7514
|
}
|
|
@@ -7537,7 +7538,7 @@ function resolveClosureNodeModulesDir(explicitDir) {
|
|
|
7537
7538
|
const frameworkDir = explicitDir ?? process.env["CAMSTACK_FRAMEWORK_DIR"];
|
|
7538
7539
|
if (frameworkDir === void 0 || frameworkDir.length === 0) return null;
|
|
7539
7540
|
const nodeModulesDir = explicitDir ?? path$1.join(frameworkDir, "node_modules");
|
|
7540
|
-
return fs.existsSync(nodeModulesDir) ? nodeModulesDir : null;
|
|
7541
|
+
return fs$1.existsSync(nodeModulesDir) ? nodeModulesDir : null;
|
|
7541
7542
|
}
|
|
7542
7543
|
function symlinkType() {
|
|
7543
7544
|
return process.platform === "win32" ? "junction" : "dir";
|
|
@@ -7556,10 +7557,10 @@ function executeClosureDedupe(addonDir, closureNodeModulesDir, plan, logger) {
|
|
|
7556
7557
|
const nodeModulesDir = path$1.join(addonDir, "node_modules");
|
|
7557
7558
|
const probePath = path$1.join(nodeModulesDir, ".closure-link-probe");
|
|
7558
7559
|
try {
|
|
7559
|
-
fs.mkdirSync(nodeModulesDir, { recursive: true });
|
|
7560
|
-
fs.rmSync(probePath, { force: true });
|
|
7561
|
-
fs.symlinkSync(closureNodeModulesDir, probePath, symlinkType());
|
|
7562
|
-
fs.rmSync(probePath, { force: true });
|
|
7560
|
+
fs$1.mkdirSync(nodeModulesDir, { recursive: true });
|
|
7561
|
+
fs$1.rmSync(probePath, { force: true });
|
|
7562
|
+
fs$1.symlinkSync(closureNodeModulesDir, probePath, symlinkType());
|
|
7563
|
+
fs$1.rmSync(probePath, { force: true });
|
|
7563
7564
|
} catch (err) {
|
|
7564
7565
|
logger.warn("closure dedupe skipped — symlinks unavailable on this volume", { meta: {
|
|
7565
7566
|
addonDir,
|
|
@@ -7581,12 +7582,12 @@ function executeClosureDedupe(addonDir, closureNodeModulesDir, plan, logger) {
|
|
|
7581
7582
|
}
|
|
7582
7583
|
const entryDir = path$1.join(nodeModulesDir, link.name);
|
|
7583
7584
|
try {
|
|
7584
|
-
fs.rmSync(entryDir, {
|
|
7585
|
+
fs$1.rmSync(entryDir, {
|
|
7585
7586
|
recursive: true,
|
|
7586
7587
|
force: true
|
|
7587
7588
|
});
|
|
7588
|
-
fs.mkdirSync(path$1.dirname(entryDir), { recursive: true });
|
|
7589
|
-
fs.symlinkSync(target, entryDir, symlinkType());
|
|
7589
|
+
fs$1.mkdirSync(path$1.dirname(entryDir), { recursive: true });
|
|
7590
|
+
fs$1.symlinkSync(target, entryDir, symlinkType());
|
|
7590
7591
|
linked.push(link.name);
|
|
7591
7592
|
} catch (err) {
|
|
7592
7593
|
logger.warn("closure dedupe — link failed; entry removed copy may need reinstall", { meta: {
|
|
@@ -7662,7 +7663,7 @@ async function installManifestNativeDeps(addonDir, pkgRaw, logger, registry, npm
|
|
|
7662
7663
|
count: Object.keys(native).length
|
|
7663
7664
|
} });
|
|
7664
7665
|
try {
|
|
7665
|
-
fs.writeFileSync(markerFile, markerHash);
|
|
7666
|
+
fs$1.writeFileSync(markerFile, markerHash);
|
|
7666
7667
|
} catch (err) {
|
|
7667
7668
|
logger.warn("Failed to write native deps marker", { meta: {
|
|
7668
7669
|
markerFile,
|
|
@@ -7700,7 +7701,7 @@ async function installManifestNativeDeps(addonDir, pkgRaw, logger, registry, npm
|
|
|
7700
7701
|
}
|
|
7701
7702
|
await rebuildNativeDeps(addonDir, pending.map(([name]) => name), logger, npmCacheDir ?? defaultNpmCacheDir(), registry);
|
|
7702
7703
|
try {
|
|
7703
|
-
fs.writeFileSync(markerFile, markerHash);
|
|
7704
|
+
fs$1.writeFileSync(markerFile, markerHash);
|
|
7704
7705
|
} catch (err) {
|
|
7705
7706
|
logger.warn("Failed to write native deps marker", { meta: {
|
|
7706
7707
|
markerFile,
|
|
@@ -7722,12 +7723,12 @@ function copyPrebuiltNativeDep(name, addonDir, logger) {
|
|
|
7722
7723
|
if (source === target) continue;
|
|
7723
7724
|
if (!hasBuiltBinary(source)) continue;
|
|
7724
7725
|
try {
|
|
7725
|
-
fs.rmSync(target, {
|
|
7726
|
+
fs$1.rmSync(target, {
|
|
7726
7727
|
recursive: true,
|
|
7727
7728
|
force: true
|
|
7728
7729
|
});
|
|
7729
|
-
fs.mkdirSync(path$1.dirname(target), { recursive: true });
|
|
7730
|
-
fs.cpSync(source, target, {
|
|
7730
|
+
fs$1.mkdirSync(path$1.dirname(target), { recursive: true });
|
|
7731
|
+
fs$1.cpSync(source, target, {
|
|
7731
7732
|
recursive: true,
|
|
7732
7733
|
dereference: true
|
|
7733
7734
|
});
|
|
@@ -7763,7 +7764,7 @@ var BUNDLED_NATIVE_SIBLING_SCOPES = {
|
|
|
7763
7764
|
function hasAnyDotNode(dir, maxDepth) {
|
|
7764
7765
|
let entries;
|
|
7765
7766
|
try {
|
|
7766
|
-
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
7767
|
+
entries = fs$1.readdirSync(dir, { withFileTypes: true });
|
|
7767
7768
|
} catch {
|
|
7768
7769
|
return false;
|
|
7769
7770
|
}
|
|
@@ -7777,12 +7778,12 @@ function copyPrebuiltModuleDir(src, dst, label, logger) {
|
|
|
7777
7778
|
if (!hasAnyDotNode(src, 5)) return;
|
|
7778
7779
|
if (hasAnyDotNode(dst, 5)) return;
|
|
7779
7780
|
try {
|
|
7780
|
-
fs.rmSync(dst, {
|
|
7781
|
+
fs$1.rmSync(dst, {
|
|
7781
7782
|
recursive: true,
|
|
7782
7783
|
force: true
|
|
7783
7784
|
});
|
|
7784
|
-
fs.mkdirSync(path$1.dirname(dst), { recursive: true });
|
|
7785
|
-
fs.cpSync(src, dst, {
|
|
7785
|
+
fs$1.mkdirSync(path$1.dirname(dst), { recursive: true });
|
|
7786
|
+
fs$1.cpSync(src, dst, {
|
|
7786
7787
|
recursive: true,
|
|
7787
7788
|
dereference: true
|
|
7788
7789
|
});
|
|
@@ -7817,7 +7818,7 @@ function copyPrebuiltModuleDir(src, dst, label, logger) {
|
|
|
7817
7818
|
*/
|
|
7818
7819
|
function copyBundledNativeModules(sourceDir, targetDir, logger) {
|
|
7819
7820
|
const srcNm = path$1.join(sourceDir, "node_modules");
|
|
7820
|
-
if (!fs.existsSync(srcNm)) return;
|
|
7821
|
+
if (!fs$1.existsSync(srcNm)) return;
|
|
7821
7822
|
const dstNm = path$1.join(targetDir, "node_modules");
|
|
7822
7823
|
for (const [name, scopes] of Object.entries(BUNDLED_NATIVE_SIBLING_SCOPES)) {
|
|
7823
7824
|
copyPrebuiltModuleDir(path$1.join(srcNm, name), path$1.join(dstNm, name), name, logger);
|
|
@@ -7825,7 +7826,7 @@ function copyBundledNativeModules(sourceDir, targetDir, logger) {
|
|
|
7825
7826
|
const scopeSrc = path$1.join(srcNm, scope);
|
|
7826
7827
|
let siblings;
|
|
7827
7828
|
try {
|
|
7828
|
-
siblings = fs.readdirSync(scopeSrc);
|
|
7829
|
+
siblings = fs$1.readdirSync(scopeSrc);
|
|
7829
7830
|
} catch {
|
|
7830
7831
|
continue;
|
|
7831
7832
|
}
|
|
@@ -7835,12 +7836,12 @@ function copyBundledNativeModules(sourceDir, targetDir, logger) {
|
|
|
7835
7836
|
}
|
|
7836
7837
|
/** A package dir is "built" when it carries a compiled `.node` or a prebuilds tree. */
|
|
7837
7838
|
function hasBuiltBinary(pkgDir) {
|
|
7838
|
-
if (!fs.existsSync(path$1.join(pkgDir, "package.json"))) return false;
|
|
7839
|
+
if (!fs$1.existsSync(path$1.join(pkgDir, "package.json"))) return false;
|
|
7839
7840
|
const releaseDir = path$1.join(pkgDir, "build", "Release");
|
|
7840
7841
|
try {
|
|
7841
|
-
if (fs.existsSync(releaseDir) && fs.readdirSync(releaseDir).some((f) => f.endsWith(".node"))) return true;
|
|
7842
|
+
if (fs$1.existsSync(releaseDir) && fs$1.readdirSync(releaseDir).some((f) => f.endsWith(".node"))) return true;
|
|
7842
7843
|
} catch {}
|
|
7843
|
-
return fs.existsSync(path$1.join(pkgDir, "prebuilds"));
|
|
7844
|
+
return fs$1.existsSync(path$1.join(pkgDir, "prebuilds"));
|
|
7844
7845
|
}
|
|
7845
7846
|
/** Candidate hoisted locations for `<name>`: NODE_PATH entries + ancestors of `addonDir`. */
|
|
7846
7847
|
function candidateHoistedDirs(name, addonDir) {
|
|
@@ -7878,7 +7879,7 @@ function hashDeclaration(deps) {
|
|
|
7878
7879
|
}
|
|
7879
7880
|
function markerMatches(markerFile, expected) {
|
|
7880
7881
|
try {
|
|
7881
|
-
return fs.readFileSync(markerFile, "utf-8").trim() === expected;
|
|
7882
|
+
return fs$1.readFileSync(markerFile, "utf-8").trim() === expected;
|
|
7882
7883
|
} catch {
|
|
7883
7884
|
return false;
|
|
7884
7885
|
}
|
|
@@ -8089,7 +8090,7 @@ function parseInstallSource(value) {
|
|
|
8089
8090
|
function readPackageJson(pkgJsonPath) {
|
|
8090
8091
|
let raw;
|
|
8091
8092
|
try {
|
|
8092
|
-
raw = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8")));
|
|
8093
|
+
raw = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(pkgJsonPath, "utf-8")));
|
|
8093
8094
|
} catch {
|
|
8094
8095
|
return null;
|
|
8095
8096
|
}
|
|
@@ -8133,7 +8134,7 @@ var REGISTRY_LATEST_TIMEOUT_MS = 15e3;
|
|
|
8133
8134
|
var FALLBACK_VERSION_PROBES = 25;
|
|
8134
8135
|
function readInstalledPackageVersion(addonDir) {
|
|
8135
8136
|
try {
|
|
8136
|
-
const raw = JSON.parse(fs.readFileSync(path$1.join(addonDir, "package.json"), "utf-8"));
|
|
8137
|
+
const raw = JSON.parse(fs$1.readFileSync(path$1.join(addonDir, "package.json"), "utf-8"));
|
|
8137
8138
|
if (raw === null || typeof raw !== "object") return null;
|
|
8138
8139
|
const version = Reflect.get(raw, "version");
|
|
8139
8140
|
return typeof version === "string" && version.length > 0 ? version : null;
|
|
@@ -8281,7 +8282,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8281
8282
|
} catch {
|
|
8282
8283
|
return Object.freeze([]);
|
|
8283
8284
|
}
|
|
8284
|
-
const raw = fs.readFileSync(pkgPath, "utf-8");
|
|
8285
|
+
const raw = fs$1.readFileSync(pkgPath, "utf-8");
|
|
8285
8286
|
const parsed = JSON.parse(raw);
|
|
8286
8287
|
const deps = Object.keys(parsed.dependencies ?? {});
|
|
8287
8288
|
const agentOnly = new Set(parsed.camstack?.agentOnlyBootstrapAddons ?? []);
|
|
@@ -8326,7 +8327,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8326
8327
|
} catch {
|
|
8327
8328
|
return Object.freeze([]);
|
|
8328
8329
|
}
|
|
8329
|
-
const raw = fs.readFileSync(pkgPath, "utf-8");
|
|
8330
|
+
const raw = fs$1.readFileSync(pkgPath, "utf-8");
|
|
8330
8331
|
const addons = JSON.parse(raw).camstack?.agentBootstrapAddons ?? [];
|
|
8331
8332
|
return Object.freeze(["@camstack/server", ...addons]);
|
|
8332
8333
|
}
|
|
@@ -8356,7 +8357,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8356
8357
|
this.logger.info(`Install source: ${isLocal ? `bundle (${this.bundledAddonsDir})` : "npm"}, ${pkgList.length} package(s)`);
|
|
8357
8358
|
for (const packageName of pkgList) {
|
|
8358
8359
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
8359
|
-
if (fs.existsSync(path$1.join(addonDir, "package.json"))) {
|
|
8360
|
+
if (fs$1.existsSync(path$1.join(addonDir, "package.json"))) {
|
|
8360
8361
|
if (isLocal || shouldSkipClosureProvidedSeed(packageName, this.isResolvableFromClosure(packageName))) {
|
|
8361
8362
|
this.logger.debug(`${packageName} — already installed, skipping`);
|
|
8362
8363
|
continue;
|
|
@@ -8607,7 +8608,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8607
8608
|
const installedPackages = this.listInstalled();
|
|
8608
8609
|
for (const pkg of installedPackages) {
|
|
8609
8610
|
try {
|
|
8610
|
-
if (fs.lstatSync(pkg.dir).isSymbolicLink()) continue;
|
|
8611
|
+
if (fs$1.lstatSync(pkg.dir).isSymbolicLink()) continue;
|
|
8611
8612
|
} catch {
|
|
8612
8613
|
continue;
|
|
8613
8614
|
}
|
|
@@ -8647,7 +8648,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8647
8648
|
if (closureNodeModules !== null) for (const link of state.existingLinks) {
|
|
8648
8649
|
if (!isClosureLinkTarget(link.target, closureNodeModules)) continue;
|
|
8649
8650
|
const linkDir = path$1.join(nodeModulesDir, link.name);
|
|
8650
|
-
const targetManifest = fs.existsSync(path$1.join(linkDir, "package.json"));
|
|
8651
|
+
const targetManifest = fs$1.existsSync(path$1.join(linkDir, "package.json"));
|
|
8651
8652
|
const ranges = state.requirements.get(link.name) ?? [];
|
|
8652
8653
|
let holds = targetManifest;
|
|
8653
8654
|
if (holds && ranges.length > 0) {
|
|
@@ -8656,14 +8657,14 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8656
8657
|
}
|
|
8657
8658
|
if (!holds) {
|
|
8658
8659
|
this.logger.warn(`${packageName} — closure link for ${link.name} no longer holds; reinstalling this addon's deps`, { meta: { target: link.target } });
|
|
8659
|
-
fs.rmSync(linkDir, { force: true });
|
|
8660
|
+
fs$1.rmSync(linkDir, { force: true });
|
|
8660
8661
|
needsInstall = true;
|
|
8661
8662
|
}
|
|
8662
8663
|
}
|
|
8663
8664
|
const linked = [];
|
|
8664
8665
|
for (const [depName, range] of declaredEntries) {
|
|
8665
8666
|
if (typeof range !== "string") continue;
|
|
8666
|
-
if (fs.existsSync(path$1.join(nodeModulesDir, depName, "package.json"))) continue;
|
|
8667
|
+
if (fs$1.existsSync(path$1.join(nodeModulesDir, depName, "package.json"))) continue;
|
|
8667
8668
|
const closureVersion = closureNodeModules === null ? void 0 : readClosureVersions(closureNodeModules, [depName]).get(depName);
|
|
8668
8669
|
if (closureNodeModules !== null && closureVersion !== void 0 && closureSatisfiesRange(range, closureVersion)) {
|
|
8669
8670
|
if (executeClosureDedupe(addonDir, closureNodeModules, {
|
|
@@ -8696,7 +8697,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8696
8697
|
const closureNodeModules = resolveClosureNodeModulesDir(this.closureNodeModulesDir);
|
|
8697
8698
|
if (closureNodeModules !== null) {
|
|
8698
8699
|
const state = collectAddonTreeState(addonDir);
|
|
8699
|
-
for (const link of state.existingLinks) if (isClosureLinkTarget(link.target, closureNodeModules)) fs.rmSync(path$1.join(addonDir, "node_modules", link.name), { force: true });
|
|
8700
|
+
for (const link of state.existingLinks) if (isClosureLinkTarget(link.target, closureNodeModules)) fs$1.rmSync(path$1.join(addonDir, "node_modules", link.name), { force: true });
|
|
8700
8701
|
}
|
|
8701
8702
|
this.logger.info(`${packageName} — reinstalling runtime dependencies`, { meta: { addonDir } });
|
|
8702
8703
|
await runNpm([
|
|
@@ -8741,7 +8742,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8741
8742
|
async realignFromClosure(packageName, closureDir) {
|
|
8742
8743
|
const targetDir = path$1.join(this.addonsDir, packageName);
|
|
8743
8744
|
const result = await this.installLocal(packageName, closureDir);
|
|
8744
|
-
await fs.promises.writeFile(path$1.join(targetDir, ".install-source"), "closure");
|
|
8745
|
+
await fs$1.promises.writeFile(path$1.join(targetDir, ".install-source"), "closure");
|
|
8745
8746
|
this.manifest.upsert(result.name, {
|
|
8746
8747
|
version: result.version,
|
|
8747
8748
|
source: "closure"
|
|
@@ -8757,17 +8758,17 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8757
8758
|
async installCopy(packageName, sourceDir, pkgData, targetDir) {
|
|
8758
8759
|
await this.ensureBuilt(packageName, sourceDir, pkgData);
|
|
8759
8760
|
const distDir = path$1.join(sourceDir, "dist");
|
|
8760
|
-
if (!fs.existsSync(distDir)) throw new Error(`${packageName} has no dist/ after build`);
|
|
8761
|
-
await fs.promises.rm(targetDir, {
|
|
8761
|
+
if (!fs$1.existsSync(distDir)) throw new Error(`${packageName} has no dist/ after build`);
|
|
8762
|
+
await fs$1.promises.rm(targetDir, {
|
|
8762
8763
|
recursive: true,
|
|
8763
8764
|
force: true
|
|
8764
8765
|
});
|
|
8765
8766
|
ensureDir(targetDir);
|
|
8766
|
-
await fs.promises.writeFile(path$1.join(targetDir, "package.json"), JSON.stringify(stripBundledDeps(pkgData), null, 2));
|
|
8767
|
+
await fs$1.promises.writeFile(path$1.join(targetDir, "package.json"), JSON.stringify(stripBundledDeps(pkgData), null, 2));
|
|
8767
8768
|
await copyDirRecursive(distDir, path$1.join(targetDir, "dist"));
|
|
8768
8769
|
await copyExtraFileDirs(pkgData, sourceDir, targetDir);
|
|
8769
8770
|
copyBundledNativeModules(sourceDir, targetDir, this.logger);
|
|
8770
|
-
await fs.promises.writeFile(path$1.join(targetDir, ".install-source"), "local");
|
|
8771
|
+
await fs$1.promises.writeFile(path$1.join(targetDir, ".install-source"), "local");
|
|
8771
8772
|
const localPkgVersion = asString$1(pkgData.version, "0.0.0");
|
|
8772
8773
|
this.manifest.upsert(packageName, {
|
|
8773
8774
|
version: localPkgVersion,
|
|
@@ -8808,7 +8809,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8808
8809
|
* unusual auth, offline mode, etc).
|
|
8809
8810
|
*/
|
|
8810
8811
|
async installFromNpm(packageName, version) {
|
|
8811
|
-
const tmpDir = fs.mkdtempSync(path$1.join(os$1.tmpdir(), "camstack-addon-npm-"));
|
|
8812
|
+
const tmpDir = fs$1.mkdtempSync(path$1.join(os$1.tmpdir(), "camstack-addon-npm-"));
|
|
8812
8813
|
const packageSpec = version ? `${packageName}@${version}` : packageName;
|
|
8813
8814
|
this.logger.info(`${packageName} — installing from npm`);
|
|
8814
8815
|
try {
|
|
@@ -8822,19 +8823,19 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8822
8823
|
];
|
|
8823
8824
|
if (this.registry) args.push("--registry", this.registry);
|
|
8824
8825
|
const { stdout } = await runNpm(args, this.npmRunOptions(tmpDir, 12e4));
|
|
8825
|
-
const tgzFiles = fs.readdirSync(tmpDir).filter((f) => f.endsWith(".tgz"));
|
|
8826
|
+
const tgzFiles = fs$1.readdirSync(tmpDir).filter((f) => f.endsWith(".tgz"));
|
|
8826
8827
|
if (tgzFiles.length === 0) throw new Error(`npm pack produced no tgz. stdout: ${stdout.trim()}`);
|
|
8827
8828
|
return path$1.join(tmpDir, tgzFiles[0]);
|
|
8828
8829
|
});
|
|
8829
8830
|
const result = await this.installFromTgz(tgzPath);
|
|
8830
|
-
fs.writeFileSync(path$1.join(this.addonsDir, result.name, ".install-source"), "npm");
|
|
8831
|
+
fs$1.writeFileSync(path$1.join(this.addonsDir, result.name, ".install-source"), "npm");
|
|
8831
8832
|
this.manifest.upsert(result.name, {
|
|
8832
8833
|
version: result.version,
|
|
8833
8834
|
source: "npm"
|
|
8834
8835
|
});
|
|
8835
8836
|
return result;
|
|
8836
8837
|
} finally {
|
|
8837
|
-
fs.rmSync(tmpDir, {
|
|
8838
|
+
fs$1.rmSync(tmpDir, {
|
|
8838
8839
|
recursive: true,
|
|
8839
8840
|
force: true
|
|
8840
8841
|
});
|
|
@@ -8872,7 +8873,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8872
8873
|
if (!tarRes.ok) throw new Error(`tarball GET ${tarballUrl} → ${tarRes.status}`);
|
|
8873
8874
|
const tgzPath = path$1.join(tmpDir, `${packageName.replace(/[/@]/g, "-").replace(/^-+/, "")}-${resolvedVersion}.tgz`);
|
|
8874
8875
|
const buf = Buffer.from(await tarRes.arrayBuffer());
|
|
8875
|
-
fs.writeFileSync(tgzPath, buf);
|
|
8876
|
+
fs$1.writeFileSync(tgzPath, buf);
|
|
8876
8877
|
return tgzPath;
|
|
8877
8878
|
}
|
|
8878
8879
|
/**
|
|
@@ -8893,7 +8894,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8893
8894
|
* on the next deploy.
|
|
8894
8895
|
*/
|
|
8895
8896
|
async evictInstallDir(targetDir) {
|
|
8896
|
-
if (!fs.existsSync(targetDir)) return;
|
|
8897
|
+
if (!fs$1.existsSync(targetDir)) return;
|
|
8897
8898
|
const graveyard = path$1.join(this.addonsDir, ".evicting");
|
|
8898
8899
|
ensureDir(graveyard);
|
|
8899
8900
|
await this.sweepGraveyard(graveyard);
|
|
@@ -8901,10 +8902,10 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8901
8902
|
const flatName = path$1.relative(this.addonsDir, targetDir).replace(/[/\\]/g, "-");
|
|
8902
8903
|
const asideDir = path$1.join(graveyard, `${flatName}-${ts}`);
|
|
8903
8904
|
try {
|
|
8904
|
-
fs.renameSync(targetDir, asideDir);
|
|
8905
|
+
fs$1.renameSync(targetDir, asideDir);
|
|
8905
8906
|
} catch (renameErr) {
|
|
8906
8907
|
if (renameErr.code === "EXDEV") {
|
|
8907
|
-
await fs.promises.rm(targetDir, {
|
|
8908
|
+
await fs$1.promises.rm(targetDir, {
|
|
8908
8909
|
recursive: true,
|
|
8909
8910
|
force: true
|
|
8910
8911
|
});
|
|
@@ -8912,7 +8913,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8912
8913
|
}
|
|
8913
8914
|
throw renameErr;
|
|
8914
8915
|
}
|
|
8915
|
-
await fs.promises.rm(asideDir, {
|
|
8916
|
+
await fs$1.promises.rm(asideDir, {
|
|
8916
8917
|
recursive: true,
|
|
8917
8918
|
force: true
|
|
8918
8919
|
}).catch((cleanupErr) => {
|
|
@@ -8933,14 +8934,14 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8933
8934
|
async sweepStagingResidue(stagingRoot) {
|
|
8934
8935
|
let names;
|
|
8935
8936
|
try {
|
|
8936
|
-
names = fs.readdirSync(stagingRoot);
|
|
8937
|
+
names = fs$1.readdirSync(stagingRoot);
|
|
8937
8938
|
} catch {
|
|
8938
8939
|
return;
|
|
8939
8940
|
}
|
|
8940
8941
|
const now = Date.now();
|
|
8941
8942
|
const ages = [];
|
|
8942
8943
|
for (const name of names) try {
|
|
8943
|
-
const stat = fs.statSync(path$1.join(stagingRoot, name));
|
|
8944
|
+
const stat = fs$1.statSync(path$1.join(stagingRoot, name));
|
|
8944
8945
|
ages.push({
|
|
8945
8946
|
name,
|
|
8946
8947
|
ageMs: now - stat.mtimeMs
|
|
@@ -8951,7 +8952,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8951
8952
|
stagingRoot,
|
|
8952
8953
|
entries: sweepable
|
|
8953
8954
|
} });
|
|
8954
|
-
await Promise.all(sweepable.map((name) => fs.promises.rm(path$1.join(stagingRoot, name), {
|
|
8955
|
+
await Promise.all(sweepable.map((name) => fs$1.promises.rm(path$1.join(stagingRoot, name), {
|
|
8955
8956
|
recursive: true,
|
|
8956
8957
|
force: true
|
|
8957
8958
|
}).catch(() => void 0)));
|
|
@@ -8960,11 +8961,11 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8960
8961
|
async sweepGraveyard(graveyard) {
|
|
8961
8962
|
let entries;
|
|
8962
8963
|
try {
|
|
8963
|
-
entries = fs.readdirSync(graveyard);
|
|
8964
|
+
entries = fs$1.readdirSync(graveyard);
|
|
8964
8965
|
} catch {
|
|
8965
8966
|
return;
|
|
8966
8967
|
}
|
|
8967
|
-
await Promise.all(entries.map((name) => fs.promises.rm(path$1.join(graveyard, name), {
|
|
8968
|
+
await Promise.all(entries.map((name) => fs$1.promises.rm(path$1.join(graveyard, name), {
|
|
8968
8969
|
recursive: true,
|
|
8969
8970
|
force: true
|
|
8970
8971
|
}).catch(() => void 0)));
|
|
@@ -9015,7 +9016,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9015
9016
|
return;
|
|
9016
9017
|
}
|
|
9017
9018
|
const strippedManifest = stripBundledDeps(pkgView.raw);
|
|
9018
|
-
await fs.promises.writeFile(pkgJsonPath, JSON.stringify(strippedManifest, null, 2));
|
|
9019
|
+
await fs$1.promises.writeFile(pkgJsonPath, JSON.stringify(strippedManifest, null, 2));
|
|
9019
9020
|
const deps = asJsonObject$1(strippedManifest["dependencies"]);
|
|
9020
9021
|
const depNames = deps ? Object.keys(deps) : [];
|
|
9021
9022
|
if (depNames.length === 0) return;
|
|
@@ -9147,9 +9148,9 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9147
9148
|
"-C",
|
|
9148
9149
|
stagingDir
|
|
9149
9150
|
], { timeout: 12e4 });
|
|
9150
|
-
const pkgDir = fs.existsSync(path$1.join(stagingDir, "package", "package.json")) ? path$1.join(stagingDir, "package") : stagingDir;
|
|
9151
|
+
const pkgDir = fs$1.existsSync(path$1.join(stagingDir, "package", "package.json")) ? path$1.join(stagingDir, "package") : stagingDir;
|
|
9151
9152
|
const pkgJsonPath = path$1.join(pkgDir, "package.json");
|
|
9152
|
-
if (!fs.existsSync(pkgJsonPath)) throw new Error("No package.json found in tgz archive");
|
|
9153
|
+
if (!fs$1.existsSync(pkgJsonPath)) throw new Error("No package.json found in tgz archive");
|
|
9153
9154
|
const pkgView = readPackageJson(pkgJsonPath);
|
|
9154
9155
|
if (!pkgView) throw new Error(`Invalid package.json at ${pkgJsonPath}`);
|
|
9155
9156
|
if (!pkgView.camstackAddons) throw new Error(`Package ${pkgView.name} has no camstack.addons manifest`);
|
|
@@ -9159,7 +9160,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9159
9160
|
this.dedupeTreeAgainstClosure(pkgDir, pkgView.name);
|
|
9160
9161
|
await this.evictInstallDir(targetDir);
|
|
9161
9162
|
ensureDir(path$1.dirname(targetDir));
|
|
9162
|
-
await fs.promises.rename(pkgDir, targetDir);
|
|
9163
|
+
await fs$1.promises.rename(pkgDir, targetDir);
|
|
9163
9164
|
this.manifest.upsert(pkgView.name, {
|
|
9164
9165
|
version: pkgView.version,
|
|
9165
9166
|
source: "bundled"
|
|
@@ -9170,7 +9171,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9170
9171
|
};
|
|
9171
9172
|
} finally {
|
|
9172
9173
|
this.inFlightStaging.delete(stagingName);
|
|
9173
|
-
await fs.promises.rm(stagingDir, {
|
|
9174
|
+
await fs$1.promises.rm(stagingDir, {
|
|
9174
9175
|
recursive: true,
|
|
9175
9176
|
force: true
|
|
9176
9177
|
}).catch(() => void 0);
|
|
@@ -9200,24 +9201,24 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9200
9201
|
const current = this.manifest.get(packageName);
|
|
9201
9202
|
if (current == null) throw new Error(`Cannot update ${packageName}: not currently tracked in manifest`);
|
|
9202
9203
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
9203
|
-
if (!fs.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
|
|
9204
|
+
if (!fs$1.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
|
|
9204
9205
|
const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
9205
9206
|
const backupRoot = path$1.join(this.addonsDir, ".backups", packageName);
|
|
9206
9207
|
ensureDir(backupRoot);
|
|
9207
9208
|
const backupDir = path$1.join(backupRoot, ts);
|
|
9208
9209
|
this.logger.info(`${packageName} — backing up v${current.version} → ${backupDir}`);
|
|
9209
|
-
fs.renameSync(addonDir, backupDir);
|
|
9210
|
+
fs$1.renameSync(addonDir, backupDir);
|
|
9210
9211
|
let result;
|
|
9211
9212
|
try {
|
|
9212
9213
|
result = await this.installFromNpm(packageName, version);
|
|
9213
9214
|
} catch (installErr) {
|
|
9214
9215
|
this.logger.error(`${packageName} — install failed, restoring backup`, { meta: { error: errMsg$1(installErr) } });
|
|
9215
9216
|
try {
|
|
9216
|
-
if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
|
|
9217
|
+
if (fs$1.existsSync(addonDir)) fs$1.rmSync(addonDir, {
|
|
9217
9218
|
recursive: true,
|
|
9218
9219
|
force: true
|
|
9219
9220
|
});
|
|
9220
|
-
fs.renameSync(backupDir, addonDir);
|
|
9221
|
+
fs$1.renameSync(backupDir, addonDir);
|
|
9221
9222
|
this.manifest.upsert(packageName, {
|
|
9222
9223
|
version: current.version,
|
|
9223
9224
|
source: current.source,
|
|
@@ -9278,7 +9279,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9278
9279
|
const current = this.manifest.get(packageName);
|
|
9279
9280
|
if (current == null) throw new Error(`Cannot update ${packageName}: not currently tracked in manifest`);
|
|
9280
9281
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
9281
|
-
if (!fs.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
|
|
9282
|
+
if (!fs$1.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
|
|
9282
9283
|
await this.installRuntimeDependencies(stagedPath, packageName);
|
|
9283
9284
|
await this.installNativeDependencies(stagedPath, packageName);
|
|
9284
9285
|
this.dedupeTreeAgainstClosure(stagedPath, packageName);
|
|
@@ -9287,14 +9288,14 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9287
9288
|
ensureDir(backupRoot);
|
|
9288
9289
|
const backupDir = path$1.join(backupRoot, ts);
|
|
9289
9290
|
this.logger.info(`${packageName} — backing up v${current.version} → ${backupDir}`);
|
|
9290
|
-
fs.renameSync(addonDir, backupDir);
|
|
9291
|
+
fs$1.renameSync(addonDir, backupDir);
|
|
9291
9292
|
try {
|
|
9292
9293
|
try {
|
|
9293
|
-
fs.renameSync(stagedPath, addonDir);
|
|
9294
|
+
fs$1.renameSync(stagedPath, addonDir);
|
|
9294
9295
|
} catch (renameErr) {
|
|
9295
9296
|
if (renameErr.code === "EXDEV") {
|
|
9296
|
-
fs.cpSync(stagedPath, addonDir, { recursive: true });
|
|
9297
|
-
fs.rmSync(stagedPath, {
|
|
9297
|
+
fs$1.cpSync(stagedPath, addonDir, { recursive: true });
|
|
9298
|
+
fs$1.rmSync(stagedPath, {
|
|
9298
9299
|
recursive: true,
|
|
9299
9300
|
force: true
|
|
9300
9301
|
});
|
|
@@ -9303,11 +9304,11 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9303
9304
|
} catch (swapErr) {
|
|
9304
9305
|
this.logger.error(`${packageName} — staged swap failed, restoring backup`, { meta: { error: errMsg$1(swapErr) } });
|
|
9305
9306
|
try {
|
|
9306
|
-
if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
|
|
9307
|
+
if (fs$1.existsSync(addonDir)) fs$1.rmSync(addonDir, {
|
|
9307
9308
|
recursive: true,
|
|
9308
9309
|
force: true
|
|
9309
9310
|
});
|
|
9310
|
-
fs.renameSync(backupDir, addonDir);
|
|
9311
|
+
fs$1.renameSync(backupDir, addonDir);
|
|
9311
9312
|
this.manifest.upsert(packageName, {
|
|
9312
9313
|
version: current.version,
|
|
9313
9314
|
source: current.source,
|
|
@@ -9346,20 +9347,20 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9346
9347
|
this.logger.warn(`${packageName} — no backup to rollback to`);
|
|
9347
9348
|
return null;
|
|
9348
9349
|
}
|
|
9349
|
-
if (!fs.existsSync(entry.lastBackupDir)) {
|
|
9350
|
+
if (!fs$1.existsSync(entry.lastBackupDir)) {
|
|
9350
9351
|
this.logger.warn(`${packageName} — backup dir vanished: ${entry.lastBackupDir}`);
|
|
9351
9352
|
return null;
|
|
9352
9353
|
}
|
|
9353
9354
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
9354
|
-
if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
|
|
9355
|
+
if (fs$1.existsSync(addonDir)) fs$1.rmSync(addonDir, {
|
|
9355
9356
|
recursive: true,
|
|
9356
9357
|
force: true
|
|
9357
9358
|
});
|
|
9358
|
-
fs.renameSync(entry.lastBackupDir, addonDir);
|
|
9359
|
+
fs$1.renameSync(entry.lastBackupDir, addonDir);
|
|
9359
9360
|
const pkgJsonPath = path$1.join(addonDir, "package.json");
|
|
9360
9361
|
let restoredVersion = entry.version;
|
|
9361
|
-
if (fs.existsSync(pkgJsonPath)) try {
|
|
9362
|
-
const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
|
|
9362
|
+
if (fs$1.existsSync(pkgJsonPath)) try {
|
|
9363
|
+
const parsed = JSON.parse(fs$1.readFileSync(pkgJsonPath, "utf-8"));
|
|
9363
9364
|
if (typeof parsed === "object" && parsed != null) {
|
|
9364
9365
|
const v = parsed.version;
|
|
9365
9366
|
if (typeof v === "string" && v.length > 0) restoredVersion = v;
|
|
@@ -9407,7 +9408,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9407
9408
|
return false;
|
|
9408
9409
|
}
|
|
9409
9410
|
try {
|
|
9410
|
-
await fs.promises.rm(target, {
|
|
9411
|
+
await fs$1.promises.rm(target, {
|
|
9411
9412
|
recursive: true,
|
|
9412
9413
|
force: true
|
|
9413
9414
|
});
|
|
@@ -9425,7 +9426,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9425
9426
|
listBackupsFor(packageName) {
|
|
9426
9427
|
const dir = path$1.join(this.backupsRoot, packageName);
|
|
9427
9428
|
try {
|
|
9428
|
-
return fs.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => path$1.join(dir, e.name)).sort();
|
|
9429
|
+
return fs$1.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => path$1.join(dir, e.name)).sort();
|
|
9429
9430
|
} catch {
|
|
9430
9431
|
return [];
|
|
9431
9432
|
}
|
|
@@ -9457,7 +9458,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9457
9458
|
for (const dir of [pkgDir, path$1.dirname(pkgDir)]) {
|
|
9458
9459
|
if (!this.isInsideBackups(dir)) continue;
|
|
9459
9460
|
try {
|
|
9460
|
-
await fs.promises.rmdir(dir);
|
|
9461
|
+
await fs$1.promises.rmdir(dir);
|
|
9461
9462
|
} catch {
|
|
9462
9463
|
return;
|
|
9463
9464
|
}
|
|
@@ -9539,7 +9540,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9539
9540
|
*/
|
|
9540
9541
|
resolveBackupToKeep(packageName, backups) {
|
|
9541
9542
|
const liveDir = path$1.join(this.addonsDir, packageName);
|
|
9542
|
-
if (!fs.existsSync(liveDir)) {
|
|
9543
|
+
if (!fs$1.existsSync(liveDir)) {
|
|
9543
9544
|
const newest = backups[backups.length - 1] ?? null;
|
|
9544
9545
|
if (newest != null) this.logger.warn(`${packageName} — live install dir missing; retaining its newest backup as the only surviving copy`, { meta: {
|
|
9545
9546
|
liveDir,
|
|
@@ -9556,7 +9557,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9556
9557
|
listBackedUpPackages() {
|
|
9557
9558
|
let entries;
|
|
9558
9559
|
try {
|
|
9559
|
-
entries = fs.readdirSync(this.backupsRoot, { withFileTypes: true });
|
|
9560
|
+
entries = fs$1.readdirSync(this.backupsRoot, { withFileTypes: true });
|
|
9560
9561
|
} catch {
|
|
9561
9562
|
return [];
|
|
9562
9563
|
}
|
|
@@ -9568,14 +9569,14 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9568
9569
|
continue;
|
|
9569
9570
|
}
|
|
9570
9571
|
const scopeDir = path$1.join(this.backupsRoot, entry.name);
|
|
9571
|
-
for (const inner of fs.readdirSync(scopeDir, { withFileTypes: true })) if (inner.isDirectory()) names.push(`${entry.name}/${inner.name}`);
|
|
9572
|
+
for (const inner of fs$1.readdirSync(scopeDir, { withFileTypes: true })) if (inner.isDirectory()) names.push(`${entry.name}/${inner.name}`);
|
|
9572
9573
|
}
|
|
9573
9574
|
return names;
|
|
9574
9575
|
}
|
|
9575
9576
|
async uninstall(packageName) {
|
|
9576
9577
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
9577
|
-
if (fs.existsSync(addonDir)) {
|
|
9578
|
-
fs.rmSync(addonDir, {
|
|
9578
|
+
if (fs$1.existsSync(addonDir)) {
|
|
9579
|
+
fs$1.rmSync(addonDir, {
|
|
9579
9580
|
recursive: true,
|
|
9580
9581
|
force: true
|
|
9581
9582
|
});
|
|
@@ -9583,8 +9584,8 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9583
9584
|
return;
|
|
9584
9585
|
}
|
|
9585
9586
|
const legacyDir = path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""));
|
|
9586
|
-
if (fs.existsSync(legacyDir)) {
|
|
9587
|
-
fs.rmSync(legacyDir, {
|
|
9587
|
+
if (fs$1.existsSync(legacyDir)) {
|
|
9588
|
+
fs$1.rmSync(legacyDir, {
|
|
9588
9589
|
recursive: true,
|
|
9589
9590
|
force: true
|
|
9590
9591
|
});
|
|
@@ -9592,22 +9593,22 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9592
9593
|
}
|
|
9593
9594
|
}
|
|
9594
9595
|
listInstalled() {
|
|
9595
|
-
if (!fs.existsSync(this.addonsDir)) return [];
|
|
9596
|
+
if (!fs$1.existsSync(this.addonsDir)) return [];
|
|
9596
9597
|
const packageDirs = [];
|
|
9597
|
-
for (const entry of fs.readdirSync(this.addonsDir, { withFileTypes: true })) {
|
|
9598
|
+
for (const entry of fs$1.readdirSync(this.addonsDir, { withFileTypes: true })) {
|
|
9598
9599
|
if (!isDirEntry(entry, this.addonsDir)) continue;
|
|
9599
9600
|
if (entry.name.startsWith("@")) {
|
|
9600
9601
|
const scopeDir = path$1.join(this.addonsDir, entry.name);
|
|
9601
|
-
for (const inner of fs.readdirSync(scopeDir, { withFileTypes: true })) if (isDirEntry(inner, scopeDir)) packageDirs.push(path$1.join(scopeDir, inner.name));
|
|
9602
|
+
for (const inner of fs$1.readdirSync(scopeDir, { withFileTypes: true })) if (isDirEntry(inner, scopeDir)) packageDirs.push(path$1.join(scopeDir, inner.name));
|
|
9602
9603
|
} else packageDirs.push(path$1.join(this.addonsDir, entry.name));
|
|
9603
9604
|
}
|
|
9604
9605
|
return packageDirs.map((dir) => {
|
|
9605
9606
|
const pkgPath = path$1.join(dir, "package.json");
|
|
9606
|
-
if (!fs.existsSync(pkgPath)) return null;
|
|
9607
|
+
if (!fs$1.existsSync(pkgPath)) return null;
|
|
9607
9608
|
const pkg = readPackageJson(pkgPath);
|
|
9608
9609
|
if (!pkg || !pkg.camstackAddons) return null;
|
|
9609
9610
|
const sourceFile = path$1.join(dir, ".install-source");
|
|
9610
|
-
const installSource = fs.existsSync(sourceFile) ? parseInstallSource(fs.readFileSync(sourceFile, "utf-8").trim()) : void 0;
|
|
9611
|
+
const installSource = fs$1.existsSync(sourceFile) ? parseInstallSource(fs$1.readFileSync(sourceFile, "utf-8").trim()) : void 0;
|
|
9611
9612
|
return {
|
|
9612
9613
|
name: pkg.name,
|
|
9613
9614
|
version: pkg.version,
|
|
@@ -9617,13 +9618,13 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9617
9618
|
}).filter((item) => item !== null);
|
|
9618
9619
|
}
|
|
9619
9620
|
isInstalled(packageName) {
|
|
9620
|
-
if (fs.existsSync(path$1.join(this.addonsDir, packageName, "package.json"))) return true;
|
|
9621
|
-
return fs.existsSync(path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json"));
|
|
9621
|
+
if (fs$1.existsSync(path$1.join(this.addonsDir, packageName, "package.json"))) return true;
|
|
9622
|
+
return fs$1.existsSync(path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json"));
|
|
9622
9623
|
}
|
|
9623
9624
|
getInstalledPackage(packageName) {
|
|
9624
9625
|
let pkgPath = path$1.join(this.addonsDir, packageName, "package.json");
|
|
9625
|
-
if (!fs.existsSync(pkgPath)) pkgPath = path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json");
|
|
9626
|
-
if (!fs.existsSync(pkgPath)) return null;
|
|
9626
|
+
if (!fs$1.existsSync(pkgPath)) pkgPath = path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json");
|
|
9627
|
+
if (!fs$1.existsSync(pkgPath)) return null;
|
|
9627
9628
|
const pkg = readPackageJson(pkgPath);
|
|
9628
9629
|
if (!pkg) return null;
|
|
9629
9630
|
return {
|
|
@@ -9642,7 +9643,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9642
9643
|
]) {
|
|
9643
9644
|
const candidate = path$1.join(this.bundledAddonsDir, dirName);
|
|
9644
9645
|
try {
|
|
9645
|
-
const pkg = asJsonObject$1(parseJsonUnknown(fs.readFileSync(path$1.join(candidate, "package.json"), "utf-8")));
|
|
9646
|
+
const pkg = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(path$1.join(candidate, "package.json"), "utf-8")));
|
|
9646
9647
|
if (pkg && asString$1(pkg["name"]) === packageName) return candidate;
|
|
9647
9648
|
} catch {}
|
|
9648
9649
|
}
|
|
@@ -9651,7 +9652,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9651
9652
|
/** Ensure a package is built (dist/ exists and page bundles present) */
|
|
9652
9653
|
async ensureBuilt(packageName, sourceDir, pkgData) {
|
|
9653
9654
|
const distDir = path$1.join(sourceDir, "dist");
|
|
9654
|
-
if (!(!fs.existsSync(distDir) || this.isDistIncomplete(pkgData, sourceDir))) return;
|
|
9655
|
+
if (!(!fs$1.existsSync(distDir) || this.isDistIncomplete(pkgData, sourceDir))) return;
|
|
9655
9656
|
this.logger.info(`${packageName} — building (dist/ missing or incomplete)`);
|
|
9656
9657
|
try {
|
|
9657
9658
|
await runNpm(["run", "build"], this.npmRunOptions(sourceDir, 18e4));
|
|
@@ -9666,7 +9667,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9666
9667
|
if (!camstack?.addons) return false;
|
|
9667
9668
|
for (const addon of camstack.addons) {
|
|
9668
9669
|
if (!addon.pages) continue;
|
|
9669
|
-
for (const page of addon.pages) if (page.bundle && !fs.existsSync(path$1.join(sourceDir, "dist", page.bundle))) return true;
|
|
9670
|
+
for (const page of addon.pages) if (page.bundle && !fs$1.existsSync(path$1.join(sourceDir, "dist", page.bundle))) return true;
|
|
9670
9671
|
}
|
|
9671
9672
|
return false;
|
|
9672
9673
|
}
|
|
@@ -9675,7 +9676,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9675
9676
|
function isDirEntry(entry, parentDir) {
|
|
9676
9677
|
if (entry.isDirectory()) return true;
|
|
9677
9678
|
if (entry.isSymbolicLink()) try {
|
|
9678
|
-
return fs.statSync(path$1.join(parentDir, entry.name)).isDirectory();
|
|
9679
|
+
return fs$1.statSync(path$1.join(parentDir, entry.name)).isDirectory();
|
|
9679
9680
|
} catch {
|
|
9680
9681
|
return false;
|
|
9681
9682
|
}
|
|
@@ -9774,7 +9775,7 @@ function selectAddonResidue(candidates) {
|
|
|
9774
9775
|
}
|
|
9775
9776
|
function readDeclaredName(dir) {
|
|
9776
9777
|
try {
|
|
9777
|
-
const parsed = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
9778
|
+
const parsed = JSON.parse(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
9778
9779
|
if (typeof parsed !== "object" || parsed === null) return null;
|
|
9779
9780
|
const name = parsed.name;
|
|
9780
9781
|
return typeof name === "string" ? name : null;
|
|
@@ -9784,7 +9785,7 @@ function readDeclaredName(dir) {
|
|
|
9784
9785
|
}
|
|
9785
9786
|
function readDeclaredVersion(dir) {
|
|
9786
9787
|
try {
|
|
9787
|
-
const parsed = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
9788
|
+
const parsed = JSON.parse(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
9788
9789
|
if (typeof parsed !== "object" || parsed === null) return null;
|
|
9789
9790
|
const version = parsed.version;
|
|
9790
9791
|
return typeof version === "string" ? version : null;
|
|
@@ -9794,7 +9795,7 @@ function readDeclaredVersion(dir) {
|
|
|
9794
9795
|
}
|
|
9795
9796
|
function isDirLike(p) {
|
|
9796
9797
|
try {
|
|
9797
|
-
return fs.statSync(p).isDirectory();
|
|
9798
|
+
return fs$1.statSync(p).isDirectory();
|
|
9798
9799
|
} catch {
|
|
9799
9800
|
return false;
|
|
9800
9801
|
}
|
|
@@ -9804,7 +9805,7 @@ function freeQuarantineTarget(store, scope, dirName) {
|
|
|
9804
9805
|
const base = scope === null ? dirName : `${scope.replace("@", "")}__${dirName}`;
|
|
9805
9806
|
let candidate = path$1.join(store, base);
|
|
9806
9807
|
let n = 1;
|
|
9807
|
-
while (fs.existsSync(candidate)) {
|
|
9808
|
+
while (fs$1.existsSync(candidate)) {
|
|
9808
9809
|
candidate = path$1.join(store, `${base}-${n}`);
|
|
9809
9810
|
n += 1;
|
|
9810
9811
|
}
|
|
@@ -9821,7 +9822,7 @@ function freeQuarantineTarget(store, scope, dirName) {
|
|
|
9821
9822
|
function quarantineAddonResidue(addonsDir, log) {
|
|
9822
9823
|
const quarantined = [];
|
|
9823
9824
|
const failed = [];
|
|
9824
|
-
if (!fs.existsSync(addonsDir)) return {
|
|
9825
|
+
if (!fs$1.existsSync(addonsDir)) return {
|
|
9825
9826
|
quarantined,
|
|
9826
9827
|
failed
|
|
9827
9828
|
};
|
|
@@ -9829,7 +9830,7 @@ function quarantineAddonResidue(addonsDir, log) {
|
|
|
9829
9830
|
const scan = (parent, scope) => {
|
|
9830
9831
|
let names;
|
|
9831
9832
|
try {
|
|
9832
|
-
names = fs.readdirSync(parent);
|
|
9833
|
+
names = fs$1.readdirSync(parent);
|
|
9833
9834
|
} catch {
|
|
9834
9835
|
return;
|
|
9835
9836
|
}
|
|
@@ -9848,8 +9849,8 @@ function quarantineAddonResidue(addonsDir, log) {
|
|
|
9848
9849
|
const version = readDeclaredVersion(full);
|
|
9849
9850
|
const to = freeQuarantineTarget(store, scope, dirName);
|
|
9850
9851
|
try {
|
|
9851
|
-
fs.mkdirSync(store, { recursive: true });
|
|
9852
|
-
fs.renameSync(full, to);
|
|
9852
|
+
fs$1.mkdirSync(store, { recursive: true });
|
|
9853
|
+
fs$1.renameSync(full, to);
|
|
9853
9854
|
} catch (err) {
|
|
9854
9855
|
const error = err instanceof Error ? err.message : String(err);
|
|
9855
9856
|
failed.push({
|
|
@@ -9907,11 +9908,11 @@ function getRestartMarkerPath(dataDir) {
|
|
|
9907
9908
|
* intact or no marker at all (never a half-written file).
|
|
9908
9909
|
*/
|
|
9909
9910
|
function writePendingRestart(dataDir, marker) {
|
|
9910
|
-
fs.mkdirSync(dataDir, { recursive: true });
|
|
9911
|
+
fs$1.mkdirSync(dataDir, { recursive: true });
|
|
9911
9912
|
const markerPath = getRestartMarkerPath(dataDir);
|
|
9912
9913
|
const tmpPath = `${markerPath}.tmp`;
|
|
9913
|
-
fs.writeFileSync(tmpPath, JSON.stringify(marker, null, 2), "utf-8");
|
|
9914
|
-
fs.renameSync(tmpPath, markerPath);
|
|
9914
|
+
fs$1.writeFileSync(tmpPath, JSON.stringify(marker, null, 2), "utf-8");
|
|
9915
|
+
fs$1.renameSync(tmpPath, markerPath);
|
|
9915
9916
|
}
|
|
9916
9917
|
/**
|
|
9917
9918
|
* Read + consume the marker. Returns the parsed payload on success and
|
|
@@ -9936,10 +9937,10 @@ function writePendingRestart(dataDir, marker) {
|
|
|
9936
9937
|
*/
|
|
9937
9938
|
function readPendingRestart(dataDir) {
|
|
9938
9939
|
const markerPath = getRestartMarkerPath(dataDir);
|
|
9939
|
-
if (!fs.existsSync(markerPath)) return null;
|
|
9940
|
+
if (!fs$1.existsSync(markerPath)) return null;
|
|
9940
9941
|
let raw;
|
|
9941
9942
|
try {
|
|
9942
|
-
raw = fs.readFileSync(markerPath, "utf-8");
|
|
9943
|
+
raw = fs$1.readFileSync(markerPath, "utf-8");
|
|
9943
9944
|
} catch (err) {
|
|
9944
9945
|
console.error("[restart-coordinator] Marker unreadable — leaving in place:", err);
|
|
9945
9946
|
return null;
|
|
@@ -9978,7 +9979,7 @@ function readPendingRestart(dataDir) {
|
|
|
9978
9979
|
/** Remove the marker if present. No-op if missing. */
|
|
9979
9980
|
function clearPendingRestart(dataDir) {
|
|
9980
9981
|
const markerPath = getRestartMarkerPath(dataDir);
|
|
9981
|
-
fs.rmSync(markerPath, { force: true });
|
|
9982
|
+
fs$1.rmSync(markerPath, { force: true });
|
|
9982
9983
|
}
|
|
9983
9984
|
function isRestartKind(value) {
|
|
9984
9985
|
return value === "framework-update" || value === "manual" || value === "system";
|
|
@@ -9990,7 +9991,7 @@ function scheduleSelfRestart(options = {}) {
|
|
|
9990
9991
|
const touchTarget = process.env["CAMSTACK_RESTART_TOUCH_FILE"];
|
|
9991
9992
|
if (touchTarget !== void 0 && touchTarget.length > 0) try {
|
|
9992
9993
|
const now = /* @__PURE__ */ new Date();
|
|
9993
|
-
fs.utimesSync(touchTarget, now, now);
|
|
9994
|
+
fs$1.utimesSync(touchTarget, now, now);
|
|
9994
9995
|
return;
|
|
9995
9996
|
} catch (err) {
|
|
9996
9997
|
console.error("[restart-coordinator] dev touch-reload failed; falling through to process exit:", err);
|
|
@@ -14383,7 +14384,7 @@ function legacyConfigYamlCandidates(env) {
|
|
|
14383
14384
|
];
|
|
14384
14385
|
}
|
|
14385
14386
|
function findLegacyFile(env) {
|
|
14386
|
-
return legacyConfigYamlCandidates(env).find((candidate) => fs.existsSync(candidate));
|
|
14387
|
+
return legacyConfigYamlCandidates(env).find((candidate) => fs$1.existsSync(candidate));
|
|
14387
14388
|
}
|
|
14388
14389
|
/** The legacy value of a key when it is well-formed, else undefined. */
|
|
14389
14390
|
function legacyValue(server, key) {
|
|
@@ -14419,7 +14420,7 @@ function reconcileLegacyConfigYaml(env, effective) {
|
|
|
14419
14420
|
if (file === void 0) return NOTHING_TO_APPLY;
|
|
14420
14421
|
let raw;
|
|
14421
14422
|
try {
|
|
14422
|
-
raw = asJsonObject(load(fs.readFileSync(file, "utf-8"))) ?? {};
|
|
14423
|
+
raw = asJsonObject(load(fs$1.readFileSync(file, "utf-8"))) ?? {};
|
|
14423
14424
|
} catch (err) {
|
|
14424
14425
|
return {
|
|
14425
14426
|
overrides: {},
|
|
@@ -17866,9 +17867,9 @@ var CapRouteResolver = class {
|
|
|
17866
17867
|
* {@link CapCallInput.callerAddonId} so the child can stamp before invoke
|
|
17867
17868
|
* (without it, `stampCallerAddonId` strips an args-only claim).
|
|
17868
17869
|
*/
|
|
17869
|
-
async dispatch(route, method, args, addonId, callerAddonId) {
|
|
17870
|
+
async dispatch(route, method, args, addonId, callerAddonId, origin) {
|
|
17870
17871
|
try {
|
|
17871
|
-
return await this.dispatchInner(route, method, args, addonId, callerAddonId);
|
|
17872
|
+
return await this.dispatchInner(route, method, args, addonId, callerAddonId, origin);
|
|
17872
17873
|
} catch (err) {
|
|
17873
17874
|
if (err instanceof CapRouteError) throw err;
|
|
17874
17875
|
if (route.kind === "hub-in-process" || err instanceof PeerAnsweredError) throw err;
|
|
@@ -17888,9 +17889,13 @@ var CapRouteResolver = class {
|
|
|
17888
17889
|
* Inner dispatch: may throw CapRouteError (validation failures) or arbitrary
|
|
17889
17890
|
* transport errors. The outer `dispatch` wraps non-CapRouteErrors.
|
|
17890
17891
|
*/
|
|
17891
|
-
async dispatchInner(route, method, args, addonId, callerAddonId) {
|
|
17892
|
+
async dispatchInner(route, method, args, addonId, callerAddonId, origin) {
|
|
17893
|
+
const carried = origin ?? readCurrentCommandOrigin();
|
|
17892
17894
|
switch (route.kind) {
|
|
17893
|
-
case "hub-in-process":
|
|
17895
|
+
case "hub-in-process": {
|
|
17896
|
+
const invoke = () => route.ref.invoke(method, stampCallerAddonId(args, callerAddonId));
|
|
17897
|
+
return carried === void 0 ? invoke() : runWithCapCallContext(commandOrigin(carried).context, invoke);
|
|
17898
|
+
}
|
|
17894
17899
|
case "hub-local-uds": {
|
|
17895
17900
|
const registry = this.hubLocalRegistry;
|
|
17896
17901
|
if (registry === null) throw new CapRouteError(route.capName, method, {
|
|
@@ -17907,7 +17912,8 @@ var CapRouteResolver = class {
|
|
|
17907
17912
|
method,
|
|
17908
17913
|
args,
|
|
17909
17914
|
...deviceId !== void 0 ? { deviceId } : {},
|
|
17910
|
-
...wireCaller !== void 0 ? { callerAddonId: wireCaller } : {}
|
|
17915
|
+
...wireCaller !== void 0 ? { callerAddonId: wireCaller } : {},
|
|
17916
|
+
...carried !== void 0 ? { origin: carried } : {}
|
|
17911
17917
|
};
|
|
17912
17918
|
return registry.callCapOnChild(route.childId, input);
|
|
17913
17919
|
}
|
|
@@ -21033,7 +21039,8 @@ var LocalChildRegistry = class {
|
|
|
21033
21039
|
args: input.args,
|
|
21034
21040
|
...input.deviceId !== void 0 ? { deviceId: input.deviceId } : {},
|
|
21035
21041
|
...input.addonId !== void 0 ? { addonId: input.addonId } : {},
|
|
21036
|
-
...input.callerAddonId !== void 0 ? { callerAddonId: input.callerAddonId } : {}
|
|
21042
|
+
...input.callerAddonId !== void 0 ? { callerAddonId: input.callerAddonId } : {},
|
|
21043
|
+
...input.origin !== void 0 ? { origin: input.origin } : {}
|
|
21037
21044
|
};
|
|
21038
21045
|
}
|
|
21039
21046
|
listChildren() {
|
|
@@ -21291,6 +21298,7 @@ var LocalChildRegistry = class {
|
|
|
21291
21298
|
args: materialise(),
|
|
21292
21299
|
...out.deviceId !== void 0 ? { deviceId: out.deviceId } : {},
|
|
21293
21300
|
...out.nodeId !== void 0 ? { nodeId: out.nodeId } : {},
|
|
21301
|
+
...out.origin !== void 0 ? { origin: out.origin } : {},
|
|
21294
21302
|
...out.native === true ? { native: true } : {},
|
|
21295
21303
|
...callerStamp !== null ? { callerAddonId: callerStamp } : {}
|
|
21296
21304
|
});
|
|
@@ -21583,7 +21591,8 @@ var LocalChildClient = class {
|
|
|
21583
21591
|
args,
|
|
21584
21592
|
...msg.deviceId !== void 0 ? { deviceId: msg.deviceId } : {},
|
|
21585
21593
|
...msg.addonId !== void 0 ? { addonId: msg.addonId } : {},
|
|
21586
|
-
...msg.callerAddonId !== void 0 ? { callerAddonId: msg.callerAddonId } : {}
|
|
21594
|
+
...msg.callerAddonId !== void 0 ? { callerAddonId: msg.callerAddonId } : {},
|
|
21595
|
+
...msg.origin !== void 0 ? { origin: msg.origin } : {}
|
|
21587
21596
|
});
|
|
21588
21597
|
if (payload !== void 0 && result !== void 0) return new PayloadReply(void 0, packPayload(result));
|
|
21589
21598
|
return result;
|
|
@@ -22016,6 +22025,12 @@ var delay$1 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
|
22016
22025
|
* - surfaces a clear error when the call is genuinely unroutable (so the
|
|
22017
22026
|
* child's call rejects rather than hanging).
|
|
22018
22027
|
*/
|
|
22028
|
+
/** Resolver dispatch that keeps a 3-arg call when the frame carried nothing extra. */
|
|
22029
|
+
function dispatchInbound(resolver, route, input) {
|
|
22030
|
+
if (input.origin !== void 0) return resolver.dispatch(route, input.method, input.args, void 0, input.callerAddonId, input.origin);
|
|
22031
|
+
if (input.callerAddonId !== void 0) return resolver.dispatch(route, input.method, input.args, void 0, input.callerAddonId);
|
|
22032
|
+
return resolver.dispatch(route, input.method, input.args);
|
|
22033
|
+
}
|
|
22019
22034
|
function createParentUnownedCallHandler(deps) {
|
|
22020
22035
|
return async (input) => {
|
|
22021
22036
|
const argDeviceId = input.deviceId ?? extractDeviceId(input.args);
|
|
@@ -22067,11 +22082,10 @@ function createParentUnownedCallHandler(deps) {
|
|
|
22067
22082
|
}
|
|
22068
22083
|
const resolver = deps.getResolver();
|
|
22069
22084
|
if (resolver !== null) try {
|
|
22070
|
-
|
|
22085
|
+
return await dispatchInbound(resolver, resolver.resolveCapRoute(input.capName, {
|
|
22071
22086
|
...nodeId !== void 0 ? { nodeId } : {},
|
|
22072
22087
|
...deviceId !== void 0 ? { deviceId } : {}
|
|
22073
|
-
});
|
|
22074
|
-
return input.callerAddonId !== void 0 ? await resolver.dispatch(route, input.method, input.args, void 0, input.callerAddonId) : await resolver.dispatch(route, input.method, input.args);
|
|
22088
|
+
}), input);
|
|
22075
22089
|
} catch (err) {
|
|
22076
22090
|
if (!(err instanceof CapRouteError) || err.reason !== "no-provider") throw err;
|
|
22077
22091
|
}
|
|
@@ -22123,11 +22137,10 @@ function createParentUnownedCallHandler(deps) {
|
|
|
22123
22137
|
await delay$1(ADDON_CAP_RETRY_DELAY_MS);
|
|
22124
22138
|
const retryResolver = deps.getResolver();
|
|
22125
22139
|
if (retryResolver !== null) try {
|
|
22126
|
-
|
|
22140
|
+
return await dispatchInbound(retryResolver, retryResolver.resolveCapRoute(input.capName, {
|
|
22127
22141
|
...nodeId !== void 0 ? { nodeId } : {},
|
|
22128
22142
|
...deviceId !== void 0 ? { deviceId } : {}
|
|
22129
|
-
});
|
|
22130
|
-
return input.callerAddonId !== void 0 ? await retryResolver.dispatch(route, input.method, input.args, void 0, input.callerAddonId) : await retryResolver.dispatch(route, input.method, input.args);
|
|
22143
|
+
}), input);
|
|
22131
22144
|
} catch (err) {
|
|
22132
22145
|
if (!(err instanceof CapRouteError) || err.reason !== "no-provider") throw err;
|
|
22133
22146
|
}
|
|
@@ -22529,14 +22542,16 @@ function deviceCapResolverLink(dispatch, isDeviceScoped) {
|
|
|
22529
22542
|
const deviceId = input !== null && typeof input === "object" ? Reflect.get(input, "deviceId") : void 0;
|
|
22530
22543
|
if (typeof deviceId !== "number" || !Number.isFinite(deviceId)) return next(op);
|
|
22531
22544
|
return observable((observer) => {
|
|
22532
|
-
|
|
22533
|
-
|
|
22534
|
-
|
|
22535
|
-
|
|
22536
|
-
|
|
22537
|
-
|
|
22538
|
-
|
|
22539
|
-
|
|
22545
|
+
runWithCapCallContext(op.context, () => {
|
|
22546
|
+
dispatch(parsed.capName, parsed.method, input).then((data) => {
|
|
22547
|
+
observer.next({ result: {
|
|
22548
|
+
type: "data",
|
|
22549
|
+
data
|
|
22550
|
+
} });
|
|
22551
|
+
observer.complete();
|
|
22552
|
+
}).catch((cause) => {
|
|
22553
|
+
observer.error(TRPCClientError.from(cause instanceof Error ? cause : new Error(String(cause))));
|
|
22554
|
+
});
|
|
22540
22555
|
});
|
|
22541
22556
|
return () => {};
|
|
22542
22557
|
});
|
|
@@ -22845,7 +22860,7 @@ async function probeVaapiInit(renderNode) {
|
|
|
22845
22860
|
*/
|
|
22846
22861
|
function safeExistsSync(path) {
|
|
22847
22862
|
try {
|
|
22848
|
-
return fs.existsSync(path);
|
|
22863
|
+
return fs$1.existsSync(path);
|
|
22849
22864
|
} catch {
|
|
22850
22865
|
return false;
|
|
22851
22866
|
}
|
|
@@ -22864,11 +22879,11 @@ function probeLinuxGpus() {
|
|
|
22864
22879
|
if (safeExistsSync("/dev/nvidia0") || safeExistsSync("/proc/driver/nvidia/version")) signals.hasNvidiaGpu = true;
|
|
22865
22880
|
try {
|
|
22866
22881
|
const drmDir = "/sys/class/drm";
|
|
22867
|
-
if (fs.existsSync(drmDir)) for (const entry of fs.readdirSync(drmDir)) {
|
|
22882
|
+
if (fs$1.existsSync(drmDir)) for (const entry of fs$1.readdirSync(drmDir)) {
|
|
22868
22883
|
if (!entry.startsWith("card")) continue;
|
|
22869
22884
|
const vendorPath = `${drmDir}/${entry}/device/vendor`;
|
|
22870
22885
|
if (!safeExistsSync(vendorPath)) continue;
|
|
22871
|
-
const vendor = fs.readFileSync(vendorPath, "utf8").trim().toLowerCase();
|
|
22886
|
+
const vendor = fs$1.readFileSync(vendorPath, "utf8").trim().toLowerCase();
|
|
22872
22887
|
if (vendor === "0x10de") signals.hasNvidiaGpu = true;
|
|
22873
22888
|
else if (vendor === "0x1002") signals.hasAmdGpu = true;
|
|
22874
22889
|
else if (vendor === "0x8086") signals.hasIntelGpu = true;
|
|
@@ -23086,21 +23101,21 @@ function sleep$1(ms) {
|
|
|
23086
23101
|
* crashed holder) is stolen.
|
|
23087
23102
|
*/
|
|
23088
23103
|
async function withFileLock(lockPath, fn) {
|
|
23089
|
-
fs.mkdirSync(join(lockPath, ".."), { recursive: true });
|
|
23104
|
+
fs$1.mkdirSync(join(lockPath, ".."), { recursive: true });
|
|
23090
23105
|
for (;;) try {
|
|
23091
|
-
const fd = fs.openSync(lockPath, "wx");
|
|
23092
|
-
fs.closeSync(fd);
|
|
23106
|
+
const fd = fs$1.openSync(lockPath, "wx");
|
|
23107
|
+
fs$1.closeSync(fd);
|
|
23093
23108
|
break;
|
|
23094
23109
|
} catch {
|
|
23095
23110
|
try {
|
|
23096
|
-
if (Date.now() - fs.statSync(lockPath).mtimeMs > LOCK_STALE_MS) fs.rmSync(lockPath, { force: true });
|
|
23111
|
+
if (Date.now() - fs$1.statSync(lockPath).mtimeMs > LOCK_STALE_MS) fs$1.rmSync(lockPath, { force: true });
|
|
23097
23112
|
else await sleep$1(LOCK_POLL_MS);
|
|
23098
23113
|
} catch {}
|
|
23099
23114
|
}
|
|
23100
23115
|
try {
|
|
23101
23116
|
return await fn();
|
|
23102
23117
|
} finally {
|
|
23103
|
-
fs.rmSync(lockPath, { force: true });
|
|
23118
|
+
fs$1.rmSync(lockPath, { force: true });
|
|
23104
23119
|
}
|
|
23105
23120
|
}
|
|
23106
23121
|
/** Coalesce in-process + serialize cross-process for one binary id. */
|
|
@@ -23158,7 +23173,7 @@ var AddonDepsManager = class {
|
|
|
23158
23173
|
* failed or tampered download throws, and provisioning reports it.
|
|
23159
23174
|
*/
|
|
23160
23175
|
async stageNativeDepsDeclaredBy(requirementsFile) {
|
|
23161
|
-
if (!declaresEdgetpuDelegate(fs.readFileSync(requirementsFile, "utf8"))) return;
|
|
23176
|
+
if (!declaresEdgetpuDelegate(fs$1.readFileSync(requirementsFile, "utf8"))) return;
|
|
23162
23177
|
await singleFlight(this.depsDir, "edgetpu-delegate", () => ensureEdgetpuDelegate(this.nodeRoot, this.logger));
|
|
23163
23178
|
}
|
|
23164
23179
|
getDepsDir() {
|
|
@@ -24189,7 +24204,7 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
|
|
|
24189
24204
|
const addonId = declaration.id;
|
|
24190
24205
|
const nodeDataDir = process.env["CAMSTACK_DATA"] ?? dataDir;
|
|
24191
24206
|
const addonDataDir = path$1.resolve(nodeDataDir, "addons-data", addonId);
|
|
24192
|
-
fs.mkdirSync(addonDataDir, { recursive: true });
|
|
24207
|
+
fs$1.mkdirSync(addonDataDir, { recursive: true });
|
|
24193
24208
|
if (runtime.mode === "broker") ensureBindingSubscription(runtime.broker);
|
|
24194
24209
|
const regs = getRegistries(nodeId);
|
|
24195
24210
|
const workerResolver = {
|
|
@@ -26139,7 +26154,7 @@ var FailedRunnerRetryLedger = class {
|
|
|
26139
26154
|
function readRunnerPackageVersions(addonDirs) {
|
|
26140
26155
|
const out = {};
|
|
26141
26156
|
for (const dir of addonDirs) try {
|
|
26142
|
-
const raw = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
26157
|
+
const raw = JSON.parse(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
26143
26158
|
const version = typeof raw === "object" && raw !== null ? Reflect.get(raw, "version") : null;
|
|
26144
26159
|
out[dir] = typeof version === "string" && version.length > 0 ? version : null;
|
|
26145
26160
|
} catch {
|
|
@@ -26200,7 +26215,7 @@ function readAddonHeapDeclaration(spec) {
|
|
|
26200
26215
|
if (cached !== void 0) return cached;
|
|
26201
26216
|
let declaration = EMPTY_HEAP_DECLARATION;
|
|
26202
26217
|
for (const manifestPath of [path$1.join(spec.addonDir, "package.json"), path$1.join(path$1.dirname(spec.addonDir), "package.json")]) try {
|
|
26203
|
-
const raw = fs.readFileSync(manifestPath, "utf8");
|
|
26218
|
+
const raw = fs$1.readFileSync(manifestPath, "utf8");
|
|
26204
26219
|
const parsed = JSON.parse(raw);
|
|
26205
26220
|
const profile = extractHeapProfile(parsed, spec.addonId);
|
|
26206
26221
|
const maxOldSpaceMb = extractMaxOldSpaceMb(parsed, spec.addonId);
|
|
@@ -27433,17 +27448,17 @@ var JobJournal = class {
|
|
|
27433
27448
|
return path$1.join(this.jobsDir, `${id}.json`);
|
|
27434
27449
|
}
|
|
27435
27450
|
writeAtomic(filePath, data) {
|
|
27436
|
-
fs.mkdirSync(path$1.dirname(filePath), { recursive: true });
|
|
27451
|
+
fs$1.mkdirSync(path$1.dirname(filePath), { recursive: true });
|
|
27437
27452
|
const tmp = `${filePath}.tmp.${process.pid}.${Date.now()}`;
|
|
27438
|
-
fs.writeFileSync(tmp, JSON.stringify(data, null, 2), {
|
|
27453
|
+
fs$1.writeFileSync(tmp, JSON.stringify(data, null, 2), {
|
|
27439
27454
|
encoding: "utf-8",
|
|
27440
27455
|
mode: 384
|
|
27441
27456
|
});
|
|
27442
|
-
fs.renameSync(tmp, filePath);
|
|
27457
|
+
fs$1.renameSync(tmp, filePath);
|
|
27443
27458
|
}
|
|
27444
27459
|
readIndex() {
|
|
27445
27460
|
try {
|
|
27446
|
-
const raw = JSON.parse(fs.readFileSync(this.indexPath, "utf-8"));
|
|
27461
|
+
const raw = JSON.parse(fs$1.readFileSync(this.indexPath, "utf-8"));
|
|
27447
27462
|
if (raw && Array.isArray(raw.jobIds)) return {
|
|
27448
27463
|
version: 1,
|
|
27449
27464
|
jobIds: raw.jobIds
|
|
@@ -27468,7 +27483,7 @@ var JobJournal = class {
|
|
|
27468
27483
|
}
|
|
27469
27484
|
getJob(id) {
|
|
27470
27485
|
try {
|
|
27471
|
-
const parsed = lifecycleJobSchema.safeParse(JSON.parse(fs.readFileSync(this.jobPath(id), "utf-8")));
|
|
27486
|
+
const parsed = lifecycleJobSchema.safeParse(JSON.parse(fs$1.readFileSync(this.jobPath(id), "utf-8")));
|
|
27472
27487
|
return parsed.success ? parsed.data : null;
|
|
27473
27488
|
} catch {
|
|
27474
27489
|
return null;
|
|
@@ -27533,14 +27548,14 @@ var StagingArea = class {
|
|
|
27533
27548
|
}
|
|
27534
27549
|
async fetchAndStage(input) {
|
|
27535
27550
|
const destDir = path$1.join(this.stagingDir, input.jobId, safeSegment(input.name));
|
|
27536
|
-
fs.rmSync(destDir, {
|
|
27551
|
+
fs$1.rmSync(destDir, {
|
|
27537
27552
|
recursive: true,
|
|
27538
27553
|
force: true
|
|
27539
27554
|
});
|
|
27540
27555
|
const tgz = await this.deps.fetchTarball(input.name, input.version, input.signal);
|
|
27541
27556
|
if (input.signal.aborted) throw new Error("staging aborted after fetch");
|
|
27542
27557
|
await this.deps.extract(tgz, destDir);
|
|
27543
|
-
const raw = JSON.parse(fs.readFileSync(path$1.join(destDir, "package.json"), "utf-8"));
|
|
27558
|
+
const raw = JSON.parse(fs$1.readFileSync(path$1.join(destDir, "package.json"), "utf-8"));
|
|
27544
27559
|
if (typeof raw.version !== "string" || raw.version.length === 0) throw new Error(`staging validation failed: ${input.name} staged a package.json with no version`);
|
|
27545
27560
|
if (EXACT_SEMVER.test(input.version) && raw.version !== input.version) throw new Error(`staging validation failed: ${input.name} expected version ${input.version}, got ${raw.version}`);
|
|
27546
27561
|
return {
|
|
@@ -27549,7 +27564,7 @@ var StagingArea = class {
|
|
|
27549
27564
|
};
|
|
27550
27565
|
}
|
|
27551
27566
|
cleanup(jobId) {
|
|
27552
|
-
fs.rmSync(path$1.join(this.stagingDir, jobId), {
|
|
27567
|
+
fs$1.rmSync(path$1.join(this.stagingDir, jobId), {
|
|
27553
27568
|
recursive: true,
|
|
27554
27569
|
force: true
|
|
27555
27570
|
});
|
|
@@ -27564,13 +27579,13 @@ var StagingArea = class {
|
|
|
27564
27579
|
sweepOrphans() {
|
|
27565
27580
|
let entries;
|
|
27566
27581
|
try {
|
|
27567
|
-
entries = fs.readdirSync(this.stagingDir);
|
|
27582
|
+
entries = fs$1.readdirSync(this.stagingDir);
|
|
27568
27583
|
} catch {
|
|
27569
27584
|
return 0;
|
|
27570
27585
|
}
|
|
27571
27586
|
let removed = 0;
|
|
27572
27587
|
for (const name of entries) try {
|
|
27573
|
-
fs.rmSync(path$1.join(this.stagingDir, name), {
|
|
27588
|
+
fs$1.rmSync(path$1.join(this.stagingDir, name), {
|
|
27574
27589
|
recursive: true,
|
|
27575
27590
|
force: true
|
|
27576
27591
|
});
|
|
@@ -27748,7 +27763,7 @@ var LifecycleJobEngine = class {
|
|
|
27748
27763
|
* on failure → `failed`.
|
|
27749
27764
|
*/
|
|
27750
27765
|
async reconcileJob(job) {
|
|
27751
|
-
const exists = this.deps.stagedPathExists ?? ((p) => fs.existsSync(p));
|
|
27766
|
+
const exists = this.deps.stagedPathExists ?? ((p) => fs$1.existsSync(p));
|
|
27752
27767
|
for (const task of job.tasks) {
|
|
27753
27768
|
if (task.target === "framework") {
|
|
27754
27769
|
if (!this.isTerminal(task.phase)) this.skipFrameworkTask(job, task);
|
|
@@ -28383,7 +28398,7 @@ var CatalogRegistry = class {
|
|
|
28383
28398
|
const file = path$1.join(packageDir, "i18n", `${lang}.json`);
|
|
28384
28399
|
let text;
|
|
28385
28400
|
try {
|
|
28386
|
-
text = fs.readFileSync(file, "utf8");
|
|
28401
|
+
text = fs$1.readFileSync(file, "utf8");
|
|
28387
28402
|
} catch {
|
|
28388
28403
|
continue;
|
|
28389
28404
|
}
|
|
@@ -28439,4 +28454,4 @@ function resetCatalogRegistryForTests() {
|
|
|
28439
28454
|
}
|
|
28440
28455
|
//#endregion
|
|
28441
28456
|
var readAllRows = import_read_all_rows.readAllRows;
|
|
28442
|
-
export { ADDON_VERSION_REASON_HUB, ADDON_VERSION_REASON_REGISTRY_LATEST, AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_DASHBOARD_ORIGINS_FIELD, AGENT_HTTPS_NAMES_COLLECTION, AGENT_HTTPS_NAMES_COLUMNS, AGENT_MAIN_HEAP_WATCH_LABEL, AGENT_READINESS_SERVICE_NAME, AGENT_UI_UNLOCK_TTL_MS, AGENT_UI_UNLOCK_TYP, AGENT_UI_UNLOCK_USE, AGENT_UI_UNLOCK_VERSION, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRefusedError, AddonRouteRegistry, AgentHttpsInstallError, AgentHttpsNames, AgentMdnsAdvertiser, AgentMeshIdentityGate, AgentPairing, AlertCenterAddon, AuthAuditLog, AuthManager, BackupDecryptError, BackupKeyFormatError, BackupKeyMismatchError, BackupKeyRequiredError, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, CatalogRegistry, ClusterNodeHistoryBodySchema, ClusterNodeTombstoneBodySchema, CommandObserverRegistry, ComposerAddon, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_HUB_TLS_TCP_PORT, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_CA_KEY_REF, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceCaStore, DeviceCredentialManager, DeviceHistoryAddon, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FIRST_BOOT_ADMIN_PASSWORD, FIRST_BOOT_ADMIN_USERNAME, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, GET_STATUS_METHOD, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HUB_RSS_BUDGET_OVERRIDE_SOURCE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, HubPairing, INFRA_CAPABILITIES, IntegrationRegistry, InvalidCorsOriginError, JWT_SIGNING_KEY_REF, JobJournal, JwtSigningKeyUnavailableError, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LoginSessionManager, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MEMBERSHIP_PATHS, MESH_ACTION_FORBIDDEN_TYPE, MESH_CA_FIELD, MESH_CA_KEY_REF, MESH_CA_SETTINGS_KEY, MESH_NODE_CERTIFICATES_COLLECTION, MESH_NODE_CERTIFICATES_COLUMNS, MESH_NODE_UNAUTHENTICATED_TYPE, MESH_QUEUE_TOP_N, MESH_TLS_PORT_HELLO_FIELD, METHOD_ACCESS_MAP, MembershipResponder, MeshCaKeeper, MeshCertificateRegistry, MeshCrl, MeshIdentityGate, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OPAQUE_ORIGIN, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PAIRING_CODE_DIGITS, PAIRING_MAX_CODE_ATTEMPTS, PAIRING_MAX_SESSIONS, PAIRING_PATHS, PAIRING_PIN_DIGITS, PAIRING_PROTOCOL, PAIRING_TTL_MS, PARENT_ROUTED_PROVIDER_ADDON_ID, PERMITTED_DNS_SUFFIXES, PERMITTED_IP_RANGES, PREVIOUS_LEAF_GRACE_MS, PYTHON_VERSION, PairingHttpError, PeerAnsweredError, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, REFRESH_TOKEN_PREFIX, RENEWAL_ABANDONED, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, RecordsEngine, RegistryReadError, ReplEngine, RingBuffer, RunnerOfAddon, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORE_READABLE_BOOTSTRAP_KEYS, SYSTEM_SECRET_OWNER, ScopedLogger, SettingsReadUnavailableError, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemBackupService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, TlsTcpTransporter, ToastService, UDS_NO_ROUTE_PREFIX, UNCLAIMED, UNSUPPORTED_ADDON_SETTLE_MS, UPLOADED_CA_FILE, USER_MANAGEMENT_INTERNAL, UdsLocalTransportClient, UdsLocalTransportServer, UnlockTicketJtiStore, UnsupportedAddonTracker, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetCommandObserverRegistryForTests, __resetLoggingGateForTests, acceptAgentSans, adaptBrokerToCluster, addonCommandActor, addonSettingsCapability, adoptModelRevisions, afterWorkerOnlineAnnounce, agentHttpsPaths, allFamiliesListenHost, answerClaimedGetStatus, answerDeviceCallRedirect, applyCertificateToListener, applyLanHttp, asBrokerLike, attachUserManagementInternal, attributeStall, backupOrchestratorRecordKinds, backupRecordStoresOf, bareAddonOf, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildAgentAnnouncement, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNameConstraintSet, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, buildTransporter, builderMountedCapNames, caFingerprint, caFingerprintCompact, caReplacementMarkerFile, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, catalogNamespaceOf, certificateNames, chainsToPublicRoot, checkUploadedCa, classifyAddonDir, classifyCapRoute, clearHeldInstall, clearHttpsListener, clearIntegrationRows, clearNodeSettings, clearPendingRestart, clearPlatformKeychainKey, closeLanHttp, clusterAgentRecordKinds, clusterEventTopic, clusterNodeHistoryRecordKind, clusterNodeTombstoneRecordKind, collectAgentNames, collectCertIdentity, collectModelFiles, commandActorFromContext, commandObserverLink, compileLogFilter, computePairingCommitment, computePairingSas, connectBrokerTransport, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonPeerBytesFacility, createAddonService, createAgentEventScope, createAgentHttpsRequest, createAgentTransport, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCiaoPublisher, createCidrMatcher, createCoreCapService, createCoreCatalogRegistry, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createKernelInferenceEngine, createLocalTransport, createLoopDelayMeter, createMeshAccessMiddleware, createMeshCsrPem, createMeshQueueReader, createMigrationApi, createMigrationApiOverContext, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createRequiresRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, currentBrokerTransporter, decideAddonVersionMove, deleteModelFromDisk, deriveAgentListenPort, describeCsr, describeHttpsLeaf, describeMeshLeaf, describeProviderKindDrift, describeRss, deviceCapResolverLink, deviceOfGetStatus, diffCapActionCensus, diffEventPlane, diffSocketPlane, disconnectBrokerTransport, downloadBinary, downloadFile, downloadModel, dropProcessPeer, emitDownForOwnedCaps, emitHeapDiagnosticReport, emitProcessNodeRegistered, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, exportMeshPrivateKeyPem, fetchJson, filterIsEmpty, findAddonRefusal, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, generateBackupKeyPair, generateDeviceCa, generateMeshCa, generateMeshKeyPair, getBrokerEventBus, getBrokerTlsTransporter, getCapUsageRegistry, getCatalogRegistry, getCommandObserverRegistry, getFfmpegDownloadUrl, getLocalEventInterest, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPlatformKeychainKey, getProcessAgentHttpsNames, getProcessJwtSigningKeyState, getProcessMeshCaState, getProcessMeshCertificateRegistry, getProcessMeshTlsListenerState, getProcessNodeMeshTransport, getProcessPeerLeaf, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getUserManagementInternal, getWorkerDeviceRegistry, hasDotNode, heapSpaceField, hostNodeIdOf, hubHostFromMeshAddress, hubMainRssBudget, hubServerVersionOf, installAgentHttps, installBrokerTransporter, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, integrationRegistryRecordKinds, ipcParentLink, isAddonDeploySource, isAllowedAgentDashboardReturnTo, isArrayBufferCensusReport, isArrayOutputSchema, isCollectionArrayMethod, isConstrainedCa, isContainerBridgeAddress, isCredentialKeyName, isInfraCapability, isInsecureOrigin, isInstalledTransporter, isLocalOnlyHostname, isModelDownloaded, isPeerEventPacket, isPrivateAddress, isProcessVerifiedMeshPeer, isRemoteForbiddenAction, isRemoteForbiddenOnAgent, isSettingsReadUnavailable, isSourceNewer, isValidAgentNodeId, isolatedBuiltinPhase, issueAgentHttpsLeaf, issueDeviceLeaf, issueMeshLeafForNode, issueMeshLeafFromCsr, keyFingerprintShort, leafFingerprintOf, levelRank, lineContainsText, lineMatches, listHeldInstalls, loadAgentHttps, loadBootstrapConfig, loadDeviceCa, loadMeshCa, loadTlsCert, localCaCommonName, localEndpointPath, localProviderLink, localSupportedPythonRuntimes, mapSignalsToInferenceHardware, meshErrorType, mintAgentUiUnlockTicket, mountNativeCapService, nextRssBudgetState, normalizeIp, normalizeOrigin, onLocalEventInterestChange, onProcessNodeRegistered, onSessionsRevoked, openMeshTlsWhenRevocationsLoaded, originNodeOf, overlayGetStatus, parseAgentDashboardOrigins, parseCapAction, parseCidrList, parseOriginList, parseRangeHeader, parseRssBudgetMb, parseTokenExpiry, parseTokenizedUrl, partitionIsolatedBuiltinIds, pemDigest, permitsIdentity, permitsName, pinnedHttpsCaFingerprint, preferencesLimitReasonOf, prepareBootTls, prepareRestoreArchive, probePlatform, processJwtSigningKey, processMeshCrl, proxyToUpstream, quarantineAddonResidue, readAllRows, readBackupEncryptionHeader, readCidrSetting, readExtraSans, readHeapSpaces, readLanHttpState, readNameConstraints, readOriginSetting, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsEnabled, readTlsMode, readinessKey, reclaimIntervalMs, recordHeldInstall, recordSocketFrame, redactLogEntry, redactLogMeta, redactLogText, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, reissueTlsLeaf, reloadHttpsListener, renewMeshCertificate, replaceUnconstrainedLocalCa, requireProcessMeshCa, resetCatalogRegistryForTests, resolveFilePath, resolveFormatRevision, resolveHwAccel, resolveNpmInvocation, retirePreviousLocalCa, revertToGeneratedCertificate, revisionWeightUrl, revokeMeshCertificate, runHubAddonBoot, runNpm, runObservedCommand, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setHuggingFaceReachabilityObserver, setNodeEventInterest, setPlatformKeychainKey, setProcessAgentHttpsNames, setProcessMeshCertificateRegistry, setProcessMeshPeerTransportLookup, setProcessMeshTlsEnabler, setProcessMeshTlsListenerState, setWrapperActive, shouldReclaim, signMembershipProof, signPairingProof, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, splitPemCertificates, stampCallerAddonId, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, staticJwtSigningKey, storageOrchestratorRecordKinds, storeMayAnswer, storeUploadedCertificate, strandedMb, stripCamstackDeps, stripForgedIdentity, stripForwardedCaller, subscribePassthrough, systemHostFacts, udsChildLogToWorkerEntry, useStoredUploadedCertificate, validateProviderRegistrations, validateUploadedTls, verifyAgentUiUnlockTicket, verifyDeviceLeaf, verifyDeviceSignature, verifyMembershipAnswer, verifyPairingProof, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsEnabled, writeTlsMode };
|
|
28457
|
+
export { ADDON_VERSION_REASON_HUB, ADDON_VERSION_REASON_REGISTRY_LATEST, AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_DASHBOARD_ORIGINS_FIELD, AGENT_HTTPS_NAMES_COLLECTION, AGENT_HTTPS_NAMES_COLUMNS, AGENT_MAIN_HEAP_WATCH_LABEL, AGENT_READINESS_SERVICE_NAME, AGENT_UI_UNLOCK_TTL_MS, AGENT_UI_UNLOCK_TYP, AGENT_UI_UNLOCK_USE, AGENT_UI_UNLOCK_VERSION, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRefusedError, AddonRouteRegistry, AgentHttpsInstallError, AgentHttpsNames, AgentMdnsAdvertiser, AgentMeshIdentityGate, AgentPairing, AlertCenterAddon, AuthAuditLog, AuthManager, BackupDecryptError, BackupKeyFormatError, BackupKeyMismatchError, BackupKeyRequiredError, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, CatalogRegistry, ClusterNodeHistoryBodySchema, ClusterNodeTombstoneBodySchema, CommandObserverRegistry, ComposerAddon, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_HUB_TLS_TCP_PORT, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_CA_KEY_REF, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceCaStore, DeviceCredentialManager, DeviceHistoryAddon, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FIRST_BOOT_ADMIN_PASSWORD, FIRST_BOOT_ADMIN_USERNAME, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, GET_STATUS_METHOD, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HUB_RSS_BUDGET_OVERRIDE_SOURCE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, HubPairing, INFRA_CAPABILITIES, IntegrationRegistry, InvalidCorsOriginError, JWT_SIGNING_KEY_REF, JobJournal, JwtSigningKeyUnavailableError, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LoginSessionManager, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MEMBERSHIP_PATHS, MESH_ACTION_FORBIDDEN_TYPE, MESH_CA_FIELD, MESH_CA_KEY_REF, MESH_CA_SETTINGS_KEY, MESH_NODE_CERTIFICATES_COLLECTION, MESH_NODE_CERTIFICATES_COLUMNS, MESH_NODE_UNAUTHENTICATED_TYPE, MESH_QUEUE_TOP_N, MESH_TLS_PORT_HELLO_FIELD, METHOD_ACCESS_MAP, MembershipResponder, MeshCaKeeper, MeshCertificateRegistry, MeshCrl, MeshIdentityGate, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OPAQUE_ORIGIN, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PAIRING_CODE_DIGITS, PAIRING_MAX_CODE_ATTEMPTS, PAIRING_MAX_SESSIONS, PAIRING_PATHS, PAIRING_PIN_DIGITS, PAIRING_PROTOCOL, PAIRING_TTL_MS, PARENT_ROUTED_PROVIDER_ADDON_ID, PERMITTED_DNS_SUFFIXES, PERMITTED_IP_RANGES, PREVIOUS_LEAF_GRACE_MS, PYTHON_VERSION, PairingHttpError, PeerAnsweredError, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, REFRESH_TOKEN_PREFIX, RENEWAL_ABANDONED, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, RecordsEngine, RegistryReadError, ReplEngine, RingBuffer, RunnerOfAddon, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORE_READABLE_BOOTSTRAP_KEYS, SYSTEM_SECRET_OWNER, ScopedLogger, SettingsReadUnavailableError, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemBackupService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, TlsTcpTransporter, ToastService, UDS_NO_ROUTE_PREFIX, UNCLAIMED, UNSUPPORTED_ADDON_SETTLE_MS, UPLOADED_CA_FILE, USER_MANAGEMENT_INTERNAL, UdsLocalTransportClient, UdsLocalTransportServer, UnlockTicketJtiStore, UnsupportedAddonTracker, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetCommandObserverRegistryForTests, __resetLoggingGateForTests, acceptAgentSans, adaptBrokerToCluster, addonCommandActor, addonSettingsCapability, adoptModelRevisions, afterWorkerOnlineAnnounce, agentHttpsPaths, allFamiliesListenHost, answerClaimedGetStatus, answerDeviceCallRedirect, applyCertificateToListener, applyLanHttp, asBrokerLike, attachUserManagementInternal, attributeStall, backupOrchestratorRecordKinds, backupRecordStoresOf, bareAddonOf, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildAgentAnnouncement, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNameConstraintSet, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, buildTransporter, builderMountedCapNames, caFingerprint, caFingerprintCompact, caReplacementMarkerFile, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, catalogNamespaceOf, certificateNames, chainsToPublicRoot, checkUploadedCa, classifyAddonDir, classifyCapRoute, clearHeldInstall, clearHttpsListener, clearIntegrationRows, clearNodeSettings, clearPendingRestart, clearPlatformKeychainKey, closeLanHttp, clusterAgentRecordKinds, clusterEventTopic, clusterNodeHistoryRecordKind, clusterNodeTombstoneRecordKind, collectAgentNames, collectCertIdentity, collectModelFiles, commandActorFromContext, commandObserverLink, compileLogFilter, computePairingCommitment, computePairingSas, connectBrokerTransport, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonPeerBytesFacility, createAddonService, createAgentEventScope, createAgentHttpsRequest, createAgentTransport, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCiaoPublisher, createCidrMatcher, createCoreCapService, createCoreCatalogRegistry, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createKernelInferenceEngine, createLocalTransport, createLoopDelayMeter, createMeshAccessMiddleware, createMeshCsrPem, createMeshQueueReader, createMigrationApi, createMigrationApiOverContext, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createRequiresRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, currentBrokerTransporter, currentCapCallContext, decideAddonVersionMove, deleteModelFromDisk, deriveAgentListenPort, describeCsr, describeHttpsLeaf, describeMeshLeaf, describeProviderKindDrift, describeRss, deviceCapResolverLink, deviceOfGetStatus, diffCapActionCensus, diffEventPlane, diffSocketPlane, disconnectBrokerTransport, downloadBinary, downloadFile, downloadModel, dropProcessPeer, emitDownForOwnedCaps, emitHeapDiagnosticReport, emitProcessNodeRegistered, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, exportMeshPrivateKeyPem, fetchJson, filterIsEmpty, findAddonRefusal, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, generateBackupKeyPair, generateDeviceCa, generateMeshCa, generateMeshKeyPair, getBrokerEventBus, getBrokerTlsTransporter, getCapUsageRegistry, getCatalogRegistry, getCommandObserverRegistry, getFfmpegDownloadUrl, getLocalEventInterest, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPlatformKeychainKey, getProcessAgentHttpsNames, getProcessJwtSigningKeyState, getProcessMeshCaState, getProcessMeshCertificateRegistry, getProcessMeshTlsListenerState, getProcessNodeMeshTransport, getProcessPeerLeaf, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getUserManagementInternal, getWorkerDeviceRegistry, hasDotNode, heapSpaceField, hostNodeIdOf, hubHostFromMeshAddress, hubMainRssBudget, hubServerVersionOf, installAgentHttps, installBrokerTransporter, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, integrationRegistryRecordKinds, ipcParentLink, isAddonDeploySource, isAllowedAgentDashboardReturnTo, isArrayBufferCensusReport, isArrayOutputSchema, isCollectionArrayMethod, isConstrainedCa, isContainerBridgeAddress, isCredentialKeyName, isInfraCapability, isInsecureOrigin, isInstalledTransporter, isLocalOnlyHostname, isModelDownloaded, isPeerEventPacket, isPrivateAddress, isProcessVerifiedMeshPeer, isRemoteForbiddenAction, isRemoteForbiddenOnAgent, isSettingsReadUnavailable, isSourceNewer, isValidAgentNodeId, isolatedBuiltinPhase, issueAgentHttpsLeaf, issueDeviceLeaf, issueMeshLeafForNode, issueMeshLeafFromCsr, keyFingerprintShort, leafFingerprintOf, levelRank, lineContainsText, lineMatches, listHeldInstalls, loadAgentHttps, loadBootstrapConfig, loadDeviceCa, loadMeshCa, loadTlsCert, localCaCommonName, localEndpointPath, localProviderLink, localSupportedPythonRuntimes, mapSignalsToInferenceHardware, meshErrorType, mintAgentUiUnlockTicket, mountNativeCapService, nextRssBudgetState, normalizeIp, normalizeOrigin, onLocalEventInterestChange, onProcessNodeRegistered, onSessionsRevoked, openMeshTlsWhenRevocationsLoaded, originNodeOf, overlayGetStatus, parseAgentDashboardOrigins, parseCapAction, parseCidrList, parseOriginList, parseRangeHeader, parseRssBudgetMb, parseTokenExpiry, parseTokenizedUrl, partitionIsolatedBuiltinIds, pemDigest, permitsIdentity, permitsName, pinnedHttpsCaFingerprint, preferencesLimitReasonOf, prepareBootTls, prepareRestoreArchive, probePlatform, processJwtSigningKey, processMeshCrl, proxyToUpstream, quarantineAddonResidue, readAllRows, readBackupEncryptionHeader, readCidrSetting, readCurrentCommandOrigin, readExtraSans, readHeapSpaces, readLanHttpState, readNameConstraints, readOriginSetting, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsEnabled, readTlsMode, readinessKey, reclaimIntervalMs, recordHeldInstall, recordSocketFrame, redactLogEntry, redactLogMeta, redactLogText, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, reissueTlsLeaf, reloadHttpsListener, renewMeshCertificate, replaceUnconstrainedLocalCa, requireProcessMeshCa, resetCatalogRegistryForTests, resolveFilePath, resolveFormatRevision, resolveHwAccel, resolveNpmInvocation, retirePreviousLocalCa, revertToGeneratedCertificate, revisionWeightUrl, revokeMeshCertificate, runHubAddonBoot, runNpm, runObservedCommand, runWithCapCallContext, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setHuggingFaceReachabilityObserver, setNodeEventInterest, setPlatformKeychainKey, setProcessAgentHttpsNames, setProcessMeshCertificateRegistry, setProcessMeshPeerTransportLookup, setProcessMeshTlsEnabler, setProcessMeshTlsListenerState, setWrapperActive, shouldReclaim, signMembershipProof, signPairingProof, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, splitPemCertificates, stampCallerAddonId, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, staticJwtSigningKey, storageOrchestratorRecordKinds, storeMayAnswer, storeUploadedCertificate, strandedMb, stripCamstackDeps, stripForgedIdentity, stripForwardedCaller, subscribePassthrough, systemHostFacts, udsChildLogToWorkerEntry, useStoredUploadedCertificate, validateProviderRegistrations, validateUploadedTls, verifyAgentUiUnlockTicket, verifyDeviceLeaf, verifyDeviceSignature, verifyMembershipAnswer, verifyPairingProof, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsEnabled, writeTlsMode };
|