diff --git a/package-lock.json b/package-lock.json index eb4cffd..d792a7f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,13 @@ { "name": "atollelectron", - "version": "0.13.2", + "version": "0.15.0", "lockfileVersion": 1, "requires": true, "dependencies": { "@atoll/shared": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/@atoll/shared/-/shared-0.13.2.tgz", - "integrity": "sha512-vNmeDEHDPOH3rX9ZNcpATqen1sZuVBePlDTpEdDVSxVEarr36faTbTnFDndYDKN+EVgcLLmkMQ2fppDNqaY6iA==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@atoll/shared/-/shared-0.15.0.tgz", + "integrity": "sha512-j/IH4NEsezOImOFGgqY+CmN2YZPx8gnNqhC5eWglwoZdx4GAfyUK5PVhSRUg0Mfgxwyf2Rh4qiVN5Hhaojw6qA==", "requires": { "@csstools/normalize.css": "10.1.0", "@flopflip/react-broadcast": "10.1.11", @@ -10824,6 +10824,34 @@ } } }, + "electron-devtools-installer": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/electron-devtools-installer/-/electron-devtools-installer-3.1.1.tgz", + "integrity": "sha512-g2D4J6APbpsiIcnLkFMyKZ6bOpEJ0Ltcc2m66F7oKUymyGAt628OWeU9nRZoh1cNmUs/a6Cls2UfOmsZtE496Q==", + "dev": true, + "requires": { + "rimraf": "^3.0.2", + "semver": "^7.2.1", + "unzip-crx-3": "^0.2.0" + }, + "dependencies": { + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true + } + } + }, "electron-installer-common": { "version": "0.10.2", "resolved": "https://registry.npmjs.org/electron-installer-common/-/electron-installer-common-0.10.2.tgz", @@ -14589,6 +14617,12 @@ "minimatch": "^3.0.4" } }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", + "dev": true + }, "immer": { "version": "5.3.6", "resolved": "https://registry.npmjs.org/immer/-/immer-5.3.6.tgz", @@ -17470,6 +17504,18 @@ "object.assign": "^4.1.0" } }, + "jszip": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.5.0.tgz", + "integrity": "sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA==", + "dev": true, + "requires": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "set-immediate-shim": "~1.0.1" + } + }, "junk": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/junk/-/junk-3.1.0.tgz", @@ -17570,6 +17616,15 @@ "type-check": "~0.3.2" } }, + "lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dev": true, + "requires": { + "immediate": "~3.0.5" + } + }, "lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", @@ -22643,6 +22698,12 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, "set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -25336,6 +25397,17 @@ } } }, + "unzip-crx-3": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/unzip-crx-3/-/unzip-crx-3-0.2.0.tgz", + "integrity": "sha512-0+JiUq/z7faJ6oifVB5nSwt589v1KCduqIJupNVDoWSXZtWDmjDGO3RAEOvwJ07w90aoXoP4enKsR7ecMrJtWQ==", + "dev": true, + "requires": { + "jszip": "^3.1.0", + "mkdirp": "^0.5.1", + "yaku": "^0.16.6" + } + }, "unzip-response": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", @@ -26919,6 +26991,12 @@ "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=" }, + "yaku": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/yaku/-/yaku-0.16.7.tgz", + "integrity": "sha1-HRlceKqbW/hHnIlblQT9TwhHmE4=", + "dev": true + }, "yalc": { "version": "1.0.0-pre.35", "resolved": "https://registry.npmjs.org/yalc/-/yalc-1.0.0-pre.35.tgz", diff --git a/package.json b/package.json index b489299..06ecb12 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atollelectron", "productName": "atollelectron", - "version": "0.13.2", + "version": "0.15.0", "author": { "name": "Kevin Berry", "email": "41717340+51ngul4r1ty@users.noreply.github.com" @@ -36,7 +36,7 @@ "forge": "./forge.config.js" }, "dependencies": { - "@atoll/shared": "0.13.2", + "@atoll/shared": "0.15.0", "@flopflip/memory-adapter": "1.6.0", "@flopflip/react-broadcast": "10.1.11", "axios": "0.19.2", @@ -106,6 +106,7 @@ "css-loader": "3.4.2", "dependency-cruiser": "9.7.0", "electron": "9.0.5", + "electron-devtools-installer": "3.1.1", "eslint": "6.8.0", "eslint-config-wiremore": "3.0.5", "file-loader": "5.1.0", diff --git a/src/common/routeBuilder.tsx b/src/common/routeBuilder.tsx index a41e6f7..c9f89ae 100644 --- a/src/common/routeBuilder.tsx +++ b/src/common/routeBuilder.tsx @@ -4,6 +4,9 @@ import { Switch, Route } from "react-router-dom"; import { ConfigureFlopFlip } from "@flopflip/react-broadcast"; import adapter from "@flopflip/memory-adapter"; +// libraries +import { buildFeatureTogglesList, FEATURE_TOGGLE_LIST } from "@atoll/shared"; + // components import { IntlProvider, @@ -33,7 +36,8 @@ const getDefaultFlags = (windowObj: any, forSsr: boolean) => { if (forSsr) { return { showEditButton: false }; } - return (windowObj as any).__TOGGLES__; + const toggles = (windowObj as any).__TOGGLES__ || buildFeatureTogglesList(FEATURE_TOGGLE_LIST); + return toggles; }; export const buildRoutes = (windowObj: any, forSsr: boolean) => ( @@ -44,11 +48,6 @@ export const buildRoutes = (windowObj: any, forSsr: boolean) => ( defaultFlags={getDefaultFlags(windowObj, forSsr)} > {({ isAdapterReady }) => { - if (isAdapterReady) { - console.log("isAdapterReady = true"); - } else { - console.log("isAdapterReady = false"); - } return isAdapterReady ? appRoutes :