mirror of
https://github.com/gitroomhq/postiz-agent.git
synced 2026-09-14 13:46:24 +08:00
8304372611
The comparator returned NaN for prerelease/build-metadata versions, which could silently disable the guard. Non-x.y.z local versions are now refused and non-x.y.z registry versions are ignored when computing the highest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
65 lines
2.1 KiB
JSON
65 lines
2.1 KiB
JSON
{
|
|
"name": "postiz",
|
|
"version": "2.2.0",
|
|
"description": "Postiz CLI - Command line interface for the Postiz social media scheduling API",
|
|
"main": "dist/index.js",
|
|
"bin": {
|
|
"postiz": "./dist/index.js"
|
|
},
|
|
"scripts": {
|
|
"dev": "tsup --watch",
|
|
"build": "tsup",
|
|
"start": "node ./dist/index.js",
|
|
"prepublishOnly": "pnpm run build",
|
|
"prepublish-check": "node -e \"const {execSync}=require('child_process');const re=/^\\d+\\.\\d+\\.\\d+$/;const v=require('./package.json').version;if(!re.test(v)){console.error('Refusing to publish '+v+': version must be plain x.y.z');process.exit(1)}const list=JSON.parse(execSync('npm view postiz versions --json',{encoding:'utf8'})).filter(s=>re.test(s));const cmp=(a,b)=>{const x=a.split('.').map(Number),y=b.split('.').map(Number);for(let i=0;i<3;i++){if(x[i]!==y[i])return x[i]-y[i]}return 0};const max=list.reduce((m,c)=>cmp(c,m)>0?c:m);if(cmp(v,max)<=0){console.error('Refusing to publish '+v+': must be greater than the highest published version '+max);process.exit(1)}console.log('Version '+v+' > '+max+' — ok to publish')\"",
|
|
"publish": "pnpm run prepublish-check && tsup && pnpm publish --access public --no-git-checks"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"README.md",
|
|
"SKILL.md",
|
|
"CHANGELOG.md",
|
|
"LICENSE"
|
|
],
|
|
"keywords": [
|
|
"postiz",
|
|
"cli",
|
|
"social-media",
|
|
"scheduling",
|
|
"automation",
|
|
"ai-agent",
|
|
"command-line",
|
|
"twitter",
|
|
"linkedin",
|
|
"facebook",
|
|
"instagram",
|
|
"tiktok",
|
|
"youtube",
|
|
"reddit"
|
|
],
|
|
"author": "Nevo David",
|
|
"license": "AGPL-3.0",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/gitroomhq/postiz-agent.git"
|
|
},
|
|
"homepage": "https://github.com/gitroomhq/postiz-agent#readme",
|
|
"bugs": {
|
|
"url": "https://github.com/gitroomhq/postiz-agent/issues"
|
|
},
|
|
"engines": {
|
|
"node": ">=18.0.0"
|
|
},
|
|
"dependencies": {
|
|
"@types/pg": "^8.20.0",
|
|
"node-fetch": "^3.3.2",
|
|
"yargs": "^17.7.2"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^20.11.19",
|
|
"@types/yargs": "^17.0.32",
|
|
"tsup": "^8.5.1",
|
|
"typescript": "^5.3.3"
|
|
}
|
|
}
|