@nocobase/utils 1.7.0-beta.2 → 1.7.0-beta.4

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.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare function md5(input: string): string;
package/lib/crypto.js ADDED
@@ -0,0 +1,41 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
15
+ var __export = (target, all) => {
16
+ for (var name in all)
17
+ __defProp(target, name, { get: all[name], enumerable: true });
18
+ };
19
+ var __copyProps = (to, from, except, desc) => {
20
+ if (from && typeof from === "object" || typeof from === "function") {
21
+ for (let key of __getOwnPropNames(from))
22
+ if (!__hasOwnProp.call(to, key) && key !== except)
23
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
24
+ }
25
+ return to;
26
+ };
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var crypto_exports = {};
29
+ __export(crypto_exports, {
30
+ md5: () => md5
31
+ });
32
+ module.exports = __toCommonJS(crypto_exports);
33
+ var import_crypto = require("crypto");
34
+ function md5(input) {
35
+ return (0, import_crypto.createHash)("md5").update(input).digest("hex");
36
+ }
37
+ __name(md5, "md5");
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ md5
41
+ });
package/lib/index.d.ts CHANGED
@@ -7,10 +7,12 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import lodash from 'lodash';
10
- import { dayjs } from './dayjs';
10
+ export { lodash };
11
+ export { dayjs } from './dayjs';
11
12
  export * from './assign';
12
13
  export * from './collections-graph';
13
14
  export * from './common';
15
+ export * from './crypto';
14
16
  export * from './date';
15
17
  export * from './dayjs';
16
18
  export * from './forEach';
@@ -35,5 +37,4 @@ export * from './url';
35
37
  export * from './i18n';
36
38
  export * from './wrap-middleware';
37
39
  export * from './object-to-cli-args';
38
- export { dayjs, lodash };
39
40
  export { Schema } from '@formily/json-schema';
package/lib/index.js CHANGED
@@ -47,6 +47,7 @@ var import_dayjs = require("./dayjs");
47
47
  __reExport(src_exports, require("./assign"), module.exports);
48
48
  __reExport(src_exports, require("./collections-graph"), module.exports);
49
49
  __reExport(src_exports, require("./common"), module.exports);
50
+ __reExport(src_exports, require("./crypto"), module.exports);
50
51
  __reExport(src_exports, require("./date"), module.exports);
51
52
  __reExport(src_exports, require("./dayjs"), module.exports);
52
53
  __reExport(src_exports, require("./forEach"), module.exports);
@@ -80,6 +81,7 @@ var import_json_schema = require("@formily/json-schema");
80
81
  ...require("./assign"),
81
82
  ...require("./collections-graph"),
82
83
  ...require("./common"),
84
+ ...require("./crypto"),
83
85
  ...require("./date"),
84
86
  ...require("./dayjs"),
85
87
  ...require("./forEach"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/utils",
3
- "version": "1.7.0-beta.2",
3
+ "version": "1.7.0-beta.4",
4
4
  "main": "lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "license": "AGPL-3.0",
@@ -16,5 +16,5 @@
16
16
  "multer": "^1.4.5-lts.1",
17
17
  "object-path": "^0.11.8"
18
18
  },
19
- "gitHead": "58b206bdfca521e79a69989ca55dd19075dca523"
19
+ "gitHead": "bf1fbeef48ab69fb3d417f4d75bf3f22031e29f8"
20
20
  }