@sw-tsdk/plugin-connector 3.9.1 → 3.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.
Files changed (57) hide show
  1. package/README.md +124 -65
  2. package/lib/commands/action/run/local.js +1 -1
  3. package/lib/commands/action/run/local.js.map +1 -1
  4. package/lib/commands/component/create.d.ts +4 -0
  5. package/lib/commands/component/create.js +49 -1
  6. package/lib/commands/component/create.js.map +1 -1
  7. package/lib/commands/connector/create/openapi.js +48 -30
  8. package/lib/commands/connector/create/openapi.js.map +1 -1
  9. package/lib/commands/migrator/convert.d.ts +25 -0
  10. package/lib/commands/migrator/convert.js +224 -0
  11. package/lib/commands/migrator/convert.js.map +1 -0
  12. package/lib/commands/migrator/export.d.ts +13 -0
  13. package/lib/commands/migrator/export.js +121 -0
  14. package/lib/commands/migrator/export.js.map +1 -0
  15. package/lib/commands/playbook/create.d.ts +4 -0
  16. package/lib/commands/playbook/create.js +49 -1
  17. package/lib/commands/playbook/create.js.map +1 -1
  18. package/lib/common.js +1 -0
  19. package/lib/common.js.map +1 -1
  20. package/lib/templates/migrator-runners/image.png +0 -0
  21. package/lib/templates/migrator-runners/plugin_override.txt +34 -0
  22. package/lib/templates/migrator-runners/runner_override.txt +22 -0
  23. package/lib/templates/migrator-runners/script_override.txt +31 -0
  24. package/lib/templates/python_312_definition/template/connector/config/actions/example.yaml +40 -0
  25. package/lib/templates/python_312_definition/template/connector/config/assets/example.yaml +27 -0
  26. package/lib/templates/python_312_definition/template/data/asset.json +1 -0
  27. package/lib/templates/python_312_definition/template/docs/CHANGELOG.md.t +7 -0
  28. package/lib/templates/python_312_definition/template/docs/README.md +38 -0
  29. package/lib/templates/python_312_definition/template/requirements.txt +0 -0
  30. package/lib/templates/python_312_definition/template_src/connector/config/actions/example.yaml +40 -0
  31. package/lib/templates/python_312_definition/template_src/connector/config/assets/example.yaml +27 -0
  32. package/lib/templates/python_312_definition/template_src/connector/src/runner_override.py +11 -0
  33. package/lib/templates/python_312_definition/template_src/data/asset.json +1 -0
  34. package/lib/templates/python_312_definition/template_src/docs/CHANGELOG.md.t +7 -0
  35. package/lib/templates/python_312_definition/template_src/docs/README.md +38 -0
  36. package/lib/templates/python_312_definition/template_src/requirements.txt +0 -0
  37. package/lib/transformers/base-transformer.d.ts +6 -0
  38. package/lib/transformers/base-transformer.js +54 -0
  39. package/lib/transformers/base-transformer.js.map +1 -0
  40. package/lib/transformers/connector-generator.d.ts +18 -0
  41. package/lib/transformers/connector-generator.js +327 -0
  42. package/lib/transformers/connector-generator.js.map +1 -0
  43. package/lib/transformers/forked-plugin-transformer.d.ts +4 -0
  44. package/lib/transformers/forked-plugin-transformer.js +16 -0
  45. package/lib/transformers/forked-plugin-transformer.js.map +1 -0
  46. package/lib/transformers/index.d.ts +3 -0
  47. package/lib/transformers/index.js +17 -0
  48. package/lib/transformers/index.js.map +1 -0
  49. package/lib/transformers/script-transformer.d.ts +5 -0
  50. package/lib/transformers/script-transformer.js +16 -0
  51. package/lib/transformers/script-transformer.js.map +1 -0
  52. package/lib/types/connector-types.d.ts +8 -0
  53. package/lib/types/migrator-types.d.ts +59 -0
  54. package/lib/types/migrator-types.js +18 -0
  55. package/lib/types/migrator-types.js.map +1 -0
  56. package/oclif.manifest.json +183 -4
  57. package/package.json +13 -6
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.9.1",
2
+ "version": "3.11.1",
3
3
  "commands": {
4
4
  "action:add": {
5
5
  "id": "action:add",
@@ -150,7 +150,7 @@
150
150
  "sspPath": {
151
151
  "name": "sspPath",
152
152
  "type": "option",
153
- "description": "absolute path to .ssp file",
153
+ "description": "Absolute path to .ssp file",
154
154
  "multiple": false
155
155
  },
156
156
  "author": {
@@ -171,6 +171,30 @@
171
171
  "description": "Component Author Support URL",
172
172
  "multiple": false
173
173
  },
174
+ "readmePath": {
175
+ "name": "readmePath",
176
+ "type": "option",
177
+ "description": "Absolute path to README.md file",
178
+ "multiple": false
179
+ },
180
+ "externalReadmePath": {
181
+ "name": "externalReadmePath",
182
+ "type": "option",
183
+ "description": "Absolute path to EXTERNAL_README.md file",
184
+ "multiple": false
185
+ },
186
+ "documentationReadmePath": {
187
+ "name": "documentationReadmePath",
188
+ "type": "option",
189
+ "description": "Absolute path to documentation.README.md file",
190
+ "multiple": false
191
+ },
192
+ "externalymlPath": {
193
+ "name": "externalymlPath",
194
+ "type": "option",
195
+ "description": "Absolute path to external.yml file",
196
+ "multiple": false
197
+ },
174
198
  "help": {
175
199
  "name": "help",
176
200
  "type": "boolean",
@@ -979,6 +1003,136 @@
979
1003
  },
980
1004
  "args": {}
981
1005
  },
1006
+ "migrator:convert": {
1007
+ "id": "migrator:convert",
1008
+ "description": "Convert scripts and forked plugins from Swimlane V10x to connectors.",
1009
+ "strict": true,
1010
+ "pluginName": "@sw-tsdk/plugin-connector",
1011
+ "pluginAlias": "@sw-tsdk/plugin-connector",
1012
+ "pluginType": "core",
1013
+ "aliases": [],
1014
+ "flags": {
1015
+ "fromDirectory": {
1016
+ "name": "fromDirectory",
1017
+ "type": "option",
1018
+ "char": "f",
1019
+ "description": "Root directory of the 10X export.",
1020
+ "multiple": false,
1021
+ "default": "./"
1022
+ },
1023
+ "toDirectory": {
1024
+ "name": "toDirectory",
1025
+ "type": "option",
1026
+ "char": "t",
1027
+ "description": "Root directory of the destination repository.",
1028
+ "multiple": false,
1029
+ "default": "./connectors"
1030
+ },
1031
+ "vendor": {
1032
+ "name": "vendor",
1033
+ "type": "option",
1034
+ "description": "Vendor (e.g. CrowdStrike)",
1035
+ "multiple": false
1036
+ },
1037
+ "product": {
1038
+ "name": "product",
1039
+ "type": "option",
1040
+ "description": "Product (e.g. Falcon)",
1041
+ "multiple": false
1042
+ },
1043
+ "description": {
1044
+ "name": "description",
1045
+ "type": "option",
1046
+ "description": "Description (e.g. CrowdStrike Host Query API)",
1047
+ "multiple": false
1048
+ },
1049
+ "author": {
1050
+ "name": "author",
1051
+ "type": "option",
1052
+ "description": "Connector Author",
1053
+ "multiple": false
1054
+ },
1055
+ "authorEmail": {
1056
+ "name": "authorEmail",
1057
+ "type": "option",
1058
+ "description": "Connector Author Email",
1059
+ "multiple": false
1060
+ },
1061
+ "homepage": {
1062
+ "name": "homepage",
1063
+ "type": "option",
1064
+ "description": "Connector Author Support URL",
1065
+ "multiple": false
1066
+ },
1067
+ "help": {
1068
+ "name": "help",
1069
+ "type": "boolean",
1070
+ "char": "h",
1071
+ "description": "Show CLI help.",
1072
+ "allowNo": false
1073
+ }
1074
+ },
1075
+ "args": {}
1076
+ },
1077
+ "migrator:export": {
1078
+ "id": "migrator:export",
1079
+ "description": "Use to export python scripts from a Swimlane instance",
1080
+ "strict": true,
1081
+ "pluginName": "@sw-tsdk/plugin-connector",
1082
+ "pluginAlias": "@sw-tsdk/plugin-connector",
1083
+ "pluginType": "core",
1084
+ "aliases": [],
1085
+ "flags": {
1086
+ "log-level": {
1087
+ "name": "log-level",
1088
+ "type": "option",
1089
+ "hidden": true,
1090
+ "multiple": false,
1091
+ "options": [
1092
+ "debug"
1093
+ ]
1094
+ },
1095
+ "mongoConnectionString": {
1096
+ "name": "mongoConnectionString",
1097
+ "type": "option",
1098
+ "char": "c",
1099
+ "description": "Mongo Connection String",
1100
+ "multiple": false,
1101
+ "default": ""
1102
+ },
1103
+ "databaseName": {
1104
+ "name": "databaseName",
1105
+ "type": "option",
1106
+ "char": "d",
1107
+ "description": "Database Name",
1108
+ "multiple": false,
1109
+ "default": "Swimlane"
1110
+ },
1111
+ "outputFile": {
1112
+ "name": "outputFile",
1113
+ "type": "option",
1114
+ "char": "o",
1115
+ "description": "Output file",
1116
+ "multiple": false,
1117
+ "default": "scripts.zip"
1118
+ },
1119
+ "tlsAllowInvalidCertificates": {
1120
+ "name": "tlsAllowInvalidCertificates",
1121
+ "type": "boolean",
1122
+ "char": "i",
1123
+ "description": "Allow invalid certificates",
1124
+ "allowNo": false
1125
+ },
1126
+ "help": {
1127
+ "name": "help",
1128
+ "type": "boolean",
1129
+ "char": "h",
1130
+ "description": "Show CLI help.",
1131
+ "allowNo": false
1132
+ }
1133
+ },
1134
+ "args": {}
1135
+ },
982
1136
  "playbook:create": {
983
1137
  "id": "playbook:create",
984
1138
  "description": "Scaffold a new playbook",
@@ -1035,7 +1189,7 @@
1035
1189
  "sspPath": {
1036
1190
  "name": "sspPath",
1037
1191
  "type": "option",
1038
- "description": "absolute path to .ssp file",
1192
+ "description": "Absolute path to .ssp file",
1039
1193
  "multiple": false
1040
1194
  },
1041
1195
  "author": {
@@ -1056,6 +1210,30 @@
1056
1210
  "description": "Playbook Author Support URL",
1057
1211
  "multiple": false
1058
1212
  },
1213
+ "readmePath": {
1214
+ "name": "readmePath",
1215
+ "type": "option",
1216
+ "description": "Absolute path to README.md file",
1217
+ "multiple": false
1218
+ },
1219
+ "externalReadmePath": {
1220
+ "name": "externalReadmePath",
1221
+ "type": "option",
1222
+ "description": "Absolute path to EXTERNAL_README.md file",
1223
+ "multiple": false
1224
+ },
1225
+ "documentationReadmePath": {
1226
+ "name": "documentationReadmePath",
1227
+ "type": "option",
1228
+ "description": "Absolute path to documentation.README.md file",
1229
+ "multiple": false
1230
+ },
1231
+ "externalymlPath": {
1232
+ "name": "externalymlPath",
1233
+ "type": "option",
1234
+ "description": "Absolute path to external.yml file",
1235
+ "multiple": false
1236
+ },
1059
1237
  "help": {
1060
1238
  "name": "help",
1061
1239
  "type": "boolean",
@@ -1826,7 +2004,8 @@
1826
2004
  "node_20",
1827
2005
  "python_39_definition",
1828
2006
  "python_310_definition",
1829
- "python_311_definition"
2007
+ "python_311_definition",
2008
+ "python_312_definition"
1830
2009
  ]
1831
2010
  },
1832
2011
  "compile-override": {
package/package.json CHANGED
@@ -6,13 +6,16 @@
6
6
  "dependencies": {
7
7
  "@apidevtools/json-schema-ref-parser": "10.1.0",
8
8
  "@oclif/core": "2.8.5",
9
- "@sw-tsdk/common": "^3.9.1",
10
- "@sw-tsdk/connector": "^3.9.1",
11
- "@sw-tsdk/core": "^3.9.1",
12
- "@sw-tsdk/docker": "^3.9.1",
9
+ "@sw-tsdk/common": "^3.11.1",
10
+ "@sw-tsdk/connector": "^3.11.1",
11
+ "@sw-tsdk/core": "^3.11.1",
12
+ "@sw-tsdk/docker": "^3.11.1",
13
13
  "@swimlane/connector-interfaces": "1.11.0",
14
14
  "@swimlane/cosign": "1.4.1",
15
15
  "@swimlane/docker-reference": "2.0.1",
16
+ "@types/adm-zip": "^0.5.7",
17
+ "adm-zip": "0.5.1",
18
+ "archiver": "^7.0.1",
16
19
  "fs-extra": "11.1.1",
17
20
  "handlebars": "4.7.7",
18
21
  "inquirer": "8.2.2",
@@ -21,6 +24,7 @@
21
24
  "json-schema-faker": "0.5.0-rcv.46",
22
25
  "json-schema-typed": "7.0.3",
23
26
  "listr2": "6.6.0",
27
+ "mongodb": "^6.13.1",
24
28
  "noop-stream": "1.0.0",
25
29
  "npmlog": "7.0.1",
26
30
  "semver": "7.5.2",
@@ -73,6 +77,9 @@
73
77
  },
74
78
  "description": {
75
79
  "description": "Local description commands"
80
+ },
81
+ "migrator": {
82
+ "description": "Local migrator commands"
76
83
  }
77
84
  }
78
85
  },
@@ -95,6 +102,6 @@
95
102
  "posttest": "yarn lint",
96
103
  "dev:setup": "npm link"
97
104
  },
98
- "version": "3.9.1",
99
- "gitHead": "b0ecf39a08c42379ae016e54d2203e4690dc1a4c"
105
+ "version": "3.11.1",
106
+ "gitHead": "19426fb8524bccb52b4bfdbf42db5aac349ba80c"
100
107
  }