@geek-fun/serverlessinsight 0.9.7 → 0.9.8
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 +1 -0
- package/CHANGELOG.md +68 -6
- package/README.md +51 -10
- package/README.zh-CN.md +44 -10
- package/dist/package.json +2 -1
- package/dist/src/commands/deploy.js +3 -1
- package/dist/src/commands/destroy.js +3 -1
- package/dist/src/commands/forceUnlock.js +2 -2
- package/dist/src/commands/index.js +28 -8
- package/dist/src/commands/local.js +3 -2
- package/dist/src/commands/login.js +120 -37
- package/dist/src/commands/logout.js +3 -5
- package/dist/src/commands/migrate.js +17 -10
- package/dist/src/commands/plan.js +5 -1
- package/dist/src/commands/show.js +3 -1
- package/dist/src/commands/whoami.js +24 -6
- package/dist/src/common/aliyunClient/cdnOperations.js +64 -29
- package/dist/src/common/aliyunClient/dnsOperations.js +10 -0
- package/dist/src/common/aliyunClient/fc3Operations.js +36 -7
- package/dist/src/common/apiClient.js +1 -0
- package/dist/src/common/bindingReconcile.js +182 -0
- package/dist/src/common/cdnCapabilities.js +80 -0
- package/dist/src/common/certUtils.js +44 -5
- package/dist/src/common/consoleLines.js +126 -0
- package/dist/src/common/constants.js +4 -2
- package/dist/src/common/credentialStore.js +136 -39
- package/dist/src/common/domainUtils.js +23 -4
- package/dist/src/common/functionDefinition.js +4 -1
- package/dist/src/common/functionDomainCapabilities.js +28 -0
- package/dist/src/common/functionDomainReconcile.js +197 -0
- package/dist/src/common/lineContext.js +164 -0
- package/dist/src/common/planCapabilities.js +14 -27
- package/dist/src/common/planCompare.js +8 -7
- package/dist/src/common/planFormatter.js +71 -37
- package/dist/src/common/stateBackend/index.js +24 -16
- package/dist/src/common/stateBackend/saasStateBackend.js +46 -53
- package/dist/src/common/stateBackend/tosStateBackend.js +100 -0
- package/dist/src/common/tencentClient/cdnOperations.js +165 -0
- package/dist/src/common/tencentClient/cosOperations.js +18 -2
- package/dist/src/common/tencentClient/dnspodOperations.js +12 -0
- package/dist/src/common/tencentClient/index.js +16 -0
- package/dist/src/common/tencentClient/scfOperations.js +23 -1
- package/dist/src/common/tencentClient/sslOperations.js +147 -77
- package/dist/src/common/volcengineClient/cdnOperations.js +221 -0
- package/dist/src/common/volcengineClient/dnsOperations.js +132 -0
- package/dist/src/common/volcengineClient/index.js +28 -0
- package/dist/src/common/volcengineClient/tosOperations.js +131 -1
- package/dist/src/lang/en.js +89 -10
- package/dist/src/lang/zh-CN.js +90 -9
- package/dist/src/parser/bucketParser.js +22 -79
- package/dist/src/parser/functionParser.js +13 -9
- package/dist/src/stack/aliyunStack/apigwResource.js +2 -1
- package/dist/src/stack/aliyunStack/fc3Planner.js +32 -12
- package/dist/src/stack/aliyunStack/fc3Resource.js +169 -121
- package/dist/src/stack/aliyunStack/ossPlanner.js +12 -4
- package/dist/src/stack/aliyunStack/ossResource.js +484 -501
- package/dist/src/stack/aliyunStack/ossTypes.js +21 -67
- package/dist/src/stack/localStack/aliyunFc.js +59 -9
- package/dist/src/stack/localStack/bucket.js +75 -28
- package/dist/src/stack/localStack/event.js +33 -24
- package/dist/src/stack/localStack/httpAdapter.js +1 -13
- package/dist/src/stack/localStack/index.js +2 -2
- package/dist/src/stack/localStack/localServer.js +85 -7
- package/dist/src/stack/scfStack/cosPlanner.js +11 -3
- package/dist/src/stack/scfStack/cosResource.js +339 -161
- package/dist/src/stack/scfStack/cosTypes.js +25 -34
- package/dist/src/stack/scfStack/scfPlanner.js +26 -8
- package/dist/src/stack/scfStack/scfResource.js +191 -124
- package/dist/src/stack/volcengineStack/tosPlanner.js +13 -1
- package/dist/src/stack/volcengineStack/tosResource.js +398 -7
- package/dist/src/stack/volcengineStack/tosTypes.js +27 -0
- package/dist/src/stack/volcengineStack/vefaasTypes.js +1 -1
- package/dist/src/types/domains/state.js +6 -0
- package/dist/src/validator/bucketSchema.js +35 -113
- package/dist/src/validator/cdnSchema.js +30 -0
- package/dist/src/validator/eventSchema.js +2 -20
- package/dist/src/validator/functionSchema.js +55 -8
- package/dist/src/validator/rootSchema.js +3 -3
- package/dist/src/validator/semanticValidation.js +504 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/release-notes.md +82 -6
- package/samples/aliyun-poc-api-cdn.yml +1 -1
- package/samples/aliyun-poc-bucket-cdn.yml +28 -26
- package/samples/aliyun-poc-domain.yml +2 -1
- package/samples/volcengine-poc-tos-state.yml +36 -0
|
@@ -32,12 +32,20 @@ const normalizeDefinitionForDisplay = (definition) => {
|
|
|
32
32
|
const removedOssDependents = (bucket, currentState, desiredDefinition) => {
|
|
33
33
|
if (!currentState)
|
|
34
34
|
return {};
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
const bindingsRemoved = !(bucket.domains?.length ?? 0) &&
|
|
36
|
+
(currentState.instances ?? []).some((i) => i.type === types_1.ResourceTypeEnum.ALIYUN_OSS_DNS_CNAME ||
|
|
37
|
+
i.type === types_1.ResourceTypeEnum.ALIYUN_CDN_DISTRIBUTION ||
|
|
38
|
+
i.type === types_1.ResourceTypeEnum.ALIYUN_CDN_DNS_CNAME);
|
|
39
|
+
const legacyDefinition = currentState.definition;
|
|
38
40
|
return {
|
|
39
41
|
...(0, bucketPolicy_1.removedBucketPolicy)(ossTypes_1.OSS_BUCKET_POLICY_INSTANCE_TYPE, currentState, desiredDefinition),
|
|
40
|
-
...(
|
|
42
|
+
...(bindingsRemoved
|
|
43
|
+
? {
|
|
44
|
+
domains: currentState.definition.domains ?? null,
|
|
45
|
+
// Legacy single-domain state records the binding under `domain`.
|
|
46
|
+
...(legacyDefinition.domain != null ? { domain: legacyDefinition.domain } : {}),
|
|
47
|
+
}
|
|
48
|
+
: {}),
|
|
41
49
|
};
|
|
42
50
|
};
|
|
43
51
|
const generateBucketPlan = async (context, state, buckets) => {
|