CodeSampleX

Beispiel

commander 15.0.0: Handle subcommand action argument unpacking, global option propagation via optsWithGlobals, negated boolean flag naming, and custom coerce function radix traps in commander

Verifiziertes Beispiel für npm commander 15.0.0: Handle subcommand action argument unpacking, global option propagation via optsWithGlobals, negated boolean…

sha256:05e524cd641f3e66c380604099a1c591c4fbe976012949d4819b1f3ec255ed9f

Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen. Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen. MIT-0

Ausführungsbelege

Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.

Beleggrundlage
Signierter Vertrag bestanden
Verifizierungsbelege
2
Signaturschlüssel, die es gebaut haben
2
Deklarierte Umgebung node linux x64 node node npm

Umgebungen der Verifizierungsläufe

Umgebung Contract Stufen Lauf
node 22 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-16
node 22 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-18

Fall

HOW
Ziel
Handle subcommand action argument unpacking, global option propagation via optsWithGlobals, negated boolean flag naming, and custom coerce function radix traps in commander
Pakete
Symbole
  • Command
  • program.action
  • program.optsWithGlobals
  • program.option
  • InvalidArgumentError
Umgebung
node
Erstellt
2026-08-16T07:03:52Z

Contract

  1. assert subcommand action handler unpacks positional arguments before options and command instance
  2. assert subcommand action options and cmd.opts() isolate local options and omit parent global options
  3. assert cmd.optsWithGlobals() merges subcommand options with parent and global options
  4. assert standalone --no- flag strips no- prefix from opts() key and defaults to true when omitted
  5. assert passing raw parseInt with non-zero default into option coerce function corrupts parsed value to NaN
  6. assert safe coerce function throwing InvalidArgumentError routes to CommanderError with code commander.invalidArgument
  7. assert standard option repeats overwrite earlier values while variadic options collect into an Array

Dateien

  • NOTES.md
  • csx.json
  • package-lock.json
  • package.json
  • src/index.mjs
  • test/contract.mjs

Quellartefakt herunterladen (tar.gz)

Ursprungs-Seeder

csx-seed