@geek-fun/serverlessinsight 0.8.3 → 0.8.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.
Files changed (61) hide show
  1. package/.serverlessinsight/state-cdn-flow-app-cdn-flow-service.json.backup +3 -2
  2. package/.serverlessinsight/state-iam-test-app-iam-test-service.json.backup +21 -2
  3. package/.serverlessinsight/state-insight-poc-deploy-app-insight-poc-deploy.json.backup +46 -35
  4. package/.serverlessinsight/state-insight-poc-destroy-app-insight-poc-destroy.json.backup +3 -2
  5. package/.serverlessinsight/state-insight-volc-app-insight-volc.json.backup +63 -23
  6. package/CHANGELOG.md +55 -0
  7. package/README.md +1 -1
  8. package/dist/package.json +26 -25
  9. package/dist/src/common/aliyunClient/apigwOperations.js +36 -0
  10. package/dist/src/common/aliyunClient/fc3Operations.js +7 -0
  11. package/dist/src/common/aliyunClient/slsOperations.js +35 -3
  12. package/dist/src/common/constants.js +5 -1
  13. package/dist/src/common/index.js +2 -0
  14. package/dist/src/common/nameBuilder.js +80 -0
  15. package/dist/src/common/providerNames.js +54 -0
  16. package/dist/src/common/runtimeMapper.js +25 -4
  17. package/dist/src/common/stateBackend/remoteStateBackend.js +4 -1
  18. package/dist/src/common/stateManager.js +52 -2
  19. package/dist/src/common/tencentClient/clsOperations.js +137 -0
  20. package/dist/src/common/tencentClient/index.js +21 -1
  21. package/dist/src/common/tencentClient/scfOperations.js +11 -0
  22. package/dist/src/common/volcengineClient/iamOperations.js +33 -0
  23. package/dist/src/common/volcengineClient/tlsOperations.js +84 -1
  24. package/dist/src/lang/en.js +29 -1
  25. package/dist/src/lang/zh-CN.js +29 -1
  26. package/dist/src/parser/index.js +2 -1
  27. package/dist/src/stack/aliyunStack/apigwPlanner.js +2 -0
  28. package/dist/src/stack/aliyunStack/apigwResource.js +118 -1
  29. package/dist/src/stack/aliyunStack/apigwTypes.js +32 -20
  30. package/dist/src/stack/aliyunStack/destroyer.js +25 -0
  31. package/dist/src/stack/aliyunStack/fc3Resource.js +91 -32
  32. package/dist/src/stack/aliyunStack/sharedLogProject.js +137 -0
  33. package/dist/src/stack/ownershipTag.js +19 -1
  34. package/dist/src/stack/scfStack/destroyer.js +13 -0
  35. package/dist/src/stack/scfStack/scfPlanner.js +9 -1
  36. package/dist/src/stack/scfStack/scfResource.js +205 -13
  37. package/dist/src/stack/scfStack/scfTypes.js +6 -0
  38. package/dist/src/stack/scfStack/sharedLogset.js +126 -0
  39. package/dist/src/stack/volcengineStack/apigwResource.js +64 -48
  40. package/dist/src/stack/volcengineStack/apigwTypes.js +10 -7
  41. package/dist/src/stack/volcengineStack/destroyer.js +12 -0
  42. package/dist/src/stack/volcengineStack/sharedLogProject.js +190 -0
  43. package/dist/src/stack/volcengineStack/vefaasPlanner.js +20 -13
  44. package/dist/src/stack/volcengineStack/vefaasResource.js +76 -76
  45. package/dist/src/types/domains/state.js +3 -0
  46. package/dist/src/validator/bucketSchema.js +3 -5
  47. package/dist/src/validator/eventSchema.js +7 -4
  48. package/dist/src/validator/functionSchema.js +3 -2
  49. package/dist/src/validator/iacSchema.js +11 -4
  50. package/dist/src/validator/rootSchema.js +27 -0
  51. package/dist/src/validator/semanticValidation.js +122 -0
  52. package/dist/src/validator/tableschema.js +2 -0
  53. package/dist/src/validator/templateRefSchema.js +23 -3
  54. package/dist/tsconfig.tsbuildinfo +1 -1
  55. package/package.json +26 -25
  56. package/samples/aliyun-poc-fc-gpu.yml +2 -2
  57. package/samples/aliyun-poc-table.yml +1 -1
  58. package/samples/volcengine-poc-advanced.yml +4 -8
  59. package/samples/volcengine-poc-api.yml +1 -1
  60. package/samples/volcengine-poc-function.yml +1 -1
  61. package/samples/volcengine-poc-vpc.yml +3 -7
