@bemedev/codebase 0.0.1 → 0.0.2
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/CHANGE_LOG.md +47 -0
- package/README.md +41 -3
- package/lib/cli/cli.cjs +6 -4
- package/lib/cli/cli.cjs.map +1 -1
- package/lib/cli/cli.d.ts.map +1 -1
- package/lib/cli/cli.js +7 -5
- package/lib/cli/cli.js.map +1 -1
- package/package.json +5 -2
package/CHANGE_LOG.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
## CHANGELOG
|
|
2
|
+
|
|
3
|
+
<br/>
|
|
4
|
+
<br/>
|
|
5
|
+
|
|
6
|
+
<details>
|
|
7
|
+
|
|
8
|
+
<summary>
|
|
9
|
+
|
|
10
|
+
### Version [0.0.2] --> _2025/09/04 11:30_
|
|
11
|
+
|
|
12
|
+
</summary>
|
|
13
|
+
|
|
14
|
+
- 📦 Add documentation
|
|
15
|
+
|
|
16
|
+
</details>
|
|
17
|
+
|
|
18
|
+
<br/>
|
|
19
|
+
|
|
20
|
+
<details>
|
|
21
|
+
|
|
22
|
+
<summary>
|
|
23
|
+
|
|
24
|
+
### Version [0.0.1] --> _2025/09/04 11:30_
|
|
25
|
+
|
|
26
|
+
</summary>
|
|
27
|
+
|
|
28
|
+
- ✨ First version
|
|
29
|
+
- 📦 Initial release
|
|
30
|
+
|
|
31
|
+
</details>
|
|
32
|
+
|
|
33
|
+
<br/>
|
|
34
|
+
|
|
35
|
+
## Auteur
|
|
36
|
+
|
|
37
|
+
chlbri (bri_lvi@icloud.com)
|
|
38
|
+
|
|
39
|
+
[My github](https://github.com/chlbri?tab=repositories)
|
|
40
|
+
|
|
41
|
+
[<svg width="98" height="96" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#24292f"/></svg>](https://github.com/chlbri?tab=repositories)
|
|
42
|
+
|
|
43
|
+
<br/>
|
|
44
|
+
|
|
45
|
+
## Liens
|
|
46
|
+
|
|
47
|
+
- [Documentation](https://github.com/chlbri/new-package)
|
package/README.md
CHANGED
|
@@ -1,8 +1,46 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Librairie bemedev
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Librairie Node.js pour la gestion et l'analyse de code, avec des
|
|
4
|
+
utilitaires pour faciliter le développement, l'import/export de modules, la
|
|
5
|
+
génération de schémas, et la création de CLI. Elle propose des fonctions
|
|
6
|
+
pour manipuler les constantes, helpers, types, et schemas, ainsi qu'une CLI
|
|
7
|
+
extensible.
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
## Fonctionnalités principales
|
|
10
|
+
|
|
11
|
+
- Analyse de code TypeScript et JavaScript
|
|
12
|
+
- Génération automatique de schémas et types
|
|
13
|
+
- Helpers pour l'import/export de modules
|
|
14
|
+
- CLI pour automatiser les tâches courantes
|
|
15
|
+
- Structure modulaire et extensible
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pnpm install bemedev
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Utilisation
|
|
24
|
+
|
|
25
|
+
Exemple d'import et d'utilisation : clear
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { analyse, generate, helpers } from 'bemedev';
|
|
29
|
+
|
|
30
|
+
const result = analyse('src/index.ts');
|
|
31
|
+
console.log(result);
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Scripts
|
|
35
|
+
|
|
36
|
+
- `pnpm test` : lance les tests unitaires
|
|
37
|
+
- `pnpm lint` : vérifie la qualité du code
|
|
38
|
+
- `pnpm build` : génère les fichiers de production
|
|
39
|
+
|
|
40
|
+
## Contribution
|
|
41
|
+
|
|
42
|
+
Les contributions sont les bienvenues ! Veuillez ouvrir une issue ou une
|
|
43
|
+
pull request pour proposer des améliorations ou signaler des bugs.
|
|
6
44
|
|
|
7
45
|
## Licence
|
|
8
46
|
|
package/lib/cli/cli.cjs
CHANGED
|
@@ -14,10 +14,12 @@ const cli = cmdTs.command({
|
|
|
14
14
|
description: 'Output file path',
|
|
15
15
|
defaultValue: () => constants.CODEBASE_FILE,
|
|
16
16
|
}),
|
|
17
|
-
excludes: cmdTs.
|
|
18
|
-
description: 'The files to exclude,
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
excludes: cmdTs.multioption({
|
|
18
|
+
description: 'The files to exclude, globs',
|
|
19
|
+
long: 'excludes',
|
|
20
|
+
short: 'x',
|
|
21
|
+
type: cmdTs.array(cmdTs.string),
|
|
22
|
+
defaultValue: () => [],
|
|
21
23
|
}),
|
|
22
24
|
},
|
|
23
25
|
handler: functions_generate.generate,
|
package/lib/cli/cli.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.cjs","sources":["../../src/cli/cli.ts"],"sourcesContent":["import { command,
|
|
1
|
+
{"version":3,"file":"cli.cjs","sources":["../../src/cli/cli.ts"],"sourcesContent":["import { array, command, multioption, option, string } from 'cmd-ts';\nimport { CODEBASE_FILE } from '../constants';\nimport { generate as handler } from '../functions/generate';\n\nexport const cli = command({\n name: 'generate',\n\n args: {\n output: option({\n long: 'output',\n short: 'o',\n type: string,\n description: 'Output file path',\n defaultValue: () => CODEBASE_FILE,\n }),\n excludes: multioption({\n description: 'The files to exclude, globs',\n long: 'excludes',\n short: 'x',\n type: array(string),\n defaultValue: () => [],\n }),\n },\n handler,\n});\n"],"names":["command","option","string","CODEBASE_FILE","multioption","array","handler"],"mappings":";;;;;;AAIO,MAAM,GAAG,GAAGA,aAAO,CAAC;AACzB,IAAA,IAAI,EAAE,UAAU;AAEhB,IAAA,IAAI,EAAE;QACJ,MAAM,EAAEC,YAAM,CAAC;AACb,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,IAAI,EAAEC,YAAM;AACZ,YAAA,WAAW,EAAE,kBAAkB;AAC/B,YAAA,YAAY,EAAE,MAAMC,uBAAa;SAClC,CAAC;QACF,QAAQ,EAAEC,iBAAW,CAAC;AACpB,YAAA,WAAW,EAAE,6BAA6B;AAC1C,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,IAAI,EAAEC,WAAK,CAACH,YAAM,CAAC;AACnB,YAAA,YAAY,EAAE,MAAM,EAAE;SACvB,CAAC;AACH,KAAA;aACDI,2BAAO;AACR,CAAA;;;;"}
|
package/lib/cli/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli/cli.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,GAAG;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli/cli.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,GAAG;;;;;;;;;;oJAoBd,CAAC"}
|
package/lib/cli/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { command,
|
|
1
|
+
import { command, multioption, option, array, string } from 'cmd-ts';
|
|
2
2
|
import { CODEBASE_FILE } from '../constants.js';
|
|
3
3
|
import { generate } from '../functions/generate.js';
|
|
4
4
|
|
|
@@ -12,10 +12,12 @@ const cli = command({
|
|
|
12
12
|
description: 'Output file path',
|
|
13
13
|
defaultValue: () => CODEBASE_FILE,
|
|
14
14
|
}),
|
|
15
|
-
excludes:
|
|
16
|
-
description: 'The files to exclude,
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
excludes: multioption({
|
|
16
|
+
description: 'The files to exclude, globs',
|
|
17
|
+
long: 'excludes',
|
|
18
|
+
short: 'x',
|
|
19
|
+
type: array(string),
|
|
20
|
+
defaultValue: () => [],
|
|
19
21
|
}),
|
|
20
22
|
},
|
|
21
23
|
handler: generate,
|
package/lib/cli/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sources":["../../src/cli/cli.ts"],"sourcesContent":["import { command,
|
|
1
|
+
{"version":3,"file":"cli.js","sources":["../../src/cli/cli.ts"],"sourcesContent":["import { array, command, multioption, option, string } from 'cmd-ts';\nimport { CODEBASE_FILE } from '../constants';\nimport { generate as handler } from '../functions/generate';\n\nexport const cli = command({\n name: 'generate',\n\n args: {\n output: option({\n long: 'output',\n short: 'o',\n type: string,\n description: 'Output file path',\n defaultValue: () => CODEBASE_FILE,\n }),\n excludes: multioption({\n description: 'The files to exclude, globs',\n long: 'excludes',\n short: 'x',\n type: array(string),\n defaultValue: () => [],\n }),\n },\n handler,\n});\n"],"names":["handler"],"mappings":";;;;AAIO,MAAM,GAAG,GAAG,OAAO,CAAC;AACzB,IAAA,IAAI,EAAE,UAAU;AAEhB,IAAA,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAC;AACb,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,WAAW,EAAE,kBAAkB;AAC/B,YAAA,YAAY,EAAE,MAAM,aAAa;SAClC,CAAC;QACF,QAAQ,EAAE,WAAW,CAAC;AACpB,YAAA,WAAW,EAAE,6BAA6B;AAC1C,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;AACnB,YAAA,YAAY,EAAE,MAAM,EAAE;SACvB,CAAC;AACH,KAAA;aACDA,QAAO;AACR,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bemedev/codebase",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "The CLI for to generate codebase, and import partially a library. From @bemedev",
|
|
5
5
|
"author": {
|
|
6
6
|
"email": "bri_lvi@icloud.com",
|
|
@@ -38,7 +38,10 @@
|
|
|
38
38
|
],
|
|
39
39
|
"files": [
|
|
40
40
|
"lib",
|
|
41
|
-
"public"
|
|
41
|
+
"public",
|
|
42
|
+
"CHANGE_LOG.md",
|
|
43
|
+
"README.md",
|
|
44
|
+
"LICENSE"
|
|
42
45
|
],
|
|
43
46
|
"engines": {
|
|
44
47
|
"node": ">=22"
|