@alumbwe/anvil 1.0.31 → 1.0.35

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 CHANGED
@@ -1,2 +1,41 @@
1
1
  #!/usr/bin/env bun
2
- import '../src/entry.ts'
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
+ // Change to package directory
18
+ chdir(packageRoot)
19
+
20
+ // Verify vendored packages exist
21
+ const vendorRoot = join(packageRoot, 'vendor')
22
+ const commonVendor = join(vendorRoot, '@anvil', 'common')
23
+ const sdkVendor = join(vendorRoot, '@anvil', 'sdk')
24
+
25
+ if (!existsSync(commonVendor) || !existsSync(sdkVendor)) {
26
+ console.error('Error: Vendored dependencies missing. Package may be corrupted.')
27
+ console.error(`Expected: ${commonVendor}`)
28
+ console.error(`Try reinstalling: npm uninstall -g @alumbwe/anvil && npm install -g @alumbwe/anvil`)
29
+ process.exit(1)
30
+ }
31
+
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
+ // Import entry point
41
+ await import('../src/entry.ts')
package/bunfig.toml CHANGED
@@ -16,8 +16,3 @@ preload = [
16
16
  "../test/setup-scm-loader.ts",
17
17
  "./test/setup-agents-artifact.ts",
18
18
  ]
19
-
20
- # Path mappings for module resolution (used when published to npm)
21
- [module.paths]
22
- "@anvil/common/*" = ["./vendor/@anvil/common/src/*", "../common/src/*"]
23
- "@anvil/sdk" = ["./vendor/@anvil/sdk/dist/index.mjs", "../sdk/src/index.ts"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alumbwe/anvil",
3
- "version": "1.0.31",
3
+ "version": "1.0.35",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -5,11 +5,11 @@ import { AnalyticsEvent } from '@anvil/common/constants/analytics-events'
5
5
  import { KNOWLEDGE_FILE_NAMES } from '@anvil/common/constants/knowledge'
6
6
 
7
7
  // @ts-expect-error - Bun text import attribute not supported by TypeScript
8
- import agentDefinitionSource from '../../../common/src/templates/initial-agents-dir/types/agent-definition' with { type: 'text' }
8
+ import agentDefinitionSource from '@anvil/common/templates/initial-agents-dir/types/agent-definition' with { type: 'text' }
9
9
  // @ts-expect-error - Bun text import attribute not supported by TypeScript
10
- import toolsSource from '../../../common/src/templates/initial-agents-dir/types/tools' with { type: 'text' }
10
+ import toolsSource from '@anvil/common/templates/initial-agents-dir/types/tools' with { type: 'text' }
11
11
  // @ts-expect-error - Bun text import attribute not supported by TypeScript
12
- import utilTypesSource from '../../../common/src/templates/initial-agents-dir/types/util-types' with { type: 'text' }
12
+ import utilTypesSource from '@anvil/common/templates/initial-agents-dir/types/util-types' with { type: 'text' }
13
13
  import { getProjectRoot } from '../project-files'
14
14
  import { trackEvent } from '../utils/analytics'
15
15
  import { IS_ANVIL } from '../utils/constants'
package/tsconfig.json CHANGED
@@ -14,8 +14,9 @@
14
14
  "preserveSymlinks": false,
15
15
  "baseUrl": ".",
16
16
  "paths": {
17
- "@anvil/sdk": ["../sdk/src/index.ts"],
18
- "@anvil/common/*": ["../common/src/*"]
17
+ "@anvil/sdk": ["./vendor/@anvil/sdk/dist/index.mjs", "../sdk/src/index.ts"],
18
+ "@anvil/common": ["./vendor/@anvil/common/src/index.ts", "../common/src/index.ts"],
19
+ "@anvil/common/*": ["./vendor/@anvil/common/src/*", "../common/src/*"]
19
20
  }
20
21
  },
21
22
  "include": ["src/**/*", "scripts/**/*.ts"],
@@ -14166,16 +14166,16 @@ var clientEnvSchema = import_v4.default.object({
14166
14166
  });
14167
14167
  var clientEnvVars = clientEnvSchema.keyof().options;
14168
14168
  var clientProcessEnv = {
14169
- NEXT_PUBLIC_CB_ENVIRONMENT: process.env.NEXT_PUBLIC_CB_ENVIRONMENT,
14170
- NEXT_PUBLIC_ANVIL_APP_URL: process.env.NEXT_PUBLIC_ANVIL_APP_URL,
14171
- NEXT_PUBLIC_SUPPORT_EMAIL: process.env.NEXT_PUBLIC_SUPPORT_EMAIL,
14172
- NEXT_PUBLIC_POSTHOG_API_KEY: process.env.NEXT_PUBLIC_POSTHOG_API_KEY,
14173
- NEXT_PUBLIC_POSTHOG_HOST_URL: process.env.NEXT_PUBLIC_POSTHOG_HOST_URL,
14169
+ NEXT_PUBLIC_CB_ENVIRONMENT: "prod",
14170
+ NEXT_PUBLIC_ANVIL_APP_URL: "https://anvil.dev",
14171
+ NEXT_PUBLIC_SUPPORT_EMAIL: "support@anvil.dev",
14172
+ NEXT_PUBLIC_POSTHOG_API_KEY: "dummy",
14173
+ NEXT_PUBLIC_POSTHOG_HOST_URL: "https://us.i.posthog.com",
14174
14174
  NEXT_PUBLIC_GRAVITY_PIXEL_ID: process.env.NEXT_PUBLIC_GRAVITY_PIXEL_ID,
14175
- NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY,
14176
- NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL: process.env.NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL,
14175
+ NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: "pk_dummy",
14176
+ NEXT_PUBLIC_STRIPE_CUSTOMER_PORTAL: "https://billing.stripe.com",
14177
14177
  NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION_ID: process.env.NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION_ID,
14178
- NEXT_PUBLIC_WEB_PORT: process.env.NEXT_PUBLIC_WEB_PORT,
14178
+ NEXT_PUBLIC_WEB_PORT: "3000",
14179
14179
  NEXT_PUBLIC_TURNSTILE_SITE_KEY: process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY,
14180
14180
  NEXT_PUBLIC_RECAPTCHA_V2_SITE_KEY: process.env.NEXT_PUBLIC_RECAPTCHA_V2_SITE_KEY,
14181
14181
  NEXT_PUBLIC_RECAPTCHA_V3_SITE_KEY: process.env.NEXT_PUBLIC_RECAPTCHA_V3_SITE_KEY,
@@ -52293,5 +52293,5 @@ function setTreeSitterWasmPath2(wasmPath) {
52293
52293
  setTreeSitterWasmPath(wasmPath);
52294
52294
  }
52295
52295
 
52296
- //# debugId=924ED18AC0767B4E64756E2164756E21
52296
+ //# debugId=1ADD0C76226F82EC64756E2164756E21
52297
52297
  //# sourceMappingURL=index.cjs.map