@addev-be/framework-utils 2.5.17 → 2.5.20

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.
@@ -1,5 +1,5 @@
1
- #!/usr/bin/env node
2
-
3
- import { runPreReleaseChecks } from '../node/pre-release-checks.mjs';
4
-
5
- runPreReleaseChecks();
1
+ #!/usr/bin/env node
2
+
3
+ import { runPreReleaseChecks } from '../node/pre-release-checks.mjs';
4
+
5
+ runPreReleaseChecks();
package/node/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export * from './helpers/versions.mjs';
2
-
3
- export * from './commit-release.mjs';
4
- export * from './nuget-publish.mjs';
5
- export * from './update-version.mjs';
1
+ export * from './helpers/versions.mjs';
2
+
3
+ export * from './commit-release.mjs';
4
+ export * from './nuget-publish.mjs';
5
+ export * from './update-version.mjs';
@@ -1,90 +1,90 @@
1
- import { execSync } from 'child_process';
2
-
3
- const runUIBuildCheck = () => {
4
- console.log('šŸ“¦ Building UI package...');
5
- try {
6
- execSync('yarn workspace @addev-be/ui build', {
7
- stdio: 'inherit',
8
- cwd: process.cwd(),
9
- });
10
- console.log('āœ… UI build successful!');
11
- return true;
12
- } catch (error) {
13
- console.error('āŒ UI build failed!');
14
- return false;
15
- }
16
- };
17
-
18
- const runBackendBuildCheck = () => {
19
- console.log('šŸ”§ Building backend package...');
20
- try {
21
- execSync('dotnet build -c Release packages/backend/Backend.csproj', {
22
- stdio: 'inherit',
23
- cwd: process.cwd(),
24
- });
25
- console.log('āœ… Backend build successful!');
26
- return true;
27
- } catch (error) {
28
- console.error('āŒ Backend build failed!');
29
- return false;
30
- }
31
- };
32
-
33
- const runLintCheck = () => {
34
- console.log('šŸ” Running UI linting...');
35
- try {
36
- execSync('yarn workspace @addev-be/ui lint', {
37
- stdio: 'inherit',
38
- cwd: process.cwd(),
39
- });
40
- console.log('āœ… UI linting passed!');
41
- return true;
42
- } catch (error) {
43
- console.error('āŒ UI linting failed!');
44
- return false;
45
- }
46
- };
47
-
48
- export const runPreReleaseChecks = (options = {}) => {
49
- const { skipUI = false, skipBackend = false, skipLint = false } = options;
50
-
51
- console.log('šŸ” Running pre-release checks...');
52
-
53
- const checks = [];
54
-
55
- if (!skipLint) {
56
- checks.push({ name: 'UI Linting', fn: runLintCheck });
57
- }
58
-
59
- if (!skipUI) {
60
- checks.push({ name: 'UI Build', fn: runUIBuildCheck });
61
- }
62
-
63
- if (!skipBackend) {
64
- checks.push({ name: 'Backend Build', fn: runBackendBuildCheck });
65
- }
66
-
67
- let allPassed = true;
68
-
69
- for (const check of checks) {
70
- console.log(`\n--- ${check.name} ---`);
71
- if (!check.fn()) {
72
- allPassed = false;
73
- break;
74
- }
75
- }
76
-
77
- if (!allPassed) {
78
- console.error('\nāŒ Pre-release checks failed! Release aborted.');
79
- console.error('Please fix the issues above before creating a release.');
80
- process.exit(1);
81
- }
82
-
83
- console.log('\nāœ… All pre-release checks passed!');
84
- return true;
85
- };
86
-
87
- // Allow running this script directly
88
- if (import.meta.url === `file://${process.argv[1]}`) {
89
- runPreReleaseChecks();
90
- }
1
+ import { execSync } from 'child_process';
2
+
3
+ const runUIBuildCheck = () => {
4
+ console.log('šŸ“¦ Building UI package...');
5
+ try {
6
+ execSync('yarn workspace @addev-be/ui build', {
7
+ stdio: 'inherit',
8
+ cwd: process.cwd(),
9
+ });
10
+ console.log('āœ… UI build successful!');
11
+ return true;
12
+ } catch (error) {
13
+ console.error('āŒ UI build failed!');
14
+ return false;
15
+ }
16
+ };
17
+
18
+ const runBackendBuildCheck = () => {
19
+ console.log('šŸ”§ Building backend package...');
20
+ try {
21
+ execSync('dotnet build -c Release packages/backend/Backend.csproj', {
22
+ stdio: 'inherit',
23
+ cwd: process.cwd(),
24
+ });
25
+ console.log('āœ… Backend build successful!');
26
+ return true;
27
+ } catch (error) {
28
+ console.error('āŒ Backend build failed!');
29
+ return false;
30
+ }
31
+ };
32
+
33
+ const runLintCheck = () => {
34
+ console.log('šŸ” Running UI linting...');
35
+ try {
36
+ execSync('yarn workspace @addev-be/ui lint', {
37
+ stdio: 'inherit',
38
+ cwd: process.cwd(),
39
+ });
40
+ console.log('āœ… UI linting passed!');
41
+ return true;
42
+ } catch (error) {
43
+ console.error('āŒ UI linting failed!');
44
+ return false;
45
+ }
46
+ };
47
+
48
+ export const runPreReleaseChecks = (options = {}) => {
49
+ const { skipUI = false, skipBackend = false, skipLint = false } = options;
50
+
51
+ console.log('šŸ” Running pre-release checks...');
52
+
53
+ const checks = [];
54
+
55
+ if (!skipLint) {
56
+ checks.push({ name: 'UI Linting', fn: runLintCheck });
57
+ }
58
+
59
+ if (!skipUI) {
60
+ checks.push({ name: 'UI Build', fn: runUIBuildCheck });
61
+ }
62
+
63
+ if (!skipBackend) {
64
+ checks.push({ name: 'Backend Build', fn: runBackendBuildCheck });
65
+ }
66
+
67
+ let allPassed = true;
68
+
69
+ for (const check of checks) {
70
+ console.log(`\n--- ${check.name} ---`);
71
+ if (!check.fn()) {
72
+ allPassed = false;
73
+ break;
74
+ }
75
+ }
76
+
77
+ if (!allPassed) {
78
+ console.error('\nāŒ Pre-release checks failed! Release aborted.');
79
+ console.error('Please fix the issues above before creating a release.');
80
+ process.exit(1);
81
+ }
82
+
83
+ console.log('\nāœ… All pre-release checks passed!');
84
+ return true;
85
+ };
86
+
87
+ // Allow running this script directly
88
+ if (import.meta.url === `file://${process.argv[1]}`) {
89
+ runPreReleaseChecks();
90
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@addev-be/framework-utils",
3
- "version": "2.5.17",
3
+ "version": "2.5.20",
4
4
  "type": "module",
5
5
  "export": {
6
6
  "node": {