@nowcrew/daemon 0.6.87-beta.1 → 0.6.87-beta.2
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 +4 -2
- package/dist/automatic-install-target.js +7 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,10 +12,12 @@ npx @nowcrew/daemon@latest --server-url https://nowwork.example --api-key sk_mac
|
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
The package has two release channels. The `in` environment consumes stable `x.y.z` releases through
|
|
15
|
-
the `latest` tag
|
|
15
|
+
the `latest` tag. The `dev` environment prefers `x.y.z-beta.n` prereleases through the `beta` tag,
|
|
16
|
+
and also accepts stable `x.y.z` releases for compatibility and cross-channel updates.
|
|
16
17
|
The parser also accepts the historical `x.y.z-beta-n` spelling and normalizes it for ordering; new
|
|
17
18
|
published versions should use the dotted SemVer form.
|
|
18
|
-
|
|
19
|
+
Use `beta` by default for dev installations; an explicit `latest` target is also supported there.
|
|
20
|
+
Never use `beta` for an in installation. See the
|
|
19
21
|
[Daemon Release Runbook](../docs/releases/daemon-release-runbook.md) for release and rollback procedures.
|
|
20
22
|
|
|
21
23
|
This compatibility form stays resident in the current terminal and reconnects with backoff. New
|
|
@@ -27,9 +27,9 @@ export function assertReleaseTagForServerUrl(serverUrl, requested) {
|
|
|
27
27
|
const known = KNOWN_TARGETS[parsed.hostname.toLowerCase()];
|
|
28
28
|
if (known === undefined)
|
|
29
29
|
return;
|
|
30
|
-
|
|
31
|
-
if (requested !==
|
|
32
|
-
throw new Error(`Server hostname '${parsed.hostname}' requires release tag '
|
|
30
|
+
// dev is a compatibility lane: beta remains the default, but stable is also valid.
|
|
31
|
+
if (known.environment !== "dev" && requested !== "latest") {
|
|
32
|
+
throw new Error(`Server hostname '${parsed.hostname}' requires release tag 'latest'`);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
function parseServerUrl(value) {
|
|
@@ -88,7 +88,7 @@ function knownTargetForProfile(environment, requestedProfile, input, parsed) {
|
|
|
88
88
|
daemonHome: local.daemonHome,
|
|
89
89
|
agentsRoot: paths.join(local.root, environment === "production" ? "agents" : "agents-dev"),
|
|
90
90
|
npmPrefix: local.runtimePrefix,
|
|
91
|
-
releaseTag: environment === "dev" ? "beta" : "latest",
|
|
91
|
+
releaseTag: input.requestedReleaseTag ?? (environment === "dev" ? "beta" : "latest"),
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
if (requestedProfile === "in" || requestedProfile === "dev") {
|
|
@@ -125,7 +125,7 @@ function knownTargetForProfile(environment, requestedProfile, input, parsed) {
|
|
|
125
125
|
daemonHome: local.daemonHome,
|
|
126
126
|
agentsRoot: paths.join(local.root, "agents-" + layout.environment + "-" + layout.localInstanceName),
|
|
127
127
|
npmPrefix: local.runtimePrefix,
|
|
128
|
-
releaseTag: environment === "dev" ? "beta" : "latest",
|
|
128
|
+
releaseTag: input.requestedReleaseTag ?? (environment === "dev" ? "beta" : "latest"),
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
export function resolveAutomaticInstallTarget(input) {
|
|
@@ -133,9 +133,8 @@ export function resolveAutomaticInstallTarget(input) {
|
|
|
133
133
|
const hostname = parsed.hostname.toLowerCase();
|
|
134
134
|
const paths = input.platform === "win32" ? win32 : posix;
|
|
135
135
|
const known = KNOWN_TARGETS[hostname];
|
|
136
|
-
const targetReleaseTag =
|
|
137
|
-
? "beta"
|
|
138
|
-
: input.requestedReleaseTag ?? "latest";
|
|
136
|
+
const targetReleaseTag = input.requestedReleaseTag
|
|
137
|
+
?? (known?.environment === "dev" ? "beta" : "latest");
|
|
139
138
|
const registryUrl = input.requestedRegistryUrl === undefined
|
|
140
139
|
? undefined
|
|
141
140
|
: normalizeDaemonNpmRegistry(input.requestedRegistryUrl, { allowLoopbackHttp: targetReleaseTag === "beta" });
|