@geek-fun/serverlessinsight 0.9.3 → 0.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +5 -2
- package/CHANGELOG.md +56 -0
- package/README.md +266 -179
- package/README.zh-CN.md +264 -147
- package/codecov +0 -0
- package/codecov.SHA256SUM +1 -1
- package/codecov.SHA256SUM.sig +13 -13
- package/dist/package.json +22 -19
- package/dist/src/commands/deploy.js +7 -2
- package/dist/src/commands/destroy.js +6 -3
- package/dist/src/commands/forceUnlock.js +16 -21
- package/dist/src/commands/index.js +26 -63
- package/dist/src/commands/migrate.js +105 -132
- package/dist/src/commands/plan.js +27 -3
- package/dist/src/commands/show.js +17 -6
- package/dist/src/common/aggregateState.js +185 -0
- package/dist/src/common/aggregateStore.js +247 -0
- package/dist/src/common/aliyunClient/apigwOperations.js +32 -9
- package/dist/src/common/apiClient.js +35 -12
- package/dist/src/common/constants.js +2 -1
- package/dist/src/common/context.js +22 -15
- package/dist/src/common/effectiveConfig.js +48 -0
- package/dist/src/common/index.js +5 -0
- package/dist/src/common/jsonOutput.js +2 -13
- package/dist/src/common/migrationMarker.js +0 -7
- package/dist/src/common/nameBuilder.js +2 -3
- package/dist/src/common/regionalMigration.js +261 -0
- package/dist/src/common/saasProtocol.js +41 -0
- package/dist/src/common/stateBackend/cosStateBackend.js +88 -8
- package/dist/src/common/stateBackend/index.js +42 -18
- package/dist/src/common/stateBackend/localStateBackend.js +61 -26
- package/dist/src/common/stateBackend/ossStateBackend.js +62 -9
- package/dist/src/common/stateBackend/remoteStateBackend.js +94 -94
- package/dist/src/common/stateBackend/saasStateBackend.js +327 -92
- package/dist/src/common/stateBackend/types.js +9 -0
- package/dist/src/common/stateManager.js +38 -11
- package/dist/src/common/stateScope.js +34 -0
- package/dist/src/common/stateStorageIO.js +31 -0
- package/dist/src/lang/en.js +48 -6
- package/dist/src/lang/index.js +28 -14
- package/dist/src/lang/zh-CN.js +48 -6
- package/dist/src/parser/index.js +25 -4
- package/dist/src/stack/aliyunStack/apigwDomainPlan.js +82 -0
- package/dist/src/stack/aliyunStack/apigwExecutor.js +4 -1
- package/dist/src/stack/aliyunStack/apigwPlanner.js +115 -55
- package/dist/src/stack/aliyunStack/apigwResource.js +169 -124
- package/dist/src/stack/aliyunStack/deployer.js +5 -5
- package/dist/src/stack/aliyunStack/destroyer.js +5 -5
- package/dist/src/stack/aliyunStack/fc3Planner.js +1 -1
- package/dist/src/stack/aliyunStack/fc3Resource.js +2 -2
- package/dist/src/stack/aliyunStack/planner.js +1 -1
- package/dist/src/stack/aliyunStack/sharedLogProject.js +2 -2
- package/dist/src/stack/ownershipTag.js +34 -26
- package/dist/src/stack/scfStack/deployer.js +5 -5
- package/dist/src/stack/scfStack/destroyer.js +5 -6
- package/dist/src/stack/scfStack/planner.js +1 -1
- package/dist/src/stack/scfStack/scfResource.js +1 -1
- package/dist/src/stack/scfStack/sharedLogset.js +5 -2
- package/dist/src/stack/volcengineStack/deployer.js +3 -3
- package/dist/src/stack/volcengineStack/destroyer.js +2 -3
- package/dist/src/stack/volcengineStack/planner.js +1 -1
- package/dist/src/stack/volcengineStack/sharedLogProject.js +4 -4
- package/dist/src/stack/volcengineStack/vefaasResource.js +1 -1
- package/dist/src/types/domains/state.js +28 -2
- package/dist/src/validator/rootSchema.js +8 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +22 -19
- package/release-notes.md +27 -56
- package/samples/README_TENCENT_COS.md +68 -26
- package/samples/README_TENCENT_SCF.md +47 -29
- package/.serverlessinsight/state-cdn-flow-app-cdn-flow-service.json.backup +0 -14
- package/.serverlessinsight/state-iam-test-app-iam-test-service.json.backup +0 -32
- package/.serverlessinsight/state-insight-poc-app-insight-poc-tencent.json.backup +0 -90
- package/.serverlessinsight/state-insight-poc-app-log-insight-poc-tencent-log.json.backup +0 -118
- package/.serverlessinsight/state-insight-poc-deploy-app-insight-poc-deploy.json.backup +0 -215
- package/.serverlessinsight/state-insight-poc-destroy-app-insight-poc-destroy.json.backup +0 -14
- package/.serverlessinsight/state-insight-poc-timer-app-insight-poc-timer.json.backup +0 -132
- package/.serverlessinsight/state-insight-volc-app-insight-volc.json.backup +0 -55
- package/.serverlessinsight/state-insight-volc-destroy-app-insight-volc-destroy.json.backup +0 -1
- package/.serverlessinsight/state-insight-volc-nested-app-insight-volc-nested.json.backup +0 -93
- package/.serverlessinsight/state-nested-drift-app-nested-drift-service.json.backup +0 -163
- package/.serverlessinsight/state-role-reconcile-test-app-role-reconcile-test-service.json.backup +0 -148
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "3.0",
|
|
3
|
-
"provider": "aliyun",
|
|
4
|
-
"app": "nested-drift-app",
|
|
5
|
-
"service": "nested-drift-service",
|
|
6
|
-
"stages": {
|
|
7
|
-
"dev": {
|
|
8
|
-
"resources": {
|
|
9
|
-
"functions.nested_fn": {
|
|
10
|
-
"mode": "managed",
|
|
11
|
-
"region": "cn-hangzhou",
|
|
12
|
-
"definition": {
|
|
13
|
-
"functionName": "nested-drift-fn",
|
|
14
|
-
"runtime": "nodejs18",
|
|
15
|
-
"handler": "index.handler",
|
|
16
|
-
"memorySize": 128,
|
|
17
|
-
"timeout": 10,
|
|
18
|
-
"diskSize": null,
|
|
19
|
-
"environment": {},
|
|
20
|
-
"vpcConfig": {
|
|
21
|
-
"vpcId": "vpc-123",
|
|
22
|
-
"vSwitchIds": [
|
|
23
|
-
"vsw-123"
|
|
24
|
-
],
|
|
25
|
-
"securityGroupId": "sg-123"
|
|
26
|
-
},
|
|
27
|
-
"gpuConfig": null,
|
|
28
|
-
"customContainerConfig": null,
|
|
29
|
-
"nasConfig": {
|
|
30
|
-
"userId": -1,
|
|
31
|
-
"groupId": -1,
|
|
32
|
-
"mountPoints": [
|
|
33
|
-
{
|
|
34
|
-
"serverAddr": "fs-123.repaired.cn-hangzhou.nas.aliyuncs.com:/",
|
|
35
|
-
"mountDir": "/mnt/data"
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
|
-
"nasStorage": [
|
|
40
|
-
{
|
|
41
|
-
"mount_path": "/mnt/data",
|
|
42
|
-
"storage_class": "STANDARD_PERFORMANCE"
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"logConfig": {
|
|
46
|
-
"enableRequestMetrics": false,
|
|
47
|
-
"enableInstanceMetrics": false
|
|
48
|
-
},
|
|
49
|
-
"codeHash": "c96b718fa999add5e047823c3d7abfa1397fa8d0075bc6a4f3592785fcd4b76f"
|
|
50
|
-
},
|
|
51
|
-
"instances": [
|
|
52
|
-
{
|
|
53
|
-
"type": "ALIYUN_FC3_FUNCTION",
|
|
54
|
-
"sid": "si:aliyun:fc3:dev:nested-drift-fn",
|
|
55
|
-
"id": "nested-drift-fn",
|
|
56
|
-
"functionName": "nested-drift-fn",
|
|
57
|
-
"functionArn": null,
|
|
58
|
-
"functionId": null,
|
|
59
|
-
"runtime": "nodejs18",
|
|
60
|
-
"handler": "index.handler",
|
|
61
|
-
"memorySize": 128,
|
|
62
|
-
"timeout": 10,
|
|
63
|
-
"diskSize": null,
|
|
64
|
-
"cpu": null,
|
|
65
|
-
"environment": {},
|
|
66
|
-
"vpcConfig": {
|
|
67
|
-
"vpcId": "vpc-123",
|
|
68
|
-
"vSwitchIds": [
|
|
69
|
-
"vsw-123"
|
|
70
|
-
],
|
|
71
|
-
"securityGroupId": "sg-123"
|
|
72
|
-
},
|
|
73
|
-
"gpuConfig": {},
|
|
74
|
-
"nasConfig": {
|
|
75
|
-
"userId": -1,
|
|
76
|
-
"groupId": -1,
|
|
77
|
-
"mountPoints": [
|
|
78
|
-
{
|
|
79
|
-
"serverAddr": "fs-123.repaired.cn-hangzhou.nas.aliyuncs.com:/",
|
|
80
|
-
"mountDir": "/mnt/data",
|
|
81
|
-
"enableTls": null
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
},
|
|
85
|
-
"logConfig": {
|
|
86
|
-
"project": null,
|
|
87
|
-
"logstore": null,
|
|
88
|
-
"enableRequestMetrics": false,
|
|
89
|
-
"enableInstanceMetrics": false,
|
|
90
|
-
"logBeginRule": null
|
|
91
|
-
},
|
|
92
|
-
"customContainerConfig": {},
|
|
93
|
-
"description": null,
|
|
94
|
-
"internetAccess": null,
|
|
95
|
-
"role": "acs:ram::123456789012:role/nested-drift-app-nested-drift-service-dev-nested-fn-role",
|
|
96
|
-
"codeChecksum": null,
|
|
97
|
-
"codeSize": null,
|
|
98
|
-
"createdTime": null,
|
|
99
|
-
"lastModifiedTime": null,
|
|
100
|
-
"state": "Running",
|
|
101
|
-
"stateReason": null,
|
|
102
|
-
"stateReasonCode": null,
|
|
103
|
-
"lastUpdateStatus": null,
|
|
104
|
-
"lastUpdateStatusReason": null,
|
|
105
|
-
"lastUpdateStatusReasonCode": null,
|
|
106
|
-
"tags": [
|
|
107
|
-
{
|
|
108
|
-
"key": null,
|
|
109
|
-
"value": null
|
|
110
|
-
}
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"sid": "si:aliyun:ram_role:dev:nested-drift-app-nested-drift-service-dev-nested-fn-role",
|
|
115
|
-
"id": "nested-drift-app-nested-drift-service-dev-nested-fn-role",
|
|
116
|
-
"type": "ALIYUN_RAM_ROLE",
|
|
117
|
-
"roleArn": "acs:ram::123456789012:role/nested-drift-app-nested-drift-service-dev-nested-fn-role",
|
|
118
|
-
"roleName": "nested-drift-app-nested-drift-service-dev-nested-fn-role",
|
|
119
|
-
"roleId": "role-123",
|
|
120
|
-
"arn": "acs:ram::123456789012:role/nested-drift-app-nested-drift-service-dev-nested-fn-role",
|
|
121
|
-
"policyName": "nested-drift-app-nested-drift-service-dev-nested-fn-role-policy",
|
|
122
|
-
"trustedServices": [
|
|
123
|
-
"fc.aliyuncs.com"
|
|
124
|
-
]
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"sid": "si:aliyun:ecs_security_group:dev:sg-123",
|
|
128
|
-
"id": "sg-123",
|
|
129
|
-
"type": "ALIYUN_ECS_SECURITY_GROUP",
|
|
130
|
-
"securityGroupId": "sg-123",
|
|
131
|
-
"securityGroupName": "nested-drift-sg"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"sid": "si:aliyun:nas_access_group:dev:nested-drift-fn-dev-nas-access-mnt-data",
|
|
135
|
-
"id": "nested-drift-fn-dev-nas-access-mnt-data",
|
|
136
|
-
"type": "ALIYUN_NAS_ACCESS_GROUP",
|
|
137
|
-
"accessRules": [
|
|
138
|
-
{}
|
|
139
|
-
]
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"sid": "si:aliyun:nas_file_system:dev:fs-123",
|
|
143
|
-
"id": "fs-123",
|
|
144
|
-
"type": "ALIYUN_NAS_FILE_SYSTEM",
|
|
145
|
-
"fileSystemId": "fs-123"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"sid": "si:aliyun:nas_mount_target:dev:fs-123/fs-123.cn-hangzhou.nas.aliyuncs.com",
|
|
149
|
-
"id": "fs-123/fs-123.repaired.cn-hangzhou.nas.aliyuncs.com",
|
|
150
|
-
"type": "ALIYUN_NAS_MOUNT_TARGET",
|
|
151
|
-
"mountTargetDomain": "fs-123.cn-hangzhou.nas.aliyuncs.com",
|
|
152
|
-
"accessGroupName": "nested-drift-fn-dev-nas-access-mnt-data"
|
|
153
|
-
}
|
|
154
|
-
],
|
|
155
|
-
"lastUpdated": "2026-10-24T09:42:22.394Z"
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
"shared": {}
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
"lineage": "c1b8f5d7-306e-425d-a452-b650b0436fd0",
|
|
162
|
-
"serial": 4
|
|
163
|
-
}
|
package/.serverlessinsight/state-role-reconcile-test-app-role-reconcile-test-service.json.backup
DELETED
|
@@ -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-24T09:45:43.481Z",
|
|
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-24T09:45:38.480Z"
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
"lineage": "f512fbf2-43ab-4a0c-8e0b-33d1cbd1c1dd",
|
|
147
|
-
"serial": 2
|
|
148
|
-
}
|