@@ -5,10 +5,11 @@
5
5
  "service": "cdn-flow-service",
6
6
  "stages": {
7
7
  "dev": {
8
- "resources": {}
8
+ "resources": {},
9
+ "shared": {}
9
10
  }
10
11
  },
11
12
  "resources": {},
12
- "lineage": "4c74973e-ab73-4db8-854b-503f98ad8c62",
13
+ "lineage": "3ea34348-0c9b-4451-9ba3-c734ccf43274",
13
14
  "serial": 5
14
15
  }
@@ -5,10 +5,29 @@
5
5
  "service": "iam-test-service",
6
6
  "stages": {
7
7
  "dev": {
8
- "resources": {}
8
+ "resources": {},
9
+ "shared": {
10
+ "logs.project": {
11
+ "mode": "managed",
12
+ "region": "cn-hangzhou",
13
+ "definition": {
14
+ "projectName": "iam-test-app-dev-sls",
15
+ "region": "cn-hangzhou",
16
+ "stage": "dev"
17
+ },
18
+ "instances": [
19
+ {
20
+ "sid": "si:aliyun:sls_project:dev:iam-test-app-dev-sls",
21
+ "type": "ALIYUN_SLS_PROJECT",
22
+ "id": "iam-test-app-dev-sls"
23
+ }
24
+ ],
25
+ "lastUpdated": "2026-08-28T02:48:38.277Z"
26
+ }
27
+ }
9
28
  }
10
29
  },
11
30
  "resources": {},
12
- "lineage": "d0400fb2-7715-4a08-b13e-f8caa3a934ce",
31
+ "lineage": "17bbe89a-e7af-441e-9829-f92dbace0ef9",
13
32
  "serial": 3
14
33
  }
@@ -26,8 +26,8 @@
26
26
  "customContainerConfig": null,
27
27
  "nasConfig": null,
28
28
  "logConfig": {
29
- "project": "insight-poc-deploy-app-insight-poc-deploy-dev-sls",
30
- "logstore": "insight-poc-deploy-app-insight-poc-deploy-dev-sls-logstore",
29
+ "project": "insight-poc-deploy-app-dev-sls",
30
+ "logstore": "insight-poc-deploy-dev-fn-logs",
31
31
  "enableRequestMetrics": true,
32
32
  "enableInstanceMetrics": true
33
33
  },
@@ -68,21 +68,17 @@
68
68
  "lastUpdateStatusReasonCode": null
69
69
  },
70
70
  {
71
- "sid": "si:aliyun:sls_project:dev:insight-poc-deploy-app-insight-poc-deploy-dev-sls",
72
- "id": "insight-poc-deploy-app-insight-poc-deploy-dev-sls",
73
- "type": "ALIYUN_SLS_PROJECT",
74
- "projectName": "test-project"
75
- },
76
- {
77
- "sid": "si:aliyun:sls_logstore:dev:insight-poc-deploy-app-insight-poc-deploy-dev-sls/insight-poc-deploy-app-insight-poc-deploy-dev-sls-logstore",
78
- "id": "insight-poc-deploy-app-insight-poc-deploy-dev-sls/insight-poc-deploy-app-insight-poc-deploy-dev-sls-logstore",
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",
79
73
  "type": "ALIYUN_SLS_LOGSTORE",
80
- "logstoreName": "test-logstore"
74
+ "logstoreName": "insight-poc-deploy-dev-fn-logs"
81
75
  },
82
76
  {
83
- "sid": "si:aliyun:sls_index:dev:insight-poc-deploy-app-insight-poc-deploy-dev-sls/insight-poc-deploy-app-insight-poc-deploy-dev-sls-logstore/index",
84
- "id": "insight-poc-deploy-app-insight-poc-deploy-dev-sls/insight-poc-deploy-app-insight-poc-deploy-dev-sls-logstore/index",
85
- "type": "ALIYUN_SLS_INDEX"
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",
79
+ "type": "ALIYUN_SLS_INDEX",
80
+ "projectName": "insight-poc-deploy-app-dev-sls",
81
+ "logstoreName": "insight-poc-deploy-dev-fn-logs"
86
82
  },
87
83
  {
88
84
  "sid": "si:aliyun:ram_role:dev:insight-poc-deploy-app-insight-poc-deploy-dev-fc-role",
@@ -95,14 +91,14 @@
95
91
  }
