@atlaskit/ads-cli 0.11.0 → 0.11.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/CHANGELOG.md +10 -0
- package/README.md +3 -1
- package/dist/cjs/commands/run-tool.js +1 -1
- package/dist/cjs/output/format-token.js +5 -2
- package/dist/cjs/types.js +1 -1
- package/dist/es2019/commands/run-tool.js +1 -1
- package/dist/es2019/output/format-token.js +5 -2
- package/dist/es2019/types.js +1 -1
- package/dist/esm/commands/run-tool.js +1 -1
- package/dist/esm/output/format-token.js +5 -2
- package/dist/esm/types.js +1 -1
- package/dist/types/commands/run-tool.d.ts +1 -1
- package/dist/types/types.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/ads-cli
|
|
2
2
|
|
|
3
|
+
## 0.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9b565c62c7a8d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9b565c62c7a8d) -
|
|
8
|
+
Return the canonical per-token description from the tokens package in detailed token searches and
|
|
9
|
+
CLI JSON output. Show that description as the CLI's token guidance instead of generic category
|
|
10
|
+
guidance, while retaining CSS property hints and compact search results.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 0.11.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -135,7 +135,9 @@ exists; JSON output reports the skills, `AGENTS.md`, Atlas, and next-step status
|
|
|
135
135
|
same compact fields shown by the human rows rather than embedding every component prop and
|
|
136
136
|
example. Each search record includes a machine-readable `followUp`; run that exact detail command
|
|
137
137
|
for the full component, token, or icon data. Exact detail commands retain the information shown by
|
|
138
|
-
their human view, including token `
|
|
138
|
+
their human view, including the canonical token `description`, shared `usageGuidelines`, token
|
|
139
|
+
`usage`, and an icon `import`. Individual token views use the tokens package's per-token
|
|
140
|
+
description as their guidance, falling back to category guidance only if no description exists.
|
|
139
141
|
`manifest --json` is the intentional exception: it remains the full CLI contract.
|
|
140
142
|
- **Lookups never silently guess.** `component`/`token`/`icon <name>` — and a fuzzy
|
|
141
143
|
`lint-rules <term>` — render the entry whose name matches exactly (case-insensitively). If there
|
|
@@ -55,7 +55,7 @@ var getTextBlocks = function getTextBlocks(result) {
|
|
|
55
55
|
* Invoke an ADS MCP tool handler and unwrap its result into plain data.
|
|
56
56
|
*
|
|
57
57
|
* @param handler - The tool function (e.g. `searchComponentsTool`).
|
|
58
|
-
* @param args - The arguments object matching the tool's
|
|
58
|
+
* @param args - The arguments object matching the tool's input shape, or `undefined`
|
|
59
59
|
* for zero-argument tools such as `getAllComponentsTool`.
|
|
60
60
|
*/
|
|
61
61
|
var runTool = exports.runTool = /*#__PURE__*/function () {
|
|
@@ -38,8 +38,11 @@ var formatToken = exports.formatToken = function formatToken(data) {
|
|
|
38
38
|
if (token.exampleValue) {
|
|
39
39
|
sections.push('', "Example value: ".concat(token.exampleValue));
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
|
|
42
|
+
// Prefer the canonical per-token description over the broader category guidance.
|
|
43
|
+
var guidance = token.description || ((_token$usageGuideline = token.usageGuidelines) !== null && _token$usageGuideline !== void 0 && _token$usageGuideline.usage ? oneLine(token.usageGuidelines.usage) : undefined);
|
|
44
|
+
if (guidance) {
|
|
45
|
+
sections.push('', 'Guidelines:', " ".concat(guidance));
|
|
43
46
|
}
|
|
44
47
|
if ((_token$usageGuideline2 = token.usageGuidelines) !== null && _token$usageGuideline2 !== void 0 && (_token$usageGuideline2 = _token$usageGuideline2.cssProperties) !== null && _token$usageGuideline2 !== void 0 && _token$usageGuideline2.length) {
|
|
45
48
|
sections.push.apply(sections, ['', 'CSS properties:'].concat((0, _toConsumableArray2.default)(token.usageGuidelines.cssProperties.map(function (item) {
|
package/dist/cjs/types.js
CHANGED
|
@@ -26,7 +26,7 @@ exports.ExitCode = void 0;
|
|
|
26
26
|
/**
|
|
27
27
|
* Any ADS MCP tool handler: takes an optional arguments object and resolves to a
|
|
28
28
|
* {@link ToolResult}. Kept intentionally loose (`unknown` args) because each tool has its
|
|
29
|
-
* own
|
|
29
|
+
* own input type and schema; the registry is responsible for building well-formed args.
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -38,7 +38,7 @@ const getTextBlocks = result => result.content.filter(item => item.type === 'tex
|
|
|
38
38
|
* Invoke an ADS MCP tool handler and unwrap its result into plain data.
|
|
39
39
|
*
|
|
40
40
|
* @param handler - The tool function (e.g. `searchComponentsTool`).
|
|
41
|
-
* @param args - The arguments object matching the tool's
|
|
41
|
+
* @param args - The arguments object matching the tool's input shape, or `undefined`
|
|
42
42
|
* for zero-argument tools such as `getAllComponentsTool`.
|
|
43
43
|
*/
|
|
44
44
|
export const runTool = async ({
|
|
@@ -27,8 +27,11 @@ export const formatToken = data => {
|
|
|
27
27
|
if (token.exampleValue) {
|
|
28
28
|
sections.push('', `Example value: ${token.exampleValue}`);
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
|
|
31
|
+
// Prefer the canonical per-token description over the broader category guidance.
|
|
32
|
+
const guidance = token.description || ((_token$usageGuideline = token.usageGuidelines) !== null && _token$usageGuideline !== void 0 && _token$usageGuideline.usage ? oneLine(token.usageGuidelines.usage) : undefined);
|
|
33
|
+
if (guidance) {
|
|
34
|
+
sections.push('', 'Guidelines:', ` ${guidance}`);
|
|
32
35
|
}
|
|
33
36
|
if ((_token$usageGuideline2 = token.usageGuidelines) !== null && _token$usageGuideline2 !== void 0 && (_token$usageGuideline3 = _token$usageGuideline2.cssProperties) !== null && _token$usageGuideline3 !== void 0 && _token$usageGuideline3.length) {
|
|
34
37
|
sections.push('', 'CSS properties:', ...token.usageGuidelines.cssProperties.map(item => ` ${item}`));
|
package/dist/es2019/types.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
/**
|
|
21
21
|
* Any ADS MCP tool handler: takes an optional arguments object and resolves to a
|
|
22
22
|
* {@link ToolResult}. Kept intentionally loose (`unknown` args) because each tool has its
|
|
23
|
-
* own
|
|
23
|
+
* own input type and schema; the registry is responsible for building well-formed args.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -48,7 +48,7 @@ var getTextBlocks = function getTextBlocks(result) {
|
|
|
48
48
|
* Invoke an ADS MCP tool handler and unwrap its result into plain data.
|
|
49
49
|
*
|
|
50
50
|
* @param handler - The tool function (e.g. `searchComponentsTool`).
|
|
51
|
-
* @param args - The arguments object matching the tool's
|
|
51
|
+
* @param args - The arguments object matching the tool's input shape, or `undefined`
|
|
52
52
|
* for zero-argument tools such as `getAllComponentsTool`.
|
|
53
53
|
*/
|
|
54
54
|
export var runTool = /*#__PURE__*/function () {
|
|
@@ -31,8 +31,11 @@ export var formatToken = function formatToken(data) {
|
|
|
31
31
|
if (token.exampleValue) {
|
|
32
32
|
sections.push('', "Example value: ".concat(token.exampleValue));
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
|
|
35
|
+
// Prefer the canonical per-token description over the broader category guidance.
|
|
36
|
+
var guidance = token.description || ((_token$usageGuideline = token.usageGuidelines) !== null && _token$usageGuideline !== void 0 && _token$usageGuideline.usage ? oneLine(token.usageGuidelines.usage) : undefined);
|
|
37
|
+
if (guidance) {
|
|
38
|
+
sections.push('', 'Guidelines:', " ".concat(guidance));
|
|
36
39
|
}
|
|
37
40
|
if ((_token$usageGuideline2 = token.usageGuidelines) !== null && _token$usageGuideline2 !== void 0 && (_token$usageGuideline2 = _token$usageGuideline2.cssProperties) !== null && _token$usageGuideline2 !== void 0 && _token$usageGuideline2.length) {
|
|
38
41
|
sections.push.apply(sections, ['', 'CSS properties:'].concat(_toConsumableArray(token.usageGuidelines.cssProperties.map(function (item) {
|
package/dist/esm/types.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
/**
|
|
21
21
|
* Any ADS MCP tool handler: takes an optional arguments object and resolves to a
|
|
22
22
|
* {@link ToolResult}. Kept intentionally loose (`unknown` args) because each tool has its
|
|
23
|
-
* own
|
|
23
|
+
* own input type and schema; the registry is responsible for building well-formed args.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -28,7 +28,7 @@ export type UnwrappedToolResult = {
|
|
|
28
28
|
* Invoke an ADS MCP tool handler and unwrap its result into plain data.
|
|
29
29
|
*
|
|
30
30
|
* @param handler - The tool function (e.g. `searchComponentsTool`).
|
|
31
|
-
* @param args - The arguments object matching the tool's
|
|
31
|
+
* @param args - The arguments object matching the tool's input shape, or `undefined`
|
|
32
32
|
* for zero-argument tools such as `getAllComponentsTool`.
|
|
33
33
|
*/
|
|
34
34
|
export declare const runTool: ({ handler, args, }: {
|
package/dist/types/types.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export type ToolResult = {
|
|
|
25
25
|
/**
|
|
26
26
|
* Any ADS MCP tool handler: takes an optional arguments object and resolves to a
|
|
27
27
|
* {@link ToolResult}. Kept intentionally loose (`unknown` args) because each tool has its
|
|
28
|
-
* own
|
|
28
|
+
* own input type and schema; the registry is responsible for building well-formed args.
|
|
29
29
|
*/
|
|
30
30
|
export type ToolHandler = (args?: unknown) => Promise<ToolResult>;
|
|
31
31
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/ads-cli",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "An npx-runnable command-line tool to query Atlassian Design System (ADS) structured content — components, tokens, icons, and guidelines — from the terminal.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"release:atlas:promote": "bash scripts/atlas/promote-stable.sh"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/ads-mcp": "^1.
|
|
34
|
+
"@atlaskit/ads-mcp": "^1.11.0",
|
|
35
35
|
"@atlaskit/cli-output": "^0.1.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"chalk": "^4.1.2"
|