@labdigital/commercetools-mock 1.1.2 → 1.2.0
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/dist/index.global.js +670 -5416
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/repositories/shipping-method.ts +8 -0
- package/src/repositories/type.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@labdigital/commercetools-mock",
|
|
3
3
|
"author": "Michael van Tellingen",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/commercetools--mock.esm.js",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
"engines": {
|
|
20
20
|
"node": ">=16",
|
|
21
|
-
"pnpm": ">=8.
|
|
21
|
+
"pnpm": ">=8.6.5"
|
|
22
22
|
},
|
|
23
|
-
"packageManager": "pnpm@8.
|
|
23
|
+
"packageManager": "pnpm@8.6.5",
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"trailingComma": "es5"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@types/lodash": "^4.
|
|
34
|
+
"@types/lodash.isequal": "^4.5.6",
|
|
35
35
|
"basic-auth": "^2.0.1",
|
|
36
36
|
"body-parser": "^1.20.0",
|
|
37
37
|
"deep-equal": "^2.0.5",
|
|
38
38
|
"express": "^4.17.2",
|
|
39
|
-
"lodash": "^4.
|
|
39
|
+
"lodash.isequal": "^4.5.0",
|
|
40
40
|
"morgan": "^1.10.0",
|
|
41
41
|
"nock": "^13.2.1",
|
|
42
42
|
"perplex": "^0.11.0",
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
ShippingMethodSetDescriptionAction,
|
|
12
12
|
ShippingMethodSetKeyAction,
|
|
13
13
|
ShippingMethodSetLocalizedDescriptionAction,
|
|
14
|
+
ShippingMethodSetLocalizedNameAction,
|
|
14
15
|
ShippingMethodSetPredicateAction,
|
|
15
16
|
ShippingMethodUpdateAction,
|
|
16
17
|
ShippingRate,
|
|
@@ -174,6 +175,13 @@ export class ShippingMethodRepository extends AbstractResourceRepository<'shippi
|
|
|
174
175
|
) => {
|
|
175
176
|
resource.localizedDescription = localizedDescription
|
|
176
177
|
},
|
|
178
|
+
setLocalizedName: (
|
|
179
|
+
_context: RepositoryContext,
|
|
180
|
+
resource: Writable<ShippingMethod>,
|
|
181
|
+
{ localizedName }: ShippingMethodSetLocalizedNameAction
|
|
182
|
+
) => {
|
|
183
|
+
resource.localizedName = localizedName
|
|
184
|
+
},
|
|
177
185
|
setPredicate: (
|
|
178
186
|
_context: RepositoryContext,
|
|
179
187
|
resource: Writable<ShippingMethod>,
|
package/src/repositories/type.ts
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
TypeSetDescriptionAction,
|
|
13
13
|
TypeUpdateAction,
|
|
14
14
|
} from '@commercetools/platform-sdk'
|
|
15
|
-
import
|
|
15
|
+
import isEqual from 'lodash.isequal'
|
|
16
16
|
import { CommercetoolsError } from '../exceptions'
|
|
17
17
|
import { getBaseResourceProperties } from '../helpers'
|
|
18
18
|
import { Writable } from '../types'
|