@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.
Files changed (43) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.yml +83 -0
  2. package/.github/ISSUE_TEMPLATE/feature_request.yml +90 -0
  3. package/.github/ISSUE_TEMPLATE/question.yml +31 -0
  4. package/.github/ISSUE_TEMPLATE/security.yml +69 -0
  5. package/.github/actions/setup-node-pnpm/action.yml +29 -0
  6. package/.github/workflows/pull-request.yml +122 -0
  7. package/.github/workflows/release.yml +85 -0
  8. package/.prettierignore +7 -0
  9. package/.prettierrc.json +5 -0
  10. package/.vscode/extensions.json +3 -0
  11. package/.vscode/settings.json +9 -0
  12. package/CONTRIBUTING.md +264 -0
  13. package/COPYRIGHT +23 -0
  14. package/LICENSE.md +482 -0
  15. package/README.md +107 -0
  16. package/dist/core-lib.es.js +3045 -0
  17. package/dist/core-lib.umd.js +12 -0
  18. package/dist/package.json +74 -0
  19. package/dist/types/src/components/LinidZoneRenderer.vue.d.ts +19 -0
  20. package/dist/types/src/index.d.ts +7 -0
  21. package/dist/types/src/lifecycle/skeleton.d.ts +100 -0
  22. package/dist/types/src/services/federationService.d.ts +11 -0
  23. package/dist/types/src/stores/linidZoneStore.d.ts +23 -0
  24. package/dist/types/src/types/linidZone.d.ts +21 -0
  25. package/dist/types/src/types/module.d.ts +63 -0
  26. package/dist/types/src/types/moduleLifecycle.d.ts +121 -0
  27. package/dist/types/vite.config.d.ts +2 -0
  28. package/docs/components-plugin-zones.md +168 -0
  29. package/docs/helpers.md +188 -0
  30. package/docs/module-lifecycle.md +874 -0
  31. package/docs/types-and-interfaces.md +92 -0
  32. package/eslint.config.js +135 -0
  33. package/package.json +73 -0
  34. package/src/components/LinidZoneRenderer.vue +77 -0
  35. package/src/index.ts +51 -0
  36. package/src/lifecycle/skeleton.ts +154 -0
  37. package/src/services/federationService.ts +44 -0
  38. package/src/stores/linidZoneStore.ts +62 -0
  39. package/src/types/linidZone.ts +48 -0
  40. package/src/types/module.ts +96 -0
  41. package/src/types/moduleLifecycle.ts +163 -0
  42. package/tsconfig.json +30 -0
  43. package/vite.config.ts +42 -0
@@ -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.