@base44-preview/cli 0.0.50-pr.445.8ca0d72 → 0.0.50-pr.445.ec235b0
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 +389 -295
- package/dist/cli/index.js.map +12 -11
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -9671,12 +9671,12 @@ var require_schema = __commonJS((exports, module) => {
|
|
|
9671
9671
|
var common = require_common3();
|
|
9672
9672
|
var YAMLException = require_exception();
|
|
9673
9673
|
var Type = require_type();
|
|
9674
|
-
function compileList(
|
|
9674
|
+
function compileList(schema7, name2, result) {
|
|
9675
9675
|
var exclude = [];
|
|
9676
|
-
|
|
9676
|
+
schema7.include.forEach(function(includedSchema) {
|
|
9677
9677
|
result = compileList(includedSchema, name2, result);
|
|
9678
9678
|
});
|
|
9679
|
-
|
|
9679
|
+
schema7[name2].forEach(function(currentType) {
|
|
9680
9680
|
result.forEach(function(previousType, previousIndex) {
|
|
9681
9681
|
if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) {
|
|
9682
9682
|
exclude.push(previousIndex);
|
|
@@ -9733,8 +9733,8 @@ var require_schema = __commonJS((exports, module) => {
|
|
|
9733
9733
|
}
|
|
9734
9734
|
schemas3 = common.toArray(schemas3);
|
|
9735
9735
|
types = common.toArray(types);
|
|
9736
|
-
if (!schemas3.every(function(
|
|
9737
|
-
return
|
|
9736
|
+
if (!schemas3.every(function(schema7) {
|
|
9737
|
+
return schema7 instanceof Schema;
|
|
9738
9738
|
})) {
|
|
9739
9739
|
throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");
|
|
9740
9740
|
}
|
|
@@ -11755,7 +11755,7 @@ var require_dumper = __commonJS((exports, module) => {
|
|
|
11755
11755
|
"Off",
|
|
11756
11756
|
"OFF"
|
|
11757
11757
|
];
|
|
11758
|
-
function compileStyleMap(
|
|
11758
|
+
function compileStyleMap(schema7, map2) {
|
|
11759
11759
|
var result, keys, index, length, tag, style, type;
|
|
11760
11760
|
if (map2 === null)
|
|
11761
11761
|
return {};
|
|
@@ -11767,7 +11767,7 @@ var require_dumper = __commonJS((exports, module) => {
|
|
|
11767
11767
|
if (tag.slice(0, 2) === "!!") {
|
|
11768
11768
|
tag = "tag:yaml.org,2002:" + tag.slice(2);
|
|
11769
11769
|
}
|
|
11770
|
-
type =
|
|
11770
|
+
type = schema7.compiledTypeMap["fallback"][tag];
|
|
11771
11771
|
if (type && _hasOwnProperty.call(type.styleAliases, style)) {
|
|
11772
11772
|
style = type.styleAliases[style];
|
|
11773
11773
|
}
|
|
@@ -18954,7 +18954,7 @@ var require_createNode = __commonJS((exports) => {
|
|
|
18954
18954
|
if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) {
|
|
18955
18955
|
value = value.valueOf();
|
|
18956
18956
|
}
|
|
18957
|
-
const { aliasDuplicateObjects, onAnchor, onTagObj, schema:
|
|
18957
|
+
const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema10, sourceObjects } = ctx;
|
|
18958
18958
|
let ref = undefined;
|
|
18959
18959
|
if (aliasDuplicateObjects && value && typeof value === "object") {
|
|
18960
18960
|
ref = sourceObjects.get(value);
|
|
@@ -18968,7 +18968,7 @@ var require_createNode = __commonJS((exports) => {
|
|
|
18968
18968
|
}
|
|
18969
18969
|
if (tagName?.startsWith("!!"))
|
|
18970
18970
|
tagName = defaultTagPrefix + tagName.slice(2);
|
|
18971
|
-
let tagObj = findTagObject(value, tagName,
|
|
18971
|
+
let tagObj = findTagObject(value, tagName, schema10.tags);
|
|
18972
18972
|
if (!tagObj) {
|
|
18973
18973
|
if (value && typeof value.toJSON === "function") {
|
|
18974
18974
|
value = value.toJSON();
|
|
@@ -18979,7 +18979,7 @@ var require_createNode = __commonJS((exports) => {
|
|
|
18979
18979
|
ref.node = node2;
|
|
18980
18980
|
return node2;
|
|
18981
18981
|
}
|
|
18982
|
-
tagObj = value instanceof Map ?
|
|
18982
|
+
tagObj = value instanceof Map ? schema10[identity3.MAP] : (Symbol.iterator in Object(value)) ? schema10[identity3.SEQ] : schema10[identity3.MAP];
|
|
18983
18983
|
}
|
|
18984
18984
|
if (onTagObj) {
|
|
18985
18985
|
onTagObj(tagObj);
|
|
@@ -19002,7 +19002,7 @@ var require_Collection = __commonJS((exports) => {
|
|
|
19002
19002
|
var createNode = require_createNode();
|
|
19003
19003
|
var identity3 = require_identity();
|
|
19004
19004
|
var Node2 = require_Node();
|
|
19005
|
-
function collectionFromPath(
|
|
19005
|
+
function collectionFromPath(schema10, path16, value) {
|
|
19006
19006
|
let v = value;
|
|
19007
19007
|
for (let i2 = path16.length - 1;i2 >= 0; --i2) {
|
|
19008
19008
|
const k2 = path16[i2];
|
|
@@ -19020,27 +19020,27 @@ var require_Collection = __commonJS((exports) => {
|
|
|
19020
19020
|
onAnchor: () => {
|
|
19021
19021
|
throw new Error("This should not happen, please report a bug.");
|
|
19022
19022
|
},
|
|
19023
|
-
schema:
|
|
19023
|
+
schema: schema10,
|
|
19024
19024
|
sourceObjects: new Map
|
|
19025
19025
|
});
|
|
19026
19026
|
}
|
|
19027
19027
|
var isEmptyPath = (path16) => path16 == null || typeof path16 === "object" && !!path16[Symbol.iterator]().next().done;
|
|
19028
19028
|
|
|
19029
19029
|
class Collection extends Node2.NodeBase {
|
|
19030
|
-
constructor(type,
|
|
19030
|
+
constructor(type, schema10) {
|
|
19031
19031
|
super(type);
|
|
19032
19032
|
Object.defineProperty(this, "schema", {
|
|
19033
|
-
value:
|
|
19033
|
+
value: schema10,
|
|
19034
19034
|
configurable: true,
|
|
19035
19035
|
enumerable: false,
|
|
19036
19036
|
writable: true
|
|
19037
19037
|
});
|
|
19038
19038
|
}
|
|
19039
|
-
clone(
|
|
19039
|
+
clone(schema10) {
|
|
19040
19040
|
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
19041
|
-
if (
|
|
19042
|
-
copy.schema =
|
|
19043
|
-
copy.items = copy.items.map((it3) => identity3.isNode(it3) || identity3.isPair(it3) ? it3.clone(
|
|
19041
|
+
if (schema10)
|
|
19042
|
+
copy.schema = schema10;
|
|
19043
|
+
copy.items = copy.items.map((it3) => identity3.isNode(it3) || identity3.isPair(it3) ? it3.clone(schema10) : it3);
|
|
19044
19044
|
if (this.range)
|
|
19045
19045
|
copy.range = this.range.slice();
|
|
19046
19046
|
return copy;
|
|
@@ -19972,12 +19972,12 @@ var require_Pair = __commonJS((exports) => {
|
|
|
19972
19972
|
this.key = key;
|
|
19973
19973
|
this.value = value;
|
|
19974
19974
|
}
|
|
19975
|
-
clone(
|
|
19975
|
+
clone(schema10) {
|
|
19976
19976
|
let { key, value } = this;
|
|
19977
19977
|
if (identity3.isNode(key))
|
|
19978
|
-
key = key.clone(
|
|
19978
|
+
key = key.clone(schema10);
|
|
19979
19979
|
if (identity3.isNode(value))
|
|
19980
|
-
value = value.clone(
|
|
19980
|
+
value = value.clone(schema10);
|
|
19981
19981
|
return new Pair(key, value);
|
|
19982
19982
|
}
|
|
19983
19983
|
toJSON(_2, ctx) {
|
|
@@ -20162,13 +20162,13 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
20162
20162
|
static get tagName() {
|
|
20163
20163
|
return "tag:yaml.org,2002:map";
|
|
20164
20164
|
}
|
|
20165
|
-
constructor(
|
|
20166
|
-
super(identity3.MAP,
|
|
20165
|
+
constructor(schema10) {
|
|
20166
|
+
super(identity3.MAP, schema10);
|
|
20167
20167
|
this.items = [];
|
|
20168
20168
|
}
|
|
20169
|
-
static from(
|
|
20169
|
+
static from(schema10, obj, ctx) {
|
|
20170
20170
|
const { keepUndefined, replacer } = ctx;
|
|
20171
|
-
const map2 = new this(
|
|
20171
|
+
const map2 = new this(schema10);
|
|
20172
20172
|
const add = (key, value) => {
|
|
20173
20173
|
if (typeof replacer === "function")
|
|
20174
20174
|
value = replacer.call(obj, key, value);
|
|
@@ -20184,8 +20184,8 @@ var require_YAMLMap = __commonJS((exports) => {
|
|
|
20184
20184
|
for (const key of Object.keys(obj))
|
|
20185
20185
|
add(key, obj[key]);
|
|
20186
20186
|
}
|
|
20187
|
-
if (typeof
|
|
20188
|
-
map2.items.sort(
|
|
20187
|
+
if (typeof schema10.sortMapEntries === "function") {
|
|
20188
|
+
map2.items.sort(schema10.sortMapEntries);
|
|
20189
20189
|
}
|
|
20190
20190
|
return map2;
|
|
20191
20191
|
}
|
|
@@ -20278,7 +20278,7 @@ var require_map2 = __commonJS((exports) => {
|
|
|
20278
20278
|
onError("Expected a mapping for this tag");
|
|
20279
20279
|
return map3;
|
|
20280
20280
|
},
|
|
20281
|
-
createNode: (
|
|
20281
|
+
createNode: (schema10, obj, ctx) => YAMLMap.YAMLMap.from(schema10, obj, ctx)
|
|
20282
20282
|
};
|
|
20283
20283
|
exports.map = map2;
|
|
20284
20284
|
});
|
|
@@ -20296,8 +20296,8 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
20296
20296
|
static get tagName() {
|
|
20297
20297
|
return "tag:yaml.org,2002:seq";
|
|
20298
20298
|
}
|
|
20299
|
-
constructor(
|
|
20300
|
-
super(identity3.SEQ,
|
|
20299
|
+
constructor(schema10) {
|
|
20300
|
+
super(identity3.SEQ, schema10);
|
|
20301
20301
|
this.items = [];
|
|
20302
20302
|
}
|
|
20303
20303
|
add(value) {
|
|
@@ -20351,9 +20351,9 @@ var require_YAMLSeq = __commonJS((exports) => {
|
|
|
20351
20351
|
onComment
|
|
20352
20352
|
});
|
|
20353
20353
|
}
|
|
20354
|
-
static from(
|
|
20354
|
+
static from(schema10, obj, ctx) {
|
|
20355
20355
|
const { replacer } = ctx;
|
|
20356
|
-
const seq = new this(
|
|
20356
|
+
const seq = new this(schema10);
|
|
20357
20357
|
if (obj && Symbol.iterator in Object(obj)) {
|
|
20358
20358
|
let i2 = 0;
|
|
20359
20359
|
for (let it3 of obj) {
|
|
@@ -20390,7 +20390,7 @@ var require_seq2 = __commonJS((exports) => {
|
|
|
20390
20390
|
onError("Expected a sequence for this tag");
|
|
20391
20391
|
return seq2;
|
|
20392
20392
|
},
|
|
20393
|
-
createNode: (
|
|
20393
|
+
createNode: (schema10, obj, ctx) => YAMLSeq.YAMLSeq.from(schema10, obj, ctx)
|
|
20394
20394
|
};
|
|
20395
20395
|
exports.seq = seq;
|
|
20396
20396
|
});
|
|
@@ -20565,7 +20565,7 @@ var require_schema2 = __commonJS((exports) => {
|
|
|
20565
20565
|
var bool = require_bool2();
|
|
20566
20566
|
var float = require_float2();
|
|
20567
20567
|
var int2 = require_int2();
|
|
20568
|
-
var
|
|
20568
|
+
var schema10 = [
|
|
20569
20569
|
map2.map,
|
|
20570
20570
|
seq.seq,
|
|
20571
20571
|
string4.string,
|
|
@@ -20578,7 +20578,7 @@ var require_schema2 = __commonJS((exports) => {
|
|
|
20578
20578
|
float.floatExp,
|
|
20579
20579
|
float.float
|
|
20580
20580
|
];
|
|
20581
|
-
exports.schema =
|
|
20581
|
+
exports.schema = schema10;
|
|
20582
20582
|
});
|
|
20583
20583
|
|
|
20584
20584
|
// ../../node_modules/yaml/dist/schema/json/schema.js
|
|
@@ -20641,8 +20641,8 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
20641
20641
|
return str;
|
|
20642
20642
|
}
|
|
20643
20643
|
};
|
|
20644
|
-
var
|
|
20645
|
-
exports.schema =
|
|
20644
|
+
var schema10 = [map2.map, seq.seq].concat(jsonScalars, jsonError);
|
|
20645
|
+
exports.schema = schema10;
|
|
20646
20646
|
});
|
|
20647
20647
|
|
|
20648
20648
|
// ../../node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
@@ -20732,9 +20732,9 @@ ${cn.comment}` : item.comment;
|
|
|
20732
20732
|
onError("Expected a sequence for this tag");
|
|
20733
20733
|
return seq;
|
|
20734
20734
|
}
|
|
20735
|
-
function createPairs(
|
|
20735
|
+
function createPairs(schema10, iterable, ctx) {
|
|
20736
20736
|
const { replacer } = ctx;
|
|
20737
|
-
const pairs2 = new YAMLSeq.YAMLSeq(
|
|
20737
|
+
const pairs2 = new YAMLSeq.YAMLSeq(schema10);
|
|
20738
20738
|
pairs2.tag = "tag:yaml.org,2002:pairs";
|
|
20739
20739
|
let i2 = 0;
|
|
20740
20740
|
if (iterable && Symbol.iterator in Object(iterable))
|
|
@@ -20813,8 +20813,8 @@ var require_omap2 = __commonJS((exports) => {
|
|
|
20813
20813
|
}
|
|
20814
20814
|
return map2;
|
|
20815
20815
|
}
|
|
20816
|
-
static from(
|
|
20817
|
-
const pairs$1 = pairs.createPairs(
|
|
20816
|
+
static from(schema10, iterable, ctx) {
|
|
20817
|
+
const pairs$1 = pairs.createPairs(schema10, iterable, ctx);
|
|
20818
20818
|
const omap2 = new this;
|
|
20819
20819
|
omap2.items = pairs$1.items;
|
|
20820
20820
|
return omap2;
|
|
@@ -20841,7 +20841,7 @@ var require_omap2 = __commonJS((exports) => {
|
|
|
20841
20841
|
}
|
|
20842
20842
|
return Object.assign(new YAMLOMap, pairs$1);
|
|
20843
20843
|
},
|
|
20844
|
-
createNode: (
|
|
20844
|
+
createNode: (schema10, iterable, ctx) => YAMLOMap.from(schema10, iterable, ctx)
|
|
20845
20845
|
};
|
|
20846
20846
|
exports.YAMLOMap = YAMLOMap;
|
|
20847
20847
|
exports.omap = omap;
|
|
@@ -21005,8 +21005,8 @@ var require_set2 = __commonJS((exports) => {
|
|
|
21005
21005
|
var YAMLMap = require_YAMLMap();
|
|
21006
21006
|
|
|
21007
21007
|
class YAMLSet extends YAMLMap.YAMLMap {
|
|
21008
|
-
constructor(
|
|
21009
|
-
super(
|
|
21008
|
+
constructor(schema10) {
|
|
21009
|
+
super(schema10);
|
|
21010
21010
|
this.tag = YAMLSet.tag;
|
|
21011
21011
|
}
|
|
21012
21012
|
add(key) {
|
|
@@ -21046,9 +21046,9 @@ var require_set2 = __commonJS((exports) => {
|
|
|
21046
21046
|
else
|
|
21047
21047
|
throw new Error("Set items must all have null values");
|
|
21048
21048
|
}
|
|
21049
|
-
static from(
|
|
21049
|
+
static from(schema10, iterable, ctx) {
|
|
21050
21050
|
const { replacer } = ctx;
|
|
21051
|
-
const set3 = new this(
|
|
21051
|
+
const set3 = new this(schema10);
|
|
21052
21052
|
if (iterable && Symbol.iterator in Object(iterable))
|
|
21053
21053
|
for (let value of iterable) {
|
|
21054
21054
|
if (typeof replacer === "function")
|
|
@@ -21065,7 +21065,7 @@ var require_set2 = __commonJS((exports) => {
|
|
|
21065
21065
|
nodeClass: YAMLSet,
|
|
21066
21066
|
default: false,
|
|
21067
21067
|
tag: "tag:yaml.org,2002:set",
|
|
21068
|
-
createNode: (
|
|
21068
|
+
createNode: (schema10, iterable, ctx) => YAMLSet.from(schema10, iterable, ctx),
|
|
21069
21069
|
resolve(map2, onError) {
|
|
21070
21070
|
if (identity3.isMap(map2)) {
|
|
21071
21071
|
if (map2.hasAllNullValues(true))
|
|
@@ -21178,7 +21178,7 @@ var require_schema4 = __commonJS((exports) => {
|
|
|
21178
21178
|
var pairs = require_pairs2();
|
|
21179
21179
|
var set2 = require_set2();
|
|
21180
21180
|
var timestamp = require_timestamp2();
|
|
21181
|
-
var
|
|
21181
|
+
var schema10 = [
|
|
21182
21182
|
map2.map,
|
|
21183
21183
|
seq.seq,
|
|
21184
21184
|
string4.string,
|
|
@@ -21201,7 +21201,7 @@ var require_schema4 = __commonJS((exports) => {
|
|
|
21201
21201
|
timestamp.floatTime,
|
|
21202
21202
|
timestamp.timestamp
|
|
21203
21203
|
];
|
|
21204
|
-
exports.schema =
|
|
21204
|
+
exports.schema = schema10;
|
|
21205
21205
|
});
|
|
21206
21206
|
|
|
21207
21207
|
// ../../node_modules/yaml/dist/schema/tags.js
|
|
@@ -21213,7 +21213,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
21213
21213
|
var bool = require_bool2();
|
|
21214
21214
|
var float = require_float2();
|
|
21215
21215
|
var int2 = require_int2();
|
|
21216
|
-
var
|
|
21216
|
+
var schema10 = require_schema2();
|
|
21217
21217
|
var schema$1 = require_schema3();
|
|
21218
21218
|
var binary = require_binary2();
|
|
21219
21219
|
var merge3 = require_merge3();
|
|
@@ -21223,7 +21223,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
21223
21223
|
var set2 = require_set2();
|
|
21224
21224
|
var timestamp = require_timestamp2();
|
|
21225
21225
|
var schemas3 = new Map([
|
|
21226
|
-
["core",
|
|
21226
|
+
["core", schema10.schema],
|
|
21227
21227
|
["failsafe", [map2.map, seq.seq, string4.string]],
|
|
21228
21228
|
["json", schema$1.schema],
|
|
21229
21229
|
["yaml11", schema$2.schema],
|
|
@@ -21305,9 +21305,9 @@ var require_Schema = __commonJS((exports) => {
|
|
|
21305
21305
|
var sortMapEntriesByKey = (a2, b) => a2.key < b.key ? -1 : a2.key > b.key ? 1 : 0;
|
|
21306
21306
|
|
|
21307
21307
|
class Schema {
|
|
21308
|
-
constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema:
|
|
21308
|
+
constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema: schema10, sortMapEntries, toStringDefaults }) {
|
|
21309
21309
|
this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
|
|
21310
|
-
this.name = typeof
|
|
21310
|
+
this.name = typeof schema10 === "string" && schema10 || "core";
|
|
21311
21311
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
21312
21312
|
this.tags = tags.getTags(customTags, this.name, merge3);
|
|
21313
21313
|
this.toStringOptions = toStringDefaults ?? null;
|
|
@@ -22799,11 +22799,11 @@ var require_compose_scalar = __commonJS((exports) => {
|
|
|
22799
22799
|
scalar.comment = comment;
|
|
22800
22800
|
return scalar;
|
|
22801
22801
|
}
|
|
22802
|
-
function findScalarTagByName(
|
|
22802
|
+
function findScalarTagByName(schema10, value, tagName, tagToken, onError) {
|
|
22803
22803
|
if (tagName === "!")
|
|
22804
|
-
return
|
|
22804
|
+
return schema10[identity3.SCALAR];
|
|
22805
22805
|
const matchWithTest = [];
|
|
22806
|
-
for (const tag of
|
|
22806
|
+
for (const tag of schema10.tags) {
|
|
22807
22807
|
if (!tag.collection && tag.tag === tagName) {
|
|
22808
22808
|
if (tag.default && tag.test)
|
|
22809
22809
|
matchWithTest.push(tag);
|
|
@@ -22814,18 +22814,18 @@ var require_compose_scalar = __commonJS((exports) => {
|
|
|
22814
22814
|
for (const tag of matchWithTest)
|
|
22815
22815
|
if (tag.test?.test(value))
|
|
22816
22816
|
return tag;
|
|
22817
|
-
const kt3 =
|
|
22817
|
+
const kt3 = schema10.knownTags[tagName];
|
|
22818
22818
|
if (kt3 && !kt3.collection) {
|
|
22819
|
-
|
|
22819
|
+
schema10.tags.push(Object.assign({}, kt3, { default: false, test: undefined }));
|
|
22820
22820
|
return kt3;
|
|
22821
22821
|
}
|
|
22822
22822
|
onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str");
|
|
22823
|
-
return
|
|
22823
|
+
return schema10[identity3.SCALAR];
|
|
22824
22824
|
}
|
|
22825
|
-
function findScalarTagByTest({ atKey, directives, schema:
|
|
22826
|
-
const tag =
|
|
22827
|
-
if (
|
|
22828
|
-
const compat2 =
|
|
22825
|
+
function findScalarTagByTest({ atKey, directives, schema: schema10 }, value, token, onError) {
|
|
22826
|
+
const tag = schema10.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test(value)) || schema10[identity3.SCALAR];
|
|
22827
|
+
if (schema10.compat) {
|
|
22828
|
+
const compat2 = schema10.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema10[identity3.SCALAR];
|
|
22829
22829
|
if (tag.tag !== compat2.tag) {
|
|
22830
22830
|
const ts = directives.tagString(tag.tag);
|
|
22831
22831
|
const cs = directives.tagString(compat2.tag);
|
|
@@ -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
|
});
|
|
@@ -241786,6 +241786,19 @@ var AppAuthConfigResponseSchema = exports_external.object({
|
|
|
241786
241786
|
function hasAnyLoginMethod(config3) {
|
|
241787
241787
|
return config3.enableUsernamePassword || config3.enableGoogleLogin || config3.enableMicrosoftLogin || config3.enableFacebookLogin || config3.enableAppleLogin || config3.enableSSOLogin;
|
|
241788
241788
|
}
|
|
241789
|
+
var SOCIAL_PROVIDERS = {
|
|
241790
|
+
google: {
|
|
241791
|
+
field: "enableGoogleLogin",
|
|
241792
|
+
customOAuth: {
|
|
241793
|
+
modeField: "googleOAuthMode",
|
|
241794
|
+
clientIdField: "googleOAuthClientId",
|
|
241795
|
+
secretKey: "google_oauth_client_secret"
|
|
241796
|
+
}
|
|
241797
|
+
},
|
|
241798
|
+
microsoft: { field: "enableMicrosoftLogin" },
|
|
241799
|
+
facebook: { field: "enableFacebookLogin" },
|
|
241800
|
+
apple: { field: "enableAppleLogin" }
|
|
241801
|
+
};
|
|
241789
241802
|
function toAuthConfigPayload(config3) {
|
|
241790
241803
|
return {
|
|
241791
241804
|
enable_username_password: config3.enableUsernamePassword,
|
|
@@ -241896,6 +241909,94 @@ var authConfigResource = {
|
|
|
241896
241909
|
await pushAuthConfig(items[0] ?? null);
|
|
241897
241910
|
}
|
|
241898
241911
|
};
|
|
241912
|
+
// src/core/resources/secret/schema.ts
|
|
241913
|
+
var ListSecretsResponseSchema = exports_external.record(exports_external.string(), exports_external.string());
|
|
241914
|
+
var SetSecretsResponseSchema = exports_external.object({
|
|
241915
|
+
success: exports_external.boolean()
|
|
241916
|
+
});
|
|
241917
|
+
var DeleteSecretResponseSchema = exports_external.object({
|
|
241918
|
+
success: exports_external.boolean()
|
|
241919
|
+
});
|
|
241920
|
+
|
|
241921
|
+
// src/core/resources/secret/api.ts
|
|
241922
|
+
async function listSecrets() {
|
|
241923
|
+
const appClient = getAppClient();
|
|
241924
|
+
let response;
|
|
241925
|
+
try {
|
|
241926
|
+
response = await appClient.get("secrets");
|
|
241927
|
+
} catch (error48) {
|
|
241928
|
+
throw await ApiError.fromHttpError(error48, "listing secrets");
|
|
241929
|
+
}
|
|
241930
|
+
const result = ListSecretsResponseSchema.safeParse(await response.json());
|
|
241931
|
+
if (!result.success) {
|
|
241932
|
+
throw new SchemaValidationError("Invalid response from server", result.error);
|
|
241933
|
+
}
|
|
241934
|
+
return result.data;
|
|
241935
|
+
}
|
|
241936
|
+
async function setSecrets(secrets) {
|
|
241937
|
+
const appClient = getAppClient();
|
|
241938
|
+
let response;
|
|
241939
|
+
try {
|
|
241940
|
+
response = await appClient.post("secrets", {
|
|
241941
|
+
json: secrets,
|
|
241942
|
+
timeout: false
|
|
241943
|
+
});
|
|
241944
|
+
} catch (error48) {
|
|
241945
|
+
throw await ApiError.fromHttpError(error48, "setting secrets");
|
|
241946
|
+
}
|
|
241947
|
+
const result = SetSecretsResponseSchema.safeParse(await response.json());
|
|
241948
|
+
if (!result.success) {
|
|
241949
|
+
throw new SchemaValidationError("Invalid response from server", result.error);
|
|
241950
|
+
}
|
|
241951
|
+
return result.data;
|
|
241952
|
+
}
|
|
241953
|
+
async function deleteSecret(name2) {
|
|
241954
|
+
const appClient = getAppClient();
|
|
241955
|
+
let response;
|
|
241956
|
+
try {
|
|
241957
|
+
response = await appClient.delete("secrets", {
|
|
241958
|
+
searchParams: { secret_name: name2 },
|
|
241959
|
+
timeout: false
|
|
241960
|
+
});
|
|
241961
|
+
} catch (error48) {
|
|
241962
|
+
throw await ApiError.fromHttpError(error48, "deleting secret");
|
|
241963
|
+
}
|
|
241964
|
+
const result = DeleteSecretResponseSchema.safeParse(await response.json());
|
|
241965
|
+
if (!result.success) {
|
|
241966
|
+
throw new SchemaValidationError("Invalid response from server", result.error);
|
|
241967
|
+
}
|
|
241968
|
+
return result.data;
|
|
241969
|
+
}
|
|
241970
|
+
// src/core/resources/auth-config/social-login.ts
|
|
241971
|
+
async function updateSocialLoginConfig(authDir, provider, enable, customOAuth) {
|
|
241972
|
+
const providerInfo = SOCIAL_PROVIDERS[provider];
|
|
241973
|
+
const current = await readAuthConfig(authDir) ?? DEFAULT_AUTH_CONFIG;
|
|
241974
|
+
const merged = {
|
|
241975
|
+
...current,
|
|
241976
|
+
[providerInfo.field]: enable
|
|
241977
|
+
};
|
|
241978
|
+
if (providerInfo.customOAuth) {
|
|
241979
|
+
const oauth = providerInfo.customOAuth;
|
|
241980
|
+
if (enable && customOAuth) {
|
|
241981
|
+
merged[oauth.modeField] = "custom";
|
|
241982
|
+
merged[oauth.clientIdField] = customOAuth.clientId;
|
|
241983
|
+
} else {
|
|
241984
|
+
merged[oauth.modeField] = "default";
|
|
241985
|
+
merged[oauth.clientIdField] = null;
|
|
241986
|
+
}
|
|
241987
|
+
}
|
|
241988
|
+
await writeAuthConfig(authDir, merged);
|
|
241989
|
+
return { config: merged, enabled: enable };
|
|
241990
|
+
}
|
|
241991
|
+
async function pushCustomOAuthSecret(provider, clientSecret) {
|
|
241992
|
+
const providerInfo = SOCIAL_PROVIDERS[provider];
|
|
241993
|
+
if (!providerInfo.customOAuth) {
|
|
241994
|
+
return;
|
|
241995
|
+
}
|
|
241996
|
+
await setSecrets({
|
|
241997
|
+
[providerInfo.customOAuth.secretKey]: clientSecret
|
|
241998
|
+
});
|
|
241999
|
+
}
|
|
241899
242000
|
// src/core/resources/connector/schema.ts
|
|
241900
242001
|
var GoogleCalendarConnectorSchema = exports_external.object({
|
|
241901
242002
|
type: exports_external.literal("googlecalendar"),
|
|
@@ -242650,11 +242751,51 @@ var EntityAutomationSchema = AutomationBaseSchema.extend({
|
|
|
242650
242751
|
entity_name: exports_external.string().min(1, "Entity name cannot be empty"),
|
|
242651
242752
|
event_types: exports_external.array(exports_external.enum(["create", "update", "delete"])).min(1, "At least one event type is required")
|
|
242652
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
|
+
});
|
|
242653
242793
|
var AutomationSchema = exports_external.union([
|
|
242654
242794
|
ScheduledOneTimeSchema,
|
|
242655
242795
|
ScheduledCronSchema,
|
|
242656
242796
|
ScheduledSimpleSchema,
|
|
242657
|
-
EntityAutomationSchema
|
|
242797
|
+
EntityAutomationSchema,
|
|
242798
|
+
ConnectorAutomationSchema
|
|
242658
242799
|
]);
|
|
242659
242800
|
var FunctionConfigSchema = exports_external.object({
|
|
242660
242801
|
name: FunctionNameSchema,
|
|
@@ -250608,64 +250749,6 @@ function formatYaml(data, options = {}) {
|
|
|
250608
250749
|
const replacer = stripEmpty ? stripEmptyReplacer : undefined;
|
|
250609
250750
|
return $stringify(data, replacer, { indent: YAML_INDENT }).trimEnd();
|
|
250610
250751
|
}
|
|
250611
|
-
// src/core/resources/secret/schema.ts
|
|
250612
|
-
var ListSecretsResponseSchema = exports_external.record(exports_external.string(), exports_external.string());
|
|
250613
|
-
var SetSecretsResponseSchema = exports_external.object({
|
|
250614
|
-
success: exports_external.boolean()
|
|
250615
|
-
});
|
|
250616
|
-
var DeleteSecretResponseSchema = exports_external.object({
|
|
250617
|
-
success: exports_external.boolean()
|
|
250618
|
-
});
|
|
250619
|
-
|
|
250620
|
-
// src/core/resources/secret/api.ts
|
|
250621
|
-
async function listSecrets() {
|
|
250622
|
-
const appClient = getAppClient();
|
|
250623
|
-
let response;
|
|
250624
|
-
try {
|
|
250625
|
-
response = await appClient.get("secrets");
|
|
250626
|
-
} catch (error48) {
|
|
250627
|
-
throw await ApiError.fromHttpError(error48, "listing secrets");
|
|
250628
|
-
}
|
|
250629
|
-
const result = ListSecretsResponseSchema.safeParse(await response.json());
|
|
250630
|
-
if (!result.success) {
|
|
250631
|
-
throw new SchemaValidationError("Invalid response from server", result.error);
|
|
250632
|
-
}
|
|
250633
|
-
return result.data;
|
|
250634
|
-
}
|
|
250635
|
-
async function setSecrets(secrets) {
|
|
250636
|
-
const appClient = getAppClient();
|
|
250637
|
-
let response;
|
|
250638
|
-
try {
|
|
250639
|
-
response = await appClient.post("secrets", {
|
|
250640
|
-
json: secrets,
|
|
250641
|
-
timeout: false
|
|
250642
|
-
});
|
|
250643
|
-
} catch (error48) {
|
|
250644
|
-
throw await ApiError.fromHttpError(error48, "setting secrets");
|
|
250645
|
-
}
|
|
250646
|
-
const result = SetSecretsResponseSchema.safeParse(await response.json());
|
|
250647
|
-
if (!result.success) {
|
|
250648
|
-
throw new SchemaValidationError("Invalid response from server", result.error);
|
|
250649
|
-
}
|
|
250650
|
-
return result.data;
|
|
250651
|
-
}
|
|
250652
|
-
async function deleteSecret(name2) {
|
|
250653
|
-
const appClient = getAppClient();
|
|
250654
|
-
let response;
|
|
250655
|
-
try {
|
|
250656
|
-
response = await appClient.delete("secrets", {
|
|
250657
|
-
searchParams: { secret_name: name2 },
|
|
250658
|
-
timeout: false
|
|
250659
|
-
});
|
|
250660
|
-
} catch (error48) {
|
|
250661
|
-
throw await ApiError.fromHttpError(error48, "deleting secret");
|
|
250662
|
-
}
|
|
250663
|
-
const result = DeleteSecretResponseSchema.safeParse(await response.json());
|
|
250664
|
-
if (!result.success) {
|
|
250665
|
-
throw new SchemaValidationError("Invalid response from server", result.error);
|
|
250666
|
-
}
|
|
250667
|
-
return result.data;
|
|
250668
|
-
}
|
|
250669
250752
|
// src/core/utils/dependencies.ts
|
|
250670
250753
|
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
250671
250754
|
function verifyDenoInstalled(context) {
|
|
@@ -250853,104 +250936,99 @@ function getAuthPushCommand() {
|
|
|
250853
250936
|
}
|
|
250854
250937
|
|
|
250855
250938
|
// src/cli/commands/auth/social-login.ts
|
|
250856
|
-
import { dirname as dirname10, join as join15 } from "node:path";
|
|
250857
|
-
var
|
|
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 = {
|
|
250858
250948
|
google: {
|
|
250859
|
-
|
|
250860
|
-
|
|
250861
|
-
|
|
250862
|
-
modeField: "googleOAuthMode",
|
|
250863
|
-
clientIdField: "googleOAuthClientId",
|
|
250864
|
-
secretKey: "google_oauth_client_secret",
|
|
250865
|
-
envVar: "BASE44_GOOGLE_OAUTH_CLIENT_SECRET",
|
|
250866
|
-
promptMessage: "Enter Google OAuth client secret"
|
|
250867
|
-
}
|
|
250868
|
-
},
|
|
250869
|
-
microsoft: { field: "enableMicrosoftLogin", label: "Microsoft" },
|
|
250870
|
-
facebook: { field: "enableFacebookLogin", label: "Facebook" },
|
|
250871
|
-
apple: { field: "enableAppleLogin", label: "Apple" }
|
|
250949
|
+
envVar: "google_oauth_client_secret",
|
|
250950
|
+
promptMessage: "Enter Google OAuth client secret"
|
|
250951
|
+
}
|
|
250872
250952
|
};
|
|
250873
|
-
|
|
250953
|
+
function hasSecretOptions(options) {
|
|
250954
|
+
return Boolean(options.clientSecret || options.clientSecretStdin || options.envFile);
|
|
250955
|
+
}
|
|
250874
250956
|
function hasCustomOAuthOptions(options) {
|
|
250875
|
-
return Boolean(options.clientId || options
|
|
250957
|
+
return Boolean(options.clientId || hasSecretOptions(options));
|
|
250876
250958
|
}
|
|
250877
250959
|
async function socialLoginAction({ log, isNonInteractive, runTask: runTask2 }, provider, action, options) {
|
|
250878
250960
|
const shouldEnable = action === "enable";
|
|
250879
250961
|
const providerInfo = SOCIAL_PROVIDERS[provider];
|
|
250962
|
+
const label = PROVIDER_LABELS[provider];
|
|
250880
250963
|
const hasOAuthOptions = hasCustomOAuthOptions(options);
|
|
250881
250964
|
if (hasOAuthOptions && !providerInfo.customOAuth) {
|
|
250882
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}`);
|
|
250883
250966
|
}
|
|
250884
250967
|
if (hasOAuthOptions && !shouldEnable) {
|
|
250885
|
-
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>`);
|
|
250886
250972
|
}
|
|
250887
|
-
const { project: project2 } = await readProjectConfig();
|
|
250888
|
-
const configDir = dirname10(project2.configPath);
|
|
250889
|
-
const authDir = join15(configDir, project2.authDir);
|
|
250890
250973
|
const oauth = providerInfo.customOAuth;
|
|
250974
|
+
const oauthCli = PROVIDER_OAUTH_CLI[provider];
|
|
250891
250975
|
const useCustomOAuth = shouldEnable && hasOAuthOptions && oauth != null;
|
|
250892
250976
|
let clientSecret;
|
|
250893
|
-
if (useCustomOAuth && oauth) {
|
|
250894
|
-
|
|
250895
|
-
|
|
250896
|
-
|
|
250897
|
-
|
|
250898
|
-
|
|
250899
|
-
isNonInteractive,
|
|
250900
|
-
name: "client secret",
|
|
250901
|
-
hints: [
|
|
250902
|
-
{
|
|
250903
|
-
message: `Provide via flag: base44 auth social-login ${provider} enable --client-id <id> --client-secret <secret>`,
|
|
250904
|
-
command: `base44 auth social-login ${provider} enable --client-id <id> --client-secret <secret>`
|
|
250905
|
-
},
|
|
250906
|
-
{
|
|
250907
|
-
message: `Provide via stdin: echo <secret> | base44 auth social-login ${provider} enable --client-id <id> --client-secret-stdin`
|
|
250908
|
-
},
|
|
250909
|
-
{
|
|
250910
|
-
message: `Provide via env: ${oauth.envVar}=<secret> base44 auth social-login ${provider} enable --client-id <id>`
|
|
250911
|
-
}
|
|
250912
|
-
]
|
|
250913
|
-
});
|
|
250914
|
-
}
|
|
250915
|
-
const updated = await runTask2("Updating local auth config", async () => {
|
|
250916
|
-
const current = await readAuthConfig(authDir) ?? DEFAULT_AUTH_CONFIG;
|
|
250917
|
-
const merged = {
|
|
250918
|
-
...current,
|
|
250919
|
-
[providerInfo.field]: shouldEnable
|
|
250920
|
-
};
|
|
250921
|
-
if (oauth) {
|
|
250922
|
-
if (useCustomOAuth) {
|
|
250923
|
-
merged[oauth.modeField] = "custom";
|
|
250924
|
-
merged[oauth.clientIdField] = options.clientId;
|
|
250925
|
-
} else {
|
|
250926
|
-
merged[oauth.modeField] = "default";
|
|
250927
|
-
merged[oauth.clientIdField] = null;
|
|
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}.`);
|
|
250928
250983
|
}
|
|
250929
|
-
|
|
250930
|
-
|
|
250931
|
-
|
|
250932
|
-
|
|
250933
|
-
|
|
250934
|
-
|
|
250935
|
-
|
|
250936
|
-
|
|
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
|
+
]
|
|
250937
251005
|
});
|
|
250938
|
-
}
|
|
251006
|
+
}
|
|
251007
|
+
}
|
|
251008
|
+
const { project: project2 } = await readProjectConfig();
|
|
251009
|
+
const configDir = dirname10(project2.configPath);
|
|
251010
|
+
const authDir = join15(configDir, project2.authDir);
|
|
251011
|
+
const { config: updated } = await runTask2("Updating local auth config", async () => updateSocialLoginConfig(authDir, provider, shouldEnable, useCustomOAuth && options.clientId ? { clientId: options.clientId } : undefined));
|
|
251012
|
+
if (clientSecret) {
|
|
251013
|
+
await runTask2("Saving client secret", async () => pushCustomOAuthSecret(provider, clientSecret));
|
|
250939
251014
|
}
|
|
250940
251015
|
if (!shouldEnable && !hasAnyLoginMethod(updated)) {
|
|
250941
|
-
log.warn(`Disabling ${
|
|
251016
|
+
log.warn(`Disabling ${label} login will leave no login methods enabled. Users will be locked out.`);
|
|
250942
251017
|
}
|
|
250943
251018
|
const newStatus = shouldEnable ? "enabled" : "disabled";
|
|
250944
251019
|
const oauthNote = useCustomOAuth ? " with custom OAuth" : "";
|
|
250945
|
-
|
|
250946
|
-
|
|
250947
|
-
|
|
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 };
|
|
250948
251026
|
}
|
|
250949
251027
|
function getSocialLoginCommand() {
|
|
250950
|
-
return new Base44Command("social-login").description("Enable or disable social login providers (google, microsoft, facebook, apple)").addArgument(new Argument("<provider>", "social login provider").choices(
|
|
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([
|
|
250951
251029
|
"enable",
|
|
250952
251030
|
"disable"
|
|
250953
|
-
])).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);
|
|
250954
251032
|
}
|
|
250955
251033
|
|
|
250956
251034
|
// src/cli/commands/auth/index.ts
|
|
@@ -251553,19 +251631,19 @@ var baseOpen = async (options) => {
|
|
|
251553
251631
|
}
|
|
251554
251632
|
const subprocess = childProcess3.spawn(command2, cliArguments, childProcessOptions);
|
|
251555
251633
|
if (options.wait) {
|
|
251556
|
-
return new Promise((
|
|
251634
|
+
return new Promise((resolve3, reject) => {
|
|
251557
251635
|
subprocess.once("error", reject);
|
|
251558
251636
|
subprocess.once("close", (exitCode) => {
|
|
251559
251637
|
if (!options.allowNonzeroExitCode && exitCode !== 0) {
|
|
251560
251638
|
reject(new Error(`Exited with code ${exitCode}`));
|
|
251561
251639
|
return;
|
|
251562
251640
|
}
|
|
251563
|
-
|
|
251641
|
+
resolve3(subprocess);
|
|
251564
251642
|
});
|
|
251565
251643
|
});
|
|
251566
251644
|
}
|
|
251567
251645
|
if (isFallbackAttempt) {
|
|
251568
|
-
return new Promise((
|
|
251646
|
+
return new Promise((resolve3, reject) => {
|
|
251569
251647
|
subprocess.once("error", reject);
|
|
251570
251648
|
subprocess.once("spawn", () => {
|
|
251571
251649
|
subprocess.once("close", (exitCode) => {
|
|
@@ -251575,17 +251653,17 @@ var baseOpen = async (options) => {
|
|
|
251575
251653
|
return;
|
|
251576
251654
|
}
|
|
251577
251655
|
subprocess.unref();
|
|
251578
|
-
|
|
251656
|
+
resolve3(subprocess);
|
|
251579
251657
|
});
|
|
251580
251658
|
});
|
|
251581
251659
|
});
|
|
251582
251660
|
}
|
|
251583
251661
|
subprocess.unref();
|
|
251584
|
-
return new Promise((
|
|
251662
|
+
return new Promise((resolve3, reject) => {
|
|
251585
251663
|
subprocess.once("error", reject);
|
|
251586
251664
|
subprocess.once("spawn", () => {
|
|
251587
251665
|
subprocess.off("error", reject);
|
|
251588
|
-
|
|
251666
|
+
resolve3(subprocess);
|
|
251589
251667
|
});
|
|
251590
251668
|
});
|
|
251591
251669
|
};
|
|
@@ -252126,7 +252204,7 @@ function getFunctionsCommand() {
|
|
|
252126
252204
|
}
|
|
252127
252205
|
|
|
252128
252206
|
// src/cli/commands/project/create.ts
|
|
252129
|
-
import { basename as basename3, join as join18, resolve as
|
|
252207
|
+
import { basename as basename3, join as join18, resolve as resolve3 } from "node:path";
|
|
252130
252208
|
var import_kebabCase = __toESM(require_kebabCase(), 1);
|
|
252131
252209
|
var DEFAULT_TEMPLATE_ID = "backend-only";
|
|
252132
252210
|
async function getTemplateById(templateId) {
|
|
@@ -252191,7 +252269,7 @@ async function createInteractive(options, ctx) {
|
|
|
252191
252269
|
}, ctx);
|
|
252192
252270
|
}
|
|
252193
252271
|
async function createNonInteractive(options, ctx) {
|
|
252194
|
-
ctx.log.info(`Creating a new project at ${
|
|
252272
|
+
ctx.log.info(`Creating a new project at ${resolve3(options.path)}`);
|
|
252195
252273
|
const template2 = await getTemplateById(options.template ?? DEFAULT_TEMPLATE_ID);
|
|
252196
252274
|
return await executeCreate({
|
|
252197
252275
|
template: template2,
|
|
@@ -252212,7 +252290,7 @@ async function executeCreate({
|
|
|
252212
252290
|
isInteractive
|
|
252213
252291
|
}, { log, runTask: runTask2 }) {
|
|
252214
252292
|
const name2 = rawName.trim();
|
|
252215
|
-
const resolvedPath =
|
|
252293
|
+
const resolvedPath = resolve3(projectPath);
|
|
252216
252294
|
const { projectId } = await runTask2("Setting up your project...", async () => {
|
|
252217
252295
|
return await createProjectFiles({
|
|
252218
252296
|
name: name2,
|
|
@@ -252728,7 +252806,7 @@ function getSecretsListCommand() {
|
|
|
252728
252806
|
}
|
|
252729
252807
|
|
|
252730
252808
|
// src/cli/commands/secrets/set.ts
|
|
252731
|
-
import { resolve as
|
|
252809
|
+
import { resolve as resolve4 } from "node:path";
|
|
252732
252810
|
function parseEntries(entries) {
|
|
252733
252811
|
const secrets = {};
|
|
252734
252812
|
for (const entry of entries) {
|
|
@@ -252759,7 +252837,7 @@ async function setSecretsAction({ log, runTask: runTask2 }, entries, options) {
|
|
|
252759
252837
|
validateInput(entries, options);
|
|
252760
252838
|
let secrets;
|
|
252761
252839
|
if (options.envFile) {
|
|
252762
|
-
secrets = await parseEnvFile(
|
|
252840
|
+
secrets = await parseEnvFile(resolve4(options.envFile));
|
|
252763
252841
|
if (Object.keys(secrets).length === 0) {
|
|
252764
252842
|
throw new InvalidInputError("The env file contains no valid KEY=VALUE entries.");
|
|
252765
252843
|
}
|
|
@@ -252788,7 +252866,7 @@ function getSecretsCommand() {
|
|
|
252788
252866
|
}
|
|
252789
252867
|
|
|
252790
252868
|
// src/cli/commands/site/deploy.ts
|
|
252791
|
-
import { resolve as
|
|
252869
|
+
import { resolve as resolve5 } from "node:path";
|
|
252792
252870
|
async function deployAction2({ isNonInteractive, runTask: runTask2 }, options) {
|
|
252793
252871
|
if (isNonInteractive && !options.yes) {
|
|
252794
252872
|
throw new InvalidInputError("--yes is required in non-interactive mode");
|
|
@@ -252803,7 +252881,7 @@ async function deployAction2({ isNonInteractive, runTask: runTask2 }, options) {
|
|
|
252803
252881
|
]
|
|
252804
252882
|
});
|
|
252805
252883
|
}
|
|
252806
|
-
const outputDir =
|
|
252884
|
+
const outputDir = resolve5(project2.root, project2.site.outputDirectory);
|
|
252807
252885
|
if (!options.yes) {
|
|
252808
252886
|
const shouldDeploy = await Re({
|
|
252809
252887
|
message: `Deploy site from ${project2.site.outputDirectory}?`
|
|
@@ -253004,14 +253082,14 @@ var getLocalHosts = () => {
|
|
|
253004
253082
|
}
|
|
253005
253083
|
return results;
|
|
253006
253084
|
};
|
|
253007
|
-
var checkAvailablePort = (options8) => new Promise((
|
|
253085
|
+
var checkAvailablePort = (options8) => new Promise((resolve7, reject) => {
|
|
253008
253086
|
const server = net.createServer();
|
|
253009
253087
|
server.unref();
|
|
253010
253088
|
server.on("error", reject);
|
|
253011
253089
|
server.listen(options8, () => {
|
|
253012
253090
|
const { port } = server.address();
|
|
253013
253091
|
server.close(() => {
|
|
253014
|
-
|
|
253092
|
+
resolve7(port);
|
|
253015
253093
|
});
|
|
253016
253094
|
});
|
|
253017
253095
|
});
|
|
@@ -253150,6 +253228,7 @@ function createDevLogger() {
|
|
|
253150
253228
|
|
|
253151
253229
|
// src/cli/dev/dev-server/function-manager.ts
|
|
253152
253230
|
import { spawn as spawn2 } from "node:child_process";
|
|
253231
|
+
import { pathToFileURL } from "node:url";
|
|
253153
253232
|
var READY_TIMEOUT = 30000;
|
|
253154
253233
|
|
|
253155
253234
|
class FunctionManager {
|
|
@@ -253229,7 +253308,7 @@ class FunctionManager {
|
|
|
253229
253308
|
const process21 = spawn2("deno", ["run", "--allow-all", this.wrapperPath], {
|
|
253230
253309
|
env: {
|
|
253231
253310
|
...globalThis.process.env,
|
|
253232
|
-
FUNCTION_PATH: func.entryPath,
|
|
253311
|
+
FUNCTION_PATH: pathToFileURL(func.entryPath).href,
|
|
253233
253312
|
FUNCTION_PORT: String(port),
|
|
253234
253313
|
FUNCTION_NAME: func.name
|
|
253235
253314
|
},
|
|
@@ -253264,7 +253343,7 @@ class FunctionManager {
|
|
|
253264
253343
|
});
|
|
253265
253344
|
}
|
|
253266
253345
|
waitForReady(name2, runningFunc) {
|
|
253267
|
-
return new Promise((
|
|
253346
|
+
return new Promise((resolve7, reject) => {
|
|
253268
253347
|
runningFunc.process.on("exit", (code2) => {
|
|
253269
253348
|
if (!runningFunc.ready) {
|
|
253270
253349
|
clearTimeout(timeout3);
|
|
@@ -253287,7 +253366,7 @@ class FunctionManager {
|
|
|
253287
253366
|
runningFunc.ready = true;
|
|
253288
253367
|
clearTimeout(timeout3);
|
|
253289
253368
|
runningFunc.process.stdout?.off("data", onData);
|
|
253290
|
-
|
|
253369
|
+
resolve7(runningFunc.port);
|
|
253291
253370
|
}
|
|
253292
253371
|
};
|
|
253293
253372
|
runningFunc.process.stdout?.on("data", onData);
|
|
@@ -253308,9 +253387,13 @@ function createFunctionRouter(manager, logger2) {
|
|
|
253308
253387
|
on: {
|
|
253309
253388
|
proxyReq: (proxyReq, req) => {
|
|
253310
253389
|
const xAppId = req.headers["x-app-id"];
|
|
253390
|
+
const authorization = req.headers.authorization;
|
|
253311
253391
|
if (xAppId) {
|
|
253312
253392
|
proxyReq.setHeader("Base44-App-Id", xAppId);
|
|
253313
253393
|
}
|
|
253394
|
+
if (authorization) {
|
|
253395
|
+
proxyReq.setHeader("Base44-Service-Authorization", authorization);
|
|
253396
|
+
}
|
|
253314
253397
|
proxyReq.setHeader("Base44-Api-Url", `${req.protocol}://${req.headers.host}`);
|
|
253315
253398
|
},
|
|
253316
253399
|
error: (err, _req, res) => {
|
|
@@ -254923,7 +255006,7 @@ class NodeFsHandler {
|
|
|
254923
255006
|
this._addToNodeFs(path19, initialAdd, wh2, depth + 1);
|
|
254924
255007
|
}
|
|
254925
255008
|
}).on(EV.ERROR, this._boundHandleError);
|
|
254926
|
-
return new Promise((
|
|
255009
|
+
return new Promise((resolve8, reject) => {
|
|
254927
255010
|
if (!stream)
|
|
254928
255011
|
return reject();
|
|
254929
255012
|
stream.once(STR_END, () => {
|
|
@@ -254932,7 +255015,7 @@ class NodeFsHandler {
|
|
|
254932
255015
|
return;
|
|
254933
255016
|
}
|
|
254934
255017
|
const wasThrottled = throttler ? throttler.clear() : false;
|
|
254935
|
-
|
|
255018
|
+
resolve8(undefined);
|
|
254936
255019
|
previous.getChildren().filter((item) => {
|
|
254937
255020
|
return item !== directory && !current.has(item);
|
|
254938
255021
|
}).forEach((item) => {
|
|
@@ -255837,7 +255920,7 @@ async function createDevServer(options8) {
|
|
|
255837
255920
|
devLogger.warn(`"${req.originalUrl}" is not supported in local development, passing call to production`);
|
|
255838
255921
|
remoteProxy(req, res, next);
|
|
255839
255922
|
});
|
|
255840
|
-
const server = await new Promise((
|
|
255923
|
+
const server = await new Promise((resolve9, reject) => {
|
|
255841
255924
|
const s5 = app.listen(port, "127.0.0.1", (err) => {
|
|
255842
255925
|
if (err) {
|
|
255843
255926
|
if ("code" in err && err.code === "EADDRINUSE") {
|
|
@@ -255846,7 +255929,7 @@ async function createDevServer(options8) {
|
|
|
255846
255929
|
reject(err);
|
|
255847
255930
|
}
|
|
255848
255931
|
} else {
|
|
255849
|
-
|
|
255932
|
+
resolve9(s5);
|
|
255850
255933
|
}
|
|
255851
255934
|
});
|
|
255852
255935
|
});
|
|
@@ -255961,6 +256044,17 @@ async function runScript(options8) {
|
|
|
255961
256044
|
}
|
|
255962
256045
|
}
|
|
255963
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
|
+
}
|
|
255964
256058
|
async function execAction(isNonInteractive) {
|
|
255965
256059
|
const noInputError = new InvalidInputError("No input provided. Pipe a script to stdin.", {
|
|
255966
256060
|
hints: [
|
|
@@ -255973,7 +256067,7 @@ async function execAction(isNonInteractive) {
|
|
|
255973
256067
|
if (!isNonInteractive) {
|
|
255974
256068
|
throw noInputError;
|
|
255975
256069
|
}
|
|
255976
|
-
const code2 = await
|
|
256070
|
+
const code2 = await readStdin2();
|
|
255977
256071
|
if (!code2.trim()) {
|
|
255978
256072
|
throw noInputError;
|
|
255979
256073
|
}
|
|
@@ -255996,7 +256090,7 @@ Examples:
|
|
|
255996
256090
|
}
|
|
255997
256091
|
|
|
255998
256092
|
// src/cli/commands/project/eject.ts
|
|
255999
|
-
import { resolve as
|
|
256093
|
+
import { resolve as resolve9 } from "node:path";
|
|
256000
256094
|
var import_kebabCase2 = __toESM(require_kebabCase(), 1);
|
|
256001
256095
|
async function eject(ctx, options8) {
|
|
256002
256096
|
const { log, runTask: runTask2, isNonInteractive } = ctx;
|
|
@@ -256052,7 +256146,7 @@ async function eject(ctx, options8) {
|
|
|
256052
256146
|
Ne("Operation cancelled.");
|
|
256053
256147
|
throw new CLIExitError(0);
|
|
256054
256148
|
}
|
|
256055
|
-
const resolvedPath =
|
|
256149
|
+
const resolvedPath = resolve9(selectedPath);
|
|
256056
256150
|
await runTask2("Downloading your project's code...", async (updateMessage) => {
|
|
256057
256151
|
await createProjectFilesForExistingProject({
|
|
256058
256152
|
projectId,
|
|
@@ -258420,14 +258514,14 @@ async function addSourceContext(frames) {
|
|
|
258420
258514
|
return frames;
|
|
258421
258515
|
}
|
|
258422
258516
|
function getContextLinesFromFile(path19, ranges, output) {
|
|
258423
|
-
return new Promise((
|
|
258517
|
+
return new Promise((resolve10) => {
|
|
258424
258518
|
const stream = createReadStream2(path19);
|
|
258425
258519
|
const lineReaded = createInterface2({
|
|
258426
258520
|
input: stream
|
|
258427
258521
|
});
|
|
258428
258522
|
function destroyStreamAndResolve() {
|
|
258429
258523
|
stream.destroy();
|
|
258430
|
-
|
|
258524
|
+
resolve10();
|
|
258431
258525
|
}
|
|
258432
258526
|
let lineNumber = 0;
|
|
258433
258527
|
let currentRangeIndex = 0;
|
|
@@ -259539,15 +259633,15 @@ class PostHogBackendClient extends PostHogCoreStateless {
|
|
|
259539
259633
|
return true;
|
|
259540
259634
|
if (this.featureFlagsPoller === undefined)
|
|
259541
259635
|
return false;
|
|
259542
|
-
return new Promise((
|
|
259636
|
+
return new Promise((resolve10) => {
|
|
259543
259637
|
const timeout3 = setTimeout(() => {
|
|
259544
259638
|
cleanup();
|
|
259545
|
-
|
|
259639
|
+
resolve10(false);
|
|
259546
259640
|
}, timeoutMs);
|
|
259547
259641
|
const cleanup = this._events.on("localEvaluationFlagsLoaded", (count2) => {
|
|
259548
259642
|
clearTimeout(timeout3);
|
|
259549
259643
|
cleanup();
|
|
259550
|
-
|
|
259644
|
+
resolve10(count2 > 0);
|
|
259551
259645
|
});
|
|
259552
259646
|
});
|
|
259553
259647
|
}
|
|
@@ -260370,4 +260464,4 @@ export {
|
|
|
260370
260464
|
CLIExitError
|
|
260371
260465
|
};
|
|
260372
260466
|
|
|
260373
|
-
//# debugId=
|
|
260467
|
+
//# debugId=E5716DE2F2BFF5D364756E2164756E21
|