From b52862d681269a0648afb39aed72524d22fef1ef Mon Sep 17 00:00:00 2001 From: Charles Jonas Date: Wed, 17 Apr 2019 18:11:58 -0600 Subject: [PATCH 1/3] fixing scripts --- package.json | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index f9c646f..0c0c9ff 100644 --- a/package.json +++ b/package.json @@ -20,24 +20,23 @@ "start": "npm run start-sfdc", "start-local": "npm run dev-server -- --open --env.local", "start-sfdc": "npm run dev-server -- --https --cert ./config/cert/server.crt --key ./config/cert/server.key", - "dev-server": "cross-env TS_NODE_PROJECT=config/webpack.tsconfig.json webpack-dev-server --config config/webpack.config.ts --hot", + "setup-ts-webpack": "cross-env TS_NODE_PROJECT=$npm_package_config_TS_NODE_PROJECT", + "dev-server": "npm run setup-ts-webpack -- webpack-dev-server --config config/webpack.config.ts --hot", "create-dev-crt": "openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes -keyout ./config/cert/server.key -out ./config/cert/server.crt -extensions san -config ./config/cert/dev.conf", "cors-enable": "sfdx force:mdapi:deploy -d ./config/sfdc-cors-enable -w 10000", "cors-disable": "sfdx force:mdapi:deploy -d ./config/sfdc-cors-disable -w 10000", "clean": "rimraf dist", - "compile": "npm run clean && TS_NODE_PROJECT=\"config/webpack.tsconfig.json\" webpack --config config/webpack.config.ts --env.build --env.resource $npm_package_config_resource", + "compile": "npm run clean && npm run setup-ts-webpack -- webpack --config config/webpack.config.ts --env.build --env.resource $npm_package_config_resource", "compile-dev": "npm run compile", "compile-prod": "npm run compile", - "analyze-bundle": "npm run clean && TS_NODE_PROJECT=\"config/webpack.tsconfig.json\" webpack --config config/webpack.config.ts --env.build --env.analyze", + "analyze-bundle": "npm run clean && npm run setup-ts-webpack -- webpack --config config/webpack.config.ts --env.build --env.analyze", "new-scratch-org": "sfdx force:org:create -f config/project-scratch-def.json -a $npm_config_scratch_alias", "make-scratch-default": "sfdx force:config:set defaultusername=$npm_config_scratch_alias", "make-dev-default": "sfdx force:config:set defaultusername=$npm_config_dev_alias", "make-prod-default": "sfdx force:config:set defaultusername=$npm_config_prod_alias", "bundle-app-dev": "npm run compile-dev && npm run copy-bundle", "bundle-app-prod": "npm run compile-prod && npm run copy-bundle", - "zip-bundle": "zip -r ./force-app/main/default/staticresources/app.zip ./dist", - "copy-bundle": "rm ./force-app/main/default/staticresources/* || true && npm run zip-bundle && mv ./force-app/main/default/staticresources/app.zip ./force-app/main/default/staticresources/$npm_package_config_resource.resource && npm run copy-resource-meta", - "copy-resource-meta": "cp ./config/build-assets/temp.resource-meta.xml ./force-app/main/default/staticresources/$npm_package_config_resource.resource-meta.xml", + "copy-bundle": "rimraf ./force-app/main/default/staticresources/* || true && npm run zip-bundle && mv ./force-app/main/default/staticresources/app.zip ./force-app/main/default/staticresources/$npm_package_config_resource.resource && npm run copy-resource-meta", "package-sfdc": "sfdx force:source:convert -d ./dist/sfdc-package", "build-dev": "npm run bundle-app-dev && npm run package-sfdc", "build-prod": "npm run bundle-app-prod && npm run package-sfdc", @@ -50,8 +49,7 @@ "generate-ts-force": "ts-force-gen -j ./config/ts-force-config.json", "test": "jest --no-cache --config jest.json", "test:update": "jest --no-cache --config jest.json -u", - "reinstall": "rm -rf node_modules && npm install", - "reinstall:win": "rd /s /q node_modules && npm" + "reinstall": "rimraf node_modules && npm install" }, "dependencies": { "antd": "^3.15.0", From 800e15fcf52e85e631865fcd892d94f25512ddaf Mon Sep 17 00:00:00 2001 From: Charles Jonas Date: Wed, 17 Apr 2019 21:08:14 -0600 Subject: [PATCH 2/3] - Getting Rid of local mode (not enough benifit to justify the extra complications) - Moving things to config folder --- .babelrc | 22 - .editorconfig | 1 + README.md | 132 +- config/babelrc.json | 22 + config/cert/readme.md | 7 + config/index.html | 15 - jest.json => config/jest.json | 3 +- .../sfdc-cors-disable/destructiveChanges.xml | 9 - config/sfdc-cors-disable/package.xml | 4 - .../http_localhost.corsWhitelistOrigin | 4 - .../https_localhost.corsWhitelistOrigin | 4 - config/sfdc-cors-enable/package.xml | 9 - config/webpack.config.ts | 46 +- package-lock.json | 1155 ++--------------- package.json | 18 +- src/app.tsx | 8 +- src/styles/ant-theme-vars.less | 1 + tslint.json | 24 +- 18 files changed, 265 insertions(+), 1219 deletions(-) delete mode 100644 .babelrc create mode 100644 config/babelrc.json create mode 100644 config/cert/readme.md delete mode 100644 config/index.html rename jest.json => config/jest.json (86%) delete mode 100644 config/sfdc-cors-disable/destructiveChanges.xml delete mode 100644 config/sfdc-cors-disable/package.xml delete mode 100644 config/sfdc-cors-enable/corsWhitelistOrigins/http_localhost.corsWhitelistOrigin delete mode 100644 config/sfdc-cors-enable/corsWhitelistOrigins/https_localhost.corsWhitelistOrigin delete mode 100644 config/sfdc-cors-enable/package.xml diff --git a/.babelrc b/.babelrc deleted file mode 100644 index f3368d3..0000000 --- a/.babelrc +++ /dev/null @@ -1,22 +0,0 @@ -{ - "presets": [ - "@babel/env", - "@babel/typescript", - "@babel/react" - - ], - "plugins": [ - ["@babel/plugin-proposal-decorators", { "legacy": true }], - ["react-hot-loader/babel"], - [ - "import", - { - "libraryName": "antd", - "style": true, - "libraryDirectory": "es" - } - ], - ["@babel/plugin-proposal-class-properties", { "loose": true }], - ["@babel/proposal-object-rest-spread"] - ] -} diff --git a/.editorconfig b/.editorconfig index 0549e19..ba971c7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,5 @@ # EditorConfig is awesome: http://EditorConfig.org +# vscode extension: https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig # top-most EditorConfig file root = true diff --git a/README.md b/README.md index bea8511..37cde18 100644 --- a/README.md +++ b/README.md @@ -2,113 +2,88 @@ ***BAD ASS SALESFORCE STACK*** -![bass like the fish](https://user-images.githubusercontent.com/5217568/38460726-edbf16aa-3a7c-11e8-80f9-58e109e652cf.jpg) +![bass: like the fish](https://user-images.githubusercontent.com/5217568/38460726-edbf16aa-3a7c-11e8-80f9-58e109e652cf.jpg) * [react](https://facebook.github.io/react/): all the cool kids are doing it * [typescript](https://www.typescriptlang.org/): business in the front, party in the back -* [antd](https://ant.design/docs/react/introduce): the most useful thing to come out of China since [the fork](https://en.wikipedia.org/wiki/Fork) +* [antd](https://ant.design/docs/react/introduce): the best thing to come out of China since [the fork](https://en.wikipedia.org/wiki/Fork) * [ts-force](https://www.npmjs.com/package/ts-force): generates massive files so you don't have toooo -* [webpack](https://webpack.github.io/): Does a lot of stuff you fully don't understand +* [webpack](https://webpack.github.io/): Does a lot of stuff won't ever fully don't understand * [sfdx-cli](https://developer.salesforce.com/tools/sfdxcli): #nosoftware ## FEATURES * develop w/ local asset on VisualForce page -* develop on localhost (REST API only) * Hot Module Reloading (HMR)! * 1 step build & deploy to orgs -* works with for developer, sandbox, scratch and even production orgs -* type safety and completion when working with SF objects +* supports developer, sandbox, scratch and production orgs +* type safety and code completion when working with SF objects * jest test framework -* setup for Redux Developer tools ([browser extension](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en)) * setup for debugging in [vscode chrome debugger](https://github.com/Microsoft/vscode-chrome-debug) ## GETTING STARTED -*NOTICE*: This build is intended for users of OSX (or other linux based system). However, it wouldn't be too hard to port the setup and build commands to windows +### System Requirements -### Install SFDC-cli +Make sure you have the following installed on your machine: -This workflow uses [sfdx-cli](https://www.npmjs.com/package/sfdx-cli) to manage authentication and deployment of meta data to orgs. Run `npm install --global sfdx-cli`. You don't need to authorize a hub org unless you plan on developing against "scratch orgs". +* `npm` +* [sfdx-cli](https://www.npmjs.com/package/sfdx-cli): If you plan on developing against "scratch orgs", you will need to authorize a "hub". -### Clone Starter +#### Windows + +You will also need the following: + +* A `bash` enumerator (one comes with `git`) OR [linux](https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). Basiclly you need your shell to be able to run standard GNU commands like `cp`, `mv`, `zip`, etc. +** You may also need to tell npm to use bash: `npm config set script-shell "C:\\Program Files\\Git\\bin\\bash.exe"` + +### Clone this Starter 1. `git clone https://github.com/ChuckJonas/bad-ass-salesforce-stack bass` 2. `cd bass` -3. optional: `git checkout` the `redux-example` or `react-example branches` -4. `npm install` +3. `npm install` ### Authentication To do much of anything you'll need to connect with one or more orgs. Use `sfdx force:org:list` to see a list of orgs you're already authenticated with. Connect to an existing sandbox using `sfdx force:auth:web:login -sr [ORG_URL] -a [ALIAS]`. You can also create a scratch org using: `npm run new-scratch-org`. -### Setup Target Orgs +### Setup "Target" Orgs -Several commands take advantage of the following predefined "targets" +The starter supports 3 pre-defined "targets". Each target allow us to run different build & dev `scripts` depending on the context: -* `dev`: to develop against a traditional salesforce org. Developer or Sandbox -* `scratch`: allows development against a "scratch org" using the Salesforce DX flow. Must authenticate with a `hub org` -* `prod`: to release your app. Can also be used to hotfix with live production data. Don't be dumb and develop against production! +* `dev`: to develop against a traditional salesforce org. Developer or Sandbox. +* `scratch`: allows development against a "scratch org" using the Salesforce DX flow. Must authenticate with a "hub org" +* `prod`: to release your app. Optimizes build -You'll need to specific the associated alias each target in the `.npmrc` config file. You can use either the alias or the username here. +Targets are set in the `.npmrc` config file. You can use either the alias or the username here: ```env dev_alias=dev_username -scratch_alias=test_new_feature -prod_alias=prod_user +scratch_alias=scratch +prod_alias=john@acme.com ``` *NOTE: You might want to ignore `.npmrc` for your repo. Each contributor will manage this configuration separately and committing it could result in another user accidentally deploying to an unintended org. This is especially true if you use the sfdx alias over the username -#### Default Target - -While `deploy` scripts are env specific, some commands (eg: `npm start-local`, `npm enable-cors`) use the default DX user. You can use following scripts to switch the default user to the desired alias listed in `.npmrc` - -```bash -npm run make-dev-default -npm run make-scratch-default -npm run make-prod-default -``` ## DEVELOPMENT -### Salesforce w/ Local Assets - -The most flexible development setup is to use `localhost` to serve assets on your VF page in salesforce. You'll be able to make changes from your IDE and salesforce will automatically update on the fly. Updates will only show for you and not impact any other users in that environment. You will not be limited from using any salesforce features you might need. - -1. Deploy your application (step needs to happen whenever the contents of `force-app` change) -2. `npm run create-dev-crt`: this creates certificate to use with our dev server (you only need to do this once). -3. install the newly created cert `config/cert/server.crt` in [keychain and set trust to "Always"](https://www.youtube.com/watch?v=TGrX8XgSuZ4) -4. `npm run start-sfdc` (or just `npm start`) -5. navigate to your page EG: `/apex/app` -6. append `?local=1` to page query string - -*NOTE:*: If the `create-dev-crt` cmd does not run (for example if you don't have `openssl` installed), then you can by-pass this step by removing `--cert ./config/cert/server.crt --key ./config/cert/server.key` from the `start-sfdc` command (+ skip step 3). However, you will have to manually tell chrome to trust the served resources. +1. Deploy your application by running `npm run deploy-dev` or `npm run deploy-scratch`. This step needs to happen whenever the contents of `force-app` change. +2. run `npm start` +3. Enable [Allow Insecure Localhost](chrome://flags/#allow-insecure-localhost) setting in chrome. If you don't want to enable this, or use a different browser, you can create your own self-signed certificate by following [these instructions](https://github.com/ChuckJonas/bad-ass-salesforce-stack/blob/master/config/cert/readme.md). +4. navigate to your page in salesforce: EG: `/apex/app` +5. append `?local=1` to page query string +6. Start coding. Your app will automatically update as you save changes. -#### How it works +[See HMR in action](http://i.imgur.com/j9NBbmf.gif) -You can see how this is configured by looking at `force-app/main/default/pages/App.page`. Basically, we have two output panels that render conditionally based on the url param `local == 1`. +### How it works -### Localhost +`webpack-dev-server` compiles and makes your app available @ `https//localhost:PORT`. It incrementally compiles your app as you make changes & [react-hot-loader](https://github.com/gaearon/react-hot-loader) allows modules to be hot reloaded without refreshing the page. -This starter is also configured with the ability to run completely on `localhost`. While there are many benefits to local dev, **you will be limited to communicating with salesforce ONLY through the REST API** (`@RemoteAction`, Custom Controllers, Streaming API, etc will not run on locally host). +Updates will only show for you and not impact any other users in that environment (until you deploy). -1. `npm run cors-enable` (only need to run once. whitelist localhost CORS on the default target org). See Warning[^1] -2. `npm run start-local` (start a local webserver with hot reload) - -Localhost dev is really helpful for prototyping and even full applications depending on the requirements. If you are only using the REST API and your `App.page` doesn't change often, this might be the more convenient development setup. - -#### How it works - -- webpack will use SFDX to grab a session token & host from your current "default user" (can be changed via `npm run make-[target]-default`) and inject it into the global scope -- the `config/index.html` file will act like the VF pages (this always needs to reflect your setup in `App.page`) - - if you inject any other variables into the global scope, you will also need to include these - -[^1] DANGER: while allowing salesforce to accept request from a localhost server is awesome for hot reloading it has security risks. It's best if you don't do this in a production or org with sensitive data. But if you did, be sure to disable cors when done with `npm run cors-disable` to disable the security hole!!! [why?](https://stackoverflow.com/questions/39042799/cors-localhost-as-allowed-origin-in-production)* - -## Hot Module Reloading (HMR) - -Regardless of which development setup you use, you can take advantage of Hot Module Reloading (HMR), which allows updates to show up within seconds without ever having to refresh the page. Your application state is even also preserved in many cases. [See HMR in action](http://i.imgur.com/j9NBbmf.gif). +You can see how this is configured by looking at [`force-app/main/default/pages/App.page`](https://github.com/ChuckJonas/bad-ass-salesforce-stack/blob/e7b7366ca2ad1e13bc9b3a1986ad6148097c2fa2/force-app/main/default/pages/App.page#L17). Basically, we just have two output panels that render conditionally based on the url param `local == 1`. ## Deployment @@ -131,32 +106,32 @@ If you want to use this project as a template for your own simply: 2. `git init` 3. optionally add [git remote](https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/) 4. configure & `npm run ts-force-generate` -5. rename page & resource bundle (optional) +5. rename page & resource bundle (optional; see below) 6. remove example files ### Renaming Page and Resource Bundle Before you start your own project, you'll probably want to rename the page & resource bundle from App to something more specific. -Renaming the page is as simple as navigating to `force-app/main/default/pages` and renaming the `.page` and `.page-meta.xml`. +Renaming the page is as simple as navigating to `force-app/main/default/pages` and renaming the `app.page` and `app.page-meta.xml` to whatever you want. #### To rename the generated Static Resource -1. in `package.json` update `resource` under `config` section +1. in `package.json`, under the `config` section, update `resource` 2. optionally, update your `.gitignore` to exclude these files -3. finally, just update your vf page to properly reference the new resource name +3. finally, just update `$Resource.app` in the vf page to properly reference the new resource name **NOTE: If you include other static resources in the `force-app/main/default/staticresources` folder they will get nuked by default. To prevent this, update the `copy-bundle` script ** -## OTHER CONFIGURATIONS +## Further Configurations -### antd theming +### antd theme -You can change the antd theme less variables by editing `/styles/ant-theme-vars.less`. Unfortunately changes require a webpack restart to show up :( +You can change the antd theme less variables by editing `/styles/ant-theme-vars.less`. Unfortunately, changes here require a webpack restart to show up :( ### ts-force configuration -This project comes equipped with ts-force to allow you to access Salesforce data in a typed manor. To use ts-force, you must first generate classes for the SObjects you want to work with. +This project comes equipped with `ts-force` to allow you typed access to Salesforce Rest API. To use `ts-force`, you must first generate classes for the SObjects you want to work with. You can do this by editing `ts-force-config.json`. Make sure `auth: {username: ""}` is set to the target org alias you want to use to generate classes. ***This should be the end user for the app!*** @@ -166,18 +141,8 @@ For more details on configuration, see the [ts-force documentation](https://gith Unfortunately the port isn't currently managed from a single point and must be updated in 2 places: -1. In `/config/webpack.config.json` update the `PORT` constant -2. In `/config/sfdc-cors-enable` update it on both files -3. in `/force-app/main/default/pages/App.Page`, update the "Local Asset" panel - -```html - - - - -``` - -if you change the port, don't forget to update salesforce w/ `npm run cors-enable` +1. in `package.json`, under the `config` section, update `PORT` constant +2. in `/force-app/main/default/pages/App.Page`, update the "Local Asset" panel: `https://localhost:XXXX/app.js` ## OTHER USEFUL STUFF @@ -188,12 +153,12 @@ Highly recommend using vscode (typescript code completion, in editor terminal, e plugins: * [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome): Allows debugging in vscode +* [Editor Config](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig): auto-set formatting options for everyone * [TSlint](https://marketplace.visualstudio.com/items?itemName=eg2.tslint): green squigglies everywhere! * [Salesforce Extensions for VS Code](https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode): gives your code completion on your `force-app` and ability to excute commands against the CLI * [Auto Close Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag) * [Typescript Hero](https://marketplace.visualstudio.com/items?itemName=rbbit.typescript-hero): auto-imports, etc * [Jest](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest): run tests on save -* [Webpack Dashboard App](https://www.google.com/search?q=webpack+dashboard+electron&oq=webpack+dashboard+e&aqs=chrome.1.69i57j0j69i60l3j0.6080j1j7&sourceid=chrome&ie=UTF-8): nice app for you webpack-dev-server status ### helpful linkies @@ -201,7 +166,6 @@ plugins: * [react-redux-typescript-guide](https://github.com/piotrwitek/react-redux-typescript-guide) * [jest reference](https://facebook.github.io/jest/docs/en/getting-started.html#content) * [sfdx cli reference](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference.htm) -* [React-Redux: put API calls in the correct place](https://github.com/reactjs/redux/issues/291) * [Where to Hold React Component Data: state, store, static, and this](https://medium.freecodecamp.org/where-do-i-belong-a-guide-to-saving-react-component-data-in-state-store-static-and-this-c49b335e2a00) * [Redux: How to chain async actions](https://github.com/reactjs/redux/issues/1676) * [a-redux-typescript-setup](http://blog.krawaller.se/posts/a-redux-typescript-setup/) diff --git a/config/babelrc.json b/config/babelrc.json new file mode 100644 index 0000000..78d8e01 --- /dev/null +++ b/config/babelrc.json @@ -0,0 +1,22 @@ +{ + "presets": [ + "@babel/env", + "@babel/typescript", + "@babel/react" + + ], + "plugins": [ + ["@babel/plugin-proposal-decorators", { "legacy": true }], + ["react-hot-loader/babel"], + [ + "import", + { + "libraryName": "antd", + "style": true, + "libraryDirectory": "es" + } + ], + ["@babel/plugin-proposal-class-properties", { "loose": true }], + ["@babel/proposal-object-rest-spread"] + ] +} diff --git a/config/cert/readme.md b/config/cert/readme.md new file mode 100644 index 0000000..b18f354 --- /dev/null +++ b/config/cert/readme.md @@ -0,0 +1,7 @@ +# Trusting Localhost + +For cases where you cannot `Allow Insecure Localhost` (or aren't using chrome): + +1. run `openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes -keyout ./config/cert/server.key -out ./config/cert/server.crt -extensions san -config ./config/cert/dev.conf` +2. in "package.json" update the `npm start` with `--cert ./config/cert/server.crt --key ./config/cert/server.key` +3. install the newly created cert `config/cert/server.crt` in [keychain and set trust to "Always"](https://www.youtube.com/watch?v=TGrX8XgSuZ4) \ No newline at end of file diff --git a/config/index.html b/config/index.html deleted file mode 100644 index 9325b8c..0000000 --- a/config/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - React / Typescript / antd / ts-force / sfdx / webpack / ;) - - -
- - diff --git a/jest.json b/config/jest.json similarity index 86% rename from jest.json rename to config/jest.json index 22853a5..f297fd3 100644 --- a/jest.json +++ b/config/jest.json @@ -8,12 +8,13 @@ "transform": { "\\.(ts|tsx)$": "ts-jest" }, + "rootDir": "../", "moduleNameMapper": { "\\.(css|scss|less)$": "/config/__mocks__/styleMock.js", "\\.(png|jpg|gif|ttf|eot|svg)$": "/config/__mocks__/fileMock.js", "@src/(.*)": "/src/$1", "@gen/(.*)": "/src/generated/$1" }, - "testRegex": "/tests/.*\\.(ts|tsx|js)$", + "testRegex": "/src/tests/.*\\.(ts|tsx|js)$", "unmockedModulePathPatterns": [] } diff --git a/config/sfdc-cors-disable/destructiveChanges.xml b/config/sfdc-cors-disable/destructiveChanges.xml deleted file mode 100644 index d3dcbcf..0000000 --- a/config/sfdc-cors-disable/destructiveChanges.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - CorsWhitelistOrigin - http_localhost - https_localhost - - 40.0 - diff --git a/config/sfdc-cors-disable/package.xml b/config/sfdc-cors-disable/package.xml deleted file mode 100644 index 2e57b1f..0000000 --- a/config/sfdc-cors-disable/package.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - 40.0 - diff --git a/config/sfdc-cors-enable/corsWhitelistOrigins/http_localhost.corsWhitelistOrigin b/config/sfdc-cors-enable/corsWhitelistOrigins/http_localhost.corsWhitelistOrigin deleted file mode 100644 index d956388..0000000 --- a/config/sfdc-cors-enable/corsWhitelistOrigins/http_localhost.corsWhitelistOrigin +++ /dev/null @@ -1,4 +0,0 @@ - - - http://localhost:8080 - diff --git a/config/sfdc-cors-enable/corsWhitelistOrigins/https_localhost.corsWhitelistOrigin b/config/sfdc-cors-enable/corsWhitelistOrigins/https_localhost.corsWhitelistOrigin deleted file mode 100644 index e19804b..0000000 --- a/config/sfdc-cors-enable/corsWhitelistOrigins/https_localhost.corsWhitelistOrigin +++ /dev/null @@ -1,4 +0,0 @@ - - - https://localhost:8080 - diff --git a/config/sfdc-cors-enable/package.xml b/config/sfdc-cors-enable/package.xml deleted file mode 100644 index d3dcbcf..0000000 --- a/config/sfdc-cors-enable/package.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - CorsWhitelistOrigin - http_localhost - https_localhost - - 40.0 - diff --git a/config/webpack.config.ts b/config/webpack.config.ts index 5045a6d..931d18c 100644 --- a/config/webpack.config.ts +++ b/config/webpack.config.ts @@ -2,43 +2,38 @@ import * as path from 'path'; import * as webpack from 'webpack'; import * as webpackDevServer from 'webpack-dev-server'; import * as fs from 'fs'; - -const DashboardPlugin = require('webpack-dashboard/plugin'); +import lessToJs from 'less-vars-to-js'; const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; -const HtmlWebpackPlugin = require('html-webpack-plugin'); +/** Setup Paths */ const PATHS = { root: path.resolve(__dirname, '..'), - nodeModules: path.resolve(__dirname, '../node_modules'), src: path.resolve(__dirname, '../src'), assets: path.resolve(__dirname, '../src/assets'), dist: path.resolve(__dirname, '../dist'), - styles: path.resolve(__dirname, '../src/styles'), - localTemplate: path.resolve(__dirname, '../config/index.html'), + styles: path.resolve(__dirname, '../src/styles') }; -// for ant overrides - -const lessToJs = require('less-vars-to-js'); +// for ant style overrides const themeVariables = lessToJs(fs.readFileSync(path.join(PATHS.styles, './ant-theme-vars.less'), 'utf8')); module.exports = (env: any = {}) => { const PORT = env.port || 8080; // should match ./config/sfdc-cors-enable const resourceName = env.resource || 'app'; const isBuild = !!env.build; - const isLocal = env.local; - console.log('isBuild:', isBuild, 'isLocal:', isLocal); + console.log(`Resource Name: ${resourceName} | isBuild: ${isBuild}`); const mode = isBuild ? 'production' : 'development'; + // add things here to put in the global namespace const GLOBAL_DEFINES: any = { 'process.env': { NODE_ENV: JSON.stringify(mode), }, }; - const DEV_SERVER: webpackDevServer.Configuration = { + const devServer: webpackDevServer.Configuration = { historyApiFallback: true, overlay: true, port: PORT, @@ -50,21 +45,11 @@ module.exports = (env: any = {}) => { disableHostCheck: true, }; - // Setup variables for communications with Salesforce locally - if (isLocal) { - // get access token from sfdx - const child_process = require('child_process'); - const orgInfo = JSON.parse(child_process.execSync('sfdx force:org:display --json').toString('utf8')); - console.log(`Running on ${orgInfo.result.instanceUrl} as ${orgInfo.result.username}`); - GLOBAL_DEFINES.__ACCESSTOKEN__ = JSON.stringify(orgInfo.result.accessToken); - GLOBAL_DEFINES.__RESTHOST__ = JSON.stringify(orgInfo.result.instanceUrl); - } - const config: webpack.Configuration = { mode, cache: true, devtool: isBuild ? 'source-map' : 'eval-source-map', - devServer: DEV_SERVER, + devServer, context: PATHS.root, entry: { app: [ @@ -75,7 +60,10 @@ module.exports = (env: any = {}) => { output: { path: PATHS.dist, filename: '[name].js', - publicPath: (isBuild ? `/resource/${resourceName}/dist/` : isLocal ? '/' : `https://localhost:${PORT}/`), // setup for HMR when hosted with salesforce + publicPath: ( + isBuild ? `/resource/${resourceName}/dist/` + : `https://localhost:${PORT}/` // setup for HMR when hosted with salesforce + ), }, optimization: { splitChunks: { @@ -98,6 +86,8 @@ module.exports = (env: any = {}) => { // externals: { // }, + + /*** LOADERS ***/ module: { rules: [ // typescript @@ -106,6 +96,7 @@ module.exports = (env: any = {}) => { test: /\.(ts|js)x?$/, exclude: /node_modules/, loader: 'babel-loader', + options: require('./babelrc.json') }, // css { @@ -164,19 +155,14 @@ module.exports = (env: any = {}) => { ], }, + /*** PLUGIN ***/ plugins: [ ...[ new webpack.DefinePlugin(GLOBAL_DEFINES), ], ...(!isBuild ? [ - new DashboardPlugin(), new webpack.NamedModulesPlugin(), ] : []), - ...(isLocal ? [ - new HtmlWebpackPlugin({ - template: PATHS.localTemplate, - }), - ] : []), ...(env.analyze ? [ new BundleAnalyzerPlugin(), ] : []), diff --git a/package-lock.json b/package-lock.json index 5e74f33..4a21c0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2504,21 +2504,6 @@ "@types/yargs": "^12.0.9" } }, - "@most/multicast": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@most/multicast/-/multicast-1.3.0.tgz", - "integrity": "sha512-DWH8AShgp5bXn+auGzf5tzPxvpmEvQJd0CNsApOci1LDF4eAEcnw4HQOr2Jaa+L92NbDYFKBSXxll+i7r1ikvw==", - "dev": true, - "requires": { - "@most/prelude": "^1.4.0" - } - }, - "@most/prelude": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@most/prelude/-/prelude-1.7.2.tgz", - "integrity": "sha512-GM5ec7+xpkuXiCMyzhyENgH/xZ8t0nAMDBY0QOsVVD6TrZYjJKUnW1eaI18HHX8W+COWMwWR9c0zoPiBp9+tUg==", - "dev": true - }, "@mrmlnc/readdir-enhanced": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", @@ -3079,12 +3064,6 @@ "object-assign": "4.x" } }, - "after": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", - "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=", - "dev": true - }, "ajv": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", @@ -3313,12 +3292,6 @@ "function-bind": "^1.1.1" } }, - "arraybuffer.slice": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", - "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==", - "dev": true - }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -3392,12 +3365,12 @@ "dev": true }, "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", "dev": true, "requires": { - "lodash": "^4.17.10" + "lodash": "^4.17.11" } }, "async-each": { @@ -3464,17 +3437,6 @@ "js-tokens": "^3.0.2" } }, - "babel-helper-builder-react-jsx": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz", - "integrity": "sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "esutils": "^2.0.2" - } - }, "babel-jest": { "version": "24.3.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.3.1.tgz", @@ -3569,68 +3531,6 @@ "@types/babel__traverse": "^7.0.6" } }, - "babel-plugin-syntax-flow": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", - "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=", - "dev": true - }, - "babel-plugin-syntax-jsx": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", - "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=", - "dev": true - }, - "babel-plugin-transform-flow-strip-types": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", - "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", - "dev": true, - "requires": { - "babel-plugin-syntax-flow": "^6.18.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-react-display-name": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz", - "integrity": "sha1-Z+K/Hx6ck6sI25Z5LgU5K/LMKNE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-react-jsx": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz", - "integrity": "sha1-hAoCjn30YN/DotKfDA2R9jduZqM=", - "dev": true, - "requires": { - "babel-helper-builder-react-jsx": "^6.24.1", - "babel-plugin-syntax-jsx": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-react-jsx-self": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz", - "integrity": "sha1-322AqdomEqEh5t3XVYvL7PBuY24=", - "dev": true, - "requires": { - "babel-plugin-syntax-jsx": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-react-jsx-source": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz", - "integrity": "sha1-ZqwSFT9c0tF7PBkmj0vwGX9E7NY=", - "dev": true, - "requires": { - "babel-plugin-syntax-jsx": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, "babel-polyfill": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", @@ -3648,15 +3548,6 @@ } } }, - "babel-preset-flow": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz", - "integrity": "sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0=", - "dev": true, - "requires": { - "babel-plugin-transform-flow-strip-types": "^6.22.0" - } - }, "babel-preset-jest": { "version": "24.3.0", "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.3.0.tgz", @@ -3667,20 +3558,6 @@ "babel-plugin-jest-hoist": "^24.3.0" } }, - "babel-preset-react": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.24.1.tgz", - "integrity": "sha1-umnfrqRfw+xjm2pOzqbhdwLJE4A=", - "dev": true, - "requires": { - "babel-plugin-syntax-jsx": "^6.3.13", - "babel-plugin-transform-react-display-name": "^6.23.0", - "babel-plugin-transform-react-jsx": "^6.24.1", - "babel-plugin-transform-react-jsx-self": "^6.22.0", - "babel-plugin-transform-react-jsx-source": "^6.22.0", - "babel-preset-flow": "^6.23.0" - } - }, "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", @@ -3690,24 +3567,6 @@ "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=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=", - "dev": true - }, "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", @@ -3763,24 +3622,12 @@ } } }, - "base64-arraybuffer": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", - "dev": true - }, "base64-js": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", "dev": true }, - "base64id": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", - "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=", - "dev": true - }, "batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -3797,15 +3644,6 @@ "tweetnacl": "^0.14.3" } }, - "better-assert": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", - "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", - "dev": true, - "requires": { - "callsite": "1.0.0" - } - }, "bfj": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/bfj/-/bfj-6.1.1.tgz", @@ -3830,12 +3668,6 @@ "integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw==", "dev": true }, - "blob": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", - "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==", - "dev": true - }, "bluebird": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", @@ -4182,22 +4014,6 @@ "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", "dev": true }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "dev": true - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, "camelcase": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz", @@ -4339,15 +4155,6 @@ "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" }, - "clean-css": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", - "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", - "dev": true, - "requires": { - "source-map": "0.5.x" - } - }, "cli-spinner": { "version": "0.2.10", "resolved": "https://registry.npmjs.org/cli-spinner/-/cli-spinner-0.2.10.tgz", @@ -4458,12 +4265,6 @@ "integrity": "sha512-tK69D7oNXXqUW3ZNo/z7NXTEz22TCF0pTE+YF9cxvaAM9XnkLo1fV621xCLrRR6aevJlKxExkss0vWqUCUpqdg==", "dev": true }, - "component-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", - "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=", - "dev": true - }, "component-classes": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/component-classes/-/component-classes-1.2.6.tgz", @@ -4483,12 +4284,6 @@ "resolved": "https://registry.npmjs.org/component-indexof/-/component-indexof-0.0.3.tgz", "integrity": "sha1-EdCRMSI5648yyPJa6csAL/6NPCQ=" }, - "component-inherit": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", - "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=", - "dev": true - }, "compressible": { "version": "2.0.16", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.16.tgz", @@ -4973,14 +4768,6 @@ "dev": true, "requires": { "strip-bom": "^3.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - } } }, "define-properties": { @@ -5188,23 +4975,6 @@ "dom-matches": ">=1.0.1" } }, - "dom-converter": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", - "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", - "dev": true, - "requires": { - "utila": "~0.3" - }, - "dependencies": { - "utila": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", - "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", - "dev": true - } - } - }, "dom-matches": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dom-matches/-/dom-matches-2.0.0.tgz", @@ -5392,92 +5162,6 @@ "once": "^1.4.0" } }, - "engine.io": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.3.2.tgz", - "integrity": "sha512-AsaA9KG7cWPXWHp5FvHdDWY3AMWeZ8x+2pUVLcn71qE5AtAzgGbxuclOytygskw8XGmiQafTmnI9Bix3uihu2w==", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "base64id": "1.0.0", - "cookie": "0.3.1", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.0", - "ws": "~6.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ws": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz", - "integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - } - } - }, - "engine.io-client": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.3.2.tgz", - "integrity": "sha512-y0CPINnhMvPuwtqXfsGuWE8BB66+B6wTtCofQDRecMQPYX3MYUZXFNKDhdrSe3EVjgOu4V3rxdeqN/Tr91IgbQ==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.1", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "~6.1.0", - "xmlhttprequest-ssl": "~1.5.4", - "yeast": "0.1.2" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ws": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz", - "integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - } - } - }, - "engine.io-parser": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz", - "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", - "dev": true, - "requires": { - "after": "0.8.2", - "arraybuffer.slice": "~0.0.7", - "base64-arraybuffer": "0.1.5", - "blob": "0.0.5", - "has-binary2": "~1.0.2" - } - }, "enhanced-resolve": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", @@ -5679,9 +5363,9 @@ } }, "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "esrecurse": { @@ -5753,50 +5437,6 @@ "integrity": "sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg==", "dev": true }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", @@ -6268,12 +5908,6 @@ "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", "dev": true }, - "fp-ts": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.14.3.tgz", - "integrity": "sha512-tAnefu8QCuPaUaEywmhzpBWbRq2NRcailU5gtV2O09+xXVnJMBIyJi4qXy2fMlhMFsebDqUPpgoHpSErs94HTg==", - "dev": true - }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -6875,12 +6509,6 @@ "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", "dev": true }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -7031,12 +6659,12 @@ "dev": true }, "handlebars": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.0.tgz", - "integrity": "sha512-l2jRuU1NAWK6AW5qqcTATWQJvNPEwkM7NEKSiv/gqOsoSQbVoWyqVEY5GS+XPQ88zLNmqASRpzfdm8d79hJS+w==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", + "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", "dev": true, "requires": { - "async": "^2.5.0", + "neo-async": "^2.6.0", "optimist": "^0.6.1", "source-map": "^0.6.1", "uglify-js": "^3.1.4" @@ -7084,29 +6712,6 @@ "ansi-regex": "^2.0.0" } }, - "has-binary2": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", - "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", - "dev": true, - "requires": { - "isarray": "2.0.1" - }, - "dependencies": { - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - } - } - }, - "has-cors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", - "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=", - "dev": true - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -7171,12 +6776,6 @@ "minimalistic-assert": "^1.0.1" } }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", - "dev": true - }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -7258,50 +6857,6 @@ "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", "dev": true }, - "html-minifier": { - "version": "3.5.16", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.16.tgz", - "integrity": "sha512-zP5EfLSpiLRp0aAgud4CQXPQZm9kXwWjR/cF0PfdOj+jjWnOaCgeZcll4kYXSvIBPeUMmyaSc7mM4IDtA+kboA==", - "dev": true, - "requires": { - "camel-case": "3.0.x", - "clean-css": "4.1.x", - "commander": "2.15.x", - "he": "1.1.x", - "param-case": "2.1.x", - "relateurl": "0.2.x", - "uglify-js": "3.3.x" - } - }, - "html-webpack-plugin": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", - "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", - "dev": true, - "requires": { - "html-minifier": "^3.2.3", - "loader-utils": "^0.2.16", - "lodash": "^4.17.3", - "pretty-error": "^2.0.2", - "tapable": "^1.0.0", - "toposort": "^1.0.0", - "util.promisify": "1.0.0" - }, - "dependencies": { - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - } - } - }, "htmlparser2": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", @@ -7502,129 +7057,6 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, - "inspectpack": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/inspectpack/-/inspectpack-4.1.2.tgz", - "integrity": "sha512-bd0iIr5P2xRMtjQQkPnUYJSNa3mUFYER/2eQOPAoXrWBnZXMeFVAgRt/Dny8XVdSkkFoNKhumPjjV9QgTDcVxQ==", - "dev": true, - "requires": { - "chalk": "^2.4.0", - "io-ts": "^1.0.5", - "io-ts-reporters": "^0.0.20", - "pify": "^3.0.0", - "semver-compare": "^1.0.0", - "yargs": "^11.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "yargs": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", - "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" - } - }, - "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } - }, "internal-ip": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.2.0.tgz", @@ -7658,31 +7090,6 @@ "loose-envify": "^1.0.0" } }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "io-ts": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.8.2.tgz", - "integrity": "sha512-BvP7iC4bgum5e3Fh82xCUrKWt739osKjmQBMORGij2AOMfTmevj8SEqBhN8EeI0GEwIMHb2bXe4fuikN0lsTWg==", - "dev": true, - "requires": { - "fp-ts": "^1.0.0" - } - }, - "io-ts-reporters": { - "version": "0.0.20", - "resolved": "https://registry.npmjs.org/io-ts-reporters/-/io-ts-reporters-0.0.20.tgz", - "integrity": "sha512-ZGyPkto96U8exipqA915ZqxIJsaFLavgZIQOEgg4Pa8qgq1Hl9ZKBtN708ZXPzlAGR/jxofrD4QNT8SHowIDVA==", - "dev": true, - "requires": { - "fp-ts": "^1.0.1", - "io-ts": "^1.0.2" - } - }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -8044,36 +7451,45 @@ "dev": true }, "istanbul-api": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.1.tgz", - "integrity": "sha512-kVmYrehiwyeBAk/wE71tW6emzLiHGjYIiDrc8sfyty4F8M02/lrgXSm+R1kXysmF20zArvmZXjlE/mg24TVPJw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-2.1.5.tgz", + "integrity": "sha512-meYk1BwDp59Pfse1TvPrkKYgVqAufbdBLEVoqvu/hLLKSaQ054ZTksbNepyc223tMnWdm6AdK2URIJJRqdP87g==", "dev": true, "requires": { "async": "^2.6.1", "compare-versions": "^3.2.1", "fileset": "^2.0.3", - "istanbul-lib-coverage": "^2.0.3", - "istanbul-lib-hook": "^2.0.3", - "istanbul-lib-instrument": "^3.1.0", - "istanbul-lib-report": "^2.0.4", - "istanbul-lib-source-maps": "^3.0.2", - "istanbul-reports": "^2.1.1", - "js-yaml": "^3.12.0", - "make-dir": "^1.3.0", + "istanbul-lib-coverage": "^2.0.4", + "istanbul-lib-hook": "^2.0.6", + "istanbul-lib-instrument": "^3.2.0", + "istanbul-lib-report": "^2.0.7", + "istanbul-lib-source-maps": "^3.0.5", + "istanbul-reports": "^2.2.3", + "js-yaml": "^3.13.0", + "make-dir": "^2.1.0", "minimatch": "^3.0.4", "once": "^1.4.0" }, "dependencies": { - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-LXTBICkMARVgo579kWDm8SqfB6nvSDKNqIOBEjmJRnL04JvoMHCYGWaMddQnseJYtkEuEvO/sIcOxPLk9gERug==", "dev": true }, "istanbul-lib-instrument": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz", - "integrity": "sha512-ooVllVGT38HIk8MxDj/OIHXSYvH+1tq/Vb38s8ixt9GoJadXska4WkGY+0wkmtYCZNYtaARniH/DixUGGLZ0uA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.2.0.tgz", + "integrity": "sha512-06IM3xShbNW4NgZv5AP4QH0oHqf1/ivFo8eFys0ZjPXHGldHJQWb3riYOKXqmOqfxXBfxu4B+g/iuhOPZH0RJg==", "dev": true, "requires": { "@babel/generator": "^7.0.0", @@ -8081,19 +7497,73 @@ "@babel/template": "^7.0.0", "@babel/traverse": "^7.0.0", "@babel/types": "^7.0.0", - "istanbul-lib-coverage": "^2.0.3", - "semver": "^5.5.0" + "istanbul-lib-coverage": "^2.0.4", + "semver": "^6.0.0" + } + }, + "istanbul-lib-source-maps": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.5.tgz", + "integrity": "sha512-eDhZ7r6r1d1zQPVZehLc3D0K14vRba/eBYkz3rw16DLOrrTzve9RmnkcwrrkWVgO1FL3EK5knujVe5S8QHE9xw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.4", + "make-dir": "^2.1.0", + "rimraf": "^2.6.2", + "source-map": "^0.6.1" } }, - "js-yaml": { - "version": "3.12.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.2.tgz", - "integrity": "sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q==", + "istanbul-reports": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.3.tgz", + "integrity": "sha512-T6EbPuc8Cb620LWAYyZ4D8SSn06dY9i1+IgUX2lTH8gbwflMc9Obd33zHTyNX653ybjpamAHS9toKS3E6cGhTw==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "handlebars": "^4.1.0" } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + } + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "semver": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz", + "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -8104,9 +7574,9 @@ "dev": true }, "istanbul-lib-hook": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.3.tgz", - "integrity": "sha512-CLmEqwEhuCYtGcpNVJjLV1DQyVnIqavMLFHV/DP+np/g3qvdxu3gsPqYoJMXm15sN84xOlckFB3VNvRbf5yEgA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.6.tgz", + "integrity": "sha512-829DKONApZ7UCiPXcOYWSgkFXa4+vNYoNOt3F+4uDJLKL1OotAoVwvThoEj1i8jmOj7odbYcR3rnaHu+QroaXg==", "dev": true, "requires": { "append-transform": "^1.0.0" @@ -8128,16 +7598,44 @@ } }, "istanbul-lib-report": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.4.tgz", - "integrity": "sha512-sOiLZLAWpA0+3b5w5/dq0cjm2rrNdAfHWaGhmn7XEFW6X++IV9Ohn+pnELAl9K3rfpaeBfbmH9JU5sejacdLeA==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.7.tgz", + "integrity": "sha512-wLH6beJBFbRBLiTlMOBxmb85cnVM1Vyl36N48e4e/aTKSM3WbOx7zbVIH1SQ537fhhsPbX0/C5JB4qsmyRXXyA==", "dev": true, "requires": { - "istanbul-lib-coverage": "^2.0.3", - "make-dir": "^1.3.0", + "istanbul-lib-coverage": "^2.0.4", + "make-dir": "^2.1.0", "supports-color": "^6.0.0" }, "dependencies": { + "istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-LXTBICkMARVgo579kWDm8SqfB6nvSDKNqIOBEjmJRnL04JvoMHCYGWaMddQnseJYtkEuEvO/sIcOxPLk9gERug==", + "dev": true + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", @@ -8185,15 +7683,6 @@ } } }, - "istanbul-reports": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.1.1.tgz", - "integrity": "sha512-FzNahnidyEPBCI0HcufJoSEoKykesRlFcSzQqjH9x0+LC8tnnE/p/90PBLu8iZTxr8yYZNyTtiAujUqyN+CIxw==", - "dev": true, - "requires": { - "handlebars": "^4.1.0" - } - }, "jest": { "version": "24.3.1", "resolved": "https://registry.npmjs.org/jest/-/jest-24.3.1.tgz", @@ -10546,13 +10035,13 @@ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" }, "js-yaml": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz", - "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { "argparse": "^1.0.7", - "esprima": "^2.6.0" + "esprima": "^4.0.0" } }, "jsbn": { @@ -10687,15 +10176,6 @@ "integrity": "sha512-3h7B2WRT5LNXOtQiAaWonilegHcPSf9nLVXlSTci8lu1dZUuui61+EsPEZqSVxY7rXYmB2DVKMQILxaO5WL61Q==", "dev": true }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, "left-pad": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", @@ -10895,12 +10375,6 @@ "js-tokens": "^3.0.0" } }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", - "dev": true - }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -10989,15 +10463,6 @@ "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", "dev": true }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, "memory-fs": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", @@ -11200,17 +10665,6 @@ "integrity": "sha512-gFD2xGCl8YFgGHsqJ9NKRVdwlioeW3mI1iqfLNYQOv0+6JRwG58Zk9DIGQgyIaffSYaO1xsKnMaYzzNr1KyIAw==", "dev": true }, - "most": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/most/-/most-1.7.3.tgz", - "integrity": "sha512-mk68SM/ptK8WSo3l03raXcWy02Hl7jbzxVozMuvyYxohn4yteh2THhl3+XABF5cunWE8eXHAsLbv+RCJI5y+jg==", - "dev": true, - "requires": { - "@most/multicast": "^1.2.5", - "@most/prelude": "^1.4.0", - "symbol-observable": "^1.0.2" - } - }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -11329,27 +10783,12 @@ "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", "dev": true }, - "neo-blessed": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/neo-blessed/-/neo-blessed-0.2.0.tgz", - "integrity": "sha512-C2kC4K+G2QnNQFXUIxTQvqmrdSIzGTX1ZRKeDW6ChmvPRw8rTkTEJzbEQHiHy06d36PCl/yMOCjquCRV8SpSQw==", - "dev": true - }, "nice-try": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", "dev": true }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", - "dev": true, - "requires": { - "lower-case": "^1.1.1" - } - }, "node-fetch": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", @@ -11506,12 +10945,6 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, - "object-component": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", - "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", - "dev": true - }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", @@ -11759,17 +11192,6 @@ "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", "dev": true }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, "output-file-sync": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-2.0.1.tgz", @@ -11861,15 +11283,6 @@ "readable-stream": "^2.1.5" } }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, "parse-asn1": { "version": "5.1.4", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", @@ -11909,24 +11322,6 @@ "@types/node": "*" } }, - "parseqs": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", - "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseuri": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", - "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, "parseurl": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", @@ -12211,16 +11606,6 @@ "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.4.tgz", "integrity": "sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==" }, - "pretty-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", - "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", - "dev": true, - "requires": { - "renderkid": "^2.0.1", - "utila": "~0.4" - } - }, "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", @@ -12288,12 +11673,6 @@ "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", "dev": true }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, "psl": { "version": "1.1.28", "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.28.tgz", @@ -13160,93 +12539,12 @@ "safe-regex": "^1.1.0" } }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", - "dev": true - }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", "dev": true }, - "renderkid": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", - "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", - "dev": true, - "requires": { - "css-select": "^1.1.0", - "dom-converter": "~0.1", - "htmlparser2": "~3.3.0", - "strip-ansi": "^3.0.0", - "utila": "~0.3" - }, - "dependencies": { - "domhandler": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", - "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", - "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "htmlparser2": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", - "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", - "dev": true, - "requires": { - "domelementtype": "1", - "domhandler": "2.1", - "domutils": "1.1", - "readable-stream": "1.0" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "utila": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", - "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", - "dev": true - } - } - }, "repeat-element": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", @@ -13608,12 +12906,6 @@ "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true }, - "semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true - }, "send": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", @@ -13882,104 +13174,6 @@ } } }, - "socket.io": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.2.0.tgz", - "integrity": "sha512-wxXrIuZ8AILcn+f1B4ez4hJTPG24iNgxBBDaJfT6MsyOhVYiTXWexGoPkd87ktJG8kQEcL/NBvRi64+9k4Kc0w==", - "dev": true, - "requires": { - "debug": "~4.1.0", - "engine.io": "~3.3.1", - "has-binary2": "~1.0.2", - "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.2.0", - "socket.io-parser": "~3.3.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - } - } - }, - "socket.io-adapter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", - "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=", - "dev": true - }, - "socket.io-client": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.2.0.tgz", - "integrity": "sha512-56ZrkTDbdTLmBIyfFYesgOxsjcLnwAKoN4CiPyTVkMQj3zTUh0QAx3GbvIvLpFEOvQWu92yyWICxB0u7wkVbYA==", - "dev": true, - "requires": { - "backo2": "1.0.2", - "base64-arraybuffer": "0.1.5", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "engine.io-client": "~3.3.1", - "has-binary2": "~1.0.2", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "socket.io-parser": "~3.3.0", - "to-array": "0.1.4" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "socket.io-parser": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.0.tgz", - "integrity": "sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "isarray": "2.0.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "isarray": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", - "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", - "dev": true - } - } - }, "sockjs": { "version": "0.3.19", "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", @@ -14424,12 +13618,6 @@ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "dev": true - }, "symbol-tree": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", @@ -14555,24 +13743,12 @@ "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", "dev": true }, - "to-array": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", - "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=", - "dev": true - }, "to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", "dev": true }, - "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=", - "dev": true - }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -14620,12 +13796,6 @@ "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", "integrity": "sha1-bkWxJj8gF/oKzH2J14sVuL932jI=" }, - "toposort": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", - "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", - "dev": true - }, "tough-cookie": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.2.tgz", @@ -15031,6 +14201,7 @@ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.28.tgz", "integrity": "sha512-68Rc/aA6cswiaQ5SrE979UJcXX+ADA1z33/ZsPd+fbAiVdjZ16OXdbtGO+rJUUBgK6qdf3SOPhQf3K/ybF5Miw==", "dev": true, + "optional": true, "requires": { "commander": "~2.15.0", "source-map": "~0.6.1" @@ -15040,7 +14211,8 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "dev": true, + "optional": true } } }, @@ -15195,12 +14367,6 @@ "integrity": "sha512-D0yetkpIOKiZQquxjM2Syvy48Y1DbZ0SWxgsZiwd9GCWRpc75vN8ytzem14WDSg+oiX6+Qt31FpiS/ExODCrLg==", "dev": true }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", - "dev": true - }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -15278,12 +14444,6 @@ "object.getownpropertydescriptors": "^2.0.3" } }, - "utila": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", - "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", - "dev": true - }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", @@ -15583,23 +14743,6 @@ } } }, - "webpack-dashboard": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/webpack-dashboard/-/webpack-dashboard-3.0.0.tgz", - "integrity": "sha512-OtqccZJLR9CPbn86p6iwXWrseh944AkNj0AzrNvC7j4x+yHjmX1dlDpyo1f35GwY6F9eBWpMffUoGeWrFjLNUA==", - "dev": true, - "requires": { - "commander": "^2.15.1", - "cross-spawn": "^6.0.5", - "filesize": "^3.6.1", - "handlebars": "^4.0.11", - "inspectpack": "^4.0.0", - "most": "^1.7.3", - "neo-blessed": "^0.2.0", - "socket.io": "^2.1.1", - "socket.io-client": "^2.1.1" - } - }, "webpack-dev-middleware": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.6.1.tgz", @@ -15995,12 +15138,6 @@ "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, - "xmlhttprequest-ssl": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", - "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", - "dev": true - }, "xregexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz", @@ -16190,12 +15327,6 @@ "decamelize": "^1.2.0" } }, - "yeast": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", - "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=", - "dev": true - }, "yn": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", diff --git a/package.json b/package.json index 0c0c9ff..fbdc948 100644 --- a/package.json +++ b/package.json @@ -17,25 +17,18 @@ "TS_NODE_PROJECT": "config/webpack.tsconfig.json" }, "scripts": { - "start": "npm run start-sfdc", - "start-local": "npm run dev-server -- --open --env.local", - "start-sfdc": "npm run dev-server -- --https --cert ./config/cert/server.crt --key ./config/cert/server.key", + "start": "npm run setup-ts-webpack -- webpack-dev-server --config config/webpack.config.ts --hot --https", "setup-ts-webpack": "cross-env TS_NODE_PROJECT=$npm_package_config_TS_NODE_PROJECT", - "dev-server": "npm run setup-ts-webpack -- webpack-dev-server --config config/webpack.config.ts --hot", - "create-dev-crt": "openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes -keyout ./config/cert/server.key -out ./config/cert/server.crt -extensions san -config ./config/cert/dev.conf", - "cors-enable": "sfdx force:mdapi:deploy -d ./config/sfdc-cors-enable -w 10000", - "cors-disable": "sfdx force:mdapi:deploy -d ./config/sfdc-cors-disable -w 10000", "clean": "rimraf dist", "compile": "npm run clean && npm run setup-ts-webpack -- webpack --config config/webpack.config.ts --env.build --env.resource $npm_package_config_resource", "compile-dev": "npm run compile", "compile-prod": "npm run compile", "analyze-bundle": "npm run clean && npm run setup-ts-webpack -- webpack --config config/webpack.config.ts --env.build --env.analyze", "new-scratch-org": "sfdx force:org:create -f config/project-scratch-def.json -a $npm_config_scratch_alias", - "make-scratch-default": "sfdx force:config:set defaultusername=$npm_config_scratch_alias", - "make-dev-default": "sfdx force:config:set defaultusername=$npm_config_dev_alias", - "make-prod-default": "sfdx force:config:set defaultusername=$npm_config_prod_alias", "bundle-app-dev": "npm run compile-dev && npm run copy-bundle", "bundle-app-prod": "npm run compile-prod && npm run copy-bundle", + "zip-bundle": "zip -r ./force-app/main/default/staticresources/app.zip ./dist", + "copy-resource-meta": "cp ./config/build-assets/temp.resource-meta.xml ./force-app/main/default/staticresources/$npm_package_config_resource.resource-meta.xml", "copy-bundle": "rimraf ./force-app/main/default/staticresources/* || true && npm run zip-bundle && mv ./force-app/main/default/staticresources/app.zip ./force-app/main/default/staticresources/$npm_package_config_resource.resource && npm run copy-resource-meta", "package-sfdc": "sfdx force:source:convert -d ./dist/sfdc-package", "build-dev": "npm run bundle-app-dev && npm run package-sfdc", @@ -47,7 +40,7 @@ "deploy-scratch": "npm run build-dev && npm run push-scratch", "deploy-prod": "npm run build-prod && npm run push-prod", "generate-ts-force": "ts-force-gen -j ./config/ts-force-config.json", - "test": "jest --no-cache --config jest.json", + "test": "jest --no-cache --config ./config/jest.json", "test:update": "jest --no-cache --config jest.json -u", "reinstall": "rimraf node_modules && npm install" }, @@ -81,13 +74,11 @@ "babel-jest": "^24.3.1", "babel-loader": "^8.0.5", "babel-plugin-import": "^1.11.0", - "babel-preset-react": "^6.24.1", "cross-env": "^5.2.0", "css-loader": "^2.1.1", "enzyme": "^3.9.0", "enzyme-adapter-react-16": "^1.10.0", "file-loader": "^3.0.1", - "html-webpack-plugin": "^3.2.0", "jest": "^24.3.1", "less": "^3.9.0", "less-loader": "^4.1.0", @@ -106,7 +97,6 @@ "webpack": "^4.29.6", "webpack-bundle-analyzer": "^3.1.0", "webpack-cli": "^3.2.3", - "webpack-dashboard": "^3.0.0", "webpack-dev-server": "^3.2.1" } } diff --git a/src/app.tsx b/src/app.tsx index 81a66c6..a1e122f 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -37,7 +37,7 @@ class App extends React.Component<{}, AppState> { }; }); if (accs.length > 0) { - this.setState({acc: accs[0]}); + this.setState({ acc: accs[0] }); } } @@ -59,7 +59,7 @@ class App extends React.Component<{}, AppState> { this.setState({drawerVisible: false})} title='An Account' width={600} > @@ -67,13 +67,13 @@ class App extends React.Component<{}, AppState> {
- +
); } private renderDrawerContent = () => { - const {acc} = this.state; + const { acc } = this.state; const contactsList = acc.contacts.map((c) => { return ( diff --git a/src/styles/ant-theme-vars.less b/src/styles/ant-theme-vars.less index 7815e60..19b3688 100644 --- a/src/styles/ant-theme-vars.less +++ b/src/styles/ant-theme-vars.less @@ -1,6 +1,7 @@ // ant-default-vars.less // Available theme variables can be found in // https://github.com/ant-design/ant-design/blob/master/components/style/themes/default.less +// NOTE: Changes here will ONLY update when webpack is run (no incremental updates) @primary-color: #38a3c8; @heading-color: fade(#38a3c8, 85%); diff --git a/tslint.json b/tslint.json index 0ca24f2..877ee20 100644 --- a/tslint.json +++ b/tslint.json @@ -4,22 +4,32 @@ "tslint-react" ], "rules": { - "ter-indent": [ - 4, + "ter-indent": [ + 2, { "SwitchCase": 1 } ], "jsdoc-format": false, "no-trailing-whitespace": false, - "semicolon": [true, "always"], - "no-submodule-imports": [false], - "interface-name": [false], + "semicolon": [ + true, + "always" + ], + "no-submodule-imports": [ + false + ], + "interface-name": [ + false + ], "prefer-object-spread": false, "object-literal-sort-keys": false, - "quotemark": [true, "single"], + "quotemark": [ + true, + "single" + ], "ordered-imports": false, - "jsx-no-lambda": true, //https://stackoverflow.com/questions/36677733/why-shouldnt-jsx-props-use-arrow-functions-or-bind + "jsx-no-lambda": false, "member-ordering": false, "no-implicit-dependencies": false, "no-var-requires": false From 5b1a86cf39fbce61543207541faab1dd39e8508e Mon Sep 17 00:00:00 2001 From: Charles Jonas Date: Wed, 17 Apr 2019 21:55:00 -0600 Subject: [PATCH 3/3] fixed debugging --- .vscode/launch.json | 9 +++++++-- README.md | 14 +++++++++++--- config/webpack.config.ts | 2 +- src/app.tsx | 13 ------------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index a7c7694..b7fd77b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,15 +9,20 @@ "type": "chrome", "request": "launch", "sourceMaps": true, - "url": "http://localhost:8080", + "url": "https://c.na73.visual.force.com/apex/app?local=1", "webRoot": "${workspaceRoot}", "internalConsoleOptions": "openOnSessionStart", "skipFiles": [ "node_modules/**" ], + "runtimeArgs": [ + "--remote-debugging-port=9222", //Open in port 9222 (standard chrome debug port) + "--allow-insecure-localhost=1" + ], "sourceMapPathOverrides": { "webpack:///*": "${webRoot}/*" - } + }, + "smartStep": true } ] } diff --git a/README.md b/README.md index 37cde18..563465a 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,16 @@ Unfortunately the port isn't currently managed from a single point and must be u 1. in `package.json`, under the `config` section, update `PORT` constant 2. in `/force-app/main/default/pages/App.Page`, update the "Local Asset" panel: `https://localhost:XXXX/app.js` +### vscode Chrome Debugger + +It is possible to debug right from vscode. To do so: + +1. install [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) +2. update `.vscode/launch.json` -> `url` to reference the url you want to debug +3. `npm start` +4. `f5` or launch `debug locally` configuration +5. you may need to Enable [Allow Insecure Localhost](chrome://flags/#allow-insecure-localhost) again if it opens in a different instance of chrome + ## OTHER USEFUL STUFF ### vscode @@ -152,12 +162,10 @@ Highly recommend using vscode (typescript code completion, in editor terminal, e plugins: -* [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome): Allows debugging in vscode +* * [Editor Config](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig): auto-set formatting options for everyone * [TSlint](https://marketplace.visualstudio.com/items?itemName=eg2.tslint): green squigglies everywhere! * [Salesforce Extensions for VS Code](https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode): gives your code completion on your `force-app` and ability to excute commands against the CLI -* [Auto Close Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag) -* [Typescript Hero](https://marketplace.visualstudio.com/items?itemName=rbbit.typescript-hero): auto-imports, etc * [Jest](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest): run tests on save ### helpful linkies diff --git a/config/webpack.config.ts b/config/webpack.config.ts index 931d18c..0733ff4 100644 --- a/config/webpack.config.ts +++ b/config/webpack.config.ts @@ -48,7 +48,7 @@ module.exports = (env: any = {}) => { const config: webpack.Configuration = { mode, cache: true, - devtool: isBuild ? 'source-map' : 'eval-source-map', + devtool: isBuild ? 'source-map' : 'source-map', devServer, context: PATHS.root, entry: { diff --git a/src/app.tsx b/src/app.tsx index a1e122f..b75b12a 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -39,19 +39,6 @@ class App extends React.Component<{}, AppState> { if (accs.length > 0) { this.setState({ acc: accs[0] }); } - - } - - private showDrawer = () => { - this.setState({ - drawerVisible: true, - }); - } - - private hideDrawer = () => { - this.setState({ - drawerVisible: false, - }); } public render() {