@saihu/common 1.1.89 → 1.1.91
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/util/index.d.ts
CHANGED
package/dist/util/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC"}
|
package/dist/util/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saihuAxios.d.ts","sourceRoot":"","sources":["../../src/util/saihuAxios.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,+BAUrB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.saihuAxios = void 0;
|
|
7
|
+
const axios_1 = __importDefault(require("axios"));
|
|
8
|
+
const json_bigint_1 = __importDefault(require("json-bigint"));
|
|
9
|
+
exports.saihuAxios = axios_1.default.create({
|
|
10
|
+
transformResponse: [
|
|
11
|
+
(data) => {
|
|
12
|
+
try {
|
|
13
|
+
return (0, json_bigint_1.default)({ storeAsString: true }).parse(data);
|
|
14
|
+
}
|
|
15
|
+
catch (e) {
|
|
16
|
+
return data;
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saihu/common",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.91",
|
|
4
4
|
"description": "Common utilities for NestJS applications",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/amqplib": "^0.10.7",
|
|
27
27
|
"@types/express": "^5.0.1",
|
|
28
|
+
"@types/json-bigint": "^1.0.4",
|
|
28
29
|
"@types/node": "^22.14.1",
|
|
29
30
|
"@types/passport": "^1.0.17",
|
|
30
31
|
"typescript": "^5.8.3"
|
|
@@ -38,11 +39,13 @@
|
|
|
38
39
|
"@nestjs/passport": "^11.0.5",
|
|
39
40
|
"amqp-connection-manager": "^5.0.0",
|
|
40
41
|
"amqplib": "^0.10.9",
|
|
42
|
+
"axios": "^1.13.2",
|
|
41
43
|
"class-transformer": "^0.5.1",
|
|
42
44
|
"class-validator": "^0.14.2",
|
|
43
45
|
"dayjs": "^1.11.13",
|
|
44
46
|
"express": "^5.1.0",
|
|
45
47
|
"ioredis": "^5.7.0",
|
|
48
|
+
"json-bigint": "^1.0.0",
|
|
46
49
|
"pinyin-pro": "^3.26.0"
|
|
47
50
|
}
|
|
48
51
|
}
|