@runeditrun/rer 0.2.53 → 0.2.54
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/cli/README.md +10 -0
- package/cli/contract.mjs +1 -1
- package/cli/deploy-command.mjs +4 -2
- package/cli/deploy-owner-input.mjs +35 -0
- package/cli/deploy-owner.mjs +3 -3
- package/cli/deploy.mjs +5 -3
- package/cli/parse.mjs +2 -1
- package/global/CHANGELOG.md +5 -0
- package/global/launch/dev.mjs +10 -2
- package/package.json +1 -1
package/cli/README.md
CHANGED
|
@@ -336,6 +336,16 @@ declaration refuses completion. A kit or custom-hook deploy, except `--dry-run`,
|
|
|
336
336
|
first refuses uncommitted tracked source, naming the files, before any build or
|
|
337
337
|
upload.
|
|
338
338
|
|
|
339
|
+
For a hosted owner claim, deploy reuses the name saved by `rer setup` in the
|
|
340
|
+
checkout's `.seed/installer/setup-answers.json`, under the adapter's
|
|
341
|
+
`input.names.name` field (default `displayName`). If no name is known,
|
|
342
|
+
interactive deploy asks once and saves it there. For unattended deployment,
|
|
343
|
+
`rer deploy --non-interactive --owner-name 'Maya Chen'` supplies the name;
|
|
344
|
+
without a saved or supplied name, it refuses before upload. Names use the same
|
|
345
|
+
validation as `setup --owner-name`: nonblank, at most 200 characters and no
|
|
346
|
+
Unicode Cc or Cf control characters. Nameless installers retain their existing
|
|
347
|
+
deployment behavior.
|
|
348
|
+
|
|
339
349
|
`--env-file` values are available in the command's preflight, custom hook and
|
|
340
350
|
child build environment and are redacted; the caller environment is restored
|
|
341
351
|
on success and failure. `--remove`, `--set-secret` and `--unset-secret` always go
|
package/cli/contract.mjs
CHANGED
|
@@ -11,7 +11,7 @@ const definitions = {
|
|
|
11
11
|
build: [['--site'], 'Production build with private local settings excluded and restored. --site instead writes the static run site (homepage, /run, docs) to its declared folder and prints that folder.'],
|
|
12
12
|
verify: [[], 'Run the complete internal verification target.'],
|
|
13
13
|
reset: [['--yes'], 'Confirmed removal of the declared local inventory only.'],
|
|
14
|
-
deploy: [['--environment', '--dry-run', '--site', '--demo', '--host', '--env-file', '--image', '--bind-address', '--http-port', '--https-port', '--remove', '--yes', '--set-secret', '--unset-secret', '--rotate-secret'], 'Owner-account deployment and health; dry run performs local validation/build only. Builds and deploy hooks run with the checkout\'s local settings files moved aside, and a build output holding one (.dev.vars, .env) is refused. Declared secrets come from the environment or --env-file (an owned 0600 KEY=VALUE file); a new Worker gets the local setup owner and fresh generated secrets when they are not given. rer keeps the secrets it generates in .rer/deploy/ENVIRONMENT.secrets.env (0600) and reuses them on every redeploy; it refuses to generate a replacement for one a live Worker holds, and --rotate-secret NAME[,NAME] replaces them on purpose. After a healthy deploy rer claims the setup owner on the hosted app with the one-time setup token, then removes the token. --set-secret NAME[,NAME] (each value from the environment or --env-file; repeat the flag or join names with commas) and --unset-secret NAME[,NAME] change those secrets of the deployed Worker without a build, all of them in one new Worker version or none, and record that version; a missing value refuses before any change. --remove --yes deletes what this environment\'s deploy record says rer created (Worker, D1, R2, KV, queues), reads back that each is gone, and touches nothing else. --site deploys the run site instead: an assets-only Worker on its custom domain with www redirected; with --dry-run it builds the site and prints the plan with no provider request. --demo deploys the hosted demo instead (deploy-demo.json): a front Worker on demo.<domain> giving each visitor their own signed-in, throwaway native Worker isolate of this seed with real public reads/checks and simulated external writes; --dry-run writes it to .rer/demo-host with no provider request; --demo --remove --yes deletes that demo (its Worker, demo.<domain> Custom Domain, each only while the record its deploy left proves it the demo\'s), reads back that each is gone, and is a no-op once it is.'],
|
|
14
|
+
deploy: [['--owner-name', '--environment', '--dry-run', '--site', '--demo', '--host', '--env-file', '--image', '--bind-address', '--http-port', '--https-port', '--remove', '--yes', '--set-secret', '--unset-secret', '--rotate-secret'], 'Owner-account deployment and health; dry run performs local validation/build only. Builds and deploy hooks run with the checkout\'s local settings files moved aside, and a build output holding one (.dev.vars, .env) is refused. Declared secrets come from the environment or --env-file (an owned 0600 KEY=VALUE file); a new Worker gets the local setup owner and fresh generated secrets when they are not given. rer keeps the secrets it generates in .rer/deploy/ENVIRONMENT.secrets.env (0600) and reuses them on every redeploy; it refuses to generate a replacement for one a live Worker holds, and --rotate-secret NAME[,NAME] replaces them on purpose. After a healthy deploy rer claims the setup owner on the hosted app with the saved setup owner name and the one-time setup token, then removes the token. If the installer declares an owner-name field and no name is saved, deploy asks once and saves it; --non-interactive requires --owner-name NAME before any upload. --set-secret NAME[,NAME] (each value from the environment or --env-file; repeat the flag or join names with commas) and --unset-secret NAME[,NAME] change those secrets of the deployed Worker without a build, all of them in one new Worker version or none, and record that version; a missing value refuses before any change. --remove --yes deletes what this environment\'s deploy record says rer created (Worker, D1, R2, KV, queues), reads back that each is gone, and touches nothing else. --site deploys the run site instead: an assets-only Worker on its custom domain with www redirected; with --dry-run it builds the site and prints the plan with no provider request. --demo deploys the hosted demo instead (deploy-demo.json): a front Worker on demo.<domain> giving each visitor their own signed-in, throwaway native Worker isolate of this seed with real public reads/checks and simulated external writes; --dry-run writes it to .rer/demo-host with no provider request; --demo --remove --yes deletes that demo (its Worker, demo.<domain> Custom Domain, each only while the record its deploy left proves it the demo\'s), reads back that each is gone, and is a no-op once it is.'],
|
|
15
15
|
export: [['--target', '--output', '--origin', '--session-file'], 'Complete supported archive of the local copy on this computer, with integrity and exclusions, written to --output. The hosted install cannot be exported yet: --origin or --target remote refuses (exit 2) before any effect and names the command that saves the hosted database.'],
|
|
16
16
|
import: [['--target', '--input', '--journal', '--origin', '--session-file', '--yes', '--legacy-v1', '--acknowledge-unverified-metadata', '--output'], 'Confirmed atomic restore into an empty destination; --journal LATER_ARCHIVE also fences rows that installation erased since. Backup-only local v1 recovery requires --legacy-v1 --acknowledge-unverified-metadata and a new --output v2 archive; --journal requires normal v2 import.'],
|
|
17
17
|
doctor: [[], 'Read-only installed tool, configuration and state diagnostics.'],
|
package/cli/deploy-command.mjs
CHANGED
|
@@ -6,6 +6,7 @@ import { invalid, refuse, RerError } from './errors.mjs';
|
|
|
6
6
|
import { ownerDeploy } from './deploy.mjs';
|
|
7
7
|
import { deployEnvironment, deployAgain } from './deploy-inputs.mjs';
|
|
8
8
|
import { claimHostedOwner } from './deploy-owner.mjs';
|
|
9
|
+
import { deployOwnerInput } from './deploy-owner-input.mjs';
|
|
9
10
|
import { checkHostedSetup, hostedSetupFailure } from './deploy-setup.mjs';
|
|
10
11
|
import { mutationReadinessFailure } from './deploy-readiness.mjs';
|
|
11
12
|
import { observeOwner, ownerExchangeFailure } from './deploy-observation.mjs';
|
|
@@ -94,6 +95,7 @@ export async function deployCommand(context) {
|
|
|
94
95
|
const production = await deployEnvironment({ root, options, declaration, setupManifest, settings, localOnlyKeys });
|
|
95
96
|
await requireProductionAuth({ root, declaration, env: production.env, setupManifest, setupSeed: context.setupSeed, adapter, declarationPath: path, options });
|
|
96
97
|
const sourceSha = options.dryRun ? undefined : committedSource(root, options);
|
|
98
|
+
const ownerInput = await deployOwnerInput(context);
|
|
97
99
|
const { env, supplied, generated, reused, rotated } = await deployEnvironment({ root, options, declaration, setupManifest, settings, localOnlyKeys });
|
|
98
100
|
const { createRedaction } = await shared('redaction.mjs');
|
|
99
101
|
const redaction = createRedaction();
|
|
@@ -125,7 +127,7 @@ export async function deployCommand(context) {
|
|
|
125
127
|
Object.assign(process.env, env);
|
|
126
128
|
// The hook builds and uploads by itself: it never sees the checkout's local settings.
|
|
127
129
|
deployed = await withoutLocalSettings(root, { settings: [...(Array.isArray(adapter.settings) ? adapter.settings : []), adapter.hooks?.secrets?.file], operationToken: context.operationToken },
|
|
128
|
-
() => adapter.deploy({ ...context, linkDependencies: async (origin, token) => link(token, origin) }));
|
|
130
|
+
() => adapter.deploy({ ...context, input: ownerInput.input, linkDependencies: async (origin, token) => link(token, origin) }));
|
|
129
131
|
} finally {
|
|
130
132
|
for (const key of Object.keys(process.env)) if (!Object.hasOwn(saved, key)) delete process.env[key];
|
|
131
133
|
Object.assign(process.env, saved);
|
|
@@ -150,7 +152,7 @@ export async function deployCommand(context) {
|
|
|
150
152
|
if (typeof deployed.setupToken === 'string' && deployed.setupToken) addSecret(deployed.setupToken);
|
|
151
153
|
const sentSecrets = (uploaded?.sentSecrets ?? []).filter(binding => uploaded.propagation.matchesToken(binding, env[declaration.secrets.find(item => item.binding === binding)?.environment]));
|
|
152
154
|
const kit = state ? { secret: (extra, values) => command('secret', extra, values), recordClaim: outcome => command('record-owner', ['--outcome', outcome]) } : { token: deployed.setupToken || undefined };
|
|
153
|
-
claimed = await claimHostedOwner({ hook: adapter.hooks?.owner, setupManifest, declaration, deployed: { ...state, sentSecrets, propagation:deployed.propagation ?? uploaded?.propagation, origin, owner: claimed, observedOwner: () => claims.at(-1)?.outcome }, env, supplied, ...kit, addSecret, beforeClaim: token => link(token, origin), store, signal: context.signal });
|
|
155
|
+
claimed = await claimHostedOwner({ hook: adapter.hooks?.owner, setupManifest, declaration, deployed: { ...state, sentSecrets, propagation:deployed.propagation ?? uploaded?.propagation, origin, owner: claimed, observedOwner: () => claims.at(-1)?.outcome }, env, ...ownerInput, supplied, ...kit, addSecret, beforeClaim: token => link(token, origin), store, signal: context.signal });
|
|
154
156
|
if (!linked) await linkDependencies?.(origin);
|
|
155
157
|
step = 'verify hosted setup';
|
|
156
158
|
await checkHostedSetup({ origin, claimed: claimed ?? state?.ownerClaim?.outcome ?? claims.at(-1)?.outcome, signal: context.signal });
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createInterface } from 'node:readline/promises';
|
|
2
|
+
import { invalid, missing } from './errors.mjs';
|
|
3
|
+
import { validOwnerName } from './parse.mjs';
|
|
4
|
+
import { savedSetupAnswers, rememberSetupAnswers } from './setup-answers.mjs';
|
|
5
|
+
import { shared } from './shared.mjs';
|
|
6
|
+
|
|
7
|
+
// Resolve the installer identity before building or uploading. Names are safe
|
|
8
|
+
// installer answers, not runtime secrets, and use the same custody as setup.
|
|
9
|
+
export async function deployOwnerInput({ root, adapter, setupSeed, options, signal }) {
|
|
10
|
+
const key = adapter.input?.names?.name ?? 'displayName';
|
|
11
|
+
if (!setupSeed?.model.fields[key]) {
|
|
12
|
+
if (options.ownerName !== undefined) throw invalid('This installer does not declare an owner-name field; --owner-name is unsupported.');
|
|
13
|
+
return { input: {} };
|
|
14
|
+
}
|
|
15
|
+
const project = { root, adapter, setupSeed };
|
|
16
|
+
const input = await savedSetupAnswers(project, setupSeed.model) ?? {};
|
|
17
|
+
let displayName = options.ownerName ?? input[key];
|
|
18
|
+
if (displayName === undefined && adapter.hooks?.secrets) {
|
|
19
|
+
const { readSettings } = await shared('adapter-settings.mjs');
|
|
20
|
+
displayName = (await readSettings(root, adapter.hooks.secrets)).values[key];
|
|
21
|
+
}
|
|
22
|
+
const advice = 'Deploy needs your owner name; run rer deploy --owner-name "Your name" (or rer setup --owner-name "Your name"). Nothing was uploaded.';
|
|
23
|
+
if (!displayName?.trim()) {
|
|
24
|
+
if (options.dryRun) return { input };
|
|
25
|
+
if (options.nonInteractive || options.json || !process.stdin.isTTY) throw missing(advice);
|
|
26
|
+
const prompt = createInterface({ input: process.stdin, output: process.stderr });
|
|
27
|
+
const closed = new Promise((_, reject) => prompt.once('close', () => reject(missing(advice))));
|
|
28
|
+
try { displayName = await Promise.race([prompt.question('Your name (hosted owner): ', { signal }), closed]); }
|
|
29
|
+
finally { prompt.close(); }
|
|
30
|
+
}
|
|
31
|
+
if (!validOwnerName(displayName)) throw invalid('Provide a valid owner name.');
|
|
32
|
+
input[key] = displayName;
|
|
33
|
+
if (!options.dryRun) await rememberSetupAnswers(project, input);
|
|
34
|
+
return { input, displayName };
|
|
35
|
+
}
|
package/cli/deploy-owner.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import { randomBytes } from 'node:crypto';
|
|
|
13
13
|
// deploy hook's own: rer claims with the `token` it returned, else the one rer
|
|
14
14
|
// gave it, and leaves that token with the hook.
|
|
15
15
|
// `beforeClaim(token)` runs while the token is live (dependency approvals need it).
|
|
16
|
-
export async function claimHostedOwner({ hook, setupManifest, declaration, deployed, env, supplied = [], secret, token: hookToken, addSecret, beforeClaim, recordClaim, inspect, store, signal, fetch = globalThis.fetch }) {
|
|
16
|
+
export async function claimHostedOwner({ hook, setupManifest, declaration, deployed, env, input = {}, displayName, supplied = [], secret, token: hookToken, addSecret, beforeClaim, recordClaim, inspect, store, signal, fetch = globalThis.fetch }) {
|
|
17
17
|
const claim = setupManifest?.steps?.find(step => step.type === 'owner-claim');
|
|
18
18
|
if (!hook || !['object', 'function'].includes(typeof hook) || Array.isArray(hook) || !deployed.origin) {
|
|
19
19
|
if (declaration.secrets?.some(item => item.binding === (claim?.tokenField ?? 'SETUP_TOKEN'))) throw ownerFailure('the owner bootstrap hook is unavailable');
|
|
@@ -52,7 +52,7 @@ export async function claimHostedOwner({ hook, setupManifest, declaration, deplo
|
|
|
52
52
|
return retire(linked.ownerOutcome);
|
|
53
53
|
}
|
|
54
54
|
if (typeof hook === 'function') {
|
|
55
|
-
const context = { origin: deployed.origin, vars: { ...env, [tokenKey]: token }, input
|
|
55
|
+
const context = { origin: deployed.origin, vars: { ...env, [tokenKey]: token }, input, store, signal, ownerClaim: claim, fail: () => ownerFailure('the seed owner hook failed') };
|
|
56
56
|
let observed, exchanges = [];
|
|
57
57
|
try {
|
|
58
58
|
if (deployed.observedOwner) await hook(context);
|
|
@@ -69,7 +69,7 @@ export async function claimHostedOwner({ hook, setupManifest, declaration, deplo
|
|
|
69
69
|
if (!['claimed', 'kept'].includes(outcome)) throw ownerFailure('the seed owner hook did not confirm its bootstrap exchange');
|
|
70
70
|
return retire(outcome);
|
|
71
71
|
}
|
|
72
|
-
|
|
72
|
+
displayName = (typeof hook.displayName === 'function' ? hook.displayName(input) : undefined) || displayName || 'Owner';
|
|
73
73
|
let response, code = 'no code';
|
|
74
74
|
try {
|
|
75
75
|
response = await ownerClaimRequest(fetch, new URL(hook.path ?? '/auth/bootstrap', deployed.origin), { method: 'POST',
|
package/cli/deploy.mjs
CHANGED
|
@@ -10,6 +10,7 @@ import { packageBuild } from '../modules/deploy-kit/prepare.mjs';
|
|
|
10
10
|
import { refuseLocalModels } from '../modules/deploy-kit/local-only.mjs';
|
|
11
11
|
import { deployEnvironment, deployAgain } from './deploy-inputs.mjs';
|
|
12
12
|
import { claimHostedOwner } from './deploy-owner.mjs';
|
|
13
|
+
import { deployOwnerInput } from './deploy-owner-input.mjs';
|
|
13
14
|
import { checkHostedSetup, hostedSetupFailure } from './deploy-setup.mjs';
|
|
14
15
|
import { mutationReadinessFailure } from './deploy-readiness.mjs';
|
|
15
16
|
import { committedSource } from './deploy-source.mjs';
|
|
@@ -21,7 +22,7 @@ import { withoutLocalSettings, refuseLocalEnvOutput } from './local-env.mjs';
|
|
|
21
22
|
|
|
22
23
|
export function ownerDeploy(declarationPath, lifecycle) {
|
|
23
24
|
// rer verify serves the build with this declaration's vars and secrets.
|
|
24
|
-
return Object.assign(async ({ root, options, store, signal, operationToken, localOnlyKeys = [], checkBuild = async () => {}, setupManifest, setupSeed, linkDependencies }) => {
|
|
25
|
+
return Object.assign(async ({ root, options, store, signal, operationToken, localOnlyKeys = [], checkBuild = async () => {}, setupManifest, setupSeed, linkDependencies, adapter = lifecycle }) => {
|
|
25
26
|
try { await refuseLocalModels(root); } catch { throw refuse('Deploy refuses the local-only key file .rer/local/models.json. Remove live-dev credentials before deployment.'); }
|
|
26
27
|
const path = await contained(root, declarationPath);
|
|
27
28
|
let declaration; try { declaration = JSON.parse(await readFile(path, 'utf8')); } catch { throw invalid('Malformed owner-account deploy declaration.'); }
|
|
@@ -37,11 +38,12 @@ export function ownerDeploy(declarationPath, lifecycle) {
|
|
|
37
38
|
const recordedState = change.length ? await deploymentRecord(root, options) : undefined;
|
|
38
39
|
// A dry run reads the settings file too, so a refused key fails here and not only on the real deploy.
|
|
39
40
|
if (options.dryRun && options.envFile) await deployEnvironment({ root, options, declaration, localOnlyKeys });
|
|
40
|
-
let production;
|
|
41
|
+
let production, ownerInput;
|
|
41
42
|
if (!change.length) {
|
|
42
43
|
production = await deployEnvironment({ root, options, declaration, setupManifest, settings: lifecycle.settings, localOnlyKeys });
|
|
43
44
|
await requireProductionAuth({ root, declaration, env: production.env, setupManifest, setupSeed, adapter: lifecycle, declarationPath, options });
|
|
44
45
|
if (!options.dryRun) committedSource(root, options);
|
|
46
|
+
ownerInput = await deployOwnerInput({ root, adapter, setupSeed, options, signal });
|
|
45
47
|
await withoutLocalSettings(root, { settings: lifecycle.settings, operationToken }, () => lifecycle.run(root, {}, store, () => {}, signal, { verb: 'build', operationToken }));
|
|
46
48
|
await checkBuild();
|
|
47
49
|
await refuseLocalEnvOutput(root);
|
|
@@ -112,7 +114,7 @@ export function ownerDeploy(declarationPath, lifecycle) {
|
|
|
112
114
|
step = 'claim owner';
|
|
113
115
|
const { liveSecrets, retiredSecrets, ownerClaim } = await owner('inspect', [], env, {propagation:deployed.propagation});
|
|
114
116
|
const linked = token => linkDependencies?.(deployed.origin, token);
|
|
115
|
-
const claimed = await claimHostedOwner({ hook: lifecycle.hooks?.owner, setupManifest, declaration, deployed: { ...deployed, propagation:deployed.propagation, liveSecrets, retiredSecrets, ownerClaim }, env, supplied, addSecret: value => { redaction.addSecrets([value]); store.addSecrets?.([value]); },
|
|
117
|
+
const claimed = await claimHostedOwner({ hook: lifecycle.hooks?.owner, setupManifest, declaration, deployed: { ...deployed, propagation:deployed.propagation, liveSecrets, retiredSecrets, ownerClaim }, env, ...ownerInput, supplied, addSecret: value => { redaction.addSecrets([value]); store.addSecrets?.([value]); },
|
|
116
118
|
secret: (extra, values) => owner('secret', extra, values), beforeClaim: linked, recordClaim: outcome => owner('record-owner', ['--outcome', outcome]), inspect: () => owner('inspect', [], env, {propagation:deployed.propagation}), store, signal });
|
|
117
119
|
// A seed that claims its owner its own way links with the token it was given.
|
|
118
120
|
if (claimed === undefined) await linked(env[declared(claim?.tokenField ?? 'SETUP_TOKEN')?.environment]);
|
package/cli/parse.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { isLoopbackHost } from '../modules/operator-auth/loopback.mjs';
|
|
|
5
5
|
import { normalizeEmail } from '../modules/operator-auth/policy.mjs';
|
|
6
6
|
const booleans = new Set(['--help', '--json', '--non-interactive', '--yes', '--dry-run', '--stop', '--detach', '--foreground', '--no-queue', '--login', '--legacy-v1', '--acknowledge-unverified-metadata', '--door', '--direct', '--site', '--remove', '--demo']);
|
|
7
7
|
export const mailbox = value => typeof value === 'string' && value.length <= 254 && /^[a-zA-Z0-9.!+_%\-]+@[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)+$/.test(value);
|
|
8
|
+
export const validOwnerName = value => typeof value === 'string' && Boolean(value.trim()) && value.length <= 200 && !/[\p{Cc}\p{Cf}]/u.test(value);
|
|
8
9
|
// A loopback host: the shared predicate (including `*.localhost` door names),
|
|
9
10
|
// plus `::1` as --host and a bracket-stripped hostname spell it.
|
|
10
11
|
export const loopback = host => host === '::1' || isLoopbackHost(host);
|
|
@@ -81,7 +82,7 @@ export function parse(argv, cwd = process.cwd(), { independent = false, deferTai
|
|
|
81
82
|
if(options.platform !== undefined && !['workers','container'].includes(options.platform))throw invalid('Platform must be workers or container.');
|
|
82
83
|
if (options.host !== undefined && !(verb === 'deploy' && options.platform === 'container') && !listenHost(options.host)) throw refuse('Host must be exactly 127.0.0.1, localhost or ::1.');
|
|
83
84
|
if (options.ownerEmail !== undefined) { if (!mailbox(options.ownerEmail)) throw invalid('Provide a valid plain owner mailbox.'); options.ownerEmail = options.ownerEmail.toLowerCase(); }
|
|
84
|
-
if (options.ownerName !== undefined && (options.ownerName
|
|
85
|
+
if (options.ownerName !== undefined && !validOwnerName(options.ownerName)) throw invalid('Provide a valid owner name.');
|
|
85
86
|
if (options.target !== undefined && !['local', 'remote'].includes(options.target)) throw invalid('Target must be local or remote.');
|
|
86
87
|
if (options.profile !== undefined && options.profile !== 'first-party') throw invalid('The supported explicit profile is first-party.');
|
|
87
88
|
if (options.environment !== undefined && !/^[a-z][a-z0-9-]{0,39}$/.test(options.environment)) throw invalid('Provide a valid deployment environment name.');
|
package/global/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.54
|
|
4
|
+
|
|
5
|
+
- **Dev launch handoffs keep the requested lifetime.** An explicit `rer dev --foreground` or `--detach` survives preparation that installs a checkout’s pinned rer and hands off to its launcher. The default terminal behavior stays the same (#258).
|
|
6
|
+
- **Hosted installs keep the setup owner name.** Deploy carries the name saved by setup into hosted owner bootstrap. When a declared name is missing, interactive deploy asks once and saves it; unattended deploy requires `--owner-name` before uploading. Installers without a name field keep their existing behavior (#257).
|
|
7
|
+
|
|
3
8
|
## 0.2.53
|
|
4
9
|
|
|
5
10
|
- **Dropdowns share one themed chevron rule.** Base's operator app and installer draw a 12 px chevron 14 px from the right border with 40 px end padding. Exported seeds can copy `selectStyle` from `src/base/select-style.ts`; its gradient strokes follow the theme color and work under the seed's content security policy. Focus, disabled, right-to-left and forced-color states are included (#247).
|
package/global/launch/dev.mjs
CHANGED
|
@@ -35,7 +35,7 @@ export async function launchDev(target) {
|
|
|
35
35
|
}
|
|
36
36
|
// An invocation the pinned dispatcher refuses goes straight to it, so the
|
|
37
37
|
// refusal is its own, with nothing prepared first.
|
|
38
|
-
if (!await accepted(target.root, devArgs)) return
|
|
38
|
+
if (!await accepted(target.root, devArgs)) return delegateDev(target);
|
|
39
39
|
const checkout = await realpath(target.root), directory = await launchDirectory(checkout);
|
|
40
40
|
if (devArgs.includes('--stop')) {
|
|
41
41
|
try { return await stopLaunch(target, devArgs, { checkout, directory }); }
|
|
@@ -47,6 +47,14 @@ export async function launchDev(target) {
|
|
|
47
47
|
return detach ? detached(target, devArgs, directory, out, doorStart) : foreground(target, devArgs, directory, out, doorStart);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
// Preparation can install a pin whose entry is another global launcher. Keep
|
|
51
|
+
// the caller's lifetime flags across that handoff. The internal front-door
|
|
52
|
+
// marker reaches other launchers, but never the public dispatcher.
|
|
53
|
+
function delegateDev(target) {
|
|
54
|
+
const { launcher } = dispatcher(target.root);
|
|
55
|
+
return delegate(target, launcher ? target.args : target.args.filter(arg => arg !== '--door-start'));
|
|
56
|
+
}
|
|
57
|
+
|
|
50
58
|
async function doorCapable(root) {
|
|
51
59
|
try { return Boolean((await describeCheckout(root, dispatcher(root).entry, process.env)).door); } catch { return true; }
|
|
52
60
|
}
|
|
@@ -72,7 +80,7 @@ async function foreground(target, devArgs, directory, out, doorStart) {
|
|
|
72
80
|
catch (failure) { if (!(failure instanceof LaunchFailure)) throw failure; out.failure(failure); return failure.exitCode; }
|
|
73
81
|
finally { clearInterval(heartbeat); log.end(); }
|
|
74
82
|
Object.assign(process.env, prepared.added);
|
|
75
|
-
return
|
|
83
|
+
return delegateDev(target);
|
|
76
84
|
}
|
|
77
85
|
|
|
78
86
|
async function detached(target, devArgs, directory, out, doorStart) {
|