@quanticjs/quanticjs 3.4.0 → 4.0.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/dist/QuanticModule.d.ts +12 -4
- package/dist/QuanticModule.js +58 -15
- package/dist/index.d.ts +0 -9
- package/dist/index.js +1 -13
- package/package.json +33 -16
package/dist/QuanticModule.d.ts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { DynamicModule } from '@nestjs/common';
|
|
2
|
-
import type { RedisModuleOptions } from '@quanticjs/redis';
|
|
3
|
-
import type { UnleashModuleOptions } from '@quanticjs/feature-flags';
|
|
4
2
|
export interface QuanticModuleOptions {
|
|
5
|
-
redis?:
|
|
6
|
-
|
|
3
|
+
redis?: boolean | {
|
|
4
|
+
url?: string;
|
|
5
|
+
};
|
|
6
|
+
events?: boolean;
|
|
7
|
+
metrics?: boolean;
|
|
8
|
+
workflow?: boolean;
|
|
9
|
+
unleash?: {
|
|
10
|
+
url?: string;
|
|
11
|
+
appName?: string;
|
|
12
|
+
customHeaders?: Record<string, string>;
|
|
13
|
+
};
|
|
7
14
|
}
|
|
8
15
|
export declare class QuanticModule {
|
|
16
|
+
private static readonly logger;
|
|
9
17
|
static forRoot(options?: QuanticModuleOptions): DynamicModule;
|
|
10
18
|
}
|
|
11
19
|
/** @deprecated Use QuanticModule instead */
|
package/dist/QuanticModule.js
CHANGED
|
@@ -10,22 +10,65 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.SharedKernelModule = exports.QuanticModule = void 0;
|
|
11
11
|
const common_1 = require("@nestjs/common");
|
|
12
12
|
const core_1 = require("@quanticjs/core");
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const feature_flags_1 = require("@quanticjs/feature-flags");
|
|
17
|
-
const workflow_1 = require("@quanticjs/workflow");
|
|
18
|
-
let QuanticModule = QuanticModule_1 = class QuanticModule {
|
|
13
|
+
let QuanticModule = class QuanticModule {
|
|
14
|
+
static { QuanticModule_1 = this; }
|
|
15
|
+
static logger = new common_1.Logger('QuanticModule');
|
|
19
16
|
static forRoot(options = {}) {
|
|
20
|
-
const imports = [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
const imports = [core_1.QuanticCoreModule.forRoot()];
|
|
18
|
+
if (options.redis) {
|
|
19
|
+
try {
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
21
|
+
const { QuanticRedisModule } = require('@quanticjs/redis');
|
|
22
|
+
imports.push(QuanticRedisModule.forRoot(options.redis === true ? {} : options.redis));
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
this.logger.warn('redis option provided but @quanticjs/redis is not installed. ' +
|
|
26
|
+
'Run: npm install @quanticjs/redis ioredis');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (options.events) {
|
|
30
|
+
try {
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
32
|
+
const { QuanticEventsModule } = require('@quanticjs/events');
|
|
33
|
+
imports.push(QuanticEventsModule.forRoot());
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
this.logger.warn('events option provided but @quanticjs/events is not installed. ' +
|
|
37
|
+
'Run: npm install @quanticjs/events');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (options.metrics) {
|
|
41
|
+
try {
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
43
|
+
const { QuanticMetricsModule } = require('@quanticjs/metrics');
|
|
44
|
+
imports.push(QuanticMetricsModule.forRoot());
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
this.logger.warn('metrics option provided but @quanticjs/metrics is not installed. ' +
|
|
48
|
+
'Run: npm install @quanticjs/metrics prom-client');
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (options.workflow) {
|
|
52
|
+
try {
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
54
|
+
const { QuanticWorkflowModule } = require('@quanticjs/workflow');
|
|
55
|
+
imports.push(QuanticWorkflowModule.forRoot());
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
this.logger.warn('workflow option provided but @quanticjs/workflow is not installed. ' +
|
|
59
|
+
'Run: npm install @quanticjs/workflow');
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (options.unleash) {
|
|
63
|
+
try {
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
65
|
+
const { QuanticFeatureFlagsModule } = require('@quanticjs/feature-flags');
|
|
66
|
+
imports.push(QuanticFeatureFlagsModule.forRoot(options.unleash));
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
this.logger.warn('unleash option provided but @quanticjs/feature-flags is not installed. ' +
|
|
70
|
+
'Run: npm install @quanticjs/feature-flags unleash-client');
|
|
71
|
+
}
|
|
29
72
|
}
|
|
30
73
|
return {
|
|
31
74
|
module: QuanticModule_1,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
1
|
export * from '@quanticjs/core';
|
|
2
|
-
export * from '@quanticjs/redis';
|
|
3
|
-
export * from '@quanticjs/events';
|
|
4
|
-
export * from '@quanticjs/metrics';
|
|
5
|
-
export * from '@quanticjs/health';
|
|
6
|
-
export * from '@quanticjs/feature-flags';
|
|
7
|
-
export * from '@quanticjs/workflow';
|
|
8
|
-
export * from '@quanticjs/workflow-kogito';
|
|
9
|
-
export { TestingModuleFactory } from '@quanticjs/testing';
|
|
10
|
-
export type { TestingModuleOptions } from '@quanticjs/testing';
|
|
11
2
|
export { QuanticModule, SharedKernelModule } from './QuanticModule';
|
|
12
3
|
export type { QuanticModuleOptions } from './QuanticModule';
|
package/dist/index.js
CHANGED
|
@@ -14,20 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.SharedKernelModule = exports.QuanticModule =
|
|
18
|
-
// Re-export everything from all packages
|
|
17
|
+
exports.SharedKernelModule = exports.QuanticModule = void 0;
|
|
19
18
|
__exportStar(require("@quanticjs/core"), exports);
|
|
20
|
-
__exportStar(require("@quanticjs/redis"), exports);
|
|
21
|
-
__exportStar(require("@quanticjs/events"), exports);
|
|
22
|
-
__exportStar(require("@quanticjs/metrics"), exports);
|
|
23
|
-
__exportStar(require("@quanticjs/health"), exports);
|
|
24
|
-
__exportStar(require("@quanticjs/feature-flags"), exports);
|
|
25
|
-
__exportStar(require("@quanticjs/workflow"), exports);
|
|
26
|
-
__exportStar(require("@quanticjs/workflow-kogito"), exports);
|
|
27
|
-
// Testing — selectively re-export to avoid conflict with core's mock helpers
|
|
28
|
-
var testing_1 = require("@quanticjs/testing");
|
|
29
|
-
Object.defineProperty(exports, "TestingModuleFactory", { enumerable: true, get: function () { return testing_1.TestingModuleFactory; } });
|
|
30
|
-
// Umbrella module
|
|
31
19
|
var QuanticModule_1 = require("./QuanticModule");
|
|
32
20
|
Object.defineProperty(exports, "QuanticModule", { enumerable: true, get: function () { return QuanticModule_1.QuanticModule; } });
|
|
33
21
|
Object.defineProperty(exports, "SharedKernelModule", { enumerable: true, get: function () { return QuanticModule_1.SharedKernelModule; } });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quanticjs/quanticjs",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Umbrella package — re-exports
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "Umbrella package — re-exports @quanticjs/core with opt-in module loading via QuanticModule.forRoot()",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -18,26 +18,43 @@
|
|
|
18
18
|
"clean": "rm -rf dist"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@quanticjs/core": "^
|
|
22
|
-
"@quanticjs/redis": "^3.4.0",
|
|
23
|
-
"@quanticjs/events": "^3.4.0",
|
|
24
|
-
"@quanticjs/metrics": "^3.4.0",
|
|
25
|
-
"@quanticjs/health": "^3.4.0",
|
|
26
|
-
"@quanticjs/feature-flags": "^3.4.0",
|
|
27
|
-
"@quanticjs/workflow": "^3.4.0",
|
|
28
|
-
"@quanticjs/workflow-kogito": "^3.4.0",
|
|
29
|
-
"@quanticjs/testing": "^3.4.0"
|
|
21
|
+
"@quanticjs/core": "^4.0.0"
|
|
30
22
|
},
|
|
31
23
|
"peerDependencies": {
|
|
32
24
|
"@nestjs/common": "^11.0.0",
|
|
33
25
|
"@nestjs/cqrs": "^11.0.3",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
26
|
+
"@quanticjs/events": "^4.0.0",
|
|
27
|
+
"@quanticjs/feature-flags": "^4.0.0",
|
|
28
|
+
"@quanticjs/health": "^4.0.0",
|
|
29
|
+
"@quanticjs/metrics": "^4.0.0",
|
|
30
|
+
"@quanticjs/redis": "^4.0.0",
|
|
31
|
+
"@quanticjs/testing": "^4.0.0",
|
|
32
|
+
"@quanticjs/workflow": "^4.0.0",
|
|
33
|
+
"@quanticjs/workflow-kogito": "^4.0.0"
|
|
38
34
|
},
|
|
39
35
|
"peerDependenciesMeta": {
|
|
40
|
-
"
|
|
36
|
+
"@quanticjs/events": {
|
|
37
|
+
"optional": true
|
|
38
|
+
},
|
|
39
|
+
"@quanticjs/feature-flags": {
|
|
40
|
+
"optional": true
|
|
41
|
+
},
|
|
42
|
+
"@quanticjs/health": {
|
|
43
|
+
"optional": true
|
|
44
|
+
},
|
|
45
|
+
"@quanticjs/metrics": {
|
|
46
|
+
"optional": true
|
|
47
|
+
},
|
|
48
|
+
"@quanticjs/redis": {
|
|
49
|
+
"optional": true
|
|
50
|
+
},
|
|
51
|
+
"@quanticjs/testing": {
|
|
52
|
+
"optional": true
|
|
53
|
+
},
|
|
54
|
+
"@quanticjs/workflow": {
|
|
55
|
+
"optional": true
|
|
56
|
+
},
|
|
57
|
+
"@quanticjs/workflow-kogito": {
|
|
41
58
|
"optional": true
|
|
42
59
|
}
|
|
43
60
|
}
|