From 6fa4d1aa3929346b2cfc860717da7b91f2aedb93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=B1=9F=E9=BE=99?= Date: Mon, 7 Oct 2024 14:09:29 +0800 Subject: [PATCH 1/6] chore: add command-services lib --- .npmrc | 5 + packages/command-services-vue/.gitignore | 24 + .../.vscode/extensions.json | 3 + packages/command-services-vue/README.md | 5 + packages/command-services-vue/index.html | 13 + .../lib/data-services/base-data.service.ts | 47 + .../lib/data-services/cancel-data.service.ts | 30 + .../lib/data-services/create-data.service.ts | 40 + .../lib/data-services/index.ts | 7 + .../lib/data-services/load-data.service.ts | 42 + .../lib/data-services/remove-data.service.ts | 31 + .../lib/data-services/save-data.service.ts | 26 + .../lib/data-services/update-data.service.ts | 30 + .../devkit-services/entity-state.service.ts | 41 + .../lib/devkit-services/index.ts | 1 + packages/command-services-vue/lib/index.ts | 3 + .../command-services-vue/lib/providers.ts | 19 + packages/command-services-vue/package.json | 34 + .../scripts/commands/build.js | 64 ++ .../scripts/commands/vite.config.js | 52 ++ .../command-services-vue/scripts/index.js | 7 + .../scripts/plugins/replace.js | 12 + packages/command-services-vue/src/app.vue | 11 + .../command-services-vue/src/assets/vue.svg | 1 + packages/command-services-vue/src/main.ts | 19 + .../command-services-vue/src/router/index.ts | 19 + packages/command-services-vue/src/style.css | 0 .../src/views/card/card.vue | 133 +++ .../views/card/viewmodel/card-entity-state.ts | 8 + .../src/views/card/viewmodel/card-form.ts | 63 ++ .../src/views/card/viewmodel/card-proxy.ts | 20 + .../views/card/viewmodel/card-viewmodel.ts | 30 + .../views/card/viewmodel/card.repository.ts | 16 + .../views/card/viewmodel/entities/index.ts | 1 + .../card/viewmodel/entities/main-entity.ts | 68 ++ .../card/viewmodel/handlers/add.handler.ts | 15 + .../card/viewmodel/handlers/edit.handler.ts | 17 + .../views/card/viewmodel/handlers/index.ts | 4 + .../card/viewmodel/handlers/load.handler.ts | 18 + .../card/viewmodel/handlers/view.handler.ts | 17 + .../src/views/card/viewmodel/index.ts | 8 + .../views/card/viewmodel/services/index.ts | 1 + .../card/viewmodel/services/param.service.ts | 8 + .../src/views/list/list.vue | 171 ++++ .../views/list/viewmodel/entities/index.ts | 1 + .../list/viewmodel/entities/main-entity.ts | 62 ++ .../list/viewmodel/handlers/add.handler.ts | 19 + .../list/viewmodel/handlers/edit.handler.ts | 19 + .../views/list/viewmodel/handlers/index.ts | 4 + .../list/viewmodel/handlers/load.handler.ts | 16 + .../list/viewmodel/handlers/view.handler.ts | 19 + .../src/views/list/viewmodel/index.ts | 6 + .../views/list/viewmodel/list-entity-state.ts | 30 + .../src/views/list/viewmodel/list-proxy.ts | 20 + .../src/views/list/viewmodel/list-ui-state.ts | 16 + .../views/list/viewmodel/list-viewmodel.ts | 88 ++ .../views/list/viewmodel/list.repository.ts | 27 + .../views/list/viewmodel/services/index.ts | 1 + .../list/viewmodel/services/list.service.ts | 22 + .../command-services-vue/src/vite-env.d.ts | 1 + packages/command-services-vue/tsconfig.json | 36 + .../command-services-vue/tsconfig.node.json | 14 + packages/command-services-vue/vite.config.ts | 26 + pnpm-lock.yaml | 836 +++++++++++++++--- pnpm-workspace.yaml | 1 + 65 files changed, 2304 insertions(+), 144 deletions(-) create mode 100644 packages/command-services-vue/.gitignore create mode 100644 packages/command-services-vue/.vscode/extensions.json create mode 100644 packages/command-services-vue/README.md create mode 100644 packages/command-services-vue/index.html create mode 100644 packages/command-services-vue/lib/data-services/base-data.service.ts create mode 100644 packages/command-services-vue/lib/data-services/cancel-data.service.ts create mode 100644 packages/command-services-vue/lib/data-services/create-data.service.ts create mode 100644 packages/command-services-vue/lib/data-services/index.ts create mode 100644 packages/command-services-vue/lib/data-services/load-data.service.ts create mode 100644 packages/command-services-vue/lib/data-services/remove-data.service.ts create mode 100644 packages/command-services-vue/lib/data-services/save-data.service.ts create mode 100644 packages/command-services-vue/lib/data-services/update-data.service.ts create mode 100644 packages/command-services-vue/lib/devkit-services/entity-state.service.ts create mode 100644 packages/command-services-vue/lib/devkit-services/index.ts create mode 100644 packages/command-services-vue/lib/index.ts create mode 100644 packages/command-services-vue/lib/providers.ts create mode 100644 packages/command-services-vue/package.json create mode 100644 packages/command-services-vue/scripts/commands/build.js create mode 100644 packages/command-services-vue/scripts/commands/vite.config.js create mode 100644 packages/command-services-vue/scripts/index.js create mode 100644 packages/command-services-vue/scripts/plugins/replace.js create mode 100644 packages/command-services-vue/src/app.vue create mode 100644 packages/command-services-vue/src/assets/vue.svg create mode 100644 packages/command-services-vue/src/main.ts create mode 100644 packages/command-services-vue/src/router/index.ts create mode 100644 packages/command-services-vue/src/style.css create mode 100644 packages/command-services-vue/src/views/card/card.vue create mode 100644 packages/command-services-vue/src/views/card/viewmodel/card-entity-state.ts create mode 100644 packages/command-services-vue/src/views/card/viewmodel/card-form.ts create mode 100644 packages/command-services-vue/src/views/card/viewmodel/card-proxy.ts create mode 100644 packages/command-services-vue/src/views/card/viewmodel/card-viewmodel.ts create mode 100644 packages/command-services-vue/src/views/card/viewmodel/card.repository.ts create mode 100644 packages/command-services-vue/src/views/card/viewmodel/entities/index.ts create mode 100644 packages/command-services-vue/src/views/card/viewmodel/entities/main-entity.ts create mode 100644 packages/command-services-vue/src/views/card/viewmodel/handlers/add.handler.ts create mode 100644 packages/command-services-vue/src/views/card/viewmodel/handlers/edit.handler.ts create mode 100644 packages/command-services-vue/src/views/card/viewmodel/handlers/index.ts create mode 100644 packages/command-services-vue/src/views/card/viewmodel/handlers/load.handler.ts create mode 100644 packages/command-services-vue/src/views/card/viewmodel/handlers/view.handler.ts create mode 100644 packages/command-services-vue/src/views/card/viewmodel/index.ts create mode 100644 packages/command-services-vue/src/views/card/viewmodel/services/index.ts create mode 100644 packages/command-services-vue/src/views/card/viewmodel/services/param.service.ts create mode 100644 packages/command-services-vue/src/views/list/list.vue create mode 100644 packages/command-services-vue/src/views/list/viewmodel/entities/index.ts create mode 100644 packages/command-services-vue/src/views/list/viewmodel/entities/main-entity.ts create mode 100644 packages/command-services-vue/src/views/list/viewmodel/handlers/add.handler.ts create mode 100644 packages/command-services-vue/src/views/list/viewmodel/handlers/edit.handler.ts create mode 100644 packages/command-services-vue/src/views/list/viewmodel/handlers/index.ts create mode 100644 packages/command-services-vue/src/views/list/viewmodel/handlers/load.handler.ts create mode 100644 packages/command-services-vue/src/views/list/viewmodel/handlers/view.handler.ts create mode 100644 packages/command-services-vue/src/views/list/viewmodel/index.ts create mode 100644 packages/command-services-vue/src/views/list/viewmodel/list-entity-state.ts create mode 100644 packages/command-services-vue/src/views/list/viewmodel/list-proxy.ts create mode 100644 packages/command-services-vue/src/views/list/viewmodel/list-ui-state.ts create mode 100644 packages/command-services-vue/src/views/list/viewmodel/list-viewmodel.ts create mode 100644 packages/command-services-vue/src/views/list/viewmodel/list.repository.ts create mode 100644 packages/command-services-vue/src/views/list/viewmodel/services/index.ts create mode 100644 packages/command-services-vue/src/views/list/viewmodel/services/list.service.ts create mode 100644 packages/command-services-vue/src/vite-env.d.ts create mode 100644 packages/command-services-vue/tsconfig.json create mode 100644 packages/command-services-vue/tsconfig.node.json create mode 100644 packages/command-services-vue/vite.config.ts diff --git a/.npmrc b/.npmrc index 6c59086d86..e696c04ed1 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,6 @@ enable-pre-post-scripts=true +sass_binary_site=https://registry.npmmirror.com/mirrors/node-sass/ +phantomjs_cdnurl=https://registry.npmmirror.com/mirrors/phantomjs/ +electron_mirror=https://registry.npmmirror.com/mirrors/electron/ +registry=https://registry.npmmirror.com +disturl=https://npmmirror.com/mirrors/node \ No newline at end of file diff --git a/packages/command-services-vue/.gitignore b/packages/command-services-vue/.gitignore new file mode 100644 index 0000000000..a547bf36d8 --- /dev/null +++ b/packages/command-services-vue/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/packages/command-services-vue/.vscode/extensions.json b/packages/command-services-vue/.vscode/extensions.json new file mode 100644 index 0000000000..a7cea0b067 --- /dev/null +++ b/packages/command-services-vue/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["Vue.volar"] +} diff --git a/packages/command-services-vue/README.md b/packages/command-services-vue/README.md new file mode 100644 index 0000000000..33895ab200 --- /dev/null +++ b/packages/command-services-vue/README.md @@ -0,0 +1,5 @@ +# Vue 3 + TypeScript + Vite + +This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 ` + + diff --git a/packages/command-services-vue/lib/data-services/base-data.service.ts b/packages/command-services-vue/lib/data-services/base-data.service.ts new file mode 100644 index 0000000000..fc68c87e8b --- /dev/null +++ b/packages/command-services-vue/lib/data-services/base-data.service.ts @@ -0,0 +1,47 @@ +import { ViewModel, Entity, EntityState, Form } from '@farris/devkit-vue'; +import { BefRepository } from '@farris/bef-vue'; + +/** + * 基础数据服务 + */ +class BaseDataService { + /** + * 视图模型 + */ + protected viewModel: ViewModel; + + /** + * 数据仓库 + */ + protected repository: BefRepository; + + /** + * 实体状态 + */ + protected entityState: EntityState; + + /** + * 表单 + */ + protected form: Form; + + /** + * 构造函数 + */ + constructor(viewModel: ViewModel) { + this.viewModel = viewModel; + this.repository = viewModel.respository as BefRepository; + this.entityState = viewModel.entityState as EntityState; + this.form = viewModel.form as Form; + } + + /** + * 获取服务实例 + */ + public getService(token: any, defaultValue?: any): T { + const injector = this.viewModel.getInjector(); + return injector.get(token, defaultValue); + } +} + +export { BaseDataService } \ No newline at end of file diff --git a/packages/command-services-vue/lib/data-services/cancel-data.service.ts b/packages/command-services-vue/lib/data-services/cancel-data.service.ts new file mode 100644 index 0000000000..c89806d8be --- /dev/null +++ b/packages/command-services-vue/lib/data-services/cancel-data.service.ts @@ -0,0 +1,30 @@ +import { ViewModel } from '@farris/devkit-vue'; +import { BaseDataService } from './base-data.service'; +import { UpdateDataService } from './update-data.service'; + +/** + * 数据取消服务 + */ +class CancelDataService extends BaseDataService { + + /** + * 构造函数 + */ + constructor(viewModel: ViewModel) { + super(viewModel); + } + + /** + * 取消方法 + */ + public cancel() { + this.repository.cancelEntityChanges().then(() => { + const updateService = this.getService(UpdateDataService); + const currentEntity = this.entityState.getCurrentEntity(); + return updateService.update(currentEntity.idValue); + }); + } + +} + +export { CancelDataService }; diff --git a/packages/command-services-vue/lib/data-services/create-data.service.ts b/packages/command-services-vue/lib/data-services/create-data.service.ts new file mode 100644 index 0000000000..42340bc8e2 --- /dev/null +++ b/packages/command-services-vue/lib/data-services/create-data.service.ts @@ -0,0 +1,40 @@ +import { ViewModel, Entity } from '@farris/devkit-vue'; +import { BaseDataService } from './base-data.service'; + +/** + * 数据新增服务 + */ +class CreateDataService extends BaseDataService { + + /** + * 构造函数 + */ + constructor(viewModel: ViewModel) { + super(viewModel); + } + + /** + * 新增数据 + */ + public create(): Promise { + const createPromise = this.repository.createEntity().then((entity: Entity) => { + this.entityState.loadEntities([entity]); + return entity; + }); + return createPromise; + } + + /** + * 追加新数据 + */ + public append() { + const createPromise = this.repository.createEntity().then((entity: Entity) => { + this.entityState.appendEntities([entity]); + return entity; + }); + return createPromise; + } + +} + +export { CreateDataService } \ No newline at end of file diff --git a/packages/command-services-vue/lib/data-services/index.ts b/packages/command-services-vue/lib/data-services/index.ts new file mode 100644 index 0000000000..1b9360fd1b --- /dev/null +++ b/packages/command-services-vue/lib/data-services/index.ts @@ -0,0 +1,7 @@ +export * from './base-data.service'; +export * from './load-data.service'; +export * from './create-data.service'; +export * from './remove-data.service'; +export * from './save-data.service'; +export * from './cancel-data.service'; +export * from './update-data.service'; diff --git a/packages/command-services-vue/lib/data-services/load-data.service.ts b/packages/command-services-vue/lib/data-services/load-data.service.ts new file mode 100644 index 0000000000..2d0780fb26 --- /dev/null +++ b/packages/command-services-vue/lib/data-services/load-data.service.ts @@ -0,0 +1,42 @@ +import { ViewModel, Entity } from '@farris/devkit-vue'; +import { BaseDataService } from './base-data.service'; + +/** + * 数据加载服务 + */ +class LoadDataService extends BaseDataService { + + /** + * 构造函数 + */ + constructor(viewModel: ViewModel) { + super(viewModel); + } + + /** + * 加载数据 + */ + public load(): Promise { + const loadPromise = this.repository.getEntities([], [], 20, 1).then((entities: Entity[]) => { + this.entityState.loadEntities(entities); + return entities; + }); + + return loadPromise; + } + + /** + *加载实体 + */ + public loadById(id: string): Promise { + const loadPromise = this.repository.getEntityById(id).then((entity: Entity) => { + this.entityState.loadEntities([entity]); + return entity; + }); + + return loadPromise; + } + +} + +export { LoadDataService }; diff --git a/packages/command-services-vue/lib/data-services/remove-data.service.ts b/packages/command-services-vue/lib/data-services/remove-data.service.ts new file mode 100644 index 0000000000..4eaa545820 --- /dev/null +++ b/packages/command-services-vue/lib/data-services/remove-data.service.ts @@ -0,0 +1,31 @@ +import { ViewModel } from '@farris/devkit-vue'; +import { BaseDataService } from './base-data.service'; + +/** + * 数据删除服务 + */ +class RemoveDataService extends BaseDataService { + + /** + * 构造函数 + */ + constructor(viewModel: ViewModel) { + super(viewModel); + } + + /** + * 删除方法 + */ + public remove() { + const currentEntity = this.entityState.getCurrentEntity(); + const id = currentEntity.idValue; + const removePromsie = this.repository.removeAndSaveEntityById(id).then(() => { + this.entityState.removeEntityById(id); + }); + + return removePromsie; + } + +} + +export { RemoveDataService }; diff --git a/packages/command-services-vue/lib/data-services/save-data.service.ts b/packages/command-services-vue/lib/data-services/save-data.service.ts new file mode 100644 index 0000000000..e79e472fdd --- /dev/null +++ b/packages/command-services-vue/lib/data-services/save-data.service.ts @@ -0,0 +1,26 @@ +import { ViewModel, Entity } from '@farris/devkit-vue'; +import { BaseDataService } from './base-data.service'; + +/** + * 数据保存服务 + */ +class SaveDataService extends BaseDataService { + + /** + * 构造函数 + */ + constructor(viewModel: ViewModel) { + super(viewModel); + } + + /** + * 保存成功 + */ + public save() { + return this.repository.saveEntityChanges(); + } + + +} + +export { SaveDataService } \ No newline at end of file diff --git a/packages/command-services-vue/lib/data-services/update-data.service.ts b/packages/command-services-vue/lib/data-services/update-data.service.ts new file mode 100644 index 0000000000..8e45447abc --- /dev/null +++ b/packages/command-services-vue/lib/data-services/update-data.service.ts @@ -0,0 +1,30 @@ +import { ViewModel, Entity } from '@farris/devkit-vue'; +import { BaseDataService } from './base-data.service'; + +/** + * 更新数据服务 + */ +class UpdateDataService extends BaseDataService { + + /** + * 构造函数 + */ + constructor(viewModel: ViewModel) { + super(viewModel); + } + + /** + *加载实体 + */ + public update(id: string): Promise { + const loadPromise = this.repository.getEntityById(id).then((newEntity: Entity) => { + const newEntityData = newEntity.toJSON(); + this.entityState.updateEntityById(id, newEntityData); + }); + + return loadPromise; + } + +} + +export { UpdateDataService }; diff --git a/packages/command-services-vue/lib/devkit-services/entity-state.service.ts b/packages/command-services-vue/lib/devkit-services/entity-state.service.ts new file mode 100644 index 0000000000..5e948b7ab6 --- /dev/null +++ b/packages/command-services-vue/lib/devkit-services/entity-state.service.ts @@ -0,0 +1,41 @@ +import { ViewModel, Entity, EntityState, Form } from '@farris/devkit-vue'; + +/** + * 实体状体服务 + */ +class EntityStateService { + + /** + * 视图模型 + */ + private viewModel: ViewModel; + + /** + * 实体状态 + */ + private entityState: EntityState; + + /** + * 构造函数 + */ + constructor(viewModel: ViewModel) { + this.viewModel = viewModel; + this.entityState = viewModel.entityState as EntityState; + } + + /** + * 改变当前行 + */ + public changeCurrentEntity(id: string): void { + this.entityState.changeCurrentEntityById(id); + } + + /** + * 设置当前实体 + */ + public changeCurrentEntityByPath(path: string, id: string): void { + this.entityState.changeCurrentEntityByPath(path, id); + } +} + +export { EntityStateService }; diff --git a/packages/command-services-vue/lib/devkit-services/index.ts b/packages/command-services-vue/lib/devkit-services/index.ts new file mode 100644 index 0000000000..d0b614e518 --- /dev/null +++ b/packages/command-services-vue/lib/devkit-services/index.ts @@ -0,0 +1 @@ +export * from './entity-state.service'; \ No newline at end of file diff --git a/packages/command-services-vue/lib/index.ts b/packages/command-services-vue/lib/index.ts new file mode 100644 index 0000000000..1c8f360d74 --- /dev/null +++ b/packages/command-services-vue/lib/index.ts @@ -0,0 +1,3 @@ +export * from './data-services/index'; +export * from './devkit-services/index'; +export * from './providers'; \ No newline at end of file diff --git a/packages/command-services-vue/lib/providers.ts b/packages/command-services-vue/lib/providers.ts new file mode 100644 index 0000000000..7ffbeb7700 --- /dev/null +++ b/packages/command-services-vue/lib/providers.ts @@ -0,0 +1,19 @@ +import { ViewModel, StaticProvider } from '@farris/devkit-vue'; +import { EntityStateService } from './devkit-services/index'; +import { + LoadDataService, CreateDataService, RemoveDataService, SaveDataService, + CancelDataService, UpdateDataService +} from './data-services/index'; + +const commandServiceProviders: StaticProvider[] = [ + { provide: LoadDataService, useClass: LoadDataService, deps: [ViewModel] }, + { provide: CreateDataService, useClass: CreateDataService, deps: [ViewModel] }, + { provide: RemoveDataService, useClass: RemoveDataService, deps: [ViewModel] }, + { provide: SaveDataService, useClass: SaveDataService, deps: [ViewModel] }, + { provide: CancelDataService, useClass: CancelDataService, deps: [ViewModel] }, + { provide: SaveDataService, useClass: SaveDataService, deps: [ViewModel] }, + { provide: UpdateDataService, useClass: UpdateDataService, deps: [ViewModel] }, + { provide: EntityStateService, useClass: EntityStateService, deps: [ViewModel] }, +]; + +export { commandServiceProviders }; \ No newline at end of file diff --git a/packages/command-services-vue/package.json b/packages/command-services-vue/package.json new file mode 100644 index 0000000000..5c912fd91e --- /dev/null +++ b/packages/command-services-vue/package.json @@ -0,0 +1,34 @@ +{ + "name": "@farris/command-services-vue", + "private": true, + "version": "0.0.1", + "license": "Apache-2.0", + "type": "module", + "description": "Render schema to web page with farris ui.", + "keywords": [ + "farris", + "command-services" + ], + "homepage": "https://farris-design.gitee.io/farris-vue/", + "repository": { + "type": "git", + "url": "git@gitee.com:ubml/farris-vue.git" + }, + "scripts": { + "dev": "vite", + "build": "vue-tsc -b && vite build", + "preview": "vite preview" + }, + "dependencies": { + "vue": "^3.4.37", + "vue-router": "^4.3.0", + "@farris/ui-vue": "latest" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^5.1.2", + "typescript": "^5.5.3", + "vite": "^5.4.1", + "vue-tsc": "^2.0.29", + "tslib": "^2.7.0" + } +} \ No newline at end of file diff --git a/packages/command-services-vue/scripts/commands/build.js b/packages/command-services-vue/scripts/commands/build.js new file mode 100644 index 0000000000..c21fa7cd09 --- /dev/null +++ b/packages/command-services-vue/scripts/commands/build.js @@ -0,0 +1,64 @@ +const { resolve } = require("path"); +const fsExtra = require("fs-extra"); +const { omit } = require("lodash"); +const { build } = require("vite"); +const dts = require("vite-plugin-dts"); +const replace = require("../plugins/replace"); +const getViteConfig = require("./vite.config"); +const package = require("../../package.json"); + +const CWD = process.cwd(); + +const getVersion = () => { + const versionNums = package.version.split("."); + return versionNums + .map((num, index) => (index === versionNums.length - 1 ? +num + 1 : num)) + .join("."); +}; + +const createPackageJson = async (version) => { + package.version = getVersion(version); + package.main = "./index.umd.js"; + package.module = "./index.esm.js"; + package.style = "./style.css"; + package.dependencies = omit(package.dependencies, ""); + package.types = "./types/index.d.ts"; + package.private = false; + const fileStr = JSON.stringify( + omit(package, "scripts", "devDependencies"), + null, + 2 + ); + await fsExtra.outputFile( + resolve(CWD, "./dist/mobile-command-services-vue", `package.json`), + fileStr, + "utf-8" + ); +}; + +exports.build = async () => { + const lib = { + entry: resolve(CWD, "./lib/index.ts"), + name: "FarrisCommandServicesVue", + fileName: "index", + formats: ["esm", "umd"], + }; + + const outDir = resolve(CWD, "./dist/mobile-command-services-vue"); + const plugins = [dts({ + entryRoot: "./lib", + outputDir: resolve(CWD, "./dist/mobile-command-services-vue/types"), + include: [ + "./lib/**/*.ts", + "./lib/**/*.tsx", + "./lib/**/*.vue", + ], + noEmitOnError: false, + skipDiagnostics: true, + }), replace({ path: (format, args) => `.${args[1]}/index.${format}.js` })]; + const config = getViteConfig({ lib, outDir, plugins }); + + await build(config); + + await createPackageJson(); +}; diff --git a/packages/command-services-vue/scripts/commands/vite.config.js b/packages/command-services-vue/scripts/commands/vite.config.js new file mode 100644 index 0000000000..24aca97a9c --- /dev/null +++ b/packages/command-services-vue/scripts/commands/vite.config.js @@ -0,0 +1,52 @@ +const { resolve } = require("path"); +const { defineConfig } = require("vite"); +const vue = require("@vitejs/plugin-vue"); +const vueJsx = require("@vitejs/plugin-vue-jsx"); + +module.exports = function (options) { + const { lib, outDir, minify = true, plugins = [] } = options; + return defineConfig({ + configFile: false, + publicDir: false, + plugins: [ + vue(), + vueJsx(), + ...plugins + ], + resolve: { + alias: [{ find: "@", replacement: resolve(__dirname, "../../") }], + }, + build: { + lib, + outDir, + minify, + rollupOptions: { + // external: ["vue", "@vueuse/core", "@vue/shared", "dayjs"], + external: (id) => { + const items = [ + "vue", + "@vueuse/core", + "@vue/shared", + "dayjs", + "@/components" + ]; + return items.find((item) => id.indexOf(item) === 0); + }, + output: { + exports: "named", + globals: (id) => { + if (id.includes('@/components')) { + const name = id.split('/').pop(); + return name.slice(0, 1).toUpperCase() + name.slice(1); + } + const map = { + vue: "Vue", + dayjs: "dayjs", + }; + return map[id]; + } + }, + }, + }, + }) +} \ No newline at end of file diff --git a/packages/command-services-vue/scripts/index.js b/packages/command-services-vue/scripts/index.js new file mode 100644 index 0000000000..afa37e5570 --- /dev/null +++ b/packages/command-services-vue/scripts/index.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node +const { Command } = require('commander'); +const { build } = require('./commands/build'); + +const program = new Command(); +program.command('build').description('构建 Farris Mobile Command Services For Vue').action(build); +program.parse(); diff --git a/packages/command-services-vue/scripts/plugins/replace.js b/packages/command-services-vue/scripts/plugins/replace.js new file mode 100644 index 0000000000..0f1688deca --- /dev/null +++ b/packages/command-services-vue/scripts/plugins/replace.js @@ -0,0 +1,12 @@ +module.exports = function replace({ path }) { + return { + name: 'farris-replace', + renderChunk(code, chunk) { + const fileNames = chunk.fileName.split('.'); + const format = fileNames[fileNames.length - 2]; + return code.replace(/@\/components(\/\w+)/g, (...args) => { + return path(format, args); + }); + } + }; +}; diff --git a/packages/command-services-vue/src/app.vue b/packages/command-services-vue/src/app.vue new file mode 100644 index 0000000000..e0a7a772e4 --- /dev/null +++ b/packages/command-services-vue/src/app.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/packages/command-services-vue/src/assets/vue.svg b/packages/command-services-vue/src/assets/vue.svg new file mode 100644 index 0000000000..770e9d333e --- /dev/null +++ b/packages/command-services-vue/src/assets/vue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/command-services-vue/src/main.ts b/packages/command-services-vue/src/main.ts new file mode 100644 index 0000000000..6f0c8704a0 --- /dev/null +++ b/packages/command-services-vue/src/main.ts @@ -0,0 +1,19 @@ +import { createApp } from 'vue'; +import FarrisUI from '@farris/ui-vue'; +import { createDevkit } from '@farris/devkit-vue'; +import '@farris/ui-vue/style.css'; +import router from './router/index'; +import './style.css'; +import App from './app.vue'; + +const app = createApp(App); +app.use(router); +// use farris ui +app.use(FarrisUI); + +// devkit +const devkit = createDevkit({ + providers: [] +}); +app.use(devkit); +app.mount('#app'); diff --git a/packages/command-services-vue/src/router/index.ts b/packages/command-services-vue/src/router/index.ts new file mode 100644 index 0000000000..52c9e8461c --- /dev/null +++ b/packages/command-services-vue/src/router/index.ts @@ -0,0 +1,19 @@ +import { createRouter, createWebHistory } from 'vue-router'; +import List from '../views/list/list.vue'; +import Card from '../views/card/card.vue'; + +const router = createRouter({ + history: createWebHistory(), + routes: [ + { + path: '/', + component: List + }, + { + path: '/card', + component: Card + } + ] +}); + +export default router; diff --git a/packages/command-services-vue/src/style.css b/packages/command-services-vue/src/style.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/command-services-vue/src/views/card/card.vue b/packages/command-services-vue/src/views/card/card.vue new file mode 100644 index 0000000000..688cf355d0 --- /dev/null +++ b/packages/command-services-vue/src/views/card/card.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/packages/command-services-vue/src/views/card/viewmodel/card-entity-state.ts b/packages/command-services-vue/src/views/card/viewmodel/card-entity-state.ts new file mode 100644 index 0000000000..606d2cbb8d --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/card-entity-state.ts @@ -0,0 +1,8 @@ +import { EntityState } from '@farris/devkit-vue'; +import { MainEntity } from './entities/index'; + +export class CardEntityState extends EntityState { + constructor() { + super(MainEntity); + } +} diff --git a/packages/command-services-vue/src/views/card/viewmodel/card-form.ts b/packages/command-services-vue/src/views/card/viewmodel/card-form.ts new file mode 100644 index 0000000000..6ded16ffbf --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/card-form.ts @@ -0,0 +1,63 @@ +import { Form, ControlProp, BindingType, FormControl, ViewModel } from '@farris/devkit-vue'; + +export class CardForm extends Form { + + constructor(viewModel: ViewModel) { + super(viewModel); + } + + @ControlProp({ + bindingType: BindingType.EntityState, + bindingPath: '/id' + }) + public id: FormControl; + + @ControlProp({ + bindingType: BindingType.EntityState, + bindingPath: '/version' + }) + public version: FormControl; + + @ControlProp({ + bindingType: BindingType.EntityState, + bindingPath: '/string1' + }) + public string1: FormControl; + + @ControlProp({ + bindingType: BindingType.EntityState, + bindingPath: '/string2' + }) + public string2: FormControl; + + @ControlProp({ + bindingType: BindingType.EntityState, + bindingPath: '/float1' + }) + public float1: FormControl; + + @ControlProp({ + bindingType: BindingType.EntityState, + bindingPath: '/number1' + }) + public number1: FormControl; + + @ControlProp({ + bindingType: BindingType.EntityState, + bindingPath: '/date1' + }) + public date1: FormControl; + + @ControlProp({ + bindingType: BindingType.EntityState, + bindingPath: '/dateTime1' + }) + public dateTime1: FormControl; + + @ControlProp({ + bindingType: BindingType.EntityState, + bindingPath: '/enum1' + }) + public enum1: FormControl; + +} diff --git a/packages/command-services-vue/src/views/card/viewmodel/card-proxy.ts b/packages/command-services-vue/src/views/card/viewmodel/card-proxy.ts new file mode 100644 index 0000000000..c6868fb2e7 --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/card-proxy.ts @@ -0,0 +1,20 @@ +import { HttpClient } from '@farris/devkit-vue'; +import { BefProxy } from '@farris/bef-vue'; + +/** + * 代理 + */ +export class CardProxy extends BefProxy { + + /** + * 基路径地址 + */ + public baseUrl = '/api/webapp/formtemplate/v1.0/mainlist1_frm'; + + /** + * 构造函数 + */ + constructor(httpClient: HttpClient) { + super(httpClient); + } +} diff --git a/packages/command-services-vue/src/views/card/viewmodel/card-viewmodel.ts b/packages/command-services-vue/src/views/card/viewmodel/card-viewmodel.ts new file mode 100644 index 0000000000..98bb731511 --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/card-viewmodel.ts @@ -0,0 +1,30 @@ +import { ViewModel, CommandAction } from '@farris/devkit-vue'; + +export class CardViewModel extends ViewModel { + public get inject() { + return this.injector; + } + + @CommandAction({ + name: 'add' + }) + public add() { } + + @CommandAction({ + name: 'edit', + params: { + id: '02b88225-fb84-45da-9109-1f8ee03d3565', + action: 'edit' + } + }) + public edit() { } + + @CommandAction({ + name: 'view', + params: { + id: '02b88225-fb84-45da-9109-1f8ee03d3565', + action: 'view' + } + }) + public view() { } +} diff --git a/packages/command-services-vue/src/views/card/viewmodel/card.repository.ts b/packages/command-services-vue/src/views/card/viewmodel/card.repository.ts new file mode 100644 index 0000000000..7d9869e23c --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/card.repository.ts @@ -0,0 +1,16 @@ +import { ViewModel, Type } from '@farris/devkit-vue'; +import { BefProxy, BefRepository } from '@farris/bef-vue'; +import { MainEntity } from './entities/index'; +import { CardProxy } from './card-proxy'; + +export class CardRepository extends BefRepository { + + public entityType = MainEntity; + + public apiProxyType: Type = CardProxy; + + constructor(viewModel: ViewModel) { + super(viewModel); + } + +} diff --git a/packages/command-services-vue/src/views/card/viewmodel/entities/index.ts b/packages/command-services-vue/src/views/card/viewmodel/entities/index.ts new file mode 100644 index 0000000000..a616fb7ddd --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/entities/index.ts @@ -0,0 +1 @@ +export * from './main-entity'; diff --git a/packages/command-services-vue/src/views/card/viewmodel/entities/main-entity.ts b/packages/command-services-vue/src/views/card/viewmodel/entities/main-entity.ts new file mode 100644 index 0000000000..47fa793309 --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/entities/main-entity.ts @@ -0,0 +1,68 @@ +import { Field, Entity } from '@farris/devkit-vue'; + +class MainEntity extends Entity { + + /** + * id + */ + @Field({ + primary: true + }) + public id: string; + + /** + * version + */ + @Field() + public version: string; + + /** + * string1 + */ + @Field() + public string1: string; + + /** + * string2 + */ + @Field() + public string2: string; + + /** + * float1 + */ + @Field() + public number1: any; + + /** + * float1 + */ + @Field() + public float1: any; + + /** + * bollean1 + */ + @Field() + public boolean1: any; + + /** + * date1 + */ + @Field() + public date1: any; + + /** + * dateTime1 + */ + @Field() + public dateTime1: string; + + /** + * enum1 + */ + @Field() + public enum1: any; +} + +export { MainEntity }; diff --git a/packages/command-services-vue/src/views/card/viewmodel/handlers/add.handler.ts b/packages/command-services-vue/src/views/card/viewmodel/handlers/add.handler.ts new file mode 100644 index 0000000000..14b1215c87 --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/handlers/add.handler.ts @@ -0,0 +1,15 @@ +import { CommandContext, CommandHandler } from '@farris/devkit-vue'; +import { CreateDataService } from '../../../../../lib'; + +export class AddHandler extends CommandHandler { + + public name = 'add'; + + constructor(private createDataService: CreateDataService) { + super(); + } + + execute(context: CommandContext) { + return this.createDataService.create(); + } +} diff --git a/packages/command-services-vue/src/views/card/viewmodel/handlers/edit.handler.ts b/packages/command-services-vue/src/views/card/viewmodel/handlers/edit.handler.ts new file mode 100644 index 0000000000..9f86480804 --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/handlers/edit.handler.ts @@ -0,0 +1,17 @@ +import { CommandContext, CommandHandler } from '@farris/devkit-vue'; +import { LoadDataService } from '../../../../../lib/index'; + +export class EditHandler extends CommandHandler { + + public name = 'edit'; + + constructor(private loadDataService: LoadDataService) { + super(); + } + + execute(context: CommandContext) { + console.log('execute edit action'); + const { id = null } = context.command.params; + this.loadDataService.loadById(id); + } +} diff --git a/packages/command-services-vue/src/views/card/viewmodel/handlers/index.ts b/packages/command-services-vue/src/views/card/viewmodel/handlers/index.ts new file mode 100644 index 0000000000..23f0c10421 --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/handlers/index.ts @@ -0,0 +1,4 @@ +export * from './add.handler'; +export * from './view.handler'; +export * from './edit.handler'; +export * from './load.handler'; diff --git a/packages/command-services-vue/src/views/card/viewmodel/handlers/load.handler.ts b/packages/command-services-vue/src/views/card/viewmodel/handlers/load.handler.ts new file mode 100644 index 0000000000..3b9a5dc7ed --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/handlers/load.handler.ts @@ -0,0 +1,18 @@ +import { CommandContext, CommandHandler } from '@farris/devkit-vue'; +import { ParamService } from '../services/index'; + +export class LoadHandler extends CommandHandler { + + public name = 'load'; + + constructor(private paramService: ParamService) { + super(); + } + + execute(context: CommandContext) { + const { id = null, action = null } = this.paramService.parseQuery(); + if(action){ + + } + } +} diff --git a/packages/command-services-vue/src/views/card/viewmodel/handlers/view.handler.ts b/packages/command-services-vue/src/views/card/viewmodel/handlers/view.handler.ts new file mode 100644 index 0000000000..73dcc23244 --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/handlers/view.handler.ts @@ -0,0 +1,17 @@ +import { CommandContext, CommandHandler } from '@farris/devkit-vue'; +import { LoadDataService } from '../../../../../lib/index'; + +export class ViewHandler extends CommandHandler { + + public name = 'view'; + + constructor(private loadDataService: LoadDataService) { + super(); + } + + execute(context: CommandContext) { + console.log('execute view action'); + const { id = null } = context.command.params; + this.loadDataService.loadById(id); + } +} diff --git a/packages/command-services-vue/src/views/card/viewmodel/index.ts b/packages/command-services-vue/src/views/card/viewmodel/index.ts new file mode 100644 index 0000000000..c7f638982c --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/index.ts @@ -0,0 +1,8 @@ +export * from './entities/index'; +export * from './services/index'; +export * from './handlers/index'; +export * from './card-entity-state'; +export * from './card-form'; +export * from './card-proxy'; +export * from './card.repository'; +export * from './card-viewmodel'; diff --git a/packages/command-services-vue/src/views/card/viewmodel/services/index.ts b/packages/command-services-vue/src/views/card/viewmodel/services/index.ts new file mode 100644 index 0000000000..6fbcc01af0 --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/services/index.ts @@ -0,0 +1 @@ +export * from './param.service'; diff --git a/packages/command-services-vue/src/views/card/viewmodel/services/param.service.ts b/packages/command-services-vue/src/views/card/viewmodel/services/param.service.ts new file mode 100644 index 0000000000..dcc99f2368 --- /dev/null +++ b/packages/command-services-vue/src/views/card/viewmodel/services/param.service.ts @@ -0,0 +1,8 @@ +import { useRoute } from 'vue-router'; + +export class ParamService { + parseQuery() { + const route = useRoute(); + return route.query; + } +} diff --git a/packages/command-services-vue/src/views/list/list.vue b/packages/command-services-vue/src/views/list/list.vue new file mode 100644 index 0000000000..8092ef23ff --- /dev/null +++ b/packages/command-services-vue/src/views/list/list.vue @@ -0,0 +1,171 @@ + + + + + + + diff --git a/packages/command-services-vue/src/views/list/viewmodel/entities/index.ts b/packages/command-services-vue/src/views/list/viewmodel/entities/index.ts new file mode 100644 index 0000000000..a616fb7ddd --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/entities/index.ts @@ -0,0 +1 @@ +export * from './main-entity'; diff --git a/packages/command-services-vue/src/views/list/viewmodel/entities/main-entity.ts b/packages/command-services-vue/src/views/list/viewmodel/entities/main-entity.ts new file mode 100644 index 0000000000..9c9f750d78 --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/entities/main-entity.ts @@ -0,0 +1,62 @@ +import { Field, Entity } from '@farris/devkit-vue'; + +class MainEntity extends Entity { + + /** + * id + */ + @Field({ + primary: true + }) + public id: string; + + /** + * version + */ + @Field() + public version: string; + + /** + * string1 + */ + @Field() + public string1: string; + + /** + * string2 + */ + @Field() + public string2: string; + + /** + * float1 + */ + @Field() + public float1: any; + + /** + * bollean1 + */ + @Field() + public boolean1: any; + + /** + * date1 + */ + @Field() + public date1: any; + + /** + * dateTime1 + */ + @Field() + public dateTime1: string; + + /** + * enum1 + */ + @Field() + public enum1: any; +} + +export { MainEntity }; diff --git a/packages/command-services-vue/src/views/list/viewmodel/handlers/add.handler.ts b/packages/command-services-vue/src/views/list/viewmodel/handlers/add.handler.ts new file mode 100644 index 0000000000..dea6857f9f --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/handlers/add.handler.ts @@ -0,0 +1,19 @@ +import { CommandContext, CommandHandler } from '@farris/devkit-vue'; +import { ListService } from '../services/index'; + +export class AddHandler extends CommandHandler { + + public name = 'add'; + + constructor(private listService: ListService) { + super(); + } + + execute(context: CommandContext) { + const args = [ + '', + 'add' + ]; + return this.invoke(this.listService, 'navigate', args, context); + } +} diff --git a/packages/command-services-vue/src/views/list/viewmodel/handlers/edit.handler.ts b/packages/command-services-vue/src/views/list/viewmodel/handlers/edit.handler.ts new file mode 100644 index 0000000000..effa0da0f4 --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/handlers/edit.handler.ts @@ -0,0 +1,19 @@ +import { CommandContext, CommandHandler } from '@farris/devkit-vue'; +import { ListService } from '../services/index'; + +export class EditHandler extends CommandHandler { + + public name = 'edit'; + + constructor(private listService: ListService) { + super(); + } + + execute(context: CommandContext) { + const args = [ + '02b88225-fb84-45da-9109-1f8ee03d3565', + 'edit' + ]; + return this.invoke(this.listService, 'navigate', args, context); + } +} diff --git a/packages/command-services-vue/src/views/list/viewmodel/handlers/index.ts b/packages/command-services-vue/src/views/list/viewmodel/handlers/index.ts new file mode 100644 index 0000000000..23f0c10421 --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/handlers/index.ts @@ -0,0 +1,4 @@ +export * from './add.handler'; +export * from './view.handler'; +export * from './edit.handler'; +export * from './load.handler'; diff --git a/packages/command-services-vue/src/views/list/viewmodel/handlers/load.handler.ts b/packages/command-services-vue/src/views/list/viewmodel/handlers/load.handler.ts new file mode 100644 index 0000000000..0ae3a2f95b --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/handlers/load.handler.ts @@ -0,0 +1,16 @@ +import { CommandContext, CommandHandler } from '@farris/devkit-vue'; +import { ListService } from '../services/index'; +import {LoadDataService} from '../../../../../lib/index'; + +export class LoadHandler extends CommandHandler { + + public name = 'load'; + + constructor(private loadDataService: LoadDataService) { + super(); + } + + execute(context: CommandContext) { + return this.loadDataService.load(); + } +} diff --git a/packages/command-services-vue/src/views/list/viewmodel/handlers/view.handler.ts b/packages/command-services-vue/src/views/list/viewmodel/handlers/view.handler.ts new file mode 100644 index 0000000000..7fe436a2fc --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/handlers/view.handler.ts @@ -0,0 +1,19 @@ +import { CommandContext, CommandHandler } from '@farris/devkit-vue'; +import { ListService } from '../services/index'; + +export class ViewHandler extends CommandHandler { + + public name = 'view'; + + constructor(private listService: ListService) { + super(); + } + + execute(context: CommandContext) { + const args = [ + '02b88225-fb84-45da-9109-1f8ee03d3565', + 'view' + ]; + return this.invoke(this.listService, 'navigate', args, context); + } +} diff --git a/packages/command-services-vue/src/views/list/viewmodel/index.ts b/packages/command-services-vue/src/views/list/viewmodel/index.ts new file mode 100644 index 0000000000..100a3f4b0f --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/index.ts @@ -0,0 +1,6 @@ +export * from './services/index'; +export * from './handlers/index'; +export * from './list.repository'; +export * from './list-viewmodel'; +export * from './list-entity-state'; +export * from './list-ui-state'; diff --git a/packages/command-services-vue/src/views/list/viewmodel/list-entity-state.ts b/packages/command-services-vue/src/views/list/viewmodel/list-entity-state.ts new file mode 100644 index 0000000000..4c8437c135 --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/list-entity-state.ts @@ -0,0 +1,30 @@ +import { ref, Ref } from 'vue'; +import { EntityState } from '@farris/devkit-vue'; +import { MainEntity } from './entities/index'; + +/** + * 列表页实体状态 + */ +class ListEntityState extends EntityState { + + /** + * 数据源 + */ + public data: Ref; + + /** + * 当前实体 + */ + public current: Ref; + + /** + * 构造函数 + */ + constructor() { + super(MainEntity); + this.data = ref(this.entityList.toJSON()); + this.current = ref(null); + } +} + +export { ListEntityState }; diff --git a/packages/command-services-vue/src/views/list/viewmodel/list-proxy.ts b/packages/command-services-vue/src/views/list/viewmodel/list-proxy.ts new file mode 100644 index 0000000000..f79b3c5c8b --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/list-proxy.ts @@ -0,0 +1,20 @@ +import { HttpClient } from '@farris/devkit-vue'; +import { BefProxy } from '@farris/bef-vue'; + +/** + * 代理 + */ +export class ListProxy extends BefProxy { + + /** + * 基路径地址 + */ + public baseUrl = '/api/webapp/formtemplate/v1.0/mainlist1_frm'; + + /** + * 构造函数 + */ + constructor(httpClient: HttpClient) { + super(httpClient); + } +} diff --git a/packages/command-services-vue/src/views/list/viewmodel/list-ui-state.ts b/packages/command-services-vue/src/views/list/viewmodel/list-ui-state.ts new file mode 100644 index 0000000000..8c6d43ecc0 --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/list-ui-state.ts @@ -0,0 +1,16 @@ +import { UIState } from '@farris/devkit-vue'; + +/** + * 员工列表UI状态 + */ +class ListUIState extends UIState { + + /** + * 构造函数 + */ + constructor() { + super(); + } +} + +export { ListUIState }; diff --git a/packages/command-services-vue/src/views/list/viewmodel/list-viewmodel.ts b/packages/command-services-vue/src/views/list/viewmodel/list-viewmodel.ts new file mode 100644 index 0000000000..79a067c6ad --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/list-viewmodel.ts @@ -0,0 +1,88 @@ +import { State, Getter, Action, CommandAction, ViewModel, EntityList } from '@farris/devkit-vue'; + +/** + * 列表视图模型 + */ +class ListViewModel extends ViewModel { + /** + * 部门信息 + */ + @State() + public deptInfo: any = { id: '', name: '' }; + + /** + * 数据源 + */ + @State() + public data: any[] = []; + + /** + * 总数 + */ + @Getter() + public get total(): number { + return this.data.length; + }; + + /** + * 加载数据 + */ + @Action() + public load1() { + // 加载部门数据 + this.deptInfo = { + id: '0001', + name: '产品研发部' + }; + } + + @CommandAction({ + name: 'load', + params: {} + }) + public load() { } + + @CommandAction({ + name: 'add', + params: {} + }) + public add() { } + + /** + * 打开卡片查看 + */ + @CommandAction({ + name: 'view', + params: { + id: '0001', + action: 'view' + } + }) + public view() { } + + /** + * 打开卡片编辑 + */ + @CommandAction({ + name: 'edit', + params: { + id: '0001', + action: 'edit' + } + }) + public edit() { } + + /** + * 打开卡片 + */ + @CommandAction({ + name: 'remove', + params: { + id: '0001' + } + }) + public remove() { } + +} + +export { ListViewModel }; diff --git a/packages/command-services-vue/src/views/list/viewmodel/list.repository.ts b/packages/command-services-vue/src/views/list/viewmodel/list.repository.ts new file mode 100644 index 0000000000..e890bd98f9 --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/list.repository.ts @@ -0,0 +1,27 @@ +import { ViewModel } from '@farris/devkit-vue'; +import {BefRepository} from '@farris/bef-vue'; +import { MainEntity } from './entities/index'; +import { ListProxy } from './list-proxy'; + +/** + * 员工实体仓库 + */ +class ListRepository extends BefRepository { + + public apiProxyType = ListProxy; + + /** + * Entity类型 + */ + public entityType = MainEntity; + + /** + * 构造函数 + */ + constructor(viewModel: ViewModel) { + super(viewModel); + } + +} + +export { ListRepository }; diff --git a/packages/command-services-vue/src/views/list/viewmodel/services/index.ts b/packages/command-services-vue/src/views/list/viewmodel/services/index.ts new file mode 100644 index 0000000000..032a0985a4 --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/services/index.ts @@ -0,0 +1 @@ +export * from './list.service'; diff --git a/packages/command-services-vue/src/views/list/viewmodel/services/list.service.ts b/packages/command-services-vue/src/views/list/viewmodel/services/list.service.ts new file mode 100644 index 0000000000..ceef8e0808 --- /dev/null +++ b/packages/command-services-vue/src/views/list/viewmodel/services/list.service.ts @@ -0,0 +1,22 @@ +import router from '../../../../router/index'; + +/** + * 主实体服务 + */ +export class ListService { + public navigate(id: string, action: string) { + const params: any = { action }; + if (id) { + params.id = id; + } + router.push({ path: '/card', query: params }); + } + + public load() { + + } + + public loadData(content: string) { + console.log('EmployeeService=>test】: ' + content); + } +} diff --git a/packages/command-services-vue/src/vite-env.d.ts b/packages/command-services-vue/src/vite-env.d.ts new file mode 100644 index 0000000000..11f02fe2a0 --- /dev/null +++ b/packages/command-services-vue/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/packages/command-services-vue/tsconfig.json b/packages/command-services-vue/tsconfig.json new file mode 100644 index 0000000000..a2442c1de8 --- /dev/null +++ b/packages/command-services-vue/tsconfig.json @@ -0,0 +1,36 @@ +{ + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "module": "ESNext", + "moduleResolution": "Node", + "strict": true, + "jsx": "preserve", + "sourceMap": true, + "resolveJsonModule": true, + "isolatedModules": false, + "esModuleInterop": true, + "lib": [ + "ESNext", + "DOM", + "dom.iterable", + "scripthost" + ], + "skipLibCheck": true, + "importHelpers": true, + "experimentalDecorators": true, + "verbatimModuleSyntax": false, + "strictPropertyInitialization": false, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "types": [ + "vitest/globals" + ] + }, + "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "test/**/*.ts"], + "references": [ + { + "path": "./tsconfig.node.json" + } + ] +} \ No newline at end of file diff --git a/packages/command-services-vue/tsconfig.node.json b/packages/command-services-vue/tsconfig.node.json new file mode 100644 index 0000000000..e564a46d42 --- /dev/null +++ b/packages/command-services-vue/tsconfig.node.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "strict": true, + "composite": true, + "module": "ESNext", + "moduleResolution": "Node", + "verbatimModuleSyntax": false, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true + }, + "include": [ + "vite.config.ts" + ] +} \ No newline at end of file diff --git a/packages/command-services-vue/vite.config.ts b/packages/command-services-vue/vite.config.ts new file mode 100644 index 0000000000..2a9715eace --- /dev/null +++ b/packages/command-services-vue/vite.config.ts @@ -0,0 +1,26 @@ +import { defineConfig } from 'vite'; +import vue from '@vitejs/plugin-vue'; +import path from 'path'; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [vue()], + server: { + proxy: { + "/api": { + target: "http://10.110.87.52:5200", + changeOrigin: true, + secure: false, + headers:{ + Cookie:'caf_web_session=OTViOThmNDMtY2YwZC00YmJmLWFjM2EtZmM0NTgwNWM5OGU5' + } + } + } + }, + resolve: { + alias: { + "@farris/devkit-vue": path.resolve(__dirname, "../devkit/lib/index"), + "@farris/bef-vue": path.resolve(__dirname, "../bef/lib/index") + } + } +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ed72790c60..81c3b21c19 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -68,7 +68,7 @@ importers: version: 15.2.3(rollup@4.18.0) '@testing-library/vue': specifier: ^8.0.0 - version: 8.1.0(@vue/compiler-sfc@3.4.31)(vue@3.4.31(typescript@5.5.3)) + version: 8.1.0(@vue/compiler-sfc@3.4.31)(vue@3.5.6(typescript@5.5.3)) '@types/crypto-js': specifier: ^4.2.2 version: 4.2.2 @@ -107,10 +107,10 @@ importers: version: 7.15.0(eslint@8.57.0)(typescript@5.5.3) '@vitejs/plugin-vue': specifier: ^5.0.0 - version: 5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3)) + version: 5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3)) '@vitejs/plugin-vue-jsx': specifier: ^4.0.0 - version: 4.0.0(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3)) + version: 4.0.0(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3)) '@vue/babel-plugin-jsx': specifier: ^1.2.2 version: 1.2.2(@babel/core@7.24.7) @@ -278,10 +278,10 @@ importers: version: 3.9.1(@types/node@18.19.39)(rollup@4.18.0)(typescript@5.5.3)(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6)) vite-plugin-md: specifier: ^0.21.5 - version: 0.21.5(@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6)(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6)) + version: 0.21.5(@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6)(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6)) vite-svg-loader: specifier: ^5.1.0 - version: 5.1.0(vue@3.4.31(typescript@5.5.3)) + version: 5.1.0(vue@3.5.6(typescript@5.5.3)) vitepress: specifier: ^1.0.0-alpha.8 version: 1.0.0-alpha.10(@algolia/client-search@4.24.0)(@types/node@18.19.39)(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(sass@1.77.6)(search-insights@2.14.0)(typescript@5.5.3) @@ -290,7 +290,7 @@ importers: version: 1.4.2(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(sass@1.77.6)(typescript@5.5.3) vitest: specifier: ^1.4.0 - version: 1.6.0(@types/node@18.19.39)(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6) + version: 1.6.0(@types/node@18.19.39)(happy-dom@14.12.3)(jsdom@20.0.3)(sass-embedded@1.77.5)(sass@1.77.6) vue-tsc: specifier: ^2.0.0 version: 2.0.26(typescript@5.5.3) @@ -398,7 +398,7 @@ importers: version: 4.5.3(@types/node@18.19.39)(sass@1.77.6) vite-plugin-dts: specifier: ^2.1.0 - version: 2.3.0(@types/node@18.19.39)(rollup@4.18.0)(vite@4.5.3(@types/node@18.19.39)(sass@1.77.6)) + version: 2.3.0(@types/node@18.19.39)(rollup@4.21.3)(vite@4.5.3(@types/node@18.19.39)(sass@1.77.6)) vite-plugin-md: specifier: ^0.20.0 version: 0.20.6(@vitejs/plugin-vue@4.6.2(vite@4.5.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@4.9.5)))(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6)(vite@4.5.3(@types/node@18.19.39)(sass@1.77.6)) @@ -458,7 +458,7 @@ importers: version: 4.5.3(@types/node@20.5.1)(sass@1.77.6) vite-plugin-dts: specifier: ^3.9.1 - version: 3.9.1(@types/node@20.5.1)(rollup@4.18.0)(typescript@4.9.5)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) + version: 3.9.1(@types/node@20.5.1)(rollup@4.21.3)(typescript@4.9.5)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) devDependencies: rimraf: specifier: ^5.0.7 @@ -467,6 +467,34 @@ importers: specifier: ^3.2.37 version: 3.4.31(typescript@4.9.5) + packages/command-services-vue: + dependencies: + '@farris/ui-vue': + specifier: latest + version: 1.1.8(@types/node@20.5.1)(rollup@4.18.0)(vite@5.4.6(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3)) + vue: + specifier: ^3.4.37 + version: 3.5.6(typescript@5.5.3) + vue-router: + specifier: ^4.3.0 + version: 4.4.0(vue@3.5.6(typescript@5.5.3)) + devDependencies: + '@vitejs/plugin-vue': + specifier: ^5.1.2 + version: 5.1.4(vite@5.4.6(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3)) + tslib: + specifier: ^2.7.0 + version: 2.7.0 + typescript: + specifier: ^5.5.3 + version: 5.5.3 + vite: + specifier: ^5.4.1 + version: 5.4.6(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6) + vue-tsc: + specifier: ^2.0.29 + version: 2.1.6(typescript@5.5.3) + packages/designer: dependencies: '@farris/ui-vue': @@ -474,7 +502,7 @@ importers: version: link:../ui-vue vite-plugin-dts: specifier: ^2.1.0 - version: 2.3.0(@types/node@20.5.1)(rollup@4.18.0)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) + version: 2.3.0(@types/node@20.5.1)(rollup@4.21.3)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) vue: specifier: ^3.2.37 version: 3.4.31(typescript@4.9.5) @@ -704,7 +732,7 @@ importers: version: 4.5.3(@types/node@20.5.1)(sass@1.77.6) vite-plugin-dts: specifier: ^2.1.0 - version: 2.1.0(@types/node@20.5.1)(rollup@4.18.0)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) + version: 2.1.0(@types/node@20.5.1)(rollup@4.21.3)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) vite-plugin-md: specifier: ^0.20.0 version: 0.20.6(@vitejs/plugin-vue@4.6.2(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6))(vue@3.4.31(typescript@4.9.5)))(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) @@ -752,7 +780,7 @@ importers: version: 9.27.0(eslint@8.57.0) vite-plugin-dts: specifier: ^2.1.0 - version: 2.3.0(@types/node@20.5.1)(rollup@4.18.0)(vite@3.2.10(@types/node@20.5.1)(sass@1.77.6)) + version: 2.3.0(@types/node@20.5.1)(rollup@4.21.3)(vite@3.2.10(@types/node@20.5.1)(sass@1.77.6)) vue: specifier: ^3.2.37 version: 3.4.31(typescript@4.9.5) @@ -947,7 +975,7 @@ importers: version: 4.5.3(@types/node@20.5.1)(sass@1.77.6) vite-plugin-dts: specifier: ^2.1.0 - version: 2.3.0(@types/node@20.5.1)(rollup@4.18.0)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) + version: 2.3.0(@types/node@20.5.1)(rollup@4.21.3)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) vite-plugin-md: specifier: ^0.20.0 version: 0.20.6(@vitejs/plugin-vue@4.6.2(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6))(vue@3.4.31(typescript@4.9.5)))(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) @@ -1053,7 +1081,7 @@ importers: version: 4.5.3(@types/node@20.5.1)(sass@1.77.6) vite-plugin-dts: specifier: ^2.1.0 - version: 2.3.0(@types/node@20.5.1)(rollup@4.18.0)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) + version: 2.3.0(@types/node@20.5.1)(rollup@4.21.3)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) vite-plugin-md: specifier: ^0.20.0 version: 0.20.6(@vitejs/plugin-vue@4.6.2(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6))(vue@3.4.31(typescript@4.9.5)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) @@ -1104,7 +1132,7 @@ importers: version: 4.17.21 vite-plugin-dts: specifier: ^2.1.0 - version: 2.3.0(@types/node@20.5.1)(rollup@4.18.0)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) + version: 2.3.0(@types/node@20.5.1)(rollup@4.21.3)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) vue: specifier: ^3.2.37 version: 3.4.31(typescript@4.9.5) @@ -1252,7 +1280,7 @@ importers: version: 7.8.1 vite-plugin-dts: specifier: ^2.1.0 - version: 2.3.0(@types/node@20.5.1)(rollup@4.18.0)(vite@5.3.3(@types/node@20.5.1)(sass@1.77.6)) + version: 2.3.0(@types/node@20.5.1)(rollup@4.21.3)(vite@5.3.3(@types/node@20.5.1)(sass@1.77.6)) vue: specifier: ^3.2.37 version: 3.4.31(typescript@5.5.3) @@ -1370,7 +1398,7 @@ importers: version: 1.4.2(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(sass@1.77.6)(typescript@5.5.3) vitest: specifier: ^1.4.0 - version: 1.6.0(@types/node@20.5.1)(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6) + version: 1.6.0(@types/node@20.5.1)(happy-dom@8.9.0)(jsdom@20.0.3)(sass-embedded@1.77.5)(sass@1.77.6) vue-tsc: specifier: ^2.0.0 version: 2.0.26(typescript@5.5.3) @@ -1561,6 +1589,10 @@ packages: resolution: {integrity: sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.24.8': + resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.24.7': resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} engines: {node: '>=6.9.0'} @@ -1591,6 +1623,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.25.6': + resolution: {integrity: sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.24.7': resolution: {integrity: sha512-TiT1ss81W80eQsN+722OaeQMY/G4yTb4G9JrqeiDADs3N8lbPMGldWi9x8tyqCW5NLx1Jh2AvkE6r6QvEltMMQ==} engines: {node: '>=6.9.0'} @@ -2079,6 +2116,10 @@ packages: resolution: {integrity: sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==} engines: {node: '>=6.9.0'} + '@babel/types@7.25.6': + resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==} + engines: {node: '>=6.9.0'} + '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} @@ -2814,6 +2855,9 @@ packages: '@farris/mobile-ui-vue@0.0.1-beta.3': resolution: {integrity: sha512-499FnKEf5OwEX+5w++AEi7KqpCASNJ0aVoLO6TOW82Rin9UKh8u36+4GdDwLjQiqW/qjoYXFItP21dZXcA/kCA==} + '@farris/ui-vue@1.1.8': + resolution: {integrity: sha512-hgsFz2UqJUpIX+5Mfrz1iJAvMOIMQ0djmX15C7KExwcXsVZ+dV62VsuRI2pyzaqd9zoXJAkQLkqGL0dj4XeaEw==} + '@francoischalifour/autocomplete-core@1.0.0-alpha.28': resolution: {integrity: sha512-rL9x+72btViw+9icfBKUJjZj87FgjFrD2esuTUqtj4RAX3s4AuVZiN8XEsfjQBSc6qJk31cxlvqZHC/BIyYXgg==} @@ -3064,90 +3108,179 @@ packages: cpu: [arm] os: [android] + '@rollup/rollup-android-arm-eabi@4.21.3': + resolution: {integrity: sha512-MmKSfaB9GX+zXl6E8z4koOr/xU63AMVleLEa64v7R0QF/ZloMs5vcD1sHgM64GXXS1csaJutG+ddtzcueI/BLg==} + cpu: [arm] + os: [android] + '@rollup/rollup-android-arm64@4.18.0': resolution: {integrity: sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==} cpu: [arm64] os: [android] + '@rollup/rollup-android-arm64@4.21.3': + resolution: {integrity: sha512-zrt8ecH07PE3sB4jPOggweBjJMzI1JG5xI2DIsUbkA+7K+Gkjys6eV7i9pOenNSDJH3eOr/jLb/PzqtmdwDq5g==} + cpu: [arm64] + os: [android] + '@rollup/rollup-darwin-arm64@4.18.0': resolution: {integrity: sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==} cpu: [arm64] os: [darwin] + '@rollup/rollup-darwin-arm64@4.21.3': + resolution: {integrity: sha512-P0UxIOrKNBFTQaXTxOH4RxuEBVCgEA5UTNV6Yz7z9QHnUJ7eLX9reOd/NYMO3+XZO2cco19mXTxDMXxit4R/eQ==} + cpu: [arm64] + os: [darwin] + '@rollup/rollup-darwin-x64@4.18.0': resolution: {integrity: sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==} cpu: [x64] os: [darwin] + '@rollup/rollup-darwin-x64@4.21.3': + resolution: {integrity: sha512-L1M0vKGO5ASKntqtsFEjTq/fD91vAqnzeaF6sfNAy55aD+Hi2pBI5DKwCO+UNDQHWsDViJLqshxOahXyLSh3EA==} + cpu: [x64] + os: [darwin] + '@rollup/rollup-linux-arm-gnueabihf@4.18.0': resolution: {integrity: sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==} cpu: [arm] os: [linux] libc: [glibc] + '@rollup/rollup-linux-arm-gnueabihf@4.21.3': + resolution: {integrity: sha512-btVgIsCjuYFKUjopPoWiDqmoUXQDiW2A4C3Mtmp5vACm7/GnyuprqIDPNczeyR5W8rTXEbkmrJux7cJmD99D2g==} + cpu: [arm] + os: [linux] + libc: [glibc] + '@rollup/rollup-linux-arm-musleabihf@4.18.0': resolution: {integrity: sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==} cpu: [arm] os: [linux] libc: [musl] + '@rollup/rollup-linux-arm-musleabihf@4.21.3': + resolution: {integrity: sha512-zmjbSphplZlau6ZTkxd3+NMtE4UKVy7U4aVFMmHcgO5CUbw17ZP6QCgyxhzGaU/wFFdTfiojjbLG3/0p9HhAqA==} + cpu: [arm] + os: [linux] + libc: [musl] + '@rollup/rollup-linux-arm64-gnu@4.18.0': resolution: {integrity: sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==} cpu: [arm64] os: [linux] libc: [glibc] + '@rollup/rollup-linux-arm64-gnu@4.21.3': + resolution: {integrity: sha512-nSZfcZtAnQPRZmUkUQwZq2OjQciR6tEoJaZVFvLHsj0MF6QhNMg0fQ6mUOsiCUpTqxTx0/O6gX0V/nYc7LrgPw==} + cpu: [arm64] + os: [linux] + libc: [glibc] + '@rollup/rollup-linux-arm64-musl@4.18.0': resolution: {integrity: sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==} cpu: [arm64] os: [linux] libc: [musl] + '@rollup/rollup-linux-arm64-musl@4.21.3': + resolution: {integrity: sha512-MnvSPGO8KJXIMGlQDYfvYS3IosFN2rKsvxRpPO2l2cum+Z3exiExLwVU+GExL96pn8IP+GdH8Tz70EpBhO0sIQ==} + cpu: [arm64] + os: [linux] + libc: [musl] + '@rollup/rollup-linux-powerpc64le-gnu@4.18.0': resolution: {integrity: sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==} cpu: [ppc64] os: [linux] libc: [glibc] + '@rollup/rollup-linux-powerpc64le-gnu@4.21.3': + resolution: {integrity: sha512-+W+p/9QNDr2vE2AXU0qIy0qQE75E8RTwTwgqS2G5CRQ11vzq0tbnfBd6brWhS9bCRjAjepJe2fvvkvS3dno+iw==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + '@rollup/rollup-linux-riscv64-gnu@4.18.0': resolution: {integrity: sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==} cpu: [riscv64] os: [linux] libc: [glibc] + '@rollup/rollup-linux-riscv64-gnu@4.21.3': + resolution: {integrity: sha512-yXH6K6KfqGXaxHrtr+Uoy+JpNlUlI46BKVyonGiaD74ravdnF9BUNC+vV+SIuB96hUMGShhKV693rF9QDfO6nQ==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + '@rollup/rollup-linux-s390x-gnu@4.18.0': resolution: {integrity: sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==} cpu: [s390x] os: [linux] libc: [glibc] + '@rollup/rollup-linux-s390x-gnu@4.21.3': + resolution: {integrity: sha512-R8cwY9wcnApN/KDYWTH4gV/ypvy9yZUHlbJvfaiXSB48JO3KpwSpjOGqO4jnGkLDSk1hgjYkTbTt6Q7uvPf8eg==} + cpu: [s390x] + os: [linux] + libc: [glibc] + '@rollup/rollup-linux-x64-gnu@4.18.0': resolution: {integrity: sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==} cpu: [x64] os: [linux] libc: [glibc] + '@rollup/rollup-linux-x64-gnu@4.21.3': + resolution: {integrity: sha512-kZPbX/NOPh0vhS5sI+dR8L1bU2cSO9FgxwM8r7wHzGydzfSjLRCFAT87GR5U9scj2rhzN3JPYVC7NoBbl4FZ0g==} + cpu: [x64] + os: [linux] + libc: [glibc] + '@rollup/rollup-linux-x64-musl@4.18.0': resolution: {integrity: sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==} cpu: [x64] os: [linux] libc: [musl] + '@rollup/rollup-linux-x64-musl@4.21.3': + resolution: {integrity: sha512-S0Yq+xA1VEH66uiMNhijsWAafffydd2X5b77eLHfRmfLsRSpbiAWiRHV6DEpz6aOToPsgid7TI9rGd6zB1rhbg==} + cpu: [x64] + os: [linux] + libc: [musl] + '@rollup/rollup-win32-arm64-msvc@4.18.0': resolution: {integrity: sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==} cpu: [arm64] os: [win32] + '@rollup/rollup-win32-arm64-msvc@4.21.3': + resolution: {integrity: sha512-9isNzeL34yquCPyerog+IMCNxKR8XYmGd0tHSV+OVx0TmE0aJOo9uw4fZfUuk2qxobP5sug6vNdZR6u7Mw7Q+Q==} + cpu: [arm64] + os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.18.0': resolution: {integrity: sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==} cpu: [ia32] os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.21.3': + resolution: {integrity: sha512-nMIdKnfZfzn1Vsk+RuOvl43ONTZXoAPUUxgcU0tXooqg4YrAqzfKzVenqqk2g5efWh46/D28cKFrOzDSW28gTA==} + cpu: [ia32] + os: [win32] + '@rollup/rollup-win32-x64-msvc@4.18.0': resolution: {integrity: sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==} cpu: [x64] os: [win32] + '@rollup/rollup-win32-x64-msvc@4.21.3': + resolution: {integrity: sha512-fOvu7PCQjAj4eWDEuD8Xz5gpzFqXzGlxHZozHP4b9Jxv9APtdxL6STqztDzMLuRXEc4UpXGGhx029Xgm91QBeA==} + cpu: [x64] + os: [win32] + '@rushstack/node-core-library@3.66.1': resolution: {integrity: sha512-ker69cVKAoar7MMtDFZC4CzcDxjwqIhFzqEnYI5NRN/8M3om6saWCVx/A7vL2t/jFCJsnzQplRDqA7c78pytng==} peerDependencies: @@ -3568,6 +3701,13 @@ packages: vite: ^5.0.0 vue: ^3.2.25 + '@vitejs/plugin-vue@5.1.4': + resolution: {integrity: sha512-N2XSI2n3sQqp5w7Y/AN/L2XDjBIRGqXko+eDp42sydYSBeJuSm5a1sLf8zakmo8u7tA8NmBgoDLA1HeOESjp9A==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + vite: ^5.0.0 + vue: ^3.2.25 + '@vitest/expect@0.29.8': resolution: {integrity: sha512-xlcVXn5I5oTq6NiZSY3ykyWixBxr5mG8HYtjvpgg6KaqHm0mvhX18xuwl5YGxIRNt/A5jidd7CWcNHrSvgaQqQ==} @@ -3604,6 +3744,9 @@ packages: '@volar/language-core@2.4.0-alpha.15': resolution: {integrity: sha512-mt8z4Fm2WxfQYoQHPcKVjLQV6PgPqyKLbkCVY2cr5RSaamqCHjhKEpsFX66aL4D/7oYguuaUw9Bx03Vt0TpIIA==} + '@volar/language-core@2.4.5': + resolution: {integrity: sha512-F4tA0DCO5Q1F5mScHmca0umsi2ufKULAnMOVBfMsZdT4myhVl4WdKRwCaKcfOkIEuyrAVvtq1ESBdZ+rSyLVww==} + '@volar/source-map@0.40.13': resolution: {integrity: sha512-dbdkAB2Nxb0wLjAY5O64o3ywVWlAGONnBIoKAkXSf6qkGZM+nJxcizsoiI66K+RHQG0XqlyvjDizfnTxr+6PWg==} @@ -3613,6 +3756,9 @@ packages: '@volar/source-map@2.4.0-alpha.15': resolution: {integrity: sha512-8Htngw5TmBY4L3ClDqBGyfLhsB8EmoEXUH1xydyEtEoK0O6NX5ur4Jw8jgvscTlwzizyl/wsN1vn0cQXVbbXYg==} + '@volar/source-map@2.4.5': + resolution: {integrity: sha512-varwD7RaKE2J/Z+Zu6j3mNNJbNT394qIxXwdvz/4ao/vxOfyClZpSDtLKkwWmecinkOVos5+PWkWraelfMLfpw==} + '@volar/typescript-faster@0.40.13': resolution: {integrity: sha512-uy+TlcFkKoNlKEnxA4x5acxdxLyVDIXGSc8cYDNXpPKjBKXrQaetzCzlO3kVBqu1VLMxKNGJMTKn35mo+ILQmw==} @@ -3622,6 +3768,9 @@ packages: '@volar/typescript@2.4.0-alpha.15': resolution: {integrity: sha512-U3StRBbDuxV6Woa4hvGS4kz3XcOzrWUKgFdEFN+ba1x3eaYg7+ytau8ul05xgA+UNGLXXsKur7fTUhDFyISk0w==} + '@volar/typescript@2.4.5': + resolution: {integrity: sha512-mcT1mHvLljAEtHviVcBuOyAwwMKz1ibXTi5uYtP/pf4XxoAzpdkQ+Br2IC0NPCvLCbjPZmbf3I0udndkfB1CDg==} + '@volar/vue-language-core@0.40.13': resolution: {integrity: sha512-QkCb8msi2KUitTdM6Y4kAb7/ZlEvuLcbBFOC2PLBlFuoZwyxvSP7c/dBGmKGtJlEvMX0LdCyrg5V2aBYxD38/Q==} @@ -3648,15 +3797,30 @@ packages: '@vue/compiler-core@3.4.31': resolution: {integrity: sha512-skOiodXWTV3DxfDhB4rOf3OGalpITLlgCeOwb+Y9GJpfQ8ErigdBUHomBzvG78JoVE8MJoQsb+qhZiHfKeNeEg==} + '@vue/compiler-core@3.5.6': + resolution: {integrity: sha512-r+gNu6K4lrvaQLQGmf+1gc41p3FO2OUJyWmNqaIITaJU6YFiV5PtQSFZt8jfztYyARwqhoCayjprC7KMvT3nRA==} + '@vue/compiler-dom@3.4.31': resolution: {integrity: sha512-wK424WMXsG1IGMyDGyLqB+TbmEBFM78hIsOJ9QwUVLGrcSk0ak6zYty7Pj8ftm7nEtdU/DGQxAXp0/lM/2cEpQ==} + '@vue/compiler-dom@3.5.6': + resolution: {integrity: sha512-xRXqxDrIqK8v8sSScpistyYH0qYqxakpsIvqMD2e5sV/PXQ1mTwtXp4k42yHK06KXxKSmitop9e45Ui/3BrTEw==} + '@vue/compiler-sfc@3.4.31': resolution: {integrity: sha512-einJxqEw8IIJxzmnxmJBuK2usI+lJonl53foq+9etB2HAzlPjAS/wa7r0uUpXw5ByX3/0uswVSrjNb17vJm1kQ==} + '@vue/compiler-sfc@3.5.6': + resolution: {integrity: sha512-pjWJ8Kj9TDHlbF5LywjVso+BIxCY5wVOLhkEXRhuCHDxPFIeX1zaFefKs8RYoHvkSMqRWt93a0f2gNJVJixHwg==} + '@vue/compiler-ssr@3.4.31': resolution: {integrity: sha512-RtefmITAje3fJ8FSg1gwgDhdKhZVntIVbwupdyZDSifZTRMiWxWehAOTCc8/KZDnBOcYQ4/9VWxsTbd3wT0hAA==} + '@vue/compiler-ssr@3.5.6': + resolution: {integrity: sha512-VpWbaZrEOCqnmqjE83xdwegtr5qO/2OPUC6veWgvNqTJ3bYysz6vY3VqMuOijubuUYPRpG3OOKIh9TD0Stxb9A==} + + '@vue/compiler-vue2@2.7.16': + resolution: {integrity: sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==} + '@vue/devtools-api@6.6.3': resolution: {integrity: sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw==} @@ -3676,29 +3840,54 @@ packages: typescript: optional: true + '@vue/language-core@2.1.6': + resolution: {integrity: sha512-MW569cSky9R/ooKMh6xa2g1D0AtRKbL56k83dzus/bx//RDJk24RHWkMzbAlXjMdDNyxAaagKPRquBIxkxlCkg==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@vue/reactivity@3.2.38': resolution: {integrity: sha512-6L4myYcH9HG2M25co7/BSo0skKFHpAN8PhkNPM4xRVkyGl1K5M3Jx4rp5bsYhvYze2K4+l+pioN4e6ZwFLUVtw==} '@vue/reactivity@3.4.31': resolution: {integrity: sha512-VGkTani8SOoVkZNds1PfJ/T1SlAIOf8E58PGAhIOUDYPC4GAmFA2u/E14TDAFcf3vVDKunc4QqCe/SHr8xC65Q==} + '@vue/reactivity@3.5.6': + resolution: {integrity: sha512-shZ+KtBoHna5GyUxWfoFVBCVd7k56m6lGhk5e+J9AKjheHF6yob5eukssHRI+rzvHBiU1sWs/1ZhNbLExc5oYQ==} + '@vue/runtime-core@3.4.31': resolution: {integrity: sha512-LDkztxeUPazxG/p8c5JDDKPfkCDBkkiNLVNf7XZIUnJ+66GVGkP+TIh34+8LtPisZ+HMWl2zqhIw0xN5MwU1cw==} + '@vue/runtime-core@3.5.6': + resolution: {integrity: sha512-FpFULR6+c2lI+m1fIGONLDqPQO34jxV8g6A4wBOgne8eSRHP6PQL27+kWFIx5wNhhjkO7B4rgtsHAmWv7qKvbg==} + '@vue/runtime-dom@3.4.31': resolution: {integrity: sha512-2Auws3mB7+lHhTFCg8E9ZWopA6Q6L455EcU7bzcQ4x6Dn4cCPuqj6S2oBZgN2a8vJRS/LSYYxwFFq2Hlx3Fsaw==} + '@vue/runtime-dom@3.5.6': + resolution: {integrity: sha512-SDPseWre45G38ENH2zXRAHL1dw/rr5qp91lS4lt/nHvMr0MhsbCbihGAWLXNB/6VfFOJe2O+RBRkXU+CJF7/sw==} + '@vue/server-renderer@3.4.31': resolution: {integrity: sha512-D5BLbdvrlR9PE3by9GaUp1gQXlCNadIZytMIb8H2h3FMWJd4oUfkUTEH2wAr3qxoRz25uxbTcbqd3WKlm9EHQA==} peerDependencies: vue: 3.4.31 + '@vue/server-renderer@3.5.6': + resolution: {integrity: sha512-zivnxQnOnwEXVaT9CstJ64rZFXMS5ZkKxCjDQKiMSvUhXRzFLWZVbaBiNF4HGDqGNNsTgmjcCSmU6TB/0OOxLA==} + peerDependencies: + vue: 3.5.6 + '@vue/shared@3.2.38': resolution: {integrity: sha512-dTyhTIRmGXBjxJE+skC8tTWCGLCVc4wQgRRLt8+O9p5ewBAjoBwtCAkLPrtToSr1xltoe3st21Pv953aOZ7alg==} '@vue/shared@3.4.31': resolution: {integrity: sha512-Yp3wtJk//8cO4NItOPpi3QkLExAr/aLBGZMmTtW9WpdwBCJpRM6zj9WgWktXAl8IDIozwNMByT45JP3tO3ACWA==} + '@vue/shared@3.5.6': + resolution: {integrity: sha512-eidH0HInnL39z6wAt6SFIwBrvGOpDWsDxlw3rCgo1B+CQ1781WzQUSU3YjxgdkcJo9Q8S6LmXTkvI+cLHGkQfA==} + '@vue/test-utils@2.4.6': resolution: {integrity: sha512-FMxEjOpYNYiFe0GkaHsnJPXFHxQ6m4t8vI/ElPGpMWxZKpmRvQ33OIrvRXemy6yha03RxhOlQuy+gZMC3CQSow==} @@ -8173,6 +8362,9 @@ packages: picocolors@1.0.1: resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + picocolors@1.1.0: + resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -8283,6 +8475,10 @@ packages: resolution: {integrity: sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==} engines: {node: ^10 || ^12 || >=14} + postcss@8.4.47: + resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} + engines: {node: ^10 || ^12 || >=14} + preact@10.22.1: resolution: {integrity: sha512-jRYbDDgMpIb5LHq3hkI0bbl+l/TQ9UnkdQ0ww+lp+4MMOdqaUYdFc5qeyP+IV8FAd/2Em7drVPeKdQxsiWCf/A==} @@ -8694,6 +8890,11 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rollup@4.21.3: + resolution: {integrity: sha512-7sqRtBNnEbcBtMeRVc6VRsJMmpI+JU1z9VTvW8D4gXIYQFz0aLcsE6rRkyghZkLfEgUZgVvOG7A5CVz/VW5GIA==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + run-async@3.0.0: resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} engines: {node: '>=0.12.0'} @@ -9007,6 +9208,10 @@ packages: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + source-map-resolve@0.5.3: resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==} deprecated: See https://github.com/lydell/source-map-resolve#deprecated @@ -9962,6 +10167,37 @@ packages: terser: optional: true + vite@5.4.6: + resolution: {integrity: sha512-IeL5f8OO5nylsgzd9tq4qD2QqI0k2CQLGrWD0rCN0EQJZpBK5vJAx0I+GDkMOXxQX/OfFHMuLIx6ddAxGX/k+Q==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + vitepress-theme-demoblock@1.4.2: resolution: {integrity: sha512-OMIRg1JJI8NvBVLFu2G0cd+gT5IzXZfTsV7yws7GfRXZE3Q4qLO5cR1+ngNnFZw44ID1oLk+Yu9HZM+AJYtgWA==} engines: {node: '>=14.0.0'} @@ -10119,6 +10355,12 @@ packages: peerDependencies: typescript: '>=5.0.0' + vue-tsc@2.1.6: + resolution: {integrity: sha512-f98dyZp5FOukcYmbFpuSCJ4Z0vHSOSmxGttZJCsFeX0M4w/Rsq0s4uKXjcSRsZqsRgQa6z7SfuO+y0HVICE57Q==} + hasBin: true + peerDependencies: + typescript: '>=5.0.0' + vue@3.4.31: resolution: {integrity: sha512-njqRrOy7W3YLAlVqSKpBebtZpDVg21FPoaq1I7f/+qqBThK9ChAIjkRWgeP6Eat+8C+iia4P3OYqpATP21BCoQ==} peerDependencies: @@ -10127,6 +10369,14 @@ packages: typescript: optional: true + vue@3.5.6: + resolution: {integrity: sha512-zv+20E2VIYbcJOzJPUWp03NOGFhMmpCKOfSxVTmCYyYFFko48H9tmuQFzYj7tu4qX1AeXlp9DmhIP89/sSxxhw==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + w3c-xmlserializer@4.0.0: resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} engines: {node: '>=14'} @@ -10607,6 +10857,8 @@ snapshots: '@babel/helper-string-parser@7.24.7': {} + '@babel/helper-string-parser@7.24.8': {} + '@babel/helper-validator-identifier@7.24.7': {} '@babel/helper-validator-option@7.24.7': {} @@ -10640,6 +10892,10 @@ snapshots: dependencies: '@babel/types': 7.24.7 + '@babel/parser@7.25.6': + dependencies: + '@babel/types': 7.25.6 + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.24.7(@babel/core@7.24.7)': dependencies: '@babel/core': 7.24.7 @@ -11267,6 +11523,12 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 + '@babel/types@7.25.6': + dependencies: + '@babel/helper-string-parser': 7.24.8 + '@babel/helper-validator-identifier': 7.24.7 + to-fast-properties: 2.0.0 + '@bcoe/v8-coverage@0.2.3': {} '@bufbuild/protobuf@1.10.0': {} @@ -11552,14 +11814,14 @@ snapshots: '@commitlint/types': 17.8.1 '@types/node': 20.5.1 chalk: 4.1.2 - cosmiconfig: 8.3.6(typescript@4.9.5) - cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@4.9.5))(ts-node@10.9.2(@types/node@18.19.39)(typescript@4.9.5))(typescript@4.9.5) + cosmiconfig: 8.3.6(typescript@5.5.3) + cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.5.3))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.5.3))(typescript@5.5.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 resolve-from: 5.0.0 - ts-node: 10.9.2(@types/node@20.5.1)(typescript@4.9.5) - typescript: 4.9.5 + ts-node: 10.9.2(@types/node@20.5.1)(typescript@5.5.3) + typescript: 5.5.3 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -12005,10 +12267,31 @@ snapshots: '@farris/mobile-ui-vue@0.0.1-beta.3(typescript@4.9.5)': dependencies: - vue: 3.4.31(typescript@4.9.5) + vue: 3.5.6(typescript@4.9.5) transitivePeerDependencies: - typescript + '@farris/ui-vue@1.1.8(@types/node@20.5.1)(rollup@4.18.0)(vite@5.4.6(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3))': + dependencies: + '@types/lodash-es': 4.17.12 + '@vue/shared': 3.5.6 + '@vueuse/core': 9.2.0(vue@3.5.6(typescript@5.5.3)) + async-validator: 4.2.5 + bignumber.js: 9.1.2 + echarts: 5.5.1 + jsonp: 0.2.1 + lodash: 4.17.21 + lodash-es: 4.17.21 + rxjs: 7.8.1 + vite-plugin-dts: 2.3.0(@types/node@20.5.1)(rollup@4.18.0)(vite@5.4.6(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6)) + transitivePeerDependencies: + - '@types/node' + - '@vue/composition-api' + - rollup + - supports-color + - vite + - vue + '@francoischalifour/autocomplete-core@1.0.0-alpha.28': {} '@francoischalifour/autocomplete-preset-algolia@1.0.0-alpha.28': {} @@ -12178,7 +12461,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@18.19.39)(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.5.3)) + jest-config: 29.7.0(@types/node@18.19.39)(ts-node@10.9.2(@types/node@18.19.39)(typescript@4.9.5)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -12575,54 +12858,110 @@ snapshots: optionalDependencies: rollup: 4.18.0 + '@rollup/pluginutils@5.1.0(rollup@4.21.3)': + dependencies: + '@types/estree': 1.0.5 + estree-walker: 2.0.2 + picomatch: 2.3.1 + optionalDependencies: + rollup: 4.21.3 + '@rollup/rollup-android-arm-eabi@4.18.0': optional: true + '@rollup/rollup-android-arm-eabi@4.21.3': + optional: true + '@rollup/rollup-android-arm64@4.18.0': optional: true + '@rollup/rollup-android-arm64@4.21.3': + optional: true + '@rollup/rollup-darwin-arm64@4.18.0': optional: true + '@rollup/rollup-darwin-arm64@4.21.3': + optional: true + '@rollup/rollup-darwin-x64@4.18.0': optional: true + '@rollup/rollup-darwin-x64@4.21.3': + optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.18.0': optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.21.3': + optional: true + '@rollup/rollup-linux-arm-musleabihf@4.18.0': optional: true + '@rollup/rollup-linux-arm-musleabihf@4.21.3': + optional: true + '@rollup/rollup-linux-arm64-gnu@4.18.0': optional: true + '@rollup/rollup-linux-arm64-gnu@4.21.3': + optional: true + '@rollup/rollup-linux-arm64-musl@4.18.0': optional: true + '@rollup/rollup-linux-arm64-musl@4.21.3': + optional: true + '@rollup/rollup-linux-powerpc64le-gnu@4.18.0': optional: true + '@rollup/rollup-linux-powerpc64le-gnu@4.21.3': + optional: true + '@rollup/rollup-linux-riscv64-gnu@4.18.0': optional: true + '@rollup/rollup-linux-riscv64-gnu@4.21.3': + optional: true + '@rollup/rollup-linux-s390x-gnu@4.18.0': optional: true + '@rollup/rollup-linux-s390x-gnu@4.21.3': + optional: true + '@rollup/rollup-linux-x64-gnu@4.18.0': optional: true + '@rollup/rollup-linux-x64-gnu@4.21.3': + optional: true + '@rollup/rollup-linux-x64-musl@4.18.0': optional: true + '@rollup/rollup-linux-x64-musl@4.21.3': + optional: true + '@rollup/rollup-win32-arm64-msvc@4.18.0': optional: true + '@rollup/rollup-win32-arm64-msvc@4.21.3': + optional: true + '@rollup/rollup-win32-ia32-msvc@4.18.0': optional: true + '@rollup/rollup-win32-ia32-msvc@4.21.3': + optional: true + '@rollup/rollup-win32-x64-msvc@4.18.0': optional: true + '@rollup/rollup-win32-x64-msvc@4.21.3': + optional: true + '@rushstack/node-core-library@3.66.1(@types/node@18.19.39)': dependencies: colors: 1.2.5 @@ -12884,12 +13223,12 @@ snapshots: '@vue/test-utils': 2.4.6 vue: 3.4.31(typescript@5.5.3) - '@testing-library/vue@8.1.0(@vue/compiler-sfc@3.4.31)(vue@3.4.31(typescript@5.5.3))': + '@testing-library/vue@8.1.0(@vue/compiler-sfc@3.4.31)(vue@3.5.6(typescript@5.5.3))': dependencies: '@babel/runtime': 7.24.7 '@testing-library/dom': 9.3.4 '@vue/test-utils': 2.4.6 - vue: 3.4.31(typescript@5.5.3) + vue: 3.5.6(typescript@5.5.3) optionalDependencies: '@vue/compiler-sfc': 3.4.31 @@ -13283,13 +13622,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue-jsx@4.0.0(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3))': + '@vitejs/plugin-vue-jsx@4.0.0(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3))': dependencies: '@babel/core': 7.24.7 '@babel/plugin-transform-typescript': 7.24.7(@babel/core@7.24.7) '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.24.7) vite: 5.3.3(@types/node@18.19.39)(sass@1.77.6) - vue: 3.4.31(typescript@5.5.3) + vue: 3.5.6(typescript@5.5.3) transitivePeerDependencies: - supports-color @@ -13302,20 +13641,25 @@ snapshots: vite: 3.2.10(@types/node@18.19.39)(sass@1.77.6) vue: 3.4.31(typescript@4.9.5) - '@vitejs/plugin-vue@3.2.0(vite@3.2.10(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3))': + '@vitejs/plugin-vue@3.2.0(vite@3.2.10(@types/node@18.19.39)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3))': dependencies: vite: 3.2.10(@types/node@18.19.39)(sass@1.77.6) - vue: 3.4.31(typescript@5.5.3) + vue: 3.5.6(typescript@5.5.3) '@vitejs/plugin-vue@3.2.0(vite@3.2.10(@types/node@20.5.1)(sass@1.77.6))(vue@3.4.31(typescript@4.9.5))': dependencies: vite: 3.2.10(@types/node@20.5.1)(sass@1.77.6) vue: 3.4.31(typescript@4.9.5) - '@vitejs/plugin-vue@3.2.0(vite@3.2.10(@types/node@20.5.1)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3))': + '@vitejs/plugin-vue@3.2.0(vite@3.2.10(@types/node@20.5.1)(sass@1.77.6))(vue@3.5.6(typescript@4.9.5))': dependencies: vite: 3.2.10(@types/node@20.5.1)(sass@1.77.6) - vue: 3.4.31(typescript@5.5.3) + vue: 3.5.6(typescript@4.9.5) + + '@vitejs/plugin-vue@3.2.0(vite@3.2.10(@types/node@20.5.1)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3))': + dependencies: + vite: 3.2.10(@types/node@20.5.1)(sass@1.77.6) + vue: 3.5.6(typescript@5.5.3) '@vitejs/plugin-vue@4.6.2(vite@4.5.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@4.9.5))': dependencies: @@ -13332,10 +13676,15 @@ snapshots: vite: 5.3.3(@types/node@20.5.1)(sass@1.77.6) vue: 3.4.31(typescript@5.5.3) - '@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3))': + '@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3))': dependencies: vite: 5.3.3(@types/node@18.19.39)(sass@1.77.6) - vue: 3.4.31(typescript@5.5.3) + vue: 3.5.6(typescript@5.5.3) + + '@vitejs/plugin-vue@5.1.4(vite@5.4.6(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3))': + dependencies: + vite: 5.4.6(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6) + vue: 3.5.6(typescript@5.5.3) '@vitest/expect@0.29.8': dependencies: @@ -13401,6 +13750,10 @@ snapshots: dependencies: '@volar/source-map': 2.4.0-alpha.15 + '@volar/language-core@2.4.5': + dependencies: + '@volar/source-map': 2.4.5 + '@volar/source-map@0.40.13': dependencies: '@vue/reactivity': 3.2.38 @@ -13411,6 +13764,8 @@ snapshots: '@volar/source-map@2.4.0-alpha.15': {} + '@volar/source-map@2.4.5': {} + '@volar/typescript-faster@0.40.13': dependencies: semver: 7.6.2 @@ -13426,6 +13781,12 @@ snapshots: path-browserify: 1.0.1 vscode-uri: 3.0.8 + '@volar/typescript@2.4.5': + dependencies: + '@volar/language-core': 2.4.5 + path-browserify: 1.0.1 + vscode-uri: 3.0.8 + '@volar/vue-language-core@0.40.13': dependencies: '@volar/code-gen': 0.40.13 @@ -13479,11 +13840,24 @@ snapshots: estree-walker: 2.0.2 source-map-js: 1.2.0 + '@vue/compiler-core@3.5.6': + dependencies: + '@babel/parser': 7.25.6 + '@vue/shared': 3.5.6 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.0 + '@vue/compiler-dom@3.4.31': dependencies: '@vue/compiler-core': 3.4.31 '@vue/shared': 3.4.31 + '@vue/compiler-dom@3.5.6': + dependencies: + '@vue/compiler-core': 3.5.6 + '@vue/shared': 3.5.6 + '@vue/compiler-sfc@3.4.31': dependencies: '@babel/parser': 7.24.7 @@ -13496,11 +13870,33 @@ snapshots: postcss: 8.4.39 source-map-js: 1.2.0 + '@vue/compiler-sfc@3.5.6': + dependencies: + '@babel/parser': 7.25.6 + '@vue/compiler-core': 3.5.6 + '@vue/compiler-dom': 3.5.6 + '@vue/compiler-ssr': 3.5.6 + '@vue/shared': 3.5.6 + estree-walker: 2.0.2 + magic-string: 0.30.11 + postcss: 8.4.47 + source-map-js: 1.2.0 + '@vue/compiler-ssr@3.4.31': dependencies: '@vue/compiler-dom': 3.4.31 '@vue/shared': 3.4.31 + '@vue/compiler-ssr@3.5.6': + dependencies: + '@vue/compiler-dom': 3.5.6 + '@vue/shared': 3.5.6 + + '@vue/compiler-vue2@2.7.16': + dependencies: + de-indent: 1.0.2 + he: 1.2.0 + '@vue/devtools-api@6.6.3': {} '@vue/language-core@1.8.27(typescript@4.9.5)': @@ -13544,6 +13940,19 @@ snapshots: optionalDependencies: typescript: 5.5.3 + '@vue/language-core@2.1.6(typescript@5.5.3)': + dependencies: + '@volar/language-core': 2.4.5 + '@vue/compiler-dom': 3.4.31 + '@vue/compiler-vue2': 2.7.16 + '@vue/shared': 3.4.31 + computeds: 0.0.1 + minimatch: 9.0.5 + muggle-string: 0.4.1 + path-browserify: 1.0.1 + optionalDependencies: + typescript: 5.5.3 + '@vue/reactivity@3.2.38': dependencies: '@vue/shared': 3.2.38 @@ -13552,11 +13961,20 @@ snapshots: dependencies: '@vue/shared': 3.4.31 + '@vue/reactivity@3.5.6': + dependencies: + '@vue/shared': 3.5.6 + '@vue/runtime-core@3.4.31': dependencies: '@vue/reactivity': 3.4.31 '@vue/shared': 3.4.31 + '@vue/runtime-core@3.5.6': + dependencies: + '@vue/reactivity': 3.5.6 + '@vue/shared': 3.5.6 + '@vue/runtime-dom@3.4.31': dependencies: '@vue/reactivity': 3.4.31 @@ -13564,6 +13982,13 @@ snapshots: '@vue/shared': 3.4.31 csstype: 3.1.3 + '@vue/runtime-dom@3.5.6': + dependencies: + '@vue/reactivity': 3.5.6 + '@vue/runtime-core': 3.5.6 + '@vue/shared': 3.5.6 + csstype: 3.1.3 + '@vue/server-renderer@3.4.31(vue@3.4.31(typescript@4.9.5))': dependencies: '@vue/compiler-ssr': 3.4.31 @@ -13576,10 +14001,36 @@ snapshots: '@vue/shared': 3.4.31 vue: 3.4.31(typescript@5.5.3) + '@vue/server-renderer@3.4.31(vue@3.5.6(typescript@4.9.5))': + dependencies: + '@vue/compiler-ssr': 3.4.31 + '@vue/shared': 3.4.31 + vue: 3.5.6(typescript@4.9.5) + + '@vue/server-renderer@3.4.31(vue@3.5.6(typescript@5.5.3))': + dependencies: + '@vue/compiler-ssr': 3.4.31 + '@vue/shared': 3.4.31 + vue: 3.5.6(typescript@5.5.3) + + '@vue/server-renderer@3.5.6(vue@3.5.6(typescript@4.9.5))': + dependencies: + '@vue/compiler-ssr': 3.5.6 + '@vue/shared': 3.5.6 + vue: 3.5.6(typescript@4.9.5) + + '@vue/server-renderer@3.5.6(vue@3.5.6(typescript@5.5.3))': + dependencies: + '@vue/compiler-ssr': 3.5.6 + '@vue/shared': 3.5.6 + vue: 3.5.6(typescript@5.5.3) + '@vue/shared@3.2.38': {} '@vue/shared@3.4.31': {} + '@vue/shared@3.5.6': {} + '@vue/test-utils@2.4.6': dependencies: js-beautify: 1.15.1 @@ -13693,6 +14144,26 @@ snapshots: - '@vue/composition-api' - vue + '@vueuse/core@9.2.0(vue@3.5.6(typescript@4.9.5))': + dependencies: + '@types/web-bluetooth': 0.0.15 + '@vueuse/metadata': 9.2.0 + '@vueuse/shared': 9.2.0(vue@3.5.6(typescript@4.9.5)) + vue-demi: 0.14.8(vue@3.5.6(typescript@4.9.5)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + + '@vueuse/core@9.2.0(vue@3.5.6(typescript@5.5.3))': + dependencies: + '@types/web-bluetooth': 0.0.15 + '@vueuse/metadata': 9.2.0 + '@vueuse/shared': 9.2.0(vue@3.5.6(typescript@5.5.3)) + vue-demi: 0.14.8(vue@3.5.6(typescript@5.5.3)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + '@vueuse/metadata@9.2.0': {} '@vueuse/shared@9.2.0(vue@3.4.31(typescript@4.9.5))': @@ -13709,6 +14180,20 @@ snapshots: - '@vue/composition-api' - vue + '@vueuse/shared@9.2.0(vue@3.5.6(typescript@4.9.5))': + dependencies: + vue-demi: 0.14.8(vue@3.5.6(typescript@4.9.5)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + + '@vueuse/shared@9.2.0(vue@3.5.6(typescript@5.5.3))': + dependencies: + vue-demi: 0.14.8(vue@3.5.6(typescript@5.5.3)) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + '@yankeeinlondon/builder-api@1.4.1(@vitejs/plugin-vue@4.6.2(vite@4.5.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@4.9.5)))(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6)(vite@4.5.3(@types/node@18.19.39)(sass@1.77.6))': dependencies: '@types/markdown-it': 12.2.3 @@ -13814,7 +14299,7 @@ snapshots: '@types/markdown-it': 12.2.3 '@yankeeinlondon/happy-wrapper': 2.10.1(jsdom@20.0.3)(sass@1.77.6) fp-ts: 2.16.7 - inferred-types: 0.37.6 + inferred-types: 0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6) markdown-it: 13.0.2 vite-plugin-md: 0.22.5(@vitejs/plugin-vue@4.6.2(vite@5.3.3(@types/node@20.5.1)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3)))(jsdom@20.0.3)(sass@1.77.6)(vite@5.3.3(@types/node@20.5.1)(sass@1.77.6)) transitivePeerDependencies: @@ -13833,14 +14318,14 @@ snapshots: - terser - vite - '@yankeeinlondon/builder-api@1.4.1(@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6)(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))': + '@yankeeinlondon/builder-api@1.4.1(@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6)(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))': dependencies: '@types/markdown-it': 12.2.3 '@yankeeinlondon/happy-wrapper': 2.10.1(jsdom@20.0.3)(sass@1.77.6) fp-ts: 2.16.7 inferred-types: 0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6) markdown-it: 13.0.2 - vite-plugin-md: 0.22.5(@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3)))(jsdom@20.0.3)(sass@1.77.6)(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6)) + vite-plugin-md: 0.22.5(@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3)))(jsdom@20.0.3)(sass@1.77.6)(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6)) transitivePeerDependencies: - '@edge-runtime/vm' - '@vitejs/plugin-vue' @@ -13858,35 +14343,12 @@ snapshots: - terser - vite - '@yankeeinlondon/builder-api@1.4.1(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6)': - dependencies: - '@types/markdown-it': 12.2.3 - '@yankeeinlondon/happy-wrapper': 2.10.1(jsdom@20.0.3)(sass@1.77.6) - fp-ts: 2.16.7 - inferred-types: 0.37.6(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6) - markdown-it: 13.0.2 - vite-plugin-md: 0.22.5(@vitejs/plugin-vue@4.6.2(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6))(vue@3.4.31(typescript@4.9.5)))(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) - transitivePeerDependencies: - - '@edge-runtime/vm' - - '@vitest/browser' - - '@vitest/ui' - - encoding - - happy-dom - - jsdom - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - '@yankeeinlondon/builder-api@1.4.1(jsdom@20.0.3)(sass@1.77.6)': dependencies: '@types/markdown-it': 12.2.3 '@yankeeinlondon/happy-wrapper': 2.10.1(jsdom@20.0.3)(sass@1.77.6) fp-ts: 2.16.7 - inferred-types: 0.37.6 + inferred-types: 0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6) markdown-it: 13.0.2 vite-plugin-md: 0.22.5(@vitejs/plugin-vue@4.6.2(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6))(vue@3.4.31(typescript@4.9.5)))(jsdom@20.0.3)(sass@1.77.6)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) transitivePeerDependencies: @@ -13905,7 +14367,7 @@ snapshots: '@yankeeinlondon/gray-matter@6.2.1': dependencies: - inferred-types: 0.37.6 + inferred-types: 0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6) js-yaml: 4.1.0 kind-of: 6.0.3 section-matter: 1.0.0 @@ -14644,7 +15106,7 @@ snapshots: dependencies: bumpp: 8.2.1 callsites: 4.2.0 - inferred-types: 0.37.6 + inferred-types: 0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6) vitest: 0.25.8(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6) transitivePeerDependencies: - '@edge-runtime/vm' @@ -14664,7 +15126,7 @@ snapshots: dependencies: bumpp: 8.2.1 callsites: 4.2.0 - inferred-types: 0.37.6 + inferred-types: 0.37.6(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6) vitest: 0.25.8(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6) transitivePeerDependencies: - '@edge-runtime/vm' @@ -15395,12 +15857,12 @@ snapshots: object-assign: 4.1.1 vary: 1.1.2 - cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@4.9.5))(ts-node@10.9.2(@types/node@18.19.39)(typescript@4.9.5))(typescript@4.9.5): + cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.5.3))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.5.3))(typescript@5.5.3): dependencies: '@types/node': 20.5.1 - cosmiconfig: 8.3.6(typescript@4.9.5) - ts-node: 10.9.2(@types/node@20.5.1)(typescript@4.9.5) - typescript: 4.9.5 + cosmiconfig: 8.3.6(typescript@5.5.3) + ts-node: 10.9.2(@types/node@20.5.1)(typescript@5.5.3) + typescript: 5.5.3 cosmiconfig-typescript-loader@5.0.0(@types/node@18.19.39)(cosmiconfig@9.0.0(typescript@5.5.3))(typescript@5.5.3): dependencies: @@ -15416,14 +15878,14 @@ snapshots: jiti: 1.21.6 typescript: 4.9.5 - cosmiconfig@8.3.6(typescript@4.9.5): + cosmiconfig@8.3.6(typescript@5.5.3): dependencies: import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 optionalDependencies: - typescript: 4.9.5 + typescript: 5.5.3 cosmiconfig@9.0.0(typescript@4.9.5): dependencies: @@ -17461,10 +17923,6 @@ snapshots: index-to-position@0.1.2: {} - inferred-types@0.37.6: - dependencies: - brilliant-errors: 0.7.3(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6) - inferred-types@0.37.6(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6): dependencies: brilliant-errors: 0.7.3(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6) @@ -17991,7 +18449,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 18.19.39 - ts-node: 10.9.2(@types/node@20.5.1)(typescript@4.9.5) + ts-node: 10.9.2(@types/node@20.5.1)(typescript@5.5.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -18058,37 +18516,6 @@ snapshots: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@18.19.39)(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.5.3)): - dependencies: - '@babel/core': 7.24.7 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.24.7) - chalk: 4.1.2 - ci-info: 3.9.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-circus: 29.7.0 - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.7 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - optionalDependencies: - '@types/node': 18.19.39 - ts-node: 10.9.2(@types/node@20.5.1)(typescript@5.5.3) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - jest-config@29.7.0(@types/node@20.5.1)(ts-node@10.9.2(@types/node@20.5.1)(typescript@4.9.5)): dependencies: '@babel/core': 7.24.7 @@ -19655,6 +20082,8 @@ snapshots: picocolors@1.0.1: {} + picocolors@1.1.0: {} + picomatch@2.3.1: {} pidtree@0.3.1: {} @@ -19756,6 +20185,12 @@ snapshots: picocolors: 1.0.1 source-map-js: 1.2.0 + postcss@8.4.47: + dependencies: + nanoid: 3.3.7 + picocolors: 1.1.0 + source-map-js: 1.2.1 + preact@10.22.1: {} preferred-pm@3.1.4: @@ -20207,6 +20642,28 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.18.0 fsevents: 2.3.3 + rollup@4.21.3: + dependencies: + '@types/estree': 1.0.5 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.21.3 + '@rollup/rollup-android-arm64': 4.21.3 + '@rollup/rollup-darwin-arm64': 4.21.3 + '@rollup/rollup-darwin-x64': 4.21.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.21.3 + '@rollup/rollup-linux-arm-musleabihf': 4.21.3 + '@rollup/rollup-linux-arm64-gnu': 4.21.3 + '@rollup/rollup-linux-arm64-musl': 4.21.3 + '@rollup/rollup-linux-powerpc64le-gnu': 4.21.3 + '@rollup/rollup-linux-riscv64-gnu': 4.21.3 + '@rollup/rollup-linux-s390x-gnu': 4.21.3 + '@rollup/rollup-linux-x64-gnu': 4.21.3 + '@rollup/rollup-linux-x64-musl': 4.21.3 + '@rollup/rollup-win32-arm64-msvc': 4.21.3 + '@rollup/rollup-win32-ia32-msvc': 4.21.3 + '@rollup/rollup-win32-x64-msvc': 4.21.3 + fsevents: 2.3.3 + run-async@3.0.0: {} run-parallel@1.2.0: @@ -20513,6 +20970,8 @@ snapshots: source-map-js@1.2.0: {} + source-map-js@1.2.1: {} + source-map-resolve@0.5.3: dependencies: atob: 2.1.2 @@ -21085,6 +21544,7 @@ snapshots: typescript: 4.9.5 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + optional: true ts-node@10.9.2(@types/node@20.5.1)(typescript@5.5.3): dependencies: @@ -21103,7 +21563,6 @@ snapshots: typescript: 5.5.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - optional: true tsconfig-paths@3.15.0: dependencies: @@ -21404,45 +21863,47 @@ snapshots: - supports-color - terser - vite-node@1.6.0(@types/node@18.19.39)(sass@1.77.6): + vite-node@1.6.0(@types/node@18.19.39)(sass-embedded@1.77.5)(sass@1.77.6): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.3.3(@types/node@18.19.39)(sass@1.77.6) + vite: 5.4.6(@types/node@18.19.39)(sass-embedded@1.77.5)(sass@1.77.6) transitivePeerDependencies: - '@types/node' - less - lightningcss - sass + - sass-embedded - stylus - sugarss - supports-color - terser - vite-node@1.6.0(@types/node@20.5.1)(sass@1.77.6): + vite-node@1.6.0(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.3.3(@types/node@20.5.1)(sass@1.77.6) + vite: 5.4.6(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6) transitivePeerDependencies: - '@types/node' - less - lightningcss - sass + - sass-embedded - stylus - sugarss - supports-color - terser - vite-plugin-dts@2.1.0(@types/node@20.5.1)(rollup@4.18.0)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)): + vite-plugin-dts@2.1.0(@types/node@20.5.1)(rollup@4.21.3)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)): dependencies: '@babel/parser': 7.24.7 '@microsoft/api-extractor': 7.47.7(@types/node@20.5.1) - '@rollup/pluginutils': 5.1.0(rollup@4.18.0) + '@rollup/pluginutils': 5.1.0(rollup@4.21.3) '@rushstack/node-core-library': 3.66.1(@types/node@20.5.1) debug: 4.3.7 fast-glob: 3.3.2 @@ -21456,11 +21917,11 @@ snapshots: - rollup - supports-color - vite-plugin-dts@2.3.0(@types/node@18.19.39)(rollup@4.18.0)(vite@4.5.3(@types/node@18.19.39)(sass@1.77.6)): + vite-plugin-dts@2.3.0(@types/node@18.19.39)(rollup@4.21.3)(vite@4.5.3(@types/node@18.19.39)(sass@1.77.6)): dependencies: '@babel/parser': 7.24.7 '@microsoft/api-extractor': 7.47.0(@types/node@18.19.39) - '@rollup/pluginutils': 5.1.0(rollup@4.18.0) + '@rollup/pluginutils': 5.1.0(rollup@4.21.3) '@rushstack/node-core-library': 3.66.1(@types/node@18.19.39) debug: 4.3.5 fast-glob: 3.3.2 @@ -21474,7 +21935,7 @@ snapshots: - rollup - supports-color - vite-plugin-dts@2.3.0(@types/node@20.5.1)(rollup@4.18.0)(vite@3.2.10(@types/node@20.5.1)(sass@1.77.6)): + vite-plugin-dts@2.3.0(@types/node@20.5.1)(rollup@4.18.0)(vite@5.4.6(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6)): dependencies: '@babel/parser': 7.24.7 '@microsoft/api-extractor': 7.47.0(@types/node@20.5.1) @@ -21486,17 +21947,35 @@ snapshots: kolorist: 1.8.0 magic-string: 0.29.0 ts-morph: 18.0.0 + vite: 5.4.6(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6) + transitivePeerDependencies: + - '@types/node' + - rollup + - supports-color + + vite-plugin-dts@2.3.0(@types/node@20.5.1)(rollup@4.21.3)(vite@3.2.10(@types/node@20.5.1)(sass@1.77.6)): + dependencies: + '@babel/parser': 7.24.7 + '@microsoft/api-extractor': 7.47.0(@types/node@20.5.1) + '@rollup/pluginutils': 5.1.0(rollup@4.21.3) + '@rushstack/node-core-library': 3.66.1(@types/node@20.5.1) + debug: 4.3.5 + fast-glob: 3.3.2 + fs-extra: 10.1.0 + kolorist: 1.8.0 + magic-string: 0.29.0 + ts-morph: 18.0.0 vite: 3.2.10(@types/node@20.5.1)(sass@1.77.6) transitivePeerDependencies: - '@types/node' - rollup - supports-color - vite-plugin-dts@2.3.0(@types/node@20.5.1)(rollup@4.18.0)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)): + vite-plugin-dts@2.3.0(@types/node@20.5.1)(rollup@4.21.3)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)): dependencies: '@babel/parser': 7.24.7 '@microsoft/api-extractor': 7.47.0(@types/node@20.5.1) - '@rollup/pluginutils': 5.1.0(rollup@4.18.0) + '@rollup/pluginutils': 5.1.0(rollup@4.21.3) '@rushstack/node-core-library': 3.66.1(@types/node@20.5.1) debug: 4.3.5 fast-glob: 3.3.2 @@ -21510,11 +21989,11 @@ snapshots: - rollup - supports-color - vite-plugin-dts@2.3.0(@types/node@20.5.1)(rollup@4.18.0)(vite@5.3.3(@types/node@20.5.1)(sass@1.77.6)): + vite-plugin-dts@2.3.0(@types/node@20.5.1)(rollup@4.21.3)(vite@5.3.3(@types/node@20.5.1)(sass@1.77.6)): dependencies: '@babel/parser': 7.24.7 '@microsoft/api-extractor': 7.47.0(@types/node@20.5.1) - '@rollup/pluginutils': 5.1.0(rollup@4.18.0) + '@rollup/pluginutils': 5.1.0(rollup@4.21.3) '@rushstack/node-core-library': 3.66.1(@types/node@20.5.1) debug: 4.3.5 fast-glob: 3.3.2 @@ -21545,10 +22024,10 @@ snapshots: - rollup - supports-color - vite-plugin-dts@3.9.1(@types/node@20.5.1)(rollup@4.18.0)(typescript@4.9.5)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)): + vite-plugin-dts@3.9.1(@types/node@20.5.1)(rollup@4.21.3)(typescript@4.9.5)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)): dependencies: '@microsoft/api-extractor': 7.43.0(@types/node@20.5.1) - '@rollup/pluginutils': 5.1.0(rollup@4.18.0) + '@rollup/pluginutils': 5.1.0(rollup@4.21.3) '@vue/language-core': 1.8.27(typescript@4.9.5) debug: 4.3.5 kolorist: 1.8.0 @@ -21658,9 +22137,9 @@ snapshots: - supports-color - terser - vite-plugin-md@0.21.5(@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6)(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6)): + vite-plugin-md@0.21.5(@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6)(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6)): dependencies: - '@yankeeinlondon/builder-api': 1.4.1(@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6)(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6)) + '@yankeeinlondon/builder-api': 1.4.1(@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3)))(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6)(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6)) '@yankeeinlondon/gray-matter': 6.2.1(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6) '@yankeeinlondon/happy-wrapper': 2.10.1(jsdom@20.0.3)(sass@1.77.6) markdown-it: 13.0.2 @@ -21709,7 +22188,7 @@ snapshots: vite-plugin-md@0.22.5(@vitejs/plugin-vue@4.6.2(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6))(vue@3.4.31(typescript@4.9.5)))(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)): dependencies: '@vitejs/plugin-vue': 4.6.2(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6))(vue@3.4.31(typescript@4.9.5)) - '@yankeeinlondon/builder-api': 1.4.1(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6) + '@yankeeinlondon/builder-api': 1.4.1(@vitejs/plugin-vue@4.6.2(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6))(vue@3.4.31(typescript@4.9.5)))(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6)(vite@4.5.3(@types/node@20.5.1)(sass@1.77.6)) '@yankeeinlondon/gray-matter': 6.2.1(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6) '@yankeeinlondon/happy-wrapper': 2.10.1(jsdom@20.0.3)(sass@1.77.6) markdown-it: 13.0.2 @@ -21776,9 +22255,9 @@ snapshots: - supports-color - terser - vite-plugin-md@0.22.5(@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3)))(jsdom@20.0.3)(sass@1.77.6)(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6)): + vite-plugin-md@0.22.5(@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3)))(jsdom@20.0.3)(sass@1.77.6)(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6)): dependencies: - '@vitejs/plugin-vue': 5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3)) + '@vitejs/plugin-vue': 5.0.5(vite@5.3.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3)) '@yankeeinlondon/builder-api': 1.4.1(jsdom@20.0.3)(sass@1.77.6) '@yankeeinlondon/gray-matter': 6.2.1 '@yankeeinlondon/happy-wrapper': 2.10.1(jsdom@20.0.3)(sass@1.77.6) @@ -21809,6 +22288,11 @@ snapshots: svgo: 3.3.2 vue: 3.4.31(typescript@5.5.3) + vite-svg-loader@5.1.0(vue@3.5.6(typescript@5.5.3)): + dependencies: + svgo: 3.3.2 + vue: 3.5.6(typescript@5.5.3) + vite@2.9.18(sass@1.77.6): dependencies: esbuild: 0.14.54 @@ -21881,6 +22365,28 @@ snapshots: fsevents: 2.3.3 sass: 1.77.6 + vite@5.4.6(@types/node@18.19.39)(sass-embedded@1.77.5)(sass@1.77.6): + dependencies: + esbuild: 0.21.5 + postcss: 8.4.47 + rollup: 4.21.3 + optionalDependencies: + '@types/node': 18.19.39 + fsevents: 2.3.3 + sass: 1.77.6 + sass-embedded: 1.77.5 + + vite@5.4.6(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6): + dependencies: + esbuild: 0.21.5 + postcss: 8.4.47 + rollup: 4.21.3 + optionalDependencies: + '@types/node': 20.5.1 + fsevents: 2.3.3 + sass: 1.77.6 + sass-embedded: 1.77.5 + vitepress-theme-demoblock@1.4.2(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(sass@1.77.6)(typescript@4.9.5): dependencies: camelcase: 6.3.0 @@ -21926,7 +22432,7 @@ snapshots: '@types/markdown-it': 12.2.3 '@vitejs/plugin-vue': 1.10.2(vite@2.9.18(sass@1.77.6)) '@vue/compiler-sfc': 3.4.31 - '@vue/server-renderer': 3.4.31(vue@3.4.31(typescript@4.9.5)) + '@vue/server-renderer': 3.4.31(vue@3.5.6(typescript@4.9.5)) chalk: 4.1.2 compression: 1.7.4 debug: 4.3.5 @@ -21947,7 +22453,7 @@ snapshots: prismjs: 1.29.0 sirv: 1.0.19 vite: 2.9.18(sass@1.77.6) - vue: 3.4.31(typescript@4.9.5) + vue: 3.5.6(typescript@4.9.5) transitivePeerDependencies: - less - react @@ -21964,7 +22470,7 @@ snapshots: '@types/markdown-it': 12.2.3 '@vitejs/plugin-vue': 1.10.2(vite@2.9.18(sass@1.77.6)) '@vue/compiler-sfc': 3.4.31 - '@vue/server-renderer': 3.4.31(vue@3.4.31(typescript@5.5.3)) + '@vue/server-renderer': 3.4.31(vue@3.5.6(typescript@5.5.3)) chalk: 4.1.2 compression: 1.7.4 debug: 4.3.5 @@ -21985,7 +22491,7 @@ snapshots: prismjs: 1.29.0 sirv: 1.0.19 vite: 2.9.18(sass@1.77.6) - vue: 3.4.31(typescript@5.5.3) + vue: 3.5.6(typescript@5.5.3) transitivePeerDependencies: - less - react @@ -21999,13 +22505,13 @@ snapshots: dependencies: '@docsearch/css': 3.6.0 '@docsearch/js': 3.6.0(@algolia/client-search@4.24.0)(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(search-insights@2.14.0) - '@vitejs/plugin-vue': 3.2.0(vite@3.2.10(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3)) + '@vitejs/plugin-vue': 3.2.0(vite@3.2.10(@types/node@18.19.39)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3)) '@vue/devtools-api': 6.6.3 - '@vueuse/core': 9.2.0(vue@3.4.31(typescript@5.5.3)) + '@vueuse/core': 9.2.0(vue@3.5.6(typescript@5.5.3)) body-scroll-lock: 4.0.0-beta.0 shiki: 0.11.1 vite: 3.2.10(@types/node@18.19.39)(sass@1.77.6) - vue: 3.4.31(typescript@5.5.3) + vue: 3.5.6(typescript@5.5.3) transitivePeerDependencies: - '@algolia/client-search' - '@types/node' @@ -22025,13 +22531,13 @@ snapshots: dependencies: '@docsearch/css': 3.6.0 '@docsearch/js': 3.6.0(@algolia/client-search@4.24.0)(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(search-insights@2.14.0) - '@vitejs/plugin-vue': 3.2.0(vite@3.2.10(@types/node@20.5.1)(sass@1.77.6))(vue@3.4.31(typescript@4.9.5)) + '@vitejs/plugin-vue': 3.2.0(vite@3.2.10(@types/node@20.5.1)(sass@1.77.6))(vue@3.5.6(typescript@4.9.5)) '@vue/devtools-api': 6.6.3 - '@vueuse/core': 9.2.0(vue@3.4.31(typescript@4.9.5)) + '@vueuse/core': 9.2.0(vue@3.5.6(typescript@4.9.5)) body-scroll-lock: 4.0.0-beta.0 shiki: 0.11.1 vite: 3.2.10(@types/node@20.5.1)(sass@1.77.6) - vue: 3.4.31(typescript@4.9.5) + vue: 3.5.6(typescript@4.9.5) transitivePeerDependencies: - '@algolia/client-search' - '@types/node' @@ -22051,13 +22557,13 @@ snapshots: dependencies: '@docsearch/css': 3.6.0 '@docsearch/js': 3.6.0(@algolia/client-search@4.24.0)(react-dom@16.14.0(react@16.14.0))(react@16.14.0)(search-insights@2.14.0) - '@vitejs/plugin-vue': 3.2.0(vite@3.2.10(@types/node@20.5.1)(sass@1.77.6))(vue@3.4.31(typescript@5.5.3)) + '@vitejs/plugin-vue': 3.2.0(vite@3.2.10(@types/node@20.5.1)(sass@1.77.6))(vue@3.5.6(typescript@5.5.3)) '@vue/devtools-api': 6.6.3 - '@vueuse/core': 9.2.0(vue@3.4.31(typescript@5.5.3)) + '@vueuse/core': 9.2.0(vue@3.5.6(typescript@5.5.3)) body-scroll-lock: 4.0.0-beta.0 shiki: 0.11.1 vite: 3.2.10(@types/node@20.5.1)(sass@1.77.6) - vue: 3.4.31(typescript@5.5.3) + vue: 3.5.6(typescript@5.5.3) transitivePeerDependencies: - '@algolia/client-search' - '@types/node' @@ -22257,7 +22763,7 @@ snapshots: - supports-color - terser - vitest@1.6.0(@types/node@18.19.39)(happy-dom@14.12.3)(jsdom@20.0.3)(sass@1.77.6): + vitest@1.6.0(@types/node@18.19.39)(happy-dom@14.12.3)(jsdom@20.0.3)(sass-embedded@1.77.5)(sass@1.77.6): dependencies: '@vitest/expect': 1.6.0 '@vitest/runner': 1.6.0 @@ -22276,8 +22782,8 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.8.0 tinypool: 0.8.4 - vite: 5.3.3(@types/node@18.19.39)(sass@1.77.6) - vite-node: 1.6.0(@types/node@18.19.39)(sass@1.77.6) + vite: 5.4.6(@types/node@18.19.39)(sass-embedded@1.77.5)(sass@1.77.6) + vite-node: 1.6.0(@types/node@18.19.39)(sass-embedded@1.77.5)(sass@1.77.6) why-is-node-running: 2.2.2 optionalDependencies: '@types/node': 18.19.39 @@ -22287,12 +22793,13 @@ snapshots: - less - lightningcss - sass + - sass-embedded - stylus - sugarss - supports-color - terser - vitest@1.6.0(@types/node@20.5.1)(happy-dom@8.9.0)(jsdom@20.0.3)(sass@1.77.6): + vitest@1.6.0(@types/node@20.5.1)(happy-dom@8.9.0)(jsdom@20.0.3)(sass-embedded@1.77.5)(sass@1.77.6): dependencies: '@vitest/expect': 1.6.0 '@vitest/runner': 1.6.0 @@ -22311,8 +22818,8 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.8.0 tinypool: 0.8.4 - vite: 5.3.3(@types/node@20.5.1)(sass@1.77.6) - vite-node: 1.6.0(@types/node@20.5.1)(sass@1.77.6) + vite: 5.4.6(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6) + vite-node: 1.6.0(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6) why-is-node-running: 2.2.2 optionalDependencies: '@types/node': 20.5.1 @@ -22322,6 +22829,7 @@ snapshots: - less - lightningcss - sass + - sass-embedded - stylus - sugarss - supports-color @@ -22347,6 +22855,14 @@ snapshots: dependencies: vue: 3.4.31(typescript@5.5.3) + vue-demi@0.14.8(vue@3.5.6(typescript@4.9.5)): + dependencies: + vue: 3.5.6(typescript@4.9.5) + + vue-demi@0.14.8(vue@3.5.6(typescript@5.5.3)): + dependencies: + vue: 3.5.6(typescript@5.5.3) + vue-eslint-parser@9.4.3(eslint@8.57.0): dependencies: debug: 4.3.5 @@ -22365,6 +22881,11 @@ snapshots: '@vue/devtools-api': 6.6.3 vue: 3.4.31(typescript@4.9.5) + vue-router@4.4.0(vue@3.5.6(typescript@5.5.3)): + dependencies: + '@vue/devtools-api': 6.6.3 + vue: 3.5.6(typescript@5.5.3) + vue-template-compiler@2.7.16: dependencies: de-indent: 1.0.2 @@ -22397,6 +22918,13 @@ snapshots: semver: 7.6.2 typescript: 5.5.3 + vue-tsc@2.1.6(typescript@5.5.3): + dependencies: + '@volar/typescript': 2.4.5 + '@vue/language-core': 2.1.6(typescript@5.5.3) + semver: 7.6.2 + typescript: 5.5.3 + vue@3.4.31(typescript@4.9.5): dependencies: '@vue/compiler-dom': 3.4.31 @@ -22417,6 +22945,26 @@ snapshots: optionalDependencies: typescript: 5.5.3 + vue@3.5.6(typescript@4.9.5): + dependencies: + '@vue/compiler-dom': 3.5.6 + '@vue/compiler-sfc': 3.5.6 + '@vue/runtime-dom': 3.5.6 + '@vue/server-renderer': 3.5.6(vue@3.5.6(typescript@4.9.5)) + '@vue/shared': 3.5.6 + optionalDependencies: + typescript: 4.9.5 + + vue@3.5.6(typescript@5.5.3): + dependencies: + '@vue/compiler-dom': 3.5.6 + '@vue/compiler-sfc': 3.5.6 + '@vue/runtime-dom': 3.5.6 + '@vue/server-renderer': 3.5.6(vue@3.5.6(typescript@5.5.3)) + '@vue/shared': 3.5.6 + optionalDependencies: + typescript: 5.5.3 + w3c-xmlserializer@4.0.0: dependencies: xml-name-validator: 4.0.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index f569db1a02..66f59f5049 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -10,3 +10,4 @@ packages: - 'packages/mobile-ui-vue' - 'packages/renderer' - 'packages/ui-vue' + - 'packages/command-services-vue' -- Gitee From c2da9e4a0b7df914265978511a8f703feca80505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=B1=9F=E9=BE=99?= Date: Mon, 7 Oct 2024 14:10:54 +0800 Subject: [PATCH 2/6] chore: update lint config file --- .ls-lint.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.ls-lint.yml b/.ls-lint.yml index 5096965601..78eab485d0 100644 --- a/.ls-lint.yml +++ b/.ls-lint.yml @@ -105,5 +105,9 @@ ignore: - packages/cli/lib - packages/cli/templates - packages/cli/bin - # expression-engine + # expression-engine - packages/expression-engine/lib + - packages/expression-engine/node_modules + # command-services + - packages/command-services-vue + - packages/command-services-vue/node_modules -- Gitee From 7158d3df595636b9b5884af267608a3a5295c50a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=B1=9F=E9=BE=99?= Date: Sat, 12 Oct 2024 16:20:17 +0800 Subject: [PATCH 3/6] =?UTF-8?q?chore:=20=E5=AE=8C=E5=96=84bef=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=8F=8Arepository?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/bef/lib/bef-proxy.ts | 213 ++++++++++++++++++++++++++--- packages/bef/lib/bef-repository.ts | 130 ++++++++++++++++-- 2 files changed, 315 insertions(+), 28 deletions(-) diff --git a/packages/bef/lib/bef-proxy.ts b/packages/bef/lib/bef-proxy.ts index 290a2a340f..d3ec100cdb 100644 --- a/packages/bef/lib/bef-proxy.ts +++ b/packages/bef/lib/bef-proxy.ts @@ -1,6 +1,7 @@ import { HttpParams, HttpMethod, HttpMethods, HttpRequestConfig, HttpClient } from '@farris/devkit-vue'; -import { RequestInfo, ResponseInfo } from './types'; +import { ResponseInfo } from './types'; import { IProxyExtend } from './bef-proxy-extend'; +import { ChangeDetail } from './change/index'; /** * Bef API代理类 @@ -40,34 +41,139 @@ export abstract class BefProxy { const entityFilterString = JSON.stringify(entityFilter); params.entityFilter = entityFilterString; } + const bodyWithRequestInfo = this.proxyExtend.extendBody({}); const requestConfig: HttpRequestConfig = { - params + params, + body: bodyWithRequestInfo }; return this.request(HttpMethods.PUT, url, requestConfig); } - + /** + * 查询数据 + * @param entityFilter 过滤、排序、分页信息 + * @returns + * @description 和extendQuery类似,区别在于将查询参数放到body中 + */ + public filter(entityFilter: any): Promise { + let url = `${this.baseUrl}/extension/filter`; + const body: any = {}; + if (entityFilter) { + body.entityFilter = entityFilter; + } + const bodyWithRequestInfo = this.proxyExtend.extendBody(body); + const requestConfig: HttpRequestConfig = { + body: bodyWithRequestInfo + }; + return this.request(HttpMethods.POST, url, requestConfig); + } /** * 单条数据检索(扩展) */ public extendRetrieve(id: string): Promise { - const url = `${this.baseUrl}/extension/retrieve/${id}`; - return this.request(HttpMethods.PUT, url, {}, true); + const url = `${this.baseUrl}/extension/retrieve/${encodeURIComponent(id)}`; + const bodyWithRequestInfo = this.proxyExtend.extendBody({}); + const requestConfig: HttpRequestConfig = { + body: bodyWithRequestInfo + }; + return this.request(HttpMethods.PUT, url, requestConfig); } - /** - * 新增 + * 加锁编辑数据 + * @param id + * @returns */ - public create(defaultValue?: any, requestInfo?: RequestInfo): Promise { + public edit(id: string): Promise { + const url = `${this.baseUrl}/service/edit/${encodeURIComponent(id)}`; + const bodyWithRequestInfo = this.proxyExtend.extendBody({}); + const requestConfig: HttpRequestConfig = { + body: bodyWithRequestInfo + }; + return this.request(HttpMethods.PUT, url, requestConfig); + } + /** + * 新增数据 + */ + public create(defaultValue?: any): Promise { const body = { - defaultValue, - requestInfo, + defaultValue }; + const bodyWithRequestInfo = this.proxyExtend.extendBody(body); const requestConfig: HttpRequestConfig = { - body + body: bodyWithRequestInfo }; return this.request(HttpMethods.POST, this.baseUrl, requestConfig); } - + /** + * 批量新增主表数据 + * @param defaultValues 字段默认值,keyvalue格式 + * @returns + */ + public batchCreate(defaultValues: Array): Promise { + const url = `${this.baseUrl}/batch`; + const body: any = {}; + if (defaultValues && defaultValues.length > 0) { + body.retrieveDefaultParam = { + defaultValues + }; + } + const bodyWithRequestInfo = this.proxyExtend.extendBody(body); + const requestConfig: HttpRequestConfig = { + body: bodyWithRequestInfo + }; + return this.request(HttpMethods.POST, url, requestConfig); + } + /** + * 新增从表或从从表数据 + * @param fpath 实体路径 + * @param defaultValues 默认值,keyvalue格式 + * @returns + */ + public createByPath(fpath: string, defaultValues: Array): Promise { + const pathUrl = this.convertPathToUrl(fpath); + const url = `${this.baseUrl}${pathUrl}`; + const body: any = {}; + if (defaultValues && defaultValues.length > 0) { + body.retrieveDefaultParam = { + defaultValues + }; + } + const bodyWithRequestInfo = this.proxyExtend.extendBody(body); + const requestConfig: HttpRequestConfig = { + body: bodyWithRequestInfo + }; + return this.request(HttpMethods.POST, url, requestConfig); + } + /** + * 批量新增从表或从从表数据 + * @param path + * @param defaultValues + * @returns + */ + public batchCreateByPath(path: string, defaultValues: Array): Promise { + const pathUrl = this.convertPathToUrl(path); + const url = `${this.baseUrl}${pathUrl}/batch`; + const body: any = {}; + if (defaultValues && defaultValues.length > 0) { + body.retrieveDefaultParam = { + defaultValues + }; + } + const bodyWithRequestInfo = this.proxyExtend.extendBody(body); + const requestConfig: HttpRequestConfig = { + body: bodyWithRequestInfo + }; + return this.request(HttpMethods.POST, url, requestConfig); + } + public update(changeDetails: ChangeDetail[]): Promise { + const body = { + changeDetails + }; + const bodyWithRequestInfo = this.proxyExtend.extendBody(body); + const requestConfig: HttpRequestConfig = { + body: bodyWithRequestInfo + }; + return this.request(HttpMethods.PATCH, this.baseUrl, requestConfig); + } /** * 保存 */ @@ -82,7 +188,43 @@ export abstract class BefProxy { const url = `${this.baseUrl}/extension/delete/${id}`; return this.request(HttpMethods.PUT, url); } - + /** + * 删除从表或从从表数据 + * @param fpath 实体路径 + * @param id 实体id + * @returns + */ + public extendDeletByPath(fpath: string, id: string): Promise { + const pathUrl = this.convertPathToUrl(fpath); + const url = `${this.baseUrl}/extension${pathUrl}/${encodeURIComponent(id)}`; + const bodyWithRequestInfo = this.proxyExtend.extendBody({}); + const requestConfig: HttpRequestConfig = { + body: bodyWithRequestInfo + }; + return this.request(HttpMethods.PUT, url, requestConfig); + } + /** + * 批量删除从表或从从表数据 + * @param fPath 实体路径 + * @param ids 要删除的实体id + * @returns + */ + public extendBatchDeleteByPath(fPath: string, ids: string[]): Promise { + const pathUrl = this.convertPathToUrl(fPath); + const pathArray = pathUrl.split('/'); + if (pathArray.length < 3) { + throw Error(`根据path删除实体数据出错了。传入的path[${fPath}]格式不对`); + } + const url = `${this.baseUrl}/extension${pathUrl}/batch`; + const body = { + ids + }; + const bodyWithRequestInfo = this.proxyExtend.extendBody(body); + const requestConfig: HttpRequestConfig = { + body: bodyWithRequestInfo + }; + return this.request(HttpMethods.PUT, url, requestConfig); + } /** * 删除并保存 */ @@ -91,21 +233,35 @@ export abstract class BefProxy { const requestConfig: HttpRequestConfig = {}; return this.request(HttpMethods.PUT, url, requestConfig); } + /** + * 是否有未保存变更 + * @returns + */ + public hasChanges(): Promise { + const url = `${this.baseUrl}/haschanges`; + const bodyWithRequestInfo = this.proxyExtend.extendBody({}); + const requestConfig: HttpRequestConfig = { + body: bodyWithRequestInfo + }; + return this.request(HttpMethods.PUT, url, requestConfig); + } /** - * 批量删除 + * 批量删除实体 + * @param ids 实体id数组 + * @returns */ - public extendBatchDelete(ids: string[]): Promise { - const url = `${this.baseUrl}/extension/batchdelete`; - const params = { - ids: ids.join(',') + public extensionBatchDeletion(ids: string[]): Promise { + const url = `${this.baseUrl}/extension/batchdeletion`; + const body = { + ids }; + const bodyWithRequestInfo = this.proxyExtend.extendBody(body); const requestConfig: HttpRequestConfig = { - params + body: bodyWithRequestInfo }; return this.request(HttpMethods.PUT, url, requestConfig); } - /** * 取消 */ @@ -147,4 +303,21 @@ export abstract class BefProxy { return resultPromise; } + /** + * 将路径转换为url + * @param path + * @returns + */ + private convertPathToUrl(path: string): string { + const paths = path.split('/').filter((p) => p); + for (let index = paths.length - 1; index >= 0; index--) { + if (index % 2 === 0) { + paths[index] = encodeURIComponent(paths[index]); + } + if (paths[index] && paths[index].endsWith('s') && index % 2 !== 0) { + paths[index] = paths[index].substring(0, paths[index].length - 1).toLowerCase(); + } + } + return '/' + paths.join('/'); + } } diff --git a/packages/bef/lib/bef-repository.ts b/packages/bef/lib/bef-repository.ts index bfaa7cc205..4dbf78090b 100644 --- a/packages/bef/lib/bef-repository.ts +++ b/packages/bef/lib/bef-repository.ts @@ -1,4 +1,4 @@ -import { Type, Injector, HttpClient, Entity, EntityState, Repository, ViewModel } from '@farris/devkit-vue'; +import { Type, Injector, HttpClient, Entity, EntityState, Repository, ViewModel, createEntitiesBySchema, EntityListFieldSchema, EntitySchema, EntityFieldSchema } from '@farris/devkit-vue'; import { FrameworkSessionService } from './framework-session.service'; import { BefSessionHandlingStrategyFactory, BefSessionService } from './session/index'; import { BefProxy } from './bef-proxy'; @@ -6,6 +6,7 @@ import { BefProxyExtend } from './bef-proxy-extend'; /** * Bef实体仓库 + * @description */ abstract class BefRepository extends Repository { @@ -84,19 +85,18 @@ abstract class BefRepository extends Repository { } /** - * 获取实体集合 + * 查询实体 */ public getEntities(filters: any[], sorts: any[], pageSize: number, pageIndex: number): Promise { + // TODO: 需处理分页 const entityFilter = this.buildEntityFilter(filters, sorts, pageSize, pageIndex); - const queryPromise = this.apiProxy.extendQuery(entityFilter).then((returnValue: any) => { + const queryPromise = this.apiProxy.filter(entityFilter).then((returnValue: any) => { const entityDatas = returnValue.result; const entities = this.buildEntites(entityDatas); return entities; }); - return queryPromise; } - /** * 获取实体 */ @@ -109,7 +109,23 @@ abstract class BefRepository extends Repository { return retrievePromise; } - + /** + * 加锁编辑数据 + * @param id 数据id + * @returns + */ + public editEntityById(id: string): Promise { + const entity = this.entityState.getEntityById(id); + if (!entity) { + return Promise.resolve(null); + } + const editPromise = this.apiProxy.edit(id).then((returnValue: any) => { + const entityData = returnValue.data; + entity.loadData(entityData); + return entity; + }); + return editPromise; + } /** * 创建新实体 */ @@ -121,6 +137,55 @@ abstract class BefRepository extends Repository { }); return createPromise; } + /** + * 批量创建实体 + * @param defaultValues 实体字段默认值,keyvalue格式 + * @returns 实体数组 + */ + public createEntities(defaultValues: Array): Promise { + const createEntitiesPromise = this.apiProxy.batchCreate(defaultValues).then((returnValue: any) => { + const entityDatas = returnValue || []; + const entities = this.buildEntites(entityDatas); + return entities; + }); + return createEntitiesPromise; + } + /** + * 创建从表或从从表实体 + * @param path 实体路径 + * @param defaultValues 默认值,keyvalue格式 + * @returns + */ + public createEntityByPath(path: string, defaultValues: Array): Promise { + const createEntityByPathPromise = this.apiProxy.createByPath(path, defaultValues).then((returnValue: any) => { + const entityData = returnValue; + const paths = path.split('/').filter((item) => item).filter((item, index) => index % 2 !== 0); + const entityPath = this.entityState.createPath(paths); + const entityListFieldSchema = this.entityState.getEntitySchema().getFieldSchemaByPath(entityPath) as EntityListFieldSchema; + const entitySchema = entityListFieldSchema.entitySchema; + const entities = createEntitiesBySchema(entitySchema, [entityData]); + this.entityState.appendEntitesByPath(entityPath, entities); + return entities.pop() as T; + }); + return createEntityByPathPromise; + } + /** + * 批量创建从表或从从表实体 + * @param path 实体路径,如/1/educations + * @param defaultValues 默认值,keyvalue格式 + * @returns 实体数组 + */ + public createEntitiesByPath(path: string, defaultValues: Array): Promise { + const createEntitiesByPathPromise = this.apiProxy.batchCreateByPath(path, defaultValues).then((returnValue: any) => { + const entityDatas = returnValue || []; + const paths = path.split('/').filter((item) => item).filter((item, index) => index % 2 !== 0); + const entityPath = this.entityState.createPath(paths); + const entityListFieldSchema = this.entityState.getEntitySchema().getFieldSchemaByPath(entityPath) as EntityListFieldSchema; + const entitySchema = entityListFieldSchema.entitySchema; + return createEntitiesBySchema(entitySchema, entityDatas) as T[]; + }); + return createEntitiesByPathPromise; + } /** * 删除实体 @@ -132,7 +197,41 @@ abstract class BefRepository extends Repository { return resultPromsie; } - + /** + * 批量删除仓库数据 + * @param ids 实体id数组 + * @returns + */ + public removeEntitiesByIds(ids: string[]): Promise { + const removeEntitiesByIdsPromise = this.apiProxy.extensionBatchDeletion(ids).then((returnValue: any) => { + return true; + }); + return removeEntitiesByIdsPromise; + } + /** + * 删除从表或从从表实体 + * @param fpath 实体路径 + * @param id 实体id + * @returns + */ + public removeEntityByPath(fpath: string, id: string): Promise { + const removeEntityByPathPromise = this.apiProxy.extendDeletByPath(fpath, id).then((returnValue: any) => { + return true; + }); + return removeEntityByPathPromise; + } + /** + * 批量删除从表或从从表数据 + * @param fPath 实体路径 + * @param ids 实体id数组 + * @returns + */ + public removeEntitiesByPath(fPath: string, ids: string[]): Promise { + const removeEntitiesByPathPromise = this.apiProxy.extendBatchDeleteByPath(fPath, ids).then((returnValue: any) => { + return true; + }); + return removeEntitiesByPathPromise; + } /** * 删除实体 */ @@ -167,11 +266,26 @@ abstract class BefRepository extends Repository { return resultPromise; } - + /** + * 是否有未保存的变更 + * @returns + */ + public hasChanges() { + const hasChangesPromise = this.apiProxy.hasChanges().then((returnValue: any) => { + return returnValue; + }); + return hasChangesPromise; + } /** * 构造EntityFilter */ private buildEntityFilter(filter: any[], sort: any[], pageSize: number, pageIndex: number) { + if (!pageIndex) { + pageIndex = 1; + } + if (!pageSize) { + pageSize = 0; + } const entityFilter = { FilterConditions: filter, SortConditions: sort, -- Gitee From a272c9e44f707446e7de54a80541ba6b9cba056c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=B1=9F=E9=BE=99?= Date: Mon, 14 Oct 2024 13:51:34 +0800 Subject: [PATCH 4/6] =?UTF-8?q?feature:=20=E6=94=AF=E6=8C=81=E4=BC=9A?= =?UTF-8?q?=E8=AF=9D=E5=A4=8D=E7=94=A8=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/bef/lib/bef-repository.ts | 2 +- ...ef-separated-session-handling-strategy.ts} | 95 +++++++++++--- .../bef-unified-session-handling-strategy.ts | 93 ++++++++++++++ .../handling-strategy-factory.ts | 27 ++-- .../handling-strategies/handling-strategy.ts | 121 ++++++------------ .../lib/session/handling-strategies/index.ts | 4 +- .../lib/session/handling-strategies/types.ts | 6 + .../lib/session/storage-strategies/index.ts | 2 +- .../session-storage-strategy.ts | 6 +- .../storage-strategies/storage-strategy.ts | 12 -- .../lib/session/storage-strategies/types.ts | 12 ++ packages/bef/lib/utils/bef-http.util.ts | 9 ++ 12 files changed, 255 insertions(+), 134 deletions(-) rename packages/bef/lib/session/handling-strategies/{separated-handling-strategy.ts => bef-separated-session-handling-strategy.ts} (34%) create mode 100644 packages/bef/lib/session/handling-strategies/bef-unified-session-handling-strategy.ts create mode 100644 packages/bef/lib/session/handling-strategies/types.ts delete mode 100644 packages/bef/lib/session/storage-strategies/storage-strategy.ts create mode 100644 packages/bef/lib/session/storage-strategies/types.ts diff --git a/packages/bef/lib/bef-repository.ts b/packages/bef/lib/bef-repository.ts index 4dbf78090b..1668b1a67d 100644 --- a/packages/bef/lib/bef-repository.ts +++ b/packages/bef/lib/bef-repository.ts @@ -80,7 +80,7 @@ abstract class BefRepository extends Repository { const httpClient = this.injector.get(HttpClient); const baseUrl = `${this.apiProxy.baseUrl}`; const sessionHandlingStrategyFactory = new BefSessionHandlingStrategyFactory(); - const sessionHandlingStrategy = sessionHandlingStrategyFactory.create(handlingStrategyName, frmSessionService, baseUrl, httpClient); + const sessionHandlingStrategy = sessionHandlingStrategyFactory.create(handlingStrategyName, frmSessionService, baseUrl, httpClient, this.injector); this.sessionService = new BefSessionService(sessionHandlingStrategy); } diff --git a/packages/bef/lib/session/handling-strategies/separated-handling-strategy.ts b/packages/bef/lib/session/handling-strategies/bef-separated-session-handling-strategy.ts similarity index 34% rename from packages/bef/lib/session/handling-strategies/separated-handling-strategy.ts rename to packages/bef/lib/session/handling-strategies/bef-separated-session-handling-strategy.ts index 4ac1266311..9d0c18c85a 100644 --- a/packages/bef/lib/session/handling-strategies/separated-handling-strategy.ts +++ b/packages/bef/lib/session/handling-strategies/bef-separated-session-handling-strategy.ts @@ -1,60 +1,105 @@ -import { HttpHeaders, HttpClient } from '@farris/devkit-vue'; +import { HttpHeaders, HttpClient, HttpRequestConfig, Injector } from '@farris/devkit-vue'; import { BefHttpUtil, BefEnvUtil } from '../../utils/index'; import { FrameworkSessionService } from '../../framework-session.service'; -import { BeSessionStorageStrategy } from '../storage-strategies/index'; -import { BefSessionHandlingStrategy } from './handling-strategy'; +import { SessionStorageStrategy } from '../storage-strategies/index'; +import { SessionHandlingStrategy } from './handling-strategy'; +import { RuntimeContext } from './types'; /** * 隔离的BeSession处理策略 */ -class BefSeparatedSessionHandlingStrategy extends BefSessionHandlingStrategy { +class BefSeparatedSessionHandlingStrategy extends SessionHandlingStrategy { /** * 构造函数 */ constructor( - storageStrategy: BeSessionStorageStrategy, + storageStrategy: SessionStorageStrategy, frmSessionService: FrameworkSessionService, httpClient: HttpClient, - beBaseUrl: string + beBaseUrl: string, + injector: Injector ) { - super(storageStrategy, frmSessionService, httpClient, beBaseUrl); + super(storageStrategy, frmSessionService, httpClient, beBaseUrl, injector); } /** * 获取BeSessionId */ - public getSessionId(): Promise { - const beSessionId = this.getSessionIdFromStorage(); + public getSessionId(runtimeContext?: RuntimeContext): Promise { + const beSessionId = this.getSessionIdFromStorage(runtimeContext); if (beSessionId) { return Promise.resolve(beSessionId) } - - const sessionIdPromise = this.closeOldSession().then(() => { - return this.createSession(); + const sessionIdPromise = this.closeLastTimeUsedSession().then(() => { + return this.createSession(runtimeContext); }); - return sessionIdPromise; + } + /** + * 创建BeSessionId + */ + protected createSession(runtimeContext?: RuntimeContext): Promise { + const requestConfig: HttpRequestConfig = { + responseType: 'text', + headers: { + 'Content-Type': 'application/json' + } + }; + const frmSessionId = this.frameworkSessionId; + if (frmSessionId) { + requestConfig.headers = BefHttpUtil.appendCafRuntimeCommonVariable(requestConfig.headers, this.frameworkSessionId); + } + return this.httpClient.post(this.createSessionUrl, null, requestConfig).then((beSessionId: string) => { + this.setSessionId(beSessionId, runtimeContext); + return beSessionId; + }); } + /** + * 关闭上次使用的会话 + */ + protected closeLastTimeUsedSession(): Promise { + if (!this.lastTimeUsedSessionId) { + return Promise.resolve(true); + } + + const requestConfig: HttpRequestConfig = { + responseType: 'text', + headers: { + 'Content-Type': 'application/json' + } + }; + + // headers处理 + requestConfig.headers = BefHttpUtil.appendCafRuntimeContext(requestConfig.headers, this.lastTimeUsedSessionId); + if (this.frameworkSessionId) { + requestConfig.headers = BefHttpUtil.appendCafRuntimeCommonVariable(requestConfig.headers, this.frameworkSessionId); + } + + // 无论是否成功,统一置空cleardBeSessionId + return this.httpClient.post(this.closeSessionUrl, null, requestConfig).then(() => { + return true; + }); + } /** * 设置BeSessionId */ - public setSessionId(sessionId: string): void { - const sessionKey = this.getSessionStorageKey(); + public setSessionId(sessionId: string, runtimeContext?: RuntimeContext): void { + const sessionKey = this.getSessionStorageKey(runtimeContext); this.storageStrategy.setItem(sessionKey, sessionId); } /** * 清空BeSessionId */ - public clearSessionId() { + public clearSessionId(runtimeContext?: RuntimeContext) { if (BefEnvUtil.isInFramework() === true) { - this.storageStrategy.removeItemsByScope(this.frmSessionId); + this.storageStrategy.removeItemsByScope(this.frameworkSessionId); } else { - const sessionKey = this.getSessionStorageKey(); - this.oldBeSessionId = this.getSessionIdFromStorage(); + const sessionKey = this.getSessionStorageKey(runtimeContext); + this.lastTimeUsedSessionId = this.getSessionIdFromStorage(runtimeContext); this.storageStrategy.removeItem(sessionKey); } } @@ -87,8 +132,16 @@ class BefSeparatedSessionHandlingStrategy extends BefSessionHandlingStrategy { /** * 获取某个Repository对应的BeSession的唯一key */ - protected getSessionStorageKey(): string { - return `${this.frmSessionId}_${this.beBaseUrl}`; + protected getSessionStorageKey(runtimeContext?: RuntimeContext): string { + let sessionId: string = this.frameworkSessionId; + if (runtimeContext) { + sessionId = this.getFrameworkSessionId(runtimeContext); + } + const tabId = runtimeContext && runtimeContext.tabId; + if (tabId) { + return `${sessionId}_${tabId}_${this.baseUrl}`; + } + return `${sessionId}_${this.baseUrl}`; } } diff --git a/packages/bef/lib/session/handling-strategies/bef-unified-session-handling-strategy.ts b/packages/bef/lib/session/handling-strategies/bef-unified-session-handling-strategy.ts new file mode 100644 index 0000000000..eac08442ea --- /dev/null +++ b/packages/bef/lib/session/handling-strategies/bef-unified-session-handling-strategy.ts @@ -0,0 +1,93 @@ +import { HttpClient, HttpHeaders, Injector, App } from '@farris/devkit-vue'; +import { SessionHandlingStrategy } from './handling-strategy'; +import { SessionStorageStrategy } from '../storage-strategies'; +import { FrameworkSessionService } from '../../framework-session.service'; +import { RuntimeContext } from './types'; +import { BefHttpUtil } from '../../utils'; + +/** + * 会话复用场景下会话处理策略 + */ +export class BefUnifiedSessionHandlingStrategy extends SessionHandlingStrategy { + /** + * 构造函数 + */ + constructor( + storageStrategy: SessionStorageStrategy, + frmSessionService: FrameworkSessionService, + httpClient: HttpClient, + beBaseUrl: string, + protected injector: Injector + ) { + super(storageStrategy, frmSessionService, httpClient, beBaseUrl, injector); + } + /** + * 获取会话复用的session id + * @param runtimeContext runtime context + */ + public getSessionId(runtimeContext: RuntimeContext): Promise { + const sessionKey = this.getSessionStorageKey(runtimeContext); + const sessionId = this.storageStrategy.getItem(sessionKey); + return Promise.resolve(sessionId); + } + /** + * 设置session id + * @param sessionId session id + * @param runtimeContext runtime context + */ + public setSessionId(sessionId: string, runtimeContext: RuntimeContext): void { + const sessionKey = this.getSessionStorageKey(runtimeContext); + this.storageStrategy.setItem(sessionKey, sessionId); + } + /** + * 清空session id + * @param runtimeContext runtime context + */ + public clearSessionId(runtimeContext: RuntimeContext): void { + const sessionKey = this.getSessionStorageKey(runtimeContext); + // this.lastTimeUsedSessionId = this.getSessionIdFromStorage(runtimeContext); + this.storageStrategy.removeItem(sessionKey); + } + /** + * 处理请求header + * @param headers + * @param runtimeContext runtime context + */ + public handleRequestHeaders(headers: HttpHeaders, runtimeContext?: RuntimeContext): HttpHeaders { + const frmSessionId = this.getFrameworkSessionId(runtimeContext); + const beSessionId = this.getSessionIdFromStorage(runtimeContext); + const app = this.injector.get(App, undefined); + if (app) { + // 使用应用id作为function instance id + const funcInstId = app.getId(); + headers = BefHttpUtil.appendFuncInstId(headers, funcInstId); + } + headers = BefHttpUtil.appendCafRuntimeCommonVariable(headers, frmSessionId); + if (beSessionId) { + headers = BefHttpUtil.appendCafRuntimeContext(headers, beSessionId); + } + return headers; + } + /** + * 处理返回header + * @param headers + */ + public handleReponseHeaders(headers: HttpHeaders): void { + } + /** + * 构造session存储的key + * @param runtimeContext runtime context + */ + protected getSessionStorageKey(runtimeContext?: RuntimeContext): string { + let sessionId = this.frameworkSessionId; + if (runtimeContext) { + sessionId = this.getFrameworkSessionId(runtimeContext); + } + const tabId = runtimeContext && runtimeContext.tabId; + if (tabId) { + return `${sessionId}_${tabId}_${this.baseUrl}`; + } + return `${sessionId}_${this.baseUrl}`; + } + +} \ No newline at end of file diff --git a/packages/bef/lib/session/handling-strategies/handling-strategy-factory.ts b/packages/bef/lib/session/handling-strategies/handling-strategy-factory.ts index 462f874609..e46a2ec8b2 100644 --- a/packages/bef/lib/session/handling-strategies/handling-strategy-factory.ts +++ b/packages/bef/lib/session/handling-strategies/handling-strategy-factory.ts @@ -1,14 +1,14 @@ -import { HttpClient } from '@farris/devkit-vue'; +import { HttpClient, Injector } from '@farris/devkit-vue'; import { FrameworkSessionService } from '../../framework-session.service'; -import { BeSessionStorageStrategy, SessionStorageBeSessionStorageStrategy } from '../storage-strategies/index'; -import { BefSessionHandlingStrategy } from './handling-strategy'; -import { BefSeparatedSessionHandlingStrategy } from './separated-handling-strategy'; +import { SessionStorageStrategy } from '../storage-strategies/index'; +import { SessionHandlingStrategy } from './handling-strategy'; +import { BefSeparatedSessionHandlingStrategy } from './bef-separated-session-handling-strategy'; +import { BefUnifiedSessionHandlingStrategy } from './bef-unified-session-handling-strategy'; /** * BeSession处理策略工厂 */ class BefSessionHandlingStrategyFactory { - /** * 创建BeSession处理策略 */ @@ -16,20 +16,23 @@ class BefSessionHandlingStrategyFactory { handlingStrategyName: string, frmSessionService: FrameworkSessionService, beBaseUrl: string, - httpClient: HttpClient - ): BefSessionHandlingStrategy { - + httpClient: HttpClient, + injector: Injector + ): SessionHandlingStrategy { const storageStrategy = this.createStorageStrategy(); - return new BefSeparatedSessionHandlingStrategy(storageStrategy, frmSessionService, httpClient, beBaseUrl); + if (handlingStrategyName === 'UnifiedSession') { + return new BefUnifiedSessionHandlingStrategy(storageStrategy, frmSessionService, httpClient, beBaseUrl, injector); + } else { + return new BefSeparatedSessionHandlingStrategy(storageStrategy, frmSessionService, httpClient, beBaseUrl, injector); + } } /** * 创建BeSession缓存策略 */ - private createStorageStrategy(): BeSessionStorageStrategy { - return new SessionStorageBeSessionStorageStrategy(); + private createStorageStrategy(): SessionStorageStrategy { + return new SessionStorageStrategy(); } - } export { BefSessionHandlingStrategyFactory }; diff --git a/packages/bef/lib/session/handling-strategies/handling-strategy.ts b/packages/bef/lib/session/handling-strategies/handling-strategy.ts index e258b1ed75..339d96797e 100644 --- a/packages/bef/lib/session/handling-strategies/handling-strategy.ts +++ b/packages/bef/lib/session/handling-strategies/handling-strategy.ts @@ -1,22 +1,22 @@ -import { HttpHeaders, HttpRequestConfig, HttpClient } from '@farris/devkit-vue'; -import { BefHttpUtil } from '../../utils/index'; +import { HttpHeaders, HttpClient, Injector } from '@farris/devkit-vue'; import { FrameworkSessionService } from '../../framework-session.service'; -import { BeSessionStorageStrategy } from '../storage-strategies/index'; +import { SessionStorageStrategy } from '../storage-strategies/index'; +import { RuntimeContext } from './types'; /** - * BefSession处理策略类 + * 会话处理策略类 */ -abstract class BefSessionHandlingStrategy { +abstract class SessionHandlingStrategy { /** * 存储策略 */ - protected storageStrategy: BeSessionStorageStrategy; + protected storageStrategy: SessionStorageStrategy; /** * 框架Session服务 */ - protected frmSessionService: FrameworkSessionService; + protected frameworkSessionService: FrameworkSessionService; /** * Http客户端 @@ -26,119 +26,74 @@ abstract class BefSessionHandlingStrategy { /** * 创建Session的的EAPI地址 */ - protected beBaseUrl: string; + protected baseUrl: string; /** - * 创建BeSession接口地址 + * 创建Session接口地址 */ - protected beCreateSessionUrl: string; + protected createSessionUrl: string; /** - * 关闭BeSession接口地址 + * 关闭Session接口地址 */ - protected beCloseSessionUrl: string; - + protected closeSessionUrl: string; /** - * 框架SessionId(用户的或者功能菜单的) + * 上次使用的会话id */ - protected get frmSessionId(): string { - return this.frmSessionService.getCurrentSessionId(); - } - + protected lastTimeUsedSessionId: string; /** - * 清空的BeSessionId + * injector */ - protected oldBeSessionId: string | null; + protected injector: Injector; /** * 构造函数 */ constructor( - storageStrategy: BeSessionStorageStrategy, frmSessionService: FrameworkSessionService, - httpClient: HttpClient, beBaseUrl: string + storageStrategy: SessionStorageStrategy, + frameworkSessionService: FrameworkSessionService, + httpClient: HttpClient, + baseUrl: string, + injector: Injector ) { this.storageStrategy = storageStrategy; - this.frmSessionService = frmSessionService; + this.frameworkSessionService = frameworkSessionService; this.httpClient = httpClient; - this.beBaseUrl = beBaseUrl; - this.beCreateSessionUrl = `${beBaseUrl}/service/createsession`; - this.beCloseSessionUrl = `${beBaseUrl}/service/closesession`; + this.baseUrl = baseUrl; + this.createSessionUrl = `${baseUrl}/service/createsession`; + this.closeSessionUrl = `${baseUrl}/service/closesession`; + this.injector = injector; } - public abstract getSessionId(): Promise; - public abstract setSessionId(sessionId: string): void; - public abstract clearSessionId(): void; + public abstract getSessionId(runtimeContext?: RuntimeContext): Promise; + public abstract setSessionId(sessionId: string, runtimeContext?: RuntimeContext): void; + public abstract clearSessionId(runtimeContext?: RuntimeContext): void; public abstract handleRequestHeaders(headers: HttpHeaders): HttpHeaders; public abstract handleReponseHeaders(headers: HttpHeaders): void; - protected abstract getSessionStorageKey(): string; + protected abstract getSessionStorageKey(runtimeContext?: RuntimeContext): string; /** * 获取框架SessionId */ - public getFrameworkSessionId() { - return this.frmSessionId; + protected getFrameworkSessionId(runtimeContext?: RuntimeContext) { + return this.frameworkSessionId; } /** * 从缓存中获取BeSession */ - protected getSessionIdFromStorage() { - const sessionStorageKey = this.getSessionStorageKey(); + protected getSessionIdFromStorage(runtimeContext?: RuntimeContext) { + const sessionStorageKey = this.getSessionStorageKey(runtimeContext); const beSessionId = this.storageStrategy.getItem(sessionStorageKey); return beSessionId; } - /** - * 创建BeSessionId + * 框架SessionId(用户的或者功能菜单的) */ - protected createSession(): Promise { - const requestConfig: HttpRequestConfig = { - responseType: 'text', - headers: { - 'Content-Type': 'application/json' - } - }; - const frmSessionId = this.frmSessionId; - if (frmSessionId) { - requestConfig.headers = BefHttpUtil.appendSessionId(requestConfig.headers as any, this.frmSessionId); - requestConfig.headers = BefHttpUtil.appendCafRuntimeCommonVariable(requestConfig.headers, this.frmSessionId); - } - - return this.httpClient.post(this.beCreateSessionUrl, null, requestConfig).then((beSessionId: string) => { - this.setSessionId(beSessionId); - return beSessionId; - }); + protected get frameworkSessionId(): string { + return this.frameworkSessionService.getCurrentSessionId(); } - /** - * 关闭BeSessionId - */ - protected closeOldSession(): Promise { - - if (!this.oldBeSessionId) { - return Promise.resolve(true); - } - - const requestConfig: HttpRequestConfig = { - responseType: 'text', - headers: { - 'Content-Type': 'application/json' - } - }; - - // headers处理 - requestConfig.headers = BefHttpUtil.appendCafRuntimeContext(requestConfig.headers, this.oldBeSessionId); - requestConfig.headers = BefHttpUtil.appendSessionId(requestConfig.headers as any, this.oldBeSessionId); - if (this.frmSessionId) { - requestConfig.headers = BefHttpUtil.appendCafRuntimeCommonVariable(requestConfig.headers, this.frmSessionId); - } - - // 无论是否成功,统一置空cleardBeSessionId - return this.httpClient.post(this.beCloseSessionUrl, null, requestConfig).then(() => { - this.oldBeSessionId = null; - return true; - }); - } } -export { BefSessionHandlingStrategy }; +export { SessionHandlingStrategy }; diff --git a/packages/bef/lib/session/handling-strategies/index.ts b/packages/bef/lib/session/handling-strategies/index.ts index 3a56d75040..575f030f97 100644 --- a/packages/bef/lib/session/handling-strategies/index.ts +++ b/packages/bef/lib/session/handling-strategies/index.ts @@ -1,3 +1,5 @@ +export * from './types'; export * from './handling-strategy'; -export * from './separated-handling-strategy'; +export * from './bef-separated-session-handling-strategy'; +export * from './bef-unified-session-handling-strategy'; export * from './handling-strategy-factory'; diff --git a/packages/bef/lib/session/handling-strategies/types.ts b/packages/bef/lib/session/handling-strategies/types.ts new file mode 100644 index 0000000000..44ab1934d2 --- /dev/null +++ b/packages/bef/lib/session/handling-strategies/types.ts @@ -0,0 +1,6 @@ +/** + * 运行上下文 + */ +export interface RuntimeContext { + tabId: string; +} \ No newline at end of file diff --git a/packages/bef/lib/session/storage-strategies/index.ts b/packages/bef/lib/session/storage-strategies/index.ts index aa9efe59e2..ecb4cd3ae8 100644 --- a/packages/bef/lib/session/storage-strategies/index.ts +++ b/packages/bef/lib/session/storage-strategies/index.ts @@ -1,2 +1,2 @@ -export * from './storage-strategy'; +export * from './types'; export * from './session-storage-strategy'; diff --git a/packages/bef/lib/session/storage-strategies/session-storage-strategy.ts b/packages/bef/lib/session/storage-strategies/session-storage-strategy.ts index 5d3ef3f228..965ec1d267 100644 --- a/packages/bef/lib/session/storage-strategies/session-storage-strategy.ts +++ b/packages/bef/lib/session/storage-strategies/session-storage-strategy.ts @@ -1,4 +1,4 @@ -import { BeSessionStorageStrategy } from './storage-strategy'; +import { StorageStrategy } from './types'; /** * 基于浏览器SessionStorage的BeSession缓存 @@ -18,7 +18,7 @@ import { BeSessionStorageStrategy } from './storage-strategy'; * } * } */ -class SessionStorageBeSessionStorageStrategy implements BeSessionStorageStrategy { +class SessionStorageStrategy implements StorageStrategy { /** * 缓存Token @@ -93,4 +93,4 @@ class SessionStorageBeSessionStorageStrategy implements BeSessionStorageStrategy } } -export { SessionStorageBeSessionStorageStrategy }; +export { SessionStorageStrategy }; diff --git a/packages/bef/lib/session/storage-strategies/storage-strategy.ts b/packages/bef/lib/session/storage-strategies/storage-strategy.ts deleted file mode 100644 index cc0e611ed9..0000000000 --- a/packages/bef/lib/session/storage-strategies/storage-strategy.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * BeSession缓存 - */ -interface BeSessionStorageStrategy { - getItem(beSessionKey: string): string; - setItem(beSessionKey: string, beSessionid: string): void; - removeItem(beSessionKey: string): void; - removeItemsByScope(beSessionScope: string): void; - clear(): void; -} - -export { BeSessionStorageStrategy }; diff --git a/packages/bef/lib/session/storage-strategies/types.ts b/packages/bef/lib/session/storage-strategies/types.ts new file mode 100644 index 0000000000..ce26427386 --- /dev/null +++ b/packages/bef/lib/session/storage-strategies/types.ts @@ -0,0 +1,12 @@ +/** + * 缓存策略 + */ +interface StorageStrategy { + getItem(key: string): string; + setItem(key: string, value: string): void; + removeItem(key: string): void; + removeItemsByScope(scope: string): void; + clear(): void; +} + +export { StorageStrategy }; diff --git a/packages/bef/lib/utils/bef-http.util.ts b/packages/bef/lib/utils/bef-http.util.ts index 411bf08e9b..757774c99d 100644 --- a/packages/bef/lib/utils/bef-http.util.ts +++ b/packages/bef/lib/utils/bef-http.util.ts @@ -43,6 +43,15 @@ class BefHttpUtil { headers = HttpUtil.appendHeader(headers, 'Content-Type', contentType); return headers; } + /** + * 追加Func-Inst-Id + * @param headers + * @param funcInstId + * @returns + */ + public static appendFuncInstId(headers: any, funcInstId: string) { + return headers.append('Func-Inst-Id', funcInstId); + } } -- Gitee From e88c166514d5d1f21b01441476f5f3b314677c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=B1=9F=E9=BE=99?= Date: Mon, 14 Oct 2024 13:52:36 +0800 Subject: [PATCH 5/6] =?UTF-8?q?chore:=20app=E5=A2=9E=E5=8A=A0id=E5=B1=9E?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/devkit/lib/app/app.ts | 14 +- packages/devkit/lib/common/index.ts | 1 + packages/devkit/lib/common/token.ts | 15 ++ pnpm-lock.yaml | 280 ++++++++++++++++++++++++++-- 4 files changed, 295 insertions(+), 15 deletions(-) create mode 100644 packages/devkit/lib/common/token.ts diff --git a/packages/devkit/lib/app/app.ts b/packages/devkit/lib/app/app.ts index 07ea77b353..5e70e4c8d4 100644 --- a/packages/devkit/lib/app/app.ts +++ b/packages/devkit/lib/app/app.ts @@ -1,3 +1,4 @@ +import { Token } from '../common'; import { Injector } from '../common/di/index'; import { ViewModelOptions, createViewModel, ViewModelNode } from '../viewmodel/index'; @@ -5,7 +6,10 @@ import { ViewModelOptions, createViewModel, ViewModelNode } from '../viewmodel/i * 应用 */ class App { - + /** + * 应用标识 + */ + private id: string; /** * 注入器 */ @@ -22,8 +26,14 @@ class App { constructor(injector: Injector) { this.injector = injector; this.viewModels = []; + this.id = Token.create(); + } + /** + * 获取应用唯一标识 + */ + public getId() { + return this.id; } - /** * 获取注入器 */ diff --git a/packages/devkit/lib/common/index.ts b/packages/devkit/lib/common/index.ts index e395526f4f..c7b9326069 100644 --- a/packages/devkit/lib/common/index.ts +++ b/packages/devkit/lib/common/index.ts @@ -3,3 +3,4 @@ export * from './disposable'; export * from './di/index'; export * from './metadata/index'; export * from './effect/index'; +export * from './token'; diff --git a/packages/devkit/lib/common/token.ts b/packages/devkit/lib/common/token.ts new file mode 100644 index 0000000000..fb8692b84a --- /dev/null +++ b/packages/devkit/lib/common/token.ts @@ -0,0 +1,15 @@ +export class Token { + private static previous = 0; + public static create(redix?: number) { + const timestamp = Date.now().valueOf(); + let uuid = 0; + if (timestamp > Token.previous) { + Token.previous = timestamp; + uuid = timestamp; + } else { + Token.previous = Token.previous + 100; + uuid = Token.previous; + } + return uuid.toString(redix); + } +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 34d72d525a..d1d70cd493 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -326,10 +326,10 @@ importers: version: 26.0.24 '@typescript-eslint/eslint-plugin': specifier: ^7.15.0 - version: 7.15.0(@typescript-eslint/parser@7.15.0(eslint@8.57.0)(typescript@4.9.5))(eslint@8.57.0)(typescript@4.9.5) + version: 7.15.0(@typescript-eslint/parser@7.15.0(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5) '@typescript-eslint/parser': specifier: ^7.15.0 - version: 7.15.0(eslint@8.57.0)(typescript@4.9.5) + version: 7.15.0(eslint@7.32.0)(typescript@4.9.5) '@vitejs/plugin-vue': specifier: ^4.0.0 version: 4.6.2(vite@4.5.3(@types/node@18.19.39)(sass@1.77.6))(vue@3.4.31(typescript@4.9.5)) @@ -363,6 +363,12 @@ importers: conventional-changelog-cli: specifier: ^2.2.2 version: 2.2.2 + eslint: + specifier: ^7.27.0 + version: 7.32.0 + eslint-config-google: + specifier: ^0.14.0 + version: 0.14.0(eslint@7.32.0) happy-dom: specifier: ^8.9.0 version: 8.9.0 @@ -1484,6 +1490,9 @@ packages: resolution: {integrity: sha512-UQFQ6SgyJ6LX42W8rHCs8KVc0JS0tzVL9ct4XYedJukskYVWTo49tNiMEK9C2HTyarbNiT/RVIRSY82vH+6sTg==} engines: {node: '>=4'} + '@babel/code-frame@7.12.11': + resolution: {integrity: sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==} + '@babel/code-frame@7.24.7': resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} @@ -2847,6 +2856,10 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint/eslintrc@0.4.3': + resolution: {integrity: sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==} + engines: {node: ^10.12.0 || >=12.0.0} + '@eslint/eslintrc@2.1.4': resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2875,10 +2888,19 @@ packages: engines: {node: '>=10.10.0'} deprecated: Use @eslint/config-array instead + '@humanwhocodes/config-array@0.5.0': + resolution: {integrity: sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} + '@humanwhocodes/object-schema@1.2.1': + resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + deprecated: Use @eslint/object-schema instead + '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} deprecated: Use @eslint/object-schema instead @@ -3972,6 +3994,11 @@ packages: resolution: {integrity: sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==} engines: {node: '>=0.4.0'} + acorn@7.4.1: + resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} + engines: {node: '>=0.4.0'} + hasBin: true + acorn@8.12.1: resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} engines: {node: '>=0.4.0'} @@ -5829,6 +5856,12 @@ packages: eslint: ^7.32.0 || ^8.2.0 eslint-plugin-import: ^2.25.2 + eslint-config-google@0.14.0: + resolution: {integrity: sha512-WsbX4WbjuMvTdeVL6+J3rK1RGhCTqjsFjX7UMSMgZiyxxaNLkoJENbrGExzERFeoTpGw3F3FypTiWAP9ZXzkEw==} + engines: {node: '>=0.10.0'} + peerDependencies: + eslint: '>=5.16.0' + eslint-config-prettier@8.10.0: resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} hasBin: true @@ -5875,14 +5908,36 @@ packages: peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 + eslint-scope@5.1.1: + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} + eslint-scope@7.2.2: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-utils@2.1.0: + resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} + engines: {node: '>=6'} + + eslint-visitor-keys@1.3.0: + resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} + engines: {node: '>=4'} + + eslint-visitor-keys@2.1.0: + resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} + engines: {node: '>=10'} + eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint@7.32.0: + resolution: {integrity: sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==} + engines: {node: ^10.12.0 || >=12.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. + hasBin: true + eslint@8.57.0: resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5892,6 +5947,10 @@ packages: resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} engines: {node: '>=0.10'} + espree@7.3.1: + resolution: {integrity: sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==} + engines: {node: ^10.12.0 || >=12.0.0} + espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -5909,6 +5968,10 @@ packages: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} + estraverse@4.3.0: + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} + estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} @@ -6237,6 +6300,9 @@ packages: resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} engines: {node: '>= 0.4'} + functional-red-black-tree@1.0.1: + resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} + functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} @@ -6637,6 +6703,10 @@ packages: ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + ignore@4.0.6: + resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} + engines: {node: '>= 4'} + ignore@5.3.1: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} @@ -8532,6 +8602,10 @@ packages: process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + progress@2.0.3: + resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} + engines: {node: '>=0.4.0'} + prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} @@ -8742,6 +8816,10 @@ packages: resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} engines: {node: '>= 0.4'} + regexpp@3.2.0: + resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} + engines: {node: '>=8'} + regexpu-core@5.3.2: resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==} engines: {node: '>=4'} @@ -9970,6 +10048,9 @@ packages: v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + v8-compile-cache@2.4.0: + resolution: {integrity: sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==} + v8-to-istanbul@9.3.0: resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} engines: {node: '>=10.12.0'} @@ -10691,6 +10772,10 @@ snapshots: '@arr/every@1.0.1': {} + '@babel/code-frame@7.12.11': + dependencies: + '@babel/highlight': 7.24.7 + '@babel/code-frame@7.24.7': dependencies: '@babel/highlight': 7.24.7 @@ -10888,7 +10973,7 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.0.1 + picocolors: 1.1.0 '@babel/parser@7.12.3': dependencies: @@ -12246,6 +12331,11 @@ snapshots: '@esbuild/win32-x64@0.23.0': optional: true + '@eslint-community/eslint-utils@4.4.0(eslint@7.32.0)': + dependencies: + eslint: 7.32.0 + eslint-visitor-keys: 3.4.3 + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: eslint: 8.57.0 @@ -12253,10 +12343,24 @@ snapshots: '@eslint-community/regexpp@4.11.0': {} + '@eslint/eslintrc@0.4.3': + dependencies: + ajv: 6.12.6 + debug: 4.3.7 + espree: 7.3.1 + globals: 13.24.0 + ignore: 4.0.6 + import-fresh: 3.3.0 + js-yaml: 3.14.1 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.5 + debug: 4.3.7 espree: 9.6.1 globals: 13.24.0 ignore: 5.3.1 @@ -12305,13 +12409,23 @@ snapshots: '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.5 + debug: 4.3.7 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@humanwhocodes/config-array@0.5.0': + dependencies: + '@humanwhocodes/object-schema': 1.2.1 + debug: 4.3.7 minimatch: 3.1.2 transitivePeerDependencies: - supports-color '@humanwhocodes/module-importer@1.0.1': {} + '@humanwhocodes/object-schema@1.2.1': {} + '@humanwhocodes/object-schema@2.0.3': {} '@hutson/parse-repository-url@3.0.2': {} @@ -13436,6 +13550,24 @@ snapshots: '@types/zrender@4.0.6': {} + '@typescript-eslint/eslint-plugin@7.15.0(@typescript-eslint/parser@7.15.0(eslint@7.32.0)(typescript@4.9.5))(eslint@7.32.0)(typescript@4.9.5)': + dependencies: + '@eslint-community/regexpp': 4.11.0 + '@typescript-eslint/parser': 7.15.0(eslint@7.32.0)(typescript@4.9.5) + '@typescript-eslint/scope-manager': 7.15.0 + '@typescript-eslint/type-utils': 7.15.0(eslint@7.32.0)(typescript@4.9.5) + '@typescript-eslint/utils': 7.15.0(eslint@7.32.0)(typescript@4.9.5) + '@typescript-eslint/visitor-keys': 7.15.0 + eslint: 7.32.0 + graphemer: 1.4.0 + ignore: 5.3.1 + natural-compare: 1.4.0 + ts-api-utils: 1.3.0(typescript@4.9.5) + optionalDependencies: + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/eslint-plugin@7.15.0(@typescript-eslint/parser@7.15.0(eslint@8.57.0)(typescript@4.9.5))(eslint@8.57.0)(typescript@4.9.5)': dependencies: '@eslint-community/regexpp': 4.11.0 @@ -13472,6 +13604,19 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/parser@7.15.0(eslint@7.32.0)(typescript@4.9.5)': + dependencies: + '@typescript-eslint/scope-manager': 7.15.0 + '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/typescript-estree': 7.15.0(typescript@4.9.5) + '@typescript-eslint/visitor-keys': 7.15.0 + debug: 4.3.5 + eslint: 7.32.0 + optionalDependencies: + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/parser@7.15.0(eslint@8.57.0)(typescript@4.9.5)': dependencies: '@typescript-eslint/scope-manager': 7.15.0 @@ -13503,6 +13648,18 @@ snapshots: '@typescript-eslint/types': 7.15.0 '@typescript-eslint/visitor-keys': 7.15.0 + '@typescript-eslint/type-utils@7.15.0(eslint@7.32.0)(typescript@4.9.5)': + dependencies: + '@typescript-eslint/typescript-estree': 7.15.0(typescript@4.9.5) + '@typescript-eslint/utils': 7.15.0(eslint@7.32.0)(typescript@4.9.5) + debug: 4.3.5 + eslint: 7.32.0 + ts-api-utils: 1.3.0(typescript@4.9.5) + optionalDependencies: + typescript: 4.9.5 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/type-utils@7.15.0(eslint@8.57.0)(typescript@4.9.5)': dependencies: '@typescript-eslint/typescript-estree': 7.15.0(typescript@4.9.5) @@ -13559,6 +13716,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/utils@7.15.0(eslint@7.32.0)(typescript@4.9.5)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@7.32.0) + '@typescript-eslint/scope-manager': 7.15.0 + '@typescript-eslint/types': 7.15.0 + '@typescript-eslint/typescript-estree': 7.15.0(typescript@4.9.5) + eslint: 7.32.0 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/utils@7.15.0(eslint@8.57.0)(typescript@4.9.5)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) @@ -14459,6 +14627,10 @@ snapshots: acorn: 8.12.1 acorn-walk: 8.3.3 + acorn-jsx@5.3.2(acorn@7.4.1): + dependencies: + acorn: 7.4.1 + acorn-jsx@5.3.2(acorn@8.12.1): dependencies: acorn: 8.12.1 @@ -14467,6 +14639,8 @@ snapshots: dependencies: acorn: 8.12.1 + acorn@7.4.1: {} + acorn@8.12.1: {} add-stream@1.0.0: {} @@ -16771,6 +16945,10 @@ snapshots: object.entries: 1.1.8 semver: 6.3.1 + eslint-config-google@0.14.0(eslint@7.32.0): + dependencies: + eslint: 7.32.0 + eslint-config-prettier@8.10.0(eslint@8.57.0): dependencies: eslint: 8.57.0 @@ -16871,13 +17049,71 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-scope@5.1.1: + dependencies: + esrecurse: 4.3.0 + estraverse: 4.3.0 + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 + eslint-utils@2.1.0: + dependencies: + eslint-visitor-keys: 1.3.0 + + eslint-visitor-keys@1.3.0: {} + + eslint-visitor-keys@2.1.0: {} + eslint-visitor-keys@3.4.3: {} + eslint@7.32.0: + dependencies: + '@babel/code-frame': 7.12.11 + '@eslint/eslintrc': 0.4.3 + '@humanwhocodes/config-array': 0.5.0 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.7 + doctrine: 3.0.0 + enquirer: 2.4.1 + escape-string-regexp: 4.0.0 + eslint-scope: 5.1.1 + eslint-utils: 2.1.0 + eslint-visitor-keys: 2.1.0 + espree: 7.3.1 + esquery: 1.5.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + functional-red-black-tree: 1.0.1 + glob-parent: 5.1.2 + globals: 13.24.0 + ignore: 4.0.6 + import-fresh: 3.3.0 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + js-yaml: 3.14.1 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + progress: 2.0.3 + regexpp: 3.2.0 + semver: 7.6.2 + strip-ansi: 6.0.1 + strip-json-comments: 3.1.1 + table: 6.8.2 + text-table: 0.2.0 + v8-compile-cache: 2.4.0 + transitivePeerDependencies: + - supports-color + eslint@8.57.0: dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) @@ -16928,6 +17164,12 @@ snapshots: event-emitter: 0.3.5 type: 2.7.3 + espree@7.3.1: + dependencies: + acorn: 7.4.1 + acorn-jsx: 5.3.2(acorn@7.4.1) + eslint-visitor-keys: 1.3.0 + espree@9.6.1: dependencies: acorn: 8.12.1 @@ -16944,6 +17186,8 @@ snapshots: dependencies: estraverse: 5.3.0 + estraverse@4.3.0: {} + estraverse@5.3.0: {} estree-walker@2.0.2: {} @@ -17384,6 +17628,8 @@ snapshots: es-abstract: 1.23.3 functions-have-names: 1.2.3 + functional-red-black-tree@1.0.1: {} + functions-have-names@1.2.3: {} gensync@1.0.0-beta.2: {} @@ -17903,6 +18149,8 @@ snapshots: ieee754@1.2.1: {} + ignore@4.0.6: {} + ignore@5.3.1: {} immutable@4.3.6: {} @@ -20240,6 +20488,8 @@ snapshots: process-nextick-args@2.0.1: {} + progress@2.0.3: {} + prompts@2.4.2: dependencies: kleur: 3.0.3 @@ -20496,6 +20746,8 @@ snapshots: es-errors: 1.3.0 set-function-name: 2.0.2 + regexpp@3.2.0: {} + regexpu-core@5.3.2: dependencies: '@babel/regjsgen': 0.8.0 @@ -21730,13 +21982,13 @@ snapshots: dependencies: browserslist: 4.23.1 escalade: 3.1.2 - picocolors: 1.0.1 + picocolors: 1.1.0 update-browserslist-db@1.1.0(browserslist@4.23.3): dependencies: browserslist: 4.23.3 escalade: 3.1.2 - picocolors: 1.0.1 + picocolors: 1.1.0 upper-case-first@1.1.2: dependencies: @@ -21771,6 +22023,8 @@ snapshots: v8-compile-cache-lib@3.0.1: {} + v8-compile-cache@2.4.0: {} + v8-to-istanbul@9.3.0: dependencies: '@jridgewell/trace-mapping': 0.3.25 @@ -21854,7 +22108,7 @@ snapshots: vite-node@0.29.8(@types/node@18.19.39)(sass@1.77.6): dependencies: cac: 6.7.14 - debug: 4.3.5 + debug: 4.3.7 mlly: 1.7.1 pathe: 1.1.2 picocolors: 1.0.1 @@ -21874,7 +22128,7 @@ snapshots: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 - picocolors: 1.0.1 + picocolors: 1.1.0 vite: 5.4.6(@types/node@18.19.39)(sass-embedded@1.77.5)(sass@1.77.6) transitivePeerDependencies: - '@types/node' @@ -21892,7 +22146,7 @@ snapshots: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 - picocolors: 1.0.1 + picocolors: 1.1.0 vite: 5.4.6(@types/node@20.5.1)(sass-embedded@1.77.5)(sass@1.77.6) transitivePeerDependencies: - '@types/node' @@ -22441,7 +22695,7 @@ snapshots: '@vue/server-renderer': 3.4.31(vue@3.5.6(typescript@4.9.5)) chalk: 4.1.2 compression: 1.7.4 - debug: 4.3.5 + debug: 4.3.7 diacritics: 1.3.0 escape-html: 1.0.3 fs-extra: 10.1.0 @@ -22479,7 +22733,7 @@ snapshots: '@vue/server-renderer': 3.4.31(vue@3.5.6(typescript@5.5.3)) chalk: 4.1.2 compression: 1.7.4 - debug: 4.3.5 + debug: 4.3.7 diacritics: 1.3.0 escape-html: 1.0.3 fs-extra: 10.1.0 @@ -22871,7 +23125,7 @@ snapshots: vue-eslint-parser@9.4.3(eslint@8.57.0): dependencies: - debug: 4.3.5 + debug: 4.3.7 eslint: 8.57.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 -- Gitee From 6ba8114551d71cd2268372e8a6797e634cffb869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=B1=9F=E9=BE=99?= Date: Mon, 14 Oct 2024 14:35:57 +0800 Subject: [PATCH 6/6] =?UTF-8?q?chore:=20=E6=94=AF=E6=8C=81=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=A1=86=E6=9E=B6token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/bef/lib/framework-session.service.ts | 48 ++++++++++++++++++- ...bef-separated-session-handling-strategy.ts | 6 +-- .../bef-unified-session-handling-strategy.ts | 6 +-- 3 files changed, 52 insertions(+), 8 deletions(-) diff --git a/packages/bef/lib/framework-session.service.ts b/packages/bef/lib/framework-session.service.ts index ba73adfc5a..dab6fad431 100644 --- a/packages/bef/lib/framework-session.service.ts +++ b/packages/bef/lib/framework-session.service.ts @@ -2,20 +2,64 @@ * 框架Session服务 */ class FrameworkSessionService { - + private rtfService: any; + private frameworkService: any = null; /** * 构造函数 */ constructor() { + this.rtfService = this.getRuntimeFrameworkService(); } /** * 获取当前会话id */ getCurrentSessionId(): string { - return ''; + return this.formToken || 'default'; + } + // TODO: 存在页签未激活获取token错误的问题 + public get tabId() { + return this.params && this.params['tabId'] || null; + } + /** + * 获取formToken + */ + public get formToken() { + return this.params && this.params['formToken'] || null; } + public get params() { + if (this.rtfService && this.rtfService.hasOwnProperty('session') && typeof this.rtfService['session']['getCommonVariable'] === 'function') { + return this.rtfService['session']['getCommonVariable'](); + } + return null; + } + private getRuntimeFrameworkService() { + const frameworkService = this.gspFrameworkService; + return frameworkService && frameworkService.rtf || {}; + } + private get gspFrameworkService() { + if (this.frameworkService) { + return this.frameworkService; + } + let env: Window = window; + while (!env['gspframeworkService'] && env !== window.top && this.isSameOrigin(env)) { + env = env.parent; + } + this.frameworkService = env['gspframeworkService']; + return this.frameworkService; + } + private isSameOrigin(environment: Window) { + const host = window.location.host; + try { + if (environment && environment.location && typeof environment.location.host !== 'undefined') { + return environment.location.host === host; + } + } catch (e) { + return false; + } + return false; + } } export { FrameworkSessionService }; diff --git a/packages/bef/lib/session/handling-strategies/bef-separated-session-handling-strategy.ts b/packages/bef/lib/session/handling-strategies/bef-separated-session-handling-strategy.ts index 9d0c18c85a..56485deb86 100644 --- a/packages/bef/lib/session/handling-strategies/bef-separated-session-handling-strategy.ts +++ b/packages/bef/lib/session/handling-strategies/bef-separated-session-handling-strategy.ts @@ -15,12 +15,12 @@ class BefSeparatedSessionHandlingStrategy extends SessionHandlingStrategy { */ constructor( storageStrategy: SessionStorageStrategy, - frmSessionService: FrameworkSessionService, + frameworkSessionService: FrameworkSessionService, httpClient: HttpClient, - beBaseUrl: string, + baseUrl: string, injector: Injector ) { - super(storageStrategy, frmSessionService, httpClient, beBaseUrl, injector); + super(storageStrategy, frameworkSessionService, httpClient, baseUrl, injector); } /** diff --git a/packages/bef/lib/session/handling-strategies/bef-unified-session-handling-strategy.ts b/packages/bef/lib/session/handling-strategies/bef-unified-session-handling-strategy.ts index eac08442ea..6b68583524 100644 --- a/packages/bef/lib/session/handling-strategies/bef-unified-session-handling-strategy.ts +++ b/packages/bef/lib/session/handling-strategies/bef-unified-session-handling-strategy.ts @@ -14,12 +14,12 @@ export class BefUnifiedSessionHandlingStrategy extends SessionHandlingStrategy { */ constructor( storageStrategy: SessionStorageStrategy, - frmSessionService: FrameworkSessionService, + frameworSessionService: FrameworkSessionService, httpClient: HttpClient, - beBaseUrl: string, + baseUrl: string, protected injector: Injector ) { - super(storageStrategy, frmSessionService, httpClient, beBaseUrl, injector); + super(storageStrategy, frameworSessionService, httpClient, baseUrl, injector); } /** * 获取会话复用的session id -- Gitee