-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpackage.json
128 lines (128 loc) · 7.19 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
"name": "datakit",
"version": "1.0.24",
"description": "Simple JavaScript toolkit for data transform across JSON, CSV and YAML.",
"main": "build/index.js",
"types": "build/index.d.ts",
"scripts": {
"c": "npm run clean",
"clean": "rm -rf build && rm -rf dist",
"b": "npm run build",
"build": "tsc",
"cb": "npm run clean-build",
"clean-build": "npm run clean && npm run build",
"bw": "tsc --watch",
"build:watch": "tsc --watch",
"cbw": "npm run clean-build:watch",
"clean-build:watch": "npm run clean-build && npm run build:watch",
"t": "npm run test",
"test": "mocha --require ts-node/register --require source-map-support/register --full-trace --recursive --exclude src/test/pipelines.test.ts src/test/**/*.test.ts",
"tw": "npm run test:watch",
"test:watch": "mocha --watch --watch-files src/**/*.ts --require ts-node/register --require source-map-support/register --full-trace --recursive --exclude src/test/pipelines.test.ts src/test/**/*.test.ts",
"test-pipelines": "npm run build && mocha --parallel --timeout 20000 --require ts-node/register --require source-map-support/register --full-trace --recursive src/test/pipelines.test.ts",
"tp": "npm run test-pipelines",
"api-docs": "typedoc --plugin typedoc-plugin-markdown --options typedoc.json --out docs ./src/index.ts",
"cli-docs": "ts-node ./src/scripts/create-cli-docs",
"prepublishOnly": "npm run clean && npm run test && npm run test-pipelines && npm run build && npm run api-docs && npm run cli-docs",
"postinstall": "node postinstall.js || echo \"ignore\"",
"test-help": "ts-node ./cli/map --help",
"test-1": "ts-node ./cli/from-yaml < .\\src\\test\\data\\example-data.yaml | ts-node ./cli/transform \"records => records.map(r => ({ ...r, CashPool: Math.floor(r.CashPool) }))\" | ts-node ./cli/to-yaml",
"test-2": "ts-node ./cli/from-yaml < .\\src\\test\\data\\example-data.yaml | ts-node ./cli/transform -f ./src/test/code/transform-test.js | ts-node ./cli/to-yaml",
"test-3": "ts-node ./cli/from-yaml < .\\src\\test\\data\\example-data.yaml | ts-node ./cli/length -",
"test-4": "ts-node ./cli/from-yaml < .\\src\\test\\data\\example-data.yaml | ts-node ./cli/reduce \"(a, r) => a + r.SharesValue\" \"0\"",
"test-5": "ts-node ./cli/from-csv < .\\src\\test\\data\\example-data.csv | ts-node ./cli/transform \"records => records.map(r => ({ ...r, CashPool: Math.floor(r.CashPool) }))\" | ts-node ./cli/to-csv",
"test-6": "echo { \"x\": 1, \"hello\": \"world\" } | ts-node ./cli/transform \"data => ({ ...data, hello: 'computer'})\" | ts-node ./cli/to-yaml",
"test-sort": "cat ./src/test/data/starwars/characters.json | ts-node ./cli/map \"r => ({ name: r.name, gender: r.gender, homeworld: r.homeworld })\" | ts-node ./cli/sort \"r => r.gender\" \"r => r.name\" descending | ts-node ./cli/to-csv",
"test-format-tree-1": "ts-node ./cli/format-tree ./src/test/data/example-tree.json",
"test-format-tree-2": "ts-node ./cli/transform -f ./src/test/code/transform-tree.js < ./src/test/data/example-tree.json | ts-node ./cli/format-tree",
"test-format-table-1": "ts-node ./cli/map \"r => ({ ...r, name: chalk.green(r.name) })\" < ./src/test/data/starwars/characters.json | ts-node ./cli/format-table -",
"test-format-table-2": "ts-node ./cli/map \"r => ({ ...r, name: r.homeworld === 'Tatooine' ? chalk.green(r.name) : r.name })\" < ./src/test/data/starwars/characters.json | ts-node ./cli/format-table",
"test-skip-take": "cat ./src/test/data/starwars/characters.json | ts-node ./cli/skip 1 | ts-node ./cli/take 5 | ts-node ./cli/to-csv",
"test-intersect-1": "ts-node ./cli/intersect \"character => character.homeworld\" ./src/test/data/starwars/characters.json \"planet => planet.name\" ./src/test/data/starwars/planets.json \"(character, planet) => ({ character, planet })\"",
"test-intersect-2": "ts-node ./cli/intersect \"character => character.homeworld\" ./src/test/data/starwars/characters.json \"planet => planet.name\" ./src/test/data/starwars/planets.json \"(character, planet) => character ? (planet ? ({ ...planet, ...character}) : character) : undefined\"",
"test-group-1": "ts-node ./cli/group \"r => r.homeworld\" < ./src/test/data/starwars/characters.json",
"test-group-2": "ts-node ./cli/group \"r => r.homeworld\" < ./src/test/data/starwars/characters.json | ts-node ./cli/reduce \"(o, r) => { o[r.key] = r. records; return o; }\" \"{}\"",
"test-group-3": "npx ts-node ./cli/group \"r => r.homeworld\" < ./src/test/data/starwars/characters.json | npx ts-node ./cli/to-object \"r => r.key\" \"r => r.records\"",
"test-err-1": "ts-node ./cli/map \"r => x\" < ./src/test/data/starwars/characters.json",
"test-err-2": "ts-node ./cli/map --file ./src/test/code/map-test-with-error.js < ./src/test/data/starwars/characters.json",
"test-cmd": "ts-node ./cli/map \"async r => await runCmd(`echo ${r.Name}`)\" \"./src/test/data/cmds.csv\" | ts-node ./cli/map \"r => r.stdout\"",
"test-run": "ts-node ./cli/run \"r => `echo ${r.Name}`\" \"./src/test/data/cmds.csv\"",
"test-run-with-exit": "ts-node ./cli/run \"r => `exit 1`\" \"./src/test/data/cmds.csv\"",
"test-bad-cmd": "ts-node ./cli/map \"r => await runCmd(`echo ${r.Name}`)\" \"./src/test/data/cmds.csv\"",
"test-length": "cat ./src/test/data/cmds.csv | ts-node ./cli/length"
},
"bin": {
"batch": "./cli/batch",
"run": "./cli/run",
"split-to-files": "./cli/split-to-files",
"distinct": "./cli/distinct",
"filter": "./cli/filter",
"format-table": "./cli/format-table",
"format-tree": "./cli/format-tree",
"from-csv": "./cli/from-csv",
"from-yaml": "./cli/from-yaml",
"group": "./cli/group",
"intersect": "./cli/intersect",
"length": "./cli/length",
"map": "./cli/map",
"reduce": "./cli/reduce",
"skip": "./cli/skip",
"orderBy": "./cli/sort",
"take": "./cli/take",
"to-csv": "./cli/to-csv",
"to-object": "./cli/to-object",
"to-yaml": "./cli/to-yaml",
"transform": "./cli/transform",
"omit": "./cli/omit",
"pick": "./cli/pick",
"concat": "./cli/concat",
"flatten": "./cli/flatten"
},
"repository": {
"type": "git",
"url": "https://github.com/data-forge-notebook/datakit.git"
},
"keywords": [
"data-wrangling",
"data",
"data-analysis",
"csv",
"json",
"data-munging",
"data-cleaning",
"data-science",
"data-clensing"
],
"author": "[email protected]",
"license": "MIT",
"bugs": {
"url": "https://github.com/data-forge-notebook/datakit/issues"
},
"homepage": "https://github.com/data-forge-notebook/datakit#readme",
"dependencies": {
"chalk": "^4.1.2",
"papaparse": "^5.4.1",
"table": "^6.8.1",
"treeify": "^1.1.0",
"typy": "^3.0.1",
"yaml": "^2.2.1"
},
"devDependencies": {
"@types/chai": "4.0.4",
"@types/fs-extra": "^11.0.1",
"@types/mocha": "2.2.43",
"@types/mock-require": "2.0.0",
"@types/node": "^18.16.1",
"@types/treeify": "^1.0.0",
"chai": "4.1.2",
"dayjs": "^1.8.20",
"fs-extra": "^11.1.1",
"handlebars": "^4.7.7",
"mocha": "^10.2.0",
"mock-require": "^3.0.3",
"ts-node": "^10.9.1",
"typedoc": "^0.24.6",
"typedoc-plugin-markdown": "^3.15.3",
"typescript": "^5.0.4"
}
}