you can add vendors while creating.

This commit is contained in:
BC
2018-06-14 21:17:07 -07:00
parent d110755939
commit a17b6b9688
11 changed files with 179 additions and 151 deletions

View File

@@ -19,8 +19,8 @@
"resolved": "https://registry.npmjs.org/db-migrator/-/db-migrator-2.2.0.tgz", "resolved": "https://registry.npmjs.org/db-migrator/-/db-migrator-2.2.0.tgz",
"integrity": "sha512-7A5sSNJwZv0/2dslOOJyccwS7wN99+Xq+ifNXUHEfxlWuVeQ9wGds3s1HYRcmtZl+oV2wq1ZEOXfyPb/GvQpMA==", "integrity": "sha512-7A5sSNJwZv0/2dslOOJyccwS7wN99+Xq+ifNXUHEfxlWuVeQ9wGds3s1HYRcmtZl+oV2wq1ZEOXfyPb/GvQpMA==",
"requires": { "requires": {
"colors": "1.1.2", "colors": "1.x",
"lodash": "4.17.4" "lodash": "^4.17.4"
} }
}, },
"js-string-escape": { "js-string-escape": {
@@ -47,9 +47,9 @@
"js-string-escape": "1.0.1", "js-string-escape": "1.0.1",
"packet-reader": "0.3.1", "packet-reader": "0.3.1",
"pg-connection-string": "0.1.3", "pg-connection-string": "0.1.3",
"pg-pool": "2.0.3", "pg-pool": "~2.0.3",
"pg-types": "1.12.1", "pg-types": "~1.12.1",
"pgpass": "1.0.2", "pgpass": "1.x",
"semver": "4.3.2" "semver": "4.3.2"
} }
}, },
@@ -68,10 +68,10 @@
"resolved": "https://registry.npmjs.org/pg-types/-/pg-types-1.12.1.tgz", "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-1.12.1.tgz",
"integrity": "sha1-1kCH45A7WP+q0nnnWVxSIIoUw9I=", "integrity": "sha1-1kCH45A7WP+q0nnnWVxSIIoUw9I=",
"requires": { "requires": {
"postgres-array": "1.0.2", "postgres-array": "~1.0.0",
"postgres-bytea": "1.0.0", "postgres-bytea": "~1.0.0",
"postgres-date": "1.0.3", "postgres-date": "~1.0.0",
"postgres-interval": "1.1.1" "postgres-interval": "^1.1.0"
} }
}, },
"pgpass": { "pgpass": {
@@ -79,7 +79,7 @@
"resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.2.tgz", "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.2.tgz",
"integrity": "sha1-Knu0G2BltnkH6R2hsHwYR8h3swY=", "integrity": "sha1-Knu0G2BltnkH6R2hsHwYR8h3swY=",
"requires": { "requires": {
"split": "1.0.1" "split": "^1.0.0"
} }
}, },
"postgres-array": { "postgres-array": {
@@ -102,7 +102,7 @@
"resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.1.1.tgz", "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.1.1.tgz",
"integrity": "sha512-OkuCi9t/3CZmeQreutGgx/OVNv9MKHGIT5jH8KldQ4NLYXkvmT9nDVxEuCENlNwhlGPE374oA/xMqn05G49pHA==", "integrity": "sha512-OkuCi9t/3CZmeQreutGgx/OVNv9MKHGIT5jH8KldQ4NLYXkvmT9nDVxEuCENlNwhlGPE374oA/xMqn05G49pHA==",
"requires": { "requires": {
"xtend": "4.0.1" "xtend": "^4.0.0"
} }
}, },
"semver": { "semver": {
@@ -115,7 +115,7 @@
"resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz",
"integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==",
"requires": { "requires": {
"through": "2.3.8" "through": "2"
} }
}, },
"through": { "through": {

168
package-lock.json generated
View File

@@ -7,25 +7,25 @@
"resolved": "https://registry.npmjs.org/@cljs-oss/module-deps/-/module-deps-1.1.1.tgz", "resolved": "https://registry.npmjs.org/@cljs-oss/module-deps/-/module-deps-1.1.1.tgz",
"integrity": "sha1-YmZ/KCFk8/EParnxJLpBb9EkOfo=", "integrity": "sha1-YmZ/KCFk8/EParnxJLpBb9EkOfo=",
"requires": { "requires": {
"JSONStream": "1.3.3", "JSONStream": "^1.0.3",
"babel-traverse": "6.26.0", "babel-traverse": "^6.23.1",
"babylon": "6.18.0", "babylon": "^6.15.0",
"browser-resolve": "1.11.2", "browser-resolve": "^1.7.0",
"cached-path-relative": "1.0.1", "cached-path-relative": "^1.0.0",
"concat-stream": "1.5.2", "concat-stream": "~1.5.0",
"defined": "1.0.0", "defined": "^1.0.0",
"detective": "4.7.1", "detective": "^4.0.0",
"duplexer2": "0.1.4", "duplexer2": "^0.1.2",
"enhanced-resolve": "3.4.1", "enhanced-resolve": "3.4.1",
"inherits": "2.0.3", "inherits": "^2.0.1",
"konan": "1.1.0", "konan": "1.1.0",
"parents": "1.0.1", "parents": "^1.0.0",
"readable-stream": "2.3.6", "readable-stream": "^2.0.2",
"resolve": "1.7.1", "resolve": "^1.1.3",
"stream-combiner2": "1.1.1", "stream-combiner2": "^1.1.1",
"subarg": "1.0.0", "subarg": "^1.0.0",
"through2": "2.0.3", "through2": "^2.0.0",
"xtend": "4.0.1" "xtend": "^4.0.0"
} }
}, },
"JSONStream": { "JSONStream": {
@@ -33,8 +33,8 @@
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.3.tgz", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.3.tgz",
"integrity": "sha512-3Sp6WZZ/lXl+nTDoGpGWHEpTnnC6X5fnkolYZR6nwIfzbxxvA8utPWe1gCt7i0m9uVGsSz2IS8K8mJ7HmlduMg==", "integrity": "sha512-3Sp6WZZ/lXl+nTDoGpGWHEpTnnC6X5fnkolYZR6nwIfzbxxvA8utPWe1gCt7i0m9uVGsSz2IS8K8mJ7HmlduMg==",
"requires": { "requires": {
"jsonparse": "1.3.1", "jsonparse": "^1.2.0",
"through": "2.3.8" "through": ">=2.2.7 <3"
} }
}, },
"acorn": { "acorn": {
@@ -57,9 +57,9 @@
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
"requires": { "requires": {
"chalk": "1.1.3", "chalk": "^1.1.3",
"esutils": "2.0.2", "esutils": "^2.0.2",
"js-tokens": "3.0.2" "js-tokens": "^3.0.2"
} }
}, },
"babel-messages": { "babel-messages": {
@@ -67,7 +67,7 @@
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
"requires": { "requires": {
"babel-runtime": "6.26.0" "babel-runtime": "^6.22.0"
} }
}, },
"babel-runtime": { "babel-runtime": {
@@ -75,8 +75,8 @@
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"requires": { "requires": {
"core-js": "2.5.7", "core-js": "^2.4.0",
"regenerator-runtime": "0.11.1" "regenerator-runtime": "^0.11.0"
} }
}, },
"babel-traverse": { "babel-traverse": {
@@ -84,15 +84,15 @@
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
"requires": { "requires": {
"babel-code-frame": "6.26.0", "babel-code-frame": "^6.26.0",
"babel-messages": "6.23.0", "babel-messages": "^6.23.0",
"babel-runtime": "6.26.0", "babel-runtime": "^6.26.0",
"babel-types": "6.26.0", "babel-types": "^6.26.0",
"babylon": "6.18.0", "babylon": "^6.18.0",
"debug": "2.6.9", "debug": "^2.6.8",
"globals": "9.18.0", "globals": "^9.18.0",
"invariant": "2.2.4", "invariant": "^2.2.2",
"lodash": "4.17.10" "lodash": "^4.17.4"
} }
}, },
"babel-types": { "babel-types": {
@@ -100,10 +100,10 @@
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
"requires": { "requires": {
"babel-runtime": "6.26.0", "babel-runtime": "^6.26.0",
"esutils": "2.0.2", "esutils": "^2.0.2",
"lodash": "4.17.10", "lodash": "^4.17.4",
"to-fast-properties": "1.0.3" "to-fast-properties": "^1.0.3"
} }
}, },
"babylon": { "babylon": {
@@ -131,7 +131,7 @@
"resolved": "https://registry.npmjs.org/bulma-calendar/-/bulma-calendar-1.3.0.tgz", "resolved": "https://registry.npmjs.org/bulma-calendar/-/bulma-calendar-1.3.0.tgz",
"integrity": "sha1-yqz7AWeSxV2t8O3BGq5vtkwlYEE=", "integrity": "sha1-yqz7AWeSxV2t8O3BGq5vtkwlYEE=",
"requires": { "requires": {
"camelcase": "4.1.0" "camelcase": "^4.1.0"
} }
}, },
"cached-path-relative": { "cached-path-relative": {
@@ -149,11 +149,11 @@
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": { "requires": {
"ansi-styles": "2.2.1", "ansi-styles": "^2.2.1",
"escape-string-regexp": "1.0.5", "escape-string-regexp": "^1.0.2",
"has-ansi": "2.0.0", "has-ansi": "^2.0.0",
"strip-ansi": "3.0.1", "strip-ansi": "^3.0.0",
"supports-color": "2.0.0" "supports-color": "^2.0.0"
} }
}, },
"concat-stream": { "concat-stream": {
@@ -161,9 +161,9 @@
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz",
"integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=",
"requires": { "requires": {
"inherits": "2.0.3", "inherits": "~2.0.1",
"readable-stream": "2.0.6", "readable-stream": "~2.0.0",
"typedarray": "0.0.6" "typedarray": "~0.0.5"
}, },
"dependencies": { "dependencies": {
"readable-stream": { "readable-stream": {
@@ -171,12 +171,12 @@
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
"integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",
"requires": { "requires": {
"core-util-is": "1.0.2", "core-util-is": "~1.0.0",
"inherits": "2.0.3", "inherits": "~2.0.1",
"isarray": "1.0.0", "isarray": "~1.0.0",
"process-nextick-args": "1.0.7", "process-nextick-args": "~1.0.6",
"string_decoder": "0.10.31", "string_decoder": "~0.10.x",
"util-deprecate": "1.0.2" "util-deprecate": "~1.0.1"
} }
} }
} }
@@ -209,8 +209,8 @@
"resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz",
"integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==",
"requires": { "requires": {
"acorn": "5.5.3", "acorn": "^5.2.1",
"defined": "1.0.0" "defined": "^1.0.0"
} }
}, },
"duplexer2": { "duplexer2": {
@@ -218,7 +218,7 @@
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
"integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=",
"requires": { "requires": {
"readable-stream": "2.3.6" "readable-stream": "^2.0.2"
} }
}, },
"enhanced-resolve": { "enhanced-resolve": {
@@ -226,10 +226,10 @@
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz",
"integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=",
"requires": { "requires": {
"graceful-fs": "4.1.11", "graceful-fs": "^4.1.2",
"memory-fs": "0.4.1", "memory-fs": "^0.4.0",
"object-assign": "4.1.1", "object-assign": "^4.0.1",
"tapable": "0.2.8" "tapable": "^0.2.7"
} }
}, },
"errno": { "errno": {
@@ -237,7 +237,7 @@
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
"integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
"requires": { "requires": {
"prr": "1.0.1" "prr": "~1.0.1"
} }
}, },
"escape-string-regexp": { "escape-string-regexp": {
@@ -265,7 +265,7 @@
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"requires": { "requires": {
"ansi-regex": "2.1.1" "ansi-regex": "^2.0.0"
} }
}, },
"inherits": { "inherits": {
@@ -278,7 +278,7 @@
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
"requires": { "requires": {
"loose-envify": "1.3.1" "loose-envify": "^1.0.0"
} }
}, },
"isarray": { "isarray": {
@@ -301,8 +301,8 @@
"resolved": "https://registry.npmjs.org/konan/-/konan-1.1.0.tgz", "resolved": "https://registry.npmjs.org/konan/-/konan-1.1.0.tgz",
"integrity": "sha1-M3dDxLl7S9Hvi2KiSzFeuLxLIJQ=", "integrity": "sha1-M3dDxLl7S9Hvi2KiSzFeuLxLIJQ=",
"requires": { "requires": {
"babel-traverse": "6.26.0", "babel-traverse": "^6.23.1",
"babylon": "6.18.0" "babylon": "^6.15.0"
} }
}, },
"lodash": { "lodash": {
@@ -315,7 +315,7 @@
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
"integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=",
"requires": { "requires": {
"js-tokens": "3.0.2" "js-tokens": "^3.0.0"
} }
}, },
"memory-fs": { "memory-fs": {
@@ -323,8 +323,8 @@
"resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
"integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=",
"requires": { "requires": {
"errno": "0.1.7", "errno": "^0.1.3",
"readable-stream": "2.3.6" "readable-stream": "^2.0.1"
} }
}, },
"minimist": { "minimist": {
@@ -347,7 +347,7 @@
"resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz",
"integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=",
"requires": { "requires": {
"path-platform": "0.11.15" "path-platform": "~0.11.15"
} }
}, },
"path-parse": { "path-parse": {
@@ -375,13 +375,13 @@
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": { "requires": {
"core-util-is": "1.0.2", "core-util-is": "~1.0.0",
"inherits": "2.0.3", "inherits": "~2.0.3",
"isarray": "1.0.0", "isarray": "~1.0.0",
"process-nextick-args": "2.0.0", "process-nextick-args": "~2.0.0",
"safe-buffer": "5.1.2", "safe-buffer": "~5.1.1",
"string_decoder": "1.1.1", "string_decoder": "~1.1.1",
"util-deprecate": "1.0.2" "util-deprecate": "~1.0.1"
}, },
"dependencies": { "dependencies": {
"process-nextick-args": { "process-nextick-args": {
@@ -394,7 +394,7 @@
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": { "requires": {
"safe-buffer": "5.1.2" "safe-buffer": "~5.1.0"
} }
} }
} }
@@ -409,7 +409,7 @@
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz",
"integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==",
"requires": { "requires": {
"path-parse": "1.0.5" "path-parse": "^1.0.5"
} }
}, },
"safe-buffer": { "safe-buffer": {
@@ -422,8 +422,8 @@
"resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz",
"integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=",
"requires": { "requires": {
"duplexer2": "0.1.4", "duplexer2": "~0.1.0",
"readable-stream": "2.3.6" "readable-stream": "^2.0.2"
} }
}, },
"string_decoder": { "string_decoder": {
@@ -436,7 +436,7 @@
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": { "requires": {
"ansi-regex": "2.1.1" "ansi-regex": "^2.0.0"
} }
}, },
"subarg": { "subarg": {
@@ -444,7 +444,7 @@
"resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",
"integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=",
"requires": { "requires": {
"minimist": "1.2.0" "minimist": "^1.1.0"
} }
}, },
"supports-color": { "supports-color": {
@@ -467,8 +467,8 @@
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
"integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
"requires": { "requires": {
"readable-stream": "2.3.6", "readable-stream": "^2.1.5",
"xtend": "4.0.1" "xtend": "~4.0.1"
} }
}, },
"to-fast-properties": { "to-fast-properties": {

View File

@@ -68,7 +68,7 @@
:plugins [[lein-figwheel "0.5.13"] :plugins [[lein-figwheel "0.5.13"]
[lein-pdo "0.1.1"] [lein-pdo "0.1.1"]
[cider/cider-nrepl "0.16.0"]] [cider/cider-nrepl "0.16.0"]]
:jvm-opts ["-Dconfig=config/dev.edn"]} :jvm-opts ["-Dconfig=config/dev.edn" "--add-modules" "java.xml.bind"]}
:uberjar {:prep-tasks [["cljsbuild" "once" "min"] "compile"]} :uberjar {:prep-tasks [["cljsbuild" "once" "min"] "compile"]}
:provided {:dependencies [[org.clojure/clojurescript "1.10.238"] :provided {:dependencies [[org.clojure/clojurescript "1.10.238"]
[reagent "0.7.0"] [reagent "0.7.0"]

View File

@@ -59,9 +59,8 @@
(Integer/parseInt id)))) (Integer/parseInt id))))
(defn insert [data] (defn insert [data]
(let [[id] (-> (sql/build :insert-into :vendors
:values [(unparse data)]) (let [[{:keys [id]}] (j/insert! (get-conn) :vendors (unparse data))]
execute!)]
(println "inserted vendor: " data ", id " id) (println "inserted vendor: " data ", id " id)
(get-by-id id))) (get-by-id id)))

