@asyncapi/cli 5.0.1 → 5.0.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.
@@ -748,6 +748,162 @@
748
748
  "versions.js"
749
749
  ]
750
750
  },
751
+ "new:file": {
752
+ "aliases": [],
753
+ "args": {},
754
+ "description": "Creates a new asyncapi file",
755
+ "examples": [
756
+ "asyncapi new\t - start creation of a file in interactive mode",
757
+ "asyncapi new --file-name=my-asyncapi.yaml --example=default-example.yaml --no-tty\t - create a new file with a specific name, using one of the examples and without interactive mode"
758
+ ],
759
+ "flags": {
760
+ "help": {
761
+ "char": "h",
762
+ "description": "Show CLI help.",
763
+ "name": "help",
764
+ "allowNo": false,
765
+ "type": "boolean"
766
+ },
767
+ "file-name": {
768
+ "char": "n",
769
+ "description": "name of the file",
770
+ "name": "file-name",
771
+ "hasDynamicHelp": false,
772
+ "multiple": false,
773
+ "type": "option"
774
+ },
775
+ "example": {
776
+ "char": "e",
777
+ "description": "name of the example to use. Available examples are:\n\t - simple-asyncapi.yml\n\t - adeo-kafka-request-reply-asyncapi.yml\n\t - anyof-asyncapi.yml\n\t - application-headers-asyncapi.yml\n\t - correlation-id-asyncapi.yml\n\t - websocket-gemini-asyncapi.yml\n\t - gitter-streaming-asyncapi.yml\n\t - kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml\n\t - kraken-websocket-request-reply-multiple-channels-asyncapi.yml\n\t - mercure-asyncapi.yml\n\t - not-asyncapi.yml\n\t - operation-security-asyncapi.yml\n\t - oneof-asyncapi.yml\n\t - rpc-client-asyncapi.yml\n\t - rpc-server-asyncapi.yml\n\t - slack-rtm-asyncapi.yml\n\t - tutorial.yml\n\t - streetlights-kafka-asyncapi.yml\n\t - streetlights-operation-security-asyncapi.yml\n\t - streetlights-mqtt-asyncapi.yml",
778
+ "name": "example",
779
+ "hasDynamicHelp": false,
780
+ "multiple": false,
781
+ "type": "option"
782
+ },
783
+ "studio": {
784
+ "char": "s",
785
+ "description": "open in Studio",
786
+ "name": "studio",
787
+ "allowNo": false,
788
+ "type": "boolean"
789
+ },
790
+ "port": {
791
+ "char": "p",
792
+ "description": "port in which to start Studio",
793
+ "name": "port",
794
+ "hasDynamicHelp": false,
795
+ "multiple": false,
796
+ "type": "option"
797
+ },
798
+ "no-tty": {
799
+ "description": "do not use an interactive terminal",
800
+ "name": "no-tty",
801
+ "allowNo": false,
802
+ "type": "boolean"
803
+ }
804
+ },
805
+ "hasDynamicHelp": false,
806
+ "hiddenAliases": [],
807
+ "id": "new:file",
808
+ "pluginAlias": "@asyncapi/cli",
809
+ "pluginName": "@asyncapi/cli",
810
+ "pluginType": "core",
811
+ "strict": true,
812
+ "isESM": false,
813
+ "relativePath": [
814
+ "lib",
815
+ "apps",
816
+ "cli",
817
+ "commands",
818
+ "new",
819
+ "file.js"
820
+ ]
821
+ },
822
+ "new": {
823
+ "aliases": [],
824
+ "args": {},
825
+ "description": "Create a new AsyncAPI project, specification files, or templates for clients and applications.",
826
+ "flags": {},
827
+ "hasDynamicHelp": false,
828
+ "hiddenAliases": [],
829
+ "id": "new",
830
+ "pluginAlias": "@asyncapi/cli",
831
+ "pluginName": "@asyncapi/cli",
832
+ "pluginType": "core",
833
+ "strict": true,
834
+ "isESM": false,
835
+ "relativePath": [
836
+ "lib",
837
+ "apps",
838
+ "cli",
839
+ "commands",
840
+ "new",
841
+ "index.js"
842
+ ]
843
+ },
844
+ "new:template": {
845
+ "aliases": [],
846
+ "args": {},
847
+ "description": "Creates a new template",
848
+ "flags": {
849
+ "help": {
850
+ "char": "h",
851
+ "description": "Show CLI help.",
852
+ "name": "help",
853
+ "allowNo": false,
854
+ "type": "boolean"
855
+ },
856
+ "name": {
857
+ "char": "n",
858
+ "description": "Name of the Project",
859
+ "name": "name",
860
+ "default": "project",
861
+ "hasDynamicHelp": false,
862
+ "multiple": false,
863
+ "type": "option"
864
+ },
865
+ "template": {
866
+ "char": "t",
867
+ "description": "Name of the Template",
868
+ "name": "template",
869
+ "default": "default",
870
+ "hasDynamicHelp": false,
871
+ "multiple": false,
872
+ "type": "option"
873
+ },
874
+ "file": {
875
+ "char": "f",
876
+ "description": "The path to the AsyncAPI file for generating a template.",
877
+ "name": "file",
878
+ "hasDynamicHelp": false,
879
+ "multiple": false,
880
+ "type": "option"
881
+ },
882
+ "force-write": {
883
+ "description": "Force writing of the generated files to given directory even if it is a git repo with unstaged files or not empty dir (defaults to false)",
884
+ "name": "force-write",
885
+ "allowNo": false,
886
+ "type": "boolean"
887
+ }
888
+ },
889
+ "hasDynamicHelp": false,
890
+ "hiddenAliases": [],
891
+ "id": "new:template",
892
+ "pluginAlias": "@asyncapi/cli",
893
+ "pluginName": "@asyncapi/cli",
894
+ "pluginType": "core",
895
+ "strict": true,
896
+ "errorMessages": {},
897
+ "isESM": false,
898
+ "relativePath": [
899
+ "lib",
900
+ "apps",
901
+ "cli",
902
+ "commands",
903
+ "new",
904
+ "template.js"
905
+ ]
906
+ },
751
907
  "generate:client": {
752
908
  "aliases": [],
753
909
  "args": {
@@ -1412,162 +1568,6 @@
1412
1568
  "models.js"
1413
1569
  ]
1414
1570
  },
