Skip to content

Commit

Permalink
chore: remove syncano dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Idered committed Aug 16, 2017
1 parent 3745f1d commit 643d142
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 40 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"babel-preset-env": "^1.6.0",
"is_js": "^0.9.0",
"lodash.camelcase": "^4.3.0",
"lodash.snakecase": "^4.1.1",
"syncano-server": "^0.8.1"
"lodash.snakecase": "^4.1.1"
}
}
8 changes: 0 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ class Validator {
this.sizeRules = ['Min', 'Max', 'Between']
}

validateConnection() {
return new Promise((resolve, reject) => {
this.connection.Instance.please().list()
.then(() => resolve(true))
.catch(err => reject(err))
})
}

setData(data) {
// TODO: Handle array inputs
this.data = data
Expand Down
3 changes: 1 addition & 2 deletions src/validators.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { data } from 'syncano-server'
import { is } from './helpers'

export function validateRequired(attribute, value) {
Expand Down Expand Up @@ -32,7 +31,7 @@ export function validateExists(attribute, value, parameters) {
const [className, column] = parameters

return new Promise((resolve, reject) => {
data[className]
this.connection[className === 'users' ? 'users' : 'data'][className]
.where(column, value)
.list()
.then(objects => resolve(objects.length > 0))
Expand Down
31 changes: 3 additions & 28 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ babel-register@^6.24.1:
mkdirp "^0.5.1"
source-map-support "^0.4.2"

babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.9.0, babel-runtime@^6.9.1:
babel-runtime@^6.0.0, babel-runtime@^6.9.0, babel-runtime@^6.9.1:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.18.0.tgz#0f4177ffd98492ef13b9f823e9994a02584c9078"
dependencies:
Expand Down Expand Up @@ -891,10 +891,6 @@ buffer-shims@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51"

buffer-to-arraybuffer@0.0.4:
version "0.0.4"
resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.4.tgz#f3e5e3f6f2632c71e7cdebe76ed1718fad421d4c"

builtin-modules@^1.0.0, builtin-modules@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
Expand Down Expand Up @@ -1341,12 +1337,6 @@ electron-to-chromium@^1.3.18:
version "1.3.18"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.18.tgz#3dcc99da3e6b665f6abbc71c28ad51a2cd731a9c"

encoding@^0.1.11:
version "0.1.12"
resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb"
dependencies:
iconv-lite "~0.4.13"

end-of-stream@^1.1.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.0.tgz#7a90d833efda6cfa6eac0f4949dbb0fad3a63206"
Expand Down Expand Up @@ -2169,7 +2159,7 @@ https-proxy-agent@^1.0.0:
debug "2"
extend "3"

iconv-lite@^0.4.17, iconv-lite@~0.4.13:
iconv-lite@^0.4.17:
version "0.4.18"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2"

Expand Down Expand Up @@ -2433,7 +2423,7 @@ is-retry-allowed@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"

is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0:
is-stream@^1.0.0, is-stream@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"

Expand Down Expand Up @@ -2947,15 +2937,6 @@ netrc@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/netrc/-/netrc-0.1.4.tgz#6be94fcaca8d77ade0a9670dc460914c94472444"

node-fetch@2.0.0-alpha.3:
version "2.0.0-alpha.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.0.0-alpha.3.tgz#8031bded671c806e4604c16b27ab1973b4fe88cc"
dependencies:
babel-runtime "^6.11.6"
buffer-to-arraybuffer "0.0.4"
encoding "^0.1.11"
is-stream "^1.0.1"

node-pre-gyp@^0.6.29:
version "0.6.32"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.32.tgz#fc452b376e7319b3d255f5f34853ef6fd8fe1fd5"
Expand Down Expand Up @@ -4042,12 +4023,6 @@ supports-color@^4.0.0:
dependencies:
has-flag "^2.0.0"

syncano-server@^0.8.1:
version "0.8.1"
resolved "https://registry.yarnpkg.com/syncano-server/-/syncano-server-0.8.1.tgz#6a7dd7a30690ca24bd1aba5c86e6ea7dd7143d6a"
dependencies:
node-fetch "2.0.0-alpha.3"

table@^3.7.8:
version "3.8.3"
resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f"
Expand Down

0 comments on commit 643d142

Please sign in to comment.