From 5d1d2f334886f0c9f1b4fe2860b0aa81a4ec3787 Mon Sep 17 00:00:00 2001 From: kaz Date: Wed, 9 Feb 2022 23:40:48 +0800 Subject: [PATCH] style --- packages/plugin-ui/.eslintrc.js | 12 --- packages/plugin-ui/index.html | 13 ---- packages/plugin-ui/jest.config.js | 21 ------ packages/plugin-ui/project.json | 35 --------- packages/plugin-ui/public/favicon.ico | Bin 6796 -> 0 bytes packages/plugin-ui/src/App.vue | 27 ------- packages/plugin-ui/src/assets/logo.png | Bin 6849 -> 0 bytes .../plugin-ui/src/components/HelloWorld.vue | 69 ------------------ packages/plugin-ui/src/main.ts | 4 - packages/plugin-ui/src/shims-vue.d.ts | 6 -- packages/plugin-ui/tests/unit/example.spec.ts | 10 --- packages/plugin-ui/tsconfig.app.json | 18 ----- packages/plugin-ui/tsconfig.json | 13 ---- packages/plugin-ui/tsconfig.spec.json | 13 ---- packages/plugin-ui/vite.config.ts | 24 ------ packages/services-api/.eslintrc.json | 18 ----- packages/services-api/README.md | 11 --- packages/services-api/jest.config.js | 14 ---- packages/services-api/package.json | 5 -- packages/services-api/project.json | 33 --------- packages/services-api/src/index.ts | 1 - .../services-api/src/lib/services-api.spec.ts | 7 -- packages/services-api/src/lib/services-api.ts | 3 - packages/services-api/tsconfig.json | 22 ------ packages/services-api/tsconfig.lib.json | 10 --- packages/services-api/tsconfig.spec.json | 9 --- packages/services/README.md | 20 +++-- packages/shared/.eslintrc.json | 18 ----- packages/shared/README.md | 11 --- packages/shared/jest.config.js | 14 ---- packages/shared/package.json | 5 -- packages/shared/project.json | 33 --------- packages/shared/src/index.ts | 1 - packages/shared/src/lib/shared.spec.ts | 7 -- packages/shared/src/lib/shared.ts | 3 - packages/shared/tsconfig.json | 22 ------ packages/shared/tsconfig.lib.json | 10 --- packages/shared/tsconfig.spec.json | 9 --- .../shell-chrome/assets/js/lib/axios.min.js | 4 + .../shell-chrome/assets/js/lib/uuid.min.js | 1 + packages/shell-chrome/assets/js/login.js | 43 +++++++++++ packages/shell-chrome/assets/js/session.js | 17 +++++ packages/shell-chrome/assets/js/todos.js | 42 +++++++++++ packages/shell-chrome/login.html | 25 +++++++ packages/shell-chrome/manifest.json | 5 +- packages/shell-chrome/register.html | 25 +++++++ packages/shell-chrome/todos.html | 36 +++++++++ tsconfig.base.json | 1 - workspace.json | 5 +- 49 files changed, 211 insertions(+), 544 deletions(-) delete mode 100644 packages/plugin-ui/.eslintrc.js delete mode 100644 packages/plugin-ui/index.html delete mode 100644 packages/plugin-ui/jest.config.js delete mode 100644 packages/plugin-ui/project.json delete mode 100644 packages/plugin-ui/public/favicon.ico delete mode 100644 packages/plugin-ui/src/App.vue delete mode 100644 packages/plugin-ui/src/assets/logo.png delete mode 100644 packages/plugin-ui/src/components/HelloWorld.vue delete mode 100644 packages/plugin-ui/src/main.ts delete mode 100644 packages/plugin-ui/src/shims-vue.d.ts delete mode 100644 packages/plugin-ui/tests/unit/example.spec.ts delete mode 100644 packages/plugin-ui/tsconfig.app.json delete mode 100644 packages/plugin-ui/tsconfig.json delete mode 100644 packages/plugin-ui/tsconfig.spec.json delete mode 100644 packages/plugin-ui/vite.config.ts delete mode 100644 packages/services-api/.eslintrc.json delete mode 100644 packages/services-api/README.md delete mode 100644 packages/services-api/jest.config.js delete mode 100644 packages/services-api/package.json delete mode 100644 packages/services-api/project.json delete mode 100644 packages/services-api/src/index.ts delete mode 100644 packages/services-api/src/lib/services-api.spec.ts delete mode 100644 packages/services-api/src/lib/services-api.ts delete mode 100644 packages/services-api/tsconfig.json delete mode 100644 packages/services-api/tsconfig.lib.json delete mode 100644 packages/services-api/tsconfig.spec.json delete mode 100644 packages/shared/.eslintrc.json delete mode 100644 packages/shared/README.md delete mode 100644 packages/shared/jest.config.js delete mode 100644 packages/shared/package.json delete mode 100644 packages/shared/project.json delete mode 100644 packages/shared/src/index.ts delete mode 100644 packages/shared/src/lib/shared.spec.ts delete mode 100644 packages/shared/src/lib/shared.ts delete mode 100644 packages/shared/tsconfig.json delete mode 100644 packages/shared/tsconfig.lib.json delete mode 100644 packages/shared/tsconfig.spec.json create mode 100644 packages/shell-chrome/assets/js/lib/axios.min.js create mode 100644 packages/shell-chrome/assets/js/lib/uuid.min.js create mode 100644 packages/shell-chrome/assets/js/login.js create mode 100644 packages/shell-chrome/assets/js/session.js create mode 100644 packages/shell-chrome/assets/js/todos.js create mode 100644 packages/shell-chrome/login.html create mode 100644 packages/shell-chrome/register.html create mode 100644 packages/shell-chrome/todos.html 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 58679444595bda4f04b7982a5fccad54e1082d13..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6796 zcmds6OKTKC5bhX)iX;X^4|+(BIq5;Oan+bz5R6Zv1_ELp8#S7+iU}k>Fys(_lot^^ z1O-nXy@(f2f`7rUy6T&motHDa**&E4An*N4B+Q778{`S@Yjxf9O0 zF$kQl29Xi}!Px)u0aHA6VVr7v$uk4PS@Y8dSbK#nhUJ*6#{40s{1)dkzAKnBu%0&mkIeN< z!>+R#+cn%V%mda>L)3|ndG~eQW7xSy(_P}gysWctTw*+iyM$lULPyRtYwZh{7!R(~ zN)P$47HfCRE5>Qm`rk^OWetLktb9?QR$|?b_!xGsO`r9PB59fT7QHD5tq!)qFU(3j zZE>{v*X8%mOpUTxs(e4pUrj%c$#beRHA*X5 zVRQ;}7L3H}G)q0fm435>X4OC!u7WK()Y2j?Mg7vWe zd?H#M&{-IEFec0Ucs}DE(vy1KuZ8O9+10kct26`iY2mD@Iiutda3gVxq5qWizm~m| zUhG^%Xmrn#ZTwbvE|MIHdNflG7af95T?a)@9-gMd~2wDW|Js>A4{t=%ai_MoD&5deioeVrf@%+8+2TPXPkncTxZRyG}wY#hp_<<=d)9d|L`Rr& 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 f3d2503fc2a44b5053b0837ebea6e87a2d339a43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6849 zcmaKRcUV(fvo}bjDT-7nLI_nlK}sT_69H+`qzVWDA|yaU?}j417wLi^B1KB1SLsC& zL0ag7$U(XW5YR7p&Ux?sP$d4lvMt8C^+TcQu4F zQqv!UF!I+kw)c0jhd6+g6oCr9P?7)?!qX1ui*iL{p}sKCAGuJ{{W)0z1pLF|=>h}& zt(2Lr0Z`2ig8<5i%Zk}cO5Fm=LByqGWaS`oqChZdEFmc`0hSb#gg|Aap^{+WKOYcj zHjINK)KDG%&s?Mt4CL(T=?;~U@bU2x_mLKN!#GJuK_CzbNw5SMEJorG!}_5;?R>@1 zSl)jns3WlU7^J%=(hUtfmuUCU&C3%8B5C^f5>W2Cy8jW3#{Od{lF1}|?c61##3dzA zsPlFG;l_FzBK}8>|H_Ru_H#!_7$UH4UKo3lKOA}g1(R&|e@}GINYVzX?q=_WLZCgh z)L|eJMce`D0EIwgRaNETDsr+?vQknSGAi=7H00r`QnI%oQnFxm`G2umXso9l+8*&Q z7WqF|$p49js$mdzo^BXpH#gURy=UO;=IMrYc5?@+sR4y_?d*~0^YP7d+y0{}0)zBM zIKVM(DBvICK#~7N0a+PY6)7;u=dutmNqK3AlsrUU9U`d;msiucB_|8|2kY=(7XA;G zwDA8AR)VCA#JOkxm#6oHNS^YVuOU;8p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j98$%XmIL4(9OnoeO5Fnyn&fpQ9b0h4e6EHHw*l68j;>(ya`g^S&y2{O8U>1*>4zR zq*WSI_2o$CHQ?x0!wl9bpx|Cm2+kFMR)oMud1%n2=qn5nE&t@Fgr#=Zv2?}wtEz^T z9rrj=?IH*qI5{G@Rn&}^Z{+TW}mQeb9=8b<_a`&Cm#n%n~ zU47MvCBsdXFB1+adOO)03+nczfWa#vwk#r{o{dF)QWya9v2nv43Zp3%Ps}($lA02*_g25t;|T{A5snSY?3A zrRQ~(Ygh_ebltHo1VCbJb*eOAr;4cnlXLvI>*$-#AVsGg6B1r7@;g^L zFlJ_th0vxO7;-opU@WAFe;<}?!2q?RBrFK5U{*ai@NLKZ^};Ul}beukveh?TQn;$%9=R+DX07m82gP$=}Uo_%&ngV`}Hyv8g{u z3SWzTGV|cwQuFIs7ZDOqO_fGf8Q`8MwL}eUp>q?4eqCmOTcwQuXtQckPy|4F1on8l zP*h>d+cH#XQf|+6c|S{7SF(Lg>bR~l(0uY?O{OEVlaxa5@e%T&xju=o1`=OD#qc16 zSvyH*my(dcp6~VqR;o(#@m44Lug@~_qw+HA=mS#Z^4reBy8iV?H~I;{LQWk3aKK8$bLRyt$g?- -

{{ 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 + + + +
+

备忘录

+
+
+ 删除   + {{content}} +
+ +
+
暂无数据
+
添加一个 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" } }