Skip to content

Commit

Permalink
fix: add default path for fc (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
czy88840616 committed Aug 4, 2020
1 parent 1c9966d commit 064d3f0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/serverless-spec-builder/src/fc/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class FCSpecBuilder extends SpecBuilder {
if (!httpEventRouters) {
httpEventRouters = {};
}
httpEventRouters[evt.path] = {
httpEventRouters[evt.path || '/*'] = {
serviceName,
functionName: funSpec.name || funName,
};
Expand Down
26 changes: 26 additions & 0 deletions scripts/sync_status.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const { execSync } = require('child_process');

const originData = execSync('npx lerna ls --json').toString();
const data = JSON.parse(originData);

const arr = [];

for (const item of data) {
console.log('---->', item.name);
if (item.private === false) {
const npmVersion = execSync(`npm show ${item.name} version`)
.toString()
.replace('\n', '');
const tnpmVersion = execSync(`tnpm show ${item.name} version`)
.toString()
.replace('\n', '');
if (npmVersion !== tnpmVersion) {
console.log(`===> npm: ${npmVersion}, tnpm: ${tnpmVersion}`);
arr.push(item.name);
}
}
}

if (arr.length) {
console.log(`output command => tnpm sync ${arr.join(' ')}`);
}

0 comments on commit 064d3f0

Please sign in to comment.