@geek-fun/serverlessinsight 0.9.4 → 0.9.6

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 (79) hide show
  1. package/AGENTS.md +5 -2
  2. package/CHANGELOG.md +44 -0
  3. package/README.md +26 -6
  4. package/README.zh-CN.md +26 -6
  5. package/codecov +0 -0
  6. package/codecov.SHA256SUM +1 -1
  7. package/codecov.SHA256SUM.sig +13 -13
  8. package/dist/package.json +1 -1
  9. package/dist/src/commands/deploy.js +7 -2
  10. package/dist/src/commands/destroy.js +6 -3
  11. package/dist/src/commands/forceUnlock.js +16 -21
  12. package/dist/src/commands/index.js +14 -4
  13. package/dist/src/commands/migrate.js +105 -132
  14. package/dist/src/commands/plan.js +2 -2
  15. package/dist/src/commands/show.js +17 -6
  16. package/dist/src/common/aggregateState.js +185 -0
  17. package/dist/src/common/aggregateStore.js +247 -0
  18. package/dist/src/common/apiClient.js +35 -12
  19. package/dist/src/common/constants.js +2 -1
  20. package/dist/src/common/context.js +22 -15
  21. package/dist/src/common/effectiveConfig.js +48 -0
  22. package/dist/src/common/iacHelper.js +2 -2
  23. package/dist/src/common/index.js +5 -0
  24. package/dist/src/common/jsonOutput.js +2 -13
  25. package/dist/src/common/migrationMarker.js +0 -7
  26. package/dist/src/common/nameBuilder.js +2 -3
  27. package/dist/src/common/regionalMigration.js +261 -0
  28. package/dist/src/common/saasProtocol.js +41 -0
  29. package/dist/src/common/stateBackend/cosStateBackend.js +88 -8
  30. package/dist/src/common/stateBackend/index.js +42 -18
  31. package/dist/src/common/stateBackend/localStateBackend.js +61 -26
  32. package/dist/src/common/stateBackend/ossStateBackend.js +62 -9
  33. package/dist/src/common/stateBackend/remoteStateBackend.js +94 -94
  34. package/dist/src/common/stateBackend/saasStateBackend.js +327 -92
  35. package/dist/src/common/stateBackend/types.js +9 -0
  36. package/dist/src/common/stateManager.js +38 -11
  37. package/dist/src/common/stateScope.js +34 -0
  38. package/dist/src/common/stateStorageIO.js +31 -0
  39. package/dist/src/lang/en.js +43 -2
  40. package/dist/src/lang/zh-CN.js +43 -2
  41. package/dist/src/parser/index.js +33 -8
  42. package/dist/src/parser/templateValues.js +31 -0
  43. package/dist/src/stack/aliyunStack/deployer.js +5 -5
  44. package/dist/src/stack/aliyunStack/destroyer.js +5 -5
  45. package/dist/src/stack/aliyunStack/fc3Planner.js +1 -1
  46. package/dist/src/stack/aliyunStack/fc3Resource.js +2 -2
  47. package/dist/src/stack/aliyunStack/planner.js +1 -1
  48. package/dist/src/stack/aliyunStack/sharedLogProject.js +2 -2
  49. package/dist/src/stack/ownershipTag.js +34 -26
  50. package/dist/src/stack/scfStack/deployer.js +5 -5
  51. package/dist/src/stack/scfStack/destroyer.js +5 -6
  52. package/dist/src/stack/scfStack/planner.js +1 -1
  53. package/dist/src/stack/scfStack/scfResource.js +1 -1
  54. package/dist/src/stack/scfStack/sharedLogset.js +5 -2
  55. package/dist/src/stack/volcengineStack/deployer.js +3 -3
  56. package/dist/src/stack/volcengineStack/destroyer.js +2 -3
  57. package/dist/src/stack/volcengineStack/planner.js +1 -1
  58. package/dist/src/stack/volcengineStack/sharedLogProject.js +4 -4
  59. package/dist/src/stack/volcengineStack/vefaasResource.js +1 -1
  60. package/dist/src/types/domains/state.js +28 -2
  61. package/dist/src/validator/index.js +3 -1
  62. package/dist/src/validator/rootSchema.js +8 -0
  63. package/dist/tsconfig.tsbuildinfo +1 -1
  64. package/package.json +1 -1
  65. package/release-notes.md +8 -36
  66. package/samples/README_TENCENT_COS.md +65 -23
  67. package/samples/README_TENCENT_SCF.md +44 -26
  68. package/.serverlessinsight/state-cdn-flow-app-cdn-flow-service.json.backup +0 -14
  69. package/.serverlessinsight/state-iam-test-app-iam-test-service.json.backup +0 -32
  70. package/.serverlessinsight/state-insight-poc-app-insight-poc-tencent.json.backup +0 -90
  71. package/.serverlessinsight/state-insight-poc-app-log-insight-poc-tencent-log.json.backup +0 -118
  72. package/.serverlessinsight/state-insight-poc-deploy-app-insight-poc-deploy.json.backup +0 -215
  73. package/.serverlessinsight/state-insight-poc-destroy-app-insight-poc-destroy.json.backup +0 -14
  74. package/.serverlessinsight/state-insight-poc-timer-app-insight-poc-timer.json.backup +0 -132
  75. package/.serverlessinsight/state-insight-volc-app-insight-volc.json.backup +0 -55
  76. package/.serverlessinsight/state-insight-volc-destroy-app-insight-volc-destroy.json.backup +0 -1
  77. package/.serverlessinsight/state-insight-volc-nested-app-insight-volc-nested.json.backup +0 -93
  78. package/.serverlessinsight/state-nested-drift-app-nested-drift-service.json.backup +0 -163
  79. package/.serverlessinsight/state-role-reconcile-test-app-role-reconcile-test-service.json.backup +0 -148
