Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

Commit

Permalink
fix: layer format (#22)
Browse files Browse the repository at this point in the history
* fix: remove pkg unit test

* fix: remove serverless-midway-plugin

* fix: export all invoke function

* fix: layer check
  • Loading branch information
echosoar authored and czy88840616 committed Jan 14, 2020
1 parent 1ec7fb8 commit 31ee630
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/faas-cli-plugin-package/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ interface Ilayer {
}

export function formatLayers(...multiLayers: Ilayer[]) {
const layerTypeList = { npm: {} };
const layerTypeList = { npm: {}, oss: {} };
multiLayers.forEach((layer: Ilayer) => {
Object.keys(layer || {}).forEach(layerName => {
if (!layer[layerName] || !layer[layerName].path) {
return;
}
const [type, path] = layer[layerName].path.split(':');
if (!layerTypeList[type]) {
return;
Expand Down

0 comments on commit 31ee630

Please sign in to comment.