@siglume/api-sdk 3.0.0 → 3.1.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/README.md +9 -2
- package/dist/bin/siglume.cjs +33 -7
- package/dist/bin/siglume.cjs.map +1 -1
- package/dist/bin/siglume.js +33 -7
- package/dist/bin/siglume.js.map +1 -1
- package/dist/cli/index.cjs +33 -7
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +3 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +33 -7
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.cjs
CHANGED
|
@@ -2566,8 +2566,12 @@ var init_client = __esm({
|
|
|
2566
2566
|
};
|
|
2567
2567
|
}
|
|
2568
2568
|
async confirm_registration(listing_id, options = {}) {
|
|
2569
|
-
const { version_bump: versionBump } = options;
|
|
2569
|
+
const { version_bump: versionBump, visibility = "public" } = options;
|
|
2570
2570
|
const payload = { approved: true };
|
|
2571
|
+
if (visibility !== "public" && visibility !== "private") {
|
|
2572
|
+
throw new Error(`visibility must be one of ["public","private"], got ${JSON.stringify(visibility)}`);
|
|
2573
|
+
}
|
|
2574
|
+
payload.visibility = visibility;
|
|
2571
2575
|
if (versionBump !== void 0) {
|
|
2572
2576
|
const allowed = ["patch", "minor", "major"];
|
|
2573
2577
|
if (!allowed.includes(versionBump)) {
|
|
@@ -2585,6 +2589,7 @@ var init_client = __esm({
|
|
|
2585
2589
|
return {
|
|
2586
2590
|
listing_id: String(data.listing_id ?? listing_id),
|
|
2587
2591
|
status: String(data.status ?? ""),
|
|
2592
|
+
visibility: stringOrNull(data.visibility),
|
|
2588
2593
|
message: stringOrNull(data.message),
|
|
2589
2594
|
checklist,
|
|
2590
2595
|
release: toRecord(data.release),
|
|
@@ -7085,7 +7090,9 @@ async function runRegistration(path = ".", options = {}, deps = {}) {
|
|
|
7085
7090
|
}
|
|
7086
7091
|
const shouldConfirm = Boolean(options.confirm) || options.confirm === void 0 && !options.draft_only && !options.submit_review;
|
|
7087
7092
|
if (shouldConfirm) {
|
|
7088
|
-
result.confirmation = toJsonable(await client.confirm_registration(receipt.listing_id
|
|
7093
|
+
result.confirmation = toJsonable(await client.confirm_registration(receipt.listing_id, {
|
|
7094
|
+
visibility: options.confirm_visibility ?? "public"
|
|
7095
|
+
}));
|
|
7089
7096
|
if (options.submit_review) {
|
|
7090
7097
|
result.submit_review_skipped = true;
|
|
7091
7098
|
}
|
|
@@ -8362,26 +8369,44 @@ async function runCli(argv, deps = {}) {
|
|
|
8362
8369
|
}
|
|
8363
8370
|
if (report.runtime_validation_path) emit(stdout, `runtime_validation_path: ${String(report.runtime_validation_path)}`);
|
|
8364
8371
|
});
|
|
8365
|
-
program.command("register").option("--confirm", "explicitly confirm the registration; this is the default unless --draft-only is set", false).option("--draft-only", "create or refresh the draft without confirming publication", false).option("--submit-review", "legacy alias: publish immediately if your environment still routes through submit-review", false).option("--json", "emit machine-readable JSON", false).argument("[path]", ".", "project path").action(async (path, options) => {
|
|
8372
|
+
program.command("register").option("--confirm", "explicitly confirm the registration; this is the default unless --draft-only is set", false).option("--private-confirm", "confirm the registration for private production testing without publishing it", false).option("--draft-only", "create or refresh the draft without confirming publication", false).option("--submit-review", "legacy alias: publish immediately if your environment still routes through submit-review", false).option("--json", "emit machine-readable JSON", false).argument("[path]", ".", "project path").action(async (path, options) => {
|
|
8366
8373
|
const draftOnly = Boolean(options.draftOnly);
|
|
8374
|
+
const privateConfirm = Boolean(options.privateConfirm);
|
|
8367
8375
|
if (draftOnly && options.confirm) {
|
|
8368
8376
|
throw new SiglumeProjectError("--draft-only cannot be combined with --confirm.");
|
|
8369
8377
|
}
|
|
8378
|
+
if (draftOnly && privateConfirm) {
|
|
8379
|
+
throw new SiglumeProjectError("--draft-only cannot be combined with --private-confirm.");
|
|
8380
|
+
}
|
|
8381
|
+
if (options.confirm && privateConfirm) {
|
|
8382
|
+
throw new SiglumeProjectError("--confirm cannot be combined with --private-confirm.");
|
|
8383
|
+
}
|
|
8370
8384
|
if (draftOnly && options.submitReview) {
|
|
8371
8385
|
throw new SiglumeProjectError("--draft-only cannot be combined with --submit-review.");
|
|
8372
8386
|
}
|
|
8373
|
-
|
|
8387
|
+
if (privateConfirm && options.submitReview) {
|
|
8388
|
+
throw new SiglumeProjectError("--private-confirm cannot be combined with --submit-review.");
|
|
8389
|
+
}
|
|
8390
|
+
const shouldConfirm = Boolean(options.confirm) || privateConfirm || !draftOnly && !options.submitReview;
|
|
8374
8391
|
const report = await runRegistration(path, {
|
|
8375
8392
|
confirm: shouldConfirm,
|
|
8393
|
+
confirm_visibility: privateConfirm ? "private" : "public",
|
|
8376
8394
|
draft_only: draftOnly,
|
|
8377
8395
|
submit_review: options.submitReview
|
|
8378
8396
|
}, deps);
|
|
8397
|
+
if (privateConfirm && report.confirmation && !report.confirmation.visibility) {
|
|
8398
|
+
report.confirmation.visibility = "private";
|
|
8399
|
+
}
|
|
8379
8400
|
if (options.json) {
|
|
8380
8401
|
emit(stdout, renderJson(report));
|
|
8381
8402
|
} else {
|
|
8382
8403
|
const receipt = report.receipt;
|
|
8383
|
-
const
|
|
8384
|
-
|
|
8404
|
+
const confirmationSummary = report.confirmation;
|
|
8405
|
+
const privatelyConfirmed = confirmationSummary?.visibility === "private";
|
|
8406
|
+
const published = !privatelyConfirmed && Boolean(report.confirmation || report.review);
|
|
8407
|
+
if (privatelyConfirmed) {
|
|
8408
|
+
emit(stdout, "Registration privately confirmed.");
|
|
8409
|
+
} else if (published && receipt.registration_mode === "upgrade") {
|
|
8385
8410
|
emit(stdout, "Upgrade registered.");
|
|
8386
8411
|
} else if (published) {
|
|
8387
8412
|
emit(stdout, "Registration accepted.");
|
|
@@ -8400,8 +8425,9 @@ async function runCli(argv, deps = {}) {
|
|
|
8400
8425
|
if (receipt.request_id) emit(stdout, `request_id: ${receipt.request_id}`);
|
|
8401
8426
|
if (report.confirmation) {
|
|
8402
8427
|
const confirmation = report.confirmation;
|
|
8403
|
-
emit(stdout, "Listing published.");
|
|
8428
|
+
emit(stdout, confirmation.visibility === "private" ? "Listing confirmed privately for production testing." : "Listing published.");
|
|
8404
8429
|
if (confirmation.status) emit(stdout, `confirmation_status: ${confirmation.status}`);
|
|
8430
|
+
if (confirmation.visibility) emit(stdout, `confirmation_visibility: ${confirmation.visibility}`);
|
|
8405
8431
|
if (confirmation.release?.release_status) emit(stdout, `release_status: ${confirmation.release.release_status}`);
|
|
8406
8432
|
} else if (report.review) {
|
|
8407
8433
|
const review = report.review;
|