@unchainedshop/platform 3.0.0-alpha3 → 3.0.0-alpha4
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/lib/migrations/migrationRepository.d.ts +2 -3
- package/lib/migrations/migrationRepository.d.ts.map +1 -1
- package/lib/migrations/migrationRepository.js.map +1 -1
- package/lib/migrations/runMigrations.d.ts +3 -2
- package/lib/migrations/runMigrations.d.ts.map +1 -1
- package/lib/migrations/runMigrations.js.map +1 -1
- package/package.json +12 -12
- package/src/migrations/migrationRepository.ts +2 -3
- package/src/migrations/runMigrations.ts +3 -3
- package/tests/platform-index.test.ts +2 -2
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare const createMigrationRepository: (db: mongodb.Db) => MigrationRepository<Migration>;
|
|
1
|
+
import { mongodb, MigrationRepository } from '@unchainedshop/mongodb';
|
|
2
|
+
export declare const createMigrationRepository: (db: mongodb.Db) => MigrationRepository;
|
|
4
3
|
//# sourceMappingURL=migrationRepository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrationRepository.d.ts","sourceRoot":"","sources":["../../src/migrations/migrationRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"migrationRepository.d.ts","sourceRoot":"","sources":["../../src/migrations/migrationRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAa,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAEjF,eAAO,MAAM,yBAAyB,OAAQ,OAAO,CAAC,EAAE,KAAG,mBAc1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrationRepository.js","sourceRoot":"","sources":["../../src/migrations/migrationRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrationRepository.js","sourceRoot":"","sources":["../../src/migrations/migrationRepository.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,EAAc,EAAuB,EAAE;IAC/E,MAAM,UAAU,GAAG,IAAI,GAAG,EAAE,CAAC;IAC7B,OAAO;QACL,EAAE;QACF,UAAU;QACV,QAAQ,EAAE,CAAC,SAAoB,EAAE,EAAE;YACjC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QAC1C,CAAC;QACD,aAAa,EAAE,GAAG,EAAE;YAClB,OAAO,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;gBACnD,OAAO,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;YAC5B,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UnchainedCore } from '@unchainedshop/core';
|
|
2
|
+
import { MigrationRepository } from '@unchainedshop/mongodb';
|
|
2
3
|
export declare const runMigrations: ({ migrationRepository, logger, unchainedAPI, }: {
|
|
3
|
-
migrationRepository: MigrationRepository<
|
|
4
|
+
migrationRepository: MigrationRepository<UnchainedCore>;
|
|
4
5
|
logger?: any;
|
|
5
6
|
unchainedAPI: UnchainedCore;
|
|
6
7
|
}) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runMigrations.d.ts","sourceRoot":"","sources":["../../src/migrations/runMigrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"runMigrations.d.ts","sourceRoot":"","sources":["../../src/migrations/runMigrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAwB,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAGnF,eAAO,MAAM,aAAa,mDAIvB;IACD,mBAAmB,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACxD,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,YAAY,EAAE,aAAa,CAAC;CAC7B,kBAiDA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runMigrations.js","sourceRoot":"","sources":["../../src/migrations/runMigrations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"runMigrations.js","sourceRoot":"","sources":["../../src/migrations/runMigrations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAuB,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAAE,EAClC,mBAAmB,EACnB,MAAM,GAAG,YAAY,CAAC,sBAAsB,CAAC,EAC7C,YAAY,GAKb,EAAE,EAAE;IACH,MAAM,aAAa,GAAG,mBAAmB,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAE1E,MAAM,aAAa,GAAG,KAAK,IAAI,EAAE;QAC/B,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC3F,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,CAAC,OAAO,CAAC,6BAA6B,EAAE,EAAE,CAAC,CAAC;QAClD,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;IAEF,MAAM,mBAAmB,GAAG,KAAK,EAAE,EA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exports": {
|
|
6
6
|
".": "./lib/platform-index.js",
|
|
@@ -31,24 +31,24 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/unchainedshop/unchained#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@unchainedshop/api": "^3.0.0-
|
|
35
|
-
"@unchainedshop/core": "^3.0.0-
|
|
36
|
-
"@unchainedshop/events": "^3.0.0-
|
|
37
|
-
"@unchainedshop/file-upload": "^3.0.0-
|
|
38
|
-
"@unchainedshop/logger": "^3.0.0-
|
|
39
|
-
"@unchainedshop/mongodb": "^3.0.0-
|
|
40
|
-
"@unchainedshop/plugins": "^3.0.0-
|
|
41
|
-
"@unchainedshop/roles": "^3.0.0-
|
|
42
|
-
"@unchainedshop/utils": "^3.0.0-
|
|
34
|
+
"@unchainedshop/api": "^3.0.0-alpha4",
|
|
35
|
+
"@unchainedshop/core": "^3.0.0-alpha4",
|
|
36
|
+
"@unchainedshop/events": "^3.0.0-alpha4",
|
|
37
|
+
"@unchainedshop/file-upload": "^3.0.0-alpha4",
|
|
38
|
+
"@unchainedshop/logger": "^3.0.0-alpha4",
|
|
39
|
+
"@unchainedshop/mongodb": "^3.0.0-alpha4",
|
|
40
|
+
"@unchainedshop/plugins": "^3.0.0-alpha4",
|
|
41
|
+
"@unchainedshop/roles": "^3.0.0-alpha4",
|
|
42
|
+
"@unchainedshop/utils": "^3.0.0-alpha4",
|
|
43
43
|
"event-iterator": "^2.0.0",
|
|
44
44
|
"JSONStream": "^1.3.5",
|
|
45
45
|
"moniker": "0.1.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@types/node": "^22.
|
|
48
|
+
"@types/node": "^22.7.8",
|
|
49
49
|
"cross-env": "^7.0.3",
|
|
50
50
|
"jest": "^29.7.0",
|
|
51
51
|
"ts-jest": "^29.2.5",
|
|
52
|
-
"typescript": "^5.6.
|
|
52
|
+
"typescript": "^5.6.3"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Migration, MigrationRepository } from '@unchainedshop/
|
|
2
|
-
import { mongodb } from '@unchainedshop/mongodb';
|
|
1
|
+
import { mongodb, Migration, MigrationRepository } from '@unchainedshop/mongodb';
|
|
3
2
|
|
|
4
|
-
export const createMigrationRepository = (db: mongodb.Db): MigrationRepository
|
|
3
|
+
export const createMigrationRepository = (db: mongodb.Db): MigrationRepository => {
|
|
5
4
|
const migrations = new Map();
|
|
6
5
|
return {
|
|
7
6
|
db,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UnchainedCore } from '@unchainedshop/core';
|
|
2
2
|
import { createLogger } from '@unchainedshop/logger';
|
|
3
|
-
import { generateDbFilterById } from '@unchainedshop/mongodb';
|
|
3
|
+
import { generateDbFilterById, MigrationRepository } from '@unchainedshop/mongodb';
|
|
4
4
|
import { createMigrationRunner } from './createMigrationRunner.js';
|
|
5
5
|
|
|
6
6
|
export const runMigrations = async ({
|
|
@@ -8,7 +8,7 @@ export const runMigrations = async ({
|
|
|
8
8
|
logger = createLogger('unchained:migrations'),
|
|
9
9
|
unchainedAPI,
|
|
10
10
|
}: {
|
|
11
|
-
migrationRepository: MigrationRepository<
|
|
11
|
+
migrationRepository: MigrationRepository<UnchainedCore>;
|
|
12
12
|
logger?: any;
|
|
13
13
|
unchainedAPI: UnchainedCore;
|
|
14
14
|
}) => {
|