1package npmpackage
2
3import (
4 "strings"
5 "net"
6 "list"
7 "cue.dev/x/npmjs/eslint"
8 "cue.dev/x/npmjs/prettier"
9 "cue.dev/x/npmjs/stylelint"
10 "cue.dev/x/npmjs/ava"
11 "cue.dev/x/semanticrelease"
12 "cue.dev/x/npmjs/jscpd"
13 "cue.dev/x/npmjs/madge"
14 "cue.dev/x/npmjs/nodemon"
15 "cue.dev/x/npmjs/quikrun"
16)
17
18// JSON schema for NPM package.json files
19#Schema: {
20 @jsonschema(schema="http://json-schema.org/draft-07/schema#")
21 _schema
22 _schema: {
23 @jsonschema(id="https://json.schemastore.org/package.json")
24
25 // The name of the package.
26 "name"?: strings.MaxRunes(214) & strings.MinRunes(1)
27
28 // Version must be parsable by node-semver, which is bundled with
29 // npm as a dependency.
30 "version"?: string
31
32 // This helps people discover your package, as it's listed in 'npm
33 // search'.
34 "description"?: string
35
36 // This helps people discover your package as it's listed in 'npm
37 // search'.
38 "keywords"?: [...string]
39
40 // The url to the project homepage.
41 "homepage"?: string
42
43 // The url to your project's issue tracker and / or the email
44 // address to which issues should be reported. These are helpful
45 // for people who encounter issues with your package.
46 "bugs"?: string | {
47 // The url to your project's issue tracker.
48 "url"?: net.AbsURL
49
50 // The email address to which issues should be reported.
51 "email"?: string
52 ...
53 }
54 "license"?: #license
55
56 // DEPRECATED: Instead, use SPDX expressions, like this: {
57 // "license": "ISC" } or { "license": "(MIT OR Apache-2.0)" }
58 // see: 'https://docs.npmjs.com/files/package.json#license'.
59 "licenses"?: [...{
60 "type"?: #license
61 "url"?: net.AbsURL
62 ...
63 }]
64 "author"?: #person
65
66 // A list of people who contributed to this package.
67 "contributors"?: [...#person]
68
69 // A list of people who maintains this package.
70 "maintainers"?: [...#person]
71
72 // The 'files' field is an array of files to include in your
73 // project. If you name a folder in the array, then it will also
74 // include the files inside that folder.
75 "files"?: [...string]
76
77 // The main field is a module ID that is the primary entry point
78 // to your program.
79 "main"?: string
80
81 // The "exports" field is used to restrict external access to
82 // non-exported module files, also enables a module to import
83 // itself using "name".
84 "exports"?: matchN(1, [#packageExportsEntryPath, close({
85 "."?: #packageExportsEntryOrFallback
86
87 {[=~"^\\./.+" & !~"^(\\.)$"]: #packageExportsEntryOrFallback}
88 }), #packageExportsEntryObject, #packageExportsFallback])
89
90 // The "imports" field is used to create private mappings that
91 // only apply to import specifiers from within the package
92 // itself.
93 "imports"?: close({
94 {[=~"^#.+$"]: #packageImportsEntryOrFallback}
95 })
96 "bin"?: string | {
97 [string]: string
98 }
99
100 // When set to "module", the type field allows a package to
101 // specify all .js files within are ES modules. If the "type"
102 // field is omitted or set to "commonjs", all .js files are
103 // treated as CommonJS.
104 "type"?: "commonjs" | "module"
105
106 // Set the types property to point to your bundled declaration
107 // file.
108 "types"?: string
109
110 // Note that the "typings" field is synonymous with "types", and
111 // could be used as well.
112 "typings"?: string
113
114 // The "typesVersions" field is used since TypeScript 3.1 to
115 // support features that were only made available in newer
116 // TypeScript versions.
117 "typesVersions"?: {
118 [string]: close({
119 // Maps all file paths to the file paths specified in the array.
120 "*"?: [...=~"^[^*]*(?:\\*[^*]*)?$"]
121
122 {[=~"^[^*]+$" & !~"^(\\*)$"]: [...string]}
123
124 {[=~"^[^*]*\\*[^*]*$" & !~"^(\\*)$"]: [...=~"^[^*]*(?:\\*[^*]*)?$"]}
125 })
126 }
127
128 // Specify either a single file or an array of filenames to put in
129 // place for the man program to find.
130 "man"?: string | [...string]
131 "directories"?: {
132 // If you specify a 'bin' directory, then all the files in that
133 // folder will be used as the 'bin' hash.
134 "bin"?: string
135
136 // Put markdown files in here. Eventually, these will be displayed
137 // nicely, maybe, someday.
138 "doc"?: string
139
140 // Put example scripts in here. Someday, it might be exposed in
141 // some clever way.
142 "example"?: string
143
144 // Tell people where the bulk of your library is. Nothing special
145 // is done with the lib folder in any way, but it's useful meta
146 // info.
147 "lib"?: string
148
149 // A folder that is full of man pages. Sugar to generate a 'man'
150 // array by walking the folder.
151 "man"?: string
152 "test"?: string
153 ...
154 }
155
156 // Specify the place where your code lives. This is helpful for
157 // people who want to contribute.
158 "repository"?: string | {
159 "type"?: string
160 "url"?: string
161 "directory"?: string
162 ...
163 }
164 "funding"?: matchN(1, [#fundingUrl, #fundingWay, list.UniqueItems() & [...matchN(1, [#fundingUrl, #fundingWay])] & [_, ...]])
165
166 // The 'scripts' member is an object hash of script commands that
167 // are run at various times in the lifecycle of your package. The
168 // key is the lifecycle event, and the value is the command to
169 // run at that point.
170 "scripts"?: {
171 // Run code quality tools, e.g. ESLint, TSLint, etc.
172 "lint"?: string
173
174 // Run BEFORE the package is published (Also run on local npm
175 // install without any arguments).
176 "prepublish"?: string
177
178 // Runs BEFORE the package is packed, i.e. during "npm publish"
179 // and "npm pack", and on local "npm install" without any
180 // arguments. This is run AFTER "prepublish", but BEFORE
181 // "prepublishOnly".
182 "prepare"?: string
183
184 // Run BEFORE the package is prepared and packed, ONLY on npm
185 // publish.
186 "prepublishOnly"?: string
187
188 // run BEFORE a tarball is packed (on npm pack, npm publish, and
189 // when installing git dependencies).
190 "prepack"?: string
191
192 // Run AFTER the tarball has been generated and moved to its final
193 // destination.
194 "postpack"?: string
195
196 // Publishes a package to the registry so that it can be installed
197 // by name. See
198 // https://docs.npmjs.com/cli/v8/commands/npm-publish
199 "publish"?: string
200 "postpublish"?: #scriptsPublishAfter
201
202 // Run BEFORE the package is installed.
203 "preinstall"?: string
204 "install"?: #scriptsInstallAfter
205 "postinstall"?: #scriptsInstallAfter
206 "preuninstall"?: #scriptsUninstallBefore
207 "uninstall"?: #scriptsUninstallBefore
208
209 // Run AFTER the package is uninstalled.
210 "postuninstall"?: string
211 "preversion"?: #scriptsVersionBefore
212 "version"?: #scriptsVersionBefore
213
214 // Run AFTER bump the package version.
215 "postversion"?: string
216 "pretest"?: #scriptsTest
217 "test"?: #scriptsTest
218 "posttest"?: #scriptsTest
219 "prestop"?: #scriptsStop
220 "stop"?: #scriptsStop
221 "poststop"?: #scriptsStop
222 "prestart"?: #scriptsStart
223 "start"?: #scriptsStart
224 "poststart"?: #scriptsStart
225 "prerestart"?: #scriptsRestart
226 "restart"?: #scriptsRestart
227 "postrestart"?: #scriptsRestart
228
229 // Start dev server to serve application files
230 "serve"?: string
231 {[!~"^(lint|prepublish|prepare|prepublishOnly|prepack|postpack|publish|postpublish|preinstall|install|postinstall|preuninstall|uninstall|postuninstall|preversion|version|postversion|pretest|test|posttest|prestop|stop|poststop|prestart|start|poststart|prerestart|restart|postrestart|serve)$"]: string}
232 }
233
234 // A 'config' hash can be used to set configuration parameters
235 // used in package scripts that persist across upgrades.
236 "config"?: {
237 ...
238 }
239 "dependencies"?: #dependency
240 "devDependencies"?: #devDependency
241 "optionalDependencies"?: #optionalDependency
242 "peerDependencies"?: #peerDependency
243 "peerDependenciesMeta"?: #peerDependencyMeta
244
245 // Array of package names that will be bundled when publishing the
246 // package.
247 "bundleDependencies"?: matchN(1, [[...string], bool])
248
249 // DEPRECATED: This field is honored, but "bundleDependencies" is
250 // the correct field name. Ignored if "bundleDependencies" is
251 // also present.
252 "bundledDependencies"?: matchN(1, [[...string], bool])
253
254 // Resolutions is used to support selective version resolutions
255 // using yarn, which lets you define custom package versions or
256 // ranges inside your dependencies. For npm, use overrides
257 // instead. See:
258 // https://yarnpkg.com/configuration/manifest#resolutions
259 "resolutions"?: {
260 ...
261 }
262
263 // Overrides is used to support selective version overrides using
264 // npm, which lets you define custom package versions or ranges
265 // inside your dependencies. For yarn, use resolutions instead.
266 // See:
267 // https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides
268 "overrides"?: {
269 ...
270 }
271
272 // Defines which package manager is expected to be used when
273 // working on the current project. This field is currently
274 // experimental and needs to be opted-in; see
275 // https://nodejs.org/api/corepack.html
276 "packageManager"?: matchN(1, [=~"(npm|pnpm|yarn|bun|aube|nub)@\\d+\\.\\d+\\.\\d+(-.+)?", "bun"])
277 "engines"?: {
278 "node"?: string
279
280 // Specifies which JavaScript runtimes (like Node.js, Deno, Bun)
281 // are supported. Values should use WinterCG Runtime Keys (see
282 // https://runtime-keys.proposal.wintercg.org/).
283 "runtime"?: matchN(1, [#runtimeEngineDependency, [...#runtimeEngineDependency]])
284 {[!~"^(node|runtime)$"]: string}
285 }
286
287 // Defines which tools and versions are expected to be used when
288 // Volta is installed.
289 "volta"?: {
290 // The value of that entry should be a path to another JSON file
291 // which also has a "volta" section
292 "extends"?: string
293
294 {[=~"(node|npm|pnpm|yarn)" & !~"^(extends)$"]: string}
295 ...
296 }
297 "engineStrict"?: bool
298
299 // Specify which operating systems your module will run on.
300 "os"?: [...string]
301
302 // Specify that your code only runs on certain cpu architectures.
303 "cpu"?: [...string]
304
305 // Define the runtime and package manager for developing the
306 // current project.
307 "devEngines"?: {
308 // Specifies which operating systems are supported for development
309 "os"?: matchN(1, [#devEngineDependency, [...#devEngineDependency]])
310
311 // Specifies which CPU architectures are supported for development
312 "cpu"?: matchN(1, [#devEngineDependency, [...#devEngineDependency]])
313
314 // Specifies which C standard libraries are supported for
315 // development
316 "libc"?: matchN(1, [#devEngineDependency, [...#devEngineDependency]])
317
318 // Specifies which JavaScript runtimes (like Node.js, Deno, Bun)
319 // are supported for development. Values should use WinterCG
320 // Runtime Keys (see https://runtime-keys.proposal.wintercg.org/)
321 "runtime"?: matchN(1, [#devEngineDependency, [...#devEngineDependency]])
322
323 // Specifies which package managers are supported for development
324 "packageManager"?: matchN(1, [#devEngineDependency, [...#devEngineDependency]])
325 ...
326 }
327
328 // DEPRECATED: This option used to trigger an npm warning, but it
329 // will no longer warn. It is purely there for informational
330 // purposes. It is now recommended that you install any binaries
331 // as local devDependencies wherever possible.
332 "preferGlobal"?: bool
333
334 // If set to true, then npm will refuse to publish it.
335 "private"?: matchN(1, [bool, "false" | "true"])
336 "publishConfig"?: {
337 "access"?: "public" | "restricted"
338 "tag"?: string
339 "registry"?: net.AbsURL
340 "provenance"?: bool
341 ...
342 }
343 "dist"?: {
344 "shasum"?: string
345 "tarball"?: string
346 ...
347 }
348 "readme"?: string
349
350 // An ECMAScript module ID that is the primary entry point to your
351 // program.
352 "module"?: string
353
354 // A module ID with untranspiled code that is the primary entry
355 // point to your program.
356 "esnext"?: string | {
357 "main"?: string
358 "browser"?: string
359 {[!~"^(main|browser)$"]: string}
360 }
361
362 // Allows packages within a directory to depend on one another
363 // using direct linking of local files. Additionally,
364 // dependencies within a workspace are hoisted to the workspace
365 // root when possible to reduce duplication. Note: It's also a
366 // good idea to set "private" to true when using this feature.
367 "workspaces"?: matchN(>=1, [[...string], {
368 // Workspace package paths. Glob patterns are supported.
369 "packages"?: [...string]
370
371 // Packages to block from hoisting to the workspace root.
372 // Currently only supported in Yarn only.
373 "nohoist"?: [...string]
374 ...
375 }])
376 "jspm"?: _schema
377 "eslintConfig"?: eslint.#Schema
378 "prettier"?: prettier.#Schema
379 "stylelint"?: stylelint.#Schema
380 "ava"?: ava.#Schema
381 "release"?: semanticrelease.#Schema
382 "jscpd"?: jscpd.#Schema
383 "madge"?: madge.#Schema
384 "nodemonConfig"?: nodemon.#Schema
385 "quikrun"?: quikrun.#Schema
386
387 // Defines pnpm specific configuration.
388 "pnpm"?: close({
389 // Used to override any dependency in the dependency graph.
390 "overrides"?: {
391 ...
392 }
393
394 // Used to extend the existing package definitions with additional
395 // information.
396 "packageExtensions"?: close({
397 {[=~"^.+$"]: close({
398 "dependencies"?: #dependency, "optionalDependencies"?: #optionalDependency, "peerDependencies"?: #peerDependency, "peerDependenciesMeta"?: #peerDependencyMeta
399 })
400 }
401 })
402 "peerDependencyRules"?: close({
403 // pnpm will not print warnings about missing peer dependencies
404 // from this list.
405 "ignoreMissing"?: [...string]
406
407 // Unmet peer dependency warnings will not be printed for peer
408 // dependencies of the specified range.
409 "allowedVersions"?: {
410 ...
411 }
412
413 // Any peer dependency matching the pattern will be resolved from
414 // any version, regardless of the range specified in
415 // "peerDependencies".
416 "allowAny"?: [...string]
417 })
418
419 // A list of dependencies to run builds for.
420 "neverBuiltDependencies"?: [...string]
421
422 // A list of package names that are allowed to be executed during
423 // installation.
424 "onlyBuiltDependencies"?: [...string]
425
426 // Specifies a JSON file that lists the only packages permitted to
427 // run installation scripts during the pnpm install process.
428 "onlyBuiltDependenciesFile"?: string
429
430 // A list of package names that should not be built during
431 // installation.
432 "ignoredBuiltDependencies"?: [...string]
433
434 // A list of deprecated versions that the warnings are suppressed.
435 "allowedDeprecatedVersions"?: {
436 ...
437 }
438
439 // A list of dependencies that are patched.
440 "patchedDependencies"?: {
441 ...
442 }
443
444 // When true, installation won't fail if some of the patches from
445 // the "patchedDependencies" field were not applied.
446 "allowNonAppliedPatches"?: bool
447
448 // When true, installation won't fail if some of the patches from
449 // the "patchedDependencies" field were not applied.
450 "allowUnusedPatches"?: bool
451 "updateConfig"?: close({
452 // A list of packages that should be ignored when running "pnpm
453 // outdated" or "pnpm update --latest".
454 "ignoreDependencies"?: [...string]
455 })
456
457 // Configurational dependencies are installed before all the other
458 // types of dependencies (before 'dependencies',
459 // 'devDependencies', 'optionalDependencies').
460 "configDependencies"?: {
461 ...
462 }
463 "auditConfig"?: close({
464 // A list of CVE IDs that will be ignored by "pnpm audit".
465 "ignoreCves"?: [...=~"^CVE-\\d{4}-\\d{4,7}$"]
466
467 // A list of GHSA Codes that will be ignored by "pnpm audit".
468 "ignoreGhsas"?: [...=~"^GHSA(-[23456789cfghjmpqrvwx]{4}){3}$"]
469 })
470
471 // A list of scripts that must exist in each project.
472 "requiredScripts"?: [...string]
473
474 // Specifies architectures for which you'd like to install
475 // optional dependencies, even if they don't match the
476 // architecture of the system running the install.
477 "supportedArchitectures"?: close({
478 "os"?: [...string]
479 "cpu"?: [...string]
480 "libc"?: [...string]
481 })
482
483 // A list of optional dependencies that the install should be
484 // skipped.
485 "ignoredOptionalDependencies"?: [...string]
486 "executionEnv"?: close({
487 // Specifies which exact Node.js version should be used for the
488 // project's runtime.
489 "nodeVersion"?: string
490 })
491 })
492
493 // Defines the StackBlitz configuration for the project.
494 "stackblitz"?: close({
495 // StackBlitz automatically installs npm dependencies when opening
496 // a project.
497 "installDependencies"?: bool
498
499 // A terminal command to be executed when opening the project,
500 // after installing npm dependencies.
501 "startCommand"?: bool | string
502
503 // The compileTrigger option controls how file changes in the
504 // editor are written to the WebContainers in-memory filesystem.
505 "compileTrigger"?: "auto" | "keystroke" | "save"
506
507 // A map of default environment variables that will be set in each
508 // top-level shell process.
509 "env"?: {
510 ...
511 }
512 })
513
514 // Records which dependencies are permitted to run install scripts
515 // (preinstall, install, postinstall, and prepare for
516 // non-registry sources). Maintained via the "npm
517 // approve-scripts" command, which enforces a default-deny
518 // policy: install scripts for any dependency without a matching
519 // entry are silently skipped. Keys are package identifiers —
520 // either name-only (e.g. "pkg") or pinned with a version (e.g.
521 // "pkg@1.2.3"); by default entries are pinned so approval is
522 // version-specific. A value of true allows the dependency's
523 // install scripts to run, while false explicitly denies them
524 // (existing false entries are never silently overridden).
525 "allowScripts"?: {
526 [string]: bool
527 }
528
529 // Provides hints to the Webpack compiler, denoting which files in
530 // your project are "pure" and therefore safe to prune if unused.
531 "sideEffects"?: matchN(1, [bool, list.UniqueItems() & [...string]])
532
533 {[=~"^_" & !~"^(name|version|description|keywords|homepage|bugs|license|licenses|author|contributors|maintainers|files|main|exports|imports|bin|type|types|typings|typesVersions|man|directories|repository|funding|scripts|config|dependencies|devDependencies|optionalDependencies|peerDependencies|peerDependenciesMeta|bundleDependencies|bundledDependencies|resolutions|overrides|packageManager|engines|volta|engineStrict|os|cpu|devEngines|preferGlobal|private|publishConfig|dist|readme|module|esnext|workspaces|jspm|eslintConfig|prettier|stylelint|ava|release|jscpd|madge|nodemonConfig|quikrun|pnpm|stackblitz|allowScripts|sideEffects)$"]: _}
534 ...
535
536 // Dependencies are specified with a simple hash of package name
537 // to version range. The version range is a string which has one
538 // or more space-separated descriptors. Dependencies can also be
539 // identified with a tarball or git URL.
540 #dependency: [string]: string
541
542 // Specifies dependencies that are required for the development
543 // and testing of the project. These dependencies are not needed
544 // in the production environment.
545 #devDependency: [string]: string
546
547 // Specifies requirements for development environment components
548 // such as operating systems, runtimes, or package managers. Used
549 // to ensure consistent development environments across the team.
550 #devEngineDependency: {
551 // The name of the dependency, with allowed values depending on
552 // the parent field
553 "name"!: string
554
555 // The version range for the dependency
556 "version"?: string
557
558 // What action to take if validation fails
559 "onFail"?: "ignore" | "warn" | "error" | "download"
560 ...
561 }
562
563 // URL to a website with details about how to fund the package.
564 #fundingUrl: net.AbsURL
565
566 // Used to inform about ways to help fund development of the
567 // package.
568 #fundingWay: close({
569 "url"!: #fundingUrl
570
571 // The type of funding or the platform through which funding can
572 // be provided, e.g. patreon, opencollective, tidelift or github.
573 "type"?: string
574 })
575
576 #license: matchN(>=1, [string, "AGPL-3.0-only" | "Apache-2.0" | "BSD-2-Clause" | "BSD-3-Clause" | "BSL-1.0" | "CC0-1.0" | "CDDL-1.0" | "CDDL-1.1" | "EPL-1.0" | "EPL-2.0" | "GPL-2.0-only" | "GPL-3.0-only" | "ISC" | "LGPL-2.0-only" | "LGPL-2.1-only" | "LGPL-2.1-or-later" | "LGPL-3.0-only" | "LGPL-3.0-or-later" | "MIT" | "MPL-2.0" | "MS-PL" | "UNLICENSED"])
577
578 // Specifies dependencies that are optional for your project.
579 // These dependencies are attempted to be installed during the
580 // npm install process, but if they fail to install, the
581 // installation process will not fail.
582 #optionalDependency: [string]: string
583
584 #packageExportsEntry: matchN(1, [#packageExportsEntryPath, #packageExportsEntryObject])
585
586 // Used to specify conditional exports, note that Conditional
587 // exports are unsupported in older environments, so it's
588 // recommended to use the fallback array option if support for
589 // those environments is a concern.
590 #packageExportsEntryObject: close({
591 "require"?: #packageExportsEntryOrFallback
592 "import"?: #packageExportsEntryOrFallback
593 "module-sync"?: #packageExportsEntryOrFallback
594 "node"?: #packageExportsEntryOrFallback
595 "default"?: #packageExportsEntryOrFallback
596 "types"?: #packageExportsEntryOrFallback
597
598 {[=~"^[^.0-9]+$" & !~"^(require|import|module-sync|node|default|types)$"]: #packageExportsEntryOrFallback}
599
600 {[=~"^types@.+$" & !~"^(require|import|module-sync|node|default|types)$"]: #packageExportsEntryOrFallback}
601 })
602
603 #packageExportsEntryOrFallback: matchN(1, [#packageExportsEntry, #packageExportsFallback])
604
605 // The module path that is resolved when this specifier is
606 // imported. Set to `null` to disallow importing this module.
607 #packageExportsEntryPath: null | =~"^\\./"
608
609 // Used to allow fallbacks in case this environment doesn't
610 // support the preceding entries.
611 #packageExportsFallback: [...#packageExportsEntry]
612
613 #packageImportsEntry: matchN(1, [#packageImportsEntryPath, #packageImportsEntryObject])
614
615 // Used to specify conditional exports, note that Conditional
616 // exports are unsupported in older environments, so it's
617 // recommended to use the fallback array option if support for
618 // those environments is a concern.
619 #packageImportsEntryObject: close({
620 "require"?: #packageImportsEntryOrFallback
621 "import"?: #packageImportsEntryOrFallback
622 "node"?: #packageImportsEntryOrFallback
623 "default"?: #packageImportsEntryOrFallback
624 "types"?: #packageImportsEntryOrFallback
625
626 {[=~"^[^.0-9]+$" & !~"^(require|import|node|default|types)$"]: #packageImportsEntryOrFallback}
627
628 {[=~"^types@.+$" & !~"^(require|import|node|default|types)$"]: #packageImportsEntryOrFallback}
629 })
630
631 #packageImportsEntryOrFallback: matchN(1, [#packageImportsEntry, #packageImportsFallback])
632
633 // The module path that is resolved when this specifier is
634 // imported. Set to `null` to disallow importing this module.
635 #packageImportsEntryPath: null | string
636
637 // Used to allow fallbacks in case this environment doesn't
638 // support the preceding entries.
639 #packageImportsFallback: [...#packageImportsEntry]
640
641 // Specifies dependencies that are required by the package but are
642 // expected to be provided by the consumer of the package.
643 #peerDependency: [string]: string
644
645 // When a user installs your package, warnings are emitted if
646 // packages specified in "peerDependencies" are not already
647 // installed. The "peerDependenciesMeta" field serves to provide
648 // more information on how your peer dependencies are utilized.
649 // Most commonly, it allows peer dependencies to be marked as
650 // optional. Metadata for this field is specified with a simple
651 // hash of the package name to a metadata object.
652 #peerDependencyMeta: [string]: {
653 // Specifies that this peer dependency is optional and should not
654 // be installed automatically.
655 "optional"?: bool
656 ...
657 }
658
659 // A person who has been involved in creating or maintaining this
660 // package.
661 #person: string | {
662 "name"!: string
663 "url"?: net.AbsURL
664 "email"?: string
665 ...
666 }
667
668 // Specifies a supported JavaScript runtime.
669 #runtimeEngineDependency: {
670 // The runtime name
671 "name"!: string
672
673 // The version range for the runtime
674 "version"?: string
675
676 // What action to take if runtime validation fails
677 "onFail"?: "ignore" | "warn" | "error" | "download"
678 ...
679 }
680
681 // Run AFTER the package is installed.
682 #scriptsInstallAfter: string
683
684 // Run AFTER the package is published.
685 #scriptsPublishAfter: string
686
687 // Run by the 'npm restart' command. Note: 'npm restart' will run
688 // the stop and start scripts if no restart script is provided.
689 #scriptsRestart: string
690
691 // Run by the 'npm start' command.
692 #scriptsStart: string
693
694 // Run by the 'npm stop' command.
695 #scriptsStop: string
696
697 // Run by the 'npm test' command.
698 #scriptsTest: string
699
700 // Run BEFORE the package is uninstalled.
701 #scriptsUninstallBefore: string
702
703 // Run BEFORE bump the package version.
704 #scriptsVersionBefore: string
705 }
706}