From bebde1f49f1aa66bc5def439c274e9d749a1ca40 Mon Sep 17 00:00:00 2001 From: Alex Litvak Date: Mon, 24 Jul 2023 06:14:31 +0600 Subject: [PATCH 01/53] add package.json --- package.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..1be283f --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "iron_cache", + "version": "0.0.1", + "description": "Node client for IronCache", + "homepage": "https://github.com/iron-io/iron_cache_node", + "author": "Iron.io, Inc", + "main": "./lib/client", + "dependencies": { + "pkginfo": "0.3.0", + "underscore": "1.12.1", + "iron_core": ">=0.2.4" + }, + "devDependencies": { + "coffee-script": "1.6.2" + }, + "repository": { + "type": "git", + "url": "https://github.com/iron-io/iron_cache_node.git" + }, + "engines": { + "node": ">= 0.6.0" + } +} From 077d479757b99208b446567e69e939a1d9ec8dd0 Mon Sep 17 00:00:00 2001 From: Alex Litvak Date: Mon, 24 Jul 2023 07:14:15 +0600 Subject: [PATCH 02/53] create a basis of the lib --- lib/api_client.js | 60 +++++++++ lib/client.js | 30 +++++ package-lock.json | 305 ++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- src/api_client.coffee | 37 +++++ src/client.coffee | 18 +++ 6 files changed, 451 insertions(+), 1 deletion(-) create mode 100644 lib/api_client.js create mode 100644 lib/client.js create mode 100644 package-lock.json create mode 100644 src/api_client.coffee create mode 100644 src/client.coffee diff --git a/lib/api_client.js b/lib/api_client.js new file mode 100644 index 0000000..3e2faf4 --- /dev/null +++ b/lib/api_client.js @@ -0,0 +1,60 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var APIClient, _, ironCore, version, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + require('pkginfo')(module); + + version = this.version; + + _ = require('underscore'); + + ironCore = require('iron_core'); + + APIClient = (function(superClass) { + extend(APIClient, superClass); + + APIClient.prototype.AWS_US_EAST_HOST = 'cache-aws-us-east-1.iron.io'; + + function APIClient(options) { + var defaultOptions; + defaultOptions = { + scheme: 'https', + host: this.AWS_US_EAST_HOST, + port: 443, + api_version: 1, + user_agent: this.version() + }; + APIClient.__super__.constructor.call(this, 'iron', 'cache', options, defaultOptions, ['project_id', 'token', 'api_version']); + } + + APIClient.prototype.version = function() { + return "iron_cache_node-" + version + " (" + (APIClient.__super__.version.call(this)) + ")"; + }; + + APIClient.prototype.url = function() { + return APIClient.__super__.url.call(this) + this.options.api_version.toString() + '/projects/#{@options.project_id}/caches'; + }; + + APIClient.prototype.headers = function() { + return _.extend({}, APIClient.__super__.headers.call(this), { + 'Authorization': "OAuth " + this.options.token + }); + }; + + APIClient.prototype.cachesList = function(options, cb) { + var parseResponseBind; + parseResponseBind = _.bind(this.parseResponse, this); + return this.get("", options, function(error, response, body) { + return parseResponseBind(error, response, body, cb); + }); + }; + + return APIClient; + + })(ironCore.Client); + + module.exports.APIClient = APIClient; + +}).call(this); diff --git a/lib/client.js b/lib/client.js new file mode 100644 index 0000000..e1d40f3 --- /dev/null +++ b/lib/client.js @@ -0,0 +1,30 @@ +// Generated by CoffeeScript 1.12.7 +(function() { + var Client, _, apiClient; + + _ = require('underscore'); + + apiClient = require('./api_client'); + + Client = (function() { + function Client(options) { + this.api = new apiClient.APIClient(options); + } + + Client.prototype.cachesList = function(options, cb) { + return this.api.cachesList(options, function(error, body) { + if (error == null) { + return cb(error, body.codes); + } else { + return cb(error, body); + } + }); + }; + + return Client; + + })(); + + module.exports.Client = Client; + +}).call(this); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..e665464 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,305 @@ +{ + "name": "iron_cache", + "version": "0.0.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "asn1": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz", + "integrity": "sha512-Fh9zh3G2mZ8qM/kwsiKwL2U2FmXxVsboP4x1mXjnhKHv3SmzaBZoYvxEQJz/YS2gnCgd8xlAVWcZnQyC9qZBsA==" + }, + "assert-plus": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz", + "integrity": "sha512-brU24g7ryhRwGCI2y+1dGQmQXiZF7TtIj583S96y0jjdajIe6wn8BuXyELYhvD22dtIxDQVFk04YTJwwdwOYJw==" + }, + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==" + }, + "aws-sign2": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz", + "integrity": "sha512-oqUX0DM5j7aPWPCnpWebiyNIj2wiNI87ZxnOMoGv0aE4TGlBy2N+5iWc6dQ/NOKZaBD2W6PVz8jtOGkWzSC5EA==" + }, + "bl": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz", + "integrity": "sha512-njlCs8XLBIK7LCChTWfzWuIAxkpmmLXcL7/igCofFT1B039Sz0IPnAmosN5QaO22lU4qr8LcUz2ojUlE6pLkRQ==", + "requires": { + "readable-stream": "~1.0.26" + } + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha512-KbiZEa9/vofNcVJXGwdWWn25reQ3V3dHBWbS07FTF3/TOehLnm9GEhJV4T6ZvGPkShRpmUqYwnaCrkj0mRnP6Q==", + "requires": { + "hoek": "2.x.x" + } + }, + "caseless": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz", + "integrity": "sha512-6msL6rlJApxKoPTh2QkZF+pn7/4fqQZAJb8s5noLh/GQxFGnGYfvFaz0JGNFOip/JBM3oP3RjCdwyc4uDXWJwQ==" + }, + "coffee-script": { + "version": "1.12.7", + "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", + "integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==", + "dev": true + }, + "combined-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==", + "requires": { + "delayed-stream": "0.0.5" + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha512-FFN5KwpvvQTTS5hWPxrU8/QE4kQUc6uwZcrnlMBN82t1MgAtq8mnoDwINBly9Tdr02seeIIhtdF+UH1feBYGog==", + "requires": { + "boom": "2.x.x" + } + }, + "ctype": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz", + "integrity": "sha512-T6CEkoSV4q50zW3TlTHMbzy1E5+zlnNcY+yb7tWVYlTwPhx9LpnfAkd4wecpWknDyptp4k97LUZeInlf6jdzBg==" + }, + "delayed-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", + "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==" + }, + "forever-agent": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz", + "integrity": "sha512-PDG5Ef0Dob/JsZUxUltJOhm/Y9mlteAE+46y3M9RBz/Rd3QVENJ75aGRhN56yekTUboaBIkd8KVWX2NjF6+91A==" + }, + "form-data": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz", + "integrity": "sha512-LkinaG6JazVhYj2AKi67NOIAhqXcBOQACraT0WdhWW4ZO3kTiS0X7C1nJ1jFZf6wak4bVHIA/oOzWkh2ThAipg==", + "requires": { + "async": "~0.9.0", + "combined-stream": "~0.0.4", + "mime-types": "~2.0.3" + } + }, + "hawk": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz", + "integrity": "sha512-Pnn5Bomr1ypnBHCwhsnj+5zhP3nel9ZPa9wdzFoanaN5+1/g5dtDfBZVVZR112sfYiAftUTFczmiWGkuG0SkSQ==", + "requires": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha512-V6Yw1rIcYV/4JsnggjBU0l4Kr+EXhpwqXRusENU1Xx6ro00IHPHYNynCuBTOZAPlr3AAmLvchH9I7N/VUdvOwQ==" + }, + "http-signature": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz", + "integrity": "sha512-coK8uR5rq2IMj+Hen+sKPA5ldgbCc1/spPdKCL1Fw6h+D0s/2LzMcRK0Cqufs1h0ryx/niwBHGFu8HC3hwU+lA==", + "requires": { + "asn1": "0.1.11", + "assert-plus": "^0.1.5", + "ctype": "0.5.3" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "iron_core": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/iron_core/-/iron_core-0.2.7.tgz", + "integrity": "sha512-0cFjOjrdv19tOU6bvZDAB7OC0TsLoXZbjsaqjioOGa5B664qiKlVCj+/nE/i8BO0lXk3NlUxwHMkn1TF55zVHA==", + "requires": { + "pkginfo": "0.3.0", + "request": "2.53.0", + "underscore": "1.7.0" + }, + "dependencies": { + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha512-cp0oQQyZhUM1kpJDLdGO1jPZHgS/MpzoWYfe9+CM2h/QGDZlqwT2T3YGukuBdaNJ/CAPoeyAZRRHz8JFo176vA==" + } + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "mime-db": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz", + "integrity": "sha512-5aMAW7I4jZoZB27fXRuekqc4DVvJ7+hM8UcWrNj2mqibE54gXgPSonBYBdQW5hyaVNGmiYjY0ZMqn9fBefWYvA==" + }, + "mime-types": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz", + "integrity": "sha512-2ZHUEstNkIf2oTWgtODr6X0Cc4Ns/RN/hktdozndiEhhAC2wxXejF1FH0XLHTEImE9h6gr/tcnr3YOnSGsxc7Q==", + "requires": { + "mime-db": "~1.12.0" + } + }, + "node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha512-TkCET/3rr9mUuRp+CpO7qfgT++aAxfDRaalQhwPFzI9BY/2rCDn6OfpZOVggi1AXfTPpfkTrg5f5WQx5G1uLxA==" + }, + "oauth-sign": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz", + "integrity": "sha512-E65G/AGfoCE6FILW9X+4cfJu27PNIi40brTmDmnrWIjOdPaaJSNti1XZ/+WzFkyIdMxYk0/WtwGNiQr6puZGWQ==" + }, + "pkginfo": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.0.tgz", + "integrity": "sha512-Q4uZFfasmQ7GagbOAcVXGKlcL2Lt01A7Mt+qBd1Geo4hiqo8k+SG+NEiEbTR2R1UjbHQUOIpB7FtJXc36PL4yw==" + }, + "psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" + }, + "qs": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", + "integrity": "sha512-f5M0HQqZWkzU8GELTY8LyMrGkr3bPjKoFtTkwUEqJQbcljbeK8M7mliP9Ia2xoOI6oMerp+QPS7oYJtpGmWe/A==" + }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "request": { + "version": "2.53.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.53.0.tgz", + "integrity": "sha512-E/kWR29ujsKySEMwTRod7i8fzxIV0v58itPRcvG3FyE0Uv/l8wujgPeXlXstBybNF0EdSVounY+vcnkBn03woQ==", + "requires": { + "aws-sign2": "~0.5.0", + "bl": "~0.9.0", + "caseless": "~0.9.0", + "combined-stream": "~0.0.5", + "forever-agent": "~0.5.0", + "form-data": "~0.2.0", + "hawk": "~2.3.0", + "http-signature": "~0.10.0", + "isstream": "~0.1.1", + "json-stringify-safe": "~5.0.0", + "mime-types": "~2.0.1", + "node-uuid": "~1.4.0", + "oauth-sign": "~0.6.0", + "qs": "~2.3.1", + "stringstream": "~0.0.4", + "tough-cookie": ">=0.12.0", + "tunnel-agent": "~0.4.0" + } + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha512-7bgVOAnPj3XjrKY577S+puCKGCRlUrcrEdsMeRXlg9Ghf5df/xNi6sONUa43WrHUd3TjJBF7O04jYoiY0FVa0A==", + "requires": { + "hoek": "2.x.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" + }, + "stringstream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", + "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==" + }, + "tough-cookie": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + } + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha512-e0IoVDWx8SDHc/hwFTqJDQ7CCDTEeGhmcT9jkWJjoGQSpgBz20nAMr80E3Tpk7PatJ1b37DQDgJR3CNSzcMOZQ==" + }, + "underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" + }, + "universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==" + }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + } + } +} diff --git a/package.json b/package.json index 1be283f..dc861f9 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "iron_core": ">=0.2.4" }, "devDependencies": { - "coffee-script": "1.6.2" + "coffee-script": "1.12.7" }, "repository": { "type": "git", diff --git a/src/api_client.coffee b/src/api_client.coffee new file mode 100644 index 0000000..3cecebc --- /dev/null +++ b/src/api_client.coffee @@ -0,0 +1,37 @@ +require('pkginfo')(module) +version = @version + +_ = require('underscore') + +ironCore = require('iron_core'); + +class APIClient extends ironCore.Client + AWS_US_EAST_HOST: 'cache-aws-us-east-1.iron.io' + + constructor: (options) -> + defaultOptions = + scheme: 'https', + host: @AWS_US_EAST_HOST, + port: 443, + api_version: 1, + user_agent: @version() + + super('iron', 'cache', options, defaultOptions, ['project_id', 'token', 'api_version']) + + version: -> + "iron_cache_node-#{version} (#{super()})" + + url: -> + super() + @options.api_version.toString() + '/projects/#{@options.project_id}/caches' + + headers: -> + _.extend({}, super(), {'Authorization': "OAuth #{@options.token}"}) + + cachesList: (options, cb) -> + parseResponseBind = _.bind(@parseResponse, @) + + @get("", options, (error, response, body) -> + parseResponseBind(error, response, body, cb) + ) + +module.exports.APIClient = APIClient diff --git a/src/client.coffee b/src/client.coffee new file mode 100644 index 0000000..224094a --- /dev/null +++ b/src/client.coffee @@ -0,0 +1,18 @@ +_ = require('underscore') + +apiClient = require('./api_client') + +class Client + constructor: (options) -> + @api = new apiClient.APIClient(options) + + cachesList: (options, cb) -> + @api.cachesList(options, (error, body) -> + if not error? + cb(error, body.codes) + else + cb(error, body) + ) + + +module.exports.Client = Client From db729f59e1b8f70d4ec1f2ccd06c5e883f9d8abf Mon Sep 17 00:00:00 2001 From: Alex Litvak Date: Mon, 24 Jul 2023 09:16:22 +0600 Subject: [PATCH 03/53] small fixes --- lib/api_client.js | 2 +- lib/client.js | 2 +- src/api_client.coffee | 2 +- src/client.coffee | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/api_client.js b/lib/api_client.js index 3e2faf4..4da61d7 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -34,7 +34,7 @@ }; APIClient.prototype.url = function() { - return APIClient.__super__.url.call(this) + this.options.api_version.toString() + '/projects/#{@options.project_id}/caches'; + return APIClient.__super__.url.call(this) + this.options.api_version.toString() + ("/projects/" + this.options.project_id + "/caches"); }; APIClient.prototype.headers = function() { diff --git a/lib/client.js b/lib/client.js index e1d40f3..71b8a3c 100644 --- a/lib/client.js +++ b/lib/client.js @@ -14,7 +14,7 @@ Client.prototype.cachesList = function(options, cb) { return this.api.cachesList(options, function(error, body) { if (error == null) { - return cb(error, body.codes); + return cb(error, body); } else { return cb(error, body); } diff --git a/src/api_client.coffee b/src/api_client.coffee index 3cecebc..33a3d82 100644 --- a/src/api_client.coffee +++ b/src/api_client.coffee @@ -22,7 +22,7 @@ class APIClient extends ironCore.Client "iron_cache_node-#{version} (#{super()})" url: -> - super() + @options.api_version.toString() + '/projects/#{@options.project_id}/caches' + super() + @options.api_version.toString() + "/projects/#{@options.project_id}/caches" headers: -> _.extend({}, super(), {'Authorization': "OAuth #{@options.token}"}) diff --git a/src/client.coffee b/src/client.coffee index 224094a..97dd1f3 100644 --- a/src/client.coffee +++ b/src/client.coffee @@ -9,7 +9,7 @@ class Client cachesList: (options, cb) -> @api.cachesList(options, (error, body) -> if not error? - cb(error, body.codes) + cb(error, body) else cb(error, body) ) From 3ad322511f766fb6022aab67a570485aca21fb0c Mon Sep 17 00:00:00 2001 From: ayodejiola Date: Wed, 26 Jul 2023 11:08:50 +0100 Subject: [PATCH 04/53] implement getCache --- lib/api_client.js | 8 ++++++++ lib/client.js | 10 ++++++++++ src/api_client.coffee | 8 ++++++++ src/client.coffee | 11 +++++++++-- 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/lib/api_client.js b/lib/api_client.js index 4da61d7..1aebd96 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -51,6 +51,14 @@ }); }; + APIClient.prototype.getCache = function(cache_name, cb) { + var parseResponseBind; + parseResponseBind = _.bind(this.parseResponse, this); + return this.get("/" + cache_name, {}, function(error, response, body) { + return parseResponseBind(error, response, body, cb); + }); + }; + return APIClient; })(ironCore.Client); diff --git a/lib/client.js b/lib/client.js index 71b8a3c..6135ea8 100644 --- a/lib/client.js +++ b/lib/client.js @@ -21,6 +21,16 @@ }); }; + Client.prototype.getCache = function(cb) { + return this.api.getCache(this.api.options.cache_name, function(error, body) { + if (error == null) { + return cb(error, body); + } else { + return cb(error, body); + } + }); + }; + return Client; })(); diff --git a/src/api_client.coffee b/src/api_client.coffee index 33a3d82..e618a8e 100644 --- a/src/api_client.coffee +++ b/src/api_client.coffee @@ -34,4 +34,12 @@ class APIClient extends ironCore.Client parseResponseBind(error, response, body, cb) ) + getCache: (cache_name, cb) -> + parseResponseBind = _.bind(@parseResponse, @) + + @get("/#{cache_name}", {}, (error, response, body) -> + parseResponseBind(error, response, body, cb) + ) + + module.exports.APIClient = APIClient diff --git a/src/client.coffee b/src/client.coffee index 97dd1f3..33e303f 100644 --- a/src/client.coffee +++ b/src/client.coffee @@ -12,7 +12,14 @@ class Client cb(error, body) else cb(error, body) + ) + + getCache: (cb) -> + @api.getCache(@api.options.cache_name, (error, body) -> + if not error? + cb(error, body) + else + cb(error, body) ) - - + module.exports.Client = Client From 0ce463d59af3e1abbff9b2c711c44a13b202b389 Mon Sep 17 00:00:00 2001 From: Alex Litvak Date: Mon, 31 Jul 2023 11:39:17 +0600 Subject: [PATCH 05/53] fix getCache --- lib/api_client.js | 4 ++-- lib/client.js | 4 ++-- src/api_client.coffee | 4 ++-- src/client.coffee | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/api_client.js b/lib/api_client.js index 1aebd96..1a74006 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -51,10 +51,10 @@ }); }; - APIClient.prototype.getCache = function(cache_name, cb) { + APIClient.prototype.getCache = function(cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); - return this.get("/" + cache_name, {}, function(error, response, body) { + return this.get("/" + cache_name, options, function(error, response, body) { return parseResponseBind(error, response, body, cb); }); }; diff --git a/lib/client.js b/lib/client.js index 6135ea8..febe7d9 100644 --- a/lib/client.js +++ b/lib/client.js @@ -21,8 +21,8 @@ }); }; - Client.prototype.getCache = function(cb) { - return this.api.getCache(this.api.options.cache_name, function(error, body) { + Client.prototype.getCache = function(cache_name, options, cb) { + return this.api.getCache(cache_name, options, function(error, body) { if (error == null) { return cb(error, body); } else { diff --git a/src/api_client.coffee b/src/api_client.coffee index e618a8e..a9cdccd 100644 --- a/src/api_client.coffee +++ b/src/api_client.coffee @@ -34,10 +34,10 @@ class APIClient extends ironCore.Client parseResponseBind(error, response, body, cb) ) - getCache: (cache_name, cb) -> + getCache: (cache_name, options, cb) -> parseResponseBind = _.bind(@parseResponse, @) - @get("/#{cache_name}", {}, (error, response, body) -> + @get("/#{cache_name}", options, (error, response, body) -> parseResponseBind(error, response, body, cb) ) diff --git a/src/client.coffee b/src/client.coffee index 33e303f..0133ce2 100644 --- a/src/client.coffee +++ b/src/client.coffee @@ -14,8 +14,8 @@ class Client cb(error, body) ) - getCache: (cb) -> - @api.getCache(@api.options.cache_name, (error, body) -> + getCache: (cache_name, options, cb) -> + @api.getCache(cache_name, options, (error, body) -> if not error? cb(error, body) else From 1adfb26c2e9c50cf67f7ebf081e564d4f3b2ab5b Mon Sep 17 00:00:00 2001 From: ayodejiola Date: Fri, 4 Aug 2023 10:41:44 +0100 Subject: [PATCH 06/53] delete --- .DS_Store | Bin 0 -> 6148 bytes lib/api_client.js | 15 + lib/client.js | 10 + package-lock.json | 404 ++++++++++++++++++++++- package.json | 1 + test.js | 13 + test2/package-lock.json | 697 ++++++++++++++++++++++++++++++++++++++++ test2/package.json | 5 + test2/test.js | 14 + 9 files changed, 1158 insertions(+), 1 deletion(-) create mode 100644 .DS_Store create mode 100644 test.js create mode 100644 test2/package-lock.json create mode 100644 test2/package.json create mode 100644 test2/test.js diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..f59f9b2210b9cdb369d658a9bbb607b7f0bd317b GIT binary patch literal 6148 zcmeHKF=_)r43uIQhBPi+?iccd#W*j>2ZHS;aA2@;e^uUqGBaPF_ituPGh4uk_RVE#Jf~0Wr6NRUjoq+490o>bb#xQRo!MYtw%wop^G|lP z-CqdRWl}&2NC7Dz1*E`T6sWGcc)d$C6_El`;F%QQ_o2awy>Lv7PY0G50f2La!?2H8 z0@xS;_QEj{5tt_xm{hM3!;_A9tGr$~CMMlHZbqHD*=s`axE=8p>E=CAs}zs|mkQL7 zzGVM@hhLfhFG+fm0#e|q6!7`xW3$F9Rd1cV9D8kpf5Msb1E*mh6fDt>fzgifz;?Wf bq|9sF=0.2.4", + "pkginfo": "0.3.0", + "underscore": "1.12.1" + }, + "devDependencies": { + "coffee-script": "1.12.7" + }, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/asn1": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz", + "integrity": "sha512-Fh9zh3G2mZ8qM/kwsiKwL2U2FmXxVsboP4x1mXjnhKHv3SmzaBZoYvxEQJz/YS2gnCgd8xlAVWcZnQyC9qZBsA==", + "engines": { + "node": ">=0.4.9" + } + }, + "node_modules/assert-plus": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz", + "integrity": "sha512-brU24g7ryhRwGCI2y+1dGQmQXiZF7TtIj583S96y0jjdajIe6wn8BuXyELYhvD22dtIxDQVFk04YTJwwdwOYJw==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==" + }, + "node_modules/aws-sign2": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz", + "integrity": "sha512-oqUX0DM5j7aPWPCnpWebiyNIj2wiNI87ZxnOMoGv0aE4TGlBy2N+5iWc6dQ/NOKZaBD2W6PVz8jtOGkWzSC5EA==", + "engines": { + "node": "*" + } + }, + "node_modules/bl": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz", + "integrity": "sha512-njlCs8XLBIK7LCChTWfzWuIAxkpmmLXcL7/igCofFT1B039Sz0IPnAmosN5QaO22lU4qr8LcUz2ojUlE6pLkRQ==", + "dependencies": { + "readable-stream": "~1.0.26" + } + }, + "node_modules/boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha512-KbiZEa9/vofNcVJXGwdWWn25reQ3V3dHBWbS07FTF3/TOehLnm9GEhJV4T6ZvGPkShRpmUqYwnaCrkj0mRnP6Q==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "dependencies": { + "hoek": "2.x.x" + }, + "engines": { + "node": ">=0.10.40" + } + }, + "node_modules/caseless": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz", + "integrity": "sha512-6msL6rlJApxKoPTh2QkZF+pn7/4fqQZAJb8s5noLh/GQxFGnGYfvFaz0JGNFOip/JBM3oP3RjCdwyc4uDXWJwQ==" + }, + "node_modules/coffee-script": { + "version": "1.12.7", + "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz", + "integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==", + "deprecated": "CoffeeScript on NPM has moved to \"coffeescript\" (no hyphen)", + "dev": true, + "bin": { + "cake": "bin/cake", + "coffee": "bin/coffee" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/combined-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==", + "dependencies": { + "delayed-stream": "0.0.5" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha512-FFN5KwpvvQTTS5hWPxrU8/QE4kQUc6uwZcrnlMBN82t1MgAtq8mnoDwINBly9Tdr02seeIIhtdF+UH1feBYGog==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "dependencies": { + "boom": "2.x.x" + }, + "engines": { + "node": ">=0.10.40" + } + }, + "node_modules/ctype": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz", + "integrity": "sha512-T6CEkoSV4q50zW3TlTHMbzy1E5+zlnNcY+yb7tWVYlTwPhx9LpnfAkd4wecpWknDyptp4k97LUZeInlf6jdzBg==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/delayed-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", + "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/forever-agent": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz", + "integrity": "sha512-PDG5Ef0Dob/JsZUxUltJOhm/Y9mlteAE+46y3M9RBz/Rd3QVENJ75aGRhN56yekTUboaBIkd8KVWX2NjF6+91A==", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz", + "integrity": "sha512-LkinaG6JazVhYj2AKi67NOIAhqXcBOQACraT0WdhWW4ZO3kTiS0X7C1nJ1jFZf6wak4bVHIA/oOzWkh2ThAipg==", + "dependencies": { + "async": "~0.9.0", + "combined-stream": "~0.0.4", + "mime-types": "~2.0.3" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/hawk": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz", + "integrity": "sha512-Pnn5Bomr1ypnBHCwhsnj+5zhP3nel9ZPa9wdzFoanaN5+1/g5dtDfBZVVZR112sfYiAftUTFczmiWGkuG0SkSQ==", + "deprecated": "This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.", + "dependencies": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha512-V6Yw1rIcYV/4JsnggjBU0l4Kr+EXhpwqXRusENU1Xx6ro00IHPHYNynCuBTOZAPlr3AAmLvchH9I7N/VUdvOwQ==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "engines": { + "node": ">=0.10.40" + } + }, + "node_modules/http-signature": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz", + "integrity": "sha512-coK8uR5rq2IMj+Hen+sKPA5ldgbCc1/spPdKCL1Fw6h+D0s/2LzMcRK0Cqufs1h0ryx/niwBHGFu8HC3hwU+lA==", + "dependencies": { + "asn1": "0.1.11", + "assert-plus": "^0.1.5", + "ctype": "0.5.3" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/iron_core": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/iron_core/-/iron_core-0.2.7.tgz", + "integrity": "sha512-0cFjOjrdv19tOU6bvZDAB7OC0TsLoXZbjsaqjioOGa5B664qiKlVCj+/nE/i8BO0lXk3NlUxwHMkn1TF55zVHA==", + "dependencies": { + "pkginfo": "0.3.0", + "request": "2.53.0", + "underscore": "1.7.0" + }, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/iron_core/node_modules/underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha512-cp0oQQyZhUM1kpJDLdGO1jPZHgS/MpzoWYfe9+CM2h/QGDZlqwT2T3YGukuBdaNJ/CAPoeyAZRRHz8JFo176vA==" + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "node_modules/mime-db": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz", + "integrity": "sha512-5aMAW7I4jZoZB27fXRuekqc4DVvJ7+hM8UcWrNj2mqibE54gXgPSonBYBdQW5hyaVNGmiYjY0ZMqn9fBefWYvA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz", + "integrity": "sha512-2ZHUEstNkIf2oTWgtODr6X0Cc4Ns/RN/hktdozndiEhhAC2wxXejF1FH0XLHTEImE9h6gr/tcnr3YOnSGsxc7Q==", + "dependencies": { + "mime-db": "~1.12.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha512-TkCET/3rr9mUuRp+CpO7qfgT++aAxfDRaalQhwPFzI9BY/2rCDn6OfpZOVggi1AXfTPpfkTrg5f5WQx5G1uLxA==", + "deprecated": "Use uuid module instead", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/oauth-sign": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz", + "integrity": "sha512-E65G/AGfoCE6FILW9X+4cfJu27PNIi40brTmDmnrWIjOdPaaJSNti1XZ/+WzFkyIdMxYk0/WtwGNiQr6puZGWQ==", + "engines": { + "node": "*" + } + }, + "node_modules/pkginfo": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.0.tgz", + "integrity": "sha512-Q4uZFfasmQ7GagbOAcVXGKlcL2Lt01A7Mt+qBd1Geo4hiqo8k+SG+NEiEbTR2R1UjbHQUOIpB7FtJXc36PL4yw==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", + "integrity": "sha512-f5M0HQqZWkzU8GELTY8LyMrGkr3bPjKoFtTkwUEqJQbcljbeK8M7mliP9Ia2xoOI6oMerp+QPS7oYJtpGmWe/A==" + }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, + "node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/request": { + "version": "2.53.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.53.0.tgz", + "integrity": "sha512-E/kWR29ujsKySEMwTRod7i8fzxIV0v58itPRcvG3FyE0Uv/l8wujgPeXlXstBybNF0EdSVounY+vcnkBn03woQ==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dependencies": { + "aws-sign2": "~0.5.0", + "bl": "~0.9.0", + "caseless": "~0.9.0", + "combined-stream": "~0.0.5", + "forever-agent": "~0.5.0", + "form-data": "~0.2.0", + "hawk": "~2.3.0", + "http-signature": "~0.10.0", + "isstream": "~0.1.1", + "json-stringify-safe": "~5.0.0", + "mime-types": "~2.0.1", + "node-uuid": "~1.4.0", + "oauth-sign": "~0.6.0", + "qs": "~2.3.1", + "stringstream": "~0.0.4", + "tough-cookie": ">=0.12.0", + "tunnel-agent": "~0.4.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + }, + "node_modules/sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha512-7bgVOAnPj3XjrKY577S+puCKGCRlUrcrEdsMeRXlg9Ghf5df/xNi6sONUa43WrHUd3TjJBF7O04jYoiY0FVa0A==", + "deprecated": "This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.", + "dependencies": { + "hoek": "2.x.x" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" + }, + "node_modules/stringstream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", + "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==" + }, + "node_modules/tough-cookie": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha512-e0IoVDWx8SDHc/hwFTqJDQ7CCDTEeGhmcT9jkWJjoGQSpgBz20nAMr80E3Tpk7PatJ1b37DQDgJR3CNSzcMOZQ==", + "engines": { + "node": "*" + } + }, + "node_modules/underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" + }, + "node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + } + }, "dependencies": { "asn1": { "version": "0.1.11", diff --git a/package.json b/package.json index dc861f9..b6e924a 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "pkginfo": "0.3.0", "underscore": "1.12.1", "iron_core": ">=0.2.4" + }, "devDependencies": { "coffee-script": "1.12.7" diff --git a/test.js b/test.js new file mode 100644 index 0000000..43cf051 --- /dev/null +++ b/test.js @@ -0,0 +1,13 @@ +var iron_cache = require('iron_cache'); +var client = new iron_cache.Client(); +client.cachesList({}, function(error, body) { + console.log(body) +}); +client.deleteCache(projectId, cache_name, {}, function(error, body) { + if (error) { + console.error("An error occurred:", error); + } else { + console.log(body); + } +}); + diff --git a/test2/package-lock.json b/test2/package-lock.json new file mode 100644 index 0000000..d6e3910 --- /dev/null +++ b/test2/package-lock.json @@ -0,0 +1,697 @@ +{ + "name": "test2", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "iron_cache": "iron-io/iron_cache_node#test" + } + }, + "node_modules/asn1": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz", + "integrity": "sha512-Fh9zh3G2mZ8qM/kwsiKwL2U2FmXxVsboP4x1mXjnhKHv3SmzaBZoYvxEQJz/YS2gnCgd8xlAVWcZnQyC9qZBsA==", + "engines": { + "node": ">=0.4.9" + } + }, + "node_modules/assert-plus": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz", + "integrity": "sha512-brU24g7ryhRwGCI2y+1dGQmQXiZF7TtIj583S96y0jjdajIe6wn8BuXyELYhvD22dtIxDQVFk04YTJwwdwOYJw==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==" + }, + "node_modules/aws-sign2": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz", + "integrity": "sha512-oqUX0DM5j7aPWPCnpWebiyNIj2wiNI87ZxnOMoGv0aE4TGlBy2N+5iWc6dQ/NOKZaBD2W6PVz8jtOGkWzSC5EA==", + "engines": { + "node": "*" + } + }, + "node_modules/bl": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz", + "integrity": "sha512-njlCs8XLBIK7LCChTWfzWuIAxkpmmLXcL7/igCofFT1B039Sz0IPnAmosN5QaO22lU4qr8LcUz2ojUlE6pLkRQ==", + "dependencies": { + "readable-stream": "~1.0.26" + } + }, + "node_modules/boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha512-KbiZEa9/vofNcVJXGwdWWn25reQ3V3dHBWbS07FTF3/TOehLnm9GEhJV4T6ZvGPkShRpmUqYwnaCrkj0mRnP6Q==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "dependencies": { + "hoek": "2.x.x" + }, + "engines": { + "node": ">=0.10.40" + } + }, + "node_modules/caseless": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz", + "integrity": "sha512-6msL6rlJApxKoPTh2QkZF+pn7/4fqQZAJb8s5noLh/GQxFGnGYfvFaz0JGNFOip/JBM3oP3RjCdwyc4uDXWJwQ==" + }, + "node_modules/combined-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==", + "dependencies": { + "delayed-stream": "0.0.5" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha512-FFN5KwpvvQTTS5hWPxrU8/QE4kQUc6uwZcrnlMBN82t1MgAtq8mnoDwINBly9Tdr02seeIIhtdF+UH1feBYGog==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "dependencies": { + "boom": "2.x.x" + }, + "engines": { + "node": ">=0.10.40" + } + }, + "node_modules/ctype": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz", + "integrity": "sha512-T6CEkoSV4q50zW3TlTHMbzy1E5+zlnNcY+yb7tWVYlTwPhx9LpnfAkd4wecpWknDyptp4k97LUZeInlf6jdzBg==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/delayed-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", + "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/forever-agent": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz", + "integrity": "sha512-PDG5Ef0Dob/JsZUxUltJOhm/Y9mlteAE+46y3M9RBz/Rd3QVENJ75aGRhN56yekTUboaBIkd8KVWX2NjF6+91A==", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz", + "integrity": "sha512-LkinaG6JazVhYj2AKi67NOIAhqXcBOQACraT0WdhWW4ZO3kTiS0X7C1nJ1jFZf6wak4bVHIA/oOzWkh2ThAipg==", + "dependencies": { + "async": "~0.9.0", + "combined-stream": "~0.0.4", + "mime-types": "~2.0.3" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/hawk": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz", + "integrity": "sha512-Pnn5Bomr1ypnBHCwhsnj+5zhP3nel9ZPa9wdzFoanaN5+1/g5dtDfBZVVZR112sfYiAftUTFczmiWGkuG0SkSQ==", + "deprecated": "This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.", + "dependencies": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha512-V6Yw1rIcYV/4JsnggjBU0l4Kr+EXhpwqXRusENU1Xx6ro00IHPHYNynCuBTOZAPlr3AAmLvchH9I7N/VUdvOwQ==", + "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", + "engines": { + "node": ">=0.10.40" + } + }, + "node_modules/http-signature": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz", + "integrity": "sha512-coK8uR5rq2IMj+Hen+sKPA5ldgbCc1/spPdKCL1Fw6h+D0s/2LzMcRK0Cqufs1h0ryx/niwBHGFu8HC3hwU+lA==", + "dependencies": { + "asn1": "0.1.11", + "assert-plus": "^0.1.5", + "ctype": "0.5.3" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/iron_cache": { + "version": "0.0.1", + "resolved": "git+ssh://git@github.com/iron-io/iron_cache_node.git#0ce463d59af3e1abbff9b2c711c44a13b202b389", + "dependencies": { + "iron_core": ">=0.2.4", + "pkginfo": "0.3.0", + "underscore": "1.12.1" + }, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/iron_core": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/iron_core/-/iron_core-0.2.7.tgz", + "integrity": "sha512-0cFjOjrdv19tOU6bvZDAB7OC0TsLoXZbjsaqjioOGa5B664qiKlVCj+/nE/i8BO0lXk3NlUxwHMkn1TF55zVHA==", + "dependencies": { + "pkginfo": "0.3.0", + "request": "2.53.0", + "underscore": "1.7.0" + }, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/iron_core/node_modules/underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha512-cp0oQQyZhUM1kpJDLdGO1jPZHgS/MpzoWYfe9+CM2h/QGDZlqwT2T3YGukuBdaNJ/CAPoeyAZRRHz8JFo176vA==" + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "node_modules/mime-db": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz", + "integrity": "sha512-5aMAW7I4jZoZB27fXRuekqc4DVvJ7+hM8UcWrNj2mqibE54gXgPSonBYBdQW5hyaVNGmiYjY0ZMqn9fBefWYvA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz", + "integrity": "sha512-2ZHUEstNkIf2oTWgtODr6X0Cc4Ns/RN/hktdozndiEhhAC2wxXejF1FH0XLHTEImE9h6gr/tcnr3YOnSGsxc7Q==", + "dependencies": { + "mime-db": "~1.12.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha512-TkCET/3rr9mUuRp+CpO7qfgT++aAxfDRaalQhwPFzI9BY/2rCDn6OfpZOVggi1AXfTPpfkTrg5f5WQx5G1uLxA==", + "deprecated": "Use uuid module instead", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/oauth-sign": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz", + "integrity": "sha512-E65G/AGfoCE6FILW9X+4cfJu27PNIi40brTmDmnrWIjOdPaaJSNti1XZ/+WzFkyIdMxYk0/WtwGNiQr6puZGWQ==", + "engines": { + "node": "*" + } + }, + "node_modules/pkginfo": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.0.tgz", + "integrity": "sha512-Q4uZFfasmQ7GagbOAcVXGKlcL2Lt01A7Mt+qBd1Geo4hiqo8k+SG+NEiEbTR2R1UjbHQUOIpB7FtJXc36PL4yw==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", + "integrity": "sha512-f5M0HQqZWkzU8GELTY8LyMrGkr3bPjKoFtTkwUEqJQbcljbeK8M7mliP9Ia2xoOI6oMerp+QPS7oYJtpGmWe/A==" + }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, + "node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/request": { + "version": "2.53.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.53.0.tgz", + "integrity": "sha512-E/kWR29ujsKySEMwTRod7i8fzxIV0v58itPRcvG3FyE0Uv/l8wujgPeXlXstBybNF0EdSVounY+vcnkBn03woQ==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dependencies": { + "aws-sign2": "~0.5.0", + "bl": "~0.9.0", + "caseless": "~0.9.0", + "combined-stream": "~0.0.5", + "forever-agent": "~0.5.0", + "form-data": "~0.2.0", + "hawk": "~2.3.0", + "http-signature": "~0.10.0", + "isstream": "~0.1.1", + "json-stringify-safe": "~5.0.0", + "mime-types": "~2.0.1", + "node-uuid": "~1.4.0", + "oauth-sign": "~0.6.0", + "qs": "~2.3.1", + "stringstream": "~0.0.4", + "tough-cookie": ">=0.12.0", + "tunnel-agent": "~0.4.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + }, + "node_modules/sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha512-7bgVOAnPj3XjrKY577S+puCKGCRlUrcrEdsMeRXlg9Ghf5df/xNi6sONUa43WrHUd3TjJBF7O04jYoiY0FVa0A==", + "deprecated": "This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.", + "dependencies": { + "hoek": "2.x.x" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" + }, + "node_modules/stringstream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", + "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==" + }, + "node_modules/tough-cookie": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha512-e0IoVDWx8SDHc/hwFTqJDQ7CCDTEeGhmcT9jkWJjoGQSpgBz20nAMr80E3Tpk7PatJ1b37DQDgJR3CNSzcMOZQ==", + "engines": { + "node": "*" + } + }, + "node_modules/underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" + }, + "node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + } + }, + "dependencies": { + "asn1": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz", + "integrity": "sha512-Fh9zh3G2mZ8qM/kwsiKwL2U2FmXxVsboP4x1mXjnhKHv3SmzaBZoYvxEQJz/YS2gnCgd8xlAVWcZnQyC9qZBsA==" + }, + "assert-plus": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz", + "integrity": "sha512-brU24g7ryhRwGCI2y+1dGQmQXiZF7TtIj583S96y0jjdajIe6wn8BuXyELYhvD22dtIxDQVFk04YTJwwdwOYJw==" + }, + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==" + }, + "aws-sign2": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz", + "integrity": "sha512-oqUX0DM5j7aPWPCnpWebiyNIj2wiNI87ZxnOMoGv0aE4TGlBy2N+5iWc6dQ/NOKZaBD2W6PVz8jtOGkWzSC5EA==" + }, + "bl": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz", + "integrity": "sha512-njlCs8XLBIK7LCChTWfzWuIAxkpmmLXcL7/igCofFT1B039Sz0IPnAmosN5QaO22lU4qr8LcUz2ojUlE6pLkRQ==", + "requires": { + "readable-stream": "~1.0.26" + } + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha512-KbiZEa9/vofNcVJXGwdWWn25reQ3V3dHBWbS07FTF3/TOehLnm9GEhJV4T6ZvGPkShRpmUqYwnaCrkj0mRnP6Q==", + "requires": { + "hoek": "2.x.x" + } + }, + "caseless": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz", + "integrity": "sha512-6msL6rlJApxKoPTh2QkZF+pn7/4fqQZAJb8s5noLh/GQxFGnGYfvFaz0JGNFOip/JBM3oP3RjCdwyc4uDXWJwQ==" + }, + "combined-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==", + "requires": { + "delayed-stream": "0.0.5" + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha512-FFN5KwpvvQTTS5hWPxrU8/QE4kQUc6uwZcrnlMBN82t1MgAtq8mnoDwINBly9Tdr02seeIIhtdF+UH1feBYGog==", + "requires": { + "boom": "2.x.x" + } + }, + "ctype": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz", + "integrity": "sha512-T6CEkoSV4q50zW3TlTHMbzy1E5+zlnNcY+yb7tWVYlTwPhx9LpnfAkd4wecpWknDyptp4k97LUZeInlf6jdzBg==" + }, + "delayed-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", + "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==" + }, + "forever-agent": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz", + "integrity": "sha512-PDG5Ef0Dob/JsZUxUltJOhm/Y9mlteAE+46y3M9RBz/Rd3QVENJ75aGRhN56yekTUboaBIkd8KVWX2NjF6+91A==" + }, + "form-data": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz", + "integrity": "sha512-LkinaG6JazVhYj2AKi67NOIAhqXcBOQACraT0WdhWW4ZO3kTiS0X7C1nJ1jFZf6wak4bVHIA/oOzWkh2ThAipg==", + "requires": { + "async": "~0.9.0", + "combined-stream": "~0.0.4", + "mime-types": "~2.0.3" + } + }, + "hawk": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz", + "integrity": "sha512-Pnn5Bomr1ypnBHCwhsnj+5zhP3nel9ZPa9wdzFoanaN5+1/g5dtDfBZVVZR112sfYiAftUTFczmiWGkuG0SkSQ==", + "requires": { + "boom": "2.x.x", + "cryptiles": "2.x.x", + "hoek": "2.x.x", + "sntp": "1.x.x" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha512-V6Yw1rIcYV/4JsnggjBU0l4Kr+EXhpwqXRusENU1Xx6ro00IHPHYNynCuBTOZAPlr3AAmLvchH9I7N/VUdvOwQ==" + }, + "http-signature": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz", + "integrity": "sha512-coK8uR5rq2IMj+Hen+sKPA5ldgbCc1/spPdKCL1Fw6h+D0s/2LzMcRK0Cqufs1h0ryx/niwBHGFu8HC3hwU+lA==", + "requires": { + "asn1": "0.1.11", + "assert-plus": "^0.1.5", + "ctype": "0.5.3" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "iron_cache": { + "version": "git+ssh://git@github.com/iron-io/iron_cache_node.git#0ce463d59af3e1abbff9b2c711c44a13b202b389", + "from": "iron_cache@iron-io/iron_cache_node#test", + "requires": { + "iron_core": ">=0.2.4", + "pkginfo": "0.3.0", + "underscore": "1.12.1" + } + }, + "iron_core": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/iron_core/-/iron_core-0.2.7.tgz", + "integrity": "sha512-0cFjOjrdv19tOU6bvZDAB7OC0TsLoXZbjsaqjioOGa5B664qiKlVCj+/nE/i8BO0lXk3NlUxwHMkn1TF55zVHA==", + "requires": { + "pkginfo": "0.3.0", + "request": "2.53.0", + "underscore": "1.7.0" + }, + "dependencies": { + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha512-cp0oQQyZhUM1kpJDLdGO1jPZHgS/MpzoWYfe9+CM2h/QGDZlqwT2T3YGukuBdaNJ/CAPoeyAZRRHz8JFo176vA==" + } + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "mime-db": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz", + "integrity": "sha512-5aMAW7I4jZoZB27fXRuekqc4DVvJ7+hM8UcWrNj2mqibE54gXgPSonBYBdQW5hyaVNGmiYjY0ZMqn9fBefWYvA==" + }, + "mime-types": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz", + "integrity": "sha512-2ZHUEstNkIf2oTWgtODr6X0Cc4Ns/RN/hktdozndiEhhAC2wxXejF1FH0XLHTEImE9h6gr/tcnr3YOnSGsxc7Q==", + "requires": { + "mime-db": "~1.12.0" + } + }, + "node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha512-TkCET/3rr9mUuRp+CpO7qfgT++aAxfDRaalQhwPFzI9BY/2rCDn6OfpZOVggi1AXfTPpfkTrg5f5WQx5G1uLxA==" + }, + "oauth-sign": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz", + "integrity": "sha512-E65G/AGfoCE6FILW9X+4cfJu27PNIi40brTmDmnrWIjOdPaaJSNti1XZ/+WzFkyIdMxYk0/WtwGNiQr6puZGWQ==" + }, + "pkginfo": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.0.tgz", + "integrity": "sha512-Q4uZFfasmQ7GagbOAcVXGKlcL2Lt01A7Mt+qBd1Geo4hiqo8k+SG+NEiEbTR2R1UjbHQUOIpB7FtJXc36PL4yw==" + }, + "psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" + }, + "qs": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", + "integrity": "sha512-f5M0HQqZWkzU8GELTY8LyMrGkr3bPjKoFtTkwUEqJQbcljbeK8M7mliP9Ia2xoOI6oMerp+QPS7oYJtpGmWe/A==" + }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "request": { + "version": "2.53.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.53.0.tgz", + "integrity": "sha512-E/kWR29ujsKySEMwTRod7i8fzxIV0v58itPRcvG3FyE0Uv/l8wujgPeXlXstBybNF0EdSVounY+vcnkBn03woQ==", + "requires": { + "aws-sign2": "~0.5.0", + "bl": "~0.9.0", + "caseless": "~0.9.0", + "combined-stream": "~0.0.5", + "forever-agent": "~0.5.0", + "form-data": "~0.2.0", + "hawk": "~2.3.0", + "http-signature": "~0.10.0", + "isstream": "~0.1.1", + "json-stringify-safe": "~5.0.0", + "mime-types": "~2.0.1", + "node-uuid": "~1.4.0", + "oauth-sign": "~0.6.0", + "qs": "~2.3.1", + "stringstream": "~0.0.4", + "tough-cookie": ">=0.12.0", + "tunnel-agent": "~0.4.0" + } + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha512-7bgVOAnPj3XjrKY577S+puCKGCRlUrcrEdsMeRXlg9Ghf5df/xNi6sONUa43WrHUd3TjJBF7O04jYoiY0FVa0A==", + "requires": { + "hoek": "2.x.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" + }, + "stringstream": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", + "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==" + }, + "tough-cookie": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + } + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha512-e0IoVDWx8SDHc/hwFTqJDQ7CCDTEeGhmcT9jkWJjoGQSpgBz20nAMr80E3Tpk7PatJ1b37DQDgJR3CNSzcMOZQ==" + }, + "underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" + }, + "universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==" + }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + } + } +} diff --git a/test2/package.json b/test2/package.json new file mode 100644 index 0000000..faa199e --- /dev/null +++ b/test2/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "iron_cache": "iron-io/iron_cache_node#test" + } +} diff --git a/test2/test.js b/test2/test.js new file mode 100644 index 0000000..18a6df4 --- /dev/null +++ b/test2/test.js @@ -0,0 +1,14 @@ +var iron_cache = require('iron_cache'); +var client = new iron_cache.Client(); +client.cachesList({}, function(error, body) { + console.log(error,body) +}); + + +client.getCache("testcache2", {}, function(error, cache) { + if (error) { + console.error('Error:', error); + } else { + console.log('Cache Information:', cache); + } +}); From 05526149aea10f1438c8b54d3509a414fab7d090 Mon Sep 17 00:00:00 2001 From: ayodejiola Date: Fri, 4 Aug 2023 10:52:50 +0100 Subject: [PATCH 07/53] delete2 --- test2/package-lock.json | 697 ---------------------------------------- test2/package.json | 5 - test2/test.js | 14 - 3 files changed, 716 deletions(-) delete mode 100644 test2/package-lock.json delete mode 100644 test2/package.json delete mode 100644 test2/test.js diff --git a/test2/package-lock.json b/test2/package-lock.json deleted file mode 100644 index d6e3910..0000000 --- a/test2/package-lock.json +++ /dev/null @@ -1,697 +0,0 @@ -{ - "name": "test2", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "iron_cache": "iron-io/iron_cache_node#test" - } - }, - "node_modules/asn1": { - "version": "0.1.11", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz", - "integrity": "sha512-Fh9zh3G2mZ8qM/kwsiKwL2U2FmXxVsboP4x1mXjnhKHv3SmzaBZoYvxEQJz/YS2gnCgd8xlAVWcZnQyC9qZBsA==", - "engines": { - "node": ">=0.4.9" - } - }, - "node_modules/assert-plus": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz", - "integrity": "sha512-brU24g7ryhRwGCI2y+1dGQmQXiZF7TtIj583S96y0jjdajIe6wn8BuXyELYhvD22dtIxDQVFk04YTJwwdwOYJw==", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==" - }, - "node_modules/aws-sign2": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz", - "integrity": "sha512-oqUX0DM5j7aPWPCnpWebiyNIj2wiNI87ZxnOMoGv0aE4TGlBy2N+5iWc6dQ/NOKZaBD2W6PVz8jtOGkWzSC5EA==", - "engines": { - "node": "*" - } - }, - "node_modules/bl": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz", - "integrity": "sha512-njlCs8XLBIK7LCChTWfzWuIAxkpmmLXcL7/igCofFT1B039Sz0IPnAmosN5QaO22lU4qr8LcUz2ojUlE6pLkRQ==", - "dependencies": { - "readable-stream": "~1.0.26" - } - }, - "node_modules/boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha512-KbiZEa9/vofNcVJXGwdWWn25reQ3V3dHBWbS07FTF3/TOehLnm9GEhJV4T6ZvGPkShRpmUqYwnaCrkj0mRnP6Q==", - "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", - "dependencies": { - "hoek": "2.x.x" - }, - "engines": { - "node": ">=0.10.40" - } - }, - "node_modules/caseless": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz", - "integrity": "sha512-6msL6rlJApxKoPTh2QkZF+pn7/4fqQZAJb8s5noLh/GQxFGnGYfvFaz0JGNFOip/JBM3oP3RjCdwyc4uDXWJwQ==" - }, - "node_modules/combined-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", - "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==", - "dependencies": { - "delayed-stream": "0.0.5" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" - }, - "node_modules/cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha512-FFN5KwpvvQTTS5hWPxrU8/QE4kQUc6uwZcrnlMBN82t1MgAtq8mnoDwINBly9Tdr02seeIIhtdF+UH1feBYGog==", - "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", - "dependencies": { - "boom": "2.x.x" - }, - "engines": { - "node": ">=0.10.40" - } - }, - "node_modules/ctype": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz", - "integrity": "sha512-T6CEkoSV4q50zW3TlTHMbzy1E5+zlnNcY+yb7tWVYlTwPhx9LpnfAkd4wecpWknDyptp4k97LUZeInlf6jdzBg==", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/delayed-stream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", - "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/forever-agent": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz", - "integrity": "sha512-PDG5Ef0Dob/JsZUxUltJOhm/Y9mlteAE+46y3M9RBz/Rd3QVENJ75aGRhN56yekTUboaBIkd8KVWX2NjF6+91A==", - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz", - "integrity": "sha512-LkinaG6JazVhYj2AKi67NOIAhqXcBOQACraT0WdhWW4ZO3kTiS0X7C1nJ1jFZf6wak4bVHIA/oOzWkh2ThAipg==", - "dependencies": { - "async": "~0.9.0", - "combined-stream": "~0.0.4", - "mime-types": "~2.0.3" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/hawk": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz", - "integrity": "sha512-Pnn5Bomr1ypnBHCwhsnj+5zhP3nel9ZPa9wdzFoanaN5+1/g5dtDfBZVVZR112sfYiAftUTFczmiWGkuG0SkSQ==", - "deprecated": "This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.", - "dependencies": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha512-V6Yw1rIcYV/4JsnggjBU0l4Kr+EXhpwqXRusENU1Xx6ro00IHPHYNynCuBTOZAPlr3AAmLvchH9I7N/VUdvOwQ==", - "deprecated": "This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).", - "engines": { - "node": ">=0.10.40" - } - }, - "node_modules/http-signature": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz", - "integrity": "sha512-coK8uR5rq2IMj+Hen+sKPA5ldgbCc1/spPdKCL1Fw6h+D0s/2LzMcRK0Cqufs1h0ryx/niwBHGFu8HC3hwU+lA==", - "dependencies": { - "asn1": "0.1.11", - "assert-plus": "^0.1.5", - "ctype": "0.5.3" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/iron_cache": { - "version": "0.0.1", - "resolved": "git+ssh://git@github.com/iron-io/iron_cache_node.git#0ce463d59af3e1abbff9b2c711c44a13b202b389", - "dependencies": { - "iron_core": ">=0.2.4", - "pkginfo": "0.3.0", - "underscore": "1.12.1" - }, - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/iron_core": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/iron_core/-/iron_core-0.2.7.tgz", - "integrity": "sha512-0cFjOjrdv19tOU6bvZDAB7OC0TsLoXZbjsaqjioOGa5B664qiKlVCj+/nE/i8BO0lXk3NlUxwHMkn1TF55zVHA==", - "dependencies": { - "pkginfo": "0.3.0", - "request": "2.53.0", - "underscore": "1.7.0" - }, - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/iron_core/node_modules/underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha512-cp0oQQyZhUM1kpJDLdGO1jPZHgS/MpzoWYfe9+CM2h/QGDZlqwT2T3YGukuBdaNJ/CAPoeyAZRRHz8JFo176vA==" - }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" - }, - "node_modules/mime-db": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz", - "integrity": "sha512-5aMAW7I4jZoZB27fXRuekqc4DVvJ7+hM8UcWrNj2mqibE54gXgPSonBYBdQW5hyaVNGmiYjY0ZMqn9fBefWYvA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz", - "integrity": "sha512-2ZHUEstNkIf2oTWgtODr6X0Cc4Ns/RN/hktdozndiEhhAC2wxXejF1FH0XLHTEImE9h6gr/tcnr3YOnSGsxc7Q==", - "dependencies": { - "mime-db": "~1.12.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/node-uuid": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", - "integrity": "sha512-TkCET/3rr9mUuRp+CpO7qfgT++aAxfDRaalQhwPFzI9BY/2rCDn6OfpZOVggi1AXfTPpfkTrg5f5WQx5G1uLxA==", - "deprecated": "Use uuid module instead", - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/oauth-sign": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz", - "integrity": "sha512-E65G/AGfoCE6FILW9X+4cfJu27PNIi40brTmDmnrWIjOdPaaJSNti1XZ/+WzFkyIdMxYk0/WtwGNiQr6puZGWQ==", - "engines": { - "node": "*" - } - }, - "node_modules/pkginfo": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.0.tgz", - "integrity": "sha512-Q4uZFfasmQ7GagbOAcVXGKlcL2Lt01A7Mt+qBd1Geo4hiqo8k+SG+NEiEbTR2R1UjbHQUOIpB7FtJXc36PL4yw==", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" - }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/qs": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", - "integrity": "sha512-f5M0HQqZWkzU8GELTY8LyMrGkr3bPjKoFtTkwUEqJQbcljbeK8M7mliP9Ia2xoOI6oMerp+QPS7oYJtpGmWe/A==" - }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" - }, - "node_modules/readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "node_modules/request": { - "version": "2.53.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.53.0.tgz", - "integrity": "sha512-E/kWR29ujsKySEMwTRod7i8fzxIV0v58itPRcvG3FyE0Uv/l8wujgPeXlXstBybNF0EdSVounY+vcnkBn03woQ==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dependencies": { - "aws-sign2": "~0.5.0", - "bl": "~0.9.0", - "caseless": "~0.9.0", - "combined-stream": "~0.0.5", - "forever-agent": "~0.5.0", - "form-data": "~0.2.0", - "hawk": "~2.3.0", - "http-signature": "~0.10.0", - "isstream": "~0.1.1", - "json-stringify-safe": "~5.0.0", - "mime-types": "~2.0.1", - "node-uuid": "~1.4.0", - "oauth-sign": "~0.6.0", - "qs": "~2.3.1", - "stringstream": "~0.0.4", - "tough-cookie": ">=0.12.0", - "tunnel-agent": "~0.4.0" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" - }, - "node_modules/sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha512-7bgVOAnPj3XjrKY577S+puCKGCRlUrcrEdsMeRXlg9Ghf5df/xNi6sONUa43WrHUd3TjJBF7O04jYoiY0FVa0A==", - "deprecated": "This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.", - "dependencies": { - "hoek": "2.x.x" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" - }, - "node_modules/stringstream": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", - "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==" - }, - "node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha512-e0IoVDWx8SDHc/hwFTqJDQ7CCDTEeGhmcT9jkWJjoGQSpgBz20nAMr80E3Tpk7PatJ1b37DQDgJR3CNSzcMOZQ==", - "engines": { - "node": "*" - } - }, - "node_modules/underscore": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", - "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" - }, - "node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - } - }, - "dependencies": { - "asn1": { - "version": "0.1.11", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz", - "integrity": "sha512-Fh9zh3G2mZ8qM/kwsiKwL2U2FmXxVsboP4x1mXjnhKHv3SmzaBZoYvxEQJz/YS2gnCgd8xlAVWcZnQyC9qZBsA==" - }, - "assert-plus": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz", - "integrity": "sha512-brU24g7ryhRwGCI2y+1dGQmQXiZF7TtIj583S96y0jjdajIe6wn8BuXyELYhvD22dtIxDQVFk04YTJwwdwOYJw==" - }, - "async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==" - }, - "aws-sign2": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz", - "integrity": "sha512-oqUX0DM5j7aPWPCnpWebiyNIj2wiNI87ZxnOMoGv0aE4TGlBy2N+5iWc6dQ/NOKZaBD2W6PVz8jtOGkWzSC5EA==" - }, - "bl": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz", - "integrity": "sha512-njlCs8XLBIK7LCChTWfzWuIAxkpmmLXcL7/igCofFT1B039Sz0IPnAmosN5QaO22lU4qr8LcUz2ojUlE6pLkRQ==", - "requires": { - "readable-stream": "~1.0.26" - } - }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha512-KbiZEa9/vofNcVJXGwdWWn25reQ3V3dHBWbS07FTF3/TOehLnm9GEhJV4T6ZvGPkShRpmUqYwnaCrkj0mRnP6Q==", - "requires": { - "hoek": "2.x.x" - } - }, - "caseless": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz", - "integrity": "sha512-6msL6rlJApxKoPTh2QkZF+pn7/4fqQZAJb8s5noLh/GQxFGnGYfvFaz0JGNFOip/JBM3oP3RjCdwyc4uDXWJwQ==" - }, - "combined-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", - "integrity": "sha512-qfexlmLp9MyrkajQVyjEDb0Vj+KhRgR/rxLiVhaihlT+ZkX0lReqtH6Ack40CvMDERR4b5eFp3CreskpBs1Pig==", - "requires": { - "delayed-stream": "0.0.5" - } - }, - "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha512-FFN5KwpvvQTTS5hWPxrU8/QE4kQUc6uwZcrnlMBN82t1MgAtq8mnoDwINBly9Tdr02seeIIhtdF+UH1feBYGog==", - "requires": { - "boom": "2.x.x" - } - }, - "ctype": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz", - "integrity": "sha512-T6CEkoSV4q50zW3TlTHMbzy1E5+zlnNcY+yb7tWVYlTwPhx9LpnfAkd4wecpWknDyptp4k97LUZeInlf6jdzBg==" - }, - "delayed-stream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", - "integrity": "sha512-v+7uBd1pqe5YtgPacIIbZ8HuHeLFVNe4mUEyFDXL6KiqzEykjbw+5mXZXpGFgNVasdL4jWKgaKIXrEHiynN1LA==" - }, - "forever-agent": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz", - "integrity": "sha512-PDG5Ef0Dob/JsZUxUltJOhm/Y9mlteAE+46y3M9RBz/Rd3QVENJ75aGRhN56yekTUboaBIkd8KVWX2NjF6+91A==" - }, - "form-data": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz", - "integrity": "sha512-LkinaG6JazVhYj2AKi67NOIAhqXcBOQACraT0WdhWW4ZO3kTiS0X7C1nJ1jFZf6wak4bVHIA/oOzWkh2ThAipg==", - "requires": { - "async": "~0.9.0", - "combined-stream": "~0.0.4", - "mime-types": "~2.0.3" - } - }, - "hawk": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz", - "integrity": "sha512-Pnn5Bomr1ypnBHCwhsnj+5zhP3nel9ZPa9wdzFoanaN5+1/g5dtDfBZVVZR112sfYiAftUTFczmiWGkuG0SkSQ==", - "requires": { - "boom": "2.x.x", - "cryptiles": "2.x.x", - "hoek": "2.x.x", - "sntp": "1.x.x" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha512-V6Yw1rIcYV/4JsnggjBU0l4Kr+EXhpwqXRusENU1Xx6ro00IHPHYNynCuBTOZAPlr3AAmLvchH9I7N/VUdvOwQ==" - }, - "http-signature": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz", - "integrity": "sha512-coK8uR5rq2IMj+Hen+sKPA5ldgbCc1/spPdKCL1Fw6h+D0s/2LzMcRK0Cqufs1h0ryx/niwBHGFu8HC3hwU+lA==", - "requires": { - "asn1": "0.1.11", - "assert-plus": "^0.1.5", - "ctype": "0.5.3" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "iron_cache": { - "version": "git+ssh://git@github.com/iron-io/iron_cache_node.git#0ce463d59af3e1abbff9b2c711c44a13b202b389", - "from": "iron_cache@iron-io/iron_cache_node#test", - "requires": { - "iron_core": ">=0.2.4", - "pkginfo": "0.3.0", - "underscore": "1.12.1" - } - }, - "iron_core": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/iron_core/-/iron_core-0.2.7.tgz", - "integrity": "sha512-0cFjOjrdv19tOU6bvZDAB7OC0TsLoXZbjsaqjioOGa5B664qiKlVCj+/nE/i8BO0lXk3NlUxwHMkn1TF55zVHA==", - "requires": { - "pkginfo": "0.3.0", - "request": "2.53.0", - "underscore": "1.7.0" - }, - "dependencies": { - "underscore": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", - "integrity": "sha512-cp0oQQyZhUM1kpJDLdGO1jPZHgS/MpzoWYfe9+CM2h/QGDZlqwT2T3YGukuBdaNJ/CAPoeyAZRRHz8JFo176vA==" - } - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" - }, - "mime-db": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz", - "integrity": "sha512-5aMAW7I4jZoZB27fXRuekqc4DVvJ7+hM8UcWrNj2mqibE54gXgPSonBYBdQW5hyaVNGmiYjY0ZMqn9fBefWYvA==" - }, - "mime-types": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz", - "integrity": "sha512-2ZHUEstNkIf2oTWgtODr6X0Cc4Ns/RN/hktdozndiEhhAC2wxXejF1FH0XLHTEImE9h6gr/tcnr3YOnSGsxc7Q==", - "requires": { - "mime-db": "~1.12.0" - } - }, - "node-uuid": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", - "integrity": "sha512-TkCET/3rr9mUuRp+CpO7qfgT++aAxfDRaalQhwPFzI9BY/2rCDn6OfpZOVggi1AXfTPpfkTrg5f5WQx5G1uLxA==" - }, - "oauth-sign": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz", - "integrity": "sha512-E65G/AGfoCE6FILW9X+4cfJu27PNIi40brTmDmnrWIjOdPaaJSNti1XZ/+WzFkyIdMxYk0/WtwGNiQr6puZGWQ==" - }, - "pkginfo": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.0.tgz", - "integrity": "sha512-Q4uZFfasmQ7GagbOAcVXGKlcL2Lt01A7Mt+qBd1Geo4hiqo8k+SG+NEiEbTR2R1UjbHQUOIpB7FtJXc36PL4yw==" - }, - "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" - }, - "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==" - }, - "qs": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", - "integrity": "sha512-f5M0HQqZWkzU8GELTY8LyMrGkr3bPjKoFtTkwUEqJQbcljbeK8M7mliP9Ia2xoOI6oMerp+QPS7oYJtpGmWe/A==" - }, - "querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "request": { - "version": "2.53.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.53.0.tgz", - "integrity": "sha512-E/kWR29ujsKySEMwTRod7i8fzxIV0v58itPRcvG3FyE0Uv/l8wujgPeXlXstBybNF0EdSVounY+vcnkBn03woQ==", - "requires": { - "aws-sign2": "~0.5.0", - "bl": "~0.9.0", - "caseless": "~0.9.0", - "combined-stream": "~0.0.5", - "forever-agent": "~0.5.0", - "form-data": "~0.2.0", - "hawk": "~2.3.0", - "http-signature": "~0.10.0", - "isstream": "~0.1.1", - "json-stringify-safe": "~5.0.0", - "mime-types": "~2.0.1", - "node-uuid": "~1.4.0", - "oauth-sign": "~0.6.0", - "qs": "~2.3.1", - "stringstream": "~0.0.4", - "tough-cookie": ">=0.12.0", - "tunnel-agent": "~0.4.0" - } - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha512-7bgVOAnPj3XjrKY577S+puCKGCRlUrcrEdsMeRXlg9Ghf5df/xNi6sONUa43WrHUd3TjJBF7O04jYoiY0FVa0A==", - "requires": { - "hoek": "2.x.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" - }, - "stringstream": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz", - "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==" - }, - "tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", - "requires": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - } - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha512-e0IoVDWx8SDHc/hwFTqJDQ7CCDTEeGhmcT9jkWJjoGQSpgBz20nAMr80E3Tpk7PatJ1b37DQDgJR3CNSzcMOZQ==" - }, - "underscore": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", - "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" - }, - "universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==" - }, - "url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "requires": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - } - } -} diff --git a/test2/package.json b/test2/package.json deleted file mode 100644 index faa199e..0000000 --- a/test2/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "iron_cache": "iron-io/iron_cache_node#test" - } -} diff --git a/test2/test.js b/test2/test.js deleted file mode 100644 index 18a6df4..0000000 --- a/test2/test.js +++ /dev/null @@ -1,14 +0,0 @@ -var iron_cache = require('iron_cache'); -var client = new iron_cache.Client(); -client.cachesList({}, function(error, body) { - console.log(error,body) -}); - - -client.getCache("testcache2", {}, function(error, cache) { - if (error) { - console.error('Error:', error); - } else { - console.log('Cache Information:', cache); - } -}); From 4e9de54b4b4005b00fe985302b6e5729ef69022e Mon Sep 17 00:00:00 2001 From: Alex Litvak Date: Thu, 10 Aug 2023 22:21:36 +0600 Subject: [PATCH 08/53] remove test.js --- test.js | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 test.js diff --git a/test.js b/test.js deleted file mode 100644 index 43cf051..0000000 --- a/test.js +++ /dev/null @@ -1,13 +0,0 @@ -var iron_cache = require('iron_cache'); -var client = new iron_cache.Client(); -client.cachesList({}, function(error, body) { - console.log(body) -}); -client.deleteCache(projectId, cache_name, {}, function(error, body) { - if (error) { - console.error("An error occurred:", error); - } else { - console.log(body); - } -}); - From 381ef0010986a5e11e990a7c6c1a3e0f1b8f2ae2 Mon Sep 17 00:00:00 2001 From: Alex Litvak Date: Fri, 11 Aug 2023 16:12:19 +0600 Subject: [PATCH 09/53] fix path in deleteCache(...) function --- lib/api_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api_client.js b/lib/api_client.js index 57fe154..f449986 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -63,7 +63,7 @@ var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); - var path = "/projects/" + projectId + "/caches/" + cache_name; + var path = "/" + cache_name; return this.delete(path, options, function(error, response, body) { return parseResponseBind(error, response, body, cb); From 5d19e28824670569048c17d0b2da30c0c4fca8ee Mon Sep 17 00:00:00 2001 From: Alex Litvak Date: Mon, 14 Aug 2023 14:18:37 +0600 Subject: [PATCH 10/53] deleteCache refactoring --- lib/api_client.js | 21 +++++++-------------- lib/client.js | 18 +++++++++--------- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/lib/api_client.js b/lib/api_client.js index f449986..cf8fbc5 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -59,20 +59,13 @@ }); }; - APIClient.prototype.deleteCache = function(projectId, cache_name, options, cb) { - var parseResponseBind; - parseResponseBind = _.bind(this.parseResponse, this); - - var path = "/" + cache_name; - - return this.delete(path, options, function(error, response, body) { - return parseResponseBind(error, response, body, cb); - }); -}; - - - - + APIClient.prototype.deleteCache = function(cache_name, options, cb) { + var parseResponseBind; + parseResponseBind = _.bind(this.parseResponse, this); + return this.delete("/" + cache_name, options, function(error, response, body) { + return parseResponseBind(error, response, body, cb); + }); + }; return APIClient; diff --git a/lib/client.js b/lib/client.js index 5c47ec7..5a623d6 100644 --- a/lib/client.js +++ b/lib/client.js @@ -31,15 +31,15 @@ }); }; - Client.prototype.deleteCache = function(projectId, cache_name, options, cb) { - return this.api.deleteCache(projectId, cache_name, options, function(error, body) { - if (error == null) { - return cb(error, body); - } else { - return cb(error, body); - } - }); - }; + Client.prototype.deleteCache = function(cache_name, options, cb) { + return this.api.deleteCache(cache_name, options, function(error, body) { + if (error == null) { + return cb(error, body); + } else { + return cb(error, body); + } + }); + }; return Client; From e962d1586596499b51ba0fd663f17fd72f4e55de Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Tue, 15 Aug 2023 21:09:18 +0100 Subject: [PATCH 11/53] Update api_client.js --- lib/api_client.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/api_client.js b/lib/api_client.js index cf8fbc5..1ccecc8 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -67,6 +67,14 @@ }); }; + APIClient.prototype.clearCache = function(cache_name, options, cb) { + var parseResponseBind; + parseResponseBind = _.bind(this.parseResponse, this); + return this.post("/" + cache_name + "/clear", options, function(error, response, body) { + return parseResponseBind(error, response, body, cb); + }); + }; + return APIClient; })(ironCore.Client); From d1147bf9d2029503bf2cb888b750348285452e9a Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Tue, 15 Aug 2023 21:11:01 +0100 Subject: [PATCH 12/53] Update client.js --- lib/client.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/client.js b/lib/client.js index 5a623d6..1a7c39d 100644 --- a/lib/client.js +++ b/lib/client.js @@ -41,6 +41,18 @@ }); }; + Client.prototype.clearCache = function(cache_name, options, cb) { + return this.api.clearCache(cache_name, options, function(error, body) { + if (error == null) { + return cb(error, body); + } else { + return cb(error, body); + } + }); + }; + + + return Client; })(); From 66e7fcace154d9de8386c1fbeed894c967239707 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Mon, 21 Aug 2023 19:52:06 +0100 Subject: [PATCH 13/53] Update api_client.js --- lib/api_client.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/api_client.js b/lib/api_client.js index 1ccecc8..a5c7123 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -75,6 +75,14 @@ }); }; + APIClient.prototype.putCache = function(key, cache_name, options, cb) { + var parseResponseBind; + parseResponseBind = _.bind(this.parseResponse, this); + return this.post("/" + cache_name + "/items" + key, options, function(error, response, body) { + return parseResponseBind(error, response, body, cb); + }); + }; + return APIClient; })(ironCore.Client); From 88920c4fcd0e8bb03000a8e4dcee825f47258aef Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Mon, 21 Aug 2023 19:54:54 +0100 Subject: [PATCH 14/53] Update client.js --- lib/client.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/client.js b/lib/client.js index 1a7c39d..9621902 100644 --- a/lib/client.js +++ b/lib/client.js @@ -50,6 +50,16 @@ } }); }; + + Client.prototype.putCache = function(key, cache_name, options, cb) { + return this.api.clearCache(key, cache_name, options, function(error, body) { + if (error == null) { + return cb(error, body); + } else { + return cb(error, body); + } + }); + }; From 6473496ed62023539fb5ebd206e32f7be3d5750b Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Mon, 21 Aug 2023 20:57:52 +0100 Subject: [PATCH 15/53] Update api_client.js --- lib/api_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api_client.js b/lib/api_client.js index a5c7123..a9f266b 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -78,7 +78,7 @@ APIClient.prototype.putCache = function(key, cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); - return this.post("/" + cache_name + "/items" + key, options, function(error, response, body) { + return this.post("/" + cache_name + "/items" + "/key", options, function(error, response, body) { return parseResponseBind(error, response, body, cb); }); }; From 3407f37a48b4ef829c365f3bec5c723ada6c306f Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Mon, 21 Aug 2023 21:01:09 +0100 Subject: [PATCH 16/53] Update client.js --- lib/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client.js b/lib/client.js index 9621902..930afd8 100644 --- a/lib/client.js +++ b/lib/client.js @@ -52,7 +52,7 @@ }; Client.prototype.putCache = function(key, cache_name, options, cb) { - return this.api.clearCache(key, cache_name, options, function(error, body) { + return this.api.putCache(key, cache_name, options, function(error, body) { if (error == null) { return cb(error, body); } else { From a064d61265ffbd01e45300b6cacc1d708b6c7cc9 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Mon, 21 Aug 2023 21:01:30 +0100 Subject: [PATCH 17/53] Update api_client.js --- lib/api_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api_client.js b/lib/api_client.js index a9f266b..a5c7123 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -78,7 +78,7 @@ APIClient.prototype.putCache = function(key, cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); - return this.post("/" + cache_name + "/items" + "/key", options, function(error, response, body) { + return this.post("/" + cache_name + "/items" + key, options, function(error, response, body) { return parseResponseBind(error, response, body, cb); }); }; From 2a9d92b823aa40621ff4f890efa7278293953118 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Mon, 21 Aug 2023 21:06:39 +0100 Subject: [PATCH 18/53] Update api_client.js --- lib/api_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api_client.js b/lib/api_client.js index a5c7123..d0075c4 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -78,7 +78,7 @@ APIClient.prototype.putCache = function(key, cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); - return this.post("/" + cache_name + "/items" + key, options, function(error, response, body) { + return this.post("/" + cache_name + "/items", options, function(error, response, body) { return parseResponseBind(error, response, body, cb); }); }; From 16d892d91cf06d27dfa8ee318dfc7ca10a95c7ba Mon Sep 17 00:00:00 2001 From: Alex Litvak Date: Wed, 30 Aug 2023 03:02:12 +0600 Subject: [PATCH 19/53] fix putItem function --- lib/api_client.js | 4 ++-- lib/client.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/api_client.js b/lib/api_client.js index d0075c4..e716d5f 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -75,10 +75,10 @@ }); }; - APIClient.prototype.putCache = function(key, cache_name, options, cb) { + APIClient.prototype.putItem = function(key, cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); - return this.post("/" + cache_name + "/items", options, function(error, response, body) { + return this.put("/" + cache_name + "/items/" + key, options, function(error, response, body) { return parseResponseBind(error, response, body, cb); }); }; diff --git a/lib/client.js b/lib/client.js index 930afd8..e56de43 100644 --- a/lib/client.js +++ b/lib/client.js @@ -51,8 +51,8 @@ }); }; - Client.prototype.putCache = function(key, cache_name, options, cb) { - return this.api.putCache(key, cache_name, options, function(error, body) { + Client.prototype.putItem = function(key, cache_name, options, cb) { + return this.api.putItem(key, cache_name, options, function(error, body) { if (error == null) { return cb(error, body); } else { From de8cc550b247c1b97fe5b971233edfd52b9aa7fe Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 02:07:47 +0100 Subject: [PATCH 20/53] Update api_client.js --- lib/api_client.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/api_client.js b/lib/api_client.js index e716d5f..2ed101a 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -82,6 +82,14 @@ return parseResponseBind(error, response, body, cb); }); }; + + APIClient.prototype.postItem = function(key, cache_name, options, cb) { + var parseResponseBind; + parseResponseBind = _.bind(this.parseResponse, this); + return this.post("/" + cache_name + "/items/" + key + "/increment/" + options, function(error, response, body) { + return parseResponseBind(error, response, body, cb); + }); + }; return APIClient; From 95f82efd57d94d83c828edb5f26d6a8425c6a56c Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 02:10:47 +0100 Subject: [PATCH 21/53] Update api_client.js --- lib/api_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api_client.js b/lib/api_client.js index 2ed101a..b886d08 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -83,7 +83,7 @@ }); }; - APIClient.prototype.postItem = function(key, cache_name, options, cb) { + APIClient.prototype.IncrementItem = function(key, cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); return this.post("/" + cache_name + "/items/" + key + "/increment/" + options, function(error, response, body) { From 390dfd6f5fbd2116f625460f8538ef32ad79ef1c Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 02:13:22 +0100 Subject: [PATCH 22/53] Update client.js --- lib/client.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/client.js b/lib/client.js index e56de43..781a63f 100644 --- a/lib/client.js +++ b/lib/client.js @@ -61,6 +61,16 @@ }); }; + Client.prototype.IncrementItem = function(key, cache_name, options, cb) { + return this.api.IncrementItem(key, cache_name, options, function(error, body) { + if (error == null) { + return cb(error, body); + } else { + return cb(error, body); + } + }); + }; + return Client; From 0468275965b392e0df671b4eb6bcb850f8233695 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 02:56:17 +0100 Subject: [PATCH 23/53] Update api_client.js --- lib/api_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api_client.js b/lib/api_client.js index b886d08..2aff943 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -86,7 +86,7 @@ APIClient.prototype.IncrementItem = function(key, cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); - return this.post("/" + cache_name + "/items/" + key + "/increment/" + options, function(error, response, body) { + return this.post("/" + cache_name + "/items/" + key, options, function(error, response, body) { return parseResponseBind(error, response, body, cb); }); }; From 4e7e4d61133edfd5abf4a72577b2b76b9cd22b4b Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 09:45:10 +0100 Subject: [PATCH 24/53] Update api_client.js --- lib/api_client.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/api_client.js b/lib/api_client.js index 2aff943..a4bede3 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -83,13 +83,16 @@ }); }; - APIClient.prototype.IncrementItem = function(key, cache_name, options, cb) { + APIClient.prototype.IncrementItem = function(key, cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); - return this.post("/" + cache_name + "/items/" + key, options, function(error, response, body) { + return this.post("/" + cache_name + "/items/" +key + "/increment", options, function(error, response, body) { return parseResponseBind(error, response, body, cb); }); }; + + + return APIClient; From 050aa2629bf8b0b0bf69c237298142e639dd336a Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 09:56:53 +0100 Subject: [PATCH 25/53] Update api_client.js --- lib/api_client.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/api_client.js b/lib/api_client.js index a4bede3..3592d94 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -91,6 +91,15 @@ }); }; + GET /projects/{Project ID}/caches/{Cache Name}/items/{Key} + + APIClient.prototype.getCacheItem = function(key, cache_name, options, cb) { + var parseResponseBind; + parseResponseBind = _.bind(this.parseResponse, this); + return this.get("/" + cache_name + "/items/" + key, options, function(error, response, body) { + return parseResponseBind(error, response, body, cb); + }); + }; From 7390255be3a644572a6f7d1e93d3a4780c087f29 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 09:58:01 +0100 Subject: [PATCH 26/53] Update client.js --- lib/client.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/client.js b/lib/client.js index 781a63f..a72d98c 100644 --- a/lib/client.js +++ b/lib/client.js @@ -71,6 +71,15 @@ }); }; + Client.prototype.getCacheItem = function(key, cache_name, options, cb) { + return this.api.IncrementItem(key, cache_name, options, function(error, body) { + if (error == null) { + return cb(error, body); + } else { + return cb(error, body); + } + }); + }; return Client; From b35c7bee4debb664e07b9ecdc74d57ca1409d1c1 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 09:58:27 +0100 Subject: [PATCH 27/53] Update client.js --- lib/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client.js b/lib/client.js index a72d98c..c28b9f2 100644 --- a/lib/client.js +++ b/lib/client.js @@ -72,7 +72,7 @@ }; Client.prototype.getCacheItem = function(key, cache_name, options, cb) { - return this.api.IncrementItem(key, cache_name, options, function(error, body) { + return this.api.getCacheItem(key, cache_name, options, function(error, body) { if (error == null) { return cb(error, body); } else { From 08ea43cbb3fa82ad8fe1006a00aab45981d8f9d3 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:02:25 +0100 Subject: [PATCH 28/53] Update api_client.js --- lib/api_client.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/api_client.js b/lib/api_client.js index 3592d94..dddfcd5 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -91,7 +91,6 @@ }); }; - GET /projects/{Project ID}/caches/{Cache Name}/items/{Key} APIClient.prototype.getCacheItem = function(key, cache_name, options, cb) { var parseResponseBind; From 86e7a25367714e7e29a5041db2585fb3e17b0dd5 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:06:41 +0100 Subject: [PATCH 29/53] Update api_client.js --- lib/api_client.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/api_client.js b/lib/api_client.js index dddfcd5..b7daaa5 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -100,7 +100,14 @@ }); }; - + + APIClient.prototype.deleteCache = function(cache_name, options, cb) { + var parseResponseBind; + parseResponseBind = _.bind(this.parseResponse, this); + return this.deleteItem("/" + cache_name + "/items/" + key, options, function(error, response, body) { + return parseResponseBind(error, response, body, cb); + }); + }; return APIClient; From 89f05e4e23339a2c5255d5bab4185a9cc800927c Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:08:16 +0100 Subject: [PATCH 30/53] Update client.js --- lib/client.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/client.js b/lib/client.js index c28b9f2..4cd5bbd 100644 --- a/lib/client.js +++ b/lib/client.js @@ -80,6 +80,18 @@ } }); }; + + + Client.prototype.deleteItem = function(key, cache_name, options, cb) { + return this.api.deleteItem(key, cache_name, options, function(error, body) { + if (error == null) { + return cb(error, body); + } else { + return cb(error, body); + } + }); + }; + return Client; From 3d3186c99fa2b2268b167a73fa77e9ca49bf91b0 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:08:50 +0100 Subject: [PATCH 31/53] Update api_client.js --- lib/api_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api_client.js b/lib/api_client.js index b7daaa5..5f1adc0 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -104,7 +104,7 @@ APIClient.prototype.deleteCache = function(cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); - return this.deleteItem("/" + cache_name + "/items/" + key, options, function(error, response, body) { + return this.delete("/" + cache_name + "/items/" + key, options, function(error, response, body) { return parseResponseBind(error, response, body, cb); }); }; From 42fc77f034252a7ae88646c640ae29677be4108f Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:11:32 +0100 Subject: [PATCH 32/53] Update api_client.js --- lib/api_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api_client.js b/lib/api_client.js index 5f1adc0..9f2f15e 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -101,7 +101,7 @@ }; - APIClient.prototype.deleteCache = function(cache_name, options, cb) { + APIClient.prototype.deleteItem = function(cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); return this.delete("/" + cache_name + "/items/" + key, options, function(error, response, body) { From b4710fba5352a59ed7e0f9cba9ce6e57375dc6ef Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:19:14 +0100 Subject: [PATCH 33/53] Update api_client.js --- lib/api_client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/api_client.js b/lib/api_client.js index 9f2f15e..ffd8368 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -104,11 +104,12 @@ APIClient.prototype.deleteItem = function(cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); - return this.delete("/" + cache_name + "/items/" + key, options, function(error, response, body) { + return this.delete("/" + cache_name + "/items", options, function(error, response, body) { return parseResponseBind(error, response, body, cb); }); }; + return APIClient; })(ironCore.Client); From 63e507a6cdad9e0932b9867e355350bfd8970507 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:23:07 +0100 Subject: [PATCH 34/53] Update api_client.js --- lib/api_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api_client.js b/lib/api_client.js index ffd8368..e463711 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -104,7 +104,7 @@ APIClient.prototype.deleteItem = function(cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); - return this.delete("/" + cache_name + "/items", options, function(error, response, body) { + return this.delete("/" + cache_name + "/items/" + key, options, function(error, response, body) { return parseResponseBind(error, response, body, cb); }); }; From 6dad92f033de6e954ef9a3e590b8f1da43883ac6 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:33:41 +0100 Subject: [PATCH 35/53] Update client.js --- lib/client.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/client.js b/lib/client.js index 4cd5bbd..030fd18 100644 --- a/lib/client.js +++ b/lib/client.js @@ -91,6 +91,7 @@ } }); }; + From a7b13c1086bcaf77eefd05f4ba91fb6dc60c2aa2 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:34:38 +0100 Subject: [PATCH 36/53] Update api_client.js --- lib/api_client.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/api_client.js b/lib/api_client.js index e463711..b955455 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -100,14 +100,16 @@ }); }; - - APIClient.prototype.deleteItem = function(cache_name, options, cb) { + APIClient.prototype.deleteItem = function(key, cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); return this.delete("/" + cache_name + "/items/" + key, options, function(error, response, body) { return parseResponseBind(error, response, body, cb); }); }; + + + return APIClient; From 62d3b04d0f4b3033a6d61630c3d9cdb37effeced Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Tue, 12 Sep 2023 01:22:57 +0100 Subject: [PATCH 37/53] Update api_client.coffee --- src/api_client.coffee | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/api_client.coffee b/src/api_client.coffee index a9cdccd..4adbd0f 100644 --- a/src/api_client.coffee +++ b/src/api_client.coffee @@ -41,5 +41,40 @@ class APIClient extends ironCore.Client parseResponseBind(error, response, body, cb) ) + deleteCache: (cache_name, options, cb) -> + parseResponseBind = _.bind(@parseResponse, @) + @delete("/#{cache_name}", options, (error, response, body) -> + parseResponseBind(error, response, body, cb) + ) + + clearCache: (cache_name, options, cb) -> + parseResponseBind = _.bind(@parseResponse, @) + @post("/#{cache_name}/clear", options, (error, response, body) -> + parseResponseBind(error, response, body, cb) + ) + + putItem: (key, cache_name, options, cb) -> + parseResponseBind = _.bind(@parseResponse, @) + @put("/#{cache_name}/items/#{key}", options, (error, response, body) -> + parseResponseBind(error, response, body, cb) + ) + + IncrementItem: (key, cache_name, options, cb) -> + parseResponseBind = _.bind(@parseResponse, @) + @post("/#{cache_name}/items/#{key}/increment", options, (error, response, body) -> + parseResponseBind(error, response, body, cb) + ) + + getCacheItem: (key, cache_name, options, cb) -> + parseResponseBind = _.bind(@parseResponse, @) + @get("/#{cache_name}/items/#{key}", options, (error, response, body) -> + parseResponseBind(error, response, body, cb) + ) + + deleteItem: (key, cache_name, options, cb) -> + parseResponseBind = _.bind(@parseResponse, @) + @delete("/#{cache_name}/items/#{key}", options, (error, response, body) -> + parseResponseBind(error, response, body, cb) + ) module.exports.APIClient = APIClient From 73e6d68f4de56e40618f0388ff02fd1851c9e2fb Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Tue, 12 Sep 2023 01:35:05 +0100 Subject: [PATCH 38/53] Update client.coffee --- src/client.coffee | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/src/client.coffee b/src/client.coffee index 0133ce2..7babcb1 100644 --- a/src/client.coffee +++ b/src/client.coffee @@ -21,5 +21,54 @@ class Client else cb(error, body) ) + + deleteCache: (cache_name, options, cb) -> + @api.deleteCache(cache_name, options, (error, body) -> + if error == null + cb(error, body) + else + cb(error, body) + ) + + clearCache: (cache_name, options, cb) -> + @api.clearCache(cache_name, options, (error, body) -> + if error == null + cb(error, body) + else + cb(error, body) + ) + + putItem: (key, cache_name, options, cb) -> + @api.putItem(key, cache_name, options, (error, body) -> + if error == null + cb(error, body) + else + cb(error, body) + ) + + IncrementItem: (key, cache_name, options, cb) -> + @api.IncrementItem(key, cache_name, options, (error, body) -> + if error == null + cb(error, body) + else + cb(error, body) + ) + + getCacheItem: (key, cache_name, options, cb) -> + @api.getCacheItem(key, cache_name, options, (error, body) -> + if error == null + cb(error, body) + else + cb(error, body) + ) + + deleteItem: (key, cache_name, options, cb) -> + @api.deleteItem(key, cache_name, options, (error, body) -> + if error == null + cb(error, body) + else + cb(error, body) + ) + module.exports.Client = Client From 613bf8a0c900b83990e40573ea3dea0f5d5054bd Mon Sep 17 00:00:00 2001 From: Alex Litvak Date: Mon, 18 Sep 2023 19:39:34 +0600 Subject: [PATCH 39/53] Fix coffeescript & refactoring --- lib/api_client.js | 17 ++++-------- lib/client.js | 26 ++++++++---------- src/api_client.coffee | 38 ++++++++++++------------- src/client.coffee | 64 +++++++++++++++++++++---------------------- 4 files changed, 68 insertions(+), 77 deletions(-) diff --git a/lib/api_client.js b/lib/api_client.js index b955455..0cb0135 100644 --- a/lib/api_client.js +++ b/lib/api_client.js @@ -62,7 +62,7 @@ APIClient.prototype.deleteCache = function(cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); - return this.delete("/" + cache_name, options, function(error, response, body) { + return this["delete"]("/" + cache_name, options, function(error, response, body) { return parseResponseBind(error, response, body, cb); }); }; @@ -74,7 +74,7 @@ return parseResponseBind(error, response, body, cb); }); }; - + APIClient.prototype.putItem = function(key, cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); @@ -83,16 +83,15 @@ }); }; - APIClient.prototype.IncrementItem = function(key, cache_name, options, cb) { + APIClient.prototype.IncrementItem = function(key, cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); - return this.post("/" + cache_name + "/items/" +key + "/increment", options, function(error, response, body) { + return this.post("/" + cache_name + "/items/" + key + "/increment", options, function(error, response, body) { return parseResponseBind(error, response, body, cb); }); }; - - APIClient.prototype.getCacheItem = function(key, cache_name, options, cb) { + APIClient.prototype.getItem = function(key, cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); return this.get("/" + cache_name + "/items/" + key, options, function(error, response, body) { @@ -103,15 +102,11 @@ APIClient.prototype.deleteItem = function(key, cache_name, options, cb) { var parseResponseBind; parseResponseBind = _.bind(this.parseResponse, this); - return this.delete("/" + cache_name + "/items/" + key, options, function(error, response, body) { + return this["delete"]("/" + cache_name + "/items/" + key, options, function(error, response, body) { return parseResponseBind(error, response, body, cb); }); }; - - - - return APIClient; })(ironCore.Client); diff --git a/lib/client.js b/lib/client.js index 030fd18..a8a5098 100644 --- a/lib/client.js +++ b/lib/client.js @@ -30,10 +30,10 @@ } }); }; - + Client.prototype.deleteCache = function(cache_name, options, cb) { return this.api.deleteCache(cache_name, options, function(error, body) { - if (error == null) { + if (error === null) { return cb(error, body); } else { return cb(error, body); @@ -43,17 +43,17 @@ Client.prototype.clearCache = function(cache_name, options, cb) { return this.api.clearCache(cache_name, options, function(error, body) { - if (error == null) { + if (error === null) { return cb(error, body); } else { return cb(error, body); } }); }; - + Client.prototype.putItem = function(key, cache_name, options, cb) { return this.api.putItem(key, cache_name, options, function(error, body) { - if (error == null) { + if (error === null) { return cb(error, body); } else { return cb(error, body); @@ -63,7 +63,7 @@ Client.prototype.IncrementItem = function(key, cache_name, options, cb) { return this.api.IncrementItem(key, cache_name, options, function(error, body) { - if (error == null) { + if (error === null) { return cb(error, body); } else { return cb(error, body); @@ -71,29 +71,25 @@ }); }; - Client.prototype.getCacheItem = function(key, cache_name, options, cb) { - return this.api.getCacheItem(key, cache_name, options, function(error, body) { - if (error == null) { + Client.prototype.getItem = function(key, cache_name, options, cb) { + return this.api.getItem(key, cache_name, options, function(error, body) { + if (error === null) { return cb(error, body); } else { return cb(error, body); } }); }; - - Client.prototype.deleteItem = function(key, cache_name, options, cb) { + Client.prototype.deleteItem = function(key, cache_name, options, cb) { return this.api.deleteItem(key, cache_name, options, function(error, body) { - if (error == null) { + if (error === null) { return cb(error, body); } else { return cb(error, body); } }); }; - - - return Client; diff --git a/src/api_client.coffee b/src/api_client.coffee index 4adbd0f..ea73f4d 100644 --- a/src/api_client.coffee +++ b/src/api_client.coffee @@ -43,38 +43,38 @@ class APIClient extends ironCore.Client deleteCache: (cache_name, options, cb) -> parseResponseBind = _.bind(@parseResponse, @) - @delete("/#{cache_name}", options, (error, response, body) -> - parseResponseBind(error, response, body, cb) - ) + @delete("/#{cache_name}", options, (error, response, body) -> + parseResponseBind(error, response, body, cb) + ) clearCache: (cache_name, options, cb) -> parseResponseBind = _.bind(@parseResponse, @) - @post("/#{cache_name}/clear", options, (error, response, body) -> - parseResponseBind(error, response, body, cb) - ) + @post("/#{cache_name}/clear", options, (error, response, body) -> + parseResponseBind(error, response, body, cb) + ) putItem: (key, cache_name, options, cb) -> parseResponseBind = _.bind(@parseResponse, @) - @put("/#{cache_name}/items/#{key}", options, (error, response, body) -> - parseResponseBind(error, response, body, cb) - ) + @put("/#{cache_name}/items/#{key}", options, (error, response, body) -> + parseResponseBind(error, response, body, cb) + ) IncrementItem: (key, cache_name, options, cb) -> parseResponseBind = _.bind(@parseResponse, @) - @post("/#{cache_name}/items/#{key}/increment", options, (error, response, body) -> - parseResponseBind(error, response, body, cb) - ) + @post("/#{cache_name}/items/#{key}/increment", options, (error, response, body) -> + parseResponseBind(error, response, body, cb) + ) - getCacheItem: (key, cache_name, options, cb) -> + getItem: (key, cache_name, options, cb) -> parseResponseBind = _.bind(@parseResponse, @) - @get("/#{cache_name}/items/#{key}", options, (error, response, body) -> - parseResponseBind(error, response, body, cb) - ) + @get("/#{cache_name}/items/#{key}", options, (error, response, body) -> + parseResponseBind(error, response, body, cb) + ) deleteItem: (key, cache_name, options, cb) -> parseResponseBind = _.bind(@parseResponse, @) - @delete("/#{cache_name}/items/#{key}", options, (error, response, body) -> - parseResponseBind(error, response, body, cb) - ) + @delete("/#{cache_name}/items/#{key}", options, (error, response, body) -> + parseResponseBind(error, response, body, cb) + ) module.exports.APIClient = APIClient diff --git a/src/client.coffee b/src/client.coffee index 7babcb1..3b3a978 100644 --- a/src/client.coffee +++ b/src/client.coffee @@ -24,51 +24,51 @@ class Client deleteCache: (cache_name, options, cb) -> @api.deleteCache(cache_name, options, (error, body) -> - if error == null - cb(error, body) - else - cb(error, body) - ) + if error == null + cb(error, body) + else + cb(error, body) + ) clearCache: (cache_name, options, cb) -> @api.clearCache(cache_name, options, (error, body) -> - if error == null - cb(error, body) - else - cb(error, body) - ) + if error == null + cb(error, body) + else + cb(error, body) + ) putItem: (key, cache_name, options, cb) -> @api.putItem(key, cache_name, options, (error, body) -> - if error == null - cb(error, body) - else - cb(error, body) - ) + if error == null + cb(error, body) + else + cb(error, body) + ) IncrementItem: (key, cache_name, options, cb) -> @api.IncrementItem(key, cache_name, options, (error, body) -> - if error == null - cb(error, body) - else - cb(error, body) - ) + if error == null + cb(error, body) + else + cb(error, body) + ) - getCacheItem: (key, cache_name, options, cb) -> - @api.getCacheItem(key, cache_name, options, (error, body) -> - if error == null - cb(error, body) - else - cb(error, body) - ) + getItem: (key, cache_name, options, cb) -> + @api.getItem(key, cache_name, options, (error, body) -> + if error == null + cb(error, body) + else + cb(error, body) + ) deleteItem: (key, cache_name, options, cb) -> @api.deleteItem(key, cache_name, options, (error, body) -> - if error == null - cb(error, body) - else - cb(error, body) - ) + if error == null + cb(error, body) + else + cb(error, body) + ) module.exports.Client = Client From 4ff99d6b9f9f1618fcff1540129f09e37467f94f Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Tue, 16 Jan 2024 22:39:48 -0500 Subject: [PATCH 40/53] Update README.md --- README.md | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 24bef4b..d21ec12 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,79 @@ iron_cache_node -=============== \ No newline at end of file +=============== + +iron-cache-node API Client +This is a Node.js library for interacting with the Iron Cache service. It provides a convenient way to manage caches, manipulate items, and perform various cache-related operations. + +Installation +Ensure you have Node.js and npm installed. You can then install the library using the following: + +```bash +npm install iron-cache-node + +Usage +'''javascript +const { APIClient } = require('iron-cache-node'); +// Initialize the client with your project credentials +const client = new APIClient({ + project_id: 'your_project_id', + token: 'your_token', + api_version: 1, // optional, defaults to 1 +}); + +// Example: List all caches +client.cachesList({}, (error, response) => { + if (error) { + console.error('Error:', error); + } else { + console.log('Caches:', response); + } +}); + +// Example: Get information about a specific cache +const cacheName = 'example_cache'; +client.getCache(cacheName, {}, (error, response) => { + if (error) { + console.error('Error:', error); + } else { + console.log('Cache Info:', response); + } +}); + +// Other available methods: deleteCache, clearCache, putItem, IncrementItem, getItem, deleteItem, etc. +API Reference +APIClient(options) +Constructor for creating an instance of the APIClient. It requires the following options: + +project_id: Your Iron Cache project ID. +token: Your Iron Cache authentication token. +api_version: (Optional) The version of the Iron Cache API to use. Defaults to 1. +Methods +cachesList(options, callback) +List all caches within the project. + +getCache(cache_name, options, callback) +Get information about a specific cache. + +deleteCache(cache_name, options, callback) +Delete a specific cache. + +clearCache(cache_name, options, callback) +Clear all items in a specific cache. + +putItem(key, cache_name, options, callback) +Put an item into a specific cache. + +IncrementItem(key, cache_name, options, callback) +Increment the value of a numeric item in a specific cache. + +getItem(key, cache_name, options, callback) +Get information about a specific item in a cache. + +deleteItem(key, cache_name, options, callback) +Delete a specific item from a cache. + +Contributing +Feel free to contribute to the development of this library. Fork the repository, make your changes, and submit a pull request. + +License +This library is licensed under the MIT License. See the LICENSE file for details. From ff2244ebbd6fea91c817b3c6e2666b90598dbac8 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Tue, 16 Jan 2024 22:43:18 -0500 Subject: [PATCH 41/53] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d21ec12..4691334 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Ensure you have Node.js and npm installed. You can then install the library usin ```bash npm install iron-cache-node - +''' Usage '''javascript const { APIClient } = require('iron-cache-node'); From fe2757b0cfde200fd011f17cdbfc7f37e133a0a8 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Tue, 16 Jan 2024 22:44:55 -0500 Subject: [PATCH 42/53] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4691334..d21ec12 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Ensure you have Node.js and npm installed. You can then install the library usin ```bash npm install iron-cache-node -''' + Usage '''javascript const { APIClient } = require('iron-cache-node'); From 5d5b6c36c4cbfcce49078368abba48c584c26443 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Tue, 16 Jan 2024 22:53:47 -0500 Subject: [PATCH 43/53] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d21ec12..26e9be4 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Ensure you have Node.js and npm installed. You can then install the library usin ```bash npm install iron-cache-node +``` Usage '''javascript @@ -19,6 +20,8 @@ const client = new APIClient({ token: 'your_token', api_version: 1, // optional, defaults to 1 }); +``` + // Example: List all caches client.cachesList({}, (error, response) => { From 714972035380267233d3cf1d67b5e59801e326f8 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Tue, 16 Jan 2024 22:55:45 -0500 Subject: [PATCH 44/53] Update README.md --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 26e9be4..f20059f 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ npm install iron-cache-node ``` Usage -'''javascript +``` const { APIClient } = require('iron-cache-node'); // Initialize the client with your project credentials const client = new APIClient({ @@ -22,8 +22,9 @@ const client = new APIClient({ }); ``` - -// Example: List all caches +``` +Example: List all caches +``` client.cachesList({}, (error, response) => { if (error) { console.error('Error:', error); @@ -31,8 +32,10 @@ client.cachesList({}, (error, response) => { console.log('Caches:', response); } }); +``` -// Example: Get information about a specific cache + Example: Get information about a specific cache + ``` const cacheName = 'example_cache'; client.getCache(cacheName, {}, (error, response) => { if (error) { @@ -41,8 +44,9 @@ client.getCache(cacheName, {}, (error, response) => { console.log('Cache Info:', response); } }); +``` -// Other available methods: deleteCache, clearCache, putItem, IncrementItem, getItem, deleteItem, etc. +Other available methods: deleteCache, clearCache, putItem, IncrementItem, getItem, deleteItem, etc. API Reference APIClient(options) Constructor for creating an instance of the APIClient. It requires the following options: @@ -75,8 +79,4 @@ Get information about a specific item in a cache. deleteItem(key, cache_name, options, callback) Delete a specific item from a cache. -Contributing -Feel free to contribute to the development of this library. Fork the repository, make your changes, and submit a pull request. -License -This library is licensed under the MIT License. See the LICENSE file for details. From 0b6058313f6a41232ec647e16440a004e16ff483 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Tue, 16 Jan 2024 22:56:34 -0500 Subject: [PATCH 45/53] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f20059f..efc4fde 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,9 @@ const client = new APIClient({ }); ``` -``` + Example: List all caches + ``` client.cachesList({}, (error, response) => { if (error) { From c1ab8fb156eefd3961b43cdc1cbee4c8b7aefbcb Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:54:51 -0500 Subject: [PATCH 46/53] Update README.md --- README.md | 135 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 94 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index efc4fde..4227b1a 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,28 @@ iron_cache_node =============== -iron-cache-node API Client -This is a Node.js library for interacting with the Iron Cache service. It provides a convenient way to manage caches, manipulate items, and perform various cache-related operations. -Installation -Ensure you have Node.js and npm installed. You can then install the library using the following: +Node.js Implementation of IronCache +Usage +To utilize the IronCache API with this Node.js module, follow these steps: -```bash -npm install iron-cache-node -``` +Create an Iron project. +In your dashboard, click the credentials link (the key icon) to find your Project ID and Token. These credentials are necessary for API usage. +Initialize the module using your Project ID and Token. +Specify environment variables to your application (IRON_CACHE_PROJECT and IRON_CACHE_TOKEN). -Usage -``` -const { APIClient } = require('iron-cache-node'); -// Initialize the client with your project credentials -const client = new APIClient({ - project_id: 'your_project_id', - token: 'your_token', - api_version: 1, // optional, defaults to 1 -}); -``` +API Reference +APIClient(options) +Constructor for creating an instance of the APIClient. It requires the following options: + +project_id: Your Iron Cache project ID. +token: Your Iron Cache authentication token. +api_version: (Optional) The version of the Iron Cache API to use. Defaults to 1. + +''' +export IRON_PROJECT_ID=xxx +export IRON_TOKEN=yyy +''' Example: List all caches @@ -47,37 +49,88 @@ client.getCache(cacheName, {}, (error, response) => { }); ``` -Other available methods: deleteCache, clearCache, putItem, IncrementItem, getItem, deleteItem, etc. -API Reference -APIClient(options) -Constructor for creating an instance of the APIClient. It requires the following options: +Delete a specific cache identified by cache_name. This operation permanently removes the cache and all its associated items. +''' +client.deleteCache('example_cache', {}, (error, response) => { + if (error) { + console.error('Error:', error); + } else { + console.log('Cache deleted:', response); + } +}); +''' -project_id: Your Iron Cache project ID. -token: Your Iron Cache authentication token. -api_version: (Optional) The version of the Iron Cache API to use. Defaults to 1. -Methods -cachesList(options, callback) -List all caches within the project. +Clear all items in a specific cache identified by cache_name. The cache structure remains intact, but all stored items are removed. +''' +client.clearCache('example_cache', {}, (error, response) => { + if (error) { + console.error('Error:', error); + } else { + console.log('Cache cleared:', response); + } +}); +''' -getCache(cache_name, options, callback) -Get information about a specific cache. +Put an item into a specific cache identified by cache_name. The key parameter represents the unique identifier for the item. -deleteCache(cache_name, options, callback) -Delete a specific cache. +''' +const key = 'example_key'; +const value = 'example_value'; -clearCache(cache_name, options, callback) -Clear all items in a specific cache. +client.putItem(key, 'example_cache', { value }, (error, response) => { + if (error) { + console.error('Error:', error); + } else { + console.log('Item added:', response); + } +}); +''' + +Increment the value of a numeric item in a specific cache. This is useful for managing counters or other numeric data. + + +''' +const key = 'example_key'; + +client.IncrementItem(key, 'example_cache', {}, (error, response) => { + if (error) { + console.error('Error:', error); + } else { + console.log('Item incremented:', response); + } +}); +''' + +Get information about a specific item identified by key in a cache identified by cache_name. + +''' +const key = 'example_key'; + +client.getItem(key, 'example_cache', {}, (error, response) => { + if (error) { + console.error('Error:', error); + } else { + console.log('Item information:', response); + } +}); +''' + +Delete a specific item identified by key from a cache identified by cache_name. + +''' +const key = 'example_key'; + +client.deleteItem(key, 'example_cache', {}, (error, response) => { + if (error) { + console.error('Error:', error); + } else { + console.log('Item deleted:', response); + } +}); +''' -putItem(key, cache_name, options, callback) -Put an item into a specific cache. -IncrementItem(key, cache_name, options, callback) -Increment the value of a numeric item in a specific cache. -getItem(key, cache_name, options, callback) -Get information about a specific item in a cache. -deleteItem(key, cache_name, options, callback) -Delete a specific item from a cache. From 62e1aabf9d4b1f43364694a90123fbf982da9978 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:56:04 -0500 Subject: [PATCH 47/53] Update README.md --- README.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 4227b1a..008e423 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ client.getCache(cacheName, {}, (error, response) => { ``` Delete a specific cache identified by cache_name. This operation permanently removes the cache and all its associated items. -''' +``` client.deleteCache('example_cache', {}, (error, response) => { if (error) { console.error('Error:', error); @@ -58,10 +58,10 @@ client.deleteCache('example_cache', {}, (error, response) => { console.log('Cache deleted:', response); } }); -''' +``` Clear all items in a specific cache identified by cache_name. The cache structure remains intact, but all stored items are removed. -''' +``` client.clearCache('example_cache', {}, (error, response) => { if (error) { console.error('Error:', error); @@ -69,11 +69,11 @@ client.clearCache('example_cache', {}, (error, response) => { console.log('Cache cleared:', response); } }); -''' +``` Put an item into a specific cache identified by cache_name. The key parameter represents the unique identifier for the item. -''' +``` const key = 'example_key'; const value = 'example_value'; @@ -84,12 +84,11 @@ client.putItem(key, 'example_cache', { value }, (error, response) => { console.log('Item added:', response); } }); -''' - +``` Increment the value of a numeric item in a specific cache. This is useful for managing counters or other numeric data. -''' +``` const key = 'example_key'; client.IncrementItem(key, 'example_cache', {}, (error, response) => { @@ -99,11 +98,11 @@ client.IncrementItem(key, 'example_cache', {}, (error, response) => { console.log('Item incremented:', response); } }); -''' +``` Get information about a specific item identified by key in a cache identified by cache_name. -''' +``` const key = 'example_key'; client.getItem(key, 'example_cache', {}, (error, response) => { @@ -113,11 +112,11 @@ client.getItem(key, 'example_cache', {}, (error, response) => { console.log('Item information:', response); } }); -''' +``` Delete a specific item identified by key from a cache identified by cache_name. -''' +``` const key = 'example_key'; client.deleteItem(key, 'example_cache', {}, (error, response) => { @@ -127,7 +126,7 @@ client.deleteItem(key, 'example_cache', {}, (error, response) => { console.log('Item deleted:', response); } }); -''' +``` From 43c56d5070d25cd8b763ad474daf9abfd379a994 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:56:41 -0500 Subject: [PATCH 48/53] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 008e423..406d827 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ iron_cache_node Node.js Implementation of IronCache -Usage +Usage To utilize the IronCache API with this Node.js module, follow these steps: Create an Iron project. From fff0d2d5bdc84dbc0b99338a1888854af8ced73d Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:57:37 -0500 Subject: [PATCH 49/53] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 406d827..f79b2cb 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ iron_cache_node Node.js Implementation of IronCache -Usage + +Usage To utilize the IronCache API with this Node.js module, follow these steps: Create an Iron project. From 88626b0a77efd2ae87935fc0d49f5980f6487aed Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:57:48 -0500 Subject: [PATCH 50/53] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f79b2cb..0422c04 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ iron_cache_node Node.js Implementation of IronCache Usage + To utilize the IronCache API with this Node.js module, follow these steps: Create an Iron project. From 0c440b15a9c2f4a4ce9c0e84805f79884f492b7e Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:58:19 -0500 Subject: [PATCH 51/53] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0422c04..81417b4 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ api_version: (Optional) The version of the Iron Cache API to use. Defaults to 1. ''' export IRON_PROJECT_ID=xxx + + export IRON_TOKEN=yyy ''' From a3641890af074456abfcf8b8f1519bb50a6cb231 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:58:43 -0500 Subject: [PATCH 52/53] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 81417b4..43105cf 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,12 @@ project_id: Your Iron Cache project ID. token: Your Iron Cache authentication token. api_version: (Optional) The version of the Iron Cache API to use. Defaults to 1. -''' +``` export IRON_PROJECT_ID=xxx export IRON_TOKEN=yyy -''' +``` Example: List all caches From cc5d6579b6bbc1a38aca92d0a784b8d714c5c633 Mon Sep 17 00:00:00 2001 From: Ayodejiola <97601366+Ayodejiola@users.noreply.github.com> Date: Fri, 19 Jan 2024 05:42:31 -0500 Subject: [PATCH 53/53] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 43105cf..a1f7d4b 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,11 @@ iron_cache_node Node.js Implementation of IronCache +Please follow the steps on this link to setup nodejs. + +https://docs.npmjs.com/downloading-and-installing-node-js-and-npm/ + + Usage To utilize the IronCache API with this Node.js module, follow these steps: @@ -13,6 +18,8 @@ In your dashboard, click the credentials link (the key icon) to find your Projec Initialize the module using your Project ID and Token. Specify environment variables to your application (IRON_CACHE_PROJECT and IRON_CACHE_TOKEN). + + API Reference APIClient(options) Constructor for creating an instance of the APIClient. It requires the following options: