diff --git a/.github/workflows/github-page.yml b/.github/workflows/github-page.yml new file mode 100644 index 0000000..afdc8d2 --- /dev/null +++ b/.github/workflows/github-page.yml @@ -0,0 +1,37 @@ +name: Deploy Github Pages + +on: + push: + branches: + - master + paths: + - 'docs/**' +jobs: + page-deploy: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x] + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Install + run: | + npm ci + env: + CI: true + - name: Build Document + run: | + npm run build:docs + - name: Deploy to GitHub Pages + if: success() + uses: crazy-max/ghaction-github-pages@v2 + with: + target_branch: gh-pages + build_dir: docs/.vitepress/dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index be7ac8e..e45658b 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ This repository contains the starter template for using vue-next with the latest *I started to learn electron & vue by the great project [electron-vue](https://github.com/SimulatedGREG/electron-vue). This project is also inspired from it.* +You can see the document here. + ## Features - Electron 10 @@ -39,14 +41,10 @@ This repository contains the starter template for using vue-next with the latest Clone or fork this project to start. Once you have your project, and in the project folder: -```sh +```shell # Install dependencies with linter npm install -# OR install dependencies without eslint -npm install --no-optional -``` -```sh # Will start vite server, rollup devserver, and electron to dev! npm run dev @@ -60,107 +58,3 @@ npm run build:dir npm run build:production ``` - -### Using NodeJS in Renderer - -Due to the project is following the [security](https://www.electronjs.org/docs/tutorial/security) guideline. It does not allow the renderer to access node by default. You should use [Service](/src/main/services/Service.ts) to encapsulate your nodejs operation and use the hook `useService('NameOfService')` to use in renderer side. - -### Config Your Project and Build - -Once you install your project, you should change the package base info in [package.json](/package.json), -and also the build information in [/scripts/build.base.config.js](/scripts/build.base.config.js) - -#### assets, static resources, build resources... what's the difference? - -The assets is only used by the renderer process (in-browser display), like picture or font. They are **bundled by vite/rollup**. You can directly `import` them in `.vue/.ts` files under renderer directory. The default assets are in [/src/renderer/assets](src/renderer/assets) - -The static resources are the static files which main process wants to access (like read file content) in **runtime vie file system**. They might be the tray icon file, browser window icon file. The static folder is at [/static](static). - -The build resources are used by `electron-builder` to build the installer. They can be your program icon of installer, or installer script. Default build icons are under [/build/icons](build/icons). - -*Notice that your program icon can show up in multiple place! Don't mixup them!* -- *In build icons, of course you want your program has correct icon.* -- *In static directory, sometime you want your program has **tray** which require icon in static directory.* -- *In assets, sometime you want to display your program icon inside a page. You need to place them in the assets!* - -### Debug In VSCode - -This is really simple. In vscode debug section, you will see three profiles: - -1. Electron: Main (attach) -2. Electron: Renderer (attach) -3. Electron: Main & Renderer (attach) - -The name should be clear. The first one attach to main and the second one attach to renderer (required vscode chrome debug extension). -The third one is run the 1 and 2 at the same time. - -You should first run `npm run dev` and start debugging by the vscode debug. - -### Adding New Dependencies - -If you adding new dependenceis, make sure if it using nodejs module, add it as `exclude` in the [/scripts/vite.config.js](/scripts/vite.config.js). Otherwise, the vite will complain about "I cannot optimize it!". - -The raw javascript dependencies are okay for vite. - -#### Native Dependencies - -If you want to use the native dependencies, not only you should adding it to vite `exclude`, you should also take care about the electron-builder config. - -For example, [7zip-min](https://github.com/onikienko/7zip-min): - -Since it using the `7zip-bin` which carry binary for multiple platform, we need to correctly include them in config. -Modify the electron-builder build script [/scripts/build.base.config.js](/scripts/build.base.config.js) - -```js - files: [ - "dist/electron/**/*", - "!**/node_modules/**/*", - "node_modules/7zip-bin/**/*" - ], - asarUnpack: [ - "node_modules/7zip-bin/**/*" - ], -``` - -Add them to `files` and `asarUnpack` to ensure the electron builder correctly pack & unpack them. - -To optimize for multi-platform, you should also exclude them from `files` of each platform config [/scripts/build.config.js](/scripts/build.config.js) - -```js - mac: { - // ... other mac configs - files: [ - "node_modules/7zip-bin/**/*", - "!node_modules/7zip-bin/linux/**", - "!node_modules/7zip-bin/win/**" - ] - }, - win: { - // ... other win configs - files: [ - "node_modules/7zip-bin/**/*", - "!node_modules/7zip-bin/linux/**", - "!node_modules/7zip-bin/mac/**" - ] - }, - linux: { - // ... other linux configs - files: [ - "node_modules/7zip-bin/**/*", - "!node_modules/7zip-bin/win/**", - "!node_modules/7zip-bin/mac/**" - ] - }, -``` - -### Release Process - -The out-of-box github action will validate each your PR by eslint and run `npm run build`. It will not trigger electron-builder to build production assets. - -For each push in master branch, it will build production assets for win/mac/linux platform and upload it as github action assets. It will also create a **pull request** to asking you to bump version and update the changelog. - -It using the conventional-commit. If you want to auto-generate the changelog, you should follow the [conventional commit guideline](https://www.conventionalcommits.org/en/v1.0.0). - -If the **bump version PR** is approved and merged to master, it will auto build and release to github release. - -**If you want to disable this github action release process, just remove the [/.github/workflows/build.yml](/.github/workflows/build.yml) file.** diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js new file mode 100644 index 0000000..aa1dff9 --- /dev/null +++ b/docs/.vitepress/config.js @@ -0,0 +1,79 @@ +function getRouterConfig(langPrefix = '/') { + return [ + { + text: langPrefix === '/' ? 'Getting started' : '快速上手', + link: `${langPrefix}`, + }, + ]; +} + +/** + * @type {import('vitepress').DefaultTheme.Config} + */ +const themeConfig = { + search: { + searchMaxSuggestions: 10, + }, + // nav: [{ + // text: 'Language', + // items: [{ + // text: '中文', + // link: '/zh/index', + // target: '/zh/index' + // }, { + // text: 'English', + // link: '/' + // }] + // }], + // sidebar: { '/': 'auto', '/zh/': 'auto' }, + sidebar: 'auto', + repo: 'ci010/vue-electron-next', + docsDir: 'docs', + repoLabel: 'Github', + lastUpdated: true, + prevLink: true, + nextLink: true, + locales: { + '/': { + lang: 'en-US', + title: 'vue-electron-next', + description: 'vue hooks', + label: 'English', + selectText: 'Languages', + }, + '/zh/': { + lang: 'zh-CN', + title: 'vue-electron-next', + description: 'vue hooks', + label: '中文', + selectText: '语言', + }, + }, +} + +/** + * @type {import('vitepress').UserConfig} + */ +const config = { + lang: 'en-US', + themeConfig, + title: 'Electron Vue Next', + locales: { + '/': { + lang: 'en-US', + title: 'vue-electron-next', + description: 'vue hooks', + label: 'English', + selectText: 'Languages', + }, + '/zh/': { + lang: 'zh-CN', + title: 'vue-electron-next', + description: 'vue hooks', + label: '中文', + selectText: '语言', + }, + }, +} + +module.exports = config; diff --git a/docs/.vitepress/theme/index.css b/docs/.vitepress/theme/index.css new file mode 100644 index 0000000..fab125c --- /dev/null +++ b/docs/.vitepress/theme/index.css @@ -0,0 +1,3 @@ +.theme.no-sidebar aside { + display: block; +} \ No newline at end of file diff --git a/docs/.vitepress/theme/index.js b/docs/.vitepress/theme/index.js new file mode 100644 index 0000000..284b475 --- /dev/null +++ b/docs/.vitepress/theme/index.js @@ -0,0 +1,4 @@ +import index from 'vitepress/dist/client/theme-default/index' +import './index.css' + +export default index \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..420a70e --- /dev/null +++ b/docs/index.md @@ -0,0 +1,516 @@ +# electron-vue-next + +This repository contains the starter template for using vue-next with the latest electron. + +*I started to learn electron & vue by the great project [electron-vue](https://github.com/SimulatedGREG/electron-vue). This project is also inspired from it.* + +## Features + +- Electron 10 + - Follow the [security](https://www.electronjs.org/docs/tutorial/security) guide of electron, make renderer process a browser only environment + - Using [electron-builder](https://github.com/electron-userland/electron-builder) to build +- Empower [vue-next](https://github.com/vuejs/vue-next) and its eco-system + - Using [vite](https://github.com/vitejs/vite) which means develop renderer process can be blazingly fast! + - Using [vuex 4.0](https://github.com/vuejs/vuex/tree/4.0) with strong type state, getters, and commit + - Using [vue-router-next](https://github.com/vuejs/vue-router-next) +- Using [eslint](https://www.npmjs.com/package/eslint) with Javascript Standard by default +- Built-in TypeScript Support + - Using [esbuild](https://github.com/evanw/esbuild) in [rollup](https://github.com/rollup/rollup) (align with vite) to build main process typescript code +- Github Action with Github Release is out-of-box + - Auto bump version in package.json and generate CHANGELOG.md if you follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0) + - Detail how this work described in [Release Process](#release-process) section +- Integrate VSCode well + - Support debug .ts/.vue files in main/renderer process by vscode debugger + - Detail see [Debug](#debugging) section + +## Quick Start + +Clone or fork this project to start. +Once you have your project, and in the project folder: + +```shell +# Install dependencies +npm install + +# Will start vite server, rollup devserver, and electron to dev! +npm run dev + +# OPTIONAL. Will compile the main and renderer process to javascript and display output size +npm run build + +# OPTIONAL. Will compile all and output an unpacked electron app. You can directly +npm run build:dir + +# Will compile all and build all products and ready to release +npm run build:production + +``` + +### Config Your Project and Build + +Once you install your project, you should change the package base info in [package.json](/package.json), +and also the build information in [build.base.config.js](/scripts/build.base.config.js). + +## Project Structure + +### File Tree + +Your workspace should looks like + +``` +your-project +├─ scripts all dev scripts, build script directory +├─ build build resource and output directory +│ └─ icons/ build icon directory +├─ dist +│ └─ electron/ compiled output directory +├─ src +│ ├─ main +│ │ ├─ dialog.ts the ipc handler to support dialog API from renderer process +│ │ ├─ global.ts typescript global definition +│ │ ├─ index.dev.ts the development rollup entry +│ │ ├─ index.prod.ts the production rollup entry +│ │ ├─ index.ts real electron start-up entry file +│ │ ├─ logger.ts a simple logger implementation +│ │ └─ staticStore.ts +│ ├─ renderer +│ │ ├─ components/ assets directoy +│ │ ├─ components/ all components +│ │ ├─ router.ts vue-router initializer +│ │ ├─ store.ts vuex store initializer +│ │ ├─ App.vue entry vue file imported by index.ts +│ │ ├─ index.css entry css file for vite +│ │ ├─ index.html entry html file for vite +│ │ └─ index.ts entry script file for vite +│ └─ shared shared folder can be access from both main and renderer side +│ ├─ store/ vuex store definition +│ └─ sharedLib.ts an example file that can be access from both side +├─ static/ static resource directory +├─ .eslintrc.js +├─ .gitignore +├─ package.json +└─ README.md +``` + +#### assets, static resources, build resources... what's the difference? + +The assets is only used by the renderer process (in-browser display), like picture or font. They are **bundled by vite/rollup**. You can directly `import` them in `.vue/.ts` files under renderer directory. The default assets are in [renderer/renderer/assets](src/renderer/assets) + +The static resources are the static files which main process wants to access (like read file content) in **runtime vie file system**. They might be the tray icon file, browser window icon file. The static folder is at [static](static). + +The build resources are used by `electron-builder` to build the installer. They can be your program icon of installer, or installer script. Default build icons are under [build/icons](build/icons). + +*Notice that your program icon can show up in multiple place! Don't mixup them!* +- *In build icons, of course you want your program has correct icon.* +- *In static directory, sometime you want your program has **tray** which require icon in static directory.* +- *In assets, sometime you want to display your program icon inside a page. You need to place them in the assets!* + +### Main and Renderer Processes + +Quote from electron official document about [main and renderer processes](https://www.electronjs.org/docs/tutorial/quick-start#main-and-renderer-processes). The main process is about + +> - The Main process creates web pages by creating BrowserWindow instances. Each BrowserWindow instance runs the web page in its Renderer process. When a BrowserWindow instance is destroyed, the corresponding Renderer process gets terminated as well. +> - The Main process manages all web pages and their corresponding Renderer processes. + +And the renderer process is about + +> - The Renderer process manages only the corresponding web page. A crash in one Renderer process does not affect other Renderer processes. +> - The Renderer process communicates with the Main process via IPC to perform GUI operations in a web page. Calling native GUI-related APIs from the Renderer process directly is restricted due to security concerns and potential resource leakage. + +Commonly, the main process is about your core business logic, and renderer side act as a data consumer to render the UI. + +Following the [security](https://www.electronjs.org/docs/tutorial/security) guideline of electron, in this boilerplate, the renderer process [**does not** have access to nodejs module by default](https://www.electronjs.org/docs/tutorial/security#2-do-not-enable-nodejs-integration-for-remote-content). The electron provide the `preload` options in `webPreferences`. In this boilerplate, I suggest you to wrap your core logic into `Service`. + +The `Service` is a type of class defined under the `src/main/services`. All the public method can be access by the renderer process. +It's the bridge between the main and renderer. You can look at [Service](#service) for the detail. + +### NPM Scripts + +#### `npm run dev` + +Start the vite dev server hosting the renderer webpage with hot reloading. +Start the rollup server hosting the main process script. It will auto reload the electron app if you modify the source files. + +#### `npm run build` + +Compile both `main` and `renderer` process code to production, located at `dist/electron` + +#### `npm run build:production` + +It will compile both processes, and then run `electron-builder` to build your app into executable installer or zip. The build config is defined in [scripts/build.base.config.js](scripts/build.base.config.js). + +#### `npm run build:dir` + +It will compile both processes, and it will run `electron-builder` to build only the directoy version of the production electron app, which for example, for windows x64, it's located at `build/win-unpacked`. + +This will much faster than `npm run build:production`. So you can use it to quick testing the production app. + +#### `npm run lint` + +Run eslint to report eslint error. + +#### `npm run lint:fix` + +Run eslint to fix and report eslint error. + +## Development + +Due to the project is following the [security](https://www.electronjs.org/docs/tutorial/security) guideline. It does not allow the renderer to access node by default. The [Service](#service) is a simple solution to isolate renderer logic and the vulnerable logic with full nodejs module access. See [this](#option-using-node-modules-in-renderer-process) section if you want to directly use node modules in renderer process. + +### Service + +A Service lives in a class in `src/main/services`. It should contain some of your core logic with file or network access in main process. It exposes these logic to renderer process. You call the hook `useService('NameOfService')` to use it in renderer side. + +The concept of service is totally optional. This is a design for security. ***If you think this is redundent and not fit with your program design, you can just remove it.*** + +#### Create a new Service + +Add a file to the `/src/main/services` named `BarService.ts` + +```ts +export default class BarService extends Service { + async doSomeCoreLogic() { + // perform some file system or network work here + } +} +``` + +And you need to add it to the `interface Services` in `src/main/services/index.ts`. + +```ts +import { BarService } from './BarService' + +export interface Services { + // ... other existed services + BarService: BarService +} +``` + +Then, add it to the `initializeServices` in `src/main/index.ts` + +```ts +async function initializeServices(logger: Logger) { + initialize({ + // ...other services + BarService: new BarService(logger) + }) +} +``` + +And this is ready to be used in renderer process by `useService('BarService')`. See [Using Service in Renderer](#using-service-in-renderer). + +##### Using Other Service in a Service + +If you need to use other `Service`, like `FooService`. You need to `@Inject` decorator to inject during runtime. + +```ts +export default class BarService extends Service { + @Inject('FooService') + private fooService: FooService + + async doSomeCoreLogic() { + const result = await fooService.foo() + // perform some file system or network operations here + } +} +``` + +#### Using Service in Renderer + +You can directly access all the async methods in a service class by `useService('nameOfService')` + +Here is an example in [About.vue](), using the `BaseService`. + +```vue + + + +``` + +#### Remove Service Infra + +If you don't like Service design, you just easily remove it by + +1. Remove the whole `src/main/services` directory +2. Remove the import line `import { initialize } from './services'` and initialization line `initialize(logger)` in `src/main/index.ts` + +### Hooks or Composable in Renderer Process + +One great feature of vue 3 is the [composition-api](https://composition-api.vuejs.org/). You can write up some basic piece of logic and compose them up during the setup functions. Currently, these `hooks` are placed in `/src/renderer/hooks` by default. + +Take the example from vue composition api site, you have such code in `/src/renderer/hooks/mouse.ts` + +```ts +import { ref, onMounted, onUnmounted } from 'vue' + +export function useMousePosition() { + const x = ref(0) + const y = ref(0) + + function update(e) { + x.value = e.pageX + y.value = e.pageY + } + + onMounted(() => { + window.addEventListener('mousemove', update) + }) + + onUnmounted(() => { + window.removeEventListener('mousemove', update) + }) + + return { x, y } +} +``` + +You'd better to export this `mouse.ts` to `/src/renderer/hooks/index.ts` + +```ts +// other exports... + +export * from './mouse.ts' +``` + +Then in the `vue` file you can import all hooks by the alias path + +```vue + + +``` + +### Electron API in Renderer Process + +The boilplate exposes several electron APIs by default. You can access them by `useShell`, `useClipboard`, `useIpc` and `useDialog`. +*These are provided by `static/preload.js` script. If you remove the preload during the creation of this BrowserWindow, this won't work.* + +```ts +import { defineComponent } from 'vue' +import { useShell } from '/@/hooks' + +export default defineComponent({ + setup() { + const shell = useShell() // this is equivalence to the import { shell } from 'electron' normally + // the shell object type definition works normally + } +}) +``` + +The only exception is the `useDialog`. You can only use `async` functions in it as the API call goes through IPC and it must be `async`. + +### Dependencies Management + +If you adding a new dependency, make sure if it's using any **nodejs** module, add it as `excludeOptimize` in the `package.json`. Otherwise, the vite will complain about "I cannot handle it!". + +```json +{ + // ...other package.json content + "dependencies": { + // ...other dependencies + "a-nodejs-package": "" + }, + "excludeOptimize": [ + // ...other existed excluded packages + "a-nodejs-package" // your new package + ], + // ...rest of package.json +} +``` + +The raw javascript dependencies are okay for vite. + +#### Native Dependencies + +If you want to use the native dependencies, which need to compile when install. Usually, you need [node-gyp](https://github.com/nodejs/node-gyp) to build, the `electron-builder` will rebuild it upon your electron for you. Normally you don't need to worry much. Notice that if you are in Windows, you might want to install [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) to install the compile toolchain. + +#### Dependencies Contains Compiled Binary + +If you want to use the dependencies containing the compiled binary, not only you should adding it to vite `exclude`, you should also take care about the electron-builder config. See the [Build](#build-exclude-files) section for detail. The development process won't affect much by it. + +### Debugging + +This is really simple. In vscode debug section, you will see three profiles: + +1. Electron: Main (attach) +2. Electron: Renderer (attach) +3. Electron: Main & Renderer (attach) + + +```json +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Electron: Main (attach)", + "type": "node", + "request": "attach", + "cwd": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/dist/**/*.js" + ], + "smartStep": true, + "sourceMaps": true, + "protocol": "inspector", + "port": 5858, + "timeout": 20000 + }, + { + "name": "Electron: Renderer (attach)", + "type": "chrome", + "request": "attach", + "port": 9222, + "webRoot": "${workspaceFolder}", + "timeout": 15000 + }, + ], + "compounds": [ + { + "name": "Electron: Main & Renderer (attach)", + "configurations": ["Electron: Main (attach)", "Electron: Renderer (attach)"] + } + ] +} +``` + +The name should be clear. The first one attach to main and the second one attach to renderer (required vscode chrome debug extension). +The third one is run the 1 and 2 at the same time. + +You should first run `npm run dev` and start debugging by the vscode debug. + +### Option: Using Node Modules in Renderer Process + +By default, the renderer process environment is just a raw front-end environment. You cannot use any nodejs module here. (Use service alternative) + +If you just want to use node modules in electron renderer/browser side anyway, you can just enable the `nodeIntegration` in BrowserWindow creation. + +For example, you can enable the main window node integration like this: + +```ts +const mainWindow = new BrowserWindow({ + height: 600, + width: 800, + webPreferences: { + preload: join(__static, 'preload.js'), + nodeIntegration: true // adding this to enable the node integration + } +}) +``` + +## Build + +The project build is based on [electron-builder](https://github.com/electron-userland/electron-builder). The config file is majorly in [scripts/build.base.config.js](../scripts/build.base.config.js). And you can refer the electron-builder [document](https://www.electron.build/). + +### Compile Process + +The project will compile typescript/vue source code by rollup into javascript production code. The rollup config for main process is in [rollup.config.js](https://github.com/ci010/electron-vue-next/tree/master/scripts/rollup.config.js). It will output the production code to `dist/electron/index.prod.js`. + +The config to compile renderer process is in [vite.config.js](https://github.com/ci010/electron-vue-next/tree/master/scripts/vite.config.js). It will compile the production code into `dist/electron/renderer/*`. + +### Build Exclude Files + +Normally, once you correctly config the `dependencies` in [Development](#development) section, you should not worry to much about the build. But some dependencies contains compiled binary. You might want to exclude them out of the unrelated OS builds. + +For example, [7zip-min](https://github.com/onikienko/7zip-min): + +Since it using the `7zip-bin` which carry binary for multiple platform, we need to correctly include them in config. +Modify the electron-builder build script `build.base.config.js` + +```js + files: [ + "dist/electron/**/*", + "!**/node_modules/**/*", + "node_modules/7zip-bin/**/*" + ], + asarUnpack: [ + "node_modules/7zip-bin/**/*" + ], +``` + +Add them to `files` and `asarUnpack` to ensure the electron builder correctly pack & unpack them. + +To optimize for multi-platform, you should also exclude them from `files` of each platform config `build.config.js` + +```js + mac: { + // ... other mac configs + files: [ + "node_modules/7zip-bin/**/*", + "!node_modules/7zip-bin/linux/**", + "!node_modules/7zip-bin/win/**" + ] + }, + win: { + // ... other win configs + files: [ + "node_modules/7zip-bin/**/*", + "!node_modules/7zip-bin/linux/**", + "!node_modules/7zip-bin/mac/**" + ] + }, + linux: { + // ... other linux configs + files: [ + "node_modules/7zip-bin/**/*", + "!node_modules/7zip-bin/win/**", + "!node_modules/7zip-bin/mac/**" + ] + }, +``` + +## Release + +The out-of-box github action will validate each your PR by eslint and run `npm run build`. It will not trigger electron-builder to build production assets. + +For each push in master branch, it will build production assets for win/mac/linux platform and upload it as github action assets. It will also create a **pull request** to asking you to bump version and update the changelog. + +It using the conventional-commit. If you want to auto-generate the changelog, you should follow the [conventional commit guideline](https://www.conventionalcommits.org/en/v1.0.0). + +If the **bump version PR** is approved and merged to master, it will auto build and release to github release. + +**If you want to disable this github action release process, just remove the [.github/workflows/build.yml](/.github/workflows/build.yml) file.** + +### AutoUpdate Support + +This boilerplate include the [electron-updater](https://github.com/electron-userland/electron-builder/tree/master/packages/electron-updater) as dependencies by default. You can follow the [electron-builder](https://github.com/electron-userland/electron-builder) guideline to implement the autoUpdate process. diff --git a/docs/zh/index.md b/docs/zh/index.md new file mode 100644 index 0000000..99ea1d6 --- /dev/null +++ b/docs/zh/index.md @@ -0,0 +1,525 @@ +# electron-vue-next + +***中文版文档还正在路上……欢迎来贡献中文版文档~*** + +This repository contains the starter template for using vue-next with the latest electron. + +*I started to learn electron & vue by the great project [electron-vue](https://github.com/SimulatedGREG/electron-vue). This project is also inspired from it.* + +## 特性清单 + +- Electron 10 + - Follow the [security](https://www.electronjs.org/docs/tutorial/security) guide of electron, make renderer process a browser only environment + - Using [electron-builder](https://github.com/electron-userland/electron-builder) to build +- Empower [vue-next](https://github.com/vuejs/vue-next) and its eco-system + - Using [vite](https://github.com/vitejs/vite) which means develop renderer process can be blazingly fast! + - Using [vuex 4.0](https://github.com/vuejs/vuex/tree/4.0) with strong type state, getters, and commit + - Using [vue-router-next](https://github.com/vuejs/vue-router-next) +- Using [eslint](https://www.npmjs.com/package/eslint) with Javascript Standard by default +- Built-in TypeScript Support + - Using [esbuild](https://github.com/evanw/esbuild) in [rollup](https://github.com/rollup/rollup) (align with vite) to build main process typescript code +- Github Action with Github Release is out-of-box + - Auto bump version in package.json and generate CHANGELOG.md if you follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0) + - Detail how this work described in [Release Process](#release-process) section +- Integrate VSCode well + - Support debug .ts/.vue files in main/renderer process by vscode debugger + - Detail see [Debug](#debug-in-vscode) section + +## 上手指南 + +git clone 或者直接下载本仓库 + +之后在仓库根目录下: + +```shell +# 安装依赖 +npm install + +# Will start vite server, rollup devserver, and electron to dev! +npm run dev + +# OPTIONAL. Will compile the main and renderer process to javascript and display output size +npm run build + +# OPTIONAL. Will compile all and output an unpacked electron app. You can directly +npm run build:dir + +# Will compile all and build all products and ready to release +npm run build:production + +``` + +### 配置你的项目信息和构建脚本 + +在你安装完项目依赖之后,你应该首先去 [package.json](/package.json) 中更改项目基本信息,如项目名,作者信息,git 仓库地址等。 +同时你需要更新构建信息 [build.base.config.js](/scripts/build.base.config.js), + +## 项目结构 + +### 文件目录结构 + +Your workspace should looks like + +``` +your-project +├─ scripts all dev scripts, build script directory +├─ build build resource and output directory +│ └─ icons/ build icon directory +├─ dist +│ └─ electron/ compiled output directory +├─ src +│ ├─ main +│ │ ├─ dialog.ts the ipc handler to support dialog API from renderer process +│ │ ├─ global.ts typescript global definition +│ │ ├─ index.dev.ts the development rollup entry +│ │ ├─ index.prod.ts the production rollup entry +│ │ ├─ index.ts real electron start-up entry file +│ │ ├─ logger.ts a simple logger implementation +│ │ └─ staticStore.ts +│ ├─ renderer +│ │ ├─ components/ assets directoy +│ │ ├─ components/ all components +│ │ ├─ router.ts vue-router initializer +│ │ ├─ store.ts vuex store initializer +│ │ ├─ App.vue entry vue file imported by index.ts +│ │ ├─ index.css entry css file for vite +│ │ ├─ index.html entry html file for vite +│ │ └─ index.ts entry script file for vite +│ └─ shared shared folder can be access from both main and renderer side +│ ├─ store/ vuex store definition +│ └─ sharedLib.ts an example file that can be access from both side +├─ static/ static resource directory +├─ .eslintrc.js +├─ .gitignore +├─ package.json +└─ README.md +``` + +#### assets, 静态资源 (static), 构建资源... 有啥区别? + +assets 文件只在 Renderer 进程中使用,他们会被 vite,也就是 rollup 系统打包到最终的构建文件中,你可以直接在 vue/ts 文件中 import 他们,基本上不用自己关心。assets 默认位置在 [renderer/renderer/assets](src/renderer/assets) + +静态资源,指的是一些需要被 main 进程在运行中使用的文件,比如你的系统托盘小图标 (Tray) 就需要放在 static 文件夹中,在运行时通过文件系统 (fs) 获取。或如你需要在 Windows 下运行一段 powershell,这些 powershell 文件通常就需要放在 static 文件夹下,并且在构建配置文件中明确标出 asarUnpack。默认静态文件夹在 [static](static). + +The build resources are used by `electron-builder` to build the installer. They can be your program icon of installer, or installer script. Default build icons are under [build/icons](build/icons). + +*Notice that your program icon can show up in multiple place! Don't mixup them!* +- *In build icons, of course you want your program has correct icon.* +- *In static directory, sometime you want your program has **tray** which require icon in static directory.* +- *In assets, sometime you want to display your program icon inside a page. You need to place them in the assets!* + + +### 主线程和渲染线程的概念 + +Quote from electron official document about [main and renderer processes](https://www.electronjs.org/docs/tutorial/quick-start#main-and-renderer-processes). The main process is about + +> - The Main process creates web pages by creating BrowserWindow instances. Each BrowserWindow instance runs the web page in its Renderer process. When a BrowserWindow instance is destroyed, the corresponding Renderer process gets terminated as well. +> - The Main process manages all web pages and their corresponding Renderer processes. + +And the renderer process is about + +> - The Renderer process manages only the corresponding web page. A crash in one Renderer process does not affect other Renderer processes. +> - The Renderer process communicates with the Main process via IPC to perform GUI operations in a web page. Calling native GUI-related APIs from the Renderer process directly is restricted due to security concerns and potential resource leakage. + +Commonly, the main process is about your core business logic, and renderer side act as a data consumer to render the UI. + +Following the [security](https://www.electronjs.org/docs/tutorial/security) guideline of electron, in this boilerplate, the renderer process [**does not** have access to nodejs module by default](https://www.electronjs.org/docs/tutorial/security#2-do-not-enable-nodejs-integration-for-remote-content). The electron provide the `preload` options in `webPreferences`. In this boilerplate, I suggest you to wrap your core logic into `Service`. + +The `Service` is a type of class defined under the `src/main/services`. All the public method can be access by the renderer process. +It's the bridge between the main and renderer. You can look at [Service](#service) for the detail. + + +### NPM 脚本 + +#### `npm run dev` + +Start the vite dev server hosting the renderer webpage with hot reloading. +Start the rollup server hosting the main process script. It will auto reload the electron app if you modify the source files. + +#### `npm run build` + +Compile both `main` and `renderer` process code to production, located at `dist/electron` + +#### `npm run build:production` + +It will compile both processes, and then run `electron-builder` to build your app into executable installer or zip. The build config is defined in [scripts/build.base.config.js](scripts/build.base.config.js). + +#### `npm run build:dir` + +It will compile both processes, and it will run `electron-builder` to build only the directoy version of the production electron app, which for example, for windows x64, it's located at `build/win-unpacked`. + +This will much faster than `npm run build:production`. So you can use it to quick testing the production app. + +#### `npm run lint` + +Run eslint to report eslint error. + +#### `npm run lint:fix` + +Run eslint to fix and report eslint error. + +## 开发 + +本项目默认遵从 [security](https://www.electronjs.org/docs/tutorial/security)。在默认情况下,Renderer (浏览器) 不能访问 NodeJS 的模块,这意味着你不能在浏览器中直接访问 fs 来读写文件。你需要通过使用 [Service](/src/main/services/Service.ts) 来访问 NodeJS 资源。在 vue 中使用 `useService('NameOfService')` 来获得 service 提供的方法。 + +Due to the project is following the [security](https://www.electronjs.org/docs/tutorial/security) guideline. It does not allow the renderer to access node by default. The [Service](#service) is a simple solution to isolate renderer logic and the vulnerable logic with full nodejs module access. See [this](#option-using-node-modules-in-renderer-process) section if you want to directly use node modules in renderer process. + +### 服务 (Service) + +A Service lives in a class in `src/main/services`. It should contain some of your core logic with file or network access in main process. It exposes these logic to renderer process. You call the hook `useService('NameOfService')` to use it in renderer side. + +The concept of service is totally optional. This is a design for security. ***If you think this is redundent and not fit with your program design, you can just remove it.*** + +#### 创建一个新 Service + +Add a file to the `/src/main/services` named `BarService.ts` + +```ts +export default class BarService extends Service { + async doSomeCoreLogic() { + // perform some file system or network work here + } +} +``` + +And you need to add it to the `interface Services` in `src/main/services/index.ts`. + +```ts +import { BarService } from './BarService' + +export interface Services { + // ... other existed services + BarService: BarService +} +``` + +Then, add it to the `initializeServices` in `src/main/index.ts` + +```ts +async function initializeServices(logger: Logger) { + initialize({ + // ...other services + BarService: new BarService(logger) + }) +} +``` + +And this is ready to be used in renderer process by `useService('BarService')`. See [Using Service in Renderer](#using-service-in-renderer). + +##### Services 之间的交互 + +If you need to use other `Service`, like `FooService`. You need to `@Inject` decorator to inject during runtime. + +```ts +export default class BarService extends Service { + @Inject('FooService') + private fooService: FooService + + async doSomeCoreLogic() { + const result = await fooService.foo() + // perform some file system or network operations here + } +} +``` + +#### 在渲染进程(浏览器)中使用某个 Service + +You can directly access all the async methods in a service class by `useService('nameOfService')` + +Here is an example in [About.vue](), using the `BaseService`. + +```vue + + + +``` + +#### 移除 Service 架构 + +If you don't like Service design, you just easily remove it by + +1. Remove the whole `src/main/services` directory +2. Remove the import line `import { initialize } from './services'` and initialization line `initialize(logger)` in `src/main/index.ts` + + +### 在渲染进程中使用 Hooks (Composable) + +One great feature of vue 3 is the [composition-api](https://composition-api.vuejs.org/). You can write up some basic piece of logic and compose them up during the setup functions. Currently, these `hooks` are placed in `/src/renderer/hooks` by default. + +Take the example from vue composition api site, you have such code in `/src/renderer/hooks/mouse.ts` + +```ts +import { ref, onMounted, onUnmounted } from 'vue' + +export function useMousePosition() { + const x = ref(0) + const y = ref(0) + + function update(e) { + x.value = e.pageX + y.value = e.pageY + } + + onMounted(() => { + window.addEventListener('mousemove', update) + }) + + onUnmounted(() => { + window.removeEventListener('mousemove', update) + }) + + return { x, y } +} +``` + +You'd better to export this `mouse.ts` to `/src/renderer/hooks/index.ts` + +```ts +// other exports... + +export * from './mouse.ts' +``` + +Then in the `vue` file you can import all hooks by the alias path + +```vue + + +``` + +### 在渲染进程中使用 Electron API + +The boilplate exposes several electron APIs by default. You can access them by `useShell`, `useClipboard`, `useIpc` and `useDialog`. +*These are provided by `static/preload.js` script. If you remove the preload during the creation of this BrowserWindow, this won't work.* + +```ts +import { defineComponent } from 'vue' +import { useShell } from '/@/hooks' + +export default defineComponent({ + setup() { + const shell = useShell() // this is equivalence to the import { shell } from 'electron' normally + // the shell object type definition works normally + } +}) +``` + +The only exception is the `useDialog`. You can only use `async` functions in it as the API call goes through IPC and it must be `async`. + +### 管理依赖 + +如果你想添加新的 npm 包作为依赖使用,你需要注意这个依赖是不是一个基于 nodejs 的模块。如果它是一个 nodejs 的包,你需要把这个包名放进 `package.json` 的 `excludeOptimize` 列表中。这个列表是用于告诉 vite 不要优化某些依赖,如果你不在这里剔除他们,vite就会抱怨说“我优化不了这些!”之类的话。 + + +```json +{ + // ...other package.json content + "dependencies": { + // ...other dependencies + "a-nodejs-package": "" + }, + "excludeOptimize": [ + // ...other existed excluded packages + "a-nodejs-package" // your new package + ], + // ...rest of package.json +} +``` + +当然如果这个依赖是纯 JS 实现,你就不需要把它加到这里面了。 + +#### 原生 (Native) 依赖 + +If you want to use the native dependencies, which need to compile when install. Usually, you need [node-gyp](https://github.com/nodejs/node-gyp) to build, the `electron-builder` will rebuild it upon your electron for you. Normally you don't need to worry much. Notice that if you are in Windows, you might want to install [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) to install the compile toolchain. + +#### 自带二进制的依赖 + +If you want to use the dependencies containing the compiled binary, not only you should adding it to vite `exclude`, you should also take care about the electron-builder config. See the [Build](#build-exclude-files) section for detail. The development process won't affect much by it. + + +### 在 VSCode 中 Debug + +本项目内置配置好的 vscode debug 配置。你会在 .vscode/launch.json 中看到以下三个配置 + +1. Electron: Main (attach) +2. Electron: Renderer (attach) +3. Electron: Main & Renderer (attach) + + +```json +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Electron: Main (attach)", + "type": "node", + "request": "attach", + "cwd": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/dist/**/*.js" + ], + "smartStep": true, + "sourceMaps": true, + "protocol": "inspector", + "port": 5858, + "timeout": 20000 + }, + { + "name": "Electron: Renderer (attach)", + "type": "chrome", + "request": "attach", + "port": 9222, + "webRoot": "${workspaceFolder}", + "timeout": 15000 + }, + ], + "compounds": [ + { + "name": "Electron: Main & Renderer (attach)", + "configurations": ["Electron: Main (attach)", "Electron: Renderer (attach)"] + } + ] +} +``` + +如果你看得懂的话就比较清晰了. 第一个是 attach 到 Electron 的 main 进程上。第二个是 attach 到 Renderer 进程上(需要 vscode 安装 Chrome Debugger 插件)。第三个则是这俩的合体,两个都 attach 上。 + +注意,这些配置都是 attach 模式,你需要先通过 `npm run dev` 启动 Electron 后使用。 + +### 可选项: 在渲染进程中使用 Node 模块 + +By default, the renderer process environment is just a raw front-end environment. You cannot use any nodejs module here. (Use service alternative) + +If you just want to use node modules in electron renderer/browser side anyway, you can just enable the `nodeIntegration` in BrowserWindow creation. + +For example, you can enable the main window node integration like this: + +```ts +const mainWindow = new BrowserWindow({ + height: 600, + width: 800, + webPreferences: { + preload: join(__static, 'preload.js'), + nodeIntegration: true // adding this to enable the node integration + } +}) +``` + +## 构建 + +The project build is based on [electron-builder](https://github.com/electron-userland/electron-builder). The config file is majorly in [scripts/build.base.config.js](../scripts/build.base.config.js). And you can refer the electron-builder [document](https://www.electron.build/). + +### 编译流程 + +The project will compile typescript/vue source code by rollup into javascript production code. The rollup config for main process is in [rollup.config.js](https://github.com/ci010/electron-vue-next/tree/master/scripts/rollup.config.js). It will output the production code to `dist/electron/index.prod.js`. + +The config to compile renderer process is in [vite.config.js](https://github.com/ci010/electron-vue-next/tree/master/scripts/vite.config.js). It will compile the production code into `dist/electron/renderer/*`. + +### 在构建中剔除某些具体文件 + +Normally, once you correctly config the `dependencies` in [Development](#development) section, you should not worry to much about the build. But some dependencies contains compiled binary. You might want to exclude them out of the unrelated OS builds. + +For example, [7zip-min](https://github.com/onikienko/7zip-min): + +Since it using the `7zip-bin` which carry binary for multiple platform, we need to correctly include them in config. +Modify the electron-builder build script `build.base.config.js` + +```js + files: [ + "dist/electron/**/*", + "!**/node_modules/**/*", + "node_modules/7zip-bin/**/*" + ], + asarUnpack: [ + "node_modules/7zip-bin/**/*" + ], +``` + +Add them to `files` and `asarUnpack` to ensure the electron builder correctly pack & unpack them. + +To optimize for multi-platform, you should also exclude them from `files` of each platform config `build.config.js` + +```js + mac: { + // ... other mac configs + files: [ + "node_modules/7zip-bin/**/*", + "!node_modules/7zip-bin/linux/**", + "!node_modules/7zip-bin/win/**" + ] + }, + win: { + // ... other win configs + files: [ + "node_modules/7zip-bin/**/*", + "!node_modules/7zip-bin/linux/**", + "!node_modules/7zip-bin/mac/**" + ] + }, + linux: { + // ... other linux configs + files: [ + "node_modules/7zip-bin/**/*", + "!node_modules/7zip-bin/win/**", + "!node_modules/7zip-bin/mac/**" + ] + }, +``` + +## 发布 + +The out-of-box github action will validate each your PR by eslint and run `npm run build`. It will not trigger electron-builder to build production assets. + +For each push in master branch, it will build production assets for win/mac/linux platform and upload it as github action assets. It will also create a **pull request** to asking you to bump version and update the changelog. + +It using the conventional-commit. If you want to auto-generate the changelog, you should follow the [conventional commit guideline](https://www.conventionalcommits.org/en/v1.0.0). + +If the **bump version PR** is approved and merged to master, it will auto build and release to github release. + +**If you want to disable this github action release process, just remove the [.github/workflows/build.yml](/.github/workflows/build.yml) file.** + +### 自动更新的支持 + +This boilerplate include the [electron-updater](https://github.com/electron-userland/electron-builder/tree/master/packages/electron-updater) as dependencies by default. You can follow the [electron-builder](https://github.com/electron-userland/electron-builder) guideline to implement the autoUpdate process. diff --git a/package-lock.json b/package-lock.json index 992e03f..798f35b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -59,14 +59,14 @@ } }, "@babel/parser": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", - "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==" + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", + "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==" }, "@babel/types": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", - "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", + "version": "7.12.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", + "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", @@ -123,25 +123,18 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "optional": true - }, - "import-fresh": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz", - "integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==", - "optional": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "optional": true } } }, + "@koa/cors": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@koa/cors/-/cors-3.1.0.tgz", + "integrity": "sha512-7ulRC1da/rBa6kj6P4g2aJfnET3z8Uf3SWu60cjbtxTA5g8lxRdX/Bd2P92EagGwwAhANeNw8T8if99rJliR6Q==", + "dev": true, + "requires": { + "vary": "^1.1.2" + } + }, "@nodelib/fs.scandir": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", @@ -202,15 +195,14 @@ } }, "@rollup/plugin-node-resolve": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-8.4.0.tgz", - "integrity": "sha512-LFqKdRLn0ShtQyf6SBYO69bGE1upV6wUhBX0vFOUnLAyzx5cwp8svA0eHUnu8+YU57XOkrMtfG63QOpQx25pHQ==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-9.0.0.tgz", + "integrity": "sha512-gPz+utFHLRrd41WMP13Jq5mqqzHL3OXrfj3/MkSyB6UBIcuNt9j60GCbarzMzdf1VHFpOxfQh/ez7wyadLMqkg==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", "@types/resolve": "1.17.1", "builtin-modules": "^3.1.0", - "deep-freeze": "^0.0.1", "deepmerge": "^4.2.2", "is-module": "^1.0.0", "resolve": "^1.17.0" @@ -413,6 +405,12 @@ "integrity": "sha512-KPcKqKm5UKDkaYPTuXSx8wEP7vE9GnuaXIZKijwRYcePpZFDVuy2a57LarFKiORbHOuTOOwYzxVxcUzsh2P2Pw==", "dev": true }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, "@types/qs": { "version": "6.9.5", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.5.tgz", @@ -434,6 +432,11 @@ "@types/node": "*" } }, + "@types/semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ==" + }, "@types/serve-static": { "version": "1.13.6", "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.6.tgz", @@ -551,38 +554,38 @@ } }, "@vue/compiler-core": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.0.0.tgz", - "integrity": "sha512-XqPC7vdv4rFE77S71oCHmT1K4Ks3WE2Gi6Lr4B5wn0Idmp+NyQQBUHsCNieMDRiEpgtJrw+yOHslrsV0AfAsfQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.0.2.tgz", + "integrity": "sha512-GOlEMTlC/OdzBkKaKOniYErbkjoKxkBOmulxGmMR10I2JJX6TvXd/peaO/kla2xhpliV/M6Z4TLJp0yjAvRIAw==", "requires": { - "@babel/parser": "^7.11.5", - "@babel/types": "^7.11.5", - "@vue/shared": "3.0.0", + "@babel/parser": "^7.12.0", + "@babel/types": "^7.12.0", + "@vue/shared": "3.0.2", "estree-walker": "^2.0.1", "source-map": "^0.6.1" } }, "@vue/compiler-dom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.0.tgz", - "integrity": "sha512-ukDEGOP8P7lCPyStuM3F2iD5w2QPgUu2xwCW2XNeqPjFKIlR2xMsWjy4raI/cLjN6W16GtlMFaZdK8tLj5PRog==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.2.tgz", + "integrity": "sha512-jvaL4QF2yXBJVD+JLbM2YA3e5fNfflJnfQ+GtfYk46ENGsEetqbkZqcX7fO+RHdG8tZBo7LCNBvgD0QLr+V4sg==", "requires": { - "@vue/compiler-core": "3.0.0", - "@vue/shared": "3.0.0" + "@vue/compiler-core": "3.0.2", + "@vue/shared": "3.0.2" } }, "@vue/compiler-sfc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.0.0.tgz", - "integrity": "sha512-1Bn4L5jNRm6tlb79YwqYUGGe+Yc9PRoRSJi67NJX6icdhf84+tRMtESbx1zCLL9QixQXu2+7aLkXHxvh4RpqAA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.0.2.tgz", + "integrity": "sha512-viYjT5ehDSLM3v0jQ9hbTs4I5e/7lSlYsDOp7TQ1qcwHRvzoTQMTkFpY/Iae+LFKM124Ld17tBfXgfrZl9dt+g==", "dev": true, "requires": { - "@babel/parser": "^7.11.5", - "@babel/types": "^7.11.5", - "@vue/compiler-core": "3.0.0", - "@vue/compiler-dom": "3.0.0", - "@vue/compiler-ssr": "3.0.0", - "@vue/shared": "3.0.0", + "@babel/parser": "^7.12.0", + "@babel/types": "^7.12.0", + "@vue/compiler-core": "3.0.2", + "@vue/compiler-dom": "3.0.2", + "@vue/compiler-ssr": "3.0.2", + "@vue/shared": "3.0.2", "consolidate": "^0.16.0", "estree-walker": "^2.0.1", "hash-sum": "^2.0.0", @@ -591,51 +594,61 @@ "merge-source-map": "^1.1.0", "postcss": "^7.0.32", "postcss-modules": "^3.2.2", - "postcss-selector-parser": "^6.0.2", + "postcss-selector-parser": "^6.0.4", "source-map": "^0.6.1" } }, "@vue/compiler-ssr": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.0.0.tgz", - "integrity": "sha512-Er41F9ZFyKB3YnNbE6JSTIGCVWve3NAQimgDOk4uP42OnckxBYKGBTutDeFNeqUZBMu/9vRHYrxlGFC9Z5jBVQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.0.2.tgz", + "integrity": "sha512-gOgK1lf+0bFl+kQj6TU0TU1jIDFlsPRlSBZaUUA16DGeeiJrFanhsMuIs/l9U0IBFr/VJcHgzYpTXqHp95luHw==", "dev": true, "requires": { - "@vue/compiler-dom": "3.0.0", - "@vue/shared": "3.0.0" + "@vue/compiler-dom": "3.0.2", + "@vue/shared": "3.0.2" } }, "@vue/reactivity": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.0.tgz", - "integrity": "sha512-mEGkztGQrAPZRhV7C6PorrpT3+NtuA4dY2QjMzzrW31noKhssWTajRZTwpLF39NBRrF5UU6cp9+1I0FfavMgEQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.2.tgz", + "integrity": "sha512-GdRloNcBar4yqWGXOcba1t//j/WizwfthfPUYkjcIPHjYnA/vTEQYp0C9+ZjPdinv1WRK1BSMeN/xj31kQES4A==", "requires": { - "@vue/shared": "3.0.0" + "@vue/shared": "3.0.2" } }, "@vue/runtime-core": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.0.tgz", - "integrity": "sha512-3ABMLeA0ZbeVNLbGGLXr+pNUwqXILOqz8WCVGfDWwQb+jW114Cm8djOHVVDoqdvRETQvDf8yHSUmpKHZpQuTkA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.2.tgz", + "integrity": "sha512-3m/jOs2xSipEFah9FgpEzvC9nERFonVGLN06+pf8iYPIy54Nlv7D2cyrk3Lhbjz4w3PbIrkxJnoTJYvJM7HDfA==", "requires": { - "@vue/reactivity": "3.0.0", - "@vue/shared": "3.0.0" + "@vue/reactivity": "3.0.2", + "@vue/shared": "3.0.2" } }, "@vue/runtime-dom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.0.tgz", - "integrity": "sha512-f312n5w9gK6mVvkDSj6/Xnot1XjlKXzFBYybmoy6ahAVC8ExbQ+LOWti1IZM/adU8VMNdKaw7Q53Hxz3y5jX8g==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.2.tgz", + "integrity": "sha512-vqC1KK1yWthTw1FKzajT0gYQaEqAq7bpeeXQC473nllGC5YHbJhNAJLSmrDun1tjXqGF0UNCWYljYm+++BJv6w==", "requires": { - "@vue/runtime-core": "3.0.0", - "@vue/shared": "3.0.0", + "@vue/runtime-core": "3.0.2", + "@vue/shared": "3.0.2", "csstype": "^2.6.8" } }, + "@vue/server-renderer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.0.2.tgz", + "integrity": "sha512-/g6er3mM39RH6/djz3vECeGRvqRiwf6W9MTPQe1BZjxZlbSThaX9Lqt/nqDGrPHmL5v1xYNK/FM+ZUPlMjO+Zw==", + "dev": true, + "requires": { + "@vue/compiler-ssr": "3.0.2", + "@vue/shared": "3.0.2" + } + }, "@vue/shared": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.0.0.tgz", - "integrity": "sha512-4XWL/avABGxU2E2ZF1eZq3Tj7fvksCMssDZUHOykBIMmh5d+KcAnQMC5XHMhtnA0NAvktYsA2YpdsVwVmhWzvA==" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.0.2.tgz", + "integrity": "sha512-Zx869zlNoujFOclKIoYmkh8ES2RcS/+Jn546yOiPyZ+3+Ejivnr+fb8l+DdXUEFjo+iVDNR3KyLzg03aBFfZ4Q==" }, "accepts": { "version": "1.3.7", @@ -834,12 +847,6 @@ } } }, - "array-ify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", - "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", - "dev": true - }, "array-includes": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", @@ -888,8 +895,7 @@ "at-least-node": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==" }, "balanced-match": { "version": "1.0.0", @@ -1087,40 +1093,6 @@ "temp-file": "^3.3.7" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "debug": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.0.tgz", @@ -1142,12 +1114,6 @@ "universalify": "^1.0.0" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, "jsonfile": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", @@ -1158,15 +1124,6 @@ "universalify": "^1.0.0" } }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, "universalify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", @@ -1179,7 +1136,6 @@ "version": "8.7.2", "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-8.7.2.tgz", "integrity": "sha512-xBqv+8bg6cfnzAQK1k3OGpfaHg+QkPgIgpEkXNhouZ0WiUkyZCftuRc2LYzQrLucFywpa14Xbc6+hTbpq83yRA==", - "dev": true, "requires": { "debug": "^4.1.1", "sax": "^1.2.4" @@ -1233,39 +1189,6 @@ } } }, - "call-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", - "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.0" - } - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "requires": { - "callsites": "^2.0.0" - } - }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } - }, - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -1375,6 +1298,18 @@ "integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==", "dev": true }, + "clipboard": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.6.tgz", + "integrity": "sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==", + "dev": true, + "optional": true, + "requires": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + }, "cliui": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.2.tgz", @@ -1457,16 +1392,6 @@ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, - "compare-func": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", - "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", - "dev": true, - "requires": { - "array-ify": "^1.0.0", - "dot-prop": "^5.1.0" - } - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1539,17 +1464,6 @@ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", "dev": true }, - "conventional-changelog-conventionalcommits": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.4.0.tgz", - "integrity": "sha512-ybvx76jTh08tpaYrYn/yd0uJNLt5yMrb1BphDe4WBredMlvPisvMghfpnJb6RmRNcqXeuhR6LfGZGewbkRm9yA==", - "dev": true, - "requires": { - "compare-func": "^2.0.0", - "lodash": "^4.17.15", - "q": "^1.5.1" - } - }, "cookies": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.8.0.tgz", @@ -1582,15 +1496,16 @@ "dev": true }, "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", + "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", "dev": true, "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" } }, "cross-env": { @@ -1658,12 +1573,6 @@ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true }, - "deep-freeze": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz", - "integrity": "sha1-OgsABd4YZygZ39OM0x+RF5yJPoQ=", - "dev": true - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -1699,6 +1608,13 @@ "object-keys": "^1.0.12" } }, + "delegate": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==", + "dev": true, + "optional": true + }, "delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", @@ -1724,6 +1640,12 @@ "dev": true, "optional": true }, + "diacritics": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/diacritics/-/diacritics-1.3.0.tgz", + "integrity": "sha1-PvqHMj67hj5mls67AILUj/PW96E=", + "dev": true + }, "dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -1875,40 +1797,6 @@ "yargs": "^16.0.3" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "fs-extra": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", @@ -1921,12 +1809,6 @@ "universalify": "^1.0.0" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, "jsonfile": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", @@ -1937,15 +1819,6 @@ "universalify": "^1.0.0" } }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, "universalify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", @@ -1970,40 +1843,6 @@ "mime": "^2.4.6" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "fs-extra": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", @@ -2016,12 +1855,6 @@ "universalify": "^1.0.0" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, "jsonfile": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", @@ -2032,20 +1865,59 @@ "universalify": "^1.0.0" } }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, + "universalify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", + "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", + "dev": true + } + } + }, + "electron-updater": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-4.3.5.tgz", + "integrity": "sha512-5jjN7ebvfj1cLI0VZMdCnJk6aC4bP+dy7ryBf21vArR0JzpRVk0OZHA2QBD+H5rm6ZSeDYHOY6+8PrMEqJ4wlQ==", + "requires": { + "@types/semver": "^7.3.1", + "builder-util-runtime": "8.7.2", + "fs-extra": "^9.0.1", + "js-yaml": "^3.14.0", + "lazy-val": "^1.0.4", + "lodash.isequal": "^4.5.0", + "semver": "^7.3.2" + }, + "dependencies": { + "fs-extra": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", + "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==", "requires": { - "has-flag": "^4.0.0" + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^1.0.0" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + }, + "dependencies": { + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + } } }, "universalify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", - "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", - "dev": true + "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==" } } }, @@ -2084,6 +1956,12 @@ "ansi-colors": "^4.1.1" } }, + "entities": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", + "dev": true + }, "env-paths": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", @@ -2102,7 +1980,6 @@ "version": "1.17.7", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", - "optional": true, "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", @@ -2227,22 +2104,6 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "optional": true - }, - "import-fresh": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz", - "integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==", - "optional": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "optional": true } } }, @@ -2393,9 +2254,9 @@ "optional": true }, "eslint-plugin-standard": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.2.tgz", - "integrity": "sha512-nKptN8l7jksXkwFk++PhJB3cCDTcXOEyhISIN86Ue2feJ1LFyY3PrY3/xT2keXlJSY5bpmbiTG0f885/YKAvTA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz", + "integrity": "sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ==", "optional": true }, "eslint-plugin-vue": { @@ -2536,6 +2397,15 @@ } } }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, "extract-zip": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", @@ -2726,16 +2596,6 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "get-intrinsic": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz", - "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==", - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -2845,6 +2705,16 @@ "slash": "^3.0.0" } }, + "good-listener": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", + "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", + "dev": true, + "optional": true, + "requires": { + "delegate": "^3.1.2" + } + }, "got": { "version": "9.6.0", "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", @@ -2869,6 +2739,18 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" }, + "gray-matter": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.2.tgz", + "integrity": "sha512-7hB/+LxrOjq/dd8APlK0r24uL/67w7SkYnfwhNFwg/VDIGWGmduTDYf3WNstLW2fbbmRwrDGCVSJ2isuf2+4Hw==", + "dev": true, + "requires": { + "js-yaml": "^3.11.0", + "kind-of": "^6.0.2", + "section-matter": "^1.0.0", + "strip-bom-string": "^1.0.0" + } + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -3003,31 +2885,38 @@ "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" }, "import-cwd": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", - "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-3.0.0.tgz", + "integrity": "sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==", "dev": true, "requires": { - "import-from": "^2.1.0" + "import-from": "^3.0.0" } }, "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz", + "integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==", "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" } }, "import-from": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", - "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-3.0.0.tgz", + "integrity": "sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==", "dev": true, "requires": { - "resolve-from": "^3.0.0" + "resolve-from": "^5.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } } }, "import-lazy": { @@ -3100,18 +2989,18 @@ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, "is-docker": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", "dev": true }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3366,10 +3255,10 @@ "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", "dev": true }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, "json-schema-traverse": { @@ -3425,6 +3314,18 @@ "json-buffer": "3.0.0" } }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "klona": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.4.tgz", + "integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==", + "dev": true + }, "koa": { "version": "2.13.0", "resolved": "https://registry.npmjs.org/koa/-/koa-2.13.0.tgz", @@ -3569,8 +3470,7 @@ "lazy-val": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/lazy-val/-/lazy-val-1.0.4.tgz", - "integrity": "sha512-u93kb2fPbIrfzBuLjZE+w+fJbUUMhNDXxNmMfaqNgpfQf1CO5ZSe2LfsnBqVAk7i/2NF48OSoRj+Xe2VT+lE8Q==", - "dev": true + "integrity": "sha512-u93kb2fPbIrfzBuLjZE+w+fJbUUMhNDXxNmMfaqNgpfQf1CO5ZSe2LfsnBqVAk7i/2NF48OSoRj+Xe2VT+lE8Q==" }, "levn": { "version": "0.4.1", @@ -3582,6 +3482,21 @@ "type-check": "~0.4.0" } }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "dev": true, + "requires": { + "uc.micro": "^1.0.1" + } + }, "load-json-file": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", @@ -3643,6 +3558,11 @@ "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", "dev": true }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, "log-symbols": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", @@ -3650,57 +3570,6 @@ "dev": true, "requires": { "chalk": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "lowercase-keys": { @@ -3744,6 +3613,43 @@ } } }, + "markdown-it": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "entities": "~2.0.0", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + } + }, + "markdown-it-anchor": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz", + "integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==", + "dev": true + }, + "markdown-it-container": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-it-container/-/markdown-it-container-2.0.0.tgz", + "integrity": "sha1-ABm0P9Au7+zi8ZYKKJX7qBpARpU=", + "dev": true + }, + "markdown-it-emoji": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/markdown-it-emoji/-/markdown-it-emoji-1.4.0.tgz", + "integrity": "sha1-m+4OmpkKljupbfaYDE/dsF37Tcw=", + "dev": true + }, + "markdown-it-table-of-contents": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/markdown-it-table-of-contents/-/markdown-it-table-of-contents-0.4.4.tgz", + "integrity": "sha512-TAIHTHPwa9+ltKvKPWulm/beozQU41Ab+FIefRaQV1NRnpzwcV9QOe6wXQS5WLivm5Q/nlo0rl6laGkMDZE7Gw==", + "dev": true + }, "matcher": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", @@ -3754,6 +3660,12 @@ "escape-string-regexp": "^4.0.0" } }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -3935,14 +3847,35 @@ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.1.tgz", + "integrity": "sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==", "requires": { - "call-bind": "^1.0.0", "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.0", "has-symbols": "^1.0.1", "object-keys": "^1.1.1" + }, + "dependencies": { + "es-abstract": { + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + } } }, "object.values": { @@ -4027,57 +3960,6 @@ "mute-stream": "0.0.8", "strip-ansi": "^6.0.0", "wcwidth": "^1.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "p-cancelable": { @@ -4104,6 +3986,12 @@ "p-limit": "^1.1.0" } }, + "p-map-series": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map-series/-/p-map-series-2.1.0.tgz", + "integrity": "sha512-RpYIIK1zXSNEOdwxcfe7FdvGcs7+y5n8rifMhMNWvaxRNMPINJHF5GDeuVxWqnfrcHPSCnp7Oo5yNXHId9Av2Q==", + "dev": true + }, "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", @@ -4134,7 +4022,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "optional": true, "requires": { "callsites": "^3.0.0" }, @@ -4142,19 +4029,20 @@ "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "optional": true + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" } } }, "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", + "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", "dev": true, "requires": { + "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" } }, "parseurl": { @@ -4334,13 +4222,13 @@ } }, "postcss-load-config": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.2.tgz", - "integrity": "sha512-/rDeGV6vMUo3mwJZmeHfEDvwnTKKqQ0S7OHUi/kJvvtx3aWtyWG2/0ZWnzCt2keEclwN6Tf0DST2v9kITdOKYw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.0.0.tgz", + "integrity": "sha512-lErrN8imuEF1cSiHBV8MiR7HeuzlDpCGNtaMyYHlOBuJHHOGw6S4xOMZp8BbXPr7AGQp14L6PZDlIOpfFJ6f7w==", "dev": true, "requires": { - "cosmiconfig": "^5.0.0", - "import-cwd": "^2.0.0" + "cosmiconfig": "^7.0.0", + "import-cwd": "^3.0.0" } }, "postcss-modules": { @@ -4402,9 +4290,9 @@ } }, "postcss-selector-parser": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.3.tgz", - "integrity": "sha512-0ClFaY4X1ra21LRqbW6y3rUbWcxnSVkDFG57R7Nxus9J9myPFlv+jYDMohzpkBx0RrjjiqjtycpchQ+PLGmZ9w==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz", + "integrity": "sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==", "dev": true, "requires": { "cssesc": "^3.0.0", @@ -4431,6 +4319,15 @@ "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true }, + "prismjs": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.22.0.tgz", + "integrity": "sha512-lLJ/Wt9yy0AiSYBf212kK3mM5L8ycwlyTlSxHBAneXLR0nzFMlZ5y7riFPF3E33zXOF2IH95xdY5jIyZbM9z/w==", + "dev": true, + "requires": { + "clipboard": "^2.0.0" + } + }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -4473,12 +4370,6 @@ "escape-goat": "^2.0.0" } }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true - }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -4655,10 +4546,9 @@ } }, "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" }, "resolve-path": { "version": "1.4.0", @@ -4746,9 +4636,9 @@ } }, "rollup": { - "version": "2.28.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.28.2.tgz", - "integrity": "sha512-8txbsFBFLmm9Xdt4ByTOGa9Muonmc8MfNjnGAR8U8scJlF1ZW7AgNZa7aqBXaKtlvnYP/ab++fQIq9dB9NWUbg==", + "version": "2.33.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.33.1.tgz", + "integrity": "sha512-uY4O/IoL9oNW8MMcbA5hcOaz6tZTMIh7qJHx/tzIJm+n1wLoY38BLn6fuy7DhR57oNFLMbDQtDeJoFURt5933w==", "dev": true, "requires": { "fsevents": "~2.1.2" @@ -4842,8 +4732,24 @@ "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "section-matter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", + "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "kind-of": "^6.0.0" + } + }, + "select": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", + "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=", + "dev": true, + "optional": true }, "selfsigned": { "version": "1.10.8", @@ -5044,63 +4950,21 @@ } }, "string.prototype.trimend": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz", - "integrity": "sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", "requires": { "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } + "es-abstract": "^1.17.5" } }, "string.prototype.trimstart": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz", - "integrity": "sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", "requires": { "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } + "es-abstract": "^1.17.5" } }, "string_decoder": { @@ -5126,6 +4990,12 @@ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "optional": true }, + "strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=", + "dev": true + }, "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -5209,6 +5079,13 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "optional": true }, + "tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", + "dev": true, + "optional": true + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -5331,6 +5208,12 @@ "integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==", "dev": true }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true + }, "uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", @@ -5454,9 +5337,9 @@ "dev": true }, "v8-compile-cache": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", - "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", + "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", "optional": true }, "validate-npm-package-license": { @@ -5475,20 +5358,21 @@ "dev": true }, "vite": { - "version": "1.0.0-rc.6", - "resolved": "https://registry.npmjs.org/vite/-/vite-1.0.0-rc.6.tgz", - "integrity": "sha512-voliGpQmoYvqjqurNIXNpd+Mi9l8W7XiGjehlnC1Bl3wbIK1ysHUmki84Z0zkvBXMorIdiIVMOcKsUVPQMVEgQ==", + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-1.0.0-rc.9.tgz", + "integrity": "sha512-u0PT2sKMes2RtE5rZsLY0nFm6kEmce7IhVRWKFXmrsjn0MBOCNEi+S6iNnJDmsj1nzvU2dMZ5MHhFyXIqTgjzA==", "dev": true, "requires": { - "@babel/parser": "^7.11.5", - "@rollup/plugin-commonjs": "^15.0.0", + "@babel/parser": "^7.12.3", + "@koa/cors": "^3.1.0", + "@rollup/plugin-commonjs": "^15.1.0", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^9.0.0", "@rollup/pluginutils": "^4.0.0", "@types/koa": "^2.11.4", "@types/lru-cache": "^5.1.0", - "@vue/compiler-dom": "^3.0.0-rc.10", - "@vue/compiler-sfc": "^3.0.0-rc.10", + "@vue/compiler-dom": "^3.0.2", + "@vue/compiler-sfc": "^3.0.2", "brotli-size": "^4.0.0", "chalk": "^4.1.0", "chokidar": "^3.4.2", @@ -5497,12 +5381,13 @@ "dotenv": "^8.2.0", "dotenv-expand": "^5.1.0", "es-module-lexer": "^0.3.25", - "esbuild": "^0.6.33", + "esbuild": "^0.7.21", "etag": "^1.8.1", "execa": "^4.0.3", "fs-extra": "^9.0.1", "hash-sum": "^2.0.0", "isbuiltin": "^1.0.0", + "klona": "^2.0.4", "koa": "^2.13.0", "koa-conditional-get": "^3.0.0", "koa-etag": "^4.0.0", @@ -5516,49 +5401,22 @@ "minimist": "^1.2.5", "open": "^7.2.1", "ora": "^5.1.0", - "postcss": "^7.0.32", + "p-map-series": "^2.1.0", "postcss-discard-comments": "^4.0.2", "postcss-import": "^12.0.1", - "postcss-load-config": "^2.1.0", + "postcss-load-config": "^3.0.0", "resolve": "^1.17.0", - "rollup": "^2.26.11", + "rollup": "^2.32.1", "rollup-plugin-dynamic-import-variables": "^1.1.0", "rollup-plugin-terser": "^7.0.2", "rollup-plugin-vue": "^6.0.0-beta.10", "rollup-plugin-web-worker-loader": "^1.3.1", "selfsigned": "^1.10.8", "slash": "^3.0.0", - "vue": "^3.0.0-rc.10", + "vue": "^3.0.2", "ws": "^7.3.1" }, "dependencies": { - "@rollup/plugin-node-resolve": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-9.0.0.tgz", - "integrity": "sha512-gPz+utFHLRrd41WMP13Jq5mqqzHL3OXrfj3/MkSyB6UBIcuNt9j60GCbarzMzdf1VHFpOxfQh/ez7wyadLMqkg==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "@types/resolve": "1.17.1", - "builtin-modules": "^3.1.0", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.17.0" - }, - "dependencies": { - "@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "requires": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - } - } - } - }, "@rollup/pluginutils": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.0.0.tgz", @@ -5584,46 +5442,84 @@ } } }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "esbuild": { + "version": "0.7.22", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.7.22.tgz", + "integrity": "sha512-B43SYg8LGWYTCv9Gs0RnuLNwjzpuWOoCaZHTWEDEf5AfrnuDMerPVMdCEu7xOdhFvQ+UqfP2MGU9lxEy0JzccA==", + "dev": true + }, + "fs-extra": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", + "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==", "dev": true, "requires": { - "color-convert": "^2.0.1" + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^1.0.0" } }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "jsonfile": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", + "integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==", "dev": true, "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "graceful-fs": "^4.1.6", + "universalify": "^1.0.0" } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "requires": { - "color-name": "~1.1.4" + "yallist": "^4.0.0" } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "universalify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", + "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", "dev": true }, - "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true - }, + } + } + }, + "vitepress": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-0.7.3.tgz", + "integrity": "sha512-sRIkh4Ug+37qqvoHM4ZgLys5JD93DST4pV987O+1i1OajLWQFckyeXXlVu2GXIfvpnqMYkWdUNPczqn7wbXUqA==", + "dev": true, + "requires": { + "@vue/compiler-sfc": "^3.0.2", + "@vue/server-renderer": "^3.0.2", + "debug": "^4.1.1", + "diacritics": "^1.3.0", + "escape-html": "^1.0.3", + "fs-extra": "^9.0.0", + "globby": "^11.0.1", + "gray-matter": "^4.0.2", + "lru-cache": "^6.0.0", + "markdown-it": "^10.0.0", + "markdown-it-anchor": "^5.2.7", + "markdown-it-container": "^2.0.0", + "markdown-it-emoji": "^1.4.0", + "markdown-it-table-of-contents": "^0.4.4", + "minimist": "^1.2.5", + "prismjs": "^1.20.0", + "slash": "^3.0.0", + "vite": "^1.0.0-rc.9", + "vue": "^3.0.2" + }, + "dependencies": { "fs-extra": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", @@ -5636,12 +5532,6 @@ "universalify": "^1.0.0" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, "jsonfile": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", @@ -5661,15 +5551,6 @@ "yallist": "^4.0.0" } }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, "universalify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", @@ -5685,13 +5566,13 @@ } }, "vue": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.0.0.tgz", - "integrity": "sha512-ZMrAARZ32sGIaYKr7Fk2GZEBh/VhulSrGxcGBiAvbN4fhjl3tuJyNFbbbLFqGjndbLoBW66I2ECq8ICdvkKdJw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.0.2.tgz", + "integrity": "sha512-ciKFjutKRs+2Vbvgrist1oDd5wZQqtOel/K//ku54zLbf8tcTV+XbyAfanTHcTkML9CUj09vnC+y+5uaOz2/9g==", "requires": { - "@vue/compiler-dom": "3.0.0", - "@vue/runtime-dom": "3.0.0", - "@vue/shared": "3.0.0" + "@vue/compiler-dom": "3.0.2", + "@vue/runtime-dom": "3.0.2", + "@vue/shared": "3.0.2" } }, "vue-eslint-parser": { @@ -5898,6 +5779,12 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, + "yaml": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", + "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", + "dev": true + }, "yargs": { "version": "16.1.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.0.tgz", diff --git a/package.json b/package.json index b50c6be..901b7ad 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,10 @@ "description": "", "main": "./dist/electron/index.prod.js", "scripts": { + "dev:docs": "node scripts/dev.docs.js", "dev": "node scripts/dev.js", "build": "node scripts/build.js", + "build:docs": "vitepress build docs", "build:dir": "cross-env BUILD_TARGET=dir node scripts/build.js", "build:lite": "cross-env BUILD_TARGET=lite node scripts/build.js", "build:production": "cross-env BUILD_TARGET=production node scripts/build.js", @@ -16,27 +18,38 @@ "author": "", "license": "MIT", "dependencies": { - "vue": "^3.0.0-rc.10", + "electron-updater": "^4.3.5", + "vue": "^3.0.2", "vue-router": "^4.0.0-beta.13", "vuex": "^4.0.0-beta.4" }, + "excludeOptimize": [ + "electron-updater" + ], "devDependencies": { "@rollup/plugin-alias": "^3.1.1", "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-node-resolve": "^8.4.0", + "@rollup/plugin-node-resolve": "^9.0.0", "@types/node": "^14.11.8", "@typescript-eslint/eslint-plugin": "^4.4.0", "@typescript-eslint/parser": "^4.4.0", - "@vue/compiler-sfc": "^3.0.0-rc.10", + "@vue/compiler-sfc": "^3.0.2", "chalk": "^4.1.0", - "conventional-changelog-conventionalcommits": "^4.4.0", "cross-env": "^7.0.2", + "eslint": "^7.13.0", + "eslint-config-standard": "^14.1.1", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-standard": "^4.0.2", + "eslint-plugin-vue": "^7.1.0", "electron": "^10.1.2", "electron-builder": "^22.9.1", "esbuild": "^0.6.33", "rollup": "^2.28.2", "typescript": "^4.0.3", - "vite": "^1.0.0-rc.6" + "vite": "^1.0.0-rc.6", + "vitepress": "^0.7.0" }, "optionalDependencies": { "eslint": "^7.13.0", diff --git a/scripts/dev.docs.js b/scripts/dev.docs.js new file mode 100644 index 0000000..7c10bb1 --- /dev/null +++ b/scripts/dev.docs.js @@ -0,0 +1,23 @@ +const chalk = require('chalk') +const { createServer } = require('vitepress') +const { excludeOptimize } = require('../package.json') + +const port = 3000 + +async function startVitepress() { + try { + const server = await createServer({ + root: 'docs', + optimizeDeps: { + exclude: excludeOptimize + } + }) + server.listen(port, () => { + console.log(`${chalk.green('[vitepress]')} listening at http://localhost:${port}`) + }) + } catch (err) { + console.error(chalk.red('failed to start server. error:\n'), err) + } +} + +startVitepress() diff --git a/scripts/rollup.config.js b/scripts/rollup.config.js index 46d06af..619fe3e 100644 --- a/scripts/rollup.config.js +++ b/scripts/rollup.config.js @@ -16,7 +16,7 @@ const config = ({ dir: join(__dirname, '../dist/electron'), format: 'cjs' }, - onwarn: onRollupWarning(undefined, undefined), + onwarn: onRollupWarning(undefined, {}), external: [...builtins, 'electron'], plugins: [ pluginAlias({ diff --git a/scripts/vite.config.js b/scripts/vite.config.js index ae5bf96..7724541 100644 --- a/scripts/vite.config.js +++ b/scripts/vite.config.js @@ -1,8 +1,9 @@ const { join } = require('path') +const { excludeOptimize } = require('../package.json') /** * Vite shared config, assign alias and root dir - * @type {import('vite').BuildConfig} + * @type {import('vite').UserConfig} */ const config = { root: join(__dirname, '../src/renderer'), @@ -12,9 +13,7 @@ const config = { '/@/': join(__dirname, '../src/renderer') }, optimizeDeps: { - exclude: [ - // exclude the module with nodejs dependencies - ] + exclude: excludeOptimize } } diff --git a/src/main/index.ts b/src/main/index.ts index 4022a1c..c7dae73 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -3,25 +3,16 @@ import { join } from 'path' import './dialog' import { Logger } from './logger' import { initialize } from './services' -import { BaseService } from './services/BaseService' -import { FooService } from './services/FooService' async function main() { const logger = new Logger() logger.initialize(app.getPath('userData')) - initializeServices(logger) + initialize(logger) app.whenReady().then(() => { createWindow() }) } -async function initializeServices(logger: Logger) { - initialize({ - BaseService: new BaseService(logger), - FooService: new FooService(logger) - }) -} - function createWindow() { // Create the browser window. const mainWindow = new BrowserWindow({ @@ -29,7 +20,8 @@ function createWindow() { width: 800, webPreferences: { preload: join(__static, 'preload.js'), - contextIsolation: true + contextIsolation: true, + nodeIntegration: false } }) diff --git a/src/main/services/index.ts b/src/main/services/index.ts index 775af75..c598559 100644 --- a/src/main/services/index.ts +++ b/src/main/services/index.ts @@ -1,4 +1,5 @@ import { ipcMain } from 'electron' +import { Logger } from '../logger' import { BaseService } from './BaseService' import { FooService } from './FooService' import { INJECTIONS_SYMBOL } from './Service' @@ -13,12 +14,24 @@ export interface Services { let _services!: Services +/** + * Initialize the services module to serve client (renderer process) + * + * @param logger The simple app logger + */ +export function initialize(logger: Logger) { + _initialize({ + BaseService: new BaseService(logger), + FooService: new FooService(logger) + }) +} + /** * Initialize the services module to serve client (renderer process) * * @param services The running services for current app */ -export function initialize(services: Services) { +function _initialize(services: Services) { if (_services) { throw new Error('Should not initialize the services multiple time!') } diff --git a/src/renderer/hooks/about.ts b/src/renderer/hooks/about.ts deleted file mode 100644 index 12a7663..0000000 --- a/src/renderer/hooks/about.ts +++ /dev/null @@ -1,3 +0,0 @@ - -export function useBasicInformation() { -}