@camstack/agent 1.1.51 → 1.1.53
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/{chunk-67UOSAWB.mjs → chunk-Y3WG77PU.mjs} +39 -9
- package/dist/chunk-Y3WG77PU.mjs.map +1 -0
- package/dist/cli.js +38 -8
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.js +38 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +8 -8
- package/dist/chunk-67UOSAWB.mjs.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -2081,13 +2081,39 @@ function createAgentService(deps) {
|
|
|
2081
2081
|
}
|
|
2082
2082
|
return deps.installFromNpm(pkg, v);
|
|
2083
2083
|
},
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2084
|
+
// #17: route the bundle through the agent's AddonInstaller when
|
|
2085
|
+
// wired — installFromTgz runs the FULL post-install (manifest
|
|
2086
|
+
// strip, runtime-deps npm install, manifest-driven NATIVE deps)
|
|
2087
|
+
// with its own staged extract + atomic swap. The plain tar swap
|
|
2088
|
+
// below never installed deps, so every pipeline/post-analysis
|
|
2089
|
+
// deploy on the Mac Electron agent silently shipped without
|
|
2090
|
+
// `sharp` et al. Fallback kept for agents without an installer
|
|
2091
|
+
// (test harnesses).
|
|
2092
|
+
applyBundle: async (buf) => {
|
|
2093
|
+
if (deps.installBundleTgz) {
|
|
2094
|
+
const tgzPath = path5.join(
|
|
2095
|
+
os2.tmpdir(),
|
|
2096
|
+
`camstack-deploy-${addonId.replace(/[^\w.-]/g, "_")}-${Date.now()}.tgz`
|
|
2097
|
+
);
|
|
2098
|
+
fs5.writeFileSync(tgzPath, buf);
|
|
2099
|
+
try {
|
|
2100
|
+
const { name } = await deps.installBundleTgz(tgzPath);
|
|
2101
|
+
return { addonDir: path5.join(deps.addonsDir, name) };
|
|
2102
|
+
} finally {
|
|
2103
|
+
try {
|
|
2104
|
+
fs5.unlinkSync(tgzPath);
|
|
2105
|
+
} catch {
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
return applyDeployedBundle({
|
|
2110
|
+
addonsDir: deps.addonsDir,
|
|
2111
|
+
addonId,
|
|
2112
|
+
bundle: buf,
|
|
2113
|
+
extract,
|
|
2114
|
+
logger: deploySwapLogger
|
|
2115
|
+
});
|
|
2116
|
+
},
|
|
2091
2117
|
fetchBundle: (s) => fetchBundleFromHub(s),
|
|
2092
2118
|
// Evict every addon DECLARATION id this package contributes
|
|
2093
2119
|
// from `loadedAddons` so the follow-up `$agent.reload` actually
|
|
@@ -2682,7 +2708,11 @@ async function startAgent(configPath) {
|
|
|
2682
2708
|
expectedClusterSecretHash: config.secret ? (0, import_system3.hashClusterSecret)(config.secret) : void 0,
|
|
2683
2709
|
installFromNpm: async (pkg, version) => {
|
|
2684
2710
|
await installer.install(pkg, version);
|
|
2685
|
-
}
|
|
2711
|
+
},
|
|
2712
|
+
// #17: deployed bundles go through the installer's full post-install
|
|
2713
|
+
// (manifest strip + runtime deps + native deps + atomic swap) instead of
|
|
2714
|
+
// the bare tar swap that shipped addons without their node_modules.
|
|
2715
|
+
installBundleTgz: (tgzPath) => installer.installFromTgz(tgzPath)
|
|
2686
2716
|
});
|
|
2687
2717
|
broker.createService(agentServiceSchema);
|
|
2688
2718
|
const agentTcpPort = (0, import_system3.deriveAgentListenPort)(broker.nodeID);
|