@trayio/tray-openapi 2.8.0 → 2.9.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenApiSchemaImporter.d.ts","sourceRoot":"","sources":["../src/OpenApiSchemaImporter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"OpenApiSchemaImporter.d.ts","sourceRoot":"","sources":["../src/OpenApiSchemaImporter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AASvC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAwBlE,qBAAa,qBAAqB;IACrB,OAAO,CAAC,SAAS;IAAa,OAAO,CAAC,WAAW;gBAAzC,SAAS,EAAE,SAAS,EAAU,WAAW,EAAE,WAAW;IAE1E,cAAc,CACb,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,MAAM,GACnB,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC;IAgClC,OAAO,CAAC,yBAAyB;IAmCjC,OAAO,CAAC,cAAc;IAoCtB,OAAO,CAAC,oCAAoC;IA0E5C,OAAO,CAAC,0BAA0B;IAwBlC,OAAO,CAAC,0BAA0B;CAclC"}
|
|
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.OpenApiSchemaImporter = void 0;
|
|
27
27
|
const TE = __importStar(require("fp-ts/TaskEither"));
|
|
28
28
|
const E = __importStar(require("fp-ts/Either"));
|
|
29
|
+
const O = __importStar(require("fp-ts/Option"));
|
|
29
30
|
const function_1 = require("fp-ts/function");
|
|
30
31
|
const Array_1 = require("fp-ts/Array");
|
|
31
32
|
const Apply_1 = require("fp-ts/Apply");
|
|
@@ -71,7 +72,7 @@ class OpenApiSchemaImporter {
|
|
|
71
72
|
content: stream_1.Readable.from(content),
|
|
72
73
|
key: `${operationPath}/${fileName}`,
|
|
73
74
|
metadata: { name: fileName },
|
|
74
|
-
});
|
|
75
|
+
}, O.none);
|
|
75
76
|
const operationFileGenerationTasks = {
|
|
76
77
|
handler: (0, function_1.pipe)(TE.fromEither((0, GenerateHandler_1.generateHandler)({
|
|
77
78
|
connectorNamePascalCase: StringExtensions_1.StringExtensions.pascalCase(connectorName),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenerateOperationJson.d.ts","sourceRoot":"","sources":["../../src/file-generators/GenerateOperationJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"GenerateOperationJson.d.ts","sourceRoot":"","sources":["../../src/file-generators/GenerateOperationJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAGvC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,eAAO,MAAM,qBAAqB,gBACpB,WAAW,oBACN,MAAM,0BACA,MAAM,0BACN,MAAM,wBACR,MAAM,KAC1B,GAAG,UAAU,CAAC,KAAK,EAAE,SAAS,CAuBhC,CAAC"}
|
|
@@ -25,6 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.generateOperationJson = void 0;
|
|
27
27
|
const TE = __importStar(require("fp-ts/TaskEither"));
|
|
28
|
+
const O = __importStar(require("fp-ts/Option"));
|
|
28
29
|
const function_1 = require("fp-ts/function");
|
|
29
30
|
const stream_1 = require("stream");
|
|
30
31
|
const generateOperationJson = (fileStorage, operationDirPath, operationNameSnakeCase, operationNameKebabCase, operationDescription) => {
|
|
@@ -37,7 +38,7 @@ const generateOperationJson = (fileStorage, operationDirPath, operationNameSnake
|
|
|
37
38
|
content: stream_1.Readable.from(JSON.stringify(operationJson)),
|
|
38
39
|
key: `${operationDirPath}/operation.json`,
|
|
39
40
|
metadata: { name: 'operation.json' },
|
|
40
|
-
});
|
|
41
|
+
}, O.none);
|
|
41
42
|
return (0, function_1.pipe)(writeOperationJson, TE.mapLeft((error) => new Error(`Failed to generate operation.json for operation: ${error}`)), TE.map(() => undefined));
|
|
42
43
|
};
|
|
43
44
|
exports.generateOperationJson = generateOperationJson;
|