toolmenu 0.18.0 → 0.20.1
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 +18 -5
- package/dist/auto.js +9 -3
- package/dist/catalog.js +4 -0
- package/dist/cli.js +10 -3
- package/dist/clients.d.ts +7 -1
- package/dist/clients.js +29 -6
- package/dist/config.d.ts +2 -0
- package/dist/config.js +6 -2
- package/dist/diff.js +90 -0
- package/dist/explain.d.ts +8 -0
- package/dist/explain.js +44 -5
- package/dist/failures.d.ts +1 -1
- package/dist/failures.js +12 -2
- package/dist/help.js +2 -1
- package/dist/lists.d.ts +40 -0
- package/dist/lists.js +91 -0
- package/dist/options.d.ts +3 -0
- package/dist/options.js +1 -0
- package/dist/report.d.ts +1 -1
- package/dist/report.js +19 -1
- package/dist/rules/clients.js +2 -2
- package/dist/rules/description.js +1 -1
- package/dist/rules/index.js +5 -1
- package/dist/rules/lists.d.ts +16 -0
- package/dist/rules/lists.js +102 -0
- package/dist/rules/rule.d.ts +2 -0
- package/dist/rules/search.js +2 -2
- package/dist/rules/spec.d.ts +2 -0
- package/dist/rules/spec.js +17 -8
- package/dist/rules/write.d.ts +7 -0
- package/dist/rules/write.js +41 -7
- package/dist/snapshot.d.ts +5 -0
- package/dist/snapshot.js +33 -2
- package/dist/types.d.ts +4 -0
- package/dist/words.d.ts +6 -0
- package/dist/words.js +9 -0
- package/package.json +1 -1
package/dist/words.d.ts
CHANGED
|
@@ -15,5 +15,11 @@ export declare function article(word: string): 'a' | 'an';
|
|
|
15
15
|
export declare function commonWords(names: string[]): Set<string>;
|
|
16
16
|
/** The tool's verb: the first word that is one, skipping prefixes like `API-`. */
|
|
17
17
|
export declare function verbOf(name: string): string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The verb a name leads with, after any prefix most of the menu's tools share
|
|
20
|
+
* (copilot_studio_clear_read_cache → clear): the verb of what the tool does, not one
|
|
21
|
+
* in its object (score_status_update scores; "update" is what it scores).
|
|
22
|
+
*/
|
|
23
|
+
export declare function leadingVerb(name: string, common?: Set<string>): string | undefined;
|
|
18
24
|
/** The nouns in a tool name, singular: `list_team_audits` → team, audit. */
|
|
19
25
|
export declare function nouns(name: string): string[];
|
package/dist/words.js
CHANGED
|
@@ -68,6 +68,15 @@ export function commonWords(names) {
|
|
|
68
68
|
export function verbOf(name) {
|
|
69
69
|
return words(name).find((w) => VERBS.has(w));
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* The verb a name leads with, after any prefix most of the menu's tools share
|
|
73
|
+
* (copilot_studio_clear_read_cache → clear): the verb of what the tool does, not one
|
|
74
|
+
* in its object (score_status_update scores; "update" is what it scores).
|
|
75
|
+
*/
|
|
76
|
+
export function leadingVerb(name, common = new Set()) {
|
|
77
|
+
const first = words(name).find((w) => !common.has(w));
|
|
78
|
+
return first !== undefined && VERBS.has(first) ? first : undefined;
|
|
79
|
+
}
|
|
71
80
|
/** The nouns in a tool name, singular: `list_team_audits` → team, audit. */
|
|
72
81
|
export function nouns(name) {
|
|
73
82
|
return words(name)
|
package/package.json
CHANGED