@unchainedshop/core 2.0.0-beta8 → 2.0.0-rc.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.
- package/jest.config.js +9 -0
- package/lib/core-index.js +1 -2
- package/lib/core-index.js.map +1 -1
- package/package.json +26 -25
- package/src/core-index.ts +1 -2
- package/tests/core-index.test.js +3 -0
- package/test/core-index.tests.js +0 -24
package/jest.config.js
CHANGED
package/lib/core-index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { configureFiltersModule } from '@unchainedshop/core-filters';
|
|
|
11
11
|
import { configureLanguagesModule } from '@unchainedshop/core-languages';
|
|
12
12
|
import { configureMessagingModule } from '@unchainedshop/core-messaging';
|
|
13
13
|
import { configureOrdersModule, orderServices } from '@unchainedshop/core-orders';
|
|
14
|
-
import { configurePaymentModule
|
|
14
|
+
import { configurePaymentModule } from '@unchainedshop/core-payment';
|
|
15
15
|
import { configureProductsModule, productServices } from '@unchainedshop/core-products';
|
|
16
16
|
import { configureQuotationsModule } from '@unchainedshop/core-quotations';
|
|
17
17
|
import { configureUsersModule, userServices } from '@unchainedshop/core-users';
|
|
@@ -142,7 +142,6 @@ export const initCore = async ({ db, migrationRepository, modules, services, bul
|
|
|
142
142
|
countries: countryServices,
|
|
143
143
|
files: fileServices,
|
|
144
144
|
orders: orderServices,
|
|
145
|
-
payment: paymentServices,
|
|
146
145
|
products: productServices,
|
|
147
146
|
users: userServices,
|
|
148
147
|
...services,
|
package/lib/core-index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-index.js","sourceRoot":"","sources":["../src/core-index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC3F,OAAO,EAAE,w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|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-rc.1",
|
|
4
4
|
"main": "lib/core-index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./lib/core-index.js",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"clean": "rm -rf lib",
|
|
13
13
|
"build": "npm run clean && tsc",
|
|
14
14
|
"watch": "tsc -w",
|
|
15
|
-
"test": "jest --
|
|
15
|
+
"test": "NODE_OPTIONS=--experimental-vm-modules jest --detectOpenHandles --forceExit",
|
|
16
|
+
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch --detectOpenHandles --forceExit"
|
|
16
17
|
},
|
|
17
18
|
"repository": {
|
|
18
19
|
"type": "git",
|
|
@@ -30,32 +31,32 @@
|
|
|
30
31
|
},
|
|
31
32
|
"homepage": "https://github.com/unchainedshop/unchained#readme",
|
|
32
33
|
"dependencies": {
|
|
33
|
-
"@unchainedshop/core-accountsjs": "^2.0.0-
|
|
34
|
-
"@unchainedshop/core-assortments": "^2.0.0-
|
|
35
|
-
"@unchainedshop/core-bookmarks": "^2.0.0-
|
|
36
|
-
"@unchainedshop/core-countries": "^2.0.0-
|
|
37
|
-
"@unchainedshop/core-currencies": "^2.0.0-
|
|
38
|
-
"@unchainedshop/core-delivery": "^2.0.0-
|
|
39
|
-
"@unchainedshop/core-enrollments": "^2.0.0-
|
|
40
|
-
"@unchainedshop/core-events": "^2.0.0-
|
|
41
|
-
"@unchainedshop/core-files": "^2.0.0-
|
|
42
|
-
"@unchainedshop/core-filters": "^2.0.0-
|
|
43
|
-
"@unchainedshop/core-languages": "^2.0.0-
|
|
44
|
-
"@unchainedshop/core-messaging": "^2.0.0-
|
|
45
|
-
"@unchainedshop/core-orders": "^2.0.0-
|
|
46
|
-
"@unchainedshop/core-payment": "^2.0.0-
|
|
47
|
-
"@unchainedshop/core-products": "^2.0.0-
|
|
48
|
-
"@unchainedshop/core-quotations": "^2.0.0-
|
|
49
|
-
"@unchainedshop/core-users": "^2.0.0-
|
|
50
|
-
"@unchainedshop/core-warehousing": "^2.0.0-
|
|
51
|
-
"@unchainedshop/core-worker": "^2.0.0-
|
|
52
|
-
"@unchainedshop/logger": "^2.0.0-
|
|
34
|
+
"@unchainedshop/core-accountsjs": "^2.0.0-rc.1",
|
|
35
|
+
"@unchainedshop/core-assortments": "^2.0.0-rc.1",
|
|
36
|
+
"@unchainedshop/core-bookmarks": "^2.0.0-rc.1",
|
|
37
|
+
"@unchainedshop/core-countries": "^2.0.0-rc.1",
|
|
38
|
+
"@unchainedshop/core-currencies": "^2.0.0-rc.1",
|
|
39
|
+
"@unchainedshop/core-delivery": "^2.0.0-rc.1",
|
|
40
|
+
"@unchainedshop/core-enrollments": "^2.0.0-rc.1",
|
|
41
|
+
"@unchainedshop/core-events": "^2.0.0-rc.1",
|
|
42
|
+
"@unchainedshop/core-files": "^2.0.0-rc.1",
|
|
43
|
+
"@unchainedshop/core-filters": "^2.0.0-rc.1",
|
|
44
|
+
"@unchainedshop/core-languages": "^2.0.0-rc.1",
|
|
45
|
+
"@unchainedshop/core-messaging": "^2.0.0-rc.1",
|
|
46
|
+
"@unchainedshop/core-orders": "^2.0.0-rc.1",
|
|
47
|
+
"@unchainedshop/core-payment": "^2.0.0-rc.1",
|
|
48
|
+
"@unchainedshop/core-products": "^2.0.0-rc.1",
|
|
49
|
+
"@unchainedshop/core-quotations": "^2.0.0-rc.1",
|
|
50
|
+
"@unchainedshop/core-users": "^2.0.0-rc.1",
|
|
51
|
+
"@unchainedshop/core-warehousing": "^2.0.0-rc.1",
|
|
52
|
+
"@unchainedshop/core-worker": "^2.0.0-rc.1",
|
|
53
|
+
"@unchainedshop/logger": "^2.0.0-rc.1"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
|
-
"@types/node": "^18.11.
|
|
56
|
-
"@unchainedshop/types": "^2.0.0-
|
|
56
|
+
"@types/node": "^18.11.17",
|
|
57
|
+
"@unchainedshop/types": "^2.0.0-rc.1",
|
|
57
58
|
"jest": "^29.3.1",
|
|
58
59
|
"ts-jest": "^29.0.3",
|
|
59
|
-
"typescript": "^4.9.
|
|
60
|
+
"typescript": "^4.9.4"
|
|
60
61
|
}
|
|
61
62
|
}
|
package/src/core-index.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { configureFiltersModule } from '@unchainedshop/core-filters';
|
|
|
12
12
|
import { configureLanguagesModule } from '@unchainedshop/core-languages';
|
|
13
13
|
import { configureMessagingModule } from '@unchainedshop/core-messaging';
|
|
14
14
|
import { configureOrdersModule, orderServices } from '@unchainedshop/core-orders';
|
|
15
|
-
import { configurePaymentModule
|
|
15
|
+
import { configurePaymentModule } from '@unchainedshop/core-payment';
|
|
16
16
|
import { configureProductsModule, productServices } from '@unchainedshop/core-products';
|
|
17
17
|
import { configureQuotationsModule } from '@unchainedshop/core-quotations';
|
|
18
18
|
import { configureUsersModule, userServices } from '@unchainedshop/core-users';
|
|
@@ -156,7 +156,6 @@ export const initCore = async ({
|
|
|
156
156
|
countries: countryServices,
|
|
157
157
|
files: fileServices,
|
|
158
158
|
orders: orderServices,
|
|
159
|
-
payment: paymentServices,
|
|
160
159
|
products: productServices,
|
|
161
160
|
users: userServices,
|
|
162
161
|
...services,
|
package/test/core-index.tests.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { assert } from "chai"
|
|
2
|
-
import { initCore } from "./src/core-index"
|
|
3
|
-
import { log, LogLevel } from '@unchainedshop/logger';
|
|
4
|
-
import { emit, registerEvents, EventDirector, EventAdapter } from '@unchainedshop/core-events'
|
|
5
|
-
|
|
6
|
-
describe('Initialisation', () => {
|
|
7
|
-
it('Init core without parameters', async () => {
|
|
8
|
-
const config = await initCore({});
|
|
9
|
-
|
|
10
|
-
assert.ok(config.modules)
|
|
11
|
-
assert.ok(config.services)
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
it('Check global actions', async () => {
|
|
15
|
-
assert.isFunction(log);
|
|
16
|
-
log('Test message', { level: LogLevel.Warning })
|
|
17
|
-
|
|
18
|
-
assert.isFunction(emit);
|
|
19
|
-
assert.isFunction(registerEvents);
|
|
20
|
-
|
|
21
|
-
registerEvents(['TEST_EVENT'])
|
|
22
|
-
await emit('TEST_EVENT')
|
|
23
|
-
});
|
|
24
|
-
})
|