zero-doc 1.0.6 → 1.0.7
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/config.json +1 -1
- package/package.json +1 -1
- package/scripts/inject-config.js +3 -3
package/dist/config.json
CHANGED
package/package.json
CHANGED
package/scripts/inject-config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Script to inject API URL
|
|
3
|
+
* Script to inject API URL into config.json during build
|
|
4
4
|
* Reads from .env file in project root OR environment variables (CI/CD)
|
|
5
5
|
* This config will be included in the npm package
|
|
6
6
|
*/
|
|
@@ -21,7 +21,7 @@ if (fs.existsSync(envPath)) {
|
|
|
21
21
|
console.log('📁 Loaded .env from project root');
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
// Get API URL
|
|
24
|
+
// Get API URL from environment variables
|
|
25
25
|
// Priority: Environment variable (CI/CD) > .env file
|
|
26
26
|
const apiUrl = process.env.ZERO_DOC_API_URL;
|
|
27
27
|
|
|
@@ -30,7 +30,7 @@ if (!fs.existsSync(distDir)) {
|
|
|
30
30
|
fs.mkdirSync(distDir, { recursive: true });
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
// Create config file with API URL
|
|
33
|
+
// Create config file with API URL
|
|
34
34
|
const config = {
|
|
35
35
|
apiUrl: apiUrl || ''
|
|
36
36
|
};
|