verify-source
ajs dms verify-source checks that unpublished frontend modules build and type-check against this release of the loader, on top of the DMS core layer. It needs no backend: it generates a temporary workspace, removed when the run ends, and publishes nothing. Use it in a module's CI, or before releasing a module.
$ ajs dms verify-source --help
Usage: ajs dms verify-source [options]
Build and type-check unpublished DMS frontend modules against this loader
version, on top of the DMS core layer of the @antelopejs/dms installed in the
project. Runs in a temporary workspace removed when the run ends, and starts no
backend.
Options:
-l, --layer <path> Root of an unpublished DMS core layer to verify
instead of the installed one
-m, --module <path> Root of a frontend module to verify (repeatable);
without -l or -m, the current directory or
./frontend-vue
--local-package <name=path> Bind a local package into the generated workspace
(repeatable)
-h, --help Show help for a command
A run
Run it from the project. The core layer is the frontend-vue directory of the @antelopejs/dms the project installs, found the way Node resolves it from the current directory. A project that does not install it is told the command that adds it as a development dependency.
$ ajs dms verify-source
ajs dms verify-source 2 modules
ℹ Verifying against @antelopejs/dms 0.9.0 (installed in this project)
✔ Materialized 2 modules 1.0s
✔ Installed 429 packages 11.4s
✔ Generated the type declarations 3.4s
✔ Built the server modules 4.9s
✔ Built the e-mail bundle 9.0s
✔ Type check passed 1m 56s
✔ Built the client bundle 1m 58s
✔ Built the SSR bundle 2m 31s
▲ 1 Vite warning
→ Run with --verbose to list them
✔ Client bundle checked
✔ E-mail contracts hold · 8 templates · 132 KB JS (limit 256 KB) · 217 KB locale data
✔ 1 server module, 21 KB JS
Verified 2 modules · 2m 56s
The two modules are the DMS core layer and the project's own frontend-vue. The run builds the client, SSR, e-mail and server bundles while vue-tsc runs alongside, checks what the client bundle loads, renders eight DMS e-mail templates, checks that the e-mail bundle holds no browser-only module and stays under 256 KB of JavaScript, and that no dms.server.ts import reaches the browser bundle. The client assets are not compressed: only a served build needs that.
A failure stops the run with exit code 1 and points at the file in the module you passed, not at its copy in the workspace, for example ./frontend-vue/app/components/Callout.vue:17:7. --verbose streams the pnpm, Vite and vue-tsc output.
Choosing the modules
Without -m, the verifier takes the current directory when it holds a dms.frontend.ts, and its frontend-vue directory otherwise. -m names other modules and is repeatable:
ajs dms verify-source -m ./admin-vue -m ./shop-vue
--local-package <name>=<path>, also repeatable, binds a local build of a package into the generated workspace instead of the published one. Every module you pass is copied into the workspace and bound with workspace:*.
A module whose engines["@antelopejs/dms-frontend"] range excludes this release is refused before anything is installed. See Supported releases.
Verifying the DMS core layer
-l is for the development of the DMS itself: it verifies an unpublished core layer instead of the installed one, here with a local build of @antelopejs/dms.
ajs dms verify-source \
--layer /path/to/dms/frontend-vue \
--local-package @antelopejs/dms=/path/to/dms
A --layer that holds no core layer, such as a project's own frontend-vue, is refused with exit code 2 and the command that verifies the same directory with --module instead.
pnpm test:real-source, with DMS_LAYER_SOURCE set to a core layer root and DMS_MODULE_SOURCES to a JSON array of module roots.