Commit 1cc32023 authored by analog-nico's avatar analog-nico
Browse files

feat: full reimplementation using (at)request/promise-core

parent 56a6fa1c
Loading
Loading
Loading
Loading
+13 −12
Original line number Original line Diff line number Diff line
# EditorConfig helps developers define and maintain consistent
# EditorConfig is awesome: http://EditorConfig.org
# coding styles between different editors and IDEs
# editorconfig.org


root = true
root = true



[*]
[*]
charset = utf-8
end_of_line = lf


# Change these settings to your own preference
[*.js]
indent_style = space
indent_style = space
indent_size = 4
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true


# We recommend you to keep these unchanged
[*.{json,xml}]
end_of_line = lf
indent_style = space
charset = utf-8
indent_size = 2
trim_trailing_whitespace = true
trim_trailing_whitespace = true
insert_final_newline = true
insert_final_newline = true


[*.md]
[*.{md,txt}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false
trim_trailing_whitespace = false

insert_final_newline = false
[*.json]
indent_size = 2

.eslintrc.json

0 → 100644
+158 −0
Original line number Original line Diff line number Diff line
{
  "root": true,
  "parser": "espree",
  "parserOptions": {
    "ecmaVersion": 5,
    "sourceType": "script",
    "ecmaFeatures": {}
  },
  "plugins": [],
  "env": {
    "node": true
  },
  "globals": {},
  "rules": {

    // Possible Errors (fully reviewed 2016-07-05)

    "no-cond-assign": 2,
    "no-console": 0,
    "no-constant-condition": 2,
    "no-control-regex": 2,
    "no-debugger": 2,
    "no-dupe-args": 2,
    "no-dupe-keys": 2,
    "no-duplicate-case": 2,
    "no-empty": [2, { "allowEmptyCatch": false }],
    "no-empty-character-class": 2,
    "no-ex-assign": 2,
    "no-extra-boolean-cast": 2,
    "no-extra-parens": [2, "all"],
    "no-extra-semi": 2,
    "no-func-assign": 2,
    "no-inner-declarations": [2, "functions"],
    "no-invalid-regexp": 2,
    "no-irregular-whitespace": [2, { "skipComments": false }],
    "no-negated-in-lhs": 2,
    "no-obj-calls": 2,
    "no-prototype-builtins": 2,
    "no-regex-spaces": 2,
    "no-sparse-arrays": 2,
    "no-unexpected-multiline": 2,
    "no-unreachable": 2,
    "no-unsafe-finally": 2,
    "use-isnan": 2,
    "valid-jsdoc": 0,
    "valid-typeof": 2,

    // Best Practices

    "accessor-pairs": 2,
    "curly": [2, "multi-line"],
    "dot-location": [2, "property"],
    "eqeqeq": 2,
    "no-caller": 2,
    "no-empty-pattern": 0, // for ES6 destructuring
    "no-eval": 2,
    "no-extend-native": 2,
    "no-extra-bind": 2,
    "no-fallthrough": 2,
    "no-floating-decimal": 2,
    "no-implied-eval": 2,
    "no-iterator": 2,
    "no-labels": 2,
    "no-lone-blocks": 2,
    "no-magic-numbers": 0,
    "no-multi-spaces": 2,
    "no-multi-str": 2,
    "no-native-reassign": 2,
    "no-new": 2,
    "no-new-func": 2,
    "no-new-wrappers": 2,
    "no-octal": 2,
    "no-octal-escape": 2,
    "no-proto": 2,
    "no-redeclare": 2,
    "no-return-assign": [2, "except-parens"],
    "no-self-assign": 2,
    "no-self-compare": 2,
    "no-sequences": 2,
    "no-throw-literal": 2,
    "no-unmodified-loop-condition": 2,
    "no-useless-call": 2,
    "no-useless-escape": 2,
    "no-with": 2,
    "wrap-iife": [2, "inside"],
    "yoda": 2,

    // Strict Mode (fully reviewed 2016-07-05)

    "strict": [2, "safe"],

    // Variables (fully reviewed 2016-07-05)

    "init-declarations": [2, "always"],
    "no-catch-shadow": 0,
    "no-delete-var": 2,
    "no-label-var": 2,
    "no-restricted-globals": 0,
    "no-shadow": [2, { "builtinGlobals": false, "hoist": "all", "allow": [] }],
    "no-shadow-restricted-names": 2,
    "no-undef": [2, { "typeof": true }],
    "no-undef-init": 2,
    "no-undefined": 2,
    "no-unused-vars": [2, { "vars": "local", "args": "none", "caughtErrors": "none" }],
    "no-use-before-define": [2, { "functions": false, "classes": true }],

    // Node.js and CommonJS (fully reviewed 2016-07-05)

    "callback-return": 0,
    "global-require": 0,
    "handle-callback-err": [2, "^(err|error)$" ],
    "no-mixed-requires": 0,
    "no-new-require": 2,
    "no-path-concat": 2,
    "no-process-env": 2,
    "no-process-exit": 2,
    "no-restricted-modules": 0,
    "no-sync": 2,

    // Stylistic Issues

    "block-spacing": 2,
    "brace-style": [2, "1tbs", { "allowSingleLine": true }],
    "camelcase": [2, { "properties": "never" }],
    "comma-dangle": [2, "never"],
    "comma-spacing": 2,
    "comma-style": 2,
    "eol-last": 2,
    "indent": [2, 4, { "SwitchCase": 1 }],
    "jsx-quotes": 0,
    "key-spacing": 2,
    "keyword-spacing": 2,
    "new-cap": 0,
    "new-parens": 2,
    "no-array-constructor": 2,
    "no-mixed-spaces-and-tabs": 2,
    "no-multiple-empty-lines": [2, { "max": 2, "maxBOF": 0, "maxEOF": 1 }],
    "no-new-object": 2,
    "no-plusplus": [2, { "allowForLoopAfterthoughts": false }],
    "no-spaced-func": 2,
    "no-trailing-spaces": 2,
    "no-unneeded-ternary": [2, { "defaultAssignment": false }],
    "no-whitespace-before-property": 2,
    "one-var": 0,
    "operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }],
    "padded-blocks": 0,
    "quotes": [2, "single", "avoid-escape"],
    "semi": [2, "always"],
    "semi-spacing": 2,
    "space-before-blocks": 2,
    "space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
    "space-in-parens": 0,
    "space-infix-ops": 0,
    "space-unary-ops": 2,
    "spaced-comment": 0

  }
}
+5 −4
Original line number Original line Diff line number Diff line
/.idea/
/coverage/
/node_modules/

.DS_Store
.DS_Store
.idea/
coverage/
node_modules/
npm-debug.log
npm-debug.log
 No newline at end of file

.jshintrc

deleted100644 → 0
+0 −106
Original line number Original line Diff line number Diff line
{
  // --------------------------------------------------------------------
  // Based on JSHint Configuration, Strict Edition
  // See https://gist.github.com/haschek/2595796
  // --------------------------------------------------------------------

  // == Enforcing Options ===============================================
  // http://www.jshint.com/docs/options/#enforcing-options
  //
  // These options tell JSHint to be more strict towards your code. Use
  // them if you want to allow only a safe subset of JavaScript, very
  // useful when your codebase is shared with a big number of developers
  // with different skill levels.

  "bitwise"       : true,     // Prohibit bitwise operators (&, |, ^, etc.).
  "curly"         : true,     // Require {} for every new block or scope.
  "eqeqeq"        : true,     // Require triple equals i.e. `===`.
  "forin"         : true,     // Tolerate `for in` loops without `hasOwnPrototype`.
  "immed"         : true,     // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
  "latedef"       : true,     // Prohibit variable use before definition.
  "newcap"        : true,     // Require capitalization of all constructor functions e.g. `new F()`.
  "noarg"         : true,     // Prohibit use of `arguments.caller` and `arguments.callee`.
  "noempty"       : true,     // Prohibit use of empty blocks.
  "nonew"         : true,     // Prohibit use of constructors for side-effects.
  "plusplus"      : true,     // Prohibit use of `++` & `--`.
  "regexp"        : true,     // Prohibit `.` and `[^...]` in regular expressions.
  "undef"         : true,     // Require all non-global variables be declared before they are used.
  "strict"        : true,     // Require `use strict` pragma in every file.
  "trailing"      : true,     // Prohibit trailing whitespaces.

  // == Relaxing Options ================================================
  // http://www.jshint.com/docs/options/#relaxing-options
  //
  // These options allow you to suppress certain types of warnings. Use
  // them only if you are absolutely positive that you know what you are
  // doing.

  "asi"           : false,    // Tolerate Automatic Semicolon Insertion (no semicolons).
  "boss"          : false,    // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
  "debug"         : false,    // Allow debugger statements e.g. browser breakpoints.
  "eqnull"        : false,    // Tolerate use of `== null`.
  "es5"           : false,    // Allow EcmaScript 5 syntax.
  "esnext"        : false,    // Allow ES.next specific features such as `const` and `let`.
  "evil"          : false,    // Tolerate use of `eval`.
  "expr"          : false,    // Tolerate `ExpressionStatement` as Programs.
  "funcscope"     : false,    // Tolerate declarations of variables inside of control structures while accessing them later from the outside.
  "globalstrict"  : false,    // Allow global "use strict" (also enables 'strict').
  "iterator"      : false,    // Allow usage of __iterator__ property.
  "lastsemic"     : false,    // Tolerate missing semicolons when the it is omitted for the last statement in a one-line block.
  "laxbreak"      : false,    // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
  "laxcomma"      : false,    // Suppress warnings about comma-first coding style.
  "loopfunc"      : false,    // Allow functions to be defined within loops.
  "multistr"      : false,    // Tolerate multi-line strings.
  "onecase"       : false,    // Tolerate switches with just one case.
  "proto"         : false,    // Tolerate __proto__ property. This property is deprecated.
  "regexdash"     : false,    // Tolerate unescaped last dash i.e. `[-...]`.
  "scripturl"     : false,    // Tolerate script-targeted URLs.
  "smarttabs"     : false,    // Tolerate mixed tabs and spaces when the latter are used for alignmnent only.
  "shadow"        : false,    // Allows re-define variables later in code e.g. `var x=1; x=2;`.
  "sub"           : true,     // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
  "supernew"      : false,    // Tolerate `new function () { ... };` and `new Object;`.
  "validthis"     : false,    // Tolerate strict violations when the code is running in strict mode and you use this in a non-constructor function.

  // == Environments ====================================================
  // http://www.jshint.com/docs/options/#environments
  //
  // These options pre-define global variables that are exposed by
  // popular JavaScript libraries and runtime environments—such as
  // browser or node.js.

  "browser"       : false,    // Standard browser globals e.g. `window`, `document`.
  "couch"         : false,    // Enable globals exposed by CouchDB.
  "devel"         : false,    // Allow development statements e.g. `console.log();`.
  "dojo"          : false,    // Enable globals exposed by Dojo Toolkit.
  "jquery"        : false,    // Enable globals exposed by jQuery JavaScript library.
  "mootools"      : false,    // Enable globals exposed by MooTools JavaScript framework.
  "node"          : true,     // Enable globals available when code is running inside of the NodeJS runtime environment.
  "nonstandard"   : false,    // Define non-standard but widely adopted globals such as escape and unescape.
  "prototypejs"   : false,    // Enable globals exposed by Prototype JavaScript framework.
  "rhino"         : false,    // Enable globals available when your code is running inside of the Rhino runtime environment.
  "wsh"           : false,    // Enable globals available when your code is running as a script for the Windows Script Host.

  // Additional globals introduced by Mocha and Chai
  "globals": {
    "describe"    : false,
    "xdescribe"   : false,
    "it"          : false,
    "xit"         : false,
    "before"      : false,
    "beforeEach"  : false,
    "after"       : false,
    "afterEach"   : false,
    "expect"      : false
  },

  // == JSLint Legacy ===================================================
  // http://www.jshint.com/docs/options/#legacy
  //
  // These options are legacy from JSLint. Aside from bug fixes they will
  // not be improved in any way and might be removed at any point.

  "nomen"         : false,    // Prohibit use of initial or trailing underbars in names.
  "onevar"        : false,    // Allow only one `var` statement per function.
  "passfail"      : false,    // Stop on first error.
  "white"         : false     // Check against strict whitespace and indentation rules.
}
 No newline at end of file
+14 −8
Original line number Original line Diff line number Diff line
.idea/
/.idea/
coverage/
/coverage/
test/
/test/
.editorconfig

.jshintrc
/.editorconfig
.travis.yml
/.eslintrc.json
gulpfile.js
/.gitignore
run-request-tests.md
/.publishrc
/.travis.yml
/gulpfile.js
/run-request-tests.md

.DS_Store
npm-debug.log
 No newline at end of file
Loading