@base44-preview/cli 0.0.50-pr.445.70f94f4 → 0.0.50-pr.445.7d24dfc
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 +225 -140
- package/dist/cli/index.js.map +8 -8
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -134614,11 +134614,11 @@ var require_prettier = __commonJS((exports, module) => {
|
|
|
134614
134614
|
var require_formatter = __commonJS((exports) => {
|
|
134615
134615
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
|
|
134616
134616
|
function adopt(value) {
|
|
134617
|
-
return value instanceof P9 ? value : new P9(function(
|
|
134618
|
-
|
|
134617
|
+
return value instanceof P9 ? value : new P9(function(resolve7) {
|
|
134618
|
+
resolve7(value);
|
|
134619
134619
|
});
|
|
134620
134620
|
}
|
|
134621
|
-
return new (P9 || (P9 = Promise))(function(
|
|
134621
|
+
return new (P9 || (P9 = Promise))(function(resolve7, reject) {
|
|
134622
134622
|
function fulfilled(value) {
|
|
134623
134623
|
try {
|
|
134624
134624
|
step(generator.next(value));
|
|
@@ -134634,7 +134634,7 @@ var require_formatter = __commonJS((exports) => {
|
|
|
134634
134634
|
}
|
|
134635
134635
|
}
|
|
134636
134636
|
function step(result) {
|
|
134637
|
-
result.done ?
|
|
134637
|
+
result.done ? resolve7(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
134638
134638
|
}
|
|
134639
134639
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
134640
134640
|
});
|
|
@@ -139287,7 +139287,7 @@ var require_url = __commonJS((exports) => {
|
|
|
139287
139287
|
};
|
|
139288
139288
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
139289
139289
|
exports.parse = undefined;
|
|
139290
|
-
exports.resolve =
|
|
139290
|
+
exports.resolve = resolve7;
|
|
139291
139291
|
exports.cwd = cwd;
|
|
139292
139292
|
exports.getProtocol = getProtocol;
|
|
139293
139293
|
exports.getExtension = getExtension;
|
|
@@ -139315,7 +139315,7 @@ var require_url = __commonJS((exports) => {
|
|
|
139315
139315
|
var urlDecodePatterns = [/%23/g, "#", /%24/g, "$", /%26/g, "&", /%2C/g, ",", /%40/g, "@"];
|
|
139316
139316
|
var parse11 = (u4) => new URL(u4);
|
|
139317
139317
|
exports.parse = parse11;
|
|
139318
|
-
function
|
|
139318
|
+
function resolve7(from, to5) {
|
|
139319
139319
|
const fromUrl = new URL((0, convert_path_to_posix_1.default)(from), "https://aaa.nonexistanturl.com");
|
|
139320
139320
|
const resolvedUrl = new URL((0, convert_path_to_posix_1.default)(to5), fromUrl);
|
|
139321
139321
|
const endSpaces = to5.match(/(\s*)$/)?.[1] || "";
|
|
@@ -139451,7 +139451,7 @@ var require_url = __commonJS((exports) => {
|
|
|
139451
139451
|
}
|
|
139452
139452
|
function relative4(from, to5) {
|
|
139453
139453
|
if (!isFileSystemPath(from) || !isFileSystemPath(to5)) {
|
|
139454
|
-
return
|
|
139454
|
+
return resolve7(from, to5);
|
|
139455
139455
|
}
|
|
139456
139456
|
const fromDir = path_1.default.dirname(stripHash(from));
|
|
139457
139457
|
const toPath4 = stripHash(to5);
|
|
@@ -140127,7 +140127,7 @@ var require_plugins = __commonJS((exports) => {
|
|
|
140127
140127
|
let plugin;
|
|
140128
140128
|
let lastError;
|
|
140129
140129
|
let index = 0;
|
|
140130
|
-
return new Promise((
|
|
140130
|
+
return new Promise((resolve7, reject) => {
|
|
140131
140131
|
runNextPlugin();
|
|
140132
140132
|
function runNextPlugin() {
|
|
140133
140133
|
plugin = plugins[index++];
|
|
@@ -140155,7 +140155,7 @@ var require_plugins = __commonJS((exports) => {
|
|
|
140155
140155
|
}
|
|
140156
140156
|
}
|
|
140157
140157
|
function onSuccess(result) {
|
|
140158
|
-
|
|
140158
|
+
resolve7({
|
|
140159
140159
|
plugin,
|
|
140160
140160
|
result
|
|
140161
140161
|
});
|
|
@@ -141488,11 +141488,11 @@ var require_lib3 = __commonJS((exports) => {
|
|
|
141488
141488
|
var require_resolver = __commonJS((exports) => {
|
|
141489
141489
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
|
|
141490
141490
|
function adopt(value) {
|
|
141491
|
-
return value instanceof P9 ? value : new P9(function(
|
|
141492
|
-
|
|
141491
|
+
return value instanceof P9 ? value : new P9(function(resolve7) {
|
|
141492
|
+
resolve7(value);
|
|
141493
141493
|
});
|
|
141494
141494
|
}
|
|
141495
|
-
return new (P9 || (P9 = Promise))(function(
|
|
141495
|
+
return new (P9 || (P9 = Promise))(function(resolve7, reject) {
|
|
141496
141496
|
function fulfilled(value) {
|
|
141497
141497
|
try {
|
|
141498
141498
|
step(generator.next(value));
|
|
@@ -141508,7 +141508,7 @@ var require_resolver = __commonJS((exports) => {
|
|
|
141508
141508
|
}
|
|
141509
141509
|
}
|
|
141510
141510
|
function step(result) {
|
|
141511
|
-
result.done ?
|
|
141511
|
+
result.done ? resolve7(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
141512
141512
|
}
|
|
141513
141513
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
141514
141514
|
});
|
|
@@ -141629,11 +141629,11 @@ var require_optionValidator = __commonJS((exports) => {
|
|
|
141629
141629
|
var require_src3 = __commonJS((exports) => {
|
|
141630
141630
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
|
|
141631
141631
|
function adopt(value) {
|
|
141632
|
-
return value instanceof P9 ? value : new P9(function(
|
|
141633
|
-
|
|
141632
|
+
return value instanceof P9 ? value : new P9(function(resolve7) {
|
|
141633
|
+
resolve7(value);
|
|
141634
141634
|
});
|
|
141635
141635
|
}
|
|
141636
|
-
return new (P9 || (P9 = Promise))(function(
|
|
141636
|
+
return new (P9 || (P9 = Promise))(function(resolve7, reject) {
|
|
141637
141637
|
function fulfilled(value) {
|
|
141638
141638
|
try {
|
|
141639
141639
|
step(generator.next(value));
|
|
@@ -141649,7 +141649,7 @@ var require_src3 = __commonJS((exports) => {
|
|
|
141649
141649
|
}
|
|
141650
141650
|
}
|
|
141651
141651
|
function step(result) {
|
|
141652
|
-
result.done ?
|
|
141652
|
+
result.done ? resolve7(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
141653
141653
|
}
|
|
141654
141654
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
141655
141655
|
});
|
|
@@ -147274,11 +147274,11 @@ var require_raw_body = __commonJS((exports, module) => {
|
|
|
147274
147274
|
if (done) {
|
|
147275
147275
|
return readStream(stream, encoding, length, limit, wrap(done));
|
|
147276
147276
|
}
|
|
147277
|
-
return new Promise(function executor(
|
|
147277
|
+
return new Promise(function executor(resolve7, reject) {
|
|
147278
147278
|
readStream(stream, encoding, length, limit, function onRead2(err, buf) {
|
|
147279
147279
|
if (err)
|
|
147280
147280
|
return reject(err);
|
|
147281
|
-
|
|
147281
|
+
resolve7(buf);
|
|
147282
147282
|
});
|
|
147283
147283
|
});
|
|
147284
147284
|
}
|
|
@@ -160403,7 +160403,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
160403
160403
|
var basename4 = path18.basename;
|
|
160404
160404
|
var extname2 = path18.extname;
|
|
160405
160405
|
var join22 = path18.join;
|
|
160406
|
-
var
|
|
160406
|
+
var resolve7 = path18.resolve;
|
|
160407
160407
|
module.exports = View;
|
|
160408
160408
|
function View(name2, options8) {
|
|
160409
160409
|
var opts = options8 || {};
|
|
@@ -160437,7 +160437,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
160437
160437
|
debug('lookup "%s"', name2);
|
|
160438
160438
|
for (var i5 = 0;i5 < roots.length && !path19; i5++) {
|
|
160439
160439
|
var root2 = roots[i5];
|
|
160440
|
-
var loc =
|
|
160440
|
+
var loc = resolve7(root2, name2);
|
|
160441
160441
|
var dir = dirname15(loc);
|
|
160442
160442
|
var file2 = basename4(loc);
|
|
160443
160443
|
path19 = this.resolve(dir, file2);
|
|
@@ -160462,7 +160462,7 @@ var require_view = __commonJS((exports, module) => {
|
|
|
160462
160462
|
});
|
|
160463
160463
|
sync = false;
|
|
160464
160464
|
};
|
|
160465
|
-
View.prototype.resolve = function
|
|
160465
|
+
View.prototype.resolve = function resolve8(dir, file2) {
|
|
160466
160466
|
var ext = this.ext;
|
|
160467
160467
|
var path19 = join22(dir, file2);
|
|
160468
160468
|
var stat2 = tryStat(path19);
|
|
@@ -162621,7 +162621,7 @@ var require_application = __commonJS((exports, module) => {
|
|
|
162621
162621
|
var compileETag = require_utils10().compileETag;
|
|
162622
162622
|
var compileQueryParser = require_utils10().compileQueryParser;
|
|
162623
162623
|
var compileTrust = require_utils10().compileTrust;
|
|
162624
|
-
var
|
|
162624
|
+
var resolve7 = __require("node:path").resolve;
|
|
162625
162625
|
var once9 = require_once();
|
|
162626
162626
|
var Router = require_router();
|
|
162627
162627
|
var slice = Array.prototype.slice;
|
|
@@ -162675,7 +162675,7 @@ var require_application = __commonJS((exports, module) => {
|
|
|
162675
162675
|
this.mountpath = "/";
|
|
162676
162676
|
this.locals.settings = this.settings;
|
|
162677
162677
|
this.set("view", View);
|
|
162678
|
-
this.set("views",
|
|
162678
|
+
this.set("views", resolve7("views"));
|
|
162679
162679
|
this.set("jsonp callback name", "callback");
|
|
162680
162680
|
if (env3 === "production") {
|
|
162681
162681
|
this.enable("view cache");
|
|
@@ -164166,7 +164166,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
164166
164166
|
var extname2 = path18.extname;
|
|
164167
164167
|
var join22 = path18.join;
|
|
164168
164168
|
var normalize2 = path18.normalize;
|
|
164169
|
-
var
|
|
164169
|
+
var resolve7 = path18.resolve;
|
|
164170
164170
|
var sep = path18.sep;
|
|
164171
164171
|
var BYTES_RANGE_REGEXP = /^ *bytes=/;
|
|
164172
164172
|
var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1000;
|
|
@@ -164195,7 +164195,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
164195
164195
|
this._maxage = opts.maxAge || opts.maxage;
|
|
164196
164196
|
this._maxage = typeof this._maxage === "string" ? ms8(this._maxage) : Number(this._maxage);
|
|
164197
164197
|
this._maxage = !isNaN(this._maxage) ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) : 0;
|
|
164198
|
-
this._root = opts.root ?
|
|
164198
|
+
this._root = opts.root ? resolve7(opts.root) : null;
|
|
164199
164199
|
}
|
|
164200
164200
|
util2.inherits(SendStream, Stream2);
|
|
164201
164201
|
SendStream.prototype.error = function error48(status, err) {
|
|
@@ -164344,7 +164344,7 @@ var require_send = __commonJS((exports, module) => {
|
|
|
164344
164344
|
return res;
|
|
164345
164345
|
}
|
|
164346
164346
|
parts = normalize2(path19).split(sep);
|
|
164347
|
-
path19 =
|
|
164347
|
+
path19 = resolve7(path19);
|
|
164348
164348
|
}
|
|
164349
164349
|
if (containsDotFile(parts)) {
|
|
164350
164350
|
debug('%s dotfile "%s"', this._dotfiles, path19);
|
|
@@ -164672,7 +164672,7 @@ var require_response = __commonJS((exports, module) => {
|
|
|
164672
164672
|
var cookie = require_cookie();
|
|
164673
164673
|
var send = require_send();
|
|
164674
164674
|
var extname2 = path18.extname;
|
|
164675
|
-
var
|
|
164675
|
+
var resolve7 = path18.resolve;
|
|
164676
164676
|
var vary = require_vary();
|
|
164677
164677
|
var { Buffer: Buffer7 } = __require("node:buffer");
|
|
164678
164678
|
var res = Object.create(http.ServerResponse.prototype);
|
|
@@ -164881,7 +164881,7 @@ var require_response = __commonJS((exports, module) => {
|
|
|
164881
164881
|
}
|
|
164882
164882
|
opts = Object.create(opts);
|
|
164883
164883
|
opts.headers = headers;
|
|
164884
|
-
var fullPath = !opts.root ?
|
|
164884
|
+
var fullPath = !opts.root ? resolve7(path19) : path19;
|
|
164885
164885
|
return this.sendFile(fullPath, opts, done);
|
|
164886
164886
|
};
|
|
164887
164887
|
res.contentType = res.type = function contentType(type) {
|
|
@@ -165142,7 +165142,7 @@ var require_serve_static = __commonJS((exports, module) => {
|
|
|
165142
165142
|
var encodeUrl = require_encodeurl();
|
|
165143
165143
|
var escapeHtml = require_escape_html();
|
|
165144
165144
|
var parseUrl = require_parseurl();
|
|
165145
|
-
var
|
|
165145
|
+
var resolve7 = __require("path").resolve;
|
|
165146
165146
|
var send = require_send();
|
|
165147
165147
|
var url3 = __require("url");
|
|
165148
165148
|
module.exports = serveStatic;
|
|
@@ -165161,7 +165161,7 @@ var require_serve_static = __commonJS((exports, module) => {
|
|
|
165161
165161
|
throw new TypeError("option setHeaders must be function");
|
|
165162
165162
|
}
|
|
165163
165163
|
opts.maxage = opts.maxage || opts.maxAge || 0;
|
|
165164
|
-
opts.root =
|
|
165164
|
+
opts.root = resolve7(root2);
|
|
165165
165165
|
var onDirectory = redirect ? createRedirectDirectoryListener() : createNotFoundDirectoryListener();
|
|
165166
165166
|
return function serveStatic2(req, res, next) {
|
|
165167
165167
|
if (req.method !== "GET" && req.method !== "HEAD") {
|
|
@@ -168535,8 +168535,8 @@ var require_executor = __commonJS((exports, module) => {
|
|
|
168535
168535
|
}
|
|
168536
168536
|
resetBuffer() {
|
|
168537
168537
|
this.buffer = new Waterfall;
|
|
168538
|
-
this.buffer.chain(new Promise((
|
|
168539
|
-
this._triggerBuffer =
|
|
168538
|
+
this.buffer.chain(new Promise((resolve7) => {
|
|
168539
|
+
this._triggerBuffer = resolve7;
|
|
168540
168540
|
}));
|
|
168541
168541
|
if (this.ready)
|
|
168542
168542
|
this._triggerBuffer();
|
|
@@ -169556,7 +169556,7 @@ var require_storage = __commonJS((exports, module) => {
|
|
|
169556
169556
|
throw e8;
|
|
169557
169557
|
}
|
|
169558
169558
|
};
|
|
169559
|
-
var writeFileLinesAsync = (filename, lines, mode = DEFAULT_FILE_MODE) => new Promise((
|
|
169559
|
+
var writeFileLinesAsync = (filename, lines, mode = DEFAULT_FILE_MODE) => new Promise((resolve7, reject) => {
|
|
169560
169560
|
try {
|
|
169561
169561
|
const stream = writeFileStream(filename, { mode });
|
|
169562
169562
|
const readable2 = Readable6.from(lines);
|
|
@@ -169573,7 +169573,7 @@ var require_storage = __commonJS((exports, module) => {
|
|
|
169573
169573
|
if (err)
|
|
169574
169574
|
reject(err);
|
|
169575
169575
|
else
|
|
169576
|
-
|
|
169576
|
+
resolve7();
|
|
169577
169577
|
});
|
|
169578
169578
|
});
|
|
169579
169579
|
readable2.on("error", (err) => {
|
|
@@ -169744,7 +169744,7 @@ var require_persistence = __commonJS((exports, module) => {
|
|
|
169744
169744
|
return { data: tdata, indexes };
|
|
169745
169745
|
}
|
|
169746
169746
|
treatRawStreamAsync(rawStream) {
|
|
169747
|
-
return new Promise((
|
|
169747
|
+
return new Promise((resolve7, reject) => {
|
|
169748
169748
|
const dataById = {};
|
|
169749
169749
|
const indexes = {};
|
|
169750
169750
|
let corruptItems = 0;
|
|
@@ -169787,7 +169787,7 @@ var require_persistence = __commonJS((exports, module) => {
|
|
|
169787
169787
|
}
|
|
169788
169788
|
}
|
|
169789
169789
|
const data = Object.values(dataById);
|
|
169790
|
-
|
|
169790
|
+
resolve7({ data, indexes });
|
|
169791
169791
|
});
|
|
169792
169792
|
lineStream.on("error", function(err) {
|
|
169793
169793
|
reject(err, null);
|
|
@@ -195398,13 +195398,13 @@ var require_broadcast_operator = __commonJS((exports) => {
|
|
|
195398
195398
|
return true;
|
|
195399
195399
|
}
|
|
195400
195400
|
emitWithAck(ev2, ...args) {
|
|
195401
|
-
return new Promise((
|
|
195401
|
+
return new Promise((resolve7, reject) => {
|
|
195402
195402
|
args.push((err, responses) => {
|
|
195403
195403
|
if (err) {
|
|
195404
195404
|
err.responses = responses;
|
|
195405
195405
|
return reject(err);
|
|
195406
195406
|
} else {
|
|
195407
|
-
return
|
|
195407
|
+
return resolve7(responses);
|
|
195408
195408
|
}
|
|
195409
195409
|
});
|
|
195410
195410
|
this.emit(ev2, ...args);
|
|
@@ -195592,12 +195592,12 @@ var require_socket2 = __commonJS((exports) => {
|
|
|
195592
195592
|
}
|
|
195593
195593
|
emitWithAck(ev2, ...args) {
|
|
195594
195594
|
const withErr = this.flags.timeout !== undefined;
|
|
195595
|
-
return new Promise((
|
|
195595
|
+
return new Promise((resolve7, reject) => {
|
|
195596
195596
|
args.push((arg1, arg2) => {
|
|
195597
195597
|
if (withErr) {
|
|
195598
|
-
return arg1 ? reject(arg1) :
|
|
195598
|
+
return arg1 ? reject(arg1) : resolve7(arg2);
|
|
195599
195599
|
} else {
|
|
195600
|
-
return
|
|
195600
|
+
return resolve7(arg1);
|
|
195601
195601
|
}
|
|
195602
195602
|
});
|
|
195603
195603
|
this.emit(ev2, ...args);
|
|
@@ -196052,13 +196052,13 @@ var require_namespace = __commonJS((exports) => {
|
|
|
196052
196052
|
return true;
|
|
196053
196053
|
}
|
|
196054
196054
|
serverSideEmitWithAck(ev2, ...args) {
|
|
196055
|
-
return new Promise((
|
|
196055
|
+
return new Promise((resolve7, reject) => {
|
|
196056
196056
|
args.push((err, responses) => {
|
|
196057
196057
|
if (err) {
|
|
196058
196058
|
err.responses = responses;
|
|
196059
196059
|
return reject(err);
|
|
196060
196060
|
} else {
|
|
196061
|
-
return
|
|
196061
|
+
return resolve7(responses);
|
|
196062
196062
|
}
|
|
196063
196063
|
});
|
|
196064
196064
|
this.serverSideEmit(ev2, ...args);
|
|
@@ -196742,7 +196742,7 @@ var require_cluster_adapter = __commonJS((exports) => {
|
|
|
196742
196742
|
return localSockets;
|
|
196743
196743
|
}
|
|
196744
196744
|
const requestId = randomId();
|
|
196745
|
-
return new Promise((
|
|
196745
|
+
return new Promise((resolve7, reject) => {
|
|
196746
196746
|
const timeout3 = setTimeout(() => {
|
|
196747
196747
|
const storedRequest2 = this.requests.get(requestId);
|
|
196748
196748
|
if (storedRequest2) {
|
|
@@ -196752,7 +196752,7 @@ var require_cluster_adapter = __commonJS((exports) => {
|
|
|
196752
196752
|
}, opts.flags.timeout || DEFAULT_TIMEOUT);
|
|
196753
196753
|
const storedRequest = {
|
|
196754
196754
|
type: MessageType.FETCH_SOCKETS,
|
|
196755
|
-
resolve:
|
|
196755
|
+
resolve: resolve7,
|
|
196756
196756
|
timeout: timeout3,
|
|
196757
196757
|
current: 0,
|
|
196758
196758
|
expected: expectedResponseCount,
|
|
@@ -196962,7 +196962,7 @@ var require_cluster_adapter = __commonJS((exports) => {
|
|
|
196962
196962
|
return localSockets;
|
|
196963
196963
|
}
|
|
196964
196964
|
const requestId = randomId();
|
|
196965
|
-
return new Promise((
|
|
196965
|
+
return new Promise((resolve7, reject) => {
|
|
196966
196966
|
const timeout3 = setTimeout(() => {
|
|
196967
196967
|
const storedRequest2 = this.customRequests.get(requestId);
|
|
196968
196968
|
if (storedRequest2) {
|
|
@@ -196972,7 +196972,7 @@ var require_cluster_adapter = __commonJS((exports) => {
|
|
|
196972
196972
|
}, opts.flags.timeout || DEFAULT_TIMEOUT);
|
|
196973
196973
|
const storedRequest = {
|
|
196974
196974
|
type: MessageType.FETCH_SOCKETS,
|
|
196975
|
-
resolve:
|
|
196975
|
+
resolve: resolve7,
|
|
196976
196976
|
timeout: timeout3,
|
|
196977
196977
|
missingUids: new Set([...this.nodesMap.keys()]),
|
|
196978
196978
|
responses: localSockets
|
|
@@ -197701,13 +197701,13 @@ var require_dist4 = __commonJS((exports, module) => {
|
|
|
197701
197701
|
this.engine.close();
|
|
197702
197702
|
(0, uws_1.restoreAdapter)();
|
|
197703
197703
|
if (this.httpServer) {
|
|
197704
|
-
return new Promise((
|
|
197704
|
+
return new Promise((resolve7) => {
|
|
197705
197705
|
this.httpServer.close((err) => {
|
|
197706
197706
|
fn9 && fn9(err);
|
|
197707
197707
|
if (err) {
|
|
197708
197708
|
debug("server was not running");
|
|
197709
197709
|
}
|
|
197710
|
-
|
|
197710
|
+
resolve7();
|
|
197711
197711
|
});
|
|
197712
197712
|
});
|
|
197713
197713
|
} else {
|
|
@@ -215914,14 +215914,14 @@ var require_async_iterator = __commonJS((exports, module) => {
|
|
|
215914
215914
|
};
|
|
215915
215915
|
}
|
|
215916
215916
|
function readAndResolve(iter) {
|
|
215917
|
-
var
|
|
215918
|
-
if (
|
|
215917
|
+
var resolve7 = iter[kLastResolve];
|
|
215918
|
+
if (resolve7 !== null) {
|
|
215919
215919
|
var data = iter[kStream].read();
|
|
215920
215920
|
if (data !== null) {
|
|
215921
215921
|
iter[kLastPromise] = null;
|
|
215922
215922
|
iter[kLastResolve] = null;
|
|
215923
215923
|
iter[kLastReject] = null;
|
|
215924
|
-
|
|
215924
|
+
resolve7(createIterResult(data, false));
|
|
215925
215925
|
}
|
|
215926
215926
|
}
|
|
215927
215927
|
}
|
|
@@ -215929,13 +215929,13 @@ var require_async_iterator = __commonJS((exports, module) => {
|
|
|
215929
215929
|
process.nextTick(readAndResolve, iter);
|
|
215930
215930
|
}
|
|
215931
215931
|
function wrapForNext(lastPromise, iter) {
|
|
215932
|
-
return function(
|
|
215932
|
+
return function(resolve7, reject) {
|
|
215933
215933
|
lastPromise.then(function() {
|
|
215934
215934
|
if (iter[kEnded]) {
|
|
215935
|
-
|
|
215935
|
+
resolve7(createIterResult(undefined, true));
|
|
215936
215936
|
return;
|
|
215937
215937
|
}
|
|
215938
|
-
iter[kHandlePromise](
|
|
215938
|
+
iter[kHandlePromise](resolve7, reject);
|
|
215939
215939
|
}, reject);
|
|
215940
215940
|
};
|
|
215941
215941
|
}
|
|
@@ -215954,12 +215954,12 @@ var require_async_iterator = __commonJS((exports, module) => {
|
|
|
215954
215954
|
return Promise.resolve(createIterResult(undefined, true));
|
|
215955
215955
|
}
|
|
215956
215956
|
if (this[kStream].destroyed) {
|
|
215957
|
-
return new Promise(function(
|
|
215957
|
+
return new Promise(function(resolve7, reject) {
|
|
215958
215958
|
process.nextTick(function() {
|
|
215959
215959
|
if (_this[kError]) {
|
|
215960
215960
|
reject(_this[kError]);
|
|
215961
215961
|
} else {
|
|
215962
|
-
|
|
215962
|
+
resolve7(createIterResult(undefined, true));
|
|
215963
215963
|
}
|
|
215964
215964
|
});
|
|
215965
215965
|
});
|
|
@@ -215982,13 +215982,13 @@ var require_async_iterator = __commonJS((exports, module) => {
|
|
|
215982
215982
|
return this;
|
|
215983
215983
|
}), _defineProperty(_Object$setPrototypeO, "return", function _return() {
|
|
215984
215984
|
var _this2 = this;
|
|
215985
|
-
return new Promise(function(
|
|
215985
|
+
return new Promise(function(resolve7, reject) {
|
|
215986
215986
|
_this2[kStream].destroy(null, function(err) {
|
|
215987
215987
|
if (err) {
|
|
215988
215988
|
reject(err);
|
|
215989
215989
|
return;
|
|
215990
215990
|
}
|
|
215991
|
-
|
|
215991
|
+
resolve7(createIterResult(undefined, true));
|
|
215992
215992
|
});
|
|
215993
215993
|
});
|
|
215994
215994
|
}), _Object$setPrototypeO), AsyncIteratorPrototype);
|
|
@@ -216010,15 +216010,15 @@ var require_async_iterator = __commonJS((exports, module) => {
|
|
|
216010
216010
|
value: stream._readableState.endEmitted,
|
|
216011
216011
|
writable: true
|
|
216012
216012
|
}), _defineProperty(_Object$create, kHandlePromise, {
|
|
216013
|
-
value: function value(
|
|
216013
|
+
value: function value(resolve7, reject) {
|
|
216014
216014
|
var data = iterator[kStream].read();
|
|
216015
216015
|
if (data) {
|
|
216016
216016
|
iterator[kLastPromise] = null;
|
|
216017
216017
|
iterator[kLastResolve] = null;
|
|
216018
216018
|
iterator[kLastReject] = null;
|
|
216019
|
-
|
|
216019
|
+
resolve7(createIterResult(data, false));
|
|
216020
216020
|
} else {
|
|
216021
|
-
iterator[kLastResolve] =
|
|
216021
|
+
iterator[kLastResolve] = resolve7;
|
|
216022
216022
|
iterator[kLastReject] = reject;
|
|
216023
216023
|
}
|
|
216024
216024
|
},
|
|
@@ -216037,12 +216037,12 @@ var require_async_iterator = __commonJS((exports, module) => {
|
|
|
216037
216037
|
iterator[kError] = err;
|
|
216038
216038
|
return;
|
|
216039
216039
|
}
|
|
216040
|
-
var
|
|
216041
|
-
if (
|
|
216040
|
+
var resolve7 = iterator[kLastResolve];
|
|
216041
|
+
if (resolve7 !== null) {
|
|
216042
216042
|
iterator[kLastPromise] = null;
|
|
216043
216043
|
iterator[kLastResolve] = null;
|
|
216044
216044
|
iterator[kLastReject] = null;
|
|
216045
|
-
|
|
216045
|
+
resolve7(createIterResult(undefined, true));
|
|
216046
216046
|
}
|
|
216047
216047
|
iterator[kEnded] = true;
|
|
216048
216048
|
});
|
|
@@ -216054,7 +216054,7 @@ var require_async_iterator = __commonJS((exports, module) => {
|
|
|
216054
216054
|
|
|
216055
216055
|
// ../../node_modules/readable-stream/lib/internal/streams/from.js
|
|
216056
216056
|
var require_from = __commonJS((exports, module) => {
|
|
216057
|
-
function asyncGeneratorStep(gen,
|
|
216057
|
+
function asyncGeneratorStep(gen, resolve7, reject, _next, _throw, key2, arg) {
|
|
216058
216058
|
try {
|
|
216059
216059
|
var info = gen[key2](arg);
|
|
216060
216060
|
var value = info.value;
|
|
@@ -216063,7 +216063,7 @@ var require_from = __commonJS((exports, module) => {
|
|
|
216063
216063
|
return;
|
|
216064
216064
|
}
|
|
216065
216065
|
if (info.done) {
|
|
216066
|
-
|
|
216066
|
+
resolve7(value);
|
|
216067
216067
|
} else {
|
|
216068
216068
|
Promise.resolve(value).then(_next, _throw);
|
|
216069
216069
|
}
|
|
@@ -216071,13 +216071,13 @@ var require_from = __commonJS((exports, module) => {
|
|
|
216071
216071
|
function _asyncToGenerator(fn9) {
|
|
216072
216072
|
return function() {
|
|
216073
216073
|
var self2 = this, args = arguments;
|
|
216074
|
-
return new Promise(function(
|
|
216074
|
+
return new Promise(function(resolve7, reject) {
|
|
216075
216075
|
var gen = fn9.apply(self2, args);
|
|
216076
216076
|
function _next(value) {
|
|
216077
|
-
asyncGeneratorStep(gen,
|
|
216077
|
+
asyncGeneratorStep(gen, resolve7, reject, _next, _throw, "next", value);
|
|
216078
216078
|
}
|
|
216079
216079
|
function _throw(err) {
|
|
216080
|
-
asyncGeneratorStep(gen,
|
|
216080
|
+
asyncGeneratorStep(gen, resolve7, reject, _next, _throw, "throw", err);
|
|
216081
216081
|
}
|
|
216082
216082
|
_next(undefined);
|
|
216083
216083
|
});
|
|
@@ -241789,20 +241789,16 @@ function hasAnyLoginMethod(config3) {
|
|
|
241789
241789
|
var SOCIAL_PROVIDERS = {
|
|
241790
241790
|
google: {
|
|
241791
241791
|
field: "enableGoogleLogin",
|
|
241792
|
-
label: "Google",
|
|
241793
241792
|
customOAuth: {
|
|
241794
241793
|
modeField: "googleOAuthMode",
|
|
241795
241794
|
clientIdField: "googleOAuthClientId",
|
|
241796
|
-
secretKey: "google_oauth_client_secret"
|
|
241797
|
-
envVar: "BASE44_GOOGLE_OAUTH_CLIENT_SECRET",
|
|
241798
|
-
promptMessage: "Enter Google OAuth client secret"
|
|
241795
|
+
secretKey: "google_oauth_client_secret"
|
|
241799
241796
|
}
|
|
241800
241797
|
},
|
|
241801
|
-
microsoft: { field: "enableMicrosoftLogin"
|
|
241802
|
-
facebook: { field: "enableFacebookLogin"
|
|
241803
|
-
apple: { field: "enableAppleLogin"
|
|
241798
|
+
microsoft: { field: "enableMicrosoftLogin" },
|
|
241799
|
+
facebook: { field: "enableFacebookLogin" },
|
|
241800
|
+
apple: { field: "enableAppleLogin" }
|
|
241804
241801
|
};
|
|
241805
|
-
var VALID_PROVIDER_NAMES = Object.keys(SOCIAL_PROVIDERS);
|
|
241806
241802
|
function toAuthConfigPayload(config3) {
|
|
241807
241803
|
return {
|
|
241808
241804
|
enable_username_password: config3.enableUsernamePassword,
|
|
@@ -242755,11 +242751,51 @@ var EntityAutomationSchema = AutomationBaseSchema.extend({
|
|
|
242755
242751
|
entity_name: exports_external.string().min(1, "Entity name cannot be empty"),
|
|
242756
242752
|
event_types: exports_external.array(exports_external.enum(["create", "update", "delete"])).min(1, "At least one event type is required")
|
|
242757
242753
|
});
|
|
242754
|
+
var KnownConditionOperators = [
|
|
242755
|
+
"equals",
|
|
242756
|
+
"not_equals",
|
|
242757
|
+
"gt",
|
|
242758
|
+
"gte",
|
|
242759
|
+
"lt",
|
|
242760
|
+
"lte",
|
|
242761
|
+
"contains",
|
|
242762
|
+
"not_contains",
|
|
242763
|
+
"starts_with",
|
|
242764
|
+
"ends_with",
|
|
242765
|
+
"in_list",
|
|
242766
|
+
"not_in_list",
|
|
242767
|
+
"exists",
|
|
242768
|
+
"not_exists",
|
|
242769
|
+
"is_empty",
|
|
242770
|
+
"is_not_empty"
|
|
242771
|
+
];
|
|
242772
|
+
var ConditionOperatorSchema = exports_external.union([
|
|
242773
|
+
exports_external.enum(KnownConditionOperators),
|
|
242774
|
+
exports_external.string().min(1)
|
|
242775
|
+
]);
|
|
242776
|
+
var TriggerConditionSchema = exports_external.object({
|
|
242777
|
+
field: exports_external.string().min(1),
|
|
242778
|
+
operator: ConditionOperatorSchema,
|
|
242779
|
+
value: exports_external.unknown().nullable().optional()
|
|
242780
|
+
});
|
|
242781
|
+
var TriggerLogicSchema = exports_external.enum(["and", "or"]);
|
|
242782
|
+
var TriggerConditionGroupSchema = exports_external.lazy(() => exports_external.object({
|
|
242783
|
+
logic: TriggerLogicSchema.optional(),
|
|
242784
|
+
conditions: exports_external.array(exports_external.union([TriggerConditionSchema, TriggerConditionGroupSchema])).min(1)
|
|
242785
|
+
}));
|
|
242786
|
+
var ConnectorAutomationSchema = AutomationBaseSchema.extend({
|
|
242787
|
+
type: exports_external.literal("connector"),
|
|
242788
|
+
integration_type: IntegrationTypeSchema,
|
|
242789
|
+
events: exports_external.array(exports_external.string()),
|
|
242790
|
+
resource_id: exports_external.string().nullable().optional(),
|
|
242791
|
+
trigger_conditions: TriggerConditionGroupSchema.nullable().optional()
|
|
242792
|
+
});
|
|
242758
242793
|
var AutomationSchema = exports_external.union([
|
|
242759
242794
|
ScheduledOneTimeSchema,
|
|
242760
242795
|
ScheduledCronSchema,
|
|
242761
242796
|
ScheduledSimpleSchema,
|
|
242762
|
-
EntityAutomationSchema
|
|
242797
|
+
EntityAutomationSchema,
|
|
242798
|
+
ConnectorAutomationSchema
|
|
242763
242799
|
]);
|
|
242764
242800
|
var FunctionConfigSchema = exports_external.object({
|
|
242765
242801
|
name: FunctionNameSchema,
|
|
@@ -250900,44 +250936,74 @@ function getAuthPushCommand() {
|
|
|
250900
250936
|
}
|
|
250901
250937
|
|
|
250902
250938
|
// src/cli/commands/auth/social-login.ts
|
|
250903
|
-
import { dirname as dirname10, join as join15 } from "node:path";
|
|
250939
|
+
import { dirname as dirname10, join as join15, resolve as resolve2 } from "node:path";
|
|
250940
|
+
var PROVIDER_LABELS = {
|
|
250941
|
+
google: "Google",
|
|
250942
|
+
microsoft: "Microsoft",
|
|
250943
|
+
facebook: "Facebook",
|
|
250944
|
+
apple: "Apple"
|
|
250945
|
+
};
|
|
250946
|
+
var VALID_PROVIDER_NAMES = Object.keys(SOCIAL_PROVIDERS);
|
|
250947
|
+
var PROVIDER_OAUTH_CLI = {
|
|
250948
|
+
google: {
|
|
250949
|
+
envVar: "google_oauth_client_secret",
|
|
250950
|
+
promptMessage: "Enter Google OAuth client secret"
|
|
250951
|
+
}
|
|
250952
|
+
};
|
|
250953
|
+
function hasSecretOptions(options) {
|
|
250954
|
+
return Boolean(options.clientSecret || options.clientSecretStdin || options.envFile);
|
|
250955
|
+
}
|
|
250904
250956
|
function hasCustomOAuthOptions(options) {
|
|
250905
|
-
return Boolean(options.clientId || options
|
|
250957
|
+
return Boolean(options.clientId || hasSecretOptions(options));
|
|
250906
250958
|
}
|
|
250907
250959
|
async function socialLoginAction({ log, isNonInteractive, runTask: runTask2 }, provider, action, options) {
|
|
250908
250960
|
const shouldEnable = action === "enable";
|
|
250909
250961
|
const providerInfo = SOCIAL_PROVIDERS[provider];
|
|
250962
|
+
const label = PROVIDER_LABELS[provider];
|
|
250910
250963
|
const hasOAuthOptions = hasCustomOAuthOptions(options);
|
|
250911
250964
|
if (hasOAuthOptions && !providerInfo.customOAuth) {
|
|
250912
250965
|
throw new InvalidInputError(`Custom OAuth options are only supported for providers with custom OAuth (e.g., google). Use: base44 auth social-login ${provider} ${action}`);
|
|
250913
250966
|
}
|
|
250914
250967
|
if (hasOAuthOptions && !shouldEnable) {
|
|
250915
|
-
throw new InvalidInputError(`Custom OAuth options cannot be used with disable. To disable ${
|
|
250968
|
+
throw new InvalidInputError(`Custom OAuth options cannot be used with disable. To disable ${label} login: base44 auth social-login ${provider} disable`);
|
|
250969
|
+
}
|
|
250970
|
+
if (hasSecretOptions(options) && !options.clientId) {
|
|
250971
|
+
throw new InvalidInputError(`--client-id is required when providing a client secret. Use: base44 auth social-login ${provider} enable --client-id <id> --client-secret <secret>`);
|
|
250916
250972
|
}
|
|
250917
250973
|
const oauth = providerInfo.customOAuth;
|
|
250974
|
+
const oauthCli = PROVIDER_OAUTH_CLI[provider];
|
|
250918
250975
|
const useCustomOAuth = shouldEnable && hasOAuthOptions && oauth != null;
|
|
250919
250976
|
let clientSecret;
|
|
250920
|
-
if (useCustomOAuth && oauth) {
|
|
250921
|
-
|
|
250922
|
-
|
|
250923
|
-
|
|
250924
|
-
|
|
250925
|
-
|
|
250926
|
-
|
|
250927
|
-
|
|
250928
|
-
|
|
250929
|
-
|
|
250930
|
-
|
|
250931
|
-
|
|
250932
|
-
|
|
250933
|
-
|
|
250934
|
-
|
|
250935
|
-
|
|
250936
|
-
|
|
250937
|
-
|
|
250938
|
-
|
|
250939
|
-
|
|
250940
|
-
|
|
250977
|
+
if (useCustomOAuth && oauth && oauthCli && hasSecretOptions(options)) {
|
|
250978
|
+
if (options.envFile) {
|
|
250979
|
+
const secrets = await parseEnvFile(resolve2(options.envFile));
|
|
250980
|
+
const value = secrets[oauthCli.envVar];
|
|
250981
|
+
if (!value) {
|
|
250982
|
+
throw new InvalidInputError(`Key "${oauthCli.envVar}" not found in ${options.envFile}.`);
|
|
250983
|
+
}
|
|
250984
|
+
clientSecret = value;
|
|
250985
|
+
} else {
|
|
250986
|
+
clientSecret = await resolveSecret({
|
|
250987
|
+
flagValue: options.clientSecret,
|
|
250988
|
+
fromStdin: options.clientSecretStdin,
|
|
250989
|
+
envVar: oauthCli.envVar,
|
|
250990
|
+
promptMessage: oauthCli.promptMessage,
|
|
250991
|
+
isNonInteractive,
|
|
250992
|
+
name: "client secret",
|
|
250993
|
+
hints: [
|
|
250994
|
+
{
|
|
250995
|
+
message: `Provide via flag: base44 auth social-login ${provider} enable --client-id <id> --client-secret <secret>`,
|
|
250996
|
+
command: `base44 auth social-login ${provider} enable --client-id <id> --client-secret <secret>`
|
|
250997
|
+
},
|
|
250998
|
+
{
|
|
250999
|
+
message: `Provide via stdin: echo <secret> | base44 auth social-login ${provider} enable --client-id <id> --client-secret-stdin`
|
|
251000
|
+
},
|
|
251001
|
+
{
|
|
251002
|
+
message: `Provide via env: ${oauthCli.envVar}=<secret> base44 auth social-login ${provider} enable --client-id <id>`
|
|
251003
|
+
}
|
|
251004
|
+
]
|
|
251005
|
+
});
|
|
251006
|
+
}
|
|
250941
251007
|
}
|
|
250942
251008
|
const { project: project2 } = await readProjectConfig();
|
|
250943
251009
|
const configDir = dirname10(project2.configPath);
|
|
@@ -250947,19 +251013,22 @@ async function socialLoginAction({ log, isNonInteractive, runTask: runTask2 }, p
|
|
|
250947
251013
|
await runTask2("Saving client secret", async () => pushCustomOAuthSecret(provider, clientSecret));
|
|
250948
251014
|
}
|
|
250949
251015
|
if (!shouldEnable && !hasAnyLoginMethod(updated)) {
|
|
250950
|
-
log.warn(`Disabling ${
|
|
251016
|
+
log.warn(`Disabling ${label} login will leave no login methods enabled. Users will be locked out.`);
|
|
250951
251017
|
}
|
|
250952
251018
|
const newStatus = shouldEnable ? "enabled" : "disabled";
|
|
250953
251019
|
const oauthNote = useCustomOAuth ? " with custom OAuth" : "";
|
|
250954
|
-
|
|
250955
|
-
|
|
250956
|
-
|
|
251020
|
+
let outroMessage = `${label} login ${newStatus}${oauthNote} in local config. Run \`base44 auth push\` or \`base44 deploy\` to apply.`;
|
|
251021
|
+
if (useCustomOAuth && !clientSecret) {
|
|
251022
|
+
outroMessage += `
|
|
251023
|
+
Remember to push the client secret separately: base44 secrets set --env-file <path>`;
|
|
251024
|
+
}
|
|
251025
|
+
return { outroMessage };
|
|
250957
251026
|
}
|
|
250958
251027
|
function getSocialLoginCommand() {
|
|
250959
251028
|
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_PROVIDER_NAMES)).addArgument(new Argument("<action>", "enable or disable the provider").choices([
|
|
250960
251029
|
"enable",
|
|
250961
251030
|
"disable"
|
|
250962
|
-
])).option("--client-id <id>", "custom OAuth client ID (Google only)").option("--client-secret <secret>", "custom OAuth client secret (Google only)").option("--client-secret-stdin", "read client secret from stdin (Google only)").action(socialLoginAction);
|
|
251031
|
+
])).option("--client-id <id>", "custom OAuth client ID (Google only)").option("--client-secret <secret>", "custom OAuth client secret (Google only)").option("--client-secret-stdin", "read client secret from stdin (Google only)").option("--env-file <path>", "read client secret from a .env file (Google only)").action(socialLoginAction);
|
|
250963
251032
|
}
|
|
250964
251033
|
|
|
250965
251034
|
// src/cli/commands/auth/index.ts
|
|
@@ -251562,19 +251631,19 @@ var baseOpen = async (options) => {
|
|
|
251562
251631
|
}
|
|
251563
251632
|
const subprocess = childProcess3.spawn(command2, cliArguments, childProcessOptions);
|
|
251564
251633
|
if (options.wait) {
|
|
251565
|
-
return new Promise((
|
|
251634
|
+
return new Promise((resolve3, reject) => {
|
|
251566
251635
|
subprocess.once("error", reject);
|
|
251567
251636
|
subprocess.once("close", (exitCode) => {
|
|
251568
251637
|
if (!options.allowNonzeroExitCode && exitCode !== 0) {
|
|
251569
251638
|
reject(new Error(`Exited with code ${exitCode}`));
|
|
251570
251639
|
return;
|
|
251571
251640
|
}
|
|
251572
|
-
|
|
251641
|
+
resolve3(subprocess);
|
|
251573
251642
|
});
|
|
251574
251643
|
});
|
|
251575
251644
|
}
|
|
251576
251645
|
if (isFallbackAttempt) {
|
|
251577
|
-
return new Promise((
|
|
251646
|
+
return new Promise((resolve3, reject) => {
|
|
251578
251647
|
subprocess.once("error", reject);
|
|
251579
251648
|
subprocess.once("spawn", () => {
|
|
251580
251649
|
subprocess.once("close", (exitCode) => {
|
|
@@ -251584,17 +251653,17 @@ var baseOpen = async (options) => {
|
|
|
251584
251653
|
return;
|
|
251585
251654
|
}
|
|
251586
251655
|
subprocess.unref();
|
|
251587
|
-
|
|
251656
|
+
resolve3(subprocess);
|
|
251588
251657
|
});
|
|
251589
251658
|
});
|
|
251590
251659
|
});
|
|
251591
251660
|
}
|
|
251592
251661
|
subprocess.unref();
|
|
251593
|
-
return new Promise((
|
|
251662
|
+
return new Promise((resolve3, reject) => {
|
|
251594
251663
|
subprocess.once("error", reject);
|
|
251595
251664
|
subprocess.once("spawn", () => {
|
|
251596
251665
|
subprocess.off("error", reject);
|
|
251597
|
-
|
|
251666
|
+
resolve3(subprocess);
|
|
251598
251667
|
});
|
|
251599
251668
|
});
|
|
251600
251669
|
};
|
|
@@ -252135,7 +252204,7 @@ function getFunctionsCommand() {
|
|
|
252135
252204
|
}
|
|
252136
252205
|
|
|
252137
252206
|
// src/cli/commands/project/create.ts
|
|
252138
|
-
import { basename as basename3, join as join18, resolve as
|
|
252207
|
+
import { basename as basename3, join as join18, resolve as resolve3 } from "node:path";
|
|
252139
252208
|
var import_kebabCase = __toESM(require_kebabCase(), 1);
|
|
252140
252209
|
var DEFAULT_TEMPLATE_ID = "backend-only";
|
|
252141
252210
|
async function getTemplateById(templateId) {
|
|
@@ -252200,7 +252269,7 @@ async function createInteractive(options, ctx) {
|
|
|
252200
252269
|
}, ctx);
|
|
252201
252270
|
}
|
|
252202
252271
|
async function createNonInteractive(options, ctx) {
|
|
252203
|
-
ctx.log.info(`Creating a new project at ${
|
|
252272
|
+
ctx.log.info(`Creating a new project at ${resolve3(options.path)}`);
|
|
252204
252273
|
const template2 = await getTemplateById(options.template ?? DEFAULT_TEMPLATE_ID);
|
|
252205
252274
|
return await executeCreate({
|
|
252206
252275
|
template: template2,
|
|
@@ -252221,7 +252290,7 @@ async function executeCreate({
|
|
|
252221
252290
|
isInteractive
|
|
252222
252291
|
}, { log, runTask: runTask2 }) {
|
|
252223
252292
|
const name2 = rawName.trim();
|
|
252224
|
-
const resolvedPath =
|
|
252293
|
+
const resolvedPath = resolve3(projectPath);
|
|
252225
252294
|
const { projectId } = await runTask2("Setting up your project...", async () => {
|
|
252226
252295
|
return await createProjectFiles({
|
|
252227
252296
|
name: name2,
|
|
@@ -252737,7 +252806,7 @@ function getSecretsListCommand() {
|
|
|
252737
252806
|
}
|
|
252738
252807
|
|
|
252739
252808
|
// src/cli/commands/secrets/set.ts
|
|
252740
|
-
import { resolve as
|
|
252809
|
+
import { resolve as resolve4 } from "node:path";
|
|
252741
252810
|
function parseEntries(entries) {
|
|
252742
252811
|
const secrets = {};
|
|
252743
252812
|
for (const entry of entries) {
|
|
@@ -252768,7 +252837,7 @@ async function setSecretsAction({ log, runTask: runTask2 }, entries, options) {
|
|
|
252768
252837
|
validateInput(entries, options);
|
|
252769
252838
|
let secrets;
|
|
252770
252839
|
if (options.envFile) {
|
|
252771
|
-
secrets = await parseEnvFile(
|
|
252840
|
+
secrets = await parseEnvFile(resolve4(options.envFile));
|
|
252772
252841
|
if (Object.keys(secrets).length === 0) {
|
|
252773
252842
|
throw new InvalidInputError("The env file contains no valid KEY=VALUE entries.");
|
|
252774
252843
|
}
|
|
@@ -252797,7 +252866,7 @@ function getSecretsCommand() {
|
|
|
252797
252866
|
}
|
|
252798
252867
|
|
|
252799
252868
|
// src/cli/commands/site/deploy.ts
|
|
252800
|
-
import { resolve as
|
|
252869
|
+
import { resolve as resolve5 } from "node:path";
|
|
252801
252870
|
async function deployAction2({ isNonInteractive, runTask: runTask2 }, options) {
|
|
252802
252871
|
if (isNonInteractive && !options.yes) {
|
|
252803
252872
|
throw new InvalidInputError("--yes is required in non-interactive mode");
|
|
@@ -252812,7 +252881,7 @@ async function deployAction2({ isNonInteractive, runTask: runTask2 }, options) {
|
|
|
252812
252881
|
]
|
|
252813
252882
|
});
|
|
252814
252883
|
}
|
|
252815
|
-
const outputDir =
|
|
252884
|
+
const outputDir = resolve5(project2.root, project2.site.outputDirectory);
|
|
252816
252885
|
if (!options.yes) {
|
|
252817
252886
|
const shouldDeploy = await Re({
|
|
252818
252887
|
message: `Deploy site from ${project2.site.outputDirectory}?`
|
|
@@ -253013,14 +253082,14 @@ var getLocalHosts = () => {
|
|
|
253013
253082
|
}
|
|
253014
253083
|
return results;
|
|
253015
253084
|
};
|
|
253016
|
-
var checkAvailablePort = (options8) => new Promise((
|
|
253085
|
+
var checkAvailablePort = (options8) => new Promise((resolve7, reject) => {
|
|
253017
253086
|
const server = net.createServer();
|
|
253018
253087
|
server.unref();
|
|
253019
253088
|
server.on("error", reject);
|
|
253020
253089
|
server.listen(options8, () => {
|
|
253021
253090
|
const { port } = server.address();
|
|
253022
253091
|
server.close(() => {
|
|
253023
|
-
|
|
253092
|
+
resolve7(port);
|
|
253024
253093
|
});
|
|
253025
253094
|
});
|
|
253026
253095
|
});
|
|
@@ -253159,6 +253228,7 @@ function createDevLogger() {
|
|
|
253159
253228
|
|
|
253160
253229
|
// src/cli/dev/dev-server/function-manager.ts
|
|
253161
253230
|
import { spawn as spawn2 } from "node:child_process";
|
|
253231
|
+
import { pathToFileURL } from "node:url";
|
|
253162
253232
|
var READY_TIMEOUT = 30000;
|
|
253163
253233
|
|
|
253164
253234
|
class FunctionManager {
|
|
@@ -253238,7 +253308,7 @@ class FunctionManager {
|
|
|
253238
253308
|
const process21 = spawn2("deno", ["run", "--allow-all", this.wrapperPath], {
|
|
253239
253309
|
env: {
|
|
253240
253310
|
...globalThis.process.env,
|
|
253241
|
-
FUNCTION_PATH: func.entryPath,
|
|
253311
|
+
FUNCTION_PATH: pathToFileURL(func.entryPath).href,
|
|
253242
253312
|
FUNCTION_PORT: String(port),
|
|
253243
253313
|
FUNCTION_NAME: func.name
|
|
253244
253314
|
},
|
|
@@ -253273,7 +253343,7 @@ class FunctionManager {
|
|
|
253273
253343
|
});
|
|
253274
253344
|
}
|
|
253275
253345
|
waitForReady(name2, runningFunc) {
|
|
253276
|
-
return new Promise((
|
|
253346
|
+
return new Promise((resolve7, reject) => {
|
|
253277
253347
|
runningFunc.process.on("exit", (code2) => {
|
|
253278
253348
|
if (!runningFunc.ready) {
|
|
253279
253349
|
clearTimeout(timeout3);
|
|
@@ -253296,7 +253366,7 @@ class FunctionManager {
|
|
|
253296
253366
|
runningFunc.ready = true;
|
|
253297
253367
|
clearTimeout(timeout3);
|
|
253298
253368
|
runningFunc.process.stdout?.off("data", onData);
|
|
253299
|
-
|
|
253369
|
+
resolve7(runningFunc.port);
|
|
253300
253370
|
}
|
|
253301
253371
|
};
|
|
253302
253372
|
runningFunc.process.stdout?.on("data", onData);
|
|
@@ -253317,9 +253387,13 @@ function createFunctionRouter(manager, logger2) {
|
|
|
253317
253387
|
on: {
|
|
253318
253388
|
proxyReq: (proxyReq, req) => {
|
|
253319
253389
|
const xAppId = req.headers["x-app-id"];
|
|
253390
|
+
const authorization = req.headers.authorization;
|
|
253320
253391
|
if (xAppId) {
|
|
253321
253392
|
proxyReq.setHeader("Base44-App-Id", xAppId);
|
|
253322
253393
|
}
|
|
253394
|
+
if (authorization) {
|
|
253395
|
+
proxyReq.setHeader("Base44-Service-Authorization", authorization);
|
|
253396
|
+
}
|
|
253323
253397
|
proxyReq.setHeader("Base44-Api-Url", `${req.protocol}://${req.headers.host}`);
|
|
253324
253398
|
},
|
|
253325
253399
|
error: (err, _req, res) => {
|
|
@@ -254932,7 +255006,7 @@ class NodeFsHandler {
|
|
|
254932
255006
|
this._addToNodeFs(path19, initialAdd, wh2, depth + 1);
|
|
254933
255007
|
}
|
|
254934
255008
|
}).on(EV.ERROR, this._boundHandleError);
|
|
254935
|
-
return new Promise((
|
|
255009
|
+
return new Promise((resolve8, reject) => {
|
|
254936
255010
|
if (!stream)
|
|
254937
255011
|
return reject();
|
|
254938
255012
|
stream.once(STR_END, () => {
|
|
@@ -254941,7 +255015,7 @@ class NodeFsHandler {
|
|
|
254941
255015
|
return;
|
|
254942
255016
|
}
|
|
254943
255017
|
const wasThrottled = throttler ? throttler.clear() : false;
|
|
254944
|
-
|
|
255018
|
+
resolve8(undefined);
|
|
254945
255019
|
previous.getChildren().filter((item) => {
|
|
254946
255020
|
return item !== directory && !current.has(item);
|
|
254947
255021
|
}).forEach((item) => {
|
|
@@ -255846,7 +255920,7 @@ async function createDevServer(options8) {
|
|
|
255846
255920
|
devLogger.warn(`"${req.originalUrl}" is not supported in local development, passing call to production`);
|
|
255847
255921
|
remoteProxy(req, res, next);
|
|
255848
255922
|
});
|
|
255849
|
-
const server = await new Promise((
|
|
255923
|
+
const server = await new Promise((resolve9, reject) => {
|
|
255850
255924
|
const s5 = app.listen(port, "127.0.0.1", (err) => {
|
|
255851
255925
|
if (err) {
|
|
255852
255926
|
if ("code" in err && err.code === "EADDRINUSE") {
|
|
@@ -255855,7 +255929,7 @@ async function createDevServer(options8) {
|
|
|
255855
255929
|
reject(err);
|
|
255856
255930
|
}
|
|
255857
255931
|
} else {
|
|
255858
|
-
|
|
255932
|
+
resolve9(s5);
|
|
255859
255933
|
}
|
|
255860
255934
|
});
|
|
255861
255935
|
});
|
|
@@ -255970,6 +256044,17 @@ async function runScript(options8) {
|
|
|
255970
256044
|
}
|
|
255971
256045
|
}
|
|
255972
256046
|
// src/cli/commands/exec.ts
|
|
256047
|
+
function readStdin2() {
|
|
256048
|
+
return new Promise((resolve9, reject) => {
|
|
256049
|
+
let data = "";
|
|
256050
|
+
process.stdin.setEncoding("utf-8");
|
|
256051
|
+
process.stdin.on("data", (chunk) => {
|
|
256052
|
+
data += chunk;
|
|
256053
|
+
});
|
|
256054
|
+
process.stdin.on("end", () => resolve9(data));
|
|
256055
|
+
process.stdin.on("error", reject);
|
|
256056
|
+
});
|
|
256057
|
+
}
|
|
255973
256058
|
async function execAction(isNonInteractive) {
|
|
255974
256059
|
const noInputError = new InvalidInputError("No input provided. Pipe a script to stdin.", {
|
|
255975
256060
|
hints: [
|
|
@@ -255982,7 +256067,7 @@ async function execAction(isNonInteractive) {
|
|
|
255982
256067
|
if (!isNonInteractive) {
|
|
255983
256068
|
throw noInputError;
|
|
255984
256069
|
}
|
|
255985
|
-
const code2 = await
|
|
256070
|
+
const code2 = await readStdin2();
|
|
255986
256071
|
if (!code2.trim()) {
|
|
255987
256072
|
throw noInputError;
|
|
255988
256073
|
}
|
|
@@ -256005,7 +256090,7 @@ Examples:
|
|
|
256005
256090
|
}
|
|
256006
256091
|
|
|
256007
256092
|
// src/cli/commands/project/eject.ts
|
|
256008
|
-
import { resolve as
|
|
256093
|
+
import { resolve as resolve9 } from "node:path";
|
|
256009
256094
|
var import_kebabCase2 = __toESM(require_kebabCase(), 1);
|
|
256010
256095
|
async function eject(ctx, options8) {
|
|
256011
256096
|
const { log, runTask: runTask2, isNonInteractive } = ctx;
|
|
@@ -256061,7 +256146,7 @@ async function eject(ctx, options8) {
|
|
|
256061
256146
|
Ne("Operation cancelled.");
|
|
256062
256147
|
throw new CLIExitError(0);
|
|
256063
256148
|
}
|
|
256064
|
-
const resolvedPath =
|
|
256149
|
+
const resolvedPath = resolve9(selectedPath);
|
|
256065
256150
|
await runTask2("Downloading your project's code...", async (updateMessage) => {
|
|
256066
256151
|
await createProjectFilesForExistingProject({
|
|
256067
256152
|
projectId,
|
|
@@ -258429,14 +258514,14 @@ async function addSourceContext(frames) {
|
|
|
258429
258514
|
return frames;
|
|
258430
258515
|
}
|
|
258431
258516
|
function getContextLinesFromFile(path19, ranges, output) {
|
|
258432
|
-
return new Promise((
|
|
258517
|
+
return new Promise((resolve10) => {
|
|
258433
258518
|
const stream = createReadStream2(path19);
|
|
258434
258519
|
const lineReaded = createInterface2({
|
|
258435
258520
|
input: stream
|
|
258436
258521
|
});
|
|
258437
258522
|
function destroyStreamAndResolve() {
|
|
258438
258523
|
stream.destroy();
|
|
258439
|
-
|
|
258524
|
+
resolve10();
|
|
258440
258525
|
}
|
|
258441
258526
|
let lineNumber = 0;
|
|
258442
258527
|
let currentRangeIndex = 0;
|
|
@@ -259548,15 +259633,15 @@ class PostHogBackendClient extends PostHogCoreStateless {
|
|
|
259548
259633
|
return true;
|
|
259549
259634
|
if (this.featureFlagsPoller === undefined)
|
|
259550
259635
|
return false;
|
|
259551
|
-
return new Promise((
|
|
259636
|
+
return new Promise((resolve10) => {
|
|
259552
259637
|
const timeout3 = setTimeout(() => {
|
|
259553
259638
|
cleanup();
|
|
259554
|
-
|
|
259639
|
+
resolve10(false);
|
|
259555
259640
|
}, timeoutMs);
|
|
259556
259641
|
const cleanup = this._events.on("localEvaluationFlagsLoaded", (count2) => {
|
|
259557
259642
|
clearTimeout(timeout3);
|
|
259558
259643
|
cleanup();
|
|
259559
|
-
|
|
259644
|
+
resolve10(count2 > 0);
|
|
259560
259645
|
});
|
|
259561
259646
|
});
|
|
259562
259647
|
}
|
|
@@ -260379,4 +260464,4 @@ export {
|
|
|
260379
260464
|
CLIExitError
|
|
260380
260465
|
};
|
|
260381
260466
|
|
|
260382
|
-
//# debugId=
|
|
260467
|
+
//# debugId=E5716DE2F2BFF5D364756E2164756E21
|