1415
- "new:file": {
1416
- "aliases": [],
1417
- "args": {},
1418
- "description": "Creates a new asyncapi file",
1419
- "examples": [
1420
- "asyncapi new\t - start creation of a file in interactive mode",
1421
- "asyncapi new --file-name=my-asyncapi.yaml --example=default-example.yaml --no-tty\t - create a new file with a specific name, using one of the examples and without interactive mode"
1422
- ],
1423
- "flags": {
1424
- "help": {
1425
- "char": "h",
1426
- "description": "Show CLI help.",
1427
- "name": "help",
1428
- "allowNo": false,
1429
- "type": "boolean"
1430
- },
1431
- "file-name": {
1432
- "char": "n",
1433
- "description": "name of the file",
1434
- "name": "file-name",
1435
- "hasDynamicHelp": false,
1436
- "multiple": false,
1437
- "type": "option"
1438
- },
1439
- "example": {
1440
- "char": "e",
1441
- "description": "name of the example to use. Available examples are:\n\t - simple-asyncapi.yml\n\t - adeo-kafka-request-reply-asyncapi.yml\n\t - anyof-asyncapi.yml\n\t - application-headers-asyncapi.yml\n\t - correlation-id-asyncapi.yml\n\t - websocket-gemini-asyncapi.yml\n\t - gitter-streaming-asyncapi.yml\n\t - kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml\n\t - kraken-websocket-request-reply-multiple-channels-asyncapi.yml\n\t - mercure-asyncapi.yml\n\t - not-asyncapi.yml\n\t - operation-security-asyncapi.yml\n\t - oneof-asyncapi.yml\n\t - rpc-client-asyncapi.yml\n\t - rpc-server-asyncapi.yml\n\t - slack-rtm-asyncapi.yml\n\t - tutorial.yml\n\t - streetlights-kafka-asyncapi.yml\n\t - streetlights-operation-security-asyncapi.yml\n\t - streetlights-mqtt-asyncapi.yml",
1442
- "name": "example",
1443
- "hasDynamicHelp": false,
1444
- "multiple": false,
1445
- "type": "option"
1446
- },
1447
- "studio": {
1448
- "char": "s",
1449
- "description": "open in Studio",
1450
- "name": "studio",
1451
- "allowNo": false,
1452
- "type": "boolean"
1453
- },
1454
- "port": {
1455
- "char": "p",
1456
- "description": "port in which to start Studio",
1457
- "name": "port",
1458
- "hasDynamicHelp": false,
1459
- "multiple": false,
1460
- "type": "option"
1461
- },
1462
- "no-tty": {
1463
- "description": "do not use an interactive terminal",
1464
- "name": "no-tty",
1465
- "allowNo": false,
1466
- "type": "boolean"
1467
- }
1468
- },
1469
- "hasDynamicHelp": false,
1470
- "hiddenAliases": [],
1471
- "id": "new:file",
1472
- "pluginAlias": "@asyncapi/cli",
1473
- "pluginName": "@asyncapi/cli",
1474
- "pluginType": "core",
1475
- "strict": true,
1476
- "isESM": false,
1477
- "relativePath": [
1478
- "lib",
1479
- "apps",
1480
- "cli",
1481
- "commands",
1482
- "new",
1483
- "file.js"
1484
- ]
1485
- },
1486
- "new": {
1487
- "aliases": [],
1488
- "args": {},
1489
- "description": "Create a new AsyncAPI project, specification files, or templates for clients and applications.",
1490
- "flags": {},
1491
- "hasDynamicHelp": false,
1492
- "hiddenAliases": [],
1493
- "id": "new",
1494
- "pluginAlias": "@asyncapi/cli",
1495
- "pluginName": "@asyncapi/cli",
1496
- "pluginType": "core",
1497
- "strict": true,
1498
- "isESM": false,
1499
- "relativePath": [
1500
- "lib",
1501
- "apps",
1502
- "cli",
1503
- "commands",
1504
- "new",
1505
- "index.js"
1506
- ]
1507
- },
1508
- "new:template": {
1509
- "aliases": [],
1510
- "args": {},
1511
- "description": "Creates a new template",
1512
- "flags": {
1513
- "help": {
1514
- "char": "h",
1515
- "description": "Show CLI help.",
1516
- "name": "help",
1517
- "allowNo": false,
1518
- "type": "boolean"
1519
- },
1520
- "name": {
1521
- "char": "n",
1522
- "description": "Name of the Project",
1523
- "name": "name",
1524
- "default": "project",
1525
- "hasDynamicHelp": false,
1526
- "multiple": false,
1527
- "type": "option"
1528
- },
1529
- "template": {
1530
- "char": "t",
1531
- "description": "Name of the Template",
1532
- "name": "template",
1533
- "default": "default",
1534
- "hasDynamicHelp": false,
1535
- "multiple": false,
1536
- "type": "option"
1537
- },
1538
- "file": {
1539
- "char": "f",
1540
- "description": "The path to the AsyncAPI file for generating a template.",
1541
- "name": "file",
1542
- "hasDynamicHelp": false,
1543
- "multiple": false,
1544
- "type": "option"
1545
- },
1546
- "force-write": {
1547
- "description": "Force writing of the generated files to given directory even if it is a git repo with unstaged files or not empty dir (defaults to false)",
1548
- "name": "force-write",
1549
- "allowNo": false,
1550
- "type": "boolean"
1551
- }
1552
- },
1553
- "hasDynamicHelp": false,
1554
- "hiddenAliases": [],
1555
- "id": "new:template",
1556
- "pluginAlias": "@asyncapi/cli",
1557
- "pluginName": "@asyncapi/cli",
1558
- "pluginType": "core",
1559
- "strict": true,
1560
- "errorMessages": {},
1561
- "isESM": false,
1562
- "relativePath": [
1563
- "lib",
1564
- "apps",
1565
- "cli",
1566
- "commands",
1567
- "new",
1568
- "template.js"
1569
- ]
1570
- },
1571
1571
  "start:api": {
1572
1572
  "aliases": [],
1573
1573
  "args": {},
@@ -1790,57 +1790,6 @@
1790
1790
  "studio.js"
1791
1791
  ]
