@base44-preview/cli 0.0.1-pr.4.8a5da99 → 0.0.1-pr.5.668b7ca
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/commands/auth/login.d.ts.map +1 -1
- package/dist/cli/commands/auth/login.js +86 -14
- package/dist/cli/commands/auth/login.js.map +1 -1
- package/dist/cli/commands/auth/logout.js.map +1 -1
- package/dist/cli/commands/auth/whoami.js.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/utils/runCommand.d.ts.map +1 -1
- package/dist/cli/utils/runCommand.js +8 -2
- package/dist/cli/utils/runCommand.js.map +1 -1
- package/dist/core/api/auth/client.d.ts +4 -0
- package/dist/core/api/auth/client.d.ts.map +1 -0
- package/dist/core/api/auth/client.js +70 -0
- package/dist/core/api/auth/client.js.map +1 -0
- package/dist/core/api/auth/index.d.ts +4 -0
- package/dist/core/api/auth/index.d.ts.map +1 -0
- package/dist/core/api/auth/index.js +4 -0
- package/dist/core/api/auth/index.js.map +1 -0
- package/dist/core/api/auth/schema.d.ts +15 -0
- package/dist/core/api/auth/schema.d.ts.map +1 -0
- package/dist/core/api/auth/schema.js +13 -0
- package/dist/core/api/auth/schema.js.map +1 -0
- package/dist/core/api/index.d.ts +2 -0
- package/dist/core/api/index.d.ts.map +1 -0
- package/dist/core/api/index.js +2 -0
- package/dist/core/api/index.js.map +1 -0
- package/dist/core/errors/errors.d.ts +15 -0
- package/dist/core/errors/errors.d.ts.map +1 -0
- package/dist/core/errors/errors.js +17 -0
- package/dist/core/errors/errors.js.map +1 -0
- package/dist/core/errors/index.d.ts +2 -0
- package/dist/core/errors/index.d.ts.map +1 -0
- package/dist/core/errors/index.js +2 -0
- package/dist/core/errors/index.js.map +1 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -0
- package/dist/core/index.js.map +1 -1
- package/package.json +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/auth/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/auth/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiIpC,eAAO,MAAM,YAAY,SAIrB,CAAC"}
|
|
@@ -1,21 +1,93 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
-
import {
|
|
2
|
+
import { log, spinner } from "@clack/prompts";
|
|
3
|
+
import pWaitFor from "p-wait-for";
|
|
3
4
|
import { writeAuth } from "../../../core/config/auth.js";
|
|
5
|
+
import { generateDeviceCode, getTokenFromDeviceCode, AuthApiError, AuthValidationError, } from "../../../core/api/auth";
|
|
4
6
|
import { runCommand } from "../../utils/index.js";
|
|
7
|
+
async function generateAndDisplayDeviceCode() {
|
|
8
|
+
const s = spinner();
|
|
9
|
+
s.start("Generating device code...");
|
|
10
|
+
try {
|
|
11
|
+
const deviceCodeResponse = await generateDeviceCode();
|
|
12
|
+
s.stop("Device code generated");
|
|
13
|
+
log.info(`Please visit: ${deviceCodeResponse.verificationUrl}\n` +
|
|
14
|
+
`Enter your device code: ${deviceCodeResponse.userCode}`);
|
|
15
|
+
return deviceCodeResponse;
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
s.stop("Failed to generate device code");
|
|
19
|
+
if (error instanceof AuthValidationError) {
|
|
20
|
+
const issues = error.issues.map((i) => i.message).join(", ");
|
|
21
|
+
throw new Error(`Invalid response from server: ${issues}`);
|
|
22
|
+
}
|
|
23
|
+
if (error instanceof AuthApiError) {
|
|
24
|
+
throw new Error(`Failed to generate device code: ${error.message}`);
|
|
25
|
+
}
|
|
26
|
+
throw new Error(`Unexpected error: ${error instanceof Error ? error.message : String(error)}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async function waitForAuthentication(deviceCode, expiresIn) {
|
|
30
|
+
const s = spinner();
|
|
31
|
+
s.start("Waiting for you to complete authentication...");
|
|
32
|
+
let tokenResponse = null;
|
|
33
|
+
try {
|
|
34
|
+
await pWaitFor(async () => {
|
|
35
|
+
try {
|
|
36
|
+
const result = await getTokenFromDeviceCode(deviceCode);
|
|
37
|
+
if (result !== null) {
|
|
38
|
+
tokenResponse = result;
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
if (error instanceof AuthValidationError) {
|
|
45
|
+
const issues = error.issues.map((i) => i.message).join(", ");
|
|
46
|
+
throw new Error(`Invalid response from server: ${issues}`);
|
|
47
|
+
}
|
|
48
|
+
if (error instanceof AuthApiError) {
|
|
49
|
+
throw new Error(`API error: ${error.message}`);
|
|
50
|
+
}
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
interval: 2000,
|
|
55
|
+
timeout: expiresIn * 1000,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
s.stop("Authentication failed");
|
|
60
|
+
if (error instanceof Error && error.message.includes("timed out")) {
|
|
61
|
+
throw new Error("Authentication timed out. Please try again.");
|
|
62
|
+
}
|
|
63
|
+
if (error instanceof Error) {
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
66
|
+
throw new Error("Unexpected error during authentication");
|
|
67
|
+
}
|
|
68
|
+
s.stop("Authentication completed!");
|
|
69
|
+
if (!tokenResponse) {
|
|
70
|
+
throw new Error("Failed to retrieve authentication token.");
|
|
71
|
+
}
|
|
72
|
+
return tokenResponse;
|
|
73
|
+
}
|
|
74
|
+
async function saveAuthData(token) {
|
|
75
|
+
try {
|
|
76
|
+
await writeAuth({
|
|
77
|
+
token: token.token,
|
|
78
|
+
email: token.email,
|
|
79
|
+
name: token.name,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
throw new Error(`Failed to save authentication data: ${error instanceof Error ? error.message : String(error)}`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
5
86
|
async function login() {
|
|
6
|
-
await
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
await writeAuth({
|
|
11
|
-
token: "stub-token-12345",
|
|
12
|
-
email: "valid@email.com",
|
|
13
|
-
name: "KfirStri",
|
|
14
|
-
});
|
|
15
|
-
return "Logged in as KfirStri";
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
]);
|
|
87
|
+
const deviceCodeResponse = await generateAndDisplayDeviceCode();
|
|
88
|
+
const token = await waitForAuthentication(deviceCodeResponse.deviceCode, deviceCodeResponse.expiresIn);
|
|
89
|
+
await saveAuthData(token);
|
|
90
|
+
log.success(`Logged in as ${token.name}`);
|
|
19
91
|
}
|
|
20
92
|
export const loginCommand = new Command("login")
|
|
21
93
|
.description("Authenticate with Base44")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../../src/cli/commands/auth/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../../src/cli/commands/auth/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,GAGpB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,UAAU,EAA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th/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../../src/cli/commands/auth/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,KAAK,UAAU,MAAM;IACnB,IAAI,CAAC;QACH,MAAM,UAAU,EAAE,CAAC;QACnB,GAAG,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IACtC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC/C,WAAW,CAAC,4BAA4B,CAAC;KACzC,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../../../src/cli/commands/auth/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../../../src/cli/commands/auth/whoami.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,KAAK,UAAU,MAAM;IACnB,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,QAAQ,EAAE,CAAC;QAC9B,GAAG,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC/C,WAAW,CAAC,oCAAoC,CAAC;KACjD,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { logoutCommand } from './commands/auth/logout.js';
|
|
|
7
7
|
const program = new Command();
|
|
8
8
|
program
|
|
9
9
|
.name('base44')
|
|
10
|
-
.description('Base44 CLI
|
|
10
|
+
.description('Base44 CLI - Unified interface for managing Base44 applications')
|
|
11
11
|
.version(getPackageVersion());
|
|
12
12
|
// Register authentication commands
|
|
13
13
|
program.addCommand(loginCommand);
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,iEAAiE,CAAC;KAC9E,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;AAEhC,mCAAmC;AACnC,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AACjC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAClC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAElC,+BAA+B;AAC/B,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runCommand.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/runCommand.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,wBAAsB,UAAU,
|
|
1
|
+
{"version":3,"file":"runCommand.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/runCommand.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAC7B,OAAO,CAAC,IAAI,CAAC,CASf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { intro } from "@clack/prompts";
|
|
1
|
+
import { intro, log } from "@clack/prompts";
|
|
2
2
|
import chalk from "chalk";
|
|
3
3
|
const base44Color = chalk.bgHex("#E86B3C");
|
|
4
4
|
/**
|
|
@@ -9,6 +9,12 @@ const base44Color = chalk.bgHex("#E86B3C");
|
|
|
9
9
|
*/
|
|
10
10
|
export async function runCommand(commandFn) {
|
|
11
11
|
intro(base44Color(" Base 44 "));
|
|
12
|
-
|
|
12
|
+
try {
|
|
13
|
+
await commandFn();
|
|
14
|
+
}
|
|
15
|
+
catch (e) {
|
|
16
|
+
log.error(e instanceof Error ? e.message : String(e));
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
13
19
|
}
|
|
14
20
|
//# sourceMappingURL=runCommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runCommand.js","sourceRoot":"","sources":["../../../src/cli/utils/runCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"runCommand.js","sourceRoot":"","sources":["../../../src/cli/utils/runCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,SAA8B;IAE9B,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;IAEhC,IAAI,CAAC;QACH,MAAM,SAAS,EAAE,CAAC;IACpB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,GAAG,CAAC,KAAK,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type DeviceCodeResponse, type TokenResponse } from "./schema.js";
|
|
2
|
+
export declare function generateDeviceCode(): Promise<DeviceCodeResponse>;
|
|
3
|
+
export declare function getTokenFromDeviceCode(deviceCode: string): Promise<TokenResponse | null>;
|
|
4
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/core/api/auth/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AAYrB,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAuCtE;AAED,wBAAsB,sBAAsB,CAC1C,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CA6C/B"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { DeviceCodeResponseSchema, TokenResponseSchema, } from "./schema.js";
|
|
2
|
+
import { AuthApiError, AuthValidationError } from "../../errors/index.js";
|
|
3
|
+
async function delay(ms) {
|
|
4
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
5
|
+
}
|
|
6
|
+
const deviceCodeToTokenMap = new Map();
|
|
7
|
+
export async function generateDeviceCode() {
|
|
8
|
+
try {
|
|
9
|
+
await delay(1000);
|
|
10
|
+
const deviceCode = `device-code-${Date.now()}`;
|
|
11
|
+
deviceCodeToTokenMap.set(deviceCode, {
|
|
12
|
+
startTime: Date.now(),
|
|
13
|
+
readyAfter: 5000,
|
|
14
|
+
});
|
|
15
|
+
const mockResponse = {
|
|
16
|
+
deviceCode,
|
|
17
|
+
userCode: "ABCD-1234",
|
|
18
|
+
verificationUrl: "https://app.base44.com/verify",
|
|
19
|
+
expiresIn: 600,
|
|
20
|
+
};
|
|
21
|
+
const result = DeviceCodeResponseSchema.safeParse(mockResponse);
|
|
22
|
+
if (!result.success) {
|
|
23
|
+
throw new AuthValidationError("Invalid device code response from server", result.error.issues.map((issue) => ({
|
|
24
|
+
message: issue.message,
|
|
25
|
+
path: issue.path.map(String),
|
|
26
|
+
})));
|
|
27
|
+
}
|
|
28
|
+
return result.data;
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
if (error instanceof AuthValidationError) {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
throw new AuthApiError("Failed to generate device code", error instanceof Error ? error : new Error(String(error)));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export async function getTokenFromDeviceCode(deviceCode) {
|
|
38
|
+
try {
|
|
39
|
+
await delay(1000);
|
|
40
|
+
const deviceInfo = deviceCodeToTokenMap.get(deviceCode);
|
|
41
|
+
if (!deviceInfo) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
const elapsed = Date.now() - deviceInfo.startTime;
|
|
45
|
+
if (elapsed < deviceInfo.readyAfter) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const mockResponse = {
|
|
49
|
+
token: "mock-token-" + Date.now(),
|
|
50
|
+
email: "sd.com",
|
|
51
|
+
name: "Test User",
|
|
52
|
+
};
|
|
53
|
+
const result = TokenResponseSchema.safeParse(mockResponse);
|
|
54
|
+
if (!result.success) {
|
|
55
|
+
throw new AuthValidationError("Invalid token response from server", result.error.issues.map((issue) => ({
|
|
56
|
+
message: issue.message,
|
|
57
|
+
path: issue.path.map(String),
|
|
58
|
+
})));
|
|
59
|
+
}
|
|
60
|
+
deviceCodeToTokenMap.delete(deviceCode);
|
|
61
|
+
return result.data;
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
if (error instanceof AuthValidationError || error instanceof AuthApiError) {
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
throw new AuthApiError("Failed to retrieve token from device code", error instanceof Error ? error : new Error(String(error)));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/core/api/auth/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAExB,mBAAmB,GAEpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE1E,KAAK,UAAU,KAAK,CAAC,EAAU;IAC7B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAGjC,CAAC;AAEJ,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,IAAI,CAAC;QACH,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC;QAElB,MAAM,UAAU,GAAG,eAAe,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;QAE/C,oBAAoB,CAAC,GAAG,CAAC,UAAU,EAAE;YACnC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,UAAU,EAAE,IAAI;SACjB,CAAC,C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AC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/api/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const DeviceCodeResponseSchema: z.ZodObject<{
|
|
3
|
+
deviceCode: z.ZodString;
|
|
4
|
+
userCode: z.ZodString;
|
|
5
|
+
verificationUrl: z.ZodURL;
|
|
6
|
+
expiresIn: z.ZodNumber;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type DeviceCodeResponse = z.infer<typeof DeviceCodeResponseSchema>;
|
|
9
|
+
export declare const TokenResponseSchema: z.ZodObject<{
|
|
10
|
+
token: z.ZodString;
|
|
11
|
+
email: z.ZodEmail;
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type TokenResponse = z.infer<typeof TokenResponseSchema>;
|
|
15
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/core/api/auth/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,wBAAwB;;;;;iBAKnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const DeviceCodeResponseSchema = z.object({
|
|
3
|
+
deviceCode: z.string().min(1, 'Device code cannot be empty'),
|
|
4
|
+
userCode: z.string().min(1, 'User code cannot be empty'),
|
|
5
|
+
verificationUrl: z.url('Invalid verification URL'),
|
|
6
|
+
expiresIn: z.number().int().positive('Expires in must be a positive integer'),
|
|
7
|
+
});
|
|
8
|
+
export const TokenResponseSchema = z.object({
|
|
9
|
+
token: z.string().min(1, 'Token cannot be empty'),
|
|
10
|
+
email: z.email('Invalid email address'),
|
|
11
|
+
name: z.string().min(1, 'Name cannot be empty'),
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/core/api/auth/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,6BAA6B,CAAC;IAC5D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,2BAA2B,CAAC;IACxD,eAAe,EAAE,CAAC,CAAC,GAAG,CAAC,0BAA0B,CAAC;IAClD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;CAC9E,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;IACjD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC;CAChD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class AuthApiError extends Error {
|
|
2
|
+
readonly cause?: unknown | undefined;
|
|
3
|
+
constructor(message: string, cause?: unknown | undefined);
|
|
4
|
+
}
|
|
5
|
+
export declare class AuthValidationError extends Error {
|
|
6
|
+
readonly issues: Array<{
|
|
7
|
+
message: string;
|
|
8
|
+
path: string[];
|
|
9
|
+
}>;
|
|
10
|
+
constructor(message: string, issues: Array<{
|
|
11
|
+
message: string;
|
|
12
|
+
path: string[];
|
|
13
|
+
}>);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/core/errors/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAa,SAAQ,KAAK;aAGnB,KAAK,CAAC,EAAE,OAAO;gBAD/B,OAAO,EAAE,MAAM,EACC,KAAK,CAAC,EAAE,OAAO,YAAA;CAKlC;AAED,qBAAa,mBAAoB,SAAQ,KAAK;aAG1B,MAAM,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;gBADlE,OAAO,EAAE,MAAM,EACC,MAAM,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CAKrE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class AuthApiError extends Error {
|
|
2
|
+
cause;
|
|
3
|
+
constructor(message, cause) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.cause = cause;
|
|
6
|
+
this.name = 'AuthApiError';
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export class AuthValidationError extends Error {
|
|
10
|
+
issues;
|
|
11
|
+
constructor(message, issues) {
|
|
12
|
+
super(message);
|
|
13
|
+
this.issues = issues;
|
|
14
|
+
this.name = 'AuthValidationError';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/core/errors/errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,YAAa,SAAQ,KAAK;IAGnB;IAFlB,YACE,OAAe,EACC,KAAe;QAE/B,KAAK,CAAC,OAAO,CAAC,CAAC;QAFC,UAAK,GAAL,KAAK,CAAU;QAG/B,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AAED,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAG1B;IAFlB,YACE,OAAe,EACC,MAAkD;QAElE,KAAK,CAAC,OAAO,CAAC,CAAC;QAFC,WAAM,GAAN,MAAM,CAA4C;QAGlE,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
package/dist/core/index.d.ts
CHANGED
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC"}
|
package/dist/core/index.js
CHANGED
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@base44-preview/cli",
|
|
3
|
-
"version": "0.0.1-pr.
|
|
3
|
+
"version": "0.0.1-pr.5.668b7ca",
|
|
4
4
|
"description": "Base44 CLI - Unified interface for managing Base44 applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cli/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "tsc",
|
|
19
|
+
"build": "tsc && tsc-alias",
|
|
20
20
|
"dev": "tsx src/cli/index.ts",
|
|
21
21
|
"start": "node dist/cli/index.js",
|
|
22
22
|
"clean": "rm -rf dist",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"@clack/prompts": "^0.11.0",
|
|
38
38
|
"chalk": "^5.6.2",
|
|
39
39
|
"commander": "^12.1.0",
|
|
40
|
+
"p-wait-for": "^6.0.0",
|
|
40
41
|
"zod": "^4.3.5"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
"@typescript-eslint/parser": "^8.51.0",
|
|
46
47
|
"eslint": "^9.39.2",
|
|
47
48
|
"eslint-plugin-import": "^2.32.0",
|
|
49
|
+
"tsc-alias": "^1.8.16",
|
|
48
50
|
"tsx": "^4.19.2",
|
|
49
51
|
"typescript": "^5.7.2"
|
|
50
52
|
},
|