@geek-fun/serverlessinsight 0.4.0 → 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 +86 -14
- package/dist/src/commands/local.js +10 -1
- package/dist/src/commands/plan.js +33 -0
- package/dist/src/commands/template.js +3 -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 +7 -1
- package/dist/src/common/context.js +32 -14
- package/dist/src/common/credentials.js +39 -0
- 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 +7 -2
- package/dist/src/common/lockManager.js +212 -0
- package/dist/src/common/logger.js +89 -6
- 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 +52 -3
- package/dist/src/validator/rootSchema.js +47 -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 +14 -13
- 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 -11
- package/dist/src/common/rosAssets.js +0 -178
- package/dist/src/common/rosClient.js +0 -198
- 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 -1
- package/layers/si-bootstrap-sdk/package-lock.json +0 -875
- package/layers/si-bootstrap-sdk/package.json +0 -33
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTdsqlcOperations = void 0;
|
|
4
|
+
const types_1 = require("./types");
|
|
5
|
+
const logger_1 = require("../logger");
|
|
6
|
+
const lang_1 = require("../../lang");
|
|
7
|
+
// TDSQL-C helper functions
|
|
8
|
+
const waitForClusterReady = async (getCluster, clusterId) => {
|
|
9
|
+
const maxAttempts = 60;
|
|
10
|
+
let attempts = 0;
|
|
11
|
+
while (attempts < maxAttempts) {
|
|
12
|
+
const cluster = await getCluster(clusterId);
|
|
13
|
+
if (!cluster) {
|
|
14
|
+
throw new Error(lang_1.lang.__('TDSQL_CLUSTER_NOT_FOUND', { clusterId }));
|
|
15
|
+
}
|
|
16
|
+
if (cluster.Status === types_1.TdsqlcClusterStatus.RUNNING) {
|
|
17
|
+
logger_1.logger.info(lang_1.lang.__('TDSQL_CLUSTER_READY', { clusterId }));
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (cluster.Status === types_1.TdsqlcClusterStatus.ISOLATED ||
|
|
21
|
+
cluster.Status === types_1.TdsqlcClusterStatus.OFFLINE) {
|
|
22
|
+
throw new Error(lang_1.lang.__('TDSQL_CLUSTER_ERROR_STATE', { status: cluster.Status }));
|
|
23
|
+
}
|
|
24
|
+
logger_1.logger.info(lang_1.lang.__('TDSQL_CLUSTER_WAITING', { clusterId, status: cluster.Status }));
|
|
25
|
+
await new Promise((resolve) => setTimeout(resolve, 10000));
|
|
26
|
+
attempts++;
|
|
27
|
+
}
|
|
28
|
+
throw new Error(lang_1.lang.__('TDSQL_CLUSTER_TIMEOUT_READY', { clusterId }));
|
|
29
|
+
};
|
|
30
|
+
const waitForClusterDeleted = async (getCluster, clusterId) => {
|
|
31
|
+
const maxAttempts = 60;
|
|
32
|
+
let attempts = 0;
|
|
33
|
+
while (attempts < maxAttempts) {
|
|
34
|
+
const cluster = await getCluster(clusterId);
|
|
35
|
+
if (!cluster) {
|
|
36
|
+
logger_1.logger.info(lang_1.lang.__('TDSQL_CLUSTER_DELETED', { clusterId }));
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (cluster.Status === types_1.TdsqlcClusterStatus.ISOLATED ||
|
|
40
|
+
cluster.Status === types_1.TdsqlcClusterStatus.OFFLINE) {
|
|
41
|
+
logger_1.logger.info(lang_1.lang.__('TDSQL_CLUSTER_BEING_DELETED', { clusterId }));
|
|
42
|
+
await new Promise((resolve) => setTimeout(resolve, 10000));
|
|
43
|
+
attempts++;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
logger_1.logger.info(lang_1.lang.__('TDSQL_CLUSTER_WAITING_DELETE', { clusterId, status: cluster.Status }));
|
|
47
|
+
await new Promise((resolve) => setTimeout(resolve, 10000));
|
|
48
|
+
attempts++;
|
|
49
|
+
}
|
|
50
|
+
throw new Error(lang_1.lang.__('TDSQL_CLUSTER_TIMEOUT_DELETE', { clusterId }));
|
|
51
|
+
};
|
|
52
|
+
// TDSQL-C operations
|
|
53
|
+
const createTdsqlcOperations = (cynosdbClient, context) => {
|
|
54
|
+
const operations = {
|
|
55
|
+
createCluster: async (config) => {
|
|
56
|
+
const params = {
|
|
57
|
+
Zone: `${context.region}-1`,
|
|
58
|
+
VpcId: config.VpcId || '',
|
|
59
|
+
SubnetId: config.SubnetId || '',
|
|
60
|
+
DbType: config.DbType,
|
|
61
|
+
DbVersion: config.DbVersion,
|
|
62
|
+
DbMode: config.DbMode,
|
|
63
|
+
ProjectId: config.ProjectId || 0,
|
|
64
|
+
ClusterName: config.ClusterName,
|
|
65
|
+
AdminPassword: config.AdminPassword,
|
|
66
|
+
Port: config.Port || 3306,
|
|
67
|
+
PayMode: 0,
|
|
68
|
+
MinCpu: config.MinCpu,
|
|
69
|
+
MaxCpu: config.MaxCpu,
|
|
70
|
+
AutoPause: config.AutoPause ? 'yes' : 'no',
|
|
71
|
+
AutoPauseDelay: config.AutoPauseDelay,
|
|
72
|
+
StoragePayMode: config.StoragePayMode,
|
|
73
|
+
StorageLimit: config.MaxStorageSize,
|
|
74
|
+
};
|
|
75
|
+
try {
|
|
76
|
+
const response = await cynosdbClient.CreateClusters(params);
|
|
77
|
+
logger_1.logger.info(lang_1.lang.__('TDSQL_CLUSTER_CREATION_INITIATED'));
|
|
78
|
+
if (!response.ClusterIds || response.ClusterIds.length === 0) {
|
|
79
|
+
throw new Error(lang_1.lang.__('TDSQL_CLUSTER_NO_ID_RETURNED'));
|
|
80
|
+
}
|
|
81
|
+
const clusterId = response.ClusterIds[0];
|
|
82
|
+
// Wait for cluster to be ready
|
|
83
|
+
await waitForClusterReady(operations.getCluster, clusterId);
|
|
84
|
+
return clusterId;
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
logger_1.logger.error(`${lang_1.lang.__('TDSQL_CLUSTER_CREATION_FAILED')}: ${error}`);
|
|
88
|
+
throw error;
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
getCluster: async (clusterId) => {
|
|
92
|
+
const params = {
|
|
93
|
+
Filters: [
|
|
94
|
+
{
|
|
95
|
+
Names: ['ClusterId'],
|
|
96
|
+
Values: [clusterId],
|
|
97
|
+
ExactMatch: true,
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
};
|
|
101
|
+
try {
|
|
102
|
+
const response = await cynosdbClient.DescribeClusters(params);
|
|
103
|
+
if (!response.ClusterSet || response.ClusterSet.length === 0) {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
const cluster = response.ClusterSet[0];
|
|
107
|
+
return {
|
|
108
|
+
ClusterId: cluster.ClusterId || '',
|
|
109
|
+
ClusterName: cluster.ClusterName || '',
|
|
110
|
+
Region: cluster.Region || context.region,
|
|
111
|
+
Zone: cluster.Zone,
|
|
112
|
+
PhysicalZone: cluster.PhysicalZone,
|
|
113
|
+
DbType: cluster.DbType || '',
|
|
114
|
+
DbVersion: cluster.DbVersion || '',
|
|
115
|
+
DbMode: cluster.DbMode,
|
|
116
|
+
Status: cluster.Status || '',
|
|
117
|
+
StatusDesc: cluster.StatusDesc,
|
|
118
|
+
ServerlessStatus: cluster.ServerlessStatus,
|
|
119
|
+
VpcId: cluster.VpcId,
|
|
120
|
+
VpcName: undefined,
|
|
121
|
+
SubnetId: cluster.SubnetId,
|
|
122
|
+
SubnetName: undefined,
|
|
123
|
+
Charset: undefined,
|
|
124
|
+
Vip: cluster.Vip,
|
|
125
|
+
Vport: cluster.Vport,
|
|
126
|
+
WanDomain: undefined,
|
|
127
|
+
WanIP: undefined,
|
|
128
|
+
WanPort: undefined,
|
|
129
|
+
WanStatus: undefined,
|
|
130
|
+
MinCpu: undefined,
|
|
131
|
+
MaxCpu: undefined,
|
|
132
|
+
MinStorageSize: cluster.MinStorageSize,
|
|
133
|
+
MaxStorageSize: cluster.MaxStorageSize,
|
|
134
|
+
StorageId: cluster.StorageId,
|
|
135
|
+
Storage: cluster.Storage,
|
|
136
|
+
StorageLimit: cluster.StorageLimit,
|
|
137
|
+
StoragePayMode: cluster.StoragePayMode,
|
|
138
|
+
AutoPause: cluster.ServerlessStatus,
|
|
139
|
+
AutoPauseDelay: undefined,
|
|
140
|
+
CreateTime: cluster.CreateTime,
|
|
141
|
+
UpdateTime: cluster.UpdateTime,
|
|
142
|
+
ProjectId: cluster.ProjectID,
|
|
143
|
+
PayMode: cluster.PayMode,
|
|
144
|
+
PeriodEndTime: cluster.PeriodEndTime,
|
|
145
|
+
AutoRenewFlag: cluster.RenewFlag,
|
|
146
|
+
InstanceCount: cluster.InstanceNum,
|
|
147
|
+
ProcessingTask: cluster.ProcessingTask,
|
|
148
|
+
SupportedFeatures: undefined,
|
|
149
|
+
RollbackSupport: undefined,
|
|
150
|
+
NetworkType: undefined,
|
|
151
|
+
ResourcePackageId: undefined,
|
|
152
|
+
ResourcePackageType: undefined,
|
|
153
|
+
ResourcePackageState: undefined,
|
|
154
|
+
PhysicalRegion: undefined,
|
|
155
|
+
ProxyStatus: undefined,
|
|
156
|
+
RwGroupId: undefined,
|
|
157
|
+
MasterZone: cluster.MasterZone,
|
|
158
|
+
SlaveZones: cluster.SlaveZones,
|
|
159
|
+
BusinessType: cluster.BusinessType,
|
|
160
|
+
IsFreeze: cluster.IsFreeze,
|
|
161
|
+
OrderSource: cluster.OrderSource,
|
|
162
|
+
Ability: cluster.Ability,
|
|
163
|
+
ResourceTags: cluster.ResourceTags,
|
|
164
|
+
CynosVersion: cluster.CynosVersion,
|
|
165
|
+
CynosVersionStatus: undefined,
|
|
166
|
+
IsLatestVersion: undefined,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
catch (error) {
|
|
170
|
+
logger_1.logger.error(`${lang_1.lang.__('TDSQL_CLUSTER_GET_FAILED')}: ${error}`);
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
updateCluster: async (clusterId, config) => {
|
|
175
|
+
const params = {
|
|
176
|
+
ClusterId: clusterId,
|
|
177
|
+
MinCpu: config.MinCpu,
|
|
178
|
+
MaxCpu: config.MaxCpu,
|
|
179
|
+
AutoPause: config.AutoPause ? 'yes' : 'no',
|
|
180
|
+
AutoPauseDelay: config.AutoPauseDelay,
|
|
181
|
+
};
|
|
182
|
+
try {
|
|
183
|
+
await cynosdbClient.ModifyServerlessStrategy(params);
|
|
184
|
+
logger_1.logger.info(lang_1.lang.__('TDSQL_CLUSTER_UPDATED', { clusterId }));
|
|
185
|
+
// Wait for update to complete
|
|
186
|
+
await waitForClusterReady(operations.getCluster, clusterId);
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
logger_1.logger.error(`${lang_1.lang.__('TDSQL_CLUSTER_UPDATE_FAILED')}: ${error}`);
|
|
190
|
+
throw error;
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
deleteCluster: async (clusterId) => {
|
|
194
|
+
const params = {
|
|
195
|
+
ClusterId: clusterId,
|
|
196
|
+
};
|
|
197
|
+
try {
|
|
198
|
+
await cynosdbClient.OfflineCluster(params);
|
|
199
|
+
logger_1.logger.info(lang_1.lang.__('TDSQL_CLUSTER_DELETION_INITIATED', { clusterId }));
|
|
200
|
+
// Wait for cluster to be deleted
|
|
201
|
+
await waitForClusterDeleted(operations.getCluster, clusterId);
|
|
202
|
+
}
|
|
203
|
+
catch (error) {
|
|
204
|
+
logger_1.logger.error(`${lang_1.lang.__('TDSQL_CLUSTER_DELETE_FAILED')}: ${error}`);
|
|
205
|
+
throw error;
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
return operations;
|
|
210
|
+
};
|
|
211
|
+
exports.createTdsqlcOperations = createTdsqlcOperations;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TencentEsSpaceStatus = exports.TdsqlcClusterStatus = void 0;
|
|
4
|
+
var TdsqlcClusterStatus;
|
|
5
|
+
(function (TdsqlcClusterStatus) {
|
|
6
|
+
TdsqlcClusterStatus["RUNNING"] = "running";
|
|
7
|
+
TdsqlcClusterStatus["ISOLATED"] = "isolated";
|
|
8
|
+
TdsqlcClusterStatus["OFFLINE"] = "offline";
|
|
9
|
+
})(TdsqlcClusterStatus || (exports.TdsqlcClusterStatus = TdsqlcClusterStatus = {}));
|
|
10
|
+
// Tencent ES Serverless types
|
|
11
|
+
var TencentEsSpaceStatus;
|
|
12
|
+
(function (TencentEsSpaceStatus) {
|
|
13
|
+
TencentEsSpaceStatus[TencentEsSpaceStatus["CREATING"] = 0] = "CREATING";
|
|
14
|
+
TencentEsSpaceStatus[TencentEsSpaceStatus["NORMAL"] = 1] = "NORMAL";
|
|
15
|
+
TencentEsSpaceStatus[TencentEsSpaceStatus["DELETING"] = 2] = "DELETING";
|
|
16
|
+
TencentEsSpaceStatus[TencentEsSpaceStatus["DELETED"] = 3] = "DELETED";
|
|
17
|
+
})(TencentEsSpaceStatus || (exports.TencentEsSpaceStatus = TencentEsSpaceStatus = {}));
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.en = void 0;
|
|
4
|
+
exports.en = {
|
|
5
|
+
// Validation messages
|
|
6
|
+
VALIDATING_YAML: 'Validating yaml...',
|
|
7
|
+
YAML_VALID: 'Yaml is valid! 🎉',
|
|
8
|
+
INVALID_YAML: 'Invalid yaml: {{errors}}',
|
|
9
|
+
LOG_COMMAND_INFO: 'log command info',
|
|
10
|
+
// Deploy messages
|
|
11
|
+
DEPLOYING_STACK: 'Deploying stack...',
|
|
12
|
+
STACK_DEPLOYED: 'Stack deployed! 🎉',
|
|
13
|
+
DEPLOYING_STACK_PUBLISHING_ASSETS: 'Deploying stack, publishing assets...',
|
|
14
|
+
ASSETS_PUBLISHED: 'Assets published! 🎉',
|
|
15
|
+
FAILED_TO_DEPLOY_STACK: 'Failed to deploy stack: {{error}}',
|
|
16
|
+
CLEANING_UP_TEMPORARY_ASSETS: 'Cleaning up temporary Assets...',
|
|
17
|
+
ASSETS_CLEANED_UP: 'Assets cleaned up!♻️',
|
|
18
|
+
FAILED_TO_CLEANUP_ASSETS: "Failed to cleanup assets, it won't affect the deployment result, but to avoid potential cost, you can delete the temporary bucket : {{bucketName}}, error details:{{error}}",
|
|
19
|
+
// Stack operations
|
|
20
|
+
CREATING_STACK_ID: 'Creating, Stack ID: {{stackId}}',
|
|
21
|
+
UPDATING_STACK_ID: 'Updating, Stack ID: {{stackId}}',
|
|
22
|
+
UPDATE_COMPLETELY_SAME_STACK: 'The stack is completely the same, update SKIPPED',
|
|
23
|
+
STACK_STATUS: 'stack status: {{status}}',
|
|
24
|
+
UPDATE_STACK_DEPLOYING: 'Update stack: {{stackName}} deploying... ',
|
|
25
|
+
STACK_UPDATE_SUCCESS: 'stackUpdate success! stackName:{{stackName}}, stackId:{{stackId}}',
|
|
26
|
+
CREATE_STACK_DEPLOYING: 'Create stack: {{stackName}} deploying... ',
|
|
27
|
+
CREATE_STACK_SUCCESS: 'createStack success! stackName:{{stackName}}, stackId:{{stackId}}',
|
|
28
|
+
STACK_NOT_EXISTS_SKIPPED: 'Stack: {{stackName}} not exists, skipped! 🚫',
|
|
29
|
+
STACK_DELETED: 'Stack: {{stackName}} deleted!🗑 ',
|
|
30
|
+
STACK_DELETE_FAILED: 'Stack: {{stackName}} delete failed! ❌, error: {{error}}',
|
|
31
|
+
DESTROYING_STACK: 'Destroying stack: {{stackName}}, provider: {{provider}}, region: {{region}}...',
|
|
32
|
+
// Asset messages
|
|
33
|
+
FOLDER_COMPRESSED_TO: 'Folder compressed to: {{zipPath}}',
|
|
34
|
+
FAILED_TO_COMPRESS_FOLDER: 'Failed to compress folder: {{error}}',
|
|
35
|
+
BUCKET_NOT_EXISTS_CREATING: 'Bucket: {{bucketName}} not exists, creating...',
|
|
36
|
+
NO_ASSETS_TO_PUBLISH: 'No assets to publish, skipped!',
|
|
37
|
+
UPLOAD_FILE_SUCCESS: 'Upload file: {{source}} to bucket: {{bucketName}} successfully!',
|
|
38
|
+
NO_ASSETS_TO_CLEANUP: 'No assets to cleanup, skipped!',
|
|
39
|
+
CLEANUP_FILE_SUCCESS: 'Cleanup file: {{objectKey}} from bucket: {{bucketName}} successfully!',
|
|
40
|
+
CLEANUP_BUCKET_SUCCESS: 'Cleanup bucket: {{bucketName}} successfully!',
|
|
41
|
+
// Variable warnings
|
|
42
|
+
VARIABLE_NOT_FOUND: "Variable '{{key}}' not found in vars or parameters, using empty string",
|
|
43
|
+
STAGE_VARIABLE_NOT_FOUND: "Stage variable '{{key}}' not found in stage '{{stage}}', using empty string",
|
|
44
|
+
// Local server messages
|
|
45
|
+
LOCAL_SERVER_ALREADY_RUNNING: 'localServer already running on http://localhost:{{port}}',
|
|
46
|
+
LOCAL_SERVER_LISTENING: 'Local Server listening on http://localhost:{{port}}',
|
|
47
|
+
LOCAL_SERVER_NOT_RUNNING: 'localServer is not running',
|
|
48
|
+
LOCAL_SERVER_STOPPED: 'localServer stopped',
|
|
49
|
+
LOCAL_GATEWAY_ERROR: 'Local gateway error',
|
|
50
|
+
ERROR_STOPPING_LOCAL_SERVER: 'Error stopping localServer',
|
|
51
|
+
RUN_LOCAL_STARTING: 'run-local starting: stack={{stackName}} stage={{stage}} port={{port}} debug={{debug}} watch={{watch}}',
|
|
52
|
+
// Function execution
|
|
53
|
+
FUNCTION_REQUEST_RECEIVED: 'Function request received by local server -> {{method}} {{identifier}} ',
|
|
54
|
+
INVOKING_WORKER_WITH_EVENT_TYPE: 'Invoking worker with event type: {{eventType}} and context',
|
|
55
|
+
WORKER_CODE_DIR: 'Worker codeDir: {{codeDir}}, handler: {{handler}}',
|
|
56
|
+
FUNCTION_EXECUTION_RESULT: 'Function execution result: {{result}}',
|
|
57
|
+
FUNCTION_EXECUTION_ERROR: 'Function execution error: {{error}}',
|
|
58
|
+
INVOKING_FC_FUNCTION_WITH_ALIYUN_EVENT: 'Invoking FC function with Aliyun event format',
|
|
59
|
+
// Event trigger
|
|
60
|
+
EVENT_TRIGGER: 'Event trigger {{triggers}}, req method: {{method}}, req url{{url}}',
|
|
61
|
+
// Bucket operations
|
|
62
|
+
BUCKET_REQUEST_RECEIVED: 'Bucket request received by local server -> {{method}} {{identifier}} {{url}}',
|
|
63
|
+
ERROR_LISTING_DIRECTORY: 'Error listing directory: {{error}}',
|
|
64
|
+
ERROR_GETTING_ALL_FILES: 'Error getting all files: {{error}}',
|
|
65
|
+
ERROR_LISTING_BUCKET_FILES: 'Error listing bucket files: {{error}}',
|
|
66
|
+
ERROR_READING_FILE: 'Error reading file: {{error}}',
|
|
67
|
+
// Bootstrap messages
|
|
68
|
+
ERROR_GENERAL: 'Error: {{error}}',
|
|
69
|
+
FAILED_TO_SEND_ERROR_RESPONSE: 'Failed to send error response: {{error}}',
|
|
70
|
+
RESPONSE_SENT_SUCCESSFULLY: 'Response sent successfully',
|
|
71
|
+
ERROR_SENDING_RESPONSE: 'Error sending response: {{error}}',
|
|
72
|
+
// Command errors
|
|
73
|
+
COMMAND_FAILED: "Command '{{commandName}}' failed with error:\n{{error}}",
|
|
74
|
+
STACK_TRACE: 'Stack trace:\n{{stack}}',
|
|
75
|
+
// Debug/Test messages
|
|
76
|
+
RESULT: 'result: {{result}}',
|
|
77
|
+
// Function runner
|
|
78
|
+
FUNCTION_LOG_FORMAT: '{{timestamp}} {{requestId}} [{{level}}] {{message}}',
|
|
79
|
+
// Plan command messages
|
|
80
|
+
PLAN_COMMAND_TENCENT_ONLY: 'Plan command is currently only supported for Tencent provider',
|
|
81
|
+
GENERATING_PLAN_FOR_SCF: 'Generating plan for Tencent SCF resources...',
|
|
82
|
+
DEPLOYMENT_PLAN: 'DEPLOYMENT PLAN',
|
|
83
|
+
NO_CHANGES_INFRASTRUCTURE_UP_TO_DATE: 'No changes. Infrastructure is up-to-date.',
|
|
84
|
+
CREATE: 'CREATE',
|
|
85
|
+
UPDATE: 'UPDATE',
|
|
86
|
+
DELETE: 'DELETE',
|
|
87
|
+
NO_CHANGE: 'NO CHANGE',
|
|
88
|
+
RESOURCES_TO_BE_CREATED: 'Resources to be created',
|
|
89
|
+
RESOURCES_TO_BE_UPDATED: 'Resources to be updated',
|
|
90
|
+
RESOURCES_TO_BE_DELETED: 'Resources to be deleted',
|
|
91
|
+
RESOURCES_UNCHANGED: 'Resources unchanged',
|
|
92
|
+
DRIFTED: 'DRIFTED',
|
|
93
|
+
REMOTE_CONFIG_DIFFERS: 'Remote configuration differs from state',
|
|
94
|
+
CHANGES: 'Changes',
|
|
95
|
+
PLAN: 'Plan',
|
|
96
|
+
TO_CREATE: 'to create',
|
|
97
|
+
TO_UPDATE: 'to update',
|
|
98
|
+
TO_DELETE: 'to delete',
|
|
99
|
+
UNCHANGED: 'unchanged',
|
|
100
|
+
ACTIONS: 'action(s)',
|
|
101
|
+
GENERATING_PLAN: 'Generating deployment plan...',
|
|
102
|
+
PLAN_GENERATED: 'Plan generated with',
|
|
103
|
+
EXECUTING_PLAN: 'Executing deployment plan...',
|
|
104
|
+
// TDSQL-C database messages
|
|
105
|
+
TDSQL_CLUSTER_CREATION_INITIATED: 'TDSQL-C cluster creation initiated',
|
|
106
|
+
TDSQL_CLUSTER_CREATION_FAILED: 'Failed to create TDSQL-C cluster',
|
|
107
|
+
TDSQL_CLUSTER_NO_ID_RETURNED: 'Failed to create TDSQL-C cluster: No cluster ID returned',
|
|
108
|
+
TDSQL_CLUSTER_READY: 'TDSQL-C cluster is ready: {{clusterId}}',
|
|
109
|
+
TDSQL_CLUSTER_ERROR_STATE: 'TDSQL-C cluster is in error state: {{status}}',
|
|
110
|
+
TDSQL_CLUSTER_WAITING: 'Waiting for TDSQL-C cluster to be ready: {{clusterId}} (status: {{status}})',
|
|
111
|
+
TDSQL_CLUSTER_TIMEOUT_READY: 'Timeout waiting for TDSQL-C cluster to be ready: {{clusterId}}',
|
|
112
|
+
TDSQL_CLUSTER_NOT_FOUND: 'TDSQL-C cluster not found: {{clusterId}}',
|
|
113
|
+
TDSQL_CLUSTER_GET_FAILED: 'Failed to get TDSQL-C cluster',
|
|
114
|
+
TDSQL_CLUSTER_UPDATED: 'TDSQL-C cluster updated: {{clusterId}}',
|
|
115
|
+
TDSQL_CLUSTER_UPDATE_FAILED: 'Failed to update TDSQL-C cluster',
|
|
116
|
+
TDSQL_CLUSTER_DELETION_INITIATED: 'TDSQL-C cluster deletion initiated: {{clusterId}}',
|
|
117
|
+
TDSQL_CLUSTER_DELETED: 'TDSQL-C cluster deleted: {{clusterId}}',
|
|
118
|
+
TDSQL_CLUSTER_DELETE_FAILED: 'Failed to delete TDSQL-C cluster',
|
|
119
|
+
TDSQL_CLUSTER_BEING_DELETED: 'TDSQL-C cluster is being deleted: {{clusterId}}',
|
|
120
|
+
TDSQL_CLUSTER_WAITING_DELETE: 'Waiting for TDSQL-C cluster to be deleted: {{clusterId}} (status: {{status}})',
|
|
121
|
+
TDSQL_CLUSTER_TIMEOUT_DELETE: 'Timeout waiting for TDSQL-C cluster to be deleted: {{clusterId}}',
|
|
122
|
+
// RDS database messages
|
|
123
|
+
RDS_INSTANCE_CREATION_INITIATED: 'RDS instance creation initiated',
|
|
124
|
+
RDS_INSTANCE_CREATION_FAILED: 'Failed to create RDS instance: {{error}}',
|
|
125
|
+
RDS_INSTANCE_NO_ID_RETURNED: 'Failed to create RDS instance: No instance ID returned',
|
|
126
|
+
RDS_INSTANCE_READY: 'RDS instance is ready: {{instanceId}}',
|
|
127
|
+
RDS_INSTANCE_ERROR_STATE: 'RDS instance is in error state: {{status}}',
|
|
128
|
+
RDS_INSTANCE_WAITING: 'Waiting for RDS instance to be ready: {{instanceId}} (status: {{status}})',
|
|
129
|
+
RDS_INSTANCE_TIMEOUT_READY: 'Timeout waiting for RDS instance to be ready: {{instanceId}}',
|
|
130
|
+
RDS_INSTANCE_NOT_FOUND: 'RDS instance not found: {{instanceId}}',
|
|
131
|
+
RDS_INSTANCE_GET_FAILED: 'Failed to get RDS instance: {{error}}',
|
|
132
|
+
RDS_INSTANCE_UPDATED: 'RDS instance updated: {{instanceId}}',
|
|
133
|
+
RDS_INSTANCE_UPDATE_FAILED: 'Failed to update RDS instance: {{error}}',
|
|
134
|
+
RDS_INSTANCE_DELETION_INITIATED: 'RDS instance deletion initiated: {{instanceId}}',
|
|
135
|
+
RDS_INSTANCE_DELETED: 'RDS instance deleted: {{instanceId}}',
|
|
136
|
+
RDS_INSTANCE_DELETE_FAILED: 'Failed to delete RDS instance: {{error}}',
|
|
137
|
+
RDS_INSTANCE_WAITING_DELETE: 'Waiting for RDS instance to be deleted: {{instanceId}}',
|
|
138
|
+
RDS_INSTANCE_TIMEOUT_DELETE: 'Timeout waiting for RDS instance to be deleted: {{instanceId}}',
|
|
139
|
+
// Elasticsearch Serverless messages
|
|
140
|
+
ES_APP_CREATION_INITIATED: 'Elasticsearch serverless app creation initiated',
|
|
141
|
+
ES_APP_CREATION_FAILED: 'Failed to create Elasticsearch serverless app: {{error}}',
|
|
142
|
+
ES_APP_NO_ID_RETURNED: 'Failed to create Elasticsearch serverless app: No app ID returned',
|
|
143
|
+
ES_APP_READY: 'Elasticsearch serverless app is ready: {{appId}}',
|
|
144
|
+
ES_APP_ERROR_STATE: 'Elasticsearch serverless app is in error state: {{status}}',
|
|
145
|
+
ES_APP_WAITING: 'Waiting for Elasticsearch serverless app to be ready: {{appId}} (status: {{status}})',
|
|
146
|
+
ES_APP_TIMEOUT_READY: 'Timeout waiting for Elasticsearch serverless app to be ready: {{appId}}',
|
|
147
|
+
ES_APP_NOT_FOUND: 'Elasticsearch serverless app not found: {{appId}}',
|
|
148
|
+
ES_APP_GET_FAILED: 'Failed to get Elasticsearch serverless app: {{error}}',
|
|
149
|
+
ES_APP_UPDATED: 'Elasticsearch serverless app updated: {{appName}}',
|
|
150
|
+
ES_APP_UPDATE_FAILED: 'Failed to update Elasticsearch serverless app: {{error}}',
|
|
151
|
+
ES_APP_DELETION_INITIATED: 'Elasticsearch serverless app deletion initiated: {{appName}}',
|
|
152
|
+
ES_APP_DELETED: 'Elasticsearch serverless app deleted: {{appName}}',
|
|
153
|
+
ES_APP_DELETE_FAILED: 'Failed to delete Elasticsearch serverless app: {{error}}',
|
|
154
|
+
ES_APP_WAITING_DELETE: 'Waiting for Elasticsearch serverless app to be deleted: {{appName}}',
|
|
155
|
+
ES_APP_TIMEOUT_DELETE: 'Timeout waiting for Elasticsearch serverless app to be deleted: {{appName}}',
|
|
156
|
+
// Tencent Elasticsearch Serverless messages
|
|
157
|
+
TENCENT_ES_SPACE_CREATION_INITIATED: 'Tencent ES serverless space creation initiated',
|
|
158
|
+
TENCENT_ES_SPACE_CREATION_FAILED: 'Failed to create Tencent ES serverless space: {{error}}',
|
|
159
|
+
TENCENT_ES_SPACE_NO_ID_RETURNED: 'Failed to create Tencent ES serverless space: No space ID returned',
|
|
160
|
+
TENCENT_ES_SPACE_READY: 'Tencent ES serverless space is ready: {{spaceId}}',
|
|
161
|
+
TENCENT_ES_SPACE_ERROR_STATE: 'Tencent ES serverless space is in error state: {{status}}',
|
|
162
|
+
TENCENT_ES_SPACE_WAITING: 'Waiting for Tencent ES serverless space to be ready: {{spaceId}} (status: {{status}})',
|
|
163
|
+
TENCENT_ES_SPACE_TIMEOUT_READY: 'Timeout waiting for Tencent ES serverless space to be ready: {{spaceId}}',
|
|
164
|
+
TENCENT_ES_SPACE_NOT_FOUND: 'Tencent ES serverless space not found: {{spaceId}}',
|
|
165
|
+
TENCENT_ES_SPACE_GET_FAILED: 'Failed to get Tencent ES serverless space: {{error}}',
|
|
166
|
+
TENCENT_ES_SPACE_UPDATED: 'Tencent ES serverless space updated: {{spaceId}}',
|
|
167
|
+
TENCENT_ES_SPACE_UPDATE_FAILED: 'Failed to update Tencent ES serverless space: {{error}}',
|
|
168
|
+
TENCENT_ES_SPACE_DELETION_INITIATED: 'Tencent ES serverless space deletion initiated: {{spaceId}}',
|
|
169
|
+
TENCENT_ES_SPACE_DELETED: 'Tencent ES serverless space deleted: {{spaceId}}',
|
|
170
|
+
TENCENT_ES_SPACE_DELETE_FAILED: 'Failed to delete Tencent ES serverless space: {{error}}',
|
|
171
|
+
TENCENT_ES_SPACE_WAITING_DELETE: 'Waiting for Tencent ES serverless space to be deleted: {{spaceId}}',
|
|
172
|
+
TENCENT_ES_SPACE_TIMEOUT_DELETE: 'Timeout waiting for Tencent ES serverless space to be deleted: {{spaceId}}',
|
|
173
|
+
// Partial failure messages
|
|
174
|
+
PARTIAL_DEPLOYMENT_FAILURE: '⚠️ PARTIAL DEPLOYMENT FAILURE: {{successCount}} resource(s) succeeded, but {{failedResource}} failed.',
|
|
175
|
+
PARTIAL_FAILURE_STATE_SAVED: 'State has been saved for successfully deployed resources. Run deploy again to retry failed resources.',
|
|
176
|
+
PARTIAL_FAILURE_NEXT_STEPS: 'Next steps: 1) Review the error above, 2) Fix any configuration issues, 3) Run deploy again to continue.',
|
|
177
|
+
FAILED_TO_EXECUTE_ACTION: 'Failed to execute {{action}} for {{logicalId}}: {{error}}',
|
|
178
|
+
STATE_PERSISTED_AFTER_OPERATION: 'State persisted after {{action}} of {{resourceId}}',
|
|
179
|
+
// Lock messages
|
|
180
|
+
ACQUIRING_LOCK: 'Acquiring state lock...',
|
|
181
|
+
LOCK_ACQUIRED: 'Lock acquired',
|
|
182
|
+
LOCK_RELEASED: '✓ Lock released',
|
|
183
|
+
FAILED_TO_RELEASE_LOCK: 'Failed to release lock',
|
|
184
|
+
NO_LOCK_FOUND: 'No lock found',
|
|
185
|
+
LOCK_ID_MISMATCH: 'Lock ID mismatch. Current lock ID is {{actualId}}, but you provided {{providedId}}',
|
|
186
|
+
CURRENT_LOCK_INFO: 'Current lock information:',
|
|
187
|
+
FORCE_UNLOCK_WARNING: '\n⚠️ WARNING: Force unlocking can cause state corruption if another\noperation is still running!',
|
|
188
|
+
FORCE_UNLOCK_CONFIRM: 'Are you absolutely sure? (yes/no): ',
|
|
189
|
+
FORCE_UNLOCK_CANCELLED: 'Force unlock cancelled',
|
|
190
|
+
PLAN_COMMAND_NOT_SUPPORTED: 'Plan command is not supported for this provider',
|
|
191
|
+
// Lock info formatting
|
|
192
|
+
LOCK_INFO_HEADER: 'Lock Info:',
|
|
193
|
+
LOCK_INFO_ID: ' ID: {{id}}',
|
|
194
|
+
LOCK_INFO_HELD_BY: ' Held by: {{user}}',
|
|
195
|
+
LOCK_INFO_PROCESS: ' Process: si {{operation}} (PID {{processId}})',
|
|
196
|
+
LOCK_INFO_HOST: ' Host: {{hostname}}',
|
|
197
|
+
LOCK_INFO_ACQUIRED: ' Acquired: {{acquiredAt}} ({{timeAgo}})',
|
|
198
|
+
LOCK_INFO_OPERATION: ' Operation: {{operation}}',
|
|
199
|
+
LOCK_TIME_AGO_LESS_THAN_MINUTE: 'less than a minute ago',
|
|
200
|
+
LOCK_TIME_AGO_ONE_MINUTE: '1 minute ago',
|
|
201
|
+
LOCK_TIME_AGO_MINUTES: '{{minutes}} minutes ago',
|
|
202
|
+
LOCK_TIME_AGO_ONE_HOUR: '1 hour ago',
|
|
203
|
+
LOCK_TIME_AGO_HOURS: '{{hours}} hours ago',
|
|
204
|
+
// API Gateway messages
|
|
205
|
+
APIGW_GROUP_FOUND_REUSING: 'Found existing API Group: {{groupName}}, will reuse it',
|
|
206
|
+
APIGW_DOMAIN_BINDING_FAILED: 'Failed to bind custom domain: {{error}}',
|
|
207
|
+
APIGW_GROUP_APIS_CREATED_DOMAIN_FAILED: 'API Gateway group and APIs created successfully, but domain binding failed',
|
|
208
|
+
APIGW_STATE_SAVED_RETRY: 'State has been saved. You can fix domain verification and retry deployment',
|
|
209
|
+
APIGW_DOMAIN_VERIFICATION_REQUIRED: 'Domain {{domainName}} requires ownership verification. Add DNS records as instructed above.',
|
|
210
|
+
APIGW_DNS_RECORD_ADDED: 'DNS verification record added successfully: Record={{record}}, Type={{type}}, Value={{value}}',
|
|
211
|
+
APIGW_DNS_PROPAGATION_WAITING: 'Waiting for DNS propagation...',
|
|
212
|
+
APIGW_DNS_PROPAGATION_CHECK: 'Checking DNS propagation (attempt {{attempt}}/{{max}}, waiting 1 minute)...',
|
|
213
|
+
APIGW_DNS_VERIFIED: 'DNS record verified successfully after {{minutes}} minute(s)',
|
|
214
|
+
APIGW_DNS_CHECK_FAILED: 'DNS check attempt {{attempt}} failed: {{error}}',
|
|
215
|
+
APIGW_DNS_PROPAGATION_TIMEOUT: 'DNS record added but propagation could not be verified after 10 minutes. Proceeding anyway...',
|
|
216
|
+
APIGW_DNS_VERIFICATION_FAILED: 'Failed to add DNS verification record for {{domain}}: {{error}}',
|
|
217
|
+
APIGW_DNS_CHECKING_STATUS: 'Checking DNS record status...',
|
|
218
|
+
APIGW_DNS_RECORD_EXISTS_POLLING: 'DNS verification record exists (created {{minutes}} minutes ago), waiting for propagation...',
|
|
219
|
+
APIGW_DNS_RECORD_EXISTS_CHECKING: 'DNS verification record exists (created {{minutes}} minutes ago), checking status...',
|
|
220
|
+
APIGW_DNS_RECORD_ACTIVE: 'DNS record is active and verified',
|
|
221
|
+
APIGW_DNS_RECORD_MAY_NOT_PROPAGATED: 'DNS record exists but may not be fully propagated yet',
|
|
222
|
+
APIGW_DNS_ADDING_RECORD: 'Adding DNS verification record for domain: {{domain}}',
|
|
223
|
+
APIGW_DNS_RECORD_ALREADY_EXISTS: 'DNS verification record already exists for {{domain}}',
|
|
224
|
+
APIGW_BINDING_DOMAIN: 'Binding custom domain: {{domain}}',
|
|
225
|
+
APIGW_DOMAIN_BOUND_SUCCESS: 'Successfully bound domain: {{domain}}',
|
|
226
|
+
APIGW_DOMAIN_OWNERSHIP_FAILED: 'Domain ownership verification failed for: {{domain}}',
|
|
227
|
+
APIGW_ATTEMPTING_AUTO_VERIFICATION: 'Attempting automatic DNS verification with token: {{token}}',
|
|
228
|
+
APIGW_RETRYING_DOMAIN_BINDING: 'Retrying domain binding after DNS verification...',
|
|
229
|
+
APIGW_DOMAIN_BOUND_AFTER_VERIFICATION: 'Successfully bound domain after verification: {{domain}}',
|
|
230
|
+
APIGW_AUTO_VERIFICATION_FAILED: 'Automatic verification failed: {{error}}',
|
|
231
|
+
APIGW_NO_VERIFICATION_TOKEN: 'Could not extract verification token from error response',
|
|
232
|
+
APIGW_MANUAL_VERIFICATION_REQUIRED: 'Please manually verify domain ownership in Aliyun console',
|
|
233
|
+
APIGW_VERIFICATION_HEADER: 'Domain Ownership Verification Required',
|
|
234
|
+
APIGW_VERIFICATION_DOMAIN: 'Domain: {{domain}}',
|
|
235
|
+
APIGW_VERIFICATION_INSTRUCTIONS: 'To verify domain ownership, add ONE of the following DNS records:',
|
|
236
|
+
APIGW_VERIFICATION_OPTION1: 'Option 1: CNAME Verification',
|
|
237
|
+
APIGW_VERIFICATION_OPTION2: 'Option 2: TXT Verification (Recommended)',
|
|
238
|
+
APIGW_VERIFICATION_RECORD_NAME: ' Record Name: {{name}}',
|
|
239
|
+
APIGW_VERIFICATION_RECORD_TYPE: ' Record Type: {{type}}',
|
|
240
|
+
APIGW_VERIFICATION_RECORD_VALUE: ' Record Value: {{value}}',
|
|
241
|
+
APIGW_VERIFICATION_NEXT_STEPS: 'After adding the DNS record:',
|
|
242
|
+
APIGW_VERIFICATION_STEP1: '1. Wait 5-10 minutes for DNS propagation',
|
|
243
|
+
APIGW_VERIFICATION_STEP2: '2. Run the deploy command again',
|
|
244
|
+
// Function resource messages
|
|
245
|
+
FC3_DEPENDENT_RESOURCES_TRACKED: 'Dependent resources (SLS, RAM, Security Group, NAS) are tracked in state',
|
|
246
|
+
FC3_CAN_RETRY_DEPLOYMENT: 'You can retry deployment - the system will reuse existing dependent resources',
|
|
247
|
+
// Bucket resource messages
|
|
248
|
+
OSS_BUCKET_TRACKED_CAN_RETRY: 'Bucket is tracked in state, you can retry deployment to upload files',
|
|
249
|
+
// Dependency graph messages
|
|
250
|
+
DEPENDENCY_GRAPH_GENERATED: 'Dependency graph generated',
|
|
251
|
+
EXECUTION_ORDER: 'Execution order',
|
|
252
|
+
DOT_GRAPH_OUTPUT: 'DOT graph output',
|
|
253
|
+
CYCLE_DETECTED: 'Circular dependency detected',
|
|
254
|
+
};
|
package/dist/src/lang/index.js
CHANGED
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.lang = void 0;
|
|
4
|
+
const child_process_1 = require("child_process");
|
|
4
5
|
const i18n_1 = require("i18n");
|
|
6
|
+
const en_1 = require("./en");
|
|
7
|
+
const zh_CN_1 = require("./zh-CN");
|
|
8
|
+
const getSystemLanguage = (defaultLang) => {
|
|
9
|
+
const langMatch = (process.env.LANG || process.env.LC_ALL || '').match(/([a-z]{2})[-_]?([A-Z]{2})?/);
|
|
10
|
+
if (langMatch) {
|
|
11
|
+
return langMatch[0].replace('_', '-');
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
const codePageOutput = (0, child_process_1.execSync)('chcp').toString();
|
|
15
|
+
const codePageMatch = codePageOutput.match(/(\d+)\s*$/m);
|
|
16
|
+
if (codePageMatch) {
|
|
17
|
+
const codePage = parseInt(codePageMatch[1]);
|
|
18
|
+
return codePage === 936 ? 'zh-CN' : 'en-US';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
// ignore
|
|
23
|
+
}
|
|
24
|
+
return defaultLang;
|
|
25
|
+
};
|
|
5
26
|
const lang = new i18n_1.I18n({
|
|
6
|
-
locales: ['en', '
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
],
|
|
27
|
+
locales: ['en-US', 'zh-CN'],
|
|
28
|
+
defaultLocale: getSystemLanguage('zh-CN'),
|
|
29
|
+
staticCatalog: {
|
|
30
|
+
'en-US': en_1.en,
|
|
31
|
+
'zh-CN': zh_CN_1.zhCN,
|
|
32
|
+
},
|
|
33
|
+
objectNotation: true,
|
|
14
34
|
});
|
|
15
35
|
exports.lang = lang;
|