@@ -1,148 +0,0 @@
1
- {
2
- "version": "3.0",
3
- "provider": "aliyun",
4
- "app": "role-reconcile-test-app",
5
- "service": "role-reconcile-test-service",
6
- "stages": {
7
- "dev": {
8
- "resources": {
9
- "functions.role_reconcile_fn": {
10
- "mode": "managed",
11
- "region": "cn-hangzhou",
12
- "definition": {
13
- "functionName": "role-reconcile-fn",
14
- "runtime": "nodejs18",
15
- "handler": "index.handler",
16
- "memorySize": 128,
17
- "timeout": 10,
18
- "diskSize": null,
19
- "environment": {},
20
- "vpcConfig": null,
21
- "gpuConfig": null,
22
- "customContainerConfig": null,
23
- "nasConfig": null,
24
- "logConfig": {
25
- "project": "role-reconcile-test-app-dev-sls",
26
- "logstore": "role-reconcile-test-service-dev-role-reconcile-fn-fn-logs",
27
- "enableRequestMetrics": true,
28
- "enableInstanceMetrics": true
29
- },
30
- "codeHash": "c96b718fa999add5e047823c3d7abfa1397fa8d0075bc6a4f3592785fcd4b76f",
31
- "iam": {
32
- "role": {
33
- "statements": [
34
- {
35
- "sid": "OSSRead",
36
- "effect": "Allow",
37
- "action": [
38
- "oss:GetObject"
39
- ],
40
- "resource": [
41
- "acs:oss:*:*:my-bucket/*"
42
- ]
43
- }
44
- ]
45
- }
46
- }
47
- },
48
- "instances": [
49
- {
50
- "type": "ALIYUN_FC3_FUNCTION",
51
- "sid": "si:aliyun:fc3:dev:role-reconcile-fn",
52
- "id": "role-reconcile-fn",
53
- "functionName": "role-reconcile-fn",
54
- "functionArn": null,
55
- "functionId": null,
56
- "runtime": "nodejs18",
57
- "handler": "index.handler",
58
- "memorySize": 128,
59
- "timeout": 10,
60
- "diskSize": null,
61
- "cpu": null,
62
- "environment": {},
63
- "vpcConfig": {},
64
- "gpuConfig": {},
65
- "nasConfig": {},
66
- "logConfig": {
67
- "project": "role-reconcile-test-app-dev-sls",
68
- "logstore": "role-reconcile-test-service-dev-role-reconcile-fn-fn-logs",
69
- "enableRequestMetrics": true,
70
- "enableInstanceMetrics": true,
71
- "logBeginRule": null
72
- },
73
- "customContainerConfig": {},
74
- "description": null,
75
- "internetAccess": null,
76
- "role": "acs:ram::123456789012:role/role-reconcile-test-app-role-reconcile-test-service-role-0kzfky0",
77
- "codeChecksum": null,
78
- "codeSize": null,
79
- "createdTime": null,
80
- "lastModifiedTime": null,
81
- "state": "Running",
82
- "stateReason": null,
83
- "stateReasonCode": null,
84
- "lastUpdateStatus": null,
85
- "lastUpdateStatusReason": null,
86
- "lastUpdateStatusReasonCode": null,
87
- "tags": [
88
- {
89
- "key": null,
90
- "value": null
91
- }
92
- ]
93
- },
94
- {
95
- "sid": "si:aliyun:sls_logstore:dev:role-reconcile-test-app-dev-sls/role-reconcile-test-service-dev-role-reconcile-fn-fn-logs",
96
- "id": "role-reconcile-test-app-dev-sls/role-reconcile-test-service-dev-role-reconcile-fn-fn-logs",
97
- "type": "ALIYUN_SLS_LOGSTORE",
98
- "logstoreName": "role-reconcile-test-service-dev-role-reconcile-fn-fn-logs"
99
- },
100
- {
101
- "sid": "si:aliyun:sls_index:dev:role-reconcile-test-app-dev-sls/role-reconcile-test-service-dev-role-reconcile-fn-fn-logs/index",
102
- "id": "role-reconcile-test-app-dev-sls/role-reconcile-test-service-dev-role-reconcile-fn-fn-logs/index",
103
- "type": "ALIYUN_SLS_INDEX",
104
- "projectName": "role-reconcile-test-app-dev-sls",
105
- "logstoreName": "role-reconcile-test-service-dev-role-reconcile-fn-fn-logs"
106
- },
107
- {
108
- "sid": "si:aliyun:ram_role:dev:role-reconcile-test-app-role-reconcile-test-service-role-0kzfky0",
109
- "id": "role-reconcile-test-app-role-reconcile-test-service-role-0kzfky0",
110
- "type": "ALIYUN_RAM_ROLE",
111
- "roleArn": "acs:ram::123456789012:role/role-reconcile-test-app-role-reconcile-test-service-role-0kzfky0",
112
- "roleName": "role-reconcile-test-app-role-reconcile-test-service-role-0kzfky0",
113
- "roleId": "role-123",
114
- "arn": "acs:ram::123456789012:role/role-reconcile-test-app-role-reconcile-test-service-role-0kzfky0",
115
- "policyName": "role-reconcile-test-app-role-reconcile-test-service-role-0kzfky0-policy",
116
- "trustedServices": [
117
- "fc.aliyuncs.com"
118
- ]
119
- }
120
- ],
121
- "lastUpdated": "2026-10-27T03:28:19.566Z",
122
- "status": "ready"
123
- }
124
- },
125
- "shared": {
126
- "logs.project": {
127
- "mode": "managed",
128
- "region": "cn-hangzhou",
129
- "definition": {
130
- "projectName": "role-reconcile-test-app-dev-sls",
131
- "region": "cn-hangzhou",
132
- "stage": "dev"
133
- },
134
- "instances": [
135
- {
136
- "sid": "si:aliyun:sls_project:dev:role-reconcile-test-app-dev-sls",
137
- "type": "ALIYUN_SLS_PROJECT",
138
- "id": "role-reconcile-test-app-dev-sls"
139
- }
140
- ],
141
- "lastUpdated": "2026-10-27T03:28:14.564Z"
142
- }
143
- }
144
- }
145
- },
146
- "lineage": "35466c85-445c-457f-921c-3b1bf3d348d0",
147
- "serial": 2
148
- }