@geek-fun/serverlessinsight 0.8.5 → 0.8.7
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/.serverlessinsight/state-cdn-flow-app-cdn-flow-service.json.backup +1 -2
- package/.serverlessinsight/state-iam-test-app-iam-test-service.json.backup +2 -3
- package/.serverlessinsight/state-insight-poc-deploy-app-insight-poc-deploy.json.backup +19 -183
- package/.serverlessinsight/state-insight-poc-destroy-app-insight-poc-destroy.json.backup +1 -2
- package/.serverlessinsight/state-insight-volc-app-insight-volc.json.backup +11 -72
- package/AGENTS.md +29 -0
- package/README.md +0 -12
- package/README.zh-CN.md +146 -286
- package/dist/package.json +1 -1
- package/dist/src/commands/deploy.js +4 -6
- package/dist/src/common/aliyunClient/ramOperations.js +104 -15
- package/dist/src/common/iacHelper.js +3 -1
- package/dist/src/common/iamStatements.js +21 -1
- package/dist/src/common/nameBuilder.js +12 -1
- package/dist/src/common/stateBackend/remoteStateBackend.js +1 -3
- package/dist/src/common/stateBackend/saasStateBackend.js +26 -5
- package/dist/src/common/stateManager.js +8 -4
- package/dist/src/common/tencentClient/camOperations.js +24 -12
- package/dist/src/common/volcengineClient/iamOperations.js +15 -11
- package/dist/src/lang/en.js +7 -0
- package/dist/src/lang/zh-CN.js +6 -0
- package/dist/src/stack/aliyunStack/apigwExecutor.js +5 -5
- package/dist/src/stack/aliyunStack/apigwResource.js +10 -8
- package/dist/src/stack/aliyunStack/apigwTypes.js +20 -5
- package/dist/src/stack/aliyunStack/deployer.js +33 -3
- package/dist/src/stack/aliyunStack/fc3Resource.js +172 -18
- package/dist/src/stack/aliyunStack/sharedLogProject.js +22 -5
- package/dist/src/stack/scfStack/scfPlanner.js +1 -1
- package/dist/src/stack/scfStack/scfResource.js +72 -10
- package/dist/src/stack/scfStack/sharedLogset.js +9 -1
- package/dist/src/stack/volcengineStack/apigwPlanner.js +5 -1
- package/dist/src/stack/volcengineStack/apigwResource.js +52 -30
- package/dist/src/stack/volcengineStack/apigwTypes.js +18 -7
- package/dist/src/stack/volcengineStack/sharedLogProject.js +9 -3
- package/dist/src/stack/volcengineStack/vefaasPlanner.js +5 -4
- package/dist/src/stack/volcengineStack/vefaasResource.js +74 -10
- package/dist/src/stack/volcengineStack/vefaasTypes.js +61 -7
- package/dist/src/validator/semanticValidation.js +41 -0
- package/package.json +1 -1
|
@@ -22,12 +22,11 @@
|
|
|
22
22
|
"id": "iam-test-app-dev-sls"
|
|
23
23
|
}
|
|
24
24
|
],
|
|
25
|
-
"lastUpdated": "2026-08-
|
|
25
|
+
"lastUpdated": "2026-08-30T13:25:42.949Z"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
"
|
|
31
|
-
"lineage": "17bbe89a-e7af-441e-9829-f92dbace0ef9",
|
|
30
|
+
"lineage": "bec4a8ca-11b2-46eb-92e1-362da042e3b6",
|
|
32
31
|
"serial": 3
|
|
33
32
|
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"nasConfig": null,
|
|
28
28
|
"logConfig": {
|
|
29
29
|
"project": "insight-poc-deploy-app-dev-sls",
|
|
30
|
-
"logstore": "insight-poc-deploy-dev-fn-logs",
|
|
30
|
+
"logstore": "insight-poc-deploy-dev-insight-poc-fn-fn-logs",
|
|
31
31
|
"enableRequestMetrics": true,
|
|
32
32
|
"enableInstanceMetrics": true
|
|
33
33
|
},
|
|
@@ -68,30 +68,30 @@
|
|
|
68
68
|
"lastUpdateStatusReasonCode": null
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
|
-
"sid": "si:aliyun:sls_logstore:dev:insight-poc-deploy-app-dev-sls/insight-poc-deploy-dev-fn-logs",
|
|
72
|
-
"id": "insight-poc-deploy-app-dev-sls/insight-poc-deploy-dev-fn-logs",
|
|
71
|
+
"sid": "si:aliyun:sls_logstore:dev:insight-poc-deploy-app-dev-sls/insight-poc-deploy-dev-insight-poc-fn-fn-logs",
|
|
72
|
+
"id": "insight-poc-deploy-app-dev-sls/insight-poc-deploy-dev-insight-poc-fn-fn-logs",
|
|
73
73
|
"type": "ALIYUN_SLS_LOGSTORE",
|
|
74
|
-
"logstoreName": "insight-poc-deploy-dev-fn-logs"
|
|
74
|
+
"logstoreName": "insight-poc-deploy-dev-insight-poc-fn-fn-logs"
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
|
-
"sid": "si:aliyun:sls_index:dev:insight-poc-deploy-app-dev-sls/insight-poc-deploy-dev-fn-logs/index",
|
|
78
|
-
"id": "insight-poc-deploy-app-dev-sls/insight-poc-deploy-dev-fn-logs/index",
|
|
77
|
+
"sid": "si:aliyun:sls_index:dev:insight-poc-deploy-app-dev-sls/insight-poc-deploy-dev-insight-poc-fn-fn-logs/index",
|
|
78
|
+
"id": "insight-poc-deploy-app-dev-sls/insight-poc-deploy-dev-insight-poc-fn-fn-logs/index",
|
|
79
79
|
"type": "ALIYUN_SLS_INDEX",
|
|
80
80
|
"projectName": "insight-poc-deploy-app-dev-sls",
|
|
81
|
-
"logstoreName": "insight-poc-deploy-dev-fn-logs"
|
|
81
|
+
"logstoreName": "insight-poc-deploy-dev-insight-poc-fn-fn-logs"
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
|
-
"sid": "si:aliyun:ram_role:dev:insight-poc-deploy-app-insight-poc-deploy-dev-
|
|
85
|
-
"id": "insight-poc-deploy-app-insight-poc-deploy-dev-
|
|
84
|
+
"sid": "si:aliyun:ram_role:dev:insight-poc-deploy-app-insight-poc-deploy-dev-insig-role-160n4hk",
|
|
85
|
+
"id": "insight-poc-deploy-app-insight-poc-deploy-dev-insig-role-160n4hk",
|
|
86
86
|
"type": "ALIYUN_RAM_ROLE",
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
"roleArn": "acs:ram::123456789012:role/test-role",
|
|
88
|
+
"roleName": "test-role",
|
|
89
|
+
"roleId": "role-123",
|
|
90
|
+
"arn": "acs:ram::123456789012:role/test-role",
|
|
91
|
+
"policyName": "test-role-policy"
|
|
92
92
|
}
|
|
93
93
|
],
|
|
94
|
-
"lastUpdated": "2026-08-
|
|
94
|
+
"lastUpdated": "2026-08-30T13:26:27.547Z",
|
|
95
95
|
"status": "ready"
|
|
96
96
|
},
|
|
97
97
|
"events.gateway_event": {
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
{
|
|
106
106
|
"method": "GET",
|
|
107
107
|
"path": "/api/hello",
|
|
108
|
-
"backend": "
|
|
108
|
+
"backend": "insight-poc-fn"
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
111
|
"domain": null
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"stageName": "RELEASE"
|
|
167
167
|
}
|
|
168
168
|
],
|
|
169
|
-
"lastUpdated": "2026-08-
|
|
169
|
+
"lastUpdated": "2026-08-30T13:26:27.549Z"
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
172
|
"shared": {
|
|
@@ -185,175 +185,11 @@
|
|
|
185
185
|
"id": "insight-poc-deploy-app-dev-sls"
|
|
186
186
|
}
|
|
187
187
|
],
|
|
188
|
-
"lastUpdated": "2026-08-
|
|
188
|
+
"lastUpdated": "2026-08-30T13:26:22.545Z"
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
},
|
|
193
|
-
"
|
|
194
|
-
"functions.insight_poc_fn": {
|
|
195
|
-
"mode": "managed",
|
|
196
|
-
"region": "cn-hangzhou",
|
|
197
|
-
"definition": {
|
|
198
|
-
"functionName": "insight-poc-fn",
|
|
199
|
-
"runtime": "nodejs18",
|
|
200
|
-
"handler": "index.handler",
|
|
201
|
-
"memorySize": 512,
|
|
202
|
-
"timeout": 10,
|
|
203
|
-
"diskSize": null,
|
|
204
|
-
"environment": {
|
|
205
|
-
"NODE_ENV": "development",
|
|
206
|
-
"TEST_VAR": "testVarValue",
|
|
207
|
-
"TEST_VAR_EXTRA": "abcds-testVarValue-andyou"
|
|
208
|
-
},
|
|
209
|
-
"vpcConfig": null,
|
|
210
|
-
"gpuConfig": null,
|
|
211
|
-
"customContainerConfig": null,
|
|
212
|
-
"nasConfig": null,
|
|
213
|
-
"logConfig": {
|
|
214
|
-
"project": "insight-poc-deploy-app-dev-sls",
|
|
215
|
-
"logstore": "insight-poc-deploy-dev-fn-logs",
|
|
216
|
-
"enableRequestMetrics": true,
|
|
217
|
-
"enableInstanceMetrics": true
|
|
218
|
-
},
|
|
219
|
-
"codeHash": "c96b718fa999add5e047823c3d7abfa1397fa8d0075bc6a4f3592785fcd4b76f"
|
|
220
|
-
},
|
|
221
|
-
"instances": [
|
|
222
|
-
{
|
|
223
|
-
"type": "ALIYUN_FC3_FUNCTION",
|
|
224
|
-
"sid": "si:aliyun:fc3:dev:insight-poc-fn",
|
|
225
|
-
"id": "test-function",
|
|
226
|
-
"functionName": "test-function",
|
|
227
|
-
"functionArn": null,
|
|
228
|
-
"functionId": null,
|
|
229
|
-
"runtime": "nodejs18",
|
|
230
|
-
"handler": "index.handler",
|
|
231
|
-
"memorySize": 128,
|
|
232
|
-
"timeout": 60,
|
|
233
|
-
"diskSize": null,
|
|
234
|
-
"cpu": null,
|
|
235
|
-
"environment": {},
|
|
236
|
-
"vpcConfig": {},
|
|
237
|
-
"gpuConfig": {},
|
|
238
|
-
"nasConfig": {},
|
|
239
|
-
"logConfig": {},
|
|
240
|
-
"customContainerConfig": {},
|
|
241
|
-
"description": null,
|
|
242
|
-
"internetAccess": null,
|
|
243
|
-
"role": null,
|
|
244
|
-
"codeChecksum": null,
|
|
245
|
-
"codeSize": null,
|
|
246
|
-
"createdTime": null,
|
|
247
|
-
"lastModifiedTime": null,
|
|
248
|
-
"state": "Running",
|
|
249
|
-
"stateReason": null,
|
|
250
|
-
"stateReasonCode": null,
|
|
251
|
-
"lastUpdateStatus": null,
|
|
252
|
-
"lastUpdateStatusReason": null,
|
|
253
|
-
"lastUpdateStatusReasonCode": null
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
"sid": "si:aliyun:sls_logstore:dev:insight-poc-deploy-app-dev-sls/insight-poc-deploy-dev-fn-logs",
|
|
257
|
-
"id": "insight-poc-deploy-app-dev-sls/insight-poc-deploy-dev-fn-logs",
|
|
258
|
-
"type": "ALIYUN_SLS_LOGSTORE",
|
|
259
|
-
"logstoreName": "insight-poc-deploy-dev-fn-logs"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
"sid": "si:aliyun:sls_index:dev:insight-poc-deploy-app-dev-sls/insight-poc-deploy-dev-fn-logs/index",
|
|
263
|
-
"id": "insight-poc-deploy-app-dev-sls/insight-poc-deploy-dev-fn-logs/index",
|
|
264
|
-
"type": "ALIYUN_SLS_INDEX",
|
|
265
|
-
"projectName": "insight-poc-deploy-app-dev-sls",
|
|
266
|
-
"logstoreName": "insight-poc-deploy-dev-fn-logs"
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
"sid": "si:aliyun:ram_role:dev:insight-poc-deploy-app-insight-poc-deploy-dev-fc-role",
|
|
270
|
-
"id": "insight-poc-deploy-app-insight-poc-deploy-dev-fc-role",
|
|
271
|
-
"type": "ALIYUN_RAM_ROLE",
|
|
272
|
-
"body": {
|
|
273
|
-
"Role": {
|
|
274
|
-
"RoleName": "test-role"
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
],
|
|
279
|
-
"lastUpdated": "2026-08-28T02:49:20.881Z",
|
|
280
|
-
"status": "ready"
|
|
281
|
-
},
|
|
282
|
-
"events.gateway_event": {
|
|
283
|
-
"mode": "managed",
|
|
284
|
-
"region": "cn-hangzhou",
|
|
285
|
-
"definition": {
|
|
286
|
-
"groupName": "insight-poc-deploy-dev-gateway-event-agw-group",
|
|
287
|
-
"description": "API Gateway group for insight-poc-deploy",
|
|
288
|
-
"basePath": null,
|
|
289
|
-
"triggers": [
|
|
290
|
-
{
|
|
291
|
-
"method": "GET",
|
|
292
|
-
"path": "/api/hello",
|
|
293
|
-
"backend": "${functions.insight_poc_fn}"
|
|
294
|
-
}
|
|
295
|
-
],
|
|
296
|
-
"domain": null
|
|
297
|
-
},
|
|
298
|
-
"instances": [
|
|
299
|
-
{
|
|
300
|
-
"type": "ALIYUN_APIGW_GROUP",
|
|
301
|
-
"sid": "si:aliyun:apigateway:dev:",
|
|
302
|
-
"id": "",
|
|
303
|
-
"groupId": null,
|
|
304
|
-
"groupName": null,
|
|
305
|
-
"description": null,
|
|
306
|
-
"basePath": null,
|
|
307
|
-
"subDomain": null,
|
|
308
|
-
"instanceId": null,
|
|
309
|
-
"instanceType": null,
|
|
310
|
-
"regionId": null,
|
|
311
|
-
"status": null,
|
|
312
|
-
"createdTime": null,
|
|
313
|
-
"modifiedTime": null,
|
|
314
|
-
"billingStatus": null,
|
|
315
|
-
"illegalStatus": null,
|
|
316
|
-
"trafficLimit": null
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
"type": "ALIYUN_APIGW_API",
|
|
320
|
-
"sid": "si:aliyun:apigateway:dev:[object Object]/undefined",
|
|
321
|
-
"id": "",
|
|
322
|
-
"apiId": null,
|
|
323
|
-
"apiName": null,
|
|
324
|
-
"groupId": null,
|
|
325
|
-
"groupName": null,
|
|
326
|
-
"description": null,
|
|
327
|
-
"visibility": null,
|
|
328
|
-
"authType": null,
|
|
329
|
-
"requestConfig": null,
|
|
330
|
-
"serviceConfig": null,
|
|
331
|
-
"resultType": null,
|
|
332
|
-
"resultSample": null,
|
|
333
|
-
"createdTime": null,
|
|
334
|
-
"modifiedTime": null,
|
|
335
|
-
"deployedInfos": null
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
"type": "ALIYUN_APIGW_DEPLOYMENT",
|
|
339
|
-
"sid": "si:aliyun:apigateway:dev:[object Object]/[object Object]/RELEASE",
|
|
340
|
-
"id": "[object Object]/[object Object]/RELEASE",
|
|
341
|
-
"groupId": {
|
|
342
|
-
"body": {
|
|
343
|
-
"groupId": "group-123"
|
|
344
|
-
}
|
|
345
|
-
},
|
|
346
|
-
"apiId": {
|
|
347
|
-
"body": {
|
|
348
|
-
"apiId": "api-123"
|
|
349
|
-
}
|
|
350
|
-
},
|
|
351
|
-
"stageName": "RELEASE"
|
|
352
|
-
}
|
|
353
|
-
],
|
|
354
|
-
"lastUpdated": "2026-08-28T02:49:20.884Z"
|
|
355
|
-
}
|
|
356
|
-
},
|
|
357
|
-
"lineage": "5046b4f9-b550-4933-850f-99eb5411cb42",
|
|
193
|
+
"lineage": "be6eecfe-dc78-4bfe-9e47-f152e78b5cc8",
|
|
358
194
|
"serial": 2
|
|
359
195
|
}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"role": "trn:iam::123456789012:role/test-role",
|
|
23
23
|
"logConfig": {
|
|
24
24
|
"project": "insight-volc-app-dev-tls",
|
|
25
|
-
"topic": "insight-volc-dev-fn-logs"
|
|
25
|
+
"topic": "insight-volc-dev-insight_poc_fn-fn-logs"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"instances": [
|
|
@@ -42,20 +42,20 @@
|
|
|
42
42
|
"lastUpdateTime": null
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
|
-
"sid": "si:volcengine:tls_topic:dev:insight-volc-app-dev-tls/insight-volc-dev-fn-logs",
|
|
46
|
-
"id": "insight-volc-app-dev-tls/insight-volc-dev-fn-logs",
|
|
45
|
+
"sid": "si:volcengine:tls_topic:dev:insight-volc-app-dev-tls/insight-volc-dev-insight_poc_fn-fn-logs",
|
|
46
|
+
"id": "insight-volc-app-dev-tls/insight-volc-dev-insight_poc_fn-fn-logs",
|
|
47
47
|
"type": "VOLCENGINE_TLS_TOPIC",
|
|
48
|
-
"topicName": "insight-volc-dev-fn-logs",
|
|
48
|
+
"topicName": "insight-volc-dev-insight_poc_fn-fn-logs",
|
|
49
49
|
"topicId": "topic-123"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
|
-
"sid": "si:volcengine:tls_index:dev:insight-volc-app-dev-tls/insight-volc-dev-fn-logs/index",
|
|
53
|
-
"id": "insight-volc-app-dev-tls/insight-volc-dev-fn-logs/index",
|
|
52
|
+
"sid": "si:volcengine:tls_index:dev:insight-volc-app-dev-tls/insight-volc-dev-insight_poc_fn-fn-logs/index",
|
|
53
|
+
"id": "insight-volc-app-dev-tls/insight-volc-dev-insight_poc_fn-fn-logs/index",
|
|
54
54
|
"type": "VOLCENGINE_TLS_INDEX"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
|
-
"sid": "si:volcengine:iam_role:dev:insight-volc-app-insight-volc-dev-role",
|
|
58
|
-
"id": "insight-volc-app-insight-volc-dev-role",
|
|
57
|
+
"sid": "si:volcengine:iam_role:dev:insight-volc-app-insight-volc-dev-insight-poc-fn-role",
|
|
58
|
+
"id": "insight-volc-app-insight-volc-dev-insight-poc-fn-role",
|
|
59
59
|
"type": "VOLCENGINE_IAM_ROLE",
|
|
60
60
|
"trn": "trn:iam::123456789012:role/test-role",
|
|
61
61
|
"roleName": "test-role",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
65
|
"status": "ready",
|
|
66
|
-
"lastUpdated": "2026-08-
|
|
66
|
+
"lastUpdated": "2026-08-30T13:25:57.473Z"
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
"shared": {
|
|
@@ -83,72 +83,11 @@
|
|
|
83
83
|
"projectId": "proj-123"
|
|
84
84
|
}
|
|
85
85
|
],
|
|
86
|
-
"lastUpdated": "2026-08-
|
|
86
|
+
"lastUpdated": "2026-08-30T13:25:54.472Z"
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
|
-
"
|
|
92
|
-
"functions.insight_poc_fn": {
|
|
93
|
-
"mode": "managed",
|
|
94
|
-
"region": "cn-beijing",
|
|
95
|
-
"definition": {
|
|
96
|
-
"functionName": "insight-poc-fn",
|
|
97
|
-
"runtime": "node20/v1",
|
|
98
|
-
"handler": "index.handler",
|
|
99
|
-
"memorySize": 128,
|
|
100
|
-
"timeout": 30,
|
|
101
|
-
"environment": {
|
|
102
|
-
"NODE_ENV": "production"
|
|
103
|
-
},
|
|
104
|
-
"codeHash": "c96b718fa999add5e047823c3d7abfa1397fa8d0075bc6a4f3592785fcd4b76f",
|
|
105
|
-
"role": "trn:iam::123456789012:role/test-role",
|
|
106
|
-
"logConfig": {
|
|
107
|
-
"project": "insight-volc-app-dev-tls",
|
|
108
|
-
"topic": "insight-volc-dev-fn-logs"
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
"instances": [
|
|
112
|
-
{
|
|
113
|
-
"type": "VOLCENGINE_VEFAAS_FUNCTION",
|
|
114
|
-
"sid": "si:volcengine:insight-volc:dev:insight-poc-fn",
|
|
115
|
-
"id": "test-function",
|
|
116
|
-
"functionName": "test-function",
|
|
117
|
-
"functionId": "func-123",
|
|
118
|
-
"runtime": "node20/v1",
|
|
119
|
-
"handler": "index.handler",
|
|
120
|
-
"memorySize": 128,
|
|
121
|
-
"timeout": 30,
|
|
122
|
-
"environment": {},
|
|
123
|
-
"status": "Active",
|
|
124
|
-
"createdTime": null,
|
|
125
|
-
"lastUpdateTime": null
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"sid": "si:volcengine:tls_topic:dev:insight-volc-app-dev-tls/insight-volc-dev-fn-logs",
|
|
129
|
-
"id": "insight-volc-app-dev-tls/insight-volc-dev-fn-logs",
|
|
130
|
-
"type": "VOLCENGINE_TLS_TOPIC",
|
|
131
|
-
"topicName": "insight-volc-dev-fn-logs",
|
|
132
|
-
"topicId": "topic-123"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"sid": "si:volcengine:tls_index:dev:insight-volc-app-dev-tls/insight-volc-dev-fn-logs/index",
|
|
136
|
-
"id": "insight-volc-app-dev-tls/insight-volc-dev-fn-logs/index",
|
|
137
|
-
"type": "VOLCENGINE_TLS_INDEX"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"sid": "si:volcengine:iam_role:dev:insight-volc-app-insight-volc-dev-role",
|
|
141
|
-
"id": "insight-volc-app-insight-volc-dev-role",
|
|
142
|
-
"type": "VOLCENGINE_IAM_ROLE",
|
|
143
|
-
"trn": "trn:iam::123456789012:role/test-role",
|
|
144
|
-
"roleName": "test-role",
|
|
145
|
-
"roleId": "role-123"
|
|
146
|
-
}
|
|
147
|
-
],
|
|
148
|
-
"status": "ready",
|
|
149
|
-
"lastUpdated": "2026-08-28T02:48:53.503Z"
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
"lineage": "a61f5dda-66ef-405f-b377-da268afe24a4",
|
|
91
|
+
"lineage": "79ee1cef-4d59-408b-b683-490f7282db5d",
|
|
153
92
|
"serial": 1
|
|
154
93
|
}
|
package/AGENTS.md
CHANGED
|
@@ -171,6 +171,35 @@ import { createRamOperations } from '../../common/aliyunClient/ramOperations';
|
|
|
171
171
|
- Keep abstractions provider-agnostic
|
|
172
172
|
- Clean separation of concerns between providers
|
|
173
173
|
|
|
174
|
+
## Resource Naming (Cross-Platform) - MANDATORY
|
|
175
|
+
|
|
176
|
+
All si-generated cloud resource names MUST come from shared builders — never inline name templates. One name template appearing in more than one place (planner / executor / validator) is a defect: duplicated templates drift.
|
|
177
|
+
|
|
178
|
+
### Canonical Builders
|
|
179
|
+
|
|
180
|
+
| Resource | Builder (single source of truth) | Shape |
|
|
181
|
+
|---|---|---|
|
|
182
|
+
| Function execution role | `buildFunctionRoleName` (`src/common/nameBuilder.ts`) | `${app}-${service}-${stage}-${fn.key}-role` — identical on every provider |
|
|
183
|
+
| Role execution policy | `buildRolePolicyName` (`src/common/nameBuilder.ts`) | `${roleName}-policy` |
|
|
184
|
+
| Function log topic/logstore | per-provider shared-log module (`buildFunctionLogTopicName` / `buildFunctionLogstoreName`) | `${service}-${stage}-${fn.key}-fn-logs` |
|
|
185
|
+
| Shared log project/logset | `buildSharedProjectName` / `buildSharedLogsetName` | `${app}-${stage}-sls` / `-tls` / `-cls` |
|
|
186
|
+
| Length-limited names | `buildConstrainedName` with the provider's cloud limit | truncate + hash deterministically |
|
|
187
|
+
|
|
188
|
+
```typescript
|
|
189
|
+
// GOOD
|
|
190
|
+
const policyName = buildRolePolicyName(roleName);
|
|
191
|
+
|
|
192
|
+
// AVOID - duplicated template, drifts from the other call sites
|
|
193
|
+
const policyName = `${roleName}-policy`;
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Rules
|
|
197
|
+
|
|
198
|
+
1. **Per-owner teardown**: a log container owned by a function/event includes that owner's key in its name (issue #214), so removing one owner never deletes a container another owner still uses. Provider-level singletons (e.g. the aliyun gateway log config, instance id `${region}:PROVIDER`) are the exception: service-scoped, with deletion guarded by active-reference checks.
|
|
199
|
+
2. **Stored-first on rename**: when a name derivation changes, executors and planners MUST read the recorded name from state instances first and apply the new derivation only to fresh creates (see `resolveTlsTopicNameFromInstances` in volcengine `apigwResource.ts`). Otherwise existing deployments phantom-drift and orphan containers.
|
|
200
|
+
3. **In-place migration**: reuse branches key on instance type — existing deployments keep their recorded role/container and get trust/policy updated in place; new names apply only to newly created resources. Never recreate a role or container just to change its name.
|
|
201
|
+
4. **SIDs are per-provider**: `si:<provider>:<service>:<stage>:<id>` — intentionally NOT unified cross-provider; a SID's lifecycle is bound to its physical resource.
|
|
202
|
+
|
|
174
203
|
## Code Style
|
|
175
204
|
|
|
176
205
|
### TypeScript
|
package/README.md
CHANGED
|
@@ -45,18 +45,6 @@ ServerlessInsight is a **cross-provider serverless framework** — it replaces c
|
|
|
45
45
|
|
|
46
46
|
## Installation
|
|
47
47
|
|
|
48
|
-
<a href="https://www.npmjs.com/package/@geek-fun/serverlessinsight">
|
|
49
|
-
<img src="https://img.shields.io/badge/npm_install-g_--g_@geek--fun/serverlessinsight-CB3837&logo=npm&logoColor=white" alt="npm install">
|
|
50
|
-
</a>
|
|
51
|
-
|
|
52
|
-
<a href="https://github.com/geek-fun/serverlessinsight/releases">
|
|
53
|
-
<img src="https://img.shields.io/badge/Releases-GitHub-lightgrey&logo=github" alt="Releases">
|
|
54
|
-
</a>
|
|
55
|
-
|
|
56
|
-
<a href="https://serverlessinsight.geekfun.club">
|
|
57
|
-
<img src="https://img.shields.io/badge/Docs-serverlessinsight.geekfun.club-blue&logo=gitbook&logoColor=white" alt="Docs">
|
|
58
|
-
</a>
|
|
59
|
-
|
|
60
48
|
```bash
|
|
61
49
|
npm install -g @geek-fun/serverlessinsight
|
|
62
50
|
si --version
|