UNPKG

6.24 kBJSONView Raw
1{
2 "name": "gpml2pvjson",
3 "version": "4.1.13",
4 "description": "convert GPML (XML) to pvjson (json)",
5 "main": "es5/gpml2pvjson.js",
6 "jsnext:main": "esnext/index.js",
7 "typings": "es5/index.d.ts",
8 "bin": "./bin/gpml2pvjson",
9 "engines": {
10 "node": ">=10.0.0"
11 },
12 "files": [
13 "bin/",
14 "es5/",
15 "esnext/",
16 "xmlns/",
17 "test/expected"
18 ],
19 "watch": {
20 "assets": "{src}/{**/,}*.json"
21 },
22 "scripts": {
23 "assets": "npm-run-all -p assets:*",
24 "assets:spinoffs": "mkdir -p es5/spinoffs && cp src/spinoffs/*.json es5/spinoffs/",
25 "assets:2013a": "mkdir -p es5/2013a && cp src/2013a/*.json es5/2013a/",
26 "assets:edge": "mkdir -p es5/edge && cp src/edge/*.json es5/edge/",
27 "assets:edgeDrawers": "kaavio_dir=$(node -p 'path.dirname(require.resolve(\"kaavio/package.json\"))') && mkdir -p src/edge es5/edge && cp \"$kaavio_dir/src/drawers/edges/index.ts\" src/edge/edgeDrawers.ts && cp \"$kaavio_dir/es5/drawers/edges/index.js\" es5/edge/edgeDrawers.js",
28 "build": "npm run --silent assets && npm run --silent compile && npm run --silent test && npm run --silent expected # In case of error, remove --silent to debug.",
29 "clean": "echo \"TODO: gpml2pvjson cannot parse these xml formats: c14, c14n11, exc-c14n\" && find test/expected -name \"*.json\" -size 0 -delete",
30 "compile": "mkdir -p es5 && npm run assets && npm-run-all compile:*",
31 "compile:xsd": "gpml_dir=$(node -p 'path.dirname(require.resolve(\"@wikipathways/gpml/package.json\"))') && cxsd_path=$(node -p 'require.resolve(\"@wikipathways/cxsd/bin/cxsd\")') && rm -rf cache/* xmlns/* && \"$cxsd_path\" \"$gpml_dir/GPML2013a-fuller.xsd\"",
32 "compile:es5": "tsc --project tsconfig.json",
33 "compile:esnext": "tsc --project tsconfig.esnext.json",
34 "expected": "echo 'Setting expected values and checksums for tests' && npm-run-all expected:* && echo ok || echo not ok",
35 "expected:chunked": "curl \"https://raw.githubusercontent.com/wikipathways/pvjs/cd7b01c4452f754797d99c2be7450dd1809a0286/test/input-data/troublesome-pathways/WP1818_73650.gpml\" | bin/gpml2pvjson --id http://identifiers.org/wikipathways/WP1818 --pathway-version 73650 | tee \"test/expected/chunked.json\" | bin/sha1sumup > \"test/expected/chunked.json.sha1sum\"",
36 "expected:protocol": "gpml_dir=$(node -p 'path.dirname(require.resolve(\"@wikipathways/gpml/package.json\"))') && for f in \"$gpml_dir\"/test/**/*.gpml{,.xml}; do echo \"Converting $f to JSON and generating checksum...\" && filename=`echo \"$f\" | sed \"s/.*\\///\" | sed 's/\\.xml$//' | sed 's/\\.gpml$//'` && cat \"$f\" | bin/gpml2pvjson | tee \"test/expected/$filename.json\" | bin/sha1sumup > \"test/expected/$filename.json.sha1sum\" || break; done && npm run clean",
37 "prepare": "ALLE_DIR='../../../'; if [ ! -d ./node_modules ] && [ -d \"$ALLE_DIR\"/node_modules ]; then echo 'Alle configuration detected. Testing from the top-level alle directory...' && (cd \"$ALLE_DIR\" && npm run 'gpml2pvjson:build'); else npm run build; fi",
38 "prepublishOnly": "npm i --package-lock-only && ALLE_DIR='../../../'; if [ ! -d ./node_modules ] && [ -d \"$ALLE_DIR\"/node_modules ]; then echo 'Alle configuration detected. Testing from the top-level alle directory...' && (cd \"$ALLE_DIR\" && npm run 'gpml2pvjson:test'); else npm run test; fi",
39 "postpublish": "TAG=\"$(jq -r .version package.json)\" && git commit -am \"Bump to version $TAG\" && git tag -a $TAG -m \"Published version $TAG\" && git push origin $TAG",
40 "test": "npm-run-all -p test:*",
41 "test:browser": "echo \"TODO: get browser tests working.\"",
42 "test:checksums": "npm-run-all -p test:checksums:*",
43 "test:checksums:chunked": "echo 'Testing converter against WP1818 rev. 73650 from GPML file stored online (intentionally throttling downloading speed in order to ensure response is chunked).' && curl \"https://raw.githubusercontent.com/wikipathways/pvjs/cd7b01c4452f754797d99c2be7450dd1809a0286/test/input-data/troublesome-pathways/WP1818_73650.gpml\" | bin/gpml2pvjson --id http://identifiers.org/wikipathways/WP1818 --pathway-version 73650 | bin/sha1sumup -c \"test/expected/chunked.json.sha1sum\"",
44 "test:checksums:protocol": "gpml_dir=$(node -p 'path.dirname(require.resolve(\"@wikipathways/gpml/package.json\"))') && for f in \"$gpml_dir\"/test/**/*.gpml{,.xml}; do echo \"Testing converter against $f\" && filename=`echo \"$f\" | sed \"s/.*\\///\" | sed s/.xml$// | sed s/.gpml$//` && cat \"$f\" | bin/gpml2pvjson | bin/sha1sumup -c \"test/expected/$filename.json.sha1sum\" || break; done && npm run clean",
45 "watch": "npm run build && npm-run-all -p watch:*",
46 "watch:ts": "tsc --project tsconfig.json --watch",
47 "watch:other": "npm-watch"
48 },
49 "keywords": [
50 "gpml",
51 "pathway"
52 ],
53 "author": "Anders Riutta",
54 "license": "Apache-2.0",
55 "dependencies": {
56 "@wikipathways/cxml": "0.2.14",
57 "angles": "^0.2.4",
58 "commander": "^2.20.3",
59 "he": "^1.2.0",
60 "highland": "^2.13.5",
61 "immutable-assign": "^1.0.36",
62 "kaavio": "5.0.0",
63 "lodash": "^4.17.15",
64 "ndjson": "^1.5.0",
65 "point-at-length": "^1.1.0",
66 "points": "^3.2.0",
67 "rgbcolor": "^1.0.1",
68 "source-map-support": "^0.5.16",
69 "svg-points": "^6.0.1",
70 "vectory": "^1.2.3",
71 "verror": "^1.10.0"
72 },
73 "devDependencies": {
74 "@types/lodash": "^4.14.144",
75 "@wikipathways/cxsd": "0.2.9",
76 "@wikipathways/gpml": "1.0.6",
77 "JSONStream": "^1.3.5",
78 "babel-preset-env": "^1.7.0",
79 "chai": "^3.5.0",
80 "deep-diff": "^1.0.2",
81 "mocha": "^6.2.2",
82 "npm-run-all": "^4.1.5",
83 "npm-watch": "^0.6.0",
84 "pretty-data": "^0.40.0",
85 "pretty-error": "^1.2.0",
86 "sinon": "^7.5.0",
87 "typescript": "^3.8.3",
88 "webpack": "^4.41.2",
89 "webpack-cli": "^3.3.9"
90 },
91 "repository": {
92 "type": "git",
93 "url": "https://github.com/wikipathways/gpml2pvjson-js.git"
94 },
95 "bugs": {
96 "url": "https://github.com/wikipathways/gpml2pvjson-js/issues"
97 },
98 "homepage": "https://github.com/wikipathways/gpml2pvjson-js",
99 "semverBumper": {
100 "jsonFiles": [
101 {
102 "filepath": "package.json",
103 "key": "version"
104 }
105 ],
106 "grepOptions": {
107 "include": [],
108 "exclude": [],
109 "excludeDir": []
110 }
111 }
112}