diff --git a/.github/workflows/bring-it.yaml b/.github/workflows/bring-it.yaml index d788334..dcc511a 100644 --- a/.github/workflows/bring-it.yaml +++ b/.github/workflows/bring-it.yaml @@ -13,7 +13,7 @@ jobs: uses: airkro/bring-it@actions with: npm-token: ${{ secrets.NPM_TOKEN }} - publish-command: npx @bring-it/npm@0.2.10 npm + publish-command: npx @bring-it/npm@0.3.5 npm custom-command: | cd packages mkdir -p sftp/dist @@ -22,3 +22,5 @@ jobs: touch $_/cli.mjs mkdir -p sample/dist touch $_/cli.mjs + mkdir -p sentry/dist + touch $_/cli.mjs diff --git a/package-lock.json b/package-lock.json index 63b7c17..66af1d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,13 +13,13 @@ "packages/*" ], "devDependencies": { - "@nice-move/cli": "^0.10.11", - "@nice-move/eslint-config-base": "^0.9.20", - "@nice-move/prettier-config": "^0.9.6", + "@nice-move/cli": "^0.10.13", + "@nice-move/eslint-config-base": "^0.9.22", + "@nice-move/prettier-config": "^0.9.7", "best-shot": "^0.4.2", - "eslint": "^8.50.0", - "garou": "^0.6.14", - "playwright-core": "^1.38.1", + "eslint": "^8.51.0", + "garou": "^0.6.17", + "playwright-core": "^1.39.0", "prettier": "^3.0.3" }, "engines": { @@ -75,9 +75,9 @@ } }, "node_modules/@babel/core": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.0.tgz", - "integrity": "sha512-97z/ju/Jy1rZmDxybphrBuI+jtJjFVoz7Mr9yUQVVVi+DNZE333uFQeMOqcCIy1x3WYBIbWftUSLmbNXNT7qFQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz", + "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", @@ -85,10 +85,10 @@ "@babel/generator": "^7.23.0", "@babel/helper-compilation-targets": "^7.22.15", "@babel/helper-module-transforms": "^7.23.0", - "@babel/helpers": "^7.23.0", + "@babel/helpers": "^7.23.2", "@babel/parser": "^7.23.0", "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.0", + "@babel/traverse": "^7.23.2", "@babel/types": "^7.23.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -279,13 +279,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.1.tgz", - "integrity": "sha512-chNpneuK18yW5Oxsr+t553UZzzAs3aZnFm4bxhebsNTeshrC95yA7l5yl7GBAG+JG1rF0F7zzD2EixK9mWSDoA==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", + "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", "dev": true, "dependencies": { "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.0", + "@babel/traverse": "^7.23.2", "@babel/types": "^7.23.0" }, "engines": { @@ -348,9 +348,9 @@ } }, "node_modules/@babel/traverse": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.0.tgz", - "integrity": "sha512-t/QaEvyIoIkwzpiZ7aoSKK8kObQYeF7T2v+dazAYCb8SXtp58zEVkWW7zAnju8FNKNdr4ScAOEDmMItbyOmEYw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.22.13", @@ -402,6 +402,10 @@ "resolved": "packages/sample", "link": true }, + "node_modules/@bring-it/sentry": { + "resolved": "packages/sentry", + "link": true + }, "node_modules/@bring-it/sftp": { "resolved": "packages/sftp", "link": true @@ -613,23 +617,23 @@ } }, "node_modules/@nice-move/eslint-config-base": { - "version": "0.9.21", - "resolved": "https://registry.npmjs.org/@nice-move/eslint-config-base/-/eslint-config-base-0.9.21.tgz", - "integrity": "sha512-cZllh7ELvqV8s0Ypz5F1vO99V8e3DnRst1JF21iJX0xycxKJqPaYQQwPtFnqUzog6bDWUgYvWaHXjjdIgE1YyQ==", + "version": "0.9.22", + "resolved": "https://registry.npmjs.org/@nice-move/eslint-config-base/-/eslint-config-base-0.9.22.tgz", + "integrity": "sha512-BtKi5CO1BtKr+7LYSDusdU2uQmpa3HfiAoW1pEFWlqE3GzRRti0wrSyDBxcpeEvVD/pDxYl+PwESwuzz0Wf0Pw==", "dev": true, "dependencies": { - "@babel/core": "^7.23.0", + "@babel/core": "^7.23.2", "@babel/eslint-parser": "^7.22.15", "@babel/plugin-syntax-import-attributes": "^7.22.5", "@nice-move/eslint-plugin-html": "0.0.0-beta.3", - "@typescript-eslint/eslint-plugin": "^6.7.3", - "@typescript-eslint/parser": "^6.7.3", + "@typescript-eslint/eslint-plugin": "^6.8.0", + "@typescript-eslint/parser": "^6.8.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-markdown": "^3.0.1", - "eslint-plugin-n": "^16.1.0", + "eslint-plugin-n": "^16.2.0", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-sonarjs": "^0.21.0", "eslint-plugin-unicorn": "^48.0.1", @@ -660,9 +664,9 @@ } }, "node_modules/@nice-move/prettier-config": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/@nice-move/prettier-config/-/prettier-config-0.9.6.tgz", - "integrity": "sha512-kKqSkQ0ZKQbeWDVuLGa8pYlkoZrPu27xbEhk64WHHAQciW67JPVZh8I+MF+21753gGw//Hz65+UbG1dO97lCTQ==", + "version": "0.9.7", + "resolved": "https://registry.npmjs.org/@nice-move/prettier-config/-/prettier-config-0.9.7.tgz", + "integrity": "sha512-ZIt0EnXAGHG3nqOEpcBmEmCXeoKGAIC2aBtmR9rvZ78eyim8EFZQ3e2sAVRWpFionl3i2PZOTv5PsVngUd9fuQ==", "dev": true, "dependencies": { "@nice-move/prettier-plugin-package-json": "^0.7.5", @@ -674,7 +678,7 @@ "node": "^16.15.0 || ^18.12.0" }, "peerDependencies": { - "prettier": "^2.8.8 || ^3.0.1" + "prettier": "^2.8.8 || ^3.0.3" } }, "node_modules/@nice-move/prettier-plugin-package-json": { @@ -829,16 +833,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.7.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.4.tgz", - "integrity": "sha512-DAbgDXwtX+pDkAHwiGhqP3zWUGpW49B7eqmgpPtg+BKJXwdct79ut9+ifqOFPJGClGKSHXn2PTBatCnldJRUoA==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.8.0.tgz", + "integrity": "sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.7.4", - "@typescript-eslint/type-utils": "6.7.4", - "@typescript-eslint/utils": "6.7.4", - "@typescript-eslint/visitor-keys": "6.7.4", + "@typescript-eslint/scope-manager": "6.8.0", + "@typescript-eslint/type-utils": "6.8.0", + "@typescript-eslint/utils": "6.8.0", + "@typescript-eslint/visitor-keys": "6.8.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -897,15 +901,15 @@ "dev": true }, "node_modules/@typescript-eslint/parser": { - "version": "6.7.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.4.tgz", - "integrity": "sha512-I5zVZFY+cw4IMZUeNCU7Sh2PO5O57F7Lr0uyhgCJmhN/BuTlnc55KxPonR4+EM3GBdfiCyGZye6DgMjtubQkmA==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.8.0.tgz", + "integrity": "sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.7.4", - "@typescript-eslint/types": "6.7.4", - "@typescript-eslint/typescript-estree": "6.7.4", - "@typescript-eslint/visitor-keys": "6.7.4", + "@typescript-eslint/scope-manager": "6.8.0", + "@typescript-eslint/types": "6.8.0", + "@typescript-eslint/typescript-estree": "6.8.0", + "@typescript-eslint/visitor-keys": "6.8.0", "debug": "^4.3.4" }, "engines": { @@ -925,13 +929,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.7.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.4.tgz", - "integrity": "sha512-SdGqSLUPTXAXi7c3Ob7peAGVnmMoGzZ361VswK2Mqf8UOYcODiYvs8rs5ILqEdfvX1lE7wEZbLyELCW+Yrql1A==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.8.0.tgz", + "integrity": "sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.4", - "@typescript-eslint/visitor-keys": "6.7.4" + "@typescript-eslint/types": "6.8.0", + "@typescript-eslint/visitor-keys": "6.8.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -942,13 +946,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.7.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.4.tgz", - "integrity": "sha512-n+g3zi1QzpcAdHFP9KQF+rEFxMb2KxtnJGID3teA/nxKHOVi3ylKovaqEzGBbVY2pBttU6z85gp0D00ufLzViQ==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.8.0.tgz", + "integrity": "sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.7.4", - "@typescript-eslint/utils": "6.7.4", + "@typescript-eslint/typescript-estree": "6.8.0", + "@typescript-eslint/utils": "6.8.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -969,9 +973,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.7.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.4.tgz", - "integrity": "sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.8.0.tgz", + "integrity": "sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -982,13 +986,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.7.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.4.tgz", - "integrity": "sha512-ty8b5qHKatlNYd9vmpHooQz3Vki3gG+3PchmtsA4TgrZBKWHNjWfkQid7K7xQogBqqc7/BhGazxMD5vr6Ha+iQ==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.8.0.tgz", + "integrity": "sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.4", - "@typescript-eslint/visitor-keys": "6.7.4", + "@typescript-eslint/types": "6.8.0", + "@typescript-eslint/visitor-keys": "6.8.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1071,17 +1075,17 @@ "dev": true }, "node_modules/@typescript-eslint/utils": { - "version": "6.7.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.4.tgz", - "integrity": "sha512-PRQAs+HUn85Qdk+khAxsVV+oULy3VkbH3hQ8hxLRJXWBEd7iI+GbQxH5SEUSH7kbEoTp6oT1bOwyga24ELALTA==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.8.0.tgz", + "integrity": "sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.7.4", - "@typescript-eslint/types": "6.7.4", - "@typescript-eslint/typescript-estree": "6.7.4", + "@typescript-eslint/scope-manager": "6.8.0", + "@typescript-eslint/types": "6.8.0", + "@typescript-eslint/typescript-estree": "6.8.0", "semver": "^7.5.4" }, "engines": { @@ -1129,12 +1133,12 @@ "dev": true }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.7.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.4.tgz", - "integrity": "sha512-pOW37DUhlTZbvph50x5zZCkFn3xzwkGtNoJHzIM3svpiSkJzwOYr/kVBaXmf+RAQiUDs1AHEZVNPg6UJCJpwRA==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.8.0.tgz", + "integrity": "sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.4", + "@typescript-eslint/types": "6.8.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2606,9 +2610,9 @@ } }, "node_modules/eslint-plugin-n": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.1.0.tgz", - "integrity": "sha512-3wv/TooBst0N4ND+pnvffHuz9gNPmk/NkLwAxOt2JykTl/hcuECe6yhTtLJcZjIxtZwN+GX92ACp/QTLpHA3Hg==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.2.0.tgz", + "integrity": "sha512-AQER2jEyQOt1LG6JkGJCCIFotzmlcCZFur2wdKrp1JX2cNotC7Ae0BcD/4lLv3lUAArM9uNS8z/fsvXTd0L71g==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", @@ -3220,16 +3224,16 @@ } }, "node_modules/garou": { - "version": "0.6.16", - "resolved": "https://registry.npmjs.org/garou/-/garou-0.6.16.tgz", - "integrity": "sha512-LOaaMLmmq69CCwogtubrrM8qL+1j/biVp5XAcpTUDA9fEMtV3tliBmj6iG3uBGSWRta3KkRVngFnRtGV9uPsbQ==", + "version": "0.6.17", + "resolved": "https://registry.npmjs.org/garou/-/garou-0.6.17.tgz", + "integrity": "sha512-Q9UZJzVh1h1TcDBPtypBI4/6XJCMquRuqGqtVrr/pCzx8/rOMF/h4fg4hg9rReGs2pUIkjSGKygj1fc+bA0u6A==", "dev": true, "dependencies": { "@typescript-eslint/parser": "^6.7.4", "@yarnpkg/lockfile": "^1.1.0", "eslint-module-utils": "^2.8.0", "flat-cache": "^3.1.1", - "vue-eslint-parser": "^9.3.1", + "vue-eslint-parser": "^9.3.2", "write-file-atomic": "^5.0.1" }, "bin": { @@ -3239,7 +3243,7 @@ "node": ">=19.0.0 || ^16.15.0 || ^18.12.0" }, "peerDependencies": { - "eslint": "^8.50.0", + "eslint": "^8.51.0", "typescript": "^4.9.5 || ^5.2.2" }, "peerDependenciesMeta": { @@ -4888,9 +4892,10 @@ } }, "node_modules/playwright-core": { - "version": "1.38.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.38.1.tgz", - "integrity": "sha512-tQqNFUKa3OfMf4b2jQ7aGLB8o9bS3bOY0yMEtldtC2+spf8QXG9zvXLTXUeRsoNuxEYMgLYR+NXfAa1rjKRcrg==", + "version": "1.39.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.39.0.tgz", + "integrity": "sha512-+k4pdZgs1qiM+OUkSjx96YiKsXsmb59evFoqv8SKO067qBA+Z2s/dCzJij/ZhdQcs2zlTAgRKfeiiLm8PQ2qvw==", + "devOptional": true, "bin": { "playwright-core": "cli.js" }, @@ -6454,7 +6459,7 @@ }, "packages/npm": { "name": "@bring-it/npm", - "version": "0.3.5", + "version": "0.3.6", "license": "MIT", "dependencies": { "yargs": "^17.7.2" @@ -6511,7 +6516,7 @@ }, "packages/sample": { "name": "@bring-it/sample", - "version": "0.2.3", + "version": "0.2.4", "license": "MIT", "dependencies": { "yargs": "^17.7.2" @@ -6522,19 +6527,52 @@ "devDependencies": { "@bring-it/utils": "*", "cheetor": "^0.13.0", - "globby": "^13.2.1" + "globby": "^13.2.2" + }, + "engines": { + "node": "^16.15.0 || ^18.0.0", + "npm": ">=9.4.0" + }, + "peerDependencies": { + "playwright-core": "^1.39.0" + }, + "peerDependenciesMeta": { + "playwright-core": { + "optional": true + } + } + }, + "packages/sentry": { + "name": "@bring-it/sentry", + "version": "0.0.0", + "license": "MIT", + "dependencies": { + "yargs": "^17.7.2" + }, + "bin": { + "bring-it": "lib/cli.mjs" + }, + "devDependencies": { + "@bring-it/utils": "*", + "cheetor": "^0.13.0", + "globby": "^13.2.2" }, "engines": { "node": "^16.15.0 || ^18.0.0", "npm": ">=9.4.0" }, "peerDependencies": { - "playwright-core": "^1.33.0" + "@sentry/cli": "^2.21.2" + }, + "peerDependenciesMeta": { + "@sentry/cli": { + "optional": true + } } }, "packages/sftp": { "name": "@bring-it/sftp", - "version": "0.1.4", + "version": "0.1.5", "license": "MIT", "dependencies": { "yargs": "^17.7.2" diff --git a/package.json b/package.json index 1f43294..78853e1 100644 --- a/package.json +++ b/package.json @@ -25,13 +25,13 @@ "packages/*" ], "devDependencies": { - "@nice-move/cli": "^0.10.11", - "@nice-move/eslint-config-base": "^0.9.20", - "@nice-move/prettier-config": "^0.9.6", + "@nice-move/cli": "^0.10.13", + "@nice-move/eslint-config-base": "^0.9.22", + "@nice-move/prettier-config": "^0.9.7", "best-shot": "^0.4.2", - "eslint": "^8.50.0", - "garou": "^0.6.14", - "playwright-core": "^1.38.1", + "eslint": "^8.51.0", + "garou": "^0.6.17", + "playwright-core": "^1.39.0", "prettier": "^3.0.3" }, "engines": { diff --git a/packages/npm/lib/bin.mjs b/packages/npm/lib/bin.mjs index 2e79d36..602287e 100644 --- a/packages/npm/lib/bin.mjs +++ b/packages/npm/lib/bin.mjs @@ -7,6 +7,7 @@ new Cheetor('../package.json', import.meta.url) .command(pack) .command(npm) .commandSafe('@bring-it/sample/dist/sub.mjs') + .commandSafe('@bring-it/sentry/dist/sub.mjs') .commandSafe('@bring-it/sftp/dist/sub.mjs') .config((cli) => cli.wrap(null)) .setup(); diff --git a/packages/npm/package.json b/packages/npm/package.json index 62d364f..f64fa7f 100644 --- a/packages/npm/package.json +++ b/packages/npm/package.json @@ -1,6 +1,6 @@ { "name": "@bring-it/npm", - "version": "0.3.5", + "version": "0.3.6", "description": "Publish npm packages when needed", "license": "MIT", "author": { diff --git a/packages/sample/lib/bin.mjs b/packages/sample/lib/bin.mjs index 568e86d..9cc7e8d 100644 --- a/packages/sample/lib/bin.mjs +++ b/packages/sample/lib/bin.mjs @@ -7,6 +7,7 @@ new Cheetor('../package.json', import.meta.url) .command(pack) .command(main) .commandSafe('@bring-it/npm/dist/sub.mjs') + .commandSafe('@bring-it/sentry/dist/sub.mjs') .commandSafe('@bring-it/sftp/dist/sub.mjs') .config((cli) => cli.wrap(null)) .setup(); diff --git a/packages/sample/package.json b/packages/sample/package.json index 4b89b94..be759aa 100644 --- a/packages/sample/package.json +++ b/packages/sample/package.json @@ -1,6 +1,6 @@ { "name": "@bring-it/sample", - "version": "0.2.3", + "version": "0.2.4", "description": "Generate code sample files", "license": "MIT", "author": { @@ -43,10 +43,15 @@ "devDependencies": { "@bring-it/utils": "*", "cheetor": "^0.13.0", - "globby": "^13.2.1" + "globby": "^13.2.2" }, "peerDependencies": { - "playwright-core": "^1.33.0" + "playwright-core": "^1.39.0" + }, + "peerDependenciesMeta": { + "playwright-core": { + "optional": true + } }, "engines": { "node": "^16.15.0 || ^18.0.0", diff --git a/packages/sentry/.best-shot/config.mjs b/packages/sentry/.best-shot/config.mjs new file mode 100644 index 0000000..6f7d9ca --- /dev/null +++ b/packages/sentry/.best-shot/config.mjs @@ -0,0 +1,15 @@ +export const config = { + target: 'node16', + output: { + path: 'dist', + module: true, + }, + entry: { + cli: './lib/bin.mjs', + sub: './lib/cmd.mjs', + }, + externals: { + yargs: 'yargs', + '@sentry/cli': '@sentry/cli', + }, +}; diff --git a/packages/sentry/README.md b/packages/sentry/README.md new file mode 100644 index 0000000..3f3de1f --- /dev/null +++ b/packages/sentry/README.md @@ -0,0 +1,34 @@ +# @bring-it/sentry + +Update sentry artifacts. + +[![npm][npm-badge]][npm-url] +[![github][github-badge]][github-url] +![node][node-badge] + +[npm-url]: https://www.npmjs.com/package/@bring-it/sentry +[npm-badge]: https://img.shields.io/npm/v/@bring-it/sentry.svg?style=flat-square&logo=npm +[github-url]: https://github.com/airkro/bring-it/tree/master/packages/sentry +[github-badge]: https://img.shields.io/npm/l/@bring-it/sentry.svg?style=flat-square&colorB=blue&logo=github +[node-badge]: https://img.shields.io/node/v/@bring-it/sentry.svg?style=flat-square&colorB=green&logo=node.js + +## Installation + +```bash +npm install @bring-it/sentry @sentry/cli -g +``` + +## Usage + +```bash +npm x bring-it sentry +``` + +## Config + +```jsonc +// .bring-it/sentry.config.json +{ + "*": {} +} +``` diff --git a/packages/sentry/lib/bin.mjs b/packages/sentry/lib/bin.mjs new file mode 100644 index 0000000..3920f92 --- /dev/null +++ b/packages/sentry/lib/bin.mjs @@ -0,0 +1,13 @@ +import * as pack from '@bring-it/utils/cmd/pack.mjs'; +import { Cheetor } from 'cheetor'; + +import * as main from './cmd.mjs'; + +new Cheetor('../package.json', import.meta.url) + .command(pack) + .command(main) + .commandSafe('@bring-it/npm/dist/sub.mjs') + .commandSafe('@bring-it/sample/dist/sub.mjs') + .commandSafe('@bring-it/sftp/dist/sub.mjs') + .config((cli) => cli.wrap(null)) + .setup(); diff --git a/packages/sentry/lib/cmd.mjs b/packages/sentry/lib/cmd.mjs new file mode 100644 index 0000000..9e72b30 --- /dev/null +++ b/packages/sentry/lib/cmd.mjs @@ -0,0 +1,23 @@ +import { action } from './utils.mjs'; + +export const command = 'sentry'; + +export const describe = 'Update sentry artifacts'; + +export function builder(cli) { + cli + .option('config', { + describe: 'Config file path', + default: '.bring-it/sentry.config.json', + type: 'string', + }) + .option('mode', { + describe: 'deploy mode', + default: 'development', + type: 'string', + }); +} + +export function handler(io) { + action(io).catch(console.error); +} diff --git a/packages/sentry/lib/utils.mjs b/packages/sentry/lib/utils.mjs new file mode 100644 index 0000000..cb510ac --- /dev/null +++ b/packages/sentry/lib/utils.mjs @@ -0,0 +1,45 @@ +import { execFileSync } from 'node:child_process'; +import { readFile } from 'node:fs/promises'; + +import { Logger } from '@bring-it/utils'; + +const logger = new Logger('sentry'); + +function commitHash() { + return execFileSync('git', ['rev-parse', '--short', 'HEAD'], { + encoding: 'utf8', + }).trim(); +} + +function readConfig(configName) { + return readFile(configName, 'utf8') + .then((text) => JSON.parse(text)) + .catch((error) => { + logger.warn(error.message); + logger.info('Fallback to default configuration'); + + return {}; + }); +} + +export async function action({ config, mode }) { + const { '*': all, [mode]: current } = await readConfig(config); + + const { url, org, project, authToken, globs } = { ...all, ...current }; + + const io = { + url, + org, + project, + authToken, + globs, + release: { + name: commitHash(), + deploy: { + env: mode, + }, + }, + }; + + console.log(io); +} diff --git a/packages/sentry/package.json b/packages/sentry/package.json new file mode 100644 index 0000000..69c8e0a --- /dev/null +++ b/packages/sentry/package.json @@ -0,0 +1,64 @@ +{ + "private": true, + "name": "@bring-it/sentry", + "version": "0.0.0-beta", + "description": "Update sentry artifacts", + "license": "MIT", + "author": { + "name": "Eric Chen", + "email": "airkro@qq.com" + }, + "keywords": [ + "bring-it", + "ci", + "cli", + "code", + "sentry", + "sourcemap", + "sourcemaps" + ], + "homepage": "https://github.com/airkro/bring-it/tree/master/packages/sentry", + "repository": { + "type": "git", + "url": "https://github.com/airkro/bring-it.git", + "directory": "packages/sentry" + }, + "bugs": { + "url": "https://github.com/airkro/bring-it/issues" + }, + "bin": { + "bring-it": "dist/cli.mjs" + }, + "files": [ + "dist" + ], + "type": "module", + "scripts": { + "build": "best-shot prod", + "prepublishOnly": "npm run build" + }, + "dependencies": { + "yargs": "^17.7.2" + }, + "devDependencies": { + "@bring-it/utils": "*", + "cheetor": "^0.13.0", + "globby": "^13.2.2" + }, + "peerDependencies": { + "@sentry/cli": "^2.21.2" + }, + "peerDependenciesMeta": { + "@sentry/cli": { + "optional": true + } + }, + "engines": { + "node": "^16.15.0 || ^18.0.0", + "npm": ">=9.4.0" + }, + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + } +} diff --git a/packages/sftp/lib/bin.mjs b/packages/sftp/lib/bin.mjs index 57b38b8..e2430bd 100644 --- a/packages/sftp/lib/bin.mjs +++ b/packages/sftp/lib/bin.mjs @@ -8,5 +8,6 @@ new Cheetor('../package.json', import.meta.url) .command(main) .commandSafe('@bring-it/npm/dist/sub.mjs') .commandSafe('@bring-it/sample/dist/sub.mjs') + .commandSafe('@bring-it/sentry/dist/sub.mjs') .config((cli) => cli.wrap(null)) .setup(); diff --git a/packages/sftp/package.json b/packages/sftp/package.json index 49ed837..7fd9c2c 100644 --- a/packages/sftp/package.json +++ b/packages/sftp/package.json @@ -1,6 +1,6 @@ { "name": "@bring-it/sftp", - "version": "0.1.4", + "version": "0.1.5", "description": "SFTP deployment tool for frontend", "license": "MIT", "author": {