@take-out/cli 0.1.6 → 0.1.10
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/cjs/commands/docs.cjs +9 -0
- package/dist/cjs/commands/docs.js +9 -0
- package/dist/cjs/commands/docs.js.map +1 -1
- package/dist/cjs/commands/onboard.cjs +14 -7
- package/dist/cjs/commands/onboard.js +31 -28
- package/dist/cjs/commands/onboard.js.map +1 -1
- package/dist/cjs/utils/env-categories.cjs +5 -5
- package/dist/cjs/utils/env-categories.js +5 -5
- package/dist/cjs/utils/env-categories.js.map +1 -1
- package/dist/esm/commands/docs.js +9 -0
- package/dist/esm/commands/docs.js.map +1 -1
- package/dist/esm/commands/docs.mjs +9 -0
- package/dist/esm/commands/docs.mjs.map +1 -1
- package/dist/esm/commands/onboard.js +31 -28
- package/dist/esm/commands/onboard.js.map +1 -1
- package/dist/esm/commands/onboard.mjs +14 -7
- package/dist/esm/commands/onboard.mjs.map +1 -1
- package/dist/esm/utils/env-categories.js +5 -5
- package/dist/esm/utils/env-categories.js.map +1 -1
- package/dist/esm/utils/env-categories.mjs +5 -5
- package/dist/esm/utils/env-categories.mjs.map +1 -1
- package/package.json +3 -3
- package/src/commands/docs.ts +16 -0
- package/src/commands/onboard.ts +13 -12
- package/src/utils/env-categories.ts +6 -5
- package/types/commands/docs.d.ts.map +1 -1
- package/types/utils/env-categories.d.ts.map +1 -1
package/src/commands/docs.ts
CHANGED
|
@@ -323,6 +323,16 @@ function hasSkillFrontmatter(content: string): boolean {
|
|
|
323
323
|
return frontmatter.includes('name:') && frontmatter.includes('description:')
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
+
// check if content has dev: true in frontmatter
|
|
327
|
+
function isDevOnly(content: string): boolean {
|
|
328
|
+
if (!content.startsWith('---')) return false
|
|
329
|
+
const endIndex = content.indexOf('---', 3)
|
|
330
|
+
if (endIndex === -1) return false
|
|
331
|
+
|
|
332
|
+
const frontmatter = content.slice(3, endIndex)
|
|
333
|
+
return /\bdev:\s*true\b/.test(frontmatter)
|
|
334
|
+
}
|
|
335
|
+
|
|
326
336
|
// extract title and description from markdown content (for docs without frontmatter)
|
|
327
337
|
function extractDocMeta(content: string): { title: string; description: string } {
|
|
328
338
|
const lines = content.split('\n')
|
|
@@ -452,9 +462,15 @@ const skillsCommand = defineCommand({
|
|
|
452
462
|
let generated = 0
|
|
453
463
|
let unchanged = 0
|
|
454
464
|
|
|
465
|
+
const isDev = !!process.env.IS_TAMAGUI_DEV
|
|
466
|
+
|
|
455
467
|
for (const doc of docs) {
|
|
456
468
|
// read doc content
|
|
457
469
|
const content = readFileSync(doc.path, 'utf-8')
|
|
470
|
+
|
|
471
|
+
// skip dev-only docs unless IS_TAMAGUI_DEV is set
|
|
472
|
+
if (isDevOnly(content) && !isDev) continue
|
|
473
|
+
|
|
458
474
|
const hasFrontmatter = hasSkillFrontmatter(content)
|
|
459
475
|
|
|
460
476
|
if (hasFrontmatter) {
|
package/src/commands/onboard.ts
CHANGED
|
@@ -727,7 +727,11 @@ async function setupUncloudDeployment(cwd: string): Promise<void> {
|
|
|
727
727
|
updateEnvVariable(cwd, 'BETTER_AUTH_SECRET', authSecret, envFile)
|
|
728
728
|
updateEnvVariable(cwd, 'BETTER_AUTH_URL', domain, envFile)
|
|
729
729
|
updateEnvVariable(cwd, 'ONE_SERVER_URL', domain, envFile)
|
|
730
|
-
|
|
730
|
+
// extract hostname from URL (remove protocol)
|
|
731
|
+
const zeroHost = zeroUrl.replace(/^https?:\/\//, '')
|
|
732
|
+
const webHost = domain.replace(/^https?:\/\//, '')
|
|
733
|
+
updateEnvVariable(cwd, 'VITE_ZERO_HOST', zeroHost, envFile)
|
|
734
|
+
updateEnvVariable(cwd, 'VITE_WEB_HOST', webHost, envFile)
|
|
731
735
|
|
|
732
736
|
// derive zero database URLs from the main database URL
|
|
733
737
|
const dbBase = dbUrl.split('/').slice(0, -1).join('/')
|
|
@@ -793,7 +797,9 @@ async function setupUncloudDeployment(cwd: string): Promise<void> {
|
|
|
793
797
|
)
|
|
794
798
|
console.info(pc.gray(' 1. Adding CNAME records in your DNS provider'))
|
|
795
799
|
console.info(pc.gray(` 2. Pointing to your cluster subdomain`))
|
|
796
|
-
console.info(
|
|
800
|
+
console.info(
|
|
801
|
+
pc.gray(' 3. Setting VITE_WEB_HOST and VITE_ZERO_HOST in .env.production')
|
|
802
|
+
)
|
|
797
803
|
console.info()
|
|
798
804
|
|
|
799
805
|
const configureCustomDomain = await confirmContinue(
|
|
@@ -843,18 +849,13 @@ async function setupUncloudDeployment(cwd: string): Promise<void> {
|
|
|
843
849
|
console.info(pc.yellow('⚠️ Set DNS to "DNS only" mode (gray cloud), not proxied'))
|
|
844
850
|
console.info()
|
|
845
851
|
|
|
846
|
-
|
|
847
|
-
updateEnvVariable(cwd, '
|
|
848
|
-
updateEnvVariable(cwd, '
|
|
852
|
+
const webUrl = `https://${webDomain}`
|
|
853
|
+
updateEnvVariable(cwd, 'VITE_WEB_HOST', webDomain, envFile)
|
|
854
|
+
updateEnvVariable(cwd, 'BETTER_AUTH_URL', webUrl, envFile)
|
|
855
|
+
updateEnvVariable(cwd, 'ONE_SERVER_URL', webUrl, envFile)
|
|
849
856
|
|
|
850
857
|
if (zeroDomain) {
|
|
851
|
-
updateEnvVariable(cwd, '
|
|
852
|
-
updateEnvVariable(
|
|
853
|
-
cwd,
|
|
854
|
-
'VITE_PUBLIC_ZERO_SERVER',
|
|
855
|
-
`https://${zeroDomain}`,
|
|
856
|
-
envFile
|
|
857
|
-
)
|
|
858
|
+
updateEnvVariable(cwd, 'VITE_ZERO_HOST', zeroDomain, envFile)
|
|
858
859
|
}
|
|
859
860
|
|
|
860
861
|
showSuccess('✓ Custom domains configured')
|
|
@@ -40,13 +40,14 @@ export const envCategories: EnvCategory[] = [
|
|
|
40
40
|
placeholder: 'https://your-app.com',
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
key: '
|
|
44
|
-
label: 'Zero Sync Server
|
|
45
|
-
description: '
|
|
46
|
-
instructions:
|
|
43
|
+
key: 'VITE_ZERO_HOST',
|
|
44
|
+
label: 'Zero Sync Server Host',
|
|
45
|
+
description: 'Hostname for real-time sync server',
|
|
46
|
+
instructions:
|
|
47
|
+
'Just the hostname, e.g., zero.your-app.com (https:// assumed in production)',
|
|
47
48
|
required: true,
|
|
48
49
|
type: 'text',
|
|
49
|
-
placeholder: '
|
|
50
|
+
placeholder: 'zero.your-app.com',
|
|
50
51
|
},
|
|
51
52
|
],
|
|
52
53
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA;;GAEG;AA4kBH,eAAO,MAAM,WAAW,qDAYtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-categories.d.ts","sourceRoot":"","sources":["../../src/utils/env-categories.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAExD,eAAO,MAAM,aAAa,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"env-categories.d.ts","sourceRoot":"","sources":["../../src/utils/env-categories.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAExD,eAAO,MAAM,aAAa,EAAE,WAAW,EA6NtC,CAAA;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAEnE;AAED,wBAAgB,qBAAqB,IAAI,WAAW,EAAE,CAErD;AAED,wBAAgB,qBAAqB,IAAI,WAAW,EAAE,CAErD;AAED,wBAAgB,eAAe,IAAI,WAAW,EAAE,CAE/C;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAErE"}
|