@chat-js/cli 0.1.3 → 0.1.4

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/dist/index.js CHANGED
@@ -3914,7 +3914,7 @@ var {
3914
3914
  // package.json
3915
3915
  var package_default = {
3916
3916
  name: "@chat-js/cli",
3917
- version: "0.1.3",
3917
+ version: "0.1.4",
3918
3918
  description: "CLI for creating and extending ChatJS apps",
3919
3919
  license: "Apache-2.0",
3920
3920
  repository: {
@@ -19435,13 +19435,18 @@ import { fileURLToPath } from "node:url";
19435
19435
  import { spawn } from "node:child_process";
19436
19436
  async function runCommand(command, args, cwd) {
19437
19437
  await new Promise((resolvePromise, rejectPromise) => {
19438
- const child = spawn(command, args, { cwd, stdio: "inherit" });
19438
+ const child = spawn(command, args, { cwd, stdio: "pipe" });
19439
+ const stderr = [];
19440
+ child.stderr?.on("data", (data) => {
19441
+ stderr.push(String(data));
19442
+ });
19439
19443
  child.on("error", rejectPromise);
19440
19444
  child.on("close", (code) => {
19441
19445
  if (code === 0)
19442
19446
  resolvePromise();
19443
19447
  else
19444
- rejectPromise(new Error(`${command} exited with code ${code}`));
19448
+ rejectPromise(new Error(`${command} exited with code ${code}
19449
+ ${stderr.join("")}`.trim()));
19445
19450
  });
19446
19451
  });
19447
19452
  }
@@ -20891,6 +20896,8 @@ var create = new Command().name("create").description("scaffold a new ChatJS cha
20891
20896
  }
20892
20897
  logger.break();
20893
20898
  printEnvChecklist(envEntries);
20899
+ logger.break();
20900
+ logger.log(` For detailed setup instructions, visit ${highlighter.info("https://www.chatjs.dev/docs/quickstart")}`);
20894
20901
  } catch (error48) {
20895
20902
  handleError(error48);
20896
20903
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chat-js/cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "CLI for creating and extending ChatJS apps",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -62,7 +62,6 @@ export function ChatSync({
62
62
  resume: isLastMessagePartial,
63
63
  transport: new DefaultChatTransport({
64
64
  api: "/api/chat",
65
- // @ts-expect-error CI has a stricter global fetch type (includes preconnect).
66
65
  fetch: fetchWithErrorHandlers,
67
66
  prepareSendMessagesRequest({ messages, id: requestId, body }) {
68
67
  setAutoResume(true);
@@ -0,0 +1,6 @@
1
+ /// <reference types="next" />
2
+ /// <reference types="next/image-types/global" />
3
+ import "./.next/types/routes.d.ts";
4
+
5
+ // NOTE: This file should not be edited
6
+ // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.