@aomex/internal-tools 3.8.1 → 3.9.0
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/CHANGELOG.md +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.9.0](https://github.com/aomex/aomex/compare/v3.8.1...v3.9.0) (2024-10-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aomex/internal-tools
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [3.8.1](https://github.com/aomex/aomex/compare/v3.8.0...v3.8.1) (2024-10-26)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @aomex/internal-tools
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -11,7 +11,10 @@ var sleep = (durationMS) => {
|
|
|
11
11
|
|
|
12
12
|
// src/index.ts
|
|
13
13
|
import { default as default2 } from "bytes";
|
|
14
|
+
import { OpenAPIV3 } from "openapi-types";
|
|
15
|
+
export * from "@i18nx/node";
|
|
14
16
|
export {
|
|
17
|
+
OpenAPIV3 as OpenAPI,
|
|
15
18
|
default2 as bytes,
|
|
16
19
|
sleep,
|
|
17
20
|
toArray
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/to-array.ts","../src/sleep.ts","../src/index.ts"],"sourcesContent":["/**\n * 返回数组,如果传入非数组,则会包装成只有一个元素的数组\n * @param data 非数组或者数组\n * @param unique 是否需要去重。默认:`false`\n */\nexport function toArray<T>(data: T | readonly T[], unique?: boolean): T[];\nexport function toArray<T>(data: T | T[], unique?: boolean): T[];\nexport function toArray<T>(data: T | T[], unique: boolean = false): T[] {\n return Array.isArray(data) ? (unique ? [...new Set(data)] : data) : [data];\n}\n","import timers from 'node:timers/promises';\n\n/**\n * 等待指定的时间(毫秒)后再往下执行\n */\nexport const sleep = (durationMS: number): Promise<void> => {\n return durationMS <= 0 ? Promise.resolve(void 0) : timers.setTimeout(durationMS);\n};\n","export * from './to-array';\nexport * from './sleep';\nexport * from './type';\nexport { default as bytes } from 'bytes';\n"],"mappings":";AAOO,SAAS,QAAW,MAAe,SAAkB,OAAY;AACtE,SAAO,MAAM,QAAQ,IAAI,IAAK,SAAS,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC,IAAI,OAAQ,CAAC,IAAI;AAC3E;;;ACTA,OAAO,YAAY;AAKZ,IAAM,QAAQ,CAAC,eAAsC;AAC1D,SAAO,cAAc,IAAI,QAAQ,QAAQ,MAAM,IAAI,OAAO,WAAW,UAAU;AACjF;;;ACJA,SAAoB,WAAXA,gBAAwB;","names":["default"]}
|
|
1
|
+
{"version":3,"sources":["../src/to-array.ts","../src/sleep.ts","../src/index.ts"],"sourcesContent":["/**\n * 返回数组,如果传入非数组,则会包装成只有一个元素的数组\n * @param data 非数组或者数组\n * @param unique 是否需要去重。默认:`false`\n */\nexport function toArray<T>(data: T | readonly T[], unique?: boolean): T[];\nexport function toArray<T>(data: T | T[], unique?: boolean): T[];\nexport function toArray<T>(data: T | T[], unique: boolean = false): T[] {\n return Array.isArray(data) ? (unique ? [...new Set(data)] : data) : [data];\n}\n","import timers from 'node:timers/promises';\n\n/**\n * 等待指定的时间(毫秒)后再往下执行\n */\nexport const sleep = (durationMS: number): Promise<void> => {\n return durationMS <= 0 ? Promise.resolve(void 0) : timers.setTimeout(durationMS);\n};\n","export * from './to-array';\nexport * from './sleep';\nexport * from './type';\nexport { default as bytes } from 'bytes';\nexport { OpenAPIV3 as OpenAPI } from 'openapi-types';\nexport * from '@i18nx/node';\n"],"mappings":";AAOO,SAAS,QAAW,MAAe,SAAkB,OAAY;AACtE,SAAO,MAAM,QAAQ,IAAI,IAAK,SAAS,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC,IAAI,OAAQ,CAAC,IAAI;AAC3E;;;ACTA,OAAO,YAAY;AAKZ,IAAM,QAAQ,CAAC,eAAsC;AAC1D,SAAO,cAAc,IAAI,QAAQ,QAAQ,MAAM,IAAI,OAAO,WAAW,UAAU;AACjF;;;ACJA,SAAoB,WAAXA,gBAAwB;AACjC,SAAsB,iBAAe;AACrC,cAAc;","names":["default"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aomex/internal-tools",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "aomex内部实用工具",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,8 +28,10 @@
|
|
|
28
28
|
"node": "^20.13.0 || ^22"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
+
"@i18nx/node": "^0.2.1",
|
|
31
32
|
"@types/bytes": "^3.1.4",
|
|
32
|
-
"bytes": "^3.1.2"
|
|
33
|
+
"bytes": "^3.1.2",
|
|
34
|
+
"openapi-types": "^12.1.3"
|
|
33
35
|
},
|
|
34
36
|
"scripts": {}
|
|
35
37
|
}
|