@objectdocs/cli 0.2.5 → 0.2.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/CHANGELOG.md +7 -0
- package/package.json +2 -2
- package/src/commands/build.mjs +5 -4
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objectdocs/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "ObjectDocs CLI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dotenv": "^16.4.5",
|
|
21
21
|
"openai": "^4.0.0",
|
|
22
22
|
"typescript": "^5.9.3",
|
|
23
|
-
"@objectdocs/site": "0.2.
|
|
23
|
+
"@objectdocs/site": "0.2.6"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"dev": "node ./bin/cli.mjs dev ../../content/docs",
|
package/src/commands/build.mjs
CHANGED
|
@@ -86,13 +86,14 @@ export function registerBuildCommand(cli) {
|
|
|
86
86
|
const destNext = path.join(process.cwd(), '.next');
|
|
87
87
|
|
|
88
88
|
if (fs.existsSync(srcNext) && srcNext !== destNext) {
|
|
89
|
-
console.log(`\
|
|
89
|
+
console.log(`\nCopying .next build output to ${destNext}...`);
|
|
90
90
|
if (fs.existsSync(destNext)) {
|
|
91
91
|
fs.rmSync(destNext, { recursive: true, force: true });
|
|
92
92
|
}
|
|
93
|
-
// Use
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
// Use copy instead of symlink to ensure compatibility with Vercel and other deployment platforms
|
|
94
|
+
// that might not handle symlinks to node_modules correctly
|
|
95
|
+
fs.cpSync(srcNext, destNext, { recursive: true });
|
|
96
|
+
console.log(`Build successfully copied to: ${destNext}`);
|
|
96
97
|
} else {
|
|
97
98
|
console.log(`\nNo 'out' directory generated in ${src}.`);
|
|
98
99
|
console.log(`This is expected if 'output: export' is disabled.`);
|