fluncle 0.225.0 → 0.226.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/bin/fluncle.mjs +28 -6
- package/package.json +1 -1
package/bin/fluncle.mjs
CHANGED
|
@@ -612,7 +612,7 @@ function parseVersion(version) {
|
|
|
612
612
|
var currentVersion;
|
|
613
613
|
var init_version = __esm(() => {
|
|
614
614
|
init_output();
|
|
615
|
-
currentVersion = "0.
|
|
615
|
+
currentVersion = "0.226.0".trim() ? "0.226.0".trim() : "0.1.0";
|
|
616
616
|
});
|
|
617
617
|
|
|
618
618
|
// src/update-notifier.ts
|
|
@@ -2454,7 +2454,7 @@ function parseVersion2(version) {
|
|
|
2454
2454
|
var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
|
|
2455
2455
|
var init_version2 = __esm(() => {
|
|
2456
2456
|
init_output();
|
|
2457
|
-
currentVersion2 = "0.
|
|
2457
|
+
currentVersion2 = "0.226.0".trim() ? "0.226.0".trim() : "0.1.0";
|
|
2458
2458
|
});
|
|
2459
2459
|
|
|
2460
2460
|
// ../../packages/registry/src/index.ts
|
|
@@ -16560,6 +16560,7 @@ var init_admin_operation_receipts2 = __esm(() => {
|
|
|
16560
16560
|
// src/commands/admin-projections.ts
|
|
16561
16561
|
var exports_admin_projections = {};
|
|
16562
16562
|
__export(exports_admin_projections, {
|
|
16563
|
+
PROJECTION_MAX_STEPS: () => PROJECTION_MAX_STEPS,
|
|
16563
16564
|
PROJECTION_STEP_LIMIT_MAX: () => PROJECTION_STEP_LIMIT_MAX,
|
|
16564
16565
|
advanceProjectionCommand: () => advanceProjectionCommand,
|
|
16565
16566
|
getProjectionStatusCommand: () => getProjectionStatusCommand,
|
|
@@ -16567,6 +16568,7 @@ __export(exports_admin_projections, {
|
|
|
16567
16568
|
parseProjectionCutover: () => parseProjectionCutover,
|
|
16568
16569
|
parseProjectionEnabled: () => parseProjectionEnabled,
|
|
16569
16570
|
parseProjectionLimit: () => parseProjectionLimit,
|
|
16571
|
+
parseProjectionMaxSteps: () => parseProjectionMaxSteps,
|
|
16570
16572
|
parseProjectionTarget: () => parseProjectionTarget,
|
|
16571
16573
|
projectionStatusLines: () => projectionStatusLines,
|
|
16572
16574
|
setProjectionCutoverCommand: () => setProjectionCutoverCommand
|
|
@@ -16575,8 +16577,18 @@ async function getProjectionStatusCommand() {
|
|
|
16575
16577
|
return adminApiGet("/api/v1/admin/projections/status");
|
|
16576
16578
|
}
|
|
16577
16579
|
async function advanceProjectionCommand(input) {
|
|
16578
|
-
const { target, ...body } = input;
|
|
16579
|
-
|
|
16580
|
+
const { maxSteps = 1, target, ...body } = input;
|
|
16581
|
+
let response = await adminApiPost(`/api/v1/admin/projections/${target}/advance`, body);
|
|
16582
|
+
let steps = 1;
|
|
16583
|
+
let processed = response.processed;
|
|
16584
|
+
let scheduled = response.scheduled;
|
|
16585
|
+
while (!response.complete && steps < maxSteps) {
|
|
16586
|
+
response = await adminApiPost(`/api/v1/admin/projections/${target}/advance`, body);
|
|
16587
|
+
steps += 1;
|
|
16588
|
+
processed += response.processed;
|
|
16589
|
+
scheduled += response.scheduled;
|
|
16590
|
+
}
|
|
16591
|
+
return { ...response, processed, scheduled, steps };
|
|
16580
16592
|
}
|
|
16581
16593
|
async function setProjectionCutoverCommand(input) {
|
|
16582
16594
|
const { enabled, target } = input;
|
|
@@ -16595,6 +16607,13 @@ function parseProjectionLimit(value) {
|
|
|
16595
16607
|
}
|
|
16596
16608
|
return limit;
|
|
16597
16609
|
}
|
|
16610
|
+
function parseProjectionMaxSteps(value) {
|
|
16611
|
+
const maxSteps = Number(value);
|
|
16612
|
+
if (!Number.isSafeInteger(maxSteps) || maxSteps < 1 || maxSteps > PROJECTION_MAX_STEPS) {
|
|
16613
|
+
throw new Error(`--max-steps must be a whole number from 1 through ${PROJECTION_MAX_STEPS}`);
|
|
16614
|
+
}
|
|
16615
|
+
return maxSteps;
|
|
16616
|
+
}
|
|
16598
16617
|
function parseProjectionTarget(value) {
|
|
16599
16618
|
if (value !== "artist_qualification" && value !== "crawl_due_work" && value !== "public_aggregates" && value !== "track_due_work") {
|
|
16600
16619
|
throw new Error("--target must be artist_qualification, crawl_due_work, public_aggregates, or track_due_work");
|
|
@@ -16622,6 +16641,7 @@ function projectionStatusLines(status) {
|
|
|
16622
16641
|
row("Artist qualification", status.projections.artistQualification, status.cutovers.publicProjections)
|
|
16623
16642
|
];
|
|
16624
16643
|
}
|
|
16644
|
+
var PROJECTION_MAX_STEPS = 100;
|
|
16625
16645
|
var init_admin_projections2 = __esm(() => {
|
|
16626
16646
|
init_orpc();
|
|
16627
16647
|
init_api();
|
|
@@ -22156,18 +22176,19 @@ JSON field reference:
|
|
|
22156
22176
|
console.log(projections.projectionStatusLines(result.status).join(`
|
|
22157
22177
|
`));
|
|
22158
22178
|
});
|
|
22159
|
-
adminProjections.command("advance").description("Run
|
|
22179
|
+
adminProjections.command("advance").description("Run bounded, resumable rebuild, repair, or audit steps").requiredOption("--target <target>", "track_due_work, crawl_due_work, public_aggregates, or artist_qualification").requiredOption("--action <action>", "rebuild, repair, or audit").option("--limit <limit>", "Maximum rows or repairs in this request (1-500)", "100").option("--max-steps <steps>", "Maximum sequential advance calls (1-100)").option("--json", "Print the aggregate result and current readiness as JSON", false).action(async (options) => {
|
|
22160
22180
|
const projections = await Promise.resolve().then(() => (init_admin_projections2(), exports_admin_projections));
|
|
22161
22181
|
const result = await projections.advanceProjectionCommand({
|
|
22162
22182
|
action: projections.parseProjectionAction(options.action),
|
|
22163
22183
|
limit: projections.parseProjectionLimit(options.limit),
|
|
22184
|
+
maxSteps: options.maxSteps === undefined ? undefined : projections.parseProjectionMaxSteps(options.maxSteps),
|
|
22164
22185
|
target: projections.parseProjectionTarget(options.target)
|
|
22165
22186
|
});
|
|
22166
22187
|
if (options.json) {
|
|
22167
22188
|
printJson(result);
|
|
22168
22189
|
return;
|
|
22169
22190
|
}
|
|
22170
|
-
console.log(`${result.target} ${result.action}: processed ${result.processed}, scheduled ${result.scheduled}, ${result.complete ? "complete" : "more work remains"}.`);
|
|
22191
|
+
console.log(`${result.target} ${result.action}: steps ${result.steps}, processed ${result.processed}, scheduled ${result.scheduled}, ${result.complete ? "complete" : "more work remains"}.`);
|
|
22171
22192
|
});
|
|
22172
22193
|
adminProjections.command("set").description("Open or close one readiness-gated projection cutover").requiredOption("--target <target>", "track_due_work, crawl_due_work, or public_projections").requiredOption("--enabled <boolean>", "true opens; false closes unconditionally").option("--json", "Print the stored flag and current readiness as JSON", false).action(async (options) => {
|
|
22173
22194
|
const projections = await Promise.resolve().then(() => (init_admin_projections2(), exports_admin_projections));
|
|
@@ -26061,6 +26082,7 @@ var stringOptions = new Set([
|
|
|
26061
26082
|
"--lens",
|
|
26062
26083
|
"--limit",
|
|
26063
26084
|
"--max-hop",
|
|
26085
|
+
"--max-steps",
|
|
26064
26086
|
"--max-overlap",
|
|
26065
26087
|
"--metrics",
|
|
26066
26088
|
"--missing-field",
|
package/package.json
CHANGED