deploro 0.3.1 → 0.3.3
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/index.js +16 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -391,6 +391,21 @@ async function authInviteCommand(email, opts) {
|
|
|
391
391
|
console.log(` Accept URL: ${data.acceptUrl}`);
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
+
async function authSiteUrlCommand(url, opts) {
|
|
395
|
+
const config = requireProject();
|
|
396
|
+
if (!url && !opts.clear) {
|
|
397
|
+
const data2 = await apiRequest(
|
|
398
|
+
`/api/projects/${config.projectId}/auth/settings`
|
|
399
|
+
);
|
|
400
|
+
console.log(data2.site_url ?? "(not set \u2014 confirmation links fall back to this project's own deployment URL)");
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
const data = await apiRequest(
|
|
404
|
+
`/api/projects/${config.projectId}/auth/settings`,
|
|
405
|
+
{ method: "PUT", body: JSON.stringify({ site_url: opts.clear ? null : url }) }
|
|
406
|
+
);
|
|
407
|
+
console.log(opts.clear ? "\u2713 Site URL cleared" : `\u2713 Site URL set to ${data.site_url}`);
|
|
408
|
+
}
|
|
394
409
|
async function authWhoamiCommand() {
|
|
395
410
|
requireConfig();
|
|
396
411
|
const data = await apiRequestNoProject("/api/auth/whoami");
|
|
@@ -835,6 +850,7 @@ var auth = program.command("auth").description("Auth management commands");
|
|
|
835
850
|
auth.command("whoami").description("Show the current identity, and \u2014 for a token login \u2014 exactly what it's scoped to").action(authWhoamiCommand);
|
|
836
851
|
auth.command("users").description("List platform users").action(authUsersCommand);
|
|
837
852
|
auth.command("invite <email>").description("Invite a user by email").option("--admin", "Grant admin role").action(authInviteCommand);
|
|
853
|
+
auth.command("site-url [url]").description("Get or set the active project's Auth Site URL (where end-user confirmation-email links redirect back to)").option("--clear", "Clear the Site URL \u2014 confirmation links fall back to the project's own deployment URL").action(authSiteUrlCommand);
|
|
838
854
|
var token = program.command("token").description("Personal access token commands");
|
|
839
855
|
token.command("list").description("List your personal access tokens").action(tokenListCommand);
|
|
840
856
|
token.command("create <name>").description("Create a new project-scoped personal access token").option("--read", "Grant read scope").option("--write", "Grant write scope").option("--project <slugs>", "Comma-separated project slugs/ids/names (defaults to the active project)").option("--days <n>", "Expiry in days (1-365)", "90").action(tokenCreateCommand);
|
package/package.json
CHANGED