create-semaphor-app 0.1.4 → 0.1.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/README.md CHANGED
@@ -7,8 +7,9 @@ npx create-semaphor-app@latest
7
7
  ```
8
8
 
9
9
  The CLI scaffolds the public Semaphor Data App Starter, installs local
10
- dependencies by default, and can optionally install the Semaphor Agent Plugin
11
- for detected Codex and Claude Code installations.
10
+ dependencies by default, installs the production Semaphor shadcn registry
11
+ components, and can optionally install the Semaphor Agent Plugin for detected
12
+ Codex and Claude Code installations.
12
13
 
13
14
  It does not authenticate to Semaphor, write tokens, or choose a project/domain.
14
15
  The Semaphor Agent Plugin handles OAuth, project selection, runtime token
@@ -25,7 +26,7 @@ When `app-name` is omitted, the CLI creates `./semaphor-data-app`.
25
26
  Options:
26
27
 
27
28
  ```text
28
- --no-install Skip dependency installation.
29
+ --no-install Skip dependency installation. Requires --components none.
29
30
  --package-manager <name> Use npm, pnpm, yarn, or bun. Defaults to detected npm.
30
31
  --skip-plugin Skip Codex/Claude plugin install prompts.
31
32
  --install-codex-plugin Install the Codex plugin without prompting.
@@ -34,7 +35,7 @@ Options:
34
35
  --template-ref <ref> Git branch/tag for the default starter repo. Defaults to main.
35
36
  --shadcn-preset <preset> Apply a shadcn preset before adding Semaphor components.
36
37
  --shadcn-base <base> Pass base or radix to shadcn init when using a preset.
37
- --components <list> Add Semaphor registry components. Use none, query, metrics,
38
+ --components <list> Add Semaphor registry components. Defaults to all. Use none, query, metrics,
38
39
  filters, card, table, matrix, recommended, all, or a comma-separated list.
39
40
  --yes Use noninteractive defaults; skip optional plugin installs unless explicit.
40
41
  --help Show help.
@@ -49,10 +50,14 @@ style, pass a shadcn preset during creation:
49
50
  npx create-semaphor-app@latest my-app --shadcn-preset <preset-id>
50
51
  ```
51
52
 
52
- Semaphor UI helpers can be added from the public shadcn registry at scaffold
53
- time:
53
+ Semaphor UI helpers are added from the public shadcn registry at scaffold time.
54
+ By default, `create-semaphor-app` installs all production app-building
55
+ components. Use `--components none` when you want the starter without Semaphor
56
+ registry components:
54
57
 
55
58
  ```bash
59
+ npx create-semaphor-app@latest my-app
60
+ npx create-semaphor-app@latest my-app --components none
56
61
  npx create-semaphor-app@latest my-app --components table
57
62
  npx create-semaphor-app@latest my-app --components query-state,view-card,metric-kpis,filter-controls,server-data-table,matrix-table
