@nocobase/utils 1.2.34-alpha → 1.2.36-alpha

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/lib/assign.js CHANGED
@@ -89,7 +89,7 @@ mergeStrategies.set("orMerge", (x, y) => {
89
89
  });
90
90
  mergeStrategies.set("deepMerge", (x, y) => {
91
91
  return (0, import_common.isPlainObject)(x) && (0, import_common.isPlainObject)(y) ? (0, import_deepmerge.default)(x, y, {
92
- arrayMerge: (x2, y2) => y2
92
+ arrayMerge: /* @__PURE__ */ __name((x2, y2) => y2, "arrayMerge")
93
93
  }) : y;
94
94
  });
95
95
  mergeStrategies.set("merge", (x, y) => {
@@ -54,8 +54,7 @@ const _CollectionsGraph = class _CollectionsGraph {
54
54
  for (const node of nodes) {
55
55
  const connected = graphlib.alg.preorder(graph, node);
56
56
  for (const connectedNode of connected) {
57
- if (excludes.includes(connectedNode))
58
- continue;
57
+ if (excludes.includes(connectedNode)) continue;
59
58
  connectedNodes.add(connectedNode);
60
59
  }
61
60
  }
@@ -78,7 +78,7 @@ function parse(value) {
78
78
  }
79
79
  }
80
80
  __name(parse, "parse");
81
- const parseString = (() => {
81
+ const parseString = /* @__PURE__ */ (() => {
82
82
  const regex = /{{(\w|:|[\s-+.,@/()?=*_$])+}}/g;
83
83
  return (str) => {
84
84
  let parameters = [];
package/lib/koa-multer.js CHANGED
@@ -52,16 +52,14 @@ function multer(options) {
52
52
  }
53
53
  __name(multer, "multer");
54
54
  function makePromise(multer2, name) {
55
- if (!multer2[name])
56
- return;
55
+ if (!multer2[name]) return;
57
56
  const fn = multer2[name];
58
57
  multer2[name] = function(...args) {
59
58
  const middleware = Reflect.apply(fn, this, args);
60
59
  return async (ctx, next) => {
61
60
  await new Promise((resolve, reject) => {
62
61
  middleware(ctx.req, ctx.res, (err) => {
63
- if (err)
64
- return reject(err);
62
+ if (err) return reject(err);
65
63
  if ("request" in ctx) {
66
64
  if (ctx.req.body) {
67
65
  ctx.request.body = ctx.req.body;
@@ -242,12 +242,12 @@ function utc2unit(options) {
242
242
  m = m.subtract(-1 * offset, unit);
243
243
  }
244
244
  const fn = {
245
- year: () => m.format("YYYY"),
246
- quarter: () => m.format("YYYY[Q]Q"),
247
- month: () => m.format("YYYY-MM"),
248
- week: () => m.format("gggg[w]ww"),
249
- isoWeek: () => m.format("GGGG[W]WW"),
250
- day: () => m.format("YYYY-MM-DD")
245
+ year: /* @__PURE__ */ __name(() => m.format("YYYY"), "year"),
246
+ quarter: /* @__PURE__ */ __name(() => m.format("YYYY[Q]Q"), "quarter"),
247
+ month: /* @__PURE__ */ __name(() => m.format("YYYY-MM"), "month"),
248
+ week: /* @__PURE__ */ __name(() => m.format("gggg[w]ww"), "week"),
249
+ isoWeek: /* @__PURE__ */ __name(() => m.format("GGGG[W]WW"), "isoWeek"),
250
+ day: /* @__PURE__ */ __name(() => m.format("YYYY-MM-DD"), "day")
251
251
  };
252
252
  const r = (_a = fn[unit]) == null ? void 0 : _a.call(fn);
253
253
  return timezone ? r + timezone : r;
package/lib/uid.js CHANGED
@@ -31,12 +31,10 @@ __export(uid_exports, {
31
31
  });
32
32
  module.exports = __toCommonJS(uid_exports);
33
33
  let IDX = 36, HEX = "";
34
- while (IDX--)
35
- HEX += IDX.toString(36);
34
+ while (IDX--) HEX += IDX.toString(36);
36
35
  function uid(len) {
37
36
  let str = "", num = len || 11;
38
- while (num--)
39
- str += HEX[Math.random() * 36 | 0];
37
+ while (num--) str += HEX[Math.random() * 36 | 0];
40
38
  return str;
41
39
  }
42
40
  __name(uid, "uid");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/utils",
3
- "version": "1.2.34-alpha",
3
+ "version": "1.2.36-alpha",
4
4
  "main": "lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "license": "AGPL-3.0",
@@ -14,5 +14,5 @@
14
14
  "multer": "^1.4.5-lts.1",
15
15
  "object-path": "^0.11.8"
16
16
  },
17
- "gitHead": "c62835e64106fcfb0b6554e75dac6c368276bcc2"
17
+ "gitHead": "850d812db1d8e7c0b62b77c6a262ab9faf9e203f"
18
18
  }