@hot-updater/plugin-core 0.16.4 → 0.16.6

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/index.cjs CHANGED
@@ -8919,6 +8919,545 @@ var __webpack_modules__ = {
8919
8919
  return new RegExp(pattern, onlyFirst ? void 0 : 'g');
8920
8920
  };
8921
8921
  },
8922
+ "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
8923
+ "use strict";
8924
+ const stringify = __webpack_require__("../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.js");
8925
+ const compile = __webpack_require__("../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.js");
8926
+ const expand = __webpack_require__("../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.js");
8927
+ const parse = __webpack_require__("../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.js");
8928
+ const braces = (input, options = {})=>{
8929
+ let output = [];
8930
+ if (Array.isArray(input)) for (let pattern of input){
8931
+ let result = braces.create(pattern, options);
8932
+ if (Array.isArray(result)) output.push(...result);
8933
+ else output.push(result);
8934
+ }
8935
+ else output = [].concat(braces.create(input, options));
8936
+ if (options && true === options.expand && true === options.nodupes) output = [
8937
+ ...new Set(output)
8938
+ ];
8939
+ return output;
8940
+ };
8941
+ braces.parse = (input, options = {})=>parse(input, options);
8942
+ braces.stringify = (input, options = {})=>{
8943
+ if ('string' == typeof input) return stringify(braces.parse(input, options), options);
8944
+ return stringify(input, options);
8945
+ };
8946
+ braces.compile = (input, options = {})=>{
8947
+ if ('string' == typeof input) input = braces.parse(input, options);
8948
+ return compile(input, options);
8949
+ };
8950
+ braces.expand = (input, options = {})=>{
8951
+ if ('string' == typeof input) input = braces.parse(input, options);
8952
+ let result = expand(input, options);
8953
+ if (true === options.noempty) result = result.filter(Boolean);
8954
+ if (true === options.nodupes) result = [
8955
+ ...new Set(result)
8956
+ ];
8957
+ return result;
8958
+ };
8959
+ braces.create = (input, options = {})=>{
8960
+ if ('' === input || input.length < 3) return [
8961
+ input
8962
+ ];
8963
+ return true !== options.expand ? braces.compile(input, options) : braces.expand(input, options);
8964
+ };
8965
+ module.exports = braces;
8966
+ },
8967
+ "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/compile.js": function(module, __unused_webpack_exports, __webpack_require__) {
8968
+ "use strict";
8969
+ const fill = __webpack_require__("../../node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.js");
8970
+ const utils = __webpack_require__("../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.js");
8971
+ const compile = (ast, options = {})=>{
8972
+ let walk = (node, parent = {})=>{
8973
+ let invalidBlock = utils.isInvalidBrace(parent);
8974
+ let invalidNode = true === node.invalid && true === options.escapeInvalid;
8975
+ let invalid = true === invalidBlock || true === invalidNode;
8976
+ let prefix = true === options.escapeInvalid ? '\\' : '';
8977
+ let output = '';
8978
+ if (true === node.isOpen) return prefix + node.value;
8979
+ if (true === node.isClose) return prefix + node.value;
8980
+ if ('open' === node.type) return invalid ? prefix + node.value : '(';
8981
+ if ('close' === node.type) return invalid ? prefix + node.value : ')';
8982
+ if ('comma' === node.type) return 'comma' === node.prev.type ? '' : invalid ? node.value : '|';
8983
+ if (node.value) return node.value;
8984
+ if (node.nodes && node.ranges > 0) {
8985
+ let args = utils.reduce(node.nodes);
8986
+ let range = fill(...args, {
8987
+ ...options,
8988
+ wrap: false,
8989
+ toRegex: true
8990
+ });
8991
+ if (0 !== range.length) return args.length > 1 && range.length > 1 ? `(${range})` : range;
8992
+ }
8993
+ if (node.nodes) for (let child of node.nodes)output += walk(child, node);
8994
+ return output;
8995
+ };
8996
+ return walk(ast);
8997
+ };
8998
+ module.exports = compile;
8999
+ },
9000
+ "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.js": function(module) {
9001
+ "use strict";
9002
+ module.exports = {
9003
+ MAX_LENGTH: 65536,
9004
+ CHAR_0: '0',
9005
+ CHAR_9: '9',
9006
+ CHAR_UPPERCASE_A: 'A',
9007
+ CHAR_LOWERCASE_A: 'a',
9008
+ CHAR_UPPERCASE_Z: 'Z',
9009
+ CHAR_LOWERCASE_Z: 'z',
9010
+ CHAR_LEFT_PARENTHESES: '(',
9011
+ CHAR_RIGHT_PARENTHESES: ')',
9012
+ CHAR_ASTERISK: '*',
9013
+ CHAR_AMPERSAND: '&',
9014
+ CHAR_AT: '@',
9015
+ CHAR_BACKSLASH: '\\',
9016
+ CHAR_BACKTICK: '`',
9017
+ CHAR_CARRIAGE_RETURN: '\r',
9018
+ CHAR_CIRCUMFLEX_ACCENT: '^',
9019
+ CHAR_COLON: ':',
9020
+ CHAR_COMMA: ',',
9021
+ CHAR_DOLLAR: '$',
9022
+ CHAR_DOT: '.',
9023
+ CHAR_DOUBLE_QUOTE: '"',
9024
+ CHAR_EQUAL: '=',
9025
+ CHAR_EXCLAMATION_MARK: '!',
9026
+ CHAR_FORM_FEED: '\f',
9027
+ CHAR_FORWARD_SLASH: '/',
9028
+ CHAR_HASH: '#',
9029
+ CHAR_HYPHEN_MINUS: '-',
9030
+ CHAR_LEFT_ANGLE_BRACKET: '<',
9031
+ CHAR_LEFT_CURLY_BRACE: '{',
9032
+ CHAR_LEFT_SQUARE_BRACKET: '[',
9033
+ CHAR_LINE_FEED: '\n',
9034
+ CHAR_NO_BREAK_SPACE: '\u00A0',
9035
+ CHAR_PERCENT: '%',
9036
+ CHAR_PLUS: '+',
9037
+ CHAR_QUESTION_MARK: '?',
9038
+ CHAR_RIGHT_ANGLE_BRACKET: '>',
9039
+ CHAR_RIGHT_CURLY_BRACE: '}',
9040
+ CHAR_RIGHT_SQUARE_BRACKET: ']',
9041
+ CHAR_SEMICOLON: ';',
9042
+ CHAR_SINGLE_QUOTE: '\'',
9043
+ CHAR_SPACE: ' ',
9044
+ CHAR_TAB: '\t',
9045
+ CHAR_UNDERSCORE: '_',
9046
+ CHAR_VERTICAL_LINE: '|',
9047
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF'
9048
+ };
9049
+ },
9050
+ "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.js": function(module, __unused_webpack_exports, __webpack_require__) {
9051
+ "use strict";
9052
+ const fill = __webpack_require__("../../node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.js");
9053
+ const stringify = __webpack_require__("../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.js");
9054
+ const utils = __webpack_require__("../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.js");
9055
+ const append = (queue = '', stash = '', enclose = false)=>{
9056
+ let result = [];
9057
+ queue = [].concat(queue);
9058
+ stash = [].concat(stash);
9059
+ if (!stash.length) return queue;
9060
+ if (!queue.length) return enclose ? utils.flatten(stash).map((ele)=>`{${ele}}`) : stash;
9061
+ for (let item of queue)if (Array.isArray(item)) for (let value1 of item)result.push(append(value1, stash, enclose));
9062
+ else for (let ele of stash){
9063
+ if (true === enclose && 'string' == typeof ele) ele = `{${ele}}`;
9064
+ result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
9065
+ }
9066
+ return utils.flatten(result);
9067
+ };
9068
+ const expand = (ast, options = {})=>{
9069
+ let rangeLimit = void 0 === options.rangeLimit ? 1000 : options.rangeLimit;
9070
+ let walk = (node, parent = {})=>{
9071
+ node.queue = [];
9072
+ let p = parent;
9073
+ let q = parent.queue;
9074
+ while('brace' !== p.type && 'root' !== p.type && p.parent){
9075
+ p = p.parent;
9076
+ q = p.queue;
9077
+ }
9078
+ if (node.invalid || node.dollar) return void q.push(append(q.pop(), stringify(node, options)));
9079
+ if ('brace' === node.type && true !== node.invalid && 2 === node.nodes.length) return void q.push(append(q.pop(), [
9080
+ '{}'
9081
+ ]));
9082
+ if (node.nodes && node.ranges > 0) {
9083
+ let args = utils.reduce(node.nodes);
9084
+ if (utils.exceedsLimit(...args, options.step, rangeLimit)) throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
9085
+ let range = fill(...args, options);
9086
+ if (0 === range.length) range = stringify(node, options);
9087
+ q.push(append(q.pop(), range));
9088
+ node.nodes = [];
9089
+ return;
9090
+ }
9091
+ let enclose = utils.encloseBrace(node);
9092
+ let queue = node.queue;
9093
+ let block = node;
9094
+ while('brace' !== block.type && 'root' !== block.type && block.parent){
9095
+ block = block.parent;
9096
+ queue = block.queue;
9097
+ }
9098
+ for(let i = 0; i < node.nodes.length; i++){
9099
+ let child = node.nodes[i];
9100
+ if ('comma' === child.type && 'brace' === node.type) {
9101
+ if (1 === i) queue.push('');
9102
+ queue.push('');
9103
+ continue;
9104
+ }
9105
+ if ('close' === child.type) {
9106
+ q.push(append(q.pop(), queue, enclose));
9107
+ continue;
9108
+ }
9109
+ if (child.value && 'open' !== child.type) {
9110
+ queue.push(append(queue.pop(), child.value));
9111
+ continue;
9112
+ }
9113
+ if (child.nodes) walk(child, node);
9114
+ }
9115
+ return queue;
9116
+ };
9117
+ return utils.flatten(walk(ast));
9118
+ };
9119
+ module.exports = expand;
9120
+ },
9121
+ "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.js": function(module, __unused_webpack_exports, __webpack_require__) {
9122
+ "use strict";
9123
+ const stringify = __webpack_require__("../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.js");
9124
+ const { MAX_LENGTH, CHAR_BACKSLASH, CHAR_BACKTICK, CHAR_COMMA, CHAR_DOT, CHAR_LEFT_PARENTHESES, CHAR_RIGHT_PARENTHESES, CHAR_LEFT_CURLY_BRACE, CHAR_RIGHT_CURLY_BRACE, CHAR_LEFT_SQUARE_BRACKET, CHAR_RIGHT_SQUARE_BRACKET, CHAR_DOUBLE_QUOTE, CHAR_SINGLE_QUOTE, CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE } = __webpack_require__("../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/constants.js");
9125
+ const parse = (input, options = {})=>{
9126
+ if ('string' != typeof input) throw new TypeError('Expected a string');
9127
+ let opts = options || {};
9128
+ let max = 'number' == typeof opts.maxLength ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
9129
+ if (input.length > max) throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
9130
+ let ast = {
9131
+ type: 'root',
9132
+ input,
9133
+ nodes: []
9134
+ };
9135
+ let stack = [
9136
+ ast
9137
+ ];
9138
+ let block = ast;
9139
+ let prev = ast;
9140
+ let brackets = 0;
9141
+ let length = input.length;
9142
+ let index = 0;
9143
+ let depth = 0;
9144
+ let value1;
9145
+ const advance = ()=>input[index++];
9146
+ const push = (node)=>{
9147
+ if ('text' === node.type && 'dot' === prev.type) prev.type = 'text';
9148
+ if (prev && 'text' === prev.type && 'text' === node.type) {
9149
+ prev.value += node.value;
9150
+ return;
9151
+ }
9152
+ block.nodes.push(node);
9153
+ node.parent = block;
9154
+ node.prev = prev;
9155
+ prev = node;
9156
+ return node;
9157
+ };
9158
+ push({
9159
+ type: 'bos'
9160
+ });
9161
+ while(index < length){
9162
+ block = stack[stack.length - 1];
9163
+ value1 = advance();
9164
+ if (value1 === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value1 === CHAR_NO_BREAK_SPACE) continue;
9165
+ if (value1 === CHAR_BACKSLASH) {
9166
+ push({
9167
+ type: 'text',
9168
+ value: (options.keepEscaping ? value1 : '') + advance()
9169
+ });
9170
+ continue;
9171
+ }
9172
+ if (value1 === CHAR_RIGHT_SQUARE_BRACKET) {
9173
+ push({
9174
+ type: 'text',
9175
+ value: '\\' + value1
9176
+ });
9177
+ continue;
9178
+ }
9179
+ if (value1 === CHAR_LEFT_SQUARE_BRACKET) {
9180
+ brackets++;
9181
+ let next;
9182
+ while(index < length && (next = advance())){
9183
+ value1 += next;
9184
+ if (next === CHAR_LEFT_SQUARE_BRACKET) {
9185
+ brackets++;
9186
+ continue;
9187
+ }
9188
+ if (next === CHAR_BACKSLASH) {
9189
+ value1 += advance();
9190
+ continue;
9191
+ }
9192
+ if (next === CHAR_RIGHT_SQUARE_BRACKET) {
9193
+ brackets--;
9194
+ if (0 === brackets) break;
9195
+ }
9196
+ }
9197
+ push({
9198
+ type: 'text',
9199
+ value: value1
9200
+ });
9201
+ continue;
9202
+ }
9203
+ if (value1 === CHAR_LEFT_PARENTHESES) {
9204
+ block = push({
9205
+ type: 'paren',
9206
+ nodes: []
9207
+ });
9208
+ stack.push(block);
9209
+ push({
9210
+ type: 'text',
9211
+ value: value1
9212
+ });
9213
+ continue;
9214
+ }
9215
+ if (value1 === CHAR_RIGHT_PARENTHESES) {
9216
+ if ('paren' !== block.type) {
9217
+ push({
9218
+ type: 'text',
9219
+ value: value1
9220
+ });
9221
+ continue;
9222
+ }
9223
+ block = stack.pop();
9224
+ push({
9225
+ type: 'text',
9226
+ value: value1
9227
+ });
9228
+ block = stack[stack.length - 1];
9229
+ continue;
9230
+ }
9231
+ if (value1 === CHAR_DOUBLE_QUOTE || value1 === CHAR_SINGLE_QUOTE || value1 === CHAR_BACKTICK) {
9232
+ let open = value1;
9233
+ let next;
9234
+ if (true !== options.keepQuotes) value1 = '';
9235
+ while(index < length && (next = advance())){
9236
+ if (next === CHAR_BACKSLASH) {
9237
+ value1 += next + advance();
9238
+ continue;
9239
+ }
9240
+ if (next === open) {
9241
+ if (true === options.keepQuotes) value1 += next;
9242
+ break;
9243
+ }
9244
+ value1 += next;
9245
+ }
9246
+ push({
9247
+ type: 'text',
9248
+ value: value1
9249
+ });
9250
+ continue;
9251
+ }
9252
+ if (value1 === CHAR_LEFT_CURLY_BRACE) {
9253
+ depth++;
9254
+ let dollar = prev.value && '$' === prev.value.slice(-1) || true === block.dollar;
9255
+ let brace = {
9256
+ type: 'brace',
9257
+ open: true,
9258
+ close: false,
9259
+ dollar,
9260
+ depth,
9261
+ commas: 0,
9262
+ ranges: 0,
9263
+ nodes: []
9264
+ };
9265
+ block = push(brace);
9266
+ stack.push(block);
9267
+ push({
9268
+ type: 'open',
9269
+ value: value1
9270
+ });
9271
+ continue;
9272
+ }
9273
+ if (value1 === CHAR_RIGHT_CURLY_BRACE) {
9274
+ if ('brace' !== block.type) {
9275
+ push({
9276
+ type: 'text',
9277
+ value: value1
9278
+ });
9279
+ continue;
9280
+ }
9281
+ let type = 'close';
9282
+ block = stack.pop();
9283
+ block.close = true;
9284
+ push({
9285
+ type,
9286
+ value: value1
9287
+ });
9288
+ depth--;
9289
+ block = stack[stack.length - 1];
9290
+ continue;
9291
+ }
9292
+ if (value1 === CHAR_COMMA && depth > 0) {
9293
+ if (block.ranges > 0) {
9294
+ block.ranges = 0;
9295
+ let open = block.nodes.shift();
9296
+ block.nodes = [
9297
+ open,
9298
+ {
9299
+ type: 'text',
9300
+ value: stringify(block)
9301
+ }
9302
+ ];
9303
+ }
9304
+ push({
9305
+ type: 'comma',
9306
+ value: value1
9307
+ });
9308
+ block.commas++;
9309
+ continue;
9310
+ }
9311
+ if (value1 === CHAR_DOT && depth > 0 && 0 === block.commas) {
9312
+ let siblings = block.nodes;
9313
+ if (0 === depth || 0 === siblings.length) {
9314
+ push({
9315
+ type: 'text',
9316
+ value: value1
9317
+ });
9318
+ continue;
9319
+ }
9320
+ if ('dot' === prev.type) {
9321
+ block.range = [];
9322
+ prev.value += value1;
9323
+ prev.type = 'range';
9324
+ if (3 !== block.nodes.length && 5 !== block.nodes.length) {
9325
+ block.invalid = true;
9326
+ block.ranges = 0;
9327
+ prev.type = 'text';
9328
+ continue;
9329
+ }
9330
+ block.ranges++;
9331
+ block.args = [];
9332
+ continue;
9333
+ }
9334
+ if ('range' === prev.type) {
9335
+ siblings.pop();
9336
+ let before = siblings[siblings.length - 1];
9337
+ before.value += prev.value + value1;
9338
+ prev = before;
9339
+ block.ranges--;
9340
+ continue;
9341
+ }
9342
+ push({
9343
+ type: 'dot',
9344
+ value: value1
9345
+ });
9346
+ continue;
9347
+ }
9348
+ push({
9349
+ type: 'text',
9350
+ value: value1
9351
+ });
9352
+ }
9353
+ do {
9354
+ block = stack.pop();
9355
+ if ('root' !== block.type) {
9356
+ block.nodes.forEach((node)=>{
9357
+ if (!node.nodes) {
9358
+ if ('open' === node.type) node.isOpen = true;
9359
+ if ('close' === node.type) node.isClose = true;
9360
+ if (!node.nodes) node.type = 'text';
9361
+ node.invalid = true;
9362
+ }
9363
+ });
9364
+ let parent = stack[stack.length - 1];
9365
+ let index = parent.nodes.indexOf(block);
9366
+ parent.nodes.splice(index, 1, ...block.nodes);
9367
+ }
9368
+ }while (stack.length > 0);
9369
+ push({
9370
+ type: 'eos'
9371
+ });
9372
+ return ast;
9373
+ };
9374
+ module.exports = parse;
9375
+ },
9376
+ "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/stringify.js": function(module, __unused_webpack_exports, __webpack_require__) {
9377
+ "use strict";
9378
+ const utils = __webpack_require__("../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.js");
9379
+ module.exports = (ast, options = {})=>{
9380
+ let stringify = (node, parent = {})=>{
9381
+ let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
9382
+ let invalidNode = true === node.invalid && true === options.escapeInvalid;
9383
+ let output = '';
9384
+ if (node.value) {
9385
+ if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) return '\\' + node.value;
9386
+ return node.value;
9387
+ }
9388
+ if (node.value) return node.value;
9389
+ if (node.nodes) for (let child of node.nodes)output += stringify(child);
9390
+ return output;
9391
+ };
9392
+ return stringify(ast);
9393
+ };
9394
+ },
9395
+ "../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.js": function(__unused_webpack_module, exports1) {
9396
+ "use strict";
9397
+ exports1.isInteger = (num)=>{
9398
+ if ('number' == typeof num) return Number.isInteger(num);
9399
+ if ('string' == typeof num && '' !== num.trim()) return Number.isInteger(Number(num));
9400
+ return false;
9401
+ };
9402
+ exports1.find = (node, type)=>node.nodes.find((node)=>node.type === type);
9403
+ exports1.exceedsLimit = (min, max, step = 1, limit)=>{
9404
+ if (false === limit) return false;
9405
+ if (!exports1.isInteger(min) || !exports1.isInteger(max)) return false;
9406
+ return (Number(max) - Number(min)) / Number(step) >= limit;
9407
+ };
9408
+ exports1.escapeNode = (block, n = 0, type)=>{
9409
+ let node = block.nodes[n];
9410
+ if (!node) return;
9411
+ if (type && node.type === type || 'open' === node.type || 'close' === node.type) {
9412
+ if (true !== node.escaped) {
9413
+ node.value = '\\' + node.value;
9414
+ node.escaped = true;
9415
+ }
9416
+ }
9417
+ };
9418
+ exports1.encloseBrace = (node)=>{
9419
+ if ('brace' !== node.type) return false;
9420
+ if (node.commas >> 0 + node.ranges >> 0 === 0) {
9421
+ node.invalid = true;
9422
+ return true;
9423
+ }
9424
+ return false;
9425
+ };
9426
+ exports1.isInvalidBrace = (block)=>{
9427
+ if ('brace' !== block.type) return false;
9428
+ if (true === block.invalid || block.dollar) return true;
9429
+ if (block.commas >> 0 + block.ranges >> 0 === 0) {
9430
+ block.invalid = true;
9431
+ return true;
9432
+ }
9433
+ if (true !== block.open || true !== block.close) {
9434
+ block.invalid = true;
9435
+ return true;
9436
+ }
9437
+ return false;
9438
+ };
9439
+ exports1.isOpenOrClose = (node)=>{
9440
+ if ('open' === node.type || 'close' === node.type) return true;
9441
+ return true === node.open || true === node.close;
9442
+ };
9443
+ exports1.reduce = (nodes)=>nodes.reduce((acc, node)=>{
9444
+ if ('text' === node.type) acc.push(node.value);
9445
+ if ('range' === node.type) node.type = 'text';
9446
+ return acc;
9447
+ }, []);
9448
+ exports1.flatten = (...args)=>{
9449
+ const result = [];
9450
+ const flat = (arr)=>{
9451
+ for(let i = 0; i < arr.length; i++){
9452
+ let ele = arr[i];
9453
+ Array.isArray(ele) ? flat(ele, result) : void 0 !== ele && result.push(ele);
9454
+ }
9455
+ return result;
9456
+ };
9457
+ flat(args);
9458
+ return result;
9459
+ };
9460
+ },
8922
9461
  "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
8923
9462
  "use strict";
8924
9463
  const stringify = __webpack_require__("../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js");
@@ -10852,7 +11391,7 @@ var __webpack_modules__ = {
10852
11391
  exports1.removeDuplicateSlashes = exports1.matchAny = exports1.convertPatternsToRe = exports1.makeRe = exports1.getPatternParts = exports1.expandBraceExpansion = exports1.expandPatternsWithBraceExpansion = exports1.isAffectDepthOfReadingPattern = exports1.endsWithSlashGlobStar = exports1.hasGlobStar = exports1.getBaseDirectory = exports1.isPatternRelatedToParentDirectory = exports1.getPatternsOutsideCurrentDirectory = exports1.getPatternsInsideCurrentDirectory = exports1.getPositivePatterns = exports1.getNegativePatterns = exports1.isPositivePattern = exports1.isNegativePattern = exports1.convertToNegativePattern = exports1.convertToPositivePattern = exports1.isDynamicPattern = exports1.isStaticPattern = void 0;
10853
11392
  const path = __webpack_require__("path");
10854
11393
  const globParent = __webpack_require__("../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js");
10855
- const micromatch = __webpack_require__("../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js");
11394
+ const micromatch = __webpack_require__("../../node_modules/.pnpm/micromatch@4.0.5/node_modules/micromatch/index.js");
10856
11395
  const GLOBSTAR = '**';
10857
11396
  const ESCAPE_SYMBOL = '\\';
10858
11397
  const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
@@ -11229,6 +11768,178 @@ var __webpack_modules__ = {
11229
11768
  module.exports = fastqueue;
11230
11769
  module.exports.promise = queueAsPromised;
11231
11770
  },
11771
+ "../../node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
11772
+ "use strict";
11773
+ /*!
11774
+ * fill-range <https://github.com/jonschlinkert/fill-range>
11775
+ *
11776
+ * Copyright (c) 2014-present, Jon Schlinkert.
11777
+ * Licensed under the MIT License.
11778
+ */ const util = __webpack_require__("util");
11779
+ const toRegexRange = __webpack_require__("../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js");
11780
+ const isObject = (val)=>null !== val && 'object' == typeof val && !Array.isArray(val);
11781
+ const transform = (toNumber)=>(value1)=>true === toNumber ? Number(value1) : String(value1);
11782
+ const isValidValue = (value1)=>'number' == typeof value1 || 'string' == typeof value1 && '' !== value1;
11783
+ const isNumber = (num)=>Number.isInteger(+num);
11784
+ const zeros = (input)=>{
11785
+ let value1 = `${input}`;
11786
+ let index = -1;
11787
+ if ('-' === value1[0]) value1 = value1.slice(1);
11788
+ if ('0' === value1) return false;
11789
+ while('0' === value1[++index]);
11790
+ return index > 0;
11791
+ };
11792
+ const stringify = (start, end, options)=>{
11793
+ if ('string' == typeof start || 'string' == typeof end) return true;
11794
+ return true === options.stringify;
11795
+ };
11796
+ const pad = (input, maxLength, toNumber)=>{
11797
+ if (maxLength > 0) {
11798
+ let dash = '-' === input[0] ? '-' : '';
11799
+ if (dash) input = input.slice(1);
11800
+ input = dash + input.padStart(dash ? maxLength - 1 : maxLength, '0');
11801
+ }
11802
+ if (false === toNumber) return String(input);
11803
+ return input;
11804
+ };
11805
+ const toMaxLen = (input, maxLength)=>{
11806
+ let negative = '-' === input[0] ? '-' : '';
11807
+ if (negative) {
11808
+ input = input.slice(1);
11809
+ maxLength--;
11810
+ }
11811
+ while(input.length < maxLength)input = '0' + input;
11812
+ return negative ? '-' + input : input;
11813
+ };
11814
+ const toSequence = (parts, options)=>{
11815
+ parts.negatives.sort((a, b)=>a < b ? -1 : a > b ? 1 : 0);
11816
+ parts.positives.sort((a, b)=>a < b ? -1 : a > b ? 1 : 0);
11817
+ let prefix = options.capture ? '' : '?:';
11818
+ let positives = '';
11819
+ let negatives = '';
11820
+ let result;
11821
+ if (parts.positives.length) positives = parts.positives.join('|');
11822
+ if (parts.negatives.length) negatives = `-(${prefix}${parts.negatives.join('|')})`;
11823
+ result = positives && negatives ? `${positives}|${negatives}` : positives || negatives;
11824
+ if (options.wrap) return `(${prefix}${result})`;
11825
+ return result;
11826
+ };
11827
+ const toRange = (a, b, isNumbers, options)=>{
11828
+ if (isNumbers) return toRegexRange(a, b, {
11829
+ wrap: false,
11830
+ ...options
11831
+ });
11832
+ let start = String.fromCharCode(a);
11833
+ if (a === b) return start;
11834
+ let stop = String.fromCharCode(b);
11835
+ return `[${start}-${stop}]`;
11836
+ };
11837
+ const toRegex = (start, end, options)=>{
11838
+ if (Array.isArray(start)) {
11839
+ let wrap = true === options.wrap;
11840
+ let prefix = options.capture ? '' : '?:';
11841
+ return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
11842
+ }
11843
+ return toRegexRange(start, end, options);
11844
+ };
11845
+ const rangeError = (...args)=>new RangeError('Invalid range arguments: ' + util.inspect(...args));
11846
+ const invalidRange = (start, end, options)=>{
11847
+ if (true === options.strictRanges) throw rangeError([
11848
+ start,
11849
+ end
11850
+ ]);
11851
+ return [];
11852
+ };
11853
+ const invalidStep = (step, options)=>{
11854
+ if (true === options.strictRanges) throw new TypeError(`Expected step "${step}" to be a number`);
11855
+ return [];
11856
+ };
11857
+ const fillNumbers = (start, end, step = 1, options = {})=>{
11858
+ let a = Number(start);
11859
+ let b = Number(end);
11860
+ if (!Number.isInteger(a) || !Number.isInteger(b)) {
11861
+ if (true === options.strictRanges) throw rangeError([
11862
+ start,
11863
+ end
11864
+ ]);
11865
+ return [];
11866
+ }
11867
+ if (0 === a) a = 0;
11868
+ if (0 === b) b = 0;
11869
+ let descending = a > b;
11870
+ let startString = String(start);
11871
+ let endString = String(end);
11872
+ let stepString = String(step);
11873
+ step = Math.max(Math.abs(step), 1);
11874
+ let padded = zeros(startString) || zeros(endString) || zeros(stepString);
11875
+ let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
11876
+ let toNumber = false === padded && false === stringify(start, end, options);
11877
+ let format = options.transform || transform(toNumber);
11878
+ if (options.toRegex && 1 === step) return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
11879
+ let parts = {
11880
+ negatives: [],
11881
+ positives: []
11882
+ };
11883
+ let push = (num)=>parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));
11884
+ let range = [];
11885
+ let index = 0;
11886
+ while(descending ? a >= b : a <= b){
11887
+ if (true === options.toRegex && step > 1) push(a);
11888
+ else range.push(pad(format(a, index), maxLen, toNumber));
11889
+ a = descending ? a - step : a + step;
11890
+ index++;
11891
+ }
11892
+ if (true === options.toRegex) return step > 1 ? toSequence(parts, options) : toRegex(range, null, {
11893
+ wrap: false,
11894
+ ...options
11895
+ });
11896
+ return range;
11897
+ };
11898
+ const fillLetters = (start, end, step = 1, options = {})=>{
11899
+ if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) return invalidRange(start, end, options);
11900
+ let format = options.transform || ((val)=>String.fromCharCode(val));
11901
+ let a = `${start}`.charCodeAt(0);
11902
+ let b = `${end}`.charCodeAt(0);
11903
+ let descending = a > b;
11904
+ let min = Math.min(a, b);
11905
+ let max = Math.max(a, b);
11906
+ if (options.toRegex && 1 === step) return toRange(min, max, false, options);
11907
+ let range = [];
11908
+ let index = 0;
11909
+ while(descending ? a >= b : a <= b){
11910
+ range.push(format(a, index));
11911
+ a = descending ? a - step : a + step;
11912
+ index++;
11913
+ }
11914
+ if (true === options.toRegex) return toRegex(range, null, {
11915
+ wrap: false,
11916
+ options
11917
+ });
11918
+ return range;
11919
+ };
11920
+ const fill = (start, end, step, options = {})=>{
11921
+ if (null == end && isValidValue(start)) return [
11922
+ start
11923
+ ];
11924
+ if (!isValidValue(start) || !isValidValue(end)) return invalidRange(start, end, options);
11925
+ if ('function' == typeof step) return fill(start, end, 1, {
11926
+ transform: step
11927
+ });
11928
+ if (isObject(step)) return fill(start, end, 0, step);
11929
+ let opts = {
11930
+ ...options
11931
+ };
11932
+ if (true === opts.capture) opts.wrap = true;
11933
+ step = step || opts.step || 1;
11934
+ if (!isNumber(step)) {
11935
+ if (null != step && !isObject(step)) return invalidStep(step, opts);
11936
+ return fill(start, end, 1, step);
11937
+ }
11938
+ if (isNumber(start) && isNumber(end)) return fillNumbers(start, end, step, opts);
11939
+ return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
11940
+ };
11941
+ module.exports = fill;
11942
+ },
11232
11943
  "../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
