@rytass/bpm-core-nestjs-module 0.1.0 → 0.1.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/CHANGELOG.md +49 -0
- package/package.json +1 -1
- package/src/lib/migrations/{0000000000000-enable-postgres-extensions.d.ts → 0000000000001-enable-postgres-extensions.d.ts} +2 -2
- package/src/lib/migrations/{0000000000000-enable-postgres-extensions.js → 0000000000001-enable-postgres-extensions.js} +5 -5
- package/src/lib/migrations/{0000000000000-enable-postgres-extensions.js.map → 0000000000001-enable-postgres-extensions.js.map} +1 -1
- package/src/lib/migrations/0000000001000-identity-organization-foundation.d.ts +2 -2
- package/src/lib/migrations/0000000001000-identity-organization-foundation.js +4 -4
- package/src/lib/migrations/0000000002000-form-builder-foundation.d.ts +2 -2
- package/src/lib/migrations/0000000002000-form-builder-foundation.js +4 -4
- package/src/lib/migrations/0000000003000-approval-template-foundation.d.ts +2 -2
- package/src/lib/migrations/0000000003000-approval-template-foundation.js +4 -4
- package/src/lib/migrations/0000000004000-workflow-engine-foundation.d.ts +2 -2
- package/src/lib/migrations/0000000004000-workflow-engine-foundation.js +4 -4
- package/src/lib/migrations/0000000008000-approval-template-categories.d.ts +2 -2
- package/src/lib/migrations/0000000008000-approval-template-categories.js +4 -4
- package/src/lib/migrations/0000000009000-task-candidates.d.ts +2 -2
- package/src/lib/migrations/0000000009000-task-candidates.js +4 -4
- package/src/lib/migrations/index.d.ts +1 -1
- package/src/lib/migrations/index.js +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,55 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
Releases are managed by [`nx release`](https://nx.dev/recipes/nx-release) with
|
|
10
10
|
Conventional Commits — see `nx.json` for the release config.
|
|
11
11
|
|
|
12
|
+
## 0.1.2 — 2026-05-27
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- **First migration class-name suffix collision with TypeORM timestamp
|
|
17
|
+
validation.** `EnablePostgresExtensions0000000000000` from 0.1.1
|
|
18
|
+
parsed to a JavaScript timestamp of `0`, which TypeORM 0.3's
|
|
19
|
+
`MigrationExecutor.getMigrations()` rejects with
|
|
20
|
+
`migration name is wrong. Migration class name should have a JavaScript
|
|
21
|
+
timestamp appended.` (the check is `!timestamp || isNaN(timestamp)`).
|
|
22
|
+
Renamed to `EnablePostgresExtensions0000000000001` (timestamp `1`).
|
|
23
|
+
The file was also renamed
|
|
24
|
+
`0000000000000-enable-postgres-extensions.ts` →
|
|
25
|
+
`0000000000001-enable-postgres-extensions.ts` so file ordering still
|
|
26
|
+
matches class ordering.
|
|
27
|
+
|
|
28
|
+
Consumers on 0.1.0 / 0.1.1 should upgrade directly to 0.1.2.
|
|
29
|
+
|
|
30
|
+
## 0.1.1 — 2026-05-27
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- **Migration class-name suffix consistency.** Seven migrations
|
|
35
|
+
(`EnablePostgresExtensions`, `IdentityOrganizationFoundation`,
|
|
36
|
+
`FormBuilderFoundation`, `ApprovalTemplateFoundation`,
|
|
37
|
+
`WorkflowEngineFoundation`, `ApprovalTemplateCategories`,
|
|
38
|
+
`TaskCandidates`) previously used 13-digit date suffixes
|
|
39
|
+
(`...2026050404000`) while the remaining seven used sequence suffixes
|
|
40
|
+
(`...0000000005000`). TypeORM's `MigrationExecutor` sorts by the
|
|
41
|
+
trailing numeric tail of the class name, so date-suffixed migrations
|
|
42
|
+
ran AFTER sequence-suffixed ones — producing
|
|
43
|
+
`relation "approval_instances" does not exist` when
|
|
44
|
+
`NotificationsSla0000000006000` tried to FK-reference a table that
|
|
45
|
+
`WorkflowEngineFoundation2026050404000` would only create later.
|
|
46
|
+
|
|
47
|
+
All 14 migration classes now use the sequence suffix that matches the
|
|
48
|
+
file-name prefix (`EnablePostgresExtensions0000000000000` …
|
|
49
|
+
`WorkflowQueryIndexes0000000013000`). Array order in
|
|
50
|
+
`BPM_CORE_MIGRATIONS` is unchanged.
|
|
51
|
+
|
|
52
|
+
**Breaking for fresh deployments only**: the migration bookkeeping
|
|
53
|
+
table records class names, so consumers upgrading from 0.1.0 in a
|
|
54
|
+
production database would see the renamed migrations as "pending"
|
|
55
|
+
again. Since 0.1.0 is a same-week release and there are no recorded
|
|
56
|
+
production deployments yet, no migration backfill is shipped. If a
|
|
57
|
+
consumer needs to upgrade in place, manually
|
|
58
|
+
`UPDATE migrations SET name = REPLACE(name, '2026...', '00000...')`
|
|
59
|
+
in the migrations table to retain the executed state.
|
|
60
|
+
|
|
12
61
|
## 0.1.0 — Unreleased
|
|
13
62
|
|
|
14
63
|
### Added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rytass/bpm-core-nestjs-module",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Embeddable NestJS BPM approval workflow module: workflow engine, approval templates, forms, organization/member contracts, attachments, signatures, notifications, delegation, and TypeORM migrations.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bpm",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
-
export declare class
|
|
3
|
-
readonly name = "
|
|
2
|
+
export declare class EnablePostgresExtensions0000000000001 implements MigrationInterface {
|
|
3
|
+
readonly name = "EnablePostgresExtensions0000000000001";
|
|
4
4
|
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
5
|
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
class
|
|
3
|
+
exports.EnablePostgresExtensions0000000000001 = void 0;
|
|
4
|
+
class EnablePostgresExtensions0000000000001 {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.name = '
|
|
6
|
+
this.name = 'EnablePostgresExtensions0000000000001';
|
|
7
7
|
}
|
|
8
8
|
async up(queryRunner) {
|
|
9
9
|
await queryRunner.query('CREATE EXTENSION IF NOT EXISTS "uuid-ossp"');
|
|
@@ -13,5 +13,5 @@ class EnablePostgresExtensions2026043000000 {
|
|
|
13
13
|
await queryRunner.query('DROP EXTENSION IF EXISTS "ltree"');
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
exports.
|
|
17
|
-
//# sourceMappingURL=
|
|
16
|
+
exports.EnablePostgresExtensions0000000000001 = EnablePostgresExtensions0000000000001;
|
|
17
|
+
//# sourceMappingURL=0000000000001-enable-postgres-extensions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"0000000000001-enable-postgres-extensions.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/migrations/0000000000001-enable-postgres-extensions.ts"],"names":[],"mappings":";;;AAEA,MAAa,qCAAqC;IAAlD;QACW,SAAI,GAAG,uCAAuC,CAAC;IAU1D,CAAC;IARC,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B,MAAM,WAAW,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;QACtE,MAAM,WAAW,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;IACpE,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;IAC9D,CAAC;CACF;AAXD,sFAWC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
-
export declare class
|
|
3
|
-
readonly name = "
|
|
2
|
+
export declare class IdentityOrganizationFoundation0000000001000 implements MigrationInterface {
|
|
3
|
+
readonly name = "IdentityOrganizationFoundation0000000001000";
|
|
4
4
|
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
5
|
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
class
|
|
3
|
+
exports.IdentityOrganizationFoundation0000000001000 = void 0;
|
|
4
|
+
class IdentityOrganizationFoundation0000000001000 {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.name = '
|
|
6
|
+
this.name = 'IdentityOrganizationFoundation0000000001000';
|
|
7
7
|
}
|
|
8
8
|
async up(queryRunner) {
|
|
9
9
|
await queryRunner.query(`
|
|
@@ -93,5 +93,5 @@ class IdentityOrganizationFoundation2026043001000 {
|
|
|
93
93
|
await queryRunner.query('DROP TABLE IF EXISTS member_metadata_cache');
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
exports.
|
|
96
|
+
exports.IdentityOrganizationFoundation0000000001000 = IdentityOrganizationFoundation0000000001000;
|
|
97
97
|
//# sourceMappingURL=0000000001000-identity-organization-foundation.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
-
export declare class
|
|
3
|
-
readonly name = "
|
|
2
|
+
export declare class FormBuilderFoundation0000000002000 implements MigrationInterface {
|
|
3
|
+
readonly name = "FormBuilderFoundation0000000002000";
|
|
4
4
|
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
5
|
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
class
|
|
3
|
+
exports.FormBuilderFoundation0000000002000 = void 0;
|
|
4
|
+
class FormBuilderFoundation0000000002000 {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.name = '
|
|
6
|
+
this.name = 'FormBuilderFoundation0000000002000';
|
|
7
7
|
}
|
|
8
8
|
async up(queryRunner) {
|
|
9
9
|
await queryRunner.query(`
|
|
@@ -62,5 +62,5 @@ class FormBuilderFoundation2026050202000 {
|
|
|
62
62
|
await queryRunner.query('DROP TABLE IF EXISTS form_definitions');
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
exports.
|
|
65
|
+
exports.FormBuilderFoundation0000000002000 = FormBuilderFoundation0000000002000;
|
|
66
66
|
//# sourceMappingURL=0000000002000-form-builder-foundation.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
-
export declare class
|
|
3
|
-
readonly name = "
|
|
2
|
+
export declare class ApprovalTemplateFoundation0000000003000 implements MigrationInterface {
|
|
3
|
+
readonly name = "ApprovalTemplateFoundation0000000003000";
|
|
4
4
|
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
5
|
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
class
|
|
3
|
+
exports.ApprovalTemplateFoundation0000000003000 = void 0;
|
|
4
|
+
class ApprovalTemplateFoundation0000000003000 {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.name = '
|
|
6
|
+
this.name = 'ApprovalTemplateFoundation0000000003000';
|
|
7
7
|
}
|
|
8
8
|
async up(queryRunner) {
|
|
9
9
|
await queryRunner.query(`
|
|
@@ -66,5 +66,5 @@ class ApprovalTemplateFoundation2026050403000 {
|
|
|
66
66
|
await queryRunner.query('DROP TABLE IF EXISTS approval_templates');
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
exports.
|
|
69
|
+
exports.ApprovalTemplateFoundation0000000003000 = ApprovalTemplateFoundation0000000003000;
|
|
70
70
|
//# sourceMappingURL=0000000003000-approval-template-foundation.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
-
export declare class
|
|
3
|
-
readonly name = "
|
|
2
|
+
export declare class WorkflowEngineFoundation0000000004000 implements MigrationInterface {
|
|
3
|
+
readonly name = "WorkflowEngineFoundation0000000004000";
|
|
4
4
|
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
5
|
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
class
|
|
3
|
+
exports.WorkflowEngineFoundation0000000004000 = void 0;
|
|
4
|
+
class WorkflowEngineFoundation0000000004000 {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.name = '
|
|
6
|
+
this.name = 'WorkflowEngineFoundation0000000004000';
|
|
7
7
|
}
|
|
8
8
|
async up(queryRunner) {
|
|
9
9
|
await queryRunner.query(`
|
|
@@ -130,5 +130,5 @@ class WorkflowEngineFoundation2026050404000 {
|
|
|
130
130
|
await queryRunner.query('DROP TABLE IF EXISTS approval_instances');
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
exports.
|
|
133
|
+
exports.WorkflowEngineFoundation0000000004000 = WorkflowEngineFoundation0000000004000;
|
|
134
134
|
//# sourceMappingURL=0000000004000-workflow-engine-foundation.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
-
export declare class
|
|
3
|
-
readonly name = "
|
|
2
|
+
export declare class ApprovalTemplateCategories0000000008000 implements MigrationInterface {
|
|
3
|
+
readonly name = "ApprovalTemplateCategories0000000008000";
|
|
4
4
|
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
5
|
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
class
|
|
3
|
+
exports.ApprovalTemplateCategories0000000008000 = void 0;
|
|
4
|
+
class ApprovalTemplateCategories0000000008000 {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.name = '
|
|
6
|
+
this.name = 'ApprovalTemplateCategories0000000008000';
|
|
7
7
|
}
|
|
8
8
|
async up(queryRunner) {
|
|
9
9
|
await queryRunner.query(`
|
|
@@ -88,5 +88,5 @@ class ApprovalTemplateCategories2026051208000 {
|
|
|
88
88
|
`);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
exports.
|
|
91
|
+
exports.ApprovalTemplateCategories0000000008000 = ApprovalTemplateCategories0000000008000;
|
|
92
92
|
//# sourceMappingURL=0000000008000-approval-template-categories.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
-
export declare class
|
|
3
|
-
readonly name = "
|
|
2
|
+
export declare class TaskCandidates0000000009000 implements MigrationInterface {
|
|
3
|
+
readonly name = "TaskCandidates0000000009000";
|
|
4
4
|
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
5
|
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
6
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
class
|
|
3
|
+
exports.TaskCandidates0000000009000 = void 0;
|
|
4
|
+
class TaskCandidates0000000009000 {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.name = '
|
|
6
|
+
this.name = 'TaskCandidates0000000009000';
|
|
7
7
|
}
|
|
8
8
|
async up(queryRunner) {
|
|
9
9
|
await queryRunner.query(`
|
|
@@ -93,5 +93,5 @@ class TaskCandidates2026051309000 {
|
|
|
93
93
|
`);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
exports.
|
|
96
|
+
exports.TaskCandidates0000000009000 = TaskCandidates0000000009000;
|
|
97
97
|
//# sourceMappingURL=0000000009000-task-candidates.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MigrationInterface } from 'typeorm';
|
|
2
2
|
export declare const BPM_CORE_MIGRATIONS: readonly (new () => MigrationInterface)[];
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './0000000000001-enable-postgres-extensions';
|
|
4
4
|
export * from './0000000001000-identity-organization-foundation';
|
|
5
5
|
export * from './0000000002000-form-builder-foundation';
|
|
6
6
|
export * from './0000000003000-approval-template-foundation';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BPM_CORE_MIGRATIONS = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const _0000000000001_enable_postgres_extensions_1 = require("./0000000000001-enable-postgres-extensions");
|
|
6
6
|
const _0000000001000_identity_organization_foundation_1 = require("./0000000001000-identity-organization-foundation");
|
|
7
7
|
const _0000000002000_form_builder_foundation_1 = require("./0000000002000-form-builder-foundation");
|
|
8
8
|
const _0000000003000_approval_template_foundation_1 = require("./0000000003000-approval-template-foundation");
|
|
@@ -17,22 +17,22 @@ const _0000000011000_remove_attachment_encryption_key_1 = require("./00000000110
|
|
|
17
17
|
const _0000000012000_notification_sla_idempotency_1 = require("./0000000012000-notification-sla-idempotency");
|
|
18
18
|
const _0000000013000_workflow_query_indexes_1 = require("./0000000013000-workflow-query-indexes");
|
|
19
19
|
exports.BPM_CORE_MIGRATIONS = [
|
|
20
|
-
|
|
21
|
-
_0000000001000_identity_organization_foundation_1.
|
|
22
|
-
_0000000002000_form_builder_foundation_1.
|
|
23
|
-
_0000000003000_approval_template_foundation_1.
|
|
24
|
-
_0000000004000_workflow_engine_foundation_1.
|
|
20
|
+
_0000000000001_enable_postgres_extensions_1.EnablePostgresExtensions0000000000001,
|
|
21
|
+
_0000000001000_identity_organization_foundation_1.IdentityOrganizationFoundation0000000001000,
|
|
22
|
+
_0000000002000_form_builder_foundation_1.FormBuilderFoundation0000000002000,
|
|
23
|
+
_0000000003000_approval_template_foundation_1.ApprovalTemplateFoundation0000000003000,
|
|
24
|
+
_0000000004000_workflow_engine_foundation_1.WorkflowEngineFoundation0000000004000,
|
|
25
25
|
_0000000005000_delegation_rules_1.DelegationRules0000000005000,
|
|
26
26
|
_0000000006000_notifications_sla_1.NotificationsSla0000000006000,
|
|
27
27
|
_0000000007000_signatures_attachments_1.SignaturesAttachments0000000007000,
|
|
28
|
-
_0000000008000_approval_template_categories_1.
|
|
29
|
-
_0000000009000_task_candidates_1.
|
|
28
|
+
_0000000008000_approval_template_categories_1.ApprovalTemplateCategories0000000008000,
|
|
29
|
+
_0000000009000_task_candidates_1.TaskCandidates0000000009000,
|
|
30
30
|
_0000000010000_notification_delivery_state_1.NotificationDeliveryState0000000010000,
|
|
31
31
|
_0000000011000_remove_attachment_encryption_key_1.RemoveAttachmentEncryptionKey0000000011000,
|
|
32
32
|
_0000000012000_notification_sla_idempotency_1.NotificationSlaIdempotency0000000012000,
|
|
33
33
|
_0000000013000_workflow_query_indexes_1.WorkflowQueryIndexes0000000013000,
|
|
34
34
|
];
|
|
35
|
-
tslib_1.__exportStar(require("./
|
|
35
|
+
tslib_1.__exportStar(require("./0000000000001-enable-postgres-extensions"), exports);
|
|
36
36
|
tslib_1.__exportStar(require("./0000000001000-identity-organization-foundation"), exports);
|
|
37
37
|
tslib_1.__exportStar(require("./0000000002000-form-builder-foundation"), exports);
|
|
38
38
|
tslib_1.__exportStar(require("./0000000003000-approval-template-foundation"), exports);
|