96
92
  }
97
93
  ],
98
- "lastUpdated": "2026-08-26T03:31:16.209Z",
94
+ "lastUpdated": "2026-08-28T02:49:20.881Z",
99
95
  "status": "ready"
100
96
  },
101
97
  "events.gateway_event": {
102
98
  "mode": "managed",
103
99
  "region": "cn-hangzhou",
104
100
  "definition": {
105
- "groupName": "insight-poc-deploy-dev-agw-group",
101
+ "groupName": "insight-poc-deploy-dev-gateway-event-agw-group",
106
102
  "description": "API Gateway group for insight-poc-deploy",
107
103
  "basePath": null,
108
104
  "triggers": [
@@ -170,7 +166,26 @@
170
166
  "stageName": "RELEASE"
171
167
  }
172
168
  ],
173
- "lastUpdated": "2026-08-26T03:31:16.211Z"
169
+ "lastUpdated": "2026-08-28T02:49:20.884Z"
170
+ }
171
+ },
172
+ "shared": {
173
+ "logs.project": {
174
+ "mode": "managed",
175
+ "region": "cn-hangzhou",
176
+ "definition": {
177
+ "projectName": "insight-poc-deploy-app-dev-sls",
178
+ "region": "cn-hangzhou",
179
+ "stage": "dev"
180
+ },
181
+ "instances": [
182
+ {
183
+ "sid": "si:aliyun:sls_project:dev:insight-poc-deploy-app-dev-sls",
184
+ "type": "ALIYUN_SLS_PROJECT",
185
+ "id": "insight-poc-deploy-app-dev-sls"
186
+ }
187
+ ],
188
+ "lastUpdated": "2026-08-28T02:49:15.880Z"
174
189
  }
175
190
  }
176
191
  }
@@ -196,8 +211,8 @@
196
211
  "customContainerConfig": null,
197
212
  "nasConfig": null,
198
213
  "logConfig": {
199
- "project": "insight-poc-deploy-app-insight-poc-deploy-dev-sls",
200
- "logstore": "insight-poc-deploy-app-insight-poc-deploy-dev-sls-logstore",
214
+ "project": "insight-poc-deploy-app-dev-sls",
215
+ "logstore": "insight-poc-deploy-dev-fn-logs",
201
216
  "enableRequestMetrics": true,
202
217
  "enableInstanceMetrics": true
203
218
  },
@@ -238,21 +253,17 @@
238
253
  "lastUpdateStatusReasonCode": null
239
254
  },
240
255
  {
241
- "sid": "si:aliyun:sls_project:dev:insight-poc-deploy-app-insight-poc-deploy-dev-sls",
242
- "id": "insight-poc-deploy-app-insight-poc-deploy-dev-sls",
243
- "type": "ALIYUN_SLS_PROJECT",
244
- "projectName": "test-project"
245
- },
246
- {
247
- "sid": "si:aliyun:sls_logstore:dev:insight-poc-deploy-app-insight-poc-deploy-dev-sls/insight-poc-deploy-app-insight-poc-deploy-dev-sls-logstore",
248
- "id": "insight-poc-deploy-app-insight-poc-deploy-dev-sls/insight-poc-deploy-app-insight-poc-deploy-dev-sls-logstore",
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",
249
258
  "type": "ALIYUN_SLS_LOGSTORE",
250
- "logstoreName": "test-logstore"
259
+ "logstoreName": "insight-poc-deploy-dev-fn-logs"
251
260
  },
252
261
  {
253
- "sid": "si:aliyun:sls_index:dev:insight-poc-deploy-app-insight-poc-deploy-dev-sls/insight-poc-deploy-app-insight-poc-deploy-dev-sls-logstore/index",
254
- "id": "insight-poc-deploy-app-insight-poc-deploy-dev-sls/insight-poc-deploy-app-insight-poc-deploy-dev-sls-logstore/index",
255
- "type": "ALIYUN_SLS_INDEX"
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"
256
267
  },
257
268
  {
258
269
  "sid": "si:aliyun:ram_role:dev:insight-poc-deploy-app-insight-poc-deploy-dev-fc-role",
@@ -265,14 +276,14 @@
265
276
  }
266
277
  }
267
278
  ],
268
- "lastUpdated": "2026-08-26T03:31:16.209Z",
279
+ "lastUpdated": "2026-08-28T02:49:20.881Z",
269
280
  "status": "ready"
270
281
  },
