From da1f28f10a1fa5dfe08e81dae5c1f68e7c25b0af Mon Sep 17 00:00:00 2001 From: Alexandre Bodin Date: Thu, 12 Sep 2024 13:25:20 +0200 Subject: [PATCH] fix: nodemon setup --- package.json | 5 +- pnpm-lock.yaml | 290 +++++++++++++------------- src/cli/commands/plugin/link-watch.ts | 55 ++--- 3 files changed, 173 insertions(+), 177 deletions(-) diff --git a/package.json b/package.json index 2811d89..9516da2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@strapi/sdk-plugin", - "version": "0.0.0-experimental.3ddc4bc338d159d83d4b4e1119dbda5e56f10cf4", + "version": "5.2.2", "description": "Simple tools for developing Strapi plugins", "keywords": [ "strapi", @@ -58,7 +58,7 @@ "watch": "pack-up watch" }, "dependencies": { - "@strapi/pack-up": "0.0.0-experimental.d0238c20f2d2af79a77b594f297c7380a46dfe33", + "@strapi/pack-up": "5.0.1-alpha.3", "@types/prompts": "2.4.9", "boxen": "5.1.2", "chalk": "4.1.2", @@ -87,7 +87,6 @@ "@types/git-url-parse": "9.0.3", "@types/jest": "^29.5.12", "@types/node": "^22.5.4", - "@types/nodemon": "^1.19.6", "@types/prettier": "^2.0.0", "@typescript-eslint/eslint-plugin": "^7.6.0", "@typescript-eslint/parser": "^7.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f2ece5d..8f2a335 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@strapi/pack-up': - specifier: 0.0.0-experimental.d0238c20f2d2af79a77b594f297c7380a46dfe33 - version: 0.0.0-experimental.d0238c20f2d2af79a77b594f297c7380a46dfe33(@types/node@22.5.4) + specifier: 5.0.1-alpha.3 + version: 5.0.1-alpha.3(@types/node@22.5.4) '@types/prompts': specifier: 2.4.9 version: 2.4.9 @@ -77,10 +77,10 @@ importers: version: 0.2.1(@babel/core@7.25.2)(prettier@2.8.8)(typescript@5.4.4) '@swc/core': specifier: ^1.4.13 - version: 1.7.25 + version: 1.7.26 '@swc/jest': specifier: ^0.2.36 - version: 0.2.36(@swc/core@1.7.25) + version: 0.2.36(@swc/core@1.7.26) '@types/git-url-parse': specifier: 9.0.3 version: 9.0.3 @@ -90,9 +90,6 @@ importers: '@types/node': specifier: ^22.5.4 version: 22.5.4 - '@types/nodemon': - specifier: ^1.19.6 - version: 1.19.6 '@types/prettier': specifier: ^2.0.0 version: 2.7.3 @@ -110,7 +107,7 @@ importers: version: 5.0.3(eslint@8.57.0)(typescript@5.4.4) husky: specifier: ^9.0.11 - version: 9.1.5 + version: 9.1.6 jest: specifier: ^29.7.0 version: 29.7.0(@types/node@22.5.4) @@ -744,83 +741,83 @@ packages: resolution: {integrity: sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==} engines: {node: '>=12'} - '@rollup/rollup-android-arm-eabi@4.21.2': - resolution: {integrity: sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==} + '@rollup/rollup-android-arm-eabi@4.21.3': + resolution: {integrity: sha512-MmKSfaB9GX+zXl6E8z4koOr/xU63AMVleLEa64v7R0QF/ZloMs5vcD1sHgM64GXXS1csaJutG+ddtzcueI/BLg==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.21.2': - resolution: {integrity: sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==} + '@rollup/rollup-android-arm64@4.21.3': + resolution: {integrity: sha512-zrt8ecH07PE3sB4jPOggweBjJMzI1JG5xI2DIsUbkA+7K+Gkjys6eV7i9pOenNSDJH3eOr/jLb/PzqtmdwDq5g==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.21.2': - resolution: {integrity: sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==} + '@rollup/rollup-darwin-arm64@4.21.3': + resolution: {integrity: sha512-P0UxIOrKNBFTQaXTxOH4RxuEBVCgEA5UTNV6Yz7z9QHnUJ7eLX9reOd/NYMO3+XZO2cco19mXTxDMXxit4R/eQ==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.21.2': - resolution: {integrity: sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==} + '@rollup/rollup-darwin-x64@4.21.3': + resolution: {integrity: sha512-L1M0vKGO5ASKntqtsFEjTq/fD91vAqnzeaF6sfNAy55aD+Hi2pBI5DKwCO+UNDQHWsDViJLqshxOahXyLSh3EA==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.21.2': - resolution: {integrity: sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==} + '@rollup/rollup-linux-arm-gnueabihf@4.21.3': + resolution: {integrity: sha512-btVgIsCjuYFKUjopPoWiDqmoUXQDiW2A4C3Mtmp5vACm7/GnyuprqIDPNczeyR5W8rTXEbkmrJux7cJmD99D2g==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.21.2': - resolution: {integrity: sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==} + '@rollup/rollup-linux-arm-musleabihf@4.21.3': + resolution: {integrity: sha512-zmjbSphplZlau6ZTkxd3+NMtE4UKVy7U4aVFMmHcgO5CUbw17ZP6QCgyxhzGaU/wFFdTfiojjbLG3/0p9HhAqA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.21.2': - resolution: {integrity: sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==} + '@rollup/rollup-linux-arm64-gnu@4.21.3': + resolution: {integrity: sha512-nSZfcZtAnQPRZmUkUQwZq2OjQciR6tEoJaZVFvLHsj0MF6QhNMg0fQ6mUOsiCUpTqxTx0/O6gX0V/nYc7LrgPw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.21.2': - resolution: {integrity: sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==} + '@rollup/rollup-linux-arm64-musl@4.21.3': + resolution: {integrity: sha512-MnvSPGO8KJXIMGlQDYfvYS3IosFN2rKsvxRpPO2l2cum+Z3exiExLwVU+GExL96pn8IP+GdH8Tz70EpBhO0sIQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': - resolution: {integrity: sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==} + '@rollup/rollup-linux-powerpc64le-gnu@4.21.3': + resolution: {integrity: sha512-+W+p/9QNDr2vE2AXU0qIy0qQE75E8RTwTwgqS2G5CRQ11vzq0tbnfBd6brWhS9bCRjAjepJe2fvvkvS3dno+iw==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.21.2': - resolution: {integrity: sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==} + '@rollup/rollup-linux-riscv64-gnu@4.21.3': + resolution: {integrity: sha512-yXH6K6KfqGXaxHrtr+Uoy+JpNlUlI46BKVyonGiaD74ravdnF9BUNC+vV+SIuB96hUMGShhKV693rF9QDfO6nQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.21.2': - resolution: {integrity: sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==} + '@rollup/rollup-linux-s390x-gnu@4.21.3': + resolution: {integrity: sha512-R8cwY9wcnApN/KDYWTH4gV/ypvy9yZUHlbJvfaiXSB48JO3KpwSpjOGqO4jnGkLDSk1hgjYkTbTt6Q7uvPf8eg==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.21.2': - resolution: {integrity: sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==} + '@rollup/rollup-linux-x64-gnu@4.21.3': + resolution: {integrity: sha512-kZPbX/NOPh0vhS5sI+dR8L1bU2cSO9FgxwM8r7wHzGydzfSjLRCFAT87GR5U9scj2rhzN3JPYVC7NoBbl4FZ0g==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.21.2': - resolution: {integrity: sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==} + '@rollup/rollup-linux-x64-musl@4.21.3': + resolution: {integrity: sha512-S0Yq+xA1VEH66uiMNhijsWAafffydd2X5b77eLHfRmfLsRSpbiAWiRHV6DEpz6aOToPsgid7TI9rGd6zB1rhbg==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.21.2': - resolution: {integrity: sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==} + '@rollup/rollup-win32-arm64-msvc@4.21.3': + resolution: {integrity: sha512-9isNzeL34yquCPyerog+IMCNxKR8XYmGd0tHSV+OVx0TmE0aJOo9uw4fZfUuk2qxobP5sug6vNdZR6u7Mw7Q+Q==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.21.2': - resolution: {integrity: sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==} + '@rollup/rollup-win32-ia32-msvc@4.21.3': + resolution: {integrity: sha512-nMIdKnfZfzn1Vsk+RuOvl43ONTZXoAPUUxgcU0tXooqg4YrAqzfKzVenqqk2g5efWh46/D28cKFrOzDSW28gTA==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.21.2': - resolution: {integrity: sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==} + '@rollup/rollup-win32-x64-msvc@4.21.3': + resolution: {integrity: sha512-fOvu7PCQjAj4eWDEuD8Xz5gpzFqXzGlxHZozHP4b9Jxv9APtdxL6STqztDzMLuRXEc4UpXGGhx029Xgm91QBeA==} cpu: [x64] os: [win32] @@ -851,73 +848,73 @@ packages: typescript: optional: true - '@strapi/pack-up@0.0.0-experimental.d0238c20f2d2af79a77b594f297c7380a46dfe33': - resolution: {integrity: sha512-dAo33lOG6azhqxshipm0PClmdBWiAcx7LDbG7WjsK75LaCLL2oNLzXgmU1V4lnhFBM12NJHdG7CO5EyZFtQKiw==} + '@strapi/pack-up@5.0.1-alpha.3': + resolution: {integrity: sha512-R+Z4FV9fBwfNi+Kn2Mh5gtKTcqNrZzpHhL5qaxP8oyiisgfjGZp6tuNyQkXSqmzoDJhZGL1TpUdcpsM4R8IGsw==} engines: {node: '>=18.0.0 <=20.x.x', npm: '>=6.0.0'} hasBin: true - '@swc/core-darwin-arm64@1.7.25': - resolution: {integrity: sha512-cbLNV4vsqSbll7kehJ58hZ9lt+nLlUPF+fmSRVsb4Qasnr0IRDtpT+3Rc87bDNXfkc15Ii80xdp7sU2MVgHn7A==} + '@swc/core-darwin-arm64@1.7.26': + resolution: {integrity: sha512-FF3CRYTg6a7ZVW4yT9mesxoVVZTrcSWtmZhxKCYJX9brH4CS/7PRPjAKNk6kzWgWuRoglP7hkjQcd6EpMcZEAw==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] - '@swc/core-darwin-x64@1.7.25': - resolution: {integrity: sha512-kZswLBI8KWWV8VuGIJZd8GM7eWFY5srmlomiWw7j/OtRyRgr8qfX3EmxBAYYZqTEvWdooSc/y3I61lHn/a1tRg==} + '@swc/core-darwin-x64@1.7.26': + resolution: {integrity: sha512-az3cibZdsay2HNKmc4bjf62QVukuiMRh5sfM5kHR/JMTrLyS6vSw7Ihs3UTkZjUxkLTT8ro54LI6sV6sUQUbLQ==} engines: {node: '>=10'} cpu: [x64] os: [darwin] - '@swc/core-linux-arm-gnueabihf@1.7.25': - resolution: {integrity: sha512-DV/8BHwdtymoelC1KvefOoyXraIDK0rJIBqjPvtzW9YbkN1hepF7au1deiieJ6+A0smP+4fxtYhrnJ5EjPvylA==} + '@swc/core-linux-arm-gnueabihf@1.7.26': + resolution: {integrity: sha512-VYPFVJDO5zT5U3RpCdHE5v1gz4mmR8BfHecUZTmD2v1JeFY6fv9KArJUpjrHEEsjK/ucXkQFmJ0jaiWXmpOV9Q==} engines: {node: '>=10'} cpu: [arm] os: [linux] - '@swc/core-linux-arm64-gnu@1.7.25': - resolution: {integrity: sha512-lIx8BeKzpulL2PbLyMUln5Hk164M/PHXquHt6y86sD7Spza6zbCme+/Zr17PRiElqrP8byKC09UZj0K6hONDqQ==} + '@swc/core-linux-arm64-gnu@1.7.26': + resolution: {integrity: sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-arm64-musl@1.7.25': - resolution: {integrity: sha512-+/I7AzzY4066bvKLTyAZXLL0dPpWhRUh0ja4cZNZ+0Gpn8FmtWDwZKCriIWkDlD1gSuXm8+iOaaLGhEwIquOpQ==} + '@swc/core-linux-arm64-musl@1.7.26': + resolution: {integrity: sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-x64-gnu@1.7.25': - resolution: {integrity: sha512-BPtnKyiBVMZyN6ml7oHGX9wuSLHN06nT1x1TM9wcSKSx6y+BEKb8jSmzrKzM7K5LnfOiy4+ARCb4HrMkXIQjUg==} + '@swc/core-linux-x64-gnu@1.7.26': + resolution: {integrity: sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-linux-x64-musl@1.7.25': - resolution: {integrity: sha512-ZlZztuvy2hvfoYg5gYHYuc2mssgzGq1kKanF9kPdICsTmze6t7AvkSfmlTN7/YGuO//yDDJR1GR0EuXwOAJqPw==} + '@swc/core-linux-x64-musl@1.7.26': + resolution: {integrity: sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-win32-arm64-msvc@1.7.25': - resolution: {integrity: sha512-k3QsHJ+53BVhRUeC7NJOMxdMGexBIhFmL8Ex39vqWVvDZgnOepMFu9/G1pm04xBHSqcb0lioDj5WirAoy4VusQ==} + '@swc/core-win32-arm64-msvc@1.7.26': + resolution: {integrity: sha512-9TNXPIJqFynlAOrRD6tUQjMq7KApSklK3R/tXgIxc7Qx+lWu8hlDQ/kVPLpU7PWvMMwC/3hKBW+p5f+Tms1hmA==} engines: {node: '>=10'} cpu: [arm64] os: [win32] - '@swc/core-win32-ia32-msvc@1.7.25': - resolution: {integrity: sha512-3PW8LDgS7eIdjeGLNYhO1XLXyZJZ+aLjf79am8+HqfzVkmz+uIK39FcFxeF6A/LUsuQBMa3Geg++rS38kviMEA==} + '@swc/core-win32-ia32-msvc@1.7.26': + resolution: {integrity: sha512-9YngxNcG3177GYdsTum4V98Re+TlCeJEP4kEwEg9EagT5s3YejYdKwVAkAsJszzkXuyRDdnHUpYbTrPG6FiXrQ==} engines: {node: '>=10'} cpu: [ia32] os: [win32] - '@swc/core-win32-x64-msvc@1.7.25': - resolution: {integrity: sha512-iYpJNfIzPwahwPgddb9PHYichdFoS/2NR4Gaemv9s6nzTguS4vx/YT1oFGwuGMP0RyOdmAN2rEfPh7sJktqWfA==} + '@swc/core-win32-x64-msvc@1.7.26': + resolution: {integrity: sha512-VR+hzg9XqucgLjXxA13MtV5O3C0bK0ywtLIBw/+a+O+Oc6mxFWHtdUeXDbIi5AiPbn0fjgVJMqYnyjGyyX8u0w==} engines: {node: '>=10'} cpu: [x64] os: [win32] - '@swc/core@1.7.25': - resolution: {integrity: sha512-EWTWdb0GD+Z9CByvW5j5b9d1cFr9P6hy7TkGgAwnhKxGwzGu8BHTG3ou28KY6P57yZXDVKB0exWmSNRIv6LYCg==} + '@swc/core@1.7.26': + resolution: {integrity: sha512-f5uYFf+TmMQyYIoxkn/evWhNGuUzC730dFwAKGwBVHHVoPyak1/GvJUm6i1SKl+2Hrj9oN0i3WSoWWZ4pgI8lw==} engines: {node: '>=10'} peerDependencies: '@swc/helpers': '*' @@ -998,9 +995,6 @@ packages: '@types/node@22.5.4': resolution: {integrity: sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==} - '@types/nodemon@1.19.6': - resolution: {integrity: sha512-vjKuaQOLUA5EY2zkUmWG1ipXbKt9Wd+H/0SiIuHVeH4cHtt6509iRUGH9ZR0iqgUrtj3BrP9KqoTuV3ZCbQcYA==} - '@types/prettier@2.7.3': resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} @@ -1666,8 +1660,8 @@ packages: resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} engines: {node: '>=10'} - electron-to-chromium@1.5.19: - resolution: {integrity: sha512-kpLJJi3zxTR1U828P+LIUDZ5ohixyo68/IcYOHLqnbTPr/wdgn4i1ECvmALN9E16JPA6cvCG5UG79gVwVdEK5w==} + electron-to-chromium@1.5.20: + resolution: {integrity: sha512-74mdl6Fs1HHzK9SUX4CKFxAtAe3nUns48y79TskHNAG6fGOlLfyKA4j855x+0b5u8rWJIrlaG9tcTPstMlwjIw==} emittery@0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} @@ -1892,8 +1886,8 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - eslint-plugin-react@7.35.2: - resolution: {integrity: sha512-Rbj2R9zwP2GYNcIak4xoAMV57hrBh3hTaR0k7hVjwCQgryE/pw5px4b13EYjduOI0hfXyZhwBxaGpOTbWSGzKQ==} + eslint-plugin-react@7.36.0: + resolution: {integrity: sha512-c+RvVxBH0JE2kHt/8p043nPPhIohSnyQOZApIzGJqM2tXnjEzcZzyKIAg72gymLtuwuKfgGxW2H2aqTJqRgTfQ==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 @@ -2149,8 +2143,8 @@ packages: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} - get-tsconfig@4.8.0: - resolution: {integrity: sha512-Pgba6TExTZ0FJAn1qkJAjIeKoDJ3CsI2ChuLohJnZl/tTU8MVrq3b+2t5UOPfRa4RMsorClBjJALkJUMjG1PAw==} + get-tsconfig@4.8.1: + resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} git-hooks-list@3.1.0: resolution: {integrity: sha512-LF8VeHeR7v+wAbXqfgRlTSX/1BJR9Q1vEMR8JAz1cEg6GX07+zyj3sAdDvYjj/xnlIfVuGgj4qBei1K3hKH+PA==} @@ -2262,8 +2256,8 @@ packages: resolution: {integrity: sha512-/1/GPCpDUCCYwlERiYjxoczfP0zfvZMU/OWgQPMya9AbAE24vseigFdhAMObpc8Q4lc/kjutPfUddDYyAmejnA==} engines: {node: '>=18.18.0'} - husky@9.1.5: - resolution: {integrity: sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag==} + husky@9.1.6: + resolution: {integrity: sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==} engines: {node: '>=18'} hasBin: true @@ -3312,8 +3306,8 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rollup@4.21.2: - resolution: {integrity: sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==} + rollup@4.21.3: + resolution: {integrity: sha512-7sqRtBNnEbcBtMeRVc6VRsJMmpI+JU1z9VTvW8D4gXIYQFz0aLcsE6rRkyghZkLfEgUZgVvOG7A5CVz/VW5GIA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -4684,52 +4678,52 @@ snapshots: '@pnpm/network.ca-file': 1.0.2 config-chain: 1.1.13 - '@rollup/rollup-android-arm-eabi@4.21.2': + '@rollup/rollup-android-arm-eabi@4.21.3': optional: true - '@rollup/rollup-android-arm64@4.21.2': + '@rollup/rollup-android-arm64@4.21.3': optional: true - '@rollup/rollup-darwin-arm64@4.21.2': + '@rollup/rollup-darwin-arm64@4.21.3': optional: true - '@rollup/rollup-darwin-x64@4.21.2': + '@rollup/rollup-darwin-x64@4.21.3': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.21.2': + '@rollup/rollup-linux-arm-gnueabihf@4.21.3': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.21.2': + '@rollup/rollup-linux-arm-musleabihf@4.21.3': optional: true - '@rollup/rollup-linux-arm64-gnu@4.21.2': + '@rollup/rollup-linux-arm64-gnu@4.21.3': optional: true - '@rollup/rollup-linux-arm64-musl@4.21.2': + '@rollup/rollup-linux-arm64-musl@4.21.3': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': + '@rollup/rollup-linux-powerpc64le-gnu@4.21.3': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.21.2': + '@rollup/rollup-linux-riscv64-gnu@4.21.3': optional: true - '@rollup/rollup-linux-s390x-gnu@4.21.2': + '@rollup/rollup-linux-s390x-gnu@4.21.3': optional: true - '@rollup/rollup-linux-x64-gnu@4.21.2': + '@rollup/rollup-linux-x64-gnu@4.21.3': optional: true - '@rollup/rollup-linux-x64-musl@4.21.2': + '@rollup/rollup-linux-x64-musl@4.21.3': optional: true - '@rollup/rollup-win32-arm64-msvc@4.21.2': + '@rollup/rollup-win32-arm64-msvc@4.21.3': optional: true - '@rollup/rollup-win32-ia32-msvc@4.21.2': + '@rollup/rollup-win32-ia32-msvc@4.21.3': optional: true - '@rollup/rollup-win32-x64-msvc@4.21.2': + '@rollup/rollup-win32-x64-msvc@4.21.3': optional: true '@rtsao/scc@1.1.0': {} @@ -4754,7 +4748,7 @@ snapshots: '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.4.4))(eslint@8.45.0)(typescript@5.4.4) '@typescript-eslint/parser': 5.62.0(eslint@8.45.0)(typescript@5.4.4) eslint: 8.45.0 - eslint-config-airbnb: 19.0.4(eslint-plugin-import@2.30.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.4.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.45.0))(eslint-plugin-jsx-a11y@6.10.0(eslint@8.57.0))(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint-plugin-react@7.35.2(eslint@8.57.0))(eslint@8.45.0) + eslint-config-airbnb: 19.0.4(eslint-plugin-import@2.30.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.4.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.45.0))(eslint-plugin-jsx-a11y@6.10.0(eslint@8.45.0))(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint-plugin-react@7.36.0(eslint@8.45.0))(eslint@8.45.0) eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.30.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.4.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.45.0))(eslint@8.45.0) eslint-config-airbnb-typescript: 17.1.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.4.4))(eslint@8.45.0)(typescript@5.4.4))(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.4.4))(eslint-plugin-import@2.30.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.4.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.45.0))(eslint@8.45.0) eslint-config-prettier: 8.10.0(eslint@8.45.0) @@ -4765,7 +4759,7 @@ snapshots: eslint-plugin-jsx-a11y: 6.10.0(eslint@8.45.0) eslint-plugin-node: 11.1.0(eslint@8.45.0) eslint-plugin-prettier: 4.2.1(eslint-config-prettier@8.10.0(eslint@8.45.0))(eslint@8.45.0)(prettier@2.8.8) - eslint-plugin-react: 7.35.2(eslint@8.45.0) + eslint-plugin-react: 7.36.0(eslint@8.45.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.45.0) eslint-plugin-testing-library: 5.11.1(eslint@8.45.0)(typescript@5.4.4) optionalDependencies: @@ -4778,7 +4772,7 @@ snapshots: - prettier - supports-color - '@strapi/pack-up@0.0.0-experimental.d0238c20f2d2af79a77b594f297c7380a46dfe33(@types/node@22.5.4)': + '@strapi/pack-up@5.0.1-alpha.3(@types/node@22.5.4)': dependencies: '@vitejs/plugin-react-swc': 3.6.0(vite@5.2.8(@types/node@22.5.4)) boxen: 5.1.2 @@ -4813,58 +4807,58 @@ snapshots: - supports-color - terser - '@swc/core-darwin-arm64@1.7.25': + '@swc/core-darwin-arm64@1.7.26': optional: true - '@swc/core-darwin-x64@1.7.25': + '@swc/core-darwin-x64@1.7.26': optional: true - '@swc/core-linux-arm-gnueabihf@1.7.25': + '@swc/core-linux-arm-gnueabihf@1.7.26': optional: true - '@swc/core-linux-arm64-gnu@1.7.25': + '@swc/core-linux-arm64-gnu@1.7.26': optional: true - '@swc/core-linux-arm64-musl@1.7.25': + '@swc/core-linux-arm64-musl@1.7.26': optional: true - '@swc/core-linux-x64-gnu@1.7.25': + '@swc/core-linux-x64-gnu@1.7.26': optional: true - '@swc/core-linux-x64-musl@1.7.25': + '@swc/core-linux-x64-musl@1.7.26': optional: true - '@swc/core-win32-arm64-msvc@1.7.25': + '@swc/core-win32-arm64-msvc@1.7.26': optional: true - '@swc/core-win32-ia32-msvc@1.7.25': + '@swc/core-win32-ia32-msvc@1.7.26': optional: true - '@swc/core-win32-x64-msvc@1.7.25': + '@swc/core-win32-x64-msvc@1.7.26': optional: true - '@swc/core@1.7.25': + '@swc/core@1.7.26': dependencies: '@swc/counter': 0.1.3 '@swc/types': 0.1.12 optionalDependencies: - '@swc/core-darwin-arm64': 1.7.25 - '@swc/core-darwin-x64': 1.7.25 - '@swc/core-linux-arm-gnueabihf': 1.7.25 - '@swc/core-linux-arm64-gnu': 1.7.25 - '@swc/core-linux-arm64-musl': 1.7.25 - '@swc/core-linux-x64-gnu': 1.7.25 - '@swc/core-linux-x64-musl': 1.7.25 - '@swc/core-win32-arm64-msvc': 1.7.25 - '@swc/core-win32-ia32-msvc': 1.7.25 - '@swc/core-win32-x64-msvc': 1.7.25 + '@swc/core-darwin-arm64': 1.7.26 + '@swc/core-darwin-x64': 1.7.26 + '@swc/core-linux-arm-gnueabihf': 1.7.26 + '@swc/core-linux-arm64-gnu': 1.7.26 + '@swc/core-linux-arm64-musl': 1.7.26 + '@swc/core-linux-x64-gnu': 1.7.26 + '@swc/core-linux-x64-musl': 1.7.26 + '@swc/core-win32-arm64-msvc': 1.7.26 + '@swc/core-win32-ia32-msvc': 1.7.26 + '@swc/core-win32-x64-msvc': 1.7.26 '@swc/counter@0.1.3': {} - '@swc/jest@0.2.36(@swc/core@1.7.25)': + '@swc/jest@0.2.36(@swc/core@1.7.26)': dependencies: '@jest/create-cache-key-function': 29.7.0 - '@swc/core': 1.7.25 + '@swc/core': 1.7.26 '@swc/counter': 0.1.3 jsonc-parser: 3.3.1 @@ -4949,10 +4943,6 @@ snapshots: dependencies: undici-types: 6.19.8 - '@types/nodemon@1.19.6': - dependencies: - '@types/node': 22.5.4 - '@types/prettier@2.7.3': {} '@types/progress-stream@2.0.5': @@ -5166,7 +5156,7 @@ snapshots: '@vitejs/plugin-react-swc@3.6.0(vite@5.2.8(@types/node@22.5.4))': dependencies: - '@swc/core': 1.7.25 + '@swc/core': 1.7.26 vite: 5.2.8(@types/node@22.5.4) transitivePeerDependencies: - '@swc/helpers' @@ -5428,7 +5418,7 @@ snapshots: browserslist@4.23.3: dependencies: caniuse-lite: 1.0.30001660 - electron-to-chromium: 1.5.19 + electron-to-chromium: 1.5.20 node-releases: 2.0.18 update-browserslist-db: 1.1.0(browserslist@4.23.3) @@ -5752,7 +5742,7 @@ snapshots: dotenv@8.6.0: {} - electron-to-chromium@1.5.19: {} + electron-to-chromium@1.5.20: {} emittery@0.13.1: {} @@ -5942,13 +5932,13 @@ snapshots: eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.30.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.4.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.45.0))(eslint@8.45.0) eslint-plugin-import: 2.30.0(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0) - eslint-config-airbnb@19.0.4(eslint-plugin-import@2.30.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.4.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.45.0))(eslint-plugin-jsx-a11y@6.10.0(eslint@8.57.0))(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint-plugin-react@7.35.2(eslint@8.57.0))(eslint@8.45.0): + eslint-config-airbnb@19.0.4(eslint-plugin-import@2.30.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.4.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.45.0))(eslint-plugin-jsx-a11y@6.10.0(eslint@8.45.0))(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint-plugin-react@7.36.0(eslint@8.45.0))(eslint@8.45.0): dependencies: eslint: 8.45.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.30.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.4.4))(eslint-import-resolver-typescript@3.6.3)(eslint@8.45.0))(eslint@8.45.0) eslint-plugin-import: 2.30.0(@typescript-eslint/parser@7.18.0(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.10.0(eslint@8.45.0) - eslint-plugin-react: 7.35.2(eslint@8.45.0) + eslint-plugin-react: 7.36.0(eslint@8.45.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.45.0) object.assign: 4.1.5 object.entries: 1.1.8 @@ -5983,7 +5973,7 @@ snapshots: eslint: 8.45.0 eslint-module-utils: 2.11.0(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.4.4))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@5.62.0(eslint@8.45.0)(typescript@5.4.4))(eslint-plugin-import@2.30.0)(eslint@8.45.0))(eslint@8.45.0) fast-glob: 3.3.2 - get-tsconfig: 4.8.0 + get-tsconfig: 4.8.1 is-bun-module: 1.2.1 is-glob: 4.0.3 optionalDependencies: @@ -6104,7 +6094,7 @@ snapshots: dependencies: eslint: 8.45.0 - eslint-plugin-react@7.35.2(eslint@8.45.0): + eslint-plugin-react@7.36.0(eslint@8.45.0): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 @@ -6490,7 +6480,7 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.2.4 - get-tsconfig@4.8.0: + get-tsconfig@4.8.1: dependencies: resolve-pkg-maps: 1.0.0 @@ -6602,7 +6592,7 @@ snapshots: human-signals@8.0.0: {} - husky@9.1.5: {} + husky@9.1.6: {} iconv-lite@0.4.24: dependencies: @@ -7768,26 +7758,26 @@ snapshots: dependencies: glob: 7.2.3 - rollup@4.21.2: + rollup@4.21.3: dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.21.2 - '@rollup/rollup-android-arm64': 4.21.2 - '@rollup/rollup-darwin-arm64': 4.21.2 - '@rollup/rollup-darwin-x64': 4.21.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.21.2 - '@rollup/rollup-linux-arm-musleabihf': 4.21.2 - '@rollup/rollup-linux-arm64-gnu': 4.21.2 - '@rollup/rollup-linux-arm64-musl': 4.21.2 - '@rollup/rollup-linux-powerpc64le-gnu': 4.21.2 - '@rollup/rollup-linux-riscv64-gnu': 4.21.2 - '@rollup/rollup-linux-s390x-gnu': 4.21.2 - '@rollup/rollup-linux-x64-gnu': 4.21.2 - '@rollup/rollup-linux-x64-musl': 4.21.2 - '@rollup/rollup-win32-arm64-msvc': 4.21.2 - '@rollup/rollup-win32-ia32-msvc': 4.21.2 - '@rollup/rollup-win32-x64-msvc': 4.21.2 + '@rollup/rollup-android-arm-eabi': 4.21.3 + '@rollup/rollup-android-arm64': 4.21.3 + '@rollup/rollup-darwin-arm64': 4.21.3 + '@rollup/rollup-darwin-x64': 4.21.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.21.3 + '@rollup/rollup-linux-arm-musleabihf': 4.21.3 + '@rollup/rollup-linux-arm64-gnu': 4.21.3 + '@rollup/rollup-linux-arm64-musl': 4.21.3 + '@rollup/rollup-linux-powerpc64le-gnu': 4.21.3 + '@rollup/rollup-linux-riscv64-gnu': 4.21.3 + '@rollup/rollup-linux-s390x-gnu': 4.21.3 + '@rollup/rollup-linux-x64-gnu': 4.21.3 + '@rollup/rollup-linux-x64-musl': 4.21.3 + '@rollup/rollup-win32-arm64-msvc': 4.21.3 + '@rollup/rollup-win32-ia32-msvc': 4.21.3 + '@rollup/rollup-win32-x64-msvc': 4.21.3 fsevents: 2.3.3 run-parallel@1.2.0: @@ -8204,7 +8194,7 @@ snapshots: dependencies: esbuild: 0.20.2 postcss: 8.4.45 - rollup: 4.21.2 + rollup: 4.21.3 optionalDependencies: '@types/node': 22.5.4 fsevents: 2.3.3 diff --git a/src/cli/commands/plugin/link-watch.ts b/src/cli/commands/plugin/link-watch.ts index 33e3750..986f4d1 100644 --- a/src/cli/commands/plugin/link-watch.ts +++ b/src/cli/commands/plugin/link-watch.ts @@ -18,12 +18,6 @@ const action = async (_opts: ActionOptions, _cmd: unknown, { cwd, logger }: CLIC const outDir = './dist'; const extensions = 'ts,js,png,svg,gif,jpeg,css'; - nodemon({ - watch: [outDir], - ext: extensions, - exec: 'yalc push --changed', - }); - const folder = path.join(cwd, outDir); if (!(await pathExists(folder))) { @@ -33,35 +27,48 @@ const action = async (_opts: ActionOptions, _cmd: unknown, { cwd, logger }: CLIC const pkg = await loadPkg({ cwd, logger }); const pkgJson = await validatePkg({ pkg }); - concurrently(['npm run watch']); + logger.info( + outdent` + Watching ${outDir} for changes to files with extensions: ${extensions} - nodemon - .on('start', () => { - logger.info( - outdent` - Watching ${outDir} for changes to files with extensions: ${extensions} + To use this package in Strapi, in a separate shell run: + cd /path/to/strapi/project - To use this package in Strapi, in a separate shell run: - cd /path/to/strapi/project + Then run one of the commands below based on the package manager used in that project: - Then run one of the commands below based on the package manager used in that project: + ## yarn + ${chalk.greenBright(`yarn dlx yalc add --link ${pkgJson.name} && yarn install`)} - ## yarn - ${chalk.greenBright(`yarn dlx yalc add --link ${pkgJson.name} && yarn install`)} + ## npm + ${chalk.greenBright( + `npx yalc add ${pkgJson.name} && npx yalc link ${pkgJson.name} && npm install` + )} + `.trimStart() + ); - ## npm - ${chalk.greenBright( - `npx yalc add ${pkgJson.name} && npx yalc link ${pkgJson.name} && npm install` - )} - `.trimStart() - ); - }) + // @ts-expect-error - invalid types + nodemon({ + watch: [outDir], + ext: extensions, + exec: 'yalc push --changed', + }); + + concurrently(['npm run watch']); + + nodemon .on('quit', () => { process.exit(); }) .on('restart', (files: unknown) => { logger.info('Found changes in files:', chalk.magentaBright(files)); logger.info('Pushing new yalc package...'); + }) + .on('crash', () => { + logger.error( + 'An error occurred. Make sure yalc is installed globally on your system. Exiting...' + ); + + process.exit(1); }); } catch (err) { logger.error(