@unchainedshop/core-assortments 1.2.1 → 1.2.11

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.
@@ -1,3 +1,3 @@
1
- import { Migration } from '@unchainedshop/types/api';
1
+ import { Migration } from '@unchainedshop/types/core';
2
2
  import { MigrationRepository } from '@unchainedshop/types/common';
3
3
  export default function addMigrations(repository: MigrationRepository<Migration>): void;
@@ -10,6 +10,8 @@ export default function addMigrations(repository) {
10
10
  await AssortmentProductIdCache.updateOne({
11
11
  _id: assortment._id,
12
12
  }, {
13
+ // eslint-disable-next-line
14
+ // @ts-ignore
13
15
  $set: { productIds: assortment._cachedProductIds }, // eslint-disable-line
14
16
  }, {
15
17
  upsert: true,
@@ -1 +1 @@
1
- {"version":3,"file":"addMigrations.js","sourceRoot":"","sources":["../../src/migrations/addMigrations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,UAA0C;IAC9E,UAAU,EAAE,QAAQ,CAAC;QACnB,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,oFAAoF;QAC1F,EAAE,EAAE,KAAK,IAAI,EAAE;YACb,MAAM,EAAE,WAAW,EAAE,wBAAwB,EAAE,GAAG,MAAM,qBAAqB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YAC7F,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC,IAAI,CACxC,EAAE,EACF,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,EAAE,CACvD,CAAC,OAAO,EAAE,CAAC;YAEZ,MAAM,OAAO,CAAC,GAAG,CACf,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE;gBACnC,MAAM,wBAAwB,CAAC,SAAS,CACtC;oBACE,GAAG,EAAE,UAAU,CAAC,GAAU;iBAC3B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F,CAAC;YACJ,CAAC,CAAC,CACH,CAAC;YAEF,MAAM,WAAW,CAAC,UAAU,CAC1B,EAAE,EACF;gBACE,MAAM,EAAE,EAAE,iBAAiB,EAAE,CAAC,EAAE;aACjC,CACF,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unchainedshop/core-assortments",
3
- "version": "1.2.1",
3
+ "version": "1.2.11",
4
4
  "main": "lib/assortments-index.js",
5
5
  "exports": {
6
6
  ".": "./lib/assortments-index.js",
@@ -9,7 +9,6 @@
9
9
  "types": "lib/assortments-index.d.ts",
10
10
  "type": "module",
11
11
  "scripts": {
12
- "prepublishOnly": "npm install && npm run build || :",
13
12
  "clean": "rm -rf lib",
14
13
  "build": "npm run clean && tsc",
15
14
  "watch": "tsc -w",
@@ -31,10 +30,10 @@
31
30
  },
32
31
  "homepage": "https://github.com/unchainedshop/unchained#readme",
33
32
  "dependencies": {
34
- "@unchainedshop/events": "^1.1.9",
35
- "@unchainedshop/file-upload": "^1.1.9",
36
- "@unchainedshop/logger": "^1.1.9",
37
- "@unchainedshop/utils": "^1.1.9",
33
+ "@unchainedshop/events": "1.x",
34
+ "@unchainedshop/file-upload": "1.x",
35
+ "@unchainedshop/logger": "1.x",
36
+ "@unchainedshop/utils": "1.x",
38
37
  "locale": "^0.1.0",
39
38
  "ramda": "^0.28.0",
40
39
  "simpl-schema": "^1.12.2"
@@ -42,7 +41,7 @@
42
41
  "devDependencies": {
43
42
  "@types/locale": "^0.1.1",
44
43
  "@types/node": "^16.11.44",
45
- "@unchainedshop/types": "^1.1.9",
44
+ "@unchainedshop/types": "1.x",
46
45
  "cross-env": "^7.0.3",
47
46
  "jest": "^28.1.2",
48
47
  "ts-jest": "^28.0.5",
@@ -1,5 +1,4 @@
1
- // @ts-nocheck
2
- import { Migration } from '@unchainedshop/types/api';
1
+ import { Migration } from '@unchainedshop/types/core';
3
2
  import { MigrationRepository } from '@unchainedshop/types/common';
4
3
  import { AssortmentsCollection } from '../db/AssortmentsCollection';
5
4
 
@@ -21,6 +20,8 @@ export default function addMigrations(repository: MigrationRepository<Migration>
21
20
  _id: assortment._id as any,
22
21
  },
23
22
  {
23
+ // eslint-disable-next-line
24
+ // @ts-ignore
24
25
  $set: { productIds: assortment._cachedProductIds }, // eslint-disable-line
25
26
  },
26
27
  {