raiton 6.1.1-beta.5 → 6.3.0-beta.10
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/CHANGELOG.md +24 -0
- package/build/bin/index.mjs +25 -1183
- package/docs/contributors/README.md +8 -1
- package/package.json +2 -2
- package/scripts/postinstall.ts +42 -0
- package/scripts/update-version.ts +532 -123
- package/source/core/injection/injection.ts +1 -1
- package/source/core/router/matcher.ts +16 -4
|
@@ -100,4 +100,11 @@ Utiliser les préfixes suivants :
|
|
|
100
100
|
| `remove` | Suppression de code ou de fichiers |
|
|
101
101
|
| `deprecate` | Marquage d'une fonctionnalité comme dépréciée |
|
|
102
102
|
|
|
103
|
-
Executer ```bun run version``` pour mettre à jour la version de l'application automatiquement
|
|
103
|
+
Executer ```bun run version``` pour mettre à jour la version de l'application automatiquement.
|
|
104
|
+
|
|
105
|
+
Ce script :
|
|
106
|
+
- détecte la base de comparaison la plus pertinente (dernier tag de release, sinon branche amont, sinon historique complet) ;
|
|
107
|
+
- déduit le type d'incrément (major / minor / patch) à partir des commits depuis cette base ;
|
|
108
|
+
- met à jour `package.json`, **crée le tag git `v<version>`** et **synchronise `CHANGELOG.md`** sur chaque nouvelle version, afin que les versions publiées sur npm soient toujours traçables.
|
|
109
|
+
|
|
110
|
+
Utiliser `--dry-run` pour prévisualiser sans rien modifier, `--no-tag` pour ne pas créer de tag, et `--base <ref>` pour forcer la base de comparaison.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "raiton",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0-beta.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Modular TypeScript Backend Framework with Dependency Injection, Plugins, Controllers, Middleware and Hot Reloading.",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"start": "bun run build/bin/index.mjs",
|
|
42
42
|
"build": "bun build source/bin/index.ts --target=node --format=esm --outfile=build/bin/index.mjs",
|
|
43
43
|
"version": "bun run scripts/update-version.ts",
|
|
44
|
-
"postinstall": "
|
|
44
|
+
"postinstall": "bun run scripts/postinstall.js",
|
|
45
45
|
"prepublishOnly": "npm run build"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
|
|
6
|
+
const bin = path.resolve(__dirname, '../source/bin/index.ts');
|
|
7
|
+
const workdir = path.dirname(bin);
|
|
8
|
+
const base = path.basename(bin, '.ts');
|
|
9
|
+
|
|
10
|
+
if (process.platform === 'win32') {
|
|
11
|
+
const cmdContent = `@IF EXIST "%~dp0\\node.exe" (
|
|
12
|
+
"%~dp0\\node.exe" "${bin}" %*
|
|
13
|
+
) ELSE (
|
|
14
|
+
@SETLOCAL
|
|
15
|
+
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
16
|
+
node "${bin}" %*
|
|
17
|
+
)`;
|
|
18
|
+
const ps1Content = `#!/usr/bin/env pwsh
|
|
19
|
+
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
20
|
+
|
|
21
|
+
if (Test-Path "$basedir/node.exe") {
|
|
22
|
+
# Note: running setup.exe from the current directory may fail due to Windows Installer restrictions.
|
|
23
|
+
# See https://github.com
|
|
24
|
+
& "$basedir/node.exe" "$basedir/${path.relative(workdir, bin)}" $args
|
|
25
|
+
} else {
|
|
26
|
+
& "node" "$basedir/${path.relative(workdir, bin)}" $args
|
|
27
|
+
}`;
|
|
28
|
+
|
|
29
|
+
try {
|
|
30
|
+
fs.writeFileSync(path.join(workdir, `${base}.cmd`), cmdContent, 'utf-8');
|
|
31
|
+
fs.writeFileSync(path.join(workdir, `${base}.ps1`), ps1Content, 'utf-8');
|
|
32
|
+
} catch (err) {
|
|
33
|
+
console.error('Raiton Cli: Error create Windows files', err);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
} else {
|
|
37
|
+
fs.chmod(bin, '755', (err) => {
|
|
38
|
+
if (err) {
|
|
39
|
+
console.error('Raiton Cli: Error chmod', err);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|