@lenne.tech/nest-server 11.3.0 → 11.4.1

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.
Files changed (35) hide show
  1. package/bin/migrate.js +40 -0
  2. package/dist/core/modules/migrate/cli/migrate-cli.d.ts +3 -0
  3. package/dist/core/modules/migrate/cli/migrate-cli.js +221 -0
  4. package/dist/core/modules/migrate/cli/migrate-cli.js.map +1 -0
  5. package/dist/core/modules/migrate/helpers/migration.helper.d.ts +12 -0
  6. package/dist/core/modules/migrate/helpers/migration.helper.js +57 -0
  7. package/dist/core/modules/migrate/helpers/migration.helper.js.map +1 -0
  8. package/dist/core/modules/migrate/helpers/ts-compiler.d.ts +2 -0
  9. package/dist/core/modules/migrate/helpers/ts-compiler.js +3 -0
  10. package/dist/core/modules/migrate/helpers/ts-compiler.js.map +1 -0
  11. package/dist/core/modules/migrate/index.d.ts +4 -0
  12. package/dist/core/modules/migrate/index.js +21 -0
  13. package/dist/core/modules/migrate/index.js.map +1 -0
  14. package/dist/core/modules/migrate/migration-runner.d.ts +26 -0
  15. package/dist/core/modules/migrate/migration-runner.js +124 -0
  16. package/dist/core/modules/migrate/migration-runner.js.map +1 -0
  17. package/dist/core/modules/migrate/mongo-state-store.d.ts +30 -0
  18. package/dist/core/modules/migrate/mongo-state-store.js +105 -0
  19. package/dist/core/modules/migrate/mongo-state-store.js.map +1 -0
  20. package/dist/core/modules/migrate/templates/migration-project.template.ts +53 -0
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.js +1 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/tsconfig.build.tsbuildinfo +1 -1
  25. package/package.json +9 -3
  26. package/src/core/modules/migrate/MIGRATION_FROM_NODEPIT.md +298 -0
  27. package/src/core/modules/migrate/README.md +453 -0
  28. package/src/core/modules/migrate/cli/migrate-cli.ts +319 -0
  29. package/src/core/modules/migrate/helpers/migration.helper.ts +117 -0
  30. package/src/core/modules/migrate/helpers/ts-compiler.js +14 -0
  31. package/src/core/modules/migrate/index.ts +41 -0
  32. package/src/core/modules/migrate/migration-runner.ts +230 -0
  33. package/src/core/modules/migrate/mongo-state-store.ts +283 -0
  34. package/src/core/modules/migrate/templates/migration-project.template.ts +53 -0
  35. package/src/index.ts +9 -3
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MongoStateStore = void 0;
4
+ exports.synchronizedMigration = synchronizedMigration;
5
+ exports.synchronizedUp = synchronizedUp;
6
+ const mongodb_1 = require("mongodb");
7
+ const util_1 = require("util");
8
+ class MongoStateStore {
9
+ constructor(objectOrHost) {
10
+ this.mongodbHost = typeof objectOrHost === 'string' ? objectOrHost : objectOrHost.uri;
11
+ this.collectionName =
12
+ typeof objectOrHost === 'string' ? 'migrations' : (objectOrHost.collectionName ?? 'migrations');
13
+ this.lockCollectionName = typeof objectOrHost !== 'string' ? objectOrHost.lockCollectionName : undefined;
14
+ }
15
+ load(fn) {
16
+ this.loadAsync()
17
+ .then((result) => fn(undefined, result))
18
+ .catch((err) => fn(err));
19
+ }
20
+ async loadAsync() {
21
+ return dbRequest(this.mongodbHost, async (db) => {
22
+ const result = await db.collection(this.collectionName).find({}).toArray();
23
+ if (result.length > 1) {
24
+ throw new Error(`Expected exactly one result, but got ${result.length}`);
25
+ }
26
+ if (result.length === 0) {
27
+ console.debug('No migrations found, probably running the very first time');
28
+ return {};
29
+ }
30
+ return result[0];
31
+ });
32
+ }
33
+ save(set, fn) {
34
+ this.saveAsync(set)
35
+ .then(() => fn())
36
+ .catch((err) => fn(err));
37
+ }
38
+ async saveAsync(set) {
39
+ const { lastRun, migrations } = set;
40
+ await dbRequest(this.mongodbHost, async (db) => {
41
+ await db.collection(this.collectionName).replaceOne({}, { lastRun, migrations }, { upsert: true });
42
+ });
43
+ }
44
+ }
45
+ exports.MongoStateStore = MongoStateStore;
46
+ async function synchronizedMigration(opts, callback) {
47
+ if (!opts.stateStore) {
48
+ throw new Error('No `stateStore` in migration options');
49
+ }
50
+ const stateStore = opts.stateStore;
51
+ if (!(stateStore instanceof MongoStateStore)) {
52
+ throw new Error('Given `stateStore` is not `MongoStateStore`');
53
+ }
54
+ const lockCollectionName = stateStore.lockCollectionName;
55
+ if (typeof lockCollectionName !== 'string') {
56
+ throw new Error('`lockCollectionName` in MongoStateStore is not set');
57
+ }
58
+ try {
59
+ await acquireLock(stateStore.mongodbHost, lockCollectionName);
60
+ const set = await stateStore.loadAsync();
61
+ await callback(set);
62
+ }
63
+ finally {
64
+ await releaseLock(stateStore.mongodbHost, lockCollectionName);
65
+ }
66
+ }
67
+ async function synchronizedUp(opts) {
68
+ await synchronizedMigration(opts, async (loadedSet) => {
69
+ await (0, util_1.promisify)(loadedSet.up).call(loadedSet);
70
+ });
71
+ }
72
+ async function acquireLock(url, lockCollectionName) {
73
+ await dbRequest(url, async (db) => {
74
+ const collection = db.collection(lockCollectionName);
75
+ await collection.createIndex({ lock: 1 }, { unique: true });
76
+ let showMessage = true;
77
+ for (;;) {
78
+ const result = await collection.updateOne({ lock: 'lock' }, { $set: { lock: 'lock' } }, { upsert: true });
79
+ const lockAcquired = result.upsertedCount > 0;
80
+ if (lockAcquired) {
81
+ break;
82
+ }
83
+ if (showMessage) {
84
+ console.debug('Waiting for migration lock release …');
85
+ showMessage = false;
86
+ }
87
+ await (0, util_1.promisify)(setTimeout)(100);
88
+ }
89
+ });
90
+ }
91
+ async function dbRequest(url, callback) {
92
+ let client;
93
+ try {
94
+ client = await mongodb_1.MongoClient.connect(url);
95
+ const db = client.db();
96
+ return await callback(db);
97
+ }
98
+ finally {
99
+ await client?.close();
100
+ }
101
+ }
102
+ async function releaseLock(url, lockCollectionName) {
103
+ await dbRequest(url, (db) => db.collection(lockCollectionName).deleteOne({ lock: 'lock' }));
104
+ }
105
+ //# sourceMappingURL=mongo-state-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mongo-state-store.js","sourceRoot":"","sources":["../../../../src/core/modules/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EAAE,CAAC;gBACjB,MAAM;YACR,CAAC;YAED,IAAI,WAAW,EAAE,CAAC;gBAChB,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;gBACtD,WAAW,GAAG,KAAK,CAAC;YACtB,CAAC;YAED,MAAM,IAAA,gBAAS,EAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AASD,KAAK,UAAU,SAAS,CAAI,GAAW,EAAE,QAAoC;IAC3E,IAAI,MAA+B,CAAC;IACpC,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,qBAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACxC,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,EAAE,CAAC;QACvB,OAAO,MAAM,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;YAAS,CAAC;QACT,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC;IACxB,CAAC;AACH,CAAC;AAQD,KAAK,UAAU,WAAW,CAAC,GAAW,EAAE,kBAA0B;IAChE,MAAM,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AAC9F,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { getDb, uploadFileToGridFS } from '@lenne.tech/nest-server';
2
+ import { Db, ObjectId } from 'mongodb';
3
+ import config from '../src/config.env';
4
+
5
+ /**
6
+ * Migration template for nest-server projects
7
+ *
8
+ * This template is ready-to-use for @lenne.tech/nest-server projects.
9
+ * It imports the necessary helpers and config automatically.
10
+ *
11
+ * Available helpers:
12
+ * - getDb(uri): Get MongoDB connection
13
+ * - uploadFileToGridFS(uri, filePath, options): Upload file to GridFS
14
+ */
15
+
16
+ const MONGO_URL = config.mongoose.uri;
17
+
18
+ /**
19
+ * Run migration
20
+ *
21
+ * Code your update script here!
22
+ */
23
+ export const up = async () => {
24
+ const db: Db = await getDb(MONGO_URL);
25
+
26
+ // Example: Add a new field to all documents in a collection
27
+ // await db.collection('users').updateMany(
28
+ // { email: { $exists: false } },
29
+ // { $set: { email: '' } }
30
+ // );
31
+
32
+ // Example: Upload a file to GridFS
33
+ // const fileId: ObjectId = await uploadFileToGridFS(
34
+ // MONGO_URL,
35
+ // '../assets/image.png',
36
+ // { bucketName: 'images', filename: 'logo.png' }
37
+ // );
38
+ };
39
+
40
+ /**
41
+ * Rollback migration
42
+ *
43
+ * Code your downgrade script here!
44
+ */
45
+ export const down = async () => {
46
+ const db: Db = await getDb(MONGO_URL);
47
+
48
+ // Example: Remove the field added in the up() function
49
+ // await db.collection('users').updateMany(
50
+ // {},
51
+ // { $unset: { email: '' } }
52
+ // );
53
+ };
package/dist/index.d.ts CHANGED
@@ -118,6 +118,7 @@ export * from './core/modules/health-check/core-health-check.controller';
118
118
  export * from './core/modules/health-check/core-health-check.module';