271
282
  "events.gateway_event": {
272
283
  "mode": "managed",
273
284
  "region": "cn-hangzhou",
274
285
  "definition": {
275
- "groupName": "insight-poc-deploy-dev-agw-group",
286
+ "groupName": "insight-poc-deploy-dev-gateway-event-agw-group",
276
287
  "description": "API Gateway group for insight-poc-deploy",
277
288
  "basePath": null,
278
289
  "triggers": [
@@ -340,9 +351,9 @@
340
351
  "stageName": "RELEASE"
341
352
  }
342
353
  ],
343
- "lastUpdated": "2026-08-26T03:31:16.211Z"
354
+ "lastUpdated": "2026-08-28T02:49:20.884Z"
344
355
  }
345
356
  },
346
- "lineage": "1b805eed-b101-473c-9698-9ff65fcd8482",
357
+ "lineage": "5046b4f9-b550-4933-850f-99eb5411cb42",
347
358
  "serial": 2
348
359
  }
@@ -5,10 +5,11 @@
5
5
  "service": "insight-poc-destroy",
6
6
  "stages": {
7
7
  "dev": {
8
- "resources": {}
8
+ "resources": {},
9
+ "shared": {}
9
10
  }
10
11
  },
11
12
  "resources": {},
12
- "lineage": "c6b9260f-9c70-430d-b2f9-bea4dfd8248d",
13
+ "lineage": "6fe96724-0a76-4ea1-945e-62cc4b88214e",
13
14
  "serial": 1
14
15
  }
@@ -19,14 +19,18 @@
19
19
  "NODE_ENV": "production"
20
20
  },
21
21
  "codeHash": "c96b718fa999add5e047823c3d7abfa1397fa8d0075bc6a4f3592785fcd4b76f",
22
- "role": "trn:iam::123456789012:role/test-role"
22
+ "role": "trn:iam::123456789012:role/test-role",
23
+ "logConfig": {
24
+ "project": "insight-volc-app-dev-tls",
25
+ "topic": "insight-volc-dev-fn-logs"
26
+ }
23
27
  },
24
28
  "instances": [
25
29
  {
26
30
  "type": "VOLCENGINE_VEFAAS_FUNCTION",
27
31
  "sid": "si:volcengine:insight-volc:dev:insight-poc-fn",
28
- "id": "insight-poc-fn",
29
- "functionName": "insight-poc-fn",
32
+ "id": "test-function",
33
+ "functionName": "test-function",
30
34
  "functionId": "func-123",
31
35
  "runtime": "node20/v1",
32
36
  "handler": "index.handler",
@@ -35,13 +39,19 @@
35
39
  "environment": {},
36
40
  "status": "Active",
37
41
  "createdTime": null,
38
- "lastUpdateTime": null,
39
- "Tags": [
40
- {
41
- "Key": "si-owned-by",
42
- "Value": "insight-volc-app-insight-volc:functions.insight_poc_fn"
43
- }
44
- ]
42
+ "lastUpdateTime": null
43
+ },
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",
47
+ "type": "VOLCENGINE_TLS_TOPIC",
48
+ "topicName": "insight-volc-dev-fn-logs",
49
+ "topicId": "topic-123"
50
+ },
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",
54
+ "type": "VOLCENGINE_TLS_INDEX"
45
55
  },
46
56
  {
47
57
  "sid": "si:volcengine:iam_role:dev:insight-volc-app-insight-volc-dev-role",
@@ -53,7 +63,27 @@
53
63
  }
54
64
  ],
55
65
  "status": "ready",
56
- "lastUpdated": "2026-08-26T03:31:09.017Z"
66
+ "lastUpdated": "2026-08-28T02:48:53.503Z"
67
+ }
68
+ },
69
+ "shared": {
70
+ "logs.project": {
71
+ "mode": "managed",
72
+ "region": "cn-beijing",
73
+ "definition": {
74
+ "projectName": "insight-volc-app-dev-tls",
75
+ "region": "cn-beijing",
76
+ "stage": "dev"
77
+ },
78
+ "instances": [
79
+ {
80
+ "sid": "si:volcengine:tls:dev:insight-volc-app-dev-tls",
81
+ "type": "VOLCENGINE_TLS_PROJECT",
82
+ "id": "insight-volc-app-dev-tls",
83
+ "projectId": "proj-123"
84
+ }
85
+ ],
86
+ "lastUpdated": "2026-08-28T02:48:50.502Z"
57
87
  }
58
88
  }
59
89
  }
@@ -72,14 +102,18 @@
72
102
  "NODE_ENV": "production"
