@protobase/cli 0.133.3 → 0.133.4

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.
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.133.3";
2
+ var version = "0.133.4";
3
3
  //#endregion
4
4
  export { version };
@@ -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
- * or to none, not to the default organization the other commands pin unless it is named. The organization is resolved
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 joinsNone = api.organizationsOn && !pin;
46
- if (joinsNone && (options.orgRole !== void 0 || options.appRoles !== void 0)) throw new Error("--org-role and --app-roles need --organization <slug>: without it the user joins no organization");
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 (joinsNone) out(`${user.email} joins no organization\n`);
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`);
@@ -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, else none")).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) => {
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",
3
+ "version": "0.133.4",
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.3",
47
- "@protobase/layout": "0.133.3",
48
- "@protobase/query": "0.133.3",
49
- "@protobase/schema": "0.133.3",
50
- "@protobase/server": "0.133.3",
51
- "@protobase/ui": "0.133.3",
52
- "@protobase/workflows": "0.133.3",
46
+ "@protobase/config": "0.133.4",
47
+ "@protobase/layout": "0.133.4",
48
+ "@protobase/query": "0.133.4",
49
+ "@protobase/schema": "0.133.4",
50
+ "@protobase/server": "0.133.4",
51
+ "@protobase/ui": "0.133.4",
52
+ "@protobase/workflows": "0.133.4",
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",