58
63
  ```
@@ -61,7 +66,7 @@ Component presets:
61
66
 
62
67
  | Value | Installs |
63
68
  | --- | --- |
64
- | `none` | No Semaphor registry components. This is the default. |
69
+ | `none` | No Semaphor registry components. |
65
70
  | `query` | `query-state` |
66
71
  | `metrics` | `query-state-boundary`, `metric-kpis` |
67
72
  | `filters` | `filter-controls` |
@@ -69,14 +74,14 @@ Component presets:
69
74
  | `table` | `query-state`, `server-data-table` |
70
75
  | `matrix` | `query-state`, `matrix-table` |
71
76
  | `recommended` | `query-state`, `query-state-boundary`, `view-card`, `metric-kpis`, `filter-controls`, `server-data-table` |
72
- | `all` | `query-state`, `query-state-boundary`, `view-card`, `metric-kpis`, `filter-controls`, `server-data-table`, `matrix-table` |
77
+ | `all` | `query-state`, `query-state-boundary`, `view-card`, `metric-kpis`, `filter-controls`, `server-data-table`, `matrix-table`. This is the default. |
73
78
 
74
79
  Registry components install as source into the generated app. They are optional
75
80
  UI accelerators and do not replace `react-semaphor/data-app-sdk`.
76
81
 
77
- `--shadcn-preset` and `--components` run the shadcn CLI, so they cannot be
78
- combined with `--no-install`. To skip installs, scaffold the app first and run
79
- the shadcn commands manually later.
82
+ `--shadcn-preset` and installed registry components run the shadcn CLI. To skip
83
+ installs, pass `--no-install --components none`, then run the shadcn commands
84
+ manually later if needed.
80
85
 
81
86
  ## Local Validation
82
87
 
@@ -65,7 +65,7 @@ Usage:
65
65
  npx create-semaphor-app@latest [app-name] [options]
66
66
 
67
67
  Options:
68
- --no-install Skip dependency installation.
68
+ --no-install Skip dependency installation. Requires --components none.
69
69
  --package-manager <name> Use npm, pnpm, yarn, or bun.
70
70
  --skip-plugin Skip Codex/Claude plugin install prompts.
71
71
  --install-codex-plugin Install the Codex plugin without prompting.
@@ -74,7 +74,7 @@ Options:
74
74
  --template-ref <ref> Git branch/tag for the default starter repo.
75
75
  --shadcn-preset <preset> Apply a shadcn preset before adding Semaphor components.
76
76
  --shadcn-base <base> Pass base or radix to shadcn init when using a preset.
77
- --components <list> Add Semaphor registry components. Use none, query, metrics,
77
+ --components <list> Add Semaphor registry components. Defaults to all. Use none, query, metrics,
78
78
  filters, card, table, matrix, recommended, all, or a comma-separated list.
79
79
  --yes, -y Use noninteractive defaults; skip optional plugin installs unless explicit.
80
80
  --help, -h Show this help.
@@ -93,7 +93,7 @@ function parseArgs(argv) {
93
93
  templateRef: DEFAULT_TEMPLATE_REF,
94
94
  shadcnPreset: null,
95
95
  shadcnBase: null,
96
- components: 'none',
96
+ components: 'all',
97
97
  yes: false,
98
98
  help: false,
99
99
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-semaphor-app",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Create a Semaphor Data App starter project.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -98,6 +98,8 @@ async function main() {
98
98
  '--template',
99
99
  defaultLocalStarterPath,
100
100
  '--no-install',
101
+ '--components',
102
+ 'none',
101
103
  '--skip-plugin',
102
104
  '--yes',
103
105
  ], { cwd: root });
@@ -113,6 +115,8 @@ async function main() {
113
115
  '--template',
114
116
  defaultLocalStarterPath,
115
117
  '--no-install',
118
+ '--components',
119
+ 'none',
116
120
  '--skip-plugin',
117
121
  '--yes',
118
122
  ], { cwd: root });
@@ -126,6 +130,8 @@ async function main() {
126
130
  const result = runCli([
127
131
  'github-template-app',
128
132
  '--no-install',
133
+ '--components',
134
+ 'none',
129
135
  '--skip-plugin',
130
136
  '--yes',
131
137
  ], { cwd: root });
@@ -146,6 +152,8 @@ async function main() {
146
152
  '--template',
147
153
  defaultLocalStarterPath,
148
154
  '--no-install',
155
+ '--components',
156
+ 'none',
149
157
  '--install-codex-plugin',
150
158
  ], {
151
159
  cwd: root,
@@ -168,6 +176,52 @@ async function main() {
168
176
  console.log('✓ fake Codex plugin install path');
169
177
  }
170
178
 
179
+ {
180
+ const root = createTempRoot('default-components-');
181
+ const binDir = path.join(root, 'bin');
182
+ fs.mkdirSync(binDir, { recursive: true });
183
+ const shadcnLog = path.join(root, 'shadcn.log');
184
+ const npmLog = path.join(root, 'npm.log');
185
+ createFakeCommand(binDir, 'npx', shadcnLog);
186
+ createFakeCommand(binDir, 'npm', npmLog);
187
+
188
+ const result = runCli([
189
+ 'default-components-app',
190
+ '--template',
191
+ defaultLocalStarterPath,
192
+ '--skip-plugin',
193
+ '--yes',
194
+ '--package-manager',
195
+ 'npm',
196
+ ], {
197
+ cwd: root,
198
+ env: {
199
+ ...process.env,
200
+ PATH: `${binDir}${path.delimiter}${process.env.PATH || ''}`,
201
+ },
202
+ });
203
+ assertSuccess(result, 'default component install');
204
+ assertScaffold(root, 'default-components-app');
205
+ const npmInstallLog = fs.readFileSync(npmLog, 'utf8');
206
+ assert(npmInstallLog.includes('npm install'), 'expected npm install command');
207
+ const log = fs.readFileSync(shadcnLog, 'utf8');
208
+ for (const component of [
209
+ 'query-state',
210
+ 'query-state-boundary',
211
+ 'view-card',
212
+ 'metric-kpis',
213
+ 'filter-controls',
214
+ 'server-data-table',
215
+ 'matrix-table',
216
+ ]) {
217
+ assert(
218
+ log.includes(`npx shadcn@latest add semaphor-analytics/semaphor-data-app-components/${component}`),
219
+ `expected default ${component} registry add command`,
220
+ );
221
+ }
222
+ console.log('✓ default Semaphor registry component install');
223
+ }
224
+
171
225
  {
172
226
  const root = createTempRoot('shadcn-');
173
227
  const binDir = path.join(root, 'bin');