st-open-api
Version:
Generates API client SDKs from an OpenAPI specification written in OpenAPI version 3.x.x
20 lines • 1.35 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.copyResources = void 0;
var nodePath = require("path");
var fs_1 = require("fs");
var copyResources = function (configuration) {
var folder = configuration.getFolderManager();
var iAjaxInterface = nodePath.join(__dirname, '..', 'static', 'interface', 'i-$-open-api.ts');
var httpFunction = nodePath.join(__dirname, '..', 'static', 'function', "http.ts");
var fetchNodeFunction = nodePath.join(__dirname, '..', 'static', 'function', "fetch-node.ts");
var queryFunction = nodePath.join(__dirname, '..', 'static', 'function', 'get-query-params.ts');
var openApiFunction = nodePath.join(__dirname, '..', 'static', 'function', 'open-api.ts');
(0, fs_1.copyFileSync)(httpFunction, nodePath.join(folder.getFunctionFolder(), 'http.ts'));
(0, fs_1.copyFileSync)(queryFunction, nodePath.join(folder.getFunctionFolder(), 'get-query-params.ts'));
(0, fs_1.copyFileSync)(openApiFunction, nodePath.join(folder.getFunctionFolder(), 'open-api.ts'));
(0, fs_1.copyFileSync)(iAjaxInterface, nodePath.join(folder.getInterfaceFolder(), 'i-$-open-api.ts'));
(0, fs_1.copyFileSync)(fetchNodeFunction, nodePath.join(folder.getFunctionFolder(), 'fetch-node.ts'));
};
exports.copyResources = copyResources;
//# sourceMappingURL=copy-resources.js.map