murlock 3.2.0-beta.1 → 3.2.1-beta.1
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/als/als-manager.d.ts +19 -4
- package/dist/als/als-manager.js +47 -25
- package/dist/als/als-manager.js.map +1 -1
- package/dist/als/als.module.d.ts +4 -0
- package/dist/als/als.module.js +16 -0
- package/dist/als/als.module.js.map +1 -0
- package/dist/interceptors/async-local-storage.interceptor.js +4 -19
- package/dist/interceptors/async-local-storage.interceptor.js.map +1 -1
- package/dist/murlock.module.js +6 -4
- package/dist/murlock.module.js.map +1 -1
- package/dist/murlock.service.d.ts +0 -1
- package/dist/murlock.service.js +1 -14
- package/dist/murlock.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +18 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/uuid-generator.d.ts +1 -0
- package/dist/utils/uuid-generator.js +13 -0
- package/dist/utils/uuid-generator.js.map +1 -0
- package/package.json +7 -1
- package/.github/workflows/release.yml +0 -29
- package/.husky/commit-msg +0 -4
- package/commitlint.config.js +0 -6
- package/tsconfig.json +0 -21
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './uuid-generator';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./uuid-generator"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function generateUuid(): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateUuid = void 0;
|
|
4
|
+
function generateUuid() {
|
|
5
|
+
let d = Date.now();
|
|
6
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
7
|
+
const r = (d + Math.random() * 16) % 16 | 0;
|
|
8
|
+
d = Math.floor(d / 16);
|
|
9
|
+
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
exports.generateUuid = generateUuid;
|
|
13
|
+
//# sourceMappingURL=uuid-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid-generator.js","sourceRoot":"","sources":["../../lib/utils/uuid-generator.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY;IAC1B,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACnB,OAAO,sCAAsC,CAAC,OAAO,CACnD,OAAO,EACP,CAAC,CAAS,EAAE,EAAE;QACZ,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC5C,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;QACvB,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACxD,CAAC,CACF,CAAC;AACJ,CAAC;AAVD,oCAUC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "murlock",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1-beta.1",
|
|
4
4
|
"description": "A distributed locking solution for NestJS, providing a decorator for critical sections with Redis-based synchronization.",
|
|
5
5
|
"author": "https://github.com/felanios",
|
|
6
6
|
"homepage": "https://github.com/felanios/murlock#readme",
|
|
@@ -10,12 +10,14 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"copy-lua": "ncp lib/lua dist/lua/",
|
|
12
12
|
"prepare": "husky install",
|
|
13
|
+
"prebuild": "del-cli ./dist/*",
|
|
13
14
|
"build": "tsc && npm run copy-lua",
|
|
14
15
|
"release": "semantic-release"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
18
|
"@nestjs/common": ">=10.0.5",
|
|
18
19
|
"@nestjs/core": ">=10.0.5",
|
|
20
|
+
"del-cli": "^5.1.0",
|
|
19
21
|
"redis": "^4.6.10",
|
|
20
22
|
"reflect-metadata": "^0.1.13",
|
|
21
23
|
"rxjs": "^7.8.1"
|
|
@@ -72,5 +74,9 @@
|
|
|
72
74
|
"redis",
|
|
73
75
|
"decorator",
|
|
74
76
|
"microservices"
|
|
77
|
+
],
|
|
78
|
+
"files": [
|
|
79
|
+
"dist/**/*",
|
|
80
|
+
"README.md"
|
|
75
81
|
]
|
|
76
82
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- master
|
|
6
|
-
- beta
|
|
7
|
-
jobs:
|
|
8
|
-
build:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
steps:
|
|
11
|
-
- name: Checkout
|
|
12
|
-
uses: actions/checkout@v2
|
|
13
|
-
|
|
14
|
-
- name: Setup Node.js
|
|
15
|
-
uses: actions/setup-node@v2
|
|
16
|
-
with:
|
|
17
|
-
node-version: 18
|
|
18
|
-
|
|
19
|
-
- name: Install dependencies
|
|
20
|
-
run: npm ci
|
|
21
|
-
|
|
22
|
-
- name: Build
|
|
23
|
-
run: npm run build
|
|
24
|
-
|
|
25
|
-
- name: Release package
|
|
26
|
-
env:
|
|
27
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
28
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
29
|
-
run: npm run release
|
package/.husky/commit-msg
DELETED
package/commitlint.config.js
DELETED
package/tsconfig.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"removeComments": true,
|
|
6
|
-
"emitDecoratorMetadata": true,
|
|
7
|
-
"experimentalDecorators": true,
|
|
8
|
-
"target": "es6",
|
|
9
|
-
"sourceMap": true,
|
|
10
|
-
"outDir": "./dist",
|
|
11
|
-
"baseUrl": "./",
|
|
12
|
-
"incremental": true
|
|
13
|
-
},
|
|
14
|
-
"include": [
|
|
15
|
-
"lib/**/*.ts"
|
|
16
|
-
],
|
|
17
|
-
"exclude": [
|
|
18
|
-
"node_modules",
|
|
19
|
-
"dist"
|
|
20
|
-
]
|
|
21
|
-
}
|