@rackbops/ac-agent 2.0.0-alpha.49 → 2.0.0-alpha.51
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/README.md +1 -1
- package/dist/ac-agent.mjs +15 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -830,7 +830,7 @@ software is never something a grant could hand to a plugin.
|
|
|
830
830
|
just before the hand-off.
|
|
831
831
|
2. **Resolves exactly that version on the public npm registry** (`https://registry.npmjs.org`, a
|
|
832
832
|
constant, never configurable):
|
|
833
|
-
- The metadata must
|
|
833
|
+
- The metadata must be a JSON object naming `@rackbops/ac-agent` and that version.
|
|
834
834
|
- Its tarball URL must be the registry's own canonical one for it.
|
|
835
835
|
- Its integrity must be one sha512.
|
|
836
836
|
3. **Downloads the tarball** (60 s timeout) and refuses it over 20 MB or unless its sha512 matches.
|
package/dist/ac-agent.mjs
CHANGED
|
@@ -47,7 +47,7 @@ function _mergeNamespaces(n, m) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
var name = "@rackbops/ac-agent";
|
|
50
|
-
var version = "2.0.0-alpha.
|
|
50
|
+
var version = "2.0.0-alpha.51";
|
|
51
51
|
var type = "module";
|
|
52
52
|
var description = "The per-machine host agent (installed with npx @rackbops/ac-agent): an HTTPS health server plus install/status/uninstall for a Windows logon task or a systemd user unit.";
|
|
53
53
|
var bin = {
|
|
@@ -75279,7 +75279,20 @@ async function resolveRelease(version, fetchImpl, registry, timeoutMs = 15_000)
|
|
|
75279
75279
|
throw new UpdateRefusal(`${version} is not published`);
|
|
75280
75280
|
if (!res.ok)
|
|
75281
75281
|
throw new UpdateRefusal(`registry answered ${res.status} for ${version}`);
|
|
75282
|
-
|
|
75282
|
+
// A body that isn't a JSON object (a proxy's error page, `null`) is a refusal like any other bad
|
|
75283
|
+
// metadata, not a fault (#659; listed as a declined minor in #665, fixed after it). The cause is
|
|
75284
|
+
// kept: a timeout or a dropped connection mid-body lands here too.
|
|
75285
|
+
let parsed;
|
|
75286
|
+
try {
|
|
75287
|
+
parsed = await res.json();
|
|
75288
|
+
}
|
|
75289
|
+
catch (err) {
|
|
75290
|
+
throw new UpdateRefusal(`registry metadata for ${version} is not JSON: ${err instanceof Error ? err.message : String(err)}`);
|
|
75291
|
+
}
|
|
75292
|
+
if (typeof parsed !== "object" || parsed === null) {
|
|
75293
|
+
throw new UpdateRefusal(`registry metadata for ${version} is not an object`);
|
|
75294
|
+
}
|
|
75295
|
+
const meta = parsed;
|
|
75283
75296
|
if (meta.name !== AGENT_PACKAGE || meta.version !== version) {
|
|
75284
75297
|
throw new UpdateRefusal(`registry metadata is not ${AGENT_PACKAGE}@${version}`);
|
|
75285
75298
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rackbops/ac-agent",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.51",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "The per-machine host agent (installed with npx @rackbops/ac-agent): an HTTPS health server plus install/status/uninstall for a Windows logon task or a systemd user unit.",
|