create-semaphor-app 0.1.2 → 0.1.3

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Create a Semaphor Data App starter project.
4
4
 
5
5
  ```bash
6
- npx create-semaphor-app@latest customer-health
6
+ npx create-semaphor-app@latest
7
7
  ```
8
8
 
9
9
  The CLI scaffolds the public Semaphor Data App Starter, installs local
@@ -17,9 +17,11 @@ minting, planning, code generation, validation, save, and publish.
17
17
  ## Usage
18
18
 
19
19
  ```bash
20
- npx create-semaphor-app@latest <app-name>
20
+ npx create-semaphor-app@latest [app-name]
21
21
  ```
22
22
 
23
+ When `app-name` is omitted, the CLI creates `./semaphor-data-app`.
24
+
23
25
  Options:
24
26
 
25
27
  ```text
@@ -48,7 +50,7 @@ projects before exiting.
48
50
  After creation:
49
51
 
50
52
  ```bash
51
- cd customer-health
53
+ cd semaphor-data-app
52
54
  npm run dev
53
55
  ```
54
56
 
@@ -10,6 +10,7 @@ import { fileURLToPath } from 'node:url';
10
10
  const DEFAULT_TEMPLATE_REPO =
11
11
  'https://github.com/semaphor-analytics/semaphor-data-app-starter.git';
12
12
  const DEFAULT_TEMPLATE_REF = 'main';
13
+ const DEFAULT_APP_NAME = 'semaphor-data-app';
13
14
  const MARKETPLACE = 'semaphor-analytics/agent-plugin';
14
15
  const PLUGIN_ID = 'semaphor@semaphor-analytics';
15
16
  const canPrompt = Boolean(process.stdin.isTTY && process.stdout.isTTY);
@@ -20,7 +21,7 @@ function usage() {
20
21
  return `Create a Semaphor Data App starter project.
21
22
 
22
23
  Usage:
23
- npx create-semaphor-app@latest <app-name> [options]
24
+ npx create-semaphor-app@latest [app-name] [options]
24
25
 
25
26
  Options:
26
27
  --no-install Skip dependency installation.
@@ -243,10 +244,7 @@ function promptQuestion(rl, question, defaultYes) {
243
244
 
244
245
  async function resolveTarget(args, rl) {
245
246
  if (!args.appName) {
246
- if (!canPrompt) {
247
- throw new Error('App name is required.');
248
- }
249
- args.appName = await rl.question('App name: ');
247
+ args.appName = DEFAULT_APP_NAME;
250
248
  }
251
249
 
252
250
  const trimmed = String(args.appName || '').trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-semaphor-app",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Create a Semaphor Data App starter project.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -107,6 +107,20 @@ async function main() {
107
107
  console.log('✓ local starter scaffold');
108
108
  }
109
109
 
110
+ {
111
+ const root = createTempRoot('default-name-');
112
+ const result = runCli([
113
+ '--template',
114
+ defaultLocalStarterPath,
115
+ '--no-install',
116
+ '--skip-plugin',
117
+ '--yes',
118
+ ], { cwd: root });
119
+ assertSuccess(result, 'default app name scaffold');
120
+ assertScaffold(root, 'semaphor-data-app');
121
+ console.log('✓ default app name scaffold');
122
+ }
123
+
110
124
  {
111
125
  const root = createTempRoot('github-');
112
126
  const result = runCli([
@@ -163,4 +177,3 @@ async function main() {
163
177
  }
164
178
 
165
179
  await main();
166
-