From 3d2e6ad92fd870598bbd1626023e9bf6af178231 Mon Sep 17 00:00:00 2001 From: Mariocoski Date: Tue, 12 Mar 2019 18:50:39 +0000 Subject: [PATCH] fix: added copy/paste code detector --- .circleci/config.yml | 15 +- .jscpd.json | 6 + README.md | 10 +- dist/functions/deleteItems/test.d.ts | 2 +- dist/functions/deleteItems/test.js | 60 +- dist/functions/deleteItems/test.js.map | 2 +- .../getItems/subtests/runPaginationTests.js | 107 +- .../subtests/runPaginationTests.js.map | 2 +- dist/functions/replaceItem/test.d.ts | 2 +- dist/functions/replaceItem/test.js | 89 +- dist/functions/replaceItem/test.js.map | 2 +- dist/utils/createGetItemsResult/after.spec.js | 47 +- .../createGetItemsResult/after.spec.js.map | 2 +- .../utils/createGetItemsResult/before.spec.js | 70 +- .../createGetItemsResult/before.spec.js.map | 2 +- package-lock.json | 1358 ++++++++++++++--- package.json | 3 + report/jscpd-badge.svg | 19 + src/functions/DeleteItems/test.ts | 60 +- .../GetItems/subtests/runPaginationTests.ts | 104 +- src/functions/ReplaceItem/test.ts | 61 +- src/utils/createGetItemsResult/after.spec.ts | 63 +- src/utils/createGetItemsResult/before.spec.ts | 90 +- 23 files changed, 1610 insertions(+), 566 deletions(-) create mode 100644 .jscpd.json create mode 100644 report/jscpd-badge.svg diff --git a/.circleci/config.yml b/.circleci/config.yml index 9529a35..85e95cf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,24 +18,27 @@ jobs: keys: - v1-dependencies-{{ checksum "package-lock.json" }} - run: - name: Installing Dependencies + name: Installing dependencies command: npm install - run: - name: Pruning Dependencies + name: Pruning dependencies command: npm prune - save_cache: paths: - node_modules key: v1-dependencies-{{ checksum "package-lock.json" }} - run: - name: Compiling Code + name: Compiling code command: npm run build - run: - name: Testing Code + name: Testing code command: npm run test - run: - name: Linting Code + name: Linting code command: npm run lint + - run: + name: Checking code duplication + command: npm run duplication - deploy: - name: Semantic Release + name: Semantic release command: npm run semantic-release diff --git a/.jscpd.json b/.jscpd.json new file mode 100644 index 0000000..bf4f295 --- /dev/null +++ b/.jscpd.json @@ -0,0 +1,6 @@ +{ + "threshold": 5, + "reporters": ["console", "badge"], + "absolute": true, + "gitignore": true +} diff --git a/README.md b/README.md index 979050c..f10ea11 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,21 @@ # foundation + [![CircleCI](https://circleci.com/gh/js-items/foundation.svg?style=svg)](https://circleci.com/gh/js-items/foundation) [![codecov](https://codecov.io/gh/js-items/foundation/branch/master/graph/badge.svg)](https://codecov.io/gh/js-items/foundation) +![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/js-items/foundation.svg) +![jscpd](report/jscpd-badge.svg) [![Known Vulnerabilities](https://snyk.io/test/github/js-items/foundation/badge.svg?targetFile=package.json)](https://snyk.io/test/github/js-items/foundation?targetFile=package.json) -- Provides set of interfaces, utils and tests for concrete implementations of js-items repositories +Provides set of interfaces, utils and tests for concrete implementations of js-items repositories ## Installation + `npm i -D @js-items/foundation` This package is heavily inspired by: + - [js-entity-repos](https://github.com/js-entity-repos) Credits: -- [ryansmith94](https://github.com/ryansmith94) \ No newline at end of file + +- [ryansmith94](https://github.com/ryansmith94) diff --git a/dist/functions/deleteItems/test.d.ts b/dist/functions/deleteItems/test.d.ts index 5f97cc4..b586b30 100644 --- a/dist/functions/deleteItems/test.d.ts +++ b/dist/functions/deleteItems/test.d.ts @@ -1,4 +1,4 @@ -import Options from "../../interfaces/Options"; +import { Options } from "../../interfaces"; import { TestItem } from "../utils/testItem"; declare const _default: ({ facade }: Options) => void; export default _default; diff --git a/dist/functions/deleteItems/test.js b/dist/functions/deleteItems/test.js index 82ce74d..b4d8931 100644 --- a/dist/functions/deleteItems/test.js +++ b/dist/functions/deleteItems/test.js @@ -42,57 +42,69 @@ Object.defineProperty(exports, "__esModule", { value: true }); var ItemNotFoundError_1 = __importDefault(require("../../errors/ItemNotFoundError")); var testItem_1 = require("../utils/testItem"); var testUsingFilter_1 = __importDefault(require("../utils/testUsingFilter")); +var expectDeleteItems = function (_a) { + var facade = _a.facade, filter = _a.filter, expectedValue = _a.expectedValue; + return __awaiter(_this, void 0, void 0, function () { + var items; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: return [4 /*yield*/, facade.deleteItems({ filter: filter })]; + case 1: + _b.sent(); + return [4 /*yield*/, facade.getItems({ + filter: filter + })]; + case 2: + items = (_b.sent()).items; + expect(items).toEqual(expectedValue); + return [2 /*return*/]; + } + }); + }); +}; exports.default = (function (_a) { var facade = _a.facade; describe("deleteItems", function () { testUsingFilter_1.default({ facade: facade, toGetAllItems: function (filter) { return __awaiter(_this, void 0, void 0, function () { - var items; return __generator(this, function (_a) { switch (_a.label) { - case 0: return [4 /*yield*/, facade.deleteItems({ filter: filter })]; + case 0: return [4 /*yield*/, expectDeleteItems({ + expectedValue: [], + facade: facade, + filter: filter + })]; case 1: _a.sent(); - return [4 /*yield*/, facade.getItems({ - filter: filter - })]; - case 2: - items = (_a.sent()).items; - expect(items).toEqual([]); return [2 /*return*/]; } }); }); }, toGetFirstItem: function (filter) { return __awaiter(_this, void 0, void 0, function () { - var items; return __generator(this, function (_a) { switch (_a.label) { - case 0: - // tslint:disable-next-line:no-console - return [4 /*yield*/, facade.deleteItems({ filter: filter })]; + case 0: return [4 /*yield*/, expectDeleteItems({ + expectedValue: [testItem_1.secondItem], + facade: facade, + filter: filter + })]; case 1: - // tslint:disable-next-line:no-console _a.sent(); - return [4 /*yield*/, facade.getItems({})]; - case 2: - items = (_a.sent()).items; - expect(items).toEqual([testItem_1.secondItem]); return [2 /*return*/]; } }); }); }, toGetNoItems: function (filter) { return __awaiter(_this, void 0, void 0, function () { - var items; return __generator(this, function (_a) { switch (_a.label) { - case 0: return [4 /*yield*/, facade.deleteItems({ filter: filter })]; + case 0: return [4 /*yield*/, expectDeleteItems({ + expectedValue: [], + facade: facade, + filter: filter + })]; case 1: _a.sent(); - return [4 /*yield*/, facade.getItems({ filter: filter })]; - case 2: - items = (_a.sent()).items; - expect(items).toEqual([]); return [2 /*return*/]; } }); @@ -101,7 +113,7 @@ exports.default = (function (_a) { var e_1; return __generator(this, function (_a) { switch (_a.label) { - case 0: return [4 /*yield*/, facade.deleteItem({ id: testItem_1.secondItemId, filter: filter })]; + case 0: return [4 /*yield*/, facade.deleteItems({ filter: filter })]; case 1: _a.sent(); _a.label = 2; diff --git a/dist/functions/deleteItems/test.js.map b/dist/functions/deleteItems/test.js.map index 37f9049..f94b3a1 100644 --- a/dist/functions/deleteItems/test.js.map +++ b/dist/functions/deleteItems/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../src/functions/DeleteItems/test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAgDA;;AAhDA,qFAA+D;AAE/D,8CAI2B;AAC3B,6EAAuD;AAEvD,mBAAe,UAAC,EAA6B;QAA3B,kBAAM;IACtB,QAAQ,CAAC,aAAa,EAAE;QACtB,yBAAe,CAAC;YACd,MAAM,QAAA;YACN,aAAa,EAAE,UAAM,MAAM;;;;gCACzB,qBAAM,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,QAAA,EAAE,CAAC,EAAA;;4BAApC,SAAoC,CAAC;4BAEnB,qBAAM,MAAM,CAAC,QAAQ,CAAC;oCACtC,MAAM,QAAA;iCACP,CAAC,EAAA;;4BAFM,KAAK,GAAK,CAAA,SAEhB,CAAA,MAFW;4BAIb,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;;;;iBAC3B;YACD,cAAc,EAAE,UAAM,MAAM;;;;;wBAC1B,sCAAsC;wBACtC,qBAAM,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,QAAA,EAAE,CAAC,EAAA;;4BADpC,sCAAsC;4BACtC,SAAoC,CAAC;4BAEnB,qBAAM,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAA;;4BAAnC,KAAK,GAAK,CAAA,SAAyB,CAAA,MA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ions/getItems/subtests/runPaginationTests.js b/dist/functions/getItems/subtests/runPaginationTests.js index c0ba837..a54f178 100644 --- a/dist/functions/getItems/subtests/runPaginationTests.js +++ b/dist/functions/getItems/subtests/runPaginationTests.js @@ -54,16 +54,39 @@ var Cursor_1 = require("../../../interfaces/Cursor"); var SortOrder_1 = require("../../../interfaces/SortOrder"); var createCursorFromItem_1 = __importDefault(require("../../../utils/createCursorFromItem")); var testItem_1 = __importDefault(require("../../utils/testItem")); +var sort = { id: SortOrder_1.asc }; +var expectCorrectResult = function (_a) { + var after = _a.after, before = _a.before, facade = _a.facade, items = _a.items, expectedCursor = _a.expectedCursor; + return __awaiter(_this, void 0, void 0, function () { + var pagination, result; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + pagination = { + after: after, + before: before, + limit: 1 + }; + return [4 /*yield*/, facade.getItems({ pagination: pagination, sort: sort })]; + case 1: + result = _b.sent(); + expect(result).toEqual({ + cursor: expectedCursor, + items: items + }); + return [2 /*return*/]; + } + }); + }); +}; exports.default = (function (_a) { var facade = _a.facade; - var sort = { id: SortOrder_1.asc }; var firstId = "id1"; var secondId = "id2"; var firstItem = __assign({}, testItem_1.default, { id: firstId }); var secondItem = __assign({}, testItem_1.default, { id: secondId }); var firstCursor = createCursorFromItem_1.default(firstItem, sort); var secondCursor = createCursorFromItem_1.default(secondItem, sort); - var basePagination = { before: undefined, after: undefined, limit: 1 }; beforeEach(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) { switch (_a.label) { @@ -103,111 +126,101 @@ exports.default = (function (_a) { }); }); }); it("should return first entity when after is start cursor", function () { return __awaiter(_this, void 0, void 0, function () { - var pagination, result; return __generator(this, function (_a) { switch (_a.label) { - case 0: - pagination = __assign({}, basePagination, { after: Cursor_1.start }); - return [4 /*yield*/, facade.getItems({ pagination: pagination, sort: sort })]; - case 1: - result = _a.sent(); - expect(result).toEqual({ - cursor: { + case 0: return [4 /*yield*/, expectCorrectResult({ + after: Cursor_1.start, + expectedCursor: { after: firstCursor, before: firstCursor, hasAfter: true, hasBefore: false }, + facade: facade, items: [firstItem] - }); + })]; + case 1: + _a.sent(); return [2 /*return*/]; } }); }); }); it("should return second entity when after is firstCursor", function () { return __awaiter(_this, void 0, void 0, function () { - var pagination, result; return __generator(this, function (_a) { switch (_a.label) { - case 0: - pagination = __assign({}, basePagination, { after: firstCursor }); - return [4 /*yield*/, facade.getItems({ pagination: pagination, sort: sort })]; - case 1: - result = _a.sent(); - expect(result).toEqual({ - cursor: { + case 0: return [4 /*yield*/, expectCorrectResult({ + after: Cursor_1.start, + expectedCursor: { after: secondCursor, before: secondCursor, hasAfter: false, hasBefore: true }, + facade: facade, items: [secondItem] - }); + })]; + case 1: + _a.sent(); return [2 /*return*/]; } }); }); }); it("should return no entities when after is secondCursor", function () { return __awaiter(_this, void 0, void 0, function () { - var pagination, result; return __generator(this, function (_a) { switch (_a.label) { - case 0: - pagination = __assign({}, basePagination, { after: secondCursor }); - return [4 /*yield*/, facade.getItems({ pagination: pagination, sort: sort })]; - case 1: - result = _a.sent(); - expect(result).toEqual({ - cursor: { + case 0: return [4 /*yield*/, expectCorrectResult({ + after: secondCursor, + expectedCursor: { after: secondCursor, before: secondCursor, hasAfter: false, hasBefore: true }, + facade: facade, items: [] - }); + })]; + case 1: + _a.sent(); return [2 /*return*/]; } }); }); }); it("should return no entities when before is firstCursor", function () { return __awaiter(_this, void 0, void 0, function () { - var pagination, result; return __generator(this, function (_a) { switch (_a.label) { - case 0: - pagination = __assign({}, basePagination, { before: firstCursor }); - return [4 /*yield*/, facade.getItems({ pagination: pagination, sort: sort })]; - case 1: - result = _a.sent(); - expect(result).toEqual({ - cursor: { + case 0: return [4 /*yield*/, expectCorrectResult({ + before: firstCursor, + expectedCursor: { after: firstCursor, before: firstCursor, hasAfter: true, hasBefore: false }, + facade: facade, items: [] - }); + })]; + case 1: + _a.sent(); return [2 /*return*/]; } }); }); }); it("should return first entity when before is secondCursor", function () { return __awaiter(_this, void 0, void 0, function () { - var pagination, result; return __generator(this, function (_a) { switch (_a.label) { - case 0: - pagination = __assign({}, basePagination, { before: secondCursor }); - return [4 /*yield*/, facade.getItems({ pagination: pagination, sort: sort })]; - case 1: - result = _a.sent(); - expect(result).toEqual({ - cursor: { + case 0: return [4 /*yield*/, expectCorrectResult({ + before: secondCursor, + expectedCursor: { after: firstCursor, before: firstCursor, hasAfter: true, hasBefore: false }, + facade: facade, items: [firstItem] - }); + })]; + case 1: + _a.sent(); return [2 /*return*/]; } }); diff --git a/dist/functions/getItems/subtests/runPaginationTests.js.map b/dist/functions/getItems/subtests/runPaginationTests.js.map index 13703b8..ae6b57d 100644 --- a/dist/functions/getItems/subtests/runPaginationTests.js.map +++ b/dist/functions/getItems/subtests/runPaginationTests.js.map @@ -1 +1 @@ -{"version":3,"file":"runPaginationTests.js","sourceRoot":"","sources":["../../../../src/functions/GetItems/subtests/runPaginationTests.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAsHE;;AAtHF,qDAAmD;AAGnD,2DAAoD;AACpD,6FAAuE;AACvE,kEAA0D;AAE1D,mBAAe,UAAC,EAA6B;QAA3B,kBAAM;IACtB,IAAM,IAAI,GAAmB,EAAE,EAAE,EAAE,eAAG,EAAE,CAAC;IACzC,IAAM,OAAO,GAAG,KAAK,CAAC;IACtB,IAAM,QAAQ,GAAG,KAAK,CAAC;IACvB,IAAM,SAAS,gBAAQ,kBAAQ,IAAE,EAAE,EAAE,OAAO,GAAE,CAAC;IAC/C,IAAM,UAAU,gBAAQ,kBAAQ,IAAE,EAAE,EAAE,QAAQ,GAAE,CAAC;IACjD,IAAM,WAAW,GAAG,8BAAoB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC1D,IAAM,YAAY,GAAG,8BAAoB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC5D,IAAM,cAAc,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,E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,GAAG,SAA2C;oBAE1D,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;wBACrB,MAAM,EAAE;4BACN,KAAK,EAAE,WAAW;4BAClB,MAAM,EAAE,WAAW;4BACnB,QAAQ,EAAE,IAAI;4BACd,SAAS,EAAE,KAAK;yBACjB;wBACD,KAAK,EAAE,EAAE;qBACV,CAAC,CAAC;;;;SACJ,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE;;;;;oBACrD,UAAU,gBAAQ,cAAc,IAAE,MAAM,EAAE,YAAY,GAAE,CAAC;oBAEhD,qBAAM,MAAM,CAAC,QAAQ,CAAC,EAAE,UAAU,YAAA,EAAE,IAAI,MAAA,EAAE,CAAC,EAAA;;oBAApD,MAAM,GAAG,SAA2C;oBAE1D,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;wBACrB,MAAM,EAAE;4BACN,KAAK,EAAE,WAAW;4BAClB,MAAM,EAAE,WAAW;4BACnB,QAAQ,EAAE,IAAI;4BACd,SAAS,EAAE,KAAK;yBACjB;wBACD,KAAK,EAAE,CAAC,SAAS,CAAC;qBACnB,CAAC,CAAC;;;;SACJ,CAAC,CAAC;IACL,+CAA+C;AAC/C,CAAC,EAAC"} \ No newline at end of file +{"version":3,"file":"runPaginationTests.js","sourceRoot":"","sources":["../../../../src/functions/GetItems/subtests/runPaginationTests.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBA2IA;;AAzIA,qDAAmD;AAEnD,2DAAoD;AACpD,6FAAuE;AACvE,kEAA0D;AAU1D,IAAM,IAAI,GAAmB,EAAE,EAAE,EAAE,eAAG,EAAE,CAAC;AAEzC,IAAM,mBAAmB,GAAG,UAAO,EAMI;QALrC,gBAAK,EACL,kBAAM,EACN,kBAAM,EACN,gBAAK,EACL,kCAAc;;;;;;oBAER,UAAU,GAAe;wBAC7B,KAAK,OAAA;wBACL,MAAM,QAAA;wBAC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CAAC,sDAAsD,EAAE;;;wBACzD,qBAAM,mBAAmB,CAAC;wBACxB,MAAM,EAAE,WAAW;wBACnB,cAAc,EAAE;4BACd,KAAK,EAAE,WAAW;4BAClB,MAAM,EAAE,WAAW;4BACnB,QAAQ,EAAE,IAAI;4BACd,SAAS,EAAE,KAAK;yBACjB;wBACD,MAAM,QAAA;wBACN,KAAK,EAAE,EAAE;qBACV,CAAC,EAAA;;oBAVF,SAUE,CAAC;;;;SACJ,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE;;;wBAC3D,qBAAM,mBAAmB,CAAC;wBACxB,MAAM,EAAE,YAAY;wBACpB,cAAc,EAAE;4BACd,KAAK,EAAE,WAAW;4BAClB,MAAM,EAAE,WAAW;4BACnB,QAAQ,EAAE,IAAI;4BACd,SAAS,EAAE,KAAK;yBACjB;wBACD,MAAM,QAAA;wBACN,KAAK,EAAE,CAAC,SAAS,CAAC;qBACnB,CAAC,EAAA;;oBAVF,SAUE,CAAC;;;;SACJ,CAAC,CAAC;IACH,+CAA+C;AACjD,CAAC,EAAC"} \ No newline at end of file diff --git a/dist/functions/replaceItem/test.d.ts b/dist/functions/replaceItem/test.d.ts index 5f97cc4..b586b30 100644 --- a/dist/functions/replaceItem/test.d.ts +++ b/dist/functions/replaceItem/test.d.ts @@ -1,4 +1,4 @@ -import Options from "../../interfaces/Options"; +import { Options } from "../../interfaces"; import { TestItem } from "../utils/testItem"; declare const _default: ({ facade }: Options) => void; export default _default; diff --git a/dist/functions/replaceItem/test.js b/dist/functions/replaceItem/test.js index 1d1fb30..790e437 100644 --- a/dist/functions/replaceItem/test.js +++ b/dist/functions/replaceItem/test.js @@ -60,67 +60,81 @@ Object.defineProperty(exports, "__esModule", { value: true }); var ItemNotFoundError_1 = __importDefault(require("../../errors/ItemNotFoundError")); var testItem_1 = __importStar(require("../utils/testItem")); var testUsingFilter_1 = __importDefault(require("../utils/testUsingFilter")); +var expectReplaceItem = function (_a) { + var facade = _a.facade, filter = _a.filter, id = _a.id, item = _a.item; + return __awaiter(_this, void 0, void 0, function () { + var replacement, result; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + replacement = __assign({}, item, { numberProperty: 999 }); + return [4 /*yield*/, facade.replaceItem({ + filter: filter, + id: id, + item: item + })]; + case 1: + result = _b.sent(); + expect(result.item).toEqual(replacement); + return [2 /*return*/]; + } + }); + }); +}; exports.default = (function (_a) { var facade = _a.facade; describe("replaceItem", function () { testUsingFilter_1.default({ facade: facade, toGetAllItems: function (filter) { return __awaiter(_this, void 0, void 0, function () { - var firstItemReplacement, firstItemResult, secondItemReplacement, secondItemResult; return __generator(this, function (_a) { switch (_a.label) { - case 0: - firstItemReplacement = __assign({}, testItem_1.firstItem, { numberProperty: 77 }); - return [4 /*yield*/, facade.replaceItem({ - filter: filter, - id: testItem_1.firstItem.id, - item: firstItemReplacement - })]; + case 0: return [4 /*yield*/, expectReplaceItem({ + facade: facade, + filter: filter, + id: testItem_1.firstItem.id, + item: testItem_1.firstItem + })]; case 1: - firstItemResult = _a.sent(); - expect(firstItemResult.item).toEqual(firstItemReplacement); - secondItemReplacement = __assign({}, testItem_1.secondItem, { numberProperty: 99 }); - return [4 /*yield*/, facade.replaceItem({ + _a.sent(); + return [4 /*yield*/, expectReplaceItem({ + facade: facade, filter: filter, id: testItem_1.secondItem.id, - item: secondItemReplacement + item: testItem_1.secondItem })]; case 2: - secondItemResult = _a.sent(); - expect(secondItemResult.item).toEqual(secondItemReplacement); + _a.sent(); return [2 /*return*/]; } }); }); }, toGetFirstItem: function (filter) { return __awaiter(_this, void 0, void 0, function () { - var firstItemReplacement, firstItemResult; return __generator(this, function (_a) { switch (_a.label) { - case 0: - firstItemReplacement = __assign({}, testItem_1.firstItem, { numberProperty: 77 }); - return [4 /*yield*/, facade.replaceItem({ - filter: filter, - id: testItem_1.firstItem.id, - item: firstItemReplacement - })]; + case 0: return [4 /*yield*/, expectReplaceItem({ + facade: facade, + filter: filter, + id: testItem_1.firstItem.id, + item: testItem_1.firstItem + })]; case 1: - firstItemResult = _a.sent(); - expect(firstItemResult.item).toEqual(firstItemReplacement); + _a.sent(); return [2 /*return*/]; } }); }); }, toGetNoItems: function (filter) { return __awaiter(_this, void 0, void 0, function () { - var secondItemReplacement, e_1; + var e_1; return __generator(this, function (_a) { switch (_a.label) { case 0: _a.trys.push([0, 2, , 3]); - secondItemReplacement = __assign({}, testItem_1.secondItem, { numberProperty: 99 }); - return [4 /*yield*/, facade.replaceItem({ + return [4 /*yield*/, expectReplaceItem({ + facade: facade, filter: filter, id: testItem_1.secondItem.id, - item: secondItemReplacement + item: testItem_1.secondItem })]; case 1: _a.sent(); @@ -134,19 +148,16 @@ exports.default = (function (_a) { }); }); }, toGetSecondItem: function (filter) { return __awaiter(_this, void 0, void 0, function () { - var secondItemReplacement, secondItemResult; return __generator(this, function (_a) { switch (_a.label) { - case 0: - secondItemReplacement = __assign({}, testItem_1.secondItem, { numberProperty: 99 }); - return [4 /*yield*/, facade.replaceItem({ - filter: filter, - id: testItem_1.secondItem.id, - item: secondItemReplacement - })]; + case 0: return [4 /*yield*/, expectReplaceItem({ + facade: facade, + filter: filter, + id: testItem_1.secondItem.id, + item: testItem_1.secondItem + })]; case 1: - secondItemResult = _a.sent(); - expect(secondItemResult.item).toEqual(secondItemReplacement); + _a.sent(); return [2 /*return*/]; } }); diff --git a/dist/functions/replaceItem/test.js.map b/dist/functions/replaceItem/test.js.map index 53f8c90..891d700 100644 --- a/dist/functions/replaceItem/test.js.map +++ b/dist/functions/replaceItem/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../src/functions/ReplaceItem/test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBA+FA;;AA/FA,qFAA+D;AAE/D,4DAK2B;AAC3B,6EAAuD;AAEvD,mBAAe,UAAC,EAA6B;QAA3B,kBAAM;IACtB,QAAQ,CAAC,aAA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W,CAAC,EAAE,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,kBAAQ,EAAE,CAAC,EAAA;;oBAAjE,SAAiE,CAAC;oBAClE,qBAAM,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,iBAAM,EAAE,CAAC,EAAA;;oBAApC,SAAoC,CAAC;;;;oBAErC,MAAM,CAAC,GAAC,CAAC,CAAC,cAAc,CAAC,2BAAiB,CAAC,CAAC;;;;;SAE/C,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE;;;;;oBACZ,eAAe,GAAa;wBAChC,eAAe,EAAE,IAAI;wBACrB,EAAE,EAAE,iBAAM;wBACV,cAAc,EAAE,EAAE;wBAClB,cAAc,EAAE,QAAQ;qBACzB,CAAC;oBAEF,qBAAM,MAAM,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,iBAAM,EAAE,IAAI,EAAE,kBAAQ,EAAE,CAAC,EAAA;;oBAAvD,SAAuD,CAAC;oBAEzB,qBAAM,MAAM,CAAC,WAAW,CAAC;4BACtD,EAAE,EAAE,iBAAM;4BACV,IAAI,EAAE,eAAe;yBACtB,CAAC,EAAA;;oBAHY,YAAY,GAAK,CAAA,SAG7B,CAAA,KAHwB;oBAKT,qBAAM,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,iBAAM,EAAE,CAAC,EAAA;;oBAA7C,IAAI,GAAK,CAAA,SAAoC,CAAA,KAAzC;oBAEZ,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;oBACtC,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;;;;SAC/C,CAAC,CAAC;IACH,+CAA+C;AACjD,CAAC,EAAC"} \ No newline at end of file diff --git a/dist/utils/createGetItemsResult/after.spec.js b/dist/utils/createGetItemsResult/after.spec.js index 3d95b20..4c80916 100644 --- a/dist/utils/createGetItemsResult/after.spec.js +++ b/dist/utils/createGetItemsResult/after.spec.js @@ -19,43 +19,48 @@ var SortOrder_1 = require("../../interfaces/SortOrder"); var index_1 = __importDefault(require("./index")); describe("createGetItemsResult forward", function () { var sort = { id: SortOrder_1.asc }; + var isEnd = true; var secondId = "test_id_2"; var secondItem = __assign({}, testItem_1.default, { id: secondId }); var firstCursor = "eyJpZCI6InRlc3RfaWRfMSJ9"; var secondCursor = "eyJpZCI6InRlc3RfaWRfMiJ9"; - it("returns correct result when items and cursor is present", function () { - var items = [secondItem]; + var expectCorrectResult = function (_a) { + var items = _a.items, after = _a.after, expectedCursor = _a.expectedCursor; var pagination = { - after: firstCursor, + after: after, limit: 1 }; - var isEnd = true; var result = index_1.default({ items: items, isEnd: isEnd, pagination: pagination, sort: sort }); expect(result).toEqual({ - cursor: { - after: secondCursor, - before: secondCursor, - hasAfter: false, - hasBefore: true - }, + cursor: expectedCursor, + items: items + }); + }; + it("returns correct result when items and cursor is present", function () { + var items = [secondItem]; + var expectedCursor = { + after: secondCursor, + before: secondCursor, + hasAfter: false, + hasBefore: true + }; + expectCorrectResult({ + after: firstCursor, + expectedCursor: expectedCursor, items: items }); }); it("returns correct result when no items and cursor is present", function () { var items = []; - var pagination = { + var expectedCursor = { after: secondCursor, - limit: 1 + before: secondCursor, + hasAfter: false, + hasBefore: true }; - var isEnd = true; - var result = index_1.default({ items: items, isEnd: isEnd, pagination: pagination, sort: sort }); - expect(result).toEqual({ - cursor: { - after: secondCursor, - before: secondCursor, - hasAfter: false, - hasBefore: true - }, + expectCorrectResult({ + after: secondCursor, + expectedCursor: expectedCursor, items: items }); }); diff --git a/dist/utils/createGetItemsResult/after.spec.js.map b/dist/utils/createGetItemsResult/after.spec.js.map index 79f5069..fff36e6 100644 --- a/dist/utils/createGetItemsResult/after.spec.js.map +++ b/dist/utils/createGetItemsResult/after.spec.js.map @@ -1 +1 @@ -{"version":3,"file":"after.spec.js","sourceRoot":"","sources":["../../../src/utils/createGetItemsResult/after.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA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,CAAC,OAAO,CAAC;YACrB,MAAM,EAAE;gBACN,KAAK,EAAE,YAAY;gBACnB,MAAM,EAAE,YAAY;gBACpB,QAAQ,EAAE,KAAK;gBACf,SAAS,EAAE,IAAI;aAChB;YACD,KAAK,OAAA;SACN,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"after.spec.js","sourceRoot":"","sources":["../../../src/utils/createGetItemsResult/after.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4EAAoE;AAEpE,wDAAiD;AACjD,kDAA2C;AAE3C,QAAQ,CAAC,8BAA8B,EAAE;IACvC,IAAM,IAAI,GAAmB,EAAE,EAAE,EAAE,eAAG,EAAE,CAAC;IACzC,IAAM,KAAK,GAAG,IAAI,CAAC;IAEnB,IAAM,QAAQ,GAAG,WAAW,CAAC;IAC7B,IAAM,UAAU,gBAAQ,kBAAQ,IAAE,EAAE,EAAE,QAAQ,GAAE,CAAC;IAEjD,IAAM,WAAW,GAAG,0BAA0B,CAAC;IAC/C,IAAM,YAAY,GAAG,0BAA0B,CAAC;IAQhD,IAAM,mBAAmB,GAAG,UAAC,EAIU;YAHrC,gBAAK,EACL,gBAAK,EACL,kCAAc;QAEd,IAAM,UAAU,GAAe;YAC7B,KAAK,OAAA;YACL,KAAK,EAAE,CAAC;SACT,CAAC;QACF,IAAM,MAAM,GAAG,eAAoB,CAAC,EAAE,KAAK,OAAA,EAAE,KAAK,OAAA,EAAE,UAAU,YAAA,EAAE,IAAI,MAAA,EAAE,CAAC,CAAC;QAExE,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;YACrB,MAAM,EAAE,cAAc;YACtB,KAAK,OAAA;SACN,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,EAAE,CAAC,yDAAyD,EAAE;QAC5D,IAAM,KAAK,GAAe,CAAC,UAAU,CAAC,CAAC;QACvC,IAAM,cAAc,GAAG;YACrB,KAAK,EAAE,YAAY;YACnB,MAAM,EAAE,YAAY;YACpB,QAAQ,EAAE,KAAK;YACf,SAAS,EAAE,IAAI;SAChB,CAAC;QAEF,mBAAmB,CAAC;YAClB,KAAK,EAAE,WAAW;YAClB,cAAc,gBAAA;YACd,KAAK,OAAA;SACN,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4DAA4D,EAAE;QAC/D,IAAM,KAAK,GAAe,EAAE,CAAC;QAE7B,IAAM,cAAc,GAAG;YACrB,KAAK,EAAE,YAAY;YACnB,MAAM,EAAE,YAAY;YACpB,QAAQ,EAAE,KAAK;YACf,SAAS,EAAE,IAAI;SAChB,CAAC;QAEF,mBAAmB,CAAC;YAClB,KAAK,EAAE,YAAY;YACnB,cAAc,gBAAA;YACd,KAAK,OAAA;SACN,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/utils/createGetItemsResult/before.spec.js b/dist/utils/createGetItemsResult/before.spec.js index cf9b6d8..633ea6e 100644 --- a/dist/utils/createGetItemsResult/before.spec.js +++ b/dist/utils/createGetItemsResult/before.spec.js @@ -20,62 +20,64 @@ var SortOrder_1 = require("../../interfaces/SortOrder"); var index_1 = __importDefault(require("./index")); describe("createGetItemsResult backward", function () { var sort = { id: SortOrder_1.asc }; + var isEnd = true; + var expectCorrectResult = function (_a) { + var after = _a.after, items = _a.items, before = _a.before, expectedCursor = _a.expectedCursor; + var pagination = { + after: after, + before: before, + limit: 1 + }; + var result = index_1.default({ items: items, isEnd: isEnd, pagination: pagination, sort: sort }); + expect(result).toEqual({ + cursor: expectedCursor, + items: items + }); + }; var firstId = "test_id_1"; var firstItem = __assign({}, testItem_1.default, { id: firstId }); var firstCursor = "eyJpZCI6InRlc3RfaWRfMSJ9"; var secondCursor = "eyJpZCI6InRlc3RfaWRfMiJ9"; it("returns correct result when there are no items and no cursors present", function () { var items = []; - var pagination = { + var expectedCursor = { after: Cursor_1.start, before: Cursor_1.start, - limit: 1 + hasAfter: false, + hasBefore: false }; - var isEnd = true; - var result = index_1.default({ items: items, isEnd: isEnd, pagination: pagination, sort: sort }); - expect(result).toEqual({ - cursor: { - after: Cursor_1.start, - before: Cursor_1.start, - hasAfter: false, - hasBefore: false - }, + expectCorrectResult({ + after: Cursor_1.start, + before: Cursor_1.start, + expectedCursor: expectedCursor, items: items }); }); it("returns correct result when no items present and cursor is present", function () { var items = []; - var pagination = { + var expectedCursor = { + after: firstCursor, before: firstCursor, - limit: 1 + hasAfter: true, + hasBefore: false }; - var isEnd = true; - var result = index_1.default({ items: items, isEnd: isEnd, pagination: pagination, sort: sort }); - expect(result).toEqual({ - cursor: { - after: firstCursor, - before: firstCursor, - hasAfter: true, - hasBefore: false - }, + expectCorrectResult({ + before: firstCursor, + expectedCursor: expectedCursor, items: items }); }); it("returns correct result when items and cursor is present", function () { var items = [firstItem]; - var pagination = { - before: secondCursor, - limit: 1 + var expectedCursor = { + after: firstCursor, + before: firstCursor, + hasAfter: true, + hasBefore: false }; - var isEnd = true; - var result = index_1.default({ items: items, isEnd: isEnd, pagination: pagination, sort: sort }); - expect(result).toEqual({ - cursor: { - after: firstCursor, - before: firstCursor, - hasAfter: true, - hasBefore: false - }, + expectCorrectResult({ + before: secondCursor, + expectedCursor: expectedCursor, items: items }); }); diff --git a/dist/utils/createGetItemsResult/before.spec.js.map b/dist/utils/createGetItemsResult/before.spec.js.map index ffaf119..6ab1f9d 100644 --- a/dist/utils/createGetItemsResult/before.spec.js.map +++ b/dist/utils/createGetItemsResult/before.spec.js.map @@ -1 +1 @@ -{"version":3,"file":"before.spec.js","sourceRoot":"","sources":["../../../src/utils/createGetItemsResult/before.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4EAAoE;AACpE,kDAAgD;AAGhD,wDAAiD;AACjD,kDAA2C;AAE3C,QAAQ,CAAC,+BAA+B,EAAE;IACxC,IAAM,IAAI,GAAmB,EAAE,EAAE,EAAE,eAAG,EAAE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AAS,EAAE,KAAK;aACjB;YACD,KAAK,OAAA;SACN,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yDAAyD,EAAE;QAC5D,IAAM,KAAK,GAAe,CAAC,SAAS,CAAC,CAAC;QACtC,IAAM,UAAU,GAAe;YAC7B,MAAM,EAAE,YAAY;YACpB,KAAK,EAAE,CAAC;SACT,CAAC;QACF,IAAM,KAAK,GAAG,IAAI,CAAC;QACnB,IAAM,MAAM,GAAG,eAAoB,CAAC,EAAE,KAAK,OAAA,EAAE,KAAK,OAAA,EAAE,UAAU,YAAA,EAAE,IAAI,MAAA,EAAE,CAAC,CAAC;QAExE,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;YACrB,MAAM,EAAE;gBACN,KAAK,EAAE,WAAW;gBAClB,MAAM,EAAE,WAAW;gBACnB,QAAQ,EAAE,IAAI;gBACd,SAAS,EAAE,KAAK;aACjB;YACD,KAAK,OAAA;SACN,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"before.spec.js","sourceRoot":"","sources":["../../../src/utils/createGetItemsResult/before.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4EAAoE;AAEpE,kDAAgD;AAChD,wDAAiD;AACjD,kDAA2C;AAE3C,QAAQ,CAAC,+BAA+B,EAAE;IACxC,IAAM,IAAI,GAAmB,EAAE,EAAE,EAAE,eAAG,EAAE,CAAC;IACzC,IAAM,KAAK,GAAG,IAAI,CAAC;IASnB,IAAM,mBAAmB,GAAG,UAAC,EAKU;YAJrC,gBAAK,EACL,gBAAK,EACL,kBAAM,EACN,kCAAc;QAEd,IAAM,UAAU,GAAe;YAC7B,KAAK,OAAA;YACL,MAAM,QAAA;YACN,KAAK,EAAE,CAAC;SACT,CAAC;QACF,IAAM,MAAM,GAAG,eAAoB,CAAC,EAAE,KAAK,OAAA,EAAE,KAAK,OAAA,EAAE,UAAU,YA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AC;QAEF,mBAAmB,CAAC;YAClB,MAAM,EAAE,YAAY;YACpB,cAAc,gBAAA;YACd,KAAK,OAAA;SACN,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 9e38fc8..e27eeb8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -428,7 +428,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", - "dev": true, "requires": { "call-me-maybe": "^1.0.1", "glob-to-regexp": "^0.3.0" @@ -437,8 +436,7 @@ "@nodelib/fs.stat": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", - "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", - "dev": true + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==" }, "@octokit/endpoint": { "version": "3.1.3", @@ -644,6 +642,11 @@ } } }, + "@types/babel-types": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.6.tgz", + "integrity": "sha512-8zYZyy2kgwBXdz2j8Ix7LOghGiZbOiHf6vqmmBX1r76FdAzVNv7cODyJTEglUWiOdRnXh0s/o58neUwv5vaitQ==" + }, "@types/babel__core": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.0.tgz", @@ -685,6 +688,14 @@ "@babel/types": "^7.3.0" } }, + "@types/babylon": { + "version": "6.16.5", + "resolved": "https://registry.npmjs.org/@types/babylon/-/babylon-6.16.5.tgz", + "integrity": "sha512-xH2e58elpj1X4ynnKp9qSnWlsRTIs6n3tgLGNfwAGHwePw0mulHQllV34n0T25uYSu1k0hRKkWXF890B1yS47w==", + "requires": { + "@types/babel-types": "*" + } + }, "@types/btoa": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@types/btoa/-/btoa-1.2.2.tgz", @@ -769,6 +780,14 @@ "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==", "dev": true }, + "abstract-leveldown": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", + "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", + "requires": { + "xtend": "~4.0.0" + } + }, "acorn": { "version": "5.7.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", @@ -829,6 +848,26 @@ "uri-js": "^4.2.2" } }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "ansi-escapes": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", @@ -838,8 +877,7 @@ "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, "ansi-styles": { "version": "3.2.1", @@ -875,6 +913,20 @@ "default-require-extensions": "^2.0.0" } }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -897,20 +949,17 @@ "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" }, "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" }, "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" }, "array-equal": { "version": "1.0.0", @@ -948,8 +997,7 @@ "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, "arrify": { "version": "1.0.1", @@ -957,6 +1005,11 @@ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "dev": true }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -975,8 +1028,7 @@ "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, "astral-regex": { "version": "1.0.0", @@ -1147,6 +1199,43 @@ "babel-plugin-jest-hoist": "^24.3.0" } }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + }, + "dependencies": { + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + } + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" + }, + "badgen": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/badgen/-/badgen-2.7.0.tgz", + "integrity": "sha512-apgGBA8dZI4gBPt9s/RRCG660h0pteT/2ANh+wqAUSDNPsRRCNVlezEUi5znJU3Ceolno/xryDG4LD2xGzCfow==" + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -1156,7 +1245,6 @@ "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, "requires": { "cache-base": "^1.0.1", "class-utils": "^0.3.5", @@ -1171,7 +1259,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, "requires": { "is-descriptor": "^1.0.0" } @@ -1180,7 +1267,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -1189,7 +1275,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -1198,7 +1283,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -1222,6 +1306,29 @@ "integrity": "sha512-l5r9ir56nda3qu14nAXIlyq1MmUSs0meCIaFAh8HwkFwP1F8eToOuS3ah2VAHHcY04jaYD7FpJC5JTXHYRbkzg==", "dev": true }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "blamer": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/blamer/-/blamer-0.1.13.tgz", + "integrity": "sha1-YfIV8jYb0FTmJYwMXgCG8EB05nA=", + "requires": { + "bluebird": "~2.3.x", + "xml2js": "~0.4.x" + } + }, + "bluebird": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.3.11.tgz", + "integrity": "sha1-Fbt47TKr8nsJBkDA+F5LkfYVyLY=" + }, "bottleneck": { "version": "2.17.1", "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.17.1.tgz", @@ -1241,7 +1348,6 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, "requires": { "arr-flatten": "^1.1.0", "array-unique": "^0.3.2", @@ -1259,7 +1365,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -1318,6 +1423,25 @@ "integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=", "dev": true }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" + }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", @@ -1330,11 +1454,15 @@ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, "requires": { "collection-visit": "^1.0.0", "component-emitter": "^1.2.1", @@ -1350,8 +1478,7 @@ "call-me-maybe": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" }, "caller-callsite": { "version": "2.0.0", @@ -1419,6 +1546,15 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -1430,6 +1566,19 @@ "supports-color": "^5.3.0" } }, + "character-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz", + "integrity": "sha1-x84o821LzZdE5f/CxfzeHHMmH8A=", + "requires": { + "is-regex": "^1.0.3" + } + }, + "chownr": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==" + }, "ci-info": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", @@ -1440,7 +1589,6 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, "requires": { "arr-union": "^3.1.0", "define-property": "^0.2.5", @@ -1452,13 +1600,27 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, "requires": { "is-descriptor": "^0.1.0" } } } }, + "clean-css": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", + "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", + "requires": { + "source-map": "~0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, "clean-stack": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.0.0.tgz", @@ -1474,6 +1636,35 @@ "colors": "1.0.3" } }, + "cli-table3": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", + "requires": { + "colors": "^1.1.2", + "object-assign": "^4.1.0", + "string-width": "^2.1.1" + }, + "dependencies": { + "colors": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", + "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", + "optional": true + } + } + }, + "clipboard": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz", + "integrity": "sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ==", + "optional": true, + "requires": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + }, "cliui": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", @@ -1488,14 +1679,12 @@ "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "codecov": { "version": "3.2.0", @@ -1513,7 +1702,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, "requires": { "map-visit": "^1.0.0", "object-visit": "^1.0.0" @@ -1574,8 +1762,7 @@ "component-emitter": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" }, "concat-map": { "version": "0.0.1", @@ -1628,6 +1815,22 @@ } } }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, + "constantinople": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-3.1.2.tgz", + "integrity": "sha512-yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZouw==", + "requires": { + "@types/babel-types": "^7.0.0", + "@types/babylon": "^6.16.2", + "babel-types": "^6.26.0", + "babylon": "^6.18.0" + } + }, "conventional-changelog-angular": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.3.tgz", @@ -1693,14 +1896,17 @@ "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, + "core-js": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", + "integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==" }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cosmiconfig": { "version": "5.1.0", @@ -1802,8 +2008,7 @@ "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "decamelize-keys": { "version": "1.1.0", @@ -1826,14 +2031,20 @@ "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "requires": { + "mimic-response": "^1.0.0" + } }, "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, "deep-is": { "version": "0.1.3", @@ -1856,6 +2067,15 @@ "strip-bom": "^3.0.0" } }, + "deferred-leveldown": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-4.0.2.tgz", + "integrity": "sha512-5fMC8ek8alH16QiV0lTCis610D1Zt1+LA4MS4d63JgS32lrCjTFDUFz2ao09/j2I4Bqb5jL4FZYwu7Jz0XO1ww==", + "requires": { + "abstract-leveldown": "~5.0.0", + "inherits": "^2.0.3" + } + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1869,7 +2089,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, "requires": { "is-descriptor": "^1.0.2", "isobject": "^3.0.1" @@ -1879,7 +2098,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -1888,7 +2106,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -1897,7 +2114,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -1912,12 +2128,36 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, + "delegate": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==", + "optional": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, "deprecation": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-1.0.1.tgz", "integrity": "sha512-ccVHpE72+tcIKaGMql33x5MAjKQIZrk+3x2GbJ7TeraUCZWHoT+KSZpoC+JQFsUBlSTXUrBaGiF0j6zVTepPLg==", "dev": true }, + "detect-installed": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-installed/-/detect-installed-2.0.4.tgz", + "integrity": "sha1-oIUEZefD68/5eda2U1rTRLgN18U=", + "requires": { + "get-installed-path": "^2.0.3" + } + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + }, "detect-newline": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", @@ -1945,6 +2185,11 @@ "path-type": "^3.0.0" } }, + "doctypes": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz", + "integrity": "sha1-6oCxBqh1OHdOijpKWv4pPeSJ4Kk=" + }, "domexception": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", @@ -1982,11 +2227,22 @@ "safer-buffer": "^2.1.0" } }, + "encoding-down": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-5.0.4.tgz", + "integrity": "sha512-8CIZLDcSKxgzT+zX8ZVfgNbu8Md2wq/iqa1Y7zyVR18QBEAc0Nmzuvj/N5ykSKpfGzjM8qxbaFntLPwnVoUhZw==", + "requires": { + "abstract-leveldown": "^5.0.0", + "inherits": "^2.0.3", + "level-codec": "^9.0.0", + "level-errors": "^2.0.0", + "xtend": "^4.0.1" + } + }, "end-of-stream": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, "requires": { "once": "^1.4.0" } @@ -2027,6 +2283,14 @@ } } }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "requires": { + "prr": "~1.0.1" + } + }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -2122,8 +2386,12 @@ "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + }, + "eventemitter3": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", + "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==" }, "exec-sh": { "version": "0.3.2", @@ -2146,6 +2414,22 @@ "strip-eof": "^1.0.0" } }, + "exectimer": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/exectimer/-/exectimer-2.2.1.tgz", + "integrity": "sha512-Orj7HuxI0b0Wv9FxOedX1jYwMfmAEwKekWQ7eaAYwHXYUWgAYjv2zfG9onvtHkYSQXAGJpvcYDt5SATeji163w==", + "requires": { + "browser-process-hrtime": "^1.0.0", + "co": "^4.6.0" + }, + "dependencies": { + "browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" + } + } + }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -2156,7 +2440,6 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, "requires": { "debug": "^2.3.3", "define-property": "^0.2.5", @@ -2171,7 +2454,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "requires": { "ms": "2.0.0" } @@ -2180,7 +2462,6 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -2189,7 +2470,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -2197,11 +2477,23 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, + "expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, "expect": { "version": "24.4.0", "resolved": "https://registry.npmjs.org/expect/-/expect-24.4.0.tgz", @@ -2226,7 +2518,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" @@ -2236,7 +2527,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -2247,7 +2537,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, "requires": { "array-unique": "^0.3.2", "define-property": "^1.0.0", @@ -2263,7 +2552,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, "requires": { "is-descriptor": "^1.0.0" } @@ -2272,7 +2560,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -2281,7 +2568,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -2290,7 +2576,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -2299,7 +2584,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -2320,11 +2604,15 @@ "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "dev": true }, + "fast-future": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/fast-future/-/fast-future-1.0.2.tgz", + "integrity": "sha1-hDWpqqAteSSNF9cE52JZMB2ZKAo=" + }, "fast-glob": { "version": "2.2.6", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.6.tgz", "integrity": "sha512-0BvMaZc1k9F+MeWWMe8pL6YltFzZYcJsYU7D4JyDA6PAczaXvxqQQ/z+mDF7/4Mw01DeUc+i3CTKajnkANkV4w==", - "dev": true, "requires": { "@mrmlnc/readdir-enhanced": "^2.2.1", "@nodelib/fs.stat": "^1.1.2", @@ -2378,7 +2666,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, "requires": { "extend-shallow": "^2.0.1", "is-number": "^3.0.0", @@ -2390,7 +2677,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -2427,8 +2713,7 @@ "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" }, "forever-agent": { "version": "0.6.1", @@ -2451,7 +2736,6 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, "requires": { "map-cache": "^0.2.2" } @@ -2466,11 +2750,15 @@ "readable-stream": "^2.0.0" } }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, "requires": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", @@ -2480,14 +2768,60 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + } + } }, "get-caller-file": { "version": "1.0.3", @@ -2495,6 +2829,14 @@ "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", "dev": true }, + "get-installed-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/get-installed-path/-/get-installed-path-2.1.1.tgz", + "integrity": "sha512-Qkn9eq6tW5/q9BDVdMpB8tOHljX9OSP0jRC5TRNVA4qRc839t4g8KQaR8t0Uv0EFVL0MlyG7m/ofjEgAROtYsA==", + "requires": { + "global-modules": "1.0.0" + } + }, "get-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", @@ -2504,8 +2846,7 @@ "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" }, "getpass": { "version": "0.1.7", @@ -2541,11 +2882,20 @@ } } }, + "github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" + }, + "gitignore-to-glob": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/gitignore-to-glob/-/gitignore-to-glob-0.3.0.tgz", + "integrity": "sha1-WfMqs9m2bOUCmcPtJMsO9CoJTOs=" + }, "glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2559,7 +2909,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, "requires": { "is-glob": "^3.1.0", "path-dirname": "^1.0.0" @@ -2569,7 +2918,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, "requires": { "is-extglob": "^2.1.0" } @@ -2579,8 +2927,29 @@ "glob-to-regexp": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } }, "globals": { "version": "11.11.0", @@ -2612,11 +2981,19 @@ } } }, + "good-listener": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", + "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", + "optional": true, + "requires": { + "delegate": "^3.1.2" + } + }, "graceful-fs": { "version": "4.1.15", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" }, "growly": { "version": "1.3.0", @@ -2664,7 +3041,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, "requires": { "function-bind": "^1.1.1" } @@ -2698,11 +3074,15 @@ "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", "dev": true }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, "requires": { "get-value": "^2.0.6", "has-values": "^1.0.0", @@ -2713,7 +3093,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, "requires": { "is-number": "^3.0.0", "kind-of": "^4.0.0" @@ -2723,13 +3102,20 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, "requires": { "is-buffer": "^1.1.5" } } } }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "requires": { + "parse-passwd": "^1.0.0" + } + }, "hook-std": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/hook-std/-/hook-std-1.2.0.tgz", @@ -2882,7 +3268,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -2891,14 +3276,12 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "into-stream": { "version": "4.0.0", @@ -2929,7 +3312,6 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -2938,7 +3320,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -2954,8 +3335,7 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-callable": { "version": "1.1.4", @@ -2976,7 +3356,6 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -2985,7 +3364,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -3002,7 +3380,6 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, "requires": { "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", @@ -3012,8 +3389,7 @@ "kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -3023,23 +3399,36 @@ "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", "dev": true }, + "is-expression": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-3.0.0.tgz", + "integrity": "sha1-Oayqa+f9HzRx3ELHQW5hwkMXrJ8=", + "requires": { + "acorn": "~4.0.2", + "object-assign": "^4.0.1" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" + } + } + }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, "is-generator-fn": { "version": "2.0.0", @@ -3051,7 +3440,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -3060,7 +3448,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -3069,7 +3456,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -3092,16 +3478,19 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, "requires": { "isobject": "^3.0.1" } }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, "requires": { "has": "^1.0.1" } @@ -3145,8 +3534,7 @@ "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" }, "is-wsl": { "version": "1.1.0", @@ -3157,20 +3545,17 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, "isstream": { "version": "0.1.2", @@ -3772,6 +4157,11 @@ } } }, + "js-stringify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", + "integrity": "sha1-Fzb939lyTyijaCrcYjCufk6Weds=" + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3793,6 +4183,49 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "dev": true }, + "jscpd": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/jscpd/-/jscpd-2.0.11.tgz", + "integrity": "sha512-vC2i4+RAor/zzhn5EZPg7/1itK9c6ivR/aI9eyYWtrhT/EIro3jU6WVm09L8+spJmpGh0TXQDgCTT6bcUrDEjA==", + "requires": { + "blamer": "^0.1.13", + "bytes": "^3.0.0", + "cli-table3": "^0.5.1", + "colors": "^1.3.2", + "commander": "^2.18.0", + "detect-installed": "^2.0.4", + "eventemitter3": "^3.1.0", + "exectimer": "^2.2.0", + "fast-glob": "^2.2.3", + "fs-extra": "^7.0.0", + "gitignore-to-glob": "^0.3.0", + "level": "^4.0.0", + "prismjs": "^1.15.0", + "pug": "^2.0.3", + "rimraf": "^2.6.2" + }, + "dependencies": { + "colors": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", + "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==" + }, + "commander": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==" + } + } + }, + "jscpd-badge-reporter": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/jscpd-badge-reporter/-/jscpd-badge-reporter-1.1.3.tgz", + "integrity": "sha512-jHCgZCFSxFD1lGyyVxqJT6QcE+TNjciWix5rfr9B4O/qkNas397ocN+CJtoq7R/Lt3pw79pZw9D4RmJzTsbqeg==", + "requires": { + "badgen": "^2.5.0", + "fs-extra": "^7.0.1" + } + }, "jsdom": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", @@ -3870,7 +4303,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, "requires": { "graceful-fs": "^4.1.6" } @@ -3893,11 +4325,19 @@ "verror": "1.10.0" } }, + "jstransformer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz", + "integrity": "sha1-7Yvwkh4vPx7U1cGkT2hwntJHIsM=", + "requires": { + "is-promise": "^2.0.0", + "promise": "^7.0.1" + } + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" }, "kleur": { "version": "3.0.2", @@ -3905,6 +4345,11 @@ "integrity": "sha512-3h7B2WRT5LNXOtQiAaWonilegHcPSf9nLVXlSTci8lu1dZUuui61+EsPEZqSVxY7rXYmB2DVKMQILxaO5WL61Q==", "dev": true }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, "lcid": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", @@ -3920,6 +4365,78 @@ "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", "dev": true }, + "level": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/level/-/level-4.0.0.tgz", + "integrity": "sha512-4epzCOlEcJ529NOdlAYiuiakS/kZTDdiKSBNJmE1B8bsmA+zEVwcpxyH86qJSQTpOu7SODrlaD9WgPRHLkGutA==", + "requires": { + "level-packager": "^3.0.0", + "leveldown": "^4.0.0", + "opencollective-postinstall": "^2.0.0" + } + }, + "level-codec": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.0.tgz", + "integrity": "sha512-OIpVvjCcZNP5SdhcNupnsI1zo5Y9Vpm+k/F1gfG5kXrtctlrwanisakweJtE0uA0OpLukRfOQae+Fg0M5Debhg==" + }, + "level-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.0.tgz", + "integrity": "sha512-AmY4HCp9h3OiU19uG+3YWkdELgy05OTP/r23aNHaQKWv8DO787yZgsEuGVkoph40uwN+YdUKnANlrxSsoOaaxg==", + "requires": { + "errno": "~0.1.1" + } + }, + "level-iterator-stream": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-3.0.1.tgz", + "integrity": "sha512-nEIQvxEED9yRThxvOrq8Aqziy4EGzrxSZK+QzEFAVuJvQ8glfyZ96GB6BoI4sBbLfjMXm2w4vu3Tkcm9obcY0g==", + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "xtend": "^4.0.0" + } + }, + "level-packager": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-3.1.0.tgz", + "integrity": "sha512-UxVEfK5WH0u0InR3WxTCSAroiorAGKzXWZT6i+nBjambmvINuXFUsFx2Ai3UIjUUtnyWhluv42jMlzUZCsAk9A==", + "requires": { + "encoding-down": "~5.0.0", + "levelup": "^3.0.0" + } + }, + "leveldown": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-4.0.2.tgz", + "integrity": "sha512-SUgSRTWFh3eeiTdIt2a4Fi9TZO5oWzE9uC/Iw8+fVr1sk8x1S2l151UWwSmrMFZB3GxJhZIf4bQ0n+051Cctpw==", + "requires": { + "abstract-leveldown": "~5.0.0", + "bindings": "~1.3.0", + "fast-future": "~1.0.2", + "nan": "~2.12.1", + "prebuild-install": "~5.2.4" + }, + "dependencies": { + "bindings": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.1.tgz", + "integrity": "sha512-i47mqjF9UbjxJhxGf+pZ6kSxrnI3wBLlnGI2ArWJ4r0VrvDS7ZYXkprq/pLaBWYq4GM0r4zdHY+NNRqEMU7uew==" + } + } + }, + "levelup": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-3.1.1.tgz", + "integrity": "sha512-9N10xRkUU4dShSRRFTBdNaBxofz+PGaIZO962ckboJZiNmLuhVT6FZ6ZKAsICKfUBO76ySaYU6fJWX/jnj3Lcg==", + "requires": { + "deferred-leveldown": "~4.0.0", + "level-errors": "~2.0.0", + "level-iterator-stream": "~3.0.0", + "xtend": "~4.0.0" + } + }, "leven": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", @@ -3972,8 +4489,7 @@ "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", - "dev": true + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, "lodash.capitalize": { "version": "4.2.1", @@ -4035,6 +4551,11 @@ "integrity": "sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI=", "dev": true }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -4105,8 +4626,7 @@ "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" }, "map-obj": { "version": "2.0.0", @@ -4118,7 +4638,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, "requires": { "object-visit": "^1.0.0" } @@ -4206,14 +4725,12 @@ "merge2": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.3.tgz", - "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==", - "dev": true + "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==" }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -4257,6 +4774,11 @@ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "dev": true }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -4268,8 +4790,7 @@ "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "minimist-options": { "version": "3.0.2", @@ -4285,7 +4806,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", - "dev": true, "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" @@ -4295,7 +4815,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -4306,7 +4825,6 @@ "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, "requires": { "minimist": "0.0.8" }, @@ -4314,8 +4832,7 @@ "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } }, @@ -4330,11 +4847,15 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, + "nan": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", + "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==" + }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -4349,6 +4870,11 @@ "to-regex": "^3.0.1" } }, + "napi-build-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.1.tgz", + "integrity": "sha512-boQj1WFgQH3v4clhu3mTNfP+vOBxorDlE8EKiMjUlLG3C4qAESnn9AxIOkFgTR2c9LtzNjPrjS60cT27ZKBhaA==" + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -4367,6 +4893,14 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "node-abi": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.7.1.tgz", + "integrity": "sha512-OV8Bq1OrPh6z+Y4dqwo05HqrRL9YNF7QVMRfq1/pguwKLG+q9UB/Lk0x5qXjO23JjJg+/jqCHSTaG1P3tfKfuw==", + "requires": { + "semver": "^5.4.1" + } + }, "node-emoji": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.10.0.tgz", @@ -4406,6 +4940,11 @@ "which": "^1.3.0" } }, + "noop-logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", + "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=" + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -7899,11 +8438,21 @@ "path-key": "^2.0.0" } }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nwsapi": { "version": "2.1.1", @@ -7917,11 +8466,15 @@ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, "requires": { "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", @@ -7932,7 +8485,6 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -7941,7 +8493,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -7958,7 +8509,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, "requires": { "isobject": "^3.0.0" } @@ -7977,7 +8527,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, "requires": { "isobject": "^3.0.1" } @@ -7992,11 +8541,15 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, "requires": { "wrappy": "1" } }, + "opencollective-postinstall": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", + "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==" + }, "optimist": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", @@ -8037,6 +8590,11 @@ } } }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, "os-locale": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", @@ -8198,6 +8756,11 @@ "json-parse-better-errors": "^1.0.1" } }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" + }, "parse5": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", @@ -8207,14 +8770,12 @@ "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" }, "path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" }, "path-exists": { "version": "3.0.0", @@ -8225,8 +8786,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-key": { "version": "2.0.1", @@ -8237,8 +8797,7 @@ "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, "path-type": { "version": "3.0.0", @@ -8319,8 +8878,41 @@ "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + }, + "prebuild-install": { + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.2.5.tgz", + "integrity": "sha512-6uZgMVg7yDfqlP5CPurVhtq3hUKBFNufiar4J5hZrlHTo59DDBEtyxw01xCdFss9j0Zb9+qzFVf/s4niayba3w==", + "requires": { + "detect-libc": "^1.0.3", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "napi-build-utils": "^1.0.1", + "node-abi": "^2.7.0", + "noop-logger": "^0.1.1", + "npmlog": "^4.0.1", + "os-homedir": "^1.0.1", + "pump": "^2.0.1", + "rc": "^1.2.7", + "simple-get": "^2.7.0", + "tar-fs": "^1.13.0", + "tunnel-agent": "^0.6.0", + "which-pm-runs": "^1.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } }, "prelude-ls": { "version": "1.1.2", @@ -8348,11 +8940,26 @@ } } }, + "prismjs": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.15.0.tgz", + "integrity": "sha512-Lf2JrFYx8FanHrjoV5oL8YHCclLQgbJcVZR+gikGGMqz6ub5QVWDTM6YIwm3BuPxM/LOV+rKns3LssXNLIf+DA==", + "requires": { + "clipboard": "^2.0.0" + } + }, "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "requires": { + "asap": "~2.0.3" + } }, "prompts": { "version": "2.0.3", @@ -8364,6 +8971,11 @@ "sisteransi": "^1.0.0" } }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -8376,6 +8988,163 @@ "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", "dev": true }, + "pug": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pug/-/pug-2.0.3.tgz", + "integrity": "sha1-ccuoJTfJWl6rftBGluQiH1Oqh44=", + "requires": { + "pug-code-gen": "^2.0.1", + "pug-filters": "^3.1.0", + "pug-lexer": "^4.0.0", + "pug-linker": "^3.0.5", + "pug-load": "^2.0.11", + "pug-parser": "^5.0.0", + "pug-runtime": "^2.0.4", + "pug-strip-comments": "^1.0.3" + } + }, + "pug-attrs": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-2.0.3.tgz", + "integrity": "sha1-owlflw5kFR972tlX7vVftdeQXRU=", + "requires": { + "constantinople": "^3.0.1", + "js-stringify": "^1.0.1", + "pug-runtime": "^2.0.4" + } + }, + "pug-code-gen": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-2.0.1.tgz", + "integrity": "sha1-CVHsgyJddNjPxHan+Zolm199BQw=", + "requires": { + "constantinople": "^3.0.1", + "doctypes": "^1.1.0", + "js-stringify": "^1.0.1", + "pug-attrs": "^2.0.3", + "pug-error": "^1.3.2", + "pug-runtime": "^2.0.4", + "void-elements": "^2.0.1", + "with": "^5.0.0" + } + }, + "pug-error": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-1.3.2.tgz", + "integrity": "sha1-U659nSm7A89WRJOgJhCfVMR/XyY=" + }, + "pug-filters": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-3.1.0.tgz", + "integrity": "sha1-JxZVVbwEwjbkqisDZiRt+gIbYm4=", + "requires": { + "clean-css": "^4.1.11", + "constantinople": "^3.0.1", + "jstransformer": "1.0.0", + "pug-error": "^1.3.2", + "pug-walk": "^1.1.7", + "resolve": "^1.1.6", + "uglify-js": "^2.6.1" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + } + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } + }, + "pug-lexer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-4.0.0.tgz", + "integrity": "sha1-IQwYRX7y4XYCQnQMXmR715TOwng=", + "requires": { + "character-parser": "^2.1.1", + "is-expression": "^3.0.0", + "pug-error": "^1.3.2" + } + }, + "pug-linker": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-3.0.5.tgz", + "integrity": "sha1-npp65ABWgtAn3uuWsAD4juuDoC8=", + "requires": { + "pug-error": "^1.3.2", + "pug-walk": "^1.1.7" + } + }, + "pug-load": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-2.0.11.tgz", + "integrity": "sha1-5kjlftET/iwfRdV4WOorrWvAFSc=", + "requires": { + "object-assign": "^4.1.0", + "pug-walk": "^1.1.7" + } + }, + "pug-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-5.0.0.tgz", + "integrity": "sha1-45Stmz/KkxI5QK/4hcBuRKt+aOQ=", + "requires": { + "pug-error": "^1.3.2", + "token-stream": "0.0.1" + } + }, + "pug-runtime": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-2.0.4.tgz", + "integrity": "sha1-4XjhvaaKsujArPybztLFT9iM61g=" + }, + "pug-strip-comments": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-1.0.3.tgz", + "integrity": "sha1-8VWVkiBu3G+FMQ2s9K+0igJa9Z8=", + "requires": { + "pug-error": "^1.3.2" + } + }, + "pug-walk": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.7.tgz", + "integrity": "sha1-wA1cUSi6xYBr7BXSt+fNq+QlMfM=" + }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -8420,7 +9189,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, "requires": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -8491,7 +9259,6 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -8530,11 +9297,15 @@ "esprima": "~4.0.0" } }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, "requires": { "extend-shallow": "^3.0.2", "safe-regex": "^1.1.0" @@ -8559,14 +9330,12 @@ "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, "request": { "version": "2.88.0", @@ -8650,7 +9419,6 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", - "dev": true, "requires": { "path-parse": "^1.0.6" } @@ -8672,6 +9440,15 @@ } } }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -8681,14 +9458,12 @@ "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, "retry": { "version": "0.12.0", @@ -8696,11 +9471,18 @@ "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", "dev": true }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "requires": { + "align-text": "^0.1.1" + } + }, "rimraf": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, "requires": { "glob": "^7.1.3" } @@ -8714,8 +9496,7 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "safe-env": { "version": "1.2.0", @@ -8730,7 +9511,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, "requires": { "ret": "~0.1.10" } @@ -8787,8 +9567,13 @@ "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "select": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", + "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=", + "optional": true }, "semantic-release": { "version": "15.13.3", @@ -8886,8 +9671,7 @@ "semver": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", - "dev": true + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" }, "semver-regex": { "version": "2.0.0", @@ -8898,14 +9682,12 @@ "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-value": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", - "dev": true, "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -8917,7 +9699,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -8948,8 +9729,7 @@ "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, "signale": { "version": "1.4.0", @@ -8962,6 +9742,21 @@ "pkg-conf": "^2.1.0" } }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "simple-git": { "version": "1.107.0", "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-1.107.0.tgz", @@ -8998,7 +9793,6 @@ "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, "requires": { "base": "^0.11.1", "debug": "^2.2.0", @@ -9014,7 +9808,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "requires": { "ms": "2.0.0" } @@ -9023,7 +9816,6 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -9032,7 +9824,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -9040,8 +9831,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, @@ -9049,7 +9839,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, "requires": { "define-property": "^1.0.0", "isobject": "^3.0.0", @@ -9060,7 +9849,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, "requires": { "is-descriptor": "^1.0.0" } @@ -9069,7 +9857,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -9078,7 +9865,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -9087,7 +9873,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -9100,7 +9885,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, "requires": { "kind-of": "^3.2.0" }, @@ -9109,7 +9893,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -9119,14 +9902,12 @@ "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "source-map-resolve": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, "requires": { "atob": "^2.1.1", "decode-uri-component": "^0.2.0", @@ -9156,8 +9937,7 @@ "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" }, "spawn-error-forwarder": { "version": "1.0.0", @@ -9210,7 +9990,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, "requires": { "extend-shallow": "^3.0.0" } @@ -9256,7 +10035,6 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, "requires": { "define-property": "^0.2.5", "object-copy": "^0.1.0" @@ -9266,7 +10044,6 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -9303,7 +10080,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" @@ -9313,7 +10089,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, "requires": { "safe-buffer": "~5.1.0" } @@ -9322,7 +10097,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, "requires": { "ansi-regex": "^3.0.0" } @@ -9348,8 +10122,7 @@ "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" }, "supports-color": { "version": "5.5.0", @@ -9384,6 +10157,42 @@ "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", "dev": true }, + "tar-fs": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", + "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", + "requires": { + "chownr": "^1.0.1", + "mkdirp": "^0.5.1", + "pump": "^1.0.0", + "tar-stream": "^1.1.2" + }, + "dependencies": { + "pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, "teeny-request": { "version": "3.11.3", "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-3.11.3.tgz", @@ -9434,12 +10243,23 @@ "xtend": "~4.0.1" } }, + "tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", + "optional": true + }, "tmpl": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", "dev": true }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -9450,7 +10270,6 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -9459,7 +10278,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -9470,7 +10288,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, "requires": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", @@ -9482,12 +10299,16 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, "requires": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" } }, + "token-stream": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-0.0.1.tgz", + "integrity": "sha1-zu78cXp2xDFvEm0LnbqlXX598Bo=" + }, "tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -9605,7 +10426,6 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, "requires": { "safe-buffer": "^5.0.1" } @@ -9651,11 +10471,16 @@ } } }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "optional": true + }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", - "dev": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", @@ -9667,7 +10492,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -9676,7 +10500,6 @@ "version": "0.4.3", "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -9698,14 +10521,12 @@ "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, "requires": { "has-value": "^0.3.1", "isobject": "^3.0.0" @@ -9715,7 +10536,6 @@ "version": "0.3.1", "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, "requires": { "get-value": "^2.0.3", "has-values": "^0.1.4", @@ -9726,7 +10546,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, "requires": { "isarray": "1.0.0" } @@ -9736,8 +10555,7 @@ "has-values": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" } } }, @@ -9753,8 +10571,7 @@ "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" }, "url-join": { "version": "4.0.0", @@ -9776,14 +10593,12 @@ "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "util.promisify": { "version": "1.0.0", @@ -9821,6 +10636,11 @@ "extsprintf": "^1.2.0" } }, + "void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=" + }, "w3c-hr-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", @@ -9875,7 +10695,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, "requires": { "isexe": "^2.0.0" } @@ -9886,6 +10705,24 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=" + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" + }, "windows-release": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.1.0.tgz", @@ -9895,6 +10732,37 @@ "execa": "^0.10.0" } }, + "with": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/with/-/with-5.1.1.tgz", + "integrity": "sha1-+k2qktrzLE6pTtRTyB8EaGtXXf4=", + "requires": { + "acorn": "^3.1.0", + "acorn-globals": "^3.0.0" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=" + }, + "acorn-globals": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz", + "integrity": "sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8=", + "requires": { + "acorn": "^4.0.4" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" + } + } + } + } + }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", @@ -9951,8 +10819,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write-file-atomic": { "version": "2.4.1", @@ -9980,11 +10847,24 @@ "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, "y18n": { "version": "4.0.0", diff --git a/package.json b/package.json index 355f747..598ea29 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "scripts": { "clean": "rimraf dist", "build": "npm run clean && tsc", + "duplication": "jscpd ./src", "lint": "tslint --project tsconfig.json --config tslint.json './src/**/*.ts'", "test": "jest --coverage --runInBand && codecov", "test:watch": "jest --watch --coverage", @@ -45,6 +46,8 @@ "atob": "^2.1.2", "btoa": "^1.2.1", "codecov": "^3.2.0", + "jscpd": "^2.0.11", + "jscpd-badge-reporter": "^1.1.3", "make-error": "^1.3.5" } } diff --git a/report/jscpd-badge.svg b/report/jscpd-badge.svg new file mode 100644 index 0000000..c85f32f --- /dev/null +++ b/report/jscpd-badge.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + Copy/Paste + Copy/Paste + 0% + 0% + + + \ No newline at end of file diff --git a/src/functions/DeleteItems/test.ts b/src/functions/DeleteItems/test.ts index fd8bc6e..156dff0 100644 --- a/src/functions/DeleteItems/test.ts +++ b/src/functions/DeleteItems/test.ts @@ -1,42 +1,56 @@ import ItemNotFoundError from "../../errors/ItemNotFoundError"; -import Options from "../../interfaces/Options"; -import { - secondItem, - secondItemId, - TestItem -} from "../utils/testItem"; +import Facade from "../../Facade"; +import { Filter, Options } from "../../interfaces"; +import { secondItem, secondItemId, TestItem } from "../utils/testItem"; import testUsingFilter from "../utils/testUsingFilter"; +interface ExpectDeleteItemsOptions { + readonly facade: Facade; + readonly filter?: Filter; + readonly expectedValue: T[]; +} + +const expectDeleteItems = async ({ + facade, + filter, + expectedValue +}: ExpectDeleteItemsOptions) => { + await facade.deleteItems({ filter }); + + const { items } = await facade.getItems({ + filter + }); + + expect(items).toEqual(expectedValue); +}; + export default ({ facade }: Options) => { describe("deleteItems", () => { testUsingFilter({ facade, toGetAllItems: async filter => { - await facade.deleteItems({ filter }); - - const { items } = await facade.getItems({ + await expectDeleteItems({ + expectedValue: [], + facade, filter }); - - expect(items).toEqual([]); }, toGetFirstItem: async filter => { - // tslint:disable-next-line:no-console - await facade.deleteItems({ filter }); - - const { items } = await facade.getItems({}); - - expect(items).toEqual([secondItem]); + await expectDeleteItems({ + expectedValue: [secondItem], + facade, + filter + }); }, toGetNoItems: async filter => { - await facade.deleteItems({ filter }); - - const { items } = await facade.getItems({ filter }); - - expect(items).toEqual([]); + await expectDeleteItems({ + expectedValue: [], + facade, + filter + }); }, toGetSecondItem: async filter => { - await facade.deleteItem({ id: secondItemId, filter }); + await facade.deleteItems({ filter }); try { await facade.getItem({ id: secondItemId }); } catch (e) { diff --git a/src/functions/GetItems/subtests/runPaginationTests.ts b/src/functions/GetItems/subtests/runPaginationTests.ts index d48d90a..2e8cecc 100644 --- a/src/functions/GetItems/subtests/runPaginationTests.ts +++ b/src/functions/GetItems/subtests/runPaginationTests.ts @@ -1,21 +1,51 @@ +import Facade from "../../../Facade"; +import { Cursor, CursorResult, Pagination, Sort } from "../../../interfaces"; import { start } from "../../../interfaces/Cursor"; import Options from "../../../interfaces/Options"; -import Sort from "../../../interfaces/Sort"; import { asc } from "../../../interfaces/SortOrder"; import createCursorFromItem from "../../../utils/createCursorFromItem"; import testItem, { TestItem } from "../../utils/testItem"; +interface ExpectCorrectResultOptions { + readonly facade: Facade; + readonly items: T[]; + readonly after?: Cursor; + readonly before?: Cursor; + readonly expectedCursor: CursorResult; +} + +const sort: Sort = { id: asc }; + +const expectCorrectResult = async ({ + after, + before, + facade, + items, + expectedCursor +}: ExpectCorrectResultOptions) => { + const pagination: Pagination = { + after, + before, + limit: 1 + }; + + const result = await facade.getItems({ pagination, sort }); + + expect(result).toEqual({ + cursor: expectedCursor, + items + }); +}; + export default ({ facade }: Options) => { - const sort: Sort = { id: asc }; const firstId = "id1"; const secondId = "id2"; const firstItem = { ...testItem, id: firstId }; const secondItem = { ...testItem, id: secondId }; const firstCursor = createCursorFromItem(firstItem, sort); const secondCursor = createCursorFromItem(secondItem, sort); - const basePagination = { before: undefined, after: undefined, limit: 1 }; - beforeEach(async () => { + beforeEach(async() => { await facade.deleteItems({ filter: {} }); @@ -23,7 +53,7 @@ export default ({ facade }: Options) => { await facade.createItem({ id: secondId, item: secondItem }); }); - it("return all items", async () => { + it("return all items", async() => { const result = await facade.getItems({}); expect(result).toEqual({ cursor: { @@ -36,84 +66,74 @@ export default ({ facade }: Options) => { }); }); - it("should return first entity when after is start cursor", async () => { - const pagination = { ...basePagination, after: start }; - - const result = await facade.getItems({ pagination, sort }); - - expect(result).toEqual({ - cursor: { + it("should return first entity when after is start cursor", async() => { + await expectCorrectResult({ + after: start, + expectedCursor: { after: firstCursor, before: firstCursor, hasAfter: true, hasBefore: false }, + facade, items: [firstItem] }); }); - it("should return second entity when after is firstCursor", async () => { - const pagination = { ...basePagination, after: firstCursor }; - - const result = await facade.getItems({ pagination, sort }); - - expect(result).toEqual({ - cursor: { + it("should return second entity when after is firstCursor", async() => { + await expectCorrectResult({ + after: start, + expectedCursor: { after: secondCursor, before: secondCursor, hasAfter: false, hasBefore: true }, + facade, items: [secondItem] }); }); - it("should return no entities when after is secondCursor", async () => { - const pagination = { ...basePagination, after: secondCursor }; - - const result = await facade.getItems({ pagination, sort }); - - expect(result).toEqual({ - cursor: { + it("should return no entities when after is secondCursor", async() => { + await expectCorrectResult({ + after: secondCursor, + expectedCursor: { after: secondCursor, before: secondCursor, hasAfter: false, hasBefore: true }, + facade, items: [] }); }); - it("should return no entities when before is firstCursor", async () => { - const pagination = { ...basePagination, before: firstCursor }; - - const result = await facade.getItems({ pagination, sort }); - - expect(result).toEqual({ - cursor: { + it("should return no entities when before is firstCursor", async() => { + await expectCorrectResult({ + before: firstCursor, + expectedCursor: { after: firstCursor, before: firstCursor, hasAfter: true, hasBefore: false }, + facade, items: [] }); }); - it("should return first entity when before is secondCursor", async () => { - const pagination = { ...basePagination, before: secondCursor }; - - const result = await facade.getItems({ pagination, sort }); - - expect(result).toEqual({ - cursor: { + it("should return first entity when before is secondCursor", async() => { + await expectCorrectResult({ + before: secondCursor, + expectedCursor: { after: firstCursor, before: firstCursor, hasAfter: true, hasBefore: false }, + facade, items: [firstItem] }); }); -// tslint:disable-next-line:max-file-line-count -}; \ No newline at end of file + // tslint:disable-next-line:max-file-line-count +}; diff --git a/src/functions/ReplaceItem/test.ts b/src/functions/ReplaceItem/test.ts index d1fc664..6659b7d 100644 --- a/src/functions/ReplaceItem/test.ts +++ b/src/functions/ReplaceItem/test.ts @@ -1,63 +1,82 @@ import ItemNotFoundError from "../../errors/ItemNotFoundError"; -import Options from "../../interfaces/Options"; +import Facade from "../../Facade"; +import { Filter, Options } from "../../interfaces"; import testItem, { firstItem, secondItem, testId, - TestItem, + TestItem } from "../utils/testItem"; import testUsingFilter from "../utils/testUsingFilter"; +interface ExpectReplaceItemOptions { + readonly facade: Facade; + readonly filter?: Filter; + readonly id: string; + readonly item: T; +} + +const expectReplaceItem = async ({ + facade, + filter, + id, + item +}: ExpectReplaceItemOptions) => { + const replacement = { ...item, numberProperty: 999 }; + const result = await facade.replaceItem({ + filter, + id, + item + }); + expect(result.item).toEqual(replacement); +}; + export default ({ facade }: Options) => { describe("replaceItem", () => { testUsingFilter({ facade, toGetAllItems: async filter => { - const firstItemReplacement = { ...firstItem, numberProperty: 77 }; - const firstItemResult = await facade.replaceItem({ + await expectReplaceItem({ + facade, filter, id: firstItem.id, - item: firstItemReplacement + item: firstItem }); - expect(firstItemResult.item).toEqual(firstItemReplacement); - const secondItemReplacement = { ...secondItem, numberProperty: 99 }; - const secondItemResult = await facade.replaceItem({ + await expectReplaceItem({ + facade, filter, id: secondItem.id, - item: secondItemReplacement + item: secondItem }); - expect(secondItemResult.item).toEqual(secondItemReplacement); }, toGetFirstItem: async filter => { - const firstItemReplacement = { ...firstItem, numberProperty: 77 }; - const firstItemResult = await facade.replaceItem({ + await expectReplaceItem({ + facade, filter, id: firstItem.id, - item: firstItemReplacement + item: firstItem }); - expect(firstItemResult.item).toEqual(firstItemReplacement); }, toGetNoItems: async filter => { try { - const secondItemReplacement = { ...secondItem, numberProperty: 99 }; - await facade.replaceItem({ + await expectReplaceItem({ + facade, filter, id: secondItem.id, - item: secondItemReplacement + item: secondItem }); } catch (e) { expect(e).toBeInstanceOf(ItemNotFoundError); } }, toGetSecondItem: async filter => { - const secondItemReplacement = { ...secondItem, numberProperty: 99 }; - const secondItemResult = await facade.replaceItem({ + await expectReplaceItem({ + facade, filter, id: secondItem.id, - item: secondItemReplacement + item: secondItem }); - expect(secondItemResult.item).toEqual(secondItemReplacement); } }); }); diff --git a/src/utils/createGetItemsResult/after.spec.ts b/src/utils/createGetItemsResult/after.spec.ts index 8dffd00..6b6a4f6 100644 --- a/src/utils/createGetItemsResult/after.spec.ts +++ b/src/utils/createGetItemsResult/after.spec.ts @@ -1,55 +1,70 @@ import testItem, { TestItem } from "../../functions/utils/testItem"; -import Pagination from "../../interfaces/Pagination"; -import Sort from "../../interfaces/Sort"; +import { Cursor, CursorResult, Pagination, Sort } from "../../interfaces"; import { asc } from "../../interfaces/SortOrder"; import createGetItemsResult from "./index"; describe("createGetItemsResult forward", () => { const sort: Sort = { id: asc }; + const isEnd = true; const secondId = "test_id_2"; - const secondItem = { ...testItem, id: secondId }; const firstCursor = "eyJpZCI6InRlc3RfaWRfMSJ9"; const secondCursor = "eyJpZCI6InRlc3RfaWRfMiJ9"; - it("returns correct result when items and cursor is present", () => { - const items: TestItem[] = [secondItem]; + interface ExpectCorrectResultOptions { + readonly items: T[]; + readonly after: Cursor; + readonly expectedCursor: CursorResult; + } + + const expectCorrectResult = ({ + items, + after, + expectedCursor + }: ExpectCorrectResultOptions) => { const pagination: Pagination = { - after: firstCursor, + after, limit: 1 }; - const isEnd = true; const result = createGetItemsResult({ items, isEnd, pagination, sort }); expect(result).toEqual({ - cursor: { - after: secondCursor, - before: secondCursor, - hasAfter: false, - hasBefore: true - }, + cursor: expectedCursor, + items + }); + }; + + it("returns correct result when items and cursor is present", () => { + const items: TestItem[] = [secondItem]; + const expectedCursor = { + after: secondCursor, + before: secondCursor, + hasAfter: false, + hasBefore: true + }; + + expectCorrectResult({ + after: firstCursor, + expectedCursor, items }); }); it("returns correct result when no items and cursor is present", () => { const items: TestItem[] = []; - const pagination: Pagination = { + + const expectedCursor = { after: secondCursor, - limit: 1 + before: secondCursor, + hasAfter: false, + hasBefore: true }; - const isEnd = true; - const result = createGetItemsResult({ items, isEnd, pagination, sort }); - expect(result).toEqual({ - cursor: { - after: secondCursor, - before: secondCursor, - hasAfter: false, - hasBefore: true - }, + expectCorrectResult({ + after: secondCursor, + expectedCursor, items }); }); diff --git a/src/utils/createGetItemsResult/before.spec.ts b/src/utils/createGetItemsResult/before.spec.ts index a4e87f2..a9e0e9f 100644 --- a/src/utils/createGetItemsResult/before.spec.ts +++ b/src/utils/createGetItemsResult/before.spec.ts @@ -1,12 +1,38 @@ import testItem, { TestItem } from "../../functions/utils/testItem"; +import { Cursor, CursorResult, Pagination, Sort } from "../../interfaces"; import { start } from "../../interfaces/Cursor"; -import Pagination from "../../interfaces/Pagination"; -import Sort from "../../interfaces/Sort"; import { asc } from "../../interfaces/SortOrder"; import createGetItemsResult from "./index"; describe("createGetItemsResult backward", () => { const sort: Sort = { id: asc }; + const isEnd = true; + + interface ExpectCorrectResultOptions { + readonly items: T[]; + readonly before: Cursor; + readonly after?: Cursor; + readonly expectedCursor: CursorResult; + } + + const expectCorrectResult = ({ + after, + items, + before, + expectedCursor + }: ExpectCorrectResultOptions) => { + const pagination: Pagination = { + after, + before, + limit: 1 + }; + const result = createGetItemsResult({ items, isEnd, pagination, sort }); + + expect(result).toEqual({ + cursor: expectedCursor, + items + }); + }; const firstId = "test_id_1"; @@ -17,62 +43,52 @@ describe("createGetItemsResult backward", () => { it("returns correct result when there are no items and no cursors present", () => { const items: TestItem[] = []; - const pagination: Pagination = { + + const expectedCursor = { after: start, before: start, - limit: 1 + hasAfter: false, + hasBefore: false }; - const isEnd = true; - const result = createGetItemsResult({ items, isEnd, pagination, sort }); - - expect(result).toEqual({ - cursor: { - after: start, - before: start, - hasAfter: false, - hasBefore: false - }, + expectCorrectResult({ + after: start, + before: start, + expectedCursor, items }); }); it("returns correct result when no items present and cursor is present", () => { const items: TestItem[] = []; - const pagination: Pagination = { + + const expectedCursor = { + after: firstCursor, before: firstCursor, - limit: 1 + hasAfter: true, + hasBefore: false }; - const isEnd = true; - const result = createGetItemsResult({ items, isEnd, pagination, sort }); - expect(result).toEqual({ - cursor: { - after: firstCursor, - before: firstCursor, - hasAfter: true, - hasBefore: false - }, + expectCorrectResult({ + before: firstCursor, + expectedCursor, items }); }); it("returns correct result when items and cursor is present", () => { const items: TestItem[] = [firstItem]; - const pagination: Pagination = { - before: secondCursor, - limit: 1 + + const expectedCursor = { + after: firstCursor, + before: firstCursor, + hasAfter: true, + hasBefore: false }; - const isEnd = true; - const result = createGetItemsResult({ items, isEnd, pagination, sort }); - expect(result).toEqual({ - cursor: { - after: firstCursor, - before: firstCursor, - hasAfter: true, - hasBefore: false - }, + expectCorrectResult({ + before: secondCursor, + expectedCursor, items }); });