@lark-apaas/fullstack-nestjs-core 1.1.24-alpha.24 → 1.1.24-alpha.26

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.js CHANGED
@@ -965,9 +965,9 @@ var require_http_errors = __commonJS({
965
965
  }
966
966
  });
967
967
 
968
- // ../../../node_modules/body-parser/node_modules/ms/index.js
968
+ // ../../../node_modules/express/node_modules/ms/index.js
969
969
  var require_ms = __commonJS({
970
- "../../../node_modules/body-parser/node_modules/ms/index.js"(exports, module) {
970
+ "../../../node_modules/express/node_modules/ms/index.js"(exports, module) {
971
971
  "use strict";
972
972
  var s = 1e3;
973
973
  var m = s * 60;
@@ -1068,9 +1068,9 @@ var require_ms = __commonJS({
1068
1068
  }
1069
1069
  });
1070
1070
 
1071
- // ../../../node_modules/body-parser/node_modules/debug/src/debug.js
1071
+ // ../../../node_modules/express/node_modules/debug/src/debug.js
1072
1072
  var require_debug = __commonJS({
1073
- "../../../node_modules/body-parser/node_modules/debug/src/debug.js"(exports, module) {
1073
+ "../../../node_modules/express/node_modules/debug/src/debug.js"(exports, module) {
1074
1074
  "use strict";
1075
1075
  exports = module.exports = createDebug.debug = createDebug["default"] = createDebug;
1076
1076
  exports.coerce = coerce;
@@ -1181,9 +1181,9 @@ var require_debug = __commonJS({
1181
1181
  }
1182
1182
  });
1183
1183
 
1184
- // ../../../node_modules/body-parser/node_modules/debug/src/browser.js
1184
+ // ../../../node_modules/express/node_modules/debug/src/browser.js
1185
1185
  var require_browser = __commonJS({
1186
- "../../../node_modules/body-parser/node_modules/debug/src/browser.js"(exports, module) {
1186
+ "../../../node_modules/express/node_modules/debug/src/browser.js"(exports, module) {
1187
1187
  "use strict";
1188
1188
  exports = module.exports = require_debug();
1189
1189
  exports.log = log;
@@ -1274,9 +1274,9 @@ var require_browser = __commonJS({
1274
1274
  }
1275
1275
  });
1276
1276
 
1277
- // ../../../node_modules/body-parser/node_modules/debug/src/node.js
1277
+ // ../../../node_modules/express/node_modules/debug/src/node.js
1278
1278
  var require_node = __commonJS({
1279
- "../../../node_modules/body-parser/node_modules/debug/src/node.js"(exports, module) {
1279
+ "../../../node_modules/express/node_modules/debug/src/node.js"(exports, module) {
1280
1280
  "use strict";
1281
1281
  var tty = __require("tty");
1282
1282
  var util = __require("util");
@@ -1411,9 +1411,9 @@ var require_node = __commonJS({
1411
1411
  }
1412
1412
  });
1413
1413
 
1414
- // ../../../node_modules/body-parser/node_modules/debug/src/index.js
1414
+ // ../../../node_modules/express/node_modules/debug/src/index.js
1415
1415
  var require_src = __commonJS({
1416
- "../../../node_modules/body-parser/node_modules/debug/src/index.js"(exports, module) {
1416
+ "../../../node_modules/express/node_modules/debug/src/index.js"(exports, module) {
1417
1417
  "use strict";
1418
1418
  if (typeof process !== "undefined" && process.type === "renderer") {
1419
1419
  module.exports = require_browser();
@@ -4974,9 +4974,9 @@ var require_unpipe = __commonJS({
4974
4974
  }
4975
4975
  });
4976
4976
 
4977
- // ../../../node_modules/body-parser/node_modules/raw-body/index.js
4977
+ // ../../../node_modules/express/node_modules/raw-body/index.js
4978
4978
  var require_raw_body = __commonJS({
4979
- "../../../node_modules/body-parser/node_modules/raw-body/index.js"(exports, module) {
4979
+ "../../../node_modules/express/node_modules/raw-body/index.js"(exports, module) {
4980
4980
  "use strict";
4981
4981
  var asyncHooks = tryRequireAsyncHooks();
4982
4982
  var bytes = require_bytes();
@@ -5361,9 +5361,9 @@ var require_on_finished = __commonJS({
5361
5361
  }
5362
5362
  });
5363
5363
 
5364
- // ../../../node_modules/body-parser/lib/read.js
5364
+ // ../../../node_modules/express/node_modules/body-parser/lib/read.js
5365
5365
  var require_read = __commonJS({
5366
- "../../../node_modules/body-parser/lib/read.js"(exports, module) {
5366
+ "../../../node_modules/express/node_modules/body-parser/lib/read.js"(exports, module) {
5367
5367
  "use strict";
5368
5368
  var createError = require_http_errors();
5369
5369
  var destroy = require_destroy();
@@ -14368,9 +14368,9 @@ var require_type_is = __commonJS({
14368
14368
  }
14369
14369
  });
14370
14370
 
14371
- // ../../../node_modules/body-parser/lib/types/json.js
14371
+ // ../../../node_modules/express/node_modules/body-parser/lib/types/json.js
14372
14372
  var require_json = __commonJS({
14373
- "../../../node_modules/body-parser/lib/types/json.js"(exports, module) {
14373
+ "../../../node_modules/express/node_modules/body-parser/lib/types/json.js"(exports, module) {
14374
14374
  "use strict";
14375
14375
  var bytes = require_bytes();
14376
14376
  var contentType = require_content_type();
@@ -14509,9 +14509,9 @@ var require_json = __commonJS({
14509
14509
  }
14510
14510
  });
14511
14511
 
14512
- // ../../../node_modules/body-parser/lib/types/raw.js
14512
+ // ../../../node_modules/express/node_modules/body-parser/lib/types/raw.js
14513
14513
  var require_raw = __commonJS({
14514
- "../../../node_modules/body-parser/lib/types/raw.js"(exports, module) {
14514
+ "../../../node_modules/express/node_modules/body-parser/lib/types/raw.js"(exports, module) {
14515
14515
  "use strict";
14516
14516
  var bytes = require_bytes();
14517
14517
  var debug = require_src()("body-parser:raw");
@@ -14568,9 +14568,9 @@ var require_raw = __commonJS({
14568
14568
  }
14569
14569
  });
14570
14570
 
14571
- // ../../../node_modules/body-parser/lib/types/text.js
14571
+ // ../../../node_modules/express/node_modules/body-parser/lib/types/text.js
14572
14572
  var require_text = __commonJS({
14573
- "../../../node_modules/body-parser/lib/types/text.js"(exports, module) {
14573
+ "../../../node_modules/express/node_modules/body-parser/lib/types/text.js"(exports, module) {
14574
14574
  "use strict";
14575
14575
  var bytes = require_bytes();
14576
14576
  var contentType = require_content_type();
@@ -16532,23 +16532,8 @@ var require_utils = __commonJS({
16532
16532
  "../../../node_modules/qs/lib/utils.js"(exports, module) {
16533
16533
  "use strict";
16534
16534
  var formats = require_formats();
16535
- var getSideChannel = require_side_channel();
16536
16535
  var has = Object.prototype.hasOwnProperty;
16537
16536
  var isArray = Array.isArray;
16538
- var overflowChannel = getSideChannel();
16539
- var markOverflow = /* @__PURE__ */ __name(function markOverflow2(obj, maxIndex) {
16540
- overflowChannel.set(obj, maxIndex);
16541
- return obj;
16542
- }, "markOverflow");
16543
- var isOverflow = /* @__PURE__ */ __name(function isOverflow2(obj) {
16544
- return overflowChannel.has(obj);
16545
- }, "isOverflow");
16546
- var getMaxIndex = /* @__PURE__ */ __name(function getMaxIndex2(obj) {
16547
- return overflowChannel.get(obj);
16548
- }, "getMaxIndex");
16549
- var setMaxIndex = /* @__PURE__ */ __name(function setMaxIndex2(obj, maxIndex) {
16550
- overflowChannel.set(obj, maxIndex);
16551
- }, "setMaxIndex");
16552
16537
  var hexTable = (function() {
16553
16538
  var array = [];
16554
16539
  for (var i = 0; i < 256; ++i) {
@@ -16590,11 +16575,7 @@ var require_utils = __commonJS({
16590
16575
  if (isArray(target)) {
16591
16576
  target.push(source);
16592
16577
  } else if (target && typeof target === "object") {
16593
- if (isOverflow(target)) {
16594
- var newIndex = getMaxIndex(target) + 1;
16595
- target[newIndex] = source;
16596
- setMaxIndex(target, newIndex);
16597
- } else if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {
16578
+ if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {
16598
16579
  target[source] = true;
16599
16580
  }
16600
16581
  } else {
@@ -16606,20 +16587,6 @@ var require_utils = __commonJS({
16606
16587
  return target;
16607
16588
  }
16608
16589
  if (!target || typeof target !== "object") {
16609
- if (isOverflow(source)) {
16610
- var sourceKeys = Object.keys(source);
16611
- var result = options && options.plainObjects ? {
16612
- __proto__: null,
16613
- 0: target
16614
- } : {
16615
- 0: target
16616
- };
16617
- for (var m = 0; m < sourceKeys.length; m++) {
16618
- var oldKey = parseInt(sourceKeys[m], 10);
16619
- result[oldKey + 1] = source[sourceKeys[m]];
16620
- }
16621
- return markOverflow(result, getMaxIndex(source) + 1);
16622
- }
16623
16590
  return [
16624
16591
  target
16625
16592
  ].concat(source);
@@ -16754,20 +16721,8 @@ var require_utils = __commonJS({
16754
16721
  }
16755
16722
  return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
16756
16723
  }, "isBuffer");
16757
- var combine = /* @__PURE__ */ __name(function combine2(a, b, arrayLimit, plainObjects) {
16758
- if (isOverflow(a)) {
16759
- var newIndex = getMaxIndex(a) + 1;
16760
- a[newIndex] = b;
16761
- setMaxIndex(a, newIndex);
16762
- return a;
16763
- }
16764
- var result = [].concat(a, b);
16765
- if (result.length > arrayLimit) {
16766
- return markOverflow(arrayToObject(result, {
16767
- plainObjects
16768
- }), result.length - 1);
16769
- }
16770
- return result;
16724
+ var combine = /* @__PURE__ */ __name(function combine2(a, b) {
16725
+ return [].concat(a, b);
16771
16726
  }, "combine");
16772
16727
  var maybeMap = /* @__PURE__ */ __name(function maybeMap2(val, fn) {
16773
16728
  if (isArray(val)) {
@@ -16787,7 +16742,6 @@ var require_utils = __commonJS({
16787
16742
  decode,
16788
16743
  encode,
16789
16744
  isBuffer,
16790
- isOverflow,
16791
16745
  isRegExp,
16792
16746
  maybeMap,
16793
16747
  merge
@@ -17137,11 +17091,9 @@ var require_parse = __commonJS({
17137
17091
  val = options.strictNullHandling ? null : "";
17138
17092
  } else {
17139
17093
  key = options.decoder(part.slice(0, pos), defaults.decoder, charset, "key");
17140
- if (key !== null) {
17141
- val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options, isArray(obj[key]) ? obj[key].length : 0), function(encodedVal) {
17142
- return options.decoder(encodedVal, defaults.decoder, charset, "value");
17143
- });
17144
- }
17094
+ val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options, isArray(obj[key]) ? obj[key].length : 0), function(encodedVal) {
17095
+ return options.decoder(encodedVal, defaults.decoder, charset, "value");
17096
+ });
17145
17097
  }
17146
17098
  if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
17147
17099
  val = interpretNumericEntities(String(val));
@@ -17151,13 +17103,11 @@ var require_parse = __commonJS({
17151
17103
  val
17152
17104
  ] : val;
17153
17105
  }
17154
- if (key !== null) {
17155
- var existing = has.call(obj, key);
17156
- if (existing && options.duplicates === "combine") {
17157
- obj[key] = utils.combine(obj[key], val, options.arrayLimit, options.plainObjects);
17158
- } else if (!existing || options.duplicates === "last") {
17159
- obj[key] = val;
17160
- }
17106
+ var existing = has.call(obj, key);
17107
+ if (existing && options.duplicates === "combine") {
17108
+ obj[key] = utils.combine(obj[key], val);
17109
+ } else if (!existing || options.duplicates === "last") {
17110
+ obj[key] = val;
17161
17111
  }
17162
17112
  }
17163
17113
  return obj;
@@ -17173,11 +17123,7 @@ var require_parse = __commonJS({
17173
17123
  var obj;
17174
17124
  var root = chain[i];
17175
17125
  if (root === "[]" && options.parseArrays) {
17176
- if (utils.isOverflow(leaf)) {
17177
- obj = leaf;
17178
- } else {
17179
- obj = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : utils.combine([], leaf, options.arrayLimit, options.plainObjects);
17180
- }
17126
+ obj = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : utils.combine([], leaf);
17181
17127
  } else {
17182
17128
  obj = options.plainObjects ? {
17183
17129
  __proto__: null
@@ -17200,21 +17146,14 @@ var require_parse = __commonJS({
17200
17146
  }
17201
17147
  return leaf;
17202
17148
  }, "parseObject");
17203
- var splitKeyIntoSegments = /* @__PURE__ */ __name(function splitKeyIntoSegments2(givenKey, options) {
17204
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
17205
- if (options.depth <= 0) {
17206
- if (!options.plainObjects && has.call(Object.prototype, key)) {
17207
- if (!options.allowPrototypes) {
17208
- return;
17209
- }
17210
- }
17211
- return [
17212
- key
17213
- ];
17149
+ var parseKeys = /* @__PURE__ */ __name(function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
17150
+ if (!givenKey) {
17151
+ return;
17214
17152
  }
17153
+ var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
17215
17154
  var brackets = /(\[[^[\]]*])/;
17216
17155
  var child = /(\[[^[\]]*])/g;
17217
- var segment = brackets.exec(key);
17156
+ var segment = options.depth > 0 && brackets.exec(key);
17218
17157
  var parent = segment ? key.slice(0, segment.index) : key;
17219
17158
  var keys = [];
17220
17159
  if (parent) {
@@ -17226,10 +17165,9 @@ var require_parse = __commonJS({
17226
17165
  keys.push(parent);
17227
17166
  }
17228
17167
  var i = 0;
17229
- while ((segment = child.exec(key)) !== null && i < options.depth) {
17168
+ while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
17230
17169
  i += 1;
17231
- var segmentContent = segment[1].slice(1, -1);
17232
- if (!options.plainObjects && has.call(Object.prototype, segmentContent)) {
17170
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
17233
17171
  if (!options.allowPrototypes) {
17234
17172
  return;
17235
17173
  }
@@ -17242,16 +17180,6 @@ var require_parse = __commonJS({
17242
17180
  }
17243
17181
  keys.push("[" + key.slice(segment.index) + "]");
17244
17182
  }
17245
- return keys;
17246
- }, "splitKeyIntoSegments");
17247
- var parseKeys = /* @__PURE__ */ __name(function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
17248
- if (!givenKey) {
17249
- return;
17250
- }
17251
- var keys = splitKeyIntoSegments(givenKey, options);
17252
- if (!keys) {
17253
- return;
17254
- }
17255
17183
  return parseObject(keys, val, options, valuesParsed);
17256
17184
  }, "parseQueryStringKeys");
17257
17185
  var normalizeParseOptions = /* @__PURE__ */ __name(function normalizeParseOptions2(opts) {
@@ -17344,9 +17272,9 @@ var require_lib2 = __commonJS({
17344
17272
  }
17345
17273
  });
17346
17274
 
17347
- // ../../../node_modules/body-parser/lib/types/urlencoded.js
17275
+ // ../../../node_modules/express/node_modules/body-parser/lib/types/urlencoded.js
17348
17276
  var require_urlencoded = __commonJS({
17349
- "../../../node_modules/body-parser/lib/types/urlencoded.js"(exports, module) {
17277
+ "../../../node_modules/express/node_modules/body-parser/lib/types/urlencoded.js"(exports, module) {
17350
17278
  "use strict";
17351
17279
  var bytes = require_bytes();
17352
17280
  var contentType = require_content_type();
@@ -17527,9 +17455,9 @@ var require_urlencoded = __commonJS({
17527
17455
  }
17528
17456
  });
17529
17457
 
17530
- // ../../../node_modules/body-parser/index.js
17458
+ // ../../../node_modules/express/node_modules/body-parser/index.js
17531
17459
  var require_body_parser = __commonJS({
17532
- "../../../node_modules/body-parser/index.js"(exports, module) {
17460
+ "../../../node_modules/express/node_modules/body-parser/index.js"(exports, module) {
17533
17461
  "use strict";
17534
17462
  var deprecate = require_depd()("body-parser");
17535
17463
  var parsers = /* @__PURE__ */ Object.create(null);
@@ -18403,464 +18331,6 @@ var require_finalhandler = __commonJS({
18403
18331
  }
18404
18332
  });
18405
18333
 
18406
- // ../../../node_modules/express/node_modules/ms/index.js
18407
- var require_ms3 = __commonJS({
18408
- "../../../node_modules/express/node_modules/ms/index.js"(exports, module) {
18409
- "use strict";
18410
- var s = 1e3;
18411
- var m = s * 60;
18412
- var h = m * 60;
18413
- var d = h * 24;
18414
- var y = d * 365.25;
18415
- module.exports = function(val, options) {
18416
- options = options || {};
18417
- var type = typeof val;
18418
- if (type === "string" && val.length > 0) {
18419
- return parse(val);
18420
- } else if (type === "number" && isNaN(val) === false) {
18421
- return options.long ? fmtLong(val) : fmtShort(val);
18422
- }
18423
- throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
18424
- };
18425
- function parse(str) {
18426
- str = String(str);
18427
- if (str.length > 100) {
18428
- return;
18429
- }
18430
- var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
18431
- if (!match) {
18432
- return;
18433
- }
18434
- var n = parseFloat(match[1]);
18435
- var type = (match[2] || "ms").toLowerCase();
18436
- switch (type) {
18437
- case "years":
18438
- case "year":
18439
- case "yrs":
18440
- case "yr":
18441
- case "y":
18442
- return n * y;
18443
- case "days":
18444
- case "day":
18445
- case "d":
18446
- return n * d;
18447
- case "hours":
18448
- case "hour":
18449
- case "hrs":
18450
- case "hr":
18451
- case "h":
18452
- return n * h;
18453
- case "minutes":
18454
- case "minute":
18455
- case "mins":
18456
- case "min":
18457
- case "m":
18458
- return n * m;
18459
- case "seconds":
18460
- case "second":
18461
- case "secs":
18462
- case "sec":
18463
- case "s":
18464
- return n * s;
18465
- case "milliseconds":
18466
- case "millisecond":
18467
- case "msecs":
18468
- case "msec":
18469
- case "ms":
18470
- return n;
18471
- default:
18472
- return void 0;
18473
- }
18474
- }
18475
- __name(parse, "parse");
18476
- function fmtShort(ms) {
18477
- if (ms >= d) {
18478
- return Math.round(ms / d) + "d";
18479
- }
18480
- if (ms >= h) {
18481
- return Math.round(ms / h) + "h";
18482
- }
18483
- if (ms >= m) {
18484
- return Math.round(ms / m) + "m";
18485
- }
18486
- if (ms >= s) {
18487
- return Math.round(ms / s) + "s";
18488
- }
18489
- return ms + "ms";
18490
- }
18491
- __name(fmtShort, "fmtShort");
18492
- function fmtLong(ms) {
18493
- return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms";
18494
- }
18495
- __name(fmtLong, "fmtLong");
18496
- function plural(ms, n, name) {
18497
- if (ms < n) {
18498
- return;
18499
- }
18500
- if (ms < n * 1.5) {
18501
- return Math.floor(ms / n) + " " + name;
18502
- }
18503
- return Math.ceil(ms / n) + " " + name + "s";
18504
- }
18505
- __name(plural, "plural");
18506
- }
18507
- });
18508
-
18509
- // ../../../node_modules/express/node_modules/debug/src/debug.js
18510
- var require_debug3 = __commonJS({
18511
- "../../../node_modules/express/node_modules/debug/src/debug.js"(exports, module) {
18512
- "use strict";
18513
- exports = module.exports = createDebug.debug = createDebug["default"] = createDebug;
18514
- exports.coerce = coerce;
18515
- exports.disable = disable;
18516
- exports.enable = enable;
18517
- exports.enabled = enabled;
18518
- exports.humanize = require_ms3();
18519
- exports.names = [];
18520
- exports.skips = [];
18521
- exports.formatters = {};
18522
- var prevTime;
18523
- function selectColor(namespace) {
18524
- var hash = 0, i;
18525
- for (i in namespace) {
18526
- hash = (hash << 5) - hash + namespace.charCodeAt(i);
18527
- hash |= 0;
18528
- }
18529
- return exports.colors[Math.abs(hash) % exports.colors.length];
18530
- }
18531
- __name(selectColor, "selectColor");
18532
- function createDebug(namespace) {
18533
- function debug() {
18534
- if (!debug.enabled) return;
18535
- var self = debug;
18536
- var curr = +/* @__PURE__ */ new Date();
18537
- var ms = curr - (prevTime || curr);
18538
- self.diff = ms;
18539
- self.prev = prevTime;
18540
- self.curr = curr;
18541
- prevTime = curr;
18542
- var args = new Array(arguments.length);
18543
- for (var i = 0; i < args.length; i++) {
18544
- args[i] = arguments[i];
18545
- }
18546
- args[0] = exports.coerce(args[0]);
18547
- if ("string" !== typeof args[0]) {
18548
- args.unshift("%O");
18549
- }
18550
- var index = 0;
18551
- args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
18552
- if (match === "%%") return match;
18553
- index++;
18554
- var formatter = exports.formatters[format];
18555
- if ("function" === typeof formatter) {
18556
- var val = args[index];
18557
- match = formatter.call(self, val);
18558
- args.splice(index, 1);
18559
- index--;
18560
- }
18561
- return match;
18562
- });
18563
- exports.formatArgs.call(self, args);
18564
- var logFn = debug.log || exports.log || console.log.bind(console);
18565
- logFn.apply(self, args);
18566
- }
18567
- __name(debug, "debug");
18568
- debug.namespace = namespace;
18569
- debug.enabled = exports.enabled(namespace);
18570
- debug.useColors = exports.useColors();
18571
- debug.color = selectColor(namespace);
18572
- if ("function" === typeof exports.init) {
18573
- exports.init(debug);
18574
- }
18575
- return debug;
18576
- }
18577
- __name(createDebug, "createDebug");
18578
- function enable(namespaces) {
18579
- exports.save(namespaces);
18580
- exports.names = [];
18581
- exports.skips = [];
18582
- var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
18583
- var len = split.length;
18584
- for (var i = 0; i < len; i++) {
18585
- if (!split[i]) continue;
18586
- namespaces = split[i].replace(/\*/g, ".*?");
18587
- if (namespaces[0] === "-") {
18588
- exports.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
18589
- } else {
18590
- exports.names.push(new RegExp("^" + namespaces + "$"));
18591
- }
18592
- }
18593
- }
18594
- __name(enable, "enable");
18595
- function disable() {
18596
- exports.enable("");
18597
- }
18598
- __name(disable, "disable");
18599
- function enabled(name) {
18600
- var i, len;
18601
- for (i = 0, len = exports.skips.length; i < len; i++) {
18602
- if (exports.skips[i].test(name)) {
18603
- return false;
18604
- }
18605
- }
18606
- for (i = 0, len = exports.names.length; i < len; i++) {
18607
- if (exports.names[i].test(name)) {
18608
- return true;
18609
- }
18610
- }
18611
- return false;
18612
- }
18613
- __name(enabled, "enabled");
18614
- function coerce(val) {
18615
- if (val instanceof Error) return val.stack || val.message;
18616
- return val;
18617
- }
18618
- __name(coerce, "coerce");
18619
- }
18620
- });
18621
-
18622
- // ../../../node_modules/express/node_modules/debug/src/browser.js
18623
- var require_browser3 = __commonJS({
18624
- "../../../node_modules/express/node_modules/debug/src/browser.js"(exports, module) {
18625
- "use strict";
18626
- exports = module.exports = require_debug3();
18627
- exports.log = log;
18628
- exports.formatArgs = formatArgs;
18629
- exports.save = save;
18630
- exports.load = load;
18631
- exports.useColors = useColors;
18632
- exports.storage = "undefined" != typeof chrome && "undefined" != typeof chrome.storage ? chrome.storage.local : localstorage();
18633
- exports.colors = [
18634
- "lightseagreen",
18635
- "forestgreen",
18636
- "goldenrod",
18637
- "dodgerblue",
18638
- "darkorchid",
18639
- "crimson"
18640
- ];
18641
- function useColors() {
18642
- if (typeof window !== "undefined" && window.process && window.process.type === "renderer") {
18643
- return true;
18644
- }
18645
- return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // is firebug? http://stackoverflow.com/a/398120/376773
18646
- typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // is firefox >= v31?
18647
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
18648
- typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // double check webkit in userAgent just in case we are in a worker
18649
- typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
18650
- }
18651
- __name(useColors, "useColors");
18652
- exports.formatters.j = function(v) {
18653
- try {
18654
- return JSON.stringify(v);
18655
- } catch (err) {
18656
- return "[UnexpectedJSONParseError]: " + err.message;
18657
- }
18658
- };
18659
- function formatArgs(args) {
18660
- var useColors2 = this.useColors;
18661
- args[0] = (useColors2 ? "%c" : "") + this.namespace + (useColors2 ? " %c" : " ") + args[0] + (useColors2 ? "%c " : " ") + "+" + exports.humanize(this.diff);
18662
- if (!useColors2) return;
18663
- var c = "color: " + this.color;
18664
- args.splice(1, 0, c, "color: inherit");
18665
- var index = 0;
18666
- var lastC = 0;
18667
- args[0].replace(/%[a-zA-Z%]/g, function(match) {
18668
- if ("%%" === match) return;
18669
- index++;
18670
- if ("%c" === match) {
18671
- lastC = index;
18672
- }
18673
- });
18674
- args.splice(lastC, 0, c);
18675
- }
18676
- __name(formatArgs, "formatArgs");
18677
- function log() {
18678
- return "object" === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments);
18679
- }
18680
- __name(log, "log");
18681
- function save(namespaces) {
18682
- try {
18683
- if (null == namespaces) {
18684
- exports.storage.removeItem("debug");
18685
- } else {
18686
- exports.storage.debug = namespaces;
18687
- }
18688
- } catch (e) {
18689
- }
18690
- }
18691
- __name(save, "save");
18692
- function load() {
18693
- var r;
18694
- try {
18695
- r = exports.storage.debug;
18696
- } catch (e) {
18697
- }
18698
- if (!r && typeof process !== "undefined" && "env" in process) {
18699
- r = process.env.DEBUG;
18700
- }
18701
- return r;
18702
- }
18703
- __name(load, "load");
18704
- exports.enable(load());
18705
- function localstorage() {
18706
- try {
18707
- return window.localStorage;
18708
- } catch (e) {
18709
- }
18710
- }
18711
- __name(localstorage, "localstorage");
18712
- }
18713
- });
18714
-
18715
- // ../../../node_modules/express/node_modules/debug/src/node.js
18716
- var require_node3 = __commonJS({
18717
- "../../../node_modules/express/node_modules/debug/src/node.js"(exports, module) {
18718
- "use strict";
18719
- var tty = __require("tty");
18720
- var util = __require("util");
18721
- exports = module.exports = require_debug3();
18722
- exports.init = init;
18723
- exports.log = log;
18724
- exports.formatArgs = formatArgs;
18725
- exports.save = save;
18726
- exports.load = load;
18727
- exports.useColors = useColors;
18728
- exports.colors = [
18729
- 6,
18730
- 2,
18731
- 3,
18732
- 4,
18733
- 5,
18734
- 1
18735
- ];
18736
- exports.inspectOpts = Object.keys(process.env).filter(function(key) {
18737
- return /^debug_/i.test(key);
18738
- }).reduce(function(obj, key) {
18739
- var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
18740
- return k.toUpperCase();
18741
- });
18742
- var val = process.env[key];
18743
- if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
18744
- else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
18745
- else if (val === "null") val = null;
18746
- else val = Number(val);
18747
- obj[prop] = val;
18748
- return obj;
18749
- }, {});
18750
- var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
18751
- if (1 !== fd && 2 !== fd) {
18752
- util.deprecate(function() {
18753
- }, "except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();
18754
- }
18755
- var stream = 1 === fd ? process.stdout : 2 === fd ? process.stderr : createWritableStdioStream(fd);
18756
- function useColors() {
18757
- return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(fd);
18758
- }
18759
- __name(useColors, "useColors");
18760
- exports.formatters.o = function(v) {
18761
- this.inspectOpts.colors = this.useColors;
18762
- return util.inspect(v, this.inspectOpts).split("\n").map(function(str) {
18763
- return str.trim();
18764
- }).join(" ");
18765
- };
18766
- exports.formatters.O = function(v) {
18767
- this.inspectOpts.colors = this.useColors;
18768
- return util.inspect(v, this.inspectOpts);
18769
- };
18770
- function formatArgs(args) {
18771
- var name = this.namespace;
18772
- var useColors2 = this.useColors;
18773
- if (useColors2) {
18774
- var c = this.color;
18775
- var prefix = " \x1B[3" + c + ";1m" + name + " \x1B[0m";
18776
- args[0] = prefix + args[0].split("\n").join("\n" + prefix);
18777
- args.push("\x1B[3" + c + "m+" + exports.humanize(this.diff) + "\x1B[0m");
18778
- } else {
18779
- args[0] = (/* @__PURE__ */ new Date()).toUTCString() + " " + name + " " + args[0];
18780
- }
18781
- }
18782
- __name(formatArgs, "formatArgs");
18783
- function log() {
18784
- return stream.write(util.format.apply(util, arguments) + "\n");
18785
- }
18786
- __name(log, "log");
18787
- function save(namespaces) {
18788
- if (null == namespaces) {
18789
- delete process.env.DEBUG;
18790
- } else {
18791
- process.env.DEBUG = namespaces;
18792
- }
18793
- }
18794
- __name(save, "save");
18795
- function load() {
18796
- return process.env.DEBUG;
18797
- }
18798
- __name(load, "load");
18799
- function createWritableStdioStream(fd2) {
18800
- var stream2;
18801
- var tty_wrap = process.binding("tty_wrap");
18802
- switch (tty_wrap.guessHandleType(fd2)) {
18803
- case "TTY":
18804
- stream2 = new tty.WriteStream(fd2);
18805
- stream2._type = "tty";
18806
- if (stream2._handle && stream2._handle.unref) {
18807
- stream2._handle.unref();
18808
- }
18809
- break;
18810
- case "FILE":
18811
- var fs2 = __require("fs");
18812
- stream2 = new fs2.SyncWriteStream(fd2, {
18813
- autoClose: false
18814
- });
18815
- stream2._type = "fs";
18816
- break;
18817
- case "PIPE":
18818
- case "TCP":
18819
- var net = __require("net");
18820
- stream2 = new net.Socket({
18821
- fd: fd2,
18822
- readable: false,
18823
- writable: true
18824
- });
18825
- stream2.readable = false;
18826
- stream2.read = null;
18827
- stream2._type = "pipe";
18828
- if (stream2._handle && stream2._handle.unref) {
18829
- stream2._handle.unref();
18830
- }
18831
- break;
18832
- default:
18833
- throw new Error("Implement me. Unknown stream file type!");
18834
- }
18835
- stream2.fd = fd2;
18836
- stream2._isStdio = true;
18837
- return stream2;
18838
- }
18839
- __name(createWritableStdioStream, "createWritableStdioStream");
18840
- function init(debug) {
18841
- debug.inspectOpts = {};
18842
- var keys = Object.keys(exports.inspectOpts);
18843
- for (var i = 0; i < keys.length; i++) {
18844
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
18845
- }
18846
- }
18847
- __name(init, "init");
18848
- exports.enable(load());
18849
- }
18850
- });
18851
-
18852
- // ../../../node_modules/express/node_modules/debug/src/index.js
18853
- var require_src3 = __commonJS({
18854
- "../../../node_modules/express/node_modules/debug/src/index.js"(exports, module) {
18855
- "use strict";
18856
- if (typeof process !== "undefined" && process.type === "renderer") {
18857
- module.exports = require_browser3();
18858
- } else {
18859
- module.exports = require_node3();
18860
- }
18861
- }
18862
- });
18863
-
18864
18334
  // ../../../node_modules/array-flatten/array-flatten.js
18865
18335
  var require_array_flatten = __commonJS({
18866
18336
  "../../../node_modules/array-flatten/array-flatten.js"(exports, module) {
@@ -19010,7 +18480,7 @@ var require_layer = __commonJS({
19010
18480
  "../../../node_modules/express/lib/router/layer.js"(exports, module) {
19011
18481
  "use strict";
19012
18482
  var pathRegexp = require_path_to_regexp();
19013
- var debug = require_src3()("express:router:layer");
18483
+ var debug = require_src()("express:router:layer");
19014
18484
  var hasOwnProperty = Object.prototype.hasOwnProperty;
19015
18485
  module.exports = Layer;
19016
18486
  function Layer(path2, options, fn) {
@@ -19154,7 +18624,7 @@ var require_methods = __commonJS({
19154
18624
  var require_route = __commonJS({
19155
18625
  "../../../node_modules/express/lib/router/route.js"(exports, module) {
19156
18626
  "use strict";
19157
- var debug = require_src3()("express:router:route");
18627
+ var debug = require_src()("express:router:route");
19158
18628
  var flatten = require_array_flatten();
19159
18629
  var Layer = require_layer();
19160
18630
  var methods = require_methods();
@@ -19287,7 +18757,7 @@ var require_router = __commonJS({
19287
18757
  var Layer = require_layer();
19288
18758
  var methods = require_methods();
19289
18759
  var mixin = require_utils_merge();
19290
- var debug = require_src3()("express:router");
18760
+ var debug = require_src()("express:router");
19291
18761
  var deprecate = require_depd()("express");
19292
18762
  var flatten = require_array_flatten();
19293
18763
  var parseUrl = require_parseurl();
@@ -19728,7 +19198,7 @@ var require_query = __commonJS({
19728
19198
  var require_view = __commonJS({
19729
19199
  "../../../node_modules/express/lib/view.js"(exports, module) {
19730
19200
  "use strict";
19731
- var debug = require_src3()("express:view");
19201
+ var debug = require_src()("express:view");
19732
19202
  var path2 = __require("path");
19733
19203
  var fs2 = __require("fs");
19734
19204
  var dirname = path2.dirname;
@@ -19867,9 +19337,9 @@ var require_safe_buffer = __commonJS({
19867
19337
  }
19868
19338
  });
19869
19339
 
19870
- // ../../../node_modules/express/node_modules/content-disposition/index.js
19340
+ // ../../../node_modules/content-disposition/index.js
19871
19341
  var require_content_disposition = __commonJS({
19872
- "../../../node_modules/express/node_modules/content-disposition/index.js"(exports, module) {
19342
+ "../../../node_modules/content-disposition/index.js"(exports, module) {
19873
19343
  "use strict";
19874
19344
  module.exports = contentDisposition;
19875
19345
  module.exports.parse = parse;
@@ -20042,7 +19512,7 @@ var require_content_disposition = __commonJS({
20042
19512
  });
20043
19513
 
20044
19514
  // ../../../node_modules/send/node_modules/debug/node_modules/ms/index.js
20045
- var require_ms4 = __commonJS({
19515
+ var require_ms3 = __commonJS({
20046
19516
  "../../../node_modules/send/node_modules/debug/node_modules/ms/index.js"(exports, module) {
20047
19517
  "use strict";
20048
19518
  var s = 1e3;
@@ -20145,7 +19615,7 @@ var require_ms4 = __commonJS({
20145
19615
  });
20146
19616
 
20147
19617
  // ../../../node_modules/send/node_modules/debug/src/debug.js
20148
- var require_debug4 = __commonJS({
19618
+ var require_debug3 = __commonJS({
20149
19619
  "../../../node_modules/send/node_modules/debug/src/debug.js"(exports, module) {
20150
19620
  "use strict";
20151
19621
  exports = module.exports = createDebug.debug = createDebug["default"] = createDebug;
@@ -20153,7 +19623,7 @@ var require_debug4 = __commonJS({
20153
19623
  exports.disable = disable;
20154
19624
  exports.enable = enable;
20155
19625
  exports.enabled = enabled;
20156
- exports.humanize = require_ms4();
19626
+ exports.humanize = require_ms3();
20157
19627
  exports.names = [];
20158
19628
  exports.skips = [];
20159
19629
  exports.formatters = {};
@@ -20258,10 +19728,10 @@ var require_debug4 = __commonJS({
20258
19728
  });
20259
19729
 
20260
19730
  // ../../../node_modules/send/node_modules/debug/src/browser.js
20261
- var require_browser4 = __commonJS({
19731
+ var require_browser3 = __commonJS({
20262
19732
  "../../../node_modules/send/node_modules/debug/src/browser.js"(exports, module) {
20263
19733
  "use strict";
20264
- exports = module.exports = require_debug4();
19734
+ exports = module.exports = require_debug3();
20265
19735
  exports.log = log;
20266
19736
  exports.formatArgs = formatArgs;
20267
19737
  exports.save = save;
@@ -20351,12 +19821,12 @@ var require_browser4 = __commonJS({
20351
19821
  });
20352
19822
 
20353
19823
  // ../../../node_modules/send/node_modules/debug/src/node.js
20354
- var require_node4 = __commonJS({
19824
+ var require_node3 = __commonJS({
20355
19825
  "../../../node_modules/send/node_modules/debug/src/node.js"(exports, module) {
20356
19826
  "use strict";
20357
19827
  var tty = __require("tty");
20358
19828
  var util = __require("util");
20359
- exports = module.exports = require_debug4();
19829
+ exports = module.exports = require_debug3();
20360
19830
  exports.init = init;
20361
19831
  exports.log = log;
20362
19832
  exports.formatArgs = formatArgs;
@@ -20488,13 +19958,13 @@ var require_node4 = __commonJS({
20488
19958
  });
20489
19959
 
20490
19960
  // ../../../node_modules/send/node_modules/debug/src/index.js
20491
- var require_src4 = __commonJS({
19961
+ var require_src3 = __commonJS({
20492
19962
  "../../../node_modules/send/node_modules/debug/src/index.js"(exports, module) {
20493
19963
  "use strict";
20494
19964
  if (typeof process !== "undefined" && process.type === "renderer") {
20495
- module.exports = require_browser4();
19965
+ module.exports = require_browser3();
20496
19966
  } else {
20497
- module.exports = require_node4();
19967
+ module.exports = require_node3();
20498
19968
  }
20499
19969
  }
20500
19970
  });
@@ -20685,7 +20155,7 @@ var require_mime = __commonJS({
20685
20155
  });
20686
20156
 
20687
20157
  // ../../../node_modules/ms/index.js
20688
- var require_ms5 = __commonJS({
20158
+ var require_ms4 = __commonJS({
20689
20159
  "../../../node_modules/ms/index.js"(exports, module) {
20690
20160
  "use strict";
20691
20161
  var s = 1e3;
@@ -20893,7 +20363,7 @@ var require_send = __commonJS({
20893
20363
  "../../../node_modules/send/index.js"(exports, module) {
20894
20364
  "use strict";
20895
20365
  var createError = require_http_errors();
20896
- var debug = require_src4()("send");
20366
+ var debug = require_src3()("send");
20897
20367
  var deprecate = require_depd()("send");
20898
20368
  var destroy = require_destroy();
20899
20369
  var encodeUrl = require_encodeurl();
@@ -20902,7 +20372,7 @@ var require_send = __commonJS({
20902
20372
  var fresh = require_fresh();
20903
20373
  var fs2 = __require("fs");
20904
20374
  var mime = require_mime();
20905
- var ms = require_ms5();
20375
+ var ms = require_ms4();
20906
20376
  var onFinished = require_on_finished();
20907
20377
  var parseRange = require_range_parser();
20908
20378
  var path2 = __require("path");
@@ -22772,7 +22242,7 @@ var require_application = __commonJS({
22772
22242
  var methods = require_methods();
22773
22243
  var middleware = require_init();
22774
22244
  var query = require_query();
22775
- var debug = require_src3()("express:application");
22245
+ var debug = require_src()("express:application");
22776
22246
  var View = require_view();
22777
22247
  var http = __require("http");
22778
22248
  var compileETag = require_utils2().compileETag;
@@ -32471,9 +31941,9 @@ var require_request = __commonJS({
32471
31941
  }
32472
31942
  });
32473
31943
 
32474
- // ../../../node_modules/cookie-signature/index.js
31944
+ // ../../../node_modules/express/node_modules/cookie-signature/index.js
32475
31945
  var require_cookie_signature = __commonJS({
32476
- "../../../node_modules/cookie-signature/index.js"(exports) {
31946
+ "../../../node_modules/express/node_modules/cookie-signature/index.js"(exports) {
32477
31947
  "use strict";
32478
31948
  var crypto3 = __require("crypto");
32479
31949
  exports.sign = function(val, secret) {
@@ -34079,17 +33549,59 @@ FrameworkDebugMiddleware = _ts_decorate7([
34079
33549
  ])
34080
33550
  ], FrameworkDebugMiddleware);
34081
33551
 
33552
+ // src/middlewares/legacy-path-redirect/index.ts
33553
+ import { Injectable as Injectable8 } from "@nestjs/common";
33554
+ function _ts_decorate8(decorators, target, key, desc) {
33555
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33556
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33557
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33558
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33559
+ }
33560
+ __name(_ts_decorate8, "_ts_decorate");
33561
+ var OLD_PATH_PREFIX = {
33562
+ preview: "/af/p",
33563
+ runtime: "/spark/faas"
33564
+ };
33565
+ var LegacyPathRedirectMiddleware = class {
33566
+ static {
33567
+ __name(this, "LegacyPathRedirectMiddleware");
33568
+ }
33569
+ use(req, res, next) {
33570
+ const basePath = process.env.CLIENT_BASE_PATH ?? "";
33571
+ if (!/^\/app\/[^/]/.test(basePath)) {
33572
+ return next();
33573
+ }
33574
+ if (req.path.startsWith("/api")) {
33575
+ return next();
33576
+ }
33577
+ const { appId, env } = req.userContext ?? {};
33578
+ if (!appId || !env) {
33579
+ return next();
33580
+ }
33581
+ const oldPrefix = `${OLD_PATH_PREFIX[env]}/${appId}`;
33582
+ if (!req.path.startsWith(oldPrefix)) {
33583
+ return next();
33584
+ }
33585
+ const pathSuffix = req.path.slice(oldPrefix.length) || "/";
33586
+ const querySuffix = req.originalUrl.slice(req.path.length);
33587
+ return res.redirect(302, `${basePath}${pathSuffix}${querySuffix}`);
33588
+ }
33589
+ };
33590
+ LegacyPathRedirectMiddleware = _ts_decorate8([
33591
+ Injectable8()
33592
+ ], LegacyPathRedirectMiddleware);
33593
+
34082
33594
  // src/services/platform-http-client.service.ts
34083
- import { Injectable as Injectable8, Logger as Logger2 } from "@nestjs/common";
33595
+ import { Injectable as Injectable9, Logger as Logger2 } from "@nestjs/common";
34084
33596
  import { HttpClient } from "@lark-apaas/http-client";
34085
33597
  import { RequestContextService as RequestContextService2 } from "@lark-apaas/nestjs-common";
34086
- function _ts_decorate8(decorators, target, key, desc) {
33598
+ function _ts_decorate9(decorators, target, key, desc) {
34087
33599
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34088
33600
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34089
33601
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
34090
33602
  return c > 3 && r && Object.defineProperty(target, key, r), r;
34091
33603
  }
34092
- __name(_ts_decorate8, "_ts_decorate");
33604
+ __name(_ts_decorate9, "_ts_decorate");
34093
33605
  function _ts_metadata5(k, v) {
34094
33606
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
34095
33607
  }
@@ -34284,8 +33796,8 @@ var PlatformHttpClientService = class _PlatformHttpClientService {
34284
33796
  });
34285
33797
  }
34286
33798
  };
34287
- PlatformHttpClientService = _ts_decorate8([
34288
- Injectable8(),
33799
+ PlatformHttpClientService = _ts_decorate9([
33800
+ Injectable9(),
34289
33801
  _ts_metadata5("design:type", Function),
34290
33802
  _ts_metadata5("design:paramtypes", [
34291
33803
  typeof RequestContextService2 === "undefined" ? Object : RequestContextService2
@@ -34296,16 +33808,16 @@ PlatformHttpClientService = _ts_decorate8([
34296
33808
  var DISABLE_DATAPASS = process.env.FORCE_FRAMEWORK_DISABLE_DATAPASS === "true";
34297
33809
 
34298
33810
  // src/services/file.service.ts
34299
- import { Injectable as Injectable9, Inject as Inject2, Logger as Logger3 } from "@nestjs/common";
33811
+ import { Injectable as Injectable10, Inject as Inject2, Logger as Logger3 } from "@nestjs/common";
34300
33812
  import { ObservableService, RequestContextService as RequestContextService3, PLATFORM_HTTP_CLIENT as PLATFORM_HTTP_CLIENT2, OBSERVABLE_SERVICE } from "@lark-apaas/nestjs-common";
34301
33813
  import { FileService as FileServiceCore, FileDownloadBuilder } from "@lark-apaas/file-service";
34302
- function _ts_decorate9(decorators, target, key, desc) {
33814
+ function _ts_decorate10(decorators, target, key, desc) {
34303
33815
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34304
33816
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34305
33817
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
34306
33818
  return c > 3 && r && Object.defineProperty(target, key, r), r;
34307
33819
  }
34308
- __name(_ts_decorate9, "_ts_decorate");
33820
+ __name(_ts_decorate10, "_ts_decorate");
34309
33821
  function _ts_metadata6(k, v) {
34310
33822
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
34311
33823
  }
@@ -34670,8 +34182,8 @@ var FileService = class {
34670
34182
  }
34671
34183
  }
34672
34184
  };
34673
- FileService = _ts_decorate9([
34674
- Injectable9(),
34185
+ FileService = _ts_decorate10([
34186
+ Injectable10(),
34675
34187
  _ts_param2(1, Inject2(PLATFORM_HTTP_CLIENT2)),
34676
34188
  _ts_param2(2, Inject2(OBSERVABLE_SERVICE)),
34677
34189
  _ts_metadata6("design:type", Function),
@@ -34694,13 +34206,13 @@ import { ApiExcludeController } from "@nestjs/swagger";
34694
34206
  import * as fs from "fs";
34695
34207
  import * as path from "path";
34696
34208
  import * as crypto2 from "crypto";
34697
- function _ts_decorate10(decorators, target, key, desc) {
34209
+ function _ts_decorate11(decorators, target, key, desc) {
34698
34210
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34699
34211
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34700
34212
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
34701
34213
  return c > 3 && r && Object.defineProperty(target, key, r), r;
34702
34214
  }
34703
- __name(_ts_decorate10, "_ts_decorate");
34215
+ __name(_ts_decorate11, "_ts_decorate");
34704
34216
  function _ts_metadata7(k, v) {
34705
34217
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
34706
34218
  }
@@ -34853,7 +34365,7 @@ var StaticController = class _StaticController {
34853
34365
  }
34854
34366
  }
34855
34367
  };
34856
- _ts_decorate10([
34368
+ _ts_decorate11([
34857
34369
  Get("*"),
34858
34370
  _ts_param3(0, Param()),
34859
34371
  _ts_param3(1, Req()),
@@ -34866,7 +34378,7 @@ _ts_decorate10([
34866
34378
  ]),
34867
34379
  _ts_metadata7("design:returntype", void 0)
34868
34380
  ], StaticController.prototype, "serveFile", null);
34869
- StaticController = _ts_decorate10([
34381
+ StaticController = _ts_decorate11([
34870
34382
  ApiExcludeController(),
34871
34383
  Controller("static"),
34872
34384
  _ts_metadata7("design:type", Function),
@@ -34874,19 +34386,19 @@ StaticController = _ts_decorate10([
34874
34386
  ], StaticController);
34875
34387
 
34876
34388
  // src/modules/static/static.module.ts
34877
- function _ts_decorate11(decorators, target, key, desc) {
34389
+ function _ts_decorate12(decorators, target, key, desc) {
34878
34390
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34879
34391
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34880
34392
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
34881
34393
  return c > 3 && r && Object.defineProperty(target, key, r), r;
34882
34394
  }
34883
- __name(_ts_decorate11, "_ts_decorate");
34395
+ __name(_ts_decorate12, "_ts_decorate");
34884
34396
  var StaticModule = class {
34885
34397
  static {
34886
34398
  __name(this, "StaticModule");
34887
34399
  }
34888
34400
  };
34889
- StaticModule = _ts_decorate11([
34401
+ StaticModule = _ts_decorate12([
34890
34402
  Module({
34891
34403
  controllers: [
34892
34404
  StaticController
@@ -34895,13 +34407,13 @@ StaticModule = _ts_decorate11([
34895
34407
  ], StaticModule);
34896
34408
 
34897
34409
  // src/modules/platform/module.ts
34898
- function _ts_decorate12(decorators, target, key, desc) {
34410
+ function _ts_decorate13(decorators, target, key, desc) {
34899
34411
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
34900
34412
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
34901
34413
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
34902
34414
  return c > 3 && r && Object.defineProperty(target, key, r), r;
34903
34415
  }
34904
- __name(_ts_decorate12, "_ts_decorate");
34416
+ __name(_ts_decorate13, "_ts_decorate");
34905
34417
  var PLATFORM_MODULE_OPTIONS = /* @__PURE__ */ Symbol("PLATFORM_MODULE_OPTIONS");
34906
34418
  var PlatformModule = class _PlatformModule {
34907
34419
  static {
@@ -35041,6 +34553,7 @@ var PlatformModule = class _PlatformModule {
35041
34553
  consumer.apply(UserContextMiddleware, RequestContextMiddleware, LoggerContextMiddleware, ObservableTraceMiddleware, ...DISABLE_DATAPASS ? [] : [
35042
34554
  SqlExecutionContextMiddleware
35043
34555
  ]).forRoutes("/*");
34556
+ consumer.apply(LegacyPathRedirectMiddleware).forRoutes("/*");
35044
34557
  consumer.apply(CsrfTokenMiddleware, ViewContextMiddleware).exclude("/api/(.*)", "/static/(.*)").forRoutes("*");
35045
34558
  if (options.enableCsrf !== false) {
35046
34559
  const csrfRoutes = options.csrfRoutes || "/api/*";
@@ -35054,7 +34567,7 @@ var PlatformModule = class _PlatformModule {
35054
34567
  }
35055
34568
  }
35056
34569
  };
35057
- PlatformModule = _ts_decorate12([
34570
+ PlatformModule = _ts_decorate13([
35058
34571
  Global(),
35059
34572
  Module2({})
35060
34573
  ], PlatformModule);
@@ -35116,6 +34629,7 @@ export {
35116
34629
  DevToolsModule,
35117
34630
  DevToolsV2Module2 as DevToolsV2Module,
35118
34631
  FileService,
34632
+ LegacyPathRedirectMiddleware,
35119
34633
  PlatformHttpClientService,
35120
34634
  PlatformModule,
35121
34635
  StaticModule,