View File

@@ -192,6 +192,7 @@
:date {:type 'String} :date {:type 'String}
:company_id {:type 'Int} :company_id {:type 'Int}
:vendor_id {:type 'Int} :vendor_id {:type 'Int}
:vendor_name {:type 'String}
:total {:type 'Float}}}} :total {:type 'Float}}}}
:mutations :mutations

View File

@@ -1,21 +1,27 @@
(ns auto-ap.graphql.invoices (ns auto-ap.graphql.invoices
(:require [auto-ap.graphql.utils :refer [->graphql]] (:require [auto-ap.graphql.utils :refer [->graphql]]
[auto-ap.db.invoices :as invoices] [auto-ap.db.invoices :as invoices]
[auto-ap.db.vendors :as vendors]
[auto-ap.db.invoices-expense-accounts :as invoices-expense-accounts] [auto-ap.db.invoices-expense-accounts :as invoices-expense-accounts]
[auto-ap.time :refer [parse normal-date]])) [auto-ap.time :refer [parse normal-date]]))
(defn add-invoice [context {{:keys [total invoice_number company_id vendor_id date] :as in} :invoice} value] (defn -create-vendor-if-necessary [vendor-id vendor-name]
(if vendor-id
vendor-id
(:id (doto (vendors/insert {:name vendor-name :default-expense-account 0}) println))))
(-> (invoices/insert-multi! [{:invoice-number invoice_number (defn add-invoice [context {{:keys [total invoice_number company_id vendor_id vendor_name date] :as in} :invoice} value]
:company-id company_id (let [vendor_id (-create-vendor-if-necessary vendor_id vendor_name)]
:vendor-id vendor_id (-> (invoices/insert-multi! [{:invoice-number invoice_number
:total total :company-id company_id
:outstanding-balance total :vendor-id vendor_id
:status "unpaid" :total total
:imported true :outstanding-balance total
:date (parse date normal-date)}]) :status "unpaid"
(first) :imported true
(->graphql))) :date (parse date normal-date)}])
(first)
(->graphql))))
(defn get-invoices-expense-accounts [context args value] (defn get-invoices-expense-accounts [context args value]

View File

@@ -3,14 +3,15 @@
[auto-ap.entities.shared :as shared])) [auto-ap.entities.shared :as shared]))
(s/def ::vendor-id int?) (s/def ::vendor-id int?)
(s/def ::vendor-name string?)
(s/def ::company-id int?) (s/def ::company-id int?)
(s/def ::invoice-number ::shared/required-identifier) (s/def ::invoice-number ::shared/required-identifier)
(s/def ::date ::shared/date) (s/def ::date ::shared/date)
(s/def ::total ::shared/money) (s/def ::total ::shared/money)
(s/def ::invoice (s/keys :req-un [::vendor-id (s/def ::invoice (s/keys :req-un [::company-id
::company-id
::invoice-number ::invoice-number
::date ::date
::total ::total]
])) :opt-un [::vendor-id
::vendor-name]))

