@alumbwe/anvil 1.0.38 → 1.0.40

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/bin/anvil DELETED
@@ -1,44 +0,0 @@
1
- #!/usr/bin/env bun
2
- // Anvil CLI entry point
3
- // Module resolution must find vendored @anvil/* packages
4
-
5
- import { dirname, join } from 'path'
6
- import { fileURLToPath } from 'url'
7
- import { chdir, env } from 'process'
8
- import { existsSync } from 'fs'
9
-
10
- const __dirname = dirname(fileURLToPath(import.meta.url))
11
- const packageRoot = join(__dirname, '..')
12
-
13
- // Store the original CWD for the CLI to use as project root
14
- const originalCwd = process.cwd()
15
- env.ANVIL_ORIGINAL_CWD = originalCwd
16
-
17
- // Set default NEXT_PUBLIC_* environment variables if not already set
18
- // These are required by the SDK and common code for environment validation
19
- if (!env.NEXT_PUBLIC_CB_ENVIRONMENT) env.NEXT_PUBLIC_CB_ENVIRONMENT = 'prod'
20
- if (!env.NEXT_PUBLIC_ANVIL_APP_URL) env.NEXT_PUBLIC_ANVIL_APP_URL = 'https://anvil.dev'
21
- if (!env.NEXT_PUBLIC_SUPPORT_EMAIL) env.NEXT_PUBLIC_SUPPORT_EMAIL = 'support@anvil.dev'
22
- if (!env.NEXT_PUBLIC_POSTHOG_API_KEY) env.NEXT_PUBLIC_POSTHOG_API_KEY = 'phc_placeholder'
23
- if (!env.NEXT_PUBLIC_POSTHOG_HOST_URL) env.NEXT_PUBLIC_POSTHOG_HOST_URL = 'https://us.i.posthog.com'
24
- if (!env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY) env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY = 'pk_placeholder'
25
- if (!env.NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL) env.NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL = 'https://billing.stripe.com/portal'
26
- if (!env.NEXT_PUBLIC_WEB_PORT) env.NEXT_PUBLIC_WEB_PORT = '3000'
27
-
28
- // Change to package directory
29
- chdir(packageRoot)
30
-
31
- // Verify vendored packages exist
32
- const vendorRoot = join(packageRoot, 'vendor')
33
- const commonVendor = join(vendorRoot, '@anvil', 'common')
34
- const sdkVendor = join(vendorRoot, '@anvil', 'sdk')
35
-
36
- if (!existsSync(commonVendor) || !existsSync(sdkVendor)) {
37
- console.error('Error: Vendored dependencies missing. Package may be corrupted.')
38
- console.error(`Expected: ${commonVendor}`)
39
- console.error(`Try reinstalling: npm uninstall -g @alumbwe/anvil && npm install -g @alumbwe/anvil`)
40
- process.exit(1)
41
- }
42
-
43
- // Import entry point
44
- await import('../src/entry.ts')