@object-ui/cli 17.3.0 → 17.5.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,266 @@
1
1
  # @object-ui/cli
2
2
 
3
+ ## 17.5.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 64cda47: Fix `objectui init`'s scaffold failing its own `npm run build`, and put the third generator under the real `tsc` gate
8
+
9
+ The scaffold `objectui init` writes declares `"build": "tsc && vite build"`, so `tsc` runs on the way to a production build — and its `src/main.tsx` did `import './index.css'` with no ambient declaration behind it. Any user who followed the generated README (`objectui init`, then `npm run build`) got `TS2882: Cannot find module or type declarations for side-effect import of './index.css'` in a file the tool had just written for them, before Vite was ever reached.
10
+
11
+ Fixed the same way objectui#3853 fixed the two temp-app generators: the scaffold now writes `src/vite-env.d.ts` (`/// <reference types="vite/client" />`), where the `declare module '*.css'` declarations live. `vite` was already in the scaffold's `devDependencies`, so nothing new is declared.
12
+
13
+ Measured rather than assumed: this scaffold had that one error and none of the other four classes objectui#3853 found in the temp apps — those live in a `src/Layout.tsx` this scaffold does not have. The `tsc` gate in `app-generator.test.ts` now covers the init scaffold too, so the strictness its own `tsconfig.json` declares is enforced instead of decorative.
14
+
15
+ - 9b9fa49: Make the generated temp app pass the strict `tsconfig.json` the generator writes beside it, and gate it with a real `tsc`
16
+
17
+ Both app generators (`createTempApp`, `createTempAppWithRouting`) emit a `tsconfig.json` carrying `strict`, `noUnusedLocals` and `noUnusedParameters`, but nothing had ever run it — `dev`/`serve`/`build` go through Vite, which transpiles without type-checking — so the generated sources had drifted 17 errors past their own declared config. A user who copies the temp app out as a scaffold, or runs `tsc` in it, met all 17 at once.
18
+
19
+ Fixed at the templates: dropped five imports that were declared and never used (`Link` in `src/App.tsx`; `cn`, `Button`, `SidebarGroupContent`, `SidebarGroupLabel` in `src/Layout.tsx`), typed `DynamicIcon`'s and `AppLayout`'s props (which also types the `menu`/`children` map callbacks by inference, and makes `className` optional so the two call sites that omit it are legal), and added the `src/vite-env.d.ts` every Vite TS scaffold carries — without it the entry's `import './index.css'` has no declaration behind it, in both generators.
20
+
21
+ The Lucide lookup no longer needs `@ts-expect-error`: the namespace is narrowed to the component-by-name shape the layout actually uses. No `any` was added.
22
+
23
+ A real `tsc -p` over a generated app now runs in the package's tests, so the declared strictness is enforced rather than decorative.
24
+
25
+ - Updated dependencies [ceccdcf]
26
+ - Updated dependencies [d6e5124]
27
+ - Updated dependencies [debad27]
28
+ - Updated dependencies [dc2aa3e]
29
+ - Updated dependencies [ee26e65]
30
+ - Updated dependencies [f650253]
31
+ - Updated dependencies [3d9769a]
32
+ - Updated dependencies [8f85f8b]
33
+ - Updated dependencies [d0c3b26]
34
+ - Updated dependencies [4dadf0d]
35
+ - Updated dependencies [ae10a01]
36
+ - Updated dependencies [92876f0]
37
+ - Updated dependencies [4b70d28]
38
+ - Updated dependencies [d9d3463]
39
+ - Updated dependencies [2a40f69]
40
+ - Updated dependencies [bec3e14]
41
+ - Updated dependencies [b4d3c22]
42
+ - Updated dependencies [1f9b905]
43
+ - Updated dependencies [cb13400]
44
+ - Updated dependencies [bc64bfe]
45
+ - Updated dependencies [abb0f81]
46
+ - Updated dependencies [38ab505]
47
+ - Updated dependencies [3e19fe7]
48
+ - Updated dependencies [b953a97]
49
+ - Updated dependencies [d7f3e30]
50
+ - Updated dependencies [7e4f0e5]
51
+ - Updated dependencies [a84385b]
52
+ - Updated dependencies [45e1949]
53
+ - Updated dependencies [c1d939f]
54
+ - Updated dependencies [a3ae404]
55
+ - Updated dependencies [bfdf3d4]
56
+ - Updated dependencies [bb68488]
57
+ - Updated dependencies [b1e42d0]
58
+ - Updated dependencies [3f5f87c]
59
+ - Updated dependencies [f5e1143]
60
+ - Updated dependencies [f148a64]
61
+ - Updated dependencies [bb68488]
62
+ - Updated dependencies [47f551b]
63
+ - Updated dependencies [ab04728]
64
+ - Updated dependencies [5bf09fd]
65
+ - @object-ui/react@17.5.0
66
+ - @object-ui/components@17.5.0
67
+ - @object-ui/types@17.5.0
68
+
69
+ ## 17.4.0
70
+
71
+ ### Patch Changes
72
+
73
+ - c32323e: Generated temp apps now declare every package they import, at ranges anchored to this repo
74
+
75
+ `objectui dev` / `serve` / `build` write a throwaway app into `<cwd>/.objectui-tmp`,
76
+ and the `package.json` they wrote named neither `lucide-react` nor any of the seven
77
+ `@object-ui/plugin-*` packages the generated sources import — while pinning
78
+ `@object-ui/react` and `@object-ui/components` at `^0.1.0`, a range that resolves to
79
+ nothing at all for packages published at 17.x (the registry has no 0.1.0). Outside
80
+ this workspace that manifest could not install; inside it, hoisting to the root
81
+ `node_modules` satisfied every missing name, so nothing was ever red.
82
+
83
+ **`lucide-react` is now declared** (objectui#3827). Both of its imports in the
84
+ generated layout are live — `import * as LucideIcons` feeds a `DynamicIcon` lookup
85
+ and four `LucideIcons.*` icons, and the named `{ Moon, Sun }` renders the theme
86
+ toggle — so this is the opposite disposition from the sibling generator, where
87
+ objectui#3755 removed an equivalent declaration precisely because nothing imported
88
+ it. Anchored to `^1.28.0`, the range all 23 in-repo manifests that import lucide
89
+ agree on. `commands/dev.ts` had been covering the gap in the consumer, aliasing
90
+ `lucide-react` to a path resolved out of `packages/components` "to avoid dependency
91
+ not found in temp app" — but only in monorepo mode, leaving every other path with an
92
+ unsatisfiable import. The declaration belongs at the producer; the alias is now a
93
+ workspace convenience rather than the only thing holding the import up.
94
+
95
+ **The seven plugin packages are now declared too**, in both generators. Measuring
96
+ the reported defect turned up that `src/App.tsx` side-effect-imports
97
+ `@object-ui/plugin-charts`, `-editor`, `-kanban`, `-markdown`, `-form`, `-grid` and
98
+ `-view` to register their components, and no manifest ever named them: the
99
+ undeclared set was eight packages, not the one the issue reported.
100
+
101
+ **`@object-ui/*` ranges are derived from this CLI's own version** instead of being
102
+ written out as literals. `.changeset/config.json` puts `@object-ui/cli` in the same
103
+ `fixed` group as every platform package a generated app depends on, so they always
104
+ publish at one version — which makes `^<own version>` both current and guaranteed to
105
+ exist on the registry. A literal here is not merely a fossil risk but a fossil
106
+ generator: that group re-versions on every release, so any hard-coded range is stale
107
+ the next day. This is how `^0.1.0` survived to sit 16 majors behind.
108
+
109
+ **The toolchain ranges are anchored to in-repo manifests**, the discipline
110
+ objectui#3742/objectui#3754 established: `vite ^5.0.0` → `^8.2.0`, `typescript
111
+ ~5.7.3` → `^6.0.3`, `@vitejs/plugin-react ^4.2.1` → `^6.0.5`, `react`/`react-dom`
112
+ `^18.3.1` → `19.2.8` with `@types/*` to match, `react-router-dom ^7.12.0` →
113
+ `^7.18.2`, `postcss ^8.5.6` → `^8.5.26`, `autoprefixer ^10.4.23` → `^10.5.4`. React
114
+ quotes the root's installed version rather than the wider `^18 || ^19` the platform
115
+ packages accept as a peer: the peer says what can work, the root says what the
116
+ generated code has actually run against, and inside this workspace the temp app
117
+ resolves React by hoisting to the root.
118
+
119
+ `tailwindcss` is deliberately left at `^3.4.19`. This repo is on Tailwind 4 and
120
+ `@object-ui/components` peers `^4.2.1`, so the range is not merely behind — it
121
+ conflicts. But re-anchoring it is not a version edit: the generated `index.css` uses
122
+ v3 directives, the generated `postcss.config.js` names the plugin key v4 moved to
123
+ `@tailwindcss/postcss`, and the generated `tailwind.config.js` is a v3 config. Raising
124
+ the range without rewriting those three files yields an app that installs and renders
125
+ unstyled, which looks fixed and is worse. Filed separately as objectui#3852; kept
126
+ internally consistent at v3 until then, and pinned as a deliberate deferral rather
127
+ than left to read as drift.
128
+
129
+ The generators now build their output as a file map that the writers spill to disk,
130
+ so tests assert over the same artifact the CLI writes. Three structural gates port
131
+ the ones the sibling generator grew: every bare import must be declared, no versioned
132
+ runtime dependency may be declared that nothing imports, and no generated `src/**`
133
+ file may be unreachable from `src/main.tsx` — the one module `index.html` loads. Each
134
+ is paired with a self-test that plants the defect back. Note for the next port: the
135
+ `create-plugin` import scanner matches single-quoted specifiers only, and these
136
+ templates mix quote styles, so a verbatim copy would have been blind to
137
+ `from "lucide-react"` — one of the two lines this issue reports.
138
+
139
+ - 8277053: 修复 `objectui dev` 生成的临时 app 的 CSS 管线:整套从 Tailwind 3 迁到 Tailwind 4
140
+
141
+ 生成器写出的样式面此前是完整的 v3 三件套 —— `src/index.css` 用 `@tailwind base/components/utilities` 指令、`postcss.config.js` 写 v3 的 `tailwindcss: {}` 插件键、外加一份 `tailwind.config.js` —— 而仓内与 `@object-ui/components` 都已在 v4(components 的 peer 是 `tailwindcss ^4.2.1`)。两个后果都是真的:
142
+
143
+ - **仓内 `objectui dev` 今天不出样式。** `commands/dev.ts` 的 monorepo 分支把 `require('tailwindcss')(configPath)` 当 PostCSS 插件调用,v4 下这条路径只会抛 "moved to `@tailwindcss/postcss`",而该异常被 `try/catch` 吞成一行黄字警告;`css.postcss` 因此没被设上,Vite 退回去搜配置文件,`/src/index.css` 请求最终 500(实测:`Failed to load PostCSS config … Cannot find module '@tailwindcss/postcss'`),浏览器里一条样式都没有。
144
+ - **仓外一次干净安装会 ERESOLVE。** 生成清单声明 `tailwindcss ^3.4.19`,与它依赖的 `@object-ui/components` 的 v4 peer 冲突。
145
+
146
+ 改动:
147
+
148
+ - `src/index.css` 改为仓内惯用的 v4 CSS-first 写法(`@import 'tailwindcss'` + `@custom-variant dark` + `@source` + `@theme`),`@theme` 的 token 集与 `packages/components/src/index.css` 逐条对齐 —— 包含 v3 config 一直缺、而生成的 `src/Layout.tsx` 自己就在用的 8 个 `sidebar-*` token。
149
+ - `postcss.config.js` 改写 `'@tailwindcss/postcss': {}`;`tailwind.config.js` 不再生成(v4 下没有 `@config` 指向它时它就是死文件,仓内本身也零个 `tailwind.config.*`),v3 的 `content` 扫描面等价迁为 `@source`。
150
+ - 清单:`tailwindcss` 抬到 `^4.3.3` 并新增 `@tailwindcss/postcss ^4.3.3`,两者都锚回仓内(#3827 记的 `TAILWIND_V3_DEFERRED` 记账钉随之翻转)。
151
+ - `commands/dev.ts` 改用 `@tailwindcss/postcss`,并由 `@object-ui/cli` 自己声明这两个插件包;加载失败不再吞成警告,而是带修法响亮报错 —— 静默无样式正是这个缺陷能潜伏这么久的原因。
152
+
153
+ - 59df371: `objectui doctor` now diagnoses Tailwind 4 instead of Tailwind 3
154
+
155
+ The Tailwind section of `objectui doctor` was written against v3 and got every
156
+ question backwards on a v4 project — which is every project this repo ships.
157
+
158
+ **It counted a missing `tailwind.config.js` as an issue.** In v4 that file is not
159
+ part of the setup: the engine reads CSS-first configuration (`@import
160
+ 'tailwindcss'`, `@theme`, `@source`) and only loads a JS config when a stylesheet
161
+ opts in with `@config`. So the command reported a problem that did not exist and
162
+ pushed the reader toward creating a file Tailwind would never read. Measured on
163
+ `examples/console-starter`, a correct v4 app: before, `Found 1 issue(s)` —
164
+ `⚠️ tailwind.config.js not found`; after, `Everything looks good! ✨`. The repo's
165
+ own root reproduced it identically.
166
+
167
+ **It then graded that file on its `content` array**, the v3 key `@source`
168
+ replaced. The two `tailwind.config.*` files still tracked here are exactly that
169
+ trap: `apps/console` and `examples/byo-backend-console` both declare a `content`
170
+ array, no stylesheet in the repo contains `@config`, so both files are inert —
171
+ and the old check answered `✓ Tailwind content paths configured` for them. A
172
+ false green on a dead file. `apps/console` before: `Everything looks good! ✨`;
173
+ after: one finding saying the config is inert and what to do about it.
174
+
175
+ **It never checked `@tailwindcss/postcss`**, the one dependency a v4 build cannot
176
+ start without — v4 moved the PostCSS plugin out of `tailwindcss` into that
177
+ package, and naming the old `tailwindcss` key in a PostCSS config resolves to a
178
+ shim whose only job is to throw. That is the failure form objectui#3852 measured
179
+ on the generated app, and doctor printed `✓ Tailwind CSS installed` straight
180
+ through it.
181
+
182
+ The checks are now the v4 contract, matching what `objectui init` scaffolds:
183
+ `@tailwindcss/postcss` declared or installed, a PostCSS config naming it rather
184
+ than the v3 `tailwindcss` key, and a CSS entry running `@import 'tailwindcss'`
185
+ (with `@source` acknowledged when present). The declared `tailwindcss` major is
186
+ read too, so a v3 range is named as migration debt instead of passing as
187
+ `✓ installed`.
188
+
189
+ Two deliberate silences, because objectui#3891 is about doctor asserting things
190
+ it cannot see. A **missing** `tailwind.config.*` produces no finding of any level
191
+ — only a _present_ one does, and only when nothing opts into it via `@config`.
192
+ And when no recognised CSS entry exists at all (a monorepo root, a bespoke
193
+ layout), the CSS verdicts are skipped rather than guessed.
194
+
195
+ A v3-tolerant dual path — branching on the declared major and running two sets of
196
+ checks — was considered and deliberately not built: it widens the product surface
197
+ past this repo's v4-only posture. v3 spellings are diagnosed as migration debt,
198
+ not supported as a second mode.
199
+
200
+ Internally `runDiagnostics(cwd)` now returns structured findings carrying a
201
+ stable `id`, and `doctor()` only renders and counts them. That split is what
202
+ makes the matrix testable against real fixture directories instead of scraped
203
+ console output; the tests pin verdicts by `id`, so wording can improve without
204
+ the coverage evaporating.
205
+
206
+ - 85fb95b: Fix `objectui init` scaffolding an app that renders neither components nor styles.
207
+
208
+ The generated `src/App.tsx` imported only `SchemaRenderer` from `@object-ui/react`, which does not depend on `@object-ui/components` — and registration is a side effect of importing that package. The component registry was therefore empty in every scaffolded project, and each node of all three templates (`simple`, `form`, `dashboard`) rendered "Unknown component type". The manifest already declared `@object-ui/components`; it was declared and never imported. The generated `src/App.tsx` now performs the side-effect import.
209
+
210
+ The generated `src/index.css` was a bare `@import 'tailwindcss';` and never loaded the library's published stylesheet, so the theme utilities the templates lean on had no tokens behind them. It now also does `@import '@object-ui/components/style.css';`, matching what the quick-start guide teaches hand-rolled consumers.
211
+
212
+ `objectui init` is unchanged in every other respect: the same eleven files, byte for byte, apart from these two lines.
213
+
214
+ - c29ceff: Move the generator templates' dependency ranges onto the repo's current ones
215
+
216
+ The dependabot wave of 2026-08-10 bumped `lucide-react` to `1.29.0` and `vite`
217
+ to `8.2.1` in this repo's own manifests, but the ranges hard-coded in the
218
+ scaffold generators do not move with it — dependabot does not know the
219
+ templates exist. A project scaffolded by `objectui init` / `objectui dev` or by
220
+ `create-plugin` therefore declared a range the repo itself had already moved
221
+ past.
222
+
223
+ Three ranges are re-anchored: `lucide-react` `^1.28.0` → `^1.29.0` in the routed
224
+ app generator, and `vite` `^8.2.0` → `^8.2.1` in both the shared CLI scaffold
225
+ devDependencies and the create-plugin template.
226
+
227
+ - 0a09793: `objectui init` now versions the project it scaffolds against the CLI that wrote it, and stops writing a `tailwind.config.js` Tailwind 4 never reads.
228
+
229
+ The generated `package.json` asked for `@object-ui/components` and `@object-ui/react` at `^2.0.0` while those packages publish at 17.x, so `npm install` in a fresh scaffold resolved a major unrelated to the CLI that produced it. Both ranges are now derived from the CLI's own version, which is sound because `.changeset/config.json` releases the CLI and every platform package from one `fixed` group. The scaffold's toolchain ranges had drifted the same way — vite `^7.3.1` against the repo's `^8.2.0`, typescript `^5.9.3` against `^6.0.3`, and seven more — and now read from the same table the temp-app generators use rather than from literals of their own.
230
+
231
+ The scaffold's CSS pipeline was already Tailwind 4 (`@tailwindcss/postcss`, `@import 'tailwindcss'`), and v4 reads a JS config only when a stylesheet points `@config` at one. The `tailwind.config.js` written beside it was therefore inert — an authoritative-looking `content` list nothing consumed — and is no longer written.
232
+
233
+ - Updated dependencies [794c497]
234
+ - Updated dependencies [993336f]
235
+ - Updated dependencies [f0a625a]
236
+ - Updated dependencies [b5980f4]
237
+ - Updated dependencies [8aad9fd]
238
+ - Updated dependencies [0cbdca8]
239
+ - Updated dependencies [d229dfa]
240
+ - Updated dependencies [ecae400]
241
+ - Updated dependencies [d3e738a]
242
+ - Updated dependencies [c3b01a7]
243
+ - Updated dependencies [7ed3360]
244
+ - Updated dependencies [0fa5e4d]
245
+ - Updated dependencies [5bfaabd]
246
+ - Updated dependencies [e06810e]
247
+ - Updated dependencies [ab3ad4f]
248
+ - Updated dependencies [c2fd122]
249
+ - Updated dependencies [e24d767]
250
+ - Updated dependencies [aca561a]
251
+ - Updated dependencies [48132f7]
252
+ - Updated dependencies [0ef9dfd]
253
+ - Updated dependencies [0109f54]
254
+ - Updated dependencies [7e5bb5d]
255
+ - Updated dependencies [e6fdbdc]
256
+ - Updated dependencies [54233b1]
257
+ - Updated dependencies [97b63d7]
258
+ - Updated dependencies [7e2b7e9]
259
+ - Updated dependencies [c1e1e6b]
260
+ - @object-ui/components@17.4.0
261
+ - @object-ui/react@17.4.0
262
+ - @object-ui/types@17.4.0
263
+
3
264
  ## 17.3.0
4
265
 
5
266
  ### Patch Changes
@@ -864,6 +1125,7 @@ undefined` — swallowing the very errors the command exists to print. Now reads
864
1125
  - fd15918: Comprehensive i18n refactor + CI test fix.
865
1126
 
866
1127
  **i18n (`@object-ui/i18n`)**
1128
+
867
1129
  - Added ~130 new keys under 12 new top-level namespaces: `layout`, `search`,
868
1130
  `empty`, `renderer`, `actionDialog`, `rowAction`, `navigationSync`,
869
1131
  `objectActions`, `objectViewActions`, `dashboardActions`, `recordDetail`,
@@ -875,6 +1137,7 @@ undefined` — swallowing the very errors the command exists to print. Now reads
875
1137
 
876
1138
  **App shell (`@object-ui/app-shell`)** — replaced hardcoded English in 14
877
1139
  files with `useObjectTranslation`:
1140
+
878
1141
  - Layout: `AppSidebar`, `ActivityFeed` (locale-aware relative time),
879
1142
  `MetadataInspector`.
880
1143
  - Views: `SearchResultsPage`, `ActionParamDialog`, `RecordFormPage`,
@@ -886,12 +1149,14 @@ undefined` — swallowing the very errors the command exists to print. Now reads
886
1149
  `useObjectActions` (delete confirm + success / failure toasts).
887
1150
 
888
1151
  **Plugin grid (`@object-ui/plugin-grid`)**
1152
+
889
1153
  - `ObjectGrid` record-detail panel now translates Empty / Yes / No / System
890
1154
  via the existing `useGridTranslation` safe-fallback wrapper.
891
1155
  - `RowActionMenu` adopts a local safe-fallback i18n wrapper for
892
1156
  `Open menu` / `Edit` / `Delete`, preserving standalone-usage guarantees.
893
1157
 
894
1158
  **CLI test fix (`@object-ui/cli`)**
1159
+
895
1160
  - `cli-bin.test.ts` auto-builds the package on first run when `dist/cli.js`
896
1161
  is missing, instead of throwing. This unbreaks `pnpm test:coverage` in CI
897
1162
  (root vitest run does not honor turbo's `^build` deps) and removes the
@@ -1142,6 +1407,7 @@ undefined` — swallowing the very errors the command exists to print. Now reads
1142
1407
  - New plugin-object and ObjectQL SDK updates
1143
1408
 
1144
1409
  **Added:**
1410
+
1145
1411
  - New Plugin: @object-ui/plugin-object - ObjectQL plugin for automatic table and form generation
1146
1412
  - ObjectTable: Auto-generates tables from ObjectQL object schemas
1147
1413
  - ObjectForm: Auto-generates forms from ObjectQL object schemas with create/edit/view modes
@@ -1150,6 +1416,7 @@ undefined` — swallowing the very errors the command exists to print. Now reads
1150
1416
  - ObjectQL Integration: Enhanced ObjectQLDataSource with getObjectSchema() method using MetadataApiClient
1151
1417
 
1152
1418
  **Changed:**
1419
+
1153
1420
  - Updated @objectql/sdk from ^1.8.3 to ^1.9.1
1154
1421
  - Updated @objectql/types from ^1.8.3 to ^1.9.1
1155
1422
 
@@ -1164,6 +1431,7 @@ undefined` — swallowing the very errors the command exists to print. Now reads
1164
1431
  - Patch release: Add automated changeset workflow and CI/CD improvements
1165
1432
 
1166
1433
  This release includes infrastructure improvements:
1434
+
1167
1435
  - Added changeset-based version management
1168
1436
  - Enhanced CI/CD workflows with GitHub Actions
1169
1437
  - Improved documentation for contributing and releasing
package/README.md CHANGED
@@ -132,14 +132,6 @@ await serve('app.json', { port: '3000', host: 'localhost' });
132
132
  await init('my-app', { template: 'dashboard' });
133
133
  ```
134
134
 
135
- ## Compatibility
136
-
137
- - **Node.js** ≥ 18
138
- - **TypeScript** ≥ 5.0 (strict mode)
139
- - **`@objectstack/spec`** ^3.3.0
140
- - **`@objectstack/client`** ^3.3.0
141
- - **Tailwind CSS** ≥ 3.4
142
-
143
135
  ## Links
144
136
 
145
137
  - 📚 [Documentation](https://www.objectui.org/docs/utilities/cli)