@base44-preview/cli 0.0.51-pr.484.222fc2f → 0.0.51-pr.484.9abd5e2

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/index.js CHANGED
@@ -251270,8 +251270,21 @@ function mergeFileWithFlags(fileConfig, options) {
251270
251270
  };
251271
251271
  }
251272
251272
  var providerNames = Object.keys(KNOWN_SSO_PROVIDERS);
251273
+ var SECRET_KEY_TO_FLAG = {
251274
+ ["sso_name" /* Name */]: "--sso-name",
251275
+ ["sso_client_id" /* ClientId */]: "--client-id",
251276
+ ["sso_client_secret" /* ClientSecret */]: "--client-secret",
251277
+ ["sso_scope" /* Scope */]: "--scope",
251278
+ ["sso_discovery_url" /* DiscoveryUrl */]: "--discovery-url",
251279
+ ["sso_tenant_id" /* TenantId */]: "--tenant-id",
251280
+ ["sso_auth_endpoint" /* AuthEndpoint */]: "--auth-endpoint",
251281
+ ["sso_token_endpoint" /* TokenEndpoint */]: "--token-endpoint",
251282
+ ["sso_userinfo_endpoint" /* UserinfoEndpoint */]: "--userinfo-endpoint",
251283
+ ["sso_okta_domain" /* OktaDomain */]: "--okta-domain",
251284
+ ["sso_jwks_uri" /* JwksUri */]: "--jwks-uri"
251285
+ };
251273
251286
  function secretKeyToFlag(key) {
251274
- return `--${key.replace(/^sso_/, "").replace(/_/g, "-")}`;
251287
+ return SECRET_KEY_TO_FLAG[key];
251275
251288
  }
251276
251289
  function exampleCommand(provider) {
251277
251290
  let cmd = `base44 auth sso enable --provider ${provider} --client-id <id> --client-secret <secret>`;
@@ -251297,6 +251310,9 @@ function validateProvider(provider) {
251297
251310
  return provider;
251298
251311
  }
251299
251312
  async function ssoEnableAction({ isNonInteractive, runTask: runTask2 }, options) {
251313
+ if (options.file && options.envFile) {
251314
+ throw new InvalidInputError("--file and --env-file cannot be used together. Provide the client secret either inside --file or via --env-file.");
251315
+ }
251300
251316
  let merged = options;
251301
251317
  if (options.file) {
251302
251318
  const fileConfig = await loadSSOConfigFile(options.file);
@@ -251411,7 +251427,7 @@ function getSSOCommand() {
251411
251427
  return new Base44Command("sso").description("Configure SSO identity provider (google, microsoft, github, okta, custom). SSO and social login are mutually exclusive — enabling one disables the other in the local auth config.").addArgument(new Argument("<action>", "enable or disable SSO").choices([
251412
251428
  "enable",
251413
251429
  "disable"
251414
- ])).addOption(new Option("--provider <provider>", "SSO provider").choices(Object.values(KNOWN_SSO_PROVIDERS))).option("--client-id <id>", "OAuth client ID").option("--client-secret <secret>", "OAuth client secret").option("--client-secret-stdin", "Read client secret from stdin").option("--env-file <path>", "Read client secret from a .env file (key: sso_client_secret). Ignored if --client-secret is provided directly or via --file.").option("--file <path>", "JSON config file with all SSO settings").option("--scope <scope>", "OAuth scope (defaults per provider)").option("--discovery-url <url>", "OIDC discovery URL").option("--tenant-id <id>", "Microsoft tenant ID (required for microsoft)").option("--okta-domain <domain>", "Okta domain (required for okta)").option("--auth-endpoint <url>", "Authorization endpoint (required for custom)").option("--token-endpoint <url>", "Token endpoint (required for custom)").option("--userinfo-endpoint <url>", "Userinfo endpoint (required for custom)").option("--jwks-uri <url>", "JWKS URI (required for custom)").option("--sso-name <name>", "Provider display name (required for custom)").action(ssoAction);
251430
+ ])).addOption(new Option("--provider <provider>", "SSO provider").choices(Object.values(KNOWN_SSO_PROVIDERS))).option("--client-id <id>", "OAuth client ID").option("--client-secret <secret>", "OAuth client secret").option("--client-secret-stdin", "Read client secret from stdin").option("--env-file <path>", "Read client secret from a .env file (key: sso_client_secret)").option("--file <path>", "JSON config file with all SSO settings").option("--scope <scope>", "OAuth scope (defaults per provider)").option("--discovery-url <url>", "OIDC discovery URL").option("--tenant-id <id>", "Microsoft tenant ID (required for microsoft)").option("--okta-domain <domain>", "Okta domain (required for okta)").option("--auth-endpoint <url>", "Authorization endpoint (required for custom)").option("--token-endpoint <url>", "Token endpoint (required for custom)").option("--userinfo-endpoint <url>", "Userinfo endpoint (required for custom)").option("--jwks-uri <url>", "JWKS URI (required for custom)").option("--sso-name <name>", "Provider display name (required for custom)").action(ssoAction);
251415
251431
  }
251416
251432
 
251417
251433
  // src/cli/commands/auth/index.ts
@@ -261262,4 +261278,4 @@ export {
261262
261278
  CLIExitError
261263
261279
  };
261264
261280
 
261265
- //# debugId=E1D26BE93FCEF41264756E2164756E21
261281
+ //# debugId=30D916E80922F28864756E2164756E21