1792
1792
  },
1793
- "config:auth:add": {
1794
- "aliases": [],
1795
- "args": {
1796
- "pattern": {
1797
- "description": "Glob pattern for matching protected URLs (e.g. github.com/org/repo/**/*.*)",
1798
- "name": "pattern",
1799
- "required": true
1800
- },
1801
- "token": {
1802
- "description": "Authentication token or environment variable reference (prefix with $, e.g. $GITHUB_TOKEN)",
1803
- "name": "token",
1804
- "required": true
1805
- }
1806
- },
1807
- "description": "Add an authentication config for resolving $ref files requiring HTTP Authorization.",
1808
- "flags": {
1809
- "auth-type": {
1810
- "char": "a",
1811
- "description": "Authentication type (default is \"Bearer\")",
1812
- "name": "auth-type",
1813
- "hasDynamicHelp": false,
1814
- "multiple": false,
1815
- "type": "option"
1816
- },
1817
- "header": {
1818
- "char": "h",
1819
- "description": "Additional header in key=value format; can be used multiple times",
1820
- "name": "header",
1821
- "hasDynamicHelp": false,
1822
- "multiple": true,
1823
- "type": "option"
1824
- }
1825
- },
1826
- "hasDynamicHelp": false,
1827
- "hiddenAliases": [],
1828
- "id": "config:auth:add",
1829
- "pluginAlias": "@asyncapi/cli",
1830
- "pluginName": "@asyncapi/cli",
1831
- "pluginType": "core",
1832
- "strict": true,
1833
- "isESM": false,
1834
- "relativePath": [
1835
- "lib",
1836
- "apps",
1837
- "cli",
1838
- "commands",
1839
- "config",
1840
- "auth",
1841
- "add.js"
1842
- ]
1843
- },
1844
1793
  "config:context:add": {
1845
1794
  "aliases": [],
1846
1795
  "args": {
@@ -2129,7 +2078,58 @@
2129
2078
  "context",
2130
2079
  "use.js"
2131
2080
  ]
2081
+ },
2082
+ "config:auth:add": {
2083
+ "aliases": [],
2084
+ "args": {
2085
+ "pattern": {
2086
+ "description": "Glob pattern for matching protected URLs (e.g. github.com/org/repo/**/*.*)",
2087
+ "name": "pattern",
2088
+ "required": true
2089
+ },
2090
+ "token": {
2091
+ "description": "Authentication token or environment variable reference (prefix with $, e.g. $GITHUB_TOKEN)",
2092
+ "name": "token",
2093
+ "required": true
2094
+ }
2095
+ },
2096
+ "description": "Add an authentication config for resolving $ref files requiring HTTP Authorization.",
2097
+ "flags": {
2098
+ "auth-type": {
2099
+ "char": "a",
2100
+ "description": "Authentication type (default is \"Bearer\")",
2101
+ "name": "auth-type",
2102
+ "hasDynamicHelp": false,
2103
+ "multiple": false,
2104
+ "type": "option"
2105
+ },
2106
+ "header": {
2107
+ "char": "h",
2108
+ "description": "Additional header in key=value format; can be used multiple times",
2109
+ "name": "header",
2110
+ "hasDynamicHelp": false,
2111
+ "multiple": true,
2112
+ "type": "option"
2113
+ }
2114
+ },
2115
+ "hasDynamicHelp": false,
2116
+ "hiddenAliases": [],
2117
+ "id": "config:auth:add",
2118
+ "pluginAlias": "@asyncapi/cli",
2119
+ "pluginName": "@asyncapi/cli",
2120
+ "pluginType": "core",
2121
+ "strict": true,
2122
+ "isESM": false,
2123
+ "relativePath": [
2124
+ "lib",
2125
+ "apps",
2126
+ "cli",
2127
+ "commands",
2128
+ "config",
2129
+ "auth",
2130
+ "add.js"
2131
+ ]
2132
2132
  }
2133
2133
  },
2134
- "version": "5.0.1"
2134
+ "version": "5.0.2"
2135
2135
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@asyncapi/cli",
3
3
  "description": "All in one CLI for all AsyncAPI tools",
4
- "version": "5.0.1",
4
+ "version": "5.0.2",
5
5
  "author": "@asyncapi",
6
6
  "bin": {
7
7
  "asyncapi": "./bin/run_bin"
@@ -46,7 +46,7 @@ async function renameTar({version, name, sha, isAlpine}) {
46
46
  const tarDirectory = path.resolve(dist, 'tar');
47
47
  await createDirectory(tarDirectory);
48
48
 
49
- const fileName = isAlpine ? 'asyncapi-alpine.tar.gz' : 'asyncapi.tar.gz';
49
+ const fileName = isAlpine ? 'asyncapi.alpine.tar.gz' : 'asyncapi.tar.gz';
50
50
  const newPath = path.resolve(tarDirectory, fileName);
51
51
  await checkAndRenameFile(generatedPath, newPath);
52
52
  }