@geek-fun/serverlessinsight 0.6.15 → 0.7.1
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/AGENTS.md +405 -10
- package/README.md +59 -1
- package/README.zh-CN.md +3 -1
- package/dist/package.json +42 -34
- package/dist/src/commands/deploy.js +4 -0
- package/dist/src/commands/destroy.js +4 -0
- package/dist/src/common/aliyunClient/apigwOperations.js +9 -4
- package/dist/src/common/aliyunClient/cdnOperations.js +191 -0
- package/dist/src/common/aliyunClient/ecsOperations.js +2 -2
- package/dist/src/common/aliyunClient/fc3Operations.js +1 -1
- package/dist/src/common/aliyunClient/index.js +8 -0
- package/dist/src/common/aliyunClient/ossOperations.js +62 -2
- package/dist/src/common/aliyunClient/ramOperations.js +1 -1
- package/dist/src/common/credentials.js +12 -0
- package/dist/src/common/hashUtils.js +4 -0
- package/dist/src/common/iacHelper.js +5 -0
- package/dist/src/common/lockManager.js +8 -0
- package/dist/src/common/planFormatter.js +4 -0
- package/dist/src/common/providerEnum.js +1 -0
- package/dist/src/common/retryUtils.js +1 -1
- package/dist/src/common/runtimeMapper.js +24 -3
- package/dist/src/common/stateManager.js +10 -0
- package/dist/src/common/volcengineClient/apigwOperations.js +271 -0
- package/dist/src/common/volcengineClient/iamOperations.js +349 -0
- package/dist/src/common/volcengineClient/index.js +99 -0
- package/dist/src/common/volcengineClient/tlsOperations.js +256 -0
- package/dist/src/common/volcengineClient/tosOperations.js +440 -0
- package/dist/src/common/volcengineClient/types.js +26 -0
- package/dist/src/common/volcengineClient/vefaasOperations.js +386 -0
- package/dist/src/lang/en.js +135 -0
- package/dist/src/lang/zh-CN.js +134 -0
- package/dist/src/parser/bucketParser.js +111 -46
- package/dist/src/stack/aliyunStack/apigwResource.js +310 -47
- package/dist/src/stack/aliyunStack/apigwTypes.js +61 -1
- package/dist/src/stack/aliyunStack/ossResource.js +401 -69
- package/dist/src/stack/aliyunStack/ossTypes.js +58 -16
- package/dist/src/stack/deploy.js +4 -0
- package/dist/src/stack/scfStack/cosTypes.js +3 -6
- package/dist/src/stack/volcengineStack/apigwExecutor.js +87 -0
- package/dist/src/stack/volcengineStack/apigwPlanner.js +110 -0
- package/dist/src/stack/volcengineStack/apigwResource.js +302 -0
- package/dist/src/stack/volcengineStack/apigwTypes.js +106 -0
- package/dist/src/stack/volcengineStack/deployer.js +59 -0
- package/dist/src/stack/volcengineStack/destroyer.js +72 -0
- package/dist/src/stack/volcengineStack/index.js +44 -0
- package/dist/src/stack/volcengineStack/planner.js +27 -0
- package/dist/src/stack/volcengineStack/tosExecutor.js +106 -0
- package/dist/src/stack/volcengineStack/tosPlanner.js +96 -0
- package/dist/src/stack/volcengineStack/tosResource.js +103 -0
- package/dist/src/stack/volcengineStack/tosTypes.js +63 -0
- package/dist/src/stack/volcengineStack/vefaasExecutor.js +102 -0
- package/dist/src/stack/volcengineStack/vefaasPlanner.js +84 -0
- package/dist/src/stack/volcengineStack/vefaasResource.js +513 -0
- package/dist/src/stack/volcengineStack/vefaasTypes.js +75 -0
- package/dist/src/types/domains/state.js +6 -0
- package/dist/src/validator/bucketSchema.js +124 -56
- package/dist/src/validator/eventSchema.js +20 -0
- package/dist/src/validator/functionSchema.js +13 -0
- package/dist/src/validator/rootSchema.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +42 -34
- package/samples/README_TENCENT_COS.md +3 -15
- package/samples/aliyun-poc-bucket-cdn.yml +63 -0
- package/samples/aliyun-poc-bucket.yml +0 -2
- package/samples/aliyun-poc-domain.yml +0 -2
- package/samples/tencent-poc-cos.yml +0 -2
- package/samples/volcengine-poc-advanced.yml +59 -0
- package/samples/volcengine-poc-api.yml +31 -0
- package/samples/volcengine-poc-bucket.yml +16 -0
- package/samples/volcengine-poc-function.yml +19 -0
- package/samples/volcengine-poc-vpc.yml +34 -0
|
@@ -2,6 +2,126 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.bucketSchema = void 0;
|
|
4
4
|
const templateRefSchema_1 = require("./templateRefSchema");
|
|
5
|
+
const cdnSchema = {
|
|
6
|
+
oneOf: [
|
|
7
|
+
{ type: 'boolean' },
|
|
8
|
+
{
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
enabled: templateRefSchema_1.resolvableBoolean,
|
|
12
|
+
cdn_type: { type: 'string', enum: ['web', 'download', 'video'] },
|
|
13
|
+
scope: { type: 'string', enum: ['domestic', 'overseas', 'global'] },
|
|
14
|
+
cache_ttl: { type: 'number' },
|
|
15
|
+
ignore_query_string: templateRefSchema_1.resolvableBoolean,
|
|
16
|
+
origin_protocol: { type: 'string', enum: ['http', 'https', 'follow'] },
|
|
17
|
+
compression: templateRefSchema_1.resolvableBoolean,
|
|
18
|
+
force_redirect_https: templateRefSchema_1.resolvableBoolean,
|
|
19
|
+
},
|
|
20
|
+
additionalProperties: false,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
const bucketDomainSchema = {
|
|
25
|
+
oneOf: [
|
|
26
|
+
{ type: 'string' },
|
|
27
|
+
{
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
domain_name: { type: 'string' },
|
|
31
|
+
certificate_id: { type: 'string' },
|
|
32
|
+
certificate_body: { type: 'string' },
|
|
33
|
+
certificate_private_key: { type: 'string' },
|
|
34
|
+
protocol: {
|
|
35
|
+
oneOf: [
|
|
36
|
+
{ type: 'string', enum: ['HTTP', 'HTTPS'] },
|
|
37
|
+
{
|
|
38
|
+
type: 'array',
|
|
39
|
+
items: { type: 'string', enum: ['HTTP', 'HTTPS'] },
|
|
40
|
+
minItems: 1,
|
|
41
|
+
uniqueItems: true,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
www_bind_apex: templateRefSchema_1.resolvableBoolean,
|
|
46
|
+
cdn: cdnSchema,
|
|
47
|
+
accelerate: templateRefSchema_1.resolvableBoolean,
|
|
48
|
+
},
|
|
49
|
+
required: ['domain_name'],
|
|
50
|
+
additionalProperties: false,
|
|
51
|
+
oneOf: [
|
|
52
|
+
{
|
|
53
|
+
not: {
|
|
54
|
+
anyOf: [
|
|
55
|
+
{ required: ['certificate_id'] },
|
|
56
|
+
{ required: ['certificate_body'] },
|
|
57
|
+
{ required: ['certificate_private_key'] },
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
required: ['certificate_body', 'certificate_private_key'],
|
|
63
|
+
not: { required: ['certificate_id'] },
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
required: ['certificate_id'],
|
|
67
|
+
not: {
|
|
68
|
+
anyOf: [{ required: ['certificate_body'] }, { required: ['certificate_private_key'] }],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
const bucketWebsiteDomainSchema = {
|
|
76
|
+
oneOf: [
|
|
77
|
+
{ type: 'string' },
|
|
78
|
+
{
|
|
79
|
+
type: 'object',
|
|
80
|
+
properties: {
|
|
81
|
+
domain_name: { type: 'string' },
|
|
82
|
+
certificate_id: { type: 'string' },
|
|
83
|
+
certificate_body: { type: 'string' },
|
|
84
|
+
certificate_private_key: { type: 'string' },
|
|
85
|
+
protocol: {
|
|
86
|
+
oneOf: [
|
|
87
|
+
{ type: 'string', enum: ['HTTP', 'HTTPS'] },
|
|
88
|
+
{
|
|
89
|
+
type: 'array',
|
|
90
|
+
items: { type: 'string', enum: ['HTTP', 'HTTPS'] },
|
|
91
|
+
minItems: 1,
|
|
92
|
+
uniqueItems: true,
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
www_bind_apex: templateRefSchema_1.resolvableBoolean,
|
|
97
|
+
cdn: cdnSchema,
|
|
98
|
+
},
|
|
99
|
+
required: ['domain_name'],
|
|
100
|
+
additionalProperties: false,
|
|
101
|
+
oneOf: [
|
|
102
|
+
{
|
|
103
|
+
not: {
|
|
104
|
+
anyOf: [
|
|
105
|
+
{ required: ['certificate_id'] },
|
|
106
|
+
{ required: ['certificate_body'] },
|
|
107
|
+
{ required: ['certificate_private_key'] },
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
required: ['certificate_body', 'certificate_private_key'],
|
|
113
|
+
not: { required: ['certificate_id'] },
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
required: ['certificate_id'],
|
|
117
|
+
not: {
|
|
118
|
+
anyOf: [{ required: ['certificate_body'] }, { required: ['certificate_private_key'] }],
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
};
|
|
5
125
|
exports.bucketSchema = {
|
|
6
126
|
$id: 'https://serverlessinsight.geekfun.club/schemas/bucketschema.json',
|
|
7
127
|
type: 'object',
|
|
@@ -46,71 +166,19 @@ exports.bucketSchema = {
|
|
|
46
166
|
},
|
|
47
167
|
additionalProperties: false,
|
|
48
168
|
},
|
|
169
|
+
// Canonical domain config (top-level)
|
|
170
|
+
domain: bucketDomainSchema,
|
|
49
171
|
website: {
|
|
50
172
|
type: 'object',
|
|
51
173
|
properties: {
|
|
52
174
|
code: {
|
|
53
175
|
type: 'string',
|
|
54
176
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
{ type: 'string' },
|
|
58
|
-
{
|
|
59
|
-
type: 'object',
|
|
60
|
-
properties: {
|
|
61
|
-
domain_name: { type: 'string' },
|
|
62
|
-
certificate_id: { type: 'string' },
|
|
63
|
-
certificate_body: { type: 'string' },
|
|
64
|
-
certificate_private_key: { type: 'string' },
|
|
65
|
-
protocol: {
|
|
66
|
-
oneOf: [
|
|
67
|
-
{ type: 'string', enum: ['HTTP', 'HTTPS'] },
|
|
68
|
-
{
|
|
69
|
-
type: 'array',
|
|
70
|
-
items: { type: 'string', enum: ['HTTP', 'HTTPS'] },
|
|
71
|
-
minItems: 1,
|
|
72
|
-
uniqueItems: true,
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
},
|
|
76
|
-
www_bind_apex: templateRefSchema_1.resolvableBoolean,
|
|
77
|
-
},
|
|
78
|
-
required: ['domain_name'],
|
|
79
|
-
additionalProperties: false,
|
|
80
|
-
oneOf: [
|
|
81
|
-
{
|
|
82
|
-
not: {
|
|
83
|
-
anyOf: [
|
|
84
|
-
{ required: ['certificate_id'] },
|
|
85
|
-
{ required: ['certificate_body'] },
|
|
86
|
-
{ required: ['certificate_private_key'] },
|
|
87
|
-
],
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
required: ['certificate_body', 'certificate_private_key'],
|
|
92
|
-
not: { required: ['certificate_id'] },
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
required: ['certificate_id'],
|
|
96
|
-
not: {
|
|
97
|
-
anyOf: [
|
|
98
|
-
{ required: ['certificate_body'] },
|
|
99
|
-
{ required: ['certificate_private_key'] },
|
|
100
|
-
],
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
],
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
},
|
|
177
|
+
// Deprecated: Use top-level `domain` instead
|
|
178
|
+
domain: bucketWebsiteDomainSchema,
|
|
107
179
|
index: {
|
|
108
180
|
type: 'string',
|
|
109
181
|
},
|
|
110
|
-
error_page: {
|
|
111
|
-
type: 'string',
|
|
112
|
-
},
|
|
113
|
-
error_code: templateRefSchema_1.resolvableNumber,
|
|
114
182
|
},
|
|
115
183
|
required: ['code'],
|
|
116
184
|
additionalProperties: false,
|
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.eventSchema = void 0;
|
|
4
4
|
const templateRefSchema_1 = require("./templateRefSchema");
|
|
5
|
+
const cdnSchema = {
|
|
6
|
+
oneOf: [
|
|
7
|
+
{ type: 'boolean' },
|
|
8
|
+
{
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
enabled: { type: 'boolean' },
|
|
12
|
+
cdn_type: { type: 'string', enum: ['web', 'download', 'video'] },
|
|
13
|
+
scope: { type: 'string', enum: ['domestic', 'overseas', 'global'] },
|
|
14
|
+
cache_ttl: { type: 'number' },
|
|
15
|
+
ignore_query_string: { type: 'boolean' },
|
|
16
|
+
origin_protocol: { type: 'string', enum: ['http', 'https', 'follow'] },
|
|
17
|
+
compression: { type: 'boolean' },
|
|
18
|
+
force_redirect_https: { type: 'boolean' },
|
|
19
|
+
},
|
|
20
|
+
additionalProperties: false,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
};
|
|
5
24
|
exports.eventSchema = {
|
|
6
25
|
$id: 'https://serverlessinsight.geekfun.club/schemas/eventschema.json',
|
|
7
26
|
type: 'object',
|
|
@@ -41,6 +60,7 @@ exports.eventSchema = {
|
|
|
41
60
|
],
|
|
42
61
|
},
|
|
43
62
|
www_bind_apex: { type: 'boolean' },
|
|
63
|
+
cdn: cdnSchema,
|
|
44
64
|
},
|
|
45
65
|
oneOf: [
|
|
46
66
|
{
|
|
@@ -45,6 +45,19 @@ exports.functionSchema = {
|
|
|
45
45
|
'php5.6',
|
|
46
46
|
'go1',
|
|
47
47
|
'dotnet_core3.1',
|
|
48
|
+
'nodejs/v20',
|
|
49
|
+
'nodejs/v18',
|
|
50
|
+
'nodejs/v16',
|
|
51
|
+
'nodejs/v14',
|
|
52
|
+
'python/v3.12',
|
|
53
|
+
'python/v3.11',
|
|
54
|
+
'python/v3.10',
|
|
55
|
+
'python/v3.9',
|
|
56
|
+
'golang/v1',
|
|
57
|
+
'java/v21',
|
|
58
|
+
'java/v17',
|
|
59
|
+
'java/v11',
|
|
60
|
+
'java/v8',
|
|
48
61
|
]),
|
|
49
62
|
handler: { type: 'string' },
|
|
50
63
|
path: { type: 'string' },
|
|
@@ -10,7 +10,7 @@ exports.rootSchema = {
|
|
|
10
10
|
provider: {
|
|
11
11
|
type: 'object',
|
|
12
12
|
properties: {
|
|
13
|
-
name: { type: 'string', enum: ['huawei', 'aliyun', 'tencent', 'aws'] },
|
|
13
|
+
name: { type: 'string', enum: ['huawei', 'aliyun', 'tencent', 'aws', 'volcengine'] },
|
|
14
14
|
region: { type: 'string' },
|
|
15
15
|
},
|
|
16
16
|
required: ['name', 'region'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/commands/deploy.ts","../src/commands/destroy.ts","../src/commands/forceUnlock.ts","../src/commands/index.ts","../src/commands/local.ts","../src/commands/plan.ts","../src/commands/show.ts","../src/commands/validate.ts","../src/common/base64.ts","../src/common/certUtils.ts","../src/common/constants.ts","../src/common/context.ts","../src/common/credentials.ts","../src/common/domainUtils.ts","../src/common/fileUtils.ts","../src/common/getVersion.ts","../src/common/hashUtils.ts","../src/common/iacHelper.ts","../src/common/imsClient.ts","../src/common/index.ts","../src/common/lockManager.ts","../src/common/logger.ts","../src/common/planFormatter.ts","../src/common/providerEnum.ts","../src/common/requestHelper.ts","../src/common/retryUtils.ts","../src/common/runtimeMapper.ts","../src/common/scfClient.ts","../src/common/sidUtils.ts","../src/common/stateManager.ts","../src/common/aliyunClient/apigwOperations.ts","../src/common/aliyunClient/casOperations.ts","../src/common/aliyunClient/dnsOperations.ts","../src/common/aliyunClient/ecsOperations.ts","../src/common/aliyunClient/esOperations.ts","../src/common/aliyunClient/fc3Operations.ts","../src/common/aliyunClient/index.ts","../src/common/aliyunClient/nasOperations.ts","../src/common/aliyunClient/ossOperations.ts","../src/common/aliyunClient/ramOperations.ts","../src/common/aliyunClient/rdsOperations.ts","../src/common/aliyunClient/slsOperations.ts","../src/common/aliyunClient/tablestoreOperations.ts","../src/common/aliyunClient/types.ts","../src/common/dependencyGraph/graph.ts","../src/common/dependencyGraph/index.ts","../src/common/dependencyGraph/types.ts","../src/common/stateBackend/cosStateBackend.ts","../src/common/stateBackend/index.ts","../src/common/stateBackend/localStateBackend.ts","../src/common/stateBackend/lockUtils.ts","../src/common/stateBackend/ossStateBackend.ts","../src/common/stateBackend/remoteStateBackend.ts","../src/common/stateBackend/types.ts","../src/common/tencentClient/cosOperations.ts","../src/common/tencentClient/dnspodOperations.ts","../src/common/tencentClient/esOperations.ts","../src/common/tencentClient/index.ts","../src/common/tencentClient/scfOperations.ts","../src/common/tencentClient/sslOperations.ts","../src/common/tencentClient/tdsqlcOperations.ts","../src/common/tencentClient/types.ts","../src/lang/en.ts","../src/lang/index.ts","../src/lang/zh-CN.ts","../src/parser/bucketParser.ts","../src/parser/databaseParser.ts","../src/parser/eventParser.ts","../src/parser/functionParser.ts","../src/parser/index.ts","../src/parser/parseUtils.ts","../src/parser/tableParser.ts","../src/parser/tagParser.ts","../src/stack/bucketTypes.ts","../src/stack/deploy.ts","../src/stack/index.ts","../src/stack/aliyunStack/apigwExecutor.ts","../src/stack/aliyunStack/apigwPlanner.ts","../src/stack/aliyunStack/apigwResource.ts","../src/stack/aliyunStack/apigwTypes.ts","../src/stack/aliyunStack/databaseExecutor.ts","../src/stack/aliyunStack/databasePlanner.ts","../src/stack/aliyunStack/databaseResource.ts","../src/stack/aliyunStack/deployer.ts","../src/stack/aliyunStack/destroyer.ts","../src/stack/aliyunStack/esServerlessTypes.ts","../src/stack/aliyunStack/fc3Executor.ts","../src/stack/aliyunStack/fc3Planner.ts","../src/stack/aliyunStack/fc3Resource.ts","../src/stack/aliyunStack/fc3Types.ts","../src/stack/aliyunStack/index.ts","../src/stack/aliyunStack/ossExecutor.ts","../src/stack/aliyunStack/ossPlanner.ts","../src/stack/aliyunStack/ossResource.ts","../src/stack/aliyunStack/ossTypes.ts","../src/stack/aliyunStack/planner.ts","../src/stack/aliyunStack/rdsTypes.ts","../src/stack/aliyunStack/tablestoreExecutor.ts","../src/stack/aliyunStack/tablestorePlanner.ts","../src/stack/aliyunStack/tablestoreResource.ts","../src/stack/aliyunStack/tablestoreTypes.ts","../src/stack/localStack/aliyunFc.ts","../src/stack/localStack/bucket.ts","../src/stack/localStack/event.ts","../src/stack/localStack/function.ts","../src/stack/localStack/functionRunner.ts","../src/stack/localStack/index.ts","../src/stack/localStack/localServer.ts","../src/stack/localStack/utils.ts","../src/stack/rfsStack/function.ts","../src/stack/rfsStack/index.ts","../src/stack/scfStack/cosExecutor.ts","../src/stack/scfStack/cosPlanner.ts","../src/stack/scfStack/cosResource.ts","../src/stack/scfStack/cosTypes.ts","../src/stack/scfStack/deployer.ts","../src/stack/scfStack/destroyer.ts","../src/stack/scfStack/esServerlessExecutor.ts","../src/stack/scfStack/esServerlessPlanner.ts","../src/stack/scfStack/esServerlessResource.ts","../src/stack/scfStack/esServerlessTypes.ts","../src/stack/scfStack/index.ts","../src/stack/scfStack/planner.ts","../src/stack/scfStack/scfExecutor.ts","../src/stack/scfStack/scfPlanner.ts","../src/stack/scfStack/scfResource.ts","../src/stack/scfStack/scfTypes.ts","../src/stack/scfStack/tdsqlcExecutor.ts","../src/stack/scfStack/tdsqlcPlanner.ts","../src/stack/scfStack/tdsqlcResource.ts","../src/stack/scfStack/tdsqlcTypes.ts","../src/types/assets.ts","../src/types/index.ts","../src/types/tablestore.d.ts","../src/types/domains/backend.ts","../src/types/domains/bucket.ts","../src/types/domains/context.ts","../src/types/domains/database.ts","../src/types/domains/event.ts","../src/types/domains/function.ts","../src/types/domains/lock.ts","../src/types/domains/provider.ts","../src/types/domains/resolvable.ts","../src/types/domains/state.ts","../src/types/domains/table.ts","../src/types/domains/tag.ts","../src/types/domains/vars.ts","../src/types/localStack/index.ts","../src/validator/bucketSchema.ts","../src/validator/databaseSchema.ts","../src/validator/eventSchema.ts","../src/validator/functionSchema.ts","../src/validator/iacSchema.ts","../src/validator/index.ts","../src/validator/rootSchema.ts","../src/validator/tableschema.ts","../src/validator/templateRefSchema.ts"],"version":"
|
|
1
|
+
{"root":["../src/index.ts","../src/commands/deploy.ts","../src/commands/destroy.ts","../src/commands/forceUnlock.ts","../src/commands/index.ts","../src/commands/local.ts","../src/commands/plan.ts","../src/commands/show.ts","../src/commands/validate.ts","../src/common/base64.ts","../src/common/certUtils.ts","../src/common/constants.ts","../src/common/context.ts","../src/common/credentials.ts","../src/common/domainUtils.ts","../src/common/fileUtils.ts","../src/common/getVersion.ts","../src/common/hashUtils.ts","../src/common/iacHelper.ts","../src/common/imsClient.ts","../src/common/index.ts","../src/common/lockManager.ts","../src/common/logger.ts","../src/common/planFormatter.ts","../src/common/providerEnum.ts","../src/common/requestHelper.ts","../src/common/retryUtils.ts","../src/common/runtimeMapper.ts","../src/common/scfClient.ts","../src/common/sidUtils.ts","../src/common/stateManager.ts","../src/common/aliyunClient/apigwOperations.ts","../src/common/aliyunClient/casOperations.ts","../src/common/aliyunClient/cdnOperations.ts","../src/common/aliyunClient/dnsOperations.ts","../src/common/aliyunClient/ecsOperations.ts","../src/common/aliyunClient/esOperations.ts","../src/common/aliyunClient/fc3Operations.ts","../src/common/aliyunClient/index.ts","../src/common/aliyunClient/nasOperations.ts","../src/common/aliyunClient/ossOperations.ts","../src/common/aliyunClient/ramOperations.ts","../src/common/aliyunClient/rdsOperations.ts","../src/common/aliyunClient/slsOperations.ts","../src/common/aliyunClient/tablestoreOperations.ts","../src/common/aliyunClient/types.ts","../src/common/dependencyGraph/graph.ts","../src/common/dependencyGraph/index.ts","../src/common/dependencyGraph/types.ts","../src/common/stateBackend/cosStateBackend.ts","../src/common/stateBackend/index.ts","../src/common/stateBackend/localStateBackend.ts","../src/common/stateBackend/lockUtils.ts","../src/common/stateBackend/ossStateBackend.ts","../src/common/stateBackend/remoteStateBackend.ts","../src/common/stateBackend/types.ts","../src/common/tencentClient/cosOperations.ts","../src/common/tencentClient/dnspodOperations.ts","../src/common/tencentClient/esOperations.ts","../src/common/tencentClient/index.ts","../src/common/tencentClient/scfOperations.ts","../src/common/tencentClient/sslOperations.ts","../src/common/tencentClient/tdsqlcOperations.ts","../src/common/tencentClient/types.ts","../src/common/volcengineClient/apigwOperations.ts","../src/common/volcengineClient/iamOperations.ts","../src/common/volcengineClient/index.ts","../src/common/volcengineClient/tlsOperations.ts","../src/common/volcengineClient/tosOperations.ts","../src/common/volcengineClient/types.ts","../src/common/volcengineClient/vefaasOperations.ts","../src/lang/en.ts","../src/lang/index.ts","../src/lang/zh-CN.ts","../src/parser/bucketParser.ts","../src/parser/databaseParser.ts","../src/parser/eventParser.ts","../src/parser/functionParser.ts","../src/parser/index.ts","../src/parser/parseUtils.ts","../src/parser/tableParser.ts","../src/parser/tagParser.ts","../src/stack/bucketTypes.ts","../src/stack/deploy.ts","../src/stack/index.ts","../src/stack/aliyunStack/apigwExecutor.ts","../src/stack/aliyunStack/apigwPlanner.ts","../src/stack/aliyunStack/apigwResource.ts","../src/stack/aliyunStack/apigwTypes.ts","../src/stack/aliyunStack/databaseExecutor.ts","../src/stack/aliyunStack/databasePlanner.ts","../src/stack/aliyunStack/databaseResource.ts","../src/stack/aliyunStack/deployer.ts","../src/stack/aliyunStack/destroyer.ts","../src/stack/aliyunStack/esServerlessTypes.ts","../src/stack/aliyunStack/fc3Executor.ts","../src/stack/aliyunStack/fc3Planner.ts","../src/stack/aliyunStack/fc3Resource.ts","../src/stack/aliyunStack/fc3Types.ts","../src/stack/aliyunStack/index.ts","../src/stack/aliyunStack/ossExecutor.ts","../src/stack/aliyunStack/ossPlanner.ts","../src/stack/aliyunStack/ossResource.ts","../src/stack/aliyunStack/ossTypes.ts","../src/stack/aliyunStack/planner.ts","../src/stack/aliyunStack/rdsTypes.ts","../src/stack/aliyunStack/tablestoreExecutor.ts","../src/stack/aliyunStack/tablestorePlanner.ts","../src/stack/aliyunStack/tablestoreResource.ts","../src/stack/aliyunStack/tablestoreTypes.ts","../src/stack/localStack/aliyunFc.ts","../src/stack/localStack/bucket.ts","../src/stack/localStack/event.ts","../src/stack/localStack/function.ts","../src/stack/localStack/functionRunner.ts","../src/stack/localStack/index.ts","../src/stack/localStack/localServer.ts","../src/stack/localStack/utils.ts","../src/stack/rfsStack/function.ts","../src/stack/rfsStack/index.ts","../src/stack/scfStack/cosExecutor.ts","../src/stack/scfStack/cosPlanner.ts","../src/stack/scfStack/cosResource.ts","../src/stack/scfStack/cosTypes.ts","../src/stack/scfStack/deployer.ts","../src/stack/scfStack/destroyer.ts","../src/stack/scfStack/esServerlessExecutor.ts","../src/stack/scfStack/esServerlessPlanner.ts","../src/stack/scfStack/esServerlessResource.ts","../src/stack/scfStack/esServerlessTypes.ts","../src/stack/scfStack/index.ts","../src/stack/scfStack/planner.ts","../src/stack/scfStack/scfExecutor.ts","../src/stack/scfStack/scfPlanner.ts","../src/stack/scfStack/scfResource.ts","../src/stack/scfStack/scfTypes.ts","../src/stack/scfStack/tdsqlcExecutor.ts","../src/stack/scfStack/tdsqlcPlanner.ts","../src/stack/scfStack/tdsqlcResource.ts","../src/stack/scfStack/tdsqlcTypes.ts","../src/stack/volcengineStack/apigwExecutor.ts","../src/stack/volcengineStack/apigwPlanner.ts","../src/stack/volcengineStack/apigwResource.ts","../src/stack/volcengineStack/apigwTypes.ts","../src/stack/volcengineStack/deployer.ts","../src/stack/volcengineStack/destroyer.ts","../src/stack/volcengineStack/index.ts","../src/stack/volcengineStack/planner.ts","../src/stack/volcengineStack/tosExecutor.ts","../src/stack/volcengineStack/tosPlanner.ts","../src/stack/volcengineStack/tosResource.ts","../src/stack/volcengineStack/tosTypes.ts","../src/stack/volcengineStack/vefaasExecutor.ts","../src/stack/volcengineStack/vefaasPlanner.ts","../src/stack/volcengineStack/vefaasResource.ts","../src/stack/volcengineStack/vefaasTypes.ts","../src/types/assets.ts","../src/types/index.ts","../src/types/tablestore.d.ts","../src/types/domains/backend.ts","../src/types/domains/bucket.ts","../src/types/domains/context.ts","../src/types/domains/database.ts","../src/types/domains/event.ts","../src/types/domains/function.ts","../src/types/domains/lock.ts","../src/types/domains/provider.ts","../src/types/domains/resolvable.ts","../src/types/domains/state.ts","../src/types/domains/table.ts","../src/types/domains/tag.ts","../src/types/domains/vars.ts","../src/types/localStack/index.ts","../src/validator/bucketSchema.ts","../src/validator/databaseSchema.ts","../src/validator/eventSchema.ts","../src/validator/functionSchema.ts","../src/validator/iacSchema.ts","../src/validator/index.ts","../src/validator/rootSchema.ts","../src/validator/tableschema.ts","../src/validator/templateRefSchema.ts"],"version":"6.0.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geek-fun/serverlessinsight",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
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",
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
12
|
"test": "cross-env DEBUG=ServerlessInsight jest --runInBand --detectOpenHandles --coverage --coverageReporters json-summary text html lcov",
|
|
13
|
-
"test:
|
|
13
|
+
"test:unit": "cross-env DEBUG=ServerlessInsight jest --runInBand --detectOpenHandles --testPathPattern=unit",
|
|
14
|
+
"test:service": "cross-env DEBUG=ServerlessInsight TEST_TYPE=service jest --runInBand --detectOpenHandles --testPathPattern=service",
|
|
15
|
+
"test:ci": "cross-env NODE_OPTIONS=\"--max-old-space-size=8192\" jest --runInBand --ci --coverage --coverageReporters json-summary text html lcov",
|
|
14
16
|
"build": "tsc --build",
|
|
15
17
|
"lint:fix": "eslint --fix ./",
|
|
16
18
|
"lint:check": "eslint ./",
|
|
@@ -35,6 +37,7 @@
|
|
|
35
37
|
"tencent-cloud-functions",
|
|
36
38
|
"alibaba-cloud-functions",
|
|
37
39
|
"huawei-cloud-functions",
|
|
40
|
+
"volcengine-cloud-functions",
|
|
38
41
|
"serverless-framework",
|
|
39
42
|
"serverless-management",
|
|
40
43
|
"serverless-automation",
|
|
@@ -46,62 +49,67 @@
|
|
|
46
49
|
"azure",
|
|
47
50
|
"huawei",
|
|
48
51
|
"google",
|
|
52
|
+
"volcengine",
|
|
49
53
|
"function"
|
|
50
54
|
],
|
|
51
55
|
"dependencies": {
|
|
52
|
-
"@alicloud/alidns20150109": "^4.
|
|
53
|
-
"@alicloud/cas20200407": "^3.2.
|
|
54
|
-
"@alicloud/
|
|
55
|
-
"@alicloud/
|
|
56
|
-
"@alicloud/
|
|
57
|
-
"@alicloud/
|
|
58
|
-
"@alicloud/
|
|
59
|
-
"@alicloud/
|
|
56
|
+
"@alicloud/alidns20150109": "^4.4.1",
|
|
57
|
+
"@alicloud/cas20200407": "^3.2.8",
|
|
58
|
+
"@alicloud/cdn20180510": "^9.2.0",
|
|
59
|
+
"@alicloud/cloudapi20160714": "^4.8.0",
|
|
60
|
+
"@alicloud/ecs20140526": "^7.8.4",
|
|
61
|
+
"@alicloud/es-serverless20230627": "^2.3.1",
|
|
62
|
+
"@alicloud/fc20230330": "^4.7.6",
|
|
63
|
+
"@alicloud/ims20190815": "^2.3.6",
|
|
64
|
+
"@alicloud/nas20170626": "^3.4.2",
|
|
60
65
|
"@alicloud/openapi-client": "^0.4.15",
|
|
61
|
-
"@alicloud/ram20150501": "^1.2.
|
|
62
|
-
"@alicloud/rds20140815": "^15.
|
|
63
|
-
"@alicloud/sls20201230": "^5.
|
|
64
|
-
"
|
|
66
|
+
"@alicloud/ram20150501": "^1.2.1",
|
|
67
|
+
"@alicloud/rds20140815": "^15.9.0",
|
|
68
|
+
"@alicloud/sls20201230": "^5.10.1",
|
|
69
|
+
"@volcengine/openapi": "^1.36.2",
|
|
70
|
+
"@volcengine/tos-sdk": "^2.9.1",
|
|
71
|
+
"ajv": "^8.20.0",
|
|
65
72
|
"ali-oss": "^6.23.0",
|
|
66
|
-
"commander": "^
|
|
73
|
+
"commander": "^15.0.0",
|
|
67
74
|
"cos-nodejs-sdk-v5": "^2.16.0-beta.8",
|
|
68
75
|
"i18n": "^0.15.3",
|
|
69
76
|
"iconv-lite": "^0.7.2",
|
|
70
77
|
"jszip": "^3.10.1",
|
|
71
|
-
"lodash": "^4.
|
|
78
|
+
"lodash": "^4.18.1",
|
|
72
79
|
"pino": "^10.3.1",
|
|
73
80
|
"pino-pretty": "^13.1.3",
|
|
74
|
-
"tablestore": "^5.6.
|
|
75
|
-
"tencentcloud-sdk-nodejs-cynosdb": "^4.1.
|
|
76
|
-
"tencentcloud-sdk-nodejs-dnspod": "^4.1.
|
|
77
|
-
"tencentcloud-sdk-nodejs-es": "^4.1.
|
|
81
|
+
"tablestore": "^5.6.5",
|
|
82
|
+
"tencentcloud-sdk-nodejs-cynosdb": "^4.1.249",
|
|
83
|
+
"tencentcloud-sdk-nodejs-dnspod": "^4.1.213",
|
|
84
|
+
"tencentcloud-sdk-nodejs-es": "^4.1.238",
|
|
78
85
|
"tencentcloud-sdk-nodejs-scf": "^4.1.168",
|
|
79
|
-
"tencentcloud-sdk-nodejs-ssl": "^4.1.
|
|
80
|
-
"yaml": "^2.
|
|
86
|
+
"tencentcloud-sdk-nodejs-ssl": "^4.1.239",
|
|
87
|
+
"yaml": "^2.9.0"
|
|
81
88
|
},
|
|
82
89
|
"devDependencies": {
|
|
83
|
-
"@eslint/eslintrc": "^3.3.
|
|
90
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
84
91
|
"@eslint/js": "^10.0.1",
|
|
85
92
|
"@types/ali-oss": "^6.23.3",
|
|
86
93
|
"@types/i18n": "^0.13.12",
|
|
87
94
|
"@types/jest": "^30.0.0",
|
|
88
95
|
"@types/lodash": "^4.17.24",
|
|
89
|
-
"@types/node": "^25.3
|
|
90
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
91
|
-
"@typescript-eslint/parser": "^8.
|
|
96
|
+
"@types/node": "^25.9.3",
|
|
97
|
+
"@typescript-eslint/eslint-plugin": "^8.61.0",
|
|
98
|
+
"@typescript-eslint/parser": "^8.61.0",
|
|
92
99
|
"cross-env": "^10.1.0",
|
|
93
|
-
"eslint": "^10.0
|
|
100
|
+
"eslint": "^10.5.0",
|
|
94
101
|
"eslint-config-prettier": "^10.1.8",
|
|
95
|
-
"eslint-plugin-prettier": "^5.5.
|
|
96
|
-
"globals": "^17.
|
|
102
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
103
|
+
"globals": "^17.6.0",
|
|
97
104
|
"husky": "^9.1.7",
|
|
98
|
-
"jest": "^30.2
|
|
99
|
-
"prettier": "^3.8.
|
|
100
|
-
"ts-jest": "^29.4.
|
|
105
|
+
"jest": "^30.4.2",
|
|
106
|
+
"prettier": "^3.8.4",
|
|
107
|
+
"ts-jest": "^29.4.11",
|
|
101
108
|
"ts-node": "^10.9.2",
|
|
102
|
-
"typescript": "^
|
|
109
|
+
"typescript": "^6.0.3"
|
|
103
110
|
},
|
|
104
111
|
"overrides": {
|
|
105
|
-
"fast-xml-parser": ">=5.3.8"
|
|
112
|
+
"fast-xml-parser": ">=5.3.8",
|
|
113
|
+
"protobufjs": "^7.6.1"
|
|
106
114
|
}
|
|
107
115
|
}
|
|
@@ -9,7 +9,7 @@ The Tencent COS support provides full lifecycle management for cloud storage buc
|
|
|
9
9
|
- **State Management**: Local state tracking in `.serverlessinsight/state.json`
|
|
10
10
|
- **Plan & Apply Flow**: Preview changes before applying them
|
|
11
11
|
- **Drift Detection**: Detect manual changes made outside ServerlessInsight
|
|
12
|
-
- **Website Hosting**: Configure static website hosting
|
|
12
|
+
- **Website Hosting**: Configure static website hosting
|
|
13
13
|
- **Access Control**: Configure bucket ACL (private, public-read, public-read-write)
|
|
14
14
|
- **Idempotent Operations**: Safe to re-run deployments
|
|
15
15
|
|
|
@@ -39,8 +39,6 @@ buckets:
|
|
|
39
39
|
website: # Optional: Enable static website hosting
|
|
40
40
|
code: dist # Local directory to deploy (not implemented yet)
|
|
41
41
|
index: index.html
|
|
42
|
-
error_page: 404.html
|
|
43
|
-
error_code: 404
|
|
44
42
|
```
|
|
45
43
|
|
|
46
44
|
## Bucket Naming Requirements
|
|
@@ -187,9 +185,7 @@ buckets:
|
|
|
187
185
|
security:
|
|
188
186
|
acl: PUBLIC_READ # Website content must be publicly readable
|
|
189
187
|
website:
|
|
190
|
-
index: index.html # Default page
|
|
191
|
-
error_page: 404.html # Error page
|
|
192
|
-
error_code: 404 # HTTP error code
|
|
188
|
+
index: index.html # Default page (also used as error document for SPA routing)
|
|
193
189
|
```
|
|
194
190
|
|
|
195
191
|
After deployment, your website will be accessible at:
|
|
@@ -229,8 +225,6 @@ buckets:
|
|
|
229
225
|
acl: PUBLIC_READ
|
|
230
226
|
website:
|
|
231
227
|
index: index.html
|
|
232
|
-
error_page: 404.html
|
|
233
|
-
error_code: 404
|
|
234
228
|
```
|
|
235
229
|
|
|
236
230
|
## Idempotency
|
|
@@ -289,8 +283,6 @@ buckets:
|
|
|
289
283
|
acl: PUBLIC_READ
|
|
290
284
|
website: # Added website configuration
|
|
291
285
|
index: index.html
|
|
292
|
-
error_page: 404.html
|
|
293
|
-
error_code: 404
|
|
294
286
|
```
|
|
295
287
|
|
|
296
288
|
Run `si deploy` to apply the change.
|
|
@@ -349,8 +341,6 @@ buckets:
|
|
|
349
341
|
acl: PUBLIC_READ
|
|
350
342
|
website:
|
|
351
343
|
index: index.html
|
|
352
|
-
error_page: error.html
|
|
353
|
-
error_code: 404
|
|
354
344
|
```
|
|
355
345
|
|
|
356
346
|
### Multiple Buckets
|
|
@@ -380,8 +370,6 @@ buckets:
|
|
|
380
370
|
acl: PUBLIC_READ
|
|
381
371
|
website:
|
|
382
372
|
index: index.html
|
|
383
|
-
error_page: 404.html
|
|
384
|
-
error_code: 404
|
|
385
373
|
```
|
|
386
374
|
|
|
387
375
|
## Troubleshooting
|
|
@@ -425,7 +413,7 @@ coscmd delete -r -f /
|
|
|
425
413
|
If your website is not accessible after deployment:
|
|
426
414
|
|
|
427
415
|
1. Verify ACL is set to `PUBLIC_READ`
|
|
428
|
-
2. Check that `index`
|
|
416
|
+
2. Check that `index` file exists in the bucket
|
|
429
417
|
3. Access the website using the correct URL format:
|
|
430
418
|
```
|
|
431
419
|
http://{bucket-name}.cos-website.{region}.myqcloud.com
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
version: 0.1.0
|
|
2
|
+
|
|
3
|
+
provider:
|
|
4
|
+
name: aliyun
|
|
5
|
+
region: cn-hongkong
|
|
6
|
+
|
|
7
|
+
app: insight-poc
|
|
8
|
+
service: insight-poc-cdn-bucket
|
|
9
|
+
|
|
10
|
+
tags:
|
|
11
|
+
owner: geek-fun
|
|
12
|
+
|
|
13
|
+
# Example 1: Simple CDN configuration
|
|
14
|
+
# Just enable CDN with default settings
|
|
15
|
+
buckets:
|
|
16
|
+
simple_cdn_bucket:
|
|
17
|
+
name: insight-poc-simple-cdn
|
|
18
|
+
security:
|
|
19
|
+
acl: PUBLIC_READ
|
|
20
|
+
website:
|
|
21
|
+
code: dist
|
|
22
|
+
index: index.html
|
|
23
|
+
domain:
|
|
24
|
+
domain_name: static.example.com
|
|
25
|
+
certificate_id: cas-cert-abc123
|
|
26
|
+
cdn: true # Simple: CDN enabled with sensible defaults
|
|
27
|
+
|
|
28
|
+
# Example 2: Advanced CDN configuration
|
|
29
|
+
# Full control over CDN settings
|
|
30
|
+
advanced_cdn_bucket:
|
|
31
|
+
name: insight-poc-advanced-cdn
|
|
32
|
+
security:
|
|
33
|
+
acl: PUBLIC_READ
|
|
34
|
+
website:
|
|
35
|
+
code: dist
|
|
36
|
+
index: index.html
|
|
37
|
+
domain:
|
|
38
|
+
domain_name: assets.example.com
|
|
39
|
+
certificate_id: cas-cert-def456
|
|
40
|
+
cdn:
|
|
41
|
+
enabled: true
|
|
42
|
+
cdn_type: web # web | download | video
|
|
43
|
+
scope: global # domestic | overseas | global
|
|
44
|
+
cache_ttl: 3600 # Cache TTL in seconds
|
|
45
|
+
ignore_query_string: false # Ignore query string in cache key
|
|
46
|
+
origin_protocol: https # http | https | follow
|
|
47
|
+
compression: true # Enable Gzip compression
|
|
48
|
+
force_redirect_https: true # Force HTTPS redirect
|
|
49
|
+
|
|
50
|
+
# Example 3: CDN + Transfer Acceleration (dual-layer)
|
|
51
|
+
# CDN origin uses accelerated OSS endpoint
|
|
52
|
+
dual_acceleration_bucket:
|
|
53
|
+
name: insight-poc-dual-accel
|
|
54
|
+
security:
|
|
55
|
+
acl: PRIVATE
|
|
56
|
+
domain:
|
|
57
|
+
domain_name: downloads.example.com
|
|
58
|
+
certificate_id: cas-cert-ghi789
|
|
59
|
+
cdn:
|
|
60
|
+
enabled: true
|
|
61
|
+
cdn_type: download
|
|
62
|
+
scope: global
|
|
63
|
+
accelerate: true # OSS Transfer Acceleration for origin fetch
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
version: 0.1.0
|
|
2
|
+
provider:
|
|
3
|
+
name: volcengine
|
|
4
|
+
region: cn-beijing
|
|
5
|
+
|
|
6
|
+
app: insight-poc
|
|
7
|
+
service: insight-poc-advanced
|
|
8
|
+
|
|
9
|
+
functions:
|
|
10
|
+
vpc_function:
|
|
11
|
+
name: insight-poc-vpc-fn
|
|
12
|
+
code:
|
|
13
|
+
runtime: nodejs/v18
|
|
14
|
+
handler: index.handler
|
|
15
|
+
path: ./artifacts/function.zip
|
|
16
|
+
memory: 512
|
|
17
|
+
timeout: 60
|
|
18
|
+
log: true
|
|
19
|
+
network:
|
|
20
|
+
vpc_id: vpc-xxx
|
|
21
|
+
subnet_ids:
|
|
22
|
+
- subnet-xxx
|
|
23
|
+
security_group:
|
|
24
|
+
name: fn-security-group
|
|
25
|
+
ingress:
|
|
26
|
+
- protocol: TCP
|
|
27
|
+
port: 443
|
|
28
|
+
source: 0.0.0.0/0
|
|
29
|
+
egress:
|
|
30
|
+
- protocol: TCP
|
|
31
|
+
port: 0
|
|
32
|
+
destination: 0.0.0.0/0
|
|
33
|
+
environment:
|
|
34
|
+
DATABASE_URL: mysql://...
|
|
35
|
+
REDIS_URL: redis://...
|
|
36
|
+
|
|
37
|
+
basic_function:
|
|
38
|
+
name: insight-poc-basic-fn
|
|
39
|
+
code:
|
|
40
|
+
runtime: python/v3.10
|
|
41
|
+
handler: main.handler
|
|
42
|
+
path: ./artifacts/processor.zip
|
|
43
|
+
memory: 256
|
|
44
|
+
timeout: 30
|
|
45
|
+
log: true
|
|
46
|
+
environment:
|
|
47
|
+
DEBUG: 'true'
|
|
48
|
+
|
|
49
|
+
events:
|
|
50
|
+
api_gateway:
|
|
51
|
+
type: API_GATEWAY
|
|
52
|
+
name: insight-poc-api
|
|
53
|
+
triggers:
|
|
54
|
+
- method: GET
|
|
55
|
+
path: /api/hello
|
|
56
|
+
backend: ${functions.basic_function}
|
|
57
|
+
- method: POST
|
|
58
|
+
path: /api/process
|
|
59
|
+
backend: ${functions.vpc_function}
|