@camstack/system 1.2.458 → 1.2.460
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon-runner.js +26 -11
- package/dist/addon-runner.mjs +26 -11
- package/dist/addon-utils.mjs +1 -1
- package/dist/{agent-https-DOELEug8.js → agent-https-Dnr_nIVx.js} +3 -723
- package/dist/{agent-https-CQA3W-3e.mjs → agent-https-Iw3RSQup.mjs} +4 -616
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
- package/dist/builtins/alerts/alerts.addon.js +5 -7
- package/dist/builtins/alerts/alerts.addon.mjs +5 -7
- package/dist/builtins/alerts/record-kinds.d.ts +1 -1
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +242 -4
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +243 -5
- package/dist/builtins/calendars/calendars.addon.js +2 -10
- package/dist/builtins/calendars/calendars.addon.mjs +2 -3
- package/dist/builtins/calendars/record-kinds.d.ts +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer.addon.js +2 -2
- package/dist/builtins/composer/composer.addon.mjs +2 -2
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +4 -6
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +4 -6
- package/dist/builtins/device-history/device-history.addon.js +1 -1
- package/dist/builtins/device-history/device-history.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +2 -4
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -4
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/keychain/index.js +41 -43
- package/dist/builtins/keychain/index.mjs +41 -43
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +24 -40
- package/dist/builtins/local-auth/local-auth.addon.mjs +27 -43
- package/dist/builtins/local-network/local-network.addon.js +2 -2
- package/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +39 -4
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +48 -13
- package/dist/builtins/native-metrics/node-metrics-history-recorder.d.ts +16 -2
- package/dist/builtins/platform-probe/coral-accelerators.d.ts +10 -1
- package/dist/builtins/platform-probe/index.js +7 -4
- package/dist/builtins/platform-probe/index.mjs +13 -10
- package/dist/builtins/platform-probe/platform-scorer.d.ts +4 -1
- package/dist/builtins/record-entries/index.js +1 -1
- package/dist/builtins/record-entries/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/file-host-protocol.d.ts +0 -15
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
- package/dist/builtins/sqlite-storage/index.js +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/owned-sqlite-file.d.ts +0 -44
- package/dist/builtins/sqlite-storage/records/records-catalog.d.ts +0 -2
- package/dist/builtins/sqlite-storage/records/records-engine-types.d.ts +0 -21
- package/dist/builtins/sqlite-storage/records/records-engine.d.ts +3 -20
- package/dist/builtins/sqlite-storage/records/records-plan.d.ts +9 -4
- package/dist/builtins/sqlite-storage/records/records-provider.d.ts +4 -18
- package/dist/builtins/sqlite-storage/records/records-sql.d.ts +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +0 -17
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +21 -196
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +21 -196
- package/dist/builtins/sqlite-storage/storage-admin-provider.d.ts +6 -14
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +2 -2
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +7 -9
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +7 -9
- package/dist/builtins/system-config/system-config.addon.js +667 -40
- package/dist/builtins/system-config/system-config.addon.mjs +737 -127
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-BVguN7VV.mjs → composition-sources-DNRZWR1j.mjs} +1 -1
- package/dist/{composition-sources-DURQNDJ4.js → composition-sources-b0e_2I-D.js} +1 -1
- package/dist/{constants-Njka8Cv6.js → constants-6OeJiZgi.js} +1 -1
- package/dist/{constants-FGjnsE2x.mjs → constants-BnkOdj9Q.mjs} +1 -1
- package/dist/{coral-accelerators-DcnZvctM.mjs → coral-accelerators-Qhn5TOYZ.mjs} +18 -15
- package/dist/{coral-accelerators-Bi_c3Rft.js → coral-accelerators-oUXmmbc2.js} +13 -10
- package/dist/{custom-action-registry-stpC3Zy-.mjs → custom-action-registry-DStvrQKI.mjs} +37 -37
- package/dist/{device-ca-lEaAQ9Xi.mjs → device-ca-Bnkw8GyU.mjs} +1 -1
- package/dist/{device-ca-BrVK_5s3.js → device-ca-CPTDs--d.js} +1 -1
- package/dist/{dist-BZQjLPiz.js → dist-Bn-RNanh.js} +29 -130
- package/dist/{dist-B_GRPhnY.mjs → dist-Wy8cTxg6.mjs} +30 -113
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/{hub-mdns-ciao-Bg2HfTwP.mjs → hub-mdns-ciao-CJu0nhla.mjs} +2 -2
- package/dist/{hub-mdns-ciao-nce3TXs_.js → hub-mdns-ciao-CTBTlia4.js} +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +56 -31
- package/dist/index.mjs +257 -233
- package/dist/kernel/deps/addon-deps-manager.d.ts +9 -0
- package/dist/{restore-archive-C7kLDI_0.mjs → restore-archive-CM23Pq9B.mjs} +177 -424
- package/dist/{restore-archive-FyfZ8YMC.js → restore-archive-DM1OBYq4.js} +89 -342
- package/dist/{wal-maintenance-Duejh7Lx.mjs → wal-maintenance-Bj_MmDkr.mjs} +0 -0
- package/dist/{wal-maintenance-DfSIOj24.js → wal-maintenance-CaJjuLHq.js} +0 -0
- package/package.json +1 -1
- package/dist/builtins/records/legacy-table-row-count.d.ts +0 -5
- package/dist/builtins/records/phase6-declare-gate.d.ts +0 -28
- package/dist/builtins/sqlite-storage/records/count-settings-array-legacy.d.ts +0 -5
- package/dist/builtins/sqlite-storage/records/count-settings-brokers-legacy.d.ts +0 -6
- package/dist/phase6-declare-gate-Dag1_WR2.js +0 -98
- package/dist/phase6-declare-gate-Lb-mrVvz.mjs +0 -93
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __require } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { An as isVoidInput, Bn as logLevelAtMost,
|
|
2
|
+
import { An as isVoidInput, Bn as logLevelAtMost, Ca as userError, Ci as ReadinessTimeoutError, Fi as asString$1, Gi as defineRecordKinds, Hi as createEvent$1, In as lifecycleJobSchema, J as METHOD_ACCESS_MAP, Ji as expandCapMethods, K as LOG_LEVEL_RANK, Ki as emitDownForOwnedCaps, Mr as supportedRuntimes, Ni as asJsonObject$1, Pi as asNumber, Si as ReadinessRegistry, Ta as EventCategory$1, Tn as isCollectionArrayMethod, Vn as looseSchema, Xn as objectInputDeclaresAddonId, Zn as objectInputDeclaresRequiredDeviceId, _r as scopesAllowAddon, ai as DATAPLANE_SECRET_HEADER$1, bn as interpolate, bt as addonSettingsCapability, d as CATALOG_LANGS, fa as readinessKey, ga as scopeKey, ii as CALLER_STAMPED_CAPABILITIES$1, jn as kebabToCamel$1, kn as isObjectInput, la as parseJsonObject, ma as resolveCapMount, mn as extractNestedAddonId, mr as resolveMethodAuth, n as AGENT_MDNS_TXT_KEYS, nr as procedureAuthKey, oi as DEVICE_SETTINGS_CONTRIBUTION_METHODS, r as ALL_CAPABILITY_DEFINITIONS, si as DEVICE_STATUS_METHOD, t as AGENT_MDNS_SERVICE_TYPE, ti as errMsg$1, ua as parseJsonUnknown, v as CatalogFileSchema, vr as scopesAllowDeviceCap, wa as withoutCallerStamp, wn as isArrayOutputSchema, wr as splitTranslationRef, xi as RUNTIME_DEFAULTS } from "./dist-Wy8cTxg6.mjs";
|
|
3
3
|
import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
|
|
4
|
-
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-
|
|
4
|
+
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-Bnkw8GyU.mjs";
|
|
5
5
|
import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
|
|
6
6
|
import "./builtins/alerts/index.mjs";
|
|
7
7
|
import { CalendarsAddon } from "./builtins/calendars/calendars.addon.mjs";
|
|
@@ -27,26 +27,26 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
|
|
|
27
27
|
import NativeMetricsAddon, { a as NativeMetricsProvider, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
|
|
28
28
|
import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
|
|
29
29
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
30
|
-
import { l as SqliteSettingsBackend } from "./wal-maintenance-
|
|
30
|
+
import { C as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-Bj_MmDkr.mjs";
|
|
31
31
|
import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
32
32
|
import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
33
33
|
import { StorageOrchestratorAddon, a as stripForwardedCaller, i as createHubCapForwardService, l as STORAGE_DRAIN_STATE_LEGACY, n as HUB_CAP_FWD_ACTION, o as buildStorageLocationRegistry, r as HUB_CAP_FWD_SERVICE, t as StorageOrchestratorService, u as storageOrchestratorRecordKinds } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
34
34
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
35
|
-
import { a as
|
|
36
|
-
import {
|
|
37
|
-
import { $ as
|
|
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-Iw3RSQup.mjs";
|
|
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-BnkOdj9Q.mjs";
|
|
37
|
+
import { $ as generateMeshKeyPair, A as setProcessMeshPeerTransportLookup, B as describeMeshLeaf, C as setProcessMeshTlsEnabler, D as getProcessPeerLeaf, E as getProcessNodeMeshTransport, F as setProcessMeshTlsListenerState, G as MeshCaKeeper, H as setProcessMeshCertificateRegistry, I as MESH_NODE_CERTIFICATES_COLLECTION, J as caFingerprint, K as getProcessMeshCaState, L as MESH_NODE_CERTIFICATES_COLUMNS, M as revokeMeshCertificate, N as getProcessMeshTlsListenerState, O as isProcessVerifiedMeshPeer, P as openMeshTlsWhenRevocationsLoaded, Q as generateMeshCa, R as MeshCertificateRegistry, S as ServiceBroker, SystemConfigAddon, T as emitProcessNodeRegistered, U as MeshCrl, V as getProcessMeshCertificateRegistry, W as processMeshCrl, X as createMeshCsrPem, Y as caFingerprintCompact, Z as exportMeshPrivateKeyPem, _ as signPairingProof, _t as readCidrSetting, a as hubHostFromMeshAddress, at as AGENT_UI_UNLOCK_TTL_MS, b as TlsTcpTransporter, c as PAIRING_MAX_SESSIONS, ct as AGENT_UI_UNLOCK_VERSION, d as PAIRING_PROTOCOL, dt as mintAgentUiUnlockTicket, et as isValidAgentNodeId, f as PAIRING_TTL_MS, ft as parseAgentDashboardOrigins, g as keyFingerprintShort, gt as parseCidrList, h as describeCsr, ht as normalizeIp, i as AgentPairing, it as AGENT_DASHBOARD_ORIGINS_FIELD, j as renewMeshCertificate, k as onProcessNodeRegistered, l as PAIRING_PATHS, lt as UnlockTicketJtiStore, m as computePairingSas, mt as createCidrMatcher, n as HubPairing, nt as issueMeshLeafFromCsr, o as PAIRING_CODE_DIGITS, ot as AGENT_UI_UNLOCK_TYP, p as computePairingCommitment, pt as verifyAgentUiUnlockTicket, q as requireProcessMeshCa, r as PairingHttpError, rt as loadMeshCa, s as PAIRING_MAX_CODE_ATTEMPTS, st as AGENT_UI_UNLOCK_USE, tt as issueMeshLeafForNode, u as PAIRING_PIN_DIGITS, ut as isAllowedAgentDashboardReturnTo, v as verifyPairingProof, w as dropProcessPeer, x as Errors, y as MESH_TLS_PORT_HELLO_FIELD, z as RENEWAL_ABANDONED } from "./builtins/system-config/system-config.addon.mjs";
|
|
38
38
|
import "./builtins/system-config/index.mjs";
|
|
39
39
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
40
|
-
import { C as isModelDownloaded, 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 allFamiliesListenHost, C as caReplacementMarkerFile, D as replaceUnconstrainedLocalCa, E as reissueTlsLeaf, F as registerLanHttpHandler, M as bindPendingLanHttp, N as closeLanHttp, O as retirePreviousLocalCa, P as readLanHttpState, S as validateUploadedTls, T as loadTlsCert, _ as splitPemCertificates, a as storeUploadedCertificate, b as chainsToPublicRoot, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, 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 writeExtraSans, w as ensureTlsCert, x as checkUploadedCa, y as writeTlsMode } from "./hub-mdns-ciao-
|
|
40
|
+
import { C as isModelDownloaded, 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-DStvrQKI.mjs";
|
|
41
|
+
import { A as allFamiliesListenHost, C as caReplacementMarkerFile, D as replaceUnconstrainedLocalCa, E as reissueTlsLeaf, F as registerLanHttpHandler, M as bindPendingLanHttp, N as closeLanHttp, O as retirePreviousLocalCa, P as readLanHttpState, S as validateUploadedTls, T as loadTlsCert, _ as splitPemCertificates, a as storeUploadedCertificate, b as chainsToPublicRoot, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, 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 writeExtraSans, w as ensureTlsCert, x as checkUploadedCa, y as writeTlsMode } from "./hub-mdns-ciao-CJu0nhla.mjs";
|
|
42
42
|
import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
|
|
43
43
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
|
|
44
|
-
import {
|
|
45
|
-
import { n as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-
|
|
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-CM23Pq9B.mjs";
|
|
45
|
+
import { n as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-Qhn5TOYZ.mjs";
|
|
46
46
|
import { z } from "zod";
|
|
47
47
|
import * as crypto$1 from "node:crypto";
|
|
48
48
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
49
|
-
import { PYTHON_VERSION, buildBinaryPath, downloadBinary, ensureBinary, ensureBinary as ensureBinary$1, 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";
|
|
49
|
+
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
50
|
import { connect, createConnection, createServer } from "node:net";
|
|
51
51
|
import { mkdir, rm, stat, unlink } from "node:fs/promises";
|
|
52
52
|
import * as path$1 from "node:path";
|
|
@@ -57,7 +57,7 @@ import * as os$1 from "node:os";
|
|
|
57
57
|
import { tmpdir } from "node:os";
|
|
58
58
|
import { pathToFileURL } from "node:url";
|
|
59
59
|
import { BOOT_RECOVERY_BACKOFF_MS, CALLER_STAMPED_CAPABILITIES, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DeviceType, DisposerChain, ErrorI18nPayloadSchema, EventCategory, 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, createDeviceProxy, createEvent, createEventBusSliceSource, createRecordsAccess, createSecretsAccess, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods as expandCapMethods$1, maskUrlCredentials, readErrorI18n, readNodePin, scopeKey as scopeKey$1, scrubKnownSecrets, sleep, withCapInputDefaults } from "@camstack/types/addon";
|
|
60
|
-
import * as fs from "node:fs";
|
|
60
|
+
import * as fs$1 from "node:fs";
|
|
61
61
|
import { accessSync, constants, createReadStream, createWriteStream, existsSync, readFileSync, readdirSync } from "node:fs";
|
|
62
62
|
import { execFile, spawn } from "node:child_process";
|
|
63
63
|
import { once } from "node:events";
|
|
@@ -5031,7 +5031,7 @@ var PythonEnvManager = class {
|
|
|
5031
5031
|
async ensure(options) {
|
|
5032
5032
|
const probe = await this.probe();
|
|
5033
5033
|
if (!probe.available || !probe.path) throw userError("system.python-required", void 0, "Python 3.10+ is required but not found on this system");
|
|
5034
|
-
if (!fs.existsSync(path$1.join(this.venvPath, "bin", "python"))) await execFileAsync$7(probe.path, [
|
|
5034
|
+
if (!fs$1.existsSync(path$1.join(this.venvPath, "bin", "python"))) await execFileAsync$7(probe.path, [
|
|
5035
5035
|
"-m",
|
|
5036
5036
|
"venv",
|
|
5037
5037
|
this.venvPath
|
|
@@ -5054,7 +5054,7 @@ var PythonEnvManager = class {
|
|
|
5054
5054
|
}
|
|
5055
5055
|
spawn(script, args) {
|
|
5056
5056
|
const venvPython = path$1.join(this.venvPath, "bin", "python");
|
|
5057
|
-
if (!fs.existsSync(venvPython)) throw new Error("Python venv not initialized. Call ensure() first.");
|
|
5057
|
+
if (!fs$1.existsSync(venvPython)) throw new Error("Python venv not initialized. Call ensure() first.");
|
|
5058
5058
|
return spawn(venvPython, [script, ...args]);
|
|
5059
5059
|
}
|
|
5060
5060
|
};
|
|
@@ -5406,20 +5406,20 @@ var StorageManager = class {
|
|
|
5406
5406
|
const basePath = this.locationManager.getBackend(mappedName).basePath;
|
|
5407
5407
|
location.files = {
|
|
5408
5408
|
async readFile(p) {
|
|
5409
|
-
return fs.promises.readFile(path$1.join(basePath, p));
|
|
5409
|
+
return fs$1.promises.readFile(path$1.join(basePath, p));
|
|
5410
5410
|
},
|
|
5411
5411
|
async writeFile(p, data) {
|
|
5412
5412
|
const full = path$1.join(basePath, p);
|
|
5413
|
-
await fs.promises.mkdir(path$1.dirname(full), { recursive: true });
|
|
5414
|
-
await fs.promises.writeFile(full, data);
|
|
5413
|
+
await fs$1.promises.mkdir(path$1.dirname(full), { recursive: true });
|
|
5414
|
+
await fs$1.promises.writeFile(full, data);
|
|
5415
5415
|
},
|
|
5416
5416
|
async deleteFile(p) {
|
|
5417
|
-
await fs.promises.rm(path$1.join(basePath, p), { force: true });
|
|
5417
|
+
await fs$1.promises.rm(path$1.join(basePath, p), { force: true });
|
|
5418
5418
|
},
|
|
5419
5419
|
async listFiles(prefix) {
|
|
5420
5420
|
const dir = prefix ? path$1.join(basePath, prefix) : basePath;
|
|
5421
5421
|
try {
|
|
5422
|
-
return (await fs.promises.readdir(dir)).map((f) => prefix ? `${prefix}/${f}` : f);
|
|
5422
|
+
return (await fs$1.promises.readdir(dir)).map((f) => prefix ? `${prefix}/${f}` : f);
|
|
5423
5423
|
} catch {
|
|
5424
5424
|
return [];
|
|
5425
5425
|
}
|
|
@@ -5429,7 +5429,7 @@ var StorageManager = class {
|
|
|
5429
5429
|
},
|
|
5430
5430
|
async exists(p) {
|
|
5431
5431
|
try {
|
|
5432
|
-
await fs.promises.access(path$1.join(basePath, p));
|
|
5432
|
+
await fs$1.promises.access(path$1.join(basePath, p));
|
|
5433
5433
|
return true;
|
|
5434
5434
|
} catch {
|
|
5435
5435
|
return false;
|
|
@@ -5616,8 +5616,7 @@ var _integrationRegistryRecordKinds = defineRecordKinds({
|
|
|
5616
5616
|
name: "addon_id",
|
|
5617
5617
|
fields: ["addonId"]
|
|
5618
5618
|
}],
|
|
5619
|
-
retention: { none: "deleteIntegration only" }
|
|
5620
|
-
adoptsFrom: INTEGRATIONS_LEGACY
|
|
5619
|
+
retention: { none: "deleteIntegration only" }
|
|
5621
5620
|
},
|
|
5622
5621
|
"integration-settings": {
|
|
5623
5622
|
schema: IntegrationSettingBodySchema,
|
|
@@ -5629,8 +5628,7 @@ var _integrationRegistryRecordKinds = defineRecordKinds({
|
|
|
5629
5628
|
name: "integration_id",
|
|
5630
5629
|
fields: ["integrationId"]
|
|
5631
5630
|
}],
|
|
5632
|
-
retention: { none: "cascade on deleteIntegration" }
|
|
5633
|
-
adoptsFrom: INTEGRATION_SETTINGS_LEGACY
|
|
5631
|
+
retention: { none: "cascade on deleteIntegration" }
|
|
5634
5632
|
}
|
|
5635
5633
|
});
|
|
5636
5634
|
var integrationRegistryRecordKinds = _integrationRegistryRecordKinds;
|
|
@@ -6118,8 +6116,7 @@ var _clusterAgentRecordKinds = defineRecordKinds({ "node-history": {
|
|
|
6118
6116
|
name: "last_active",
|
|
6119
6117
|
fields: ["at"]
|
|
6120
6118
|
}],
|
|
6121
|
-
retention: { none: "rows removed only by operator forget(nodeId)" }
|
|
6122
|
-
adoptsFrom: CLUSTER_NODE_HISTORY_COLLECTION
|
|
6119
|
+
retention: { none: "rows removed only by operator forget(nodeId)" }
|
|
6123
6120
|
} });
|
|
6124
6121
|
var clusterAgentRecordKinds = _clusterAgentRecordKinds;
|
|
6125
6122
|
/** Narrow kind for `records.kind()` — `IsolatedRecordKinds` string index is `| undefined`. */
|
|
@@ -6175,7 +6172,7 @@ var TRADITIONAL_NATIVE_PACKAGES = ["better-sqlite3"];
|
|
|
6175
6172
|
function hasDotNode(dir, maxDepth) {
|
|
6176
6173
|
let entries;
|
|
6177
6174
|
try {
|
|
6178
|
-
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
6175
|
+
entries = fs$1.readdirSync(dir, { withFileTypes: true });
|
|
6179
6176
|
} catch {
|
|
6180
6177
|
return false;
|
|
6181
6178
|
}
|
|
@@ -6186,7 +6183,7 @@ function hasDotNode(dir, maxDepth) {
|
|
|
6186
6183
|
}
|
|
6187
6184
|
/** Locate the bundled `prebuild-install` bin.js inside the staged closure. */
|
|
6188
6185
|
function resolvePrebuildInstallBin(closureDir, moduleDir) {
|
|
6189
|
-
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;
|
|
6186
|
+
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;
|
|
6190
6187
|
}
|
|
6191
6188
|
/**
|
|
6192
6189
|
* Default fetcher: run the closure's own `prebuild-install` under the CURRENT
|
|
@@ -6239,7 +6236,7 @@ async function ensureNativePrebuilds(closureDir, options) {
|
|
|
6239
6236
|
const fetched = [];
|
|
6240
6237
|
for (const pkg of packages) {
|
|
6241
6238
|
const moduleDir = path$1.join(nm, pkg);
|
|
6242
|
-
if (!fs.existsSync(moduleDir)) continue;
|
|
6239
|
+
if (!fs$1.existsSync(moduleDir)) continue;
|
|
6243
6240
|
if (hasDotNode(moduleDir, 4)) continue;
|
|
6244
6241
|
options.logger.warn("staged closure native prebuild missing — fetching for running ABI", { meta: {
|
|
6245
6242
|
pkg,
|
|
@@ -6302,12 +6299,12 @@ async function ensureNativePrebuilds(closureDir, options) {
|
|
|
6302
6299
|
function replantFromBundled(srcModuleDir, dstModuleDir, hasNative) {
|
|
6303
6300
|
if (!hasNative(srcModuleDir)) return false;
|
|
6304
6301
|
try {
|
|
6305
|
-
fs.rmSync(dstModuleDir, {
|
|
6302
|
+
fs$1.rmSync(dstModuleDir, {
|
|
6306
6303
|
recursive: true,
|
|
6307
6304
|
force: true
|
|
6308
6305
|
});
|
|
6309
|
-
fs.mkdirSync(path$1.dirname(dstModuleDir), { recursive: true });
|
|
6310
|
-
fs.cpSync(srcModuleDir, dstModuleDir, {
|
|
6306
|
+
fs$1.mkdirSync(path$1.dirname(dstModuleDir), { recursive: true });
|
|
6307
|
+
fs$1.cpSync(srcModuleDir, dstModuleDir, {
|
|
6311
6308
|
recursive: true,
|
|
6312
6309
|
dereference: true
|
|
6313
6310
|
});
|
|
@@ -6336,7 +6333,7 @@ async function ensureAddonNativePrebuilds(addonDir, options) {
|
|
|
6336
6333
|
const missing = [];
|
|
6337
6334
|
for (const pkg of packages) {
|
|
6338
6335
|
const moduleDir = path$1.join(nm, pkg);
|
|
6339
|
-
if (!fs.existsSync(moduleDir)) continue;
|
|
6336
|
+
if (!fs$1.existsSync(moduleDir)) continue;
|
|
6340
6337
|
if (hasNative(moduleDir)) {
|
|
6341
6338
|
results.push({
|
|
6342
6339
|
pkg,
|
|
@@ -6435,7 +6432,7 @@ async function defaultDownloadTarball(url, destTgz) {
|
|
|
6435
6432
|
const res = await fetch(url);
|
|
6436
6433
|
if (!res.ok || !res.body) throw new Error(`HTTP ${res.status} downloading ${url}`);
|
|
6437
6434
|
const bytes = Buffer.from(await res.arrayBuffer());
|
|
6438
|
-
await fs.promises.writeFile(destTgz, bytes);
|
|
6435
|
+
await fs$1.promises.writeFile(destTgz, bytes);
|
|
6439
6436
|
}
|
|
6440
6437
|
async function defaultExtractTarball(tgzPath, destDir) {
|
|
6441
6438
|
await execFileAsync$5("tar", [
|
|
@@ -6521,7 +6518,7 @@ async function resolveUncached(options) {
|
|
|
6521
6518
|
argsPrefix: []
|
|
6522
6519
|
};
|
|
6523
6520
|
const cliPath = bootstrappedCliPath(options.cacheDir);
|
|
6524
|
-
if (fs.existsSync(cliPath)) {
|
|
6521
|
+
if (fs$1.existsSync(cliPath)) {
|
|
6525
6522
|
options.logger.info("system npm unavailable — using bootstrapped npm", { meta: { cliPath } });
|
|
6526
6523
|
return {
|
|
6527
6524
|
command: process.execPath,
|
|
@@ -6533,12 +6530,12 @@ async function resolveUncached(options) {
|
|
|
6533
6530
|
const registry = (options.registry ?? DEFAULT_REGISTRY).replace(/\/+$/, "");
|
|
6534
6531
|
const tarballUrl = tarballUrlOf(await (options.fetchJson ?? defaultFetchJson)(`${registry}/npm/latest`));
|
|
6535
6532
|
if (!tarballUrl) throw new Error(`registry metadata for 'npm' carries no dist.tarball (${registry})`);
|
|
6536
|
-
await fs.promises.mkdir(options.cacheDir, { recursive: true });
|
|
6533
|
+
await fs$1.promises.mkdir(options.cacheDir, { recursive: true });
|
|
6537
6534
|
const tgzPath = path$1.join(options.cacheDir, "npm-bootstrap.tgz");
|
|
6538
6535
|
await (options.downloadTarball ?? defaultDownloadTarball)(tarballUrl, tgzPath);
|
|
6539
6536
|
await (options.extractTarball ?? defaultExtractTarball)(tgzPath, options.cacheDir);
|
|
6540
|
-
await fs.promises.rm(tgzPath, { force: true });
|
|
6541
|
-
if (!fs.existsSync(cliPath)) throw new Error(`extracted npm tarball is missing ${cliPath}`);
|
|
6537
|
+
await fs$1.promises.rm(tgzPath, { force: true });
|
|
6538
|
+
if (!fs$1.existsSync(cliPath)) throw new Error(`extracted npm tarball is missing ${cliPath}`);
|
|
6542
6539
|
options.logger.info("npm bootstrapped", { meta: { cliPath } });
|
|
6543
6540
|
return {
|
|
6544
6541
|
command: process.execPath,
|
|
@@ -6604,7 +6601,7 @@ function readOwningPackageVersion(entryPath) {
|
|
|
6604
6601
|
let dir = path$1.dirname(entryPath);
|
|
6605
6602
|
for (let hop = 0; hop < PACKAGE_JSON_LOOKUP_DEPTH; hop++) {
|
|
6606
6603
|
try {
|
|
6607
|
-
const version = asJsonObject$1(parseJsonUnknown(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8")))?.["version"];
|
|
6604
|
+
const version = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8")))?.["version"];
|
|
6608
6605
|
if (typeof version === "string" && version.length > 0) return version;
|
|
6609
6606
|
} catch {}
|
|
6610
6607
|
const parent = path$1.dirname(dir);
|
|
@@ -6648,14 +6645,14 @@ function readOwningPackageVersion(entryPath) {
|
|
|
6648
6645
|
function addonModuleCacheKey(entryPath) {
|
|
6649
6646
|
let stat;
|
|
6650
6647
|
try {
|
|
6651
|
-
stat = fs.statSync(entryPath);
|
|
6648
|
+
stat = fs$1.statSync(entryPath);
|
|
6652
6649
|
} catch {
|
|
6653
6650
|
return null;
|
|
6654
6651
|
}
|
|
6655
6652
|
const version = readOwningPackageVersion(entryPath) ?? `m${stat.mtimeMs}`;
|
|
6656
6653
|
let content;
|
|
6657
6654
|
try {
|
|
6658
|
-
content = createHash("sha1").update(fs.readFileSync(entryPath)).digest("hex").slice(0, 16);
|
|
6655
|
+
content = createHash("sha1").update(fs$1.readFileSync(entryPath)).digest("hex").slice(0, 16);
|
|
6659
6656
|
} catch {
|
|
6660
6657
|
content = `m${stat.mtimeMs}s${stat.size}`;
|
|
6661
6658
|
}
|
|
@@ -6759,14 +6756,14 @@ var AddonLoader = class {
|
|
|
6759
6756
|
* BUILTINS from the active closure, not the (now-inert) addons-dir copy, so
|
|
6760
6757
|
* the addons-dir `@camstack/system` must NOT be double-loaded here. */
|
|
6761
6758
|
async loadFromDirectory(addonsDir, skipPackages = []) {
|
|
6762
|
-
if (!fs.existsSync(addonsDir)) return;
|
|
6759
|
+
if (!fs$1.existsSync(addonsDir)) return;
|
|
6763
6760
|
const skip = new Set(skipPackages);
|
|
6764
|
-
const entries = fs.readdirSync(addonsDir, { withFileTypes: true });
|
|
6761
|
+
const entries = fs$1.readdirSync(addonsDir, { withFileTypes: true });
|
|
6765
6762
|
for (const entry of entries) {
|
|
6766
6763
|
if (!isDirectoryEntry(entry, addonsDir)) continue;
|
|
6767
6764
|
if (entry.name.startsWith("@")) {
|
|
6768
6765
|
const scopeDir = path$1.join(addonsDir, entry.name);
|
|
6769
|
-
const scopeEntries = fs.readdirSync(scopeDir, { withFileTypes: true });
|
|
6766
|
+
const scopeEntries = fs$1.readdirSync(scopeDir, { withFileTypes: true });
|
|
6770
6767
|
for (const scopeEntry of scopeEntries) {
|
|
6771
6768
|
if (!isDirectoryEntry(scopeEntry, scopeDir)) continue;
|
|
6772
6769
|
if (skip.has(`${entry.name}/${scopeEntry.name}`)) continue;
|
|
@@ -6780,7 +6777,7 @@ var AddonLoader = class {
|
|
|
6780
6777
|
}
|
|
6781
6778
|
async tryLoadAddon(addonDir) {
|
|
6782
6779
|
const pkgJsonPath = path$1.join(addonDir, "package.json");
|
|
6783
|
-
if (!fs.existsSync(pkgJsonPath)) return;
|
|
6780
|
+
if (!fs$1.existsSync(pkgJsonPath)) return;
|
|
6784
6781
|
try {
|
|
6785
6782
|
await this.loadFromAddonDir(addonDir);
|
|
6786
6783
|
} catch (err) {
|
|
@@ -6798,7 +6795,7 @@ var AddonLoader = class {
|
|
|
6798
6795
|
/** Load addon from a specific directory (package.json + dist/) */
|
|
6799
6796
|
async loadFromAddonDir(addonDir) {
|
|
6800
6797
|
const pkgJsonPath = path$1.join(addonDir, "package.json");
|
|
6801
|
-
const pkgJson = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8"))) ?? {};
|
|
6798
|
+
const pkgJson = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(pkgJsonPath, "utf-8"))) ?? {};
|
|
6802
6799
|
const packageNameRaw = pkgJson["name"];
|
|
6803
6800
|
const packageName = typeof packageNameRaw === "string" ? packageNameRaw : "";
|
|
6804
6801
|
const packageVersionRaw = pkgJson["version"];
|
|
@@ -6829,9 +6826,23 @@ var AddonLoader = class {
|
|
|
6829
6826
|
}
|
|
6830
6827
|
async loadDeclaration(addonDir, declaration, packageName, packageVersion, packageDisplayName, bundle) {
|
|
6831
6828
|
if (!declaration.entry) throw new Error(`Addon "${declaration.id}" has no entry point in package.json`);
|
|
6829
|
+
const owner = this.addons.get(declaration.id);
|
|
6830
|
+
if (owner !== void 0 && owner.packageName !== packageName) {
|
|
6831
|
+
this.logger.warn(`Skipped addon "${declaration.id}" from ${packageName}: already provided by ${owner.packageName}`, {
|
|
6832
|
+
tags: { addonId: declaration.id },
|
|
6833
|
+
meta: {
|
|
6834
|
+
skippedPackage: packageName,
|
|
6835
|
+
skippedVersion: packageVersion,
|
|
6836
|
+
skippedDir: addonDir,
|
|
6837
|
+
ownerPackage: owner.packageName,
|
|
6838
|
+
ownerVersion: owner.packageVersion
|
|
6839
|
+
}
|
|
6840
|
+
});
|
|
6841
|
+
return;
|
|
6842
|
+
}
|
|
6832
6843
|
const entryFile = declaration.entry.replace(/^\.\//, "").replace(/^src\//, "dist/").replace(/\.ts$/, ".js");
|
|
6833
6844
|
let entryPath = path$1.resolve(addonDir, entryFile);
|
|
6834
|
-
if (!fs.existsSync(entryPath)) {
|
|
6845
|
+
if (!fs$1.existsSync(entryPath)) {
|
|
6835
6846
|
const base = entryPath.replace(/\.(js|cjs|mjs)$/, "");
|
|
6836
6847
|
entryPath = [
|
|
6837
6848
|
`${base}.cjs`,
|
|
@@ -6840,9 +6851,9 @@ var AddonLoader = class {
|
|
|
6840
6851
|
path$1.resolve(addonDir, "dist", "index.cjs"),
|
|
6841
6852
|
path$1.resolve(addonDir, "dist", "index.mjs"),
|
|
6842
6853
|
path$1.resolve(addonDir, declaration.entry)
|
|
6843
|
-
].find((p) => fs.existsSync(p)) ?? entryPath;
|
|
6854
|
+
].find((p) => fs$1.existsSync(p)) ?? entryPath;
|
|
6844
6855
|
}
|
|
6845
|
-
if (!fs.existsSync(entryPath)) throw new Error(`Entry not found: ${entryPath}`);
|
|
6856
|
+
if (!fs$1.existsSync(entryPath)) throw new Error(`Entry not found: ${entryPath}`);
|
|
6846
6857
|
const modUnknown = await importAddonModuleFresh(entryPath);
|
|
6847
6858
|
const mod = isRecord$5(modUnknown) ? modUnknown : {};
|
|
6848
6859
|
const AddonClass = resolveAddonClass(mod);
|
|
@@ -6927,7 +6938,7 @@ function isDirectoryEntry(entry, parentDir) {
|
|
|
6927
6938
|
if (entry.name.startsWith(".")) return false;
|
|
6928
6939
|
if (entry.isDirectory()) return true;
|
|
6929
6940
|
if (entry.isSymbolicLink()) try {
|
|
6930
|
-
return fs.statSync(path$1.join(parentDir, entry.name)).isDirectory();
|
|
6941
|
+
return fs$1.statSync(path$1.join(parentDir, entry.name)).isDirectory();
|
|
6931
6942
|
} catch {
|
|
6932
6943
|
return false;
|
|
6933
6944
|
}
|
|
@@ -7021,7 +7032,7 @@ var execFileAsync$4 = promisify(execFile);
|
|
|
7021
7032
|
* Single source of truth — replaces scattered mkdirSync calls.
|
|
7022
7033
|
*/
|
|
7023
7034
|
function ensureDir(dirPath) {
|
|
7024
|
-
fs.mkdirSync(dirPath, { recursive: true });
|
|
7035
|
+
fs$1.mkdirSync(dirPath, { recursive: true });
|
|
7025
7036
|
}
|
|
7026
7037
|
/**
|
|
7027
7038
|
* Copy a directory recursively — ASYNC so it never blocks the event loop.
|
|
@@ -7034,7 +7045,7 @@ function ensureDir(dirPath) {
|
|
|
7034
7045
|
* `fs.promises.cp` keeps the I/O off the event loop. (Node ≥18 stable.)
|
|
7035
7046
|
*/
|
|
7036
7047
|
async function copyDirRecursive(src, dest) {
|
|
7037
|
-
await fs.promises.cp(src, dest, {
|
|
7048
|
+
await fs$1.promises.cp(src, dest, {
|
|
7038
7049
|
recursive: true,
|
|
7039
7050
|
force: true
|
|
7040
7051
|
});
|
|
@@ -7139,13 +7150,13 @@ async function copyExtraFileDirs(pkgJson, sourceDir, destDir) {
|
|
|
7139
7150
|
if (typeof fileEntry !== "string") continue;
|
|
7140
7151
|
if (fileEntry === "dist" || fileEntry.includes("*")) continue;
|
|
7141
7152
|
const srcPath = path$1.join(sourceDir, fileEntry);
|
|
7142
|
-
if (!fs.existsSync(srcPath)) continue;
|
|
7153
|
+
if (!fs$1.existsSync(srcPath)) continue;
|
|
7143
7154
|
const destPath = path$1.join(destDir, fileEntry);
|
|
7144
|
-
const stat = await fs.promises.stat(srcPath);
|
|
7155
|
+
const stat = await fs$1.promises.stat(srcPath);
|
|
7145
7156
|
if (stat.isDirectory()) await copyDirRecursive(srcPath, destPath);
|
|
7146
7157
|
else if (stat.isFile()) {
|
|
7147
7158
|
ensureDir(path$1.dirname(destPath));
|
|
7148
|
-
await fs.promises.copyFile(srcPath, destPath);
|
|
7159
|
+
await fs$1.promises.copyFile(srcPath, destPath);
|
|
7149
7160
|
}
|
|
7150
7161
|
}
|
|
7151
7162
|
}
|
|
@@ -7156,10 +7167,10 @@ async function copyExtraFileDirs(pkgJson, sourceDir, destDir) {
|
|
|
7156
7167
|
function isSourceNewer(packageDir) {
|
|
7157
7168
|
const srcDir = path$1.join(packageDir, "src");
|
|
7158
7169
|
const distDir = path$1.join(packageDir, "dist");
|
|
7159
|
-
if (!fs.existsSync(srcDir) || !fs.existsSync(distDir)) return true;
|
|
7170
|
+
if (!fs$1.existsSync(srcDir) || !fs$1.existsSync(distDir)) return true;
|
|
7160
7171
|
try {
|
|
7161
|
-
const distMtime = fs.statSync(distDir).mtimeMs;
|
|
7162
|
-
const entries = fs.readdirSync(srcDir, {
|
|
7172
|
+
const distMtime = fs$1.statSync(distDir).mtimeMs;
|
|
7173
|
+
const entries = fs$1.readdirSync(srcDir, {
|
|
7163
7174
|
withFileTypes: true,
|
|
7164
7175
|
recursive: true
|
|
7165
7176
|
});
|
|
@@ -7167,7 +7178,7 @@ function isSourceNewer(packageDir) {
|
|
|
7167
7178
|
if (!entry.isFile()) continue;
|
|
7168
7179
|
const parentDir = entry.parentPath ?? String(Reflect.get(entry, "path") ?? "");
|
|
7169
7180
|
const filePath = path$1.join(parentDir, entry.name);
|
|
7170
|
-
if (fs.statSync(filePath).mtimeMs > distMtime) return true;
|
|
7181
|
+
if (fs$1.statSync(filePath).mtimeMs > distMtime) return true;
|
|
7171
7182
|
}
|
|
7172
7183
|
return false;
|
|
7173
7184
|
} catch {
|
|
@@ -7182,9 +7193,9 @@ function isSourceNewer(packageDir) {
|
|
|
7182
7193
|
function ensureLibraryBuilt(packageName, packagesDir) {
|
|
7183
7194
|
const dirName = packageName.replace("@camstack/", "");
|
|
7184
7195
|
const sourceDir = path$1.join(packagesDir, dirName);
|
|
7185
|
-
if (!fs.existsSync(sourceDir)) return;
|
|
7196
|
+
if (!fs$1.existsSync(sourceDir)) return;
|
|
7186
7197
|
const distDir = path$1.join(sourceDir, "dist");
|
|
7187
|
-
if (fs.existsSync(path$1.join(distDir, "index.js")) || fs.existsSync(path$1.join(distDir, "index.mjs"))) return;
|
|
7198
|
+
if (fs$1.existsSync(path$1.join(distDir, "index.js")) || fs$1.existsSync(path$1.join(distDir, "index.mjs"))) return;
|
|
7188
7199
|
console.warn(`[ensureLibraryBuilt] ${packageName} has no dist/ — run 'npm run build' first`);
|
|
7189
7200
|
}
|
|
7190
7201
|
/**
|
|
@@ -7197,7 +7208,7 @@ function ensureLibraryBuilt(packageName, packagesDir) {
|
|
|
7197
7208
|
* `copyDirRecursive` for the wedge this prevents.
|
|
7198
7209
|
*/
|
|
7199
7210
|
async function installPackageFromNpm(packageName, targetDir) {
|
|
7200
|
-
const tmpDir = await fs.promises.mkdtemp(path$1.join(os$1.tmpdir(), "camstack-install-"));
|
|
7211
|
+
const tmpDir = await fs$1.promises.mkdtemp(path$1.join(os$1.tmpdir(), "camstack-install-"));
|
|
7201
7212
|
try {
|
|
7202
7213
|
const { stdout } = await execFileAsync$4("npm", [
|
|
7203
7214
|
"pack",
|
|
@@ -7220,21 +7231,21 @@ async function installPackageFromNpm(packageName, targetDir) {
|
|
|
7220
7231
|
extractDir
|
|
7221
7232
|
], { timeout: 3e4 });
|
|
7222
7233
|
const packageSubDir = path$1.join(extractDir, "package");
|
|
7223
|
-
const srcPkgJsonDir = fs.existsSync(path$1.join(packageSubDir, "package.json")) ? packageSubDir : extractDir;
|
|
7224
|
-
await fs.promises.rm(targetDir, {
|
|
7234
|
+
const srcPkgJsonDir = fs$1.existsSync(path$1.join(packageSubDir, "package.json")) ? packageSubDir : extractDir;
|
|
7235
|
+
await fs$1.promises.rm(targetDir, {
|
|
7225
7236
|
recursive: true,
|
|
7226
7237
|
force: true
|
|
7227
7238
|
});
|
|
7228
7239
|
ensureDir(targetDir);
|
|
7229
|
-
await fs.promises.copyFile(path$1.join(srcPkgJsonDir, "package.json"), path$1.join(targetDir, "package.json"));
|
|
7240
|
+
await fs$1.promises.copyFile(path$1.join(srcPkgJsonDir, "package.json"), path$1.join(targetDir, "package.json"));
|
|
7230
7241
|
const distSrc = path$1.join(srcPkgJsonDir, "dist");
|
|
7231
|
-
if (fs.existsSync(distSrc)) await copyDirRecursive(distSrc, path$1.join(targetDir, "dist"));
|
|
7242
|
+
if (fs$1.existsSync(distSrc)) await copyDirRecursive(distSrc, path$1.join(targetDir, "dist"));
|
|
7232
7243
|
try {
|
|
7233
|
-
const npmPkg = asJsonObject$1(parseJsonUnknown(await fs.promises.readFile(path$1.join(srcPkgJsonDir, "package.json"), "utf-8")));
|
|
7244
|
+
const npmPkg = asJsonObject$1(parseJsonUnknown(await fs$1.promises.readFile(path$1.join(srcPkgJsonDir, "package.json"), "utf-8")));
|
|
7234
7245
|
if (npmPkg) await copyExtraFileDirs(npmPkg, srcPkgJsonDir, targetDir);
|
|
7235
7246
|
} catch {}
|
|
7236
7247
|
} finally {
|
|
7237
|
-
await fs.promises.rm(tmpDir, {
|
|
7248
|
+
await fs$1.promises.rm(tmpDir, {
|
|
7238
7249
|
recursive: true,
|
|
7239
7250
|
force: true
|
|
7240
7251
|
});
|
|
@@ -7259,7 +7270,7 @@ function packageDirName$1(declaredName) {
|
|
|
7259
7270
|
}
|
|
7260
7271
|
function isDirLike$1(p) {
|
|
7261
7272
|
try {
|
|
7262
|
-
return fs.statSync(p).isDirectory();
|
|
7273
|
+
return fs$1.statSync(p).isDirectory();
|
|
7263
7274
|
} catch {
|
|
7264
7275
|
return false;
|
|
7265
7276
|
}
|
|
@@ -7277,12 +7288,12 @@ var AddonManifest = class {
|
|
|
7277
7288
|
*/
|
|
7278
7289
|
read() {
|
|
7279
7290
|
if (this.cache != null) return this.cache;
|
|
7280
|
-
if (!fs.existsSync(this.manifestPath)) {
|
|
7291
|
+
if (!fs$1.existsSync(this.manifestPath)) {
|
|
7281
7292
|
this.cache = this.empty();
|
|
7282
7293
|
return this.cache;
|
|
7283
7294
|
}
|
|
7284
7295
|
try {
|
|
7285
|
-
const raw = fs.readFileSync(this.manifestPath, "utf-8");
|
|
7296
|
+
const raw = fs$1.readFileSync(this.manifestPath, "utf-8");
|
|
7286
7297
|
const parsed = JSON.parse(raw);
|
|
7287
7298
|
if (parsed.version !== MANIFEST_VERSION) {
|
|
7288
7299
|
process.stderr.write(`[AddonManifest] schema mismatch (file=${parsed.version} vs runtime=${MANIFEST_VERSION}); starting empty\n`);
|
|
@@ -7303,13 +7314,13 @@ var AddonManifest = class {
|
|
|
7303
7314
|
* a half-written file.
|
|
7304
7315
|
*/
|
|
7305
7316
|
write(manifest) {
|
|
7306
|
-
fs.mkdirSync(path$1.dirname(this.manifestPath), { recursive: true });
|
|
7317
|
+
fs$1.mkdirSync(path$1.dirname(this.manifestPath), { recursive: true });
|
|
7307
7318
|
const tmp = `${this.manifestPath}.tmp.${process.pid}.${Date.now()}`;
|
|
7308
|
-
fs.writeFileSync(tmp, JSON.stringify(manifest, null, 2), {
|
|
7319
|
+
fs$1.writeFileSync(tmp, JSON.stringify(manifest, null, 2), {
|
|
7309
7320
|
encoding: "utf-8",
|
|
7310
7321
|
mode: 384
|
|
7311
7322
|
});
|
|
7312
|
-
fs.renameSync(tmp, this.manifestPath);
|
|
7323
|
+
fs$1.renameSync(tmp, this.manifestPath);
|
|
7313
7324
|
this.cache = manifest;
|
|
7314
7325
|
}
|
|
7315
7326
|
/** Lookup a single addon's manifest entry, or `null` if not tracked. */
|
|
@@ -7384,22 +7395,22 @@ var AddonManifest = class {
|
|
|
7384
7395
|
* exactly what moved. Returns the total number of changes.
|
|
7385
7396
|
*/
|
|
7386
7397
|
reconcileFromDisk(addonsDir, onChange) {
|
|
7387
|
-
if (!fs.existsSync(addonsDir)) return 0;
|
|
7398
|
+
if (!fs$1.existsSync(addonsDir)) return 0;
|
|
7388
7399
|
const m = this.read();
|
|
7389
7400
|
let changes = 0;
|
|
7390
7401
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
7391
7402
|
/** Package name → version, for every ADDON package actually installed. */
|
|
7392
7403
|
const onDisk = /* @__PURE__ */ new Map();
|
|
7393
|
-
for (const scope of fs.readdirSync(addonsDir, { withFileTypes: true })) {
|
|
7404
|
+
for (const scope of fs$1.readdirSync(addonsDir, { withFileTypes: true })) {
|
|
7394
7405
|
if (!scope.name.startsWith("@") || !isDirLike$1(path$1.join(addonsDir, scope.name))) continue;
|
|
7395
7406
|
const scopeDir = path$1.join(addonsDir, scope.name);
|
|
7396
|
-
for (const pkg of fs.readdirSync(scopeDir, { withFileTypes: true })) {
|
|
7407
|
+
for (const pkg of fs$1.readdirSync(scopeDir, { withFileTypes: true })) {
|
|
7397
7408
|
if (!isDirLike$1(path$1.join(scopeDir, pkg.name))) continue;
|
|
7398
7409
|
const pkgJsonPath = path$1.join(scopeDir, pkg.name, "package.json");
|
|
7399
|
-
if (!fs.existsSync(pkgJsonPath)) continue;
|
|
7410
|
+
if (!fs$1.existsSync(pkgJsonPath)) continue;
|
|
7400
7411
|
let pkgJson;
|
|
7401
7412
|
try {
|
|
7402
|
-
const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
|
|
7413
|
+
const parsed = JSON.parse(fs$1.readFileSync(pkgJsonPath, "utf-8"));
|
|
7403
7414
|
if (typeof parsed !== "object" || parsed == null) continue;
|
|
7404
7415
|
pkgJson = parsed;
|
|
7405
7416
|
} catch {
|
|
@@ -7470,28 +7481,28 @@ var AddonManifest = class {
|
|
|
7470
7481
|
migrateFromInstallSourceMarkers(addonsDir) {
|
|
7471
7482
|
const m = this.read();
|
|
7472
7483
|
if (Object.keys(m.addons).length > 0) return 0;
|
|
7473
|
-
if (!fs.existsSync(addonsDir)) return 0;
|
|
7484
|
+
if (!fs$1.existsSync(addonsDir)) return 0;
|
|
7474
7485
|
let migrated = 0;
|
|
7475
7486
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
7476
|
-
for (const scope of fs.readdirSync(addonsDir, { withFileTypes: true })) {
|
|
7487
|
+
for (const scope of fs$1.readdirSync(addonsDir, { withFileTypes: true })) {
|
|
7477
7488
|
if (!scope.isDirectory() || !scope.name.startsWith("@")) continue;
|
|
7478
7489
|
const scopeDir = path$1.join(addonsDir, scope.name);
|
|
7479
|
-
for (const pkg of fs.readdirSync(scopeDir, { withFileTypes: true })) {
|
|
7490
|
+
for (const pkg of fs$1.readdirSync(scopeDir, { withFileTypes: true })) {
|
|
7480
7491
|
if (!pkg.isDirectory()) continue;
|
|
7481
7492
|
const pkgDir = path$1.join(scopeDir, pkg.name);
|
|
7482
7493
|
const markerPath = path$1.join(pkgDir, ".install-source");
|
|
7483
7494
|
const pkgJsonPath = path$1.join(pkgDir, "package.json");
|
|
7484
|
-
if (!fs.existsSync(pkgJsonPath)) continue;
|
|
7495
|
+
if (!fs$1.existsSync(pkgJsonPath)) continue;
|
|
7485
7496
|
let pkgJson;
|
|
7486
7497
|
try {
|
|
7487
|
-
const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
|
|
7498
|
+
const parsed = JSON.parse(fs$1.readFileSync(pkgJsonPath, "utf-8"));
|
|
7488
7499
|
if (typeof parsed !== "object" || parsed == null) continue;
|
|
7489
7500
|
pkgJson = parsed;
|
|
7490
7501
|
} catch {
|
|
7491
7502
|
continue;
|
|
7492
7503
|
}
|
|
7493
7504
|
if (!pkgJson.name || !pkgJson.version) continue;
|
|
7494
|
-
const source = fs.existsSync(markerPath) ? fs.readFileSync(markerPath, "utf-8").trim() : "bundled";
|
|
7505
|
+
const source = fs$1.existsSync(markerPath) ? fs$1.readFileSync(markerPath, "utf-8").trim() : "bundled";
|
|
7495
7506
|
m.addons[pkgJson.name] = {
|
|
7496
7507
|
name: pkgJson.name,
|
|
7497
7508
|
version: pkgJson.version,
|
|
@@ -7668,7 +7679,7 @@ function planClosureDedupe(input) {
|
|
|
7668
7679
|
function readTreeManifest(pkgJsonPath) {
|
|
7669
7680
|
let raw;
|
|
7670
7681
|
try {
|
|
7671
|
-
raw = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8")));
|
|
7682
|
+
raw = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(pkgJsonPath, "utf-8")));
|
|
7672
7683
|
} catch {
|
|
7673
7684
|
return null;
|
|
7674
7685
|
}
|
|
@@ -7693,7 +7704,7 @@ function readTreeManifest(pkgJsonPath) {
|
|
|
7693
7704
|
function listTopLevelEntries(nodeModulesDir) {
|
|
7694
7705
|
let entries;
|
|
7695
7706
|
try {
|
|
7696
|
-
entries = fs.readdirSync(nodeModulesDir, { withFileTypes: true });
|
|
7707
|
+
entries = fs$1.readdirSync(nodeModulesDir, { withFileTypes: true });
|
|
7697
7708
|
} catch {
|
|
7698
7709
|
return [];
|
|
7699
7710
|
}
|
|
@@ -7703,7 +7714,7 @@ function listTopLevelEntries(nodeModulesDir) {
|
|
|
7703
7714
|
if (entry.name.startsWith("@")) {
|
|
7704
7715
|
let inner;
|
|
7705
7716
|
try {
|
|
7706
|
-
inner = fs.readdirSync(path$1.join(nodeModulesDir, entry.name), { withFileTypes: true });
|
|
7717
|
+
inner = fs$1.readdirSync(path$1.join(nodeModulesDir, entry.name), { withFileTypes: true });
|
|
7707
7718
|
} catch {
|
|
7708
7719
|
continue;
|
|
7709
7720
|
}
|
|
@@ -7736,14 +7747,14 @@ function collectAddonTreeState(addonDir) {
|
|
|
7736
7747
|
const entryDir = path$1.join(nodeModulesDir, name);
|
|
7737
7748
|
let isLink = false;
|
|
7738
7749
|
try {
|
|
7739
|
-
isLink = fs.lstatSync(entryDir).isSymbolicLink();
|
|
7750
|
+
isLink = fs$1.lstatSync(entryDir).isSymbolicLink();
|
|
7740
7751
|
} catch {
|
|
7741
7752
|
continue;
|
|
7742
7753
|
}
|
|
7743
7754
|
if (isLink) {
|
|
7744
7755
|
let target = "";
|
|
7745
7756
|
try {
|
|
7746
|
-
target = fs.readlinkSync(entryDir);
|
|
7757
|
+
target = fs$1.readlinkSync(entryDir);
|
|
7747
7758
|
} catch {}
|
|
7748
7759
|
existingLinks.push({
|
|
7749
7760
|
name,
|
|
@@ -7757,7 +7768,7 @@ function collectAddonTreeState(addonDir) {
|
|
|
7757
7768
|
version: manifest.version
|
|
7758
7769
|
});
|
|
7759
7770
|
for (const [depName, range] of manifest.ranges) {
|
|
7760
|
-
if (fs.existsSync(path$1.join(entryDir, "node_modules", depName))) continue;
|
|
7771
|
+
if (fs$1.existsSync(path$1.join(entryDir, "node_modules", depName))) continue;
|
|
7761
7772
|
addRange(depName, range);
|
|
7762
7773
|
}
|
|
7763
7774
|
}
|
|
@@ -7787,7 +7798,7 @@ function resolveClosureNodeModulesDir(explicitDir) {
|
|
|
7787
7798
|
const frameworkDir = explicitDir ?? process.env["CAMSTACK_FRAMEWORK_DIR"];
|
|
7788
7799
|
if (frameworkDir === void 0 || frameworkDir.length === 0) return null;
|
|
7789
7800
|
const nodeModulesDir = explicitDir ?? path$1.join(frameworkDir, "node_modules");
|
|
7790
|
-
return fs.existsSync(nodeModulesDir) ? nodeModulesDir : null;
|
|
7801
|
+
return fs$1.existsSync(nodeModulesDir) ? nodeModulesDir : null;
|
|
7791
7802
|
}
|
|
7792
7803
|
function symlinkType() {
|
|
7793
7804
|
return process.platform === "win32" ? "junction" : "dir";
|
|
@@ -7806,10 +7817,10 @@ function executeClosureDedupe(addonDir, closureNodeModulesDir, plan, logger) {
|
|
|
7806
7817
|
const nodeModulesDir = path$1.join(addonDir, "node_modules");
|
|
7807
7818
|
const probePath = path$1.join(nodeModulesDir, ".closure-link-probe");
|
|
7808
7819
|
try {
|
|
7809
|
-
fs.mkdirSync(nodeModulesDir, { recursive: true });
|
|
7810
|
-
fs.rmSync(probePath, { force: true });
|
|
7811
|
-
fs.symlinkSync(closureNodeModulesDir, probePath, symlinkType());
|
|
7812
|
-
fs.rmSync(probePath, { force: true });
|
|
7820
|
+
fs$1.mkdirSync(nodeModulesDir, { recursive: true });
|
|
7821
|
+
fs$1.rmSync(probePath, { force: true });
|
|
7822
|
+
fs$1.symlinkSync(closureNodeModulesDir, probePath, symlinkType());
|
|
7823
|
+
fs$1.rmSync(probePath, { force: true });
|
|
7813
7824
|
} catch (err) {
|
|
7814
7825
|
logger.warn("closure dedupe skipped — symlinks unavailable on this volume", { meta: {
|
|
7815
7826
|
addonDir,
|
|
@@ -7831,12 +7842,12 @@ function executeClosureDedupe(addonDir, closureNodeModulesDir, plan, logger) {
|
|
|
7831
7842
|
}
|
|
7832
7843
|
const entryDir = path$1.join(nodeModulesDir, link.name);
|
|
7833
7844
|
try {
|
|
7834
|
-
fs.rmSync(entryDir, {
|
|
7845
|
+
fs$1.rmSync(entryDir, {
|
|
7835
7846
|
recursive: true,
|
|
7836
7847
|
force: true
|
|
7837
7848
|
});
|
|
7838
|
-
fs.mkdirSync(path$1.dirname(entryDir), { recursive: true });
|
|
7839
|
-
fs.symlinkSync(target, entryDir, symlinkType());
|
|
7849
|
+
fs$1.mkdirSync(path$1.dirname(entryDir), { recursive: true });
|
|
7850
|
+
fs$1.symlinkSync(target, entryDir, symlinkType());
|
|
7840
7851
|
linked.push(link.name);
|
|
7841
7852
|
} catch (err) {
|
|
7842
7853
|
logger.warn("closure dedupe — link failed; entry removed copy may need reinstall", { meta: {
|
|
@@ -7912,7 +7923,7 @@ async function installManifestNativeDeps(addonDir, pkgRaw, logger, registry, npm
|
|
|
7912
7923
|
count: Object.keys(native).length
|
|
7913
7924
|
} });
|
|
7914
7925
|
try {
|
|
7915
|
-
fs.writeFileSync(markerFile, markerHash);
|
|
7926
|
+
fs$1.writeFileSync(markerFile, markerHash);
|
|
7916
7927
|
} catch (err) {
|
|
7917
7928
|
logger.warn("Failed to write native deps marker", { meta: {
|
|
7918
7929
|
markerFile,
|
|
@@ -7950,7 +7961,7 @@ async function installManifestNativeDeps(addonDir, pkgRaw, logger, registry, npm
|
|
|
7950
7961
|
}
|
|
7951
7962
|
await rebuildNativeDeps(addonDir, pending.map(([name]) => name), logger, npmCacheDir ?? defaultNpmCacheDir(), registry);
|
|
7952
7963
|
try {
|
|
7953
|
-
fs.writeFileSync(markerFile, markerHash);
|
|
7964
|
+
fs$1.writeFileSync(markerFile, markerHash);
|
|
7954
7965
|
} catch (err) {
|
|
7955
7966
|
logger.warn("Failed to write native deps marker", { meta: {
|
|
7956
7967
|
markerFile,
|
|
@@ -7972,12 +7983,12 @@ function copyPrebuiltNativeDep(name, addonDir, logger) {
|
|
|
7972
7983
|
if (source === target) continue;
|
|
7973
7984
|
if (!hasBuiltBinary(source)) continue;
|
|
7974
7985
|
try {
|
|
7975
|
-
fs.rmSync(target, {
|
|
7986
|
+
fs$1.rmSync(target, {
|
|
7976
7987
|
recursive: true,
|
|
7977
7988
|
force: true
|
|
7978
7989
|
});
|
|
7979
|
-
fs.mkdirSync(path$1.dirname(target), { recursive: true });
|
|
7980
|
-
fs.cpSync(source, target, {
|
|
7990
|
+
fs$1.mkdirSync(path$1.dirname(target), { recursive: true });
|
|
7991
|
+
fs$1.cpSync(source, target, {
|
|
7981
7992
|
recursive: true,
|
|
7982
7993
|
dereference: true
|
|
7983
7994
|
});
|
|
@@ -8013,7 +8024,7 @@ var BUNDLED_NATIVE_SIBLING_SCOPES = {
|
|
|
8013
8024
|
function hasAnyDotNode(dir, maxDepth) {
|
|
8014
8025
|
let entries;
|
|
8015
8026
|
try {
|
|
8016
|
-
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
8027
|
+
entries = fs$1.readdirSync(dir, { withFileTypes: true });
|
|
8017
8028
|
} catch {
|
|
8018
8029
|
return false;
|
|
8019
8030
|
}
|
|
@@ -8027,12 +8038,12 @@ function copyPrebuiltModuleDir(src, dst, label, logger) {
|
|
|
8027
8038
|
if (!hasAnyDotNode(src, 5)) return;
|
|
8028
8039
|
if (hasAnyDotNode(dst, 5)) return;
|
|
8029
8040
|
try {
|
|
8030
|
-
fs.rmSync(dst, {
|
|
8041
|
+
fs$1.rmSync(dst, {
|
|
8031
8042
|
recursive: true,
|
|
8032
8043
|
force: true
|
|
8033
8044
|
});
|
|
8034
|
-
fs.mkdirSync(path$1.dirname(dst), { recursive: true });
|
|
8035
|
-
fs.cpSync(src, dst, {
|
|
8045
|
+
fs$1.mkdirSync(path$1.dirname(dst), { recursive: true });
|
|
8046
|
+
fs$1.cpSync(src, dst, {
|
|
8036
8047
|
recursive: true,
|
|
8037
8048
|
dereference: true
|
|
8038
8049
|
});
|
|
@@ -8067,7 +8078,7 @@ function copyPrebuiltModuleDir(src, dst, label, logger) {
|
|
|
8067
8078
|
*/
|
|
8068
8079
|
function copyBundledNativeModules(sourceDir, targetDir, logger) {
|
|
8069
8080
|
const srcNm = path$1.join(sourceDir, "node_modules");
|
|
8070
|
-
if (!fs.existsSync(srcNm)) return;
|
|
8081
|
+
if (!fs$1.existsSync(srcNm)) return;
|
|
8071
8082
|
const dstNm = path$1.join(targetDir, "node_modules");
|
|
8072
8083
|
for (const [name, scopes] of Object.entries(BUNDLED_NATIVE_SIBLING_SCOPES)) {
|
|
8073
8084
|
copyPrebuiltModuleDir(path$1.join(srcNm, name), path$1.join(dstNm, name), name, logger);
|
|
@@ -8075,7 +8086,7 @@ function copyBundledNativeModules(sourceDir, targetDir, logger) {
|
|
|
8075
8086
|
const scopeSrc = path$1.join(srcNm, scope);
|
|
8076
8087
|
let siblings;
|
|
8077
8088
|
try {
|
|
8078
|
-
siblings = fs.readdirSync(scopeSrc);
|
|
8089
|
+
siblings = fs$1.readdirSync(scopeSrc);
|
|
8079
8090
|
} catch {
|
|
8080
8091
|
continue;
|
|
8081
8092
|
}
|
|
@@ -8085,12 +8096,12 @@ function copyBundledNativeModules(sourceDir, targetDir, logger) {
|
|
|
8085
8096
|
}
|
|
8086
8097
|
/** A package dir is "built" when it carries a compiled `.node` or a prebuilds tree. */
|
|
8087
8098
|
function hasBuiltBinary(pkgDir) {
|
|
8088
|
-
if (!fs.existsSync(path$1.join(pkgDir, "package.json"))) return false;
|
|
8099
|
+
if (!fs$1.existsSync(path$1.join(pkgDir, "package.json"))) return false;
|
|
8089
8100
|
const releaseDir = path$1.join(pkgDir, "build", "Release");
|
|
8090
8101
|
try {
|
|
8091
|
-
if (fs.existsSync(releaseDir) && fs.readdirSync(releaseDir).some((f) => f.endsWith(".node"))) return true;
|
|
8102
|
+
if (fs$1.existsSync(releaseDir) && fs$1.readdirSync(releaseDir).some((f) => f.endsWith(".node"))) return true;
|
|
8092
8103
|
} catch {}
|
|
8093
|
-
return fs.existsSync(path$1.join(pkgDir, "prebuilds"));
|
|
8104
|
+
return fs$1.existsSync(path$1.join(pkgDir, "prebuilds"));
|
|
8094
8105
|
}
|
|
8095
8106
|
/** Candidate hoisted locations for `<name>`: NODE_PATH entries + ancestors of `addonDir`. */
|
|
8096
8107
|
function candidateHoistedDirs(name, addonDir) {
|
|
@@ -8128,7 +8139,7 @@ function hashDeclaration(deps) {
|
|
|
8128
8139
|
}
|
|
8129
8140
|
function markerMatches(markerFile, expected) {
|
|
8130
8141
|
try {
|
|
8131
|
-
return fs.readFileSync(markerFile, "utf-8").trim() === expected;
|
|
8142
|
+
return fs$1.readFileSync(markerFile, "utf-8").trim() === expected;
|
|
8132
8143
|
} catch {
|
|
8133
8144
|
return false;
|
|
8134
8145
|
}
|
|
@@ -8235,7 +8246,7 @@ function parseInstallSource(value) {
|
|
|
8235
8246
|
function readPackageJson(pkgJsonPath) {
|
|
8236
8247
|
let raw;
|
|
8237
8248
|
try {
|
|
8238
|
-
raw = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8")));
|
|
8249
|
+
raw = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(pkgJsonPath, "utf-8")));
|
|
8239
8250
|
} catch {
|
|
8240
8251
|
return null;
|
|
8241
8252
|
}
|
|
@@ -8398,7 +8409,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8398
8409
|
} catch {
|
|
8399
8410
|
return Object.freeze([]);
|
|
8400
8411
|
}
|
|
8401
|
-
const raw = fs.readFileSync(pkgPath, "utf-8");
|
|
8412
|
+
const raw = fs$1.readFileSync(pkgPath, "utf-8");
|
|
8402
8413
|
const parsed = JSON.parse(raw);
|
|
8403
8414
|
const deps = Object.keys(parsed.dependencies ?? {});
|
|
8404
8415
|
const agentOnly = new Set(parsed.camstack?.agentOnlyBootstrapAddons ?? []);
|
|
@@ -8443,7 +8454,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8443
8454
|
} catch {
|
|
8444
8455
|
return Object.freeze([]);
|
|
8445
8456
|
}
|
|
8446
|
-
const raw = fs.readFileSync(pkgPath, "utf-8");
|
|
8457
|
+
const raw = fs$1.readFileSync(pkgPath, "utf-8");
|
|
8447
8458
|
const addons = JSON.parse(raw).camstack?.agentBootstrapAddons ?? [];
|
|
8448
8459
|
return Object.freeze(["@camstack/system", ...addons]);
|
|
8449
8460
|
}
|
|
@@ -8474,7 +8485,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8474
8485
|
}
|
|
8475
8486
|
for (const packageName of pkgList) {
|
|
8476
8487
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
8477
|
-
if (fs.existsSync(path$1.join(addonDir, "package.json"))) {
|
|
8488
|
+
if (fs$1.existsSync(path$1.join(addonDir, "package.json"))) {
|
|
8478
8489
|
this.logger.debug(`${packageName} — already installed, skipping`);
|
|
8479
8490
|
continue;
|
|
8480
8491
|
}
|
|
@@ -8559,7 +8570,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8559
8570
|
const installedPackages = this.listInstalled();
|
|
8560
8571
|
for (const pkg of installedPackages) {
|
|
8561
8572
|
try {
|
|
8562
|
-
if (fs.lstatSync(pkg.dir).isSymbolicLink()) continue;
|
|
8573
|
+
if (fs$1.lstatSync(pkg.dir).isSymbolicLink()) continue;
|
|
8563
8574
|
} catch {
|
|
8564
8575
|
continue;
|
|
8565
8576
|
}
|
|
@@ -8599,7 +8610,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8599
8610
|
if (closureNodeModules !== null) for (const link of state.existingLinks) {
|
|
8600
8611
|
if (!isClosureLinkTarget(link.target, closureNodeModules)) continue;
|
|
8601
8612
|
const linkDir = path$1.join(nodeModulesDir, link.name);
|
|
8602
|
-
const targetManifest = fs.existsSync(path$1.join(linkDir, "package.json"));
|
|
8613
|
+
const targetManifest = fs$1.existsSync(path$1.join(linkDir, "package.json"));
|
|
8603
8614
|
const ranges = state.requirements.get(link.name) ?? [];
|
|
8604
8615
|
let holds = targetManifest;
|
|
8605
8616
|
if (holds && ranges.length > 0) {
|
|
@@ -8608,14 +8619,14 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8608
8619
|
}
|
|
8609
8620
|
if (!holds) {
|
|
8610
8621
|
this.logger.warn(`${packageName} — closure link for ${link.name} no longer holds; reinstalling this addon's deps`, { meta: { target: link.target } });
|
|
8611
|
-
fs.rmSync(linkDir, { force: true });
|
|
8622
|
+
fs$1.rmSync(linkDir, { force: true });
|
|
8612
8623
|
needsInstall = true;
|
|
8613
8624
|
}
|
|
8614
8625
|
}
|
|
8615
8626
|
const linked = [];
|
|
8616
8627
|
for (const [depName, range] of declaredEntries) {
|
|
8617
8628
|
if (typeof range !== "string") continue;
|
|
8618
|
-
if (fs.existsSync(path$1.join(nodeModulesDir, depName, "package.json"))) continue;
|
|
8629
|
+
if (fs$1.existsSync(path$1.join(nodeModulesDir, depName, "package.json"))) continue;
|
|
8619
8630
|
const closureVersion = closureNodeModules === null ? void 0 : readClosureVersions(closureNodeModules, [depName]).get(depName);
|
|
8620
8631
|
if (closureNodeModules !== null && closureVersion !== void 0 && closureSatisfiesRange(range, closureVersion)) {
|
|
8621
8632
|
if (executeClosureDedupe(addonDir, closureNodeModules, {
|
|
@@ -8648,7 +8659,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8648
8659
|
const closureNodeModules = resolveClosureNodeModulesDir(this.closureNodeModulesDir);
|
|
8649
8660
|
if (closureNodeModules !== null) {
|
|
8650
8661
|
const state = collectAddonTreeState(addonDir);
|
|
8651
|
-
for (const link of state.existingLinks) if (isClosureLinkTarget(link.target, closureNodeModules)) fs.rmSync(path$1.join(addonDir, "node_modules", link.name), { force: true });
|
|
8662
|
+
for (const link of state.existingLinks) if (isClosureLinkTarget(link.target, closureNodeModules)) fs$1.rmSync(path$1.join(addonDir, "node_modules", link.name), { force: true });
|
|
8652
8663
|
}
|
|
8653
8664
|
this.logger.info(`${packageName} — reinstalling runtime dependencies`, { meta: { addonDir } });
|
|
8654
8665
|
await runNpm([
|
|
@@ -8707,7 +8718,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8707
8718
|
async realignFromClosure(packageName, closureDir) {
|
|
8708
8719
|
const targetDir = path$1.join(this.addonsDir, packageName);
|
|
8709
8720
|
const result = await this.installLocal(packageName, closureDir);
|
|
8710
|
-
await fs.promises.writeFile(path$1.join(targetDir, ".install-source"), "closure");
|
|
8721
|
+
await fs$1.promises.writeFile(path$1.join(targetDir, ".install-source"), "closure");
|
|
8711
8722
|
this.manifest.upsert(result.name, {
|
|
8712
8723
|
version: result.version,
|
|
8713
8724
|
source: "closure"
|
|
@@ -8742,12 +8753,12 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8742
8753
|
*/
|
|
8743
8754
|
async installSymlink(packageName, sourceDir, pkgData, targetDir) {
|
|
8744
8755
|
await this.ensureBuilt(packageName, sourceDir, pkgData);
|
|
8745
|
-
fs.rmSync(targetDir, {
|
|
8756
|
+
fs$1.rmSync(targetDir, {
|
|
8746
8757
|
recursive: true,
|
|
8747
8758
|
force: true
|
|
8748
8759
|
});
|
|
8749
8760
|
ensureDir(path$1.dirname(targetDir));
|
|
8750
|
-
fs.symlinkSync(sourceDir, targetDir, "dir");
|
|
8761
|
+
fs$1.symlinkSync(sourceDir, targetDir, "dir");
|
|
8751
8762
|
this.manifest.upsert(packageName, {
|
|
8752
8763
|
version: asString$1(pkgData.version, "0.0.0"),
|
|
8753
8764
|
source: "local"
|
|
@@ -8761,17 +8772,17 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8761
8772
|
async installCopy(packageName, sourceDir, pkgData, targetDir) {
|
|
8762
8773
|
await this.ensureBuilt(packageName, sourceDir, pkgData);
|
|
8763
8774
|
const distDir = path$1.join(sourceDir, "dist");
|
|
8764
|
-
if (!fs.existsSync(distDir)) throw new Error(`${packageName} has no dist/ after build`);
|
|
8765
|
-
await fs.promises.rm(targetDir, {
|
|
8775
|
+
if (!fs$1.existsSync(distDir)) throw new Error(`${packageName} has no dist/ after build`);
|
|
8776
|
+
await fs$1.promises.rm(targetDir, {
|
|
8766
8777
|
recursive: true,
|
|
8767
8778
|
force: true
|
|
8768
8779
|
});
|
|
8769
8780
|
ensureDir(targetDir);
|
|
8770
|
-
await fs.promises.writeFile(path$1.join(targetDir, "package.json"), JSON.stringify(stripBundledDeps(pkgData), null, 2));
|
|
8781
|
+
await fs$1.promises.writeFile(path$1.join(targetDir, "package.json"), JSON.stringify(stripBundledDeps(pkgData), null, 2));
|
|
8771
8782
|
await copyDirRecursive(distDir, path$1.join(targetDir, "dist"));
|
|
8772
8783
|
await copyExtraFileDirs(pkgData, sourceDir, targetDir);
|
|
8773
8784
|
copyBundledNativeModules(sourceDir, targetDir, this.logger);
|
|
8774
|
-
await fs.promises.writeFile(path$1.join(targetDir, ".install-source"), "local");
|
|
8785
|
+
await fs$1.promises.writeFile(path$1.join(targetDir, ".install-source"), "local");
|
|
8775
8786
|
const localPkgVersion = asString$1(pkgData.version, "0.0.0");
|
|
8776
8787
|
this.manifest.upsert(packageName, {
|
|
8777
8788
|
version: localPkgVersion,
|
|
@@ -8812,7 +8823,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8812
8823
|
* unusual auth, offline mode, etc).
|
|
8813
8824
|
*/
|
|
8814
8825
|
async installFromNpm(packageName, version) {
|
|
8815
|
-
const tmpDir = fs.mkdtempSync(path$1.join(os$1.tmpdir(), "camstack-addon-npm-"));
|
|
8826
|
+
const tmpDir = fs$1.mkdtempSync(path$1.join(os$1.tmpdir(), "camstack-addon-npm-"));
|
|
8816
8827
|
const packageSpec = version ? `${packageName}@${version}` : packageName;
|
|
8817
8828
|
this.logger.info(`${packageName} — installing from npm`);
|
|
8818
8829
|
try {
|
|
@@ -8826,19 +8837,19 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8826
8837
|
];
|
|
8827
8838
|
if (this.registry) args.push("--registry", this.registry);
|
|
8828
8839
|
const { stdout } = await runNpm(args, this.npmRunOptions(tmpDir, 12e4));
|
|
8829
|
-
const tgzFiles = fs.readdirSync(tmpDir).filter((f) => f.endsWith(".tgz"));
|
|
8840
|
+
const tgzFiles = fs$1.readdirSync(tmpDir).filter((f) => f.endsWith(".tgz"));
|
|
8830
8841
|
if (tgzFiles.length === 0) throw new Error(`npm pack produced no tgz. stdout: ${stdout.trim()}`);
|
|
8831
8842
|
return path$1.join(tmpDir, tgzFiles[0]);
|
|
8832
8843
|
});
|
|
8833
8844
|
const result = await this.installFromTgz(tgzPath);
|
|
8834
|
-
fs.writeFileSync(path$1.join(this.addonsDir, result.name, ".install-source"), "npm");
|
|
8845
|
+
fs$1.writeFileSync(path$1.join(this.addonsDir, result.name, ".install-source"), "npm");
|
|
8835
8846
|
this.manifest.upsert(result.name, {
|
|
8836
8847
|
version: result.version,
|
|
8837
8848
|
source: "npm"
|
|
8838
8849
|
});
|
|
8839
8850
|
return result;
|
|
8840
8851
|
} finally {
|
|
8841
|
-
fs.rmSync(tmpDir, {
|
|
8852
|
+
fs$1.rmSync(tmpDir, {
|
|
8842
8853
|
recursive: true,
|
|
8843
8854
|
force: true
|
|
8844
8855
|
});
|
|
@@ -8876,7 +8887,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8876
8887
|
if (!tarRes.ok) throw new Error(`tarball GET ${tarballUrl} → ${tarRes.status}`);
|
|
8877
8888
|
const tgzPath = path$1.join(tmpDir, `${packageName.replace(/[/@]/g, "-").replace(/^-+/, "")}-${resolvedVersion}.tgz`);
|
|
8878
8889
|
const buf = Buffer.from(await tarRes.arrayBuffer());
|
|
8879
|
-
fs.writeFileSync(tgzPath, buf);
|
|
8890
|
+
fs$1.writeFileSync(tgzPath, buf);
|
|
8880
8891
|
return tgzPath;
|
|
8881
8892
|
}
|
|
8882
8893
|
/**
|
|
@@ -8897,7 +8908,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8897
8908
|
* on the next deploy.
|
|
8898
8909
|
*/
|
|
8899
8910
|
async evictInstallDir(targetDir) {
|
|
8900
|
-
if (!fs.existsSync(targetDir)) return;
|
|
8911
|
+
if (!fs$1.existsSync(targetDir)) return;
|
|
8901
8912
|
const graveyard = path$1.join(this.addonsDir, ".evicting");
|
|
8902
8913
|
ensureDir(graveyard);
|
|
8903
8914
|
await this.sweepGraveyard(graveyard);
|
|
@@ -8905,10 +8916,10 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8905
8916
|
const flatName = path$1.relative(this.addonsDir, targetDir).replace(/[/\\]/g, "-");
|
|
8906
8917
|
const asideDir = path$1.join(graveyard, `${flatName}-${ts}`);
|
|
8907
8918
|
try {
|
|
8908
|
-
fs.renameSync(targetDir, asideDir);
|
|
8919
|
+
fs$1.renameSync(targetDir, asideDir);
|
|
8909
8920
|
} catch (renameErr) {
|
|
8910
8921
|
if (renameErr.code === "EXDEV") {
|
|
8911
|
-
await fs.promises.rm(targetDir, {
|
|
8922
|
+
await fs$1.promises.rm(targetDir, {
|
|
8912
8923
|
recursive: true,
|
|
8913
8924
|
force: true
|
|
8914
8925
|
});
|
|
@@ -8916,7 +8927,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8916
8927
|
}
|
|
8917
8928
|
throw renameErr;
|
|
8918
8929
|
}
|
|
8919
|
-
await fs.promises.rm(asideDir, {
|
|
8930
|
+
await fs$1.promises.rm(asideDir, {
|
|
8920
8931
|
recursive: true,
|
|
8921
8932
|
force: true
|
|
8922
8933
|
}).catch((cleanupErr) => {
|
|
@@ -8937,14 +8948,14 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8937
8948
|
async sweepStagingResidue(stagingRoot) {
|
|
8938
8949
|
let names;
|
|
8939
8950
|
try {
|
|
8940
|
-
names = fs.readdirSync(stagingRoot);
|
|
8951
|
+
names = fs$1.readdirSync(stagingRoot);
|
|
8941
8952
|
} catch {
|
|
8942
8953
|
return;
|
|
8943
8954
|
}
|
|
8944
8955
|
const now = Date.now();
|
|
8945
8956
|
const ages = [];
|
|
8946
8957
|
for (const name of names) try {
|
|
8947
|
-
const stat = fs.statSync(path$1.join(stagingRoot, name));
|
|
8958
|
+
const stat = fs$1.statSync(path$1.join(stagingRoot, name));
|
|
8948
8959
|
ages.push({
|
|
8949
8960
|
name,
|
|
8950
8961
|
ageMs: now - stat.mtimeMs
|
|
@@ -8955,7 +8966,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8955
8966
|
stagingRoot,
|
|
8956
8967
|
entries: sweepable
|
|
8957
8968
|
} });
|
|
8958
|
-
await Promise.all(sweepable.map((name) => fs.promises.rm(path$1.join(stagingRoot, name), {
|
|
8969
|
+
await Promise.all(sweepable.map((name) => fs$1.promises.rm(path$1.join(stagingRoot, name), {
|
|
8959
8970
|
recursive: true,
|
|
8960
8971
|
force: true
|
|
8961
8972
|
}).catch(() => void 0)));
|
|
@@ -8964,11 +8975,11 @@ var AddonInstaller = class AddonInstaller {
|
|
|
8964
8975
|
async sweepGraveyard(graveyard) {
|
|
8965
8976
|
let entries;
|
|
8966
8977
|
try {
|
|
8967
|
-
entries = fs.readdirSync(graveyard);
|
|
8978
|
+
entries = fs$1.readdirSync(graveyard);
|
|
8968
8979
|
} catch {
|
|
8969
8980
|
return;
|
|
8970
8981
|
}
|
|
8971
|
-
await Promise.all(entries.map((name) => fs.promises.rm(path$1.join(graveyard, name), {
|
|
8982
|
+
await Promise.all(entries.map((name) => fs$1.promises.rm(path$1.join(graveyard, name), {
|
|
8972
8983
|
recursive: true,
|
|
8973
8984
|
force: true
|
|
8974
8985
|
}).catch(() => void 0)));
|
|
@@ -9019,7 +9030,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9019
9030
|
return;
|
|
9020
9031
|
}
|
|
9021
9032
|
const strippedManifest = stripBundledDeps(pkgView.raw);
|
|
9022
|
-
await fs.promises.writeFile(pkgJsonPath, JSON.stringify(strippedManifest, null, 2));
|
|
9033
|
+
await fs$1.promises.writeFile(pkgJsonPath, JSON.stringify(strippedManifest, null, 2));
|
|
9023
9034
|
const deps = asJsonObject$1(strippedManifest["dependencies"]);
|
|
9024
9035
|
const depNames = deps ? Object.keys(deps) : [];
|
|
9025
9036
|
if (depNames.length === 0) return;
|
|
@@ -9151,9 +9162,9 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9151
9162
|
"-C",
|
|
9152
9163
|
stagingDir
|
|
9153
9164
|
], { timeout: 12e4 });
|
|
9154
|
-
const pkgDir = fs.existsSync(path$1.join(stagingDir, "package", "package.json")) ? path$1.join(stagingDir, "package") : stagingDir;
|
|
9165
|
+
const pkgDir = fs$1.existsSync(path$1.join(stagingDir, "package", "package.json")) ? path$1.join(stagingDir, "package") : stagingDir;
|
|
9155
9166
|
const pkgJsonPath = path$1.join(pkgDir, "package.json");
|
|
9156
|
-
if (!fs.existsSync(pkgJsonPath)) throw new Error("No package.json found in tgz archive");
|
|
9167
|
+
if (!fs$1.existsSync(pkgJsonPath)) throw new Error("No package.json found in tgz archive");
|
|
9157
9168
|
const pkgView = readPackageJson(pkgJsonPath);
|
|
9158
9169
|
if (!pkgView) throw new Error(`Invalid package.json at ${pkgJsonPath}`);
|
|
9159
9170
|
if (!pkgView.camstackAddons) throw new Error(`Package ${pkgView.name} has no camstack.addons manifest`);
|
|
@@ -9163,7 +9174,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9163
9174
|
this.dedupeTreeAgainstClosure(pkgDir, pkgView.name);
|
|
9164
9175
|
await this.evictInstallDir(targetDir);
|
|
9165
9176
|
ensureDir(path$1.dirname(targetDir));
|
|
9166
|
-
await fs.promises.rename(pkgDir, targetDir);
|
|
9177
|
+
await fs$1.promises.rename(pkgDir, targetDir);
|
|
9167
9178
|
this.manifest.upsert(pkgView.name, {
|
|
9168
9179
|
version: pkgView.version,
|
|
9169
9180
|
source: "bundled"
|
|
@@ -9174,7 +9185,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9174
9185
|
};
|
|
9175
9186
|
} finally {
|
|
9176
9187
|
this.inFlightStaging.delete(stagingName);
|
|
9177
|
-
await fs.promises.rm(stagingDir, {
|
|
9188
|
+
await fs$1.promises.rm(stagingDir, {
|
|
9178
9189
|
recursive: true,
|
|
9179
9190
|
force: true
|
|
9180
9191
|
}).catch(() => void 0);
|
|
@@ -9204,13 +9215,13 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9204
9215
|
const current = this.manifest.get(packageName);
|
|
9205
9216
|
if (current == null) throw new Error(`Cannot update ${packageName}: not currently tracked in manifest`);
|
|
9206
9217
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
9207
|
-
if (!fs.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
|
|
9218
|
+
if (!fs$1.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
|
|
9208
9219
|
const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
9209
9220
|
const backupRoot = path$1.join(this.addonsDir, ".backups", packageName);
|
|
9210
9221
|
ensureDir(backupRoot);
|
|
9211
9222
|
const backupDir = path$1.join(backupRoot, ts);
|
|
9212
9223
|
this.logger.info(`${packageName} — backing up v${current.version} → ${backupDir}`);
|
|
9213
|
-
fs.renameSync(addonDir, backupDir);
|
|
9224
|
+
fs$1.renameSync(addonDir, backupDir);
|
|
9214
9225
|
let result;
|
|
9215
9226
|
try {
|
|
9216
9227
|
if (this.installSource === "local" || this.installSource === "symlink") {
|
|
@@ -9225,11 +9236,11 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9225
9236
|
} catch (installErr) {
|
|
9226
9237
|
this.logger.error(`${packageName} — install failed, restoring backup`, { meta: { error: errMsg$1(installErr) } });
|
|
9227
9238
|
try {
|
|
9228
|
-
if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
|
|
9239
|
+
if (fs$1.existsSync(addonDir)) fs$1.rmSync(addonDir, {
|
|
9229
9240
|
recursive: true,
|
|
9230
9241
|
force: true
|
|
9231
9242
|
});
|
|
9232
|
-
fs.renameSync(backupDir, addonDir);
|
|
9243
|
+
fs$1.renameSync(backupDir, addonDir);
|
|
9233
9244
|
this.manifest.upsert(packageName, {
|
|
9234
9245
|
version: current.version,
|
|
9235
9246
|
source: current.source,
|
|
@@ -9290,7 +9301,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9290
9301
|
const current = this.manifest.get(packageName);
|
|
9291
9302
|
if (current == null) throw new Error(`Cannot update ${packageName}: not currently tracked in manifest`);
|
|
9292
9303
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
9293
|
-
if (!fs.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
|
|
9304
|
+
if (!fs$1.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
|
|
9294
9305
|
await this.installRuntimeDependencies(stagedPath, packageName);
|
|
9295
9306
|
await this.installNativeDependencies(stagedPath, packageName);
|
|
9296
9307
|
this.dedupeTreeAgainstClosure(stagedPath, packageName);
|
|
@@ -9299,14 +9310,14 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9299
9310
|
ensureDir(backupRoot);
|
|
9300
9311
|
const backupDir = path$1.join(backupRoot, ts);
|
|
9301
9312
|
this.logger.info(`${packageName} — backing up v${current.version} → ${backupDir}`);
|
|
9302
|
-
fs.renameSync(addonDir, backupDir);
|
|
9313
|
+
fs$1.renameSync(addonDir, backupDir);
|
|
9303
9314
|
try {
|
|
9304
9315
|
try {
|
|
9305
|
-
fs.renameSync(stagedPath, addonDir);
|
|
9316
|
+
fs$1.renameSync(stagedPath, addonDir);
|
|
9306
9317
|
} catch (renameErr) {
|
|
9307
9318
|
if (renameErr.code === "EXDEV") {
|
|
9308
|
-
fs.cpSync(stagedPath, addonDir, { recursive: true });
|
|
9309
|
-
fs.rmSync(stagedPath, {
|
|
9319
|
+
fs$1.cpSync(stagedPath, addonDir, { recursive: true });
|
|
9320
|
+
fs$1.rmSync(stagedPath, {
|
|
9310
9321
|
recursive: true,
|
|
9311
9322
|
force: true
|
|
9312
9323
|
});
|
|
@@ -9315,11 +9326,11 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9315
9326
|
} catch (swapErr) {
|
|
9316
9327
|
this.logger.error(`${packageName} — staged swap failed, restoring backup`, { meta: { error: errMsg$1(swapErr) } });
|
|
9317
9328
|
try {
|
|
9318
|
-
if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
|
|
9329
|
+
if (fs$1.existsSync(addonDir)) fs$1.rmSync(addonDir, {
|
|
9319
9330
|
recursive: true,
|
|
9320
9331
|
force: true
|
|
9321
9332
|
});
|
|
9322
|
-
fs.renameSync(backupDir, addonDir);
|
|
9333
|
+
fs$1.renameSync(backupDir, addonDir);
|
|
9323
9334
|
this.manifest.upsert(packageName, {
|
|
9324
9335
|
version: current.version,
|
|
9325
9336
|
source: current.source,
|
|
@@ -9358,20 +9369,20 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9358
9369
|
this.logger.warn(`${packageName} — no backup to rollback to`);
|
|
9359
9370
|
return null;
|
|
9360
9371
|
}
|
|
9361
|
-
if (!fs.existsSync(entry.lastBackupDir)) {
|
|
9372
|
+
if (!fs$1.existsSync(entry.lastBackupDir)) {
|
|
9362
9373
|
this.logger.warn(`${packageName} — backup dir vanished: ${entry.lastBackupDir}`);
|
|
9363
9374
|
return null;
|
|
9364
9375
|
}
|
|
9365
9376
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
9366
|
-
if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
|
|
9377
|
+
if (fs$1.existsSync(addonDir)) fs$1.rmSync(addonDir, {
|
|
9367
9378
|
recursive: true,
|
|
9368
9379
|
force: true
|
|
9369
9380
|
});
|
|
9370
|
-
fs.renameSync(entry.lastBackupDir, addonDir);
|
|
9381
|
+
fs$1.renameSync(entry.lastBackupDir, addonDir);
|
|
9371
9382
|
const pkgJsonPath = path$1.join(addonDir, "package.json");
|
|
9372
9383
|
let restoredVersion = entry.version;
|
|
9373
|
-
if (fs.existsSync(pkgJsonPath)) try {
|
|
9374
|
-
const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
|
|
9384
|
+
if (fs$1.existsSync(pkgJsonPath)) try {
|
|
9385
|
+
const parsed = JSON.parse(fs$1.readFileSync(pkgJsonPath, "utf-8"));
|
|
9375
9386
|
if (typeof parsed === "object" && parsed != null) {
|
|
9376
9387
|
const v = parsed.version;
|
|
9377
9388
|
if (typeof v === "string" && v.length > 0) restoredVersion = v;
|
|
@@ -9419,7 +9430,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9419
9430
|
return false;
|
|
9420
9431
|
}
|
|
9421
9432
|
try {
|
|
9422
|
-
await fs.promises.rm(target, {
|
|
9433
|
+
await fs$1.promises.rm(target, {
|
|
9423
9434
|
recursive: true,
|
|
9424
9435
|
force: true
|
|
9425
9436
|
});
|
|
@@ -9437,7 +9448,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9437
9448
|
listBackupsFor(packageName) {
|
|
9438
9449
|
const dir = path$1.join(this.backupsRoot, packageName);
|
|
9439
9450
|
try {
|
|
9440
|
-
return fs.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => path$1.join(dir, e.name)).sort();
|
|
9451
|
+
return fs$1.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => path$1.join(dir, e.name)).sort();
|
|
9441
9452
|
} catch {
|
|
9442
9453
|
return [];
|
|
9443
9454
|
}
|
|
@@ -9469,7 +9480,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9469
9480
|
for (const dir of [pkgDir, path$1.dirname(pkgDir)]) {
|
|
9470
9481
|
if (!this.isInsideBackups(dir)) continue;
|
|
9471
9482
|
try {
|
|
9472
|
-
await fs.promises.rmdir(dir);
|
|
9483
|
+
await fs$1.promises.rmdir(dir);
|
|
9473
9484
|
} catch {
|
|
9474
9485
|
return;
|
|
9475
9486
|
}
|
|
@@ -9551,7 +9562,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9551
9562
|
*/
|
|
9552
9563
|
resolveBackupToKeep(packageName, backups) {
|
|
9553
9564
|
const liveDir = path$1.join(this.addonsDir, packageName);
|
|
9554
|
-
if (!fs.existsSync(liveDir)) {
|
|
9565
|
+
if (!fs$1.existsSync(liveDir)) {
|
|
9555
9566
|
const newest = backups[backups.length - 1] ?? null;
|
|
9556
9567
|
if (newest != null) this.logger.warn(`${packageName} — live install dir missing; retaining its newest backup as the only surviving copy`, { meta: {
|
|
9557
9568
|
liveDir,
|
|
@@ -9568,7 +9579,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9568
9579
|
listBackedUpPackages() {
|
|
9569
9580
|
let entries;
|
|
9570
9581
|
try {
|
|
9571
|
-
entries = fs.readdirSync(this.backupsRoot, { withFileTypes: true });
|
|
9582
|
+
entries = fs$1.readdirSync(this.backupsRoot, { withFileTypes: true });
|
|
9572
9583
|
} catch {
|
|
9573
9584
|
return [];
|
|
9574
9585
|
}
|
|
@@ -9580,14 +9591,14 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9580
9591
|
continue;
|
|
9581
9592
|
}
|
|
9582
9593
|
const scopeDir = path$1.join(this.backupsRoot, entry.name);
|
|
9583
|
-
for (const inner of fs.readdirSync(scopeDir, { withFileTypes: true })) if (inner.isDirectory()) names.push(`${entry.name}/${inner.name}`);
|
|
9594
|
+
for (const inner of fs$1.readdirSync(scopeDir, { withFileTypes: true })) if (inner.isDirectory()) names.push(`${entry.name}/${inner.name}`);
|
|
9584
9595
|
}
|
|
9585
9596
|
return names;
|
|
9586
9597
|
}
|
|
9587
9598
|
async uninstall(packageName) {
|
|
9588
9599
|
const addonDir = path$1.join(this.addonsDir, packageName);
|
|
9589
|
-
if (fs.existsSync(addonDir)) {
|
|
9590
|
-
fs.rmSync(addonDir, {
|
|
9600
|
+
if (fs$1.existsSync(addonDir)) {
|
|
9601
|
+
fs$1.rmSync(addonDir, {
|
|
9591
9602
|
recursive: true,
|
|
9592
9603
|
force: true
|
|
9593
9604
|
});
|
|
@@ -9595,8 +9606,8 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9595
9606
|
return;
|
|
9596
9607
|
}
|
|
9597
9608
|
const legacyDir = path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""));
|
|
9598
|
-
if (fs.existsSync(legacyDir)) {
|
|
9599
|
-
fs.rmSync(legacyDir, {
|
|
9609
|
+
if (fs$1.existsSync(legacyDir)) {
|
|
9610
|
+
fs$1.rmSync(legacyDir, {
|
|
9600
9611
|
recursive: true,
|
|
9601
9612
|
force: true
|
|
9602
9613
|
});
|
|
@@ -9604,22 +9615,22 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9604
9615
|
}
|
|
9605
9616
|
}
|
|
9606
9617
|
listInstalled() {
|
|
9607
|
-
if (!fs.existsSync(this.addonsDir)) return [];
|
|
9618
|
+
if (!fs$1.existsSync(this.addonsDir)) return [];
|
|
9608
9619
|
const packageDirs = [];
|
|
9609
|
-
for (const entry of fs.readdirSync(this.addonsDir, { withFileTypes: true })) {
|
|
9620
|
+
for (const entry of fs$1.readdirSync(this.addonsDir, { withFileTypes: true })) {
|
|
9610
9621
|
if (!isDirEntry(entry, this.addonsDir)) continue;
|
|
9611
9622
|
if (entry.name.startsWith("@")) {
|
|
9612
9623
|
const scopeDir = path$1.join(this.addonsDir, entry.name);
|
|
9613
|
-
for (const inner of fs.readdirSync(scopeDir, { withFileTypes: true })) if (isDirEntry(inner, scopeDir)) packageDirs.push(path$1.join(scopeDir, inner.name));
|
|
9624
|
+
for (const inner of fs$1.readdirSync(scopeDir, { withFileTypes: true })) if (isDirEntry(inner, scopeDir)) packageDirs.push(path$1.join(scopeDir, inner.name));
|
|
9614
9625
|
} else packageDirs.push(path$1.join(this.addonsDir, entry.name));
|
|
9615
9626
|
}
|
|
9616
9627
|
return packageDirs.map((dir) => {
|
|
9617
9628
|
const pkgPath = path$1.join(dir, "package.json");
|
|
9618
|
-
if (!fs.existsSync(pkgPath)) return null;
|
|
9629
|
+
if (!fs$1.existsSync(pkgPath)) return null;
|
|
9619
9630
|
const pkg = readPackageJson(pkgPath);
|
|
9620
9631
|
if (!pkg || !pkg.camstackAddons) return null;
|
|
9621
9632
|
const sourceFile = path$1.join(dir, ".install-source");
|
|
9622
|
-
const installSource = fs.existsSync(sourceFile) ? parseInstallSource(fs.readFileSync(sourceFile, "utf-8").trim()) : void 0;
|
|
9633
|
+
const installSource = fs$1.existsSync(sourceFile) ? parseInstallSource(fs$1.readFileSync(sourceFile, "utf-8").trim()) : void 0;
|
|
9623
9634
|
return {
|
|
9624
9635
|
name: pkg.name,
|
|
9625
9636
|
version: pkg.version,
|
|
@@ -9629,13 +9640,13 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9629
9640
|
}).filter((item) => item !== null);
|
|
9630
9641
|
}
|
|
9631
9642
|
isInstalled(packageName) {
|
|
9632
|
-
if (fs.existsSync(path$1.join(this.addonsDir, packageName, "package.json"))) return true;
|
|
9633
|
-
return fs.existsSync(path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json"));
|
|
9643
|
+
if (fs$1.existsSync(path$1.join(this.addonsDir, packageName, "package.json"))) return true;
|
|
9644
|
+
return fs$1.existsSync(path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json"));
|
|
9634
9645
|
}
|
|
9635
9646
|
getInstalledPackage(packageName) {
|
|
9636
9647
|
let pkgPath = path$1.join(this.addonsDir, packageName, "package.json");
|
|
9637
|
-
if (!fs.existsSync(pkgPath)) pkgPath = path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json");
|
|
9638
|
-
if (!fs.existsSync(pkgPath)) return null;
|
|
9648
|
+
if (!fs$1.existsSync(pkgPath)) pkgPath = path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json");
|
|
9649
|
+
if (!fs$1.existsSync(pkgPath)) return null;
|
|
9639
9650
|
const pkg = readPackageJson(pkgPath);
|
|
9640
9651
|
if (!pkg) return null;
|
|
9641
9652
|
return {
|
|
@@ -9654,7 +9665,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9654
9665
|
]) {
|
|
9655
9666
|
const candidate = path$1.join(this.workspaceDir, dirName);
|
|
9656
9667
|
try {
|
|
9657
|
-
const pkg = asJsonObject$1(parseJsonUnknown(fs.readFileSync(path$1.join(candidate, "package.json"), "utf-8")));
|
|
9668
|
+
const pkg = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(path$1.join(candidate, "package.json"), "utf-8")));
|
|
9658
9669
|
if (pkg && asString$1(pkg["name"]) === packageName) return candidate;
|
|
9659
9670
|
} catch {}
|
|
9660
9671
|
}
|
|
@@ -9663,7 +9674,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9663
9674
|
/** Ensure a package is built (dist/ exists and page bundles present) */
|
|
9664
9675
|
async ensureBuilt(packageName, sourceDir, pkgData) {
|
|
9665
9676
|
const distDir = path$1.join(sourceDir, "dist");
|
|
9666
|
-
if (!(!fs.existsSync(distDir) || this.isDistIncomplete(pkgData, sourceDir))) return;
|
|
9677
|
+
if (!(!fs$1.existsSync(distDir) || this.isDistIncomplete(pkgData, sourceDir))) return;
|
|
9667
9678
|
this.logger.info(`${packageName} — building (dist/ missing or incomplete)`);
|
|
9668
9679
|
try {
|
|
9669
9680
|
await runNpm(["run", "build"], this.npmRunOptions(sourceDir, 18e4));
|
|
@@ -9678,7 +9689,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9678
9689
|
if (!camstack?.addons) return false;
|
|
9679
9690
|
for (const addon of camstack.addons) {
|
|
9680
9691
|
if (!addon.pages) continue;
|
|
9681
|
-
for (const page of addon.pages) if (page.bundle && !fs.existsSync(path$1.join(sourceDir, "dist", page.bundle))) return true;
|
|
9692
|
+
for (const page of addon.pages) if (page.bundle && !fs$1.existsSync(path$1.join(sourceDir, "dist", page.bundle))) return true;
|
|
9682
9693
|
}
|
|
9683
9694
|
return false;
|
|
9684
9695
|
}
|
|
@@ -9687,7 +9698,7 @@ var AddonInstaller = class AddonInstaller {
|
|
|
9687
9698
|
function isDirEntry(entry, parentDir) {
|
|
9688
9699
|
if (entry.isDirectory()) return true;
|
|
9689
9700
|
if (entry.isSymbolicLink()) try {
|
|
9690
|
-
return fs.statSync(path$1.join(parentDir, entry.name)).isDirectory();
|
|
9701
|
+
return fs$1.statSync(path$1.join(parentDir, entry.name)).isDirectory();
|
|
9691
9702
|
} catch {
|
|
9692
9703
|
return false;
|
|
9693
9704
|
}
|
|
@@ -9786,7 +9797,7 @@ function selectAddonResidue(candidates) {
|
|
|
9786
9797
|
}
|
|
9787
9798
|
function readDeclaredName(dir) {
|
|
9788
9799
|
try {
|
|
9789
|
-
const parsed = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
9800
|
+
const parsed = JSON.parse(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
9790
9801
|
if (typeof parsed !== "object" || parsed === null) return null;
|
|
9791
9802
|
const name = parsed.name;
|
|
9792
9803
|
return typeof name === "string" ? name : null;
|
|
@@ -9796,7 +9807,7 @@ function readDeclaredName(dir) {
|
|
|
9796
9807
|
}
|
|
9797
9808
|
function readDeclaredVersion(dir) {
|
|
9798
9809
|
try {
|
|
9799
|
-
const parsed = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
9810
|
+
const parsed = JSON.parse(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
9800
9811
|
if (typeof parsed !== "object" || parsed === null) return null;
|
|
9801
9812
|
const version = parsed.version;
|
|
9802
9813
|
return typeof version === "string" ? version : null;
|
|
@@ -9806,7 +9817,7 @@ function readDeclaredVersion(dir) {
|
|
|
9806
9817
|
}
|
|
9807
9818
|
function isDirLike(p) {
|
|
9808
9819
|
try {
|
|
9809
|
-
return fs.statSync(p).isDirectory();
|
|
9820
|
+
return fs$1.statSync(p).isDirectory();
|
|
9810
9821
|
} catch {
|
|
9811
9822
|
return false;
|
|
9812
9823
|
}
|
|
@@ -9816,7 +9827,7 @@ function freeQuarantineTarget(store, scope, dirName) {
|
|
|
9816
9827
|
const base = scope === null ? dirName : `${scope.replace("@", "")}__${dirName}`;
|
|
9817
9828
|
let candidate = path$1.join(store, base);
|
|
9818
9829
|
let n = 1;
|
|
9819
|
-
while (fs.existsSync(candidate)) {
|
|
9830
|
+
while (fs$1.existsSync(candidate)) {
|
|
9820
9831
|
candidate = path$1.join(store, `${base}-${n}`);
|
|
9821
9832
|
n += 1;
|
|
9822
9833
|
}
|
|
@@ -9833,7 +9844,7 @@ function freeQuarantineTarget(store, scope, dirName) {
|
|
|
9833
9844
|
function quarantineAddonResidue(addonsDir, log) {
|
|
9834
9845
|
const quarantined = [];
|
|
9835
9846
|
const failed = [];
|
|
9836
|
-
if (!fs.existsSync(addonsDir)) return {
|
|
9847
|
+
if (!fs$1.existsSync(addonsDir)) return {
|
|
9837
9848
|
quarantined,
|
|
9838
9849
|
failed
|
|
9839
9850
|
};
|
|
@@ -9841,7 +9852,7 @@ function quarantineAddonResidue(addonsDir, log) {
|
|
|
9841
9852
|
const scan = (parent, scope) => {
|
|
9842
9853
|
let names;
|
|
9843
9854
|
try {
|
|
9844
|
-
names = fs.readdirSync(parent);
|
|
9855
|
+
names = fs$1.readdirSync(parent);
|
|
9845
9856
|
} catch {
|
|
9846
9857
|
return;
|
|
9847
9858
|
}
|
|
@@ -9860,8 +9871,8 @@ function quarantineAddonResidue(addonsDir, log) {
|
|
|
9860
9871
|
const version = readDeclaredVersion(full);
|
|
9861
9872
|
const to = freeQuarantineTarget(store, scope, dirName);
|
|
9862
9873
|
try {
|
|
9863
|
-
fs.mkdirSync(store, { recursive: true });
|
|
9864
|
-
fs.renameSync(full, to);
|
|
9874
|
+
fs$1.mkdirSync(store, { recursive: true });
|
|
9875
|
+
fs$1.renameSync(full, to);
|
|
9865
9876
|
} catch (err) {
|
|
9866
9877
|
const error = err instanceof Error ? err.message : String(err);
|
|
9867
9878
|
failed.push({
|
|
@@ -9902,8 +9913,8 @@ function detectWorkspacePackagesDir(startDir) {
|
|
|
9902
9913
|
current = path$1.dirname(current);
|
|
9903
9914
|
const packagesDir = path$1.join(current, "packages");
|
|
9904
9915
|
const rootPkgJson = path$1.join(current, "package.json");
|
|
9905
|
-
if (fs.existsSync(packagesDir) && fs.existsSync(rootPkgJson)) try {
|
|
9906
|
-
const rootPkg = JSON.parse(fs.readFileSync(rootPkgJson, "utf-8"));
|
|
9916
|
+
if (fs$1.existsSync(packagesDir) && fs$1.existsSync(rootPkgJson)) try {
|
|
9917
|
+
const rootPkg = JSON.parse(fs$1.readFileSync(rootPkgJson, "utf-8"));
|
|
9907
9918
|
if (rootPkg.workspaces || rootPkg.name === "camstack-server" || rootPkg.name === "camstack") return packagesDir;
|
|
9908
9919
|
} catch {}
|
|
9909
9920
|
}
|
|
@@ -9942,11 +9953,11 @@ function getRestartMarkerPath(dataDir) {
|
|
|
9942
9953
|
* intact or no marker at all (never a half-written file).
|
|
9943
9954
|
*/
|
|
9944
9955
|
function writePendingRestart(dataDir, marker) {
|
|
9945
|
-
fs.mkdirSync(dataDir, { recursive: true });
|
|
9956
|
+
fs$1.mkdirSync(dataDir, { recursive: true });
|
|
9946
9957
|
const markerPath = getRestartMarkerPath(dataDir);
|
|
9947
9958
|
const tmpPath = `${markerPath}.tmp`;
|
|
9948
|
-
fs.writeFileSync(tmpPath, JSON.stringify(marker, null, 2), "utf-8");
|
|
9949
|
-
fs.renameSync(tmpPath, markerPath);
|
|
9959
|
+
fs$1.writeFileSync(tmpPath, JSON.stringify(marker, null, 2), "utf-8");
|
|
9960
|
+
fs$1.renameSync(tmpPath, markerPath);
|
|
9950
9961
|
}
|
|
9951
9962
|
/**
|
|
9952
9963
|
* Read + consume the marker. Returns the parsed payload on success and
|
|
@@ -9971,10 +9982,10 @@ function writePendingRestart(dataDir, marker) {
|
|
|
9971
9982
|
*/
|
|
9972
9983
|
function readPendingRestart(dataDir) {
|
|
9973
9984
|
const markerPath = getRestartMarkerPath(dataDir);
|
|
9974
|
-
if (!fs.existsSync(markerPath)) return null;
|
|
9985
|
+
if (!fs$1.existsSync(markerPath)) return null;
|
|
9975
9986
|
let raw;
|
|
9976
9987
|
try {
|
|
9977
|
-
raw = fs.readFileSync(markerPath, "utf-8");
|
|
9988
|
+
raw = fs$1.readFileSync(markerPath, "utf-8");
|
|
9978
9989
|
} catch (err) {
|
|
9979
9990
|
console.error("[restart-coordinator] Marker unreadable — leaving in place:", err);
|
|
9980
9991
|
return null;
|
|
@@ -10013,7 +10024,7 @@ function readPendingRestart(dataDir) {
|
|
|
10013
10024
|
/** Remove the marker if present. No-op if missing. */
|
|
10014
10025
|
function clearPendingRestart(dataDir) {
|
|
10015
10026
|
const markerPath = getRestartMarkerPath(dataDir);
|
|
10016
|
-
fs.rmSync(markerPath, { force: true });
|
|
10027
|
+
fs$1.rmSync(markerPath, { force: true });
|
|
10017
10028
|
}
|
|
10018
10029
|
function isRestartKind(value) {
|
|
10019
10030
|
return value === "framework-update" || value === "manual" || value === "system";
|
|
@@ -10025,7 +10036,7 @@ function scheduleSelfRestart(options = {}) {
|
|
|
10025
10036
|
const touchTarget = process.env["CAMSTACK_RESTART_TOUCH_FILE"];
|
|
10026
10037
|
if (touchTarget !== void 0 && touchTarget.length > 0) try {
|
|
10027
10038
|
const now = /* @__PURE__ */ new Date();
|
|
10028
|
-
fs.utimesSync(touchTarget, now, now);
|
|
10039
|
+
fs$1.utimesSync(touchTarget, now, now);
|
|
10029
10040
|
return;
|
|
10030
10041
|
} catch (err) {
|
|
10031
10042
|
console.error("[restart-coordinator] dev touch-reload failed; falling through to process exit:", err);
|
|
@@ -14392,7 +14403,7 @@ function loadBootstrapConfig(configPath) {
|
|
|
14392
14403
|
function writeBootstrapSection(configPath, section, data) {
|
|
14393
14404
|
if (!BOOTSTRAP_SECTIONS.has(section)) throw new Error(`[ConfigManager] Section "${section}" is a runtime setting — use setSection() to persist via the settings-store, not update() which writes to config.yaml`);
|
|
14394
14405
|
let raw = {};
|
|
14395
|
-
if (fs.existsSync(configPath)) raw = asJsonObject(load(fs.readFileSync(configPath, "utf-8"))) ?? {};
|
|
14406
|
+
if (fs$1.existsSync(configPath)) raw = asJsonObject(load(fs$1.readFileSync(configPath, "utf-8"))) ?? {};
|
|
14396
14407
|
const existing = asJsonObject(raw[section]) ?? {};
|
|
14397
14408
|
raw[section] = {
|
|
14398
14409
|
...existing,
|
|
@@ -14401,12 +14412,12 @@ function writeBootstrapSection(configPath, section, data) {
|
|
|
14401
14412
|
const validation = bootstrapSchema.safeParse(raw);
|
|
14402
14413
|
if (!validation.success) throw new Error(`[ConfigManager] Invalid config update for section "${section}": ${validation.error.message}`);
|
|
14403
14414
|
const tmpPath = `${configPath}.tmp`;
|
|
14404
|
-
fs.writeFileSync(tmpPath, dump(raw, {
|
|
14415
|
+
fs$1.writeFileSync(tmpPath, dump(raw, {
|
|
14405
14416
|
lineWidth: 120,
|
|
14406
14417
|
indent: 2,
|
|
14407
14418
|
quotingType: "\""
|
|
14408
14419
|
}), "utf-8");
|
|
14409
|
-
fs.renameSync(tmpPath, configPath);
|
|
14420
|
+
fs$1.renameSync(tmpPath, configPath);
|
|
14410
14421
|
return validation.data;
|
|
14411
14422
|
}
|
|
14412
14423
|
/**
|
|
@@ -14477,11 +14488,11 @@ function applyEnvOverrides(raw) {
|
|
|
14477
14488
|
return result;
|
|
14478
14489
|
}
|
|
14479
14490
|
function loadYaml(configPath) {
|
|
14480
|
-
if (!fs.existsSync(configPath)) {
|
|
14491
|
+
if (!fs$1.existsSync(configPath)) {
|
|
14481
14492
|
console.warn(`[ConfigManager] Config file not found at: ${configPath}\n → Using built-in defaults. Set CONFIG_PATH env var or create the file.\n → Example path from project root: ./server/backend/data/config.yaml`);
|
|
14482
14493
|
return {};
|
|
14483
14494
|
}
|
|
14484
|
-
const parsed = load(fs.readFileSync(configPath, "utf-8")) ?? {};
|
|
14495
|
+
const parsed = load(fs$1.readFileSync(configPath, "utf-8")) ?? {};
|
|
14485
14496
|
console.log(`[ConfigManager] Loaded config from: ${configPath}`);
|
|
14486
14497
|
return parsed;
|
|
14487
14498
|
}
|
|
@@ -22306,7 +22317,7 @@ function buildLinkChain(target, localResolver, hookup) {
|
|
|
22306
22317
|
*/
|
|
22307
22318
|
function safeExistsSync(path) {
|
|
22308
22319
|
try {
|
|
22309
|
-
return fs.existsSync(path);
|
|
22320
|
+
return fs$1.existsSync(path);
|
|
22310
22321
|
} catch {
|
|
22311
22322
|
return false;
|
|
22312
22323
|
}
|
|
@@ -22325,11 +22336,11 @@ function probeLinuxGpus() {
|
|
|
22325
22336
|
if (safeExistsSync("/dev/nvidia0") || safeExistsSync("/proc/driver/nvidia/version")) signals.hasNvidiaGpu = true;
|
|
22326
22337
|
try {
|
|
22327
22338
|
const drmDir = "/sys/class/drm";
|
|
22328
|
-
if (fs.existsSync(drmDir)) for (const entry of fs.readdirSync(drmDir)) {
|
|
22339
|
+
if (fs$1.existsSync(drmDir)) for (const entry of fs$1.readdirSync(drmDir)) {
|
|
22329
22340
|
if (!entry.startsWith("card")) continue;
|
|
22330
22341
|
const vendorPath = `${drmDir}/${entry}/device/vendor`;
|
|
22331
22342
|
if (!safeExistsSync(vendorPath)) continue;
|
|
22332
|
-
const vendor = fs.readFileSync(vendorPath, "utf8").trim().toLowerCase();
|
|
22343
|
+
const vendor = fs$1.readFileSync(vendorPath, "utf8").trim().toLowerCase();
|
|
22333
22344
|
if (vendor === "0x10de") signals.hasNvidiaGpu = true;
|
|
22334
22345
|
else if (vendor === "0x1002") signals.hasAmdGpu = true;
|
|
22335
22346
|
else if (vendor === "0x8086") signals.hasIntelGpu = true;
|
|
@@ -22495,21 +22506,21 @@ function sleep$1(ms) {
|
|
|
22495
22506
|
* crashed holder) is stolen.
|
|
22496
22507
|
*/
|
|
22497
22508
|
async function withFileLock(lockPath, fn) {
|
|
22498
|
-
fs.mkdirSync(join(lockPath, ".."), { recursive: true });
|
|
22509
|
+
fs$1.mkdirSync(join(lockPath, ".."), { recursive: true });
|
|
22499
22510
|
for (;;) try {
|
|
22500
|
-
const fd = fs.openSync(lockPath, "wx");
|
|
22501
|
-
fs.closeSync(fd);
|
|
22511
|
+
const fd = fs$1.openSync(lockPath, "wx");
|
|
22512
|
+
fs$1.closeSync(fd);
|
|
22502
22513
|
break;
|
|
22503
22514
|
} catch {
|
|
22504
22515
|
try {
|
|
22505
|
-
if (Date.now() - fs.statSync(lockPath).mtimeMs > LOCK_STALE_MS) fs.rmSync(lockPath, { force: true });
|
|
22516
|
+
if (Date.now() - fs$1.statSync(lockPath).mtimeMs > LOCK_STALE_MS) fs$1.rmSync(lockPath, { force: true });
|
|
22506
22517
|
else await sleep$1(LOCK_POLL_MS);
|
|
22507
22518
|
} catch {}
|
|
22508
22519
|
}
|
|
22509
22520
|
try {
|
|
22510
22521
|
return await fn();
|
|
22511
22522
|
} finally {
|
|
22512
|
-
fs.rmSync(lockPath, { force: true });
|
|
22523
|
+
fs$1.rmSync(lockPath, { force: true });
|
|
22513
22524
|
}
|
|
22514
22525
|
}
|
|
22515
22526
|
/** Coalesce in-process + serialize cross-process for one binary id. */
|
|
@@ -22556,6 +22567,19 @@ var AddonDepsManager = class {
|
|
|
22556
22567
|
const pythonPath = await this.ensurePython();
|
|
22557
22568
|
if (!pythonPath) throw new Error("Cannot install Python requirements: Python is not available");
|
|
22558
22569
|
await singleFlight(this.depsDir, "python-pip", () => installPythonRequirements$1(pythonPath, requirementsFile, this.logger));
|
|
22570
|
+
await this.stageNativeDepsDeclaredBy(requirementsFile);
|
|
22571
|
+
}
|
|
22572
|
+
/**
|
|
22573
|
+
* The native library a requirements file says its packages need
|
|
22574
|
+
* (`# camstack-native-dep: edgetpu-delegate`), staged under this node's
|
|
22575
|
+
* deps dir. Runs on every call — not only the first pip install — so a
|
|
22576
|
+
* node whose pip marker predates the line still gets the library. A
|
|
22577
|
+
* platform without a build answers `unavailable` (logged, not thrown); a
|
|
22578
|
+
* failed or tampered download throws, and provisioning reports it.
|
|
22579
|
+
*/
|
|
22580
|
+
async stageNativeDepsDeclaredBy(requirementsFile) {
|
|
22581
|
+
if (!declaresEdgetpuDelegate(fs$1.readFileSync(requirementsFile, "utf8"))) return;
|
|
22582
|
+
await singleFlight(this.depsDir, "edgetpu-delegate", () => ensureEdgetpuDelegate(this.nodeRoot, this.logger));
|
|
22559
22583
|
}
|
|
22560
22584
|
getDepsDir() {
|
|
22561
22585
|
return this.depsDir;
|
|
@@ -23738,7 +23762,7 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
|
|
|
23738
23762
|
const addonId = declaration.id;
|
|
23739
23763
|
const nodeDataDir = process.env["CAMSTACK_DATA"] ?? dataDir;
|
|
23740
23764
|
const addonDataDir = path$1.resolve(nodeDataDir, "addons-data", addonId);
|
|
23741
|
-
fs.mkdirSync(addonDataDir, { recursive: true });
|
|
23765
|
+
fs$1.mkdirSync(addonDataDir, { recursive: true });
|
|
23742
23766
|
if (runtime.mode === "broker") ensureBindingSubscription(runtime.broker);
|
|
23743
23767
|
const regs = getRegistries(nodeId);
|
|
23744
23768
|
const workerResolver = {
|
|
@@ -25545,7 +25569,7 @@ function readAddonHeapDeclaration(spec) {
|
|
|
25545
25569
|
if (cached !== void 0) return cached;
|
|
25546
25570
|
let declaration = EMPTY_HEAP_DECLARATION;
|
|
25547
25571
|
for (const manifestPath of [path$1.join(spec.addonDir, "package.json"), path$1.join(path$1.dirname(spec.addonDir), "package.json")]) try {
|
|
25548
|
-
const raw = fs.readFileSync(manifestPath, "utf8");
|
|
25572
|
+
const raw = fs$1.readFileSync(manifestPath, "utf8");
|
|
25549
25573
|
const parsed = JSON.parse(raw);
|
|
25550
25574
|
const profile = extractHeapProfile(parsed, spec.addonId);
|
|
25551
25575
|
const maxOldSpaceMb = extractMaxOldSpaceMb(parsed, spec.addonId);
|
|
@@ -26679,17 +26703,17 @@ var JobJournal = class {
|
|
|
26679
26703
|
return path$1.join(this.jobsDir, `${id}.json`);
|
|
26680
26704
|
}
|
|
26681
26705
|
writeAtomic(filePath, data) {
|
|
26682
|
-
fs.mkdirSync(path$1.dirname(filePath), { recursive: true });
|
|
26706
|
+
fs$1.mkdirSync(path$1.dirname(filePath), { recursive: true });
|
|
26683
26707
|
const tmp = `${filePath}.tmp.${process.pid}.${Date.now()}`;
|
|
26684
|
-
fs.writeFileSync(tmp, JSON.stringify(data, null, 2), {
|
|
26708
|
+
fs$1.writeFileSync(tmp, JSON.stringify(data, null, 2), {
|
|
26685
26709
|
encoding: "utf-8",
|
|
26686
26710
|
mode: 384
|
|
26687
26711
|
});
|
|
26688
|
-
fs.renameSync(tmp, filePath);
|
|
26712
|
+
fs$1.renameSync(tmp, filePath);
|
|
26689
26713
|
}
|
|
26690
26714
|
readIndex() {
|
|
26691
26715
|
try {
|
|
26692
|
-
const raw = JSON.parse(fs.readFileSync(this.indexPath, "utf-8"));
|
|
26716
|
+
const raw = JSON.parse(fs$1.readFileSync(this.indexPath, "utf-8"));
|
|
26693
26717
|
if (raw && Array.isArray(raw.jobIds)) return {
|
|
26694
26718
|
version: 1,
|
|
26695
26719
|
jobIds: raw.jobIds
|
|
@@ -26714,7 +26738,7 @@ var JobJournal = class {
|
|
|
26714
26738
|
}
|
|
26715
26739
|
getJob(id) {
|
|
26716
26740
|
try {
|
|
26717
|
-
const parsed = lifecycleJobSchema.safeParse(JSON.parse(fs.readFileSync(this.jobPath(id), "utf-8")));
|
|
26741
|
+
const parsed = lifecycleJobSchema.safeParse(JSON.parse(fs$1.readFileSync(this.jobPath(id), "utf-8")));
|
|
26718
26742
|
return parsed.success ? parsed.data : null;
|
|
26719
26743
|
} catch {
|
|
26720
26744
|
return null;
|
|
@@ -26779,14 +26803,14 @@ var StagingArea = class {
|
|
|
26779
26803
|
}
|
|
26780
26804
|
async fetchAndStage(input) {
|
|
26781
26805
|
const destDir = path$1.join(this.stagingDir, input.jobId, safeSegment(input.name));
|
|
26782
|
-
fs.rmSync(destDir, {
|
|
26806
|
+
fs$1.rmSync(destDir, {
|
|
26783
26807
|
recursive: true,
|
|
26784
26808
|
force: true
|
|
26785
26809
|
});
|
|
26786
26810
|
const tgz = await this.deps.fetchTarball(input.name, input.version, input.signal);
|
|
26787
26811
|
if (input.signal.aborted) throw new Error("staging aborted after fetch");
|
|
26788
26812
|
await this.deps.extract(tgz, destDir);
|
|
26789
|
-
const raw = JSON.parse(fs.readFileSync(path$1.join(destDir, "package.json"), "utf-8"));
|
|
26813
|
+
const raw = JSON.parse(fs$1.readFileSync(path$1.join(destDir, "package.json"), "utf-8"));
|
|
26790
26814
|
if (typeof raw.version !== "string" || raw.version.length === 0) throw new Error(`staging validation failed: ${input.name} staged a package.json with no version`);
|
|
26791
26815
|
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}`);
|
|
26792
26816
|
return {
|
|
@@ -26795,7 +26819,7 @@ var StagingArea = class {
|
|
|
26795
26819
|
};
|
|
26796
26820
|
}
|
|
26797
26821
|
cleanup(jobId) {
|
|
26798
|
-
fs.rmSync(path$1.join(this.stagingDir, jobId), {
|
|
26822
|
+
fs$1.rmSync(path$1.join(this.stagingDir, jobId), {
|
|
26799
26823
|
recursive: true,
|
|
26800
26824
|
force: true
|
|
26801
26825
|
});
|
|
@@ -26810,13 +26834,13 @@ var StagingArea = class {
|
|
|
26810
26834
|
sweepOrphans() {
|
|
26811
26835
|
let entries;
|
|
26812
26836
|
try {
|
|
26813
|
-
entries = fs.readdirSync(this.stagingDir);
|
|
26837
|
+
entries = fs$1.readdirSync(this.stagingDir);
|
|
26814
26838
|
} catch {
|
|
26815
26839
|
return 0;
|
|
26816
26840
|
}
|
|
26817
26841
|
let removed = 0;
|
|
26818
26842
|
for (const name of entries) try {
|
|
26819
|
-
fs.rmSync(path$1.join(this.stagingDir, name), {
|
|
26843
|
+
fs$1.rmSync(path$1.join(this.stagingDir, name), {
|
|
26820
26844
|
recursive: true,
|
|
26821
26845
|
force: true
|
|
26822
26846
|
});
|
|
@@ -26994,7 +27018,7 @@ var LifecycleJobEngine = class {
|
|
|
26994
27018
|
* on failure → `failed`.
|
|
26995
27019
|
*/
|
|
26996
27020
|
async reconcileJob(job) {
|
|
26997
|
-
const exists = this.deps.stagedPathExists ?? ((p) => fs.existsSync(p));
|
|
27021
|
+
const exists = this.deps.stagedPathExists ?? ((p) => fs$1.existsSync(p));
|
|
26998
27022
|
for (const task of job.tasks) {
|
|
26999
27023
|
if (task.target === "framework") {
|
|
27000
27024
|
if (!this.isTerminal(task.phase)) this.skipFrameworkTask(job, task);
|
|
@@ -27607,7 +27631,7 @@ var CatalogRegistry = class {
|
|
|
27607
27631
|
const file = path$1.join(packageDir, "i18n", `${lang}.json`);
|
|
27608
27632
|
let text;
|
|
27609
27633
|
try {
|
|
27610
|
-
text = fs.readFileSync(file, "utf8");
|
|
27634
|
+
text = fs$1.readFileSync(file, "utf8");
|
|
27611
27635
|
} catch {
|
|
27612
27636
|
continue;
|
|
27613
27637
|
}
|
|
@@ -27663,4 +27687,4 @@ function resetCatalogRegistryForTests() {
|
|
|
27663
27687
|
}
|
|
27664
27688
|
//#endregion
|
|
27665
27689
|
var readAllRows = import_read_all_rows.readAllRows;
|
|
27666
|
-
export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_DASHBOARD_ORIGINS_FIELD, AGENT_HTTPS_NAMES_COLLECTION, AGENT_HTTPS_NAMES_COLUMNS, 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, ApiKeyManager, AuthAuditLog, AuthManager, BackupDecryptError, BackupKeyFormatError, BackupKeyMismatchError, BackupKeyRequiredError, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CLUSTER_NODE_HISTORY_COLLECTION, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, CatalogRegistry, ClusterNodeHistoryBodySchema, 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, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, HubPairing, INFRA_CAPABILITIES, INTEGRATIONS_LEGACY, INTEGRATION_SETTINGS_LEGACY, IntegrationRegistry, 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, 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, MeshCaKeeper, MeshCertificateRegistry, MeshCrl, MeshIdentityGate, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, 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, ReplEngine, RingBuffer, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORAGE_DRAIN_STATE_LEGACY, 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, UNMIGRATED_SETTINGS_CODE, UNMIGRATED_SETTINGS_REMEDY, UPLOADED_CA_FILE, USER_MANAGEMENT_INTERNAL, UdsLocalTransportClient, UdsLocalTransportServer, UnlockTicketJtiStore, UnmigratedSettingsError, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, acceptAgentSans, adaptBrokerToCluster, addonSettingsCapability, adoptModelRevisions, afterWorkerOnlineAnnounce, agentHttpsPaths, allFamiliesListenHost, answerClaimedGetStatus, applyCertificateToListener, applyLanHttp, asBrokerLike, assertLegacyBlobsMigrated, 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, clearHttpsListener, clearPendingRestart, clearPlatformKeychainKey, closeLanHttp, clusterAgentRecordKinds, clusterEventTopic, clusterNodeHistoryRecordKind, collectAgentNames, collectCertIdentity, collectModelFiles, 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, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, currentBrokerTransporter, deleteModelFromDisk, deriveAgentListenPort, describeCsr, describeHttpsLeaf, describeMeshLeaf, describeProviderKindDrift, describeRss, detectWorkspacePackagesDir, deviceCapResolverLink, deviceOfGetStatus, diffCapActionCensus, diffEventPlane, diffSocketPlane, disconnectBrokerTransport, downloadBinary, downloadFile, downloadModel, dropProcessPeer, emitDownForOwnedCaps, emitHeapDiagnosticReport, emitProcessNodeRegistered, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, 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, getFfmpegDownloadUrl, 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, installAgentHttps, installBrokerTransporter, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, integrationRegistryRecordKinds, ipcParentLink, isAddonDeploySource, isAllowedAgentDashboardReturnTo, isArrayBufferCensusReport, isArrayOutputSchema, isCollectionArrayMethod, isConstrainedCa, isContainerBridgeAddress, isCredentialKeyName, isInfraCapability, isInstalledTransporter, isLocalOnlyHostname, isModelDownloaded, isPeerEventPacket, isPrivateAddress, isProcessVerifiedMeshPeer, isRemoteForbiddenAction, isRemoteForbiddenOnAgent, isSettingsReadUnavailable, isSourceNewer, isValidAgentNodeId, isolatedBuiltinPhase, issueAgentHttpsLeaf, issueDeviceLeaf, issueMeshLeafForNode, issueMeshLeafFromCsr, keyFingerprintShort, leafFingerprintOf, levelRank, lineContainsText, lineMatches, loadAgentHttps, loadDeviceCa, loadMeshCa, loadTlsCert, localCaCommonName, localEndpointPath, localProviderLink, localSupportedPythonRuntimes, mapSignalsToInferenceHardware, meshErrorType, mintAgentUiUnlockTicket, mountNativeCapService, nextRssBudgetState, normalizeIp, onProcessNodeRegistered, onSessionsRevoked, openMeshTlsWhenRevocationsLoaded, originNodeOf, overlayGetStatus, parseAgentDashboardOrigins, parseCapAction, parseCidrList, parseRangeHeader, parseRssBudgetMb, parseTokenExpiry, parseTokenizedUrl, partitionIsolatedBuiltinIds, pemDigest, permitsIdentity, permitsName, pinnedHttpsCaFingerprint, preferencesLimitReasonOf, prepareBootTls, prepareRestoreArchive, probePlatform, processJwtSigningKey, processMeshCrl, proxyToUpstream, quarantineAddonResidue, readAllRows, readBackupEncryptionHeader, readCidrSetting, readExtraSans, readHeapSpaces, readLanHttpState, readNameConstraints, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, redactLogEntry, redactLogMeta, redactLogText, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, reissueTlsLeaf, reloadHttpsListener, renewMeshCertificate, replaceUnconstrainedLocalCa, requireProcessMeshCa, resetCatalogRegistryForTests, resolveFilePath, resolveFormatRevision, resolveHwAccel, resolveNpmInvocation, retirePreviousLocalCa, revertToGeneratedCertificate, revisionWeightUrl, revokeMeshCertificate, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setNodeEventInterest, setPlatformKeychainKey, setProcessAgentHttpsNames, setProcessMeshCertificateRegistry, setProcessMeshPeerTransportLookup, setProcessMeshTlsEnabler, setProcessMeshTlsListenerState, setWrapperActive, shouldReclaim, 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, verifyPairingProof, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
|
|
27690
|
+
export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_DASHBOARD_ORIGINS_FIELD, AGENT_HTTPS_NAMES_COLLECTION, AGENT_HTTPS_NAMES_COLUMNS, 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, ApiKeyManager, AuthAuditLog, AuthManager, BackupDecryptError, BackupKeyFormatError, BackupKeyMismatchError, BackupKeyRequiredError, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CLUSTER_NODE_HISTORY_COLLECTION, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, CatalogRegistry, ClusterNodeHistoryBodySchema, 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, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, HubPairing, INFRA_CAPABILITIES, INTEGRATIONS_LEGACY, INTEGRATION_SETTINGS_LEGACY, IntegrationRegistry, 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, 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, MeshCaKeeper, MeshCertificateRegistry, MeshCrl, MeshIdentityGate, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, 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, ReplEngine, RingBuffer, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORAGE_DRAIN_STATE_LEGACY, 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, UNMIGRATED_SETTINGS_CODE, UNMIGRATED_SETTINGS_REMEDY, UPLOADED_CA_FILE, USER_MANAGEMENT_INTERNAL, UdsLocalTransportClient, UdsLocalTransportServer, UnlockTicketJtiStore, UnmigratedSettingsError, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, acceptAgentSans, adaptBrokerToCluster, addonSettingsCapability, adoptModelRevisions, afterWorkerOnlineAnnounce, agentHttpsPaths, allFamiliesListenHost, answerClaimedGetStatus, applyCertificateToListener, applyLanHttp, asBrokerLike, assertLegacyBlobsMigrated, 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, clearHttpsListener, clearPendingRestart, clearPlatformKeychainKey, closeLanHttp, clusterAgentRecordKinds, clusterEventTopic, clusterNodeHistoryRecordKind, collectAgentNames, collectCertIdentity, collectModelFiles, 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, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, currentBrokerTransporter, deleteModelFromDisk, deriveAgentListenPort, describeCsr, describeHttpsLeaf, describeMeshLeaf, describeProviderKindDrift, describeRss, detectWorkspacePackagesDir, deviceCapResolverLink, deviceOfGetStatus, diffCapActionCensus, diffEventPlane, diffSocketPlane, disconnectBrokerTransport, downloadBinary, downloadFile, downloadModel, dropProcessPeer, emitDownForOwnedCaps, emitHeapDiagnosticReport, emitProcessNodeRegistered, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, 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, getFfmpegDownloadUrl, 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, installAgentHttps, installBrokerTransporter, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, integrationRegistryRecordKinds, ipcParentLink, isAddonDeploySource, isAllowedAgentDashboardReturnTo, isArrayBufferCensusReport, isArrayOutputSchema, isCollectionArrayMethod, isConstrainedCa, isContainerBridgeAddress, isCredentialKeyName, isInfraCapability, isInstalledTransporter, isLocalOnlyHostname, isModelDownloaded, isPeerEventPacket, isPrivateAddress, isProcessVerifiedMeshPeer, isRemoteForbiddenAction, isRemoteForbiddenOnAgent, isSettingsReadUnavailable, isSourceNewer, isValidAgentNodeId, isolatedBuiltinPhase, issueAgentHttpsLeaf, issueDeviceLeaf, issueMeshLeafForNode, issueMeshLeafFromCsr, keyFingerprintShort, leafFingerprintOf, levelRank, lineContainsText, lineMatches, loadAgentHttps, loadDeviceCa, loadMeshCa, loadTlsCert, localCaCommonName, localEndpointPath, localProviderLink, localSupportedPythonRuntimes, mapSignalsToInferenceHardware, meshErrorType, mintAgentUiUnlockTicket, mountNativeCapService, nextRssBudgetState, normalizeIp, onProcessNodeRegistered, onSessionsRevoked, openMeshTlsWhenRevocationsLoaded, originNodeOf, overlayGetStatus, parseAgentDashboardOrigins, parseCapAction, parseCidrList, parseRangeHeader, parseRssBudgetMb, parseTokenExpiry, parseTokenizedUrl, partitionIsolatedBuiltinIds, pemDigest, permitsIdentity, permitsName, pinnedHttpsCaFingerprint, preferencesLimitReasonOf, prepareBootTls, prepareRestoreArchive, probePlatform, processJwtSigningKey, processMeshCrl, proxyToUpstream, quarantineAddonResidue, readAllRows, readBackupEncryptionHeader, readCidrSetting, readExtraSans, readHeapSpaces, readLanHttpState, readNameConstraints, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, redactLogEntry, redactLogMeta, redactLogText, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, reissueTlsLeaf, reloadHttpsListener, renewMeshCertificate, replaceUnconstrainedLocalCa, requireProcessMeshCa, resetCatalogRegistryForTests, resolveFilePath, resolveFormatRevision, resolveHwAccel, resolveNpmInvocation, retirePreviousLocalCa, revertToGeneratedCertificate, revisionWeightUrl, revokeMeshCertificate, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setNodeEventInterest, setPlatformKeychainKey, setProcessAgentHttpsNames, setProcessMeshCertificateRegistry, setProcessMeshPeerTransportLookup, setProcessMeshTlsEnabler, setProcessMeshTlsListenerState, setWrapperActive, shouldReclaim, 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, verifyPairingProof, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
|