File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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' , 'json2sql.cli' , ...process . argv . slice ( 2 ) ] ;
8+ const result = spawnSync ( python , args , { stdio : 'inherit' } ) ;
9+ process . exit ( result . status != null ? result . status : 1 ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " json2sql-cli" ,
3+ "version" : " 0.1.0" ,
4+ "description" : " Convert JSON data to SQL INSERT statements. CLI tool for transforming JSON files/streams into relational SQL." ,
5+ "author" : " Revenue Holdings <engineering@revenueholdings.dev>" ,
6+ "license" : " MIT" ,
7+ "repository" : {
8+ "type" : " git" ,
9+ "url" : " https://github.com/Coding-Dev-Tools/json2sql.git"
10+ },
11+ "homepage" : " https://github.com/Coding-Dev-Tools/json2sql#readme" ,
12+ "bugs" : {
13+ "url" : " https://github.com/Coding-Dev-Tools/json2sql/issues"
14+ },
15+ "bin" : {
16+ "json2sql" : " cli.js"
17+ },
18+ "keywords" : [
19+ " json" ,
20+ " sql" ,
21+ " converter" ,
22+ " cli" ,
23+ " json-to-sql" ,
24+ " database"
25+ ],
26+ "files" : [
27+ " cli.js"
28+ ],
29+ "engines" : {
30+ "node" : " >=16.0.0"
31+ },
32+ "preferGlobal" : true
33+ }
You can’t perform that action at this time.
0 commit comments