@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/bin/siglume.js
CHANGED
|
@@ -2544,8 +2544,12 @@ var init_client = __esm({
|
|
|
2544
2544
|
};
|
|
2545
2545
|
}
|
|
2546
2546
|
async confirm_registration(listing_id, options = {}) {
|
|
2547
|
-
const { version_bump: versionBump } = options;
|
|
2547
|
+
const { version_bump: versionBump, visibility = "public" } = options;
|
|
2548
2548
|
const payload = { approved: true };
|
|
2549
|
+
if (visibility !== "public" && visibility !== "private") {
|
|
2550
|
+
throw new Error(`visibility must be one of ["public","private"], got ${JSON.stringify(visibility)}`);
|
|
2551
|
+
}
|
|
2552
|
+
payload.visibility = visibility;
|
|
2549
2553
|
if (versionBump !== void 0) {
|
|
2550
2554
|
const allowed = ["patch", "minor", "major"];
|
|
2551
2555
|
if (!allowed.includes(versionBump)) {
|
|
@@ -2563,6 +2567,7 @@ var init_client = __esm({
|
|
|
2563
2567
|
return {
|
|
2564
2568
|
listing_id: String(data.listing_id ?? listing_id),
|
|
2565
2569
|
status: String(data.status ?? ""),
|
|
2570
|
+
visibility: stringOrNull(data.visibility),
|
|
2566
2571
|
message: stringOrNull(data.message),
|
|
2567
2572
|
checklist,
|
|
2568
2573
|
release: toRecord(data.release),
|
|
@@ -7058,7 +7063,9 @@ async function runRegistration(path = ".", options = {}, deps = {}) {
|
|
|
7058
7063
|
}
|
|
7059
7064
|
const shouldConfirm = Boolean(options.confirm) || options.confirm === void 0 && !options.draft_only && !options.submit_review;
|
|
7060
7065
|
if (shouldConfirm) {
|
|
7061
|
-
result.confirmation = toJsonable(await client.confirm_registration(receipt.listing_id
|
|
7066
|
+
result.confirmation = toJsonable(await client.confirm_registration(receipt.listing_id, {
|
|
7067
|
+
visibility: options.confirm_visibility ?? "public"
|
|
7068
|
+
}));
|
|
7062
7069
|
if (options.submit_review) {
|
|
7063
7070
|
result.submit_review_skipped = true;
|
|
7064
7071
|
}
|
|
@@ -8335,26 +8342,44 @@ async function runCli(argv, deps = {}) {
|
|
|
8335
8342
|
}
|
|
8336
8343
|
if (report.runtime_validation_path) emit(stdout, `runtime_validation_path: ${String(report.runtime_validation_path)}`);
|
|
8337
8344
|
});
|
|
8338
|
-
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) => {
|
|
8345
|
+
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) => {
|
|
8339
8346
|
const draftOnly = Boolean(options.draftOnly);
|
|
8347
|
+
const privateConfirm = Boolean(options.privateConfirm);
|
|
8340
8348
|
if (draftOnly && options.confirm) {
|
|
8341
8349
|
throw new SiglumeProjectError("--draft-only cannot be combined with --confirm.");
|
|
8342
8350
|
}
|
|
8351
|
+
if (draftOnly && privateConfirm) {
|
|
8352
|
+
throw new SiglumeProjectError("--draft-only cannot be combined with --private-confirm.");
|
|
8353
|
+
}
|
|
8354
|
+
if (options.confirm && privateConfirm) {
|
|
8355
|
+
throw new SiglumeProjectError("--confirm cannot be combined with --private-confirm.");
|
|
8356
|
+
}
|
|
8343
8357
|
if (draftOnly && options.submitReview) {
|
|
8344
8358
|
throw new SiglumeProjectError("--draft-only cannot be combined with --submit-review.");
|
|
8345
8359
|
}
|
|
8346
|
-
|
|
8360
|
+
if (privateConfirm && options.submitReview) {
|
|
8361
|
+
throw new SiglumeProjectError("--private-confirm cannot be combined with --submit-review.");
|
|
8362
|
+
}
|
|
8363
|
+
const shouldConfirm = Boolean(options.confirm) || privateConfirm || !draftOnly && !options.submitReview;
|
|
8347
8364
|
const report = await runRegistration(path, {
|
|
8348
8365
|
confirm: shouldConfirm,
|
|
8366
|
+
confirm_visibility: privateConfirm ? "private" : "public",
|
|
8349
8367
|
draft_only: draftOnly,
|
|
8350
8368
|
submit_review: options.submitReview
|
|
8351
8369
|
}, deps);
|
|
8370
|
+
if (privateConfirm && report.confirmation && !report.confirmation.visibility) {
|
|
8371
|
+
report.confirmation.visibility = "private";
|
|
8372
|
+
}
|
|
8352
8373
|
if (options.json) {
|
|
8353
8374
|
emit(stdout, renderJson(report));
|
|
8354
8375
|
} else {
|
|
8355
8376
|
const receipt = report.receipt;
|
|
8356
|
-
const
|
|
8357
|
-
|
|
8377
|
+
const confirmationSummary = report.confirmation;
|
|
8378
|
+
const privatelyConfirmed = confirmationSummary?.visibility === "private";
|
|
8379
|
+
const published = !privatelyConfirmed && Boolean(report.confirmation || report.review);
|
|
8380
|
+
if (privatelyConfirmed) {
|
|
8381
|
+
emit(stdout, "Registration privately confirmed.");
|
|
8382
|
+
} else if (published && receipt.registration_mode === "upgrade") {
|
|
8358
8383
|
emit(stdout, "Upgrade registered.");
|
|
8359
8384
|
} else if (published) {
|
|
8360
8385
|
emit(stdout, "Registration accepted.");
|
|
@@ -8373,8 +8398,9 @@ async function runCli(argv, deps = {}) {
|
|
|
8373
8398
|
if (receipt.request_id) emit(stdout, `request_id: ${receipt.request_id}`);
|
|
8374
8399
|
if (report.confirmation) {
|
|
8375
8400
|
const confirmation = report.confirmation;
|
|
8376
|
-
emit(stdout, "Listing published.");
|
|
8401
|
+
emit(stdout, confirmation.visibility === "private" ? "Listing confirmed privately for production testing." : "Listing published.");
|
|
8377
8402
|
if (confirmation.status) emit(stdout, `confirmation_status: ${confirmation.status}`);
|
|
8403
|
+
if (confirmation.visibility) emit(stdout, `confirmation_visibility: ${confirmation.visibility}`);
|
|
8378
8404
|
if (confirmation.release?.release_status) emit(stdout, `release_status: ${confirmation.release.release_status}`);
|
|
8379
8405
|
} else if (report.review) {
|
|
8380
8406
|
const review = report.review;
|