73
103
  },
74
104
  "codeHash": "c96b718fa999add5e047823c3d7abfa1397fa8d0075bc6a4f3592785fcd4b76f",
75
- "role": "trn:iam::123456789012:role/test-role"
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
+ }
76
110
  },
77
111
  "instances": [
78
112
  {
79
113
  "type": "VOLCENGINE_VEFAAS_FUNCTION",
80
114
  "sid": "si:volcengine:insight-volc:dev:insight-poc-fn",
81
- "id": "insight-poc-fn",
82
- "functionName": "insight-poc-fn",
115
+ "id": "test-function",
116
+ "functionName": "test-function",
83
117
  "functionId": "func-123",
84
118
  "runtime": "node20/v1",
85
119
  "handler": "index.handler",
@@ -88,13 +122,19 @@
88
122
  "environment": {},
89
123
  "status": "Active",
90
124
  "createdTime": null,
91
- "lastUpdateTime": null,
92
- "Tags": [
93
- {
94
- "Key": "si-owned-by",
95
- "Value": "insight-volc-app-insight-volc:functions.insight_poc_fn"
96
- }
97
- ]
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"
98
138
  },
99
139
  {
100
140
  "sid": "si:volcengine:iam_role:dev:insight-volc-app-insight-volc-dev-role",
@@ -106,9 +146,9 @@
106
146
  }
107
147
  ],
108
148
  "status": "ready",
109
- "lastUpdated": "2026-08-26T03:31:09.017Z"
149
+ "lastUpdated": "2026-08-28T02:48:53.503Z"
110
150
  }
111
151
  },
112
- "lineage": "8a806e94-68b6-4524-a28f-e2511c2e8a74",
152
+ "lineage": "a61f5dda-66ef-405f-b377-da268afe24a4",
113
153
  "serial": 1
114
154
  }
