Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ae2f54e
feat(commands): extend defineCommand for the CLI's own commands
edusperoni Sep 14, 2026
e4bf7da
refactor(commands): migrate every command to defineCommand
edusperoni Sep 14, 2026
13db77e
feat(commands): register commands lazily against a checked definition…
edusperoni Sep 14, 2026
70ff020
feat(commands)!: dispatch in process, rename ctx.arguments to ctx.params
edusperoni Sep 14, 2026
83381c5
feat(key-shortcuts): declarative table with a generic engine
edusperoni Sep 14, 2026
6d8cc6e
feat(key-shortcuts): registry contract and command-declared shortcuts
edusperoni Sep 14, 2026
53551c7
fix(bundler): tear the bundler down before starting another one
edusperoni Sep 14, 2026
2b1ee61
feat(key-shortcuts): r/R/B restart ladder, hint reprint, session scoping
edusperoni Sep 14, 2026
217a38b
feat(commands): a class form built on defineCommand
edusperoni Sep 14, 2026
3361798
refactor(commands): one context per invocation and the class-form sweep
edusperoni Sep 14, 2026
693e34d
feat(commands): the in-process dispatcher as a contract
edusperoni Sep 14, 2026
d987e0b
refactor(commands): fail through the context and read options from it
edusperoni Sep 23, 2026
d7de648
feat(commands): definition providers, multi providers and preconditions
edusperoni Sep 23, 2026
b41cadd
fix(commands): close the review gaps in the command API
edusperoni Sep 23, 2026
3549b4c
refactor(commands): drop what never shipped and the leftovers the rev…
edusperoni Sep 23, 2026
ffa6afa
chore: leave declarations.d.ts untouched
edusperoni Sep 23, 2026
145c39f
fix: address the first review round on the command API and shortcuts
edusperoni Sep 23, 2026
61f4997
feat(commands)!: declare positional parameters as `params`, options a…
edusperoni Sep 23, 2026
95ec594
docs(commands): name the reserved word the params spelling avoids
edusperoni Sep 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
883 changes: 819 additions & 64 deletions defining-commands.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const { defineCommand, inject } = require("nativescript/contracts");

module.exports = defineCommand({
name: "hello|world",
arguments: "any",
params: "any",
async run(ctx) {
inject("logger").info(`Hello, ${ctx.args[0] || "world"}!`);
},
Expand Down Expand Up @@ -218,7 +218,7 @@ rejected with a warning.
**The manifest key decides how a command is invoked.** It has to: the CLI routes
`ns hello world` to your module before that module has been loaded, so the key
is the only name it can know. A `name` inside the definition is metadata — it is
what `registerCommandDefinition` uses when a module registers itself, and it is
what `registerCommand` uses when a module registers itself, and it is
useful documentation, but a manifest entry overrides it. If the two disagree the
CLI warns, naming both, and runs the command under the manifest key.

Expand Down
Loading
Loading