Commit Graph
7 Commits
Author SHA1 Message Date
Junyi 98e79a5a65 feat(lifecycle): durable examples (#10644)
* docs(lifecycle): add examples and docs

* refactor(workflow): prune workflow

* docs(workflow): prune workflow
2026-10-10 14:50:27 +08:00
Junyi dfdd44902f refactor(workflow): refactor dsl (#478)
* feat(workflow): add typed DSL refactor demo

* refactor(plugin-workflow): refactor dsl

* fix(workflow): fix test case

* refactor(workflow): update skills

* fix(workflow): fix test case

* refactor(workflow): change unpublished route to hash
2026-09-29 23:45:16 +08:00
chenos dbf5631e1f fix: clear the leftovers of the CLI consolidation (#439)
* chore: replace the command ids left over from the CLI consolidation

The scheduler and template-print documentation still named `schedule sync`
and `skills:sync`, the template reference pages showed `pnpm migrate`, and the
global create-app Skill taught `pnpm config:*` scripts that applications no
longer carry. The create-app smoke test now records `<topic> <command>` ids
directly instead of mapping them back to the old script names.

* chore: drop references to the removed client:inspect and server:inspect

Application inspection was removed in #329, but the plugin-development
Skill, skills/README.md and a few comments still sent readers to
`client:inspect` and `server:inspect`. `plugin inspect` covers registration
state only, so the guidance now points there for registration and drops the
composition diagnostics. The authentication test that asserts no command is
prescribed now checks for `config init` rather than the old script name.

* fix: clear the remaining leftovers of the CLI consolidation

A second sweep after #431, #434, #437 and #438 found guidance and code that
still described the old command line.

- `plugin inspect` suggested the removed `pnpm plugin:register` and
  `pnpm skills:sync` scripts; it now suggests `pnpm nocobase plugin register`
  and `skills sync` with the flags that located the App, and the remaining
  colon-form hints name the real commands.
- The Default template never registered the scheduler's CLI entry, so the
  documented `pnpm nocobase scheduler sync` did not exist there.
- `@refinedev/cli` and `tsc-alias` are spawned by `nocobase build` and are now
  declared as optional peers of `@nocobase/app-cli`.
- `peers:check` covers `@nocobase/app-cli` again after its move to
  `packages/app`, and `deps:check` scans plugin `cli/` sources and source
  directories named `dist`.
- Skills, templates, plugin AGENTS.md copies, READMEs and the docs site now
  describe current commands, the `metadata/` directory from #437, the Hub
  archive path, `release` availability and the two `dist/package.json`
  scripts. Examples and Hub ignore `/.env`.

* fix: address review threads on the CLI leftovers

- the templates' Docker build contexts exclude build output where builds write it (each workspace package's dist/, the documentation sites') instead of every directory named dist/, so a source directory with that name, such as app-cli's dist commands, needs no exception
- `plugin inspect` suggests `skills sync --package <full name>` rather than the compatibility `--plugin`, and a test covers suggestions for a `--workspace-root`/`--app` inspection
- the CLI example Skill states when two plugin topics collide: once the scope and an `app-plugin-` prefix are removed
- `peers:check` fails on a manifest that does not parse instead of leaving the package out
- the smoke test's fake pnpm records a top-level command such as `nocobase build` by its own id, reading the top-level commands from app-cli
- the plugins changeset no longer lists create-app, whose change another changeset already covers
2026-09-25 19:34:23 -07:00
chenos b00290dcfa fix(app-tools): declare the tools it spawns and gate the TypeScript load (#382)
`dev` spawns `vite`, `tsx` and `nocobase`, and only two of them were
declared. Neither `deps:check` nor `peers:check` could catch it, because
both read import specifiers and a spawned binary has none, so both now
cover `packages/tools`, the README carries a table of what these scripts
spawn, and AGENTS.md records the rule.

`typescript` becomes a peer so the parser reading `server/plugins.ts` and
the `tsc` the build invokes stay on one version, and the parse is gated on
a workspace package being named in the file, which keeps 24 MB of compiler
out of every `pnpm dev` answered with nothing to watch.

`cross-spawn` and `tar` move to the catalog, settling `tar` on one range,
and the templates drop the two declarations nothing in them imports.
2026-09-22 20:48:44 +08:00
Katherine c210c51a01 fix(hub): improve onboarding, configuration imports and deployment progress (#294)
* fix(hub): remove the internal registry from create-app guidance

Show pnpm create @nocobase/app <appId> without the NocoBase package source, and follow it with a copyable example prompt that starts the user AI Agent on the created project. Both get-started pages and the AI employee quick start lose the same registry line, and the copy status text no longer calls every copied value a command.

* fix(hub): accept a dragged artifact in the release upload dialog

The dashed zone was a label around a hidden file input, so only picking a file worked. Handle dragover and drop on it, highlight the zone while a file is over it, ignore drops while an upload is running or when the drag carries no file, and claim file drops that miss the zone so the browser does not open the artifact instead of uploading it.

* fix(hub): improve artifact selection and align deployment editor columns

* feat(hub): import YAML files into configuration editors

* fix(hub): stabilize deployment progress and artifact selection

* fix(ci): parse runtime dependencies instead of matching prose

* fix(hub): preserve config drafts and show refresh progress
2026-09-19 10:20:54 +08:00
PiEgg 52d1107672 feat: declare dependencies so the right ones reach each side (#151) 2026-09-09 16:13:05 +08:00
PiEgg 813da59768 fix(create-app): repair the commands a generated application ships broken (#115)
* fix(create-app): repair the commands a generated application ships broken

A freshly created application failed four of its own scripts before a line of
code was written, and its deployment artifact could not start.

`client:inspect` refused to run because `client/runtime.ts` kept the template's
package name while `package.json` carried the application's. That mismatch also
split the i18n namespace: the client derives it from the runtime declaration and
the server from the manifest, so `APP_NS` resolved differently in each half.
Scaffolding now rewrites the name in the three sources that embed it, and sets
`displayName` instead of dropping it, which had left the sidebar footer showing
"Default Template" in every generated application.

`lint` failed on an untouched shadcn/ui file. eslint-plugin-react-refresh 0.5.5
dropped the member-expression check, so `const Select = SelectPrimitive.Root`
read as a non-component export; 0.5.6 restores it.

`test` failed because `vitest.config.ts` listed test files by hand. The list had
drifted — it named a file that no longer existed while seven real test files were
absent from it and had never run — and a generated application ships no `tests/`
at all. It is a glob now, with `passWithNoTests`.

`format:check` failed on the lockfile, because `.prettierignore` was not among
the published files.

`build` produced a `dist/` that could not run. The generated `dist/package.json`
listed no database driver: knex loads one by name rather than importing it, and
`@nocobase/db` arrives as a transitive dependency, so neither path reached the
scan. The driver the application declares is now added explicitly, the install
runs under pnpm with the `allowBuilds` its native addon needs, and the stale
refine-era Dockerfile is gone.

* fix(repo): stop format:check from reading build output

Nine packages ran `prettier . --check` with no `.prettierignore`, so the check
descended into their own `dist` and reported the compiler's output as badly
formatted. `pnpm --filter @nocobase/i18n check` failed on 28 such files, none of
which a person wrote or could usefully fix.

The failure only appears once a package has been built, which is why it survived:
a clean checkout has no `dist` to walk, and CI builds and format-checks in
separate jobs.

Every other package in the repository already ships this file with the same
`dist/` line. It is development-only and stays out of `files`, so no published
tarball changes.

* feat(create-plugin): tell a generated plugin where its dependencies go

A new plugin had no agent-facing documentation at all, so nothing told the next
developer that `dependencies` and `devDependencies` mean different things here.
Eleven plugins in this repository had already put browser packages in
`dependencies` — harmless-looking, since the application bundles them anyway,
but the same walk that generates `dist/package.json` then installed all of them
into a server deployment that never required one. Two of them were 44 MB.

The generated `AGENTS.md` states the rule as a table, explains why the server
and client halves differ — one is deployed unbundled and resolves its imports at
runtime, the other is bundled by the application at build time — and points at
`app-template-default` for the version of a client package to reuse. `CLAUDE.md`
defers to it, matching both application templates.

The generator already emitted the right shape for the capabilities it scaffolds:
`hono` is a dependency, every runtime package is a peer paired with a
devDependency. What was missing was saying so, for the dependencies a developer
adds afterwards.
2026-09-03 13:23:12 +08:00