@vendure/job-queue-plugin 3.6.0-minor-202603280303 → 3.6.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/README.md CHANGED
@@ -1,13 +1,6 @@
1
- > **Notice:** The Pub/Sub plugin (`PubSubPlugin`) is moving to
2
- > [`@vendure-community/pub-sub-plugin`](https://github.com/vendurehq/community-plugins).
3
- > It will be removed from this package in Vendure v3.6.0.
4
- > The BullMQ plugin remains here unchanged.
5
-
6
1
  # Vendure Job Queue Plugin
7
2
 
8
- This plugin includes alternate JobQueueStrategy implementations built on different technologies.
9
-
10
- Implemented:
3
+ This plugin provides the `BullMQJobQueuePlugin` which uses Redis via BullMQ to power the Vendure job queue.
11
4
 
12
- * The `PubSubPlugin` uses Google Cloud Pub/Sub to power the Vendure job queue.
13
- * The `BullMQJobQueuePlugin` uses Redis via BullMQ.
5
+ > **Note:** The Pub/Sub plugin has been moved to
6
+ > [`@vendure-community/pub-sub-plugin`](https://github.com/vendurehq/vendure-community-plugins).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendure/job-queue-plugin",
3
- "version": "3.6.0-minor-202603280303",
3
+ "version": "3.6.0",
4
4
  "license": "GPL-3.0-or-later",
5
5
  "main": "package/index.js",
6
6
  "types": "package/index.d.ts",
@@ -16,7 +16,6 @@
16
16
  "watch": "tsc -p ./tsconfig.build.json --watch",
17
17
  "build": "rimraf package && tsc -p ./tsconfig.build.json",
18
18
  "lint": "eslint --fix .",
19
- "test": "vitest --run",
20
19
  "e2e-wip": "node e2e/check-connection.js || jest --config ../../e2e-common/jest-config.js --runInBand --package=job-queue-plugin",
21
20
  "ci": "npm run build"
22
21
  },
@@ -26,16 +25,14 @@
26
25
  "access": "public"
27
26
  },
28
27
  "devDependencies": {
29
- "@google-cloud/pubsub": "^4.11.0",
30
- "@vendure/common": "^3.6.0-minor-202603280303",
31
- "@vendure/core": "^3.6.0-minor-202603280303",
28
+ "@vendure/common": "3.6.0",
29
+ "@vendure/core": "3.6.0",
32
30
  "bullmq": "^5.67.1",
33
31
  "ioredis": "5.9.3",
34
32
  "rimraf": "^5.0.5",
35
33
  "typescript": "5.8.2"
36
34
  },
37
35
  "peerDependencies": {
38
- "@google-cloud/pubsub": "^4.11.0",
39
36
  "bullmq": "^5.4.2",
40
37
  "ioredis": "^5.3.2"
41
38
  },
@@ -45,9 +42,6 @@
45
42
  },
46
43
  "ioredis": {
47
44
  "optional": true
48
- },
49
- "@google-cloud/pubsub": {
50
- "optional": true
51
45
  }
52
46
  }
53
47
  }
