@base44-preview/cli 0.0.50-pr.475.2394181 → 0.0.50-pr.475.3ca36bb
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 +19 -3
- package/dist/cli/index.js.map +5 -5
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -243211,6 +243211,7 @@ var package_default = {
|
|
|
243211
243211
|
"@types/ejs": "^3.1.5",
|
|
243212
243212
|
"@types/express": "^5.0.6",
|
|
243213
243213
|
"@types/json-schema": "^7.0.15",
|
|
243214
|
+
"@types/jsonwebtoken": "^9.0.10",
|
|
243214
243215
|
"@types/lodash": "^4.17.24",
|
|
243215
243216
|
"@types/multer": "^2.0.0",
|
|
243216
243217
|
"@types/node": "^22.10.5",
|
|
@@ -243229,6 +243230,7 @@ var package_default = {
|
|
|
243229
243230
|
globby: "^16.1.0",
|
|
243230
243231
|
"http-proxy-middleware": "^3.0.5",
|
|
243231
243232
|
"json-schema-to-typescript": "^15.0.4",
|
|
243233
|
+
jsonwebtoken: "^9.0.3",
|
|
243232
243234
|
json5: "^2.2.3",
|
|
243233
243235
|
ky: "^1.14.2",
|
|
243234
243236
|
lodash: "^4.17.23",
|
|
@@ -252936,6 +252938,7 @@ function createDevLogger() {
|
|
|
252936
252938
|
|
|
252937
252939
|
// src/cli/dev/dev-server/function-manager.ts
|
|
252938
252940
|
import { spawn as spawn2 } from "node:child_process";
|
|
252941
|
+
import { pathToFileURL } from "node:url";
|
|
252939
252942
|
var READY_TIMEOUT = 30000;
|
|
252940
252943
|
|
|
252941
252944
|
class FunctionManager {
|
|
@@ -253015,7 +253018,7 @@ class FunctionManager {
|
|
|
253015
253018
|
const process21 = spawn2("deno", ["run", "--allow-all", this.wrapperPath], {
|
|
253016
253019
|
env: {
|
|
253017
253020
|
...globalThis.process.env,
|
|
253018
|
-
FUNCTION_PATH: func.entryPath,
|
|
253021
|
+
FUNCTION_PATH: pathToFileURL(func.entryPath).href,
|
|
253019
253022
|
FUNCTION_PORT: String(port),
|
|
253020
253023
|
FUNCTION_NAME: func.name
|
|
253021
253024
|
},
|
|
@@ -253094,9 +253097,13 @@ function createFunctionRouter(manager, logger2) {
|
|
|
253094
253097
|
on: {
|
|
253095
253098
|
proxyReq: (proxyReq, req) => {
|
|
253096
253099
|
const xAppId = req.headers["x-app-id"];
|
|
253100
|
+
const authorization = req.headers.authorization;
|
|
253097
253101
|
if (xAppId) {
|
|
253098
253102
|
proxyReq.setHeader("Base44-App-Id", xAppId);
|
|
253099
253103
|
}
|
|
253104
|
+
if (authorization) {
|
|
253105
|
+
proxyReq.setHeader("Base44-Service-Authorization", authorization);
|
|
253106
|
+
}
|
|
253100
253107
|
proxyReq.setHeader("Base44-Api-Url", `${req.protocol}://${req.headers.host}`);
|
|
253101
253108
|
},
|
|
253102
253109
|
error: (err, _req, res) => {
|
|
@@ -253522,7 +253529,7 @@ function createAuthRouter(db2, logger2) {
|
|
|
253522
253529
|
const privateUserData = await privateUserCollection?.findOneAsync({
|
|
253523
253530
|
email: email3
|
|
253524
253531
|
});
|
|
253525
|
-
const otpCode =
|
|
253532
|
+
const otpCode = generateCode();
|
|
253526
253533
|
const id2 = privateUserData ? privateUserData.id : nanoid3();
|
|
253527
253534
|
if (!privateUserData) {
|
|
253528
253535
|
await privateUserCollection?.insertAsync({
|
|
@@ -253532,6 +253539,15 @@ function createAuthRouter(db2, logger2) {
|
|
|
253532
253539
|
password,
|
|
253533
253540
|
createdAt: Date.now()
|
|
253534
253541
|
});
|
|
253542
|
+
} else {
|
|
253543
|
+
await privateUserCollection?.updateAsync({
|
|
253544
|
+
email: email3
|
|
253545
|
+
}, {
|
|
253546
|
+
$set: {
|
|
253547
|
+
otpCode,
|
|
253548
|
+
createdAt: Date.now()
|
|
253549
|
+
}
|
|
253550
|
+
});
|
|
253535
253551
|
}
|
|
253536
253552
|
logger2.log(theme.styles.info(`
|
|
253537
253553
|
In order to complete registration use this verification code: ${otpCode}
|
|
@@ -260384,4 +260400,4 @@ export {
|
|
|
260384
260400
|
CLIExitError
|
|
260385
260401
|
};
|
|
260386
260402
|
|
|
260387
|
-
//# debugId=
|
|
260403
|
+
//# debugId=81F12122B71A9B0F64756E2164756E21
|