@geek-fun/serverlessinsight 0.4.1 → 0.5.0
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/.gitattributes +1 -0
- package/README.md +108 -8
- package/README.zh-CN.md +52 -8
- package/dist/package.json +37 -35
- package/dist/src/commands/deploy.js +17 -7
- package/dist/src/commands/destroy.js +27 -4
- package/dist/src/commands/forceUnlock.js +61 -0
- package/dist/src/commands/index.js +41 -5
- package/dist/src/commands/local.js +10 -1
- package/dist/src/commands/plan.js +33 -0
- package/dist/src/commands/template.js +1 -1
- package/dist/src/commands/validate.js +2 -1
- package/dist/src/common/aliyunClient/apigwOperations.js +652 -0
- package/dist/src/common/aliyunClient/dnsOperations.js +90 -0
- package/dist/src/common/aliyunClient/ecsOperations.js +141 -0
- package/dist/src/common/aliyunClient/esOperations.js +219 -0
- package/dist/src/common/aliyunClient/fc3Operations.js +270 -0
- package/dist/src/common/aliyunClient/index.js +141 -0
- package/dist/src/common/aliyunClient/nasOperations.js +233 -0
- package/dist/src/common/aliyunClient/ossOperations.js +237 -0
- package/dist/src/common/aliyunClient/ramOperations.js +205 -0
- package/dist/src/common/aliyunClient/rdsOperations.js +206 -0
- package/dist/src/common/aliyunClient/slsOperations.js +218 -0
- package/dist/src/common/aliyunClient/tablestoreOperations.js +199 -0
- package/dist/src/common/aliyunClient/types.js +2 -0
- package/dist/src/common/constants.js +6 -1
- package/dist/src/common/context.js +13 -3
- package/dist/src/common/credentials.js +30 -6
- package/dist/src/common/dependencyGraph/graph.js +280 -0
- package/dist/src/common/dependencyGraph/index.js +18 -0
- package/dist/src/common/dependencyGraph/types.js +2 -0
- package/dist/src/common/fileUtils.js +16 -0
- package/dist/src/common/hashUtils.js +121 -0
- package/dist/src/common/iacHelper.js +25 -97
- package/dist/src/common/imsClient.js +4 -0
- package/dist/src/common/index.js +6 -2
- package/dist/src/common/lockManager.js +212 -0
- package/dist/src/common/logger.js +87 -10
- package/dist/src/common/providerEnum.js +2 -3
- package/dist/src/common/runtimeMapper.js +160 -0
- package/dist/src/common/scfClient.js +84 -0
- package/dist/src/common/stateManager.js +107 -0
- package/dist/src/common/tencentClient/cosOperations.js +287 -0
- package/dist/src/common/tencentClient/esOperations.js +156 -0
- package/dist/src/common/tencentClient/index.js +116 -0
- package/dist/src/common/tencentClient/scfOperations.js +141 -0
- package/dist/src/common/tencentClient/tdsqlcOperations.js +211 -0
- package/dist/src/common/tencentClient/types.js +17 -0
- package/dist/src/lang/en.js +254 -0
- package/dist/src/lang/index.js +28 -8
- package/dist/src/lang/zh-CN.js +229 -0
- package/dist/src/parser/bucketParser.js +25 -12
- package/dist/src/parser/databaseParser.js +14 -10
- package/dist/src/parser/functionParser.js +19 -6
- package/dist/src/parser/parseUtils.js +74 -0
- package/dist/src/parser/tableParser.js +19 -17
- package/dist/src/stack/aliyunStack/apigwExecutor.js +84 -0
- package/dist/src/stack/aliyunStack/apigwPlanner.js +118 -0
- package/dist/src/stack/aliyunStack/apigwResource.js +339 -0
- package/dist/src/stack/aliyunStack/apigwTypes.js +125 -0
- package/dist/src/stack/aliyunStack/databaseExecutor.js +112 -0
- package/dist/src/stack/aliyunStack/databasePlanner.js +128 -0
- package/dist/src/stack/aliyunStack/databaseResource.js +228 -0
- package/dist/src/stack/aliyunStack/deployer.js +133 -0
- package/dist/src/stack/aliyunStack/destroyer.js +114 -0
- package/dist/src/stack/aliyunStack/esServerlessTypes.js +141 -0
- package/dist/src/stack/aliyunStack/fc3Executor.js +91 -0
- package/dist/src/stack/aliyunStack/fc3Planner.js +77 -0
- package/dist/src/stack/aliyunStack/fc3Resource.js +511 -0
- package/dist/src/stack/aliyunStack/fc3Types.js +76 -0
- package/dist/src/stack/aliyunStack/index.js +40 -0
- package/dist/src/stack/aliyunStack/ossExecutor.js +91 -0
- package/dist/src/stack/aliyunStack/ossPlanner.js +76 -0
- package/dist/src/stack/aliyunStack/ossResource.js +196 -0
- package/dist/src/stack/aliyunStack/ossTypes.js +50 -0
- package/dist/src/stack/aliyunStack/planner.js +37 -0
- package/dist/src/stack/aliyunStack/rdsTypes.js +217 -0
- package/dist/src/stack/aliyunStack/tablestoreExecutor.js +92 -0
- package/dist/src/stack/aliyunStack/tablestorePlanner.js +94 -0
- package/dist/src/stack/aliyunStack/tablestoreResource.js +120 -0
- package/dist/src/stack/aliyunStack/tablestoreTypes.js +77 -0
- package/dist/src/stack/bucketTypes.js +17 -0
- package/dist/src/stack/deploy.js +24 -77
- package/dist/src/stack/localStack/bucket.js +11 -6
- package/dist/src/stack/localStack/event.js +10 -5
- package/dist/src/stack/localStack/function.js +13 -7
- package/dist/src/stack/localStack/functionRunner.js +1 -1
- package/dist/src/stack/localStack/localServer.js +7 -6
- package/dist/src/stack/scfStack/cosExecutor.js +91 -0
- package/dist/src/stack/scfStack/cosPlanner.js +76 -0
- package/dist/src/stack/scfStack/cosResource.js +126 -0
- package/dist/src/stack/scfStack/cosTypes.js +46 -0
- package/dist/src/stack/scfStack/deployer.js +91 -0
- package/dist/src/stack/scfStack/destroyer.js +88 -0
- package/dist/src/stack/scfStack/esServerlessExecutor.js +105 -0
- package/dist/src/stack/scfStack/esServerlessPlanner.js +86 -0
- package/dist/src/stack/scfStack/esServerlessResource.js +94 -0
- package/dist/src/stack/scfStack/esServerlessTypes.js +48 -0
- package/dist/src/stack/scfStack/index.js +35 -0
- package/dist/src/stack/scfStack/planner.js +91 -0
- package/dist/src/stack/scfStack/scfExecutor.js +91 -0
- package/dist/src/stack/scfStack/scfPlanner.js +78 -0
- package/dist/src/stack/scfStack/scfResource.js +216 -0
- package/dist/src/stack/scfStack/scfTypes.js +41 -0
- package/dist/src/stack/scfStack/tdsqlcExecutor.js +105 -0
- package/dist/src/stack/scfStack/tdsqlcPlanner.js +90 -0
- package/dist/src/stack/scfStack/tdsqlcResource.js +146 -0
- package/dist/src/stack/scfStack/tdsqlcTypes.js +59 -0
- package/dist/src/types/domains/lock.js +2 -0
- package/dist/src/types/domains/resolvable.js +2 -0
- package/dist/src/types/domains/state.js +19 -0
- package/dist/src/types/index.js +4 -0
- package/dist/src/validator/bucketSchema.js +4 -10
- package/dist/src/validator/databaseSchema.js +36 -36
- package/dist/src/validator/eventSchema.js +3 -2
- package/dist/src/validator/functionSchema.js +51 -46
- package/dist/src/validator/iacSchema.js +35 -1
- package/dist/src/validator/rootSchema.js +1 -1
- package/dist/src/validator/tableschema.js +9 -8
- package/dist/src/validator/templateRefSchema.js +23 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +37 -35
- package/samples/README_TENCENT_COS.md +486 -0
- package/samples/README_TENCENT_SCF.md +272 -0
- package/samples/aliyun-poc-api.yml +1 -1
- package/samples/aliyun-poc-bucket.yml +0 -1
- package/samples/aliyun-poc-domain.yml +0 -1
- package/samples/aliyun-poc-es.yml +4 -7
- package/samples/aliyun-poc-rds.yml +0 -2
- package/samples/aliyun-poc-table.yml +1 -3
- package/samples/tencent-poc-cos.yml +20 -0
- package/samples/tencent-poc-scf.yml +36 -0
- package/dist/src/commands/index.d.ts +0 -2
- package/dist/src/common/index.d.ts +0 -12
- package/dist/src/common/rosAssets.js +0 -178
- package/dist/src/common/rosClient.js +0 -201
- package/dist/src/index.d.ts +0 -1
- package/dist/src/lang/index.d.ts +0 -3
- package/dist/src/parser/index.d.ts +0 -3
- package/dist/src/stack/index.d.ts +0 -1
- package/dist/src/stack/localStack/index.d.ts +0 -5
- package/dist/src/stack/rfsStack/index.d.ts +0 -9
- package/dist/src/stack/rosStack/bootstrap.js +0 -187
- package/dist/src/stack/rosStack/bucket.js +0 -127
- package/dist/src/stack/rosStack/database.js +0 -313
- package/dist/src/stack/rosStack/event.js +0 -143
- package/dist/src/stack/rosStack/function.js +0 -259
- package/dist/src/stack/rosStack/index.d.ts +0 -7
- package/dist/src/stack/rosStack/index.js +0 -75
- package/dist/src/stack/rosStack/stage.js +0 -46
- package/dist/src/stack/rosStack/table.js +0 -95
- package/dist/src/stack/rosStack/tag.js +0 -11
- package/dist/src/stack/rosStack/vars.js +0 -49
- package/dist/src/types/index.d.ts +0 -55
- package/dist/src/types/localStack/index.d.ts +0 -81
- package/dist/src/validator/index.d.ts +0 -1
- package/layers/si-bootstrap-sdk/Dockerfile-aliyuncli +0 -12
- package/layers/si-bootstrap-sdk/README.md +0 -64
- package/layers/si-bootstrap-sdk/package-lock.json +0 -881
- package/layers/si-bootstrap-sdk/package.json +0 -33
- package/layers/si-bootstrap-sdk/support/operation-collection/README.md +0 -47
- package/layers/si-bootstrap-sdk/support/operation-collection/package-lock.json +0 -298
- package/layers/si-bootstrap-sdk/support/operation-collection/package.json +0 -18
- package/layers/si-bootstrap-sdk/support/operation-collection/publish.js +0 -257
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { validateYaml } from './iacSchema';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
FROM alpine:latest
|
|
2
|
-
|
|
3
|
-
RUN apk update && apk add --no-cache jq
|
|
4
|
-
|
|
5
|
-
# install aliyuncli
|
|
6
|
-
RUN wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
|
|
7
|
-
RUN tar -xvzf aliyun-cli-linux-latest-amd64.tgz
|
|
8
|
-
RUN rm aliyun-cli-linux-latest-amd64.tgz
|
|
9
|
-
RUN mv aliyun /usr/local/bin/
|
|
10
|
-
|
|
11
|
-
# 注意:alpine需要额外创建 lib64 的动态链接库软连接
|
|
12
|
-
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# ServerlessInsight bootstrap SDK
|
|
2
|
-
|
|
3
|
-
This is the bootstrap SDK for ServerlessInsight, packaged as an Aliyun Function Compute layer.
|
|
4
|
-
|
|
5
|
-
## Automated Publishing
|
|
6
|
-
|
|
7
|
-
The layer is automatically published to Aliyun Function Compute using GitHub Actions whenever changes are pushed to the `layers/si-bootstrap-sdk/` directory on the master branch.
|
|
8
|
-
|
|
9
|
-
### Supported Regions
|
|
10
|
-
|
|
11
|
-
The layer is published to the following Aliyun regions:
|
|
12
|
-
- `cn-beijing` (Beijing)
|
|
13
|
-
- `cn-hangzhou` (Hangzhou)
|
|
14
|
-
- `cn-chengdu` (Chengdu)
|
|
15
|
-
- `ap-southeast-1` (Singapore)
|
|
16
|
-
|
|
17
|
-
### Version Alignment
|
|
18
|
-
|
|
19
|
-
The automation ensures that all regions have the same layer version. If regions have different versions, the script will publish additional versions to align all regions to the latest version.
|
|
20
|
-
|
|
21
|
-
### Manual Trigger
|
|
22
|
-
|
|
23
|
-
You can manually trigger the publishing workflow from the GitHub Actions tab using the "workflow_dispatch" event.
|
|
24
|
-
|
|
25
|
-
### Prerequisites
|
|
26
|
-
|
|
27
|
-
The following secrets must be configured in the repository:
|
|
28
|
-
- `ALIYUN_ACCESS_KEY_ID`: Aliyun access key ID
|
|
29
|
-
- `ALIYUN_ACCESS_KEY_SECRET`: Aliyun access key secret
|
|
30
|
-
|
|
31
|
-
## Local Development
|
|
32
|
-
|
|
33
|
-
### Building the Layer
|
|
34
|
-
|
|
35
|
-
To build the layer locally:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
cd layers/si-bootstrap-sdk
|
|
39
|
-
./scripts/package.sh
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
This will create a packaged layer at `./artifacts/si-bootstrap-sdk.zip`.
|
|
43
|
-
|
|
44
|
-
### Publishing Manually
|
|
45
|
-
|
|
46
|
-
To publish the layer to all regions manually:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
cd layers/si-bootstrap-sdk
|
|
50
|
-
export ALIYUN_ACCESS_KEY_ID="your-access-key-id"
|
|
51
|
-
export ALIYUN_ACCESS_KEY_SECRET="your-access-key-secret"
|
|
52
|
-
export ALIYUN_REGIONS="cn-beijing,cn-hangzhou,cn-chengdu,ap-southeast-1" # Optional, defaults shown
|
|
53
|
-
export ALIYUN_COMPATIBLE_RUNTIMES="nodejs20,nodejs18,nodejs16" # Optional, defaults shown
|
|
54
|
-
./scripts/publish-to-regions.sh
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
You can customize the target regions by setting the `ALIYUN_REGIONS` environment variable with a comma-separated list of region names.
|
|
58
|
-
|
|
59
|
-
You can customize the compatible runtimes by setting the `ALIYUN_COMPATIBLE_RUNTIMES` environment variable with a comma-separated list of runtime identifiers.
|
|
60
|
-
|
|
61
|
-
## Layer Information
|
|
62
|
-
|
|
63
|
-
- **Compatible Runtimes**: nodejs20, nodejs18, nodejs16
|
|
64
|
-
- **License**: Apache-2.0
|