@mr-aftab-ahmad-khan/servqueue 0.1.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 +5 -0
- package/LICENSE +21 -0
- package/README.md +32 -0
- package/dist/index.cjs +35 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/package.json +83 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Aftab Ahmad Khan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# servqueue
|
|
2
|
+
|
|
3
|
+
**Topics:** `jobs` · `mern-packages` · `merndev` · `mobile` · `nodejs` · `npm-pm` · `observability` · `queue` · `react` · `react-native` · `servqueue` · `typescript` · `workers`
|
|
4
|
+
|
|
5
|
+
**React Native** library.
|
|
6
|
+
|
|
7
|
+
Simple distributed queue management for MERN applications.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- delayed jobs
|
|
12
|
+
- retries
|
|
13
|
+
- worker balancing
|
|
14
|
+
- queue priorities
|
|
15
|
+
- job monitoring
|
|
16
|
+
- distributed processing
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { servqueue } from "@mr-aftab-ahmad-khan/servqueue";
|
|
22
|
+
|
|
23
|
+
await servqueue.add("email", payload);
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Why it matters
|
|
27
|
+
|
|
28
|
+
Queue systems are often overly complex or fragmented.
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
MIT
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
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 __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
servqueue: () => servqueue
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(src_exports);
|
|
26
|
+
var servqueue = {
|
|
27
|
+
async add(name, payload) {
|
|
28
|
+
return { name, payload, id: `${name}-${Date.now()}` };
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
servqueue
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export const servqueue = {\n async add(name: string, payload: unknown): Promise<{ name: string; payload: unknown; id: string }> {\n return { name, payload, id: `${name}-${Date.now()}` };\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,YAAY;AAAA,EACvB,MAAM,IAAI,MAAc,SAA2E;AACjG,WAAO,EAAE,MAAM,SAAS,IAAI,GAAG,IAAI,IAAI,KAAK,IAAI,CAAC,GAAG;AAAA,EACtD;AACF;","names":[]}
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export const servqueue = {\n async add(name: string, payload: unknown): Promise<{ name: string; payload: unknown; id: string }> {\n return { name, payload, id: `${name}-${Date.now()}` };\n },\n};\n"],"mappings":";AAAO,IAAM,YAAY;AAAA,EACvB,MAAM,IAAI,MAAc,SAA2E;AACjG,WAAO,EAAE,MAAM,SAAS,IAAI,GAAG,IAAI,IAAI,KAAK,IAAI,CAAC,GAAG;AAAA,EACtD;AACF;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mr-aftab-ahmad-khan/servqueue",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Simple distributed queue management for MERN applications.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE",
|
|
21
|
+
"CHANGELOG.md"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsup",
|
|
25
|
+
"test": "vitest run",
|
|
26
|
+
"typecheck": "tsc --noEmit",
|
|
27
|
+
"prepublishOnly": "npm run build"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"jobs",
|
|
31
|
+
"mern-packages",
|
|
32
|
+
"merndev",
|
|
33
|
+
"mobile",
|
|
34
|
+
"nodejs",
|
|
35
|
+
"npm-pm",
|
|
36
|
+
"observability",
|
|
37
|
+
"queue",
|
|
38
|
+
"react",
|
|
39
|
+
"react-native",
|
|
40
|
+
"servqueue",
|
|
41
|
+
"typescript",
|
|
42
|
+
"workers"
|
|
43
|
+
],
|
|
44
|
+
"dependencies": {},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/react": "^18.2.0",
|
|
47
|
+
"@types/react-native": "^0.72.0",
|
|
48
|
+
"react": "^18.2.0",
|
|
49
|
+
"react-native": "^0.74.0",
|
|
50
|
+
"tsup": "^8.0.0",
|
|
51
|
+
"typescript": "^5.4.0",
|
|
52
|
+
"vitest": "^1.4.0",
|
|
53
|
+
"@types/node": "^20.11.0"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"react": ">=18",
|
|
57
|
+
"react-native": ">=0.72"
|
|
58
|
+
},
|
|
59
|
+
"peerDependenciesMeta": {
|
|
60
|
+
"react": {
|
|
61
|
+
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"react-native": {
|
|
64
|
+
"optional": true
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"engines": {
|
|
68
|
+
"node": ">=18"
|
|
69
|
+
},
|
|
70
|
+
"author": "Aftab Ahmad Khan (https://github.com/aftab-ahmad-khan-dev)",
|
|
71
|
+
"repository": {
|
|
72
|
+
"type": "git",
|
|
73
|
+
"url": "git+https://github.com/NPM-Packages-Modules/react-native.git",
|
|
74
|
+
"directory": "servqueue"
|
|
75
|
+
},
|
|
76
|
+
"bugs": {
|
|
77
|
+
"url": "https://github.com/NPM-Packages-Modules/react-native/issues"
|
|
78
|
+
},
|
|
79
|
+
"homepage": "https://github.com/NPM-Packages-Modules/react-native/tree/main/servqueue",
|
|
80
|
+
"publishConfig": {
|
|
81
|
+
"access": "public"
|
|
82
|
+
}
|
|
83
|
+
}
|