@asyncapi/cli 4.1.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.
Files changed (46) hide show
  1. package/README.md +4 -0
  2. package/assets/create-template/templates/default/package-lock.json +4 -3
  3. package/lib/apps/api/controllers/generate.controller.js +1 -3
  4. package/lib/apps/cli/commands/convert.d.ts +0 -2
  5. package/lib/apps/cli/commands/convert.js +9 -14
  6. package/lib/apps/cli/commands/format.d.ts +1 -3
  7. package/lib/apps/cli/commands/format.js +7 -10
  8. package/lib/apps/cli/commands/generate/client.js +5 -5
  9. package/lib/apps/cli/commands/generate/fromTemplate.d.ts +0 -25
  10. package/lib/apps/cli/commands/generate/fromTemplate.js +9 -17
  11. package/lib/apps/cli/commands/generate/models.js +3 -5
  12. package/lib/apps/cli/commands/optimize.js +11 -12
  13. package/lib/apps/cli/commands/start/preview.js +1 -1
  14. package/lib/apps/cli/commands/validate.js +2 -7
  15. package/lib/apps/cli/internal/base/BaseGeneratorCommand.js +3 -5
  16. package/lib/apps/cli/internal/base.d.ts +1 -1
  17. package/lib/apps/cli/internal/base.js +8 -7
  18. package/lib/apps/cli/internal/flags/generate/fromTemplate.flags.d.ts +0 -25
  19. package/lib/apps/cli/internal/flags/generate/fromTemplate.flags.js +1 -2
  20. package/lib/apps/cli/internal/globals.js +2 -1
  21. package/lib/domains/models/Context.js +3 -1
  22. package/lib/domains/models/Preview.js +9 -2
  23. package/lib/domains/models/SpecificationFile.d.ts +12 -0
  24. package/lib/domains/models/SpecificationFile.js +20 -3
  25. package/lib/domains/models/Studio.js +9 -2
  26. package/lib/domains/services/base.service.d.ts +26 -2
  27. package/lib/domains/services/base.service.js +23 -0
  28. package/lib/domains/services/convert.service.d.ts +13 -0
  29. package/lib/domains/services/convert.service.js +14 -3
  30. package/lib/domains/services/generator.service.d.ts +20 -2
  31. package/lib/domains/services/generator.service.js +21 -28
  32. package/lib/domains/services/validation.service.d.ts +16 -0
  33. package/lib/domains/services/validation.service.js +68 -57
  34. package/lib/index.d.ts +4 -0
  35. package/lib/index.js +7 -0
  36. package/lib/interfaces/index.d.ts +54 -12
  37. package/lib/utils/error-handler.d.ts +95 -0
  38. package/lib/utils/error-handler.js +134 -0
  39. package/lib/utils/proxy.d.ts +29 -0
  40. package/lib/utils/proxy.js +47 -0
  41. package/lib/utils/validation.d.ts +103 -0
  42. package/lib/utils/validation.js +159 -0
  43. package/oclif.manifest.json +208 -216
  44. package/package.json +10 -11
  45. package/scripts/generateTypesForGenerateCommand.js +1 -1
  46. package/scripts/releasePackagesRename.js +1 -1
@@ -155,7 +155,6 @@
155
155
  "pluginName": "@asyncapi/cli",
156
156
  "pluginType": "core",
157
157
  "strict": true,
158
- "metricsMetadata": {},
159
158
  "isESM": false,
160
159
  "relativePath": [
161
160
  "lib",
@@ -362,7 +361,6 @@
362
361
  "pluginName": "@asyncapi/cli",
363
362
  "pluginType": "core",
364
363
  "strict": true,
365
- "metricsMetadata": {},
366
364
  "isESM": false,
367
365
  "relativePath": [
368
366
  "lib",
@@ -750,6 +748,162 @@
750
748
  "versions.js"
751
749
  ]
752
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
+ },
753
907
  "generate:client": {
754
908
  "aliases": [],
755
909
  "args": {
@@ -1021,12 +1175,6 @@
1021
1175
  "multiple": false,
1022
1176
  "type": "option"
1023
1177
  },
1024
- "use-new-generator": {
1025
- "description": "Use v2 generator, for generating from newer templates",
1026
- "name": "use-new-generator",
1027
- "allowNo": false,
1028
- "type": "boolean"
1029
- },
1030
1178
  "proxyHost": {
1031
1179
  "description": "Name of the ProxyHost",
1032
1180
  "name": "proxyHost",
@@ -1420,162 +1568,6 @@
1420
1568
  "models.js"
1421
1569
  ]
1422
1570
  },