@@ -1,2 +0,0 @@
1
- export declare const PUB_SUB_OPTIONS: unique symbol;
2
- export declare const loggerCtx = "PubSubPlugin";
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.loggerCtx = exports.PUB_SUB_OPTIONS = void 0;
4
- exports.PUB_SUB_OPTIONS = Symbol('PUB_SUB_OPTIONS');
5
- exports.loggerCtx = 'PubSubPlugin';
6
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/pub-sub/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAC5C,QAAA,SAAS,GAAG,cAAc,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './plugin';
2
- export * from './options';
@@ -1,19 +0,0 @@
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("./plugin"), exports);
18
- __exportStar(require("./options"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pub-sub/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,4CAA0B"}
@@ -1,32 +0,0 @@
1
- export interface PubSubOptions {
2
- /**
3
- * @description
4
- * Number of jobs that can be inflight at the same time.
5
- *
6
- * Can be set to a function which receives the queue name and returns
7
- * the concurrency limit. This is useful for limiting concurrency on
8
- * queues which have resource-intensive jobs.
9
- *
10
- * @example
11
- * ```ts
12
- * PubSubPlugin.init({
13
- * concurrency: (queueName) => {
14
- * if (queueName === 'apply-collection-filters') {
15
- * return 1;
16
- * }
17
- * return 20;
18
- * },
19
- * queueNamePubSubPair: new Map([...])
20
- * })
21
- * ```
22
- *
23
- * @default 20
24
- */
25
- concurrency?: number | ((queueName: string) => number);
26
- /**
27
- * @description
28
- * This is the mapping of Vendure queue names to PubSub Topics and Subscriptions
29
- * For each queue a topic and subscription is required to exist.
30
- */
31
- queueNamePubSubPair?: Map<string, [string, string]>;
32
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=options.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/pub-sub/options.ts"],"names":[],"mappings":""}
@@ -1,24 +0,0 @@
1
- import { Type } from '@vendure/core';
2
- import { PubSubOptions } from './options';
3
- /**
4
- * @description
5
- * This plugin uses Google Cloud Pub/Sub to implement a job queue strategy for Vendure.
6
- *
7
- * ## Installation
8
- *
9
- * Note: To use this plugin, you need to manually install the `@google-cloud/pubsub` package:
10
- *
11
- * ```shell
12
- * npm install @google-cloud/pubsub@^2.8.0
13
- * ```
14
- *
15
- * @deprecated The Pub/Sub plugin is moving to `@vendure-community/pub-sub-plugin`.
16
- * It will be removed from `@vendure/job-queue-plugin` in Vendure v3.6.0.
17
- * The BullMQ plugin remains in `@vendure/job-queue-plugin`.
18
- *
19
- * @docsCategory core plugins/JobQueuePlugin
20
- */
21
- export declare class PubSubPlugin {
22
- private static options;
23
- static init(options: PubSubOptions): Type<PubSubPlugin>;
24
- }
@@ -1,54 +0,0 @@
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
- var PubSubPlugin_1;
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.PubSubPlugin = void 0;
11
- const pubsub_1 = require("@google-cloud/pubsub");
12
- const core_1 = require("@vendure/core");
13
- const constants_1 = require("./constants");
14
- const pub_sub_job_queue_strategy_1 = require("./pub-sub-job-queue-strategy");
15
- /**
16
- * @description
17
- * This plugin uses Google Cloud Pub/Sub to implement a job queue strategy for Vendure.
18
- *
19
- * ## Installation
20
- *
21
- * Note: To use this plugin, you need to manually install the `@google-cloud/pubsub` package:
22
- *
23
- * ```shell
24
- * npm install @google-cloud/pubsub@^2.8.0
25
- * ```
26
- *
27
- * @deprecated The Pub/Sub plugin is moving to `@vendure-community/pub-sub-plugin`.
28
- * It will be removed from `@vendure/job-queue-plugin` in Vendure v3.6.0.
29
- * The BullMQ plugin remains in `@vendure/job-queue-plugin`.
30
- *
31
- * @docsCategory core plugins/JobQueuePlugin
32
- */
33
- let PubSubPlugin = PubSubPlugin_1 = class PubSubPlugin {
34
- static init(options) {
35
- this.options = options;
36
- return PubSubPlugin_1;
37
- }
38
- };
39
- exports.PubSubPlugin = PubSubPlugin;
40
- exports.PubSubPlugin = PubSubPlugin = PubSubPlugin_1 = __decorate([
41
- (0, core_1.VendurePlugin)({
42
- imports: [core_1.PluginCommonModule],
43
- providers: [
44
- { provide: constants_1.PUB_SUB_OPTIONS, useFactory: () => PubSubPlugin.options },
45
- { provide: pubsub_1.PubSub, useFactory: () => new pubsub_1.PubSub() },
46
- ],
47
- configuration: config => {
48
- config.jobQueueOptions.jobQueueStrategy = new pub_sub_job_queue_strategy_1.PubSubJobQueueStrategy();
49
- return config;
50
- },
51
- compatibility: '^3.0.0',
52
- })
53
- ], PubSubPlugin);
54
- //# sourceMappingURL=plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/pub-sub/plugin.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,iDAA8C;AAC9C,wCAAwE;AAExE,2CAA8C;AAE9C,6EAAsE;AAEtE;;;;;;;;;;;;;;;;;GAiBG;AAaI,IAAM,YAAY,oBAAlB,MAAM,YAAY;IAGrB,MAAM,CAAC,IAAI,CAAC,OAAsB;QAC9B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,cAAY,CAAC;IACxB,CAAC;CACJ,CAAA;AAPY,oCAAY;uBAAZ,YAAY;IAZxB,IAAA,oBAAa,EAAC;QACX,OAAO,EAAE,CAAC,yBAAkB,CAAC;QAC7B,SAAS,EAAE;YACP,EAAE,OAAO,EAAE,2BAAe,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE;YACpE,EAAE,OAAO,EAAE,eAAM,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,eAAM,EAAE,EAAE;SACtD;QACD,aAAa,EAAE,MAAM,CAAC,EAAE;YACpB,MAAM,CAAC,eAAe,CAAC,gBAAgB,GAAG,IAAI,mDAAsB,EAAE,CAAC;YACvE,OAAO,MAAM,CAAC;QAClB,CAAC;QACD,aAAa,EAAE,QAAQ;KAC1B,CAAC;GACW,YAAY,CAOxB"}
@@ -1,30 +0,0 @@
1
- import { InjectableJobQueueStrategy, Injector, Job, JobData, JobQueueStrategy } from '@vendure/core';
2
- /**
3
- * @description
4
- * This JobQueueStrategy uses Google Cloud Pub/Sub to implement a job queue for Vendure.
5
- * It should not be used alone, but as part of the {@link PubSubPlugin}.
6
- *
7
- * Note: To use this strategy, you need to manually install the `@google-cloud/pubsub` package:
8
- *
9
- * ```shell
10
- * npm install @google-cloud/pubsub@^4.11.0
11
- * ```
12
- *
13
- * @docsCategory core plugins/JobQueuePlugin
14
- */
15
- export declare class PubSubJobQueueStrategy extends InjectableJobQueueStrategy implements JobQueueStrategy {
16
- private concurrency;
17
- private queueNamePubSubPair;
18
- private pubSubClient;
19
- private topics;
20
- private subscriptions;
21
- private listeners;
22
- init(injector: Injector): void;
23
- private getConcurrency;
24
- destroy(): void;
25
- add<Data extends JobData<Data> = object>(job: Job<Data>): Promise<Job<Data>>;
26
- start<Data extends JobData<Data> = object>(queueName: string, process: (job: Job<Data>) => Promise<any>): Promise<void>;
27
- stop<Data extends JobData<Data> = object>(queueName: string, process: (job: Job<Data>) => Promise<any>): Promise<void>;
28
- private topic;
29
- private subscription;
30
- }
@@ -1,142 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PubSubJobQueueStrategy = void 0;
4
- const pubsub_1 = require("@google-cloud/pubsub");
5
- const generated_types_1 = require("@vendure/common/lib/generated-types");
6
- const core_1 = require("@vendure/core");
7
- const constants_1 = require("./constants");
8
- /**
9
- * @description
10
- * This JobQueueStrategy uses Google Cloud Pub/Sub to implement a job queue for Vendure.
11
- * It should not be used alone, but as part of the {@link PubSubPlugin}.
12
- *
13
- * Note: To use this strategy, you need to manually install the `@google-cloud/pubsub` package:
14
- *
15
- * ```shell
16
- * npm install @google-cloud/pubsub@^4.11.0
17
- * ```
18
- *
19
- * @docsCategory core plugins/JobQueuePlugin
20
- */
21
- class PubSubJobQueueStrategy extends core_1.InjectableJobQueueStrategy {
22
- constructor() {
23
- super(...arguments);
24
- this.topics = new Map();
25
- this.subscriptions = new Map();
26
- this.listeners = new core_1.QueueNameProcessStorage();
27
- }
28
- init(injector) {
29
- var _a, _b;
30
- this.pubSubClient = injector.get(pubsub_1.PubSub);
31
- const options = injector.get(constants_1.PUB_SUB_OPTIONS);
32
- this.concurrency = (_a = options.concurrency) !== null && _a !== void 0 ? _a : 20;
33
- this.queueNamePubSubPair = (_b = options.queueNamePubSubPair) !== null && _b !== void 0 ? _b : new Map();
34
- super.init(injector);
35
- }
36
- getConcurrency(queueName) {
37
- if (typeof this.concurrency === 'function') {
38
- return this.concurrency(queueName);
39
- }
40
- return this.concurrency;
41
- }
42
- destroy() {
43
- super.destroy();
44
- for (const subscription of this.subscriptions.values()) {
45
- subscription.removeAllListeners('message');
46
- }
47
- this.subscriptions.clear();
48
- this.topics.clear();
49
- }
50
- async add(job) {
51
- if (!this.hasInitialized) {
52
- throw new Error('Cannot add job before init');
53
- }
54
- const id = await this.topic(job.queueName).publish(Buffer.from(JSON.stringify(job.data)));
55
- core_1.Logger.debug(`Sent message ${job.queueName}: ${id}`);
56
- return new core_1.Job({
57
- id,
58
- queueName: job.queueName,
59
- data: job.data,
60
- attempts: 0,
61
- state: generated_types_1.JobState.PENDING,
62
- createdAt: new Date(),
63
- });
64
- }
65
- async start(queueName, process) {
66
- if (!this.hasInitialized) {
67
- this.started.set(queueName, process);
68
- return;
69
- }
70
- if (this.listeners.has(queueName, process)) {
71
- return;
72
- }
73
- const subscription = this.subscription(queueName);
74
- const processMessage = async (message) => {
75
- core_1.Logger.verbose(`Received message: ${queueName}: ${message.id}`, constants_1.loggerCtx);
76
- const job = new core_1.Job({
77
- id: message.id,
78
- queueName,
79
- data: JSON.parse(message.data.toString()),
80
- attempts: message.deliveryAttempt,
81
- state: generated_types_1.JobState.RUNNING,
82
- startedAt: new Date(),
83
- createdAt: message.publishTime,
84
- });
85
- await process(job);
86
- };
87
- const listener = (message) => {
88
- processMessage(message)
89
- .then(() => {
90
- message.ack();
91
- core_1.Logger.verbose(`Finished handling: ${queueName}: ${message.id}`, constants_1.loggerCtx);
92
- })
93
- .catch(err => {
94
- message.nack();
95
- core_1.Logger.error(`Error handling: ${queueName}: ${message.id}: ${String(err.message)}`, constants_1.loggerCtx);
96
- });
97
- };
98
- this.listeners.set(queueName, process, listener);
99
- subscription.on('message', listener);
100
- }
101
- async stop(queueName, process) {
102
- const listener = this.listeners.getAndDelete(queueName, process);
103
- if (!listener) {
104
- return;
105
- }
106
- this.subscription(queueName).off('message', listener);
107
- }
108
- topic(queueName) {
109
- let topic = this.topics.get(queueName);
110
- if (topic) {
111
- return topic;
112
- }
113
- const pair = this.queueNamePubSubPair.get(queueName);
114
- if (!pair) {
115
- throw new Error(`Topic name not set for queue: ${queueName}`);
116
- }
117
- const [topicName, subscriptionName] = pair;
118
- topic = this.pubSubClient.topic(topicName);
119
- this.topics.set(queueName, topic);
120
- return topic;
121
- }
122
- subscription(queueName) {
123
- let subscription = this.subscriptions.get(queueName);
124
- if (subscription) {
125
- return subscription;
126
- }
127
- const pair = this.queueNamePubSubPair.get(queueName);
128
- if (!pair) {
129
- throw new Error(`Subscription name not set for queue: ${queueName}`);
130
- }
131
- const [topicName, subscriptionName] = pair;
132
- subscription = this.topic(queueName).subscription(subscriptionName, {
133
- flowControl: {
134
- maxMessages: this.getConcurrency(queueName),
135
- },
136
- });
137
- this.subscriptions.set(queueName, subscription);
138
- return subscription;
139
- }
140
- }
141
- exports.PubSubJobQueueStrategy = PubSubJobQueueStrategy;
142
- //# sourceMappingURL=pub-sub-job-queue-strategy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pub-sub-job-queue-strategy.js","sourceRoot":"","sources":["../../src/pub-sub/pub-sub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