@plexus-ms/cli 0.100.0-rc.3 → 0.101.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/plx.js +23 -4
- package/package.json +2 -2
package/dist/plx.js
CHANGED
|
@@ -7589,6 +7589,7 @@ var PLX_PIN = "npm:@plexus-ms/cli";
|
|
|
7589
7589
|
var bumpPlxPin = (text, train) => text.replace(/("npm:@plexus-ms\/cli"\s*=\s*(?:\{\s*version\s*=\s*)?")[^"]*(")/g, `$1${train}$2`);
|
|
7590
7590
|
var CONFIG_PIN = "@plexus-ms/config";
|
|
7591
7591
|
var bumpConfigPin = (text, train) => text.replace(/("@plexus-ms\/config":\s*")(?!workspace:|catalog:)[^"]*(")/g, `$1${train}$2`);
|
|
7592
|
+
var bumpCatalogPin = (text, train) => text.replace(/^(\s+"@plexus-ms\/config":\s*)\S+$/m, `$1${train}`);
|
|
7592
7593
|
var stampStandard = (text, train, today2) => setFrontmatterField(setFrontmatterField(text, "version", train), "timestamp", today2);
|
|
7593
7594
|
var stampChanged = (text, train) => setFrontmatterField(text, "changed", train, { after: "binds" });
|
|
7594
7595
|
var hasConflictMarkers = (text) => /^<<<<<<< /m.test(text);
|
|
@@ -8248,7 +8249,7 @@ function nextMinor(version2) {
|
|
|
8248
8249
|
return `${major}.${Number(minor) + 1}.0`;
|
|
8249
8250
|
}
|
|
8250
8251
|
function latestTag(tags) {
|
|
8251
|
-
return tags.filter((t) => /^v?\d
|
|
8252
|
+
return tags.filter((t) => /^v?\d+(\.\d+){1,2}$/.test(t)).sort((a, b) => compareTrains(a.replace(/^v/, ""), b.replace(/^v/, ""))).at(-1);
|
|
8252
8253
|
}
|
|
8253
8254
|
async function readTrain(ctx, upstream) {
|
|
8254
8255
|
const repos2 = [];
|
|
@@ -8684,6 +8685,10 @@ import { join as join8, relative as relative3 } from "node:path";
|
|
|
8684
8685
|
var isClean = (s) => s.conflicted.length === 0 && s.failed.length === 0 && s.skipped.length === 0;
|
|
8685
8686
|
var BASE_TAG = "ship-base";
|
|
8686
8687
|
var trainBranch = (train) => `train/${train}`;
|
|
8688
|
+
var copierIn = (clone, args) => [
|
|
8689
|
+
"env",
|
|
8690
|
+
[`MISE_IGNORED_CONFIG_PATHS=${clone}`, "mise", ...copierVia(args)]
|
|
8691
|
+
];
|
|
8687
8692
|
async function propagate(ctx, workspace, train) {
|
|
8688
8693
|
const summary = {
|
|
8689
8694
|
train,
|
|
@@ -8758,11 +8763,21 @@ async function updateSite(ctx, consumer, site, clone, upstream, summary) {
|
|
|
8758
8763
|
const answers = await ctx.readFile(join8(target, ANSWERS_FILE));
|
|
8759
8764
|
await ctx.stage(write(join8(target, ANSWERS_FILE), answers.replace(/^_src_path: .*$/m, `_src_path: ${localPreset}`)));
|
|
8760
8765
|
await previewCommit(ctx, clone, `plx preview: ${site.rel} reads ${localPreset} from the local checkout`);
|
|
8761
|
-
await ctx.stage(run(
|
|
8766
|
+
await ctx.stage(run(...copierIn(clone, [
|
|
8767
|
+
"update",
|
|
8768
|
+
"--skip-answered",
|
|
8769
|
+
"--trust",
|
|
8770
|
+
"--defaults",
|
|
8771
|
+
"--skip-tasks",
|
|
8772
|
+
"--vcs-ref",
|
|
8773
|
+
"main"
|
|
8774
|
+
]), {
|
|
8775
|
+
cwd: target
|
|
8776
|
+
}));
|
|
8762
8777
|
} else {
|
|
8763
8778
|
ctx.say(`\u2192 ${site.rel}: copier update`);
|
|
8764
8779
|
const args = ["update", "--skip-answered", "--trust", "--skip-tasks", ...ctx.yes ? ["--defaults"] : []];
|
|
8765
|
-
await ctx.apply([run(
|
|
8780
|
+
await ctx.apply([run(...copierIn(clone, args), { cwd: target, interactive: true })]);
|
|
8766
8781
|
}
|
|
8767
8782
|
} catch (error) {
|
|
8768
8783
|
ctx.say(` \u2717 FAILED \u2014 copier update exited nonzero${detail(error)}`);
|
|
@@ -8789,6 +8804,8 @@ async function updateSite(ctx, consumer, site, clone, upstream, summary) {
|
|
|
8789
8804
|
ctx.say(` ${line}`);
|
|
8790
8805
|
if (ctx.dryRun)
|
|
8791
8806
|
await previewCommit(ctx, clone, `plx preview: ${site.rel} updated`);
|
|
8807
|
+
else
|
|
8808
|
+
await ctx.stage(run("git", ["add", "-A"], { cwd: clone }));
|
|
8792
8809
|
}
|
|
8793
8810
|
async function syncSiteMarker(ctx, site, target) {
|
|
8794
8811
|
const marker = await ctx.readFile(join8(target, MARKER_FILE)).catch(() => void 0);
|
|
@@ -9192,7 +9209,7 @@ async function awaitPublished(ctx, next, wait) {
|
|
|
9192
9209
|
for (; ; ) {
|
|
9193
9210
|
const still = [];
|
|
9194
9211
|
for (const name of missing) {
|
|
9195
|
-
const seen = (await ctx.read("npm", ["view", `${name}@${next}`, "version"]).catch(() => "")).trim();
|
|
9212
|
+
const seen = (await ctx.read("npm", ["view", `${name}@${next}`, "version", "--prefer-online"]).catch(() => "")).trim();
|
|
9196
9213
|
if (seen !== next)
|
|
9197
9214
|
still.push(name);
|
|
9198
9215
|
}
|
|
@@ -9238,6 +9255,8 @@ async function planBookkeeping(ctx, train, repos2, next, today2) {
|
|
|
9238
9255
|
await edit(r, f, `plx pin \u2192 ${next}`, (t) => bumpPlxPin(t, next));
|
|
9239
9256
|
for (const f of await grep(r, `"${CONFIG_PIN}"`, ["*package.json", "*package.json.jinja"]))
|
|
9240
9257
|
await edit(r, f, `${CONFIG_PIN} pin \u2192 ${next}`, (t) => bumpConfigPin(t, next));
|
|
9258
|
+
for (const f of await grep(r, `"${CONFIG_PIN}"`, ["*pnpm-workspace.yaml", "*pnpm-workspace.yaml.jinja"]))
|
|
9259
|
+
await edit(r, f, `${CONFIG_PIN} catalog entry \u2192 ${next}`, (t) => bumpCatalogPin(t, next));
|
|
9241
9260
|
}
|
|
9242
9261
|
const comp = repo("compendium");
|
|
9243
9262
|
if (comp) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plexus-ms/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.101.0",
|
|
4
4
|
"description": "plx, the Plexus command-line tool: a single-script adapter over @plexus-ms/lib",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@inquirer/prompts": "^8.7.4",
|
|
27
|
-
"@plexus-ms/lib": "0.
|
|
27
|
+
"@plexus-ms/lib": "0.101.0",
|
|
28
28
|
"commander": "^15.0.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|