@xyo-network/shared 3.12.4 → 3.12.5

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.
@@ -0,0 +1,13 @@
1
+ import type { EventEmitter } from 'node:stream';
2
+ import type { Job } from './Job.ts';
3
+ /** @internal */
4
+ export interface DefineOptions {
5
+ lockLifetime?: number;
6
+ }
7
+ /** @internal */
8
+ export interface JobQueue extends EventEmitter {
9
+ define: (name: string, options: DefineOptions, processor: Job['task']) => void;
10
+ every: (interval: string, names: string | string[]) => Promise<void>;
11
+ start: () => Promise<unknown>;
12
+ }
13
+ //# sourceMappingURL=JobQueue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JobQueue.d.ts","sourceRoot":"","sources":["../../../src/Job/JobQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAEnC,gBAAgB;AAChB,MAAM,WAAW,aAAa;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,gBAAgB;AAChB,MAAM,WAAW,QAAS,SAAQ,YAAY;IAC5C,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAA;IAC9E,KAAK,EAAE,CACL,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAGrB,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,KAAK,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;CAC9B"}
@@ -1,3 +1,4 @@
1
1
  export * from './Job.ts';
2
2
  export * from './JobProvider.ts';
3
+ export * from './JobQueue.ts';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Job/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Job/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/shared",
3
- "version": "3.12.4",
3
+ "version": "3.12.5",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -29,7 +29,7 @@
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/types/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/logger": "^4.8.4"
32
+ "@xylabs/logger": "^4.8.7"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@xylabs/ts-scripts-yarn3": "^6.2.1",
@@ -0,0 +1,20 @@
1
+ import type { EventEmitter } from 'node:stream'
2
+
3
+ import type { Job } from './Job.ts'
4
+
5
+ /** @internal */
6
+ export interface DefineOptions {
7
+ lockLifetime?: number
8
+ }
9
+
10
+ /** @internal */
11
+ export interface JobQueue extends EventEmitter {
12
+ define: (name: string, options: DefineOptions, processor: Job['task']) => void
13
+ every: (
14
+ interval: string,
15
+ names: string | string[],
16
+ // data?: any,
17
+ // options?: JobOptions
18
+ ) => Promise<void>
19
+ start: () => Promise<unknown>
20
+ }
package/src/Job/index.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './Job.ts'
2
2
  export * from './JobProvider.ts'
3
+ export * from './JobQueue.ts'