@plexus-ms/lib 0.115.0 → 0.117.0

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/propagate.js CHANGED
@@ -1,361 +1,49 @@
1
- // propagate: bring every consumer of the presets up to a train (§ 3 PLX-Updates),
2
- // as one pull request per consumer.
1
+ // propagate: `update` in every repo generated from the presets under a
2
+ // directory (§ 3 PLX-Updates). The operator's convenience over the verb, for
3
+ // whoever has many repos checked out side by side, the maintainers or a
4
+ // tenant's own operator: it needs no checkout of the upstream, reads the
5
+ // published trains like `update` does, and obeys the same triggers. A repo
6
+ // that needs no train rests; `now` or a named train asks for every repo at
7
+ // once, which is how a hotfix reaches the repos that need it.
3
8
  //
4
- // Each consumer is cloned from its origin at the branch the train lands on
5
- // (consumers.ts) into a scratch directory; there `copier update` runs at the
6
- // version plx pins (copier.ts) at every site (the repo root, then its apps/*),
7
- // the marker is synced to the answers file, the lockfile refreshed where
8
- // manifests moved, the hand-owned workflows pinned to the train; then one
9
- // commit, pushed as `plexus/<version>`, and a pull request against the branch.
10
- // A conflict is committed with its markers and reported, and the pull request
11
- // is opened all the same: that is where it gets resolved. Propagation never
12
- // aborts the run: a failing or conflicting consumer is recorded and the rest
13
- // continues; the summary says what needs a human. Reviewing and merging the
14
- // pull requests stays human.
9
+ // Each repo is handled by `update` (update.ts) in a worktree of the branch the
10
+ // train lands on, so the checkouts stay as they are. Nothing aborts the run: a
11
+ // repo that fails is recorded and the rest continues; the summary says what
12
+ // rests, what is clean, conflicted or failed, and the pull requests.
15
13
  //
16
- // The dry run is an honest preview: the same clones, copier-updated from the
17
- // LOCAL preset checkout at main, so the diff and any conflicts show before a
18
- // tag exists; nothing is committed, pushed or opened. The scratch work goes
19
- // through `Context.stage`: performed in every mode, since nothing the operator
20
- // owns changes.
21
- //
22
- // The per-consumer work (`takeTrain`) is shared with `update` (update.ts), the
23
- // same pull request opened from inside the consumer itself.
24
- //
25
- // plx propagate ~/dev # to the current train
26
- // plx -n propagate ~/dev # preview in scratch clones
27
- // plx -y propagate ~/dev --train 0.66.0 # unattended: copier takes defaults
28
- import { join, relative } from 'node:path';
29
- import { bumpWorkflowRefs, hasConflictMarkers, hasUnmergedEntries, syncMarker, WORKFLOW_REF } from "./bookkeeping.js";
30
- import { findConsumers, presetSource, RENAMED_PRESETS } from "./consumers.js";
31
- import { ANSWERS_FILE, copierVia, parseAnswers } from "./copier.js";
32
- import { run, write } from "./effects.js";
33
- import { MARKER_FILE } from "./marker.js";
14
+ // plx propagate ~/dev # every repo that needs the newest train
15
+ // plx propagate ~/dev --now # every repo, whatever its triggers say
16
+ // plx -n propagate ~/dev --now # preview in worktrees, push nothing
17
+ // plx -y propagate ~/dev --train 0.66.0
18
+ import { findConsumers, PRESETS, presetSource } from "./consumers.js";
34
19
  import { overview } from "./overview.js";
