├── .gitignore ├── README.md ├── SETUP.md ├── examples ├── curl │ └── main.sh ├── nodejs │ ├── main.js │ ├── node_modules │ │ ├── .bin │ │ │ ├── sshpk-conv │ │ │ ├── sshpk-conv.cmd │ │ │ ├── sshpk-sign │ │ │ ├── sshpk-sign.cmd │ │ │ ├── sshpk-verify │ │ │ ├── sshpk-verify.cmd │ │ │ ├── uuid │ │ │ └── uuid.cmd │ │ ├── ajv │ │ │ ├── .tonic_example.js │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── dist │ │ │ │ ├── ajv.bundle.js │ │ │ │ ├── ajv.min.js │ │ │ │ ├── ajv.min.js.map │ │ │ │ ├── nodent.min.js │ │ │ │ └── regenerator.min.js │ │ │ ├── lib │ │ │ │ ├── $data.js │ │ │ │ ├── ajv.d.ts │ │ │ │ ├── ajv.js │ │ │ │ ├── cache.js │ │ │ │ ├── compile │ │ │ │ │ ├── _rules.js │ │ │ │ │ ├── async.js │ │ │ │ │ ├── equal.js │ │ │ │ │ ├── error_classes.js │ │ │ │ │ ├── formats.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── resolve.js │ │ │ │ │ ├── rules.js │ │ │ │ │ ├── schema_obj.js │ │ │ │ │ ├── ucs2length.js │ │ │ │ │ └── util.js │ │ │ │ ├── dot │ │ │ │ │ ├── _limit.jst │ │ │ │ │ ├── _limitItems.jst │ │ │ │ │ ├── _limitLength.jst │ │ │ │ │ ├── _limitProperties.jst │ │ │ │ │ ├── allOf.jst │ │ │ │ │ ├── anyOf.jst │ │ │ │ │ ├── coerce.def │ │ │ │ │ ├── const.jst │ │ │ │ │ ├── contains.jst │ │ │ │ │ ├── custom.jst │ │ │ │ │ ├── defaults.def │ │ │ │ │ ├── definitions.def │ │ │ │ │ ├── dependencies.jst │ │ │ │ │ ├── enum.jst │ │ │ │ │ ├── errors.def │ │ │ │ │ ├── format.jst │ │ │ │ │ ├── items.jst │ │ │ │ │ ├── missing.def │ │ │ │ │ ├── multipleOf.jst │ │ │ │ │ ├── not.jst │ │ │ │ │ ├── oneOf.jst │ │ │ │ │ ├── pattern.jst │ │ │ │ │ ├── properties.jst │ │ │ │ │ ├── propertyNames.jst │ │ │ │ │ ├── ref.jst │ │ │ │ │ ├── required.jst │ │ │ │ │ ├── uniqueItems.jst │ │ │ │ │ └── validate.jst │ │ │ │ ├── dotjs │ │ │ │ │ ├── README.md │ │ │ │ │ ├── _limit.js │ │ │ │ │ ├── _limitItems.js │ │ │ │ │ ├── _limitLength.js │ │ │ │ │ ├── _limitProperties.js │ │ │ │ │ ├── allOf.js │ │ │ │ │ ├── anyOf.js │ │ │ │ │ ├── const.js │ │ │ │ │ ├── contains.js │ │ │ │ │ ├── custom.js │ │ │ │ │ ├── dependencies.js │ │ │ │ │ ├── enum.js │ │ │ │ │ ├── format.js │ │ │ │ │ ├── items.js │ │ │ │ │ ├── multipleOf.js │ │ │ │ │ ├── not.js │ │ │ │ │ ├── oneOf.js │ │ │ │ │ ├── pattern.js │ │ │ │ │ ├── properties.js │ │ │ │ │ ├── propertyNames.js │ │ │ │ │ ├── ref.js │ │ │ │ │ ├── required.js │ │ │ │ │ ├── uniqueItems.js │ │ │ │ │ └── validate.js │ │ │ │ ├── keyword.js │ │ │ │ ├── patternGroups.js │ │ │ │ └── refs │ │ │ │ │ ├── $data.json │ │ │ │ │ ├── json-schema-draft-04.json │ │ │ │ │ ├── json-schema-draft-06.json │ │ │ │ │ └── json-schema-v5.json │ │ │ ├── package.json │ │ │ └── scripts │ │ │ │ ├── .eslintrc.yml │ │ │ │ ├── bundle.js │ │ │ │ ├── compile-dots.js │ │ │ │ ├── info │ │ │ │ ├── prepare-tests │ │ │ │ └── travis-gh-pages │ │ ├── asn1 │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── lib │ │ │ │ ├── ber │ │ │ │ │ ├── errors.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── reader.js │ │ │ │ │ ├── types.js │ │ │ │ │ └── writer.js │ │ │ │ └── index.js │ │ │ ├── package.json │ │ │ └── tst │ │ │ │ └── ber │ │ │ │ ├── reader.test.js │ │ │ │ └── writer.test.js │ │ ├── assert-plus │ │ │ ├── AUTHORS │ │ │ ├── CHANGES.md │ │ │ ├── README.md │ │ │ ├── assert.js │ │ │ └── package.json │ │ ├── asynckit │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── bench.js │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── abort.js │ │ │ │ ├── async.js │ │ │ │ ├── defer.js │ │ │ │ ├── iterate.js │ │ │ │ ├── readable_asynckit.js │ │ │ │ ├── readable_parallel.js │ │ │ │ ├── readable_serial.js │ │ │ │ ├── readable_serial_ordered.js │ │ │ │ ├── state.js │ │ │ │ ├── streamify.js │ │ │ │ └── terminator.js │ │ │ ├── package.json │ │ │ ├── parallel.js │ │ │ ├── serial.js │ │ │ ├── serialOrdered.js │ │ │ └── stream.js │ │ ├── aws-sign2 │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── aws4 │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── aws4.js │ │ │ ├── lru.js │ │ │ └── package.json │ │ ├── bcrypt-pbkdf │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── boom │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── lib │ │ │ │ └── index.js │ │ │ └── package.json │ │ ├── caseless │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── co │ │ │ ├── History.md │ │ │ ├── LICENSE │ │ │ ├── Readme.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── combined-stream │ │ │ ├── License │ │ │ ├── Readme.md │ │ │ ├── lib │ │ │ │ ├── combined_stream.js │ │ │ │ └── defer.js │ │ │ └── package.json │ │ ├── core-util-is │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── float.patch │ │ │ ├── lib │ │ │ │ └── util.js │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── cryptiles │ │ │ ├── .npmignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── lib │ │ │ │ └── index.js │ │ │ ├── node_modules │ │ │ │ └── boom │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── lib │ │ │ │ │ └── index.js │ │ │ │ │ └── package.json │ │ │ └── package.json │ │ ├── dashdash │ │ │ ├── CHANGES.md │ │ │ ├── LICENSE.txt │ │ │ ├── README.md │ │ │ ├── etc │ │ │ │ └── dashdash.bash_completion.in │ │ │ ├── lib │ │ │ │ └── dashdash.js │ │ │ └── package.json │ │ ├── delayed-stream │ │ │ ├── .npmignore │ │ │ ├── License │ │ │ ├── Makefile │ │ │ ├── Readme.md │ │ │ ├── lib │ │ │ │ └── delayed_stream.js │ │ │ └── package.json │ │ ├── ecc-jsbn │ │ │ ├── .npmignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── LICENSE-jsbn │ │ │ │ ├── ec.js │ │ │ │ └── sec.js │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── extend │ │ │ ├── .eslintrc │ │ │ ├── .jscs.json │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── component.json │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── extsprintf │ │ │ ├── .gitmodules │ │ │ ├── .npmignore │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── Makefile.targ │ │ │ ├── README.md │ │ │ ├── jsl.node.conf │ │ │ ├── lib │ │ │ │ └── extsprintf.js │ │ │ └── package.json │ │ ├── fast-deep-equal │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── fast-json-stable-stringify │ │ │ ├── .eslintrc.yml │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── benchmark │ │ │ │ ├── index.js │ │ │ │ └── test.json │ │ │ ├── example │ │ │ │ ├── key_cmp.js │ │ │ │ ├── nested.js │ │ │ │ ├── str.js │ │ │ │ └── value_cmp.js │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ ├── cmp.js │ │ │ │ ├── nested.js │ │ │ │ ├── str.js │ │ │ │ └── to-json.js │ │ ├── forever-agent │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── form-data │ │ │ ├── License │ │ │ ├── README.md │ │ │ ├── README.md.bak │ │ │ ├── lib │ │ │ │ ├── browser.js │ │ │ │ ├── form_data.js │ │ │ │ └── populate.js │ │ │ └── package.json │ │ ├── getpass │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── lib │ │ │ │ └── index.js │ │ │ └── package.json │ │ ├── har-schema │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── lib │ │ │ │ ├── afterRequest.json │ │ │ │ ├── beforeRequest.json │ │ │ │ ├── browser.json │ │ │ │ ├── cache.json │ │ │ │ ├── content.json │ │ │ │ ├── cookie.json │ │ │ │ ├── creator.json │ │ │ │ ├── entry.json │ │ │ │ ├── har.json │ │ │ │ ├── header.json │ │ │ │ ├── index.js │ │ │ │ ├── log.json │ │ │ │ ├── page.json │ │ │ │ ├── pageTimings.json │ │ │ │ ├── postData.json │ │ │ │ ├── query.json │ │ │ │ ├── request.json │ │ │ │ ├── response.json │ │ │ │ └── timings.json │ │ │ └── package.json │ │ ├── har-validator │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── lib │ │ │ │ ├── async.js │ │ │ │ ├── error.js │ │ │ │ └── promise.js │ │ │ └── package.json │ │ ├── hawk │ │ │ ├── .npmignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── client.js │ │ │ ├── dist │ │ │ │ └── browser.js │ │ │ ├── lib │ │ │ │ ├── browser.js │ │ │ │ ├── client.js │ │ │ │ ├── crypto.js │ │ │ │ ├── index.js │ │ │ │ ├── server.js │ │ │ │ └── utils.js │ │ │ └── package.json │ │ ├── hoek │ │ │ ├── .npmignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── lib │ │ │ │ ├── escape.js │ │ │ │ └── index.js │ │ │ └── package.json │ │ ├── http-signature │ │ │ ├── .dir-locals.el │ │ │ ├── .npmignore │ │ │ ├── CHANGES.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── http_signing.md │ │ │ ├── lib │ │ │ │ ├── index.js │ │ │ │ ├── parser.js │ │ │ │ ├── signer.js │ │ │ │ ├── utils.js │ │ │ │ └── verify.js │ │ │ └── package.json │ │ ├── is-typedarray │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── isstream │ │ │ ├── .jshintrc │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── isstream.js │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── jsbn │ │ │ ├── .npmignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── example.html │ │ │ ├── example.js │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── json-schema-traverse │ │ │ ├── .eslintrc.yml │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── spec │ │ │ │ ├── .eslintrc.yml │ │ │ │ ├── fixtures │ │ │ │ └── schema.js │ │ │ │ └── index.spec.js │ │ ├── json-schema │ │ │ ├── README.md │ │ │ ├── draft-00 │ │ │ │ ├── hyper-schema │ │ │ │ ├── json-ref │ │ │ │ ├── links │ │ │ │ └── schema │ │ │ ├── draft-01 │ │ │ │ ├── hyper-schema │ │ │ │ ├── json-ref │ │ │ │ ├── links │ │ │ │ └── schema │ │ │ ├── draft-02 │ │ │ │ ├── hyper-schema │ │ │ │ ├── json-ref │ │ │ │ ├── links │ │ │ │ └── schema │ │ │ ├── draft-03 │ │ │ │ ├── examples │ │ │ │ │ ├── address │ │ │ │ │ ├── calendar │ │ │ │ │ ├── card │ │ │ │ │ ├── geo │ │ │ │ │ └── interfaces │ │ │ │ ├── hyper-schema │ │ │ │ ├── json-ref │ │ │ │ ├── links │ │ │ │ └── schema │ │ │ ├── draft-04 │ │ │ │ ├── hyper-schema │ │ │ │ ├── links │ │ │ │ └── schema │ │ │ ├── draft-zyp-json-schema-03.xml │ │ │ ├── draft-zyp-json-schema-04.xml │ │ │ ├── lib │ │ │ │ ├── links.js │ │ │ │ └── validate.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ └── tests.js │ │ ├── json-stringify-safe │ │ │ ├── .npmignore │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ ├── stringify.js │ │ │ └── test │ │ │ │ ├── mocha.opts │ │ │ │ └── stringify_test.js │ │ ├── jsprim │ │ │ ├── CHANGES.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── lib │ │ │ │ └── jsprim.js │ │ │ └── package.json │ │ ├── mime-db │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── db.json │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── mime-types │ │ │ ├── HISTORY.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── oauth-sign │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── performance-now │ │ │ ├── .npmignore │ │ │ ├── .tm_properties │ │ │ ├── .travis.yml │ │ │ ├── README.md │ │ │ ├── lib │ │ │ │ ├── performance-now.js │ │ │ │ └── performance-now.js.map │ │ │ ├── license.txt │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── index.d.ts │ │ │ │ └── performance-now.coffee │ │ │ └── test │ │ │ │ ├── mocha.opts │ │ │ │ ├── performance-now.coffee │ │ │ │ ├── scripts.coffee │ │ │ │ └── scripts │ │ │ │ ├── delayed-call.coffee │ │ │ │ ├── delayed-require.coffee │ │ │ │ ├── difference.coffee │ │ │ │ └── initial-value.coffee │ │ ├── punycode │ │ │ ├── LICENSE-MIT.txt │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ └── punycode.js │ │ ├── qs │ │ │ ├── .editorconfig │ │ │ ├── .eslintignore │ │ │ ├── .eslintrc │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── dist │ │ │ │ └── qs.js │ │ │ ├── lib │ │ │ │ ├── formats.js │ │ │ │ ├── index.js │ │ │ │ ├── parse.js │ │ │ │ ├── stringify.js │ │ │ │ └── utils.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ ├── .eslintrc │ │ │ │ ├── index.js │ │ │ │ ├── parse.js │ │ │ │ ├── stringify.js │ │ │ │ └── utils.js │ │ ├── request │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── auth.js │ │ │ │ ├── cookies.js │ │ │ │ ├── getProxyFromURI.js │ │ │ │ ├── har.js │ │ │ │ ├── helpers.js │ │ │ │ ├── multipart.js │ │ │ │ ├── oauth.js │ │ │ │ ├── querystring.js │ │ │ │ ├── redirect.js │ │ │ │ └── tunnel.js │ │ │ ├── package.json │ │ │ └── request.js │ │ ├── safe-buffer │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test.js │ │ ├── sntp │ │ │ ├── .npmignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── lib │ │ │ │ └── index.js │ │ │ └── package.json │ │ ├── sshpk │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── bin │ │ │ │ ├── sshpk-conv │ │ │ │ ├── sshpk-sign │ │ │ │ └── sshpk-verify │ │ │ ├── lib │ │ │ │ ├── algs.js │ │ │ │ ├── certificate.js │ │ │ │ ├── dhe.js │ │ │ │ ├── ed-compat.js │ │ │ │ ├── errors.js │ │ │ │ ├── fingerprint.js │ │ │ │ ├── formats │ │ │ │ │ ├── auto.js │ │ │ │ │ ├── dnssec.js │ │ │ │ │ ├── openssh-cert.js │ │ │ │ │ ├── pem.js │ │ │ │ │ ├── pkcs1.js │ │ │ │ │ ├── pkcs8.js │ │ │ │ │ ├── rfc4253.js │ │ │ │ │ ├── ssh-private.js │ │ │ │ │ ├── ssh.js │ │ │ │ │ ├── x509-pem.js │ │ │ │ │ └── x509.js │ │ │ │ ├── identity.js │ │ │ │ ├── index.js │ │ │ │ ├── key.js │ │ │ │ ├── private-key.js │ │ │ │ ├── signature.js │ │ │ │ ├── ssh-buffer.js │ │ │ │ └── utils.js │ │ │ ├── man │ │ │ │ └── man1 │ │ │ │ │ ├── sshpk-conv.1 │ │ │ │ │ ├── sshpk-sign.1 │ │ │ │ │ └── sshpk-verify.1 │ │ │ └── package.json │ │ ├── stringstream │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE.txt │ │ │ ├── README.md │ │ │ ├── example.js │ │ │ ├── package.json │ │ │ └── stringstream.js │ │ ├── tough-cookie │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── lib │ │ │ │ ├── cookie.js │ │ │ │ ├── memstore.js │ │ │ │ ├── pathMatch.js │ │ │ │ ├── permuteDomain.js │ │ │ │ ├── pubsuffix.js │ │ │ │ └── store.js │ │ │ └── package.json │ │ ├── tunnel-agent │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── tweetnacl │ │ │ ├── .npmignore │ │ │ ├── AUTHORS.md │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ ├── README.md │ │ │ ├── nacl-fast.js │ │ │ ├── nacl-fast.min.js │ │ │ ├── nacl.d.ts │ │ │ ├── nacl.js │ │ │ ├── nacl.min.js │ │ │ └── package.json │ │ ├── uuid │ │ │ ├── .eslintrc.json │ │ │ ├── AUTHORS │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── README_js.md │ │ │ ├── bin │ │ │ │ └── uuid │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── bytesToUuid.js │ │ │ │ ├── md5-browser.js │ │ │ │ ├── md5.js │ │ │ │ ├── rng-browser.js │ │ │ │ ├── rng.js │ │ │ │ ├── sha1-browser.js │ │ │ │ ├── sha1.js │ │ │ │ └── v35.js │ │ │ ├── package.json │ │ │ ├── v1.js │ │ │ ├── v3.js │ │ │ ├── v4.js │ │ │ └── v5.js │ │ └── verror │ │ │ ├── .npmignore │ │ │ ├── CHANGES.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── lib │ │ │ └── verror.js │ │ │ └── package.json │ ├── package-lock.json │ └── package.json └── python │ └── main.py ├── imgs └── photo_2018-04-21_15-29-55.jpg ├── package-lock.json ├── package.json ├── potatso.json ├── server.js └── sqliteScirpt.sql /.gitignore: -------------------------------------------------------------------------------- 1 | config.js 2 | static/ 3 | notifier.js 4 | node_modules 5 | *.crt 6 | *.key 7 | *.db 8 | -------------------------------------------------------------------------------- /examples/curl/main.sh: -------------------------------------------------------------------------------- 1 | curl -d "text=Hello world" -X POST https://tgbot.lbyczf.com/sendMessage/xxx -------------------------------------------------------------------------------- /examples/nodejs/main.js: -------------------------------------------------------------------------------- 1 | const request = require('request') 2 | 3 | const url = 'https://tgbot.lbyczf.com/sendMessage/xxx' 4 | const form = { form: { text: 'Hello world!' } } 5 | 6 | request.post(url, form, (err, resp, body) => { 7 | console.log(resp) 8 | }) -------------------------------------------------------------------------------- /examples/nodejs/node_modules/.bin/sshpk-conv: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../sshpk/bin/sshpk-conv" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../sshpk/bin/sshpk-conv" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/.bin/sshpk-conv.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-conv" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\sshpk\bin\sshpk-conv" %* 7 | ) -------------------------------------------------------------------------------- /examples/nodejs/node_modules/.bin/sshpk-sign: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../sshpk/bin/sshpk-sign" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../sshpk/bin/sshpk-sign" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/.bin/sshpk-sign.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-sign" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\sshpk\bin\sshpk-sign" %* 7 | ) -------------------------------------------------------------------------------- /examples/nodejs/node_modules/.bin/sshpk-verify: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../sshpk/bin/sshpk-verify" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../sshpk/bin/sshpk-verify" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/.bin/sshpk-verify.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-verify" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\sshpk\bin\sshpk-verify" %* 7 | ) -------------------------------------------------------------------------------- /examples/nodejs/node_modules/.bin/uuid: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 3 | 4 | case `uname` in 5 | *CYGWIN*) basedir=`cygpath -w "$basedir"`;; 6 | esac 7 | 8 | if [ -x "$basedir/node" ]; then 9 | "$basedir/node" "$basedir/../uuid/bin/uuid" "$@" 10 | ret=$? 11 | else 12 | node "$basedir/../uuid/bin/uuid" "$@" 13 | ret=$? 14 | fi 15 | exit $ret 16 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/.bin/uuid.cmd: -------------------------------------------------------------------------------- 1 | @IF EXIST "%~dp0\node.exe" ( 2 | "%~dp0\node.exe" "%~dp0\..\uuid\bin\uuid" %* 3 | ) ELSE ( 4 | @SETLOCAL 5 | @SET PATHEXT=%PATHEXT:;.JS;=;% 6 | node "%~dp0\..\uuid\bin\uuid" %* 7 | ) -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/.tonic_example.js: -------------------------------------------------------------------------------- 1 | var Ajv = require('ajv'); 2 | var ajv = new Ajv({allErrors: true}); 3 | 4 | var schema = { 5 | "properties": { 6 | "foo": { "type": "string" }, 7 | "bar": { "type": "number", "maximum": 3 } 8 | } 9 | }; 10 | 11 | var validate = ajv.compile(schema); 12 | 13 | test({"foo": "abc", "bar": 2}); 14 | test({"foo": 2, "bar": 4}); 15 | 16 | function test(data) { 17 | var valid = validate(data); 18 | if (valid) console.log('Valid!'); 19 | else console.log('Invalid: ' + ajv.errorsText(validate.errors)); 20 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Evgeny Poberezkin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/$data.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var KEYWORDS = [ 4 | 'multipleOf', 5 | 'maximum', 6 | 'exclusiveMaximum', 7 | 'minimum', 8 | 'exclusiveMinimum', 9 | 'maxLength', 10 | 'minLength', 11 | 'pattern', 12 | 'additionalItems', 13 | 'maxItems', 14 | 'minItems', 15 | 'uniqueItems', 16 | 'maxProperties', 17 | 'minProperties', 18 | 'required', 19 | 'additionalProperties', 20 | 'enum', 21 | 'format', 22 | 'const' 23 | ]; 24 | 25 | module.exports = function (metaSchema, keywordsJsonPointers) { 26 | for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { 14 | // high surrogate, and there is a next character 15 | value = str.charCodeAt(pos); 16 | if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate 17 | } 18 | } 19 | return length; 20 | }; 21 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/_limitItems.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | {{ var $op = $keyword == 'maxItems' ? '>' : '<'; }} 7 | if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) { 8 | {{ var $errorKeyword = $keyword; }} 9 | {{# def.error:'_limitItems' }} 10 | } {{? $breakOnError }} else { {{?}} 11 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/_limitLength.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | {{ var $op = $keyword == 'maxLength' ? '>' : '<'; }} 7 | if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) { 8 | {{ var $errorKeyword = $keyword; }} 9 | {{# def.error:'_limitLength' }} 10 | } {{? $breakOnError }} else { {{?}} 11 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/_limitProperties.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | {{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }} 7 | if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) { 8 | {{ var $errorKeyword = $keyword; }} 9 | {{# def.error:'_limitProperties' }} 10 | } {{? $breakOnError }} else { {{?}} 11 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/allOf.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.setupNextLevel }} 5 | 6 | {{ 7 | var $currentBaseId = $it.baseId 8 | , $allSchemasEmpty = true; 9 | }} 10 | 11 | {{~ $schema:$sch:$i }} 12 | {{? {{# def.nonEmptySchema:$sch }} }} 13 | {{ 14 | $allSchemasEmpty = false; 15 | $it.schema = $sch; 16 | $it.schemaPath = $schemaPath + '[' + $i + ']'; 17 | $it.errSchemaPath = $errSchemaPath + '/' + $i; 18 | }} 19 | 20 | {{# def.insertSubschemaCode }} 21 | 22 | {{# def.ifResultValid }} 23 | {{?}} 24 | {{~}} 25 | 26 | {{? $breakOnError }} 27 | {{? $allSchemasEmpty }} 28 | if (true) { 29 | {{??}} 30 | {{= $closingBraces.slice(0,-1) }} 31 | {{?}} 32 | {{?}} 33 | 34 | {{# def.cleanUp }} 35 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/anyOf.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.setupNextLevel }} 5 | 6 | {{ 7 | var $noEmptySchema = $schema.every(function($sch) { 8 | return {{# def.nonEmptySchema:$sch }}; 9 | }); 10 | }} 11 | {{? $noEmptySchema }} 12 | {{ var $currentBaseId = $it.baseId; }} 13 | var {{=$errs}} = errors; 14 | var {{=$valid}} = false; 15 | 16 | {{# def.setCompositeRule }} 17 | 18 | {{~ $schema:$sch:$i }} 19 | {{ 20 | $it.schema = $sch; 21 | $it.schemaPath = $schemaPath + '[' + $i + ']'; 22 | $it.errSchemaPath = $errSchemaPath + '/' + $i; 23 | }} 24 | 25 | {{# def.insertSubschemaCode }} 26 | 27 | {{=$valid}} = {{=$valid}} || {{=$nextValid}}; 28 | 29 | if (!{{=$valid}}) { 30 | {{ $closingBraces += '}'; }} 31 | {{~}} 32 | 33 | {{# def.resetCompositeRule }} 34 | 35 | {{= $closingBraces }} 36 | 37 | if (!{{=$valid}}) { 38 | {{# def.extraError:'anyOf' }} 39 | } else { 40 | {{# def.resetErrors }} 41 | {{? it.opts.allErrors }} } {{?}} 42 | 43 | {{# def.cleanUp }} 44 | {{??}} 45 | {{? $breakOnError }} 46 | if (true) { 47 | {{?}} 48 | {{?}} 49 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/const.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | {{? !$isData }} 7 | var schema{{=$lvl}} = validate.schema{{=$schemaPath}}; 8 | {{?}} 9 | var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}}); 10 | {{# def.checkError:'const' }} 11 | {{? $breakOnError }} else { {{?}} 12 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/contains.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.setupNextLevel }} 5 | 6 | 7 | {{ 8 | var $idx = 'i' + $lvl 9 | , $dataNxt = $it.dataLevel = it.dataLevel + 1 10 | , $nextData = 'data' + $dataNxt 11 | , $currentBaseId = it.baseId 12 | , $nonEmptySchema = {{# def.nonEmptySchema:$schema }}; 13 | }} 14 | 15 | var {{=$errs}} = errors; 16 | var {{=$valid}}; 17 | 18 | {{? $nonEmptySchema }} 19 | {{# def.setCompositeRule }} 20 | 21 | {{ 22 | $it.schema = $schema; 23 | $it.schemaPath = $schemaPath; 24 | $it.errSchemaPath = $errSchemaPath; 25 | }} 26 | 27 | var {{=$nextValid}} = false; 28 | 29 | for (var {{=$idx}} = 0; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) { 30 | {{ 31 | $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); 32 | var $passData = $data + '[' + $idx + ']'; 33 | $it.dataPathArr[$dataNxt] = $idx; 34 | }} 35 | 36 | {{# def.generateSubschemaCode }} 37 | {{# def.optimizeValidate }} 38 | 39 | if ({{=$nextValid}}) break; 40 | } 41 | 42 | {{# def.resetCompositeRule }} 43 | {{= $closingBraces }} 44 | 45 | if (!{{=$nextValid}}) { 46 | {{??}} 47 | if ({{=$data}}.length == 0) { 48 | {{?}} 49 | 50 | {{# def.error:'contains' }} 51 | } else { 52 | {{? $nonEmptySchema }} 53 | {{# def.resetErrors }} 54 | {{?}} 55 | {{? it.opts.allErrors }} } {{?}} 56 | 57 | {{# def.cleanUp }} 58 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/defaults.def: -------------------------------------------------------------------------------- 1 | {{## def.assignDefault: 2 | if ({{=$passData}} === undefined) 3 | {{=$passData}} = {{? it.opts.useDefaults == 'shared' }} 4 | {{= it.useDefault($sch.default) }} 5 | {{??}} 6 | {{= JSON.stringify($sch.default) }} 7 | {{?}}; 8 | #}} 9 | 10 | 11 | {{## def.defaultProperties: 12 | {{ 13 | var $schema = it.schema.properties 14 | , $schemaKeys = Object.keys($schema); }} 15 | {{~ $schemaKeys:$propertyKey }} 16 | {{ var $sch = $schema[$propertyKey]; }} 17 | {{? $sch.default !== undefined }} 18 | {{ var $passData = $data + it.util.getProperty($propertyKey); }} 19 | {{# def.assignDefault }} 20 | {{?}} 21 | {{~}} 22 | #}} 23 | 24 | 25 | {{## def.defaultItems: 26 | {{~ it.schema.items:$sch:$i }} 27 | {{? $sch.default !== undefined }} 28 | {{ var $passData = $data + '[' + $i + ']'; }} 29 | {{# def.assignDefault }} 30 | {{?}} 31 | {{~}} 32 | #}} 33 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/enum.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | {{ 7 | var $i = 'i' + $lvl 8 | , $vSchema = 'schema' + $lvl; 9 | }} 10 | 11 | {{? !$isData }} 12 | var {{=$vSchema}} = validate.schema{{=$schemaPath}}; 13 | {{?}} 14 | var {{=$valid}}; 15 | 16 | {{?$isData}}{{# def.check$dataIsArray }}{{?}} 17 | 18 | {{=$valid}} = false; 19 | 20 | for (var {{=$i}}=0; {{=$i}}<{{=$vSchema}}.length; {{=$i}}++) 21 | if (equal({{=$data}}, {{=$vSchema}}[{{=$i}}])) { 22 | {{=$valid}} = true; 23 | break; 24 | } 25 | 26 | {{? $isData }} } {{?}} 27 | 28 | {{# def.checkError:'enum' }} 29 | 30 | {{? $breakOnError }} else { {{?}} 31 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/missing.def: -------------------------------------------------------------------------------- 1 | {{## def.checkMissingProperty:_properties: 2 | {{~ _properties:$propertyKey:$i }} 3 | {{?$i}} || {{?}} 4 | {{ 5 | var $prop = it.util.getProperty($propertyKey) 6 | , $useData = $data + $prop; 7 | }} 8 | ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) ) 9 | {{~}} 10 | #}} 11 | 12 | 13 | {{## def.errorMissingProperty:_error: 14 | {{ 15 | var $propertyPath = 'missing' + $lvl 16 | , $missingProperty = '\' + ' + $propertyPath + ' + \''; 17 | if (it.opts._errorDataPathProperty) { 18 | it.errorPath = it.opts.jsonPointers 19 | ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) 20 | : $currentErrorPath + ' + ' + $propertyPath; 21 | } 22 | }} 23 | {{# def.error:_error }} 24 | #}} 25 | 26 | 27 | {{## def.allErrorsMissingProperty:_error: 28 | {{ 29 | var $prop = it.util.getProperty($propertyKey) 30 | , $missingProperty = it.util.escapeQuotes($propertyKey) 31 | , $useData = $data + $prop; 32 | if (it.opts._errorDataPathProperty) { 33 | it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); 34 | } 35 | }} 36 | if ({{# def.noPropertyInData }}) { 37 | {{# def.addError:_error }} 38 | } 39 | #}} 40 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/multipleOf.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | var division{{=$lvl}}; 7 | if ({{?$isData}} 8 | {{=$schemaValue}} !== undefined && ( 9 | typeof {{=$schemaValue}} != 'number' || 10 | {{?}} 11 | (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}}, 12 | {{? it.opts.multipleOfPrecision }} 13 | Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}} 14 | {{??}} 15 | division{{=$lvl}} !== parseInt(division{{=$lvl}}) 16 | {{?}} 17 | ) 18 | {{?$isData}} ) {{?}} ) { 19 | {{# def.error:'multipleOf' }} 20 | } {{? $breakOnError }} else { {{?}} 21 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/not.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.setupNextLevel }} 5 | 6 | {{? {{# def.nonEmptySchema:$schema }} }} 7 | {{ 8 | $it.schema = $schema; 9 | $it.schemaPath = $schemaPath; 10 | $it.errSchemaPath = $errSchemaPath; 11 | }} 12 | 13 | var {{=$errs}} = errors; 14 | 15 | {{# def.setCompositeRule }} 16 | 17 | {{ 18 | $it.createErrors = false; 19 | var $allErrorsOption; 20 | if ($it.opts.allErrors) { 21 | $allErrorsOption = $it.opts.allErrors; 22 | $it.opts.allErrors = false; 23 | } 24 | }} 25 | {{= it.validate($it) }} 26 | {{ 27 | $it.createErrors = true; 28 | if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; 29 | }} 30 | 31 | {{# def.resetCompositeRule }} 32 | 33 | if ({{=$nextValid}}) { 34 | {{# def.error:'not' }} 35 | } else { 36 | {{# def.resetErrors }} 37 | {{? it.opts.allErrors }} } {{?}} 38 | {{??}} 39 | {{# def.addError:'not' }} 40 | {{? $breakOnError}} 41 | if (false) { 42 | {{?}} 43 | {{?}} 44 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/oneOf.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.setupNextLevel }} 5 | 6 | var {{=$errs}} = errors; 7 | var prevValid{{=$lvl}} = false; 8 | var {{=$valid}} = false; 9 | 10 | {{ var $currentBaseId = $it.baseId; }} 11 | {{# def.setCompositeRule }} 12 | 13 | {{~ $schema:$sch:$i }} 14 | {{? {{# def.nonEmptySchema:$sch }} }} 15 | {{ 16 | $it.schema = $sch; 17 | $it.schemaPath = $schemaPath + '[' + $i + ']'; 18 | $it.errSchemaPath = $errSchemaPath + '/' + $i; 19 | }} 20 | 21 | {{# def.insertSubschemaCode }} 22 | {{??}} 23 | var {{=$nextValid}} = true; 24 | {{?}} 25 | 26 | {{? $i }} 27 | if ({{=$nextValid}} && prevValid{{=$lvl}}) 28 | {{=$valid}} = false; 29 | else { 30 | {{ $closingBraces += '}'; }} 31 | {{?}} 32 | 33 | if ({{=$nextValid}}) {{=$valid}} = prevValid{{=$lvl}} = true; 34 | {{~}} 35 | 36 | {{# def.resetCompositeRule }} 37 | 38 | {{= $closingBraces }} 39 | 40 | if (!{{=$valid}}) { 41 | {{# def.extraError:'oneOf' }} 42 | } else { 43 | {{# def.resetErrors }} 44 | {{? it.opts.allErrors }} } {{?}} 45 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/pattern.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.$data }} 5 | 6 | {{ 7 | var $regexp = $isData 8 | ? '(new RegExp(' + $schemaValue + '))' 9 | : it.usePattern($schema); 10 | }} 11 | 12 | if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) { 13 | {{# def.error:'pattern' }} 14 | } {{? $breakOnError }} else { {{?}} 15 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dot/propertyNames.jst: -------------------------------------------------------------------------------- 1 | {{# def.definitions }} 2 | {{# def.errors }} 3 | {{# def.setupKeyword }} 4 | {{# def.setupNextLevel }} 5 | 6 | {{? {{# def.nonEmptySchema:$schema }} }} 7 | {{ 8 | $it.schema = $schema; 9 | $it.schemaPath = $schemaPath; 10 | $it.errSchemaPath = $errSchemaPath; 11 | }} 12 | 13 | {{ 14 | var $key = 'key' + $lvl 15 | , $idx = 'idx' + $lvl 16 | , $i = 'i' + $lvl 17 | , $invalidName = '\' + ' + $key + ' + \'' 18 | , $dataNxt = $it.dataLevel = it.dataLevel + 1 19 | , $nextData = 'data' + $dataNxt 20 | , $dataProperties = 'dataProperties' + $lvl 21 | , $ownProperties = it.opts.ownProperties 22 | , $currentBaseId = it.baseId; 23 | }} 24 | 25 | var {{=$errs}} = errors; 26 | 27 | {{? $ownProperties }} 28 | var {{=$dataProperties}} = undefined; 29 | {{?}} 30 | {{# def.iterateProperties }} 31 | var startErrs{{=$lvl}} = errors; 32 | 33 | {{ var $passData = $key; }} 34 | {{# def.setCompositeRule }} 35 | {{# def.generateSubschemaCode }} 36 | {{# def.optimizeValidate }} 37 | {{# def.resetCompositeRule }} 38 | 39 | if (!{{=$nextValid}}) { 40 | for (var {{=$i}}=startErrs{{=$lvl}}; {{=$i}} 1) { 19 | var i = {{=$data}}.length, j; 20 | outer: 21 | for (;i--;) { 22 | for (j = i; j--;) { 23 | if (equal({{=$data}}[i], {{=$data}}[j])) { 24 | {{=$valid}} = false; 25 | break outer; 26 | } 27 | } 28 | } 29 | } 30 | 31 | {{? $isData }} } {{?}} 32 | 33 | if (!{{=$valid}}) { 34 | {{# def.error:'uniqueItems' }} 35 | } {{? $breakOnError }} else { {{?}} 36 | {{??}} 37 | {{? $breakOnError }} if (true) { {{?}} 38 | {{?}} 39 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dotjs/README.md: -------------------------------------------------------------------------------- 1 | These files are compiled dot templates from dot folder. 2 | 3 | Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder. 4 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/dotjs/allOf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = function generate_allOf(it, $keyword, $ruleType) { 3 | var out = ' '; 4 | var $schema = it.schema[$keyword]; 5 | var $schemaPath = it.schemaPath + it.util.getProperty($keyword); 6 | var $errSchemaPath = it.errSchemaPath + '/' + $keyword; 7 | var $breakOnError = !it.opts.allErrors; 8 | var $it = it.util.copy(it); 9 | var $closingBraces = ''; 10 | $it.level++; 11 | var $nextValid = 'valid' + $it.level; 12 | var $currentBaseId = $it.baseId, 13 | $allSchemasEmpty = true; 14 | var arr1 = $schema; 15 | if (arr1) { 16 | var $sch, $i = -1, 17 | l1 = arr1.length - 1; 18 | while ($i < l1) { 19 | $sch = arr1[$i += 1]; 20 | if (it.util.schemaHasRules($sch, it.RULES.all)) { 21 | $allSchemasEmpty = false; 22 | $it.schema = $sch; 23 | $it.schemaPath = $schemaPath + '[' + $i + ']'; 24 | $it.errSchemaPath = $errSchemaPath + '/' + $i; 25 | out += ' ' + (it.validate($it)) + ' '; 26 | $it.baseId = $currentBaseId; 27 | if ($breakOnError) { 28 | out += ' if (' + ($nextValid) + ') { '; 29 | $closingBraces += '}'; 30 | } 31 | } 32 | } 33 | } 34 | if ($breakOnError) { 35 | if ($allSchemasEmpty) { 36 | out += ' if (true) { '; 37 | } else { 38 | out += ' ' + ($closingBraces.slice(0, -1)) + ' '; 39 | } 40 | } 41 | out = it.util.cleanUpCode(out); 42 | return out; 43 | } 44 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/patternGroups.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema'; 4 | 5 | module.exports = function (ajv) { 6 | var defaultMeta = ajv._opts.defaultMeta; 7 | var metaSchemaRef = typeof defaultMeta == 'string' 8 | ? { $ref: defaultMeta } 9 | : ajv.getSchema(META_SCHEMA_ID) 10 | ? { $ref: META_SCHEMA_ID } 11 | : {}; 12 | 13 | ajv.addKeyword('patternGroups', { 14 | // implemented in properties.jst 15 | metaSchema: { 16 | type: 'object', 17 | additionalProperties: { 18 | type: 'object', 19 | required: [ 'schema' ], 20 | properties: { 21 | maximum: { 22 | type: 'integer', 23 | minimum: 0 24 | }, 25 | minimum: { 26 | type: 'integer', 27 | minimum: 0 28 | }, 29 | schema: metaSchemaRef 30 | }, 31 | additionalProperties: false 32 | } 33 | } 34 | }); 35 | ajv.RULES.all.properties.implements.push('patternGroups'); 36 | }; 37 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/lib/refs/$data.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-06/schema#", 3 | "$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#", 4 | "description": "Meta-schema for $data reference (JSON-schema extension proposal)", 5 | "type": "object", 6 | "required": [ "$data" ], 7 | "properties": { 8 | "$data": { 9 | "type": "string", 10 | "anyOf": [ 11 | { "format": "relative-json-pointer" }, 12 | { "format": "json-pointer" } 13 | ] 14 | } 15 | }, 16 | "additionalProperties": false 17 | } 18 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/scripts/.eslintrc.yml: -------------------------------------------------------------------------------- 1 | rules: 2 | no-console: 0 3 | no-empty: [2, allowEmptyCatch: true] 4 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/scripts/info: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | var fs = require('fs'); 6 | var name = process.argv[2] || '.'; 7 | var property = process.argv[3] || 'version'; 8 | if (name != '.') name = 'node_modules/' + name; 9 | var json = JSON.parse(fs.readFileSync(name + '/package.json', 'utf8')); 10 | console.log(json[property]); 11 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/scripts/prepare-tests: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | set -e 4 | 5 | mkdir -p .browser 6 | 7 | find spec -type f -name '*.spec.js' | \ 8 | xargs -I {} sh -c \ 9 | 'export f="{}"; browserify $f -t require-globify -t brfs -x ajv -u buffer -o $(echo $f | sed -e "s/spec/.browser/");' 10 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ajv/scripts/travis-gh-pages: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then 6 | git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '\.md$|^LICENSE$|travis-gh-pages$' && { 7 | rm -rf ../gh-pages 8 | git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/epoberezkin/ajv.git ../gh-pages 9 | mkdir -p ../gh-pages/_source 10 | cp *.md ../gh-pages/_source 11 | cp LICENSE ../gh-pages/_source 12 | currentDir=$(pwd) 13 | cd ../gh-pages 14 | $currentDir/node_modules/.bin/gh-pages-generator 15 | # remove logo from README 16 | sed -i -E "s/]+ajv_logo[^>]+>//" index.md 17 | git config user.email "$GIT_USER_EMAIL" 18 | git config user.name "$GIT_USER_NAME" 19 | git add . 20 | git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER" 21 | git push --quiet origin gh-pages > /dev/null 2>&1 22 | } 23 | fi 24 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asn1/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log 3 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asn1/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - 0.10 5 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asn1/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Mark Cavage, All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE 20 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asn1/README.md: -------------------------------------------------------------------------------- 1 | node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS. 2 | Currently BER encoding is supported; at some point I'll likely have to do DER. 3 | 4 | ## Usage 5 | 6 | Mostly, if you're *actually* needing to read and write ASN.1, you probably don't 7 | need this readme to explain what and why. If you have no idea what ASN.1 is, 8 | see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc 9 | 10 | The source is pretty much self-explanatory, and has read/write methods for the 11 | common types out there. 12 | 13 | ### Decoding 14 | 15 | The following reads an ASN.1 sequence with a boolean. 16 | 17 | var Ber = require('asn1').Ber; 18 | 19 | var reader = new Ber.Reader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff])); 20 | 21 | reader.readSequence(); 22 | console.log('Sequence len: ' + reader.length); 23 | if (reader.peek() === Ber.Boolean) 24 | console.log(reader.readBoolean()); 25 | 26 | ### Encoding 27 | 28 | The following generates the same payload as above. 29 | 30 | var Ber = require('asn1').Ber; 31 | 32 | var writer = new Ber.Writer(); 33 | 34 | writer.startSequence(); 35 | writer.writeBoolean(true); 36 | writer.endSequence(); 37 | 38 | console.log(writer.buffer); 39 | 40 | ## Installation 41 | 42 | npm install asn1 43 | 44 | ## License 45 | 46 | MIT. 47 | 48 | ## Bugs 49 | 50 | See . 51 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asn1/lib/ber/errors.js: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Mark Cavage All rights reserved. 2 | 3 | 4 | module.exports = { 5 | 6 | newInvalidAsn1Error: function(msg) { 7 | var e = new Error(); 8 | e.name = 'InvalidAsn1Error'; 9 | e.message = msg || ''; 10 | return e; 11 | } 12 | 13 | }; 14 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asn1/lib/ber/index.js: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Mark Cavage All rights reserved. 2 | 3 | var errors = require('./errors'); 4 | var types = require('./types'); 5 | 6 | var Reader = require('./reader'); 7 | var Writer = require('./writer'); 8 | 9 | 10 | ///--- Exports 11 | 12 | module.exports = { 13 | 14 | Reader: Reader, 15 | 16 | Writer: Writer 17 | 18 | }; 19 | 20 | for (var t in types) { 21 | if (types.hasOwnProperty(t)) 22 | module.exports[t] = types[t]; 23 | } 24 | for (var e in errors) { 25 | if (errors.hasOwnProperty(e)) 26 | module.exports[e] = errors[e]; 27 | } 28 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asn1/lib/ber/types.js: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Mark Cavage All rights reserved. 2 | 3 | 4 | module.exports = { 5 | EOC: 0, 6 | Boolean: 1, 7 | Integer: 2, 8 | BitString: 3, 9 | OctetString: 4, 10 | Null: 5, 11 | OID: 6, 12 | ObjectDescriptor: 7, 13 | External: 8, 14 | Real: 9, // float 15 | Enumeration: 10, 16 | PDV: 11, 17 | Utf8String: 12, 18 | RelativeOID: 13, 19 | Sequence: 16, 20 | Set: 17, 21 | NumericString: 18, 22 | PrintableString: 19, 23 | T61String: 20, 24 | VideotexString: 21, 25 | IA5String: 22, 26 | UTCTime: 23, 27 | GeneralizedTime: 24, 28 | GraphicString: 25, 29 | VisibleString: 26, 30 | GeneralString: 28, 31 | UniversalString: 29, 32 | CharacterString: 30, 33 | BMPString: 31, 34 | Constructor: 32, 35 | Context: 128 36 | }; 37 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asn1/lib/index.js: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Mark Cavage All rights reserved. 2 | 3 | // If you have no idea what ASN.1 or BER is, see this: 4 | // ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc 5 | 6 | var Ber = require('./ber/index'); 7 | 8 | 9 | 10 | ///--- Exported API 11 | 12 | module.exports = { 13 | 14 | Ber: Ber, 15 | 16 | BerReader: Ber.Reader, 17 | 18 | BerWriter: Ber.Writer 19 | 20 | }; 21 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/assert-plus/AUTHORS: -------------------------------------------------------------------------------- 1 | Dave Eddy 2 | Fred Kuo 3 | Lars-Magnus Skog 4 | Mark Cavage 5 | Patrick Mooney 6 | Rob Gulewich 7 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/assert-plus/CHANGES.md: -------------------------------------------------------------------------------- 1 | # assert-plus Changelog 2 | 3 | ## 1.0.0 4 | 5 | - *BREAKING* assert.number (and derivatives) now accept Infinity as valid input 6 | - Add assert.finite check. Previous assert.number callers should use this if 7 | they expect Infinity inputs to throw. 8 | 9 | ## 0.2.0 10 | 11 | - Fix `assert.object(null)` so it throws 12 | - Fix optional/arrayOf exports for non-type-of asserts 13 | - Add optiona/arrayOf exports for Stream/Date/Regex/uuid 14 | - Add basic unit test coverage 15 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asynckit/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Alex Indigo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asynckit/bench.js: -------------------------------------------------------------------------------- 1 | /* eslint no-console: "off" */ 2 | 3 | var asynckit = require('./') 4 | , async = require('async') 5 | , assert = require('assert') 6 | , expected = 0 7 | ; 8 | 9 | var Benchmark = require('benchmark'); 10 | var suite = new Benchmark.Suite; 11 | 12 | var source = []; 13 | for (var z = 1; z < 100; z++) 14 | { 15 | source.push(z); 16 | expected += z; 17 | } 18 | 19 | suite 20 | // add tests 21 | 22 | .add('async.map', function(deferred) 23 | { 24 | var total = 0; 25 | 26 | async.map(source, 27 | function(i, cb) 28 | { 29 | setImmediate(function() 30 | { 31 | total += i; 32 | cb(null, total); 33 | }); 34 | }, 35 | function(err, result) 36 | { 37 | assert.ifError(err); 38 | assert.equal(result[result.length - 1], expected); 39 | deferred.resolve(); 40 | }); 41 | }, {'defer': true}) 42 | 43 | 44 | .add('asynckit.parallel', function(deferred) 45 | { 46 | var total = 0; 47 | 48 | asynckit.parallel(source, 49 | function(i, cb) 50 | { 51 | setImmediate(function() 52 | { 53 | total += i; 54 | cb(null, total); 55 | }); 56 | }, 57 | function(err, result) 58 | { 59 | assert.ifError(err); 60 | assert.equal(result[result.length - 1], expected); 61 | deferred.resolve(); 62 | }); 63 | }, {'defer': true}) 64 | 65 | 66 | // add listeners 67 | .on('cycle', function(ev) 68 | { 69 | console.log(String(ev.target)); 70 | }) 71 | .on('complete', function() 72 | { 73 | console.log('Fastest is ' + this.filter('fastest').map('name')); 74 | }) 75 | // run async 76 | .run({ 'async': true }); 77 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asynckit/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 2 | { 3 | parallel : require('./parallel.js'), 4 | serial : require('./serial.js'), 5 | serialOrdered : require('./serialOrdered.js') 6 | }; 7 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asynckit/lib/abort.js: -------------------------------------------------------------------------------- 1 | // API 2 | module.exports = abort; 3 | 4 | /** 5 | * Aborts leftover active jobs 6 | * 7 | * @param {object} state - current state object 8 | */ 9 | function abort(state) 10 | { 11 | Object.keys(state.jobs).forEach(clean.bind(state)); 12 | 13 | // reset leftover jobs 14 | state.jobs = {}; 15 | } 16 | 17 | /** 18 | * Cleans up leftover job by invoking abort function for the provided job id 19 | * 20 | * @this state 21 | * @param {string|number} key - job id to abort 22 | */ 23 | function clean(key) 24 | { 25 | if (typeof this.jobs[key] == 'function') 26 | { 27 | this.jobs[key](); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asynckit/lib/async.js: -------------------------------------------------------------------------------- 1 | var defer = require('./defer.js'); 2 | 3 | // API 4 | module.exports = async; 5 | 6 | /** 7 | * Runs provided callback asynchronously 8 | * even if callback itself is not 9 | * 10 | * @param {function} callback - callback to invoke 11 | * @returns {function} - augmented callback 12 | */ 13 | function async(callback) 14 | { 15 | var isAsync = false; 16 | 17 | // check if async happened 18 | defer(function() { isAsync = true; }); 19 | 20 | return function async_callback(err, result) 21 | { 22 | if (isAsync) 23 | { 24 | callback(err, result); 25 | } 26 | else 27 | { 28 | defer(function nextTick_callback() 29 | { 30 | callback(err, result); 31 | }); 32 | } 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asynckit/lib/defer.js: -------------------------------------------------------------------------------- 1 | module.exports = defer; 2 | 3 | /** 4 | * Runs provided function on next iteration of the event loop 5 | * 6 | * @param {function} fn - function to run 7 | */ 8 | function defer(fn) 9 | { 10 | var nextTick = typeof setImmediate == 'function' 11 | ? setImmediate 12 | : ( 13 | typeof process == 'object' && typeof process.nextTick == 'function' 14 | ? process.nextTick 15 | : null 16 | ); 17 | 18 | if (nextTick) 19 | { 20 | nextTick(fn); 21 | } 22 | else 23 | { 24 | setTimeout(fn, 0); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asynckit/lib/readable_parallel.js: -------------------------------------------------------------------------------- 1 | var parallel = require('../parallel.js'); 2 | 3 | // API 4 | module.exports = ReadableParallel; 5 | 6 | /** 7 | * Streaming wrapper to `asynckit.parallel` 8 | * 9 | * @param {array|object} list - array or object (named list) to iterate over 10 | * @param {function} iterator - iterator to run 11 | * @param {function} callback - invoked when all elements processed 12 | * @returns {stream.Readable#} 13 | */ 14 | function ReadableParallel(list, iterator, callback) 15 | { 16 | if (!(this instanceof ReadableParallel)) 17 | { 18 | return new ReadableParallel(list, iterator, callback); 19 | } 20 | 21 | // turn on object mode 22 | ReadableParallel.super_.call(this, {objectMode: true}); 23 | 24 | this._start(parallel, list, iterator, callback); 25 | } 26 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asynckit/lib/readable_serial.js: -------------------------------------------------------------------------------- 1 | var serial = require('../serial.js'); 2 | 3 | // API 4 | module.exports = ReadableSerial; 5 | 6 | /** 7 | * Streaming wrapper to `asynckit.serial` 8 | * 9 | * @param {array|object} list - array or object (named list) to iterate over 10 | * @param {function} iterator - iterator to run 11 | * @param {function} callback - invoked when all elements processed 12 | * @returns {stream.Readable#} 13 | */ 14 | function ReadableSerial(list, iterator, callback) 15 | { 16 | if (!(this instanceof ReadableSerial)) 17 | { 18 | return new ReadableSerial(list, iterator, callback); 19 | } 20 | 21 | // turn on object mode 22 | ReadableSerial.super_.call(this, {objectMode: true}); 23 | 24 | this._start(serial, list, iterator, callback); 25 | } 26 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asynckit/lib/readable_serial_ordered.js: -------------------------------------------------------------------------------- 1 | var serialOrdered = require('../serialOrdered.js'); 2 | 3 | // API 4 | module.exports = ReadableSerialOrdered; 5 | // expose sort helpers 6 | module.exports.ascending = serialOrdered.ascending; 7 | module.exports.descending = serialOrdered.descending; 8 | 9 | /** 10 | * Streaming wrapper to `asynckit.serialOrdered` 11 | * 12 | * @param {array|object} list - array or object (named list) to iterate over 13 | * @param {function} iterator - iterator to run 14 | * @param {function} sortMethod - custom sort function 15 | * @param {function} callback - invoked when all elements processed 16 | * @returns {stream.Readable#} 17 | */ 18 | function ReadableSerialOrdered(list, iterator, sortMethod, callback) 19 | { 20 | if (!(this instanceof ReadableSerialOrdered)) 21 | { 22 | return new ReadableSerialOrdered(list, iterator, sortMethod, callback); 23 | } 24 | 25 | // turn on object mode 26 | ReadableSerialOrdered.super_.call(this, {objectMode: true}); 27 | 28 | this._start(serialOrdered, list, iterator, sortMethod, callback); 29 | } 30 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asynckit/lib/state.js: -------------------------------------------------------------------------------- 1 | // API 2 | module.exports = state; 3 | 4 | /** 5 | * Creates initial state object 6 | * for iteration over list 7 | * 8 | * @param {array|object} list - list to iterate over 9 | * @param {function|null} sortMethod - function to use for keys sort, 10 | * or `null` to keep them as is 11 | * @returns {object} - initial state object 12 | */ 13 | function state(list, sortMethod) 14 | { 15 | var isNamedList = !Array.isArray(list) 16 | , initState = 17 | { 18 | index : 0, 19 | keyedList: isNamedList || sortMethod ? Object.keys(list) : null, 20 | jobs : {}, 21 | results : isNamedList ? {} : [], 22 | size : isNamedList ? Object.keys(list).length : list.length 23 | } 24 | ; 25 | 26 | if (sortMethod) 27 | { 28 | // sort array keys based on it's values 29 | // sort object's keys just on own merit 30 | initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) 31 | { 32 | return sortMethod(list[a], list[b]); 33 | }); 34 | } 35 | 36 | return initState; 37 | } 38 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asynckit/lib/terminator.js: -------------------------------------------------------------------------------- 1 | var abort = require('./abort.js') 2 | , async = require('./async.js') 3 | ; 4 | 5 | // API 6 | module.exports = terminator; 7 | 8 | /** 9 | * Terminates jobs in the attached state context 10 | * 11 | * @this AsyncKitState# 12 | * @param {function} callback - final callback to invoke after termination 13 | */ 14 | function terminator(callback) 15 | { 16 | if (!Object.keys(this.jobs).length) 17 | { 18 | return; 19 | } 20 | 21 | // fast forward iteration index 22 | this.index = this.size; 23 | 24 | // abort jobs 25 | abort(this); 26 | 27 | // send back results we have so far 28 | async(callback)(null, this.results); 29 | } 30 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asynckit/parallel.js: -------------------------------------------------------------------------------- 1 | var iterate = require('./lib/iterate.js') 2 | , initState = require('./lib/state.js') 3 | , terminator = require('./lib/terminator.js') 4 | ; 5 | 6 | // Public API 7 | module.exports = parallel; 8 | 9 | /** 10 | * Runs iterator over provided array elements in parallel 11 | * 12 | * @param {array|object} list - array or object (named list) to iterate over 13 | * @param {function} iterator - iterator to run 14 | * @param {function} callback - invoked when all elements processed 15 | * @returns {function} - jobs terminator 16 | */ 17 | function parallel(list, iterator, callback) 18 | { 19 | var state = initState(list); 20 | 21 | while (state.index < (state['keyedList'] || list).length) 22 | { 23 | iterate(list, iterator, state, function(error, result) 24 | { 25 | if (error) 26 | { 27 | callback(error, result); 28 | return; 29 | } 30 | 31 | // looks like it's the last one 32 | if (Object.keys(state.jobs).length === 0) 33 | { 34 | callback(null, state.results); 35 | return; 36 | } 37 | }); 38 | 39 | state.index++; 40 | } 41 | 42 | return terminator.bind(state, callback); 43 | } 44 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asynckit/serial.js: -------------------------------------------------------------------------------- 1 | var serialOrdered = require('./serialOrdered.js'); 2 | 3 | // Public API 4 | module.exports = serial; 5 | 6 | /** 7 | * Runs iterator over provided array elements in series 8 | * 9 | * @param {array|object} list - array or object (named list) to iterate over 10 | * @param {function} iterator - iterator to run 11 | * @param {function} callback - invoked when all elements processed 12 | * @returns {function} - jobs terminator 13 | */ 14 | function serial(list, iterator, callback) 15 | { 16 | return serialOrdered(list, iterator, null, callback); 17 | } 18 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/asynckit/stream.js: -------------------------------------------------------------------------------- 1 | var inherits = require('util').inherits 2 | , Readable = require('stream').Readable 3 | , ReadableAsyncKit = require('./lib/readable_asynckit.js') 4 | , ReadableParallel = require('./lib/readable_parallel.js') 5 | , ReadableSerial = require('./lib/readable_serial.js') 6 | , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') 7 | ; 8 | 9 | // API 10 | module.exports = 11 | { 12 | parallel : ReadableParallel, 13 | serial : ReadableSerial, 14 | serialOrdered : ReadableSerialOrdered, 15 | }; 16 | 17 | inherits(ReadableAsyncKit, Readable); 18 | 19 | inherits(ReadableParallel, ReadableAsyncKit); 20 | inherits(ReadableSerial, ReadableAsyncKit); 21 | inherits(ReadableSerialOrdered, ReadableAsyncKit); 22 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/aws-sign2/README.md: -------------------------------------------------------------------------------- 1 | aws-sign 2 | ======== 3 | 4 | AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module. 5 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/aws4/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | - "0.12" 5 | - "4.2" 6 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/aws4/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2013 Michael Hart (michael.hart.au@gmail.com) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/bcrypt-pbkdf/README.md: -------------------------------------------------------------------------------- 1 | Port of the OpenBSD `bcrypt_pbkdf` function to pure Javascript. `npm`-ified 2 | version of [Devi Mandiri's port] 3 | (https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js), 4 | with some minor performance improvements. The code is copied verbatim (and 5 | un-styled) from Devi's work. 6 | 7 | This product includes software developed by Niels Provos. 8 | 9 | ## API 10 | 11 | ### `bcrypt_pbkdf.pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)` 12 | 13 | Derive a cryptographic key of arbitrary length from a given password and salt, 14 | using the OpenBSD `bcrypt_pbkdf` function. This is a combination of Blowfish and 15 | SHA-512. 16 | 17 | See [this article](http://www.tedunangst.com/flak/post/bcrypt-pbkdf) for 18 | further information. 19 | 20 | Parameters: 21 | 22 | * `pass`, a Uint8Array of length `passlen` 23 | * `passlen`, an integer Number 24 | * `salt`, a Uint8Array of length `saltlen` 25 | * `saltlen`, an integer Number 26 | * `key`, a Uint8Array of length `keylen`, will be filled with output 27 | * `keylen`, an integer Number 28 | * `rounds`, an integer Number, number of rounds of the PBKDF to run 29 | 30 | ### `bcrypt_pbkdf.hash(sha2pass, sha2salt, out)` 31 | 32 | Calculate a Blowfish hash, given SHA2-512 output of a password and salt. Used as 33 | part of the inner round function in the PBKDF. 34 | 35 | Parameters: 36 | 37 | * `sha2pass`, a Uint8Array of length 64 38 | * `sha2salt`, a Uint8Array of length 64 39 | * `out`, a Uint8Array of length 32, will be filled with output 40 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/bcrypt-pbkdf/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "bcrypt-pbkdf@^1.0.0", 3 | "_id": "bcrypt-pbkdf@1.0.1", 4 | "_inBundle": false, 5 | "_integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", 6 | "_location": "/bcrypt-pbkdf", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "range", 10 | "registry": true, 11 | "raw": "bcrypt-pbkdf@^1.0.0", 12 | "name": "bcrypt-pbkdf", 13 | "escapedName": "bcrypt-pbkdf", 14 | "rawSpec": "^1.0.0", 15 | "saveSpec": null, 16 | "fetchSpec": "^1.0.0" 17 | }, 18 | "_requiredBy": [ 19 | "/sshpk" 20 | ], 21 | "_resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", 22 | "_shasum": "63bc5dcb61331b92bc05fd528953c33462a06f8d", 23 | "_spec": "bcrypt-pbkdf@^1.0.0", 24 | "_where": "C:\\Users\\czf\\Documents\\GitHub\\tg_push_bot\\examples\\nodejs\\node_modules\\sshpk", 25 | "bundleDependencies": false, 26 | "dependencies": { 27 | "tweetnacl": "^0.14.3" 28 | }, 29 | "deprecated": false, 30 | "description": "Port of the OpenBSD bcrypt_pbkdf function to pure JS", 31 | "devDependencies": {}, 32 | "license": "BSD-3-Clause", 33 | "main": "index.js", 34 | "name": "bcrypt-pbkdf", 35 | "version": "1.0.1" 36 | } 37 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/caseless/README.md: -------------------------------------------------------------------------------- 1 | ## Caseless -- wrap an object to set and get property with caseless semantics but also preserve caseing. 2 | 3 | This library is incredibly useful when working with HTTP headers. It allows you to get/set/check for headers in a caseless manner while also preserving the caseing of headers the first time they are set. 4 | 5 | ## Usage 6 | 7 | ```javascript 8 | var headers = {} 9 | , c = caseless(headers) 10 | ; 11 | c.set('a-Header', 'asdf') 12 | c.get('a-header') === 'asdf' 13 | ``` 14 | 15 | ## has(key) 16 | 17 | Has takes a name and if it finds a matching header will return that header name with the preserved caseing it was set with. 18 | 19 | ```javascript 20 | c.has('a-header') === 'a-Header' 21 | ``` 22 | 23 | ## set(key, value[, clobber=true]) 24 | 25 | Set is fairly straight forward except that if the header exists and clobber is disabled it will add `','+value` to the existing header. 26 | 27 | ```javascript 28 | c.set('a-Header', 'fdas') 29 | c.set('a-HEADER', 'more', false) 30 | c.get('a-header') === 'fdsa,more' 31 | ``` 32 | 33 | ## swap(key) 34 | 35 | Swaps the casing of a header with the new one that is passed in. 36 | 37 | ```javascript 38 | var headers = {} 39 | , c = caseless(headers) 40 | ; 41 | c.set('a-Header', 'fdas') 42 | c.swap('a-HEADER') 43 | c.has('a-header') === 'a-HEADER' 44 | headers === {'a-HEADER': 'fdas'} 45 | ``` 46 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/co/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca> 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/combined-stream/License: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Debuggable Limited 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/combined-stream/lib/defer.js: -------------------------------------------------------------------------------- 1 | module.exports = defer; 2 | 3 | /** 4 | * Runs provided function on next iteration of the event loop 5 | * 6 | * @param {function} fn - function to run 7 | */ 8 | function defer(fn) 9 | { 10 | var nextTick = typeof setImmediate == 'function' 11 | ? setImmediate 12 | : ( 13 | typeof process == 'object' && typeof process.nextTick == 'function' 14 | ? process.nextTick 15 | : null 16 | ); 17 | 18 | if (nextTick) 19 | { 20 | nextTick(fn); 21 | } 22 | else 23 | { 24 | setTimeout(fn, 0); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/core-util-is/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Node.js contributors. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to 5 | deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7 | sell copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/core-util-is/README.md: -------------------------------------------------------------------------------- 1 | # core-util-is 2 | 3 | The `util.is*` functions introduced in Node v0.12. 4 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/cryptiles/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !lib/** 3 | !.npmignore 4 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/cryptiles/README.md: -------------------------------------------------------------------------------- 1 | cryptiles 2 | ========= 3 | 4 | General purpose crypto utilities 5 | 6 | [![Build Status](https://secure.travis-ci.org/hapijs/cryptiles.png)](http://travis-ci.org/hapijs/cryptiles) 7 | 8 | Lead Maintainer - [C J Silverio](https://github.com/ceejbot) 9 | 10 | ## Methods 11 | 12 | ### `randomString( size)` 13 | Returns a cryptographically strong pseudo-random data string. Takes a size argument for the length of the string. 14 | 15 | ### `randomDigits( size)` 16 | Returns a cryptographically strong pseudo-random data string consisting of only numerical digits (0-9). Takes a size argument for the length of the string. 17 | 18 | ### `fixedTimeComparison( a, b)` 19 | Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match). Returns `true` if the strings match, `false` if they differ. 20 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/dashdash/LICENSE.txt: -------------------------------------------------------------------------------- 1 | # This is the MIT license 2 | 3 | Copyright (c) 2013 Trent Mick. All rights reserved. 4 | Copyright (c) 2013 Joyent Inc. All rights reserved. 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a 7 | copy of this software and associated documentation files (the 8 | "Software"), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included 15 | in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 18 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/delayed-stream/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/delayed-stream/License: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Debuggable Limited 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/delayed-stream/Makefile: -------------------------------------------------------------------------------- 1 | SHELL := /bin/bash 2 | 3 | test: 4 | @./test/run.js 5 | 6 | .PHONY: test 7 | 8 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ecc-jsbn/.npmignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | 10 | pids 11 | logs 12 | results 13 | 14 | npm-debug.log 15 | node_modules 16 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ecc-jsbn/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Jeremie Miller 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ecc-jsbn/README.md: -------------------------------------------------------------------------------- 1 | ecc-jsbn 2 | ======== 3 | 4 | ECC package based on [jsbn](https://github.com/andyperlitch/jsbn) from [Tom Wu](http://www-cs-students.stanford.edu/~tjw/). 5 | 6 | This is a subset of the same interface as the [node compiled module](https://github.com/quartzjer/ecc), but works in the browser too. 7 | 8 | Also uses point compression now from [https://github.com/kaielvin](https://github.com/kaielvin/jsbn-ec-point-compression). 9 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/ecc-jsbn/test.js: -------------------------------------------------------------------------------- 1 | var ecc = require("./index.js"); 2 | var key1 = new ecc.ECKey(ecc.ECCurves.secp160r1); 3 | var key2 = new ecc.ECKey(ecc.ECCurves.secp160r1); 4 | console.log(key1.deriveSharedSecret(key2)); 5 | var key3 = new ecc.ECKey(ecc.ECCurves.secp160r1,key1.PrivateKey); 6 | var key4 = new ecc.ECKey(ecc.ECCurves.secp160r1,key2.PublicKey,true); 7 | console.log(key3.deriveSharedSecret(key4)); 8 | 9 | var key1 = new ecc.ECKey(ecc.ECCurves.secp256r1); 10 | var key2 = new ecc.ECKey(ecc.ECCurves.secp256r1); 11 | console.log(key1.deriveSharedSecret(key2)); 12 | var key3 = new ecc.ECKey(ecc.ECCurves.secp256r1,key1.PrivateKey); 13 | var key4 = new ecc.ECKey(ecc.ECCurves.secp256r1,key2.PublicKey,true); 14 | console.log(key3.deriveSharedSecret(key4)); 15 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/extend/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "@ljharb", 5 | 6 | "rules": { 7 | "complexity": [2, 15], 8 | "eqeqeq": [2, "allow-null"], 9 | "func-name-matching": [1], 10 | "max-depth": [1, 4], 11 | "max-statements": [2, 26], 12 | "no-extra-parens": [1], 13 | "no-magic-numbers": [0], 14 | "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"], 15 | "sort-keys": [0], 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/extend/.npmignore: -------------------------------------------------------------------------------- 1 | test -------------------------------------------------------------------------------- /examples/nodejs/node_modules/extend/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Stefan Thomas 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/extend/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extend", 3 | "author": "Stefan Thomas (http://www.justmoon.net)", 4 | "version": "3.0.0", 5 | "description": "Port of jQuery.extend for node.js and the browser.", 6 | "scripts": [ 7 | "index.js" 8 | ], 9 | "contributors": [ 10 | { 11 | "name": "Jordan Harband", 12 | "url": "https://github.com/ljharb" 13 | } 14 | ], 15 | "keywords": [ 16 | "extend", 17 | "clone", 18 | "merge" 19 | ], 20 | "repository" : { 21 | "type": "git", 22 | "url": "https://github.com/justmoon/node-extend.git" 23 | }, 24 | "dependencies": { 25 | }, 26 | "devDependencies": { 27 | "tape" : "~3.0.0", 28 | "covert": "~0.4.0", 29 | "jscs": "~1.6.2" 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/extsprintf/.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fndroid/tg_push_bot/dba0dde8f97ea902a2aa9aa4cdb568682242f721/examples/nodejs/node_modules/extsprintf/.gitmodules -------------------------------------------------------------------------------- /examples/nodejs/node_modules/extsprintf/.npmignore: -------------------------------------------------------------------------------- 1 | /deps 2 | /examples 3 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/extsprintf/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, Joyent, Inc. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE 20 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/extsprintf/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2012, Joyent, Inc. All rights reserved. 3 | # 4 | # Makefile: top-level Makefile 5 | # 6 | # This Makefile contains only repo-specific logic and uses included makefiles 7 | # to supply common targets (javascriptlint, jsstyle, restdown, etc.), which are 8 | # used by other repos as well. 9 | # 10 | 11 | # 12 | # Files 13 | # 14 | JSL = jsl 15 | JSSTYLE = jsstyle 16 | JS_FILES := $(shell find examples lib -name '*.js') 17 | JSL_FILES_NODE = $(JS_FILES) 18 | JSSTYLE_FILES = $(JS_FILES) 19 | JSL_CONF_NODE = jsl.node.conf 20 | 21 | # Default target is "check" 22 | check: 23 | 24 | include ./Makefile.targ 25 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/extsprintf/README.md: -------------------------------------------------------------------------------- 1 | # extsprintf: extended POSIX-style sprintf 2 | 3 | Stripped down version of s[n]printf(3c). We make a best effort to throw an 4 | exception when given a format string we don't understand, rather than ignoring 5 | it, so that we won't break existing programs if/when we go implement the rest 6 | of this. 7 | 8 | This implementation currently supports specifying 9 | 10 | * field alignment ('-' flag), 11 | * zero-pad ('0' flag) 12 | * always show numeric sign ('+' flag), 13 | * field width 14 | * conversions for strings, decimal integers, and floats (numbers). 15 | * argument size specifiers. These are all accepted but ignored, since 16 | Javascript has no notion of the physical size of an argument. 17 | 18 | Everything else is currently unsupported, most notably: precision, unsigned 19 | numbers, non-decimal numbers, and characters. 20 | 21 | Besides the usual POSIX conversions, this implementation supports: 22 | 23 | * `%j`: pretty-print a JSON object (using node's "inspect") 24 | * `%r`: pretty-print an Error object 25 | 26 | # Example 27 | 28 | First, install it: 29 | 30 | # npm install extsprintf 31 | 32 | Now, use it: 33 | 34 | var mod_extsprintf = require('extsprintf'); 35 | console.log(mod_extsprintf.sprintf('hello %25s', 'world')); 36 | 37 | outputs: 38 | 39 | hello world 40 | 41 | # Also supported 42 | 43 | **printf**: same args as sprintf, but prints the result to stdout 44 | 45 | **fprintf**: same args as sprintf, preceded by a Node stream. Prints the result 46 | to the given stream. 47 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/extsprintf/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "extsprintf@1.3.0", 3 | "_id": "extsprintf@1.3.0", 4 | "_inBundle": false, 5 | "_integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", 6 | "_location": "/extsprintf", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "version", 10 | "registry": true, 11 | "raw": "extsprintf@1.3.0", 12 | "name": "extsprintf", 13 | "escapedName": "extsprintf", 14 | "rawSpec": "1.3.0", 15 | "saveSpec": null, 16 | "fetchSpec": "1.3.0" 17 | }, 18 | "_requiredBy": [ 19 | "/jsprim", 20 | "/verror" 21 | ], 22 | "_resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", 23 | "_shasum": "96918440e3041a7a414f8c52e3c574eb3c3e1e05", 24 | "_spec": "extsprintf@1.3.0", 25 | "_where": "C:\\Users\\czf\\Documents\\GitHub\\tg_push_bot\\examples\\nodejs\\node_modules\\jsprim", 26 | "bugs": { 27 | "url": "https://github.com/davepacheco/node-extsprintf/issues" 28 | }, 29 | "bundleDependencies": false, 30 | "deprecated": false, 31 | "description": "extended POSIX-style sprintf", 32 | "engines": [ 33 | "node >=0.6.0" 34 | ], 35 | "homepage": "https://github.com/davepacheco/node-extsprintf#readme", 36 | "license": "MIT", 37 | "main": "./lib/extsprintf.js", 38 | "name": "extsprintf", 39 | "repository": { 40 | "type": "git", 41 | "url": "git://github.com/davepacheco/node-extsprintf.git" 42 | }, 43 | "version": "1.3.0" 44 | } 45 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-deep-equal/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Evgeny Poberezkin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-deep-equal/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'fast-deep-equal' { 2 | const equal: (a: any, b: any) => boolean; 3 | export = equal; 4 | } 5 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-deep-equal/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var isArray = Array.isArray; 4 | var keyList = Object.keys; 5 | var hasProp = Object.prototype.hasOwnProperty; 6 | 7 | module.exports = function equal(a, b) { 8 | if (a === b) return true; 9 | 10 | var arrA = isArray(a) 11 | , arrB = isArray(b) 12 | , i 13 | , length 14 | , key; 15 | 16 | if (arrA && arrB) { 17 | length = a.length; 18 | if (length != b.length) return false; 19 | for (i = 0; i < length; i++) 20 | if (!equal(a[i], b[i])) return false; 21 | return true; 22 | } 23 | 24 | if (arrA != arrB) return false; 25 | 26 | var dateA = a instanceof Date 27 | , dateB = b instanceof Date; 28 | if (dateA != dateB) return false; 29 | if (dateA && dateB) return a.getTime() == b.getTime(); 30 | 31 | var regexpA = a instanceof RegExp 32 | , regexpB = b instanceof RegExp; 33 | if (regexpA != regexpB) return false; 34 | if (regexpA && regexpB) return a.toString() == b.toString(); 35 | 36 | if (a instanceof Object && b instanceof Object) { 37 | var keys = keyList(a); 38 | length = keys.length; 39 | 40 | if (length !== keyList(b).length) 41 | return false; 42 | 43 | for (i = 0; i < length; i++) 44 | if (!hasProp.call(b, keys[i])) return false; 45 | 46 | for (i = 0; i < length; i++) { 47 | key = keys[i]; 48 | if (!equal(a[key], b[key])) return false; 49 | } 50 | 51 | return true; 52 | } 53 | 54 | return false; 55 | }; 56 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-json-stable-stringify/.eslintrc.yml: -------------------------------------------------------------------------------- 1 | extends: eslint:recommended 2 | env: 3 | node: true 4 | browser: true 5 | rules: 6 | block-scoped-var: 2 7 | callback-return: 2 8 | dot-notation: 2 9 | indent: 2 10 | linebreak-style: [2, unix] 11 | new-cap: 2 12 | no-console: [2, allow: [warn, error]] 13 | no-else-return: 2 14 | no-eq-null: 2 15 | no-fallthrough: 2 16 | no-invalid-this: 2 17 | no-return-assign: 2 18 | no-shadow: 1 19 | no-trailing-spaces: 2 20 | no-use-before-define: [2, nofunc] 21 | quotes: [2, single, avoid-escape] 22 | semi: [2, always] 23 | strict: [2, global] 24 | valid-jsdoc: [2, requireReturn: false] 25 | no-control-regex: 0 26 | no-useless-escape: 2 27 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-json-stable-stringify/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .nyc_output/ 3 | coverage/ 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-json-stable-stringify/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "4" 4 | - "6" 5 | - "7" 6 | - "8" 7 | after_script: 8 | - coveralls < coverage/lcov.info 9 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-json-stable-stringify/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-json-stable-stringify/benchmark/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const Benchmark = require('benchmark'); 4 | const suite = new Benchmark.Suite; 5 | const testData = require('./test.json'); 6 | 7 | 8 | const stringifyPackages = { 9 | // 'JSON.stringify': JSON.stringify, 10 | 'fast-json-stable-stringify': require('../index'), 11 | 'json-stable-stringify': true, 12 | 'fast-stable-stringify': true, 13 | 'faster-stable-stringify': true 14 | }; 15 | 16 | 17 | for (const name in stringifyPackages) { 18 | let func = stringifyPackages[name]; 19 | if (func === true) func = require(name); 20 | 21 | suite.add(name, function() { 22 | func(testData); 23 | }); 24 | } 25 | 26 | suite 27 | .on('cycle', (event) => console.log(String(event.target))) 28 | .on('complete', function () { 29 | console.log('The fastest is ' + this.filter('fastest').map('name')); 30 | }) 31 | .run({async: true}); 32 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-json-stable-stringify/example/key_cmp.js: -------------------------------------------------------------------------------- 1 | var stringify = require('../'); 2 | 3 | var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; 4 | var s = stringify(obj, function (a, b) { 5 | return a.key < b.key ? 1 : -1; 6 | }); 7 | console.log(s); 8 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-json-stable-stringify/example/nested.js: -------------------------------------------------------------------------------- 1 | var stringify = require('../'); 2 | var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; 3 | console.log(stringify(obj)); 4 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-json-stable-stringify/example/str.js: -------------------------------------------------------------------------------- 1 | var stringify = require('../'); 2 | var obj = { c: 6, b: [4,5], a: 3 }; 3 | console.log(stringify(obj)); 4 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-json-stable-stringify/example/value_cmp.js: -------------------------------------------------------------------------------- 1 | var stringify = require('../'); 2 | 3 | var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; 4 | var s = stringify(obj, function (a, b) { 5 | return a.value < b.value ? 1 : -1; 6 | }); 7 | console.log(s); 8 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-json-stable-stringify/test/cmp.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var test = require('tape'); 4 | var stringify = require('../'); 5 | 6 | test('custom comparison function', function (t) { 7 | t.plan(1); 8 | var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; 9 | var s = stringify(obj, function (a, b) { 10 | return a.key < b.key ? 1 : -1; 11 | }); 12 | t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}'); 13 | }); 14 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-json-stable-stringify/test/nested.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var test = require('tape'); 4 | var stringify = require('../'); 5 | 6 | test('nested', function (t) { 7 | t.plan(1); 8 | var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; 9 | t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}'); 10 | }); 11 | 12 | test('cyclic (default)', function (t) { 13 | t.plan(1); 14 | var one = { a: 1 }; 15 | var two = { a: 2, one: one }; 16 | one.two = two; 17 | try { 18 | stringify(one); 19 | } catch (ex) { 20 | t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON'); 21 | } 22 | }); 23 | 24 | test('cyclic (specifically allowed)', function (t) { 25 | t.plan(1); 26 | var one = { a: 1 }; 27 | var two = { a: 2, one: one }; 28 | one.two = two; 29 | t.equal(stringify(one, {cycles:true}), '{"a":1,"two":{"a":2,"one":"__cycle__"}}'); 30 | }); 31 | 32 | test('repeated non-cyclic value', function(t) { 33 | t.plan(1); 34 | var one = { x: 1 }; 35 | var two = { a: one, b: one }; 36 | t.equal(stringify(two), '{"a":{"x":1},"b":{"x":1}}'); 37 | }); 38 | 39 | test('acyclic but with reused obj-property pointers', function (t) { 40 | t.plan(1); 41 | var x = { a: 1 }; 42 | var y = { b: x, c: x }; 43 | t.equal(stringify(y), '{"b":{"a":1},"c":{"a":1}}'); 44 | }); 45 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-json-stable-stringify/test/str.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var test = require('tape'); 4 | var stringify = require('../'); 5 | 6 | test('simple object', function (t) { 7 | t.plan(1); 8 | var obj = { c: 6, b: [4,5], a: 3, z: null }; 9 | t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}'); 10 | }); 11 | 12 | test('object with undefined', function (t) { 13 | t.plan(1); 14 | var obj = { a: 3, z: undefined }; 15 | t.equal(stringify(obj), '{"a":3}'); 16 | }); 17 | 18 | test('object with null', function (t) { 19 | t.plan(1); 20 | var obj = { a: 3, z: null }; 21 | t.equal(stringify(obj), '{"a":3,"z":null}'); 22 | }); 23 | 24 | test('object with NaN and Infinity', function (t) { 25 | t.plan(1); 26 | var obj = { a: 3, b: NaN, c: Infinity }; 27 | t.equal(stringify(obj), '{"a":3,"b":null,"c":null}'); 28 | }); 29 | 30 | test('array with undefined', function (t) { 31 | t.plan(1); 32 | var obj = [4, undefined, 6]; 33 | t.equal(stringify(obj), '[4,null,6]'); 34 | }); 35 | 36 | test('object with empty string', function (t) { 37 | t.plan(1); 38 | var obj = { a: 3, z: '' }; 39 | t.equal(stringify(obj), '{"a":3,"z":""}'); 40 | }); 41 | 42 | test('array with empty string', function (t) { 43 | t.plan(1); 44 | var obj = [4, '', 6]; 45 | t.equal(stringify(obj), '[4,"",6]'); 46 | }); 47 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/fast-json-stable-stringify/test/to-json.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var test = require('tape'); 4 | var stringify = require('../'); 5 | 6 | test('toJSON function', function (t) { 7 | t.plan(1); 8 | var obj = { one: 1, two: 2, toJSON: function() { return { one: 1 }; } }; 9 | t.equal(stringify(obj), '{"one":1}' ); 10 | }); 11 | 12 | test('toJSON returns string', function (t) { 13 | t.plan(1); 14 | var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } }; 15 | t.equal(stringify(obj), '"one"'); 16 | }); 17 | 18 | test('toJSON returns array', function (t) { 19 | t.plan(1); 20 | var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } }; 21 | t.equal(stringify(obj), '["one"]'); 22 | }); 23 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/forever-agent/README.md: -------------------------------------------------------------------------------- 1 | forever-agent 2 | ============= 3 | 4 | HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module. 5 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/form-data/License: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/form-data/lib/browser.js: -------------------------------------------------------------------------------- 1 | /* eslint-env browser */ 2 | module.exports = typeof self == 'object' ? self.FormData : window.FormData; 3 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/form-data/lib/populate.js: -------------------------------------------------------------------------------- 1 | // populates missing values 2 | module.exports = function(dst, src) { 3 | 4 | Object.keys(src).forEach(function(prop) 5 | { 6 | dst[prop] = dst[prop] || src[prop]; 7 | }); 8 | 9 | return dst; 10 | }; 11 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/getpass/.npmignore: -------------------------------------------------------------------------------- 1 | .gitmodules 2 | deps 3 | docs 4 | Makefile 5 | node_modules 6 | test 7 | tools 8 | coverage 9 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/getpass/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "5.10" 4 | - "4.4" 5 | - "4.1" 6 | - "0.12" 7 | - "0.10" 8 | before_install: 9 | - "make check" 10 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/getpass/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Joyent, Inc. All rights reserved. 2 | Permission is hereby granted, free of charge, to any person obtaining a copy 3 | of this software and associated documentation files (the "Software"), to 4 | deal in the Software without restriction, including without limitation the 5 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 6 | sell copies of the Software, and to permit persons to whom the Software is 7 | furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in 10 | all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 18 | IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/getpass/README.md: -------------------------------------------------------------------------------- 1 | ## getpass 2 | 3 | Get a password from the terminal. Sounds simple? Sounds like the `readline` 4 | module should be able to do it? NOPE. 5 | 6 | ## Install and use it 7 | 8 | ```bash 9 | npm install --save getpass 10 | ``` 11 | 12 | ```javascript 13 | const mod_getpass = require('getpass'); 14 | ``` 15 | 16 | ## API 17 | 18 | ### `mod_getpass.getPass([options, ]callback)` 19 | 20 | Gets a password from the terminal. If available, this uses `/dev/tty` to avoid 21 | interfering with any data being piped in or out of stdio. 22 | 23 | This function prints a prompt (by default `Password:`) and then accepts input 24 | without echoing. 25 | 26 | Parameters: 27 | 28 | * `options`, an Object, with properties: 29 | * `prompt`, an optional String 30 | * `callback`, a `Func(error, password)`, with arguments: 31 | * `error`, either `null` (no error) or an `Error` instance 32 | * `password`, a String 33 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/getpass/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "getpass@^0.1.1", 3 | "_id": "getpass@0.1.7", 4 | "_inBundle": false, 5 | "_integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", 6 | "_location": "/getpass", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "range", 10 | "registry": true, 11 | "raw": "getpass@^0.1.1", 12 | "name": "getpass", 13 | "escapedName": "getpass", 14 | "rawSpec": "^0.1.1", 15 | "saveSpec": null, 16 | "fetchSpec": "^0.1.1" 17 | }, 18 | "_requiredBy": [ 19 | "/sshpk" 20 | ], 21 | "_resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", 22 | "_shasum": "5eff8e3e684d569ae4cb2b1282604e8ba62149fa", 23 | "_spec": "getpass@^0.1.1", 24 | "_where": "C:\\Users\\czf\\Documents\\GitHub\\tg_push_bot\\examples\\nodejs\\node_modules\\sshpk", 25 | "author": { 26 | "name": "Alex Wilson", 27 | "email": "alex.wilson@joyent.com" 28 | }, 29 | "bugs": { 30 | "url": "https://github.com/arekinath/node-getpass/issues" 31 | }, 32 | "bundleDependencies": false, 33 | "dependencies": { 34 | "assert-plus": "^1.0.0" 35 | }, 36 | "deprecated": false, 37 | "description": "getpass for node.js", 38 | "homepage": "https://github.com/arekinath/node-getpass#readme", 39 | "license": "MIT", 40 | "main": "lib/index.js", 41 | "name": "getpass", 42 | "repository": { 43 | "type": "git", 44 | "url": "git+https://github.com/arekinath/node-getpass.git" 45 | }, 46 | "scripts": { 47 | "test": "tape test/*.test.js" 48 | }, 49 | "version": "0.1.7" 50 | } 51 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Ahmad Nassri 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/afterRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "afterRequest.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "optional": true, 6 | "required": [ 7 | "lastAccess", 8 | "eTag", 9 | "hitCount" 10 | ], 11 | "properties": { 12 | "expires": { 13 | "type": "string", 14 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?" 15 | }, 16 | "lastAccess": { 17 | "type": "string", 18 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?" 19 | }, 20 | "eTag": { 21 | "type": "string" 22 | }, 23 | "hitCount": { 24 | "type": "integer" 25 | }, 26 | "comment": { 27 | "type": "string" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/beforeRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "beforeRequest.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "optional": true, 6 | "required": [ 7 | "lastAccess", 8 | "eTag", 9 | "hitCount" 10 | ], 11 | "properties": { 12 | "expires": { 13 | "type": "string", 14 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?" 15 | }, 16 | "lastAccess": { 17 | "type": "string", 18 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?" 19 | }, 20 | "eTag": { 21 | "type": "string" 22 | }, 23 | "hitCount": { 24 | "type": "integer" 25 | }, 26 | "comment": { 27 | "type": "string" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/browser.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "browser.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "version" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "version": { 14 | "type": "string" 15 | }, 16 | "comment": { 17 | "type": "string" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/cache.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "cache.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "properties": { 5 | "beforeRequest": { 6 | "oneOf": [ 7 | { "type": "null" }, 8 | { "$ref": "beforeRequest.json#" } 9 | ] 10 | }, 11 | "afterRequest": { 12 | "oneOf": [ 13 | { "type": "null" }, 14 | { "$ref": "afterRequest.json#" } 15 | ] 16 | }, 17 | "comment": { 18 | "type": "string" 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/content.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "content.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "size", 7 | "mimeType" 8 | ], 9 | "properties": { 10 | "size": { 11 | "type": "integer" 12 | }, 13 | "compression": { 14 | "type": "integer" 15 | }, 16 | "mimeType": { 17 | "type": "string" 18 | }, 19 | "text": { 20 | "type": "string" 21 | }, 22 | "encoding": { 23 | "type": "string" 24 | }, 25 | "comment": { 26 | "type": "string" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/cookie.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "cookie.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "value" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "value": { 14 | "type": "string" 15 | }, 16 | "path": { 17 | "type": "string" 18 | }, 19 | "domain": { 20 | "type": "string" 21 | }, 22 | "expires": { 23 | "type": ["string", "null"], 24 | "format": "date-time" 25 | }, 26 | "httpOnly": { 27 | "type": "boolean" 28 | }, 29 | "secure": { 30 | "type": "boolean" 31 | }, 32 | "comment": { 33 | "type": "string" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/creator.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "creator.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "version" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "version": { 14 | "type": "string" 15 | }, 16 | "comment": { 17 | "type": "string" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/entry.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "entry.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "optional": true, 6 | "required": [ 7 | "startedDateTime", 8 | "time", 9 | "request", 10 | "response", 11 | "cache", 12 | "timings" 13 | ], 14 | "properties": { 15 | "pageref": { 16 | "type": "string" 17 | }, 18 | "startedDateTime": { 19 | "type": "string", 20 | "format": "date-time", 21 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))" 22 | }, 23 | "time": { 24 | "type": "number", 25 | "min": 0 26 | }, 27 | "request": { 28 | "$ref": "request.json#" 29 | }, 30 | "response": { 31 | "$ref": "response.json#" 32 | }, 33 | "cache": { 34 | "$ref": "cache.json#" 35 | }, 36 | "timings": { 37 | "$ref": "timings.json#" 38 | }, 39 | "serverIPAddress": { 40 | "type": "string", 41 | "oneOf": [ 42 | { "format": "ipv4" }, 43 | { "format": "ipv6" } 44 | ] 45 | }, 46 | "connection": { 47 | "type": "string" 48 | }, 49 | "comment": { 50 | "type": "string" 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/har.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "har.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "log" 7 | ], 8 | "properties": { 9 | "log": { 10 | "$ref": "log.json#" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/header.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "header.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "value" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "value": { 14 | "type": "string" 15 | }, 16 | "comment": { 17 | "type": "string" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | afterRequest: require('./afterRequest.json'), 5 | beforeRequest: require('./beforeRequest.json'), 6 | browser: require('./browser.json'), 7 | cache: require('./cache.json'), 8 | content: require('./content.json'), 9 | cookie: require('./cookie.json'), 10 | creator: require('./creator.json'), 11 | entry: require('./entry.json'), 12 | har: require('./har.json'), 13 | header: require('./header.json'), 14 | log: require('./log.json'), 15 | page: require('./page.json'), 16 | pageTimings: require('./pageTimings.json'), 17 | postData: require('./postData.json'), 18 | query: require('./query.json'), 19 | request: require('./request.json'), 20 | response: require('./response.json'), 21 | timings: require('./timings.json') 22 | } 23 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/log.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "log.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "version", 7 | "creator", 8 | "entries" 9 | ], 10 | "properties": { 11 | "version": { 12 | "type": "string" 13 | }, 14 | "creator": { 15 | "$ref": "creator.json#" 16 | }, 17 | "browser": { 18 | "$ref": "browser.json#" 19 | }, 20 | "pages": { 21 | "type": "array", 22 | "items": { 23 | "$ref": "page.json#" 24 | } 25 | }, 26 | "entries": { 27 | "type": "array", 28 | "items": { 29 | "$ref": "entry.json#" 30 | } 31 | }, 32 | "comment": { 33 | "type": "string" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/page.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "page.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "optional": true, 6 | "required": [ 7 | "startedDateTime", 8 | "id", 9 | "title", 10 | "pageTimings" 11 | ], 12 | "properties": { 13 | "startedDateTime": { 14 | "type": "string", 15 | "format": "date-time", 16 | "pattern": "^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))" 17 | }, 18 | "id": { 19 | "type": "string", 20 | "unique": true 21 | }, 22 | "title": { 23 | "type": "string" 24 | }, 25 | "pageTimings": { 26 | "$ref": "pageTimings.json#" 27 | }, 28 | "comment": { 29 | "type": "string" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/pageTimings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "pageTimings.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "properties": { 6 | "onContentLoad": { 7 | "type": "number", 8 | "min": -1 9 | }, 10 | "onLoad": { 11 | "type": "number", 12 | "min": -1 13 | }, 14 | "comment": { 15 | "type": "string" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/postData.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "postData.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "optional": true, 6 | "required": [ 7 | "mimeType" 8 | ], 9 | "properties": { 10 | "mimeType": { 11 | "type": "string" 12 | }, 13 | "text": { 14 | "type": "string" 15 | }, 16 | "params": { 17 | "type": "array", 18 | "required": [ 19 | "name" 20 | ], 21 | "properties": { 22 | "name": { 23 | "type": "string" 24 | }, 25 | "value": { 26 | "type": "string" 27 | }, 28 | "fileName": { 29 | "type": "string" 30 | }, 31 | "contentType": { 32 | "type": "string" 33 | }, 34 | "comment": { 35 | "type": "string" 36 | } 37 | } 38 | }, 39 | "comment": { 40 | "type": "string" 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/query.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "query.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "name", 7 | "value" 8 | ], 9 | "properties": { 10 | "name": { 11 | "type": "string" 12 | }, 13 | "value": { 14 | "type": "string" 15 | }, 16 | "comment": { 17 | "type": "string" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/request.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "request.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "method", 7 | "url", 8 | "httpVersion", 9 | "cookies", 10 | "headers", 11 | "queryString", 12 | "headersSize", 13 | "bodySize" 14 | ], 15 | "properties": { 16 | "method": { 17 | "type": "string" 18 | }, 19 | "url": { 20 | "type": "string", 21 | "format": "uri" 22 | }, 23 | "httpVersion": { 24 | "type": "string" 25 | }, 26 | "cookies": { 27 | "type": "array", 28 | "items": { 29 | "$ref": "cookie.json#" 30 | } 31 | }, 32 | "headers": { 33 | "type": "array", 34 | "items": { 35 | "$ref": "header.json#" 36 | } 37 | }, 38 | "queryString": { 39 | "type": "array", 40 | "items": { 41 | "$ref": "query.json#" 42 | } 43 | }, 44 | "postData": { 45 | "$ref": "postData.json#" 46 | }, 47 | "headersSize": { 48 | "type": "integer" 49 | }, 50 | "bodySize": { 51 | "type": "integer" 52 | }, 53 | "comment": { 54 | "type": "string" 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/response.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "response.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "type": "object", 5 | "required": [ 6 | "status", 7 | "statusText", 8 | "httpVersion", 9 | "cookies", 10 | "headers", 11 | "content", 12 | "redirectURL", 13 | "headersSize", 14 | "bodySize" 15 | ], 16 | "properties": { 17 | "status": { 18 | "type": "integer" 19 | }, 20 | "statusText": { 21 | "type": "string" 22 | }, 23 | "httpVersion": { 24 | "type": "string" 25 | }, 26 | "cookies": { 27 | "type": "array", 28 | "items": { 29 | "$ref": "cookie.json#" 30 | } 31 | }, 32 | "headers": { 33 | "type": "array", 34 | "items": { 35 | "$ref": "header.json#" 36 | } 37 | }, 38 | "content": { 39 | "$ref": "content.json#" 40 | }, 41 | "redirectURL": { 42 | "type": "string" 43 | }, 44 | "headersSize": { 45 | "type": "integer" 46 | }, 47 | "bodySize": { 48 | "type": "integer" 49 | }, 50 | "comment": { 51 | "type": "string" 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-schema/lib/timings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$id": "timings.json#", 3 | "$schema": "http://json-schema.org/draft-06/schema#", 4 | "required": [ 5 | "send", 6 | "wait", 7 | "receive" 8 | ], 9 | "properties": { 10 | "dns": { 11 | "type": "number", 12 | "min": -1 13 | }, 14 | "connect": { 15 | "type": "number", 16 | "min": -1 17 | }, 18 | "blocked": { 19 | "type": "number", 20 | "min": -1 21 | }, 22 | "send": { 23 | "type": "number", 24 | "min": -1 25 | }, 26 | "wait": { 27 | "type": "number", 28 | "min": -1 29 | }, 30 | "receive": { 31 | "type": "number", 32 | "min": -1 33 | }, 34 | "ssl": { 35 | "type": "number", 36 | "min": -1 37 | }, 38 | "comment": { 39 | "type": "string" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-validator/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Ahmad Nassri 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/har-validator/lib/error.js: -------------------------------------------------------------------------------- 1 | function HARError (errors) { 2 | var message = 'validation failed' 3 | 4 | this.name = 'HARError' 5 | this.message = message 6 | this.errors = errors 7 | 8 | if (typeof Error.captureStackTrace === 'function') { 9 | Error.captureStackTrace(this, this.constructor) 10 | } else { 11 | this.stack = (new Error(message)).stack 12 | } 13 | } 14 | 15 | HARError.prototype = Error.prototype 16 | 17 | module.exports = HARError 18 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/hawk/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !lib/** 3 | !dist/** 4 | !client.js 5 | !.npmignore 6 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/hawk/client.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('./dist/browser'); 4 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/hawk/lib/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Export sub-modules 4 | 5 | exports.error = exports.Error = require('boom'); 6 | exports.sntp = require('sntp'); 7 | 8 | exports.server = require('./server'); 9 | exports.client = require('./client'); 10 | exports.crypto = require('./crypto'); 11 | exports.utils = require('./utils'); 12 | 13 | exports.uri = { 14 | authenticate: exports.server.authenticateBewit, 15 | getBewit: exports.client.getBewit 16 | }; 17 | 18 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/hoek/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !lib/** 3 | !.npmignore 4 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/hoek/README.md: -------------------------------------------------------------------------------- 1 | ![hoek Logo](https://raw.github.com/hapijs/hoek/master/images/hoek.png) 2 | 3 | Utility methods for the hapi ecosystem. This module is not intended to solve every problem for everyone, but rather as a central place to store hapi-specific methods. If you're looking for a general purpose utility module, check out [lodash](https://github.com/lodash/lodash) or [underscore](https://github.com/jashkenas/underscore). 4 | 5 | [![Build Status](https://secure.travis-ci.org/hapijs/hoek.svg)](http://travis-ci.org/hapijs/hoek) 6 | 7 | 8 | 9 | Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf) 10 | 11 | **hoek** is sponsored by [&yet](https://andyet.com) 12 | 13 | ## Usage 14 | 15 | The *Hoek* library contains some common functions used within the hapi ecosystem. It comes with useful methods for Arrays (clone, merge, applyToDefaults), Objects (removeKeys, copy), Asserting and more. 16 | 17 | For example, to use Hoek to set configuration with default options: 18 | ```javascript 19 | const Hoek = require('hoek'); 20 | 21 | const default = {url : "www.github.com", port : "8000", debug : true}; 22 | 23 | const config = Hoek.applyToDefaults(default, {port : "3000", admin : true}); 24 | 25 | // In this case, config would be { url: 'www.github.com', port: '3000', debug: true, admin: true } 26 | ``` 27 | 28 | ## Documentation 29 | 30 | [**API Reference**](API.md) 31 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/http-signature/.dir-locals.el: -------------------------------------------------------------------------------- 1 | ((nil . ((indent-tabs-mode . nil) 2 | (tab-width . 8) 3 | (fill-column . 80))) 4 | (js-mode . ((js-indent-level . 2) 5 | (indent-tabs-mode . nil) 6 | ))) -------------------------------------------------------------------------------- /examples/nodejs/node_modules/http-signature/.npmignore: -------------------------------------------------------------------------------- 1 | .gitmodules 2 | deps 3 | docs 4 | Makefile 5 | node_modules 6 | test 7 | tools -------------------------------------------------------------------------------- /examples/nodejs/node_modules/http-signature/CHANGES.md: -------------------------------------------------------------------------------- 1 | # node-http-signature changelog 2 | 3 | ## 1.1.1 4 | 5 | - Version of dependency `assert-plus` updated: old version was missing 6 | some license information 7 | - Corrected examples in `http_signing.md`, added auto-tests to 8 | automatically validate these examples 9 | 10 | ## 1.1.0 11 | 12 | - Bump version of `sshpk` dependency, remove peerDependency on it since 13 | it now supports exchanging objects between multiple versions of itself 14 | where possible 15 | 16 | ## 1.0.2 17 | 18 | - Bump min version of `jsprim` dependency, to include fixes for using 19 | http-signature with `browserify` 20 | 21 | ## 1.0.1 22 | 23 | - Bump minimum version of `sshpk` dependency, to include fixes for 24 | whitespace tolerance in key parsing. 25 | 26 | ## 1.0.0 27 | 28 | - First semver release. 29 | - #36: Ensure verifySignature does not leak useful timing information 30 | - #42: Bring the library up to the latest version of the spec (including the 31 | request-target changes) 32 | - Support for ECDSA keys and signatures. 33 | - Now uses `sshpk` for key parsing, validation and conversion. 34 | - Fixes for #21, #47, #39 and compatibility with node 0.8 35 | 36 | ## 0.11.0 37 | 38 | - Split up HMAC and Signature verification to avoid vulnerabilities where a 39 | key intended for use with one can be validated against the other method 40 | instead. 41 | 42 | ## 0.10.2 43 | 44 | - Updated versions of most dependencies. 45 | - Utility functions exported for PEM => SSH-RSA conversion. 46 | - Improvements to tests and examples. 47 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/http-signature/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Joyent, Inc. All rights reserved. 2 | Permission is hereby granted, free of charge, to any person obtaining a copy 3 | of this software and associated documentation files (the "Software"), to 4 | deal in the Software without restriction, including without limitation the 5 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 6 | sell copies of the Software, and to permit persons to whom the Software is 7 | furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in 10 | all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 18 | IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/http-signature/lib/index.js: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Joyent, Inc. 2 | 3 | var parser = require('./parser'); 4 | var signer = require('./signer'); 5 | var verify = require('./verify'); 6 | var utils = require('./utils'); 7 | 8 | 9 | 10 | ///--- API 11 | 12 | module.exports = { 13 | 14 | parse: parser.parseRequest, 15 | parseRequest: parser.parseRequest, 16 | 17 | sign: signer.signRequest, 18 | signRequest: signer.signRequest, 19 | createSigner: signer.createSigner, 20 | isSigner: signer.isSigner, 21 | 22 | sshKeyToPEM: utils.sshKeyToPEM, 23 | sshKeyFingerprint: utils.fingerprint, 24 | pemToRsaSSHKey: utils.pemToRsaSSHKey, 25 | 26 | verify: verify.verifySignature, 27 | verifySignature: verify.verifySignature, 28 | verifyHMAC: verify.verifyHMAC 29 | }; 30 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/is-typedarray/LICENSE.md: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/is-typedarray/README.md: -------------------------------------------------------------------------------- 1 | # is-typedarray [![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) 2 | 3 | Detect whether or not an object is a 4 | [Typed Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays). 5 | 6 | ## Usage 7 | 8 | [![NPM](https://nodei.co/npm/is-typedarray.png)](https://nodei.co/npm/is-typedarray/) 9 | 10 | ### isTypedArray(array) 11 | 12 | Returns `true` when array is a Typed Array, and `false` when it is not. 13 | 14 | ## License 15 | 16 | MIT. See [LICENSE.md](http://github.com/hughsk/is-typedarray/blob/master/LICENSE.md) for details. 17 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/is-typedarray/index.js: -------------------------------------------------------------------------------- 1 | module.exports = isTypedArray 2 | isTypedArray.strict = isStrictTypedArray 3 | isTypedArray.loose = isLooseTypedArray 4 | 5 | var toString = Object.prototype.toString 6 | var names = { 7 | '[object Int8Array]': true 8 | , '[object Int16Array]': true 9 | , '[object Int32Array]': true 10 | , '[object Uint8Array]': true 11 | , '[object Uint8ClampedArray]': true 12 | , '[object Uint16Array]': true 13 | , '[object Uint32Array]': true 14 | , '[object Float32Array]': true 15 | , '[object Float64Array]': true 16 | } 17 | 18 | function isTypedArray(arr) { 19 | return ( 20 | isStrictTypedArray(arr) 21 | || isLooseTypedArray(arr) 22 | ) 23 | } 24 | 25 | function isStrictTypedArray(arr) { 26 | return ( 27 | arr instanceof Int8Array 28 | || arr instanceof Int16Array 29 | || arr instanceof Int32Array 30 | || arr instanceof Uint8Array 31 | || arr instanceof Uint8ClampedArray 32 | || arr instanceof Uint16Array 33 | || arr instanceof Uint32Array 34 | || arr instanceof Float32Array 35 | || arr instanceof Float64Array 36 | ) 37 | } 38 | 39 | function isLooseTypedArray(arr) { 40 | return names[toString.call(arr)] 41 | } 42 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/is-typedarray/test.js: -------------------------------------------------------------------------------- 1 | var test = require('tape') 2 | var ista = require('./') 3 | 4 | test('strict', function(t) { 5 | t.ok(ista.strict(new Int8Array), 'Int8Array') 6 | t.ok(ista.strict(new Int16Array), 'Int16Array') 7 | t.ok(ista.strict(new Int32Array), 'Int32Array') 8 | t.ok(ista.strict(new Uint8Array), 'Uint8Array') 9 | t.ok(ista.strict(new Uint16Array), 'Uint16Array') 10 | t.ok(ista.strict(new Uint32Array), 'Uint32Array') 11 | t.ok(ista.strict(new Float32Array), 'Float32Array') 12 | t.ok(ista.strict(new Float64Array), 'Float64Array') 13 | 14 | t.ok(!ista.strict(new Array), 'Array') 15 | t.ok(!ista.strict([]), '[]') 16 | 17 | t.end() 18 | }) 19 | 20 | test('loose', function(t) { 21 | t.ok(ista.loose(new Int8Array), 'Int8Array') 22 | t.ok(ista.loose(new Int16Array), 'Int16Array') 23 | t.ok(ista.loose(new Int32Array), 'Int32Array') 24 | t.ok(ista.loose(new Uint8Array), 'Uint8Array') 25 | t.ok(ista.loose(new Uint16Array), 'Uint16Array') 26 | t.ok(ista.loose(new Uint32Array), 'Uint32Array') 27 | t.ok(ista.loose(new Float32Array), 'Float32Array') 28 | t.ok(ista.loose(new Float64Array), 'Float64Array') 29 | 30 | t.ok(!ista.loose(new Array), 'Array') 31 | t.ok(!ista.loose([]), '[]') 32 | 33 | t.end() 34 | }) 35 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/isstream/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "predef": [ ] 3 | , "bitwise": false 4 | , "camelcase": false 5 | , "curly": false 6 | , "eqeqeq": false 7 | , "forin": false 8 | , "immed": false 9 | , "latedef": false 10 | , "noarg": true 11 | , "noempty": true 12 | , "nonew": true 13 | , "plusplus": false 14 | , "quotmark": true 15 | , "regexp": false 16 | , "undef": true 17 | , "unused": true 18 | , "strict": false 19 | , "trailing": true 20 | , "maxlen": 120 21 | , "asi": true 22 | , "boss": true 23 | , "debug": true 24 | , "eqnull": true 25 | , "esnext": true 26 | , "evil": true 27 | , "expr": true 28 | , "funcscope": false 29 | , "globalstrict": false 30 | , "iterator": false 31 | , "lastsemic": true 32 | , "laxbreak": true 33 | , "laxcomma": true 34 | , "loopfunc": true 35 | , "multistr": false 36 | , "onecase": false 37 | , "proto": false 38 | , "regexdash": false 39 | , "scripturl": true 40 | , "smarttabs": false 41 | , "shadow": false 42 | , "sub": true 43 | , "supernew": false 44 | , "validthis": true 45 | , "browser": true 46 | , "couch": false 47 | , "devel": false 48 | , "dojo": false 49 | , "mootools": false 50 | , "node": true 51 | , "nonstandard": true 52 | , "prototypejs": false 53 | , "rhino": false 54 | , "worker": true 55 | , "wsh": false 56 | , "nomen": false 57 | , "onevar": false 58 | , "passfail": false 59 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/isstream/.npmignore: -------------------------------------------------------------------------------- 1 | *.tgz 2 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/isstream/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | - "0.11" 6 | branches: 7 | only: 8 | - master 9 | notifications: 10 | email: 11 | - rod@vagg.org 12 | script: npm test 13 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/isstream/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright (c) 2015 Rod Vagg 5 | --------------------------- 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/isstream/isstream.js: -------------------------------------------------------------------------------- 1 | var stream = require('stream') 2 | 3 | 4 | function isStream (obj) { 5 | return obj instanceof stream.Stream 6 | } 7 | 8 | 9 | function isReadable (obj) { 10 | return isStream(obj) && typeof obj._read == 'function' && typeof obj._readableState == 'object' 11 | } 12 | 13 | 14 | function isWritable (obj) { 15 | return isStream(obj) && typeof obj._write == 'function' && typeof obj._writableState == 'object' 16 | } 17 | 18 | 19 | function isDuplex (obj) { 20 | return isReadable(obj) && isWritable(obj) 21 | } 22 | 23 | 24 | module.exports = isStream 25 | module.exports.isReadable = isReadable 26 | module.exports.isWritable = isWritable 27 | module.exports.isDuplex = isDuplex 28 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/jsbn/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store -------------------------------------------------------------------------------- /examples/nodejs/node_modules/jsbn/example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/jsbn/example.js: -------------------------------------------------------------------------------- 1 | var BigInteger = require('./'); 2 | var a = new BigInteger('91823918239182398123'); 3 | console.log(a.bitLength()); -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema-traverse/.eslintrc.yml: -------------------------------------------------------------------------------- 1 | extends: eslint:recommended 2 | env: 3 | node: true 4 | browser: true 5 | rules: 6 | block-scoped-var: 2 7 | complexity: [2, 13] 8 | curly: [2, multi-or-nest, consistent] 9 | dot-location: [2, property] 10 | dot-notation: 2 11 | indent: [2, 2, SwitchCase: 1] 12 | linebreak-style: [2, unix] 13 | new-cap: 2 14 | no-console: [2, allow: [warn, error]] 15 | no-else-return: 2 16 | no-eq-null: 2 17 | no-fallthrough: 2 18 | no-invalid-this: 2 19 | no-return-assign: 2 20 | no-shadow: 1 21 | no-trailing-spaces: 2 22 | no-use-before-define: [2, nofunc] 23 | quotes: [2, single, avoid-escape] 24 | semi: [2, always] 25 | strict: [2, global] 26 | valid-jsdoc: [2, requireReturn: false] 27 | no-control-regex: 0 28 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema-traverse/.npmignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (http://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | .DS_Store 61 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema-traverse/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "4" 4 | - "6" 5 | - "7" 6 | - "8" 7 | after_script: 8 | - coveralls < coverage/lcov.info 9 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema-traverse/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Evgeny Poberezkin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema-traverse/spec/.eslintrc.yml: -------------------------------------------------------------------------------- 1 | parserOptions: 2 | ecmaVersion: 6 3 | globals: 4 | beforeEach: false 5 | describe: false 6 | it: false 7 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/README.md: -------------------------------------------------------------------------------- 1 | JSON Schema is a repository for the JSON Schema specification, reference schemas and a CommonJS implementation of JSON Schema (not the only JavaScript implementation of JSON Schema, JSV is another excellent JavaScript validator). 2 | 3 | Code is licensed under the AFL or BSD license as part of the Persevere 4 | project which is administered under the Dojo foundation, 5 | and all contributions require a Dojo CLA. -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-00/hyper-schema: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-00/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-00/hyper-schema#", 4 | 5 | "properties" : { 6 | "links" : { 7 | "type" : "array", 8 | "items" : {"$ref" : "http://json-schema.org/draft-00/links#"}, 9 | "optional" : true 10 | }, 11 | 12 | "fragmentResolution" : { 13 | "type" : "string", 14 | "optional" : true, 15 | "default" : "dot-delimited" 16 | }, 17 | 18 | "root" : { 19 | "type" : "boolean", 20 | "optional" : true, 21 | "default" : false 22 | }, 23 | 24 | "readonly" : { 25 | "type" : "boolean", 26 | "optional" : true, 27 | "default" : false 28 | }, 29 | 30 | "pathStart" : { 31 | "type" : "string", 32 | "optional" : true, 33 | "format" : "uri" 34 | }, 35 | 36 | "mediaType" : { 37 | "type" : "string", 38 | "optional" : true, 39 | "format" : "media-type" 40 | }, 41 | 42 | "alternate" : { 43 | "type" : "array", 44 | "items" : {"$ref" : "#"}, 45 | "optional" : true 46 | } 47 | }, 48 | 49 | "links" : [ 50 | { 51 | "href" : "{$ref}", 52 | "rel" : "full" 53 | }, 54 | 55 | { 56 | "href" : "{$schema}", 57 | "rel" : "describedby" 58 | }, 59 | 60 | { 61 | "href" : "{id}", 62 | "rel" : "self" 63 | } 64 | ], 65 | 66 | "fragmentResolution" : "dot-delimited", 67 | "extends" : {"$ref" : "http://json-schema.org/draft-00/schema#"} 68 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-00/json-ref: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-00/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-00/json-ref#", 4 | 5 | "items" : {"$ref" : "#"}, 6 | "additionalProperties" : {"$ref" : "#"}, 7 | 8 | "links" : [ 9 | { 10 | "href" : "{$ref}", 11 | "rel" : "full" 12 | }, 13 | 14 | { 15 | "href" : "{$schema}", 16 | "rel" : "describedby" 17 | }, 18 | 19 | { 20 | "href" : "{id}", 21 | "rel" : "self" 22 | } 23 | ], 24 | 25 | "fragmentResolution" : "dot-delimited" 26 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-00/links: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-00/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-00/links#", 4 | "type" : "object", 5 | 6 | "properties" : { 7 | "href" : { 8 | "type" : "string" 9 | }, 10 | 11 | "rel" : { 12 | "type" : "string" 13 | }, 14 | 15 | "method" : { 16 | "type" : "string", 17 | "default" : "GET", 18 | "optional" : true 19 | }, 20 | 21 | "enctype" : { 22 | "type" : "string", 23 | "requires" : "method", 24 | "optional" : true 25 | }, 26 | 27 | "properties" : { 28 | "type" : "object", 29 | "additionalProperties" : {"$ref" : "http://json-schema.org/draft-00/hyper-schema#"}, 30 | "optional" : true 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-01/hyper-schema: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-01/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-01/hyper-schema#", 4 | 5 | "properties" : { 6 | "links" : { 7 | "type" : "array", 8 | "items" : {"$ref" : "http://json-schema.org/draft-01/links#"}, 9 | "optional" : true 10 | }, 11 | 12 | "fragmentResolution" : { 13 | "type" : "string", 14 | "optional" : true, 15 | "default" : "dot-delimited" 16 | }, 17 | 18 | "root" : { 19 | "type" : "boolean", 20 | "optional" : true, 21 | "default" : false 22 | }, 23 | 24 | "readonly" : { 25 | "type" : "boolean", 26 | "optional" : true, 27 | "default" : false 28 | }, 29 | 30 | "pathStart" : { 31 | "type" : "string", 32 | "optional" : true, 33 | "format" : "uri" 34 | }, 35 | 36 | "mediaType" : { 37 | "type" : "string", 38 | "optional" : true, 39 | "format" : "media-type" 40 | }, 41 | 42 | "alternate" : { 43 | "type" : "array", 44 | "items" : {"$ref" : "#"}, 45 | "optional" : true 46 | } 47 | }, 48 | 49 | "links" : [ 50 | { 51 | "href" : "{$ref}", 52 | "rel" : "full" 53 | }, 54 | 55 | { 56 | "href" : "{$schema}", 57 | "rel" : "describedby" 58 | }, 59 | 60 | { 61 | "href" : "{id}", 62 | "rel" : "self" 63 | } 64 | ], 65 | 66 | "fragmentResolution" : "dot-delimited", 67 | "extends" : {"$ref" : "http://json-schema.org/draft-01/schema#"} 68 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-01/json-ref: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-01/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-01/json-ref#", 4 | 5 | "items" : {"$ref" : "#"}, 6 | "additionalProperties" : {"$ref" : "#"}, 7 | 8 | "links" : [ 9 | { 10 | "href" : "{$ref}", 11 | "rel" : "full" 12 | }, 13 | 14 | { 15 | "href" : "{$schema}", 16 | "rel" : "describedby" 17 | }, 18 | 19 | { 20 | "href" : "{id}", 21 | "rel" : "self" 22 | } 23 | ], 24 | 25 | "fragmentResolution" : "dot-delimited" 26 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-01/links: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-01/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-01/links#", 4 | "type" : "object", 5 | 6 | "properties" : { 7 | "href" : { 8 | "type" : "string" 9 | }, 10 | 11 | "rel" : { 12 | "type" : "string" 13 | }, 14 | 15 | "method" : { 16 | "type" : "string", 17 | "default" : "GET", 18 | "optional" : true 19 | }, 20 | 21 | "enctype" : { 22 | "type" : "string", 23 | "requires" : "method", 24 | "optional" : true 25 | }, 26 | 27 | "properties" : { 28 | "type" : "object", 29 | "additionalProperties" : {"$ref" : "http://json-schema.org/draft-01/hyper-schema#"}, 30 | "optional" : true 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-02/hyper-schema: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-02/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-02/hyper-schema#", 4 | 5 | "properties" : { 6 | "links" : { 7 | "type" : "array", 8 | "items" : {"$ref" : "http://json-schema.org/draft-02/links#"}, 9 | "optional" : true 10 | }, 11 | 12 | "fragmentResolution" : { 13 | "type" : "string", 14 | "optional" : true, 15 | "default" : "slash-delimited" 16 | }, 17 | 18 | "root" : { 19 | "type" : "boolean", 20 | "optional" : true, 21 | "default" : false 22 | }, 23 | 24 | "readonly" : { 25 | "type" : "boolean", 26 | "optional" : true, 27 | "default" : false 28 | }, 29 | 30 | "pathStart" : { 31 | "type" : "string", 32 | "optional" : true, 33 | "format" : "uri" 34 | }, 35 | 36 | "mediaType" : { 37 | "type" : "string", 38 | "optional" : true, 39 | "format" : "media-type" 40 | }, 41 | 42 | "alternate" : { 43 | "type" : "array", 44 | "items" : {"$ref" : "#"}, 45 | "optional" : true 46 | } 47 | }, 48 | 49 | "links" : [ 50 | { 51 | "href" : "{$ref}", 52 | "rel" : "full" 53 | }, 54 | 55 | { 56 | "href" : "{$schema}", 57 | "rel" : "describedby" 58 | }, 59 | 60 | { 61 | "href" : "{id}", 62 | "rel" : "self" 63 | } 64 | ], 65 | 66 | "fragmentResolution" : "slash-delimited", 67 | "extends" : {"$ref" : "http://json-schema.org/draft-02/schema#"} 68 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-02/json-ref: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-02/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-02/json-ref#", 4 | 5 | "items" : {"$ref" : "#"}, 6 | "additionalProperties" : {"$ref" : "#"}, 7 | 8 | "links" : [ 9 | { 10 | "href" : "{$ref}", 11 | "rel" : "full" 12 | }, 13 | 14 | { 15 | "href" : "{$schema}", 16 | "rel" : "describedby" 17 | }, 18 | 19 | { 20 | "href" : "{id}", 21 | "rel" : "self" 22 | } 23 | ], 24 | 25 | "fragmentResolution" : "dot-delimited" 26 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-02/links: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-02/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-02/links#", 4 | "type" : "object", 5 | 6 | "properties" : { 7 | "href" : { 8 | "type" : "string" 9 | }, 10 | 11 | "rel" : { 12 | "type" : "string" 13 | }, 14 | 15 | "targetSchema" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, 16 | 17 | "method" : { 18 | "type" : "string", 19 | "default" : "GET", 20 | "optional" : true 21 | }, 22 | 23 | "enctype" : { 24 | "type" : "string", 25 | "requires" : "method", 26 | "optional" : true 27 | }, 28 | 29 | "properties" : { 30 | "type" : "object", 31 | "additionalProperties" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, 32 | "optional" : true 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-03/examples/address: -------------------------------------------------------------------------------- 1 | { 2 | "description" : "An Address following the convention of http://microformats.org/wiki/hcard", 3 | "type" : "object", 4 | "properties" : { 5 | "post-office-box" : { "type" : "string" }, 6 | "extended-address" : { "type" : "string" }, 7 | "street-address" : { "type":"string" }, 8 | "locality" : { "type" : "string", "required" : true }, 9 | "region" : { "type" : "string", "required" : true }, 10 | "postal-code" : { "type" : "string" }, 11 | "country-name" : { "type" : "string", "required" : true } 12 | }, 13 | "dependencies" : { 14 | "post-office-box" : "street-address", 15 | "extended-address" : "street-address", 16 | "street-address" : "region", 17 | "locality" : "region", 18 | "region" : "country-name" 19 | } 20 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-03/examples/calendar: -------------------------------------------------------------------------------- 1 | { 2 | "description" : "A representation of an event", 3 | "type" : "object", 4 | "properties" : { 5 | "dtstart" : { 6 | "format" : "date-time", 7 | "type" : "string", 8 | "description" : "Event starting time", 9 | "required":true 10 | }, 11 | "summary" : { 12 | "type":"string", 13 | "required":true 14 | }, 15 | "location" : { 16 | "type" : "string" 17 | }, 18 | "url" : { 19 | "type" : "string", 20 | "format" : "url" 21 | }, 22 | "dtend" : { 23 | "format" : "date-time", 24 | "type" : "string", 25 | "description" : "Event ending time" 26 | }, 27 | "duration" : { 28 | "format" : "date", 29 | "type" : "string", 30 | "description" : "Event duration" 31 | }, 32 | "rdate" : { 33 | "format" : "date-time", 34 | "type" : "string", 35 | "description" : "Recurrence date" 36 | }, 37 | "rrule" : { 38 | "type" : "string", 39 | "description" : "Recurrence rule" 40 | }, 41 | "category" : { 42 | "type" : "string" 43 | }, 44 | "description" : { 45 | "type" : "string" 46 | }, 47 | "geo" : { "$ref" : "http://json-schema.org/draft-03/geo" } 48 | } 49 | } 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-03/examples/geo: -------------------------------------------------------------------------------- 1 | { 2 | "description" : "A geographical coordinate", 3 | "type" : "object", 4 | "properties" : { 5 | "latitude" : { "type" : "number" }, 6 | "longitude" : { "type" : "number" } 7 | } 8 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-03/examples/interfaces: -------------------------------------------------------------------------------- 1 | { 2 | "extends":"http://json-schema.org/hyper-schema", 3 | "description":"A schema for schema interface definitions that describe programmatic class structures using JSON schema syntax", 4 | "properties":{ 5 | "methods":{ 6 | "type":"object", 7 | "description":"This defines the set of methods available to the class instances", 8 | "additionalProperties":{ 9 | "type":"object", 10 | "description":"The definition of the method", 11 | "properties":{ 12 | "parameters":{ 13 | "type":"array", 14 | "description":"The set of parameters that should be passed to the method when it is called", 15 | "items":{"$ref":"#"}, 16 | "required": true 17 | }, 18 | "returns":{"$ref":"#"} 19 | } 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-03/hyper-schema: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-03/hyper-schema#", 3 | "extends" : {"$ref" : "http://json-schema.org/draft-03/schema#"}, 4 | "id" : "http://json-schema.org/draft-03/hyper-schema#", 5 | 6 | "properties" : { 7 | "links" : { 8 | "type" : "array", 9 | "items" : {"$ref" : "http://json-schema.org/draft-03/links#"} 10 | }, 11 | 12 | "fragmentResolution" : { 13 | "type" : "string", 14 | "default" : "slash-delimited" 15 | }, 16 | 17 | "root" : { 18 | "type" : "boolean", 19 | "default" : false 20 | }, 21 | 22 | "readonly" : { 23 | "type" : "boolean", 24 | "default" : false 25 | }, 26 | 27 | "contentEncoding" : { 28 | "type" : "string" 29 | }, 30 | 31 | "pathStart" : { 32 | "type" : "string", 33 | "format" : "uri" 34 | }, 35 | 36 | "mediaType" : { 37 | "type" : "string", 38 | "format" : "media-type" 39 | } 40 | }, 41 | 42 | "links" : [ 43 | { 44 | "href" : "{id}", 45 | "rel" : "self" 46 | }, 47 | 48 | { 49 | "href" : "{$ref}", 50 | "rel" : "full" 51 | }, 52 | 53 | { 54 | "href" : "{$schema}", 55 | "rel" : "describedby" 56 | } 57 | ], 58 | 59 | "fragmentResolution" : "slash-delimited" 60 | } 61 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-03/json-ref: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-03/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-03/json-ref#", 4 | 5 | "additionalItems" : {"$ref" : "#"}, 6 | "additionalProperties" : {"$ref" : "#"}, 7 | 8 | "links" : [ 9 | { 10 | "href" : "{id}", 11 | "rel" : "self" 12 | }, 13 | 14 | { 15 | "href" : "{$ref}", 16 | "rel" : "full" 17 | }, 18 | 19 | { 20 | "href" : "{$schema}", 21 | "rel" : "describedby" 22 | } 23 | ], 24 | 25 | "fragmentResolution" : "dot-delimited" 26 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-03/links: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-03/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-03/links#", 4 | "type" : "object", 5 | 6 | "properties" : { 7 | "href" : { 8 | "type" : "string", 9 | "required" : true, 10 | "format" : "link-description-object-template" 11 | }, 12 | 13 | "rel" : { 14 | "type" : "string", 15 | "required" : true 16 | }, 17 | 18 | "targetSchema" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"}, 19 | 20 | "method" : { 21 | "type" : "string", 22 | "default" : "GET" 23 | }, 24 | 25 | "enctype" : { 26 | "type" : "string", 27 | "requires" : "method" 28 | }, 29 | 30 | "properties" : { 31 | "type" : "object", 32 | "additionalProperties" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"} 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-04/hyper-schema: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-04/hyper-schema#", 3 | "extends" : {"$ref" : "http://json-schema.org/draft-04/schema#"}, 4 | "id" : "http://json-schema.org/draft-04/hyper-schema#", 5 | 6 | "properties" : { 7 | "links" : { 8 | "type" : "array", 9 | "items" : {"$ref" : "http://json-schema.org/draft-04/links#"} 10 | }, 11 | 12 | "fragmentResolution" : { 13 | "type" : "string", 14 | "default" : "json-pointer" 15 | }, 16 | 17 | "root" : { 18 | "type" : "boolean", 19 | "default" : false 20 | }, 21 | 22 | "readonly" : { 23 | "type" : "boolean", 24 | "default" : false 25 | }, 26 | 27 | "contentEncoding" : { 28 | "type" : "string" 29 | }, 30 | 31 | "pathStart" : { 32 | "type" : "string", 33 | "format" : "uri" 34 | }, 35 | 36 | "mediaType" : { 37 | "type" : "string", 38 | "format" : "media-type" 39 | } 40 | }, 41 | 42 | "links" : [ 43 | { 44 | "href" : "{id}", 45 | "rel" : "self" 46 | }, 47 | 48 | { 49 | "href" : "{$ref}", 50 | "rel" : "full" 51 | }, 52 | 53 | { 54 | "href" : "{$schema}", 55 | "rel" : "describedby" 56 | } 57 | ], 58 | 59 | "fragmentResolution" : "json-pointer" 60 | } 61 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-schema/draft-04/links: -------------------------------------------------------------------------------- 1 | { 2 | "$schema" : "http://json-schema.org/draft-04/hyper-schema#", 3 | "id" : "http://json-schema.org/draft-04/links#", 4 | "type" : "object", 5 | 6 | "properties" : { 7 | "rel" : { 8 | "type" : "string" 9 | }, 10 | 11 | "href" : { 12 | "type" : "string" 13 | }, 14 | 15 | "template" : { 16 | "type" : "string" 17 | }, 18 | 19 | "targetSchema" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"}, 20 | 21 | "method" : { 22 | "type" : "string", 23 | "default" : "GET" 24 | }, 25 | 26 | "enctype" : { 27 | "type" : "string" 28 | }, 29 | 30 | "properties" : { 31 | "type" : "object", 32 | "additionalProperties" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"} 33 | } 34 | }, 35 | 36 | "required" : ["rel", "href"], 37 | 38 | "dependencies" : { 39 | "enctype" : "method" 40 | } 41 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-stringify-safe/.npmignore: -------------------------------------------------------------------------------- 1 | /*.tgz 2 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-stringify-safe/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## Unreleased 2 | - Fixes stringify to only take ancestors into account when checking 3 | circularity. 4 | It previously assumed every visited object was circular which led to [false 5 | positives][issue9]. 6 | Uses the tiny serializer I wrote for [Must.js][must] a year and a half ago. 7 | - Fixes calling the `replacer` function in the proper context (`thisArg`). 8 | - Fixes calling the `cycleReplacer` function in the proper context (`thisArg`). 9 | - Speeds serializing by a factor of 10 | Big-O(h-my-god-it-linearly-searched-every-object) it had ever seen. Searching 11 | only the ancestors for a circular references speeds up things considerably. 12 | 13 | [must]: https://github.com/moll/js-must 14 | [issue9]: https://github.com/isaacs/json-stringify-safe/issues/9 15 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-stringify-safe/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-stringify-safe/Makefile: -------------------------------------------------------------------------------- 1 | NODE_OPTS = 2 | TEST_OPTS = 3 | 4 | love: 5 | @echo "Feel like makin' love." 6 | 7 | test: 8 | @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot $(TEST_OPTS) 9 | 10 | spec: 11 | @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec $(TEST_OPTS) 12 | 13 | autotest: 14 | @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot --watch $(TEST_OPTS) 15 | 16 | autospec: 17 | @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec --watch $(TEST_OPTS) 18 | 19 | pack: 20 | @file=$$(npm pack); echo "$$file"; tar tf "$$file" 21 | 22 | publish: 23 | npm publish 24 | 25 | tag: 26 | git tag "v$$(node -e 'console.log(require("./package").version)')" 27 | 28 | clean: 29 | rm -f *.tgz 30 | npm prune --production 31 | 32 | .PHONY: love 33 | .PHONY: test spec autotest autospec 34 | .PHONY: pack publish tag 35 | .PHONY: clean 36 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-stringify-safe/README.md: -------------------------------------------------------------------------------- 1 | # json-stringify-safe 2 | 3 | Like JSON.stringify, but doesn't throw on circular references. 4 | 5 | ## Usage 6 | 7 | Takes the same arguments as `JSON.stringify`. 8 | 9 | ```javascript 10 | var stringify = require('json-stringify-safe'); 11 | var circularObj = {}; 12 | circularObj.circularRef = circularObj; 13 | circularObj.list = [ circularObj, circularObj ]; 14 | console.log(stringify(circularObj, null, 2)); 15 | ``` 16 | 17 | Output: 18 | 19 | ```json 20 | { 21 | "circularRef": "[Circular]", 22 | "list": [ 23 | "[Circular]", 24 | "[Circular]" 25 | ] 26 | } 27 | ``` 28 | 29 | ## Details 30 | 31 | ``` 32 | stringify(obj, serializer, indent, decycler) 33 | ``` 34 | 35 | The first three arguments are the same as to JSON.stringify. The last 36 | is an argument that's only used when the object has been seen already. 37 | 38 | The default `decycler` function returns the string `'[Circular]'`. 39 | If, for example, you pass in `function(k,v){}` (return nothing) then it 40 | will prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`, 41 | then cyclical objects will always be represented as `{"foo":"bar"}` in 42 | the result. 43 | 44 | ``` 45 | stringify.getSerialize(serializer, decycler) 46 | ``` 47 | 48 | Returns a serializer that can be used elsewhere. This is the actual 49 | function that's passed to JSON.stringify. 50 | 51 | **Note** that the function returned from `getSerialize` is stateful for now, so 52 | do **not** use it more than once. 53 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-stringify-safe/stringify.js: -------------------------------------------------------------------------------- 1 | exports = module.exports = stringify 2 | exports.getSerialize = serializer 3 | 4 | function stringify(obj, replacer, spaces, cycleReplacer) { 5 | return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces) 6 | } 7 | 8 | function serializer(replacer, cycleReplacer) { 9 | var stack = [], keys = [] 10 | 11 | if (cycleReplacer == null) cycleReplacer = function(key, value) { 12 | if (stack[0] === value) return "[Circular ~]" 13 | return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]" 14 | } 15 | 16 | return function(key, value) { 17 | if (stack.length > 0) { 18 | var thisPos = stack.indexOf(this) 19 | ~thisPos ? stack.splice(thisPos + 1) : stack.push(this) 20 | ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key) 21 | if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value) 22 | } 23 | else stack.push(value) 24 | 25 | return replacer == null ? value : replacer.call(this, key, value) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/json-stringify-safe/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --recursive 2 | --require must 3 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/jsprim/CHANGES.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## not yet released 4 | 5 | None yet. 6 | 7 | ## v1.4.1 (2017-08-02) 8 | 9 | * #21 Update verror dep 10 | * #22 Update extsprintf dependency 11 | * #23 update contribution guidelines 12 | 13 | ## v1.4.0 (2017-03-13) 14 | 15 | * #7 Add parseInteger() function for safer number parsing 16 | 17 | ## v1.3.1 (2016-09-12) 18 | 19 | * #13 Incompatible with webpack 20 | 21 | ## v1.3.0 (2016-06-22) 22 | 23 | * #14 add safer version of hasOwnProperty() 24 | * #15 forEachKey() should ignore inherited properties 25 | 26 | ## v1.2.2 (2015-10-15) 27 | 28 | * #11 NPM package shouldn't include any code that does `require('JSV')` 29 | * #12 jsl.node.conf missing definition for "module" 30 | 31 | ## v1.2.1 (2015-10-14) 32 | 33 | * #8 odd date parsing behaviour 34 | 35 | ## v1.2.0 (2015-10-13) 36 | 37 | * #9 want function for returning RFC1123 dates 38 | 39 | ## v1.1.0 (2015-09-02) 40 | 41 | * #6 a new suite of hrtime manipulation routines: `hrtimeAdd()`, 42 | `hrtimeAccum()`, `hrtimeNanosec()`, `hrtimeMicrosec()` and 43 | `hrtimeMillisec()`. 44 | 45 | ## v1.0.0 (2015-09-01) 46 | 47 | First tracked release. Includes everything in previous releases, plus: 48 | 49 | * #4 want function for merging objects 50 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/jsprim/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new 4 | changes. Anyone can submit changes. To get started, see the [cr.joyent.us user 5 | guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). 6 | This repo does not use GitHub pull requests. 7 | 8 | See the [Joyent Engineering 9 | Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general 10 | best practices expected in this repository. 11 | 12 | Contributions should be "make prepush" clean. The "prepush" target runs the 13 | "check" target, which requires these separate tools: 14 | 15 | * https://github.com/davepacheco/jsstyle 16 | * https://github.com/davepacheco/javascriptlint 17 | 18 | If you're changing something non-trivial or user-facing, you may want to submit 19 | an issue first. 20 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/jsprim/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, Joyent, Inc. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE 20 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/jsprim/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "jsprim@^1.2.2", 3 | "_id": "jsprim@1.4.1", 4 | "_inBundle": false, 5 | "_integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", 6 | "_location": "/jsprim", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "range", 10 | "registry": true, 11 | "raw": "jsprim@^1.2.2", 12 | "name": "jsprim", 13 | "escapedName": "jsprim", 14 | "rawSpec": "^1.2.2", 15 | "saveSpec": null, 16 | "fetchSpec": "^1.2.2" 17 | }, 18 | "_requiredBy": [ 19 | "/http-signature" 20 | ], 21 | "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", 22 | "_shasum": "313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2", 23 | "_spec": "jsprim@^1.2.2", 24 | "_where": "C:\\Users\\czf\\Documents\\GitHub\\tg_push_bot\\examples\\nodejs\\node_modules\\http-signature", 25 | "bugs": { 26 | "url": "https://github.com/joyent/node-jsprim/issues" 27 | }, 28 | "bundleDependencies": false, 29 | "dependencies": { 30 | "assert-plus": "1.0.0", 31 | "extsprintf": "1.3.0", 32 | "json-schema": "0.2.3", 33 | "verror": "1.10.0" 34 | }, 35 | "deprecated": false, 36 | "description": "utilities for primitive JavaScript types", 37 | "engines": [ 38 | "node >=0.6.0" 39 | ], 40 | "homepage": "https://github.com/joyent/node-jsprim#readme", 41 | "license": "MIT", 42 | "main": "./lib/jsprim.js", 43 | "name": "jsprim", 44 | "repository": { 45 | "type": "git", 46 | "url": "git://github.com/joyent/node-jsprim.git" 47 | }, 48 | "version": "1.4.1" 49 | } 50 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/mime-db/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/mime-db/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * mime-db 3 | * Copyright(c) 2014 Jonathan Ong 4 | * MIT Licensed 5 | */ 6 | 7 | /** 8 | * Module exports. 9 | */ 10 | 11 | module.exports = require('./db.json') 12 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/mime-types/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 Jonathan Ong 4 | Copyright (c) 2015 Douglas Christopher Wilson 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | 'Software'), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/oauth-sign/README.md: -------------------------------------------------------------------------------- 1 | oauth-sign 2 | ========== 3 | 4 | OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. 5 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/performance-now/.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /examples/nodejs/node_modules/performance-now/.tm_properties: -------------------------------------------------------------------------------- 1 | excludeDirectories = "{.git,node_modules}" 2 | excludeInFolderSearch = "{excludeDirectories,lib}" 3 | 4 | includeFiles = "{.gitignore,.npmignore,.travis.yml}" 5 | 6 | [ attr.untitled ] 7 | fileType = 'source.coffee' -------------------------------------------------------------------------------- /examples/nodejs/node_modules/performance-now/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "node" 4 | - "6" 5 | - "4" 6 | - "0.12" 7 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/performance-now/lib/performance-now.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.12.2 2 | (function() { 3 | var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime; 4 | 5 | if ((typeof performance !== "undefined" && performance !== null) && performance.now) { 6 | module.exports = function() { 7 | return performance.now(); 8 | }; 9 | } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { 10 | module.exports = function() { 11 | return (getNanoSeconds() - nodeLoadTime) / 1e6; 12 | }; 13 | hrtime = process.hrtime; 14 | getNanoSeconds = function() { 15 | var hr; 16 | hr = hrtime(); 17 | return hr[0] * 1e9 + hr[1]; 18 | }; 19 | moduleLoadTime = getNanoSeconds(); 20 | upTime = process.uptime() * 1e9; 21 | nodeLoadTime = moduleLoadTime - upTime; 22 | } else if (Date.now) { 23 | module.exports = function() { 24 | return Date.now() - loadTime; 25 | }; 26 | loadTime = Date.now(); 27 | } else { 28 | module.exports = function() { 29 | return new Date().getTime() - loadTime; 30 | }; 31 | loadTime = new Date().getTime(); 32 | } 33 | 34 | }).call(this); 35 | 36 | //# sourceMappingURL=performance-now.js.map 37 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/performance-now/lib/performance-now.js.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "file": "performance-now.js", 4 | "sourceRoot": "..", 5 | "sources": [ 6 | "src/performance-now.coffee" 7 | ], 8 | "names": [], 9 | "mappings": ";AAAA;AAAA,MAAA;;EAAA,IAAG,4DAAA,IAAiB,WAAW,CAAC,GAAhC;IACE,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,WAAW,CAAC,GAAZ,CAAA;IAAH,EADnB;GAAA,MAEK,IAAG,oDAAA,IAAa,OAAO,CAAC,MAAxB;IACH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,CAAC,cAAA,CAAA,CAAA,GAAmB,YAApB,CAAA,GAAoC;IAAvC;IACjB,MAAA,GAAS,OAAO,CAAC;IACjB,cAAA,GAAiB,SAAA;AACf,UAAA;MAAA,EAAA,GAAK,MAAA,CAAA;aACL,EAAG,CAAA,CAAA,CAAH,GAAQ,GAAR,GAAc,EAAG,CAAA,CAAA;IAFF;IAGjB,cAAA,GAAiB,cAAA,CAAA;IACjB,MAAA,GAAS,OAAO,CAAC,MAAR,CAAA,CAAA,GAAmB;IAC5B,YAAA,GAAe,cAAA,GAAiB,OAR7B;GAAA,MASA,IAAG,IAAI,CAAC,GAAR;IACH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,IAAI,CAAC,GAAL,CAAA,CAAA,GAAa;IAAhB;IACjB,QAAA,GAAW,IAAI,CAAC,GAAL,CAAA,EAFR;GAAA,MAAA;IAIH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAO,IAAA,IAAA,CAAA,CAAM,CAAC,OAAP,CAAA,CAAJ,GAAuB;IAA1B;IACjB,QAAA,GAAe,IAAA,IAAA,CAAA,CAAM,CAAC,OAAP,CAAA,EALZ;;AAXL" 10 | } -------------------------------------------------------------------------------- /examples/nodejs/node_modules/performance-now/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Braveg1rl 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /examples/nodejs/node_modules/performance-now/src/index.d.ts: -------------------------------------------------------------------------------- 1 | // This file describes the package to typescript. 2 | 3 | /** 4 | * Returns the number of milliseconds since the page was loaded (if browser) 5 | * or the node process was started. 6 | */ 7 | declare function now(): number; 8 | export = now; 9 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/performance-now/src/performance-now.coffee: -------------------------------------------------------------------------------- 1 | if performance? and performance.now 2 | module.exports = -> performance.now() 3 | else if process? and process.hrtime 4 | module.exports = -> (getNanoSeconds() - nodeLoadTime) / 1e6 5 | hrtime = process.hrtime 6 | getNanoSeconds = -> 7 | hr = hrtime() 8 | hr[0] * 1e9 + hr[1] 9 | moduleLoadTime = getNanoSeconds() 10 | upTime = process.uptime() * 1e9 11 | nodeLoadTime = moduleLoadTime - upTime 12 | else if Date.now 13 | module.exports = -> Date.now() - loadTime 14 | loadTime = Date.now() 15 | else 16 | module.exports = -> new Date().getTime() - loadTime 17 | loadTime = new Date().getTime() 18 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/performance-now/test/mocha.opts: -------------------------------------------------------------------------------- 1 | --require coffee-script/register 2 | --compilers coffee:coffee-script/register 3 | --reporter spec -------------------------------------------------------------------------------- /examples/nodejs/node_modules/performance-now/test/scripts.coffee: -------------------------------------------------------------------------------- 1 | Bluebird = require "bluebird" 2 | exec = require("child_process").execSync 3 | {assert} = require "chai" 4 | 5 | describe "scripts/initital-value.coffee (module.uptime(), expressed in milliseconds)", -> 6 | result = exec("./test/scripts/initial-value.coffee").toString().trim() 7 | it "printed #{result}", -> 8 | it "printed a value above 100", -> assert.isAbove result, 100 9 | it "printed a value below 350", -> assert.isBelow result, 350 10 | 11 | describe "scripts/delayed-require.coffee (sum of uptime and 250 ms delay`)", -> 12 | result = exec("./test/scripts/delayed-require.coffee").toString().trim() 13 | it "printed #{result}", -> 14 | it "printed a value above 350", -> assert.isAbove result, 350 15 | it "printed a value below 600", -> assert.isBelow result, 600 16 | 17 | describe "scripts/delayed-call.coffee (sum of uptime and 250 ms delay`)", -> 18 | result = exec("./test/scripts/delayed-call.coffee").toString().trim() 19 | it "printed #{result}", -> 20 | it "printed a value above 350", -> assert.isAbove result, 350 21 | it "printed a value below 600", -> assert.isBelow result, 600 22 | 23 | describe "scripts/difference.coffee", -> 24 | result = exec("./test/scripts/difference.coffee").toString().trim() 25 | it "printed #{result}", -> 26 | it "printed a value above 0.005", -> assert.isAbove result, 0.005 27 | it "printed a value below 0.07", -> assert.isBelow result, 0.07 28 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/performance-now/test/scripts/delayed-call.coffee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ./node_modules/.bin/coffee 2 | 3 | ### 4 | Expected output is a number above 350 and below 600. 5 | The time reported is relative to the time the node.js process was started 6 | this is approximately at `(Date.now() process.uptime() * 1000)` 7 | ### 8 | 9 | delay = require "call-delayed" 10 | now = require "../../lib/performance-now" 11 | delay 250, -> console.log now().toFixed 3 12 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/performance-now/test/scripts/delayed-require.coffee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ./node_modules/.bin/coffee 2 | 3 | ### 4 | Expected output is a number above 350 and below 600. 5 | The time reported is relative to the time the node.js process was started 6 | this is approximately at `(Date.now() process.uptime() * 1000)` 7 | ### 8 | 9 | delay = require "call-delayed" 10 | delay 250, -> 11 | now = require "../../lib/performance-now" 12 | console.log now().toFixed 3 13 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/performance-now/test/scripts/difference.coffee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ./node_modules/.bin/coffee 2 | 3 | # Expected output is above 0.005 and below 0.07. 4 | 5 | now = require('../../lib/performance-now') 6 | console.log -(now() - now()).toFixed 3 7 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/performance-now/test/scripts/initial-value.coffee: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ./node_modules/.bin/coffee 2 | 3 | ### 4 | Expected output is a number above 100 and below 350. 5 | The time reported is relative to the time the node.js process was started 6 | this is approximately at `(Date.now() process.uptime() * 1000)` 7 | ### 8 | 9 | now = require '../../lib/performance-now' 10 | console.log now().toFixed 3 11 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/punycode/LICENSE-MIT.txt: -------------------------------------------------------------------------------- 1 | Copyright Mathias Bynens 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/qs/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | max_line_length = 140 11 | 12 | [test/*] 13 | max_line_length = off 14 | 15 | [*.md] 16 | max_line_length = off 17 | 18 | [*.json] 19 | max_line_length = off 20 | 21 | [Makefile] 22 | max_line_length = off 23 | 24 | [CHANGELOG.md] 25 | indent_style = space 26 | indent_size = 2 27 | 28 | [LICENSE] 29 | indent_size = 2 30 | max_line_length = off 31 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/qs/.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/qs/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "@ljharb", 5 | 6 | "rules": { 7 | "complexity": [2, 28], 8 | "consistent-return": 1, 9 | "func-name-matching": 0, 10 | "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], 11 | "indent": [2, 4], 12 | "max-params": [2, 12], 13 | "max-statements": [2, 45], 14 | "no-continue": 1, 15 | "no-magic-numbers": 0, 16 | "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], 17 | "operator-linebreak": [2, "before"], 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/qs/lib/formats.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var replace = String.prototype.replace; 4 | var percentTwenties = /%20/g; 5 | 6 | module.exports = { 7 | 'default': 'RFC3986', 8 | formatters: { 9 | RFC1738: function (value) { 10 | return replace.call(value, percentTwenties, '+'); 11 | }, 12 | RFC3986: function (value) { 13 | return value; 14 | } 15 | }, 16 | RFC1738: 'RFC1738', 17 | RFC3986: 'RFC3986' 18 | }; 19 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/qs/lib/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var stringify = require('./stringify'); 4 | var parse = require('./parse'); 5 | var formats = require('./formats'); 6 | 7 | module.exports = { 8 | formats: formats, 9 | parse: parse, 10 | stringify: stringify 11 | }; 12 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/qs/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "array-bracket-newline": 0, 4 | "array-element-newline": 0, 5 | "consistent-return": 2, 6 | "max-lines": 0, 7 | "max-nested-callbacks": [2, 3], 8 | "max-statements": 0, 9 | "no-buffer-constructor": 0, 10 | "no-extend-native": 0, 11 | "no-magic-numbers": 0, 12 | "object-curly-newline": 0, 13 | "sort-keys": 0 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/qs/test/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('./parse'); 4 | 5 | require('./stringify'); 6 | 7 | require('./utils'); 8 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/qs/test/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var test = require('tape'); 4 | var utils = require('../lib/utils'); 5 | 6 | test('merge()', function (t) { 7 | t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key'); 8 | 9 | var oneMerged = utils.merge({ foo: 'bar' }, { foo: { first: '123' } }); 10 | t.deepEqual(oneMerged, { foo: ['bar', { first: '123' }] }, 'merges a standalone and an object into an array'); 11 | 12 | var twoMerged = utils.merge({ foo: ['bar', { first: '123' }] }, { foo: { second: '456' } }); 13 | t.deepEqual(twoMerged, { foo: { 0: 'bar', 1: { first: '123' }, second: '456' } }, 'merges a standalone and two objects into an array'); 14 | 15 | var sandwiched = utils.merge({ foo: ['bar', { first: '123', second: '456' }] }, { foo: 'baz' }); 16 | t.deepEqual(sandwiched, { foo: ['bar', { first: '123', second: '456' }, 'baz'] }, 'merges an object sandwiched by two standalones into an array'); 17 | 18 | var nestedArrays = utils.merge({ foo: ['baz'] }, { foo: ['bar', 'xyzzy'] }); 19 | t.deepEqual(nestedArrays, { foo: ['baz', 'bar', 'xyzzy'] }); 20 | 21 | t.end(); 22 | }); 23 | 24 | test('assign()', function (t) { 25 | var target = { a: 1, b: 2 }; 26 | var source = { b: 3, c: 4 }; 27 | var result = utils.assign(target, source); 28 | 29 | t.equal(result, target, 'returns the target'); 30 | t.deepEqual(target, { a: 1, b: 3, c: 4 }, 'target and source are merged'); 31 | t.deepEqual(source, { b: 3, c: 4 }, 'source is untouched'); 32 | 33 | t.end(); 34 | }); 35 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/request/lib/cookies.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var tough = require('tough-cookie') 4 | 5 | var Cookie = tough.Cookie 6 | var CookieJar = tough.CookieJar 7 | 8 | exports.parse = function (str) { 9 | if (str && str.uri) { 10 | str = str.uri 11 | } 12 | if (typeof str !== 'string') { 13 | throw new Error('The cookie function only accepts STRING as param') 14 | } 15 | return Cookie.parse(str, {loose: true}) 16 | } 17 | 18 | // Adapt the sometimes-Async api of tough.CookieJar to our requirements 19 | function RequestJar (store) { 20 | var self = this 21 | self._jar = new CookieJar(store, {looseMode: true}) 22 | } 23 | RequestJar.prototype.setCookie = function (cookieOrStr, uri, options) { 24 | var self = this 25 | return self._jar.setCookieSync(cookieOrStr, uri, options || {}) 26 | } 27 | RequestJar.prototype.getCookieString = function (uri) { 28 | var self = this 29 | return self._jar.getCookieStringSync(uri) 30 | } 31 | RequestJar.prototype.getCookies = function (uri) { 32 | var self = this 33 | return self._jar.getCookiesSync(uri) 34 | } 35 | 36 | exports.jar = function (store) { 37 | return new RequestJar(store) 38 | } 39 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/request/lib/querystring.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var qs = require('qs') 4 | var querystring = require('querystring') 5 | 6 | function Querystring (request) { 7 | this.request = request 8 | this.lib = null 9 | this.useQuerystring = null 10 | this.parseOptions = null 11 | this.stringifyOptions = null 12 | } 13 | 14 | Querystring.prototype.init = function (options) { 15 | if (this.lib) { return } 16 | 17 | this.useQuerystring = options.useQuerystring 18 | this.lib = (this.useQuerystring ? querystring : qs) 19 | 20 | this.parseOptions = options.qsParseOptions || {} 21 | this.stringifyOptions = options.qsStringifyOptions || {} 22 | } 23 | 24 | Querystring.prototype.stringify = function (obj) { 25 | return (this.useQuerystring) 26 | ? this.rfc3986(this.lib.stringify(obj, 27 | this.stringifyOptions.sep || null, 28 | this.stringifyOptions.eq || null, 29 | this.stringifyOptions)) 30 | : this.lib.stringify(obj, this.stringifyOptions) 31 | } 32 | 33 | Querystring.prototype.parse = function (str) { 34 | return (this.useQuerystring) 35 | ? this.lib.parse(str, 36 | this.parseOptions.sep || null, 37 | this.parseOptions.eq || null, 38 | this.parseOptions) 39 | : this.lib.parse(str, this.parseOptions) 40 | } 41 | 42 | Querystring.prototype.rfc3986 = function (str) { 43 | return str.replace(/[!'()*]/g, function (c) { 44 | return '%' + c.charCodeAt(0).toString(16).toUpperCase() 45 | }) 46 | } 47 | 48 | Querystring.prototype.unescape = querystring.unescape 49 | 50 | exports.Querystring = Querystring 51 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/safe-buffer/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 'node' 4 | - '5' 5 | - '4' 6 | - '0.12' 7 | - '0.10' 8 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/safe-buffer/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Feross Aboukhadijeh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/sntp/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !lib/** 3 | !.npmignore 4 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/sshpk/.npmignore: -------------------------------------------------------------------------------- 1 | .gitmodules 2 | deps 3 | docs 4 | Makefile 5 | node_modules 6 | test 7 | tools 8 | coverage 9 | man/src 10 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/sshpk/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "5.10" 4 | - "4.4" 5 | - "4.1" 6 | - "0.12" 7 | - "0.10" 8 | before_install: 9 | - "make check" 10 | after_success: 11 | - '[ "${TRAVIS_NODE_VERSION}" = "4.4" ] && make codecovio' 12 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/sshpk/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Joyent, Inc. All rights reserved. 2 | Permission is hereby granted, free of charge, to any person obtaining a copy 3 | of this software and associated documentation files (the "Software"), to 4 | deal in the Software without restriction, including without limitation the 5 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 6 | sell copies of the Software, and to permit persons to whom the Software is 7 | furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in 10 | all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 18 | IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/sshpk/lib/index.js: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Joyent, Inc. 2 | 3 | var Key = require('./key'); 4 | var Fingerprint = require('./fingerprint'); 5 | var Signature = require('./signature'); 6 | var PrivateKey = require('./private-key'); 7 | var Certificate = require('./certificate'); 8 | var Identity = require('./identity'); 9 | var errs = require('./errors'); 10 | 11 | module.exports = { 12 | /* top-level classes */ 13 | Key: Key, 14 | parseKey: Key.parse, 15 | Fingerprint: Fingerprint, 16 | parseFingerprint: Fingerprint.parse, 17 | Signature: Signature, 18 | parseSignature: Signature.parse, 19 | PrivateKey: PrivateKey, 20 | parsePrivateKey: PrivateKey.parse, 21 | generatePrivateKey: PrivateKey.generate, 22 | Certificate: Certificate, 23 | parseCertificate: Certificate.parse, 24 | createSelfSignedCertificate: Certificate.createSelfSigned, 25 | createCertificate: Certificate.create, 26 | Identity: Identity, 27 | identityFromDN: Identity.parseDN, 28 | identityForHost: Identity.forHost, 29 | identityForUser: Identity.forUser, 30 | identityForEmail: Identity.forEmail, 31 | 32 | /* errors */ 33 | FingerprintFormatError: errs.FingerprintFormatError, 34 | InvalidAlgorithmError: errs.InvalidAlgorithmError, 35 | KeyParseError: errs.KeyParseError, 36 | SignatureParseError: errs.SignatureParseError, 37 | KeyEncryptedError: errs.KeyEncryptedError, 38 | CertificateParseError: errs.CertificateParseError 39 | }; 40 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/stringstream/.npmignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.log 4 | *.csv 5 | *.dat 6 | *.out 7 | *.pid 8 | *.gz 9 | 10 | pids 11 | logs 12 | results 13 | 14 | node_modules 15 | npm-debug.log -------------------------------------------------------------------------------- /examples/nodejs/node_modules/stringstream/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/stringstream/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Michael Hart (michael.hart.au@gmail.com) 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/stringstream/README.md: -------------------------------------------------------------------------------- 1 | # Decode streams into strings The Right Way(tm) 2 | 3 | ```javascript 4 | var fs = require('fs') 5 | var zlib = require('zlib') 6 | var strs = require('stringstream') 7 | 8 | var utf8Stream = fs.createReadStream('massiveLogFile.gz') 9 | .pipe(zlib.createGunzip()) 10 | .pipe(strs('utf8')) 11 | ``` 12 | 13 | No need to deal with `setEncoding()` weirdness, just compose streams 14 | like they were supposed to be! 15 | 16 | Handles input and output encoding: 17 | 18 | ```javascript 19 | // Stream from utf8 to hex to base64... Why not, ay. 20 | var hex64Stream = fs.createReadStream('myFile') 21 | .pipe(strs('utf8', 'hex')) 22 | .pipe(strs('hex', 'base64')) 23 | ``` 24 | 25 | Also deals with `base64` output correctly by aligning each emitted data 26 | chunk so that there are no dangling `=` characters: 27 | 28 | ```javascript 29 | var stream = fs.createReadStream('myFile').pipe(strs('base64')) 30 | 31 | var base64Str = '' 32 | 33 | stream.on('data', function(data) { base64Str += data }) 34 | stream.on('end', function() { 35 | console.log('My base64 encoded file is: ' + base64Str) // Wouldn't work with setEncoding() 36 | console.log('Original file is: ' + new Buffer(base64Str, 'base64')) 37 | }) 38 | ``` 39 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/stringstream/example.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | var zlib = require('zlib') 3 | var strs = require('stringstream') 4 | 5 | var utf8Stream = fs.createReadStream('massiveLogFile.gz') 6 | .pipe(zlib.createGunzip()) 7 | .pipe(strs('utf8')) 8 | 9 | utf8Stream.pipe(process.stdout) 10 | 11 | // Stream from utf8 to hex to base64... Why not, ay. 12 | var hex64Stream = fs.createReadStream('myFile') 13 | .pipe(strs('utf8', 'hex')) 14 | .pipe(strs('hex', 'base64')) 15 | 16 | hex64Stream.pipe(process.stdout) 17 | 18 | // Deals with base64 correctly by aligning chunks 19 | var stream = fs.createReadStream('myFile').pipe(strs('base64')) 20 | 21 | var base64Str = '' 22 | 23 | stream.on('data', function(data) { base64Str += data }) 24 | stream.on('end', function() { 25 | console.log('My base64 encoded file is: ' + base64Str) // Wouldn't work with setEncoding() 26 | console.log('Original file is: ' + new Buffer(base64Str, 'base64')) 27 | }) 28 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/tunnel-agent/README.md: -------------------------------------------------------------------------------- 1 | tunnel-agent 2 | ============ 3 | 4 | HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module. 5 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/tweetnacl/.npmignore: -------------------------------------------------------------------------------- 1 | .eslintrc 2 | .travis.yml 3 | bower.json 4 | test 5 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/tweetnacl/AUTHORS.md: -------------------------------------------------------------------------------- 1 | List of TweetNaCl.js authors 2 | ============================ 3 | 4 | Alphabetical order by first name. 5 | Format: Name (GitHub username or URL) 6 | 7 | * AndSDev (@AndSDev) 8 | * Devi Mandiri (@devi) 9 | * Dmitry Chestnykh (@dchest) 10 | 11 | List of authors of third-party public domain code from which TweetNaCl.js code was derived 12 | ========================================================================================== 13 | 14 | [TweetNaCl](http://tweetnacl.cr.yp.to/) 15 | -------------------------------------- 16 | 17 | * Bernard van Gastel 18 | * Daniel J. Bernstein 19 | * Peter Schwabe 20 | * Sjaak Smetsers 21 | * Tanja Lange 22 | * Wesley Janssen 23 | 24 | 25 | [Poly1305-donna](https://github.com/floodyberry/poly1305-donna) 26 | -------------------------------------------------------------- 27 | 28 | * Andrew Moon (@floodyberry) 29 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/tweetnacl/LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Important! 2 | 3 | If your contribution is not trivial (not a typo fix, etc.), we can only accept 4 | it if you dedicate your copyright for the contribution to the public domain. 5 | Make sure you understand what it means (see http://unlicense.org/)! If you 6 | agree, please add yourself to AUTHORS.md file, and include the following text 7 | to your pull request description or a comment in it: 8 | 9 | ------------------------------------------------------------------------------ 10 | 11 | I dedicate any and all copyright interest in this software to the 12 | public domain. I make this dedication for the benefit of the public at 13 | large and to the detriment of my heirs and successors. I intend this 14 | dedication to be an overt act of relinquishment in perpetuity of all 15 | present and future rights to this software under copyright law. 16 | 17 | Anyone is free to copy, modify, publish, use, compile, sell, or 18 | distribute this software, either in source code form or as a compiled 19 | binary, for any purpose, commercial or non-commercial, and by any 20 | means. 21 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/uuid/AUTHORS: -------------------------------------------------------------------------------- 1 | Robert Kieffer 2 | Christoph Tavan 3 | AJ ONeal 4 | Vincent Voyer 5 | Roman Shtylman 6 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/uuid/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2010-2016 Robert Kieffer and other contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/uuid/index.js: -------------------------------------------------------------------------------- 1 | var v1 = require('./v1'); 2 | var v4 = require('./v4'); 3 | 4 | var uuid = v4; 5 | uuid.v1 = v1; 6 | uuid.v4 = v4; 7 | 8 | module.exports = uuid; 9 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/uuid/lib/bytesToUuid.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Convert array of 16 byte values to UUID string format of the form: 3 | * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX 4 | */ 5 | var byteToHex = []; 6 | for (var i = 0; i < 256; ++i) { 7 | byteToHex[i] = (i + 0x100).toString(16).substr(1); 8 | } 9 | 10 | function bytesToUuid(buf, offset) { 11 | var i = offset || 0; 12 | var bth = byteToHex; 13 | return bth[buf[i++]] + bth[buf[i++]] + 14 | bth[buf[i++]] + bth[buf[i++]] + '-' + 15 | bth[buf[i++]] + bth[buf[i++]] + '-' + 16 | bth[buf[i++]] + bth[buf[i++]] + '-' + 17 | bth[buf[i++]] + bth[buf[i++]] + '-' + 18 | bth[buf[i++]] + bth[buf[i++]] + 19 | bth[buf[i++]] + bth[buf[i++]] + 20 | bth[buf[i++]] + bth[buf[i++]]; 21 | } 22 | 23 | module.exports = bytesToUuid; 24 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/uuid/lib/md5.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var crypto = require('crypto'); 4 | 5 | function md5(bytes) { 6 | if (typeof Buffer.from === 'function') { 7 | // Modern Buffer API 8 | if (Array.isArray(bytes)) { 9 | bytes = Buffer.from(bytes); 10 | } else if (typeof bytes === 'string') { 11 | bytes = Buffer.from(bytes, 'utf8'); 12 | } 13 | } else { 14 | // Pre-v4 Buffer API 15 | if (Array.isArray(bytes)) { 16 | bytes = new Buffer(bytes); 17 | } else if (typeof bytes === 'string') { 18 | bytes = new Buffer(bytes, 'utf8'); 19 | } 20 | } 21 | 22 | return crypto.createHash('md5').update(bytes).digest(); 23 | } 24 | 25 | module.exports = md5; 26 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/uuid/lib/rng-browser.js: -------------------------------------------------------------------------------- 1 | // Unique ID creation requires a high quality random # generator. In the 2 | // browser this is a little complicated due to unknown quality of Math.random() 3 | // and inconsistent support for the `crypto` API. We do the best we can via 4 | // feature-detection 5 | 6 | // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. 7 | var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) || 8 | (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto)); 9 | if (getRandomValues) { 10 | // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto 11 | var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef 12 | 13 | module.exports = function whatwgRNG() { 14 | getRandomValues(rnds8); 15 | return rnds8; 16 | }; 17 | } else { 18 | // Math.random()-based (RNG) 19 | // 20 | // If all else fails, use Math.random(). It's fast, but is of unspecified 21 | // quality. 22 | var rnds = new Array(16); 23 | 24 | module.exports = function mathRNG() { 25 | for (var i = 0, r; i < 16; i++) { 26 | if ((i & 0x03) === 0) r = Math.random() * 0x100000000; 27 | rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; 28 | } 29 | 30 | return rnds; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/uuid/lib/rng.js: -------------------------------------------------------------------------------- 1 | // Unique ID creation requires a high quality random # generator. In node.js 2 | // this is pretty straight-forward - we use the crypto API. 3 | 4 | var crypto = require('crypto'); 5 | 6 | module.exports = function nodeRNG() { 7 | return crypto.randomBytes(16); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/uuid/lib/sha1.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var crypto = require('crypto'); 4 | 5 | function sha1(bytes) { 6 | if (typeof Buffer.from === 'function') { 7 | // Modern Buffer API 8 | if (Array.isArray(bytes)) { 9 | bytes = Buffer.from(bytes); 10 | } else if (typeof bytes === 'string') { 11 | bytes = Buffer.from(bytes, 'utf8'); 12 | } 13 | } else { 14 | // Pre-v4 Buffer API 15 | if (Array.isArray(bytes)) { 16 | bytes = new Buffer(bytes); 17 | } else if (typeof bytes === 'string') { 18 | bytes = new Buffer(bytes, 'utf8'); 19 | } 20 | } 21 | 22 | return crypto.createHash('sha1').update(bytes).digest(); 23 | } 24 | 25 | module.exports = sha1; 26 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/uuid/v3.js: -------------------------------------------------------------------------------- 1 | var v35 = require('./lib/v35.js'); 2 | var md5 = require('./lib/md5'); 3 | 4 | module.exports = v35('v3', 0x30, md5); -------------------------------------------------------------------------------- /examples/nodejs/node_modules/uuid/v4.js: -------------------------------------------------------------------------------- 1 | var rng = require('./lib/rng'); 2 | var bytesToUuid = require('./lib/bytesToUuid'); 3 | 4 | function v4(options, buf, offset) { 5 | var i = buf && offset || 0; 6 | 7 | if (typeof(options) == 'string') { 8 | buf = options === 'binary' ? new Array(16) : null; 9 | options = null; 10 | } 11 | options = options || {}; 12 | 13 | var rnds = options.random || (options.rng || rng)(); 14 | 15 | // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` 16 | rnds[6] = (rnds[6] & 0x0f) | 0x40; 17 | rnds[8] = (rnds[8] & 0x3f) | 0x80; 18 | 19 | // Copy bytes to buffer, if provided 20 | if (buf) { 21 | for (var ii = 0; ii < 16; ++ii) { 22 | buf[i + ii] = rnds[ii]; 23 | } 24 | } 25 | 26 | return buf || bytesToUuid(rnds); 27 | } 28 | 29 | module.exports = v4; 30 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/uuid/v5.js: -------------------------------------------------------------------------------- 1 | var v35 = require('./lib/v35.js'); 2 | var sha1 = require('./lib/sha1'); 3 | module.exports = v35('v5', 0x50, sha1); 4 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/verror/.npmignore: -------------------------------------------------------------------------------- 1 | .gitignore 2 | .gitmodules 3 | deps 4 | examples 5 | experiments 6 | jsl.node.conf 7 | Makefile 8 | Makefile.targ 9 | test 10 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/verror/CHANGES.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## Not yet released 4 | 5 | None yet. 6 | 7 | ## v1.10.0 8 | 9 | * #49 want convenience functions for MultiErrors 10 | 11 | ## v1.9.0 12 | 13 | * #47 could use VError.hasCauseWithName() 14 | 15 | ## v1.8.1 16 | 17 | * #39 captureStackTrace lost when inheriting from WError 18 | 19 | ## v1.8.0 20 | 21 | * #23 Preserve original stack trace(s) 22 | 23 | ## v1.7.0 24 | 25 | * #10 better support for extra properties on Errors 26 | * #11 make it easy to find causes of a particular kind 27 | * #29 No documentation on how to Install this package 28 | * #36 elide development-only files from npm package 29 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/verror/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new 4 | changes. Anyone can submit changes. To get started, see the [cr.joyent.us user 5 | guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). 6 | This repo does not use GitHub pull requests. 7 | 8 | See the [Joyent Engineering 9 | Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general 10 | best practices expected in this repository. 11 | 12 | Contributions should be "make prepush" clean. The "prepush" target runs the 13 | "check" target, which requires these separate tools: 14 | 15 | * https://github.com/davepacheco/jsstyle 16 | * https://github.com/davepacheco/javascriptlint 17 | 18 | If you're changing something non-trivial or user-facing, you may want to submit 19 | an issue first. 20 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/verror/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016, Joyent, Inc. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE 20 | -------------------------------------------------------------------------------- /examples/nodejs/node_modules/verror/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "verror@1.10.0", 3 | "_id": "verror@1.10.0", 4 | "_inBundle": false, 5 | "_integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", 6 | "_location": "/verror", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "version", 10 | "registry": true, 11 | "raw": "verror@1.10.0", 12 | "name": "verror", 13 | "escapedName": "verror", 14 | "rawSpec": "1.10.0", 15 | "saveSpec": null, 16 | "fetchSpec": "1.10.0" 17 | }, 18 | "_requiredBy": [ 19 | "/jsprim" 20 | ], 21 | "_resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", 22 | "_shasum": "3a105ca17053af55d6e270c1f8288682e18da400", 23 | "_spec": "verror@1.10.0", 24 | "_where": "C:\\Users\\czf\\Documents\\GitHub\\tg_push_bot\\examples\\nodejs\\node_modules\\jsprim", 25 | "bugs": { 26 | "url": "https://github.com/davepacheco/node-verror/issues" 27 | }, 28 | "bundleDependencies": false, 29 | "dependencies": { 30 | "assert-plus": "^1.0.0", 31 | "core-util-is": "1.0.2", 32 | "extsprintf": "^1.2.0" 33 | }, 34 | "deprecated": false, 35 | "description": "richer JavaScript errors", 36 | "engines": [ 37 | "node >=0.6.0" 38 | ], 39 | "homepage": "https://github.com/davepacheco/node-verror#readme", 40 | "license": "MIT", 41 | "main": "./lib/verror.js", 42 | "name": "verror", 43 | "repository": { 44 | "type": "git", 45 | "url": "git://github.com/davepacheco/node-verror.git" 46 | }, 47 | "scripts": { 48 | "test": "make test" 49 | }, 50 | "version": "1.10.0" 51 | } 52 | -------------------------------------------------------------------------------- /examples/nodejs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodejs", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "main.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Fndroid", 10 | "license": "ISC", 11 | "dependencies": { 12 | "request": "^2.85.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/python/main.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | url = 'https://tgbot.lbyczf.com/sendMessage/xxx' 4 | form = { 'text': 'Hello world!' } 5 | 6 | resp = requests.post(url, data=form) 7 | print(resp) -------------------------------------------------------------------------------- /imgs/photo_2018-04-21_15-29-55.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fndroid/tg_push_bot/dba0dde8f97ea902a2aa9aa4cdb568682242f721/imgs/photo_2018-04-21_15-29-55.jpg -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodejs", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "server.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "node server.js" 9 | }, 10 | "author": "Fndroid", 11 | "license": "ISC", 12 | "dependencies": { 13 | "body-parser": "^1.18.2", 14 | "express": "^4.16.3", 15 | "pm2": "^2.10.2", 16 | "request": "^2.85.0", 17 | "sqlite3": "^4.0.0", 18 | "uniqid": "^4.1.1" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /sqliteScirpt.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE users (chatId int unique, chatToken text unique); 2 | --------------------------------------------------------------------------------