@plexus-ms/lib 0.117.0 → 0.119.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/bookkeeping.d.ts +0 -37
- package/dist/bookkeeping.d.ts.map +1 -1
- package/dist/bookkeeping.js +4 -59
- package/dist/bookkeeping.js.map +1 -1
- package/dist/index.d.ts +4 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/requirements.js +1 -1
- package/dist/requirements.js.map +1 -1
- package/dist/summary.d.ts +10 -0
- package/dist/summary.d.ts.map +1 -0
- package/dist/summary.js +51 -0
- package/dist/summary.js.map +1 -0
- package/dist/take.d.ts +5 -1
- package/dist/take.d.ts.map +1 -1
- package/dist/take.js +18 -6
- package/dist/take.js.map +1 -1
- package/dist/train.d.ts +3 -65
- package/dist/train.d.ts.map +1 -1
- package/dist/train.js +4 -110
- package/dist/train.js.map +1 -1
- package/dist/update.d.ts.map +1 -1
- package/dist/update.js +9 -2
- package/dist/update.js.map +1 -1
- package/package.json +1 -1
- package/dist/preview.d.ts +0 -4
- package/dist/preview.d.ts.map +0 -1
- package/dist/preview.js +0 -60
- package/dist/preview.js.map +0 -1
- package/dist/self.d.ts +0 -5
- package/dist/self.d.ts.map +0 -1
- package/dist/self.js +0 -13
- package/dist/self.js.map +0 -1
- package/dist/ship.d.ts +0 -27
- package/dist/ship.d.ts.map +0 -1
- package/dist/ship.js +0 -296
- package/dist/ship.js.map +0 -1
package/dist/train.d.ts
CHANGED
|
@@ -1,81 +1,19 @@
|
|
|
1
1
|
import type { Context } from './context.ts';
|
|
2
|
-
/** The repo whose tag publishes the train-versioned packages; it is released first. */
|
|
3
|
-
export declare const PRIMITIVES = "primitives";
|
|
4
2
|
/**
|
|
5
3
|
* The repo whose releases are the trains as a repo outside the workspace sees
|
|
6
4
|
* them: it is released last, so a train shows there once it is cut everywhere,
|
|
7
5
|
* and its release carries the train manifest (manifest.ts).
|
|
8
6
|
*/
|
|
9
7
|
export declare const COMPENDIUM = "compendium";
|
|
10
|
-
/** The repos stamped with the train tag, in release order. */
|
|
8
|
+
/** The repos stamped with the train tag, in release order; the presets among them are what a repo is generated from. */
|
|
11
9
|
export declare const TRAIN_REPOS: readonly ["primitives", "preset-repo-turbo", "preset-app-nextjs", "preset-repo-operations", "compendium"];
|
|
12
|
-
/**
|
|
13
|
-
* The train is cut in two phases: `primitives` alone, whose release publishes
|
|
14
|
-
* the train-versioned packages, then every other repo once those packages are
|
|
15
|
-
* on npm, because the presets and the compendium pin them at the train number
|
|
16
|
-
* and their commit hooks install the pin.
|
|
17
|
-
*/
|
|
18
|
-
export declare const PHASES: readonly (readonly string[])[];
|
|
19
|
-
/** The packages published at the train number from `primitives` (§ 1.6 PLX), by their directory there. */
|
|
20
|
-
export declare const TRAIN_PACKAGES: readonly [{
|
|
21
|
-
readonly name: "@plexus-ms/cli";
|
|
22
|
-
readonly dir: "packages/cli";
|
|
23
|
-
}, {
|
|
24
|
-
readonly name: "@plexus-ms/cli-ci";
|
|
25
|
-
readonly dir: "packages/cli-ci";
|
|
26
|
-
}, {
|
|
27
|
-
readonly name: "@plexus-ms/lib";
|
|
28
|
-
readonly dir: "packages/lib";
|
|
29
|
-
}, {
|
|
30
|
-
readonly name: "@plexus-ms/config";
|
|
31
|
-
readonly dir: "packages/config";
|
|
32
|
-
}];
|
|
33
|
-
/** The umbrella directory holding the train repos, relative to the workspace. */
|
|
34
|
-
export declare const UPSTREAM = "plexus-ms";
|
|
35
10
|
/** A train version is plain semver, no `v` prefix (§ 1.5 PLX). */
|
|
36
11
|
export declare const isTrainVersion: (v: string) => boolean;
|
|
37
|
-
export declare function nextMinor(version: string): string;
|
|
38
|
-
/**
|
|
39
|
-
* The newest train tag of a repo across both eras (`v0.21` and `0.22.0`),
|
|
40
|
-
* compared numerically on the v-stripped form: a plain version sort would rank
|
|
41
|
-
* every v-tag above every plain tag. A prerelease tag (`0.100.0-rc.1`, a
|
|
42
|
-
* publishing rehearsal) is not a train and never the latest.
|
|
43
|
-
*/
|
|
44
|
-
export declare function latestTag(tags: string[]): string | undefined;
|
|
45
|
-
export interface TrainRepo {
|
|
46
|
-
name: string;
|
|
47
|
-
path: string;
|
|
48
|
-
/** The latest tag as git has it; undefined for a repo never tagged. */
|
|
49
|
-
tag?: string;
|
|
50
|
-
/** The same, v-stripped: the train version it names. */
|
|
51
|
-
latest?: string;
|
|
52
|
-
/** `git log --oneline` since the latest tag. */
|
|
53
|
-
pending: string[];
|
|
54
|
-
}
|
|
55
|
-
export interface Train {
|
|
56
|
-
repos: TrainRepo[];
|
|
57
|
-
/** The highest tag across all repos, v-stripped. */
|
|
58
|
-
last?: string;
|
|
59
|
-
/** True when the repos' latest tags disagree: a run that stopped mid-tag. */
|
|
60
|
-
skew: boolean;
|
|
61
|
-
}
|
|
62
|
-
/** Fetch every train repo and read its tags and pending commits. */
|
|
63
|
-
export declare function readTrain(ctx: Context, upstream: string): Promise<Train>;
|
|
64
|
-
/** The train's repos in release order, grouped by phase. */
|
|
65
|
-
export declare const phasesOf: (train: Train) => TrainRepo[][];
|
|
66
|
-
/** Every train repo on main, clean, and not behind origin; throws naming the first offender. */
|
|
67
|
-
export declare function preflightRelease(ctx: Context, train: Train): Promise<void>;
|
|
68
12
|
/**
|
|
69
|
-
* The forge CLI is what
|
|
70
|
-
*
|
|
13
|
+
* The forge CLI is what opens a pull request and creates a release; an expired
|
|
14
|
+
* login is found here, before anything is written.
|
|
71
15
|
*/
|
|
72
16
|
export declare function preflightForge(ctx: Context): Promise<void>;
|
|
73
|
-
/**
|
|
74
|
-
* The version a run releases or propagates. `propagateOnly` takes the current
|
|
75
|
-
* train; a release takes the explicit version or the next minor, refusing to
|
|
76
|
-
* derive one while the repos' tags disagree.
|
|
77
|
-
*/
|
|
78
|
-
export declare function resolveVersion(train: Train, explicit: string | undefined, propagateOnly: boolean): string;
|
|
79
17
|
/** A mistake in the arguments, as opposed to a failed run: exit code 2 in the CLI. */
|
|
80
18
|
export declare class UsageError extends Error {
|
|
81
19
|
}
|
package/dist/train.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"train.d.ts","sourceRoot":"","sources":["../src/train.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"train.d.ts","sourceRoot":"","sources":["../src/train.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,wHAAwH;AACxH,eAAO,MAAM,WAAW,2GAMd,CAAC;AAEX,kEAAkE;AAClE,eAAO,MAAM,cAAc,GAAI,GAAG,MAAM,KAAG,OAAoC,CAAC;AAEhF;;;GAGG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAMhE;AAED,sFAAsF;AACtF,qBAAa,UAAW,SAAQ,KAAK;CAAG"}
|
package/dist/train.js
CHANGED
|
@@ -1,106 +1,22 @@
|
|
|
1
|
-
// The train (§ 1.5 PLX): one version, tagged identically on every train repo
|
|
2
|
-
// whether or not it changed. This file reads the train's state from the
|
|
3
|
-
// upstream umbrella (the `plexus-ms` directory of a workspace) and decides the
|
|
4
|
-
// next version; `ship` acts on it.
|
|
5
|
-
import { join } from 'node:path';
|
|
6
|
-
import { compareTrains } from "./doctor.js";
|
|
7
|
-
/** The repo whose tag publishes the train-versioned packages; it is released first. */
|
|
8
|
-
export const PRIMITIVES = 'primitives';
|
|
9
1
|
/**
|
|
10
2
|
* The repo whose releases are the trains as a repo outside the workspace sees
|
|
11
3
|
* them: it is released last, so a train shows there once it is cut everywhere,
|
|
12
4
|
* and its release carries the train manifest (manifest.ts).
|
|
13
5
|
*/
|
|
14
6
|
export const COMPENDIUM = 'compendium';
|
|
15
|
-
/** The repos stamped with the train tag, in release order. */
|
|
7
|
+
/** The repos stamped with the train tag, in release order; the presets among them are what a repo is generated from. */
|
|
16
8
|
export const TRAIN_REPOS = [
|
|
17
|
-
|
|
9
|
+
'primitives',
|
|
18
10
|
'preset-repo-turbo',
|
|
19
11
|
'preset-app-nextjs',
|
|
20
12
|
'preset-repo-operations',
|
|
21
13
|
COMPENDIUM,
|
|
22
14
|
];
|
|
23
|
-
/**
|
|
24
|
-
* The train is cut in two phases: `primitives` alone, whose release publishes
|
|
25
|
-
* the train-versioned packages, then every other repo once those packages are
|
|
26
|
-
* on npm, because the presets and the compendium pin them at the train number
|
|
27
|
-
* and their commit hooks install the pin.
|
|
28
|
-
*/
|
|
29
|
-
export const PHASES = [[PRIMITIVES], TRAIN_REPOS.filter((r) => r !== PRIMITIVES)];
|
|
30
|
-
/** The packages published at the train number from `primitives` (§ 1.6 PLX), by their directory there. */
|
|
31
|
-
export const TRAIN_PACKAGES = [
|
|
32
|
-
{ name: '@plexus-ms/cli', dir: 'packages/cli' },
|
|
33
|
-
{ name: '@plexus-ms/cli-ci', dir: 'packages/cli-ci' },
|
|
34
|
-
{ name: '@plexus-ms/lib', dir: 'packages/lib' },
|
|
35
|
-
{ name: '@plexus-ms/config', dir: 'packages/config' },
|
|
36
|
-
];
|
|
37
|
-
/** The umbrella directory holding the train repos, relative to the workspace. */
|
|
38
|
-
export const UPSTREAM = 'plexus-ms';
|
|
39
15
|
/** A train version is plain semver, no `v` prefix (§ 1.5 PLX). */
|
|
40
16
|
export const isTrainVersion = (v) => /^\d+\.\d+\.\d+$/.test(v);
|
|
41
|
-
export function nextMinor(version) {
|
|
42
|
-
const [major = '0', minor = '0'] = version.split('.');
|
|
43
|
-
return `${major}.${Number(minor) + 1}.0`;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* The newest train tag of a repo across both eras (`v0.21` and `0.22.0`),
|
|
47
|
-
* compared numerically on the v-stripped form: a plain version sort would rank
|
|
48
|
-
* every v-tag above every plain tag. A prerelease tag (`0.100.0-rc.1`, a
|
|
49
|
-
* publishing rehearsal) is not a train and never the latest.
|
|
50
|
-
*/
|
|
51
|
-
export function latestTag(tags) {
|
|
52
|
-
return tags
|
|
53
|
-
.filter((t) => /^v?\d+(\.\d+){1,2}$/.test(t))
|
|
54
|
-
.sort((a, b) => compareTrains(a.replace(/^v/, ''), b.replace(/^v/, '')))
|
|
55
|
-
.at(-1);
|
|
56
|
-
}
|
|
57
|
-
/** Fetch every train repo and read its tags and pending commits. */
|
|
58
|
-
export async function readTrain(ctx, upstream) {
|
|
59
|
-
const repos = [];
|
|
60
|
-
const all = new Set();
|
|
61
|
-
for (const name of TRAIN_REPOS) {
|
|
62
|
-
const path = join(upstream, name);
|
|
63
|
-
try {
|
|
64
|
-
await ctx.read('git', ['rev-parse', '--git-dir'], { cwd: path });
|
|
65
|
-
}
|
|
66
|
-
catch {
|
|
67
|
-
throw new Error(`${path} is not a git repo`);
|
|
68
|
-
}
|
|
69
|
-
try {
|
|
70
|
-
await ctx.read('git', ['fetch', 'origin', '--tags', '--quiet'], { cwd: path });
|
|
71
|
-
}
|
|
72
|
-
catch {
|
|
73
|
-
throw new Error(`${name}: fetch from origin failed`);
|
|
74
|
-
}
|
|
75
|
-
const tags = (await ctx.read('git', ['tag', '--list', 'v*', '[0-9]*'], { cwd: path })).split('\n').filter(Boolean);
|
|
76
|
-
for (const t of tags)
|
|
77
|
-
all.add(t.replace(/^v/, ''));
|
|
78
|
-
const tag = latestTag(tags);
|
|
79
|
-
const range = tag ? `${tag}..HEAD` : 'HEAD';
|
|
80
|
-
const pending = (await ctx.read('git', ['log', '--oneline', range], { cwd: path })).split('\n').filter(Boolean);
|
|
81
|
-
repos.push({ name, path, tag, latest: tag?.replace(/^v/, ''), pending });
|
|
82
|
-
}
|
|
83
|
-
const latest = repos.map((r) => r.latest);
|
|
84
|
-
return { repos, last: latestTag([...all]), skew: latest.some((l) => l !== latest[0]) };
|
|
85
|
-
}
|
|
86
|
-
/** The train's repos in release order, grouped by phase. */
|
|
87
|
-
export const phasesOf = (train) => PHASES.map((names) => train.repos.filter((r) => names.includes(r.name)));
|
|
88
|
-
/** Every train repo on main, clean, and not behind origin; throws naming the first offender. */
|
|
89
|
-
export async function preflightRelease(ctx, train) {
|
|
90
|
-
for (const { name, path } of train.repos) {
|
|
91
|
-
const branch = (await ctx.read('git', ['rev-parse', '--abbrev-ref', 'HEAD'], { cwd: path })).trim();
|
|
92
|
-
if (branch !== 'main')
|
|
93
|
-
throw new Error(`${name} is on '${branch}', trains cut from main`);
|
|
94
|
-
if ((await ctx.read('git', ['status', '--porcelain'], { cwd: path })).trim() !== '')
|
|
95
|
-
throw new Error(`${name} has uncommitted changes — commit first`);
|
|
96
|
-
const behind = (await ctx.read('git', ['rev-list', '--count', 'main..origin/main'], { cwd: path })).trim();
|
|
97
|
-
if (behind !== '0')
|
|
98
|
-
throw new Error(`${name} is ${behind} commit(s) behind origin/main — pull first, or the tag lands on a stale commit`);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
17
|
/**
|
|
102
|
-
* The forge CLI is what
|
|
103
|
-
*
|
|
18
|
+
* The forge CLI is what opens a pull request and creates a release; an expired
|
|
19
|
+
* login is found here, before anything is written.
|
|
104
20
|
*/
|
|
105
21
|
export async function preflightForge(ctx) {
|
|
106
22
|
try {
|
|
@@ -110,28 +26,6 @@ export async function preflightForge(ctx) {
|
|
|
110
26
|
throw new Error('gh is not logged in (gh auth status failed) — run gh auth login first');
|
|
111
27
|
}
|
|
112
28
|
}
|
|
113
|
-
/**
|
|
114
|
-
* The version a run releases or propagates. `propagateOnly` takes the current
|
|
115
|
-
* train; a release takes the explicit version or the next minor, refusing to
|
|
116
|
-
* derive one while the repos' tags disagree.
|
|
117
|
-
*/
|
|
118
|
-
export function resolveVersion(train, explicit, propagateOnly) {
|
|
119
|
-
if (explicit !== undefined && !isTrainVersion(explicit))
|
|
120
|
-
throw new UsageError(`'${explicit}' is not plain semver (X.Y.Z, no v)`);
|
|
121
|
-
if (propagateOnly) {
|
|
122
|
-
const v = explicit ?? train.last;
|
|
123
|
-
if (!v)
|
|
124
|
-
throw new Error('no train version found to propagate');
|
|
125
|
-
return v;
|
|
126
|
-
}
|
|
127
|
-
if (explicit)
|
|
128
|
-
return explicit;
|
|
129
|
-
if (train.skew) {
|
|
130
|
-
const report = train.repos.map((r) => ` ${r.name}: ${r.latest ?? 'none'}`).join('\n');
|
|
131
|
-
throw new Error(`the train repos' latest tags disagree:\n${report}\npass the version explicitly (--train ${train.last}) to finish the half-tagged train, or a higher one to start a new one`);
|
|
132
|
-
}
|
|
133
|
-
return train.last ? nextMinor(train.last) : '0.1.0';
|
|
134
|
-
}
|
|
135
29
|
/** A mistake in the arguments, as opposed to a failed run: exit code 2 in the CLI. */
|
|
136
30
|
export class UsageError extends Error {
|
|
137
31
|
}
|
package/dist/train.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"train.js","sourceRoot":"","sources":["../src/train.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"train.js","sourceRoot":"","sources":["../src/train.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AAEvC,wHAAwH;AACxH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,YAAY;IACZ,mBAAmB;IACnB,mBAAmB;IACnB,wBAAwB;IACxB,UAAU;CACF,CAAC;AAEX,kEAAkE;AAClE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAS,EAAW,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEhF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,GAAY;IAC/C,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;IAC3F,CAAC;AACH,CAAC;AAED,sFAAsF;AACtF,MAAM,OAAO,UAAW,SAAQ,KAAK;CAAG"}
|
package/dist/update.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQ5C,OAAO,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAQ5C,OAAO,EAAiD,KAAK,OAAO,EAA0B,MAAM,WAAW,CAAC;AAGhH,MAAM,WAAW,aAAa;IAC5B,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb,+FAA+F;IAC/F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uFAAuF;IACvF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAsGnF"}
|
package/dist/update.js
CHANGED
|
@@ -44,7 +44,7 @@ import { catalogOf, MANIFEST_FILE, parseManifest } from "./manifest.js";
|
|
|
44
44
|
import { MARKER_FILE, parseMarker } from "./marker.js";
|
|
45
45
|
import { maxAgeOf, needOf, staleModules } from "./need.js";
|
|
46
46
|
import { overview } from "./overview.js";
|
|
47
|
-
import { detail, emptySummary, openPullUrl, takeTrain, trainBranch } from "./take.js";
|
|
47
|
+
import { CLEAN_BODY, detail, emptySummary, openPullUrl, takeTrain, trainBranch } from "./take.js";
|
|
48
48
|
import { COMPENDIUM, isTrainVersion, preflightForge, UsageError } from "./train.js";
|
|
49
49
|
export async function update(ctx, options) {
|
|
50
50
|
const { repo } = options;
|
|
@@ -95,8 +95,15 @@ export async function update(ctx, options) {
|
|
|
95
95
|
if (onOrigin) {
|
|
96
96
|
const url = await openPullUrl(ctx, consumer, repo, train);
|
|
97
97
|
ctx.say(`• ${name}: ${branch} is already on origin${url ? ` (${url})` : ''} — nothing to do; delete the branch to pull the train again`);
|
|
98
|
-
if (url)
|
|
98
|
+
if (url) {
|
|
99
99
|
summary.pulls.push(url);
|
|
100
|
+
// Whether it merged clean is what its body says (take.ts wrote it).
|
|
101
|
+
const body = await ctx
|
|
102
|
+
.read('gh', ['pr', 'view', url, '--json', 'body', '--jq', '.body'], { cwd: repo })
|
|
103
|
+
.catch(() => '');
|
|
104
|
+
if (body.includes(CLEAN_BODY))
|
|
105
|
+
summary.mergeable.push(url);
|
|
106
|
+
}
|
|
100
107
|
return summary;
|
|
101
108
|
}
|
|
102
109
|
const asked = options.train !== undefined ? `--train ${train}` : options.now ? '--now' : undefined;
|
package/dist/update.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,+EAA+E;AAC/E,oDAAoD;AACpD,EAAE;AACF,qEAAqE;AACrE,6EAA6E;AAC7E,uEAAuE;AACvE,8EAA8E;AAC9E,8EAA8E;AAC9E,0EAA0E;AAC1E,iEAAiE;AACjE,EAAE;AACF,2EAA2E;AAC3E,8EAA8E;AAC9E,6DAA6D;AAC7D,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,4EAA4E;AAC5E,6EAA6E;AAC7E,yFAAyF;AACzF,+EAA+E;AAC/E,uEAAuE;AACvE,2EAA2E;AAC3E,6EAA6E;AAC7E,qEAAqE;AACrE,EAAE;AACF,4EAA4E;AAC5E,0EAA0E;AAC1E,8DAA8D;AAC9D,8EAA8E;AAC9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,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;IAClH,OAAO,KAAK;SACT,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACjC,MAAM,CAAC,CAAC,CAAC,EAAyB,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;SAClF,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,2CAA2C;AAC3C,SAAS,QAAQ,CAAC,QAAmB;IACnC,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1G,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,MAAM,wDAAwD,CAAC,CAAC;IAC9G,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
package/dist/preview.d.ts
DELETED
package/dist/preview.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../src/preview.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAAwB,KAAK,OAAO,EAAwB,MAAM,WAAW,CAAC;AAGrF,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAqCvG"}
|
package/dist/preview.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// preview: what an unreleased train would do to the consumers in the
|
|
2
|
-
// maintainers' workspace, before it is cut. Not propagation: a maintainer's
|
|
3
|
-
// test, run by the dry run of `ship` and by nothing else, and due to leave
|
|
4
|
-
// `ship` for a canary of its own. Cutting a train needs no knowledge of any
|
|
5
|
-
// consumer, and the real run of `ship` has none.
|
|
6
|
-
//
|
|
7
|
-
// Each consumer found under the workspace is cloned from its origin at the
|
|
8
|
-
// branch a train lands on into a scratch directory, and copier-updated there
|
|
9
|
-
// from the LOCAL preset checkout at main, so the diff and any conflicts show
|
|
10
|
-
// before a tag exists; nothing is committed to an origin, pushed or opened.
|
|
11
|
-
// The scratch work goes through `Context.stage`: performed although the run is
|
|
12
|
-
// a dry run, since nothing the operator owns changes.
|
|
13
|
-
import { join } from 'node:path';
|
|
14
|
-
import { findConsumers, presetSource } from "./consumers.js";
|
|
15
|
-
import { run } from "./effects.js";
|
|
16
|
-
import { overview } from "./overview.js";
|
|
17
|
-
import { detail, emptySummary, takeTrain } from "./take.js";
|
|
18
|
-
import { TRAIN_REPOS, UPSTREAM } from "./train.js";
|
|
19
|
-
export async function previewConsumers(ctx, workspace, train) {
|
|
20
|
-
const summary = emptySummary(train, ctx.dryRun);
|
|
21
|
-
const upstream = join(workspace, UPSTREAM);
|
|
22
|
-
const tree = await overview(ctx, workspace);
|
|
23
|
-
const upstreamDir = tree.children.find((c) => c.path === upstream);
|
|
24
|
-
const presets = TRAIN_REPOS.filter((r) => upstreamDir?.children.some((c) => c.name === r && c.template));
|
|
25
|
-
const consumers = await findConsumers(ctx, tree, presets);
|
|
26
|
-
for (const c of consumers) {
|
|
27
|
-
if (!c.skipped)
|
|
28
|
-
continue;
|
|
29
|
-
ctx.say(`⚠ ${c.rel}: ${c.skipped} — not previewed`);
|
|
30
|
-
summary.skipped.push({ path: c.rel, reason: c.skipped });
|
|
31
|
-
}
|
|
32
|
-
for (const preset of presets)
|
|
33
|
-
if (!consumers.some((c) => c.sites.some((s) => s.preset === preset)))
|
|
34
|
-
ctx.say(`• no consumers of ${presetSource(preset)} found under ${workspace}`);
|
|
35
|
-
const take = { train, opener: '`plx ship`', previewFrom: upstream };
|
|
36
|
-
const scratch = (await ctx.stage(run('mktemp', ['-d'])))?.trim() ?? '';
|
|
37
|
-
try {
|
|
38
|
-
for (const consumer of consumers) {
|
|
39
|
-
if (consumer.skipped || !consumer.origin)
|
|
40
|
-
continue;
|
|
41
|
-
const clone = join(scratch, consumer.rel);
|
|
42
|
-
ctx.say(`→ ${consumer.rel}: clone ${consumer.origin} at ${consumer.branch}`);
|
|
43
|
-
try {
|
|
44
|
-
await ctx.stage(run('git', ['clone', '--quiet', '--branch', consumer.branch, consumer.origin, clone]));
|
|
45
|
-
}
|
|
46
|
-
catch (error) {
|
|
47
|
-
ctx.say(` ✗ FAILED — clone${detail(error)}`);
|
|
48
|
-
summary.failed.push(consumer.rel);
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
await takeTrain(ctx, consumer, clone, take, summary);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
finally {
|
|
55
|
-
if (scratch)
|
|
56
|
-
await ctx.stage(run('rm', ['-rf', scratch]));
|
|
57
|
-
}
|
|
58
|
-
return summary;
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=preview.js.map
|
package/dist/preview.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../src/preview.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,4EAA4E;AAC5E,2EAA2E;AAC3E,4EAA4E;AAC5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AI,CAAC;gBACH,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;YACzG,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,GAAG,CAAC,GAAG,CAAC,qBAAqB,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC9C,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;gBAClC,SAAS;YACX,CAAC;YACD,MAAM,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;YAAS,CAAC;QACT,IAAI,OAAO;YAAE,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/self.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Context } from './context.ts';
|
|
2
|
-
export declare const SELF_PACKAGE = "@plexus-ms/cli";
|
|
3
|
-
/** Throws when `running` is older than the registry's latest plx; warns when the registry cannot be asked. */
|
|
4
|
-
export declare function preflightSelf(ctx: Context, running: string): Promise<void>;
|
|
5
|
-
//# sourceMappingURL=self.d.ts.map
|
package/dist/self.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { compareTrains } from "./doctor.js";
|
|
2
|
-
export const SELF_PACKAGE = '@plexus-ms/cli';
|
|
3
|
-
/** Throws when `running` is older than the registry's latest plx; warns when the registry cannot be asked. */
|
|
4
|
-
export async function preflightSelf(ctx, running) {
|
|
5
|
-
const latest = (await ctx.read('npm', ['view', SELF_PACKAGE, 'version']).catch(() => '')).trim();
|
|
6
|
-
if (!latest) {
|
|
7
|
-
ctx.say(`⚠ could not ask the registry for the newest ${SELF_PACKAGE}; going on with plx ${running}`);
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
if (compareTrains(running, latest) < 0)
|
|
11
|
-
throw new Error(`plx ${running} is behind ${latest}, the newest release; update it first: mise cache clear npm:${SELF_PACKAGE} && mise up npm:${SELF_PACKAGE}`);
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=self.js.map
|
package/dist/self.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Context } from './context.ts';
|
|
2
|
-
import { type Summary } from './take.ts';
|
|
3
|
-
/** How the wait for npm between the phases behaves, in milliseconds. */
|
|
4
|
-
export interface PublishWait {
|
|
5
|
-
/** Between two polls of the registry. */
|
|
6
|
-
interval: number;
|
|
7
|
-
/** After which the run stops, resumable. */
|
|
8
|
-
timeout: number;
|
|
9
|
-
}
|
|
10
|
-
export interface ShipOptions {
|
|
11
|
-
/** The workspace: the upstream umbrella sits under it, and for the dry run's preview the consumers. */
|
|
12
|
-
workspace: string;
|
|
13
|
-
/** The train version; default: minor+1 over the latest. */
|
|
14
|
-
train?: string;
|
|
15
|
-
/** The date stamped on the map, `YYYY-MM-DD`; default: today. */
|
|
16
|
-
today?: string;
|
|
17
|
-
/** The running plx's version: when given, refuse to run behind its newest release (self.ts). */
|
|
18
|
-
plx?: string;
|
|
19
|
-
/** The publish wait's pacing; the defaults suit a real registry, tests shorten them. */
|
|
20
|
-
wait?: Partial<PublishWait>;
|
|
21
|
-
}
|
|
22
|
-
/** The train cut, and under a dry run what the preview found in the consumers; a real run's lists are empty. */
|
|
23
|
-
export interface ShipResult extends Summary {
|
|
24
|
-
released: boolean;
|
|
25
|
-
}
|
|
26
|
-
export declare function ship(ctx: Context, options: ShipOptions): Promise<ShipResult>;
|
|
27
|
-
//# sourceMappingURL=ship.d.ts.map
|
package/dist/ship.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ship.d.ts","sourceRoot":"","sources":["../src/ship.ts"],"names":[],"mappings":"AAyDA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAO5C,OAAO,EAAgB,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAevD,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,uGAAuG;IACvG,SAAS,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gGAAgG;IAChG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wFAAwF;IACxF,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CAC7B;AAED,gHAAgH;AAChH,MAAM,WAAW,UAAW,SAAQ,OAAO;IACzC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAsB,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAYlF"}
|