@alumbwe/anvil 1.0.54 → 1.0.55

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.
Files changed (2) hide show
  1. package/package.json +2 -1
  2. package/src/index.tsx +19 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alumbwe/anvil",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -44,6 +44,7 @@
44
44
  "scripts": {
45
45
  "dev": "bun --env-file=../.env.local run src/entry.ts --cwd ..",
46
46
  "build:binary": "bun ./scripts/build-binary.ts anvil $npm_package_version",
47
+ "publish": "bun run ./scripts/publish.ts",
47
48
  "typecheck": "tsc --noEmit -p .",
48
49
  "prepublishOnly": "bun run ./scripts/vendor-deps.ts"
49
50
  },
package/src/index.tsx CHANGED
@@ -220,23 +220,23 @@ async function main(): Promise<void> {
220
220
 
221
221
  const isLoginCommand = command === 'login'
222
222
  const isPublishCommand = command === 'publish'
223
- const hasAgentOverride = Boolean(agent?.trim())
224
-
225
- // Login is intentionally independent of project initialization. It must
226
- // work from any directory and must not create project state before auth.
227
- if (isLoginCommand) {
228
- await runPlainLogin()
229
- return
230
- }
231
-
232
- await initializeApp({ cwd })
223
+ const hasAgentOverride = Boolean(agent?.trim())
224
+
225
+ // Login is intentionally independent of project initialization. It must
226
+ // work from any directory and must not create project state before auth.
227
+ if (isLoginCommand) {
228
+ await runPlainLogin()
229
+ return
230
+ }
231
+
232
+ await initializeApp({ cwd })
233
233
 
234
234
  // Load .env.local into process.env so API keys are available at runtime.
235
235
  // This replaces the old --env=inline build flag — keys are no longer baked
236
236
  // into the binary.
237
- if (!isManagedGatewayMode()) {
238
- loadEnvLocal()
239
- }
237
+ if (!isManagedGatewayMode()) {
238
+ loadEnvLocal()
239
+ }
240
240
 
241
241
  // Set the auth token for the API client
242
242
  setApiClientAuthToken(getAuthToken())
@@ -255,13 +255,13 @@ async function main(): Promise<void> {
255
255
 
256
256
  // First-run: required local API keys. In managed gateway mode the DeepSeek
257
257
  // (model) key lives on the SERVER — the gateway injects it — so the CLI must
258
- // Managed mode does not require local provider keys. In direct development
259
- // mode both provider keys are required locally.
258
+ // Managed mode does not require local provider keys. In direct development
259
+ // mode both provider keys are required locally.
260
260
  const gatewayMode = isManagedGatewayMode()
261
- // Managed mode keeps both model keys in Supabase; an installed CLI only
262
- // needs its stored Supabase access token. Local provider keys are required
263
- // only for direct development mode.
264
- if (!gatewayMode && (!process.env.DEEPSEEK_API_KEY || !process.env.GEMINI_API_KEY)) {
261
+ // Managed mode keeps both model keys in Supabase; an installed CLI only
262
+ // needs its stored Supabase access token. Local provider keys are required
263
+ // only for direct development mode.
264
+ if (!gatewayMode && (!process.env.DEEPSEEK_API_KEY || !process.env.GEMINI_API_KEY)) {
265
265
  const result = await runKeySetup(process.cwd())
266
266
  if (!result.allRequired) {
267
267
  console.error(