Skip to content

Commit

Permalink
Fix invalid path to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
fredsted committed Jul 15, 2024
1 parent 683e798 commit f6d3d89
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
5 changes: 4 additions & 1 deletion commands/help.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import "colors";
import * as fs from "node:fs";
const packageJson = JSON.parse(fs.readFileSync('package.json'))
import appRootPath from "app-root-path";
import * as path from "node:path";

const packageJson = JSON.parse(fs.readFileSync(path.join(appRootPath.path, 'package.json')))

export default () => {
console.log(`⚓ whcli: Webhook.site CLI ${packageJson.version}
Expand Down
16 changes: 14 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
"name": "@webhooksite/cli",
"description": "Client for Webhook.site",
"repository": "webhooksite/cli",
"version": "0.2.0",
"version": "0.2.1",
"type": "module",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"engines" : {
"node" : ">=16.0.0"
"engines": {
"node": ">=16.0.0"
},
"dependencies": {
"app-root-path": "^3.1.0",
"colors": "^1.4.0",
"laravel-echo": "^1.16.1",
"minimist": "^1.2.8",
Expand All @@ -25,6 +26,6 @@
},
"scripts": {
"start": "node index.js",
"build": "export VERSION=$(jq -r '.version' package.json) ; git tag $VERSION ; docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64,linux/arm64 --tag webhooksite/cli:latest --tag webhooksite/cli:$VERSION --push . ; npm publish"
"build": "export VERSION=$(jq -r '.version' package.json) ; git tag $VERSION ; git push origin refs/tags/$VERSION ; docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64,linux/arm64 --tag webhooksite/cli:latest --tag webhooksite/cli:$VERSION --push . ; npm publish"
}
}

0 comments on commit f6d3d89

Please sign in to comment.