primitive-admin 1.2.0-alpha.5 → 1.2.0-alpha.7
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/src/commands/apps-children.d.ts +1 -1
- package/dist/src/commands/apps-children.js +170 -28
- package/dist/src/commands/apps-children.js.map +1 -1
- package/dist/src/commands/auth.js +41 -6
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/config.js +43 -4
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/databases.js +130 -53
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/init.d.ts +7 -0
- package/dist/src/commands/init.js +9 -1
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/sync.d.ts +118 -6
- package/dist/src/commands/sync.js +594 -55
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/lib/child-apps-local.d.ts +45 -21
- package/dist/src/lib/child-apps-local.js +68 -30
- package/dist/src/lib/child-apps-local.js.map +1 -1
- package/dist/src/lib/credentials-store.d.ts +38 -3
- package/dist/src/lib/credentials-store.js +175 -9
- package/dist/src/lib/credentials-store.js.map +1 -1
- package/dist/src/lib/function-collect.d.ts +1 -1
- package/dist/src/lib/function-collect.js +4 -0
- package/dist/src/lib/function-collect.js.map +1 -1
- package/dist/src/lib/generated-config-surfaces.d.ts +148 -0
- package/dist/src/lib/generated-config-surfaces.js +208 -25
- package/dist/src/lib/generated-config-surfaces.js.map +1 -1
- package/dist/src/lib/generated-sdk-types.d.ts +1 -1
- package/dist/src/lib/generated-sdk-types.js +1 -1
- package/dist/src/lib/generated-sdk-types.js.map +1 -1
- package/dist/src/lib/local-state.d.ts +21 -6
- package/dist/src/lib/local-state.js +78 -34
- package/dist/src/lib/local-state.js.map +1 -1
- package/dist/src/lib/push-failure-report.d.ts +45 -0
- package/dist/src/lib/push-failure-report.js +57 -0
- package/dist/src/lib/push-failure-report.js.map +1 -0
- package/dist/src/lib/sync-selectors.d.ts +5 -1
- package/dist/src/lib/sync-selectors.js +23 -13
- package/dist/src/lib/sync-selectors.js.map +1 -1
- package/dist/src/lib/transient-retry.d.ts +9 -0
- package/dist/src/lib/transient-retry.js +37 -0
- package/dist/src/lib/transient-retry.js.map +1 -1
- package/dist/src/lib/vars-override.d.ts +105 -0
- package/dist/src/lib/vars-override.js +143 -0
- package/dist/src/lib/vars-override.js.map +1 -0
- package/package.json +2 -2
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
* the committed environment whose `primitive/<tree>/` it shares — its parent.
|
|
8
8
|
* This module owns everything the verbs do to this machine around the server
|
|
9
9
|
* calls: finding the parent of the current environment, registering a child
|
|
10
|
-
* (baseline,
|
|
11
|
-
*
|
|
10
|
+
* (baseline, entry), finding entries whose child is gone, and removing a
|
|
11
|
+
* deleted child's local state. A child has no login of its own: it uses its
|
|
12
|
+
* parent's (#4511, `credentials-store.ts`).
|
|
12
13
|
*
|
|
13
14
|
* Local state is always related to a server child by APP ID, never by name. A
|
|
14
15
|
* local name is unique per checkout, while a slug is unique per parent, so an
|
|
@@ -17,7 +18,6 @@
|
|
|
17
18
|
import type { AppChildSummary } from "./api-client.js";
|
|
18
19
|
import { type CoreLocalEnvironmentEntry } from "./env-resolver-core.js";
|
|
19
20
|
import { type ResolvedEnvironment } from "./env-resolver.js";
|
|
20
|
-
import type { Credentials } from "../types/index.js";
|
|
21
21
|
/** A machine-local environment and the name it is registered under. */
|
|
22
22
|
export interface LocalEnvironmentRef {
|
|
23
23
|
name: string;
|
|
@@ -109,26 +109,17 @@ export interface ChildRegistration {
|
|
|
109
109
|
appId: string;
|
|
110
110
|
appName?: string;
|
|
111
111
|
parentAppId: string;
|
|
112
|
-
/**
|
|
113
|
-
* The login copied into the child's credentials slot. Credentials from
|
|
114
|
-
* `PRIMITIVE_TOKEN` (#3890) are never copied: the child gets no slot.
|
|
115
|
-
*/
|
|
116
|
-
credentials: Credentials;
|
|
117
112
|
}
|
|
118
113
|
/**
|
|
119
114
|
* Registers a child as the machine-local environment `name`: its baseline
|
|
120
|
-
* (seeded as {@link seedChildBaseline} does),
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
115
|
+
* (seeded as {@link seedChildBaseline} does), then the `.primitive/local.json`
|
|
116
|
+
* entry, which is the commit point. No credentials slot is written: the child
|
|
117
|
+
* uses its parent's login. When the entry cannot be written the baseline is
|
|
118
|
+
* removed, so no half-registered child is left, and a
|
|
124
119
|
* {@link ChildRegistrationError} naming the app id is thrown.
|
|
125
|
-
*
|
|
126
|
-
* Under `PRIMITIVE_TOKEN` no slot is written (`loginCopied: false`): the
|
|
127
|
-
* token stays in the environment, and the child is reached with it too.
|
|
128
120
|
*/
|
|
129
121
|
export declare function registerChildEnvironment(input: ChildRegistration): {
|
|
130
122
|
baselineSource: "committed" | "empty";
|
|
131
|
-
loginCopied: boolean;
|
|
132
123
|
};
|
|
133
124
|
/** What {@link removeLocalStateForApp} removed for one entry. */
|
|
134
125
|
export interface LocalStateRemoval {
|
|
@@ -140,6 +131,8 @@ export interface LocalStateRemoval {
|
|
|
140
131
|
loginRemoved: boolean;
|
|
141
132
|
baselineRemoved: boolean;
|
|
142
133
|
backupsRemoved: boolean;
|
|
134
|
+
/** Its `vars.<name>.override.toml` in its tree was removed (#4485). */
|
|
135
|
+
overrideRemoved: boolean;
|
|
143
136
|
/**
|
|
144
137
|
* Why the cleanup stopped, when it did. The entry is then kept, with
|
|
145
138
|
* whatever was not removed, so a later cleanup finds it again by app id.
|
|
@@ -148,8 +141,10 @@ export interface LocalStateRemoval {
|
|
|
148
141
|
}
|
|
149
142
|
/**
|
|
150
143
|
* Removes this machine's state for the app `appId`: for every machine-local
|
|
151
|
-
* entry holding it,
|
|
152
|
-
*
|
|
144
|
+
* entry holding it, any credentials slot it kept from before children used
|
|
145
|
+
* their parent's login, its baseline, its backups, its vars
|
|
146
|
+
* override file in its tree and last the entry (clearing a selection naming
|
|
147
|
+
* it). The entry goes last because it
|
|
153
148
|
* is what identifies the rest: when an earlier removal fails the entry stays
|
|
154
149
|
* and the record carries `failure`, so a rerun can finish the job. Entries
|
|
155
150
|
* holding other apps are untouched whatever they are named. Returns one record
|
|
@@ -173,12 +168,41 @@ export declare function gitBranchExists(root: string, branch: string): boolean;
|
|
|
173
168
|
* for the parent's debugger port.
|
|
174
169
|
*/
|
|
175
170
|
export declare function firstPushArgs(name: string, execArgv?: readonly string[], entry?: string): string[];
|
|
171
|
+
/** One run of the first push: its exit code, and whether its failure was transient. */
|
|
172
|
+
export interface FirstPushRun {
|
|
173
|
+
exitCode: number;
|
|
174
|
+
/** True only for a failed push that reported every failure as transient. */
|
|
175
|
+
transient: boolean;
|
|
176
|
+
}
|
|
176
177
|
/**
|
|
177
178
|
* Runs `primitive --env <name> config push --yes` as a separate invocation of
|
|
178
179
|
* this same CLI, the command a developer would type, and returns its exit
|
|
179
|
-
* code
|
|
180
|
-
* stays one
|
|
180
|
+
* code and whether a failure was transient (`push-failure-report.ts`). Its
|
|
181
|
+
* output passes through; under `--json` it goes to stderr so stdout stays one
|
|
182
|
+
* JSON document.
|
|
181
183
|
*/
|
|
182
184
|
export declare function runFirstPush(name: string, options?: {
|
|
183
185
|
json?: boolean;
|
|
184
|
-
}):
|
|
186
|
+
}): FirstPushRun;
|
|
187
|
+
/** How the first push ended: the last run's exit code, after how many runs. */
|
|
188
|
+
export interface FirstPushOutcome {
|
|
189
|
+
exitCode: number;
|
|
190
|
+
attempts: number;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Runs the first push, and runs it again after a transient failure, waiting
|
|
194
|
+
* `TRANSIENT_RETRY_DELAYS_MS` between runs: four runs at most. Running it
|
|
195
|
+
* again is safe, since a push applies only what the server does not hold yet.
|
|
196
|
+
* A failure that is not transient is returned at once. `onRetry` is told the
|
|
197
|
+
* wait and the number of the run about to start; `run` and `sleep` are
|
|
198
|
+
* replaced in tests.
|
|
199
|
+
*/
|
|
200
|
+
export declare function runFirstPushWithRetry(name: string, options?: {
|
|
201
|
+
json?: boolean;
|
|
202
|
+
onRetry?: (delayMs: number, attempt: number) => void;
|
|
203
|
+
run?: (name: string, options: {
|
|
204
|
+
json?: boolean;
|
|
205
|
+
}) => FirstPushRun;
|
|
206
|
+
sleep?: (ms: number) => Promise<void>;
|
|
207
|
+
delaysMs?: readonly number[];
|
|
208
|
+
}): Promise<FirstPushOutcome>;
|
|
@@ -7,21 +7,26 @@
|
|
|
7
7
|
* the committed environment whose `primitive/<tree>/` it shares — its parent.
|
|
8
8
|
* This module owns everything the verbs do to this machine around the server
|
|
9
9
|
* calls: finding the parent of the current environment, registering a child
|
|
10
|
-
* (baseline,
|
|
11
|
-
*
|
|
10
|
+
* (baseline, entry), finding entries whose child is gone, and removing a
|
|
11
|
+
* deleted child's local state. A child has no login of its own: it uses its
|
|
12
|
+
* parent's (#4511, `credentials-store.ts`).
|
|
12
13
|
*
|
|
13
14
|
* Local state is always related to a server child by APP ID, never by name. A
|
|
14
15
|
* local name is unique per checkout, while a slug is unique per parent, so an
|
|
15
16
|
* entry named `feature-x` may hold another parent's `feature-x`.
|
|
16
17
|
*/
|
|
17
18
|
import { execFileSync, spawnSync } from "child_process";
|
|
18
|
-
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
19
|
+
import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
20
|
+
import { tmpdir } from "os";
|
|
19
21
|
import { dirname, join } from "path";
|
|
20
22
|
import { PROJECT_TREE_DIR, projectRootForConfigPath, readCoreProjectConfig, readLocalState, } from "./env-resolver-core.js";
|
|
21
23
|
import { getProjectConfig, requireCurrentEnvironment, } from "./env-resolver.js";
|
|
22
24
|
import { removeLocalEnvironment, writeLocalEnvironment } from "./local-state.js";
|
|
23
|
-
import {
|
|
25
|
+
import { PUSH_FAILURE_REPORT_ENV, readPushFailureReport } from "./push-failure-report.js";
|
|
26
|
+
import { TRANSIENT_RETRY_DELAYS_MS } from "./transient-retry.js";
|
|
27
|
+
import { removeCredentialsSlotInProject } from "./credentials-store.js";
|
|
24
28
|
import { localBackupsRootFor, localSyncStatePathFor, syncStateReadPath, } from "./sync-paths.js";
|
|
29
|
+
import { varsOverrideFileName } from "./vars-override.js";
|
|
25
30
|
const trimSlash = (url) => url.replace(/\/+$/, "");
|
|
26
31
|
/**
|
|
27
32
|
* The parent of the current environment: the committed environment named by
|
|
@@ -135,38 +140,27 @@ export class ChildRegistrationError extends Error {
|
|
|
135
140
|
}
|
|
136
141
|
/**
|
|
137
142
|
* Registers a child as the machine-local environment `name`: its baseline
|
|
138
|
-
* (seeded as {@link seedChildBaseline} does),
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
143
|
+
* (seeded as {@link seedChildBaseline} does), then the `.primitive/local.json`
|
|
144
|
+
* entry, which is the commit point. No credentials slot is written: the child
|
|
145
|
+
* uses its parent's login. When the entry cannot be written the baseline is
|
|
146
|
+
* removed, so no half-registered child is left, and a
|
|
142
147
|
* {@link ChildRegistrationError} naming the app id is thrown.
|
|
143
|
-
*
|
|
144
|
-
* Under `PRIMITIVE_TOKEN` no slot is written (`loginCopied: false`): the
|
|
145
|
-
* token stays in the environment, and the child is reached with it too.
|
|
146
148
|
*/
|
|
147
149
|
export function registerChildEnvironment(input) {
|
|
148
150
|
const projectRoot = projectRootForConfigPath(input.configPath);
|
|
149
151
|
let baselinePath = null;
|
|
150
|
-
let slotWritten = false;
|
|
151
152
|
try {
|
|
152
153
|
const seeded = seedChildBaseline(projectRoot, input.tree, input.name, input.parentAppId, input.apiUrl);
|
|
153
154
|
baselinePath = seeded.path;
|
|
154
|
-
const loginCopied = input.credentials.source !== "env";
|
|
155
|
-
if (loginCopied) {
|
|
156
|
-
seedCredentialsForEnvInProject(projectRoot, input.name, input.credentials);
|
|
157
|
-
slotWritten = true;
|
|
158
|
-
}
|
|
159
155
|
writeLocalEnvironment(input.configPath, input.name, {
|
|
160
156
|
apiUrl: input.apiUrl,
|
|
161
157
|
appId: input.appId,
|
|
162
158
|
...(input.appName !== undefined ? { appName: input.appName } : {}),
|
|
163
159
|
tree: input.tree,
|
|
164
160
|
});
|
|
165
|
-
return { baselineSource: seeded.source
|
|
161
|
+
return { baselineSource: seeded.source };
|
|
166
162
|
}
|
|
167
163
|
catch (err) {
|
|
168
|
-
if (slotWritten)
|
|
169
|
-
clearCredentialsForEnvInProject(projectRoot, input.name);
|
|
170
164
|
if (baselinePath)
|
|
171
165
|
rmSync(baselinePath, { force: true });
|
|
172
166
|
throw new ChildRegistrationError(`Could not register child app ${input.appId} as the machine-local environment "${input.name}": ${err?.message || String(err)}`, input.appId);
|
|
@@ -174,8 +168,10 @@ export function registerChildEnvironment(input) {
|
|
|
174
168
|
}
|
|
175
169
|
/**
|
|
176
170
|
* Removes this machine's state for the app `appId`: for every machine-local
|
|
177
|
-
* entry holding it,
|
|
178
|
-
*
|
|
171
|
+
* entry holding it, any credentials slot it kept from before children used
|
|
172
|
+
* their parent's login, its baseline, its backups, its vars
|
|
173
|
+
* override file in its tree and last the entry (clearing a selection naming
|
|
174
|
+
* it). The entry goes last because it
|
|
179
175
|
* is what identifies the rest: when an earlier removal fails the entry stays
|
|
180
176
|
* and the record carries `failure`, so a rerun can finish the job. Entries
|
|
181
177
|
* holding other apps are untouched whatever they are named. Returns one record
|
|
@@ -187,6 +183,7 @@ export function removeLocalStateForApp(configPath, appId) {
|
|
|
187
183
|
return localEntriesForApp(configPath, appId).map(({ name, entry }) => {
|
|
188
184
|
const baseline = localSyncStatePathFor(projectRoot, name);
|
|
189
185
|
const backups = localBackupsRootFor(projectRoot, name);
|
|
186
|
+
const override = join(projectRoot, PROJECT_TREE_DIR, entry.tree, varsOverrideFileName(name));
|
|
190
187
|
const record = {
|
|
191
188
|
name,
|
|
192
189
|
tree: entry.tree,
|
|
@@ -195,6 +192,7 @@ export function removeLocalStateForApp(configPath, appId) {
|
|
|
195
192
|
loginRemoved: false,
|
|
196
193
|
baselineRemoved: false,
|
|
197
194
|
backupsRemoved: false,
|
|
195
|
+
overrideRemoved: false,
|
|
198
196
|
};
|
|
199
197
|
let step = "login";
|
|
200
198
|
try {
|
|
@@ -205,6 +203,9 @@ export function removeLocalStateForApp(configPath, appId) {
|
|
|
205
203
|
step = "backups";
|
|
206
204
|
record.backupsRemoved = existsSync(backups);
|
|
207
205
|
rmSync(backups, { recursive: true, force: true });
|
|
206
|
+
step = "vars override";
|
|
207
|
+
record.overrideRemoved = existsSync(override);
|
|
208
|
+
rmSync(override, { force: true });
|
|
208
209
|
step = "entry";
|
|
209
210
|
record.entryRemoved = removeLocalEnvironment(configPath, name);
|
|
210
211
|
record.selectionCleared = record.entryRemoved && selected === name;
|
|
@@ -214,6 +215,8 @@ export function removeLocalStateForApp(configPath, appId) {
|
|
|
214
215
|
record.baselineRemoved = false;
|
|
215
216
|
if (step === "backups")
|
|
216
217
|
record.backupsRemoved = false;
|
|
218
|
+
if (step === "vars override")
|
|
219
|
+
record.overrideRemoved = false;
|
|
217
220
|
record.failure = `could not remove its ${step}: ${err?.message || String(err)}`;
|
|
218
221
|
}
|
|
219
222
|
return record;
|
|
@@ -268,15 +271,50 @@ export function firstPushArgs(name, execArgv = process.execArgv, entry = process
|
|
|
268
271
|
/**
|
|
269
272
|
* Runs `primitive --env <name> config push --yes` as a separate invocation of
|
|
270
273
|
* this same CLI, the command a developer would type, and returns its exit
|
|
271
|
-
* code
|
|
272
|
-
* stays one
|
|
274
|
+
* code and whether a failure was transient (`push-failure-report.ts`). Its
|
|
275
|
+
* output passes through; under `--json` it goes to stderr so stdout stays one
|
|
276
|
+
* JSON document.
|
|
273
277
|
*/
|
|
274
278
|
export function runFirstPush(name, options = {}) {
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
279
|
+
const dir = mkdtempSync(join(tmpdir(), "primitive-first-push-"));
|
|
280
|
+
const reportPath = join(dir, "report.json");
|
|
281
|
+
try {
|
|
282
|
+
const result = spawnSync(process.execPath, firstPushArgs(name), {
|
|
283
|
+
stdio: ["ignore", options.json ? 2 : "inherit", "inherit"],
|
|
284
|
+
env: { ...process.env, [PUSH_FAILURE_REPORT_ENV]: reportPath },
|
|
285
|
+
});
|
|
286
|
+
if (result.error)
|
|
287
|
+
throw result.error;
|
|
288
|
+
const exitCode = result.status ?? 1;
|
|
289
|
+
return {
|
|
290
|
+
exitCode,
|
|
291
|
+
transient: exitCode !== 0 && readPushFailureReport(reportPath)?.transient === true,
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
finally {
|
|
295
|
+
rmSync(dir, { recursive: true, force: true });
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Runs the first push, and runs it again after a transient failure, waiting
|
|
300
|
+
* `TRANSIENT_RETRY_DELAYS_MS` between runs: four runs at most. Running it
|
|
301
|
+
* again is safe, since a push applies only what the server does not hold yet.
|
|
302
|
+
* A failure that is not transient is returned at once. `onRetry` is told the
|
|
303
|
+
* wait and the number of the run about to start; `run` and `sleep` are
|
|
304
|
+
* replaced in tests.
|
|
305
|
+
*/
|
|
306
|
+
export async function runFirstPushWithRetry(name, options = {}) {
|
|
307
|
+
const run = options.run ?? runFirstPush;
|
|
308
|
+
const sleep = options.sleep ?? ((ms) => new Promise((done) => setTimeout(done, ms)));
|
|
309
|
+
const delaysMs = options.delaysMs ?? TRANSIENT_RETRY_DELAYS_MS;
|
|
310
|
+
for (let attempts = 1;; attempts++) {
|
|
311
|
+
const result = run(name, { json: options.json });
|
|
312
|
+
if (result.exitCode === 0 || !result.transient || attempts > delaysMs.length) {
|
|
313
|
+
return { exitCode: result.exitCode, attempts };
|
|
314
|
+
}
|
|
315
|
+
const delayMs = delaysMs[attempts - 1];
|
|
316
|
+
options.onRetry?.(delayMs, attempts + 1);
|
|
317
|
+
await sleep(delayMs);
|
|
318
|
+
}
|
|
281
319
|
}
|
|
282
320
|
//# sourceMappingURL=child-apps-local.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"child-apps-local.js","sourceRoot":"","sources":["../../../src/lib/child-apps-local.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"child-apps-local.js","sourceRoot":"","sources":["../../../src/lib/child-apps-local.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC7F,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAGrC,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,cAAc,GAEf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,gBAAgB,EAChB,yBAAyB,GAE1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAC1F,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAoB1D,MAAM,SAAS,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAE3D;;;;;;;;;GASG;AACH,MAAM,UAAU,wBAAwB;IACtC,MAAM,OAAO,GAAG,yBAAyB,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AAC,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,QAAQ,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;YAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC;QACjD,CAAC;QACD,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;QACvC,OAAO,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,GAAG,CAAC,CAAC,CAAC;QACzC,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -37,6 +37,11 @@
|
|
|
37
37
|
* `primitive login` reach the same line, so there is no flag shape for a
|
|
38
38
|
* pre-parse to miss. And it only PERMITS the global file — inside a project
|
|
39
39
|
* all four still use the per-environment slots.
|
|
40
|
+
*
|
|
41
|
+
* A child environment (#4511) — a machine-local environment on the server of
|
|
42
|
+
* the committed environment whose tree it shares — has no slot of its own: it
|
|
43
|
+
* reads and writes its parent's, so one login and one logout cover the parent
|
|
44
|
+
* and all of its children.
|
|
40
45
|
*/
|
|
41
46
|
import type { Credentials } from "../types/index.js";
|
|
42
47
|
export declare const PROJECT_LOCAL_DIR = ".primitive";
|
|
@@ -71,26 +76,56 @@ export declare function environmentToken(): string | null;
|
|
|
71
76
|
*
|
|
72
77
|
* In project mode, we blend the per-env stored creds with the serverUrl
|
|
73
78
|
* and appId from primitive/config.json to produce the Credentials the rest of
|
|
74
|
-
* the CLI expects.
|
|
79
|
+
* the CLI expects. A child environment reads its parent's slot (#4511), and
|
|
80
|
+
* any child slot found to be a copy of that login is removed.
|
|
75
81
|
*
|
|
76
82
|
* `PRIMITIVE_TOKEN` (#3890), when set, takes precedence over any stored
|
|
77
83
|
* login and no file is read. It does not loosen the outside-a-project
|
|
78
84
|
* refusal: the environment is resolved first, exactly as for a stored login.
|
|
79
85
|
*/
|
|
80
86
|
export declare function loadCredentialsStore(): Credentials | null;
|
|
87
|
+
/**
|
|
88
|
+
* The environments that share the current environment's login (#4511): the
|
|
89
|
+
* one whose slot holds it, and its child environments on this machine. Null
|
|
90
|
+
* outside a project, where there is one global login.
|
|
91
|
+
*/
|
|
92
|
+
export declare function loginEnvironments(): {
|
|
93
|
+
parent: string;
|
|
94
|
+
children: string[];
|
|
95
|
+
} | null;
|
|
96
|
+
/**
|
|
97
|
+
* The logins still held in the slots of the current login's child
|
|
98
|
+
* environments: sessions signed in to a child before children used their
|
|
99
|
+
* parent's login, and copies of the parent's that kept a step-up or a refresh
|
|
100
|
+
* token of their own. No command reads them; `logout` revokes them before
|
|
101
|
+
* {@link clearLeftoverChildLogins} removes them. Empty outside a project.
|
|
102
|
+
*/
|
|
103
|
+
export declare function leftoverChildLogins(): Credentials[];
|
|
81
104
|
/**
|
|
82
105
|
* Saves credentials. In project mode, writes to the per-env slot in the
|
|
83
106
|
* project credentials file. In legacy mode, writes the global file.
|
|
84
107
|
*
|
|
85
108
|
* The serverUrl on the incoming Credentials is used as-is for legacy
|
|
86
|
-
* mode, and ignored in project mode (the env's apiUrl is canonical).
|
|
109
|
+
* mode, and ignored in project mode (the env's apiUrl is canonical). In a
|
|
110
|
+
* child environment the parent's slot is written (#4511).
|
|
87
111
|
*/
|
|
88
112
|
export declare function saveCredentialsStore(credentials: Credentials): void;
|
|
89
113
|
/**
|
|
90
114
|
* Clears credentials for the current environment (project mode) or
|
|
91
|
-
* deletes the legacy file (legacy mode).
|
|
115
|
+
* deletes the legacy file (legacy mode). In project mode that is the slot
|
|
116
|
+
* holding the environment's login, whichever environment of the tree is
|
|
117
|
+
* current, and the child slots holding only that login's session (#4511),
|
|
118
|
+
* which its caller has just revoked. A child slot holding another session or
|
|
119
|
+
* a step-up of its own stays for `logout` to revoke
|
|
120
|
+
* ({@link clearLeftoverChildLogins}).
|
|
92
121
|
*/
|
|
93
122
|
export declare function clearCredentialsStore(): void;
|
|
123
|
+
/**
|
|
124
|
+
* Removes every slot the current login's child environments kept, once
|
|
125
|
+
* `logout` has revoked the logins {@link leftoverChildLogins} returned. No-op
|
|
126
|
+
* outside a project.
|
|
127
|
+
*/
|
|
128
|
+
export declare function clearLeftoverChildLogins(): void;
|
|
94
129
|
/**
|
|
95
130
|
* Removes the credentials slot for the named environment in a specific
|
|
96
131
|
* project's credentials file. Used by `env remove` so stale tokens from a
|