@astryxdesign/cli 0.7.17 → 0.7.18-canary.g6dfc0b6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/api/discover/_adapter.d.mts +7 -5
- package/api/discover/_adapter.mjs +12 -11
- package/api/doctor/_adapter.d.mts +11 -62
- package/api/doctor/_adapter.mjs +242 -472
- package/api/doctor/doctor.d.mts +1 -1
- package/api/doctor/doctor.mjs +1 -1
- package/api/doctor/theme-checks.mjs +37 -45
- package/api/error.d.mts +21 -0
- package/api/error.mjs +89 -0
- package/api/hook/list/list.d.mts +1 -1
- package/api/icon/icon.doc.mjs +1 -1
- package/api/icon/icon.type.mjs +1 -1
- package/api/icon/search/search.d.mts +4 -1
- package/api/icon/search/search.mjs +41 -4
- package/api/render/_adapter.mjs +233 -40
- package/api/render/render.type.d.mts +1 -1
- package/api/render/render.type.mjs +1 -1
- package/api/search/ORDERING.md +2 -2
- package/api/search/_candidate-score.mjs +32 -8
- package/api/search/_cards.json +1 -1
- package/api/search/_compound.d.mts +0 -1
- package/api/search/_compound.mjs +93 -2
- package/api/search/_lexical.mjs +177 -17
- package/api/search/_order.d.mts +3 -1
- package/api/search/_order.mjs +16 -5
- package/api/search/_result.d.mts +9 -0
- package/api/search/_result.mjs +10 -0
- package/api/search/_score.mjs +21 -3
- package/api/swizzle/_moduleGraph.d.mts +8 -0
- package/api/swizzle/_moduleGraph.mjs +61 -3
- package/api/template/copy/copy.mjs +5 -3
- package/api/theme/_adapter.mjs +48 -12
- package/api/theme/build/build.d.mts +4 -0
- package/api/theme/build/build.mjs +69 -18
- package/api/theme/build/style-keys.mjs +4 -5
- package/api/theme/build/theme-object.mjs +5 -0
- package/api/theme/palette/generate/color.d.mts +47 -0
- package/api/theme/palette/generate/color.mjs +58 -1
- package/api/theme/palette/generate/derive-look.d.mts +293 -0
- package/api/theme/palette/generate/derive-look.mjs +1362 -0
- package/api/theme/palette/generate/editor-look.d.mts +62 -0
- package/api/theme/palette/generate/editor-look.mjs +550 -0
- package/api/theme/palette/generate/mapping.d.mts +94 -9
- package/api/theme/palette/generate/mapping.mjs +94 -22
- package/api/theme-edit/_adapter.mjs +10 -1
- package/api/theme-edit/_catalog.d.mts +13 -13
- package/api/theme-edit/_catalog.mjs +38 -16
- package/api/theme-edit/_check.d.mts +82 -6
- package/api/theme-edit/_check.mjs +1230 -223
- package/api/theme-edit/_color.d.mts +74 -0
- package/api/theme-edit/_color.mjs +168 -3
- package/api/theme-edit/_compiler.d.mts +3 -5
- package/api/theme-edit/_compiler.mjs +122 -23
- package/api/theme-edit/_context.d.mts +46 -5
- package/api/theme-edit/_context.mjs +97 -49
- package/api/theme-edit/_css.d.mts +11 -0
- package/api/theme-edit/_css.mjs +40 -0
- package/api/theme-edit/_edit.d.mts +13 -0
- package/api/theme-edit/_edit.mjs +1450 -128
- package/api/theme-edit/_how-commands.d.mts +12 -0
- package/api/theme-edit/_how-commands.mjs +96 -14
- package/api/theme-edit/_how-question.d.mts +73 -29
- package/api/theme-edit/_how-question.mjs +8131 -1209
- package/api/theme-edit/_how-sides.d.mts +22 -0
- package/api/theme-edit/_how-sides.mjs +173 -0
- package/api/theme-edit/_how-steps.d.mts +42 -0
- package/api/theme-edit/_how-steps.mjs +208 -0
- package/api/theme-edit/_how-values.d.mts +29 -0
- package/api/theme-edit/_how-values.mjs +111 -0
- package/api/theme-edit/_how-words.d.mts +15 -0
- package/api/theme-edit/_how-words.mjs +239 -0
- package/api/theme-edit/_how.d.mts +1 -1
- package/api/theme-edit/_how.mjs +412 -37
- package/api/theme-edit/_missed.d.mts +2 -1
- package/api/theme-edit/_missed.mjs +125 -13
- package/api/theme-edit/_normal.d.mts +5 -3
- package/api/theme-edit/_normal.mjs +54 -14
- package/api/theme-edit/_palette.d.mts +204 -4
- package/api/theme-edit/_palette.mjs +901 -25
- package/api/theme-edit/_part-pieces.d.mts +54 -0
- package/api/theme-edit/_part-pieces.mjs +179 -0
- package/api/theme-edit/_part-words.mjs +33 -5
- package/api/theme-edit/_parts.d.mts +133 -0
- package/api/theme-edit/_parts.mjs +599 -10
- package/api/theme-edit/_picture-traits.d.mts +259 -0
- package/api/theme-edit/_picture-traits.mjs +1030 -0
- package/api/theme-edit/_preview.d.mts +84 -4
- package/api/theme-edit/_preview.mjs +260 -24
- package/api/theme-edit/_project.d.mts +14 -4
- package/api/theme-edit/_project.mjs +95 -26
- package/api/theme-edit/_set-line.d.mts +29 -0
- package/api/theme-edit/_set-line.mjs +100 -0
- package/api/theme-edit/_settings.d.mts +625 -28
- package/api/theme-edit/_settings.mjs +4587 -880
- package/api/theme-edit/_tables.d.mts +25 -1
- package/api/theme-edit/_tables.mjs +115 -11
- package/api/theme-edit/_text-looks.d.mts +78 -0
- package/api/theme-edit/_text-looks.mjs +376 -0
- package/api/theme-edit/_vet.d.mts +3 -26
- package/api/theme-edit/_vet.mjs +5 -89
- package/api/theme-edit/how/how.d.mts +1 -1
- package/api/theme-edit/how/how.mjs +1 -1
- package/api/theme-edit/theme-edit.type.d.mts +54 -1
- package/api/theme-edit/theme-edit.type.mjs +17 -2
- package/api/theme-edit/themeEditHow.doc.mjs +3 -3
- package/api/theme-edit/themeEditNew.doc.mjs +4 -0
- package/api/theme-edit/themeEditSet.doc.mjs +6 -2
- package/api/theme-edit/themeEditShow.doc.mjs +4 -0
- package/api/theme-edit/themeEditUndo.doc.mjs +4 -0
- package/assets/component-list.generated.json +1 -1
- package/assets/docs/author-a-theme.doc.mjs +7 -4
- package/assets/docs/tree/export-pages.doc.mjs +1 -1
- package/assets/docs/tree/icon-sets.doc.mjs +1 -1
- package/assets/docs/use-a-theme.doc.mjs +89 -17
- package/assets/docs-routes.generated.json +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/icons/definitions/article.doc.mjs +9 -0
- package/assets/icons/template-icons.json +5 -0
- package/assets/search-catalog.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/Citation/CitationInlineText.doc.mjs +1 -1
- package/assets/templates/blocks/components/Citation/CitationInlineText.tsx +3 -1
- package/assets/templates/blocks/components/Citation/CitationShowcase.doc.mjs +1 -1
- package/assets/templates/blocks/components/Citation/CitationShowcase.tsx +3 -1
- package/assets/templates/blocks/components/Citation/CitationSourceList.doc.mjs +1 -1
- package/assets/templates/blocks/components/Citation/CitationSourceList.tsx +7 -3
- package/assets/templates/blocks/components/Markdown/MarkdownCitedContent.doc.mjs +1 -1
- package/assets/templates/blocks/components/Markdown/MarkdownCitedContent.tsx +5 -2
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ide/page.tsx +5 -10
- package/assets/templates/pages/payment-form/page.tsx +16 -60
- package/assets/templates/themes/neutral/neutralTheme.ts +4 -3
- package/authoring/debug/parse.d.mts +1 -1
- package/authoring/doctypes/_schema.d.mts +13 -13
- package/authoring/gap-report/parse.d.mts +1 -1
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/ensure-core-built.mjs +17 -10
- package/clients/cli/commands/experimental/theme.mjs +46 -6
- package/clients/cli/commands/experimental-icon.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +11 -3
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +3 -3
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +1 -1
- package/clients/cli/commands/hook.mjs +7 -0
- package/clients/cli/commands/theme-build.doc.mjs +1 -1
- package/clients/cli/index.mjs +6 -2
- package/clients/cli/lib/hook-format.mjs +41 -1
- package/clients/cli/lib/json-shim.mjs +34 -14
- package/clients/cli/lib/other-cli-words.mjs +7 -0
- package/clients/cli/lib/unknown-command.mjs +345 -46
- package/clients/cli/manifest.generated.json +1 -1
- package/foundation/agent-docs/agent-docs.d.mts +11 -2
- package/foundation/agent-docs/agent-docs.mjs +51 -8
- package/foundation/config/project.d.mts +11 -1
- package/foundation/config/project.mjs +11 -2
- package/foundation/discovery/component-replacement.d.mts +5 -8
- package/foundation/discovery/component-replacement.mjs +12 -14
- package/foundation/discovery/core-augmentation-points.d.mts +35 -0
- package/foundation/discovery/core-augmentation-points.mjs +410 -9
- package/foundation/discovery/core-elements.d.mts +6 -0
- package/foundation/discovery/core-elements.mjs +10 -2
- package/foundation/discovery/core-prop-types.d.mts +5 -0
- package/foundation/discovery/core-prop-types.mjs +10 -3
- package/foundation/discovery/core-props.d.mts +8 -0
- package/foundation/discovery/core-props.mjs +29 -13
- package/foundation/discovery/official-list.d.mts +17 -0
- package/foundation/discovery/official-list.mjs +77 -0
- package/foundation/discovery/unknown-core-props.d.mts +130 -0
- package/foundation/discovery/unknown-core-props.mjs +601 -0
- package/foundation/discovery/written-prop-values.d.mts +35 -0
- package/foundation/discovery/written-prop-values.mjs +258 -0
- package/foundation/fonts/fontsource-families.generated.d.mts +5 -0
- package/foundation/fonts/fontsource-families.generated.mjs +2110 -0
- package/foundation/fs/package-name.d.mts +10 -0
- package/foundation/fs/package-name.mjs +37 -0
- package/foundation/fs/project-source-files.d.mts +27 -0
- package/foundation/fs/project-source-files.mjs +115 -0
- package/foundation/fs/project-sources.d.mts +25 -0
- package/foundation/fs/project-sources.mjs +83 -0
- package/foundation/fs/read-record.d.mts +18 -0
- package/foundation/fs/read-record.mjs +36 -2
- package/foundation/integrations/integration-warnings.d.mts +39 -7
- package/foundation/integrations/integration-warnings.mjs +141 -19
- package/foundation/integrations/missing-dependency.d.mts +11 -0
- package/foundation/integrations/missing-dependency.mjs +20 -5
- package/foundation/release/folder-lock.d.mts +5 -2
- package/foundation/release/folder-lock.mjs +9 -3
- package/foundation/release/notices.mjs +2 -8
- package/foundation/render/cut-short.d.mts +8 -2
- package/foundation/render/cut-short.mjs +50 -5
- package/foundation/render/drawn-contrast.d.mts +38 -0
- package/foundation/render/drawn-contrast.mjs +237 -0
- package/foundation/render/file-header.mjs +4 -0
- package/foundation/render/layers.d.mts +2 -1
- package/foundation/render/layers.mjs +22 -1
- package/foundation/render/page-worker.mjs +83 -18
- package/foundation/render/part-boxes.d.mts +27 -0
- package/foundation/render/part-boxes.mjs +45 -0
- package/foundation/render/picture-chrome.mjs +36 -4
- package/foundation/render/picture-playwright.mjs +26 -2
- package/foundation/render/picture-window.d.mts +29 -2
- package/foundation/render/picture-window.mjs +99 -1
- package/foundation/render/render-page.d.mts +39 -6
- package/foundation/render/render-page.mjs +26 -10
- package/foundation/render/ts-paths.mjs +2 -1
- package/foundation/response/error-codes.doc.mjs +1 -1
- package/foundation/response/error-codes.mjs +1 -1
- package/foundation/response/response-types.doc.mjs +1 -1
- package/foundation/text/written-string.d.mts +4 -1
- package/foundation/text/written-string.mjs +4 -1
- package/package.json +8 -7
|
@@ -36,7 +36,7 @@ export const doc = {
|
|
|
36
36
|
flag: '--on <where>',
|
|
37
37
|
param: 'options.on',
|
|
38
38
|
description:
|
|
39
|
-
|
|
39
|
+
"Where it applies (default: the whole theme): a part (button, card, app-shell-header; how --list parts), a group (inputs, containers, checks, menus, or a family the census reads from each part's structure: button-like, overlays, option-rows, selected-items, accent-fills, inset-fields, status-surfaces, overlay-headers, controls; how --list groups), or for font a role (body, heading, code)",
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
flag: '--when <prop:value>',
|
|
@@ -166,6 +166,10 @@ export function registerHook(program) {
|
|
|
166
166
|
? formatHookCompact(
|
|
167
167
|
result.data,
|
|
168
168
|
result.data.importPath || '@astryxdesign/core/hooks',
|
|
169
|
+
{
|
|
170
|
+
propsCommand: `component ${result.data.name} --props`,
|
|
171
|
+
fullCommand: `hook ${result.data.name} --detail full`,
|
|
172
|
+
},
|
|
169
173
|
)
|
|
170
174
|
: formatHookFull(result.data);
|
|
171
175
|
|
|
@@ -174,6 +178,9 @@ export function registerHook(program) {
|
|
|
174
178
|
const related = result.data.relatedComponents ?? [];
|
|
175
179
|
emit(
|
|
176
180
|
record({package: result.package}),
|
|
181
|
+
// A hook documented with a component names it.
|
|
182
|
+
'subComponentOf' in result.data &&
|
|
183
|
+
record(result.data, {fields: ['subComponentOf']}),
|
|
177
184
|
code(doc),
|
|
178
185
|
related.length > 0 &&
|
|
179
186
|
text(
|
|
@@ -59,7 +59,7 @@ export const doc = {
|
|
|
59
59
|
flag: '--icons-specifier <specifier>',
|
|
60
60
|
param: 'options.iconsSpecifier',
|
|
61
61
|
description:
|
|
62
|
-
"Override the icon-registry import in the generated JS module, for example ./icons.mjs (default:
|
|
62
|
+
"Override the icon-registry import in the generated JS module, for example ./icons.mjs; the build then does not compile the registry (default: a TypeScript or JSX registry's compiled copy in <name>.modules/, or a plain JavaScript registry's own path). With --family it applies to every member's icon import",
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
flag: '-w, --watch',
|
package/clients/cli/index.mjs
CHANGED
|
@@ -720,8 +720,12 @@ export async function createProgram({argv} = {}) {
|
|
|
720
720
|
// none of the registered subcommands matched.
|
|
721
721
|
const extras = (cmd && cmd.args) || [];
|
|
722
722
|
if (extras.length > 0) {
|
|
723
|
-
const {findEntry, unknownCommandAnswer} = await import('./lib/unknown-command.mjs');
|
|
724
|
-
const answer = await unknownCommandAnswer(program, process.argv.slice(2), {
|
|
723
|
+
const {findEntry, iconFeaturesOn, projectScript, unknownCommandAnswer} = await import('./lib/unknown-command.mjs');
|
|
724
|
+
const answer = await unknownCommandAnswer(program, process.argv.slice(2), {
|
|
725
|
+
findEntry,
|
|
726
|
+
iconFeatures: iconFeaturesOn,
|
|
727
|
+
projectScript,
|
|
728
|
+
});
|
|
725
729
|
const unknown = String(extras[0]);
|
|
726
730
|
cliError(answer?.message ?? `unknown command '${unknown}'`, {
|
|
727
731
|
suggestions: answer?.suggestions,
|
|
@@ -17,9 +17,25 @@ import {loadDocs} from '../../../foundation/discovery/component-loader.mjs';
|
|
|
17
17
|
import {
|
|
18
18
|
formatAccessibility,
|
|
19
19
|
formatBestPractices,
|
|
20
|
+
formatBrief,
|
|
21
|
+
formatCompact,
|
|
22
|
+
formatFull,
|
|
20
23
|
mdCell,
|
|
21
24
|
} from './component-format.mjs';
|
|
22
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Whether a hook doc documents its options as `props`, as a component doc
|
|
28
|
+
* does, with no `params` or `returns`. A read of such a doc prints it the
|
|
29
|
+
* way a component read does, so its description, props and examples show.
|
|
30
|
+
* @param {any} docs
|
|
31
|
+
* @returns {boolean}
|
|
32
|
+
*/
|
|
33
|
+
function isPropsShaped(docs) {
|
|
34
|
+
return (
|
|
35
|
+
Array.isArray(docs.props) && !('params' in docs) && !('returns' in docs)
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
23
39
|
/**
|
|
24
40
|
* Build a signature string from hook docs.
|
|
25
41
|
* e.g. 'useFocusTrap(options: UseFocusTrapOptions): { containerRef, focusFirst }'
|
|
@@ -124,6 +140,22 @@ export function formatHookReturns(docs) {
|
|
|
124
140
|
* @returns {string}
|
|
125
141
|
*/
|
|
126
142
|
export function formatHookFull(docs) {
|
|
143
|
+
if (isPropsShaped(docs)) {
|
|
144
|
+
// The component read prints the usage text in place of the description;
|
|
145
|
+
// the whole hook read prints both, description first.
|
|
146
|
+
const usage = docs.usage?.description;
|
|
147
|
+
const both =
|
|
148
|
+
usage && docs.description && usage !== docs.description
|
|
149
|
+
? {
|
|
150
|
+
...docs,
|
|
151
|
+
usage: {
|
|
152
|
+
...docs.usage,
|
|
153
|
+
description: `${docs.description}\n\n${usage}`,
|
|
154
|
+
},
|
|
155
|
+
}
|
|
156
|
+
: docs;
|
|
157
|
+
return formatFull(both);
|
|
158
|
+
}
|
|
127
159
|
/** @type {string[]} */
|
|
128
160
|
const sections = [];
|
|
129
161
|
|
|
@@ -150,9 +182,16 @@ export function formatHookFull(docs) {
|
|
|
150
182
|
* # Name, description, ## Import, ## Best Practices, ## Parameters, ## Returns
|
|
151
183
|
* @param {any} docs
|
|
152
184
|
* @param {string} [importPath]
|
|
185
|
+
* @param {{propsCommand?: string | null, fullCommand?: string | null}} [options]
|
|
186
|
+
* - for a hook documented with props: the commands its short answer names,
|
|
187
|
+
* as a component read's does
|
|
153
188
|
* @returns {string}
|
|
154
189
|
*/
|
|
155
|
-
export function formatHookCompact(docs, importPath) {
|
|
190
|
+
export function formatHookCompact(docs, importPath, options = {}) {
|
|
191
|
+
// The caller's fallback import names the hooks entry point, which a hook
|
|
192
|
+
// documented with a component (useTableSelection) is not exported from.
|
|
193
|
+
if (isPropsShaped(docs))
|
|
194
|
+
return formatCompact(docs, docs.name, docs.importPath, options);
|
|
156
195
|
/** @type {string[]} */
|
|
157
196
|
const sections = [];
|
|
158
197
|
|
|
@@ -208,6 +247,7 @@ export function formatHookCompact(docs, importPath) {
|
|
|
208
247
|
* @returns {string}
|
|
209
248
|
*/
|
|
210
249
|
export function formatHookBrief(docs) {
|
|
250
|
+
if (isPropsShaped(docs)) return formatBrief(docs, docs.name, docs.importPath);
|
|
211
251
|
/** @type {string[]} */
|
|
212
252
|
const output = [];
|
|
213
253
|
|
|
@@ -1165,8 +1165,14 @@ async function answerStrayOption(err, rejected, message, exitCode) {
|
|
|
1165
1165
|
const stray = /unknown option '([^']+)'/.exec(message)?.[1] ?? '';
|
|
1166
1166
|
const {strayOptionAnswer, withoutStray} = await import('./stray-option.mjs');
|
|
1167
1167
|
if (!rejected.parent) {
|
|
1168
|
-
const {
|
|
1169
|
-
|
|
1168
|
+
const {
|
|
1169
|
+
findEntry,
|
|
1170
|
+
firstWord,
|
|
1171
|
+
iconFeaturesOn,
|
|
1172
|
+
projectScript,
|
|
1173
|
+
unknownCommandAnswer,
|
|
1174
|
+
} = await import('./unknown-command.mjs');
|
|
1175
|
+
const context = {findEntry, iconFeatures: iconFeaturesOn, projectScript};
|
|
1170
1176
|
// Only a word before the stray option is read as the command: after it,
|
|
1171
1177
|
// the word may be the option's value (`astryx --format text component
|
|
1172
1178
|
// Table`), and the unknown option stays the fault.
|
|
@@ -1179,13 +1185,15 @@ async function answerStrayOption(err, rejected, message, exitCode) {
|
|
|
1179
1185
|
) {
|
|
1180
1186
|
/** @param {Awaited<ReturnType<typeof unknownCommandAnswer>>} a */
|
|
1181
1187
|
const withRun = a =>
|
|
1182
|
-
a
|
|
1188
|
+
a && !a.fallback && a.suggestions.some(s => !a.near?.includes(s.name))
|
|
1189
|
+
? a
|
|
1190
|
+
: null;
|
|
1183
1191
|
// The whole run first: a command the words point at can take the
|
|
1184
1192
|
// option (`migrate --from 0.6.0` is `upgrade --from 0.6.0`). Without a
|
|
1185
1193
|
// run, the run without the option.
|
|
1186
1194
|
const answer =
|
|
1187
|
-
withRun(await unknownCommandAnswer(rejected, words,
|
|
1188
|
-
(await unknownCommandAnswer(rejected, cleaned,
|
|
1195
|
+
withRun(await unknownCommandAnswer(rejected, words, context)) ??
|
|
1196
|
+
(await unknownCommandAnswer(rejected, cleaned, context));
|
|
1189
1197
|
setOutcome('parse-error', {
|
|
1190
1198
|
exitCode: exitCode || 1,
|
|
1191
1199
|
error: new Error(answer?.message ?? message),
|
|
@@ -1198,15 +1206,27 @@ async function answerStrayOption(err, rejected, message, exitCode) {
|
|
|
1198
1206
|
exitCode,
|
|
1199
1207
|
answer && {
|
|
1200
1208
|
message: answer.message,
|
|
1201
|
-
// Only
|
|
1202
|
-
//
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1209
|
+
// Only runs: a near command name is no run to print after `Run:`,
|
|
1210
|
+
// so the help run, with the options typed, stands in for those. A
|
|
1211
|
+
// run of the project's own script keeps its package manager.
|
|
1212
|
+
suggestions: [
|
|
1213
|
+
...answer.suggestions
|
|
1214
|
+
.filter(s => !answer.near?.includes(s.name))
|
|
1215
|
+
.map(s => ({
|
|
1216
|
+
name: s.name.startsWith('astryx ')
|
|
1217
|
+
? formatCliCommand(s.name)
|
|
1218
|
+
: s.name,
|
|
1219
|
+
reason: s.reason,
|
|
1220
|
+
})),
|
|
1221
|
+
...(answer.near
|
|
1222
|
+
? [
|
|
1223
|
+
{
|
|
1224
|
+
name: formatCliCommand(answer.help.name),
|
|
1225
|
+
reason: answer.help.reason,
|
|
1226
|
+
},
|
|
1227
|
+
]
|
|
1228
|
+
: []),
|
|
1229
|
+
],
|
|
1210
1230
|
},
|
|
1211
1231
|
ERROR_CODES.ERR_UNKNOWN_COMMAND,
|
|
1212
1232
|
);
|
|
@@ -90,6 +90,13 @@ export const JOB_WORDS = [
|
|
|
90
90
|
notNeededWith: ['--list', '--registry'],
|
|
91
91
|
reason: 'upgrade runs the codemods for a new version',
|
|
92
92
|
},
|
|
93
|
+
{
|
|
94
|
+
word: 'update',
|
|
95
|
+
usedBy: 'npm (`npm update`)',
|
|
96
|
+
run: ['upgrade', '--from', '<old-version>'],
|
|
97
|
+
notNeededWith: ['--list', '--registry'],
|
|
98
|
+
reason: 'upgrade runs the codemods for a new version',
|
|
99
|
+
},
|
|
93
100
|
{
|
|
94
101
|
word: 'browse',
|
|
95
102
|
usedBy: 'GitHub CLI (`gh extension browse`)',
|