@linagora/linid-im-front-corelib 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.yml +83 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +90 -0
- package/.github/ISSUE_TEMPLATE/question.yml +31 -0
- package/.github/ISSUE_TEMPLATE/security.yml +69 -0
- package/.github/actions/setup-node-pnpm/action.yml +29 -0
- package/.github/workflows/pull-request.yml +122 -0
- package/.github/workflows/release.yml +85 -0
- package/.prettierignore +7 -0
- package/.prettierrc.json +5 -0
- package/.vscode/extensions.json +3 -0
- package/.vscode/settings.json +9 -0
- package/CONTRIBUTING.md +264 -0
- package/COPYRIGHT +23 -0
- package/LICENSE.md +482 -0
- package/README.md +107 -0
- package/dist/core-lib.es.js +3045 -0
- package/dist/core-lib.umd.js +12 -0
- package/dist/package.json +74 -0
- package/dist/types/src/components/LinidZoneRenderer.vue.d.ts +19 -0
- package/dist/types/src/index.d.ts +7 -0
- package/dist/types/src/lifecycle/skeleton.d.ts +100 -0
- package/dist/types/src/services/federationService.d.ts +11 -0
- package/dist/types/src/stores/linidZoneStore.d.ts +23 -0
- package/dist/types/src/types/linidZone.d.ts +21 -0
- package/dist/types/src/types/module.d.ts +63 -0
- package/dist/types/src/types/moduleLifecycle.d.ts +121 -0
- package/dist/types/vite.config.d.ts +2 -0
- package/docs/components-plugin-zones.md +168 -0
- package/docs/helpers.md +188 -0
- package/docs/module-lifecycle.md +874 -0
- package/docs/types-and-interfaces.md +92 -0
- package/eslint.config.js +135 -0
- package/package.json +73 -0
- package/src/components/LinidZoneRenderer.vue +77 -0
- package/src/index.ts +51 -0
- package/src/lifecycle/skeleton.ts +154 -0
- package/src/services/federationService.ts +44 -0
- package/src/stores/linidZoneStore.ts +62 -0
- package/src/types/linidZone.ts +48 -0
- package/src/types/module.ts +96 -0
- package/src/types/moduleLifecycle.ts +163 -0
- package/tsconfig.json +30 -0
- package/vite.config.ts +42 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# **CONTRIBUTING π€**
|
|
2
|
+
|
|
3
|
+
Thank you for contributing to **linid-im-front-corelib**, the core front-end library of the LinID Identity Manager platform.
|
|
4
|
+
This document explains the conventions, workflows, and best practices to follow when contributing.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# **π Git Conventions**
|
|
9
|
+
|
|
10
|
+
## **πΏ Branch Naming**
|
|
11
|
+
|
|
12
|
+
All branches must follow one of the following naming patterns:
|
|
13
|
+
|
|
14
|
+
| Type | Pattern | Example |
|
|
15
|
+
| --------------- | --------------------------------- | --------------------------------- |
|
|
16
|
+
| **Main** | `main` or `dev` | `main` |
|
|
17
|
+
| **Feature** | `feature/<short-description>` | `feature/plugin-zone-support` |
|
|
18
|
+
| **Bugfix** | `bugfix/<short-description>` | `bugfix/fix-null-validation` |
|
|
19
|
+
| **Improvement** | `improvement/<short-description>` | `improvement/refactor-core-types` |
|
|
20
|
+
| **Release** | `release/<version>` | `release/1.2.0` |
|
|
21
|
+
| **Hotfix** | `hotfix/<short-description>` | `hotfix/fix-critical-crash` |
|
|
22
|
+
|
|
23
|
+
### **Rules**
|
|
24
|
+
|
|
25
|
+
- β Allowed characters: lowercase letters, numbers, dashes (`-`), underscores (`_`), and dots (`.`)
|
|
26
|
+
- β Names must be concise and descriptive
|
|
27
|
+
- β Use English keywords and descriptions
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## **π Commit Message Format (Conventional Commits)**
|
|
32
|
+
|
|
33
|
+
We follow the **Conventional Commits** specification:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
<type>(<scope>): <short summary>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### **Accepted types**
|
|
40
|
+
|
|
41
|
+
* **feat** β Introduces, updates, or removes a feature in the API or UI
|
|
42
|
+
* **fix** β Resolves a bug in the API or UI originating from a previous feature
|
|
43
|
+
* **refactor** β Rewrites or restructures code without changing API or UI behavior
|
|
44
|
+
* **perf** β A specialized refactor focused on improving performance
|
|
45
|
+
* **style** β Addresses code style issues (e.g., whitespace, formatting, missing semicolons) without affecting behavior
|
|
46
|
+
* **test** β Adds missing tests or updates existing tests
|
|
47
|
+
* **docs** β Documentation-only changes
|
|
48
|
+
* **build** β Modifies build-related components (tooling, dependencies, versioning, CI/CD, etc.)
|
|
49
|
+
* **ops** β Changes to operational or infrastructure components (deployment, backup, recovery, etc.)
|
|
50
|
+
* **chore** β Miscellaneous maintenance tasks (e.g., updating `.gitignore`)
|
|
51
|
+
|
|
52
|
+
### **Examples**
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
feat(core): add identity validation helpers
|
|
56
|
+
fix(plugins): prevent crash on remote loading
|
|
57
|
+
docs(contributing): add commit format rules
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## **π Commit Signing (GPG)**
|
|
63
|
+
|
|
64
|
+
All commits **must be GPG-signed**:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
git commit -S -m "feat(core): add new service"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Unsigned commits will be rejected.
|
|
71
|
+
If you need help setting up GPG signing, refer to your Git hosting providerβs documentation.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
# **π Documentation Guidelines**
|
|
76
|
+
|
|
77
|
+
## **π Documentation Directory**
|
|
78
|
+
|
|
79
|
+
All functional or technical documentation must be placed inside:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
/docs
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Please keep this folder organized and up to date.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## **π Diagrams with Mermaid**
|
|
90
|
+
|
|
91
|
+
We use **Mermaid** for architecture diagrams, flowcharts, sequence diagrams, etc.
|
|
92
|
+
|
|
93
|
+
* Source files must be `.md` or `.mmd`
|
|
94
|
+
* They must be stored in the `docs` directory
|
|
95
|
+
* Generated images must be committed together with source files
|
|
96
|
+
|
|
97
|
+
### **Install Mermaid CLI**
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npm install -g @mermaid-js/mermaid-cli
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### **Generate a PNG**
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
mmdc -i docs/diagram.mmd -o docs/diagram.png
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
π‘ Any modification to a Mermaid diagram **must include** regeneration of the corresponding PNG.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
# **π Development**
|
|
114
|
+
|
|
115
|
+
This project uses **pnpm** as the preferred package manager.
|
|
116
|
+
Node.js **22.19+** is recommended.
|
|
117
|
+
|
|
118
|
+
## **π¦ Installation**
|
|
119
|
+
|
|
120
|
+
### β Quick Start
|
|
121
|
+
|
|
122
|
+
```sh
|
|
123
|
+
corepack enable
|
|
124
|
+
pnpm install
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Using pnpm (recommended)
|
|
128
|
+
|
|
129
|
+
```sh
|
|
130
|
+
pnpm install
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Using npm (legacy support and not recommended by the dev team)
|
|
134
|
+
|
|
135
|
+
```sh
|
|
136
|
+
npm install
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## **π οΈ Build the Library**
|
|
142
|
+
|
|
143
|
+
```sh
|
|
144
|
+
pnpm build
|
|
145
|
+
# or (not recommended by the dev team)
|
|
146
|
+
npm run build
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## **π§ Development Mode**
|
|
152
|
+
|
|
153
|
+
```sh
|
|
154
|
+
pnpm dev
|
|
155
|
+
# or (not recommended by the dev team)
|
|
156
|
+
npm run dev
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## **π§ͺ Run Tests**
|
|
162
|
+
|
|
163
|
+
```sh
|
|
164
|
+
pnpm test
|
|
165
|
+
# or (not recommended by the dev team)
|
|
166
|
+
npm run test
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
# **π§Ό Code Quality**
|
|
172
|
+
|
|
173
|
+
We use **ESLint**, **Prettier**, and **TypeScript** to enforce consistent code style and reliability.
|
|
174
|
+
|
|
175
|
+
## **π Lint**
|
|
176
|
+
|
|
177
|
+
```sh
|
|
178
|
+
pnpm lint
|
|
179
|
+
pnpm lint:fix
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## **π¨ Format**
|
|
183
|
+
|
|
184
|
+
```sh
|
|
185
|
+
pnpm format
|
|
186
|
+
pnpm format:check
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## **π Type Checking**
|
|
190
|
+
|
|
191
|
+
```sh
|
|
192
|
+
pnpm type-check
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## **β Full Validation**
|
|
196
|
+
|
|
197
|
+
```sh
|
|
198
|
+
pnpm validate
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Copyright Headers
|
|
202
|
+
|
|
203
|
+
All source files located in the `src` folder must contain a copyright header at the beginning of the file. This header is based on the content of the `COPYRIGHT` file at the project root.
|
|
204
|
+
|
|
205
|
+
### Affected Files
|
|
206
|
+
|
|
207
|
+
Copyright headers are mandatory for the following files:
|
|
208
|
+
|
|
209
|
+
- TypeScript files (`.ts`)
|
|
210
|
+
- JavaScript files (`.js`)
|
|
211
|
+
- Vue files (`.vue`)
|
|
212
|
+
|
|
213
|
+
### Automatic Verification
|
|
214
|
+
|
|
215
|
+
An ESLint rule is configured via the `eslint-plugin-headers` plugin to check for the presence of these headers.
|
|
216
|
+
|
|
217
|
+
### Automatic Header Addition
|
|
218
|
+
|
|
219
|
+
If a file does not contain the required copyright header, you can add it automatically by running:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
pnpm lint:fix
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
This command will analyze all files in the `src` folder and add missing headers according to the `COPYRIGHT` file.
|
|
226
|
+
|
|
227
|
+
### Manual Verification
|
|
228
|
+
|
|
229
|
+
To check compliance without modifying files, use:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
pnpm lint
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Any file without the appropriate header will be reported as a lint error.
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
# **π§ͺ E2E & Integration Testing**
|
|
240
|
+
|
|
241
|
+
Full E2E testing documentation is **Coming soonβ¦ β³**
|
|
242
|
+
This library will later integrate with the LinID front-end test runner.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
# **π Releases (Semantic Release)**
|
|
247
|
+
|
|
248
|
+
Releases are fully automated using **Semantic Release**.
|
|
249
|
+
|
|
250
|
+
When a merge is performed into `main`:
|
|
251
|
+
|
|
252
|
+
* The version bump is automatically calculated from commit messages
|
|
253
|
+
* `package.json` is updated
|
|
254
|
+
* A changelog entry is generated
|
|
255
|
+
* A Git tag is created
|
|
256
|
+
|
|
257
|
+
β No manual intervention is needed.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
# **π License**
|
|
262
|
+
|
|
263
|
+
This project is licensed under the **GNU Affero General Public License v3**.
|
|
264
|
+
See: [`LICENSE.md`](LICENSE.md)
|
package/COPYRIGHT
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Copyright (C) 2025 Linagora
|
|
2
|
+
|
|
3
|
+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
|
|
4
|
+
Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
|
|
5
|
+
any later version, provided you comply with the Additional Terms applicable for LinID Identity Manager software by
|
|
6
|
+
LINAGORA pursuant to Section 7 of the GNU Affero General Public License, subsections (b), (c), and (e), pursuant to
|
|
7
|
+
which these Appropriate Legal Notices must notably (i) retain the display of the "LinIDβ’" trademark/logo at the top
|
|
8
|
+
of the interface window, the display of the βYou are using the Open Source and free version of LinIDβ’, powered by
|
|
9
|
+
Linagora Β© 2009β2013. Contribute to LinID R&D by subscribing to an Enterprise offer!β infobox and in the e-mails
|
|
10
|
+
sent with the Program, notice appended to any type of outbound messages (e.g. e-mail and meeting requests) as well
|
|
11
|
+
as in the LinID Identity Manager user interface, (ii) retain all hypertext links between LinID Identity Manager
|
|
12
|
+
and https://linid.org/, as well as between LINAGORA and LINAGORA.com, and (iii) refrain from infringing LINAGORA
|
|
13
|
+
intellectual property rights over its trademarks and commercial brands. Other Additional Terms apply, see
|
|
14
|
+
<http://www.linagora.com/licenses/> for more details.
|
|
15
|
+
|
|
16
|
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
17
|
+
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
18
|
+
details.
|
|
19
|
+
|
|
20
|
+
You should have received a copy of the GNU Affero General Public License and its applicable Additional Terms for
|
|
21
|
+
LinID Identity Manager along with this program. If not, see <http://www.gnu.org/licenses/> for the GNU Affero
|
|
22
|
+
General Public License version 3 and <http://www.linagora.com/licenses/> for the Additional Terms applicable to the
|
|
23
|
+
LinID Identity Manager software.
|