@shrub/queue 0.5.50

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 jjvainav
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.
@@ -0,0 +1,3 @@
1
+ export * from "./module";
2
+ export * from "./queue";
3
+ export * from "./service";
package/dist/index.js ADDED
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./module"), exports);
14
+ __exportStar(require("./queue"), exports);
15
+ __exportStar(require("./service"), exports);
16
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEsMkNBQXlCO0FBQ3pCLDBDQUF3QjtBQUN4Qiw0Q0FBMEIifQ==
@@ -0,0 +1,12 @@
1
+ import { IModule, IModuleInitializer, IServiceRegistration } from "@shrub/core";
2
+ import { IQueueAdapter } from "./queue";
3
+ export declare const IQueueConfiguration: import("@shrub/core").IModuleConfigurationType<IQueueConfiguration>;
4
+ export interface IQueueConfiguration {
5
+ /** Registers a queue adapter. */
6
+ useQueue(adapter: IQueueAdapter): void;
7
+ }
8
+ export declare class QueueModule implements IModule {
9
+ readonly name = "queue";
10
+ initialize(init: IModuleInitializer): void;
11
+ configureServices(registration: IServiceRegistration): void;
12
+ }
package/dist/module.js ADDED
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QueueModule = exports.IQueueConfiguration = void 0;
4
+ const core_1 = require("@shrub/core");
5
+ const service_1 = require("./service");
6
+ exports.IQueueConfiguration = core_1.createConfig();
7
+ class QueueModule {
8
+ constructor() {
9
+ this.name = "queue";
10
+ }
11
+ initialize(init) {
12
+ init.config(exports.IQueueConfiguration).register(({ services }) => ({
13
+ useQueue: adapter => services.get(service_1.IQueueAdapterService).register(adapter)
14
+ }));
15
+ }
16
+ configureServices(registration) {
17
+ const factory = new core_1.SingletonServiceFactory(service_1.QueueService);
18
+ registration.registerSingleton(service_1.IQueueService, factory);
19
+ registration.registerSingleton(service_1.IQueueAdapterService, factory);
20
+ }
21
+ }
22
+ exports.QueueModule = QueueModule;
23
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL21vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxzQ0FBdUg7QUFFdkgsdUNBQThFO0FBRWpFLFFBQUEsbUJBQW1CLEdBQUcsbUJBQVksRUFBdUIsQ0FBQztBQU12RSxNQUFhLFdBQVc7SUFBeEI7UUFDYSxTQUFJLEdBQUcsT0FBTyxDQUFDO0lBYTVCLENBQUM7SUFYRyxVQUFVLENBQUMsSUFBd0I7UUFDL0IsSUFBSSxDQUFDLE1BQU0sQ0FBQywyQkFBbUIsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxDQUFDLEVBQUUsUUFBUSxFQUFFLEVBQUUsRUFBRSxDQUFDLENBQUM7WUFDekQsUUFBUSxFQUFFLE9BQU8sQ0FBQyxFQUFFLENBQUMsUUFBUSxDQUFDLEdBQUcsQ0FBQyw4QkFBb0IsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUM7U0FDNUUsQ0FBQyxDQUFDLENBQUM7SUFDUixDQUFDO0lBRUQsaUJBQWlCLENBQUMsWUFBa0M7UUFDaEQsTUFBTSxPQUFPLEdBQUcsSUFBSSw4QkFBdUIsQ0FBQyxzQkFBWSxDQUFDLENBQUM7UUFDMUQsWUFBWSxDQUFDLGlCQUFpQixDQUFDLHVCQUFhLEVBQUUsT0FBTyxDQUFDLENBQUM7UUFDdkQsWUFBWSxDQUFDLGlCQUFpQixDQUFDLDhCQUFvQixFQUFFLE9BQU8sQ0FBQyxDQUFDO0lBQ2xFLENBQUM7Q0FDSjtBQWRELGtDQWNDIn0=
@@ -0,0 +1,77 @@
1
+ import { IEvent } from "@sprig/event-emitter";
2
+ export declare type ProcessJobCallback = (job: IJob) => Promise<void | any>;
3
+ /** Defines the API for a queue. */
4
+ export interface IQueue {
5
+ /** An event that is raised when a job has completed. */
6
+ readonly onJobCompleted: IEvent<IJobCompletedEventArgs>;
7
+ /** An event that is raised when a job has failed. */
8
+ readonly onJobFailed: IEvent<IJobFailedEventArgs>;
9
+ /** An event that is raised when a job has reported progress. */
10
+ readonly onJobProgress: IEvent<IJobProgressEventArgs>;
11
+ /** Adds a job to the queue. */
12
+ add(options: IJobOptions): Promise<IJob>;
13
+ /** Registers a callback for handling/processing jobs. */
14
+ process(options: IProcessOptions): IWorker;
15
+ }
16
+ /** Responsible for providing access to a queue. */
17
+ export interface IQueueAdapter {
18
+ /** Gets a queue with the specified name or undefined if the adapter does not support/recognize the given queue name. */
19
+ getQueue(name: string): IQueue | undefined;
20
+ }
21
+ /** Represents a specific instance of a job in the queue. */
22
+ export interface IJob {
23
+ readonly id: string;
24
+ readonly data: any;
25
+ readonly progress: number | object;
26
+ updateProgress(progress: number | object): Promise<void>;
27
+ }
28
+ /** Defines options for creating jobs. */
29
+ export interface IJobOptions {
30
+ /** A name for the job. */
31
+ readonly name?: string;
32
+ /** Data to pass to the job. */
33
+ readonly data?: any;
34
+ /** The amount of time (in milliseconds) to delay before the job can be processed; if not defined, the job can be processed immediately. */
35
+ readonly delay?: number;
36
+ /** Options for repeatable jobs. */
37
+ readonly repeat?: IJobRepeatOptions;
38
+ }
39
+ /** Defines options for a repeatable job. */
40
+ export interface IJobRepeatOptions {
41
+ /** A cron expression descrribing the repeat pattern. */
42
+ readonly cron?: string;
43
+ /** True if the job should be queued immeiately for execution; otherwise, the first job won't be scheduled until the next cron time. The default is false. */
44
+ readonly immediate?: boolean;
45
+ }
46
+ /** Defines options for registering a process for handling jobs. */
47
+ export interface IProcessOptions {
48
+ /** A callback for handling jobs. */
49
+ readonly callback: ProcessJobCallback;
50
+ /** Optionally specifies the maximum number of parallel jobs that can be processed at once; if not specified, the underlying queue's default will be used. */
51
+ readonly concurrency?: number;
52
+ }
53
+ /** Defines a worker responsible for processing jobs. */
54
+ export interface IWorker {
55
+ /** Closes the worker and all underlying connections. */
56
+ close(): Promise<void>;
57
+ }
58
+ export interface IJobCompletedEventArgs {
59
+ readonly job: IJob;
60
+ readonly returnValue: any;
61
+ }
62
+ export interface IJobFailedEventArgs {
63
+ readonly job: IJob;
64
+ readonly error: Error;
65
+ }
66
+ export interface IJobProgressEventArgs {
67
+ readonly job: IJob;
68
+ readonly progress: number | object;
69
+ }
70
+ /** Base class for a queue adapter that accepts a set of names/patterns defining the queue(s) the adapter supports. */
71
+ export declare abstract class QueueAdapter implements IQueueAdapter {
72
+ private readonly whitelist;
73
+ constructor(queueNamePatterns: string[]);
74
+ addQueueNamePatterns(queueNamePatterns: string[]): void;
75
+ getQueue(name: string): IQueue | undefined;
76
+ protected abstract getQueueInstance(name: string): IQueue;
77
+ }
package/dist/queue.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QueueAdapter = void 0;
4
+ const whitelist_1 = require("./whitelist");
5
+ /** Base class for a queue adapter that accepts a set of names/patterns defining the queue(s) the adapter supports. */
6
+ class QueueAdapter {
7
+ constructor(queueNamePatterns) {
8
+ this.whitelist = new whitelist_1.QueueAdapterWhitelist(queueNamePatterns);
9
+ }
10
+ addQueueNamePatterns(queueNamePatterns) {
11
+ queueNamePatterns.forEach(pattern => this.whitelist.add(pattern));
12
+ }
13
+ getQueue(name) {
14
+ return this.whitelist.isQueueSupported(name) ? this.getQueueInstance(name) : undefined;
15
+ }
16
+ }
17
+ exports.QueueAdapter = QueueAdapter;
18
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVldWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvcXVldWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsMkNBQW9EO0FBaUZwRCxzSEFBc0g7QUFDdEgsTUFBc0IsWUFBWTtJQUc5QixZQUFZLGlCQUEyQjtRQUNuQyxJQUFJLENBQUMsU0FBUyxHQUFHLElBQUksaUNBQXFCLENBQUMsaUJBQWlCLENBQUMsQ0FBQztJQUNsRSxDQUFDO0lBRUQsb0JBQW9CLENBQUMsaUJBQTJCO1FBQzVDLGlCQUFpQixDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUM7SUFDdEUsQ0FBQztJQUVELFFBQVEsQ0FBQyxJQUFZO1FBQ2pCLE9BQU8sSUFBSSxDQUFDLFNBQVMsQ0FBQyxnQkFBZ0IsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQyxTQUFTLENBQUM7SUFDM0YsQ0FBQztDQUdKO0FBaEJELG9DQWdCQyJ9
@@ -0,0 +1,5 @@
1
+ import { IQueue } from "./queue";
2
+ export interface IQueueService {
3
+ getQueue(name: string): IQueue;
4
+ }
5
+ export declare const IQueueService: import("@shrub/core").IService<IQueueService>;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.QueueService = exports.IQueueAdapterService = exports.IQueueService = void 0;
10
+ const core_1 = require("@shrub/core");
11
+ exports.IQueueService = core_1.createService("queue-service");
12
+ /** @internal */
13
+ exports.IQueueAdapterService = core_1.createService("queue-adapter-service");
14
+ /** @internal */
15
+ let QueueService = class QueueService {
16
+ constructor() {
17
+ this.adapters = [];
18
+ }
19
+ getQueue(name) {
20
+ for (const adapter of this.adapters) {
21
+ const queue = adapter.getQueue(name);
22
+ if (queue) {
23
+ return queue;
24
+ }
25
+ }
26
+ throw new Error(`No queue adapter found to handle queue with name (${name}).`);
27
+ }
28
+ register(adapter) {
29
+ this.adapters.push(adapter);
30
+ }
31
+ };
32
+ QueueService = __decorate([
33
+ core_1.Singleton
34
+ ], QueueService);
35
+ exports.QueueService = QueueService;
36
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBLHNDQUF1RDtBQWExQyxRQUFBLGFBQWEsR0FBRyxvQkFBYSxDQUFnQixlQUFlLENBQUMsQ0FBQztBQUUzRSxnQkFBZ0I7QUFDSCxRQUFBLG9CQUFvQixHQUFHLG9CQUFhLENBQXVCLHVCQUF1QixDQUFDLENBQUM7QUFFakcsZ0JBQWdCO0FBRWhCLElBQWEsWUFBWSxHQUF6QixNQUFhLFlBQVk7SUFBekI7UUFDcUIsYUFBUSxHQUFvQixFQUFFLENBQUM7SUFnQnBELENBQUM7SUFkRyxRQUFRLENBQUMsSUFBWTtRQUNqQixLQUFLLE1BQU0sT0FBTyxJQUFJLElBQUksQ0FBQyxRQUFRLEVBQUU7WUFDakMsTUFBTSxLQUFLLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQztZQUNyQyxJQUFJLEtBQUssRUFBRTtnQkFDUCxPQUFPLEtBQUssQ0FBQzthQUNoQjtTQUNKO1FBRUQsTUFBTSxJQUFJLEtBQUssQ0FBQyxxREFBcUQsSUFBSSxJQUFJLENBQUMsQ0FBQztJQUNuRixDQUFDO0lBRUQsUUFBUSxDQUFDLE9BQXNCO1FBQzNCLElBQUksQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQ2hDLENBQUM7Q0FDSixDQUFBO0FBakJZLFlBQVk7SUFEeEIsZ0JBQVM7R0FDRyxZQUFZLENBaUJ4QjtBQWpCWSxvQ0FBWSJ9
@@ -0,0 +1,17 @@
1
+ /**
2
+ * A utility to validate if a queue name matches the specified pattern.
3
+ * Currently, queue name patterns only support wildcard (*).
4
+ */
5
+ export declare function isQueueNameMatch(queueNamePattern: string, channelName: string): boolean;
6
+ /** Returns true if the provided queue name is a pattern containing one or more wildcards. */
7
+ export declare function isQueueNamePattern(channelName: string): boolean;
8
+ /** Utlity class for managing and matching a set of queue names and patterns for queue adapters. */
9
+ export declare class QueueAdapterWhitelist {
10
+ private readonly patterns;
11
+ private readonly queues;
12
+ private allowAll;
13
+ constructor(queueNamePatterns: string[]);
14
+ add(queueNamePattern: string): void;
15
+ isQueueSupported(channelName: string): boolean;
16
+ private normalizePattern;
17
+ }
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QueueAdapterWhitelist = exports.isQueueNamePattern = exports.isQueueNameMatch = void 0;
4
+ /**
5
+ * A utility to validate if a queue name matches the specified pattern.
6
+ * Currently, queue name patterns only support wildcard (*).
7
+ */
8
+ function isQueueNameMatch(queueNamePattern, channelName) {
9
+ const regex = toRegExp(queueNamePattern);
10
+ return regex.test(channelName);
11
+ }
12
+ exports.isQueueNameMatch = isQueueNameMatch;
13
+ /** Returns true if the provided queue name is a pattern containing one or more wildcards. */
14
+ function isQueueNamePattern(channelName) {
15
+ for (let i = 0; i < channelName.length; i++) {
16
+ if (channelName[i] === "*") {
17
+ return true;
18
+ }
19
+ }
20
+ return false;
21
+ }
22
+ exports.isQueueNamePattern = isQueueNamePattern;
23
+ function toRegExp(pattern) {
24
+ const escapeRegex = (str) => str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
25
+ pattern = "^" + pattern.split("*").map(escapeRegex).join(".*") + "$";
26
+ return new RegExp(pattern);
27
+ }
28
+ /** Utlity class for managing and matching a set of queue names and patterns for queue adapters. */
29
+ class QueueAdapterWhitelist {
30
+ constructor(queueNamePatterns) {
31
+ this.patterns = [];
32
+ this.queues = new Set();
33
+ this.allowAll = false;
34
+ queueNamePatterns.forEach(pattern => this.add(pattern));
35
+ }
36
+ add(queueNamePattern) {
37
+ //note: this will only add the pattern if it is not already covered by another pattern/channel
38
+ if (!this.allowAll) {
39
+ queueNamePattern = this.normalizePattern(queueNamePattern);
40
+ if (isQueueNamePattern(queueNamePattern)) {
41
+ if (queueNamePattern === "*") {
42
+ this.allowAll = true;
43
+ this.patterns.splice(0);
44
+ this.queues.clear();
45
+ }
46
+ if (!this.isQueueSupported(queueNamePattern)) {
47
+ this.patterns.push(queueNamePattern);
48
+ }
49
+ }
50
+ else if (!this.isQueueSupported(queueNamePattern)) {
51
+ this.queues.add(queueNamePattern);
52
+ }
53
+ }
54
+ }
55
+ isQueueSupported(channelName) {
56
+ if (this.allowAll || this.queues.has(channelName)) {
57
+ return true;
58
+ }
59
+ for (const pattern of this.patterns) {
60
+ if (isQueueNameMatch(pattern, channelName)) {
61
+ return true;
62
+ }
63
+ }
64
+ return false;
65
+ }
66
+ normalizePattern(queueNamePattern) {
67
+ queueNamePattern = queueNamePattern.trim();
68
+ while (queueNamePattern.indexOf("**") > -1) {
69
+ queueNamePattern = queueNamePattern.replace("**", "*");
70
+ }
71
+ return queueNamePattern;
72
+ }
73
+ }
74
+ exports.QueueAdapterWhitelist = QueueAdapterWhitelist;
75
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2hpdGVsaXN0Lmp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sQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDO2FBQ3JDO1NBQ0o7SUFDTCxDQUFDO0lBRUQsZ0JBQWdCLENBQUMsV0FBbUI7UUFDaEMsSUFBSSxJQUFJLENBQUMsUUFBUSxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFDLFdBQVcsQ0FBQyxFQUFFO1lBQy9DLE9BQU8sSUFBSSxDQUFDO1NBQ2Y7UUFFRCxLQUFLLE1BQU0sT0FBTyxJQUFJLElBQUksQ0FBQyxRQUFRLEVBQUU7WUFDakMsSUFBSSxnQkFBZ0IsQ0FBQyxPQUFPLEVBQUUsV0FBVyxDQUFDLEVBQUU7Z0JBQ3hDLE9BQU8sSUFBSSxDQUFDO2FBQ2Y7U0FDSjtRQUVELE9BQU8sS0FBSyxDQUFDO0lBQ2pCLENBQUM7SUFFTyxnQkFBZ0IsQ0FBQyxnQkFBd0I7UUFDN0MsZ0JBQWdCLEdBQUcsZ0JBQWdCLENBQUMsSUFBSSxFQUFFLENBQUM7UUFDM0MsT0FBTyxnQkFBZ0IsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLEVBQUU7WUFDeEMsZ0JBQWdCLEdBQUcsZ0JBQWdCLENBQUMsT0FBTyxDQUFDLElBQUksRUFBRSxHQUFHLENBQUMsQ0FBQztTQUMxRDtRQUVELE9BQU8sZ0JBQWdCLENBQUM7SUFDNUIsQ0FBQztDQUNKO0FBckRELHNEQXFEQyJ9
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@shrub/queue",
3
+ "description": "Provides a basic abstraction and support for job/task queues.",
4
+ "version": "0.5.50",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/jjvainav/shrub.git"
9
+ },
10
+ "main": "dist/index.js",
11
+ "module": "dist/esm/index.js",
12
+ "typings": "dist/index.d.ts",
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "engines": {
20
+ "node": ">=10.18.0"
21
+ },
22
+ "scripts": {
23
+ "build": "tsc -b .",
24
+ "clean": "rimraf ./dist && rimraf tsconfig.tsbuildinfo",
25
+ "test": "jest"
26
+ },
27
+ "dependencies": {
28
+ "@shrub/core": "0.5.50",
29
+ "@shrub/logging": "0.5.50",
30
+ "@sprig/event-emitter": "^0.2.0"
31
+ },
32
+ "gitHead": "e32c3a3fc3cbbbfdebf6847a313f623de4976af1"
33
+ }