@atlaskit/ads-cli 0.8.1 → 0.8.2

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,13 @@
1
1
  # @atlaskit/ads-cli
2
2
 
3
+ ## 0.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d4d571ff39f04`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d4d571ff39f04) -
8
+ Document that `ads-cli search` returns up to two matches per term, per result type by default and
9
+ that `--limit` overrides the default.
10
+
3
11
  ## 0.8.1
4
12
 
5
13
  ### Patch Changes
@@ -52,6 +52,10 @@ var limitFlag = {
52
52
  alias: 'l',
53
53
  description: 'Maximum matches per term.'
54
54
  };
55
+ var searchLimitFlag = _objectSpread(_objectSpread({}, limitFlag), {}, {
56
+ default: 2,
57
+ description: 'Maximum matches per term, per result type (default: 2).'
58
+ });
55
59
 
56
60
  /**
57
61
  * Parse and validate the `--limit` flag.
@@ -572,7 +576,7 @@ var resolveBatch = function resolveBatch(input) {
572
576
  */
573
577
  var commands = exports.commands = [{
574
578
  name: 'search',
575
- description: 'Fuzzy-search ADS components, tokens, icons, and docs together (or narrow results with --type).',
579
+ description: 'Fuzzy-search ADS components, tokens, icons, and docs together (or narrow results with --type). Returns up to 2 matches per term, per result type by default; override with --limit.',
576
580
  usage: "search <query...> [--type ".concat(Object.keys(SEARCH_TYPE_VALUES).join('|'), "] [--limit N]"),
577
581
  arguments: [{
578
582
  name: 'query',
@@ -587,7 +591,7 @@ var commands = exports.commands = [{
587
591
  alias: 't',
588
592
  choices: Object.keys(SEARCH_TYPE_VALUES),
589
593
  description: "Narrow the search to a single kind: ".concat(Object.keys(SEARCH_TYPE_VALUES).join(', '), ".")
590
- }, limitFlag],
594
+ }, searchLimitFlag],
591
595
  examples: ['search button', 'search space color --type token', 'search add --type icon --limit 5', 'search contrast --type docs'],
592
596
  responseTypes: ['ads-cli/search'].concat((0, _toConsumableArray2.default)(Object.values(searchKindTools).map(function (tool) {
593
597
  return "ads-cli/".concat(tool.envelopeType);
@@ -38,6 +38,11 @@ const limitFlag = {
38
38
  alias: 'l',
39
39
  description: 'Maximum matches per term.'
40
40
  };
41
+ const searchLimitFlag = {
42
+ ...limitFlag,
43
+ default: 2,
44
+ description: 'Maximum matches per term, per result type (default: 2).'
45
+ };
41
46
 
42
47
  /**
43
48
  * Parse and validate the `--limit` flag.
@@ -538,7 +543,7 @@ const resolveBatch = input => {
538
543
  */
539
544
  export const commands = [{
540
545
  name: 'search',
541
- description: 'Fuzzy-search ADS components, tokens, icons, and docs together (or narrow results with --type).',
546
+ description: 'Fuzzy-search ADS components, tokens, icons, and docs together (or narrow results with --type). Returns up to 2 matches per term, per result type by default; override with --limit.',
542
547
  usage: `search <query...> [--type ${Object.keys(SEARCH_TYPE_VALUES).join('|')}] [--limit N]`,
543
548
  arguments: [{
544
549
  name: 'query',
@@ -553,7 +558,7 @@ export const commands = [{
553
558
  alias: 't',
554
559
  choices: Object.keys(SEARCH_TYPE_VALUES),
555
560
  description: `Narrow the search to a single kind: ${Object.keys(SEARCH_TYPE_VALUES).join(', ')}.`
556
- }, limitFlag],
561
+ }, searchLimitFlag],
557
562
  examples: ['search button', 'search space color --type token', 'search add --type icon --limit 5', 'search contrast --type docs'],
558
563
  responseTypes: ['ads-cli/search', ...Object.values(searchKindTools).map(tool => `ads-cli/${tool.envelopeType}`)],
559
564
  // With `--type`, the result is a single kind (compact per-row rendering). Without it, the
@@ -47,6 +47,10 @@ var limitFlag = {
47
47
  alias: 'l',
48
48
  description: 'Maximum matches per term.'
49
49
  };
50
+ var searchLimitFlag = _objectSpread(_objectSpread({}, limitFlag), {}, {
51
+ default: 2,
52
+ description: 'Maximum matches per term, per result type (default: 2).'
53
+ });
50
54
 
51
55
  /**
52
56
  * Parse and validate the `--limit` flag.
@@ -567,7 +571,7 @@ var resolveBatch = function resolveBatch(input) {
567
571
  */
568
572
  export var commands = [{
569
573
  name: 'search',
570
- description: 'Fuzzy-search ADS components, tokens, icons, and docs together (or narrow results with --type).',
574
+ description: 'Fuzzy-search ADS components, tokens, icons, and docs together (or narrow results with --type). Returns up to 2 matches per term, per result type by default; override with --limit.',
571
575
  usage: "search <query...> [--type ".concat(Object.keys(SEARCH_TYPE_VALUES).join('|'), "] [--limit N]"),
572
576
  arguments: [{
573
577
  name: 'query',
@@ -582,7 +586,7 @@ export var commands = [{
582
586
  alias: 't',
583
587
  choices: Object.keys(SEARCH_TYPE_VALUES),
584
588
  description: "Narrow the search to a single kind: ".concat(Object.keys(SEARCH_TYPE_VALUES).join(', '), ".")
585
- }, limitFlag],
589
+ }, searchLimitFlag],
586
590
  examples: ['search button', 'search space color --type token', 'search add --type icon --limit 5', 'search contrast --type docs'],
587
591
  responseTypes: ['ads-cli/search'].concat(_toConsumableArray(Object.values(searchKindTools).map(function (tool) {
588
592
  return "ads-cli/".concat(tool.envelopeType);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/ads-cli",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
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",