From 37e7f5457b8745f05b6feaafb0ec8a30e64f5013 Mon Sep 17 00:00:00 2001 From: Thomas Lathuiliere <40292402+balzdur@users.noreply.github.com> Date: Tue, 23 Jan 2024 19:15:33 +0100 Subject: [PATCH] docs: update README files and add LICENSE (#348) * chore(license): add ELv2 license * docs(README): update all README files --- LICENSE | 93 ++ README.md | 29 +- package.json | 8 +- packages/app-builder/README.md | 7 +- packages/app-builder/package.json | 2 +- .../src/components/Cases/CaseRightPanel.tsx | 2 +- .../Decisions/DecisionRightPanel.tsx | 2 +- .../src/components/Ping/CornerPing.tsx | 2 +- .../app-builder/src/components/Ping/Ping.tsx | 4 +- .../app-builder/src/components/RightPanel.tsx | 4 +- .../AstBuilder/AstBuilderNode/Default.tsx | 2 +- .../Operand/OperandEditor/OperandTrigger.tsx | 2 +- .../AstBuilderNode/Operand/OperandLabel.tsx | 2 +- .../AstBuilderNode/Operand/OperandTooltip.tsx | 2 +- .../Scenario/AstBuilder/RemoveButton.tsx | 2 +- .../AddLogicalOperatorButton.tsx | 2 +- .../AstBuilder/RootAstBuilderNode/RootAnd.tsx | 2 +- packages/app-builder/src/root.tsx | 4 +- .../app-builder/src/routes/_auth+/_layout.tsx | 8 +- .../src/routes/_builder+/_layout.tsx | 2 +- .../i+/$iterationId+/_edit-view+/rules.tsx | 2 +- packages/eslint-config/README.md | 3 + packages/eslint-config/default.js | 7 - packages/eslint-config/package.json | 7 +- packages/marble-api/README.md | 17 +- packages/marble-api/docs/regexp-example.png | Bin 258261 -> 0 bytes packages/marble-api/package.json | 2 +- packages/tailwind-preset/README.md | 5 + packages/typescript-utils/README.md | 3 + packages/typescript-utils/package.json | 2 +- packages/typescript-utils/src/assert-never.ts | 4 + packages/ui-design-system/README.md | 2 +- packages/ui-design-system/package.json | 20 +- .../ui-design-system/src/Avatar/Avatar.tsx | 12 +- .../src/Calendar/Calendar.tsx | 2 +- packages/ui-design-system/src/Input/Input.tsx | 2 +- .../src/ScrollArea/ScrollArea.tsx | 2 +- packages/ui-icons/README.md | 31 +- packages/ui-icons/package.json | 2 +- pnpm-lock.yaml | 1311 +++++++---------- 40 files changed, 745 insertions(+), 872 deletions(-) create mode 100644 LICENSE create mode 100644 packages/eslint-config/README.md delete mode 100644 packages/marble-api/docs/regexp-example.png create mode 100644 packages/tailwind-preset/README.md create mode 100644 packages/typescript-utils/README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..ed95f4060 --- /dev/null +++ b/LICENSE @@ -0,0 +1,93 @@ +Elastic License 2.0 + +URL: + +## Acceptance + +By using the software, you agree to all of the terms and conditions below. + +## Copyright License + +The licensor grants you a non-exclusive, royalty-free, worldwide, +non-sublicensable, non-transferable license to use, copy, distribute, make +available, and prepare derivative works of the software, in each case subject to +the limitations and conditions below. + +## Limitations + +You may not provide the software to third parties as a hosted or managed +service, where the service provides users with access to any substantial set of +the features or functionality of the software. + +You may not move, change, disable, or circumvent the license key functionality +in the software, and you may not remove or obscure any functionality in the +software that is protected by the license key. + +You may not alter, remove, or obscure any licensing, copyright, or other notices +of the licensor in the software. Any use of the licensor’s trademarks is subject +to applicable law. + +## Patents + +The licensor grants you a license, under any patent claims the licensor can +license, or becomes able to license, to make, have made, use, sell, offer for +sale, import and have imported the software, in each case subject to the +limitations and conditions in this license. This license does not cover any +patent claims that you cause to be infringed by modifications or additions to +the software. If you or your company make any written claim that the software +infringes or contributes to infringement of any patent, your patent license for +the software granted under these terms ends immediately. If your company makes +such a claim, your patent license ends immediately for work on behalf of your +company. + +## Notices + +You must ensure that anyone who gets a copy of any part of the software from you +also gets a copy of these terms. + +If you modify the software, you must include in any modified copies of the +software prominent notices stating that you have modified the software. + +## No Other Rights + +These terms do not imply any licenses other than those expressly granted in +these terms. + +## Termination + +If you use the software in violation of these terms, such use is not licensed, +and your licenses will automatically terminate. If the licensor provides you +with a notice of your violation, and you cease all violation of this license no +later than 30 days after you receive that notice, your licenses will be +reinstated retroactively. However, if you violate these terms after such +reinstatement, any additional violation of these terms will cause your licenses +to terminate automatically and permanently. + +## No Liability + +_As far as the law allows, the software comes as is, without any warranty or +condition, and the licensor will not be liable to you for any damages arising +out of these terms or the use or nature of the software, under any kind of +legal claim._ + +## Definitions + +The **licensor** is the entity offering these terms, and the **software** is the +software the licensor makes available under these terms, including any portion +of it. + +**you** refers to the individual or entity agreeing to these terms. + +**your company** is any legal entity, sole proprietorship, or other kind of +organization that you work for, plus all organizations that have control over, +are under the control of, or are under common control with that +organization. **control** means ownership of substantially all the assets of an +entity, or the power to direct its management and policies by vote, contract, or +otherwise. Control can be direct or indirect. + +**your licenses** are all the licenses granted to you for the software under +these terms. + +**use** means anything you do with the software requiring one of your licenses. + +**trademark** means trademarks, service marks, and similar rights. \ No newline at end of file diff --git a/README.md b/README.md index 0e72a7848..a331e408d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ This is the frontend marble monorepo. We use `pnpm` to handle dependancies. This README is a global README for the monorepo. Each package may have its own README. You can find them in the `packages/*/README.md` files. -### Install pnpm +### Installations + +#### Install pnpm ```bash brew install pnpm @@ -20,19 +22,19 @@ To enable shell autocompletion (works for bash, zsh and fish), run: pnpm install-completion ``` -### Install dependancies +#### Install dependancies ```bash pnpm install ``` -#### (VSCode) Install recommended VSCode extensions +##### (VSCode) Install recommended VSCode extensions There is a recommended extensions list in the `.vscode/extensions.json` file. All required configuration settings are already included inside the `.vscode/settings.json` file. -### Work in a package +### Launch Each packages are located in the `packages` folder. To work in a package, you can use the `--filter` option of `pnpm` to trigger the dedicated scripts present in each `packages/*/package.json`. Exemple to start the app builder in dev mode: @@ -41,15 +43,16 @@ Each packages are located in the `packages` folder. To work in a package, you ca pnpm --filter app-builder run dev ``` -#### (VSCode) Use launch configuration +> We use `pnpm` monorepo capabilities. More informations : +> +> - [filtering](https://pnpm.io/filtering) +> - [workspace](https://pnpm.io/workspaces) -When available, you can use VSCode launch configuration to run the package scripts. You can find them in the `.vscode/launch.json` file. - -### Some usefull commands +#### Some usefull commands ```bash # Start the builder app in dev mode -pnpm --filter app-builder run dev --debug +pnpm --filter app-builder run dev # Generate the marble-api client pnpm --filter marble-api run generate-api @@ -61,7 +64,13 @@ pnpm --filter ui-design-system run storybook pnpm --filter ui-icons run generate-icons ``` -### How to check the code locally like the CI +#### (VSCode) Use launch configuration + +When available, you can use VSCode launch configuration to run the package scripts. You can find them in the `.vscode/launch.json` file. + +### Developpement + +#### How to check the code locally like the CI ```bash pnpm run -r type-check && pnpm run -r lint && pnpm run format:check diff --git a/package.json b/package.json index 8b5eac41c..aa1207bbf 100644 --- a/package.json +++ b/package.json @@ -12,13 +12,13 @@ }, "devDependencies": { "@vitejs/plugin-react": "4.2.1", - "@vitest/coverage-v8": "^1.1.3", - "@vitest/ui": "1.1.3", + "@vitest/coverage-v8": "^1.2.1", + "@vitest/ui": "1.2.1", "prettier": "^3.1.1", "prettier-plugin-tailwindcss": "^0.5.11", "react-refresh": "^0.14.0", "typescript": "5.3.3", - "vite-tsconfig-paths": "^4.2.3", - "vitest": "1.1.3" + "vite-tsconfig-paths": "^4.3.1", + "vitest": "1.2.1" } } diff --git a/packages/app-builder/README.md b/packages/app-builder/README.md index 10aca99e2..2ac82c31f 100644 --- a/packages/app-builder/README.md +++ b/packages/app-builder/README.md @@ -1,6 +1,6 @@ # App builder -This is the app builder package. +This is the app builder package, it contains the main application code. ## Getting started @@ -23,13 +23,12 @@ The application is built using the Remix framework. You can find the documentati ```bash # Start the builder app in dev mode pnpm --filter app-builder run dev - - # Start the builder app in dev mode with debug - pnpm --filter app-builder run dev --debug ``` #### Add a new route +The app uses the [flat routes convention](https://github.com/kiliman/remix-flat-routes?tab=readme-ov-file#remix-v2-flat-routes-convention) to define routes. You can find the routes in `src/routes/`. + When adding a new route you need to run : ```bash diff --git a/packages/app-builder/package.json b/packages/app-builder/package.json index 3b442845d..c5968ce8a 100644 --- a/packages/app-builder/package.json +++ b/packages/app-builder/package.json @@ -27,7 +27,7 @@ "@types/react": "18.2.48", "@types/react-dom": "18.2.18", "@types/swagger-ui-react": "^4.18.3", - "eslint-plugin-tailwindcss": "^3.13.1", + "eslint-plugin-tailwindcss": "^3.14.0", "jsdom": "23.2.0", "ora": "^8.0.1", "postcss": "^8.4.33", diff --git a/packages/app-builder/src/components/Cases/CaseRightPanel.tsx b/packages/app-builder/src/components/Cases/CaseRightPanel.tsx index 7227be865..d13e61198 100644 --- a/packages/app-builder/src/components/Cases/CaseRightPanel.tsx +++ b/packages/app-builder/src/components/Cases/CaseRightPanel.tsx @@ -89,7 +89,7 @@ const CaseRightPanelContent = () => { const { t } = useTranslation(casesI18n); return ( - + {t('cases:case.new_case')} diff --git a/packages/app-builder/src/components/Decisions/DecisionRightPanel.tsx b/packages/app-builder/src/components/Decisions/DecisionRightPanel.tsx index 5841dce6b..fd1f7ae15 100644 --- a/packages/app-builder/src/components/Decisions/DecisionRightPanel.tsx +++ b/packages/app-builder/src/components/Decisions/DecisionRightPanel.tsx @@ -96,7 +96,7 @@ function DecisionRightPanelContent() { return ( - + {t('decisions:add_to_case')} diff --git a/packages/app-builder/src/components/Ping/CornerPing.tsx b/packages/app-builder/src/components/Ping/CornerPing.tsx index 6f5ba157e..955c075d1 100644 --- a/packages/app-builder/src/components/Ping/CornerPing.tsx +++ b/packages/app-builder/src/components/Ping/CornerPing.tsx @@ -4,7 +4,7 @@ import clsx from 'clsx'; import { Ping } from './Ping'; const corner_ping = cva( - 'border-grey-00 absolute box-content h-[6px] w-[6px] border-2 text-red-100', + 'border-grey-00 absolute box-content size-[6px] border-2 text-red-100', { variants: { position: { diff --git a/packages/app-builder/src/components/Ping/Ping.tsx b/packages/app-builder/src/components/Ping/Ping.tsx index 2cd6ea637..f88fe5bcd 100644 --- a/packages/app-builder/src/components/Ping/Ping.tsx +++ b/packages/app-builder/src/components/Ping/Ping.tsx @@ -14,8 +14,8 @@ export function Ping({ className }: { className?: string }) { className, )} > - - + + ); } diff --git a/packages/app-builder/src/components/RightPanel.tsx b/packages/app-builder/src/components/RightPanel.tsx index b3c838031..a1d696586 100644 --- a/packages/app-builder/src/components/RightPanel.tsx +++ b/packages/app-builder/src/components/RightPanel.tsx @@ -27,7 +27,7 @@ export function createRightPanel(name: string) { }: RightPanelRootProps) { const value = { open, onClose }; return ( -
+