@monodog/backend 1.4.4 → 1.4.6
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/dist/cli.js +1 -1
- package/dist/config-loader.js +2 -7
- package/package.json +1 -2
- package/src/cli.ts +1 -1
- package/src/config-loader.ts +1 -6
package/dist/cli.js
CHANGED
|
@@ -117,7 +117,7 @@ if (serve) {
|
|
|
117
117
|
}
|
|
118
118
|
else {
|
|
119
119
|
console.log(`\nInitializing Configurations...`);
|
|
120
|
-
createConfigFileIfMissing(rootPath ?? process.cwd());
|
|
120
|
+
// createConfigFileIfMissing(rootPath ?? process.cwd());
|
|
121
121
|
copyPackageToWorkspace(rootPath);
|
|
122
122
|
console.log(`Monodog CLI: No operation specified. Use --serve to start the API or -h for help. Ex: pnpm monodog-cli @monodog/dashboard --serve --root .`);
|
|
123
123
|
}
|
package/dist/config-loader.js
CHANGED
|
@@ -52,15 +52,10 @@ function loadConfig() {
|
|
|
52
52
|
// or that we can navigate up to the root from the current file's location.
|
|
53
53
|
let rootPath = path.resolve(process.cwd()); // Adjust based on your workspace folder depth from root if needed
|
|
54
54
|
let configPath = path.resolve(rootPath, 'monodog-conf.json');
|
|
55
|
-
|
|
55
|
+
createConfigFileIfMissing(rootPath);
|
|
56
56
|
if (!fs.existsSync(configPath)) {
|
|
57
57
|
console.error(`ERROR1: Configuration file not found at ${configPath}`);
|
|
58
|
-
|
|
59
|
-
if (!fs.existsSync(configPath)) {
|
|
60
|
-
console.error(`ERROR2: Configuration file not found at ${configPath}`);
|
|
61
|
-
configPath = path.resolve(rootPath, 'monodog-conf.json');
|
|
62
|
-
process.exit(1);
|
|
63
|
-
}
|
|
58
|
+
process.exit(1);
|
|
64
59
|
}
|
|
65
60
|
try {
|
|
66
61
|
// 2. Read and parse the JSON file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monodog/backend",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6",
|
|
4
4
|
"description": "Backend API server for monodog monorepo dashboard",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"generate": "DATABASE_URL=$(npm run db:url --silent 2>/dev/null | tr -d '\\n') prisma generate",
|
|
21
21
|
"migrate": "DATABASE_URL=$(npm run db:url --silent 2>/dev/null | tr -d '\\n') prisma migrate dev",
|
|
22
22
|
"serve": "DATABASE_URL=$(npm run db:url --silent 2>/dev/null | tr -d '\\n') node dist/cli.js --serve --root ../../" },
|
|
23
|
-
"postinstall": "node -e \"const fs=require('fs'); const path=require('path'); const src='monodog-conf.example.json'; const dest=path.join(__dirname, '..', '..', '..', 'monodog-conf.json'); if (!fs.existsSync(dest)) fs.copyFileSync(path.join(__dirname, src), dest)\"",
|
|
24
23
|
"dependencies": {
|
|
25
24
|
"@monodog/ci-status": "1.1.1",
|
|
26
25
|
"@monodog/monorepo-scanner": "1.0.7",
|
package/src/cli.ts
CHANGED
|
@@ -90,7 +90,7 @@ if (serve) {
|
|
|
90
90
|
} else {
|
|
91
91
|
console.log(`\nInitializing Configurations...`);
|
|
92
92
|
|
|
93
|
-
createConfigFileIfMissing(rootPath ?? process.cwd());
|
|
93
|
+
// createConfigFileIfMissing(rootPath ?? process.cwd());
|
|
94
94
|
copyPackageToWorkspace(rootPath);
|
|
95
95
|
|
|
96
96
|
console.log(`Monodog CLI: No operation specified. Use --serve to start the API or -h for help. Ex: pnpm monodog-cli @monodog/dashboard --serve --root .`);
|
package/src/config-loader.ts
CHANGED
|
@@ -38,16 +38,11 @@ export function loadConfig(): MonodogConfig {
|
|
|
38
38
|
// or that we can navigate up to the root from the current file's location.
|
|
39
39
|
let rootPath = path.resolve(process.cwd()); // Adjust based on your workspace folder depth from root if needed
|
|
40
40
|
let configPath = path.resolve(rootPath, 'monodog-conf.json');
|
|
41
|
-
|
|
41
|
+
createConfigFileIfMissing(rootPath);
|
|
42
42
|
|
|
43
43
|
if (!fs.existsSync(configPath)) {
|
|
44
44
|
console.error(`ERROR1: Configuration file not found at ${configPath}`);
|
|
45
|
-
configPath = path.resolve(path.resolve('../../'), 'monodog-conf.json'); //get root config, Adjust based on your workspace folder depth from root if needed
|
|
46
|
-
if (!fs.existsSync(configPath)) {
|
|
47
|
-
console.error(`ERROR2: Configuration file not found at ${configPath}`);
|
|
48
|
-
configPath = path.resolve(rootPath, 'monodog-conf.json');
|
|
49
45
|
process.exit(1);
|
|
50
|
-
}
|
|
51
46
|
}
|
|
52
47
|
|
|
53
48
|
try {
|