1423
- "new:file": {
1424
- "aliases": [],
1425
- "args": {},
1426
- "description": "Creates a new asyncapi file",
1427
- "examples": [
1428
- "asyncapi new\t - start creation of a file in interactive mode",
1429
- "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"
1430
- ],
1431
- "flags": {
1432
- "help": {
1433
- "char": "h",
1434
- "description": "Show CLI help.",
1435
- "name": "help",
1436
- "allowNo": false,
1437
- "type": "boolean"
1438
- },
1439
- "file-name": {
1440
- "char": "n",
1441
- "description": "name of the file",
1442
- "name": "file-name",
1443
- "hasDynamicHelp": false,
1444
- "multiple": false,
1445
- "type": "option"
1446
- },
1447
- "example": {
1448
- "char": "e",
1449
- "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",
1450
- "name": "example",
1451
- "hasDynamicHelp": false,
1452
- "multiple": false,
1453
- "type": "option"
1454
- },
1455
- "studio": {
1456
- "char": "s",
1457
- "description": "open in Studio",
1458
- "name": "studio",
1459
- "allowNo": false,
1460
- "type": "boolean"
1461
- },
1462
- "port": {
1463
- "char": "p",
1464
- "description": "port in which to start Studio",
1465
- "name": "port",
1466
- "hasDynamicHelp": false,
1467
- "multiple": false,
1468
- "type": "option"
1469
- },
1470
- "no-tty": {
1471
- "description": "do not use an interactive terminal",
1472
- "name": "no-tty",
1473
- "allowNo": false,
1474
- "type": "boolean"
1475
- }
1476
- },
1477
- "hasDynamicHelp": false,
1478
- "hiddenAliases": [],
1479
- "id": "new:file",
1480
- "pluginAlias": "@asyncapi/cli",
1481
- "pluginName": "@asyncapi/cli",
1482
- "pluginType": "core",
1483
- "strict": true,
1484
- "isESM": false,
1485
- "relativePath": [
1486
- "lib",
1487
- "apps",
1488
- "cli",
1489
- "commands",
1490
- "new",
1491
- "file.js"
1492
- ]
1493
- },
1494
- "new": {
1495
- "aliases": [],
1496
- "args": {},
1497
- "description": "Create a new AsyncAPI project, specification files, or templates for clients and applications.",
1498
- "flags": {},
1499
- "hasDynamicHelp": false,
1500
- "hiddenAliases": [],
1501
- "id": "new",
1502
- "pluginAlias": "@asyncapi/cli",
1503
- "pluginName": "@asyncapi/cli",
1504
- "pluginType": "core",
1505
- "strict": true,
1506
- "isESM": false,
1507
- "relativePath": [
1508
- "lib",
1509
- "apps",
1510
- "cli",
1511
- "commands",
1512
- "new",
1513
- "index.js"
1514
- ]
1515
- },
1516
- "new:template": {
1517
- "aliases": [],
1518
- "args": {},
1519
- "description": "Creates a new template",
1520
- "flags": {
1521
- "help": {
1522
- "char": "h",
1523
- "description": "Show CLI help.",
1524
- "name": "help",
1525
- "allowNo": false,
1526
- "type": "boolean"
1527
- },
1528
- "name": {
1529
- "char": "n",
1530
- "description": "Name of the Project",
1531
- "name": "name",
1532
- "default": "project",
1533
- "hasDynamicHelp": false,
1534
- "multiple": false,
1535
- "type": "option"
1536
- },
1537
- "template": {
1538
- "char": "t",
1539
- "description": "Name of the Template",
1540
- "name": "template",
1541
- "default": "default",
1542
- "hasDynamicHelp": false,
1543
- "multiple": false,
1544
- "type": "option"
1545
- },
1546
- "file": {
1547
- "char": "f",
1548
- "description": "The path to the AsyncAPI file for generating a template.",
1549
- "name": "file",
1550
- "hasDynamicHelp": false,
1551
- "multiple": false,
1552
- "type": "option"
1553
- },
1554
- "force-write": {
1555
- "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)",
1556
- "name": "force-write",
1557
- "allowNo": false,
1558
- "type": "boolean"
1559
- }
1560
- },
1561
- "hasDynamicHelp": false,
1562
- "hiddenAliases": [],
1563
- "id": "new:template",
1564
- "pluginAlias": "@asyncapi/cli",
1565
- "pluginName": "@asyncapi/cli",
1566
- "pluginType": "core",
1567
- "strict": true,
1568
- "errorMessages": {},
1569
- "isESM": false,
1570
- "relativePath": [
1571
- "lib",
1572
- "apps",
1573
- "cli",
1574
- "commands",
1575
- "new",
1576
- "template.js"
1577
- ]
1578
- },
1579
1571
  "start:api": {
1580
1572
  "aliases": [],
1581
1573
  "args": {},
@@ -1798,57 +1790,6 @@
1798
1790
  "studio.js"
1799
1791
  ]
