Skip to content

Commit 6741303

Browse files
Add npm wrapper: package.json + cli.js for npm publishing
1 parent e39ac64 commit 6741303

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

cli.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env node
2+
const { spawnSync } = require('child_process');
3+
const path = require('path');
4+
5+
// Find python3 or python
6+
const python = process.platform === 'win32' ? 'python' : 'python3';
7+
const args = ['-m', 'deploydiff.cli', ...process.argv.slice(2)];
8+
const result = spawnSync(python, args, { stdio: 'inherit' });
9+
process.exit(result.status != null ? result.status : 1);

package.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "deploydiff",
3+
"version": "0.1.0",
4+
"description": "Compare deployment configurations across environments. Detect drift between staging and production configs.",
5+
"author": "Revenue Holdings <engineering@revenueholdings.dev>",
6+
"license": "MIT",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/Coding-Dev-Tools/deploydiff.git"
10+
},
11+
"homepage": "https://github.com/Coding-Dev-Tools/deploydiff#readme",
12+
"bugs": {
13+
"url": "https://github.com/Coding-Dev-Tools/deploydiff/issues"
14+
},
15+
"bin": {
16+
"deploydiff": "cli.js"
17+
},
18+
"keywords": [
19+
"deployment",
20+
"diff",
21+
"devops",
22+
"configuration",
23+
"cli",
24+
"infrastructure"
25+
],
26+
"files": [
27+
"cli.js"
28+
],
29+
"engines": {
30+
"node": ">=16.0.0"
31+
},
32+
"preferGlobal": true
33+
}

0 commit comments

Comments
 (0)