From dfb710158c180686fd0df27ce5386e4633486501 Mon Sep 17 00:00:00 2001 From: wss-git Date: Fri, 6 Aug 2021 13:45:35 +0800 Subject: [PATCH] refactor: v0.0.15 --- doc/classes/default.html | 6 +++--- lib/index.js | 6 +++--- package.json | 2 +- publish.yaml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/classes/default.html b/doc/classes/default.html index 9495a74..31495e8 100644 --- a/doc/classes/default.html +++ b/doc/classes/default.html @@ -123,7 +123,7 @@
  • Parameters

    @@ -146,7 +146,7 @@
  • @@ -174,7 +174,7 @@
  • Parameters

    diff --git a/lib/index.js b/lib/index.js index b7e32d4..3e62796 100644 --- a/lib/index.js +++ b/lib/index.js @@ -75,7 +75,7 @@ class FcRemoteInvoke { // 去除 args 的行首以及行尾的空格 const args = ((inputs === null || inputs === void 0 ? void 0 : inputs.args) || '').replace(/(^\s*)|(\s*$)/g, ''); logger_1.default.debug(`input args: ${args}`); - const parsedArgs = core.commandParse({ args }, { + const parsedArgs = core.commandParse(Object.assign(Object.assign({}, inputs), { args }), { boolean: ['help', 'event-stdin'], string: ['invocation-type', 'event', 'event-file', 'region', 'domain-name', 'service-name', 'function-name', 'qualifier'], alias: { @@ -92,7 +92,7 @@ class FcRemoteInvoke { isHelp: true, }; } - const { e: event, f: eventFile, 'event-file': eventStdin, 'invocation-type': invocationType = 'sync', 'domain-name': domainName, } = argsData; + const { e: event, f: eventFile, 'event-stdin': eventStdin, 'invocation-type': invocationType = 'sync', 'domain-name': domainName, } = argsData; const eventPayload = { event, eventFile, eventStdin }; // @ts-ignore: 判断三个值有几个真 const eventFlag = !!event + !!eventFile + !!eventStdin; @@ -131,4 +131,4 @@ class FcRemoteInvoke { } } exports.default = FcRemoteInvoke; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMi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FLFVBQVUsRUFBRSxVQUFVLFdBQUksTUFBTSxDQUFDLEtBQUssMENBQUUsVUFBVSxDQUFBO2dCQUNsRCxTQUFTLEVBQUUsUUFBUSxDQUFDLFNBQVMsV0FBSSxNQUFNLENBQUMsS0FBSywwQ0FBRSxTQUFTLENBQUE7YUFDekQsQ0FBQztZQUNGLGdCQUFNLENBQUMsS0FBSyxDQUFDLHFCQUFxQixJQUFJLENBQUMsU0FBUyxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsQ0FBQztZQUMzRCxJQUFJLENBQUMscUJBQVksQ0FBQyxLQUFLLENBQUMsRUFBRTtnQkFDeEIsTUFBTSxJQUFJLEtBQUssQ0FBQyxnRkFBZ0YsQ0FBQyxDQUFDO2FBQ25HO1lBRUQsT0FBTztnQkFDTCxLQUFLO2dCQUNMLFdBQVcsRUFBRSxNQUFNLENBQUMsV0FBVztnQkFDL0IsWUFBWTtnQkFDWixNQUFNLEVBQUUsS0FBSztnQkFDYixjQUFjLEVBQUUsZ0JBQUMsQ0FBQyxVQUFVLENBQUMsY0FBYyxDQUFDO2FBQzdDLENBQUM7O0tBQ0g7Q0FFRjtBQTNHRCxpQ0EyR0MifQ== \ No newline at end of file diff --git a/package.json b/package.json index 841d346..b02d67f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fc-remote-invoke", - "version": "0.0.14", + "version": "0.0.15", "description": "This is a component demo for Serverless Devs Tool ", "keywords": [ "Serverless", diff --git a/publish.yaml b/publish.yaml index e41342d..aa1a9a2 100644 --- a/publish.yaml +++ b/publish.yaml @@ -2,7 +2,7 @@ Type: Component Name: fc-remote-invoke Provider: - 其它 -Version: 0.0.14 +Version: 0.0.15 Description: 初始化component模板 HomePage: https://www.serverless-devs.com Tags: #标签详情