package/CHANGELOG.md CHANGED
@@ -5,6 +5,61 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [Unreleased]
9
+
10
+ ### ⚠️ Breaking change
11
+
12
+ - **Generated API Gateway resource names are now collision-safe.** Aliyun apiNames
13
+ (`agw_api` events), Volcengine route names, and Aliyun group names are produced by a
14
+ deterministic constrained-name builder ([#221](https://github.com/geek-fun/serverlessinsight/issues/221),
15
+ [#222](https://github.com/geek-fun/serverlessinsight/issues/222)): when a composed name exceeds the provider
16
+ limit, the leading human-readable segments are truncated while the method/path
17
+ discriminator is preserved, and a deterministic hash suffix guarantees distinctness.
18
+ - Configurations whose previous names already fit their provider limit keep the
19
+ exact same generated names.
20
+ - Deployments affected by the historical truncation will regenerate names. Existing
21
+ cloud APIs/routes created under old truncated names are no longer matched by
22
+ `expectedApiNames` during updates: they become orphaned instead of adopted, so
23
+ plans may show create operations for new names. Manually delete superseded
24
+ gateway resources after upgrading.
25
+ - **Aliyun API Gateway groups are now per-event.** The group name includes the event
26
+ key (`<service>-<stage>-<eventKey>-agw-group`), so multiple `API_GATEWAY` events
27
+ under one service+stage each own their group instead of fighting over one shared
28
+ group's ownership tag. Groups created before this change are orphaned on the next
29
+ plan (same regeneration story as above); delete them manually after upgrading.
30
+ - **Volcengine `python3.8/v1` runtime removed.** Volcengine has retired Python 3.8
31
+ for veFaaS (product notice). The two newer native runtime ids from
32
+ Volcengine-maintained tooling were added: `native-python3.12/v1`,
33
+ `native-node20/v1`.
34
+
35
+ ### Added
36
+
37
+ - Huawei Cloud FunctionGraph is now first-class in runtime compatibility checks:
38
+ standard runtime ids map to the officially supported FunctionGraph runtimes
39
+ (Node.js 10–20, Python 3.6/3.9/3.10/3.12, Java 8/11/17/21, Go 1.x, .NET Core 3.1),
40
+ so literal `runtime` values validate for provider `huawei` instead of always
41
+ failing.
42
+ - Pre-deploy semantic validation runs alongside schema validation and reports, in a
43
+ single aggregated error set: duplicate `method+path` triggers per event,
44
+ duplicate generated apiName/routeName within the deploy scope, dangling
45
+ `${functions.x}` trigger backends, plus provider-conditional function-name length
46
+ limits (Aliyun ≤ 64, Tencent ≤ 60) enforced through JSON Schema `if/then`, and
47
+ literal-format rules for trigger paths (`^/…`), bucket names and domain hostnames.
48
+ Template references (`${vars.x}`, …) bypass literal format rules by design.
49
+ - Samples-as-canaries: a unit test validates every `samples/*.yml` through the full
50
+ schema + semantic validation, so sample drift fails CI instead of users.
51
+ - Fixed trigger definitions being silently unvalidated inside `events.*.triggers`
52
+ items (the subschema lacked its object envelope), which also hid HTTP-method enums.
53
+
54
+ ### Fixed
55
+
56
+ - Table schema now accepts `network.vpc_id` (the resource layer always passed it
57
+ through) and rejects unknown keys inside `network` via `additionalProperties`.
58
+ - Schema error formatter no longer prints an empty `Allowed values:` line when the
59
+ violating rule has no allowed values.
60
+ - Localized the BUCKET_STORE backend error message to the i18n system
61
+ ([#222](https://github.com/geek-fun/serverlessinsight/issues/222)).
62
+
8
63
  ## [0.7.2] - 2026-06-26
9
64
 
10
65
  ### Fixed
package/README.md CHANGED
@@ -23,7 +23,7 @@
23
23
  <img src="https://img.shields.io/badge/AWS-232F3E&logo=amazonwebservices&logoColor=white"/>
24
24
  </p>
25
25
 
26
- [npm i -g @geek-fun/serverlessinsight](https://www.npmjs.com/package/@geek-fun/serverlessinsight) · [Docs](https://serverlessinsight.geekfun.club) · [Website](https://serverlessinsight.geekfun.club) · [GitHub](https://github.com/geek-fun/serverlessinsight)
26
+ [npm](https://www.npmjs.com/package/@geek-fun/serverlessinsight) · [Docs](https://serverlessinsight.geekfun.club) · [Website](https://serverlessinsight.geekfun.club) · [GitHub](https://github.com/geek-fun/serverlessinsight)
27
27
 
28
28
  English · [简体中文](README.zh-CN.md)
29
29
 
package/dist/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@geek-fun/serverlessinsight",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
4
4
  "description": "Full life cycle cross providers serverless application management for your fast-growing business.",
5
- "homepage": "https://serverlessinsight.geekfun.club",
5
+ "homepage": "https://serverlessinsight.com",
6
6
  "main": "dist/src/index.js",
7
7
  "types": "dist/src/index.d.ts",
8
8
  "bin": {
@@ -53,61 +53,62 @@
53
53
  "function"
54
54
  ],
55
55
  "dependencies": {
56
- "@alicloud/alidns20150109": "^4.4.1",
57
- "@alicloud/cas20200407": "^3.2.9",
56
+ "@alicloud/alidns20150109": "^4.6.0",
57
+ "@alicloud/cas20200407": "^3.2.13",
58
58
  "@alicloud/cdn20180510": "^9.2.0",
59
59
  "@alicloud/cloudapi20160714": "^4.8.0",
60
- "@alicloud/ecs20140526": "^7.9.0",
60
+ "@alicloud/ecs20140526": "^7.10.0",
61
61
  "@alicloud/es-serverless20230627": "^2.3.1",
62
- "@alicloud/fc20230330": "^4.7.8",
62
+ "@alicloud/fc20230330": "^4.8.2",
63
63
  "@alicloud/ims20190815": "^2.4.1",
64
- "@alicloud/nas20170626": "^3.5.0",
64
+ "@alicloud/nas20170626": "^3.7.0",
65
65
  "@alicloud/openapi-client": "^0.4.15",
66
- "@alicloud/ram20150501": "^1.2.1",
66
+ "@alicloud/ram20150501": "^1.3.0",
67
67
  "@alicloud/rds20140815": "^15.9.0",
68
- "@alicloud/sls20201230": "^5.10.1",
68
+ "@alicloud/sls20201230": "^5.11.0",
69
69
  "@volcengine/openapi": "^1.36.2",
70
70
  "@volcengine/tos-sdk": "^2.9.1",
71
71
  "ajv": "^8.20.0",
72
72
  "ali-oss": "^6.23.0",
73
73
  "commander": "^15.0.0",
74
- "cos-nodejs-sdk-v5": "^2.16.0-beta.8",
74
+ "cos-nodejs-sdk-v5": "^3.0.0",
75
75
  "i18n": "^0.15.3",
76
76
  "iconv-lite": "^0.7.3",
77
77
  "jszip": "^3.10.1",
78
78
  "lodash": "^4.18.1",
79
- "open": "^9.1.0",
79
+ "open": "^11.0.1",
80
80
  "pino": "^10.3.1",
81
81
  "pino-pretty": "^13.1.3",
82
82
  "tablestore": "^5.6.5",
83
- "tencentcloud-sdk-nodejs-cam": "^4.1.265",
84
- "tencentcloud-sdk-nodejs-cynosdb": "^4.1.265",
85
- "tencentcloud-sdk-nodejs-dnspod": "^4.1.265",
86
- "tencentcloud-sdk-nodejs-es": "^4.1.263",
83
+ "tencentcloud-sdk-nodejs-cam": "^4.1.291",
84
+ "tencentcloud-sdk-nodejs-cls": "^4.1.302",
85
+ "tencentcloud-sdk-nodejs-cynosdb": "^4.1.302",
86
+ "tencentcloud-sdk-nodejs-dnspod": "^4.1.266",
87
+ "tencentcloud-sdk-nodejs-es": "^4.1.302",
87
88
  "tencentcloud-sdk-nodejs-scf": "^4.1.168",
88
- "tencentcloud-sdk-nodejs-ssl": "^4.1.239",
89
+ "tencentcloud-sdk-nodejs-ssl": "^4.1.281",
89
90
  "tencentcloud-sdk-nodejs-tag": "^4.1.244",
90
91
  "yaml": "^2.9.0"
91
92
  },
92
93
  "devDependencies": {
93
- "@eslint/eslintrc": "^3.3.5",
94
+ "@eslint/eslintrc": "^3.3.6",
94
95
  "@eslint/js": "^10.0.1",
95
96
  "@types/ali-oss": "^6.23.3",
96
97
  "@types/i18n": "^0.13.12",
97
98
  "@types/jest": "^30.0.0",
98
- "@types/lodash": "^4.17.24",
99
- "@types/node": "^26.1.1",
100
- "@typescript-eslint/eslint-plugin": "^8.63.0",
101
- "@typescript-eslint/parser": "^8.63.0",
99
+ "@types/lodash": "^4.17.25",
100
+ "@types/node": "^26.4.0",
101
+ "@typescript-eslint/eslint-plugin": "^8.68.0",
102
+ "@typescript-eslint/parser": "^8.68.0",
102
103
  "cross-env": "^10.1.0",
103
- "eslint": "^10.6.0",
104
+ "eslint": "^10.9.1",
104
105
  "eslint-config-prettier": "^10.1.8",
105
106
  "eslint-plugin-prettier": "^5.5.6",
106
- "globals": "^17.7.0",
107
+ "globals": "^17.11.0",
107
108
  "husky": "^9.1.7",
108
109
  "jest": "^30.4.2",
109
- "prettier": "^3.9.5",
110
- "ts-jest": "^29.4.11",
110
+ "prettier": "^3.9.6",
111
+ "ts-jest": "^29.4.12",
111
112
  "ts-node": "^10.9.2",
112
113
  "typescript": "^6.0.3"
113
114
  },
@@ -1112,6 +1112,42 @@ const createApigwOperations = (apigwClient, dnsClient, _context) => {
1112
1112
  throw error;
1113
1113
  }
1114
1114
  },
1115
+ /**
1116
+ * Describe the region-wide PROVIDER gateway log configuration (createLogConfig
1117
+ * is a regional singleton: one PROVIDER config per region, not per group).
1118
+ * Returns null when no PROVIDER config exists.
1119
+ */
1120
+ describeGatewayLogConfig: async () => {
1121
+ const request = new cloudapi.DescribeLogConfigRequest({
1122
+ logType: 'PROVIDER',
1123
+ });
1124
+ const response = await apigwClient.describeLogConfig(request);
1125
+ const logInfos = response.body?.logInfos?.logInfo ?? [];
1126
+ const provider = logInfos.find((info) => info.logType === 'PROVIDER');
1127
+ if (!provider) {
1128
+ return null;
1129
+ }
1130
+ return {
1131
+ logType: provider.logType,
1132
+ regionId: provider.regionId,
1133
+ slsProject: provider.slsProject,
1134
+ slsLogStore: provider.slsLogStore,
1135
+ };
1136
+ },
1137
+ /**
1138
+ * Create the region-wide PROVIDER gateway log configuration. Intentionally no
1139
+ * modify/delete wrappers: a foreign PROVIDER config must never be mutated or
1140
+ * removed by ServerlessInsight — higher-level code decides via describe.
1141
+ */
1142
+ createGatewayLogConfig: async (config) => {
1143
+ const request = new cloudapi.CreateLogConfigRequest({
1144
+ logType: 'PROVIDER',
1145
+ slsProject: config.slsProject,
1146
+ slsLogStore: config.slsLogStore,
1147
+ createSlr: true,
1148
+ });
1149
+ await apigwClient.createLogConfig(request);
1150
+ },
1115
1151
  };
1116
1152
  return operations;
1117
1153
  };
@@ -63,6 +63,13 @@ const buildCodeLocation = (codePath, ossCode) => {
63
63
  if (info?.state === 'Failed') {
64
64
  throw new Error(`FC3 function ${functionName} is in Failed state (reason: ${info.stateReason ?? 'unknown'})`);
65
65
  }
66
+ // Built-in runtimes (zip code) never reach Active (issue #219):
67
+ // they hold Pending while a create/update transition is in flight
68
+ // and report null once stable. Only custom-container functions
69
+ // transition Pending → Active.
70
+ if (info && !info.customContainerConfig) {
71
+ return info.state !== 'Pending';
72
+ }
66
73
  return info?.state === 'Active';
67
74
  },
68
75
  intervalMs: constants_1.SCF_STATUS_POLL_INTERVAL_MS,
@@ -112,7 +112,7 @@ const createSlsOperations = (slsClient) => {
112
112
  },
113
113
  getProject: async (projectName) => {
114
114
  try {
115
- const response = await slsClient.getProject(projectName);
115
+ const response = await slsClient.getProject(projectName, new sls.GetProjectRequest({}));
116
116
  if (!response || !response.body) {
117
117
  return null;
118
118
  }
@@ -138,7 +138,18 @@ const createSlsOperations = (slsClient) => {
138
138
  const request = new sls.DeleteProjectRequest({});
139
139
  await slsClient.deleteProject(projectName, request);
140
140
  },
141
- createLogstore: async (projectName, logstoreName, ttl = 7) => {
141
+ getProjectTags: async (projectName) => {
142
+ const request = new sls.ListTagResourcesRequest({
143
+ resourceId: [projectName],
144
+ resourceType: 'project',
145
+ });
146
+ const response = await slsClient.listTagResources(request);
147
+ return (response.body?.tagResources ?? []).map((tagResource) => ({
148
+ key: tagResource.tagKey ?? '',
149
+ value: tagResource.tagValue ?? '',
150
+ }));
151
+ },
152
+ createLogstore: async (projectName, logstoreName, ttl = 30) => {
142
153
  const request = new sls.CreateLogStoreRequest({
143
154
  logstoreName,
144
155
  ttl,
@@ -176,6 +187,11 @@ const createSlsOperations = (slsClient) => {
176
187
  deleteLogstore: async (projectName, logstoreName) => {
177
188
  await slsClient.deleteLogStore(projectName, logstoreName);
178
189
  },
190
+ listLogStores: async (projectName) => {
191
+ const request = new sls.ListLogStoresRequest({ size: 500 });
192
+ const response = await slsClient.listLogStores(projectName, request);
193
+ return response.body?.logstores ?? [];
194
+ },
179
195
  createIndex: async (projectName, logstoreName) => {
180
196
  const request = new sls.CreateIndexRequest({
181
197
  body: new sls.Index({
@@ -239,9 +255,25 @@ const createSlsOperations = (slsClient) => {
239
255
  waitForProject: async (projectName) => {
240
256
  return waitForSlsProject(operations.getProject, projectName);
241
257
  },
242
- waitForLogstore: async (projectName, logstoreName, ttl = 7) => {
258
+ waitForLogstore: async (projectName, logstoreName, ttl = 30) => {
243
259
  return waitForSlsLogstore(operations.getLogstore, projectName, logstoreName, ttl);
244
260
  },
261
+ addTags: async (config) => {
262
+ const request = new sls.TagResourcesRequest({
263
+ resourceId: [config.resourceId],
264
+ resourceType: config.resourceType,
265
+ tags: config.tags,
266
+ });
267
+ await slsClient.tagResources(request);
268
+ },
269
+ removeTags: async (config) => {
270
+ const request = new sls.UntagResourcesRequest({
271
+ resourceId: [config.resourceId],
272
+ resourceType: config.resourceType,
273
+ tags: config.tagKeys,
274
+ });
275
+ await slsClient.untagResources(request);
276
+ },
245
277
  };
246
278
  return operations;
247
279
  };