@geek-fun/serverlessinsight 0.6.3 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geek-fun/serverlessinsight",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "Full life cycle cross providers serverless application management for your fast-growing business.",
|
|
5
5
|
"homepage": "https://serverlessinsight.geekfun.club",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -58,12 +58,13 @@ const createCasOperations = (casClient) => {
|
|
|
58
58
|
};
|
|
59
59
|
},
|
|
60
60
|
getCertificate: async (certificateId) => {
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
const certIdStr = String(certificateId);
|
|
62
|
+
if (certIdStr.startsWith('cas_') || certIdStr.startsWith('cas-')) {
|
|
63
|
+
throw new Error(lang_1.lang.__('CERT_USING_SUBSCRIPTION_ID', { provided: certIdStr }));
|
|
63
64
|
}
|
|
64
|
-
const numericId = Number(
|
|
65
|
+
const numericId = Number(certIdStr);
|
|
65
66
|
if (Number.isNaN(numericId)) {
|
|
66
|
-
throw new Error(lang_1.lang.__('CERT_INVALID_CONFIGURATION', { name:
|
|
67
|
+
throw new Error(lang_1.lang.__('CERT_INVALID_CONFIGURATION', { name: certIdStr }));
|
|
67
68
|
}
|
|
68
69
|
try {
|
|
69
70
|
const request = new cas.GetUserCertificateDetailRequest({
|
|
@@ -58,13 +58,14 @@ const triggerToApigwApiConfig = (event, trigger, groupId, serviceName, region, s
|
|
|
58
58
|
const backend = trigger.backend;
|
|
59
59
|
const resolvedFunctionName = resolveFunctionReference(backend);
|
|
60
60
|
const apiKey = (0, exports.generateApiKey)(method, path);
|
|
61
|
+
const protocolConfig = (0, exports.inferProtocolConfig)(event.domain?.protocol);
|
|
61
62
|
return {
|
|
62
63
|
groupId,
|
|
63
64
|
apiName: `${event.name}-${stage}-agw-api-${apiKey}`.replace(/_/g, '-'),
|
|
64
65
|
visibility: 'PRIVATE',
|
|
65
66
|
authType: 'ANONYMOUS',
|
|
66
67
|
requestConfig: {
|
|
67
|
-
requestProtocol:
|
|
68
|
+
requestProtocol: protocolConfig.requestProtocol,
|
|
68
69
|
requestHttpMethod: method,
|
|
69
70
|
requestPath: path,
|
|
70
71
|
requestMode: 'PASSTHROUGH',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geek-fun/serverlessinsight",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "Full life cycle cross providers serverless application management for your fast-growing business.",
|
|
5
5
|
"homepage": "https://serverlessinsight.geekfun.club",
|
|
6
6
|
"main": "dist/src/index.js",
|