@edgenets/utils 0.0.11 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
package/README.md
CHANGED
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
Edgenets utilities package containing common types and utilities.
|
4
4
|
|
5
|
-
---
|
6
|
-
|
7
|
-
用于存放各种实用工具函数、类型定义和常用的工具方法,如字符串处理、数组操作、日期格式化等。
|
8
|
-
|
9
|
-
---
|
10
|
-
|
11
5
|
## Installation
|
12
6
|
|
13
7
|
```bash
|
@@ -21,12 +15,12 @@ npm install @edgenets/utils
|
|
21
15
|
```typescript
|
22
16
|
import { capitalize, trim, unique, User } from "@edgenets/utils";
|
23
17
|
|
24
|
-
//
|
18
|
+
// use Tools
|
25
19
|
console.log(capitalize("hello")); // "Hello"
|
26
20
|
console.log(trim(" hello ")); // "hello"
|
27
21
|
console.log(unique([1, 2, 2, 3])); // [1, 2, 3]
|
28
22
|
|
29
|
-
//
|
23
|
+
// use User Type
|
30
24
|
const newUser: User.Profile = {
|
31
25
|
id: 1,
|
32
26
|
name: "John Doe",
|
@@ -35,42 +29,3 @@ const newUser: User.Profile = {
|
|
35
29
|
updatedAt: new Date(),
|
36
30
|
};
|
37
31
|
```
|
38
|
-
|
39
|
-
### 构建和发布
|
40
|
-
|
41
|
-
1. **构建**:运行 `npm run build`,会生成 `dist` 文件夹,包含编译后的 JavaScript 和类型定义文件。
|
42
|
-
|
43
|
-
2. **发布**:发布包到 npm,可以使用以下命令:
|
44
|
-
|
45
|
-
```bash
|
46
|
-
npm publish --access public
|
47
|
-
```
|
48
|
-
|
49
|
-
##### 包含内容
|
50
|
-
|
51
|
-
```text
|
52
|
-
@edgenets/utils
|
53
|
-
├── src
|
54
|
-
│ ├── types // 类型定义(如 User、Order 等)
|
55
|
-
│ │ ├── logger.ts
|
56
|
-
│ │ ├── product.ts
|
57
|
-
│ │ ├── order.ts
|
58
|
-
│ │ └── user.ts
|
59
|
-
│ ├── string
|
60
|
-
│ │ ├── capitalize.ts
|
61
|
-
│ │ └── trim.ts
|
62
|
-
│ ├── array
|
63
|
-
│ │ └── unique.ts
|
64
|
-
│ └── index.ts
|
65
|
-
├── package.json
|
66
|
-
├── tsconfig.json
|
67
|
-
└── README.md
|
68
|
-
```
|
69
|
-
|
70
|
-
```text
|
71
|
-
• 字符串处理函数
|
72
|
-
• 数组处理函数
|
73
|
-
• 日期处理函数
|
74
|
-
• 通用工具函数(如 debounce、throttle)
|
75
|
-
•
|
76
|
-
```
|
package/dist/types/order.d.ts
CHANGED
@@ -80,12 +80,14 @@ export interface OrderShipping {
|
|
80
80
|
export declare enum ShippingMethod {
|
81
81
|
Standard = "standard",
|
82
82
|
Express = "express",
|
83
|
-
Pickup = "pickup"
|
83
|
+
Pickup = "pickup",
|
84
|
+
Online = "online"
|
84
85
|
}
|
85
86
|
export declare enum ShippingStatus {
|
86
87
|
NotShipped = "not_shipped",
|
87
88
|
Shipped = "shipped",
|
88
|
-
Delivered = "delivered"
|
89
|
+
Delivered = "delivered",
|
90
|
+
Failed = "failed"
|
89
91
|
}
|
90
92
|
export interface OrderShippingAddress {
|
91
93
|
addressLine1: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"order.d.ts","sourceRoot":"","sources":["../../src/types/order.ts"],"names":[],"mappings":"AACA,UAAU,SAAS;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,UAAU,CAAC,EAAE,IAAI,CAAC;IAElB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,QAAQ,EAAE,aAAa,CAAC;IACxB,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,CAAC,EAAE,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36
36
|
ShippingMethod["Standard"] = "standard";
|
37
37
|
ShippingMethod["Express"] = "express";
|
38
38
|
ShippingMethod["Pickup"] = "pickup";
|
39
|
+
ShippingMethod["Online"] = "online";
|
39
40
|
})(ShippingMethod || (ShippingMethod = {}));
|
40
41
|
// 配送状态枚举
|
41
42
|
export var ShippingStatus;
|
@@ -43,5 +44,6 @@ export var ShippingStatus;
|
|
43
44
|
ShippingStatus["NotShipped"] = "not_shipped";
|
44
45
|
ShippingStatus["Shipped"] = "shipped";
|
45
46
|
ShippingStatus["Delivered"] = "delivered";
|
47
|
+
ShippingStatus["Failed"] = "failed";
|
46
48
|
})(ShippingStatus || (ShippingStatus = {}));
|
47
49
|
//# sourceMappingURL=order.js.map
|
package/dist/types/order.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../src/types/order.ts"],"names":[],"mappings":"AAsBA,SAAS;AACT,MAAM,CAAN,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,sCAAuB,CAAA;IACvB,sCAAuB,CAAA;IACvB,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;AACvB,CAAC,EANW,WAAW,KAAX,WAAW,QAMtB;AA+BD,SAAS;AACT,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;AACnB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED,SAAS;AACT,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,8BAAa,CAAA;IACb,kCAAiB,CAAA;AACnB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAED,SAAS;AACT,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,yCAAyB,CAAA;IACzB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;AACvB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAoBD,SAAS;AACT,MAAM,CAAN,IAAY,
|
1
|
+
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../src/types/order.ts"],"names":[],"mappings":"AAsBA,SAAS;AACT,MAAM,CAAN,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,sCAAuB,CAAA;IACvB,sCAAuB,CAAA;IACvB,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;AACvB,CAAC,EANW,WAAW,KAAX,WAAW,QAMtB;AA+BD,SAAS;AACT,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;AACnB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED,SAAS;AACT,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,8BAAa,CAAA;IACb,kCAAiB,CAAA;AACnB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAED,SAAS;AACT,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,yCAAyB,CAAA;IACzB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;AACvB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAoBD,SAAS;AACT,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;AACnB,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB;AAED,SAAS;AACT,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,4CAA0B,CAAA;IAC1B,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;AACnB,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB"}
|
@@ -1,16 +1,5 @@
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
-
});
|
9
|
-
};
|
10
1
|
export class Scheduler {
|
11
|
-
|
12
|
-
this.tasks = new Map();
|
13
|
-
}
|
2
|
+
tasks = new Map();
|
14
3
|
schedule(task, options) {
|
15
4
|
const { interval = 1000, // 默认 1000 毫秒
|
16
5
|
maxRecursions = 0, // 默认 不 迭代
|
@@ -22,14 +11,14 @@ export class Scheduler {
|
|
22
11
|
let counter = 0;
|
23
12
|
let retries = 0;
|
24
13
|
const startTime = Date.now();
|
25
|
-
const executeTask = () =>
|
14
|
+
const executeTask = async () => {
|
26
15
|
try {
|
27
16
|
if (maxTotalTime && Date.now() - startTime > maxTotalTime) {
|
28
17
|
console.log("达到总的最大执行时间,停止任务。");
|
29
18
|
this.cancelAll();
|
30
19
|
return;
|
31
20
|
}
|
32
|
-
const shouldContinue =
|
21
|
+
const shouldContinue = await Promise.race([
|
33
22
|
task(),
|
34
23
|
this.timeout(taskTimeout),
|
35
24
|
]);
|
@@ -38,33 +27,31 @@ export class Scheduler {
|
|
38
27
|
if (counter % logInterval === 0) {
|
39
28
|
console.log(`递归执行, 第 ${counter} 次, 已执行 ${(Date.now() - startTime) / 1000} 秒`);
|
40
29
|
}
|
41
|
-
this.tasks.set(setTimeout(() =>
|
42
|
-
|
43
|
-
}
|
30
|
+
this.tasks.set(setTimeout(async () => {
|
31
|
+
await executeTask();
|
32
|
+
}, interval), setTimeout(() => { }, interval));
|
44
33
|
}
|
45
34
|
else {
|
46
35
|
this.cancelAll();
|
47
36
|
}
|
48
37
|
}
|
49
38
|
catch (error) {
|
50
|
-
|
39
|
+
await this.handleTaskError(error, retries, maxRetries, executeTask, interval);
|
51
40
|
retries++;
|
52
41
|
}
|
53
|
-
}
|
42
|
+
};
|
54
43
|
executeTask();
|
55
44
|
}
|
56
|
-
handleTaskError(error, retries, maxRetries, retryTask, interval) {
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
}
|
67
|
-
});
|
45
|
+
async handleTaskError(error, retries, maxRetries, retryTask, interval) {
|
46
|
+
if (retries < maxRetries) {
|
47
|
+
console.error(`Retry attempt ${retries + 1} due to error: ${error}`);
|
48
|
+
await this.delay(interval * (retries + 1)); // 指数退避
|
49
|
+
await retryTask(); // 重新执行任务
|
50
|
+
}
|
51
|
+
else {
|
52
|
+
console.error("Max retries reached. Task execution stopped due to persistent errors.");
|
53
|
+
this.cancelAll();
|
54
|
+
}
|
68
55
|
}
|
69
56
|
timeout(ms) {
|
70
57
|
return new Promise((_, reject) => setTimeout(() => reject("Task timed out"), ms));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scheduler.util.js","sourceRoot":"","sources":["../../src/utils/scheduler.util.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"scheduler.util.js","sourceRoot":"","sources":["../../src/utils/scheduler.util.ts"],"names":[],"mappings":"AAWA,MAAM,OAAO,SAAS;IACZ,KAAK,GAAiD,IAAI,GAAG,EAAE,CAAC;IAEjE,QAAQ,CAAC,IAAU,EAAE,OAAyB;QACnD,MAAM,EACJ,QAAQ,GAAG,IAAI,EAAE,aAAa;QAC9B,aAAa,GAAG,CAAC,EAAE,UAAU;QAC7B,UAAU,GAAG,CAAC,EAAE,UAAU;QAC1B,WAAW,GAAG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