1800
1792
  },
1801
- "config:auth:add": {
1802
- "aliases": [],
1803
- "args": {
1804
- "pattern": {
1805
- "description": "Glob pattern for matching protected URLs (e.g. github.com/org/repo/**/*.*)",
1806
- "name": "pattern",
1807
- "required": true
1808
- },
1809
- "token": {
1810
- "description": "Authentication token or environment variable reference (prefix with $, e.g. $GITHUB_TOKEN)",
1811
- "name": "token",
1812
- "required": true
1813
- }
1814
- },
1815
- "description": "Add an authentication config for resolving $ref files requiring HTTP Authorization.",
1816
- "flags": {
1817
- "auth-type": {
1818
- "char": "a",
1819
- "description": "Authentication type (default is \"Bearer\")",
1820
- "name": "auth-type",
1821
- "hasDynamicHelp": false,
1822
- "multiple": false,
1823
- "type": "option"
1824
- },
1825
- "header": {
1826
- "char": "h",
1827
- "description": "Additional header in key=value format; can be used multiple times",
1828
- "name": "header",
1829
- "hasDynamicHelp": false,
1830
- "multiple": true,
1831
- "type": "option"
1832
- }
1833
- },
1834
- "hasDynamicHelp": false,
1835
- "hiddenAliases": [],
1836
- "id": "config:auth:add",
1837
- "pluginAlias": "@asyncapi/cli",
1838
- "pluginName": "@asyncapi/cli",
1839
- "pluginType": "core",
1840
- "strict": true,
1841
- "isESM": false,
1842
- "relativePath": [
1843
- "lib",
1844
- "apps",
1845
- "cli",
1846
- "commands",
1847
- "config",
1848
- "auth",
1849
- "add.js"
1850
- ]
1851
- },
1852
1793
  "config:context:add": {
1853
1794
  "aliases": [],
1854
1795
  "args": {
@@ -2137,7 +2078,58 @@
2137
2078
  "context",
2138
2079
  "use.js"
2139
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
+ ]
2140
2132
  }
2141
2133
  },
2142
- "version": "4.1.1"
2134
+ "version": "5.0.2"
2143
2135
  }
