amplify-openapi-backend
Advanced tools
Comparing version 0.0.5 to 0.1.0
@@ -9,3 +9,3 @@ { | ||
"provider": "awscloudformation", | ||
"service": "Lambda", | ||
"services": ["Lambda"], | ||
"runtime": "nodejs" | ||
@@ -12,0 +12,0 @@ }, |
@@ -5,7 +5,7 @@ "use strict"; | ||
const provider_1 = require("./provider"); | ||
exports.functionTemplateContributorFactory = (context) => { | ||
const functionTemplateContributorFactory = (context) => { | ||
return { | ||
contribute: ({ selection }) => { | ||
if (selection === 'openapi-backend') { | ||
return provider_1.provider(); | ||
return (0, provider_1.provider)(); | ||
} | ||
@@ -16,2 +16,3 @@ throw new Error(`Unknown template selection [${selection}]`); | ||
}; | ||
exports.functionTemplateContributorFactory = functionTemplateContributorFactory; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,3 @@ | ||
export declare const provider: () => Promise<Pick<import("amplify-function-plugin-interface").FunctionParameters, "dependsOn" | "functionTemplate" | "triggerEventSourceMappings">>; | ||
import { FunctionTemplateParameters } from 'amplify-function-plugin-interface'; | ||
export declare const provider: () => Promise<FunctionTemplateParameters>; | ||
//# sourceMappingURL=provider.d.ts.map |
@@ -12,4 +12,4 @@ "use strict"; | ||
const pathToTemplateFiles = path_1.default.join(__dirname, '..', 'templates', 'openapi-backend'); | ||
exports.provider = async () => { | ||
const files = await util_1.promisify(fs_1.default.readdir)(pathToTemplateFiles); | ||
const provider = async () => { | ||
const files = await (0, util_1.promisify)(fs_1.default.readdir)(pathToTemplateFiles); | ||
const templateParameters = { | ||
@@ -23,3 +23,3 @@ functionTemplate: { | ||
defaultEditorFile: path_1.default.join('src', 'index.js'), | ||
destMap: utils_1.getDestMap(files), | ||
destMap: (0, utils_1.getDestMap)(files), | ||
}, | ||
@@ -29,2 +29,3 @@ }; | ||
}; | ||
exports.provider = provider; | ||
//# sourceMappingURL=provider.js.map |
@@ -8,3 +8,4 @@ "use strict"; | ||
const path_1 = __importDefault(require("path")); | ||
exports.getDestMap = (files) => files.reduce((acc, it) => Object.assign(acc, { [it]: path_1.default.join('src', it.replace(/\.ejs$/, '')) }), {}); | ||
const getDestMap = (files) => files.reduce((acc, it) => Object.assign(acc, { [it]: path_1.default.join('src', it.replace(/\.ejs$/, '')) }), {}); | ||
exports.getDestMap = getDestMap; | ||
//# sourceMappingURL=utils.js.map |
{ | ||
"name": "amplify-openapi-backend", | ||
"version": "0.0.5", | ||
"version": "0.1.0", | ||
"description": "", | ||
@@ -20,5 +20,8 @@ "repository": { | ||
"dependencies": { | ||
"amplify-function-plugin-interface": "^1.3.1" | ||
"amplify-function-plugin-interface": "^1.9.1" | ||
}, | ||
"gitHead": "ad1fde6161a6dfb0541e543e1c82967660e63bcc" | ||
"gitHead": "a26c24de8f4260ecefaf50dba360b8aff4098ae8", | ||
"devDependencies": { | ||
"typescript": "^4.4.3" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123
31732
1
23