diff --git a/packages/plugin-ui/.eslintrc.js b/packages/plugin-ui/.eslintrc.js
deleted file mode 100644
index ff11e81..0000000
--- a/packages/plugin-ui/.eslintrc.js
+++ /dev/null
@@ -1,12 +0,0 @@
-module.exports = {
- extends: [
- '../../.eslintrc.json',
- 'plugin:vue/vue3-essential',
- '@vue/typescript/recommended',
- 'prettier',
- ],
- rules: {},
- ignorePatterns: ['!**/*'],
- env: { node: true },
- overrides: [{ files: ['**/*.spec.{j,t}s?(x)'], env: { jest: true } }],
-};
diff --git a/packages/plugin-ui/index.html b/packages/plugin-ui/index.html
deleted file mode 100644
index 11603f8..0000000
--- a/packages/plugin-ui/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
- Vite App
-
-
-
-
-
-
diff --git a/packages/plugin-ui/jest.config.js b/packages/plugin-ui/jest.config.js
deleted file mode 100644
index 3affb83..0000000
--- a/packages/plugin-ui/jest.config.js
+++ /dev/null
@@ -1,21 +0,0 @@
-module.exports = {
- displayName: 'plugin-ui',
- preset: '../../jest.preset.js',
- transform: {
- '^.+.vue$': 'vue3-jest',
- '.+.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
- 'jest-transform-stub',
- '^.+.tsx?$': 'ts-jest',
- },
- moduleFileExtensions: ['ts', 'tsx', 'vue', 'js', 'json'],
- coverageDirectory: '../../coverage/packages/plugin-ui',
- snapshotSerializers: ['jest-serializer-vue'],
- globals: {
- 'ts-jest': {
- tsconfig: 'packages/plugin-ui/tsconfig.spec.json',
- },
- 'vue-jest': {
- tsConfig: 'packages/plugin-ui/tsconfig.spec.json',
- },
- },
-};
diff --git a/packages/plugin-ui/project.json b/packages/plugin-ui/project.json
deleted file mode 100644
index 35a1cf3..0000000
--- a/packages/plugin-ui/project.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "root": "packages/plugin-ui",
- "projectType": "application",
- "sourceRoot": "packages/plugin-ui/src",
- "targets": {
- "build": {
- "executor": "@nx-plus/vite:build",
- "options": {
- "config": "packages/plugin-ui/vite.config.ts"
- }
- },
- "serve": {
- "executor": "@nx-plus/vite:server",
- "options": {
- "config": "packages/plugin-ui/vite.config.ts"
- }
- },
- "lint": {
- "executor": "@nrwl/linter:eslint",
- "outputs": ["{options.outputFile}"],
- "options": {
- "lintFilePatterns": ["packages/plugin-ui/**/*.{ts,tsx,vue}"]
- }
- },
- "test": {
- "executor": "@nrwl/jest:jest",
- "outputs": ["coverage/packages/plugin-ui"],
- "options": {
- "jestConfig": "packages/plugin-ui/jest.config.js",
- "passWithNoTests": true
- }
- }
- },
- "tags": []
-}
diff --git a/packages/plugin-ui/public/favicon.ico b/packages/plugin-ui/public/favicon.ico
deleted file mode 100644
index 5867944..0000000
Binary files a/packages/plugin-ui/public/favicon.ico and /dev/null differ
diff --git a/packages/plugin-ui/src/App.vue b/packages/plugin-ui/src/App.vue
deleted file mode 100644
index e8e1f72..0000000
--- a/packages/plugin-ui/src/App.vue
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/packages/plugin-ui/src/assets/logo.png b/packages/plugin-ui/src/assets/logo.png
deleted file mode 100644
index f3d2503..0000000
Binary files a/packages/plugin-ui/src/assets/logo.png and /dev/null differ
diff --git a/packages/plugin-ui/src/components/HelloWorld.vue b/packages/plugin-ui/src/components/HelloWorld.vue
deleted file mode 100644
index 1f425fb..0000000
--- a/packages/plugin-ui/src/components/HelloWorld.vue
+++ /dev/null
@@ -1,69 +0,0 @@
-
- {{ msg }}
-
-
- Recommended IDE setup:
- VSCode
- +
- Vetur
- or
- Volar
- (if using
- <script setup>
)
-
-
- See README.md
for more information.
-
-
- Vite Docs
- |
- Vue 3 Docs
-
-
-
-
- Edit
- components/HelloWorld.vue
to test hot module replacement.
-
-
-
-
-
-
diff --git a/packages/plugin-ui/src/main.ts b/packages/plugin-ui/src/main.ts
deleted file mode 100644
index 684d042..0000000
--- a/packages/plugin-ui/src/main.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { createApp } from 'vue';
-import App from './App.vue';
-
-createApp(App).mount('#app');
diff --git a/packages/plugin-ui/src/shims-vue.d.ts b/packages/plugin-ui/src/shims-vue.d.ts
deleted file mode 100644
index e5f6821..0000000
--- a/packages/plugin-ui/src/shims-vue.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-declare module '*.vue' {
- import { DefineComponent } from 'vue';
- // eslint-disable-next-line
- const component: DefineComponent<{}, {}, any>;
- export default component;
-}
diff --git a/packages/plugin-ui/tests/unit/example.spec.ts b/packages/plugin-ui/tests/unit/example.spec.ts
deleted file mode 100644
index 389011f..0000000
--- a/packages/plugin-ui/tests/unit/example.spec.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { shallowMount } from '@vue/test-utils';
-import HelloWorld from '../../src/components/HelloWorld.vue';
-
-describe('HelloWorld.vue', () => {
- it('renders props.msg when passed', () => {
- const msg = 'new message';
- const wrapper = shallowMount(HelloWorld, { props: { msg } });
- expect(wrapper.text()).toMatch(msg);
- });
-});
diff --git a/packages/plugin-ui/tsconfig.app.json b/packages/plugin-ui/tsconfig.app.json
deleted file mode 100644
index c7d9a2c..0000000
--- a/packages/plugin-ui/tsconfig.app.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "extends": "../../tsconfig.base.json",
- "compilerOptions": {
- "target": "esnext",
- "module": "esnext",
- "moduleResolution": "node",
- "strict": true,
- "jsx": "preserve",
- "sourceMap": true,
- "resolveJsonModule": true,
- "esModuleInterop": true,
- "lib": ["esnext", "dom"],
- "types": ["vite/client"],
- "composite": true
- },
- "exclude": ["**/*.spec.ts", "**/*.spec.tsx"],
- "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
-}
diff --git a/packages/plugin-ui/tsconfig.json b/packages/plugin-ui/tsconfig.json
deleted file mode 100644
index 36debfa..0000000
--- a/packages/plugin-ui/tsconfig.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "extends": "../../tsconfig.base.json",
- "include": [],
- "files": [],
-
- "references": [{
- "path": "./tsconfig.app.json"
- },
- {
- "path": "./tsconfig.spec.json"
- }
- ]
-}
diff --git a/packages/plugin-ui/tsconfig.spec.json b/packages/plugin-ui/tsconfig.spec.json
deleted file mode 100644
index 32c7d18..0000000
--- a/packages/plugin-ui/tsconfig.spec.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node"],
- "jsx": "preserve",
- "esModuleInterop": true,
- "allowSyntheticDefaultImports": true,
- "composite": true
- },
- "include": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.d.ts"]
-}
diff --git a/packages/plugin-ui/vite.config.ts b/packages/plugin-ui/vite.config.ts
deleted file mode 100644
index 0af58d7..0000000
--- a/packages/plugin-ui/vite.config.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { appRootPath } from '@nrwl/tao/src/utils/app-root';
-import vue from '@vitejs/plugin-vue';
-import { defineConfig } from 'vite';
-import { join } from 'path';
-import baseTsConfig from '../../tsconfig.base.json';
-
-// https://vitejs.dev/config/
-export default defineConfig({
- plugins: [vue()],
- root: __dirname,
- build: {
- outDir: '../../dist/packages/plugin-ui',
- emptyOutDir: true,
- },
- resolve: {
- alias: Object.entries(baseTsConfig.compilerOptions.paths).reduce(
- (acc, [key, paths]) => ({
- ...acc,
- [key]: (paths as string[]).map((path) => join(appRootPath, path)),
- }),
- {}
- ),
- },
-});
diff --git a/packages/services-api/.eslintrc.json b/packages/services-api/.eslintrc.json
deleted file mode 100644
index 9d9c0db..0000000
--- a/packages/services-api/.eslintrc.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "extends": ["../../.eslintrc.json"],
- "ignorePatterns": ["!**/*"],
- "overrides": [
- {
- "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
- "rules": {}
- },
- {
- "files": ["*.ts", "*.tsx"],
- "rules": {}
- },
- {
- "files": ["*.js", "*.jsx"],
- "rules": {}
- }
- ]
-}
diff --git a/packages/services-api/README.md b/packages/services-api/README.md
deleted file mode 100644
index 72494dd..0000000
--- a/packages/services-api/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# services-api
-
-This library was generated with [Nx](https://nx.dev).
-
-## Building
-
-Run `nx build services-api` to build the library.
-
-## Running unit tests
-
-Run `nx test services-api` to execute the unit tests via [Jest](https://jestjs.io).
diff --git a/packages/services-api/jest.config.js b/packages/services-api/jest.config.js
deleted file mode 100644
index 77ab49d..0000000
--- a/packages/services-api/jest.config.js
+++ /dev/null
@@ -1,14 +0,0 @@
-module.exports = {
- displayName: 'services-api',
- preset: '../../jest.preset.js',
- globals: {
- 'ts-jest': {
- tsconfig: '/tsconfig.spec.json',
- },
- },
- transform: {
- '^.+\\.[tj]s$': 'ts-jest',
- },
- moduleFileExtensions: ['ts', 'js', 'html'],
- coverageDirectory: '../../coverage/packages/services-api',
-};
diff --git a/packages/services-api/package.json b/packages/services-api/package.json
deleted file mode 100644
index a7fd160..0000000
--- a/packages/services-api/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "name": "@bitdance/services-api",
- "version": "0.0.1",
- "type": "commonjs"
-}
diff --git a/packages/services-api/project.json b/packages/services-api/project.json
deleted file mode 100644
index 2048043..0000000
--- a/packages/services-api/project.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "root": "packages/services-api",
- "sourceRoot": "packages/services-api/src",
- "projectType": "library",
- "targets": {
- "build": {
- "executor": "@nrwl/js:tsc",
- "outputs": ["{options.outputPath}"],
- "options": {
- "outputPath": "dist/packages/services-api",
- "main": "packages/services-api/src/index.ts",
- "tsConfig": "packages/services-api/tsconfig.lib.json",
- "assets": ["packages/services-api/*.md"]
- }
- },
- "lint": {
- "executor": "@nrwl/linter:eslint",
- "outputs": ["{options.outputFile}"],
- "options": {
- "lintFilePatterns": ["packages/services-api/**/*.ts"]
- }
- },
- "test": {
- "executor": "@nrwl/jest:jest",
- "outputs": ["coverage/packages/services-api"],
- "options": {
- "jestConfig": "packages/services-api/jest.config.js",
- "passWithNoTests": true
- }
- }
- },
- "tags": []
-}
diff --git a/packages/services-api/src/index.ts b/packages/services-api/src/index.ts
deleted file mode 100644
index e7e6575..0000000
--- a/packages/services-api/src/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './lib/services-api';
diff --git a/packages/services-api/src/lib/services-api.spec.ts b/packages/services-api/src/lib/services-api.spec.ts
deleted file mode 100644
index f38dc5a..0000000
--- a/packages/services-api/src/lib/services-api.spec.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { servicesApi } from './services-api';
-
-describe('servicesApi', () => {
- it('should work', () => {
- expect(servicesApi()).toEqual('services-api');
- });
-});
diff --git a/packages/services-api/src/lib/services-api.ts b/packages/services-api/src/lib/services-api.ts
deleted file mode 100644
index 878b16d..0000000
--- a/packages/services-api/src/lib/services-api.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export function servicesApi(): string {
- return 'services-api';
-}
diff --git a/packages/services-api/tsconfig.json b/packages/services-api/tsconfig.json
deleted file mode 100644
index 592e5cc..0000000
--- a/packages/services-api/tsconfig.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "extends": "../../tsconfig.base.json",
- "compilerOptions": {
- "module": "CommonJS",
- "forceConsistentCasingInFileNames": true,
- "strict": true,
- "noImplicitOverride": true,
- "noPropertyAccessFromIndexSignature": true,
- "noImplicitReturns": true,
- "noFallthroughCasesInSwitch": true
- },
- "files": [],
- "include": [],
- "references": [
- {
- "path": "./tsconfig.lib.json"
- },
- {
- "path": "./tsconfig.spec.json"
- }
- ]
-}
diff --git a/packages/services-api/tsconfig.lib.json b/packages/services-api/tsconfig.lib.json
deleted file mode 100644
index a8b9431..0000000
--- a/packages/services-api/tsconfig.lib.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "declaration": true,
- "types": []
- },
- "include": ["**/*.ts"],
- "exclude": ["**/*.spec.ts"]
-}
diff --git a/packages/services-api/tsconfig.spec.json b/packages/services-api/tsconfig.spec.json
deleted file mode 100644
index a18afb6..0000000
--- a/packages/services-api/tsconfig.spec.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node"]
- },
- "include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
-}
diff --git a/packages/services/README.md b/packages/services/README.md
index 89babe4..6902e3a 100644
--- a/packages/services/README.md
+++ b/packages/services/README.md
@@ -1,11 +1,19 @@
-# services
+轻服务后台
-This library was generated with [Nx](https://nx.dev).
+## 部署到轻服务
-## Building
+项目根目录下运行:
-Run `nx build services` to build the library.
+```shell
+yarn nx deploy services
+```
-## Running unit tests
+## 本地开发
-Run `nx test services` to execute the unit tests via [Jest](https://jestjs.io).
+项目根目录下运行:
+
+```shell
+yarn nx dev services
+```
+
+> 开发环境下,修改文件内容后,服务器会自动重启
diff --git a/packages/shared/.eslintrc.json b/packages/shared/.eslintrc.json
deleted file mode 100644
index 9d9c0db..0000000
--- a/packages/shared/.eslintrc.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "extends": ["../../.eslintrc.json"],
- "ignorePatterns": ["!**/*"],
- "overrides": [
- {
- "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
- "rules": {}
- },
- {
- "files": ["*.ts", "*.tsx"],
- "rules": {}
- },
- {
- "files": ["*.js", "*.jsx"],
- "rules": {}
- }
- ]
-}
diff --git a/packages/shared/README.md b/packages/shared/README.md
deleted file mode 100644
index 908ca63..0000000
--- a/packages/shared/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# shared
-
-This library was generated with [Nx](https://nx.dev).
-
-## Building
-
-Run `nx build shared` to build the library.
-
-## Running unit tests
-
-Run `nx test shared` to execute the unit tests via [Jest](https://jestjs.io).
diff --git a/packages/shared/jest.config.js b/packages/shared/jest.config.js
deleted file mode 100644
index a33acd7..0000000
--- a/packages/shared/jest.config.js
+++ /dev/null
@@ -1,14 +0,0 @@
-module.exports = {
- displayName: 'shared',
- preset: '../../jest.preset.js',
- globals: {
- 'ts-jest': {
- tsconfig: '/tsconfig.spec.json',
- },
- },
- transform: {
- '^.+\\.[tj]s$': 'ts-jest',
- },
- moduleFileExtensions: ['ts', 'js', 'html'],
- coverageDirectory: '../../coverage/packages/shared',
-};
diff --git a/packages/shared/package.json b/packages/shared/package.json
deleted file mode 100644
index 5fcb03d..0000000
--- a/packages/shared/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "name": "@bitdance/shared",
- "version": "0.0.1",
- "type": "commonjs"
-}
diff --git a/packages/shared/project.json b/packages/shared/project.json
deleted file mode 100644
index fc5fb98..0000000
--- a/packages/shared/project.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "root": "packages/shared",
- "sourceRoot": "packages/shared/src",
- "projectType": "library",
- "targets": {
- "build": {
- "executor": "@nrwl/js:tsc",
- "outputs": ["{options.outputPath}"],
- "options": {
- "outputPath": "dist/packages/shared",
- "main": "packages/shared/src/index.ts",
- "tsConfig": "packages/shared/tsconfig.lib.json",
- "assets": ["packages/shared/*.md"]
- }
- },
- "lint": {
- "executor": "@nrwl/linter:eslint",
- "outputs": ["{options.outputFile}"],
- "options": {
- "lintFilePatterns": ["packages/shared/**/*.ts"]
- }
- },
- "test": {
- "executor": "@nrwl/jest:jest",
- "outputs": ["coverage/packages/shared"],
- "options": {
- "jestConfig": "packages/shared/jest.config.js",
- "passWithNoTests": true
- }
- }
- },
- "tags": []
-}
diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts
deleted file mode 100644
index 4dcc196..0000000
--- a/packages/shared/src/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './lib/shared';
diff --git a/packages/shared/src/lib/shared.spec.ts b/packages/shared/src/lib/shared.spec.ts
deleted file mode 100644
index ae730cf..0000000
--- a/packages/shared/src/lib/shared.spec.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { shared } from './shared';
-
-describe('shared', () => {
- it('should work', () => {
- expect(shared()).toEqual('shared');
- });
-});
diff --git a/packages/shared/src/lib/shared.ts b/packages/shared/src/lib/shared.ts
deleted file mode 100644
index d734544..0000000
--- a/packages/shared/src/lib/shared.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export function shared(): string {
- return 'shared';
-}
diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json
deleted file mode 100644
index 592e5cc..0000000
--- a/packages/shared/tsconfig.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "extends": "../../tsconfig.base.json",
- "compilerOptions": {
- "module": "CommonJS",
- "forceConsistentCasingInFileNames": true,
- "strict": true,
- "noImplicitOverride": true,
- "noPropertyAccessFromIndexSignature": true,
- "noImplicitReturns": true,
- "noFallthroughCasesInSwitch": true
- },
- "files": [],
- "include": [],
- "references": [
- {
- "path": "./tsconfig.lib.json"
- },
- {
- "path": "./tsconfig.spec.json"
- }
- ]
-}
diff --git a/packages/shared/tsconfig.lib.json b/packages/shared/tsconfig.lib.json
deleted file mode 100644
index a8b9431..0000000
--- a/packages/shared/tsconfig.lib.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "declaration": true,
- "types": []
- },
- "include": ["**/*.ts"],
- "exclude": ["**/*.spec.ts"]
-}
diff --git a/packages/shared/tsconfig.spec.json b/packages/shared/tsconfig.spec.json
deleted file mode 100644
index a18afb6..0000000
--- a/packages/shared/tsconfig.spec.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node"]
- },
- "include": ["**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
-}
diff --git a/packages/shell-chrome/assets/js/lib/axios.min.js b/packages/shell-chrome/assets/js/lib/axios.min.js
new file mode 100644
index 0000000..dba0619
--- /dev/null
+++ b/packages/shell-chrome/assets/js/lib/axios.min.js
@@ -0,0 +1,4 @@
+/* axios v0.25.0 | (c) 2022 by Matt Zabriskie */
+/* axios v0.24.0 | (c) 2022 by Matt Zabriskie */
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=11)}([function(e,t,n){"use strict";var r=n(3),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(s)})),e.exports=c},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(10).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(o(r," has been removed"+(t?" in "+t:"")));return t&&!i[r]&&(i[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],s=t[i];if(s){var a=e[i],u=void 0===a||s(a,i,e);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},function(e,t,n){"use strict";var r=n(2);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t1&&void 0!==arguments[1]?arguments[1]:0,n=(f[r[e+0]]+f[r[e+1]]+f[r[e+2]]+f[r[e+3]]+"-"+f[r[e+4]]+f[r[e+5]]+"-"+f[r[e+6]]+f[r[e+7]]+"-"+f[r[e+8]]+f[r[e+9]]+"-"+f[r[e+10]]+f[r[e+11]]+f[r[e+12]]+f[r[e+13]]+f[r[e+14]]+f[r[e+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n}var l=0,d=0;function v(r){if(!a(r))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(r.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(r.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(r.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(r.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n}function p(r,e,n){function t(r,t,o,a){if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var e=[],n=0;n>>9<<4)+1}function y(r,e){var n=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(n>>16)<<16|65535&n}function g(r,e,n,t,o,a){return y((i=y(y(e,r),y(t,a)))<<(u=o)|i>>>32-u,n);var i,u}function m(r,e,n,t,o,a,i){return g(e&n|~e&t,r,e,o,a,i)}function w(r,e,n,t,o,a,i){return g(e&t|n&~t,r,e,o,a,i)}function b(r,e,n,t,o,a,i){return g(e^n^t,r,e,o,a,i)}function A(r,e,n,t,o,a,i){return g(n^(e|~t),r,e,o,a,i)}var U=p("v3",48,(function(r){if("string"==typeof r){var e=unescape(encodeURIComponent(r));r=new Uint8Array(e.length);for(var n=0;n>5]>>>o%32&255,i=parseInt(t.charAt(a>>>4&15)+t.charAt(15&a),16);e.push(i)}return e}(function(r,e){r[e>>5]|=128<>5]|=(255&r[t/8])<>>32-e}var R=p("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var t=unescape(encodeURIComponent(r));r=[];for(var o=0;o>>0;w=m,m=g,g=C(y,30)>>>0,y=h,h=U}n[0]=n[0]+h>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+m>>>0,n[4]=n[4]+w>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));r.NIL="00000000-0000-0000-0000-000000000000",r.parse=v,r.stringify=c,r.v1=function(r,e,n){var o=e&&n||0,a=e||new Array(16),f=(r=r||{}).node||i,s=void 0!==r.clockseq?r.clockseq:u;if(null==f||null==s){var v=r.random||(r.rng||t)();null==f&&(f=i=[1|v[0],v[1],v[2],v[3],v[4],v[5]]),null==s&&(s=u=16383&(v[6]<<8|v[7]))}var p=void 0!==r.msecs?r.msecs:Date.now(),h=void 0!==r.nsecs?r.nsecs:d+1,y=p-l+(h-d)/1e4;if(y<0&&void 0===r.clockseq&&(s=s+1&16383),(y<0||p>l)&&void 0===r.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=p,d=h,u=s;var g=(1e4*(268435455&(p+=122192928e5))+h)%4294967296;a[o++]=g>>>24&255,a[o++]=g>>>16&255,a[o++]=g>>>8&255,a[o++]=255&g;var m=p/4294967296*1e4&268435455;a[o++]=m>>>8&255,a[o++]=255&m,a[o++]=m>>>24&15|16,a[o++]=m>>>16&255,a[o++]=s>>>8|128,a[o++]=255&s;for(var w=0;w<6;++w)a[o+w]=f[w];return e||c(a)},r.v3=U,r.v4=function(r,e,n){var o=(r=r||{}).random||(r.rng||t)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e){n=n||0;for(var a=0;a<16;++a)e[n+a]=o[a];return e}return c(o)},r.v5=R,r.validate=a,r.version=function(r){if(!a(r))throw TypeError("Invalid UUID");return parseInt(r.substr(14,1),16)},Object.defineProperty(r,"__esModule",{value:!0})}));
\ No newline at end of file
diff --git a/packages/shell-chrome/assets/js/login.js b/packages/shell-chrome/assets/js/login.js
new file mode 100644
index 0000000..9cd00bd
--- /dev/null
+++ b/packages/shell-chrome/assets/js/login.js
@@ -0,0 +1,43 @@
+ new Vue({
+ el: '#app',
+ data() {
+ return {
+ username: "",
+ password: ""
+ }
+ },
+ methods: {
+ login() {
+ if (!this.username || !this.password) {
+ alert('账号和密码不能为空!')
+ return
+ }
+ axios.post("https://qcmma8.app.cloudendpoint.cn/api/auth/login", {
+ username: this.username,
+ password: this.password
+ }).then(res => {
+ window.close()
+ }).catch(err => {
+ if (err.response && err.response.data)
+ alert(err.response.data.msg)
+ else alert("请求失败!")
+ })
+ },
+ register() {
+ if (!this.username || !this.password) {
+ alert('账号和密码不能为空!')
+ return
+ }
+ axios.post("https://qcmma8.app.cloudendpoint.cn/api/auth/register", {
+ username: this.username,
+ password: this.password
+ }).then(res => {
+ window.close()
+ }).catch(err => {
+ if (err.response && err.response.data)
+ alert(err.response.data.msg)
+ else alert("请求失败!")
+ })
+ }
+ }
+ })
diff --git a/packages/shell-chrome/assets/js/session.js b/packages/shell-chrome/assets/js/session.js
new file mode 100644
index 0000000..a386059
--- /dev/null
+++ b/packages/shell-chrome/assets/js/session.js
@@ -0,0 +1,17 @@
+chrome.storage.sync.get('sessionid', function ({ sessionid }) {
+
+ if (!sessionid) {
+ sessionid = uuid.v4()
+ console.log(sessionid)
+ chrome.storage.sync.set({
+ 'sessionid': sessionid
+ });
+ }
+
+ axios.defaults.headers.common['x-tt-session-v2'] = sessionid
+
+ if (typeof sessionCb === 'function') {
+ sessionCb()
+ }
+})
+
diff --git a/packages/shell-chrome/assets/js/todos.js b/packages/shell-chrome/assets/js/todos.js
new file mode 100644
index 0000000..773b552
--- /dev/null
+++ b/packages/shell-chrome/assets/js/todos.js
@@ -0,0 +1,42 @@
+
+let app = new Vue({
+ data() {
+ return {
+ todos: [],
+ todoForm: "",
+ }
+ },
+ methods: {
+ loadTodos () {
+ axios.get("https://qcmma8.app.cloudendpoint.cn/api/memos?pageSize=100").then(res => {
+ this.todos = res.data.content
+ })
+ },
+ createTodo () {
+ if (!this.toDoForm.trim()) {
+ alert('内容不能为空')
+ return
+ }
+ axios.post("https://qcmma8.app.cloudendpoint.cn/api/memos", { content: this.toDoForm }).then(() => {
+ alert('添加成功!')
+ this.loadTodos()
+ this.toDoForm = ""
+ })
+ },
+ removeTodo(id) {
+ axios.delete(`https://qcmma8.app.cloudendpoint.cn/api/memos/${id}`, {
+ content: this.toDoForm
+ }).then(() => {
+ alert('删除成功!')
+ this.loadTodos()
+ })
+ },
+ },
+ mounted () {
+ this.loadTodos()
+ }
+ })
+
+function sessionCb() {
+ app.$mount('#app')
+}
diff --git a/packages/shell-chrome/login.html b/packages/shell-chrome/login.html
new file mode 100644
index 0000000..62ce058
--- /dev/null
+++ b/packages/shell-chrome/login.html
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+ Document
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/shell-chrome/manifest.json b/packages/shell-chrome/manifest.json
index 8dc9d46..f2345bb 100644
--- a/packages/shell-chrome/manifest.json
+++ b/packages/shell-chrome/manifest.json
@@ -6,6 +6,7 @@
"omnibox": {
"keyword": "ss"
},
+ "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
"icons": {
"16": "assets/image/logo.png",
"48": "assets/image/logo.png",
@@ -21,8 +22,7 @@
"assets/html/screenshot/background.js"
]
},
- "content_scripts": [
- {
+ "content_scripts": [{
"matches": [
"",
"*://*/*"
@@ -103,6 +103,7 @@
"/assets/image/*",
"/assets/html/screenshot/images/*"
],
+
"permissions": [
"background",
"contextMenus",
diff --git a/packages/shell-chrome/register.html b/packages/shell-chrome/register.html
new file mode 100644
index 0000000..09722d2
--- /dev/null
+++ b/packages/shell-chrome/register.html
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+ Document
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/shell-chrome/todos.html b/packages/shell-chrome/todos.html
new file mode 100644
index 0000000..1dd7681
--- /dev/null
+++ b/packages/shell-chrome/todos.html
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+ Document
+
+
+
+
+
备忘录
+
+
暂无数据
+
添加一个 Todo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tsconfig.base.json b/tsconfig.base.json
index bfcc065..b96ddde 100644
--- a/tsconfig.base.json
+++ b/tsconfig.base.json
@@ -17,7 +17,6 @@
"skipDefaultLibCheck": true,
"baseUrl": ".",
"paths": {
- "@bitdance/services-api": ["packages/services-api/src/index.ts"],
"@bitdance/shared": ["packages/shared/src/index.ts"]
}
},
diff --git a/workspace.json b/workspace.json
index f52a19f..6abbf16 100644
--- a/workspace.json
+++ b/workspace.json
@@ -1,10 +1,7 @@
{
"version": 2,
"projects": {
- "plugin-ui": "packages/plugin-ui",
"services": "packages/services",
- "services-api": "packages/services-api",
- "shared": "packages/shared",
- "shell-chrome": "packages\\shell-chrome"
+ "shell-chrome": "packages/shell-chrome"
}
}