@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.
@@ -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) {
@@ -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
- updateEnvVariable(cwd, 'VITE_PUBLIC_ZERO_SERVER', zeroUrl, envFile)
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(pc.gray(' 3. Setting WEB_DOMAIN and ZERO_DOMAIN in .env.production'))
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
- updateEnvVariable(cwd, 'WEB_DOMAIN', webDomain, envFile)
847
- updateEnvVariable(cwd, 'BETTER_AUTH_URL', `https://${webDomain}`, envFile)
848
- updateEnvVariable(cwd, 'ONE_SERVER_URL', `https://${webDomain}`, envFile)
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, 'ZERO_DOMAIN', zeroDomain, envFile)
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: 'VITE_PUBLIC_ZERO_SERVER',
44
- label: 'Zero Sync Server URL',
45
- description: 'WebSocket server for real-time sync',
46
- instructions: 'Typically a subdomain like https://zero.your-app.com',
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: 'https://zero.your-app.com',
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;AA4jBH,eAAO,MAAM,WAAW,qDAYtB,CAAA"}
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,EA4NtC,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"}
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"}