@protobase/cli 0.133.3 → 0.133.5
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/cli/package.js
CHANGED
package/dist/users/commands.js
CHANGED
|
@@ -34,18 +34,18 @@ const createUserCommand = async (api, options, deps, out) => {
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
-
* Creates the user (`createUserCommand`) and, with organizations, adds them to the organization `--organization` names
|
|
38
|
-
*
|
|
37
|
+
* Creates the user (`createUserCommand`) and, with organizations, adds them to the organization `--organization` names;
|
|
38
|
+
* without it none is chosen, not the default organization the other commands pin. The organization is resolved
|
|
39
39
|
* first, so an unknown one creates nobody.
|
|
40
40
|
*/
|
|
41
41
|
const createMemberCommand = async (api, options, deps, out) => {
|
|
42
42
|
if (options.allOrganizations && !api.organizationsOn) throw new Error("--all-organizations needs organizations: turn on auth.organizations in the config");
|
|
43
43
|
if (options.allOrganizations && options.organization !== void 0) throw new Error("Pass --organization or --all-organizations, not both");
|
|
44
44
|
const pin = options.organization === void 0 ? void 0 : await resolveOptionalPin(api, options, "users create");
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
45
|
+
const noneChosen = api.organizationsOn && !pin;
|
|
46
|
+
if (noneChosen && (options.orgRole !== void 0 || options.appRoles !== void 0)) throw new Error("--org-role and --app-roles need --organization <slug>: without it no organization is chosen");
|
|
47
47
|
const user = await createUserCommand(api, options, deps, out);
|
|
48
|
-
if (
|
|
48
|
+
if (noneChosen) out(`No organization chosen with --organization for ${user.email}\n`);
|
|
49
49
|
if (!pin || "every" in pin) return;
|
|
50
50
|
if (user.first && await api.isMember(pin.organization.id, user.email)) {
|
|
51
51
|
out(`${user.email} owns ${pin.organization.slug}\n`);
|
package/dist/users/register.js
CHANGED
|
@@ -22,7 +22,7 @@ const ask = async (question) => {
|
|
|
22
22
|
const finish = (code) => process.exit(code);
|
|
23
23
|
const registerUsers = (program) => {
|
|
24
24
|
const users = program.command("users").description("Manage the admin users of the project in the current directory");
|
|
25
|
-
pinOptions(users.command("create").description("Create a user; the first user is always an admin. With organizations, they join the organization --organization names
|
|
25
|
+
pinOptions(users.command("create").description("Create a user; the first user is always an admin. With organizations, they join the organization --organization names; without it none is chosen")).argument("<email>").option("--name <name>", "display name").option("--role <role>", "role for users after the first (default: the project's default role; see `users roles`)").option("--password-stdin", "read the password from stdin", false).option("--generate-password", "generate a strong password and print it once", false).option("--no-password", "no password: the user signs in by emailed code, passkey or a sign-in provider").option("--github-id <id>", "link the user to this GitHub user id, so signing in with GitHub finds them whatever their address").option("--org-role <role>", "with --organization: owner, admin or member there (default member)").option("--app-roles <roles>", "with --organization: app roles there, comma separated").addOption(new Option("--password <value>").hideHelp()).action(async (email, opts) => {
|
|
26
26
|
const { readHidden, rejectPasswordArgument } = await import("./password.js");
|
|
27
27
|
rejectPasswordArgument(opts.password);
|
|
28
28
|
const [{ createMemberCommand }, api] = await Promise.all([import("./commands.js"), projectApi()]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.133.
|
|
3
|
+
"version": "0.133.5",
|
|
4
4
|
"description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@better-auth/core": "^1.7.12",
|
|
45
45
|
"@hono/node-server": "^2.1.3",
|
|
46
|
-
"@protobase/config": "0.133.
|
|
47
|
-
"@protobase/layout": "0.133.
|
|
48
|
-
"@protobase/query": "0.133.
|
|
49
|
-
"@protobase/schema": "0.133.
|
|
50
|
-
"@protobase/server": "0.133.
|
|
51
|
-
"@protobase/ui": "0.133.
|
|
52
|
-
"@protobase/workflows": "0.133.
|
|
46
|
+
"@protobase/config": "0.133.5",
|
|
47
|
+
"@protobase/layout": "0.133.5",
|
|
48
|
+
"@protobase/query": "0.133.5",
|
|
49
|
+
"@protobase/schema": "0.133.5",
|
|
50
|
+
"@protobase/server": "0.133.5",
|
|
51
|
+
"@protobase/ui": "0.133.5",
|
|
52
|
+
"@protobase/workflows": "0.133.5",
|
|
53
53
|
"@react-email/render": "^2.1.0",
|
|
54
54
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
55
55
|
"@sentry/vite-plugin": "^11.10.0",
|
|
@@ -441,7 +441,7 @@ The default store keeps devices in the table `devices` of the schema `notificati
|
|
|
441
441
|
| `session_id` | the id of the sign-in session it was registered in, never its token; `NULL` when the app's `authenticate` names none |
|
|
442
442
|
| `created_at`, `last_seen_at` | when the user registered it, and last refreshed it |
|
|
443
443
|
|
|
444
|
-
[`protobase migration baseline`](cli.md#migration) refuses a devices table written before devices kept their session or could be relay devices
|
|
444
|
+
[`protobase migration baseline`](cli.md#migration) refuses a devices table written before devices kept their session or could be relay devices, which no step of this version of Protobase records.
|
|
445
445
|
|
|
446
446
|
You rename the schema, the table and each column, as auth takes `tables`, such as to keep devices in a table you already have:
|
|
447
447
|
|