@decoraxios/awe-axios-all 0.3.0 → 0.4.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 +14 -0
- package/README.md +2 -43
- package/index.cjs +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +13 -15
- package/dist/index.cjs +0 -29
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -3
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -5
- package/dist/index.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# @decoraxios/awe-axios-all
|
|
2
|
+
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4db6829: Unify the published package family around `decoraxios` and `@decoraxios/*`, while keeping the previous `awe-axios` and `@decoraxios/awe-axios-*` names as compatibility aliases.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [4db6829]
|
|
12
|
+
- @decoraxios/all@0.4.0
|
|
13
|
+
|
|
14
|
+
This package is maintained as a compatibility alias for `@decoraxios/all`.
|
package/README.md
CHANGED
|
@@ -1,46 +1,5 @@
|
|
|
1
1
|
# @decoraxios/awe-axios-all
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Compatibility alias package for `@decoraxios/all`.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @decoraxios/awe-axios-all axios msw reflect-metadata
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Load `reflect-metadata` once in your app entry before using IoC or AOP decorators:
|
|
14
|
-
|
|
15
|
-
```ts
|
|
16
|
-
import 'reflect-metadata';
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Quick Example
|
|
20
|
-
|
|
21
|
-
```ts
|
|
22
|
-
import { type ApiCall, Component, Get, HttpApi, HttpResponse, Inject, Mock } from '@decoraxios/awe-axios-all';
|
|
23
|
-
|
|
24
|
-
@HttpApi('https://api.example.com/users')
|
|
25
|
-
class UserApi {
|
|
26
|
-
@Get('/')
|
|
27
|
-
@Mock(() => HttpResponse.json([]))
|
|
28
|
-
listUsers(): ApiCall<Array<{ id: string; name: string }>> {
|
|
29
|
-
return undefined as never;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@Component()
|
|
34
|
-
class LoggerService {}
|
|
35
|
-
|
|
36
|
-
@Component()
|
|
37
|
-
class UserService {
|
|
38
|
-
@Inject(LoggerService)
|
|
39
|
-
logger!: LoggerService;
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
More documentation:
|
|
44
|
-
|
|
45
|
-
- English: <https://github.com/bloom-lmh/awe-axios#readme>
|
|
46
|
-
- 中文: <https://github.com/bloom-lmh/awe-axios/blob/master/README_CH.md>
|
|
5
|
+
New projects should install `@decoraxios/all` directly.
|
package/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@decoraxios/all');
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@decoraxios/all';
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@decoraxios/all';
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decoraxios/awe-axios-all",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Compatibility alias for @decoraxios/all",
|
|
5
5
|
"author": "SWUST-LMH <1357526355@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
|
-
"main": "./
|
|
9
|
-
"module": "./
|
|
10
|
-
"types": "./
|
|
8
|
+
"main": "./index.cjs",
|
|
9
|
+
"module": "./index.js",
|
|
10
|
+
"types": "./index.d.ts",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
13
|
"url": "https://github.com/bloom-lmh/awe-axios.git"
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
],
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
29
|
-
"types": "./
|
|
30
|
-
"import": "./
|
|
31
|
-
"require": "./
|
|
29
|
+
"types": "./index.d.ts",
|
|
30
|
+
"import": "./index.js",
|
|
31
|
+
"require": "./index.cjs"
|
|
32
32
|
},
|
|
33
33
|
"./package.json": "./package.json"
|
|
34
34
|
},
|
|
@@ -39,22 +39,20 @@
|
|
|
39
39
|
"node": ">=18"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
42
|
-
"
|
|
42
|
+
"index.js",
|
|
43
|
+
"index.cjs",
|
|
44
|
+
"index.d.ts",
|
|
43
45
|
"README.md",
|
|
46
|
+
"CHANGELOG.md",
|
|
44
47
|
"LICENSE"
|
|
45
48
|
],
|
|
46
49
|
"sideEffects": false,
|
|
47
50
|
"dependencies": {
|
|
48
|
-
"@decoraxios/
|
|
49
|
-
"@decoraxios/awe-axios-ioc-aop": "^0.3.0",
|
|
50
|
-
"@decoraxios/awe-axios-mock": "^0.3.0"
|
|
51
|
+
"@decoraxios/all": "^0.4.0"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
54
|
"axios": "^1.11.0",
|
|
54
55
|
"msw": "^2.11.6",
|
|
55
56
|
"reflect-metadata": "^0.2.2"
|
|
56
|
-
},
|
|
57
|
-
"scripts": {
|
|
58
|
-
"build": "tsup --config tsup.config.ts"
|
|
59
57
|
}
|
|
60
58
|
}
|
package/dist/index.cjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
|
|
17
|
-
// src/index.ts
|
|
18
|
-
var src_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(src_exports);
|
|
20
|
-
__reExport(src_exports, require("@decoraxios/awe-axios-core"), module.exports);
|
|
21
|
-
__reExport(src_exports, require("@decoraxios/awe-axios-mock"), module.exports);
|
|
22
|
-
__reExport(src_exports, require("@decoraxios/awe-axios-ioc-aop"), module.exports);
|
|
23
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
24
|
-
0 && (module.exports = {
|
|
25
|
-
...require("@decoraxios/awe-axios-core"),
|
|
26
|
-
...require("@decoraxios/awe-axios-mock"),
|
|
27
|
-
...require("@decoraxios/awe-axios-ioc-aop")
|
|
28
|
-
});
|
|
29
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from '@decoraxios/awe-axios-core';\nexport * from '@decoraxios/awe-axios-mock';\nexport * from '@decoraxios/awe-axios-ioc-aop';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;wBAAc,uCAAd;AACA,wBAAc,uCADd;AAEA,wBAAc,0CAFd;","names":[]}
|
package/dist/index.d.cts
DELETED
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from '@decoraxios/awe-axios-core';\nexport * from '@decoraxios/awe-axios-mock';\nexport * from '@decoraxios/awe-axios-ioc-aop';\n"],"mappings":";AAAA,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|