From 496f153c9492fc25873f1498a0b1f22556601eed Mon Sep 17 00:00:00 2001 From: clabroche Date: Sun, 11 Feb 2024 02:55:57 +0100 Subject: [PATCH] fix: no cyclic dependencies --- common/typings/src/index.d.ts | 91 ++++++++ fronts/app/package.json | 5 +- fronts/app/src/models/service.js | 265 +++++++++++----------- fronts/app/typings/export.d.ts | 71 ------ fronts/app/typings/index.d.ts | 16 -- modules/plugins-loader/front/package.json | 20 -- modules/plugins-loader/front/src/views.js | 44 ++-- package.json | 5 +- stack.js | 2 +- yarn.lock | 68 ++---- 10 files changed, 274 insertions(+), 313 deletions(-) delete mode 100644 fronts/app/typings/export.d.ts delete mode 100644 fronts/app/typings/index.d.ts diff --git a/common/typings/src/index.d.ts b/common/typings/src/index.d.ts index eec6a679..baf2c539 100644 --- a/common/typings/src/index.d.ts +++ b/common/typings/src/index.d.ts @@ -83,3 +83,94 @@ export interface Schema { createSchema>>, E extends CustomFunctions, F extends GeneratedClass>(name: string, schema: M, option?: Option): F } export type AnyObject = Record; + + +// export type FunctionPropertyNames = { +// [K in keyof T]: T[K] extends Function ? K : never; +// }[keyof T]; +// export type NonFunctionPropertyNames = { +// [K in keyof T]: T[K] extends Function ? never : K; +// }[keyof T]; +// export type NonFunctionPropertyNamesNumber = { +// [K in keyof T]: T[K] extends Function ? never : K; +// }[keyof T]; +// export type PartialPick = Partial> +// export type FunctionProperties = PartialPick>; +// export type NonFunctionProperties = PartialPick>; +// export type NonFunctionPropertiesNumber = Modify, { [K in keyof NonFunctionProperties]: number }> +// export type NonFunctionPropertiesString = Modify, { [K in keyof NonFunctionProperties]: string }> +// export type NonFunctionPropertiesBoolean = Modify, { [K in keyof NonFunctionProperties]: boolean }> +// export type Modify = Partial> & R> + + +//= ==== Root Types ========== +//= ==== Global Scripts ========== +import type { + GlobalScript as _Script, + ScriptStep as _ScriptStep, + TrackStep as _TrackStep, +} from '../../../modules/global-scripts/backend/GlobalScripts'; + +//= ==== Plugins ========== +import type { + PluginSM as _StackMonitorPlugin, +} from '../../../modules/plugins-loader/front/src/views'; + +//= ==== Leaf ========== +import type { + Leaf as _Leaf, +} from '../../../modules/documentation/backend/index'; + +//= ==== Npm ========== +import type { + Outdated as _Outdated, +} from '../../../modules/npm/backend/index'; + +//= ==== Npm ========== +import type { + OpenAiChat as _OpenAiChat, +} from '../../../modules/openai/backend'; + +//= ==== Fs ========== +import type { + Entry as _Entry, + NpmInfos as _NpmInfos, +} from '../../../servers/server/routes/fs'; + +export type { + StackFile, + StackArray, + StackObject, + StackFunction, + Environment, + StackWithPlugins as StackMonitor, +} from '../../../servers/server/models/stack'; + +export type { + SpawnOptions, + ServiceType as Service, + LogMessage, + Parser, +} from '../../../servers/server/models/Service'; +export namespace GlobalScripts { + export type Script = _Script + export type ScriptStep = _ScriptStep + export type TrackStep = _TrackStep +} +export namespace Plugins { + export type StackMonitorPlugin = _StackMonitorPlugin +} +export namespace Documentation { + export type Leaf = _Leaf +} +export namespace Npm { + export type Outdated = _Outdated +} +export namespace OpenAi { + export type OpenAiChat = _OpenAiChat +} + +export namespace FS { + export type Entry = _Entry + export type NpmInfos = _NpmInfos +} diff --git a/fronts/app/package.json b/fronts/app/package.json index c6737028..e3fcb70a 100644 --- a/fronts/app/package.json +++ b/fronts/app/package.json @@ -36,10 +36,7 @@ }, "devDependencies": { "@clabroche/common-retrigger-all-build": "workspace:*", - "@clabroche/modules-documentation-backend": "workspace:*", - "@clabroche/modules-global-scripts-backend": "workspace:*", - "@clabroche/modules-npm-backend": "workspace:*", - "@clabroche/modules-openai-backend": "workspace:*", + "@clabroche/common-typings": "workspace:*", "@clabroche/modules-plugins-loader-front": "workspace:*", "@fortawesome/fontawesome-free": "^6.5.1", "@vitejs/plugin-vue": "^5.0.3", diff --git a/fronts/app/src/models/service.js b/fronts/app/src/models/service.js index a51edf36..84eaa542 100644 --- a/fronts/app/src/models/service.js +++ b/fronts/app/src/models/service.js @@ -1,25 +1,27 @@ -import axios from '../helpers/axios' +import axios from '../helpers/axios'; + class Service { - /** @param {import('../../typings/index').NonFunctionProperties} service */ + /** @param {import('@clabroche/common-typings').NonFunctionProperties} service */ constructor(service) { - this.updateFields(service) + this.updateFields(service); } + /** - * @param {import('../../typings/index').NonFunctionProperties} service} service + * @param {import('@clabroche/common-typings').NonFunctionProperties} service} service */ updateFields(service) { - if (!service.label) throw new Error('A service should have a label') + if (!service.label) throw new Error('A service should have a label'); /** @type {string} */ - this.label = service.label + this.label = service.label; /** @type {string} */ - this.description = service.description || '' + this.description = service.description || ''; /** @type {string} */ - this.url = service.url || '' + this.url = service.url || ''; /** @type {string[]} */ - this.groups = service.groups || [] + this.groups = service.groups || []; /** @type {string[]} */ - this.urls = service.urls || [] - /** + this.urls = service.urls || []; + /** * @type {{ * home: string, * remote: string, @@ -37,277 +39,276 @@ class Service { stash: [], delta: 0, currentBranch: '', - status: [] - } + status: [], + }; /** @type {string} */ - this.spawnCmd = service.spawnCmd || '' + this.spawnCmd = service.spawnCmd || ''; /** @type {string[]} */ - this.spawnArgs = service.spawnArgs || [] + this.spawnArgs = service.spawnArgs || []; /** @type {Record} */ this.spawnOptions = service.spawnOptions || { cwd: '', - env: '' - } + env: '', + }; /** @type {Array>} */ - this.commands = service.commands || [] + this.commands = service.commands || []; /** @type {boolean} */ - this.enabled = service.enabled || false + this.enabled = service.enabled || false; /** @type {boolean} */ - this.crashed = service.crashed || false + this.crashed = service.crashed || false; /** @type {string} */ - this.rootPath = service.rootPath || '' + this.rootPath = service.rootPath || ''; } async updateGit() { - if(this.git) { - this.git.branches = await this.getBranches() - this.git.currentBranch = await this.getCurrentBranch() - this.git.status = await this.getStatus() - const list = await this.stashList() - this.git.stash = list + if (this.git) { + this.git.branches = await this.getBranches(); + this.git.currentBranch = await this.getCurrentBranch(); + this.git.status = await this.getStatus(); + const list = await this.stashList(); + this.git.stash = list; } } - async fetch() { - const { data: service } = await axios.get('/stack/' + this.label + '/') - this.updateFields(service) - return this + const { data: service } = await axios.get(`/stack/${this.label}/`); + this.updateFields(service); + return this; } - /** @returns {Promise}*/ + /** @returns {Promise} */ async getLogs() { - const { data: logs } = await axios.get('/logs/' + this.label + '/logs') - return logs + const { data: logs } = await axios.get(`/logs/${this.label}/logs`); + return logs; } /** @param {{message: string, pid?: number}} prompt */ async sendTerminalPrompt(prompt) { - const { data: logs } = await axios.post('/logs/' + this.label + '/prompt', {...prompt, service: this.label}) - return logs + const { data: logs } = await axios.post(`/logs/${this.label}/prompt`, { ...prompt, service: this.label }); + return logs; } /** @param {{pid?: number, forceKill?: boolean}} prompt */ async sendTerminalTerminate(prompt) { - const { data: logs } = await axios.post('/logs/' + this.label + '/terminate', {...prompt, service: this.label}) - return logs + const { data: logs } = await axios.post(`/logs/${this.label}/terminate`, { ...prompt, service: this.label }); + return logs; } async clear() { - const { data: logs } = await axios.delete('/logs/' + this.label + '/logs') - return logs + const { data: logs } = await axios.delete(`/logs/${this.label}/logs`); + return logs; } /** * @param {string} msg * @param {{force?: boolean}} param0 */ - async autocomplete(msg, {force} = {}) { - const { data: logs } = await axios.get('/logs/' + this.label + '/autocomplete', { - params: { message: msg, force: !!force } - }) - return logs + async autocomplete(msg, { force } = {}) { + const { data: logs } = await axios.get(`/logs/${this.label}/autocomplete`, { + params: { message: msg, force: !!force }, + }); + return logs; } async openInVsCode() { - return axios.get('/stack/' + this.label + '/open-in-vs-code') + return axios.get(`/stack/${this.label}/open-in-vs-code`); } /** - * - * @param {string} link - * @returns + * + * @param {string} link + * @returns */ async openLinkInVsCode(link) { - return axios.get('/stack/' + this.label + '/open-link-in-vs-code', { params: { link } }) + return axios.get(`/stack/${this.label}/open-link-in-vs-code`, { params: { link } }); } async openFolder() { - return axios.get('/stack/' + this.label + '/open-folder') + return axios.get(`/stack/${this.label}/open-folder`); } async restart() { - this.enabled = true - localStorage.setItem(`automatic-toggle-${this.label}`, this.enabled.toString()) - return axios.get('/stack/' + this.label + '/restart') + this.enabled = true; + localStorage.setItem(`automatic-toggle-${this.label}`, this.enabled.toString()); + return axios.get(`/stack/${this.label}/restart`); } async start() { - this.enabled = true - localStorage.setItem(`automatic-toggle-${this.label}`, this.enabled.toString()) - return axios.get('/stack/' + this.label + '/start') + this.enabled = true; + localStorage.setItem(`automatic-toggle-${this.label}`, this.enabled.toString()); + return axios.get(`/stack/${this.label}/start`); } async stop() { - this.enabled = false - localStorage.setItem(`automatic-toggle-${this.label}`, this.enabled.toString()) - return axios.get('/stack/' + this.label + '/stop') + this.enabled = false; + localStorage.setItem(`automatic-toggle-${this.label}`, this.enabled.toString()); + return axios.get(`/stack/${this.label}/stop`); } async getBranches() { - const { data: branches } = await axios.get('/git/' + this.label + '/branches') - return branches + const { data: branches } = await axios.get(`/git/${this.label}/branches`); + return branches; } async getCurrentBranch() { - const { data: currentBranch } = await axios.get('/git/' + this.label + '/current-branch') - return currentBranch + const { data: currentBranch } = await axios.get(`/git/${this.label}/current-branch`); + return currentBranch; } /** - * @param {string} name - * @param {boolean} shouldPush + * @param {string} name + * @param {boolean} shouldPush */ async addBranch(name, shouldPush) { - const { data: status } = await axios.post('/git/' + this.label + '/add-branch', { - shouldPush, name - }) - return status + const { data: status } = await axios.post(`/git/${this.label}/add-branch`, { + shouldPush, name, + }); + return status; } async getStatus() { - const { data: status } = await axios.get('/git/' + this.label + '/status') - return status + const { data: status } = await axios.get(`/git/${this.label}/status`); + return status; } async getDiff() { - const { data: diff } = await axios.get('/git/' + this.label + '/diff') - return diff + const { data: diff } = await axios.get(`/git/${this.label}/diff`); + return diff; } /** - * - * @param {string} branchName + * + * @param {string} branchName */ async changeBranch(branchName) { - await axios.post('/git/' + this.label + '/branch/' + encodeURIComponent(branchName) + '/change') + await axios.post(`/git/${this.label}/branch/${encodeURIComponent(branchName)}/change`); } /** - * - * @param {string} branchName + * + * @param {string} branchName */ async deleteBranch(branchName) { - await axios.delete('/git/' + this.label + '/branch/' + encodeURIComponent(branchName)) + await axios.delete(`/git/${this.label}/branch/${encodeURIComponent(branchName)}`); } /** - * - * @param {string} branchName + * + * @param {string} branchName */ async gitRemoteDelta(branchName) { - if (this.git) this.git.delta = null - const { data: delta } = await axios.get(`/git/${this.label}/branch/${encodeURIComponent(branchName)}/remote-delta`) - if (this.git) this.git.delta = delta - return delta + if (this.git) this.git.delta = null; + const { data: delta } = await axios.get(`/git/${this.label}/branch/${encodeURIComponent(branchName)}/remote-delta`); + if (this.git) this.git.delta = delta; + return delta; } async gitFetch() { - await axios.post(`/git/${this.label}/fetch`) + await axios.post(`/git/${this.label}/fetch`); } /** - * - * @param {boolean} graphOnAll + * + * @param {boolean} graphOnAll */ async getGraph(graphOnAll) { - const {data: graph} = await axios.get(`/git/${this.label}/graph`, { + const { data: graph } = await axios.get(`/git/${this.label}/graph`, { params: { - graphOnAll - } - }) - return graph + graphOnAll, + }, + }); + return graph; } async reset() { - await axios.delete('/git/' + this.label + '/reset') + await axios.delete(`/git/${this.label}/reset`); } async stash() { - await axios.post('/git/' + this.label + '/stash') - return this.updateGit() + await axios.post(`/git/${this.label}/stash`); + return this.updateGit(); } async stashPop() { - await axios.post('/git/' + this.label + '/stash-pop') + await axios.post(`/git/${this.label}/stash-pop`); } async pull() { - await axios.post('/git/' + this.label + '/pull') + await axios.post(`/git/${this.label}/pull`); } async stashList() { - const { data: stash } = await axios.post('/git/' + this.label + '/stash-list') - return stash + const { data: stash } = await axios.post(`/git/${this.label}/stash-list`); + return stash; } /** - * - * @param {string} file + * + * @param {string} file */ async checkoutFile(file) { - file = encodeURIComponent(file) - await axios.delete('/git/' + this.label + '/checkout/' + file) + file = encodeURIComponent(file); + await axios.delete(`/git/${this.label}/checkout/${file}`); } async isNpm() { - const { data: isNpm } = await axios.get('/npm/' + this.label) - return isNpm + const { data: isNpm } = await axios.get(`/npm/${this.label}`); + return isNpm; } async getPackageJSON() { - const { data: packageJSON } = await axios.get('/npm/' + this.label + '/packagejson') - return packageJSON + const { data: packageJSON } = await axios.get(`/npm/${this.label}/packagejson`); + return packageJSON; } async outdatedNpm() { - const { data: outdated } = await axios.get('/npm/' + this.label + '/outdated') - return outdated + const { data: outdated } = await axios.get(`/npm/${this.label}/outdated`); + return outdated; } async getBugs() { - const { data: bugs } = await axios.get('/bugs/' + this.label) - return bugs || [] + const { data: bugs } = await axios.get(`/bugs/${this.label}`); + return bugs || []; } /** - * - * @param {*} data - * @returns + * + * @param {*} data + * @returns */ static async getTokens(data) { - const { data: bugs } = await axios.post('/openai/tokenize', { data }) - return bugs || [] + const { data: bugs } = await axios.post('/openai/tokenize', { data }); + return bugs || []; } /** - * - * @param {*} data - * @returns + * + * @param {*} data + * @returns */ static async reviewFromAi(data) { - const { data: bugs } = await axios.post('/openai/review', { data }) - return bugs || [] + const { data: bugs } = await axios.post('/openai/review', { data }); + return bugs || []; } /** - * - * @param {*} data - * @returns + * + * @param {*} data + * @returns */ static async findSolutionFromAi(data) { - const { data: bugs } = await axios.post('/openai/error', { data }) - return bugs || [] + const { data: bugs } = await axios.post('/openai/error', { data }); + return bugs || []; } static async homedir() { - const { data: path } = await axios.post('/fs/homedir') - return path || '' + const { data: path } = await axios.post('/fs/homedir'); + return path || ''; } } -export default Service +export default Service; /** * @typedef {import('../../../../servers/server/models/Service').LogMessage} LogMessage - */ \ No newline at end of file + */ diff --git a/fronts/app/typings/export.d.ts b/fronts/app/typings/export.d.ts deleted file mode 100644 index c5513848..00000000 --- a/fronts/app/typings/export.d.ts +++ /dev/null @@ -1,71 +0,0 @@ - -//===== Root Types ========== -export type { - StackFile, - StackArray, - StackObject, - StackFunction, - Environment, - StackWithPlugins as StackMonitor -} from "../../../servers/server/models/stack"; - -export type { - SpawnOptions, - ServiceType as Service, - LogMessage, - Parser -} from "../../../servers/server/models/Service"; - -//===== Global Scripts ========== -import type { - GlobalScript as _Script, - ScriptStep as _ScriptStep, - TrackStep as _TrackStep -} from "@clabroche/modules-global-scripts-backend/GlobalScripts"; -export namespace GlobalScripts { - export type Script = _Script - export type ScriptStep = _ScriptStep - export type TrackStep = _TrackStep -} - -//===== Plugins ========== -import type { - PluginSM as _StackMonitorPlugin -} from "@clabroche/modules-plugins-loader-front/src/views"; -export namespace Plugins { - export type StackMonitorPlugin = _StackMonitorPlugin -} - -//===== Leaf ========== -import type { - Leaf as _Leaf -} from "@clabroche/modules-documentation-backend/index"; -export namespace Documentation { - export type Leaf = _Leaf -} - -//===== Npm ========== -import type { - Outdated as _Outdated -} from "@clabroche/modules-npm-backend/index"; -export namespace Npm { - export type Outdated = _Outdated -} - -//===== Npm ========== -import type { - OpenAiChat as _OpenAiChat -} from "@clabroche/modules-openai-backend"; -export namespace OpenAi { - export type OpenAiChat = _OpenAiChat -} - -//===== Fs ========== -import type { -Entry as _Entry, -NpmInfos as _NpmInfos -} from "../../../servers/server/routes/fs"; -export namespace FS { - export type Entry = _Entry - export type NpmInfos = _NpmInfos -} \ No newline at end of file diff --git a/fronts/app/typings/index.d.ts b/fronts/app/typings/index.d.ts deleted file mode 100644 index 02f2b4f7..00000000 --- a/fronts/app/typings/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export type FunctionPropertyNames = { - [K in keyof T]: T[K] extends Function ? K : never; -}[keyof T]; -export type NonFunctionPropertyNames = { - [K in keyof T]: T[K] extends Function ? never : K; -}[keyof T]; -export type NonFunctionPropertyNamesNumber = { - [K in keyof T]: T[K] extends Function ? never : K; -}[keyof T]; -export type PartialPick = Partial> -export type FunctionProperties = PartialPick>; -export type NonFunctionProperties = PartialPick>; -export type NonFunctionPropertiesNumber = Modify, { [K in keyof NonFunctionProperties]: number }> -export type NonFunctionPropertiesString = Modify, { [K in keyof NonFunctionProperties]: string }> -export type NonFunctionPropertiesBoolean = Modify, { [K in keyof NonFunctionProperties]: boolean }> -export type Modify = Partial> & R> diff --git a/modules/plugins-loader/front/package.json b/modules/plugins-loader/front/package.json index 930379c3..0761b75b 100644 --- a/modules/plugins-loader/front/package.json +++ b/modules/plugins-loader/front/package.json @@ -19,26 +19,6 @@ }, "devDependencies": { "@clabroche/common-retrigger-all-build": "workspace:*", - "@clabroche/modules-bugs-front": "workspace:*", - "@clabroche/modules-configuration-front": "workspace:*", - "@clabroche/modules-dev-ops-front": "workspace:*", - "@clabroche/modules-diff-front": "workspace:*", - "@clabroche/modules-documentation-front": "workspace:*", - "@clabroche/modules-finder-front": "workspace:*", - "@clabroche/modules-git-front": "workspace:*", - "@clabroche/modules-github-front": "workspace:*", - "@clabroche/modules-global-scripts-front": "workspace:*", - "@clabroche/modules-json-formatter-front": "workspace:*", - "@clabroche/modules-jwt-front": "workspace:*", - "@clabroche/modules-kanban-front": "workspace:*", - "@clabroche/modules-logs-front": "workspace:*", - "@clabroche/modules-mongo-front": "workspace:*", - "@clabroche/modules-node-repl-front": "workspace:*", - "@clabroche/modules-npm-front": "workspace:*", - "@clabroche/modules-openai-front": "workspace:*", - "@clabroche/modules-regex-front": "workspace:*", - "@clabroche/modules-toolbox-front": "workspace:*", - "@clabroche/modules-uuid-front": "workspace:*", "@types/express": "^4.17.21", "express": "^4.18.2", "vue": "^3.4.18", diff --git a/modules/plugins-loader/front/src/views.js b/modules/plugins-loader/front/src/views.js index 06876197..cf32b72a 100644 --- a/modules/plugins-loader/front/src/views.js +++ b/modules/plugins-loader/front/src/views.js @@ -1,24 +1,26 @@ -import LogsVue from '@clabroche/modules-logs-front/src/Logs.vue'; -import GitVue from '@clabroche/modules-git-front/src/Git.vue'; -import NotUpToDate from '@clabroche/modules-git-front/src/NotUpToDate.vue'; -import NpmVue from '@clabroche/modules-npm-front/src/Npm.vue'; -import BugsVue from '@clabroche/modules-bugs-front/src/Bugs.vue'; -import ConfigsVue from '@clabroche/modules-configuration-front/src/Configs.vue'; -import OpenAI from '@clabroche/modules-openai-front/src/OpenAi.vue'; -import Toolbox from '@clabroche/modules-toolbox-front/src/Toolbox.vue'; -import UUID from '@clabroche/modules-uuid-front/src/UUID.vue'; -import JWT from '@clabroche/modules-jwt-front/src/Index.vue'; -import Mongo from '@clabroche/modules-mongo-front/src/Index.vue'; -import NodeREPL from '@clabroche/modules-node-repl-front/src/Index.vue'; -import Diff from '@clabroche/modules-diff-front/src/Index.vue'; -import Regex from '@clabroche/modules-regex-front/src/Index.vue'; -import JSONFormatter from '@clabroche/modules-json-formatter-front/src/Index.vue'; -import Documentation from '@clabroche/modules-documentation-front/src/Index.vue'; -import DevOps from '@clabroche/modules-dev-ops-front/src/Index.vue'; -import Github from '@clabroche/modules-github-front/src/Index.vue'; -import Kanban from '@clabroche/modules-kanban-front/src/Index.vue'; -import GlobalScripts from '@clabroche/modules-global-scripts-front/src/Index.vue'; -import Finder from '@clabroche/modules-finder-front/src/Index.vue'; +/* eslint-disable import/no-relative-packages */ +/* eslint-disable import/no-useless-path-segments */ +import LogsVue from '../../../../modules/logs/front/src/Logs.vue'; +import GitVue from '../../../../modules/git/front/src/Git.vue'; +import NotUpToDate from '../../../../modules/git/front/src/NotUpToDate.vue'; +import NpmVue from '../../../../modules/npm/front/src/Npm.vue'; +import BugsVue from '../../../../modules/bugs/front/src/Bugs.vue'; +import ConfigsVue from '../../../../modules/configuration/front/src/Configs.vue'; +import OpenAI from '../../../../modules/openai/front/src/OpenAi.vue'; +import Toolbox from '../../../../modules/toolbox/front/src/Toolbox.vue'; +import UUID from '../../../../modules/uuid/front/src/UUID.vue'; +import JWT from '../../../../modules/jwt/front/src/Index.vue'; +import Mongo from '../../../../modules/mongo/front/src/Index.vue'; +import NodeREPL from '../../../../modules/node-repl/front/src/Index.vue'; +import Diff from '../../../../modules/diff/front/src/Index.vue'; +import Regex from '../../../../modules/regex/front/src/Index.vue'; +import JSONFormatter from '../../../../modules/json-formatter/front/src/Index.vue'; +import Documentation from '../../../../modules/documentation/front/src/Index.vue'; +import DevOps from '../../../../modules/dev-ops/front/src/Index.vue'; +import Github from '../../../../modules/github/front/src/Index.vue'; +import Kanban from '../../../../modules/kanban/front/src/Index.vue'; +import GlobalScripts from '../../../../modules/global-scripts/front/src/Index.vue'; +import Finder from '../../../../modules/finder/front/src/Index.vue'; import DynamicComponent from './DynamicComponent.vue'; const toolboxPlugins = [ diff --git a/package.json b/package.json index ba7057c6..fd434b64 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,10 @@ "packageManager": "yarn@4.0.2", "devDependencies": { "@clabroche/common-retrigger-all-build": "workspace:*", + "@clabroche/common-typings": "workspace:^", "@commitlint/cli": "^17.6.7", "@commitlint/config-conventional": "^17.6.7", + "@iryu54/stack-monitor": "^1.17.14", "@lerna-lite/changed": "^2.5.0", "@lerna-lite/cli": "^2.5.0", "@lerna-lite/diff": "^2.5.0", @@ -83,8 +85,5 @@ }, "engines": { "node": ">=16.0.0" - }, - "dependencies": { - "@iryu54/stack-monitor": "^1.17.14" } } diff --git a/stack.js b/stack.js index cb464621..06d19571 100644 --- a/stack.js +++ b/stack.js @@ -9,7 +9,7 @@ const groups = { api: '02 - APIs', }; -/** @type {import('./fronts/app/typings/export').StackFile} */ +/** @type {import('@clabroche/common-typings').StackFile} */ const stack = (stackMonitor) => ({ monorepo: true, services: [ diff --git a/yarn.lock b/yarn.lock index 32106c19..1a94001a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -873,7 +873,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/common-typings@workspace:common/typings": +"@clabroche/common-typings@workspace:*, @clabroche/common-typings@workspace:^, @clabroche/common-typings@workspace:common/typings": version: 0.0.0-use.local resolution: "@clabroche/common-typings@workspace:common/typings" dependencies: @@ -910,10 +910,7 @@ __metadata: resolution: "@clabroche/fronts-app@workspace:fronts/app" dependencies: "@clabroche/common-retrigger-all-build": "workspace:*" - "@clabroche/modules-documentation-backend": "workspace:*" - "@clabroche/modules-global-scripts-backend": "workspace:*" - "@clabroche/modules-npm-backend": "workspace:*" - "@clabroche/modules-openai-backend": "workspace:*" + "@clabroche/common-typings": "workspace:*" "@clabroche/modules-plugins-loader-front": "workspace:*" "@fortawesome/fontawesome-free": "npm:^6.5.1" "@vitejs/plugin-vue": "npm:^5.0.3" @@ -970,7 +967,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-bugs-front@workspace:*, @clabroche/modules-bugs-front@workspace:modules/bugs/front": +"@clabroche/modules-bugs-front@workspace:modules/bugs/front": version: 0.0.0-use.local resolution: "@clabroche/modules-bugs-front@workspace:modules/bugs/front" dependencies: @@ -990,7 +987,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-configuration-front@workspace:*, @clabroche/modules-configuration-front@workspace:modules/configuration/front": +"@clabroche/modules-configuration-front@workspace:modules/configuration/front": version: 0.0.0-use.local resolution: "@clabroche/modules-configuration-front@workspace:modules/configuration/front" dependencies: @@ -1011,7 +1008,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-dev-ops-front@workspace:*, @clabroche/modules-dev-ops-front@workspace:modules/dev-ops/front": +"@clabroche/modules-dev-ops-front@workspace:modules/dev-ops/front": version: 0.0.0-use.local resolution: "@clabroche/modules-dev-ops-front@workspace:modules/dev-ops/front" dependencies: @@ -1037,7 +1034,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-diff-front@workspace:*, @clabroche/modules-diff-front@workspace:modules/diff/front": +"@clabroche/modules-diff-front@workspace:modules/diff/front": version: 0.0.0-use.local resolution: "@clabroche/modules-diff-front@workspace:modules/diff/front" dependencies: @@ -1065,7 +1062,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-documentation-front@workspace:*, @clabroche/modules-documentation-front@workspace:modules/documentation/front": +"@clabroche/modules-documentation-front@workspace:modules/documentation/front": version: 0.0.0-use.local resolution: "@clabroche/modules-documentation-front@workspace:modules/documentation/front" dependencies: @@ -1094,7 +1091,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-finder-front@workspace:*, @clabroche/modules-finder-front@workspace:modules/finder/front": +"@clabroche/modules-finder-front@workspace:modules/finder/front": version: 0.0.0-use.local resolution: "@clabroche/modules-finder-front@workspace:modules/finder/front" dependencies: @@ -1120,7 +1117,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-git-front@workspace:*, @clabroche/modules-git-front@workspace:modules/git/front": +"@clabroche/modules-git-front@workspace:modules/git/front": version: 0.0.0-use.local resolution: "@clabroche/modules-git-front@workspace:modules/git/front" dependencies: @@ -1151,7 +1148,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-github-front@workspace:*, @clabroche/modules-github-front@workspace:modules/github/front": +"@clabroche/modules-github-front@workspace:modules/github/front": version: 0.0.0-use.local resolution: "@clabroche/modules-github-front@workspace:modules/github/front" dependencies: @@ -1177,7 +1174,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-global-scripts-front@workspace:*, @clabroche/modules-global-scripts-front@workspace:modules/global-scripts/front": +"@clabroche/modules-global-scripts-front@workspace:modules/global-scripts/front": version: 0.0.0-use.local resolution: "@clabroche/modules-global-scripts-front@workspace:modules/global-scripts/front" dependencies: @@ -1198,7 +1195,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-json-formatter-front@workspace:*, @clabroche/modules-json-formatter-front@workspace:modules/json-formatter/front": +"@clabroche/modules-json-formatter-front@workspace:modules/json-formatter/front": version: 0.0.0-use.local resolution: "@clabroche/modules-json-formatter-front@workspace:modules/json-formatter/front" dependencies: @@ -1225,7 +1222,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-jwt-front@workspace:*, @clabroche/modules-jwt-front@workspace:modules/jwt/front": +"@clabroche/modules-jwt-front@workspace:modules/jwt/front": version: 0.0.0-use.local resolution: "@clabroche/modules-jwt-front@workspace:modules/jwt/front" dependencies: @@ -1251,7 +1248,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-kanban-front@workspace:*, @clabroche/modules-kanban-front@workspace:modules/kanban/front": +"@clabroche/modules-kanban-front@workspace:modules/kanban/front": version: 0.0.0-use.local resolution: "@clabroche/modules-kanban-front@workspace:modules/kanban/front" dependencies: @@ -1279,7 +1276,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-logs-front@workspace:*, @clabroche/modules-logs-front@workspace:modules/logs/front": +"@clabroche/modules-logs-front@workspace:modules/logs/front": version: 0.0.0-use.local resolution: "@clabroche/modules-logs-front@workspace:modules/logs/front" dependencies: @@ -1306,7 +1303,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-mongo-front@workspace:*, @clabroche/modules-mongo-front@workspace:modules/mongo/front": +"@clabroche/modules-mongo-front@workspace:modules/mongo/front": version: 0.0.0-use.local resolution: "@clabroche/modules-mongo-front@workspace:modules/mongo/front" dependencies: @@ -1334,7 +1331,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-node-repl-front@workspace:*, @clabroche/modules-node-repl-front@workspace:modules/node-repl/front": +"@clabroche/modules-node-repl-front@workspace:modules/node-repl/front": version: 0.0.0-use.local resolution: "@clabroche/modules-node-repl-front@workspace:modules/node-repl/front" dependencies: @@ -1361,7 +1358,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-npm-front@workspace:*, @clabroche/modules-npm-front@workspace:modules/npm/front": +"@clabroche/modules-npm-front@workspace:modules/npm/front": version: 0.0.0-use.local resolution: "@clabroche/modules-npm-front@workspace:modules/npm/front" dependencies: @@ -1390,7 +1387,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-openai-front@workspace:*, @clabroche/modules-openai-front@workspace:modules/openai/front": +"@clabroche/modules-openai-front@workspace:modules/openai/front": version: 0.0.0-use.local resolution: "@clabroche/modules-openai-front@workspace:modules/openai/front" dependencies: @@ -1435,26 +1432,6 @@ __metadata: resolution: "@clabroche/modules-plugins-loader-front@workspace:modules/plugins-loader/front" dependencies: "@clabroche/common-retrigger-all-build": "workspace:*" - "@clabroche/modules-bugs-front": "workspace:*" - "@clabroche/modules-configuration-front": "workspace:*" - "@clabroche/modules-dev-ops-front": "workspace:*" - "@clabroche/modules-diff-front": "workspace:*" - "@clabroche/modules-documentation-front": "workspace:*" - "@clabroche/modules-finder-front": "workspace:*" - "@clabroche/modules-git-front": "workspace:*" - "@clabroche/modules-github-front": "workspace:*" - "@clabroche/modules-global-scripts-front": "workspace:*" - "@clabroche/modules-json-formatter-front": "workspace:*" - "@clabroche/modules-jwt-front": "workspace:*" - "@clabroche/modules-kanban-front": "workspace:*" - "@clabroche/modules-logs-front": "workspace:*" - "@clabroche/modules-mongo-front": "workspace:*" - "@clabroche/modules-node-repl-front": "workspace:*" - "@clabroche/modules-npm-front": "workspace:*" - "@clabroche/modules-openai-front": "workspace:*" - "@clabroche/modules-regex-front": "workspace:*" - "@clabroche/modules-toolbox-front": "workspace:*" - "@clabroche/modules-uuid-front": "workspace:*" "@types/express": "npm:^4.17.21" express: "npm:^4.18.2" vue: "npm:^3.4.18" @@ -1472,7 +1449,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-regex-front@workspace:*, @clabroche/modules-regex-front@workspace:modules/regex/front": +"@clabroche/modules-regex-front@workspace:modules/regex/front": version: 0.0.0-use.local resolution: "@clabroche/modules-regex-front@workspace:modules/regex/front" dependencies: @@ -1494,7 +1471,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-toolbox-front@workspace:*, @clabroche/modules-toolbox-front@workspace:modules/toolbox/front": +"@clabroche/modules-toolbox-front@workspace:modules/toolbox/front": version: 0.0.0-use.local resolution: "@clabroche/modules-toolbox-front@workspace:modules/toolbox/front" dependencies: @@ -1521,7 +1498,7 @@ __metadata: languageName: unknown linkType: soft -"@clabroche/modules-uuid-front@workspace:*, @clabroche/modules-uuid-front@workspace:modules/uuid/front": +"@clabroche/modules-uuid-front@workspace:modules/uuid/front": version: 0.0.0-use.local resolution: "@clabroche/modules-uuid-front@workspace:modules/uuid/front" dependencies: @@ -1537,6 +1514,7 @@ __metadata: resolution: "@clabroche/stack-monitor@workspace:." dependencies: "@clabroche/common-retrigger-all-build": "workspace:*" + "@clabroche/common-typings": "workspace:^" "@commitlint/cli": "npm:^17.6.7" "@commitlint/config-conventional": "npm:^17.6.7" "@iryu54/stack-monitor": "npm:^1.17.14"