@alumbwe/anvil 1.0.36 → 1.0.38
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 +11 -8
- package/package.json +1 -1
package/bin/anvil
CHANGED
|
@@ -14,6 +14,17 @@ const packageRoot = join(__dirname, '..')
|
|
|
14
14
|
const originalCwd = process.cwd()
|
|
15
15
|
env.ANVIL_ORIGINAL_CWD = originalCwd
|
|
16
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
|
+
|
|
17
28
|
// Change to package directory
|
|
18
29
|
chdir(packageRoot)
|
|
19
30
|
|
|
@@ -29,13 +40,5 @@ if (!existsSync(commonVendor) || !existsSync(sdkVendor)) {
|
|
|
29
40
|
process.exit(1)
|
|
30
41
|
}
|
|
31
42
|
|
|
32
|
-
// Set up Bun's module resolution to find vendored packages
|
|
33
|
-
// This ensures imports like '@anvil/common/*' resolve to vendor/@anvil/common/src/*
|
|
34
|
-
env.BUN_CONFIG_PATHS = JSON.stringify({
|
|
35
|
-
'@anvil/common': [join(commonVendor, 'src', 'index.ts')],
|
|
36
|
-
'@anvil/common/*': [join(commonVendor, 'src', '*')],
|
|
37
|
-
'@anvil/sdk': [join(sdkVendor, 'dist', 'index.mjs')],
|
|
38
|
-
})
|
|
39
|
-
|
|
40
43
|
// Import entry point
|
|
41
44
|
await import('../src/entry.ts')
|