@decaf-ts/for-nest 0.10.0 → 0.10.2
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 +1 -1
- package/dist/for-nest.cjs +1 -1
- package/dist/for-nest.cjs.map +1 -1
- package/dist/for-nest.js +1 -1
- package/dist/for-nest.js.map +1 -1
- package/lib/cjs/cli-module.cjs +84 -5
- package/lib/cjs/cli-module.cjs.map +1 -1
- package/lib/cjs/constants.cjs +2 -1
- package/lib/cjs/constants.cjs.map +1 -1
- package/lib/cjs/core-module.cjs +7 -2
- package/lib/cjs/core-module.cjs.map +1 -1
- package/lib/cjs/index.cjs +3 -3
- package/lib/cjs/migrations/migration-module.cjs +2 -35
- package/lib/cjs/migrations/migration-module.cjs.map +1 -1
- package/lib/esm/cli-module.js +83 -6
- package/lib/esm/cli-module.js.map +1 -1
- package/lib/esm/constants.js +1 -0
- package/lib/esm/constants.js.map +1 -1
- package/lib/esm/core-module.js +7 -2
- package/lib/esm/core-module.js.map +1 -1
- package/lib/esm/index.js +3 -3
- package/lib/esm/migrations/migration-module.js +2 -2
- package/lib/esm/migrations/migration-module.js.map +1 -1
- package/lib/types/cli-module.d.cts +9 -0
- package/lib/types/cli-module.d.mts +9 -0
- package/lib/types/constants.d.cts +1 -0
- package/lib/types/constants.d.mts +1 -0
- package/lib/types/core-module.d.cts +1 -2
- package/lib/types/core-module.d.mts +1 -2
- package/lib/types/index.d.cts +3 -3
- package/lib/types/index.d.mts +3 -3
- package/package.json +12 -1
|
@@ -13,6 +13,7 @@ import { Global, Module } from "@nestjs/common";
|
|
|
13
13
|
import { InternalError } from "@decaf-ts/db-decorators";
|
|
14
14
|
import { Logging } from "@decaf-ts/logging";
|
|
15
15
|
import { DECAF_ADAPTER_ID } from "./../constants.js";
|
|
16
|
+
import { MigrationService } from "@decaf-ts/core/migrations";
|
|
16
17
|
const logger = Logging.for("DecafMigrationModule");
|
|
17
18
|
/**
|
|
18
19
|
* @description Migration module for NestJS
|
|
@@ -31,8 +32,7 @@ let DecafMigrationModule = DecafMigrationModule_1 = class DecafMigrationModule {
|
|
|
31
32
|
throw new InternalError("No adapters provided. Make sure DecafCoreModule is configured and adapters are available.");
|
|
32
33
|
}
|
|
33
34
|
log.info(`Running migrations with config: ${JSON.stringify(config)}`);
|
|
34
|
-
|
|
35
|
-
return (await import("@decaf-ts/core/migrations")).MigrationService.migrateAdapters(adapters, config || {});
|
|
35
|
+
return MigrationService.migrateAdapters(adapters, config || {});
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
DecafMigrationModule = DecafMigrationModule_1 = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-module.js","sourceRoot":"","sources":["../../../src/migrations/migration-module.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;AAEH,OAAO,EAAiB,MAAM,EAAU,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,0BAAqB;
|
|
1
|
+
{"version":3,"file":"migration-module.js","sourceRoot":"","sources":["../../../src/migrations/migration-module.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;AAEH,OAAO,EAAiB,MAAM,EAAU,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,0BAAqB;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;AAEnD;;;;GAIG;AAYI,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAC/B,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,MAAM,EAAE,sBAAoB;SAC7B,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,OAAO,CAClB,MAAY,EACZ,QAAwC;QAExC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAErC,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvC,MAAM,IAAI,aAAa,CACrB,2FAA2F,CAC5F,CAAC;QACJ,CAAC;QAED,GAAG,CAAC,IAAI,CAAC,mCAAmC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAEtE,OAAO,gBAAgB,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC;IAClE,CAAC;CACF,CAAA;AAvBY,oBAAoB;IAXhC,MAAM,EAAE;IACR,MAAM,CAAC;QACN,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,oBAAoB;gBAC7B,UAAU,EAAE,CAAC,QAAuC,EAAE,EAAE,CAAC,QAAQ;gBACjE,MAAM,EAAE,CAAC,gBAAgB,CAAC;aAC3B;SACF;QACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;KAChC,CAAC;GACW,oBAAoB,CAuBhC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
+
import { Adapter } from "@decaf-ts/core";
|
|
2
3
|
export declare function resolveInputPath(input?: string, exists?: (candidate: string) => boolean, candidates?: string[]): string;
|
|
3
4
|
export declare function buildOutputFilePath(params: {
|
|
4
5
|
outputDir: string;
|
|
@@ -15,6 +16,14 @@ export declare function resolveMigrateCommandConfig(options?: Record<string, unk
|
|
|
15
16
|
taskMode: boolean | undefined;
|
|
16
17
|
dryRun: boolean | undefined;
|
|
17
18
|
flavours: string[];
|
|
19
|
+
versionDir: string | undefined;
|
|
20
|
+
references: string[];
|
|
18
21
|
};
|
|
19
22
|
};
|
|
23
|
+
export declare function buildFileVersionHandlers(versionDir: string, adapters: Adapter<any, any, any, any>[]): Record<string, {
|
|
24
|
+
retrieveLastVersion: () => Promise<string | undefined>;
|
|
25
|
+
setCurrentVersion: (v: string) => Promise<void>;
|
|
26
|
+
}>;
|
|
27
|
+
declare const migrateCommand: Command;
|
|
28
|
+
export { migrateCommand };
|
|
20
29
|
export default function nest(): Command;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
+
import { Adapter } from "@decaf-ts/core";
|
|
2
3
|
export declare function resolveInputPath(input?: string, exists?: (candidate: string) => boolean, candidates?: string[]): string;
|
|
3
4
|
export declare function buildOutputFilePath(params: {
|
|
4
5
|
outputDir: string;
|
|
@@ -15,6 +16,14 @@ export declare function resolveMigrateCommandConfig(options?: Record<string, unk
|
|
|
15
16
|
taskMode: boolean | undefined;
|
|
16
17
|
dryRun: boolean | undefined;
|
|
17
18
|
flavours: string[];
|
|
19
|
+
versionDir: string | undefined;
|
|
20
|
+
references: string[];
|
|
18
21
|
};
|
|
19
22
|
};
|
|
23
|
+
export declare function buildFileVersionHandlers(versionDir: string, adapters: Adapter<any, any, any, any>[]): Record<string, {
|
|
24
|
+
retrieveLastVersion: () => Promise<string | undefined>;
|
|
25
|
+
setCurrentVersion: (v: string) => Promise<void>;
|
|
26
|
+
}>;
|
|
27
|
+
declare const migrateCommand: Command;
|
|
28
|
+
export { migrateCommand };
|
|
20
29
|
export default function nest(): Command;
|
|
@@ -2,6 +2,7 @@ import { AdapterFlags, Context } from "@decaf-ts/core";
|
|
|
2
2
|
import { Logger } from "@decaf-ts/logging";
|
|
3
3
|
export declare const DECAF_MODULE_OPTIONS = "DecafModuleOptions";
|
|
4
4
|
export declare const DECAF_ADAPTER_ID = "DecafAdapter";
|
|
5
|
+
export declare const DECAF_TASK_SERVICE_ID = "DecafTaskService";
|
|
5
6
|
export declare const DECAF_ROUTE = "DecafRoute";
|
|
6
7
|
export declare const DECAF_HANDLERS: unique symbol;
|
|
7
8
|
export declare const DECAF_ADAPTER_OPTIONS: unique symbol;
|
|
@@ -2,6 +2,7 @@ import { AdapterFlags, Context } from "@decaf-ts/core";
|
|
|
2
2
|
import { Logger } from "@decaf-ts/logging";
|
|
3
3
|
export declare const DECAF_MODULE_OPTIONS = "DecafModuleOptions";
|
|
4
4
|
export declare const DECAF_ADAPTER_ID = "DecafAdapter";
|
|
5
|
+
export declare const DECAF_TASK_SERVICE_ID = "DecafTaskService";
|
|
5
6
|
export declare const DECAF_ROUTE = "DecafRoute";
|
|
6
7
|
export declare const DECAF_HANDLERS: unique symbol;
|
|
7
8
|
export declare const DECAF_ADAPTER_OPTIONS: unique symbol;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { DynamicModule, OnApplicationShutdown } from "@nestjs/common";
|
|
2
2
|
import { ModuleRef } from "@nestjs/core";
|
|
3
3
|
import type { DecafModuleOptions } from "./types.d.cts";
|
|
4
|
-
import { PersistenceService } from "@decaf-ts/core";
|
|
5
|
-
import { Adapter } from "@decaf-ts/core";
|
|
4
|
+
import { Adapter, PersistenceService } from "@decaf-ts/core";
|
|
6
5
|
import { Logger } from "@decaf-ts/logging";
|
|
7
6
|
export declare class DecafCoreModule<CONF, ADAPTER extends Adapter<CONF, any, any, any>> implements OnApplicationShutdown {
|
|
8
7
|
private readonly options;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { DynamicModule, OnApplicationShutdown } from "@nestjs/common";
|
|
2
2
|
import { ModuleRef } from "@nestjs/core";
|
|
3
3
|
import type { DecafModuleOptions } from "./types.d.mts";
|
|
4
|
-
import { PersistenceService } from "@decaf-ts/core";
|
|
5
|
-
import { Adapter } from "@decaf-ts/core";
|
|
4
|
+
import { Adapter, PersistenceService } from "@decaf-ts/core";
|
|
6
5
|
import { Logger } from "@decaf-ts/logging";
|
|
7
6
|
export declare class DecafCoreModule<CONF, ADAPTER extends Adapter<CONF, any, any, any>> implements OnApplicationShutdown {
|
|
8
7
|
private readonly options;
|
package/lib/types/index.d.cts
CHANGED
|
@@ -40,19 +40,19 @@ export * from "./events-module/index.d.cts";
|
|
|
40
40
|
* @constant
|
|
41
41
|
* @type {string}
|
|
42
42
|
*/
|
|
43
|
-
export declare const VERSION = "0.
|
|
43
|
+
export declare const VERSION = "0.10.1";
|
|
44
44
|
/**
|
|
45
45
|
* @description Represents the current commit hash of the module build.
|
|
46
46
|
* @summary Stores the current git commit hash for the package. The build replaces
|
|
47
47
|
* the placeholder with the actual commit hash at publish time.
|
|
48
48
|
* @const COMMIT
|
|
49
49
|
*/
|
|
50
|
-
export declare const COMMIT = "
|
|
50
|
+
export declare const COMMIT = "2609028";
|
|
51
51
|
/**
|
|
52
52
|
* @description Represents the full version string of the module.
|
|
53
53
|
* @summary Stores the semver version and commit hash for the package.
|
|
54
54
|
* The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
|
|
55
55
|
* @const FULL_VERSION
|
|
56
56
|
*/
|
|
57
|
-
export declare const FULL_VERSION = "0.
|
|
57
|
+
export declare const FULL_VERSION = "0.10.1-2609028";
|
|
58
58
|
export declare const PACKAGE_NAME = "@decaf-ts/for-nest";
|
package/lib/types/index.d.mts
CHANGED
|
@@ -40,19 +40,19 @@ export * from "./events-module/index.d.mts";
|
|
|
40
40
|
* @constant
|
|
41
41
|
* @type {string}
|
|
42
42
|
*/
|
|
43
|
-
export declare const VERSION = "0.
|
|
43
|
+
export declare const VERSION = "0.10.1";
|
|
44
44
|
/**
|
|
45
45
|
* @description Represents the current commit hash of the module build.
|
|
46
46
|
* @summary Stores the current git commit hash for the package. The build replaces
|
|
47
47
|
* the placeholder with the actual commit hash at publish time.
|
|
48
48
|
* @const COMMIT
|
|
49
49
|
*/
|
|
50
|
-
export declare const COMMIT = "
|
|
50
|
+
export declare const COMMIT = "2609028";
|
|
51
51
|
/**
|
|
52
52
|
* @description Represents the full version string of the module.
|
|
53
53
|
* @summary Stores the semver version and commit hash for the package.
|
|
54
54
|
* The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
|
|
55
55
|
* @const FULL_VERSION
|
|
56
56
|
*/
|
|
57
|
-
export declare const FULL_VERSION = "0.
|
|
57
|
+
export declare const FULL_VERSION = "0.10.1-2609028";
|
|
58
58
|
export declare const PACKAGE_NAME = "@decaf-ts/for-nest";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decaf-ts/for-nest",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "NestJS decaf integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -25,6 +25,17 @@
|
|
|
25
25
|
"default": "./lib/cjs/ram/index.cjs"
|
|
26
26
|
},
|
|
27
27
|
"default": "./lib/esm/ram/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./cli": {
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./lib/types/cli-module.d.mts",
|
|
32
|
+
"default": "./lib/esm/cli-module.js"
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"types": "./lib/types/cli-module.d.cts",
|
|
36
|
+
"default": "./lib/cjs/cli-module.cjs"
|
|
37
|
+
},
|
|
38
|
+
"default": "./lib/esm/cli-module.js"
|
|
28
39
|
}
|
|
29
40
|
},
|
|
30
41
|
"bin": {
|