View File

@@ -74,8 +74,9 @@
(re-frame/reg-event-db (re-frame/reg-event-db
::change-form ::change-form
(fn [db [_ location field value]] (fn [db [_ location field value]]
(println field value) (if value
(assoc-in db (into location field) value))) (assoc-in db (into location field) value)
(update-in db location dissoc field))))
(re-frame/reg-event-db (re-frame/reg-event-db
::modal-status ::modal-status

View File

@@ -2,31 +2,38 @@
(:require [reagent.core :as r] (:require [reagent.core :as r]
[clojure.string :as str])) [clojure.string :as str]))
(defn typeahead [{:keys [matches on-change field value class]}] (defn typeahead [{:keys [matches on-change field text-field value class not-found-description
not-found-value]}]
(let [text (r/atom (or (second (first (filter #(= (first %) value) matches))) "")) (let [text (r/atom (or (second (first (filter #(= (first %) value) matches))) ""))
highlighted (r/atom 0) highlighted (r/atom 0)
selected (r/atom (first (first (filter #(= (first %) value) matches)))) selected (r/atom (first (first (filter #(= (first %) value) matches))))
select (fn [[id t]] select (fn [[id text-description text-value]]
(reset! selected id) (reset! selected id)
(reset! text t) (reset! text text-description)
(println [id t]) (println (= :not-found id))
(when on-change (when on-change
(on-change id)))] (if (= :not-found id)
(fn [{:keys [matches on-change field value class]}] (on-change nil text-description text-value)
(on-change id text-description (or text-value text-description)))))]
(fn [{:keys [matches on-change field text-field value class not-found-description]}]
(let [valid-matches (take 5 (for [[[id t :as match] i] (map vector matches (range)) (let [valid-matches (take 5 (for [[[id t :as match] i] (map vector matches (range))
:when (str/includes? (.toLowerCase t) (.toLowerCase @text))] :when (str/includes? (.toLowerCase t) (.toLowerCase @text))]
match))] match))
valid-matches (if (and not-found-description @text)
(concat valid-matches [[:not-found (not-found-description @text) (not-found-value @text)]])
valid-matches)]
[:div.typeahead [:div.typeahead
(if @selected (if @selected
[:div.input {:class class} [:div.input {:class class}
[:div.control [:div.control
[:div.tags.has-addons [:div.tags.has-addons
[:span.tag @text] [:span.tag @text]
[:a.tag.is-delete {:on-click (fn [] (select [nil ""]))}]]]] [:a.tag.is-delete {:on-click (fn [] (select [nil "" nil]))}]]]]
[:input.input {:type "text" [:input.input {:type "text"
:class class :class class
:field [:vendor] :field field
:value @text :value @text
:on-blur (fn [e] :on-blur (fn [e]
(cond @selected (cond @selected
@@ -52,13 +59,19 @@
(reset! highlighted (ffirst valid-matches)) (reset! highlighted (ffirst valid-matches))
(select [nil (.. e -target -value)]))} (select [nil (.. e -target -value)]))}
]) ])
(when (and (seq @text) (cond
(not @selected) (and (seq @text)
(seq valid-matches)) (not @selected)
(seq valid-matches))
[:div.typeahead-menu [:div.typeahead-menu
[:ul [:ul
(for [[id t :as match] valid-matches] (for [[id t :as match] valid-matches]
[:li.typeahead-suggestion {:class (if (= id @highlighted) [:li.typeahead-suggestion {:class (if (= id @highlighted)
"typeahead-highlighted") "typeahead-highlighted")
:on-mouse-down #(do (println "MATCH" match) (select match))} t])]])])))) :on-mouse-down #(do (select match))} t])]]
:else
nil)]))))

View File

@@ -26,7 +26,6 @@
(re-frame/reg-sub (re-frame/reg-sub
::invoice ::invoice
(fn [db id] (fn [db id]
(println id)
(get (by :id (-> db ::invoice-page :invoices )) id))) (get (by :id (-> db ::invoice-page :invoices )) id)))
(re-frame/reg-sub (re-frame/reg-sub
@@ -207,18 +206,20 @@
(re-frame/reg-event-fx (re-frame/reg-event-fx
::create-invoice ::create-invoice
(fn [{:keys [db]} _] (fn [{:keys [db]} _]
{:graphql (let [new-invoice @(re-frame/subscribe [::new-invoice])]
{:token (-> db :user) (println new-invoice)
:query-obj {:venia/operation {:operation/type :mutation {:graphql
:operation/name "AddInvoice"} {:token (-> db :user)
:query-obj {:venia/operation {:operation/type :mutation
:operation/name "AddInvoice"}
:venia/queries [{:query/data [:add-invoice :venia/queries [{:query/data [:add-invoice
{:invoice @(re-frame/subscribe [::new-invoice])} {:invoice new-invoice}
[:id :total :outstanding-balance :date :invoice-number [:id :total :outstanding-balance :date :invoice-number
[:company [:id :name]] [:company [:id :name]]
[:vendor [:id :name]] [:vendor [:id :name]]
]]}]} ]]}]}
:on-success [::invoice-created]}})) :on-success [::invoice-created]}})))
(re-frame/reg-event-fx (re-frame/reg-event-fx
::invoice-created ::invoice-created
@@ -270,7 +271,7 @@
(update-in [::invoice-page :invoices] (update-in [::invoice-page :invoices]
(fn [is] (fn [is]
(println "UPDATE" updated is)
(replace-if #(= (:id %1) (:id %2)) updated is))) (replace-if #(= (:id %1) (:id %2)) updated is)))
(dissoc ::change-expense-accounts))}))) (dissoc ::change-expense-accounts))})))
@@ -336,7 +337,7 @@
:field [:invoice :expense-accounts index :amount] :field [:invoice :expense-accounts index :amount]
:event change-event :event change-event
:subscription data :subscription data
:value (doto (get-in data [:invoice :expense-accounts index :amount]) println) :value (get-in data [:invoice :expense-accounts index :amount])
:max (:total data) :max (:total data)
:step "0.01"}]]]]]] :step "0.01"}]]]]]]
@@ -421,8 +422,11 @@
[typeahead {:matches (map (fn [x] [(:id x) (:name x)]) @(re-frame/subscribe [::subs/vendors])) [typeahead {:matches (map (fn [x] [(:id x) (:name x)]) @(re-frame/subscribe [::subs/vendors]))
:type "typeahead" :type "typeahead"
:field [:vendor-id] :field [:vendor-id]
:text-field [:vendor-name]
:not-found-description #(str "Create vendor '" % "'")
:not-found-value #(str %)
:event change-event :event change-event
:spec ::invoice/vendor-id :spec (s/nilable ::invoice/vendor-id)
:subscription data}]]] :subscription data}]]]
[horizontal-field [horizontal-field
[:label.label "Date"] [:label.label "Date"]

View File

@@ -68,12 +68,15 @@
keys (dissoc keys :field :subscription :event :spec)] keys (dissoc keys :field :subscription :event :spec)]
(into [dom keys] (with-keys rest)))) (into [dom keys] (with-keys rest))))
(defmethod do-bind "typeahead" [dom {:keys [field event subscription class spec] :as keys} & rest] (defmethod do-bind "typeahead" [dom {:keys [field text-field event subscription class spec] :as keys} & rest]
(let [field (if (keyword? field) [field] field) (let [field (if (keyword? field) [field] field)
event (if (keyword? event) [event] event) event (if (keyword? event) [event] event)
keys (assoc keys keys (assoc keys
:on-change (fn [selected] :on-change (fn [selected text-description text-value]
(re-frame/dispatch (conj (conj event field) selected))) (println "HERE " selected text-description text-value)
(re-frame/dispatch (conj (conj event field) selected))
(when text-field
(re-frame/dispatch (conj (conj event text-field) text-value))))
:value (get-in subscription field) :value (get-in subscription field)
:class (str class :class (str class
(when (and spec (not (s/valid? spec (get-in subscription field)))) (when (and spec (not (s/valid? spec (get-in subscription field))))