create-curb.js 1.16.0-preview.3 → 1.16.0-preview.5

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/RELEASE_NOTES.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  ### Fixed
8
8
 
9
+ - Explain a target folder that cannot be created (#40)
10
+ - Say what hosted deploys accept today (#46)
9
11
  - Correct what the help and guide say about conversations and build (#41)
10
12
  - Start curb outside a project from the npm package (#38)
11
13
 
@@ -12,6 +12,7 @@ import {
12
12
  readFileSync,
13
13
  readdirSync,
14
14
  renameSync,
15
+ statSync,
15
16
  writeFileSync,
16
17
  } from "node:fs";
17
18
  import { basename, dirname, join, resolve } from "node:path";
@@ -118,6 +119,9 @@ if (!/^[a-z0-9][a-z0-9._-]*$/.test(appName)) {
118
119
  `"${appName}" is not a valid project name — use lowercase letters, digits, ".", "_", "-" (npm package name rules).`,
119
120
  );
120
121
  }
122
+ if (existsSync(targetDir) && !statSync(targetDir).isDirectory()) {
123
+ fail(`${targetDir} is a file. Choose a new directory.`);
124
+ }
121
125
  if (existsSync(targetDir) && readdirSync(targetDir).length > 0) {
122
126
  fail(`${targetDir} already exists and is not empty. Choose a new directory.`);
123
127
  }
@@ -301,8 +305,12 @@ const envValues = finalizeEnv();
301
305
 
302
306
  // -------------------------------------------------------------- copy template
303
307
  const templateDir = resolve(dirname(fileURLToPath(import.meta.url)), "../templates/default");
304
- mkdirSync(targetDir, { recursive: true });
305
- cpSync(templateDir, targetDir, { recursive: true });
308
+ try {
309
+ mkdirSync(targetDir, { recursive: true });
310
+ cpSync(templateDir, targetDir, { recursive: true });
311
+ } catch (error) {
312
+ fail(`Cannot create the project in ${targetDir} (${error.code ?? error.message}). Choose a directory you can write to.`);
313
+ }
306
314
 
307
315
  // npm strips .gitignore from published tarballs, so the template ships it without the
308
316
  // leading dot. The project carries no .npmrc: hosted builds refuse one.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-curb.js",
3
- "version": "1.16.0-preview.3",
3
+ "version": "1.16.0-preview.5",
4
4
  "description": "Create a Curb voice agent: npm create curb.js my-agent",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://curbjs.com",
@@ -134,6 +134,12 @@ context/*.md knowledge a skill reads with <Text src="file.md" />
134
134
 
135
135
  ## Deploy to KugelAudio
136
136
 
137
+ **Hosted deploys do not accept a project that installs Curb from npm yet, and this project
138
+ does.** Tell the user so before you try to deploy, and do not change the `curb` dependency to
139
+ get around it. Today the project runs locally with `npm run dev` and goes live on the user's own
140
+ servers (`node_modules/curb/docs/agent-guide/hosting.md`). The rest of this section applies once
141
+ hosted deploys accept the project.
142
+
137
143
  `.mcp.json` registers two MCP servers for Claude Code started in this folder (it asks once
138
144
  to use them): `kugelaudio`, your KugelAudio account (sign in from `/mcp`), and
139
145
  `kugelaudio-docs`, the docs (no sign-in). Another client adds
@@ -41,6 +41,10 @@ Type or talk in the preview:
41
41
 
42
42
  ## Deploy to KugelAudio
43
43
 
44
+ Hosted deploys do not accept a project that installs Curb from npm yet, and this project does.
45
+ Today it runs locally with `npm run dev` and goes live on your own servers: see
46
+ `node_modules/curb/docs/agent-guide/hosting.md`. Once hosted deploys accept it:
47
+
44
48
  ```bash
45
49
  npx curb login
46
50
  npx curb secrets push
@@ -49,8 +53,7 @@ npx curb deploy
49
53
 
50
54
  `deploy` prints the playground URL where you can call the live agent. Your `.env` is
51
55
  never uploaded; `secrets push` sends its values and prints only their names. Details:
52
- `node_modules/curb/docs/agent-guide/deploying.md`. To run the voice worker on your own LiveKit instead,
53
- see `node_modules/curb/docs/agent-guide/hosting.md`.
56
+ `node_modules/curb/docs/agent-guide/deploying.md`.
54
57
 
55
58
  ## Learn more
56
59