@wenex/sdk 1.1.31 → 1.1.33
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/README.md +45 -1
- package/common/core/utils/index.d.ts +1 -0
- package/common/core/utils/index.js +1 -0
- package/common/core/utils/index.js.map +1 -1
- package/common/core/utils/token.util.d.ts +2 -0
- package/common/core/utils/token.util.js +10 -0
- package/common/core/utils/token.util.js.map +1 -0
- package/common/types/context/configs/cqrs.type.d.ts +0 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,48 @@
|
|
|
1
1
|
# platform-sdk
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@wenex/sdk)
|
|
4
|
-
[](https://github.com/wenex-org/platform-sdk/actions/workflows/npm-ci.yml)
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Getting Started
|
|
9
|
+
|
|
10
|
+
Follow these steps to set up the project locally:
|
|
11
|
+
|
|
12
|
+
1. **Clone the repository:**
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git clone git@github.com:wenex-org/platform-sdk.git
|
|
16
|
+
cd platform-sdk
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. **Initialize Git submodules:**
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm run git:clone
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
3. **Install dependencies:**
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pnpm install
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
4. **Set up Husky Git hooks (for development):**
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm run husky
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Development
|
|
40
|
+
|
|
41
|
+
- Run `npm run husky` to enable Husky hooks during development.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## License
|
|
46
|
+
|
|
47
|
+
This project is licensed under the [Apache License](./LICENSE).
|
|
48
|
+
|
|
@@ -8,6 +8,7 @@ export * from './mixin.util';
|
|
|
8
8
|
export * from './net.util';
|
|
9
9
|
export * from './random.util';
|
|
10
10
|
export * from './repository.util';
|
|
11
|
+
export * from './token.util';
|
|
11
12
|
export * from './tools.util';
|
|
12
13
|
export * from './transform.util';
|
|
13
14
|
export * from './validation.util';
|
|
@@ -24,6 +24,7 @@ __exportStar(require("./mixin.util"), exports);
|
|
|
24
24
|
__exportStar(require("./net.util"), exports);
|
|
25
25
|
__exportStar(require("./random.util"), exports);
|
|
26
26
|
__exportStar(require("./repository.util"), exports);
|
|
27
|
+
__exportStar(require("./token.util"), exports);
|
|
27
28
|
__exportStar(require("./tools.util"), exports);
|
|
28
29
|
__exportStar(require("./transform.util"), exports);
|
|
29
30
|
__exportStar(require("./validation.util"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/core/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,kDAAgC;AAChC,gDAA8B;AAC9B,iDAA+B;AAC/B,gDAA8B;AAC9B,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,gDAA8B;AAC9B,oDAAkC;AAClC,+CAA6B;AAC7B,mDAAiC;AACjC,oDAAkC;AAClC,iDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/core/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,kDAAgC;AAChC,gDAA8B;AAC9B,iDAA+B;AAC/B,gDAA8B;AAC9B,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,gDAA8B;AAC9B,oDAAkC;AAClC,+CAA6B;AAC7B,+CAA6B;AAC7B,mDAAiC;AACjC,oDAAkC;AAClC,iDAA+B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tokenIdentity = void 0;
|
|
4
|
+
const tokenIdentity = (token) => {
|
|
5
|
+
if (!token)
|
|
6
|
+
throw new Error('token is required');
|
|
7
|
+
return token.uid || token.aid || token.cid;
|
|
8
|
+
};
|
|
9
|
+
exports.tokenIdentity = tokenIdentity;
|
|
10
|
+
//# sourceMappingURL=token.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.util.js","sourceRoot":"","sources":["../../../src/common/core/utils/token.util.ts"],"names":[],"mappings":";;;AAEO,MAAM,aAAa,GAAG,CAAC,KAA2B,EAAE,EAAE;IAC3D,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACjD,OAAO,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC;AAC7C,CAAC,CAAC;AAHW,QAAA,aAAa,iBAGxB"}
|