@knowcode/doc-builder 1.4.24 → 1.4.25
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/.claude/settings.local.json +3 -1
- package/CHANGELOG.md +12 -0
- package/html/README.html +1 -1
- package/html/claude-workflow-guide.html +1 -1
- package/html/documentation-index.html +1 -1
- package/html/guides/authentication-guide.html +1 -1
- package/html/guides/documentation-standards.html +1 -1
- package/html/guides/troubleshooting-guide.html +1 -1
- package/html/index.html +1 -1
- package/lib/deploy.js +52 -34
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable changes to @knowcode/doc-builder will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.4.25] - 2025-07-21
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Improved production URL detection with multiple fallback methods
|
|
12
|
+
- Tries to extract project name and construct standard Vercel URL
|
|
13
|
+
- Better handling of different Vercel URL formats
|
|
14
|
+
|
|
15
|
+
### Background
|
|
16
|
+
- Previous version didn't correctly parse Vercel's output
|
|
17
|
+
- Now uses multiple methods to determine the production URL
|
|
18
|
+
- Extracts project name from deployment URL as fallback
|
|
19
|
+
|
|
8
20
|
## [1.4.24] - 2025-07-21
|
|
9
21
|
|
|
10
22
|
### Fixed
|
package/html/README.html
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<div class="header-actions">
|
|
31
31
|
<div class="deployment-info">
|
|
32
|
-
<span class="deployment-date" title="Built with doc-builder v1.4.
|
|
32
|
+
<span class="deployment-date" title="Built with doc-builder v1.4.24">Last updated: Jul 21, 2025, 07:50 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<div class="header-actions">
|
|
31
31
|
<div class="deployment-info">
|
|
32
|
-
<span class="deployment-date" title="Built with doc-builder v1.4.
|
|
32
|
+
<span class="deployment-date" title="Built with doc-builder v1.4.24">Last updated: Jul 21, 2025, 07:50 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<div class="header-actions">
|
|
31
31
|
<div class="deployment-info">
|
|
32
|
-
<span class="deployment-date" title="Built with doc-builder v1.4.
|
|
32
|
+
<span class="deployment-date" title="Built with doc-builder v1.4.24">Last updated: Jul 21, 2025, 07:50 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<div class="header-actions">
|
|
31
31
|
<div class="deployment-info">
|
|
32
|
-
<span class="deployment-date" title="Built with doc-builder v1.4.
|
|
32
|
+
<span class="deployment-date" title="Built with doc-builder v1.4.24">Last updated: Jul 21, 2025, 07:50 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<div class="header-actions">
|
|
31
31
|
<div class="deployment-info">
|
|
32
|
-
<span class="deployment-date" title="Built with doc-builder v1.4.
|
|
32
|
+
<span class="deployment-date" title="Built with doc-builder v1.4.24">Last updated: Jul 21, 2025, 07:50 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<div class="header-actions">
|
|
31
31
|
<div class="deployment-info">
|
|
32
|
-
<span class="deployment-date" title="Built with doc-builder v1.4.
|
|
32
|
+
<span class="deployment-date" title="Built with doc-builder v1.4.24">Last updated: Jul 21, 2025, 07:50 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
package/html/index.html
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
<div class="header-actions">
|
|
31
31
|
<div class="deployment-info">
|
|
32
|
-
<span class="deployment-date" title="Built with doc-builder v1.4.
|
|
32
|
+
<span class="deployment-date" title="Built with doc-builder v1.4.24">Last updated: Jul 21, 2025, 07:50 PM UTC</span>
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
|
package/lib/deploy.js
CHANGED
|
@@ -282,55 +282,73 @@ async function deployToVercel(config, isProd = false) {
|
|
|
282
282
|
|
|
283
283
|
vercelProcess.on('close', async (code) => {
|
|
284
284
|
if (code === 0) {
|
|
285
|
-
// Try to get the production URL from Vercel
|
|
285
|
+
// Try to get the production URL from Vercel
|
|
286
|
+
let productionUrl = null;
|
|
287
|
+
|
|
286
288
|
try {
|
|
287
289
|
const { execSync } = require('child_process');
|
|
288
|
-
const projectInfo = execSync('vercel project ls', {
|
|
289
|
-
cwd: outputPath,
|
|
290
|
-
encoding: 'utf8',
|
|
291
|
-
stdio: ['pipe', 'pipe', 'ignore']
|
|
292
|
-
});
|
|
293
|
-
|
|
294
|
-
// Try to determine the project name from the deployment URL or .vercel/project.json
|
|
295
|
-
let projectName = null;
|
|
296
290
|
|
|
297
|
-
//
|
|
291
|
+
// Method 1: Check for project domains
|
|
298
292
|
try {
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
293
|
+
const domainsOutput = execSync('vercel domains ls', {
|
|
294
|
+
cwd: outputPath,
|
|
295
|
+
encoding: 'utf8',
|
|
296
|
+
stdio: ['pipe', 'pipe', 'ignore']
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
// Look for domains associated with this project
|
|
300
|
+
const domainLines = domainsOutput.split('\n');
|
|
301
|
+
for (const line of domainLines) {
|
|
302
|
+
if (line.includes('.vercel.app') && !line.includes('source')) {
|
|
303
|
+
// Extract domain that looks like a custom project domain
|
|
304
|
+
const match = line.match(/([a-z0-9-]+\.vercel\.app)/);
|
|
305
|
+
if (match && !match[1].includes('lindsay-1340s-projects')) {
|
|
306
|
+
productionUrl = `https://${match[1]}`;
|
|
307
|
+
break;
|
|
309
308
|
}
|
|
310
309
|
}
|
|
311
310
|
}
|
|
312
311
|
} catch (e) {
|
|
313
|
-
//
|
|
312
|
+
// domains command might not be available
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
// Method 2: Get project info and construct standard production URL
|
|
316
|
+
if (!productionUrl) {
|
|
317
|
+
try {
|
|
318
|
+
// Get the project name from the deployment
|
|
319
|
+
const inspectOutput = execSync(`vercel inspect ${deployUrl}`, {
|
|
320
|
+
cwd: outputPath,
|
|
321
|
+
encoding: 'utf8',
|
|
322
|
+
stdio: ['pipe', 'pipe', 'ignore']
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
// Extract project name from inspect output
|
|
326
|
+
const projectMatch = inspectOutput.match(/Project Name:\s+([^\s]+)/);
|
|
327
|
+
if (projectMatch) {
|
|
328
|
+
const projectName = projectMatch[1];
|
|
329
|
+
// Construct the standard production URL
|
|
330
|
+
productionUrl = `https://${projectName}.vercel.app`;
|
|
331
|
+
}
|
|
332
|
+
} catch (e) {
|
|
333
|
+
// inspect command failed
|
|
334
|
+
}
|
|
314
335
|
}
|
|
315
336
|
|
|
316
|
-
// Extract
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
//
|
|
320
|
-
const urlMatch =
|
|
321
|
-
if (urlMatch
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
)) {
|
|
325
|
-
resolve({ deployUrl, productionUrl: urlMatch[0] });
|
|
326
|
-
return;
|
|
337
|
+
// Method 3: Extract from deployment URL pattern
|
|
338
|
+
if (!productionUrl && deployUrl) {
|
|
339
|
+
// Try to extract project name from deployment URL
|
|
340
|
+
// Format: https://project-name-randomhash-team.vercel.app
|
|
341
|
+
const urlMatch = deployUrl.match(/https:\/\/([^-]+)-[a-z0-9]+-/);
|
|
342
|
+
if (urlMatch) {
|
|
343
|
+
const projectName = urlMatch[1];
|
|
344
|
+
productionUrl = `https://${projectName}.vercel.app`;
|
|
327
345
|
}
|
|
328
346
|
}
|
|
329
347
|
} catch (err) {
|
|
330
|
-
//
|
|
348
|
+
// All methods failed, use deployment URL
|
|
331
349
|
}
|
|
332
350
|
|
|
333
|
-
resolve({ deployUrl, productionUrl
|
|
351
|
+
resolve({ deployUrl, productionUrl });
|
|
334
352
|
} else {
|
|
335
353
|
reject(new Error(`Vercel deployment failed with code ${code}`));
|
|
336
354
|
}
|