package/package.json CHANGED
@@ -1,26 +1,30 @@
1
1
  {
2
2
  "name": "@asyncapi/cli",
3
3
  "description": "All in one CLI for all AsyncAPI tools",
4
- "version": "4.1.1",
4
+ "version": "5.0.2",
5
5
  "author": "@asyncapi",
6
6
  "bin": {
7
7
  "asyncapi": "./bin/run_bin"
8
8
  },
9
+ "repository": {
10
+ "url": "git+https://github.com/asyncapi/cli.git",
11
+ "type": "git"
12
+ },
9
13
  "bugs": "https://github.com/asyncapi/cli/issues",
10
14
  "dependencies": {
11
15
  "@asyncapi/avro-schema-parser": "^3.0.23",
12
16
  "@asyncapi/bundler": "^0.6.4",
13
17
  "@asyncapi/converter": "^1.6.2",
14
18
  "@asyncapi/diff": "^0.5.0",
15
- "@asyncapi/generator": "^1.17.25",
16
- "@asyncapi/modelina-cli": "^4.0.4",
19
+ "@asyncapi/generator": "^3.0.1",
20
+ "@asyncapi/modelina-cli": "^5.3.5",
17
21
  "@asyncapi/openapi-schema-parser": "^3.0.24",
18
22
  "@asyncapi/optimizer": "^1.0.4",
19
23
  "@asyncapi/parser": "^3.3.0",
20
24
  "@asyncapi/problem": "^1.0.0",
21
25
  "@asyncapi/protobuf-schema-parser": "^3.6.0",
22
26
  "@asyncapi/raml-dt-schema-parser": "^4.0.24",
23
- "@asyncapi/studio": "^0.24.2",
27
+ "@asyncapi/studio": "^1.1.0",
24
28
  "@changesets/changelog-git": "^0.2.0",
25
29
  "@clack/prompts": "^0.7.0",
26
30
  "@oclif/core": "^4.2.9",
@@ -37,12 +41,10 @@
37
41
  "express": "^4.17.1",
38
42
  "fast-levenshtein": "^3.0.0",
39
43
  "fs-extra": "^11.1.0",
40
- "generator-v2": "npm:@asyncapi/generator@2.8.3",
41
44
  "helmet": "^8.1.0",
42
45
  "https-proxy-agent": "^7.0.6",
43
46
  "inquirer": "^8.2.0",
44
47
  "js-yaml": "^4.1.0",
45
- "next": "^15.2.4",
46
48
  "oclif": "^4.17.34",
47
49
  "open": "^8.4.0",
48
50
  "picocolors": "^1.1.0",
@@ -59,7 +61,6 @@
59
61
  "@commitlint/cli": "^19.8.1",
60
62
  "@commitlint/config-conventional": "^19.8.1",
61
63
  "@oclif/test": "^2",
62
- "@swc/core": "^1.3.2",
63
64
  "@types/archiver": "^6.0.3",
64
65
  "@types/body-parser": "^1.19.6",
65
66
  "@types/chai": "^4.3.6",
@@ -87,7 +88,6 @@
87
88
  "eslint-plugin-github": "^4.3.7",
88
89
  "eslint-plugin-security": "^1.4.0",
89
90
  "eslint-plugin-sonarjs": "^0.15.0",
90
- "lefthook": "^1.12.2",
91
91
  "markdown-toc": "^1.2.0",
92
92
  "mocha": "^10.2.0",
93
93
  "nodemon": "^3.1.10",
@@ -102,7 +102,7 @@
102
102
  "typescript": "^5.8.2"
103
103
  },
104
104
  "engines": {
105
- "node": ">12.16"
105
+ "node": ">=24.0"
106
106
  },
107
107
  "files": [
108
108
  "/bin",
@@ -159,7 +159,6 @@
159
159
  "optionalDependencies": {
160
160
  "fsevents": "^2.3.2"
161
161
  },
162
- "repository": "asyncapi/cli",
163
162
  "scripts": {
164
163
  "build": "rimraf lib && node scripts/fetch-asyncapi-example.js && npm run generate:languages && tsc && tsc-alias --project tsconfig.json && oclif manifest && echo \"Build Completed\"",
165
164
  "bump:github-action": "cd github-action/lib/ && node bump-action-version.js",
@@ -172,7 +171,6 @@
172
171
  "generate:commands": "npm run generate:readme:create && npm run generate:readme:commands && node ./scripts/updateUsageDocs.js && rimraf ./scripts/README.md",
173
172
  "generate:readme:toc": "markdown-toc -i README.md",
174
173
  "generate:languages": "node scripts/generateTypesForGenerateCommand.js",
175
- "prepare": "lefthook install",
176
174
  "lint": "eslint --max-warnings 5 --config .eslintrc .",
177
175
  "lint:fix": "eslint --max-warnings 5 --config .eslintrc . --fix",
178
176
  "pack:macos": "oclif pack macos && npm run pack:rename",
@@ -181,6 +179,7 @@
181
179
  "pack:tarballs:alpine": "oclif pack tarballs -t linux-x64 && npm run pack:rename alpine",
182
180
  "pack:windows": "oclif pack win && npm run pack:rename",
183
181
  "pack:rename": "node scripts/releasePackagesRename.js",
182
+ "publish:trusted": "echo \"Working around changesets action not supporting OIDC yet. Need to pass successful release output for triggering github release\";VERSION=$(node -p \"require('./package.json').version\"); PACKAGE_NAME=$(node -p \"require('./package.json').name\"); if npm view $PACKAGE_NAME@$VERSION > /dev/null 2>&1; then echo \"Version $VERSION of package $PACKAGE_NAME already published to NPM. Skipping GitHub release.\"; else git tag v$VERSION -m v$VERSION; echo \"New tag: $PACKAGE_NAME@$VERSION.\"; fi",
184
183
  "prepublishOnly": "npm run build",
185
184
  "pretest": "npm run build",
186
185
  "pretest:coverage": "npm run build",
@@ -1,6 +1,6 @@
1
1
  const { writeFile } = require('fs/promises');
2
2
  const path = require('path');
3
- const { listBakedInTemplates } = require('generator-v2');
3
+ const { listBakedInTemplates } = require('@asyncapi/generator');
4
4
 
5
5
  async function generateClientLanguages() {
6
6
  const bakedInClients = listBakedInTemplates({ type: 'client' });
@@ -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
  }