Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.

Commit 5c431e5

Browse files
author
tkostuch
committed
use cross-env and tsconfig-paths
1 parent 567160e commit 5c431e5

File tree

2 files changed

+67
-10
lines changed

2 files changed

+67
-10
lines changed

package.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@
1515
"build:copy:graphql": "cpx src/**/*.graphqls dist/src",
1616
"build:copy:schema": "cpx 'src/**/*.schema*.json' dist/src",
1717
"start": "pm2 start ecosystem.json $PM2_ARGS",
18-
"db": "node scripts/db.js",
19-
"cache": "node ./scripts/cache",
20-
"mage2vs": "node scripts/mage2vs.js",
21-
"restore": "node scripts/elastic.js restore && npm run db rebuild",
18+
"db": "cross-env TS_NODE_PROJECT=\"tsconfig-build.json\" && ts-node -r tsconfig-paths/register scripts/db.js",
19+
"cache": "cross-env TS_NODE_PROJECT=\"tsconfig-build.json\" && ts-node -r tsconfig-paths/register ./scripts/cache",
20+
"mage2vs": "cross-env TS_NODE_PROJECT=\"tsconfig-build.json\" && ts-node -r tsconfig-paths/register scripts/mage2vs.js",
21+
"restore": "cross-env TS_NODE_PROJECT=\"tsconfig-build.json\" && ts-node -r tsconfig-paths/register scripts/elastic.js restore && npm run db rebuild",
2222
"restore_it": "npm run restore -- --input-file=var/catalog_it.json --output-index=vue_storefront_catalog_it && npm run db rebuild -- --indexName=vue_storefront_catalog_it",
2323
"restore_de": "npm run restore -- --input-file=var/catalog_de.json --output-index=vue_storefront_catalog_de && npm run db rebuild -- --indexName=vue_storefront_catalog_de",
2424
"restore2main": "npm run restore -- --output-index=vue_storefront_catalog",
25-
"dump": "node scripts/elastic.js dump",
25+
"dump": "cross-env TS_NODE_PROJECT=\"tsconfig-build.json\" && ts-node -r tsconfig-paths/register scripts/elastic.js dump",
2626
"dump_it": "npm run dump -- --input-index=vue_storefront_catalog --output-file=var/catalog_it.json",
2727
"dump_de": "npm run dump -- --input-index=vue_storefront_catalog --output-file=var/catalog_de.json",
28-
"kue": "node scripts/kue.js",
28+
"kue": "cross-env TS_NODE_PROJECT=\"tsconfig-build.json\" && ts-node -r tsconfig-paths/register scripts/kue.js",
2929
"kue-dashboard": "npm run kue dashboard -- --port=3050",
30-
"o2m": "ts-node src/worker/order_to_magento2.js start",
31-
"o2m-anon": "ts-node src/worker/order_to_magento2.js testAnon",
32-
"o2m-auth": "ts-node src/worker/order_to_magento2.js testAuth",
33-
"o2m-dev": "nodemon -w src/worker/order_to_magento2.js --exec \"ts-node src/worker/order_to_magento2.js\"",
30+
"o2m": "cross-env TS_NODE_PROJECT=\"tsconfig-build.json\" && ts-node -r tsconfig-paths/register src/worker/order_to_magento2.js start",
31+
"o2m-anon": "cross-env TS_NODE_PROJECT=\"tsconfig-build.json\" && ts-node -r tsconfig-paths/register src/worker/order_to_magento2.js testAnon",
32+
"o2m-auth": "cross-env TS_NODE_PROJECT=\"tsconfig-build.json\" && ts-node -r tsconfig-paths/register src/worker/order_to_magento2.js testAuth",
33+
"o2m-dev": "nodemon -w src/worker/order_to_magento2.js --exec \"cross-env TS_NODE_PROJECT=\"tsconfig-build.json\" && ts-node -r tsconfig-paths/register src/worker/order_to_magento2.js\"",
3434
"migrate": "node node_modules/migrate/bin/migrate",
3535
"prestart": "npm run -s build",
3636
"test": "eslint src",
@@ -58,6 +58,7 @@
5858
"compression": "^1.7.2",
5959
"config": "^1.30.0",
6060
"cors": "^2.8.4",
61+
"cross-env": "^7.0.2",
6162
"elasticdump": "^6.9.1",
6263
"email-check": "^1.1.0",
6364
"express": "^4.16.3",
@@ -91,6 +92,7 @@
9192
"soap": "^0.25.0",
9293
"storefront-query-builder": "^1.0.0",
9394
"syswide-cas": "latest",
95+
"tsconfig-paths": "^3.9.0",
9496
"winston": "^2.4.2"
9597
},
9698
"devDependencies": {

yarn.lock

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,11 @@
445445
version "7.0.3"
446446
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636"
447447

448+
"@types/json5@^0.0.29":
449+
version "0.0.29"
450+
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
451+
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
452+
448453
"@types/mime@*":
449454
version "2.0.1"
450455
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.1.tgz#dc488842312a7f075149312905b5e3c0b054c79d"
@@ -1638,6 +1643,13 @@ cron@^1.3:
16381643
dependencies:
16391644
moment-timezone "^0.5.x"
16401645

1646+
cross-env@^7.0.2:
1647+
version "7.0.2"
1648+
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.2.tgz#bd5ed31339a93a3418ac4f3ca9ca3403082ae5f9"
1649+
integrity sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw==
1650+
dependencies:
1651+
cross-spawn "^7.0.1"
1652+
16411653
cross-spawn@^5.0.1:
16421654
version "5.1.0"
16431655
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
@@ -1656,6 +1668,15 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5:
16561668
shebang-command "^1.2.0"
16571669
which "^1.2.9"
16581670

1671+
cross-spawn@^7.0.1:
1672+
version "7.0.2"
1673+
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.2.tgz#d0d7dcfa74e89115c7619f4f721a94e1fdb716d6"
1674+
integrity sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==
1675+
dependencies:
1676+
path-key "^3.1.0"
1677+
shebang-command "^2.0.0"
1678+
which "^2.0.1"
1679+
16591680
"crypt@>= 0.0.1", crypt@~0.0.1:
16601681
version "0.0.2"
16611682
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
@@ -5179,6 +5200,11 @@ path-key@^2.0.0, path-key@^2.0.1:
51795200
version "2.0.1"
51805201
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
51815202

5203+
path-key@^3.1.0:
5204+
version "3.1.1"
5205+
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
5206+
integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
5207+
51825208
path-parse@^1.0.6:
51835209
version "1.0.6"
51845210
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
@@ -6218,10 +6244,22 @@ shebang-command@^1.2.0:
62186244
dependencies:
62196245
shebang-regex "^1.0.0"
62206246

6247+
shebang-command@^2.0.0:
6248+
version "2.0.0"
6249+
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
6250+
integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
6251+
dependencies:
6252+
shebang-regex "^3.0.0"
6253+
62216254
shebang-regex@^1.0.0:
62226255
version "1.0.0"
62236256
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
62246257

6258+
shebang-regex@^3.0.0:
6259+
version "3.0.0"
6260+
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
6261+
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
6262+
62256263
shell-quote@^1.6.1:
62266264
version "1.6.1"
62276265
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767"
@@ -6910,6 +6948,16 @@ ts-node@^8.1.0:
69106948
source-map-support "^0.5.6"
69116949
yn "^3.0.0"
69126950

6951+
tsconfig-paths@^3.9.0:
6952+
version "3.9.0"
6953+
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b"
6954+
integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==
6955+
dependencies:
6956+
"@types/json5" "^0.0.29"
6957+
json5 "^1.0.1"
6958+
minimist "^1.2.0"
6959+
strip-bom "^3.0.0"
6960+
69136961
tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3:
69146962
version "1.10.0"
69156963
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
@@ -7255,6 +7303,13 @@ which@^1.2.9, which@^1.3.0:
72557303
dependencies:
72567304
isexe "^2.0.0"
72577305

7306+
which@^2.0.1:
7307+
version "2.0.2"
7308+
resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
7309+
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
7310+
dependencies:
7311+
isexe "^2.0.0"
7312+
72587313
wide-align@^1.1.0:
72597314
version "1.1.3"
72607315
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"

0 commit comments

Comments
 (0)