@plexus-ms/lib 0.119.0 → 0.121.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/baseline.d.ts +16 -0
- package/dist/baseline.d.ts.map +1 -0
- package/dist/baseline.js +38 -0
- package/dist/baseline.js.map +1 -0
- package/dist/bookkeeping.d.ts +6 -6
- package/dist/bookkeeping.d.ts.map +1 -1
- package/dist/bookkeeping.js +9 -9
- package/dist/bookkeeping.js.map +1 -1
- package/dist/catalog.d.ts +1 -1
- package/dist/catalog.d.ts.map +1 -1
- package/dist/changeset.d.ts.map +1 -1
- package/dist/changeset.js +2 -11
- package/dist/changeset.js.map +1 -1
- package/dist/consumers.d.ts +15 -14
- package/dist/consumers.d.ts.map +1 -1
- package/dist/consumers.js +29 -25
- package/dist/consumers.js.map +1 -1
- package/dist/copier.d.ts +1 -1
- package/dist/copier.d.ts.map +1 -1
- package/dist/copier.js +1 -1
- package/dist/copier.js.map +1 -1
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +5 -10
- package/dist/deploy.js.map +1 -1
- package/dist/deployTargets.js +1 -1
- package/dist/deployTargets.js.map +1 -1
- package/dist/doctor.d.ts +2 -2
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +4 -4
- package/dist/doctor.js.map +1 -1
- package/dist/index.d.ts +10 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/dist/io.d.ts +9 -0
- package/dist/io.d.ts.map +1 -1
- package/dist/io.js +18 -0
- package/dist/io.js.map +1 -1
- package/dist/lints.d.ts +56 -0
- package/dist/lints.d.ts.map +1 -0
- package/dist/lints.js +330 -0
- package/dist/lints.js.map +1 -0
- package/dist/manifest.d.ts +9 -9
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +15 -15
- package/dist/manifest.js.map +1 -1
- package/dist/need.d.ts +9 -9
- package/dist/need.d.ts.map +1 -1
- package/dist/need.js +17 -17
- package/dist/need.js.map +1 -1
- package/dist/propagate.d.ts +3 -3
- package/dist/propagate.d.ts.map +1 -1
- package/dist/propagate.js +14 -14
- package/dist/propagate.js.map +1 -1
- package/dist/requirements.d.ts +64 -1
- package/dist/requirements.d.ts.map +1 -1
- package/dist/requirements.js +191 -8
- package/dist/requirements.js.map +1 -1
- package/dist/standard-index.json +143 -0
- package/dist/standardIndex.d.ts +14 -0
- package/dist/standardIndex.d.ts.map +1 -0
- package/dist/standardIndex.js +39 -0
- package/dist/standardIndex.js.map +1 -0
- package/dist/summary.js +2 -2
- package/dist/summary.js.map +1 -1
- package/dist/take.d.ts +13 -13
- package/dist/take.d.ts.map +1 -1
- package/dist/take.js +46 -40
- package/dist/take.js.map +1 -1
- package/dist/update.d.ts +4 -4
- package/dist/update.d.ts.map +1 -1
- package/dist/update.js +58 -56
- package/dist/update.js.map +1 -1
- package/dist/version.d.ts +20 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +32 -0
- package/dist/version.js.map +1 -0
- package/package.json +2 -2
- package/dist/train.d.ts +0 -20
- package/dist/train.d.ts.map +0 -1
- package/dist/train.js +0 -32
- package/dist/train.js.map +0 -1
package/dist/update.js
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
// update: a repo generated from the
|
|
1
|
+
// update: a repo generated from the templates takes the version itself (§ 3
|
|
2
2
|
// PLX-Updates), from inside the repo, in the tenant's own CI or by hand; it is
|
|
3
|
-
// the only thing that opens a
|
|
3
|
+
// the only thing that opens a version's pull request.
|
|
4
4
|
//
|
|
5
|
-
// It takes a
|
|
6
|
-
// (need.ts): when it is asked (`--now`, or a
|
|
5
|
+
// It takes a version when the repo needs one, not whenever one was cut
|
|
6
|
+
// (need.ts): when it is asked (`--now`, or a version named), when a module one
|
|
7
7
|
// of its markers declares has changed since that marker (read from the
|
|
8
|
-
// manifest on the
|
|
8
|
+
// manifest on the version's release, manifest.ts), or when the oldest version the
|
|
9
9
|
// repo has not taken is older than the backstop age, which the repo's answers
|
|
10
10
|
// set (`update_max_age`, in days; 30 when they do not say, zero for every
|
|
11
|
-
//
|
|
11
|
+
// version). Otherwise the repo rests: one line saying why, exit 0.
|
|
12
12
|
//
|
|
13
13
|
// The markers that count are those of the repo's sites, root and apps: the
|
|
14
|
-
// ones a pull brings up to the
|
|
14
|
+
// ones a pull brings up to the version. A marker anywhere else is kept by hand,
|
|
15
15
|
// a pull would not cure it, and `doctor` is what reports it.
|
|
16
16
|
//
|
|
17
|
-
// The
|
|
18
|
-
// by one, § 1.6 PLX, and the compendium is released last, so a
|
|
17
|
+
// The versions are the compendium's GitHub releases (every version tag is locked
|
|
18
|
+
// by one, § 1.6 PLX, and the compendium is released last, so a version shows
|
|
19
19
|
// there once it is cut everywhere), asked of the forge as an operator would
|
|
20
|
-
// (`gh api repos/plexus-ms/compendium/releases`): the newest is the
|
|
20
|
+
// (`gh api repos/plexus-ms/compendium/releases`): the newest is the version to
|
|
21
21
|
// take, and their dates are what the backstop is measured against. The work happens in a
|
|
22
22
|
// worktree of origin's branch, never in the checkout: a developer's branch and
|
|
23
23
|
// edits stay as they are, and in CI the worktree shares the checkout's
|
|
24
24
|
// credentials, so the push and the pull request need no second token. Then
|
|
25
|
-
// `
|
|
25
|
+
// `takeVersion` (propagate.ts): copier update at every site, marker, lockfile,
|
|
26
26
|
// workflow refs, one commit on `plexus/<version>`, one pull request.
|
|
27
27
|
//
|
|
28
|
-
// The
|
|
28
|
+
// The version is pulled once per repo: a `plexus/<version>` branch already on
|
|
29
29
|
// origin, from an earlier run or from a human resolving its conflicts, is
|
|
30
30
|
// left alone, so a daily run never moves a branch somebody is
|
|
31
31
|
// working on; deleting the branch is how a pull is redone. A repo whose every
|
|
32
|
-
// site already records the
|
|
32
|
+
// site already records the version does nothing at all.
|
|
33
33
|
//
|
|
34
|
-
// plx update # the newest
|
|
35
|
-
// plx update --now # the newest
|
|
34
|
+
// plx update # the newest version, if the repo needs it
|
|
35
|
+
// plx update --now # the newest version, whatever its triggers say
|
|
36
36
|
// plx -n update --now # preview in a worktree, push nothing
|
|
37
|
-
// plx -y update --
|
|
37
|
+
// plx -y update --to 0.102.0 # unattended, an explicit version
|
|
38
38
|
import { basename, join, relative } from 'node:path';
|
|
39
|
-
import { findConsumers,
|
|
39
|
+
import { findConsumers, TEMPLATES, templateSource } from "./consumers.js";
|
|
40
40
|
import { ANSWERS_FILE, parseAnswers } from "./copier.js";
|
|
41
|
-
import {
|
|
41
|
+
import { compareVersions } from "./doctor.js";
|
|
42
42
|
import { run } from "./effects.js";
|
|
43
43
|
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 { CLEAN_BODY, detail, emptySummary, openPullUrl,
|
|
48
|
-
import { COMPENDIUM,
|
|
47
|
+
import { CLEAN_BODY, detail, emptySummary, openPullUrl, takeVersion, versionBranch } from "./take.js";
|
|
48
|
+
import { COMPENDIUM, isPlexusVersion, preflightForge, UsageError } from "./version.js";
|
|
49
49
|
export async function update(ctx, options) {
|
|
50
50
|
const { repo } = options;
|
|
51
51
|
const name = options.name ?? basename(repo);
|
|
52
|
-
if (options.
|
|
53
|
-
throw new UsageError(`'${options.
|
|
52
|
+
if (options.to !== undefined && !isPlexusVersion(options.to))
|
|
53
|
+
throw new UsageError(`'${options.to}' is not plain semver (X.Y.Z, no v)`);
|
|
54
54
|
const tree = await overview(ctx, repo);
|
|
55
|
-
const consumer = (await findConsumers(ctx, tree,
|
|
55
|
+
const consumer = (await findConsumers(ctx, tree, TEMPLATES)).find((c) => c.path === tree.path);
|
|
56
56
|
if (!consumer)
|
|
57
|
-
throw new Error(`${repo} is not a repo generated from the
|
|
57
|
+
throw new Error(`${repo} is not a repo generated from the templates: no ${ANSWERS_FILE} at its root naming one of ${TEMPLATES.map(templateSource).join(', ')}`);
|
|
58
58
|
if (consumer.skipped)
|
|
59
59
|
throw new Error(`${name}: ${consumer.skipped}`);
|
|
60
60
|
// Sites are named from the repo, not from a workspace.
|
|
@@ -63,12 +63,12 @@ export async function update(ctx, options) {
|
|
|
63
63
|
s.rel = s.rel === '.' ? name : join(name, s.rel);
|
|
64
64
|
const root = consumer.sites.find((s) => s.path === consumer.path);
|
|
65
65
|
if (!root)
|
|
66
|
-
throw new Error(`${name}: its root is not a site of a repo
|
|
66
|
+
throw new Error(`${name}: its root is not a site of a repo template`);
|
|
67
67
|
await preflightForge(ctx);
|
|
68
|
-
const releases = options.
|
|
69
|
-
const
|
|
70
|
-
const summary = emptySummary(
|
|
71
|
-
// The repo is judged by what its origin has on the branch the
|
|
68
|
+
const releases = options.to === undefined ? await releasesOf(ctx) : [];
|
|
69
|
+
const version = options.to ?? newestOf(releases);
|
|
70
|
+
const summary = emptySummary(version, ctx.dryRun);
|
|
71
|
+
// The repo is judged by what its origin has on the branch the version lands
|
|
72
72
|
// on, not by the checkout, which may be behind it or on a branch of its own.
|
|
73
73
|
await ctx.read('git', ['fetch', '--quiet', 'origin', consumer.branch], { cwd: repo }).catch(() => '');
|
|
74
74
|
const answers = await Promise.all(consumer.sites.map(async (s) => {
|
|
@@ -79,22 +79,22 @@ export async function update(ctx, options) {
|
|
|
79
79
|
return parseAnswers(onOrigin ?? (await ctx.readFile(join(s.path, ANSWERS_FILE))));
|
|
80
80
|
}));
|
|
81
81
|
const recorded = answers.map((a) => a.commit);
|
|
82
|
-
if (recorded.every((c) => c ===
|
|
83
|
-
ctx.say(`• ${name}: already at ${
|
|
82
|
+
if (recorded.every((c) => c === version)) {
|
|
83
|
+
ctx.say(`• ${name}: already at ${version}`);
|
|
84
84
|
return summary;
|
|
85
85
|
}
|
|
86
86
|
// copier refuses a downgrade; say so before a worktree is made for nothing.
|
|
87
|
-
const past = recorded.find((c) => c &&
|
|
87
|
+
const past = recorded.find((c) => c && isPlexusVersion(c) && compareVersions(c, version) > 0);
|
|
88
88
|
if (past)
|
|
89
|
-
throw new Error(`${name} is at ${past}, past ${
|
|
90
|
-
const branch =
|
|
89
|
+
throw new Error(`${name} is at ${past}, past ${version}; a repo is never taken back to an older version`);
|
|
90
|
+
const branch = versionBranch(version);
|
|
91
91
|
const onOrigin = await ctx
|
|
92
92
|
.read('git', ['ls-remote', '--exit-code', '--heads', 'origin', `refs/heads/${branch}`], { cwd: repo })
|
|
93
93
|
.then(() => true)
|
|
94
94
|
.catch(() => false);
|
|
95
95
|
if (onOrigin) {
|
|
96
|
-
const url = await openPullUrl(ctx, consumer, repo,
|
|
97
|
-
ctx.say(`• ${name}: ${branch} is already on origin${url ? ` (${url})` : ''} — nothing to do; delete the branch to pull the
|
|
96
|
+
const url = await openPullUrl(ctx, consumer, repo, version);
|
|
97
|
+
ctx.say(`• ${name}: ${branch} is already on origin${url ? ` (${url})` : ''} — nothing to do; delete the branch to pull the version again`);
|
|
98
98
|
if (url) {
|
|
99
99
|
summary.pulls.push(url);
|
|
100
100
|
// Whether it merged clean is what its body says (take.ts wrote it).
|
|
@@ -106,21 +106,21 @@ export async function update(ctx, options) {
|
|
|
106
106
|
}
|
|
107
107
|
return summary;
|
|
108
108
|
}
|
|
109
|
-
const asked = options.
|
|
109
|
+
const asked = options.to !== undefined ? `--to ${version}` : options.now ? '--now' : undefined;
|
|
110
110
|
const need = needOf({
|
|
111
111
|
recorded,
|
|
112
112
|
releases,
|
|
113
113
|
asked,
|
|
114
|
-
stale: asked ? [] : await staleIn(ctx, consumer, repo,
|
|
114
|
+
stale: asked ? [] : await staleIn(ctx, consumer, repo, version),
|
|
115
115
|
maxAge: options.maxAge ?? maxAgeOf(answers[consumer.sites.indexOf(root)]?.answers ?? {}),
|
|
116
116
|
now: options.today === undefined ? new Date() : new Date(options.today),
|
|
117
117
|
});
|
|
118
118
|
if (!need.take) {
|
|
119
|
-
ctx.say(`• ${name}: rests — ${need.why} (plx update --now takes ${
|
|
119
|
+
ctx.say(`• ${name}: rests — ${need.why} (plx update --now takes ${version})`);
|
|
120
120
|
summary.resting.push({ path: name, reason: need.why });
|
|
121
121
|
return summary;
|
|
122
122
|
}
|
|
123
|
-
ctx.say(`• ${name}: takes ${
|
|
123
|
+
ctx.say(`• ${name}: takes ${version} — ${need.why}`);
|
|
124
124
|
const scratch = (await ctx.stage(run('mktemp', ['-d'])))?.trim() ?? '';
|
|
125
125
|
const dir = join(scratch, name);
|
|
126
126
|
try {
|
|
@@ -134,7 +134,7 @@ export async function update(ctx, options) {
|
|
|
134
134
|
summary.failed.push(name);
|
|
135
135
|
return summary;
|
|
136
136
|
}
|
|
137
|
-
await
|
|
137
|
+
await takeVersion(ctx, consumer, dir, { version, ref: version, opener: '`plx update`', why: need.why }, summary);
|
|
138
138
|
}
|
|
139
139
|
finally {
|
|
140
140
|
await ctx.stage(run('git', ['worktree', 'remove', '--force', dir], { cwd: repo })).catch(() => undefined);
|
|
@@ -145,16 +145,16 @@ export async function update(ctx, options) {
|
|
|
145
145
|
}
|
|
146
146
|
/**
|
|
147
147
|
* The declared modules of the repo's sites that changed since their markers,
|
|
148
|
-
* by the manifest of the
|
|
148
|
+
* by the manifest of the version. A version without a manifest (one cut before
|
|
149
149
|
* there were any, or a forge that cannot be asked) is said and checked for
|
|
150
150
|
* nothing: the backstop still holds.
|
|
151
151
|
*/
|
|
152
|
-
async function staleIn(ctx, consumer, repo,
|
|
152
|
+
async function staleIn(ctx, consumer, repo, version) {
|
|
153
153
|
const text = await ctx
|
|
154
|
-
.read('gh', ['release', 'download',
|
|
154
|
+
.read('gh', ['release', 'download', version, '-R', RELEASES_REPO, '-p', MANIFEST_FILE, '-O', '-'])
|
|
155
155
|
.catch(() => undefined);
|
|
156
156
|
if (text === undefined) {
|
|
157
|
-
ctx.say(` ${consumer.rel}:
|
|
157
|
+
ctx.say(` ${consumer.rel}: Plexus ${version} carries no ${MANIFEST_FILE} that can be read; its modules are not checked`);
|
|
158
158
|
return [];
|
|
159
159
|
}
|
|
160
160
|
const catalog = catalogOf(parseManifest(text));
|
|
@@ -170,28 +170,30 @@ async function staleIn(ctx, consumer, repo, train) {
|
|
|
170
170
|
markers.push({ where: join(site.rel, MARKER_FILE), plexus, modules });
|
|
171
171
|
}
|
|
172
172
|
catch {
|
|
173
|
-
// An unreadable marker is doctor's finding, not a reason to take a
|
|
173
|
+
// An unreadable marker is doctor's finding, not a reason to take a version.
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
return staleModules(markers, catalog);
|
|
177
177
|
}
|
|
178
|
-
/** Where the
|
|
179
|
-
const
|
|
180
|
-
/** The
|
|
181
|
-
async function
|
|
178
|
+
/** Where the versions are read from: the compendium's releases. */
|
|
179
|
+
const RELEASES_REPO = `plexus-ms/${COMPENDIUM}`;
|
|
180
|
+
/** The versions (§ 1.6 PLX: every version tag has a release), with the dates they were cut; a draft is no version yet. */
|
|
181
|
+
async function releasesOf(ctx) {
|
|
182
182
|
const jq = '.[] | select(.draft | not) | "\\(.tag_name) \\(.published_at)"';
|
|
183
|
-
const lines = await ctx
|
|
183
|
+
const lines = await ctx
|
|
184
|
+
.read('gh', ['api', `repos/${RELEASES_REPO}/releases`, '--paginate', '--jq', jq])
|
|
185
|
+
.catch(() => '');
|
|
184
186
|
return lines
|
|
185
187
|
.split('\n')
|
|
186
188
|
.map((l) => l.trim().split(/\s+/))
|
|
187
|
-
.filter((p) => p.length === 2 &&
|
|
188
|
-
.map(([
|
|
189
|
+
.filter((p) => p.length === 2 && isPlexusVersion(p[0] ?? ''))
|
|
190
|
+
.map(([version, published]) => ({ version, published }));
|
|
189
191
|
}
|
|
190
|
-
/** The newest
|
|
192
|
+
/** The newest version among the releases. */
|
|
191
193
|
function newestOf(releases) {
|
|
192
|
-
const newest = releases.map((r) => r.
|
|
194
|
+
const newest = releases.map((r) => r.version).reduce((a, b) => (a && compareVersions(a, b) >= 0 ? a : b), '');
|
|
193
195
|
if (!newest)
|
|
194
|
-
throw new Error(`no release of ${
|
|
196
|
+
throw new Error(`no release of ${RELEASES_REPO} found — pass the version explicitly (--to <version>)`);
|
|
195
197
|
return newest;
|
|
196
198
|
}
|
|
197
199
|
//# sourceMappingURL=update.js.map
|
package/dist/update.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,+EAA+E;AAC/E,sDAAsD;AACtD,EAAE;AACF,uEAAuE;AACvE,+EAA+E;AAC/E,uEAAuE;AACvE,kFAAkF;AAClF,8EAA8E;AAC9E,0EAA0E;AAC1E,mEAAmE;AACnE,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,6DAA6D;AAC7D,EAAE;AACF,iFAAiF;AACjF,6EAA6E;AAC7E,4EAA4E;AAC5E,+EAA+E;AAC/E,yFAAyF;AACzF,+EAA+E;AAC/E,uEAAuE;AACvE,2EAA2E;AAC3E,+EAA+E;AAC/E,qEAAqE;AACrE,EAAE;AACF,8EAA8E;AAC9E,0EAA0E;AAC1E,8DAA8D;AAC9D,8EAA8E;AAC9E,wDAAwD;AACxD,EAAE;AACF,+EAA+E;AAC/E,oFAAoF;AACpF,0EAA0E;AAC1E,mEAAmE;AACnE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAiB,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,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AC;AAC7D,CAAC;AAED,6CAA6C;AAC7C,SAAS,QAAQ,CAAC,QAAmB;IACnC,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9G,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,aAAa,uDAAuD,CAAC,CAAC;IACpH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Context } from './context.ts';
|
|
2
|
+
/**
|
|
3
|
+
* The repo whose releases are the versions as a repo outside the workspace sees
|
|
4
|
+
* them: it is released last, so a version shows there once it is cut everywhere,
|
|
5
|
+
* and its release carries the module manifest (manifest.ts).
|
|
6
|
+
*/
|
|
7
|
+
export declare const COMPENDIUM = "compendium";
|
|
8
|
+
/** The repos stamped with the version tag, in release order; the templates among them are what a repo is generated from. */
|
|
9
|
+
export declare const VERSIONED_REPOS: readonly ["tooling", "template-repo-turbo", "template-app-nextjs", "template-repo-operations", "compendium"];
|
|
10
|
+
/** A Plexus version is plain semver, no `v` prefix (§ 1.5 PLX). */
|
|
11
|
+
export declare const isPlexusVersion: (v: string) => boolean;
|
|
12
|
+
/**
|
|
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.
|
|
15
|
+
*/
|
|
16
|
+
export declare function preflightForge(ctx: Context): Promise<void>;
|
|
17
|
+
/** A mistake in the arguments, as opposed to a failed run: exit code 2 in the CLI. */
|
|
18
|
+
export declare class UsageError extends Error {
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,4HAA4H;AAC5H,eAAO,MAAM,eAAe,8GAMlB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,eAAe,GAAI,GAAG,MAAM,KAAG,OAAoC,CAAC;AAEjF;;;GAGG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAMhE;AAED,sFAAsF;AACtF,qBAAa,UAAW,SAAQ,KAAK;CAAG"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The repo whose releases are the versions as a repo outside the workspace sees
|
|
3
|
+
* them: it is released last, so a version shows there once it is cut everywhere,
|
|
4
|
+
* and its release carries the module manifest (manifest.ts).
|
|
5
|
+
*/
|
|
6
|
+
export const COMPENDIUM = 'compendium';
|
|
7
|
+
/** The repos stamped with the version tag, in release order; the templates among them are what a repo is generated from. */
|
|
8
|
+
export const VERSIONED_REPOS = [
|
|
9
|
+
'tooling',
|
|
10
|
+
'template-repo-turbo',
|
|
11
|
+
'template-app-nextjs',
|
|
12
|
+
'template-repo-operations',
|
|
13
|
+
COMPENDIUM,
|
|
14
|
+
];
|
|
15
|
+
/** A Plexus version is plain semver, no `v` prefix (§ 1.5 PLX). */
|
|
16
|
+
export const isPlexusVersion = (v) => /^\d+\.\d+\.\d+$/.test(v);
|
|
17
|
+
/**
|
|
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.
|
|
20
|
+
*/
|
|
21
|
+
export async function preflightForge(ctx) {
|
|
22
|
+
try {
|
|
23
|
+
await ctx.read('gh', ['auth', 'status']);
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
throw new Error('gh is not logged in (gh auth status failed) — run gh auth login first');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** A mistake in the arguments, as opposed to a failed run: exit code 2 in the CLI. */
|
|
30
|
+
export class UsageError extends Error {
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AAEvC,4HAA4H;AAC5H,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,SAAS;IACT,qBAAqB;IACrB,qBAAqB;IACrB,0BAA0B;IAC1B,UAAU;CACF,CAAC;AAEX,mEAAmE;AACnE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAS,EAAW,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEjF;;;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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plexus-ms/lib",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.121.0",
|
|
4
4
|
"description": "The Plexus verbs as a library: the plan-then-apply core behind plx, and the one parser of Plexus's own file shapes",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
],
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/plexus-ms/
|
|
19
|
+
"url": "git+https://github.com/plexus-ms/tooling.git",
|
|
20
20
|
"directory": "packages/lib"
|
|
21
21
|
},
|
|
22
22
|
"publishConfig": {
|
package/dist/train.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Context } from './context.ts';
|
|
2
|
-
/**
|
|
3
|
-
* The repo whose releases are the trains as a repo outside the workspace sees
|
|
4
|
-
* them: it is released last, so a train shows there once it is cut everywhere,
|
|
5
|
-
* and its release carries the train manifest (manifest.ts).
|
|
6
|
-
*/
|
|
7
|
-
export declare const COMPENDIUM = "compendium";
|
|
8
|
-
/** The repos stamped with the train tag, in release order; the presets among them are what a repo is generated from. */
|
|
9
|
-
export declare const TRAIN_REPOS: readonly ["primitives", "preset-repo-turbo", "preset-app-nextjs", "preset-repo-operations", "compendium"];
|
|
10
|
-
/** A train version is plain semver, no `v` prefix (§ 1.5 PLX). */
|
|
11
|
-
export declare const isTrainVersion: (v: string) => boolean;
|
|
12
|
-
/**
|
|
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.
|
|
15
|
-
*/
|
|
16
|
-
export declare function preflightForge(ctx: Context): Promise<void>;
|
|
17
|
-
/** A mistake in the arguments, as opposed to a failed run: exit code 2 in the CLI. */
|
|
18
|
-
export declare class UsageError extends Error {
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=train.d.ts.map
|
package/dist/train.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The repo whose releases are the trains as a repo outside the workspace sees
|
|
3
|
-
* them: it is released last, so a train shows there once it is cut everywhere,
|
|
4
|
-
* and its release carries the train manifest (manifest.ts).
|
|
5
|
-
*/
|
|
6
|
-
export const COMPENDIUM = 'compendium';
|
|
7
|
-
/** The repos stamped with the train tag, in release order; the presets among them are what a repo is generated from. */
|
|
8
|
-
export const TRAIN_REPOS = [
|
|
9
|
-
'primitives',
|
|
10
|
-
'preset-repo-turbo',
|
|
11
|
-
'preset-app-nextjs',
|
|
12
|
-
'preset-repo-operations',
|
|
13
|
-
COMPENDIUM,
|
|
14
|
-
];
|
|
15
|
-
/** A train version is plain semver, no `v` prefix (§ 1.5 PLX). */
|
|
16
|
-
export const isTrainVersion = (v) => /^\d+\.\d+\.\d+$/.test(v);
|
|
17
|
-
/**
|
|
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.
|
|
20
|
-
*/
|
|
21
|
-
export async function preflightForge(ctx) {
|
|
22
|
-
try {
|
|
23
|
-
await ctx.read('gh', ['auth', 'status']);
|
|
24
|
-
}
|
|
25
|
-
catch {
|
|
26
|
-
throw new Error('gh is not logged in (gh auth status failed) — run gh auth login first');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
/** A mistake in the arguments, as opposed to a failed run: exit code 2 in the CLI. */
|
|
30
|
-
export class UsageError extends Error {
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=train.js.map
|
package/dist/train.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|