@quanticjs/quanticjs 2.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.
@@ -0,0 +1,12 @@
1
+ import { DynamicModule } from '@nestjs/common';
2
+ import type { RedisModuleOptions } from '@quanticjs/redis';
3
+ import type { UnleashModuleOptions } from '@quanticjs/feature-flags';
4
+ export interface QuanticModuleOptions {
5
+ redis?: RedisModuleOptions;
6
+ unleash?: UnleashModuleOptions | false;
7
+ }
8
+ export declare class QuanticModule {
9
+ static forRoot(options?: QuanticModuleOptions): DynamicModule;
10
+ }
11
+ /** @deprecated Use QuanticModule instead */
12
+ export declare const SharedKernelModule: typeof QuanticModule;
@@ -0,0 +1,42 @@
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 QuanticModule_1;
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.SharedKernelModule = exports.QuanticModule = void 0;
11
+ const common_1 = require("@nestjs/common");
12
+ const core_1 = require("@quanticjs/core");
13
+ const redis_1 = require("@quanticjs/redis");
14
+ const events_1 = require("@quanticjs/events");
15
+ const metrics_1 = require("@quanticjs/metrics");
16
+ const feature_flags_1 = require("@quanticjs/feature-flags");
17
+ const workflow_1 = require("@quanticjs/workflow");
18
+ let QuanticModule = QuanticModule_1 = class QuanticModule {
19
+ static forRoot(options = {}) {
20
+ const imports = [
21
+ core_1.QuanticCoreModule.forRoot(),
22
+ redis_1.QuanticRedisModule.forRoot(options.redis),
23
+ events_1.QuanticEventsModule.forRoot(),
24
+ metrics_1.QuanticMetricsModule.forRoot(),
25
+ workflow_1.QuanticWorkflowModule.forRoot(),
26
+ ];
27
+ if (options.unleash !== false) {
28
+ imports.push(feature_flags_1.QuanticFeatureFlagsModule.forRoot(options.unleash));
29
+ }
30
+ return {
31
+ module: QuanticModule_1,
32
+ imports,
33
+ };
34
+ }
35
+ };
36
+ exports.QuanticModule = QuanticModule;
37
+ exports.QuanticModule = QuanticModule = QuanticModule_1 = __decorate([
38
+ (0, common_1.Global)(),
39
+ (0, common_1.Module)({})
40
+ ], QuanticModule);
41
+ /** @deprecated Use QuanticModule instead */
42
+ exports.SharedKernelModule = QuanticModule;
@@ -0,0 +1,10 @@
1
+ export * from '@quanticjs/core';
2
+ export * from '@quanticjs/redis';
3
+ export * from '@quanticjs/events';
4
+ export * from '@quanticjs/metrics';
5
+ export * from '@quanticjs/feature-flags';
6
+ export * from '@quanticjs/workflow';
7
+ export { TestingModuleFactory } from '@quanticjs/testing';
8
+ export type { TestingModuleOptions } from '@quanticjs/testing';
9
+ export { QuanticModule, SharedKernelModule } from './QuanticModule';
10
+ export type { QuanticModuleOptions } from './QuanticModule';
package/dist/index.js ADDED
@@ -0,0 +1,31 @@
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
+ exports.SharedKernelModule = exports.QuanticModule = exports.TestingModuleFactory = void 0;
18
+ // Re-export everything from all packages
19
+ __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/feature-flags"), exports);
24
+ __exportStar(require("@quanticjs/workflow"), exports);
25
+ // Testing — selectively re-export to avoid conflict with core's mock helpers
26
+ var testing_1 = require("@quanticjs/testing");
27
+ Object.defineProperty(exports, "TestingModuleFactory", { enumerable: true, get: function () { return testing_1.TestingModuleFactory; } });
28
+ // Umbrella module
29
+ var QuanticModule_1 = require("./QuanticModule");
30
+ Object.defineProperty(exports, "QuanticModule", { enumerable: true, get: function () { return QuanticModule_1.QuanticModule; } });
31
+ Object.defineProperty(exports, "SharedKernelModule", { enumerable: true, get: function () { return QuanticModule_1.SharedKernelModule; } });
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@quanticjs/quanticjs",
3
+ "version": "2.0.0",
4
+ "description": "Umbrella package — re-exports all quanticjs packages with backward-compatible QuanticModule.forRoot()",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "publishConfig": {
11
+ "registry": "https://registry.npmjs.org",
12
+ "access": "public"
13
+ },
14
+ "license": "MIT",
15
+ "scripts": {
16
+ "build": "tsc -p tsconfig.json",
17
+ "test": "jest --passWithNoTests",
18
+ "clean": "rm -rf dist"
19
+ },
20
+ "dependencies": {
21
+ "@quanticjs/core": "^2.0.0",
22
+ "@quanticjs/redis": "^2.0.0",
23
+ "@quanticjs/events": "^2.0.0",
24
+ "@quanticjs/metrics": "^2.0.0",
25
+ "@quanticjs/feature-flags": "^2.0.0",
26
+ "@quanticjs/workflow": "^2.0.0",
27
+ "@quanticjs/testing": "^2.0.0"
28
+ },
29
+ "peerDependencies": {
30
+ "@nestjs/common": "^11.0.0",
31
+ "@nestjs/cqrs": "^11.0.3",
32
+ "ioredis": "^5.0.0",
33
+ "prom-client": "^15.0.0",
34
+ "typeorm": "^0.3.20",
35
+ "unleash-client": "^6.0.0"
36
+ },
37
+ "peerDependenciesMeta": {
38
+ "unleash-client": {
39
+ "optional": true
40
+ }
41
+ }
42
+ }