@base44-preview/cli 0.0.48-pr.445.4fa436f → 0.0.49-pr.445.325d070
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 +8 -50
- package/dist/cli/index.js.map +6 -6
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -243201,7 +243201,7 @@ import { join as join9 } from "node:path";
|
|
|
243201
243201
|
// package.json
|
|
243202
243202
|
var package_default = {
|
|
243203
243203
|
name: "base44",
|
|
243204
|
-
version: "0.0.
|
|
243204
|
+
version: "0.0.49",
|
|
243205
243205
|
description: "Base44 CLI - Unified interface for managing Base44 applications",
|
|
243206
243206
|
type: "module",
|
|
243207
243207
|
bin: {
|
|
@@ -250717,24 +250717,7 @@ function getAgentsCommand() {
|
|
|
250717
250717
|
|
|
250718
250718
|
// src/cli/commands/auth/password-login.ts
|
|
250719
250719
|
import { dirname as dirname8, join as join13 } from "node:path";
|
|
250720
|
-
function validateAction(action) {
|
|
250721
|
-
if (action !== "enable" && action !== "disable") {
|
|
250722
|
-
throw new InvalidInputError(`Invalid action "${action}". Must be "enable" or "disable".`, {
|
|
250723
|
-
hints: [
|
|
250724
|
-
{
|
|
250725
|
-
message: "Enable password auth: base44 auth password-login enable",
|
|
250726
|
-
command: "base44 auth password-login enable"
|
|
250727
|
-
},
|
|
250728
|
-
{
|
|
250729
|
-
message: "Disable password auth: base44 auth password-login disable",
|
|
250730
|
-
command: "base44 auth password-login disable"
|
|
250731
|
-
}
|
|
250732
|
-
]
|
|
250733
|
-
});
|
|
250734
|
-
}
|
|
250735
|
-
}
|
|
250736
250720
|
async function passwordLoginAction({ log }, action) {
|
|
250737
|
-
validateAction(action);
|
|
250738
250721
|
const shouldEnable = action === "enable";
|
|
250739
250722
|
const { project: project2 } = await readProjectConfig();
|
|
250740
250723
|
const configDir = dirname8(project2.configPath);
|
|
@@ -250754,7 +250737,7 @@ async function passwordLoginAction({ log }, action) {
|
|
|
250754
250737
|
};
|
|
250755
250738
|
}
|
|
250756
250739
|
function getPasswordLoginCommand() {
|
|
250757
|
-
return new Base44Command("password-login").description("Enable or disable username & password authentication").
|
|
250740
|
+
return new Base44Command("password-login").description("Enable or disable username & password authentication").addArgument(new Argument("<action>", "enable or disable password authentication").choices(["enable", "disable"])).action(passwordLoginAction);
|
|
250758
250741
|
}
|
|
250759
250742
|
|
|
250760
250743
|
// src/cli/commands/auth/pull.ts
|
|
@@ -250834,35 +250817,7 @@ var SOCIAL_PROVIDERS = {
|
|
|
250834
250817
|
apple: { field: "enableAppleLogin", label: "Apple" }
|
|
250835
250818
|
};
|
|
250836
250819
|
var VALID_PROVIDERS = Object.keys(SOCIAL_PROVIDERS);
|
|
250837
|
-
function validateProvider(provider) {
|
|
250838
|
-
if (!(provider in SOCIAL_PROVIDERS)) {
|
|
250839
|
-
throw new InvalidInputError(`Invalid provider "${provider}". Must be one of: ${VALID_PROVIDERS.join(", ")}.`, {
|
|
250840
|
-
hints: VALID_PROVIDERS.map((p) => ({
|
|
250841
|
-
message: `Enable ${SOCIAL_PROVIDERS[p].label} login: base44 auth social-login ${p} enable`,
|
|
250842
|
-
command: `base44 auth social-login ${p} enable`
|
|
250843
|
-
}))
|
|
250844
|
-
});
|
|
250845
|
-
}
|
|
250846
|
-
}
|
|
250847
|
-
function validateAction2(action) {
|
|
250848
|
-
if (action !== "enable" && action !== "disable") {
|
|
250849
|
-
throw new InvalidInputError(`Invalid action "${action}". Must be "enable" or "disable".`, {
|
|
250850
|
-
hints: [
|
|
250851
|
-
{
|
|
250852
|
-
message: "Enable social login: base44 auth social-login <provider> enable",
|
|
250853
|
-
command: "base44 auth social-login <provider> enable"
|
|
250854
|
-
},
|
|
250855
|
-
{
|
|
250856
|
-
message: "Disable social login: base44 auth social-login <provider> disable",
|
|
250857
|
-
command: "base44 auth social-login <provider> disable"
|
|
250858
|
-
}
|
|
250859
|
-
]
|
|
250860
|
-
});
|
|
250861
|
-
}
|
|
250862
|
-
}
|
|
250863
250820
|
async function socialLoginAction({ log, isNonInteractive }, provider, action, options) {
|
|
250864
|
-
validateProvider(provider);
|
|
250865
|
-
validateAction2(action);
|
|
250866
250821
|
const shouldEnable = action === "enable";
|
|
250867
250822
|
const providerInfo = SOCIAL_PROVIDERS[provider];
|
|
250868
250823
|
const hasCustomOAuth = Boolean(options.clientId);
|
|
@@ -250935,7 +250890,10 @@ async function socialLoginAction({ log, isNonInteractive }, provider, action, op
|
|
|
250935
250890
|
};
|
|
250936
250891
|
}
|
|
250937
250892
|
function getSocialLoginCommand() {
|
|
250938
|
-
return new Base44Command("social-login").description("Enable or disable social login providers (google, microsoft, facebook, apple)").
|
|
250893
|
+
return new Base44Command("social-login").description("Enable or disable social login providers (google, microsoft, facebook, apple)").addArgument(new Argument("<provider>", "social login provider").choices(VALID_PROVIDERS)).addArgument(new Argument("<action>", "enable or disable the provider").choices([
|
|
250894
|
+
"enable",
|
|
250895
|
+
"disable"
|
|
250896
|
+
])).option("--client-id <id>", "Google OAuth client ID (enables custom OAuth mode)").option("--client-secret <secret>", "Google OAuth client secret").option("--client-secret-stdin", "Read client secret from stdin").action(socialLoginAction);
|
|
250939
250897
|
}
|
|
250940
250898
|
|
|
250941
250899
|
// src/cli/commands/auth/index.ts
|
|
@@ -256091,7 +256049,7 @@ function createProgram(context) {
|
|
|
256091
256049
|
program2.addCommand(getConnectorsCommand());
|
|
256092
256050
|
program2.addCommand(getFunctionsCommand());
|
|
256093
256051
|
program2.addCommand(getSecretsCommand());
|
|
256094
|
-
program2.addCommand(getAuthCommand()
|
|
256052
|
+
program2.addCommand(getAuthCommand());
|
|
256095
256053
|
program2.addCommand(getSiteCommand());
|
|
256096
256054
|
program2.addCommand(getTypesCommand());
|
|
256097
256055
|
program2.addCommand(getExecCommand());
|
|
@@ -260340,4 +260298,4 @@ export {
|
|
|
260340
260298
|
CLIExitError
|
|
260341
260299
|
};
|
|
260342
260300
|
|
|
260343
|
-
//# debugId=
|
|
260301
|
+
//# debugId=A0E7889E1966515264756E2164756E21
|