119
119
  export * from './core/modules/health-check/core-health-check.resolver';
120
120
  export * from './core/modules/health-check/core-health-check.service';
121
+ export * from './core/modules/migrate';
121
122
  export * from './core/modules/user/core-user.model';
122
123
  export * from './core/modules/user/core-user.service';
123
124
  export * from './core/modules/user/inputs/core-user-create.input';
package/dist/index.js CHANGED
@@ -133,6 +133,7 @@ __exportStar(require("./core/modules/health-check/core-health-check.controller")
133
133
  __exportStar(require("./core/modules/health-check/core-health-check.module"), exports);
134
134
  __exportStar(require("./core/modules/health-check/core-health-check.resolver"), exports);
135
135
  __exportStar(require("./core/modules/health-check/core-health-check.service"), exports);
136
+ __exportStar(require("./core/modules/migrate"), exports);
136
137
  __exportStar(require("./core/modules/user/core-user.model"), exports);
137
138
  __exportStar(require("./core/modules/user/core-user.service"), exports);
138
139
  __exportStar(require("./core/modules/user/inputs/core-user-create.input"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"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EAA2D;AAC3D,wEAAsD;AACtD,2EAAyD;AACzD,0EAAwD;AACxD,4EAA0D;AAC1D,iFAA+D;AAC/D,+EAA6D;AAC7D,mEAAiD;AAMjD,+EAA6D;AAC7D,2EAAyD;AACzD,sEAAoD;AACpD,uEAAqD;AACrD,yEAAuD;AACvD,iGAA+E;AAC/E,yFAAuE;AACvE,yFAAuE;AACvE,wEAAsD;AACtD,yEAAuD;AACvD,qFAAmE;AACnE,qFAAmE;AACnE,0FAAwE;AACxE,2FAAyE;AACzE,uFAAqE;AACrE,sFAAoE;AACpE,iFAA+D;AAC/D,sFAAoE;AACpE,8EAA4D;AAC5D,uEAAqD;AAMrD,2EAAyD;AACzD,2EAAyD;AACzD,yEAAuD;AACvD,wEAAsD;AACtD,gGAA8E;AAC9E,uFAAqE;AAMrE,6FAA2E;AAC3E,2FAAyE;AACzE,uFAAqE;AACrE,yFAAuE;AAMvE,wFAAsE;AACtE,sEAAoD;AACpD,wEAAsD;AACtD,oFAAkE;AAClE,6EAA2D;AAM3D,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAIA,gDAA8B;AAK9B,iEAA+C;AAC/C,qEAAmD;AACnD,kFAAgE;AAChE,kFAAgE;AAChE,sFAAoE;AACpE,6FAA2E;AAC3E,kFAAgE;AAChE,0FAAwE;AACxE,+EAA6D;AAC7D,gFAA8D;AAC9D,2EAAyD;AACzD,kFAAgE;AAChE,mFAAiE;AACjE,+EAA6D;AAC7D,4EAA0D;AAC1D,wEAAsD;AACtD,gEAA8C;AAC9C,sEAAoD;AACpD,kFAAgE;AAChE,sEAAoD;AACpD,sEAAoD;AACpD,uEAAqD;AACrD,kEAAgD;AAChD,yEAAuD;AACvD,oEAAkD;AAClD,sEAAoD;AACpD,uEAAqD;AACrD,sEAAoD;AACpD,qEAAmD;AACnD,qEAAmD;AACnD,oEAAkD;AAClD,uEAAqD;AACrD,qEAAmD;AACn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