11233
11944
  "use strict";
11234
11945
  /*!
@@ -17752,6 +18463,145 @@ var __webpack_modules__ = {
17752
18463
  return streams;
17753
18464
  }
17754
18465
  },
18466
+ "../../node_modules/.pnpm/micromatch@4.0.5/node_modules/micromatch/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
18467
+ "use strict";
18468
+ const util = __webpack_require__("util");
18469
+ const braces = __webpack_require__("../../node_modules/.pnpm/braces@3.0.2/node_modules/braces/index.js");
18470
+ const picomatch = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js");
18471
+ const utils = __webpack_require__("../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js");
18472
+ const isEmptyString = (val)=>'' === val || './' === val;
18473
+ const micromatch = (list, patterns, options)=>{
18474
+ patterns = [].concat(patterns);
18475
+ list = [].concat(list);
18476
+ let omit = new Set();
18477
+ let keep = new Set();
18478
+ let items = new Set();
18479
+ let negatives = 0;
18480
+ let onResult = (state)=>{
18481
+ items.add(state.output);
18482
+ if (options && options.onResult) options.onResult(state);
18483
+ };
18484
+ for(let i = 0; i < patterns.length; i++){
18485
+ let isMatch = picomatch(String(patterns[i]), {
18486
+ ...options,
18487
+ onResult
18488
+ }, true);
18489
+ let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
18490
+ if (negated) negatives++;
18491
+ for (let item of list){
18492
+ let matched = isMatch(item, true);
18493
+ let match = negated ? !matched.isMatch : matched.isMatch;
18494
+ if (match) if (negated) omit.add(matched.output);
18495
+ else {
18496
+ omit.delete(matched.output);
18497
+ keep.add(matched.output);
18498
+ }
18499
+ }
18500
+ }
18501
+ let result = negatives === patterns.length ? [
18502
+ ...items
18503
+ ] : [
18504
+ ...keep
18505
+ ];
18506
+ let matches = result.filter((item)=>!omit.has(item));
18507
+ if (options && 0 === matches.length) {
18508
+ if (true === options.failglob) throw new Error(`No matches found for "${patterns.join(', ')}"`);
18509
+ if (true === options.nonull || true === options.nullglob) return options.unescape ? patterns.map((p)=>p.replace(/\\/g, '')) : patterns;
18510
+ }
18511
+ return matches;
18512
+ };
18513
+ micromatch.match = micromatch;
18514
+ micromatch.matcher = (pattern, options)=>picomatch(pattern, options);
18515
+ micromatch.isMatch = (str, patterns, options)=>picomatch(patterns, options)(str);
18516
+ micromatch.any = micromatch.isMatch;
18517
+ micromatch.not = (list, patterns, options = {})=>{
18518
+ patterns = [].concat(patterns).map(String);
18519
+ let result = new Set();
18520
+ let items = [];
18521
+ let onResult = (state)=>{
18522
+ if (options.onResult) options.onResult(state);
18523
+ items.push(state.output);
18524
+ };
18525
+ let matches = new Set(micromatch(list, patterns, {
18526
+ ...options,
18527
+ onResult
18528
+ }));
18529
+ for (let item of items)if (!matches.has(item)) result.add(item);
18530
+ return [
18531
+ ...result
18532
+ ];
18533
+ };
18534
+ micromatch.contains = (str, pattern, options)=>{
18535
+ if ('string' != typeof str) throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
18536
+ if (Array.isArray(pattern)) return pattern.some((p)=>micromatch.contains(str, p, options));
18537
+ if ('string' == typeof pattern) {
18538
+ if (isEmptyString(str) || isEmptyString(pattern)) return false;
18539
+ if (str.includes(pattern) || str.startsWith('./') && str.slice(2).includes(pattern)) return true;
18540
+ }
18541
+ return micromatch.isMatch(str, pattern, {
18542
+ ...options,
18543
+ contains: true
18544
+ });
18545
+ };
18546
+ micromatch.matchKeys = (obj, patterns, options)=>{
18547
+ if (!utils.isObject(obj)) throw new TypeError('Expected the first argument to be an object');
18548
+ let keys = micromatch(Object.keys(obj), patterns, options);
18549
+ let res = {};
18550
+ for (let key of keys)res[key] = obj[key];
18551
+ return res;
18552
+ };
18553
+ micromatch.some = (list, patterns, options)=>{
18554
+ let items = [].concat(list);
18555
+ for (let pattern of [].concat(patterns)){
18556
+ let isMatch = picomatch(String(pattern), options);
18557
+ if (items.some((item)=>isMatch(item))) return true;
18558
+ }
18559
+ return false;
18560
+ };
18561
+ micromatch.every = (list, patterns, options)=>{
18562
+ let items = [].concat(list);
18563
+ for (let pattern of [].concat(patterns)){
18564
+ let isMatch = picomatch(String(pattern), options);
18565
+ if (!items.every((item)=>isMatch(item))) return false;
18566
+ }
18567
+ return true;
18568
+ };
18569
+ micromatch.all = (str, patterns, options)=>{
18570
+ if ('string' != typeof str) throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
18571
+ return [].concat(patterns).every((p)=>picomatch(p, options)(str));
18572
+ };
18573
+ micromatch.capture = (glob, input, options)=>{
18574
+ let posix = utils.isWindows(options);
18575
+ let regex = picomatch.makeRe(String(glob), {
18576
+ ...options,
18577
+ capture: true
18578
+ });
18579
+ let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
18580
+ if (match) return match.slice(1).map((v)=>void 0 === v ? '' : v);
18581
+ };
18582
+ micromatch.makeRe = (...args)=>picomatch.makeRe(...args);
18583
+ micromatch.scan = (...args)=>picomatch.scan(...args);
18584
+ micromatch.parse = (patterns, options)=>{
18585
+ let res = [];
18586
+ for (let pattern of [].concat(patterns || []))for (let str of braces(String(pattern), options))res.push(picomatch.parse(str, options));
18587
+ return res;
18588
+ };
18589
+ micromatch.braces = (pattern, options)=>{
18590
+ if ('string' != typeof pattern) throw new TypeError('Expected a string');
18591
+ if (options && true === options.nobrace || !/\{.*\}/.test(pattern)) return [
18592
+ pattern
18593
+ ];
18594
+ return braces(pattern, options);
18595
+ };
18596
+ micromatch.braceExpand = (pattern, options)=>{
18597
+ if ('string' != typeof pattern) throw new TypeError('Expected a string');
18598
+ return micromatch.braces(pattern, {
18599
+ ...options,
18600
+ expand: true
18601
+ });
18602
+ };
18603
+ module.exports = micromatch;
18604
+ },
17755
18605
  "../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
17756
18606
  "use strict";
17757
18607
  const util = __webpack_require__("util");
@@ -21721,51 +22571,6 @@ var __webpack_modules__ = {
21721
22571
  parseUrl.MAX_INPUT_LENGTH = 2048;
21722
22572
  module.exports = parseUrl;
21723
22573
  },
21724
- "../../node_modules/.pnpm/picocolors@1.0.0/node_modules/picocolors/picocolors.js": function(module, __unused_webpack_exports, __webpack_require__) {
21725
- let tty = __webpack_require__("tty");
21726
- let isColorSupported = !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && ("FORCE_COLOR" in process.env || process.argv.includes("--color") || "win32" === process.platform || tty.isatty(1) && "dumb" !== process.env.TERM || "CI" in process.env);
21727
- let formatter = (open, close, replace = open)=>(input)=>{
21728
- let string = "" + input;
21729
- let index = string.indexOf(close, open.length);
21730
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
21731
- };
21732
- let replaceClose = (string, close, replace, index)=>{
21733
- let start = string.substring(0, index) + replace;
21734
- let end = string.substring(index + close.length);
21735
- let nextIndex = end.indexOf(close);
21736
- return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;
21737
- };
21738
- let createColors = (enabled = isColorSupported)=>({
21739
- isColorSupported: enabled,
21740
- reset: enabled ? (s)=>`\x1b[0m${s}\x1b[0m` : String,
21741
- bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String,
21742
- dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String,
21743
- italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String,
21744
- underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String,
21745
- inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String,
21746
- hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String,
21747
- strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String,
21748
- black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String,
21749
- red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String,
21750
- green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String,
21751
- yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String,
21752
- blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String,
21753
- magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String,
21754
- cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String,
21755
- white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String,
21756
- gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String,
21757
- bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String,
21758
- bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String,
21759
- bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String,
21760
- bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String,
21761
- bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String,
21762
- bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String,
21763
- bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String,
21764
- bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String
21765
- });
21766
- module.exports = createColors();
21767
- module.exports.createColors = createColors;
21768
- },
21769
22574
  "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": function(module) {
21770
22575
  let p = process || {}, argv = p.argv || [], env = p.env || {};
21771
22576
  let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || "win32" === p.platform || (p.stdout || {}).isTTY && "dumb" !== env.TERM || !!env.CI);
@@ -82836,12 +83641,13 @@ var __webpack_exports__ = {};
82836
83641
  printBanner: ()=>printBanner,
82837
83642
  link: ()=>banner_link,
82838
83643
  createBlobDatabasePlugin: ()=>createBlobDatabasePlugin,
83644
+ ConfigBuilder: ()=>ConfigBuilder,
82839
83645
  createZip: ()=>createZip,
82840
83646
  getCwd: ()=>getCwd,
82841
83647
  transformTsEnv: ()=>transformTsEnv,
82842
83648
  loadConfigSync: ()=>loadConfigSync
82843
83649
  });
82844
- var picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.0.0/node_modules/picocolors/picocolors.js");
83650
+ var picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
82845
83651
  var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
82846
83652
  const log = {
82847
83653
  normal: (message)=>console.log(message),
@@ -84757,7 +85563,130 @@ var __webpack_exports__ = {};
84757
85563
  }
84758
85564
  }, hooks);
84759
85565
  };
85566
+ class ConfigBuilder {
85567
+ buildType = null;
85568
+ storageInfo = null;
85569
+ databaseInfo = null;
85570
+ intermediateCode = "";
85571
+ collectedImports = new Map();
85572
+ constructor(){
85573
+ this.addImport({
85574
+ pkg: "dotenv/config",
85575
+ sideEffect: true
85576
+ });
85577
+ this.addImport({
85578
+ pkg: "hot-updater",
85579
+ named: [
85580
+ "defineConfig"
85581
+ ]
85582
+ });
85583
+ }
85584
+ addImport(info) {
85585
+ const pkg = info.pkg;
85586
+ const existing = this.collectedImports.get(pkg);
85587
+ if (existing) {
85588
+ if (info.named) for (const n of info.named)existing.named.add(n);
85589
+ if (info.defaultOrNamespace && !existing.defaultOrNamespace) existing.defaultOrNamespace = info.defaultOrNamespace;
85590
+ if (info.sideEffect && !existing.sideEffect) existing.sideEffect = true;
85591
+ } else this.collectedImports.set(pkg, {
85592
+ named: new Set(info.named ?? []),
85593
+ defaultOrNamespace: info.defaultOrNamespace,
85594
+ sideEffect: info.sideEffect ?? false
85595
+ });
85596
+ return this;
85597
+ }
85598
+ addImports(imports) {
85599
+ for (const imp of imports)this.addImport(imp);
85600
+ }
85601
+ generateImportStatements() {
85602
+ const importLines = [];
85603
+ const sortedPackages = Array.from(this.collectedImports.keys()).sort((a, b)=>{
85604
+ const isABuild = a.startsWith("@hot-updater/");
85605
+ const isBBuild = b.startsWith("@hot-updater/");
85606
+ if (isABuild !== isBBuild) return isABuild ? -1 : 1;
85607
+ if ("dotenv/config" === a) return -1;
85608
+ if ("dotenv/config" === b) return 1;
85609
+ const isAdminA = "firebase-admin" === a;
85610
+ const isAdminB = "firebase-admin" === b;
85611
+ if (isAdminA !== isAdminB) return isAdminA ? -1 : 1;
85612
+ return a.localeCompare(b);
85613
+ });
85614
+ for (const pkg of sortedPackages){
85615
+ const info = this.collectedImports.get(pkg);
85616
+ if (info.sideEffect) importLines.push(`import "${pkg}";`);
85617
+ else if (info.defaultOrNamespace) if ("firebase-admin" === pkg && info.named.size > 0) importLines.push(`import ${info.defaultOrNamespace}, { ${Array.from(info.named).sort().join(", ")} } from "${pkg}";`);
85618
+ else importLines.push(`import ${info.defaultOrNamespace} from "${pkg}";`);
85619
+ else if (info.named.size > 0) {
85620
+ const namedPart = Array.from(info.named).sort().join(", ");
85621
+ importLines.push(`import { ${namedPart} } from "${pkg}";`);
85622
+ }
85623
+ }
85624
+ return importLines.join("\n");
85625
+ }
85626
+ generateBuildConfigString() {
85627
+ if (!this.buildType) throw new Error("Build type must be set using .setBuildType()");
85628
+ switch(this.buildType){
85629
+ case "bare":
85630
+ return "bare({ enableHermes: true })";
85631
+ case "rnef":
85632
+ return "rnef()";
85633
+ default:
85634
+ throw new Error(`Invalid build type: ${this.buildType}`);
85635
+ }
85636
+ }
85637
+ setBuildType(buildType) {
85638
+ if (this.buildType) console.warn("Build type is being set multiple times. Overwriting previous value.");
85639
+ this.buildType = buildType;
85640
+ this.addImport({
85641
+ pkg: `@hot-updater/${buildType}`,
85642
+ named: [
85643
+ buildType
85644
+ ]
85645
+ });
85646
+ return this;
85647
+ }
85648
+ setStorage(storageConfig) {
85649
+ this.storageInfo = storageConfig;
85650
+ this.addImports(storageConfig.imports);
85651
+ if (storageConfig.imports.some((imp)=>imp.pkg.includes("firebase"))) this.addImport({
85652
+ pkg: "firebase-admin",
85653
+ defaultOrNamespace: "* as admin"
85654
+ });
85655
+ return this;
85656
+ }
85657
+ setDatabase(databaseConfig) {
85658
+ this.databaseInfo = databaseConfig;
85659
+ this.addImports(databaseConfig.imports);
85660
+ if (databaseConfig.imports.some((imp)=>imp.pkg.includes("firebase"))) this.addImport({
85661
+ pkg: "firebase-admin",
85662
+ defaultOrNamespace: "* as admin"
85663
+ });
85664
+ return this;
85665
+ }
85666
+ setIntermediateCode(code) {
85667
+ this.intermediateCode = code.trim();
85668
+ return this;
85669
+ }
85670
+ getResult() {
85671
+ if (!this.buildType) throw new Error("Build type must be set using .setBuildType()");
85672
+ if (!this.storageInfo) throw new Error("Storage config must be set using .setStorage()");
85673
+ if (!this.databaseInfo) throw new Error("Database config must be set using .setDatabase()");
85674
+ const importStatements = this.generateImportStatements();
85675
+ const buildConfigString = this.generateBuildConfigString();
85676
+ return `
85677
+ ${importStatements}
85678
+
85679
+ ${this.intermediateCode ? `${this.intermediateCode}\n` : ""}
85680
+ export default defineConfig({
85681
+ build: ${buildConfigString},
85682
+ storage: ${this.storageInfo.configString},
85683
+ database: ${this.databaseInfo.configString},
85684
+ });
85685
+ `.trim();
85686
+ }
85687
+ }
84760
85688
  })();
85689
+ exports.ConfigBuilder = __webpack_exports__.ConfigBuilder;
84761
85690
  exports.banner = __webpack_exports__.banner;
84762
85691
  exports.copyDirToTmp = __webpack_exports__.copyDirToTmp;
84763
85692
  exports.createBlobDatabasePlugin = __webpack_exports__.createBlobDatabasePlugin;
@@ -84775,6 +85704,7 @@ exports.transformEnv = __webpack_exports__.transformEnv;
84775
85704
  exports.transformTemplate = __webpack_exports__.transformTemplate;
84776
85705
  exports.transformTsEnv = __webpack_exports__.transformTsEnv;
84777
85706
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
85707
+ "ConfigBuilder",
84778
85708
  "banner",
84779
85709
  "copyDirToTmp",
84780
85710
  "createBlobDatabasePlugin",