@atlaskit/ads-cli 0.12.4 → 1.0.0
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
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/ads-cli
|
|
2
2
|
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`29098241886e4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/29098241886e4) -
|
|
8
|
+
Rename `designSource.figmaUrl` to `references.figmaUrl` in component and pattern payloads. Update
|
|
9
|
+
consumers of ADS MCP responses and ADS CLI or Platform CLI detail JSON to read
|
|
10
|
+
`references.figmaUrl`. Figma URLs and human-readable links are unchanged.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 0.12.4
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -12,7 +12,7 @@ var _humanFormat = require("@atlaskit/cli-output/human-format");
|
|
|
12
12
|
* Human-readable renderer for a single ADS component's detailed docs.
|
|
13
13
|
*
|
|
14
14
|
* Renders the `component <Name>` view: a readable header, a props table, and the usage examples —
|
|
15
|
-
* instead of dumping the raw JSON payload. Full structured data (including the `
|
|
15
|
+
* instead of dumping the raw JSON payload. Full structured data (including the `references` link
|
|
16
16
|
* and untruncated types) remains available via `--json`.
|
|
17
17
|
*/
|
|
18
18
|
|
|
@@ -60,7 +60,7 @@ var formatExamples = function formatExamples(examples) {
|
|
|
60
60
|
* data is not a recognisable component object, so the caller can fall back to generic rendering.
|
|
61
61
|
*/
|
|
62
62
|
var formatComponent = exports.formatComponent = function formatComponent(data) {
|
|
63
|
-
var _component$usageGuide, _component$props, _component$examples, _component$
|
|
63
|
+
var _component$usageGuide, _component$props, _component$examples, _component$references;
|
|
64
64
|
// `component <name>` reuses component search with limit 1, so `data` is a one-element array.
|
|
65
65
|
var component = Array.isArray(data) ? data[0] : data;
|
|
66
66
|
if (!component || (0, _typeof2.default)(component) !== 'object' || typeof component.name !== 'string') {
|
|
@@ -81,11 +81,11 @@ var formatComponent = exports.formatComponent = function formatComponent(data) {
|
|
|
81
81
|
sections.push.apply(sections, [''].concat((0, _toConsumableArray2.default)(examples)));
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
// Render the design link from the `figmaUrl` inside `
|
|
85
|
-
// URL is actually present, so a `
|
|
84
|
+
// Render the design link from the `figmaUrl` inside `references`. Only emit the line when a
|
|
85
|
+
// URL is actually present, so a `references` object without a `figmaUrl` doesn't print
|
|
86
86
|
// `Design: undefined`.
|
|
87
|
-
if ((_component$
|
|
88
|
-
sections.push('', "".concat(_humanFormat.humanFormat.section('Design:'), " ").concat(_humanFormat.humanFormat.action(component.
|
|
87
|
+
if ((_component$references = component.references) !== null && _component$references !== void 0 && _component$references.figmaUrl) {
|
|
88
|
+
sections.push('', "".concat(_humanFormat.humanFormat.section('Design:'), " ").concat(_humanFormat.humanFormat.action(component.references.figmaUrl)));
|
|
89
89
|
}
|
|
90
90
|
return sections.join('\n');
|
|
91
91
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Human-readable renderer for a single ADS component's detailed docs.
|
|
3
3
|
*
|
|
4
4
|
* Renders the `component <Name>` view: a readable header, a props table, and the usage examples —
|
|
5
|
-
* instead of dumping the raw JSON payload. Full structured data (including the `
|
|
5
|
+
* instead of dumping the raw JSON payload. Full structured data (including the `references` link
|
|
6
6
|
* and untruncated types) remains available via `--json`.
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -50,7 +50,7 @@ const formatExamples = examples => {
|
|
|
50
50
|
* data is not a recognisable component object, so the caller can fall back to generic rendering.
|
|
51
51
|
*/
|
|
52
52
|
export const formatComponent = data => {
|
|
53
|
-
var _component$usageGuide, _component$props, _component$examples, _component$
|
|
53
|
+
var _component$usageGuide, _component$props, _component$examples, _component$references;
|
|
54
54
|
// `component <name>` reuses component search with limit 1, so `data` is a one-element array.
|
|
55
55
|
const component = Array.isArray(data) ? data[0] : data;
|
|
56
56
|
if (!component || typeof component !== 'object' || typeof component.name !== 'string') {
|
|
@@ -69,11 +69,11 @@ export const formatComponent = data => {
|
|
|
69
69
|
sections.push('', ...examples);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
// Render the design link from the `figmaUrl` inside `
|
|
73
|
-
// URL is actually present, so a `
|
|
72
|
+
// Render the design link from the `figmaUrl` inside `references`. Only emit the line when a
|
|
73
|
+
// URL is actually present, so a `references` object without a `figmaUrl` doesn't print
|
|
74
74
|
// `Design: undefined`.
|
|
75
|
-
if ((_component$
|
|
76
|
-
sections.push('', `${humanFormat.section('Design:')} ${humanFormat.action(component.
|
|
75
|
+
if ((_component$references = component.references) !== null && _component$references !== void 0 && _component$references.figmaUrl) {
|
|
76
|
+
sections.push('', `${humanFormat.section('Design:')} ${humanFormat.action(component.references.figmaUrl)}`);
|
|
77
77
|
}
|
|
78
78
|
return sections.join('\n');
|
|
79
79
|
};
|
|
@@ -4,7 +4,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
4
4
|
* Human-readable renderer for a single ADS component's detailed docs.
|
|
5
5
|
*
|
|
6
6
|
* Renders the `component <Name>` view: a readable header, a props table, and the usage examples —
|
|
7
|
-
* instead of dumping the raw JSON payload. Full structured data (including the `
|
|
7
|
+
* instead of dumping the raw JSON payload. Full structured data (including the `references` link
|
|
8
8
|
* and untruncated types) remains available via `--json`.
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -54,7 +54,7 @@ var formatExamples = function formatExamples(examples) {
|
|
|
54
54
|
* data is not a recognisable component object, so the caller can fall back to generic rendering.
|
|
55
55
|
*/
|
|
56
56
|
export var formatComponent = function formatComponent(data) {
|
|
57
|
-
var _component$usageGuide, _component$props, _component$examples, _component$
|
|
57
|
+
var _component$usageGuide, _component$props, _component$examples, _component$references;
|
|
58
58
|
// `component <name>` reuses component search with limit 1, so `data` is a one-element array.
|
|
59
59
|
var component = Array.isArray(data) ? data[0] : data;
|
|
60
60
|
if (!component || _typeof(component) !== 'object' || typeof component.name !== 'string') {
|
|
@@ -75,11 +75,11 @@ export var formatComponent = function formatComponent(data) {
|
|
|
75
75
|
sections.push.apply(sections, [''].concat(_toConsumableArray(examples)));
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
// Render the design link from the `figmaUrl` inside `
|
|
79
|
-
// URL is actually present, so a `
|
|
78
|
+
// Render the design link from the `figmaUrl` inside `references`. Only emit the line when a
|
|
79
|
+
// URL is actually present, so a `references` object without a `figmaUrl` doesn't print
|
|
80
80
|
// `Design: undefined`.
|
|
81
|
-
if ((_component$
|
|
82
|
-
sections.push('', "".concat(humanFormat.section('Design:'), " ").concat(humanFormat.action(component.
|
|
81
|
+
if ((_component$references = component.references) !== null && _component$references !== void 0 && _component$references.figmaUrl) {
|
|
82
|
+
sections.push('', "".concat(humanFormat.section('Design:'), " ").concat(humanFormat.action(component.references.figmaUrl)));
|
|
83
83
|
}
|
|
84
84
|
return sections.join('\n');
|
|
85
85
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Human-readable renderer for a single ADS component's detailed docs.
|
|
3
3
|
*
|
|
4
4
|
* Renders the `component <Name>` view: a readable header, a props table, and the usage examples —
|
|
5
|
-
* instead of dumping the raw JSON payload. Full structured data (including the `
|
|
5
|
+
* instead of dumping the raw JSON payload. Full structured data (including the `references` link
|
|
6
6
|
* and untruncated types) remains available via `--json`.
|
|
7
7
|
*/
|
|
8
8
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/ads-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
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",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"release:atlas:policy": "run-ts scripts/atlas/publish-version-policy.tsx"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@atlaskit/ads-mcp": "
|
|
36
|
+
"@atlaskit/ads-mcp": "2.0.0",
|
|
37
37
|
"@atlaskit/cli-output": "^0.1.0",
|
|
38
38
|
"@babel/runtime": "^7.0.0",
|
|
39
39
|
"chalk": "^4.1.2",
|