From 82b1769fc9dda80c21cea2dfaccb039025327628 Mon Sep 17 00:00:00 2001 From: Matvey Aksenov Date: Mon, 23 Nov 2015 21:27:00 +0000 Subject: [PATCH] the latest ldapjs is firmly in the insane shit camp, but I think I've massaged it into a working condition --- npm/nodePackages/abbrev/1.0.7.nix | 14 -------- npm/nodePackages/abbrev/latest.nix | 1 - .../asn1/{0.2.1.nix => 0.2.3.nix} | 6 ++-- npm/nodePackages/asn1/latest.nix | 2 +- npm/nodePackages/backoff/2.4.1.nix | 21 +++++++++++ npm/nodePackages/backoff/latest.nix | 1 + npm/nodePackages/bunyan/0.22.1.nix | 26 -------------- npm/nodePackages/bunyan/1.5.1.nix | 30 ++++++++++++++++ npm/nodePackages/bunyan/latest.nix | 2 +- npm/nodePackages/dashdash/1.10.1.nix | 24 +++++++++++++ npm/nodePackages/dashdash/latest.nix | 1 + .../dtrace-provider/{0.2.8.nix => 0.6.0.nix} | 10 +++--- npm/nodePackages/dtrace-provider/latest.nix | 2 +- .../extsprintf/{1.0.0.nix => 1.2.0.nix} | 7 ++-- npm/nodePackages/extsprintf/latest.nix | 2 +- npm/nodePackages/json-schema/0.2.2.nix | 14 -------- npm/nodePackages/jsprim/0.3.0.nix | 18 ---------- npm/nodePackages/jsprim/latest.nix | 1 - npm/nodePackages/ldap-filter/0.2.2.nix | 16 +++++++++ .../{json-schema => ldap-filter}/latest.nix | 0 npm/nodePackages/ldapjs/0.7.1.nix | 24 ------------- npm/nodePackages/ldapjs/1.0.0.nix | 28 +++++++++++++++ npm/nodePackages/ldapjs/latest.nix | 2 +- npm/nodePackages/minimist/0.0.8.nix | 20 +++++++++++ npm/nodePackages/minimist/latest.nix | 1 + npm/nodePackages/mkdirp/0.5.1.nix | 20 +++++++++++ npm/nodePackages/mkdirp/latest.nix | 1 + npm/nodePackages/mv/{0.0.5.nix => 2.0.3.nix} | 13 ++++--- npm/nodePackages/mv/latest.nix | 2 +- npm/nodePackages/nan/2.1.0.nix | 14 ++++++++ npm/nodePackages/nan/latest.nix | 1 + npm/nodePackages/ncp/0.6.0.nix | 15 ++++++++ npm/nodePackages/ncp/latest.nix | 1 + npm/nodePackages/nopt/2.1.1.nix | 16 --------- npm/nodePackages/nopt/latest.nix | 1 - .../once/{1.3.0.nix => 1.3.2.nix} | 11 +++--- npm/nodePackages/once/latest.nix | 2 +- npm/nodePackages/pooling/0.4.6.nix | 23 ------------ npm/nodePackages/pooling/latest.nix | 1 - npm/nodePackages/precond/0.2.3.nix | 20 +++++++++++ npm/nodePackages/precond/latest.nix | 1 + npm/nodePackages/rimraf/2.2.8.nix | 15 ++++++++ npm/nodePackages/rimraf/latest.nix | 1 + .../safe-json-stringify/1.0.3.nix | 14 ++++++++ .../safe-json-stringify/latest.nix | 1 + .../vasync/{1.4.0.nix => 1.6.3.nix} | 11 +++--- npm/nodePackages/vasync/latest.nix | 2 +- npm/nodePackages/verror/1.3.3.nix | 16 --------- .../verror/{1.1.0.nix => 1.6.0.nix} | 9 ++--- npm/nodePackages/verror/latest.nix | 2 +- npm/nodePackages/wrappy/1.0.1.nix | 14 ++++++++ npm/nodePackages/wrappy/latest.nix | 1 + test/Ldap/Client/DeleteSpec.hs | 4 +-- test/Ldap/Client/ModifySpec.hs | 2 +- test/SpecHelper.hs | 36 ++++++++++--------- test/ldap.js | 35 +++++++++--------- 56 files changed, 351 insertions(+), 227 deletions(-) delete mode 100644 npm/nodePackages/abbrev/1.0.7.nix delete mode 120000 npm/nodePackages/abbrev/latest.nix rename npm/nodePackages/asn1/{0.2.1.nix => 0.2.3.nix} (66%) create mode 100644 npm/nodePackages/backoff/2.4.1.nix create mode 120000 npm/nodePackages/backoff/latest.nix delete mode 100644 npm/nodePackages/bunyan/0.22.1.nix create mode 100644 npm/nodePackages/bunyan/1.5.1.nix create mode 100644 npm/nodePackages/dashdash/1.10.1.nix create mode 120000 npm/nodePackages/dashdash/latest.nix rename npm/nodePackages/dtrace-provider/{0.2.8.nix => 0.6.0.nix} (70%) rename npm/nodePackages/extsprintf/{1.0.0.nix => 1.2.0.nix} (64%) delete mode 100644 npm/nodePackages/json-schema/0.2.2.nix delete mode 100644 npm/nodePackages/jsprim/0.3.0.nix delete mode 120000 npm/nodePackages/jsprim/latest.nix create mode 100644 npm/nodePackages/ldap-filter/0.2.2.nix rename npm/nodePackages/{json-schema => ldap-filter}/latest.nix (100%) delete mode 100644 npm/nodePackages/ldapjs/0.7.1.nix create mode 100644 npm/nodePackages/ldapjs/1.0.0.nix create mode 100644 npm/nodePackages/minimist/0.0.8.nix create mode 120000 npm/nodePackages/minimist/latest.nix create mode 100644 npm/nodePackages/mkdirp/0.5.1.nix create mode 120000 npm/nodePackages/mkdirp/latest.nix rename npm/nodePackages/mv/{0.0.5.nix => 2.0.3.nix} (54%) create mode 100644 npm/nodePackages/nan/2.1.0.nix create mode 120000 npm/nodePackages/nan/latest.nix create mode 100644 npm/nodePackages/ncp/0.6.0.nix create mode 120000 npm/nodePackages/ncp/latest.nix delete mode 100644 npm/nodePackages/nopt/2.1.1.nix delete mode 120000 npm/nodePackages/nopt/latest.nix rename npm/nodePackages/once/{1.3.0.nix => 1.3.2.nix} (51%) delete mode 100644 npm/nodePackages/pooling/0.4.6.nix delete mode 120000 npm/nodePackages/pooling/latest.nix create mode 100644 npm/nodePackages/precond/0.2.3.nix create mode 120000 npm/nodePackages/precond/latest.nix create mode 100644 npm/nodePackages/rimraf/2.2.8.nix create mode 120000 npm/nodePackages/rimraf/latest.nix create mode 100644 npm/nodePackages/safe-json-stringify/1.0.3.nix create mode 120000 npm/nodePackages/safe-json-stringify/latest.nix rename npm/nodePackages/vasync/{1.4.0.nix => 1.6.3.nix} (52%) delete mode 100644 npm/nodePackages/verror/1.3.3.nix rename npm/nodePackages/verror/{1.1.0.nix => 1.6.0.nix} (51%) create mode 100644 npm/nodePackages/wrappy/1.0.1.nix create mode 120000 npm/nodePackages/wrappy/latest.nix diff --git a/npm/nodePackages/abbrev/1.0.7.nix b/npm/nodePackages/abbrev/1.0.7.nix deleted file mode 100644 index cf799b3..0000000 --- a/npm/nodePackages/abbrev/1.0.7.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ buildNodePackage, nodePackages, pkgs }: -buildNodePackage { - name = "abbrev"; - version = "1.0.7"; - src = pkgs.fetchurl { - url = "http://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz"; - sha1 = "5b6035b2ee9d4fb5cf859f08a9be81b208491843"; - }; - deps = []; - meta = { - homepage = "https://github.com/isaacs/abbrev-js#readme"; - description = "Like ruby's abbrev module, but in js"; - }; - } \ No newline at end of file diff --git a/npm/nodePackages/abbrev/latest.nix b/npm/nodePackages/abbrev/latest.nix deleted file mode 120000 index 3359cd8..0000000 --- a/npm/nodePackages/abbrev/latest.nix +++ /dev/null @@ -1 +0,0 @@ -1.0.7.nix \ No newline at end of file diff --git a/npm/nodePackages/asn1/0.2.1.nix b/npm/nodePackages/asn1/0.2.3.nix similarity index 66% rename from npm/nodePackages/asn1/0.2.1.nix rename to npm/nodePackages/asn1/0.2.3.nix index 3c54f3f..7eabb05 100644 --- a/npm/nodePackages/asn1/0.2.1.nix +++ b/npm/nodePackages/asn1/0.2.3.nix @@ -1,10 +1,10 @@ { buildNodePackage, nodePackages, pkgs }: buildNodePackage { name = "asn1"; - version = "0.2.1"; + version = "0.2.3"; src = pkgs.fetchurl { - url = "http://registry.npmjs.org/asn1/-/asn1-0.2.1.tgz"; - sha1 = "ecc73f75d31ea3c6ed9d47428db35fecc7b2c6dc"; + url = "http://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz"; + sha1 = "dac8787713c9966849fc8180777ebe9c1ddf3b86"; }; deps = []; meta = { diff --git a/npm/nodePackages/asn1/latest.nix b/npm/nodePackages/asn1/latest.nix index d584211..f45e5cd 120000 --- a/npm/nodePackages/asn1/latest.nix +++ b/npm/nodePackages/asn1/latest.nix @@ -1 +1 @@ -0.2.1.nix \ No newline at end of file +0.2.3.nix \ No newline at end of file diff --git a/npm/nodePackages/backoff/2.4.1.nix b/npm/nodePackages/backoff/2.4.1.nix new file mode 100644 index 0000000..912e1ab --- /dev/null +++ b/npm/nodePackages/backoff/2.4.1.nix @@ -0,0 +1,21 @@ +{ buildNodePackage, nodePackages, pkgs }: +buildNodePackage { + name = "backoff"; + version = "2.4.1"; + src = pkgs.fetchurl { + url = "http://registry.npmjs.org/backoff/-/backoff-2.4.1.tgz"; + sha1 = "2f68c50e0dd789dbefe24200a62efb04d2456d68"; + }; + deps = with nodePackages; [ + precond_0-2-3 + ]; + meta = { + description = "Fibonacci and exponential backoffs."; + keywords = [ + "backoff" + "retry" + "fibonacci" + "exponential" + ]; + }; + } \ No newline at end of file diff --git a/npm/nodePackages/backoff/latest.nix b/npm/nodePackages/backoff/latest.nix new file mode 120000 index 0000000..7c5c693 --- /dev/null +++ b/npm/nodePackages/backoff/latest.nix @@ -0,0 +1 @@ +2.4.1.nix \ No newline at end of file diff --git a/npm/nodePackages/bunyan/0.22.1.nix b/npm/nodePackages/bunyan/0.22.1.nix deleted file mode 100644 index 92bafff..0000000 --- a/npm/nodePackages/bunyan/0.22.1.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ buildNodePackage, nodePackages, pkgs }: -buildNodePackage { - name = "bunyan"; - version = "0.22.1"; - src = pkgs.fetchurl { - url = "http://registry.npmjs.org/bunyan/-/bunyan-0.22.1.tgz"; - sha1 = "020c383bed625af5c6c8834dd8c4aca0dd0f765c"; - }; - deps = with nodePackages; [ - dtrace-provider_0-2-8 - mv_0-0-5 - ]; - optionalDependencies = with nodePackages; [ - dtrace-provider_0-2-8 - mv_0-0-5 - ]; - meta = { - description = "a JSON Logger library for node.js services"; - keywords = [ - "log" - "logging" - "log4j" - "json" - ]; - }; - } \ No newline at end of file diff --git a/npm/nodePackages/bunyan/1.5.1.nix b/npm/nodePackages/bunyan/1.5.1.nix new file mode 100644 index 0000000..1d79841 --- /dev/null +++ b/npm/nodePackages/bunyan/1.5.1.nix @@ -0,0 +1,30 @@ +{ buildNodePackage, nodePackages, pkgs }: +buildNodePackage { + name = "bunyan"; + version = "1.5.1"; + src = pkgs.fetchurl { + url = "http://registry.npmjs.org/bunyan/-/bunyan-1.5.1.tgz"; + sha1 = "5f6e7d44c43b952f56b0f41309e3ab12391b4e2d"; + }; + deps = with nodePackages; [ + dtrace-provider_0-6-0 + safe-json-stringify_1-0-3 + mv_2-0-3 + ]; + optionalDependencies = with nodePackages; [ + dtrace-provider_0-6-0 + safe-json-stringify_1-0-3 + mv_2-0-3 + ]; + meta = { + homepage = "https://github.com/trentm/node-bunyan"; + description = "a JSON logging library for node.js services"; + keywords = [ + "log" + "logging" + "log4j" + "json" + "bunyan" + ]; + }; + } \ No newline at end of file diff --git a/npm/nodePackages/bunyan/latest.nix b/npm/nodePackages/bunyan/latest.nix index d240e7e..a69ad5e 120000 --- a/npm/nodePackages/bunyan/latest.nix +++ b/npm/nodePackages/bunyan/latest.nix @@ -1 +1 @@ -0.22.1.nix \ No newline at end of file +1.5.1.nix \ No newline at end of file diff --git a/npm/nodePackages/dashdash/1.10.1.nix b/npm/nodePackages/dashdash/1.10.1.nix new file mode 100644 index 0000000..d5048e8 --- /dev/null +++ b/npm/nodePackages/dashdash/1.10.1.nix @@ -0,0 +1,24 @@ +{ buildNodePackage, nodePackages, pkgs }: +buildNodePackage { + name = "dashdash"; + version = "1.10.1"; + src = pkgs.fetchurl { + url = "http://registry.npmjs.org/dashdash/-/dashdash-1.10.1.tgz"; + sha1 = "0abf1af89a8f5129a81f18c2b35b21df22622f60"; + }; + deps = with nodePackages; [ + assert-plus_0-1-5 + ]; + meta = { + homepage = "https://github.com/trentm/node-dashdash"; + description = "A light, featureful and explicit option parsing library."; + keywords = [ + "option" + "parser" + "parsing" + "cli" + "command" + "args" + ]; + }; + } \ No newline at end of file diff --git a/npm/nodePackages/dashdash/latest.nix b/npm/nodePackages/dashdash/latest.nix new file mode 120000 index 0000000..a05fdfc --- /dev/null +++ b/npm/nodePackages/dashdash/latest.nix @@ -0,0 +1 @@ +1.10.1.nix \ No newline at end of file diff --git a/npm/nodePackages/dtrace-provider/0.2.8.nix b/npm/nodePackages/dtrace-provider/0.6.0.nix similarity index 70% rename from npm/nodePackages/dtrace-provider/0.2.8.nix rename to npm/nodePackages/dtrace-provider/0.6.0.nix index 6e12512..eb7b6e2 100644 --- a/npm/nodePackages/dtrace-provider/0.2.8.nix +++ b/npm/nodePackages/dtrace-provider/0.6.0.nix @@ -1,12 +1,14 @@ { buildNodePackage, nodePackages, pkgs }: buildNodePackage { name = "dtrace-provider"; - version = "0.2.8"; + version = "0.6.0"; src = pkgs.fetchurl { - url = "http://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.2.8.tgz"; - sha1 = "e243f19219aa95fbf0d8f2ffb07f5bd64e94fe20"; + url = "http://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.6.0.tgz"; + sha1 = "0b078d5517937d873101452d9146737557b75e51"; }; - deps = []; + deps = with nodePackages; [ + nan_2-1-0 + ]; meta = { homepage = "https://github.com/chrisa/node-dtrace-provider#readme"; description = "Native DTrace providers for node.js applications"; diff --git a/npm/nodePackages/dtrace-provider/latest.nix b/npm/nodePackages/dtrace-provider/latest.nix index aeb3c6b..6f25937 120000 --- a/npm/nodePackages/dtrace-provider/latest.nix +++ b/npm/nodePackages/dtrace-provider/latest.nix @@ -1 +1 @@ -0.2.8.nix \ No newline at end of file +0.6.0.nix \ No newline at end of file diff --git a/npm/nodePackages/extsprintf/1.0.0.nix b/npm/nodePackages/extsprintf/1.2.0.nix similarity index 64% rename from npm/nodePackages/extsprintf/1.0.0.nix rename to npm/nodePackages/extsprintf/1.2.0.nix index 3fa4cfb..e9ea512 100644 --- a/npm/nodePackages/extsprintf/1.0.0.nix +++ b/npm/nodePackages/extsprintf/1.2.0.nix @@ -1,14 +1,15 @@ { buildNodePackage, nodePackages, pkgs }: buildNodePackage { name = "extsprintf"; - version = "1.0.0"; + version = "1.2.0"; src = pkgs.fetchurl { - url = "http://registry.npmjs.org/extsprintf/-/extsprintf-1.0.0.tgz"; - sha1 = "4d58b815ace5bebfc4ebf03cf98b0a7604a99b86"; + url = "http://registry.npmjs.org/extsprintf/-/extsprintf-1.2.0.tgz"; + sha1 = "5ad946c22f5b32ba7f8cd7426711c6e8a3fc2529"; }; deps = []; devDependencies = []; meta = { + homepage = "https://github.com/davepacheco/node-extsprintf"; description = "extended POSIX-style sprintf"; }; } \ No newline at end of file diff --git a/npm/nodePackages/extsprintf/latest.nix b/npm/nodePackages/extsprintf/latest.nix index 16c2c64..4919f5b 120000 --- a/npm/nodePackages/extsprintf/latest.nix +++ b/npm/nodePackages/extsprintf/latest.nix @@ -1 +1 @@ -1.0.0.nix \ No newline at end of file +1.2.0.nix \ No newline at end of file diff --git a/npm/nodePackages/json-schema/0.2.2.nix b/npm/nodePackages/json-schema/0.2.2.nix deleted file mode 100644 index 267975e..0000000 --- a/npm/nodePackages/json-schema/0.2.2.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ buildNodePackage, nodePackages, pkgs }: -buildNodePackage { - name = "json-schema"; - version = "0.2.2"; - src = pkgs.fetchurl { - url = "http://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz"; - sha1 = "50354f19f603917c695f70b85afa77c3b0f23506"; - }; - deps = []; - meta = { - description = "JSON Schema validation and specifications"; - keywords = [ "json" "schema" ]; - }; - } \ No newline at end of file diff --git a/npm/nodePackages/jsprim/0.3.0.nix b/npm/nodePackages/jsprim/0.3.0.nix deleted file mode 100644 index 07bff3a..0000000 --- a/npm/nodePackages/jsprim/0.3.0.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ buildNodePackage, nodePackages, pkgs }: -buildNodePackage { - name = "jsprim"; - version = "0.3.0"; - src = pkgs.fetchurl { - url = "http://registry.npmjs.org/jsprim/-/jsprim-0.3.0.tgz"; - sha1 = "cd13466ea2480dbd8396a570d47d31dda476f8b1"; - }; - deps = with nodePackages; [ - json-schema_0-2-2 - extsprintf_1-0-0 - verror_1-3-3 - ]; - devDependencies = []; - meta = { - description = "utilities for primitive JavaScript types"; - }; - } \ No newline at end of file diff --git a/npm/nodePackages/jsprim/latest.nix b/npm/nodePackages/jsprim/latest.nix deleted file mode 120000 index d2fd549..0000000 --- a/npm/nodePackages/jsprim/latest.nix +++ /dev/null @@ -1 +0,0 @@ -0.3.0.nix \ No newline at end of file diff --git a/npm/nodePackages/ldap-filter/0.2.2.nix b/npm/nodePackages/ldap-filter/0.2.2.nix new file mode 100644 index 0000000..de3168b --- /dev/null +++ b/npm/nodePackages/ldap-filter/0.2.2.nix @@ -0,0 +1,16 @@ +{ buildNodePackage, nodePackages, pkgs }: +buildNodePackage { + name = "ldap-filter"; + version = "0.2.2"; + src = pkgs.fetchurl { + url = "http://registry.npmjs.org/ldap-filter/-/ldap-filter-0.2.2.tgz"; + sha1 = "f2b842be0b86da3352798505b31ebcae590d77d0"; + }; + deps = with nodePackages; [ + assert-plus_0-1-5 + ]; + meta = { + homepage = "http://ldapjs.org"; + description = "API for handling LDAP-style filters"; + }; + } \ No newline at end of file diff --git a/npm/nodePackages/json-schema/latest.nix b/npm/nodePackages/ldap-filter/latest.nix similarity index 100% rename from npm/nodePackages/json-schema/latest.nix rename to npm/nodePackages/ldap-filter/latest.nix diff --git a/npm/nodePackages/ldapjs/0.7.1.nix b/npm/nodePackages/ldapjs/0.7.1.nix deleted file mode 100644 index 3fde1ba..0000000 --- a/npm/nodePackages/ldapjs/0.7.1.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ buildNodePackage, nodePackages, pkgs }: -buildNodePackage { - name = "ldapjs"; - version = "0.7.1"; - src = pkgs.fetchurl { - url = "http://registry.npmjs.org/ldapjs/-/ldapjs-0.7.1.tgz"; - sha1 = "684798a687640bab1afbd802cf532f30492dfb56"; - }; - deps = with nodePackages; [ - asn1_0-2-1 - nopt_2-1-1 - bunyan_0-22-1 - dtrace-provider_0-2-8 - pooling_0-4-6 - assert-plus_0-1-5 - ]; - optionalDependencies = with nodePackages; [ - dtrace-provider_0-2-8 - ]; - meta = { - homepage = "http://ldapjs.org"; - description = "LDAP client and server APIs"; - }; - } \ No newline at end of file diff --git a/npm/nodePackages/ldapjs/1.0.0.nix b/npm/nodePackages/ldapjs/1.0.0.nix new file mode 100644 index 0000000..ff69ade --- /dev/null +++ b/npm/nodePackages/ldapjs/1.0.0.nix @@ -0,0 +1,28 @@ +{ buildNodePackage, nodePackages, pkgs }: +buildNodePackage { + name = "ldapjs"; + version = "1.0.0"; + src = pkgs.fetchurl { + url = "http://registry.npmjs.org/ldapjs/-/ldapjs-1.0.0.tgz"; + sha1 = "1da2cd5bfb9cb103c1ba516938da971bc2bbc3f2"; + }; + deps = with nodePackages; [ + ldap-filter_0-2-2 + asn1_0-2-3 + bunyan_1-5-1 + once_1-3-2 + vasync_1-6-3 + dtrace-provider_0-6-0 + backoff_2-4-1 + assert-plus_0-1-5 + verror_1-6-0 + dashdash_1-10-1 + ]; + optionalDependencies = with nodePackages; [ + dtrace-provider_0-6-0 + ]; + meta = { + homepage = "http://ldapjs.org"; + description = "LDAP client and server APIs"; + }; + } \ No newline at end of file diff --git a/npm/nodePackages/ldapjs/latest.nix b/npm/nodePackages/ldapjs/latest.nix index cc3fceb..16c2c64 120000 --- a/npm/nodePackages/ldapjs/latest.nix +++ b/npm/nodePackages/ldapjs/latest.nix @@ -1 +1 @@ -0.7.1.nix \ No newline at end of file +1.0.0.nix \ No newline at end of file diff --git a/npm/nodePackages/minimist/0.0.8.nix b/npm/nodePackages/minimist/0.0.8.nix new file mode 100644 index 0000000..7cf6c6d --- /dev/null +++ b/npm/nodePackages/minimist/0.0.8.nix @@ -0,0 +1,20 @@ +{ buildNodePackage, nodePackages, pkgs }: +buildNodePackage { + name = "minimist"; + version = "0.0.8"; + src = pkgs.fetchurl { + url = "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz"; + sha1 = "857fcabfc3397d2625b8228262e86aa7a011b05d"; + }; + deps = []; + meta = { + homepage = "https://github.com/substack/minimist"; + description = "parse argument options"; + keywords = [ + "argv" + "getopt" + "parser" + "optimist" + ]; + }; + } \ No newline at end of file diff --git a/npm/nodePackages/minimist/latest.nix b/npm/nodePackages/minimist/latest.nix new file mode 120000 index 0000000..65c0a0d --- /dev/null +++ b/npm/nodePackages/minimist/latest.nix @@ -0,0 +1 @@ +0.0.8.nix \ No newline at end of file diff --git a/npm/nodePackages/mkdirp/0.5.1.nix b/npm/nodePackages/mkdirp/0.5.1.nix new file mode 100644 index 0000000..e0a9858 --- /dev/null +++ b/npm/nodePackages/mkdirp/0.5.1.nix @@ -0,0 +1,20 @@ +{ buildNodePackage, nodePackages, pkgs }: +buildNodePackage { + name = "mkdirp"; + version = "0.5.1"; + src = pkgs.fetchurl { + url = "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz"; + sha1 = "30057438eac6cf7f8c4767f38648d6697d75c903"; + }; + deps = with nodePackages; [ + minimist_0-0-8 + ]; + meta = { + homepage = "https://github.com/substack/node-mkdirp#readme"; + description = "Recursively mkdir, like `mkdir -p`"; + keywords = [ + "mkdir" + "directory" + ]; + }; + } \ No newline at end of file diff --git a/npm/nodePackages/mkdirp/latest.nix b/npm/nodePackages/mkdirp/latest.nix new file mode 120000 index 0000000..2dc7af4 --- /dev/null +++ b/npm/nodePackages/mkdirp/latest.nix @@ -0,0 +1 @@ +0.5.1.nix \ No newline at end of file diff --git a/npm/nodePackages/mv/0.0.5.nix b/npm/nodePackages/mv/2.0.3.nix similarity index 54% rename from npm/nodePackages/mv/0.0.5.nix rename to npm/nodePackages/mv/2.0.3.nix index d716338..4115817 100644 --- a/npm/nodePackages/mv/0.0.5.nix +++ b/npm/nodePackages/mv/2.0.3.nix @@ -1,13 +1,18 @@ { buildNodePackage, nodePackages, pkgs }: buildNodePackage { name = "mv"; - version = "0.0.5"; + version = "2.0.3"; src = pkgs.fetchurl { - url = "http://registry.npmjs.org/mv/-/mv-0.0.5.tgz"; - sha1 = "15eac759479884df1131d6de56bce20b654f5391"; + url = "http://registry.npmjs.org/mv/-/mv-2.0.3.tgz"; + sha1 = "e9ab707d71dc38de24edcc637a8e2f5f480c7f32"; }; - deps = []; + deps = with nodePackages; [ + ncp_0-6-0 + mkdirp_0-5-1 + rimraf_2-2-8 + ]; meta = { + homepage = "https://github.com/andrewrk/node-mv"; description = "fs.rename but works across devices. same as the unix utility 'mv'"; keywords = [ "mv" diff --git a/npm/nodePackages/mv/latest.nix b/npm/nodePackages/mv/latest.nix index 7a9fd69..351e4a9 120000 --- a/npm/nodePackages/mv/latest.nix +++ b/npm/nodePackages/mv/latest.nix @@ -1 +1 @@ -0.0.5.nix \ No newline at end of file +2.0.3.nix \ No newline at end of file diff --git a/npm/nodePackages/nan/2.1.0.nix b/npm/nodePackages/nan/2.1.0.nix new file mode 100644 index 0000000..149cb04 --- /dev/null +++ b/npm/nodePackages/nan/2.1.0.nix @@ -0,0 +1,14 @@ +{ buildNodePackage, nodePackages, pkgs }: +buildNodePackage { + name = "nan"; + version = "2.1.0"; + src = pkgs.fetchurl { + url = "http://registry.npmjs.org/nan/-/nan-2.1.0.tgz"; + sha1 = "020a7ccedc63fdee85f85967d5607849e74abbe8"; + }; + deps = []; + meta = { + homepage = "https://github.com/nodejs/nan#readme"; + description = "Native Abstractions for Node.js: C++ header for Node 0.8 -> 4 compatibility"; + }; + } \ No newline at end of file diff --git a/npm/nodePackages/nan/latest.nix b/npm/nodePackages/nan/latest.nix new file mode 120000 index 0000000..01844ff --- /dev/null +++ b/npm/nodePackages/nan/latest.nix @@ -0,0 +1 @@ +2.1.0.nix \ No newline at end of file diff --git a/npm/nodePackages/ncp/0.6.0.nix b/npm/nodePackages/ncp/0.6.0.nix new file mode 100644 index 0000000..860db9d --- /dev/null +++ b/npm/nodePackages/ncp/0.6.0.nix @@ -0,0 +1,15 @@ +{ buildNodePackage, nodePackages, pkgs }: +buildNodePackage { + name = "ncp"; + version = "0.6.0"; + src = pkgs.fetchurl { + url = "http://registry.npmjs.org/ncp/-/ncp-0.6.0.tgz"; + sha1 = "df8ce021e262be21b52feb3d3e5cfaab12491f0d"; + }; + deps = []; + meta = { + homepage = "https://github.com/AvianFlu/ncp"; + description = "Asynchronous recursive file copy utility."; + keywords = [ "cli" "copy" ]; + }; + } \ No newline at end of file diff --git a/npm/nodePackages/ncp/latest.nix b/npm/nodePackages/ncp/latest.nix new file mode 120000 index 0000000..6f25937 --- /dev/null +++ b/npm/nodePackages/ncp/latest.nix @@ -0,0 +1 @@ +0.6.0.nix \ No newline at end of file diff --git a/npm/nodePackages/nopt/2.1.1.nix b/npm/nodePackages/nopt/2.1.1.nix deleted file mode 100644 index f6da314..0000000 --- a/npm/nodePackages/nopt/2.1.1.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ buildNodePackage, nodePackages, pkgs }: -buildNodePackage { - name = "nopt"; - version = "2.1.1"; - src = pkgs.fetchurl { - url = "http://registry.npmjs.org/nopt/-/nopt-2.1.1.tgz"; - sha1 = "91eb7c4b017e7c00adcad1fd6d63944d0fdb75c1"; - }; - deps = with nodePackages; [ - abbrev_1-0-7 - ]; - devDependencies = []; - meta = { - description = "Option parsing for Node, supporting types, shorthands, etc. Used by npm."; - }; - } \ No newline at end of file diff --git a/npm/nodePackages/nopt/latest.nix b/npm/nodePackages/nopt/latest.nix deleted file mode 120000 index b9a120d..0000000 --- a/npm/nodePackages/nopt/latest.nix +++ /dev/null @@ -1 +0,0 @@ -2.1.1.nix \ No newline at end of file diff --git a/npm/nodePackages/once/1.3.0.nix b/npm/nodePackages/once/1.3.2.nix similarity index 51% rename from npm/nodePackages/once/1.3.0.nix rename to npm/nodePackages/once/1.3.2.nix index ae7b8e3..2b3b81f 100644 --- a/npm/nodePackages/once/1.3.0.nix +++ b/npm/nodePackages/once/1.3.2.nix @@ -1,13 +1,16 @@ { buildNodePackage, nodePackages, pkgs }: buildNodePackage { name = "once"; - version = "1.3.0"; + version = "1.3.2"; src = pkgs.fetchurl { - url = "http://registry.npmjs.org/once/-/once-1.3.0.tgz"; - sha1 = "151af86bfc1f08c4b9f07d06ab250ffcbeb56581"; + url = "http://registry.npmjs.org/once/-/once-1.3.2.tgz"; + sha1 = "d8feeca93b039ec1dcdee7741c92bdac5e28081b"; }; - deps = []; + deps = with nodePackages; [ + wrappy_1-0-1 + ]; meta = { + homepage = "https://github.com/isaacs/once#readme"; description = "Run a function exactly one time"; keywords = [ "once" diff --git a/npm/nodePackages/once/latest.nix b/npm/nodePackages/once/latest.nix index 84ba35b..ea38782 120000 --- a/npm/nodePackages/once/latest.nix +++ b/npm/nodePackages/once/latest.nix @@ -1 +1 @@ -1.3.0.nix \ No newline at end of file +1.3.2.nix \ No newline at end of file diff --git a/npm/nodePackages/pooling/0.4.6.nix b/npm/nodePackages/pooling/0.4.6.nix deleted file mode 100644 index 18c0462..0000000 --- a/npm/nodePackages/pooling/0.4.6.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ buildNodePackage, nodePackages, pkgs }: -buildNodePackage { - name = "pooling"; - version = "0.4.6"; - src = pkgs.fetchurl { - url = "http://registry.npmjs.org/pooling/-/pooling-0.4.6.tgz"; - sha1 = "76a317371ea8a363b4858fa4799e60245f30e664"; - }; - deps = with nodePackages; [ - bunyan_0-22-1 - once_1-3-0 - vasync_1-4-0 - dtrace-provider_0-2-8 - assert-plus_0-1-5 - ]; - optionalDependencies = with nodePackages; [ - dtrace-provider_0-2-8 - ]; - meta = { - homepage = "https://github.com/mcavage/node-pooling"; - description = "General purpose resource pool API"; - }; - } \ No newline at end of file diff --git a/npm/nodePackages/pooling/latest.nix b/npm/nodePackages/pooling/latest.nix deleted file mode 120000 index 290ad01..0000000 --- a/npm/nodePackages/pooling/latest.nix +++ /dev/null @@ -1 +0,0 @@ -0.4.6.nix \ No newline at end of file diff --git a/npm/nodePackages/precond/0.2.3.nix b/npm/nodePackages/precond/0.2.3.nix new file mode 100644 index 0000000..f76d2b5 --- /dev/null +++ b/npm/nodePackages/precond/0.2.3.nix @@ -0,0 +1,20 @@ +{ buildNodePackage, nodePackages, pkgs }: +buildNodePackage { + name = "precond"; + version = "0.2.3"; + src = pkgs.fetchurl { + url = "http://registry.npmjs.org/precond/-/precond-0.2.3.tgz"; + sha1 = "aa9591bcaa24923f1e0f4849d240f47efc1075ac"; + }; + deps = []; + meta = { + description = "Precondition checking utilities."; + keywords = [ + "precondition" + "assert" + "invariant" + "contract" + "condition" + ]; + }; + } \ No newline at end of file diff --git a/npm/nodePackages/precond/latest.nix b/npm/nodePackages/precond/latest.nix new file mode 120000 index 0000000..f45e5cd --- /dev/null +++ b/npm/nodePackages/precond/latest.nix @@ -0,0 +1 @@ +0.2.3.nix \ No newline at end of file diff --git a/npm/nodePackages/rimraf/2.2.8.nix b/npm/nodePackages/rimraf/2.2.8.nix new file mode 100644 index 0000000..73a31cb --- /dev/null +++ b/npm/nodePackages/rimraf/2.2.8.nix @@ -0,0 +1,15 @@ +{ buildNodePackage, nodePackages, pkgs }: +buildNodePackage { + name = "rimraf"; + version = "2.2.8"; + src = pkgs.fetchurl { + url = "http://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz"; + sha1 = "e439be2aaee327321952730f99a8929e4fc50582"; + }; + deps = []; + devDependencies = []; + meta = { + homepage = "https://github.com/isaacs/rimraf"; + description = "A deep deletion module for node (like `rm -rf`)"; + }; + } \ No newline at end of file diff --git a/npm/nodePackages/rimraf/latest.nix b/npm/nodePackages/rimraf/latest.nix new file mode 120000 index 0000000..6f9b4c5 --- /dev/null +++ b/npm/nodePackages/rimraf/latest.nix @@ -0,0 +1 @@ +2.2.8.nix \ No newline at end of file diff --git a/npm/nodePackages/safe-json-stringify/1.0.3.nix b/npm/nodePackages/safe-json-stringify/1.0.3.nix new file mode 100644 index 0000000..3ad5dd8 --- /dev/null +++ b/npm/nodePackages/safe-json-stringify/1.0.3.nix @@ -0,0 +1,14 @@ +{ buildNodePackage, nodePackages, pkgs }: +buildNodePackage { + name = "safe-json-stringify"; + version = "1.0.3"; + src = pkgs.fetchurl { + url = "http://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.0.3.tgz"; + sha1 = "3cb6717660a086d07cb5bd9b7a6875bcf67bd05e"; + }; + deps = []; + meta = { + homepage = "https://github.com/e-conomic/safe-json-stringify"; + description = "Prevent defined property getters from throwing errors"; + }; + } \ No newline at end of file diff --git a/npm/nodePackages/safe-json-stringify/latest.nix b/npm/nodePackages/safe-json-stringify/latest.nix new file mode 120000 index 0000000..c56a352 --- /dev/null +++ b/npm/nodePackages/safe-json-stringify/latest.nix @@ -0,0 +1 @@ +1.0.3.nix \ No newline at end of file diff --git a/npm/nodePackages/vasync/1.4.0.nix b/npm/nodePackages/vasync/1.6.3.nix similarity index 52% rename from npm/nodePackages/vasync/1.4.0.nix rename to npm/nodePackages/vasync/1.6.3.nix index 4c8e4d6..9c4c997 100644 --- a/npm/nodePackages/vasync/1.4.0.nix +++ b/npm/nodePackages/vasync/1.6.3.nix @@ -1,17 +1,16 @@ { buildNodePackage, nodePackages, pkgs }: buildNodePackage { name = "vasync"; - version = "1.4.0"; + version = "1.6.3"; src = pkgs.fetchurl { - url = "http://registry.npmjs.org/vasync/-/vasync-1.4.0.tgz"; - sha1 = "6ea5a63582358868d8743cbdd6ffadc9083b910f"; + url = "http://registry.npmjs.org/vasync/-/vasync-1.6.3.tgz"; + sha1 = "4a69d7052a47f4ce85503d7641df1cbf40432a94"; }; deps = with nodePackages; [ - jsprim_0-3-0 - verror_1-1-0 + verror_1-6-0 ]; - devDependencies = []; meta = { + homepage = "https://github.com/davepacheco/node-vasync"; description = "utilities for observable asynchronous control flow"; }; } \ No newline at end of file diff --git a/npm/nodePackages/vasync/latest.nix b/npm/nodePackages/vasync/latest.nix index bbca4db..5e092a9 120000 --- a/npm/nodePackages/vasync/latest.nix +++ b/npm/nodePackages/vasync/latest.nix @@ -1 +1 @@ -1.4.0.nix \ No newline at end of file +1.6.3.nix \ No newline at end of file diff --git a/npm/nodePackages/verror/1.3.3.nix b/npm/nodePackages/verror/1.3.3.nix deleted file mode 100644 index b4ff20e..0000000 --- a/npm/nodePackages/verror/1.3.3.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ buildNodePackage, nodePackages, pkgs }: -buildNodePackage { - name = "verror"; - version = "1.3.3"; - src = pkgs.fetchurl { - url = "http://registry.npmjs.org/verror/-/verror-1.3.3.tgz"; - sha1 = "8a6a4ac3a8c774b6f687fece49bdffd78552e2cd"; - }; - deps = with nodePackages; [ - extsprintf_1-0-0 - ]; - devDependencies = []; - meta = { - description = "richer JavaScript errors"; - }; - } \ No newline at end of file diff --git a/npm/nodePackages/verror/1.1.0.nix b/npm/nodePackages/verror/1.6.0.nix similarity index 51% rename from npm/nodePackages/verror/1.1.0.nix rename to npm/nodePackages/verror/1.6.0.nix index dae7b5c..0fb9c67 100644 --- a/npm/nodePackages/verror/1.1.0.nix +++ b/npm/nodePackages/verror/1.6.0.nix @@ -1,16 +1,17 @@ { buildNodePackage, nodePackages, pkgs }: buildNodePackage { name = "verror"; - version = "1.1.0"; + version = "1.6.0"; src = pkgs.fetchurl { - url = "http://registry.npmjs.org/verror/-/verror-1.1.0.tgz"; - sha1 = "2a4b4eb14a207051e75a6f94ee51315bf173a1b0"; + url = "http://registry.npmjs.org/verror/-/verror-1.6.0.tgz"; + sha1 = "7d13b27b1facc2e2da90405eb5ea6e5bdd252ea5"; }; deps = with nodePackages; [ - extsprintf_1-0-0 + extsprintf_1-2-0 ]; devDependencies = []; meta = { + homepage = "https://github.com/davepacheco/node-verror"; description = "richer JavaScript errors"; }; } \ No newline at end of file diff --git a/npm/nodePackages/verror/latest.nix b/npm/nodePackages/verror/latest.nix index bfc46b7..855cd09 120000 --- a/npm/nodePackages/verror/latest.nix +++ b/npm/nodePackages/verror/latest.nix @@ -1 +1 @@ -1.3.3.nix \ No newline at end of file +1.6.0.nix \ No newline at end of file diff --git a/npm/nodePackages/wrappy/1.0.1.nix b/npm/nodePackages/wrappy/1.0.1.nix new file mode 100644 index 0000000..e6414a2 --- /dev/null +++ b/npm/nodePackages/wrappy/1.0.1.nix @@ -0,0 +1,14 @@ +{ buildNodePackage, nodePackages, pkgs }: +buildNodePackage { + name = "wrappy"; + version = "1.0.1"; + src = pkgs.fetchurl { + url = "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz"; + sha1 = "1e65969965ccbc2db4548c6b84a6f2c5aedd4739"; + }; + deps = []; + meta = { + homepage = "https://github.com/npm/wrappy"; + description = "Callback wrapping utility"; + }; + } \ No newline at end of file diff --git a/npm/nodePackages/wrappy/latest.nix b/npm/nodePackages/wrappy/latest.nix new file mode 120000 index 0000000..b9f08ee --- /dev/null +++ b/npm/nodePackages/wrappy/latest.nix @@ -0,0 +1 @@ +1.0.1.nix \ No newline at end of file diff --git a/test/Ldap/Client/DeleteSpec.hs b/test/Ldap/Client/DeleteSpec.hs index 1a6dc46..fd55c38 100644 --- a/test/Ldap/Client/DeleteSpec.hs +++ b/test/Ldap/Client/DeleteSpec.hs @@ -27,7 +27,7 @@ spec = do res `shouldBe` Left (Ldap.ResponseError (Ldap.ResponseErrorCode (Ldap.Type.DeleteRequest - (Ldap.Type.LdapDn (Ldap.Type.LdapString "cn=oddish,o=localhost"))) + (Ldap.Type.LdapDn (Ldap.Type.LdapString "cn=oddish, o=localhost"))) Ldap.NoSuchObject (Dn "o=localhost") - "cn=oddish,o=localhost")) + "cn=oddish, o=localhost")) diff --git a/test/Ldap/Client/ModifySpec.hs b/test/Ldap/Client/ModifySpec.hs index 8525641..35ebff8 100644 --- a/test/Ldap/Client/ModifySpec.hs +++ b/test/Ldap/Client/ModifySpec.hs @@ -30,7 +30,7 @@ spec = do res `shouldBe` Left (ResponseError (ResponseErrorCode - (Ldap.Type.ModifyRequest (Ldap.Type.LdapDn (Ldap.Type.LdapString "cn=pikachu,o=localhost")) + (Ldap.Type.ModifyRequest (Ldap.Type.LdapDn (Ldap.Type.LdapString "cn=pikachu, o=localhost")) [( Ldap.Type.Delete , Ldap.Type.PartialAttribute (Ldap.Type.AttributeDescription (Ldap.Type.LdapString "password")) diff --git a/test/SpecHelper.hs b/test/SpecHelper.hs index 318a316..1dcdccb 100644 --- a/test/SpecHelper.hs +++ b/test/SpecHelper.hs @@ -22,9 +22,12 @@ module SpecHelper , oddish ) where +import Control.Monad (forever) +import Control.Concurrent (forkIO) import Control.Exception (bracket) import System.Environment (getEnvironment) import System.IO (hGetLine) +import System.IO.Error (tryIOError) import System.Process (runInteractiveProcess, terminateProcess, waitForProcess) import Ldap.Client as Ldap @@ -39,6 +42,7 @@ locally f = ("SSL_KEY", "./ssl/key.pem") : env)) hGetLine out + forkIO (() <$ tryIOError (forever (hGetLine out >>= putStrLn))) return h) (\h -> do terminateProcess h waitForProcess h) @@ -55,49 +59,49 @@ dns (SearchEntry dn _ : es) = dn : dns es dns [] = [] bulbasaur :: Dn -bulbasaur = Dn "cn=bulbasaur,o=localhost" +bulbasaur = Dn "cn=bulbasaur, o=localhost" ivysaur :: Dn -ivysaur = Dn "cn=ivysaur,o=localhost" +ivysaur = Dn "cn=ivysaur, o=localhost" venusaur :: Dn -venusaur = Dn "cn=venusaur,o=localhost" +venusaur = Dn "cn=venusaur, o=localhost" charmander :: Dn -charmander = Dn "cn=charmander,o=localhost" +charmander = Dn "cn=charmander, o=localhost" charmeleon :: Dn -charmeleon = Dn "cn=charmeleon,o=localhost" +charmeleon = Dn "cn=charmeleon, o=localhost" charizard :: Dn -charizard = Dn "cn=charizard,o=localhost" +charizard = Dn "cn=charizard, o=localhost" squirtle :: Dn -squirtle = Dn "cn=squirtle,o=localhost" +squirtle = Dn "cn=squirtle, o=localhost" wartortle :: Dn -wartortle = Dn "cn=wartortle,o=localhost" +wartortle = Dn "cn=wartortle, o=localhost" blastoise :: Dn -blastoise = Dn "cn=blastoise,o=localhost" +blastoise = Dn "cn=blastoise, o=localhost" caterpie :: Dn -caterpie = Dn "cn=caterpie,o=localhost" +caterpie = Dn "cn=caterpie, o=localhost" metapod :: Dn -metapod = Dn "cn=metapod,o=localhost" +metapod = Dn "cn=metapod, o=localhost" butterfree :: Dn -butterfree = Dn "cn=butterfree,o=localhost" +butterfree = Dn "cn=butterfree, o=localhost" pikachu :: Dn -pikachu = Dn "cn=pikachu,o=localhost" +pikachu = Dn "cn=pikachu, o=localhost" raichu :: Dn -raichu = Dn "cn=raichu,o=localhost" +raichu = Dn "cn=raichu, o=localhost" vulpix :: Dn -vulpix = Dn "cn=vulpix,o=localhost" +vulpix = Dn "cn=vulpix, o=localhost" oddish :: Dn -oddish = Dn "cn=oddish,o=localhost" +oddish = Dn "cn=oddish, o=localhost" diff --git a/test/ldap.js b/test/ldap.js index 634f844..f896d1b 100755 --- a/test/ldap.js +++ b/test/ldap.js @@ -3,6 +3,9 @@ var fs = require('fs'); var ldapjs = require('ldapjs'); +ldapjs.ExtensibleFilter.prototype.matches = ldapjs.EqualityFilter.prototype.matches; +ldapjs.ApproximateFilter.prototype.matches = ldapjs.EqualityFilter.prototype.matches; + var port = process.env.PORT; var certificate = fs.readFileSync(process.env.SSL_CERT, "utf-8"); var key = fs.readFileSync(process.env.SSL_KEY, "utf-8"); @@ -10,43 +13,43 @@ var server = ldapjs.createServer({certificate: certificate, key: key}); // var pokemon = [ - { dn: 'cn=bulbasaur,o=localhost', + { dn: 'cn=bulbasaur, o=localhost', attributes: { cn: 'bulbasaur', evolution: "0", type: ["grass", "poison"], } }, - { dn: 'cn=ivysaur,o=localhost', + { dn: 'cn=ivysaur, o=localhost', attributes: { cn: 'ivysaur', evolution: "1", type: ["grass", "poison"], } }, - { dn: 'cn=venusaur,o=localhost', + { dn: 'cn=venusaur, o=localhost', attributes: { cn: 'venusaur', evolution: "2", type: ["grass", "poison"], } }, - { dn: 'cn=charmander,o=localhost', + { dn: 'cn=charmander, o=localhost', attributes: { cn: 'charmander', evolution: "0", type: ["fire"], } }, - { dn: 'cn=charmeleon,o=localhost', + { dn: 'cn=charmeleon, o=localhost', attributes: { cn: 'charmeleon', evolution: "1", type: ["fire"], } }, - { dn: 'cn=charizard,o=localhost', + { dn: 'cn=charizard, o=localhost', attributes: { cn: 'charizard', evolution: "2", type: ["fire", "flying"], } }, - { dn: 'cn=squirtle,o=localhost', + { dn: 'cn=squirtle, o=localhost', attributes: { cn: 'squirtle', evolution: "0", type: ["water"], } }, - { dn: 'cn=wartortle,o=localhost', + { dn: 'cn=wartortle, o=localhost', attributes: { cn: 'wartortle', evolution: "1", type: ["water"], } }, - { dn: 'cn=blastoise,o=localhost', + { dn: 'cn=blastoise, o=localhost', attributes: { cn: 'blastoise', evolution: "2", type: ["water"], } }, - { dn: 'cn=caterpie,o=localhost', + { dn: 'cn=caterpie, o=localhost', attributes: { cn: 'caterpie', evolution: "0", type: ["bug"], } }, - { dn: 'cn=metapod,o=localhost', + { dn: 'cn=metapod, o=localhost', attributes: { cn: 'metapod', evolution: "1", type: ["bug"], } }, - { dn: 'cn=butterfree,o=localhost', + { dn: 'cn=butterfree, o=localhost', attributes: { cn: 'butterfree', evolution: "2", type: ["bug", "flying"], } }, - { dn: 'cn=pikachu,o=localhost', + { dn: 'cn=pikachu, o=localhost', attributes: { cn: 'pikachu', evolution: "0", type: ["electric"], password: ["i-choose-you"] } }, ]; @@ -60,8 +63,8 @@ server.bind('cn=admin', function(req, res, next) { } }); -server.bind('cn=pikachu,o=localhost', function(req, res, next) { - if ((req.dn.toString() === 'cn=pikachu,o=localhost') && (req.credentials === 'i-choose-you')) { +server.bind('cn=pikachu, o=localhost', function(req, res, next) { + if ((req.dn.toString() === 'cn=pikachu, o=localhost') && (req.credentials === 'i-choose-you')) { res.end(); return next(); } else { @@ -164,7 +167,7 @@ server.modifyDN('o=localhost', [], function(req, res, next) { if (req.dn.toString() === pokemon[i].dn) { req.dn.rdns[0] = req.newRdn.rdns[0]; pokemon[i].dn = req.dn.toString(); - pokemon[i].attributes.cn = req.newRdn.rdns[0].cn; + pokemon[i].attributes.cn = req.newRdn.rdns[0].attrs.cn.value; } }