@unchainedshop/core 3.0.0-rc5 → 3.0.0-rc6
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/package.json +21 -21
- package/lib/core-index_BACKUP_57582.d.ts +0 -26
- package/lib/core-index_BACKUP_57582.d.ts.map +0 -1
- package/lib/core-index_BACKUP_57582.js +0 -30
- package/lib/core-index_BACKUP_57582.js.map +0 -1
- package/lib/core-index_BASE_57582.d.ts +0 -74
- package/lib/core-index_BASE_57582.d.ts.map +0 -1
- package/lib/core-index_BASE_57582.js +0 -145
- package/lib/core-index_BASE_57582.js.map +0 -1
- package/lib/core-index_LOCAL_57582.d.ts +0 -26
- package/lib/core-index_LOCAL_57582.d.ts.map +0 -1
- package/lib/core-index_LOCAL_57582.js +0 -31
- package/lib/core-index_LOCAL_57582.js.map +0 -1
- package/lib/core-index_REMOTE_57582.d.ts +0 -74
- package/lib/core-index_REMOTE_57582.d.ts.map +0 -1
- package/lib/core-index_REMOTE_57582.js +0 -146
- package/lib/core-index_REMOTE_57582.js.map +0 -1
- package/lib/services/createDownloadStreamService.d.ts +0 -11
- package/lib/services/createDownloadStreamService.d.ts.map +0 -1
- package/lib/services/createDownloadStreamService.js +0 -9
- package/lib/services/createDownloadStreamService.js.map +0 -1
- package/lib/services/createSignedURLService.d.ts +0 -13
- package/lib/services/createSignedURLService.d.ts.map +0 -1
- package/lib/services/createSignedURLService.js +0 -14
- package/lib/services/createSignedURLService.js.map +0 -1
- package/lib/services/deleteUserCartService.d.ts +0 -6
- package/lib/services/deleteUserCartService.d.ts.map +0 -1
- package/lib/services/deleteUserCartService.js +0 -20
- package/lib/services/deleteUserCartService.js.map +0 -1
- package/lib/services/deleteUserCarts.d.ts +0 -5
- package/lib/services/deleteUserCarts.d.ts.map +0 -1
- package/lib/services/deleteUserCarts.js +0 -18
- package/lib/services/deleteUserCarts.js.map +0 -1
- package/lib/services/deleteUserCartsService.d.ts +0 -5
- package/lib/services/deleteUserCartsService.d.ts.map +0 -1
- package/lib/services/deleteUserCartsService.js +0 -18
- package/lib/services/deleteUserCartsService.js.map +0 -1
- package/lib/services/index_BACKUP_58089.d.ts +0 -246
- package/lib/services/index_BACKUP_58089.d.ts.map +0 -1
- package/lib/services/index_BACKUP_58089.js +0 -103
- package/lib/services/index_BACKUP_58089.js.map +0 -1
- package/lib/services/index_BASE_58089.d.ts +0 -31
- package/lib/services/index_BASE_58089.d.ts.map +0 -1
- package/lib/services/index_BASE_58089.js +0 -42
- package/lib/services/index_BASE_58089.js.map +0 -1
- package/lib/services/index_LOCAL_58089.d.ts +0 -246
- package/lib/services/index_LOCAL_58089.d.ts.map +0 -1
- package/lib/services/index_LOCAL_58089.js +0 -103
- package/lib/services/index_LOCAL_58089.js.map +0 -1
- package/lib/services/index_REMOTE_58089.d.ts +0 -34
- package/lib/services/index_REMOTE_58089.d.ts.map +0 -1
- package/lib/services/index_REMOTE_58089.js +0 -44
- package/lib/services/index_REMOTE_58089.js.map +0 -1
- package/lib/services/migrateBookmarksService.d.ts +0 -13
- package/lib/services/migrateBookmarksService.d.ts.map +0 -1
- package/lib/services/migrateBookmarksService.js +0 -26
- package/lib/services/migrateBookmarksService.js.map +0 -1
- package/lib/services/migrateOrderCartService.d.ts +0 -23
- package/lib/services/migrateOrderCartService.d.ts.map +0 -1
- package/lib/services/migrateOrderCartService.js +0 -32
- package/lib/services/migrateOrderCartService.js.map +0 -1
- package/lib/services/migrateUserDataService.d.ts +0 -19
- package/lib/services/migrateUserDataService.d.ts.map +0 -1
- package/lib/services/migrateUserDataService.js +0 -18
- package/lib/services/migrateUserDataService.js.map +0 -1
- package/lib/services/nextUserCartService.d.ts +0 -22
- package/lib/services/nextUserCartService.d.ts.map +0 -1
- package/lib/services/nextUserCartService.js +0 -35
- package/lib/services/nextUserCartService.js.map +0 -1
- package/lib/services/removeFilesService.d.ts +0 -10
- package/lib/services/removeFilesService.d.ts.map +0 -1
- package/lib/services/removeFilesService.js +0 -20
- package/lib/services/removeFilesService.js.map +0 -1
- package/lib/services/removeProductService.d.ts +0 -20
- package/lib/services/removeProductService.d.ts.map +0 -1
- package/lib/services/removeProductService.js +0 -27
- package/lib/services/removeProductService.js.map +0 -1
- package/lib/services/updateCalculationService.d.ts +0 -17
- package/lib/services/updateCalculationService.d.ts.map +0 -1
- package/lib/services/updateCalculationService.js +0 -68
- package/lib/services/updateCalculationService.js.map +0 -1
- package/lib/services/updateUserAvatarAfterUploadService.d.ts +0 -18
- package/lib/services/updateUserAvatarAfterUploadService.d.ts.map +0 -1
- package/lib/services/updateUserAvatarAfterUploadService.js +0 -25
- package/lib/services/updateUserAvatarAfterUploadService.js.map +0 -1
- package/lib/services/uploadFileFromStreamService.d.ts +0 -12
- package/lib/services/uploadFileFromStreamService.d.ts.map +0 -1
- package/lib/services/uploadFileFromStreamService.js +0 -10
- package/lib/services/uploadFileFromStreamService.js.map +0 -1
- package/lib/services/uploadFileFromURLService.d.ts +0 -17
- package/lib/services/uploadFileFromURLService.d.ts.map +0 -1
- package/lib/services/uploadFileFromURLService.js +0 -10
- package/lib/services/uploadFileFromURLService.js.map +0 -1
- package/lib/types.d.ts +0 -4
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -5
- package/lib/types.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/core",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-rc6",
|
|
4
4
|
"main": "lib/core-index.js",
|
|
5
5
|
"types": "lib/core-index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -29,26 +29,26 @@
|
|
|
29
29
|
"homepage": "https://github.com/unchainedshop/unchained#readme",
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@breejs/later": "^4.2.0",
|
|
32
|
-
"@unchainedshop/core-assortments": "^3.0.0-
|
|
33
|
-
"@unchainedshop/core-bookmarks": "^3.0.0-
|
|
34
|
-
"@unchainedshop/core-countries": "^3.0.0-
|
|
35
|
-
"@unchainedshop/core-currencies": "^3.0.0-
|
|
36
|
-
"@unchainedshop/core-delivery": "^3.0.0-
|
|
37
|
-
"@unchainedshop/core-enrollments": "^3.0.0-
|
|
38
|
-
"@unchainedshop/core-events": "^3.0.0-
|
|
39
|
-
"@unchainedshop/core-files": "^3.0.0-
|
|
40
|
-
"@unchainedshop/core-filters": "^3.0.0-
|
|
41
|
-
"@unchainedshop/core-languages": "^3.0.0-
|
|
42
|
-
"@unchainedshop/core-messaging": "^3.0.0-
|
|
43
|
-
"@unchainedshop/core-orders": "^3.0.0-
|
|
44
|
-
"@unchainedshop/core-payment": "^3.0.0-
|
|
45
|
-
"@unchainedshop/core-products": "^3.0.0-
|
|
46
|
-
"@unchainedshop/core-quotations": "^3.0.0-
|
|
47
|
-
"@unchainedshop/core-users": "^3.0.0-
|
|
48
|
-
"@unchainedshop/core-warehousing": "^3.0.0-
|
|
49
|
-
"@unchainedshop/core-worker": "^3.0.0-
|
|
50
|
-
"@unchainedshop/logger": "^3.0.0-
|
|
51
|
-
"@unchainedshop/utils": "^3.0.0-
|
|
32
|
+
"@unchainedshop/core-assortments": "^3.0.0-rc6",
|
|
33
|
+
"@unchainedshop/core-bookmarks": "^3.0.0-rc6",
|
|
34
|
+
"@unchainedshop/core-countries": "^3.0.0-rc6",
|
|
35
|
+
"@unchainedshop/core-currencies": "^3.0.0-rc6",
|
|
36
|
+
"@unchainedshop/core-delivery": "^3.0.0-rc6",
|
|
37
|
+
"@unchainedshop/core-enrollments": "^3.0.0-rc6",
|
|
38
|
+
"@unchainedshop/core-events": "^3.0.0-rc6",
|
|
39
|
+
"@unchainedshop/core-files": "^3.0.0-rc6",
|
|
40
|
+
"@unchainedshop/core-filters": "^3.0.0-rc6",
|
|
41
|
+
"@unchainedshop/core-languages": "^3.0.0-rc6",
|
|
42
|
+
"@unchainedshop/core-messaging": "^3.0.0-rc6",
|
|
43
|
+
"@unchainedshop/core-orders": "^3.0.0-rc6",
|
|
44
|
+
"@unchainedshop/core-payment": "^3.0.0-rc6",
|
|
45
|
+
"@unchainedshop/core-products": "^3.0.0-rc6",
|
|
46
|
+
"@unchainedshop/core-quotations": "^3.0.0-rc6",
|
|
47
|
+
"@unchainedshop/core-users": "^3.0.0-rc6",
|
|
48
|
+
"@unchainedshop/core-warehousing": "^3.0.0-rc6",
|
|
49
|
+
"@unchainedshop/core-worker": "^3.0.0-rc6",
|
|
50
|
+
"@unchainedshop/logger": "^3.0.0-rc6",
|
|
51
|
+
"@unchainedshop/utils": "^3.0.0-rc6"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/node": "^22.10.2",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { mongodb, MigrationRepository, ModuleInput } from '@unchainedshop/mongodb';
|
|
2
|
-
import { Services } from './services/index.js';
|
|
3
|
-
import { Modules, ModuleOptions } from './modules.js';
|
|
4
|
-
export * from './services/index.js';
|
|
5
|
-
export * from './directors/index.js';
|
|
6
|
-
export interface BulkImporter {
|
|
7
|
-
createBulkImporter: (options: any) => any;
|
|
8
|
-
}
|
|
9
|
-
export interface UnchainedCoreOptions {
|
|
10
|
-
db: mongodb.Db;
|
|
11
|
-
migrationRepository: MigrationRepository<UnchainedCore>;
|
|
12
|
-
bulkImporter: any;
|
|
13
|
-
modules?: Record<string, {
|
|
14
|
-
configure: (params: ModuleInput<any>) => any;
|
|
15
|
-
}>;
|
|
16
|
-
services?: Record<string, any>;
|
|
17
|
-
options?: ModuleOptions;
|
|
18
|
-
}
|
|
19
|
-
export interface UnchainedCore {
|
|
20
|
-
modules: Modules;
|
|
21
|
-
services: Services;
|
|
22
|
-
bulkImporter: BulkImporter;
|
|
23
|
-
options: ModuleOptions;
|
|
24
|
-
}
|
|
25
|
-
export declare const initCore: ({ db, migrationRepository, bulkImporter, modules, services, options, }: UnchainedCoreOptions) => Promise<UnchainedCore>;
|
|
26
|
-
//# sourceMappingURL=core-index_BACKUP_57582.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core-index_BACKUP_57582.d.ts","sourceRoot":"","sources":["../src/core-index_BACKUP_57582.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAwB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAoB,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEnE,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AAErC,MAAM,WAAW,YAAY;IAC3B,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,OAAO,CAAC,EAAE,CAAC;IACf,mBAAmB,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACxD,YAAY,EAAE,GAAG,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CACd,MAAM,EACN;QACE,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC;KAC9C,CACF,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,eAAO,MAAM,QAAQ,2EAOlB,oBAAoB,KAAG,OAAO,CAAC,aAAa,CAoH9C,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import defaultServices from './services/index.js';
|
|
2
|
-
import initModules from './modules.js';
|
|
3
|
-
export * from './services/index.js';
|
|
4
|
-
export * from './directors/index.js';
|
|
5
|
-
export const initCore = async ({ db, migrationRepository, bulkImporter, modules = {}, services = {}, options = {}, }) => {
|
|
6
|
-
const customModules = await Object.entries(modules).reduce(async (modulesPromise, [key, customModule]) => {
|
|
7
|
-
return {
|
|
8
|
-
...(await modulesPromise),
|
|
9
|
-
[key]: await customModule.configure({
|
|
10
|
-
db,
|
|
11
|
-
options: options?.[key],
|
|
12
|
-
migrationRepository,
|
|
13
|
-
}),
|
|
14
|
-
};
|
|
15
|
-
}, Promise.resolve({}));
|
|
16
|
-
const defaultModules = await initModules({ db, migrationRepository, options });
|
|
17
|
-
return {
|
|
18
|
-
modules: {
|
|
19
|
-
...defaultModules,
|
|
20
|
-
...customModules,
|
|
21
|
-
},
|
|
22
|
-
services: {
|
|
23
|
-
...defaultServices,
|
|
24
|
-
...services,
|
|
25
|
-
},
|
|
26
|
-
bulkImporter,
|
|
27
|
-
options,
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=core-index_BACKUP_57582.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core-index_BACKUP_57582.js","sourceRoot":"","sources":["../src/core-index_BACKUP_57582.ts"],"names":[],"mappings":"AACA,OAAO,eAA6B,MAAM,qBAAqB,CAAC;AAChE,OAAO,WAAuC,MAAM,cAAc,CAAC;AAEnE,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AA2BrC,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,EAAE,EAC7B,EAAE,EACF,mBAAmB,EACnB,YAAY,EACZ,OAAO,GAAG,EAAE,EACZ,QAAQ,GAAG,EAAE,EACb,OAAO,GAAG,EAAE,GACS,EAA0B,EAAE;IAwFjD,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CACxD,KAAK,EAAE,cAAc,EAAE,CAAC,GAAG,EAAE,YAAY,CAAM,EAAE,EAAE;QACjD,OAAO;YACL,GAAG,CAAC,MAAM,cAAc,CAAC;YACzB,CAAC,GAAG,CAAC,EAAE,MAAM,YAAY,CAAC,SAAS,CAAC;gBAClC,EAAE;gBACF,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC;gBACvB,mBAAmB;aACpB,CAAC;SACH,CAAC;IACJ,CAAC,EACD,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CACpB,CAAC;IAEF,MAAM,cAAc,GAAG,MAAM,WAAW,CAAC,EAAE,EAAE,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC,CAAC;IAE/E,OAAO;QACL,OAAO,EAAE;YACP,GAAG,cAAc;YACjB,GAAG,aAAa;SACjB;QACD,QAAQ,EAAE;YACR,GAAG,eAAe;YAClB,GAAG,QAAQ;SACZ;QACD,YAAY;QACZ,OAAO;KACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { BulkImporter } from './types.js';
|
|
2
|
-
import { AssortmentsModule, AssortmentsSettingsOptions } from '@unchainedshop/core-assortments';
|
|
3
|
-
import { BookmarksModule } from '@unchainedshop/core-bookmarks';
|
|
4
|
-
import { CountriesModule } from '@unchainedshop/core-countries';
|
|
5
|
-
import { CurrenciesModule } from '@unchainedshop/core-currencies';
|
|
6
|
-
import { DeliveryModule, DeliverySettingsOptions } from '@unchainedshop/core-delivery';
|
|
7
|
-
import { EnrollmentsModule, EnrollmentsSettingsOptions } from '@unchainedshop/core-enrollments';
|
|
8
|
-
import { EventsModule } from '@unchainedshop/core-events';
|
|
9
|
-
import { FilesModule, FilesSettingsOptions } from '@unchainedshop/core-files';
|
|
10
|
-
import { FiltersModule, FiltersSettingsOptions } from '@unchainedshop/core-filters';
|
|
11
|
-
import { LanguagesModule } from '@unchainedshop/core-languages';
|
|
12
|
-
import { MessagingModule } from '@unchainedshop/core-messaging';
|
|
13
|
-
import { OrdersModule, OrdersSettingsOptions } from '@unchainedshop/core-orders';
|
|
14
|
-
import { PaymentModule, PaymentSettingsOptions } from '@unchainedshop/core-payment';
|
|
15
|
-
import { ProductsModule, ProductsSettingsOptions } from '@unchainedshop/core-products';
|
|
16
|
-
import { QuotationsModule, QuotationsSettingsOptions } from '@unchainedshop/core-quotations';
|
|
17
|
-
import { UserSettingsOptions, UsersModule } from '@unchainedshop/core-users';
|
|
18
|
-
import { WarehousingModule } from '@unchainedshop/core-warehousing';
|
|
19
|
-
import { WorkerModule, WorkerSettingsOptions } from '@unchainedshop/core-worker';
|
|
20
|
-
import { mongodb, MigrationRepository, ModuleInput } from '@unchainedshop/mongodb';
|
|
21
|
-
import { Services } from './services/index.js';
|
|
22
|
-
export * from './services/index.js';
|
|
23
|
-
export * from './types.js';
|
|
24
|
-
export interface ModuleOptions {
|
|
25
|
-
assortments?: AssortmentsSettingsOptions;
|
|
26
|
-
products?: ProductsSettingsOptions;
|
|
27
|
-
delivery?: DeliverySettingsOptions;
|
|
28
|
-
filters?: FiltersSettingsOptions;
|
|
29
|
-
enrollments?: EnrollmentsSettingsOptions;
|
|
30
|
-
orders?: OrdersSettingsOptions;
|
|
31
|
-
quotations?: QuotationsSettingsOptions;
|
|
32
|
-
files?: FilesSettingsOptions;
|
|
33
|
-
payment?: PaymentSettingsOptions;
|
|
34
|
-
worker?: WorkerSettingsOptions;
|
|
35
|
-
users?: UserSettingsOptions;
|
|
36
|
-
}
|
|
37
|
-
export interface UnchainedCoreOptions {
|
|
38
|
-
db: mongodb.Db;
|
|
39
|
-
migrationRepository: MigrationRepository<UnchainedCore>;
|
|
40
|
-
bulkImporter: any;
|
|
41
|
-
modules?: Record<string, {
|
|
42
|
-
configure: (params: ModuleInput<any>) => any;
|
|
43
|
-
}>;
|
|
44
|
-
services?: Record<string, any>;
|
|
45
|
-
options?: ModuleOptions;
|
|
46
|
-
}
|
|
47
|
-
export interface Modules {
|
|
48
|
-
assortments: AssortmentsModule;
|
|
49
|
-
bookmarks: BookmarksModule;
|
|
50
|
-
countries: CountriesModule;
|
|
51
|
-
currencies: CurrenciesModule;
|
|
52
|
-
delivery: DeliveryModule;
|
|
53
|
-
enrollments: EnrollmentsModule;
|
|
54
|
-
events: EventsModule;
|
|
55
|
-
files: FilesModule;
|
|
56
|
-
filters: FiltersModule;
|
|
57
|
-
languages: LanguagesModule;
|
|
58
|
-
messaging: MessagingModule;
|
|
59
|
-
orders: OrdersModule;
|
|
60
|
-
payment: PaymentModule;
|
|
61
|
-
products: ProductsModule;
|
|
62
|
-
quotations: QuotationsModule;
|
|
63
|
-
users: UsersModule;
|
|
64
|
-
warehousing: WarehousingModule;
|
|
65
|
-
worker: WorkerModule;
|
|
66
|
-
}
|
|
67
|
-
export interface UnchainedCore {
|
|
68
|
-
modules: Modules;
|
|
69
|
-
services: Services;
|
|
70
|
-
bulkImporter: BulkImporter;
|
|
71
|
-
options: ModuleOptions;
|
|
72
|
-
}
|
|
73
|
-
export declare const initCore: ({ db, migrationRepository, bulkImporter, modules, services, options, }: UnchainedCoreOptions) => Promise<UnchainedCore>;
|
|
74
|
-
//# sourceMappingURL=core-index_BASE_57582.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core-index_BASE_57582.d.ts","sourceRoot":"","sources":["../src/core-index_BASE_57582.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAE3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAA4B,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAA4B,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAA6B,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAC7F,OAAO,EAEL,cAAc,EACd,uBAAuB,EACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,iBAAiB,EACjB,0BAA0B,EAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAyB,YAAY,EAAE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AC3B,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,eAAO,MAAM,QAAQ,2EAOlB,oBAAoB,KAAG,OAAO,CAAC,aAAa,CA+H9C,CAAC"}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { configureAssortmentsModule, } from '@unchainedshop/core-assortments';
|
|
2
|
-
import { configureBookmarksModule } from '@unchainedshop/core-bookmarks';
|
|
3
|
-
import { configureCountriesModule } from '@unchainedshop/core-countries';
|
|
4
|
-
import { configureCurrenciesModule } from '@unchainedshop/core-currencies';
|
|
5
|
-
import { configureDeliveryModule, } from '@unchainedshop/core-delivery';
|
|
6
|
-
import { configureEnrollmentsModule, } from '@unchainedshop/core-enrollments';
|
|
7
|
-
import { configureEventsModule } from '@unchainedshop/core-events';
|
|
8
|
-
import { configureFilesModule } from '@unchainedshop/core-files';
|
|
9
|
-
import { configureFiltersModule, } from '@unchainedshop/core-filters';
|
|
10
|
-
import { configureLanguagesModule } from '@unchainedshop/core-languages';
|
|
11
|
-
import { configureMessagingModule } from '@unchainedshop/core-messaging';
|
|
12
|
-
import { configureOrdersModule } from '@unchainedshop/core-orders';
|
|
13
|
-
import { configurePaymentModule, } from '@unchainedshop/core-payment';
|
|
14
|
-
import { configureProductsModule, } from '@unchainedshop/core-products';
|
|
15
|
-
import { configureQuotationsModule, } from '@unchainedshop/core-quotations';
|
|
16
|
-
import { configureUsersModule } from '@unchainedshop/core-users';
|
|
17
|
-
import { configureWarehousingModule } from '@unchainedshop/core-warehousing';
|
|
18
|
-
import { configureWorkerModule } from '@unchainedshop/core-worker';
|
|
19
|
-
import defaultServices from './services/index.js';
|
|
20
|
-
export * from './services/index.js';
|
|
21
|
-
export * from './types.js';
|
|
22
|
-
export const initCore = async ({ db, migrationRepository, bulkImporter, modules = {}, services = {}, options = {}, }) => {
|
|
23
|
-
const assortments = await configureAssortmentsModule({
|
|
24
|
-
db,
|
|
25
|
-
options: options.assortments,
|
|
26
|
-
migrationRepository,
|
|
27
|
-
});
|
|
28
|
-
const bookmarks = await configureBookmarksModule({
|
|
29
|
-
db,
|
|
30
|
-
migrationRepository,
|
|
31
|
-
});
|
|
32
|
-
const countries = await configureCountriesModule({
|
|
33
|
-
db,
|
|
34
|
-
migrationRepository,
|
|
35
|
-
});
|
|
36
|
-
const currencies = await configureCurrenciesModule({
|
|
37
|
-
db,
|
|
38
|
-
migrationRepository,
|
|
39
|
-
});
|
|
40
|
-
const delivery = await configureDeliveryModule({
|
|
41
|
-
db,
|
|
42
|
-
options: options.delivery,
|
|
43
|
-
migrationRepository,
|
|
44
|
-
});
|
|
45
|
-
const enrollments = await configureEnrollmentsModule({
|
|
46
|
-
db,
|
|
47
|
-
options: options.enrollments,
|
|
48
|
-
migrationRepository,
|
|
49
|
-
});
|
|
50
|
-
const events = await configureEventsModule({
|
|
51
|
-
db,
|
|
52
|
-
migrationRepository,
|
|
53
|
-
});
|
|
54
|
-
const files = await configureFilesModule({
|
|
55
|
-
db,
|
|
56
|
-
options: options.files,
|
|
57
|
-
migrationRepository,
|
|
58
|
-
});
|
|
59
|
-
const filters = await configureFiltersModule({
|
|
60
|
-
db,
|
|
61
|
-
options: options.filters,
|
|
62
|
-
migrationRepository,
|
|
63
|
-
});
|
|
64
|
-
const languages = await configureLanguagesModule({
|
|
65
|
-
db,
|
|
66
|
-
migrationRepository,
|
|
67
|
-
});
|
|
68
|
-
const messaging = await configureMessagingModule({
|
|
69
|
-
db,
|
|
70
|
-
migrationRepository,
|
|
71
|
-
});
|
|
72
|
-
const orders = await configureOrdersModule({
|
|
73
|
-
db,
|
|
74
|
-
options: options.orders,
|
|
75
|
-
migrationRepository,
|
|
76
|
-
});
|
|
77
|
-
const payment = await configurePaymentModule({
|
|
78
|
-
db,
|
|
79
|
-
options: options.payment,
|
|
80
|
-
migrationRepository,
|
|
81
|
-
});
|
|
82
|
-
const products = await configureProductsModule({
|
|
83
|
-
db,
|
|
84
|
-
migrationRepository,
|
|
85
|
-
});
|
|
86
|
-
const quotations = await configureQuotationsModule({
|
|
87
|
-
db,
|
|
88
|
-
options: options.quotations,
|
|
89
|
-
migrationRepository,
|
|
90
|
-
});
|
|
91
|
-
const users = await configureUsersModule({
|
|
92
|
-
db,
|
|
93
|
-
migrationRepository,
|
|
94
|
-
});
|
|
95
|
-
const warehousing = await configureWarehousingModule({
|
|
96
|
-
db,
|
|
97
|
-
migrationRepository,
|
|
98
|
-
});
|
|
99
|
-
const worker = await configureWorkerModule({
|
|
100
|
-
db,
|
|
101
|
-
options: options.worker,
|
|
102
|
-
migrationRepository,
|
|
103
|
-
});
|
|
104
|
-
// Configure custom modules
|
|
105
|
-
const customModules = await Object.entries(modules).reduce(async (modulesPromise, [key, customModule]) => {
|
|
106
|
-
return {
|
|
107
|
-
...(await modulesPromise),
|
|
108
|
-
[key]: await customModule.configure({
|
|
109
|
-
db,
|
|
110
|
-
options: options?.[key],
|
|
111
|
-
migrationRepository,
|
|
112
|
-
}),
|
|
113
|
-
};
|
|
114
|
-
}, Promise.resolve({}));
|
|
115
|
-
return {
|
|
116
|
-
modules: {
|
|
117
|
-
assortments,
|
|
118
|
-
bookmarks,
|
|
119
|
-
countries,
|
|
120
|
-
currencies,
|
|
121
|
-
delivery,
|
|
122
|
-
enrollments,
|
|
123
|
-
events,
|
|
124
|
-
files,
|
|
125
|
-
filters,
|
|
126
|
-
languages,
|
|
127
|
-
messaging,
|
|
128
|
-
orders,
|
|
129
|
-
payment,
|
|
130
|
-
products,
|
|
131
|
-
quotations,
|
|
132
|
-
users,
|
|
133
|
-
warehousing,
|
|
134
|
-
worker,
|
|
135
|
-
...customModules,
|
|
136
|
-
},
|
|
137
|
-
services: {
|
|
138
|
-
...defaultServices,
|
|
139
|
-
...services,
|
|
140
|
-
},
|
|
141
|
-
bulkImporter,
|
|
142
|
-
options,
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
//# sourceMappingURL=core-index_BASE_57582.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core-index_BASE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,SAAS;YACT,UAAU;YACV,QAAQ;YACR,WAAW;YACX,MAAM;YACN,KAAK;YACL,OAAO;YACP,SAAS;YACT,SAAS;YACT,MAAM;YACN,OAAO;YACP,QAAQ;YACR,UAAU;YACV,KAAK;YACL,WAAW;YACX,MAAM;YACN,GAAG,aAAa;SACjB;QACD,QAAQ,EAAE;YACR,GAAG,eAAe;YAClB,GAAG,QAAQ;SACZ;QACD,YAAY;QACZ,OAAO;KACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { mongodb, MigrationRepository, ModuleInput } from '@unchainedshop/mongodb';
|
|
2
|
-
import { Services } from './services/index.js';
|
|
3
|
-
import { Modules, ModuleOptions } from './modules.js';
|
|
4
|
-
export * from './services/index.js';
|
|
5
|
-
export * from './directors/index.js';
|
|
6
|
-
export interface BulkImporter {
|
|
7
|
-
createBulkImporter: (options: any) => any;
|
|
8
|
-
}
|
|
9
|
-
export interface UnchainedCoreOptions {
|
|
10
|
-
db: mongodb.Db;
|
|
11
|
-
migrationRepository: MigrationRepository<UnchainedCore>;
|
|
12
|
-
bulkImporter: any;
|
|
13
|
-
modules?: Record<string, {
|
|
14
|
-
configure: (params: ModuleInput<any>) => any;
|
|
15
|
-
}>;
|
|
16
|
-
services?: Record<string, any>;
|
|
17
|
-
options?: ModuleOptions;
|
|
18
|
-
}
|
|
19
|
-
export interface UnchainedCore {
|
|
20
|
-
modules: Modules;
|
|
21
|
-
services: Services;
|
|
22
|
-
bulkImporter: BulkImporter;
|
|
23
|
-
options: ModuleOptions;
|
|
24
|
-
}
|
|
25
|
-
export declare const initCore: ({ db, migrationRepository, bulkImporter, modules, services, options, }: UnchainedCoreOptions) => Promise<UnchainedCore>;
|
|
26
|
-
//# sourceMappingURL=core-index_LOCAL_57582.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core-index_LOCAL_57582.d.ts","sourceRoot":"","sources":["../src/core-index_LOCAL_57582.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAwB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAoB,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEnE,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AAErC,MAAM,WAAW,YAAY;IAC3B,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,OAAO,CAAC,EAAE,CAAC;IACf,mBAAmB,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACxD,YAAY,EAAE,GAAG,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CACd,MAAM,EACN;QACE,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC;KAC9C,CACF,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,eAAO,MAAM,QAAQ,2EAOlB,oBAAoB,KAAG,OAAO,CAAC,aAAa,CA8B9C,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import defaultServices from './services/index.js';
|
|
2
|
-
import initModules from './modules.js';
|
|
3
|
-
export * from './services/index.js';
|
|
4
|
-
export * from './directors/index.js';
|
|
5
|
-
export const initCore = async ({ db, migrationRepository, bulkImporter, modules = {}, services = {}, options = {}, }) => {
|
|
6
|
-
// Configure custom modules
|
|
7
|
-
const customModules = await Object.entries(modules).reduce(async (modulesPromise, [key, customModule]) => {
|
|
8
|
-
return {
|
|
9
|
-
...(await modulesPromise),
|
|
10
|
-
[key]: await customModule.configure({
|
|
11
|
-
db,
|
|
12
|
-
options: options?.[key],
|
|
13
|
-
migrationRepository,
|
|
14
|
-
}),
|
|
15
|
-
};
|
|
16
|
-
}, Promise.resolve({}));
|
|
17
|
-
const defaultModules = await initModules({ db, migrationRepository, options });
|
|
18
|
-
return {
|
|
19
|
-
modules: {
|
|
20
|
-
...defaultModules,
|
|
21
|
-
...customModules,
|
|
22
|
-
},
|
|
23
|
-
services: {
|
|
24
|
-
...defaultServices,
|
|
25
|
-
...services,
|
|
26
|
-
},
|
|
27
|
-
bulkImporter,
|
|
28
|
-
options,
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=core-index_LOCAL_57582.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core-index_LOCAL_57582.js","sourceRoot":"","sources":["../src/core-index_LOCAL_57582.ts"],"names":[],"mappings":"AACA,OAAO,eAA6B,MAAM,qBAAqB,CAAC;AAChE,OAAO,WAAuC,MAAM,cAAc,CAAC;AAEnE,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AA2BrC,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,EAAE,EAC7B,EAAE,EACF,mBAAmB,EACnB,YAAY,EACZ,OAAO,GAAG,EAAE,EACZ,QAAQ,GAAG,EAAE,EACb,OAAO,GAAG,EAAE,GACS,EAA0B,EAAE;IACjD,2BAA2B;IAC3B,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CACxD,KAAK,EAAE,cAAc,EAAE,CAAC,GAAG,EAAE,YAAY,CAAM,EAAE,EAAE;QACjD,OAAO;YACL,GAAG,CAAC,MAAM,cAAc,CAAC;YACzB,CAAC,GAAG,CAAC,EAAE,MAAM,YAAY,CAAC,SAAS,CAAC;gBAClC,EAAE;gBACF,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC;gBACvB,mBAAmB;aACpB,CAAC;SACH,CAAC;IACJ,CAAC,EACD,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CACpB,CAAC;IAEF,MAAM,cAAc,GAAG,MAAM,WAAW,CAAC,EAAE,EAAE,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC,CAAC;IAE/E,OAAO;QACL,OAAO,EAAE;YACP,GAAG,cAAc;YACjB,GAAG,aAAa;SACjB;QACD,QAAQ,EAAE;YACR,GAAG,eAAe;YAClB,GAAG,QAAQ;SACZ;QACD,YAAY;QACZ,OAAO;KACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { BulkImporter } from './types.js';
|
|
2
|
-
import { AssortmentsModule, AssortmentsSettingsOptions } from '@unchainedshop/core-assortments';
|
|
3
|
-
import { BookmarksModule } from '@unchainedshop/core-bookmarks';
|
|
4
|
-
import { CountriesModule } from '@unchainedshop/core-countries';
|
|
5
|
-
import { CurrenciesModule } from '@unchainedshop/core-currencies';
|
|
6
|
-
import { DeliveryModule, DeliverySettingsOptions } from '@unchainedshop/core-delivery';
|
|
7
|
-
import { EnrollmentsModule, EnrollmentsSettingsOptions } from '@unchainedshop/core-enrollments';
|
|
8
|
-
import { EventsModule } from '@unchainedshop/core-events';
|
|
9
|
-
import { FilesModule, FilesSettingsOptions } from '@unchainedshop/core-files';
|
|
10
|
-
import { FiltersModule, FiltersSettingsOptions } from '@unchainedshop/core-filters';
|
|
11
|
-
import { LanguagesModule } from '@unchainedshop/core-languages';
|
|
12
|
-
import { MessagingModule } from '@unchainedshop/core-messaging';
|
|
13
|
-
import { OrdersModule, OrdersSettingsOptions } from '@unchainedshop/core-orders';
|
|
14
|
-
import { PaymentModule, PaymentSettingsOptions } from '@unchainedshop/core-payment';
|
|
15
|
-
import { ProductsModule, ProductsSettingsOptions } from '@unchainedshop/core-products';
|
|
16
|
-
import { QuotationsModule, QuotationsSettingsOptions } from '@unchainedshop/core-quotations';
|
|
17
|
-
import { UserSettingsOptions, UsersModule } from '@unchainedshop/core-users';
|
|
18
|
-
import { WarehousingModule } from '@unchainedshop/core-warehousing';
|
|
19
|
-
import { WorkerModule, WorkerSettingsOptions } from '@unchainedshop/core-worker';
|
|
20
|
-
import { mongodb, MigrationRepository, ModuleInput } from '@unchainedshop/mongodb';
|
|
21
|
-
import { Services } from './services/index.js';
|
|
22
|
-
export * from './services/index.js';
|
|
23
|
-
export * from './types.js';
|
|
24
|
-
export interface ModuleOptions {
|
|
25
|
-
assortments?: AssortmentsSettingsOptions;
|
|
26
|
-
products?: ProductsSettingsOptions;
|
|
27
|
-
delivery?: DeliverySettingsOptions;
|
|
28
|
-
filters?: FiltersSettingsOptions;
|
|
29
|
-
enrollments?: EnrollmentsSettingsOptions;
|
|
30
|
-
orders?: OrdersSettingsOptions;
|
|
31
|
-
quotations?: QuotationsSettingsOptions;
|
|
32
|
-
files?: FilesSettingsOptions;
|
|
33
|
-
payment?: PaymentSettingsOptions;
|
|
34
|
-
worker?: WorkerSettingsOptions;
|
|
35
|
-
users?: UserSettingsOptions;
|
|
36
|
-
}
|
|
37
|
-
export interface UnchainedCoreOptions {
|
|
38
|
-
db: mongodb.Db;
|
|
39
|
-
migrationRepository: MigrationRepository<UnchainedCore>;
|
|
40
|
-
bulkImporter: any;
|
|
41
|
-
modules?: Record<string, {
|
|
42
|
-
configure: (params: ModuleInput<any>) => any;
|
|
43
|
-
}>;
|
|
44
|
-
services?: Record<string, any>;
|
|
45
|
-
options?: ModuleOptions;
|
|
46
|
-
}
|
|
47
|
-
export interface Modules {
|
|
48
|
-
assortments: AssortmentsModule;
|
|
49
|
-
bookmarks: BookmarksModule;
|
|
50
|
-
countries: CountriesModule;
|
|
51
|
-
currencies: CurrenciesModule;
|
|
52
|
-
delivery: DeliveryModule;
|
|
53
|
-
enrollments: EnrollmentsModule;
|
|
54
|
-
events: EventsModule;
|
|
55
|
-
files: FilesModule;
|
|
56
|
-
filters: FiltersModule;
|
|
57
|
-
languages: LanguagesModule;
|
|
58
|
-
messaging: MessagingModule;
|
|
59
|
-
orders: OrdersModule;
|
|
60
|
-
payment: PaymentModule;
|
|
61
|
-
products: ProductsModule;
|
|
62
|
-
quotations: QuotationsModule;
|
|
63
|
-
users: UsersModule;
|
|
64
|
-
warehousing: WarehousingModule;
|
|
65
|
-
worker: WorkerModule;
|
|
66
|
-
}
|
|
67
|
-
export interface UnchainedCore {
|
|
68
|
-
modules: Modules;
|
|
69
|
-
services: Services;
|
|
70
|
-
bulkImporter: BulkImporter;
|
|
71
|
-
options: ModuleOptions;
|
|
72
|
-
}
|
|
73
|
-
export declare const initCore: ({ db, migrationRepository, bulkImporter, modules, services, options, }: UnchainedCoreOptions) => Promise<UnchainedCore>;
|
|
74
|
-
//# sourceMappingURL=core-index_REMOTE_57582.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core-index_REMOTE_57582.d.ts","sourceRoot":"","sources":["../src/core-index_REMOTE_57582.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAE3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAA4B,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAA4B,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAA6B,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAC7F,OAAO,EAEL,cAAc,EACd,uBAAuB,EACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,iBAAiB,EACjB,0BAA0B,EAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAyB,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAwB,WAAW,EAAE,oBAAoB,EAAE,MAAM,2B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,KAAG,OAAO,CAAC,aAAa,CAgI9C,CAAC"}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { configureAssortmentsModule, } from '@unchainedshop/core-assortments';
|
|
2
|
-
import { configureBookmarksModule } from '@unchainedshop/core-bookmarks';
|
|
3
|
-
import { configureCountriesModule } from '@unchainedshop/core-countries';
|
|
4
|
-
import { configureCurrenciesModule } from '@unchainedshop/core-currencies';
|
|
5
|
-
import { configureDeliveryModule, } from '@unchainedshop/core-delivery';
|
|
6
|
-
import { configureEnrollmentsModule, } from '@unchainedshop/core-enrollments';
|
|
7
|
-
import { configureEventsModule } from '@unchainedshop/core-events';
|
|
8
|
-
import { configureFilesModule } from '@unchainedshop/core-files';
|
|
9
|
-
import { configureFiltersModule, } from '@unchainedshop/core-filters';
|
|
10
|
-
import { configureLanguagesModule } from '@unchainedshop/core-languages';
|
|
11
|
-
import { configureMessagingModule } from '@unchainedshop/core-messaging';
|
|
12
|
-
import { configureOrdersModule } from '@unchainedshop/core-orders';
|
|
13
|
-
import { configurePaymentModule, } from '@unchainedshop/core-payment';
|
|
14
|
-
import { configureProductsModule, } from '@unchainedshop/core-products';
|
|
15
|
-
import { configureQuotationsModule, } from '@unchainedshop/core-quotations';
|
|
16
|
-
import { configureUsersModule } from '@unchainedshop/core-users';
|
|
17
|
-
import { configureWarehousingModule } from '@unchainedshop/core-warehousing';
|
|
18
|
-
import { configureWorkerModule } from '@unchainedshop/core-worker';
|
|
19
|
-
import defaultServices from './services/index.js';
|
|
20
|
-
export * from './services/index.js';
|
|
21
|
-
export * from './types.js';
|
|
22
|
-
export const initCore = async ({ db, migrationRepository, bulkImporter, modules = {}, services = {}, options = {}, }) => {
|
|
23
|
-
const assortments = await configureAssortmentsModule({
|
|
24
|
-
db,
|
|
25
|
-
options: options.assortments,
|
|
26
|
-
migrationRepository,
|
|
27
|
-
});
|
|
28
|
-
const bookmarks = await configureBookmarksModule({
|
|
29
|
-
db,
|
|
30
|
-
migrationRepository,
|
|
31
|
-
});
|
|
32
|
-
const countries = await configureCountriesModule({
|
|
33
|
-
db,
|
|
34
|
-
migrationRepository,
|
|
35
|
-
});
|
|
36
|
-
const currencies = await configureCurrenciesModule({
|
|
37
|
-
db,
|
|
38
|
-
migrationRepository,
|
|
39
|
-
});
|
|
40
|
-
const delivery = await configureDeliveryModule({
|
|
41
|
-
db,
|
|
42
|
-
options: options.delivery,
|
|
43
|
-
migrationRepository,
|
|
44
|
-
});
|
|
45
|
-
const enrollments = await configureEnrollmentsModule({
|
|
46
|
-
db,
|
|
47
|
-
options: options.enrollments,
|
|
48
|
-
migrationRepository,
|
|
49
|
-
});
|
|
50
|
-
const events = await configureEventsModule({
|
|
51
|
-
db,
|
|
52
|
-
migrationRepository,
|
|
53
|
-
});
|
|
54
|
-
const files = await configureFilesModule({
|
|
55
|
-
db,
|
|
56
|
-
options: options.files,
|
|
57
|
-
migrationRepository,
|
|
58
|
-
});
|
|
59
|
-
const filters = await configureFiltersModule({
|
|
60
|
-
db,
|
|
61
|
-
options: options.filters,
|
|
62
|
-
migrationRepository,
|
|
63
|
-
});
|
|
64
|
-
const languages = await configureLanguagesModule({
|
|
65
|
-
db,
|
|
66
|
-
migrationRepository,
|
|
67
|
-
});
|
|
68
|
-
const messaging = await configureMessagingModule({
|
|
69
|
-
db,
|
|
70
|
-
migrationRepository,
|
|
71
|
-
});
|
|
72
|
-
const orders = await configureOrdersModule({
|
|
73
|
-
db,
|
|
74
|
-
options: options.orders,
|
|
75
|
-
migrationRepository,
|
|
76
|
-
});
|
|
77
|
-
const payment = await configurePaymentModule({
|
|
78
|
-
db,
|
|
79
|
-
options: options.payment,
|
|
80
|
-
migrationRepository,
|
|
81
|
-
});
|
|
82
|
-
const products = await configureProductsModule({
|
|
83
|
-
db,
|
|
84
|
-
migrationRepository,
|
|
85
|
-
});
|
|
86
|
-
const quotations = await configureQuotationsModule({
|
|
87
|
-
db,
|
|
88
|
-
options: options.quotations,
|
|
89
|
-
migrationRepository,
|
|
90
|
-
});
|
|
91
|
-
const users = await configureUsersModule({
|
|
92
|
-
db,
|
|
93
|
-
options: options.users,
|
|
94
|
-
migrationRepository,
|
|
95
|
-
});
|
|
96
|
-
const warehousing = await configureWarehousingModule({
|
|
97
|
-
db,
|
|
98
|
-
migrationRepository,
|
|
99
|
-
});
|
|
100
|
-
const worker = await configureWorkerModule({
|
|
101
|
-
db,
|
|
102
|
-
options: options.worker,
|
|
103
|
-
migrationRepository,
|
|
104
|
-
});
|
|
105
|
-
// Configure custom modules
|
|
106
|
-
const customModules = await Object.entries(modules).reduce(async (modulesPromise, [key, customModule]) => {
|
|
107
|
-
return {
|
|
108
|
-
...(await modulesPromise),
|
|
109
|
-
[key]: await customModule.configure({
|
|
110
|
-
db,
|
|
111
|
-
options: options?.[key],
|
|
112
|
-
migrationRepository,
|
|
113
|
-
}),
|
|
114
|
-
};
|
|
115
|
-
}, Promise.resolve({}));
|
|
116
|
-
return {
|
|
117
|
-
modules: {
|
|
118
|
-
assortments,
|
|
119
|
-
bookmarks,
|
|
120
|
-
countries,
|
|
121
|
-
currencies,
|
|
122
|
-
delivery,
|
|
123
|
-
enrollments,
|
|
124
|
-
events,
|
|
125
|
-
files,
|
|
126
|
-
filters,
|
|
127
|
-
languages,
|
|
128
|
-
messaging,
|
|
129
|
-
orders,
|
|
130
|
-
payment,
|
|
131
|
-
products,
|
|
132
|
-
quotations,
|
|
133
|
-
users,
|
|
134
|
-
warehousing,
|
|
135
|
-
worker,
|
|
136
|
-
...customModules,
|
|
137
|
-
},
|
|
138
|
-
services: {
|
|
139
|
-
...defaultServices,
|
|
140
|
-
...services,
|
|
141
|
-
},
|
|
142
|
-
bulkImporter,
|
|
143
|
-
options,
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
//# sourceMappingURL=core-index_REMOTE_57582.js.map
|