35
- import { TRAIN_REPOS, UPSTREAM } from "./train.js";
36
- /** True when nothing in the summary needs a human but the pull requests. */
37
- export const isClean = (s) => s.conflicted.length === 0 && s.failed.length === 0 && s.skipped.length === 0;
38
- export const emptySummary = (train, preview) => ({
39
- train,
40
- preview,
41
- clean: [],
42
- conflicted: [],
43
- failed: [],
44
- skipped: [],
45
- pulls: [],
46
- });
47
- export const trainBranch = (train) => `plexus/${train}`;
48
- /**
49
- * copier at the version plx pins, through mise, with the consumer's own mise
50
- * config ignored: copier needs no project tool, and a root `mise.toml` left
51
- * with conflict markers by the root site's update would otherwise fail every
52
- * later mise call in the directory, the apps' updates first of all.
53
- */
54
- const copierIn = (dir, args) => [
55
- 'env',
56
- [`MISE_IGNORED_CONFIG_PATHS=${dir}`, 'mise', ...copierVia(args)],
57
- ];
58
- export async function propagate(ctx, workspace, train) {
59
- const summary = emptySummary(train, ctx.dryRun);
60
- const upstream = join(workspace, UPSTREAM);
61
- const tree = await overview(ctx, workspace);
62
- const upstreamDir = tree.children.find((c) => c.path === upstream);
63
- const presets = TRAIN_REPOS.filter((r) => upstreamDir?.children.some((c) => c.name === r && c.template));
64
- const consumers = await findConsumers(ctx, tree, presets);
65
- for (const c of consumers) {
66
- if (!c.skipped)
20
+ import { detail, emptySummary, mergeSummary } from "./take.js";
21
+ import { isTrainVersion, UsageError } from "./train.js";
22
+ import { update } from "./update.js";
23
+ export async function propagate(ctx, options) {
24
+ const { dir, ...rest } = options;
25
+ if (options.train !== undefined && !isTrainVersion(options.train))
26
+ throw new UsageError(`'${options.train}' is not plain semver (X.Y.Z, no v)`);
27
+ const summary = emptySummary(options.train ?? '', ctx.dryRun);
28
+ const consumers = await findConsumers(ctx, await overview(ctx, dir), PRESETS);
29
+ if (consumers.length === 0)
30
+ ctx.say(`• no repo generated from ${PRESETS.map(presetSource).join(', ')} found under ${dir}`);
31
+ for (const consumer of consumers) {
32
+ if (consumer.skipped) {
33
+ ctx.say(`⚠ ${consumer.rel}: ${consumer.skipped} — skipped (fix it, then re-run propagate)`);
34
+ summary.skipped.push({ path: consumer.rel, reason: consumer.skipped });
67
35
  continue;
68
- ctx.say(`⚠ ${c.rel}: ${c.skipped} — skipped (fix it, then re-run propagate)`);
69
- summary.skipped.push({ path: c.rel, reason: c.skipped });
70
- }
71
- for (const preset of presets)
72
- if (!consumers.some((c) => c.sites.some((s) => s.preset === preset)))
73
- ctx.say(`• no consumers of ${presetSource(preset)} found under ${workspace}`);
74
- const take = { train, opener: '`plx ship`', ...(ctx.dryRun ? { previewFrom: upstream } : {}) };
75
- const scratch = (await ctx.stage(run('mktemp', ['-d'])))?.trim() ?? '';
76
- try {
77
- for (const consumer of consumers) {
78
- if (consumer.skipped || !consumer.origin)
79
- continue;
80
- const clone = join(scratch, consumer.rel);
81
- ctx.say(`→ ${consumer.rel}: clone ${consumer.origin} at ${consumer.branch}`);
82
- try {
83
- await ctx.stage(run('git', ['clone', '--quiet', '--branch', consumer.branch, consumer.origin, clone]));
84
- }
85
- catch (error) {
86
- ctx.say(` ✗ FAILED — clone${detail(error)}`);
87
- summary.failed.push(consumer.rel);
88
- continue;
89
- }
90
- await takeTrain(ctx, consumer, clone, take, summary);
91
36
  }
92
- }
93
- finally {
94
- if (scratch)
95
- await ctx.stage(run('rm', ['-rf', scratch]));
96
- }
97
- return summary;
98
- }
99
- /**
100
- * One consumer takes the train in `dir`, a scratch checkout of its branch:
101
- * every site updated, the lockfile refreshed, the workflow refs bumped, then
102
- * the commit, the branch and the pull request.
103
- */
104
- export async function takeTrain(ctx, consumer, dir, take, summary) {
105
- const base = (await ctx.read('git', ['rev-parse', 'HEAD'], { cwd: dir })).trim();
106
- for (const site of consumer.sites)
107
- await updateSite(ctx, consumer, site, dir, take, summary);
108
- await refreshLockfile(ctx, consumer, dir, base, summary);
109
- await bumpConsumerRefs(ctx, consumer, dir, take.train);
110
- await openPull(ctx, consumer, dir, take, summary);
111
- }
112
- // Preview commits are plain plumbing on a throwaway clone: unsigned, no hooks, a stand-in identity.
113
- const previewCommit = (ctx, dir, message) => ctx
114
- .stage(run('git', ['add', '-A'], { cwd: dir }))
115
- .then(() => ctx.stage(run('git', [
116
- '-c',
117
- 'commit.gpgsign=false',
118
- '-c',
119
- 'user.name=plx',
120
- '-c',
121
- 'user.email=plx@localhost',
122
- 'commit',
123
- '--quiet',
124
- '--no-verify',
125
- '--allow-empty',
126
- '-m',
127
- message,
128
- ], { cwd: dir })));
129
- async function updateSite(ctx, consumer, site, dir, take, summary) {
130
- const target = join(dir, relative(consumer.path, site.path));
131
- try {
132
- if (take.previewFrom) {
133
- const localPreset = join(take.previewFrom, site.preset);
134
- ctx.say(`→ ${site.rel}: copier update (preview from ${localPreset}@main)`);
135
- // Point the answers at the local preset so the preview reads it; copier
136
- // refuses a dirty subproject, hence the commit.
137
- const answers = await ctx.readFile(join(target, ANSWERS_FILE));
138
- await ctx.stage(write(join(target, ANSWERS_FILE), answers.replace(/^_src_path: .*$/m, `_src_path: ${localPreset}`)));
139
- await previewCommit(ctx, dir, `plx preview: ${site.rel} reads ${localPreset} from the local checkout`);
140
- await ctx.stage(run(...copierIn(dir, ['update', '--skip-answered', '--trust', '--defaults', '--skip-tasks', '--vcs-ref', 'main']), { cwd: target }));
37
+ try {
38
+ const one = await update(ctx, { repo: consumer.path, name: consumer.rel, ...rest });
39
+ mergeSummary(summary, one);
40
+ summary.train ||= one.train;
141
41
  }
142
- else {
143
- ctx.say(`→ ${site.rel}: copier update${take.ref ? ` to ${take.ref}` : ''}`);
144
- // A preset renamed on a train: the answers still name the old source,
145
- // which copier would clone through the forge's redirect; point them at
146
- // the current name first, committed because copier refuses a dirty
147
- // subproject.
148
- const answers = await ctx.readFile(join(target, ANSWERS_FILE));
149
- const current = presetSource(site.preset);
150
- const recorded = /^_src_path: (.*)$/m.exec(answers)?.[1];
151
- if (recorded &&
152
- recorded !== current &&
153
- Object.keys(RENAMED_PRESETS).some((old) => presetSource(old) === recorded)) {
154
- ctx.say(` ${site.rel}: the preset is ${current} now; the answers follow`);
155
- await ctx.stage(write(join(target, ANSWERS_FILE), answers.replace(/^_src_path: .*$/m, `_src_path: ${current}`)));
156
- await previewCommit(ctx, dir, `plx: ${site.rel} reads ${current}, the preset's name since its rename`);
157
- }
158
- // Template tasks (mise install, hook setup) serve a developer's checkout,
159
- // not a pull request. Unattended, a new question takes its default; on a
160
- // terminal copier asks. A dry run previews on the scratch checkout, so
161
- // the step is staged there rather than only announced.
162
- const args = [
163
- 'update',
164
- '--skip-answered',
165
- '--trust',
166
- '--skip-tasks',
167
- ...(take.ref ? ['--vcs-ref', take.ref] : []),
168
- ...(ctx.yes || ctx.dryRun ? ['--defaults'] : []),
169
- ];
170
- const step = run(...copierIn(dir, args), { cwd: target, interactive: !ctx.dryRun });
171
- if (ctx.dryRun)
172
- await ctx.stage(step);
173
- else
174
- await ctx.apply([step]);
42
+ catch (error) {
43
+ ctx.say(` ✗ FAILED — ${consumer.rel}${detail(error)}`);
44
+ summary.failed.push(consumer.rel);
175
45
  }
176
46
  }
177
- catch (error) {
178
- ctx.say(` ✗ FAILED — copier update exited nonzero${detail(error)}`);
179
- summary.failed.push(site.rel);
180
- return;
181
- }
182
- // copier applies the template diff with `git apply --3way`, which leaves
183
- // unmerged index entries and inline markers when a hunk does not apply.
184
- // Scoped to the site: the root site's changes are still in the tree when
185
- // its apps are updated.
186
- const status = await ctx.read('git', ['status', '--porcelain', '--', '.'], { cwd: target });
187
- let conflict = hasUnmergedEntries(status);
188
- const changed = (await ctx.read('git', ['diff', '--name-only', '--relative', '--', '.'], { cwd: target }))
189
- .split('\n')
190
- .filter(Boolean);
191
- for (const f of changed) {
192
- const text = await ctx.readFile(join(target, f)).catch(() => '');
193
- if (hasConflictMarkers(text))
194
- conflict = true;
195
- }
196
- await syncSiteMarker(ctx, site, target);
197
- if (conflict) {
198
- ctx.say(' ✗ CONFLICTS — committed with their <<<<<<< markers, to resolve in the pull request:');
199
- summary.conflicted.push(site.rel);
200
- }
201
- else {
202
- ctx.say(' ✓ merged clean:');
203
- summary.clean.push(site.rel);
204
- }
205
- for (const line of status.split('\n').filter(Boolean))
206
- ctx.say(` ${line}`);
207
- // Each preview-from-local site is committed so the next site's answers
208
- // rewrite starts from a clean tree. Otherwise the site is staged: a conflict
209
- // leaves unmerged index entries, and copier's own git plumbing (`git
210
- // write-tree`) refuses an index with those, so the next site's update would
211
- // fail; staged, the markers are in the tree and the index is whole.
212
- if (take.previewFrom)
213
- await previewCommit(ctx, dir, `plx preview: ${site.rel} updated`);
214
- else
215
- await ctx.stage(run('git', ['add', '-A'], { cwd: dir }));
216
- }
217
- /** The marker's `plexus` follows the answers file's `_commit` after an update (bookkeeping.ts). */
218
- async function syncSiteMarker(ctx, site, target) {
219
- const marker = await ctx.readFile(join(target, MARKER_FILE)).catch(() => undefined);
220
- if (marker === undefined)
221
- return;
222
- const { commit } = parseAnswers(await ctx.readFile(join(target, ANSWERS_FILE)));
223
- if (!commit)
224
- return;
225
- const synced = syncMarker(marker, commit);
226
- if (synced === marker)
227
- return;
228
- ctx.say(` marker: plexus → ${commit} in ${site.rel}/${MARKER_FILE}`);
229
- await ctx.stage(write(join(target, MARKER_FILE), synced));
230
- }
231
- /** Refresh the lockfile when the updates touched a manifest (`mise exec` trusts the directory's own config). */
232
- async function refreshLockfile(ctx, consumer, dir, base, summary) {
233
- if ((await ctx.readFile(join(dir, 'pnpm-workspace.yaml')).catch(() => undefined)) === undefined)
234
- return;
235
- const manifests = ['*package.json', 'pnpm-workspace.yaml'];
236
- const unchanged = await ctx
237
- .read('git', ['diff', '--quiet', base, '--', ...manifests], { cwd: dir })
238
- .then(() => true)
239
- .catch(() => false);
240
- if (unchanged)
241
- return;
242
- ctx.say(`→ ${consumer.rel}: pnpm install (manifests changed)`);
243
- try {
244
- await ctx.apply([run('mise', ['exec', '--', 'pnpm', 'install', '--reporter=silent'], { cwd: dir })]);
245
- }
246
- catch (error) {
247
- ctx.say(` ✗ pnpm install failed${detail(error)}`);
248
- summary.failed.push(`${consumer.rel}/pnpm-lock.yaml`);
249
- }
250
- }
251
- /** Consumers' hand-owned workflows pin the reusable workflows by tag; lockstep them to the train. */
252
- async function bumpConsumerRefs(ctx, consumer, dir, train) {
253
- const workflows = join(dir, '.github', 'workflows');
254
- const entries = await ctx.readDir(workflows).catch(() => []);
255
- const files = entries
256
- .filter((e) => !e.directory && /\.ya?ml$/.test(e.name))
257
- .map((e) => e.name)
258
- .sort();
259
- for (const f of files) {
260
- const text = await ctx.readFile(join(workflows, f));
261
- if (!text.includes(WORKFLOW_REF))
262
- continue;
263
- const bumped = bumpWorkflowRefs(text, train);
264
- if (bumped === text)
265
- continue;
266
- ctx.say(`→ ${consumer.rel}: ${f} workflow refs → @${train}`);
267
- await ctx.stage(write(join(workflows, f), bumped));
268
- }
269
- }
270
- /** The URL of the open pull request from the train branch against the consumer's branch, if any. */
271
- export async function openPullUrl(ctx, consumer, dir, train) {
272
- const args = ['pr', 'list', '--head', trainBranch(train), '--base', consumer.branch, '--state', 'open'];
273
- return (await ctx.read('gh', [...args, '--json', 'url', '--jq', '.[0].url'], { cwd: dir }).catch(() => '')).trim();
274
- }
275
- /**
276
- * One commit, the train branch pushed, and a pull request against the
277
- * consumer's branch: opened once, found again on a re-run. The branch is plx's
278
- * own, so a re-run may move it, with a lease on what it fetched. Hooks are
279
- * skipped: the checks are the pull request's job, and the mount's own
280
- * checkout may carry the repo's hooks.
281
- */
282
- async function openPull(ctx, consumer, dir, take, summary) {
283
- const { train } = take;
284
- const branch = trainBranch(train);
285
- if (ctx.dryRun) {
286
- ctx.say(` (preview) ${consumer.rel}: would commit, push ${branch} and open a pull request against ${consumer.branch}`);
287
- return;
288
- }
289
- if ((await ctx.read('git', ['status', '--porcelain'], { cwd: dir })).trim() === '') {
290
- ctx.say(`• ${consumer.rel}: nothing changed — no pull request`);
291
- return;
292
- }
293
- const head = `${consumer.origin ?? 'origin'} ${branch}`;
294
- try {
295
- await ctx.apply([
296
- run('git', ['add', '-A'], { cwd: dir }),
297
- run('git', ['commit', '--quiet', '--no-verify', '-m', `chore: train ${train}`], { cwd: dir }),
298
- ]);
299
- // The lease needs the remote-tracking ref; a fresh clone has none for a branch it did not check out.
300
- await ctx
301
- .read('git', ['fetch', '--quiet', 'origin', `+refs/heads/${branch}:refs/remotes/origin/${branch}`], {
302
- cwd: dir,
303
- })
304
- .catch(() => '');
305
- await ctx.apply([
306
- run('git', ['push', '--quiet', '--no-verify', '--force-with-lease', 'origin', `HEAD:refs/heads/${branch}`], {
307
- cwd: dir,
308
- }),
309
- ]);
310
- }
311
- catch (error) {
312
- ctx.say(` ✗ FAILED — push to ${head}${detail(error)}`);
313
- summary.failed.push(consumer.rel);
314
- return;
315
- }
316
- const existing = await openPullUrl(ctx, consumer, dir, train);
317
- if (existing) {
318
- ctx.say(`• ${consumer.rel}: pull request updated: ${existing}`);
319
- summary.pulls.push(existing);
320
- return;
321
- }
322
- const sites = consumer.sites.map((s) => s.rel);
323
- const conflicted = sites.filter((s) => summary.conflicted.includes(s));
324
- const body = [
325
- `Train ${train} (§ 1.5 PLX): \`copier update\` at ${sites.join(', ')}, the marker, the lockfile where manifests moved, and the workflow refs.`,
326
- conflicted.length > 0
327
- ? `Conflicts to resolve, committed with their markers: ${conflicted.join(', ')}.`
328
- : 'Merged clean at every site.',
329
- `Opened by ${take.opener}.`,
330
- ].join('\n\n');
331
- try {
332
- await ctx.apply([
333
- run('gh', [
334
- 'pr',
335
- 'create',
336
- '--base',
337
- consumer.branch,
338
- '--head',
339
- branch,
340
- '--title',
341
- `chore: train ${train}`,
342
- '--body',
343
- body,
344
- ], { cwd: dir }),
345
- ]);
346
- }
347
- catch (error) {
348
- ctx.say(` ✗ FAILED — pull request${detail(error)}`);
349
- summary.failed.push(consumer.rel);
350
- return;
351
- }
352
- const url = await openPullUrl(ctx, consumer, dir, train);
353
- ctx.say(`• ${consumer.rel}: pull request opened${url ? `: ${url}` : ''}`);
354
- summary.pulls.push(url || `${consumer.rel} ${branch}`);
47
+ return summary;
355
48
  }
356
- export const detail = (error) => {
357
- const message = error instanceof Error ? error.message : String(error);
358
- const last = message.trim().split('\n').at(-1) ?? '';
359
- return last && !/exited with/.test(last) ? `: ${last}` : '';
360
- };
361
49
  //# sourceMappingURL=propagate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"propagate.js","sourceRoot":"","sources":["../src/propagate.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,oCAAoC;AACpC,EAAE;AACF,2EAA2E;AAC3E,6EAA6E;AAC7E,+EAA+E;AAC/E,yEAAyE;AACzE,0EAA0E;AAC1E,+EAA+E;AAC/E,8EAA8E;AAC9E,4EAA4E;AAC5E,6EAA6E;AAC7E,4EAA4E;AAC5E,6BAA6B;AAC7B,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,4EAA4E;AAC5E,+EAA+E;AAC/E,gBAAgB;AAChB,EAAE;AACF,+EAA+E;AAC/E,4DAA4D;AAC5D,EAAE;AACF,iEAAiE;AACjE,sEAAsE;AACtE,8EAA8E;AAC9E,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,g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AgB,QAAQ,CAAC,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACxD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"self.d.ts","sourceRoot":"","sources":["../src/self.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAE7C,8GAA8G;AAC9G,wBAAsB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAUhF"}
1
+ {"version":3,"file":"self.d.ts","sourceRoot":"","sources":["../src/self.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAE7C,8GAA8G;AAC9G,wBAAsB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAUhF"}
package/dist/self.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"self.js","sourceRoot":"","sources":["../src/self.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAE7C,8GAA8G;AAC9G,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAY,EAAE,OAAe;IAC/D,MAAM,MAAM,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACjG,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,GAAG,CAAC,GAAG,CAAC,+CAA+C,YAAY,uBAAuB,OAAO,EAAE,CAAC,CAAC;QACrG,OAAO;IACT,CAAC;IACD,IAAI,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC;QACpC,MAAM,IAAI,KAAK,CACb,OAAO,OAAO,cAAc,MAAM,+DAA+D,YAAY,mBAAmB,YAAY,EAAE,CAC/I,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"self.js","sourceRoot":"","sources":["../src/self.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAE7C,8GAA8G;AAC9G,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAY,EAAE,OAAe;IAC/D,MAAM,MAAM,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACjG,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,GAAG,CAAC,GAAG,CAAC,+CAA+C,YAAY,uBAAuB,OAAO,EAAE,CAAC,CAAC;QACrG,OAAO;IACT,CAAC;IACD,IAAI,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC;QACpC,MAAM,IAAI,KAAK,CACb,OAAO,OAAO,cAAc,MAAM,+DAA+D,YAAY,mBAAmB,YAAY,EAAE,CAC/I,CAAC;AACN,CAAC"}
package/dist/ship.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Context } from './context.ts';
2
- import { type Summary } from './propagate.ts';
2
+ import { type Summary } from './take.ts';
3
3
  /** How the wait for npm between the phases behaves, in milliseconds. */
4
4
  export interface PublishWait {
5
5
  /** Between two polls of the registry. */
@@ -8,12 +8,10 @@ export interface PublishWait {
8
8
  timeout: number;
9
9
  }
10
10
  export interface ShipOptions {
11
- /** The workspace: the upstream umbrella and the consumers sit under it. */
11
+ /** The workspace: the upstream umbrella sits under it, and for the dry run's preview the consumers. */
12
12
  workspace: string;
13
- /** The train version; default: minor+1 over the latest, or the current one when only propagating. */
13
+ /** The train version; default: minor+1 over the latest. */
14
14
  train?: string;
15
- /** Skip the release; only propagate to the consumers. */
16
- propagateOnly?: boolean;
17
15
  /** The date stamped on the map, `YYYY-MM-DD`; default: today. */
18
16
  today?: string;
19
17
  /** The running plx's version: when given, refuse to run behind its newest release (self.ts). */
@@ -21,8 +19,8 @@ export interface ShipOptions {
21
19
  /** The publish wait's pacing; the defaults suit a real registry, tests shorten them. */
22
20
  wait?: Partial<PublishWait>;
23
21
  }
22
+ /** The train cut, and under a dry run what the preview found in the consumers; a real run's lists are empty. */
24
23
  export interface ShipResult extends Summary {
25
- /** The version released, or already current when only propagating. */
26
24
  released: boolean;
27
25
  }
28
26
  export declare function ship(ctx: Context, options: ShipOptions): Promise<ShipResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"ship.d.ts","sourceRoot":"","sources":["../src/ship.ts"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAAa,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAgBzD,wEAAwE;AACxE,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,WAAW,WAAW;IAC1B,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB,qGAAqG;IACrG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iEAAiE;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