Skip to content

Commit 9971597

Browse files
committed
fix: devhook creation and local to prod env migration (#81)
* fix: devhook creation and local to prod env migration * chore: version 1.1.16
1 parent 6c91c26 commit 9971597

File tree

5 files changed

+5
-10
lines changed

5 files changed

+5
-10
lines changed

packages/blink/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blink",
3-
"version": "1.1.15",
3+
"version": "1.1.16",
44
"description": "Blink is a JavaScript runtime for building and deploying AI agents.",
55
"type": "module",
66
"bin": {

packages/blink/src/cli/deploy.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,7 @@ export default async function deploy(
249249
const localEnvFile = join(directory, ".env.local");
250250
const prodEnvFile = join(directory, ".env.production");
251251
const localEnv = await readEnvFile(localEnvFile);
252-
const missingEnvVars = Object.keys(localEnv).filter(
253-
(key) => !Object.keys(prodEnv).includes(key)
254-
);
252+
const missingEnvVars = Object.keys(localEnv).filter((key) => !prodEnv[key]);
255253

256254
if (missingEnvVars.length > 0) {
257255
console.log("\n" + chalk.cyan("Environment Variables"));
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Store production environment variables here.
32
# They will be upserted as secrets on blink deploy.
43
# EXTERNAL_SERVICE_API_KEY=
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
21
# Store production environment variables here.
32
# They will be upserted as secrets on blink deploy.
4-
SLACK_BOT_TOKEN=
5-
SLACK_SIGNING_SECRET=
3+
# EXTERNAL_SERVICE_API_KEY=

packages/blink/src/react/use-dev-mode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { isToolApprovalOutput } from "../agent/tools";
44
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
55
import { join } from "path";
66
import type { Client, CapabilitiesResponse } from "../agent/client";
7-
import { getDevhookID, createDevhookID } from "../cli/lib/devhook";
7+
import { getDevhookID, createDevhookID, hasDevhook } from "../cli/lib/devhook";
88
import { createLocalServer, type LocalServer } from "../local/server";
99
import { isStoredMessageMetadata } from "../local/types";
1010
import type { BuildLog } from "../build";
@@ -358,7 +358,7 @@ export default function useDevMode(options: UseDevModeOptions): UseDevMode {
358358

359359
// Devhook
360360
const [devhookID, setDevhookID] = useState<string | undefined>(() =>
361-
getDevhookID(directory)
361+
hasDevhook(directory) ? getDevhookID(directory) : createDevhookID(directory)
362362
);
363363

364364
const devhook = useDevhook({

0 commit comments

Comments
 (0)