@geek-fun/serverlessinsight 0.9.2 → 0.9.3
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/.serverlessinsight/state-cdn-flow-app-cdn-flow-service.json.backup +1 -1
- package/.serverlessinsight/state-iam-test-app-iam-test-service.json.backup +2 -2
- package/.serverlessinsight/state-insight-poc-app-insight-poc-tencent.json.backup +4 -8
- package/.serverlessinsight/state-insight-poc-app-log-insight-poc-tencent-log.json.backup +3 -8
- package/.serverlessinsight/state-insight-poc-deploy-app-insight-poc-deploy.json.backup +4 -4
- package/.serverlessinsight/state-insight-poc-destroy-app-insight-poc-destroy.json.backup +1 -1
- package/.serverlessinsight/state-insight-poc-timer-app-insight-poc-timer.json.backup +28 -5
- package/.serverlessinsight/state-insight-volc-app-insight-volc.json.backup +2 -2
- package/.serverlessinsight/state-insight-volc-nested-app-insight-volc-nested.json.backup +3 -3
- package/.serverlessinsight/state-nested-drift-app-nested-drift-service.json.backup +20 -5
- package/.serverlessinsight/state-role-reconcile-test-app-role-reconcile-test-service.json.backup +3 -3
- package/AGENTS.md +10 -0
- package/CHANGELOG.md +34 -0
- package/README.md +29 -15
- package/README.zh-CN.md +7 -14
- package/dist/package.json +1 -1
- package/dist/src/commands/index.js +19 -3
- package/dist/src/commands/local.js +16 -3
- package/dist/src/commands/plan.js +10 -3
- package/dist/src/common/aliyunClient/apigwOperations.js +17 -1
- package/dist/src/common/aliyunClient/fc3Operations.js +7 -1
- package/dist/src/common/aliyunClient/ossOperations.js +214 -221
- package/dist/src/common/bucketPolicy.js +63 -0
- package/dist/src/common/domainUtils.js +4 -1
- package/dist/src/common/functionDefinition.js +25 -0
- package/dist/src/common/index.js +4 -0
- package/dist/src/common/jsonOutput.js +6 -1
- package/dist/src/common/nameBuilder.js +3 -1
- package/dist/src/common/planCapabilities.js +119 -0
- package/dist/src/common/planCompare.js +119 -66
- package/dist/src/common/planFormatter.js +22 -14
- package/dist/src/common/planRedaction.js +26 -0
- package/dist/src/common/refreshPlanner.js +66 -21
- package/dist/src/common/tencentClient/cosOperations.js +326 -322
- package/dist/src/common/tencentClient/scfOperations.js +9 -2
- package/dist/src/common/tencentClient/tdsqlcOperations.js +6 -11
- package/dist/src/common/triggerMapper.js +16 -1
- package/dist/src/common/volcengineClient/apigwOperations.js +82 -0
- package/dist/src/common/volcengineClient/iamOperations.js +27 -3
- package/dist/src/common/volcengineClient/tosOperations.js +62 -56
- package/dist/src/lang/en.js +28 -4
- package/dist/src/lang/zh-CN.js +28 -4
- package/dist/src/parser/eventParser.js +1 -0
- package/dist/src/parser/functionParser.js +1 -1
- package/dist/src/stack/aliyunStack/apigwExecutor.js +1 -1
- package/dist/src/stack/aliyunStack/apigwPlanner.js +103 -23
- package/dist/src/stack/aliyunStack/apigwResource.js +4 -3
- package/dist/src/stack/aliyunStack/apigwTypes.js +3 -7
- package/dist/src/stack/aliyunStack/deployer.js +2 -0
- package/dist/src/stack/aliyunStack/esServerlessTypes.js +8 -4
- package/dist/src/stack/aliyunStack/fc3Executor.js +7 -3
- package/dist/src/stack/aliyunStack/fc3Planner.js +124 -155
- package/dist/src/stack/aliyunStack/fc3Resource.js +48 -52
- package/dist/src/stack/aliyunStack/fc3Types.js +30 -16
- package/dist/src/stack/aliyunStack/ossPlanner.js +15 -1
- package/dist/src/stack/aliyunStack/ossResource.js +113 -102
- package/dist/src/stack/aliyunStack/ossTypes.js +20 -20
- package/dist/src/stack/localStack/aliyunFc.js +1 -6
- package/dist/src/stack/localStack/event.js +31 -60
- package/dist/src/stack/localStack/function.js +24 -65
- package/dist/src/stack/localStack/functionRunner.js +10 -2
- package/dist/src/stack/localStack/httpAdapter.js +54 -0
- package/dist/src/stack/localStack/httpError.js +5 -0
- package/dist/src/stack/localStack/legacyLambda.js +26 -0
- package/dist/src/stack/localStack/localContext.js +29 -0
- package/dist/src/stack/localStack/localRoute.js +12 -0
- package/dist/src/stack/localStack/localRuntimes.js +22 -0
- package/dist/src/stack/localStack/localServer.js +8 -3
- package/dist/src/stack/localStack/requestBody.js +24 -0
- package/dist/src/stack/localStack/requestId.js +18 -0
- package/dist/src/stack/localStack/tencent.js +147 -0
- package/dist/src/stack/localStack/timer.js +23 -2
- package/dist/src/stack/localStack/volcengine.js +68 -0
- package/dist/src/stack/scfStack/cosPlanner.js +9 -14
- package/dist/src/stack/scfStack/cosResource.js +42 -50
- package/dist/src/stack/scfStack/cosTypes.js +19 -14
- package/dist/src/stack/scfStack/deployer.js +2 -0
- package/dist/src/stack/scfStack/scfExecutor.js +7 -3
- package/dist/src/stack/scfStack/scfHttpTrigger.js +106 -0
- package/dist/src/stack/scfStack/scfPlanner.js +67 -16
- package/dist/src/stack/scfStack/scfResource.js +170 -321
- package/dist/src/stack/scfStack/scfTypes.js +4 -3
- package/dist/src/stack/scfStack/tdsqlcPlanner.js +10 -13
- package/dist/src/stack/volcengineStack/apigwDomains.js +64 -0
- package/dist/src/stack/volcengineStack/apigwPlanner.js +71 -15
- package/dist/src/stack/volcengineStack/apigwResource.js +60 -24
- package/dist/src/stack/volcengineStack/apigwTypes.js +5 -1
- package/dist/src/stack/volcengineStack/deployer.js +6 -0
- package/dist/src/stack/volcengineStack/tosPlanner.js +8 -13
- package/dist/src/stack/volcengineStack/tosResource.js +22 -35
- package/dist/src/stack/volcengineStack/tosTypes.js +5 -8
- package/dist/src/stack/volcengineStack/vefaasPlanner.js +142 -49
- package/dist/src/stack/volcengineStack/vefaasResource.js +17 -12
- package/dist/src/stack/volcengineStack/vefaasTypes.js +6 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/release-notes.md +79 -0
- package/samples/tencent-local/index.js +13 -0
- package/samples/tencent-local/serverlessinsight.yml +23 -0
- package/samples/volcengine-local/index.js +13 -0
- package/samples/volcengine-local/serverlessinsight.yml +28 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildTosInstanceFromProvider = exports.cloudTosToDefinition = exports.extractTosBucketDefinition = exports.bucketToTosConfig = void 0;
|
|
3
|
+
exports.buildTosInstanceFromProvider = exports.cloudTosToDefinition = exports.extractTosBucketDefinition = exports.bucketToTosConfig = exports.TOS_BUCKET_POLICY_INSTANCE_TYPE = void 0;
|
|
4
|
+
const bucketPolicy_1 = require("../../common/bucketPolicy");
|
|
4
5
|
const aclMap = {
|
|
5
6
|
PRIVATE: 'private',
|
|
6
7
|
PUBLIC_READ: 'public-read',
|
|
7
8
|
PUBLIC_READ_WRITE: 'public-read-write',
|
|
8
9
|
};
|
|
10
|
+
exports.TOS_BUCKET_POLICY_INSTANCE_TYPE = 'VOLCENGINE_TOS_BUCKET_POLICY';
|
|
9
11
|
const bucketToTosConfig = (bucket) => {
|
|
10
12
|
const config = {
|
|
11
13
|
bucketName: bucket.name,
|
|
@@ -28,11 +30,6 @@ const bucketToTosConfig = (bucket) => {
|
|
|
28
30
|
return config;
|
|
29
31
|
};
|
|
30
32
|
exports.bucketToTosConfig = bucketToTosConfig;
|
|
31
|
-
const serializeBucketPolicy = (iam) => {
|
|
32
|
-
if (!iam?.resource?.statements || iam.resource.statements.length === 0)
|
|
33
|
-
return null;
|
|
34
|
-
return JSON.stringify(iam);
|
|
35
|
-
};
|
|
36
33
|
const extractTosBucketDefinition = (config, websiteCodeHash) => {
|
|
37
34
|
return {
|
|
38
35
|
bucketName: config.bucketName,
|
|
@@ -45,7 +42,7 @@ const extractTosBucketDefinition = (config, websiteCodeHash) => {
|
|
|
45
42
|
}
|
|
46
43
|
: null,
|
|
47
44
|
websiteCodeHash: websiteCodeHash ?? null,
|
|
48
|
-
policy: serializeBucketPolicy(config.iam),
|
|
45
|
+
policy: (0, bucketPolicy_1.serializeBucketPolicy)(config.iam, 'volcengine'),
|
|
49
46
|
};
|
|
50
47
|
};
|
|
51
48
|
exports.extractTosBucketDefinition = extractTosBucketDefinition;
|
|
@@ -63,7 +60,7 @@ const cloudTosToDefinition = (info) => ({
|
|
|
63
60
|
indexDocument: info.websiteConfig.indexDocument ?? null,
|
|
64
61
|
errorDocument: info.websiteConfig.errorDocument ?? null,
|
|
65
62
|
}
|
|
66
|
-
:
|
|
63
|
+
: info.websiteConfig,
|
|
67
64
|
});
|
|
68
65
|
exports.cloudTosToDefinition = cloudTosToDefinition;
|
|
69
66
|
const buildTosInstanceFromProvider = (info, sid) => {
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateFunctionPlan = void 0;
|
|
4
|
+
const iamOperations_1 = require("../../common/volcengineClient/iamOperations");
|
|
5
|
+
const planCapabilities_1 = require("../../common/planCapabilities");
|
|
6
|
+
const planCompare_1 = require("../../common/planCompare");
|
|
4
7
|
const common_1 = require("../../common");
|
|
5
8
|
const stateManager_1 = require("../../common/stateManager");
|
|
6
9
|
const volcengineClient_1 = require("../../common/volcengineClient");
|
|
7
10
|
const refreshCache_1 = require("../../common/refreshCache");
|
|
8
|
-
const
|
|
11
|
+
const planCompare_2 = require("../../common/planCompare");
|
|
9
12
|
const concurrency_1 = require("../../common/concurrency");
|
|
10
13
|
const siCron_1 = require("../../common/siCron");
|
|
11
14
|
const vefaasTypes_1 = require("./vefaasTypes");
|
|
@@ -21,6 +24,15 @@ const planFunctionDeletion = (logicalId, definition) => ({
|
|
|
21
24
|
resourceType: 'VOLCENGINE_VEFAAS',
|
|
22
25
|
changes: { before: definition },
|
|
23
26
|
});
|
|
27
|
+
// Timer triggers are state-owned dependents: when the timer declaration is
|
|
28
|
+
// omitted the recorded instances are removed, and the plan folds the removal
|
|
29
|
+
// into the "before" side so it is visible before execution.
|
|
30
|
+
const removedVefaasTimerItems = (fn, currentState) => !fn.triggers?.timer &&
|
|
31
|
+
(currentState.instances ?? []).some((instance) => instance.type === 'VOLCENGINE_VEFAAS_TIMER_TRIGGER')
|
|
32
|
+
? {
|
|
33
|
+
timers: currentState.definition.timers ?? [],
|
|
34
|
+
}
|
|
35
|
+
: {};
|
|
24
36
|
const generateFunctionPlan = async (context, state, functions) => {
|
|
25
37
|
if (!functions || functions.length === 0) {
|
|
26
38
|
const allStates = (0, stateManager_1.getAllResources)(state);
|
|
@@ -33,7 +45,25 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
33
45
|
const functionItems = await (0, concurrency_1.mapWithConcurrency)(functions, concurrency_1.PLAN_READ_CONCURRENCY, async (fn) => {
|
|
34
46
|
const logicalId = `functions.${fn.key}`;
|
|
35
47
|
const currentState = (0, common_1.getResource)(state, logicalId);
|
|
36
|
-
const
|
|
48
|
+
const recordedRole = currentState?.instances?.find((instance) => instance.type === 'VOLCENGINE_IAM_ROLE');
|
|
49
|
+
const config = (0, vefaasTypes_1.functionToVefaasConfig)(fn, {
|
|
50
|
+
role: typeof fn.iam?.role === 'string' ? fn.iam.role : recordedRole?.trn,
|
|
51
|
+
vpcConfig: fn.network
|
|
52
|
+
? {
|
|
53
|
+
vpcId: fn.network.vpc_id,
|
|
54
|
+
subnetIds: fn.network.subnet_ids,
|
|
55
|
+
securityGroupIds: fn.network.security_group?.name
|
|
56
|
+
? [fn.network.security_group.name]
|
|
57
|
+
: [],
|
|
58
|
+
}
|
|
59
|
+
: undefined,
|
|
60
|
+
tosMountConfig: fn.storage?.nas?.[0]
|
|
61
|
+
? {
|
|
62
|
+
bucketName: fn.storage.nas[0].bucket_name ?? '',
|
|
63
|
+
mountPath: fn.storage.nas[0].mount_path,
|
|
64
|
+
}
|
|
65
|
+
: undefined,
|
|
66
|
+
});
|
|
37
67
|
const codePath = fn.code.path;
|
|
38
68
|
const desiredCodeHash = await (0, common_1.computeZipContentHash)(codePath);
|
|
39
69
|
// Mirror the executor's auto-role behavior: when the YAML omits
|
|
@@ -81,8 +111,10 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
81
111
|
};
|
|
82
112
|
}
|
|
83
113
|
}
|
|
84
|
-
const baseDefinition = (0, vefaasTypes_1.extractVefaasDefinition)(config, desiredCodeHash);
|
|
114
|
+
const baseDefinition = (0, vefaasTypes_1.extractVefaasDefinition)(config, desiredCodeHash, fn);
|
|
85
115
|
const desiredDefinition = fn.iam ? { ...baseDefinition, iam: fn.iam } : baseDefinition;
|
|
116
|
+
if (currentState)
|
|
117
|
+
(0, planCapabilities_1.assertPlanIdentity)(logicalId, 'VOLCENGINE_VEFAAS', currentState.definition || {}, desiredDefinition);
|
|
86
118
|
if (!currentState || currentState.status === 'tainted') {
|
|
87
119
|
// No usable local state: probe the provider before planning create.
|
|
88
120
|
// If a same-named function already exists WITHOUT our ownership tag it
|
|
@@ -107,17 +139,25 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
107
139
|
try {
|
|
108
140
|
const client = (0, volcengineClient_1.createVolcengineClient)(context);
|
|
109
141
|
const currentDefinition = currentState.definition || {};
|
|
110
|
-
const definitionChanged =
|
|
142
|
+
const definitionChanged = (0, planCompare_1.definitionsDiffer)(currentDefinition, desiredDefinition);
|
|
143
|
+
const removedTimerItems = removedVefaasTimerItems(fn, currentState);
|
|
111
144
|
// --no-refresh: no live read, no drift claims — intent-diff only.
|
|
112
145
|
if (context.refresh === false) {
|
|
113
|
-
if (!definitionChanged) {
|
|
146
|
+
if (!definitionChanged && Object.keys(removedTimerItems).length === 0) {
|
|
114
147
|
return { logicalId, action: 'noop', resourceType: 'VOLCENGINE_VEFAAS' };
|
|
115
148
|
}
|
|
149
|
+
(0, planCapabilities_1.assertSupportedPlanUpdate)(logicalId, 'VOLCENGINE_VEFAAS', (0, planCompare_1.managedDefinition)(currentDefinition, desiredDefinition), desiredDefinition);
|
|
116
150
|
return {
|
|
117
151
|
logicalId,
|
|
118
152
|
action: 'update',
|
|
119
153
|
resourceType: 'VOLCENGINE_VEFAAS',
|
|
120
|
-
changes: {
|
|
154
|
+
changes: {
|
|
155
|
+
before: {
|
|
156
|
+
...(0, planCompare_1.managedDefinition)(currentDefinition, desiredDefinition),
|
|
157
|
+
...removedTimerItems,
|
|
158
|
+
},
|
|
159
|
+
after: (0, planCompare_1.managedDefinition)(desiredDefinition),
|
|
160
|
+
},
|
|
121
161
|
};
|
|
122
162
|
}
|
|
123
163
|
const remoteFunction = await (0, refreshCache_1.cachedRefreshRead)(context, `vefaas.getFunction:${fn.name}`, () => client.vefaas.getFunction(fn.name));
|
|
@@ -142,10 +182,6 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
142
182
|
// cloud-only values within mapped keys phantom-drifted every plan).
|
|
143
183
|
// Mapper-emitted shapes are subset-normalized to the definition the
|
|
144
184
|
// config writes, so nested comparisons stay apples-to-apples.
|
|
145
|
-
// Not refreshable (issue #234 phase 2): the IAM custom policy document
|
|
146
|
-
// (volcengine IAM has no GetPolicy read) and dependent TLS topics
|
|
147
|
-
// (existence-only by design decision 5) stay covered by the executor's
|
|
148
|
-
// reconcile path instead of live plan comparison.
|
|
149
185
|
const remoteAttributes = {
|
|
150
186
|
runtime: remoteFunction.runtime,
|
|
151
187
|
handler: remoteFunction.handler,
|
|
@@ -164,26 +200,19 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
164
200
|
securityGroupIds: remoteFunction.vpcConfig.securityGroupIds ?? [],
|
|
165
201
|
}
|
|
166
202
|
: undefined,
|
|
203
|
+
tosMountConfig: remoteFunction.tosMountConfig?.mountPoints?.[0]
|
|
204
|
+
? {
|
|
205
|
+
bucketName: remoteFunction.tosMountConfig.mountPoints[0].bucketName,
|
|
206
|
+
mountPath: remoteFunction.tosMountConfig.mountPoints[0].localMountPath,
|
|
207
|
+
}
|
|
208
|
+
: null,
|
|
167
209
|
logConfig: remoteFunction.logConfig
|
|
168
210
|
? { project: remoteFunction.logConfig.project, topic: remoteFunction.logConfig.topic }
|
|
169
211
|
: undefined,
|
|
170
212
|
};
|
|
171
|
-
const remoteDiffers = (0,
|
|
172
|
-
const liveBefore = (0,
|
|
173
|
-
const revertKeys = (0,
|
|
174
|
-
if (definitionChanged || remoteDiffers) {
|
|
175
|
-
return {
|
|
176
|
-
logicalId,
|
|
177
|
-
action: 'update',
|
|
178
|
-
resourceType: 'VOLCENGINE_VEFAAS',
|
|
179
|
-
changes: { before: liveBefore, after: desiredDefinition },
|
|
180
|
-
drifted: true,
|
|
181
|
-
...(revertKeys.length ? { revertKeys } : {}),
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
// Issue #234 phase 3: live role drift — trust policy and attached
|
|
185
|
-
// managed policies. The custom <role>-policy DOCUMENT has no read API
|
|
186
|
-
// (volcengine IAM has no GetPolicy), so it stays executor-reconciled.
|
|
213
|
+
const remoteDiffers = (0, planCompare_2.remoteDiffersFromDesired)(remoteAttributes, desiredDefinition);
|
|
214
|
+
const liveBefore = (0, planCompare_2.mergeLiveBefore)(currentDefinition, remoteAttributes, desiredDefinition);
|
|
215
|
+
const revertKeys = (0, planCompare_2.computeRevertKeys)(currentDefinition, remoteAttributes, desiredDefinition);
|
|
187
216
|
const iamRoleInstance = currentState.instances.find((i) => i.type === 'VOLCENGINE_IAM_ROLE');
|
|
188
217
|
if (iamRoleInstance?.id) {
|
|
189
218
|
try {
|
|
@@ -195,7 +224,8 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
195
224
|
logicalId,
|
|
196
225
|
action: 'update',
|
|
197
226
|
resourceType: 'VOLCENGINE_VEFAAS',
|
|
198
|
-
changes: { before: liveBefore, after: desiredDefinition },
|
|
227
|
+
changes: { before: liveBefore, after: (0, planCompare_1.managedDefinition)(desiredDefinition) },
|
|
228
|
+
...(revertKeys.length ? { revertKeys } : {}),
|
|
199
229
|
drifted: true,
|
|
200
230
|
driftReasons: ['PLAN_DRIFT_ROLE_MISSING'],
|
|
201
231
|
};
|
|
@@ -208,13 +238,34 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
208
238
|
cloudTrust = undefined;
|
|
209
239
|
}
|
|
210
240
|
if (cloudTrust &&
|
|
211
|
-
|
|
241
|
+
(0, planCompare_2.remoteDiffersFromDesired)({ policy: JSON.stringify(cloudTrust) }, { policy: JSON.stringify((0, vefaasTypes_1.buildDefaultTrustPolicy)(roleGrant.trustedServices)) })) {
|
|
212
242
|
return {
|
|
213
243
|
logicalId,
|
|
214
244
|
action: 'update',
|
|
215
245
|
resourceType: 'VOLCENGINE_VEFAAS',
|
|
216
|
-
changes: { before: liveBefore, after: desiredDefinition },
|
|
217
|
-
|
|
246
|
+
changes: { before: liveBefore, after: (0, planCompare_1.managedDefinition)(desiredDefinition) },
|
|
247
|
+
...(revertKeys.length ? { revertKeys } : {}),
|
|
248
|
+
...(!(0, planCompare_1.definitionsDiffer)(currentDefinition, {
|
|
249
|
+
iam: desiredDefinition.iam,
|
|
250
|
+
vpcConfig: desiredDefinition.vpcConfig,
|
|
251
|
+
tosMountConfig: desiredDefinition.tosMountConfig,
|
|
252
|
+
logConfig: desiredDefinition.logConfig,
|
|
253
|
+
})
|
|
254
|
+
? { drifted: true }
|
|
255
|
+
: {}),
|
|
256
|
+
driftReasons: ['PLAN_DRIFT_ROLE_POLICY'],
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
const policyName = (0, nameBuilder_1.buildRolePolicyName)(roleId);
|
|
260
|
+
const livePolicy = await (0, refreshCache_1.cachedRefreshRead)(context, `iam.getPolicy:${policyName}`, () => client.iam.getPolicy(policyName));
|
|
261
|
+
const desiredPolicy = (0, iamOperations_1.buildVefaasExecutionPolicy)(roleGrant.executionStatements, typeof fn.iam?.role === 'object' ? fn.iam.role.statements : undefined);
|
|
262
|
+
if ((0, planCompare_2.remoteDiffersFromDesired)({ policy: livePolicy }, { policy: desiredPolicy })) {
|
|
263
|
+
return {
|
|
264
|
+
logicalId,
|
|
265
|
+
action: 'update',
|
|
266
|
+
resourceType: 'VOLCENGINE_VEFAAS',
|
|
267
|
+
changes: { before: liveBefore, after: (0, planCompare_1.managedDefinition)(desiredDefinition) },
|
|
268
|
+
drifted: !(0, planCompare_1.definitionsDiffer)(currentDefinition, { iam: desiredDefinition.iam }),
|
|
218
269
|
driftReasons: ['PLAN_DRIFT_ROLE_POLICY'],
|
|
219
270
|
};
|
|
220
271
|
}
|
|
@@ -222,13 +273,25 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
222
273
|
const asSetKey = (names) => [...names].sort().join(',');
|
|
223
274
|
const cloudManaged = await (0, refreshCache_1.cachedRefreshRead)(context, `iam.listAttachedRolePolicies:${roleId}`, () => client.iam.listAttachedRolePolicies(roleId));
|
|
224
275
|
const desiredNames = asSetKey([...desiredManaged, (0, nameBuilder_1.buildRolePolicyName)(roleId)]);
|
|
225
|
-
if (
|
|
276
|
+
if (fn.iam?.role &&
|
|
277
|
+
typeof fn.iam.role !== 'string' &&
|
|
278
|
+
fn.iam.role.managed_policies !== undefined
|
|
279
|
+
? desiredNames !== asSetKey(cloudManaged ?? [])
|
|
280
|
+
: !(cloudManaged ?? []).includes((0, nameBuilder_1.buildRolePolicyName)(roleId))) {
|
|
226
281
|
return {
|
|
227
282
|
logicalId,
|
|
228
283
|
action: 'update',
|
|
229
284
|
resourceType: 'VOLCENGINE_VEFAAS',
|
|
230
|
-
changes: { before: liveBefore, after: desiredDefinition },
|
|
231
|
-
|
|
285
|
+
changes: { before: liveBefore, after: (0, planCompare_1.managedDefinition)(desiredDefinition) },
|
|
286
|
+
...(revertKeys.length ? { revertKeys } : {}),
|
|
287
|
+
...(!(0, planCompare_1.definitionsDiffer)(currentDefinition, {
|
|
288
|
+
iam: desiredDefinition.iam,
|
|
289
|
+
vpcConfig: desiredDefinition.vpcConfig,
|
|
290
|
+
tosMountConfig: desiredDefinition.tosMountConfig,
|
|
291
|
+
logConfig: desiredDefinition.logConfig,
|
|
292
|
+
})
|
|
293
|
+
? { drifted: true }
|
|
294
|
+
: {}),
|
|
232
295
|
driftReasons: ['PLAN_DRIFT_ROLE_POLICY'],
|
|
233
296
|
};
|
|
234
297
|
}
|
|
@@ -239,6 +302,7 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
239
302
|
functionName: fn.name,
|
|
240
303
|
error: String(error),
|
|
241
304
|
}));
|
|
305
|
+
throw error;
|
|
242
306
|
}
|
|
243
307
|
}
|
|
244
308
|
// Issue #234 M5: nested topic drift — ttl is the only ModifyTopic
|
|
@@ -256,7 +320,8 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
256
320
|
logicalId,
|
|
257
321
|
action: 'update',
|
|
258
322
|
resourceType: 'VOLCENGINE_VEFAAS',
|
|
259
|
-
changes: { before: liveBefore, after: desiredDefinition },
|
|
323
|
+
changes: { before: liveBefore, after: (0, planCompare_1.managedDefinition)(desiredDefinition) },
|
|
324
|
+
...(revertKeys.length ? { revertKeys } : {}),
|
|
260
325
|
drifted: true,
|
|
261
326
|
driftReasons: ['PLAN_DRIFT_TLS_TOPIC'],
|
|
262
327
|
};
|
|
@@ -268,6 +333,7 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
268
333
|
functionName: fn.name,
|
|
269
334
|
error: String(error),
|
|
270
335
|
}));
|
|
336
|
+
throw error;
|
|
271
337
|
}
|
|
272
338
|
}
|
|
273
339
|
}
|
|
@@ -275,10 +341,8 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
275
341
|
// against the desired timers (name-keyed). A trigger missing from the
|
|
276
342
|
// cloud (manual delete), an edited source config, or an extra
|
|
277
343
|
// undeclared timer all count as drift.
|
|
278
|
-
const timerStateInstances = currentState.instances.filter((i) => i.type === 'VOLCENGINE_VEFAAS_TIMER_TRIGGER');
|
|
279
344
|
const desiredTimers = fn.triggers?.timer ?? [];
|
|
280
|
-
if (
|
|
281
|
-
remoteFunction.functionId) {
|
|
345
|
+
if (fn.triggers?.timer !== undefined && remoteFunction.functionId) {
|
|
282
346
|
try {
|
|
283
347
|
const liveTriggers = await (0, refreshCache_1.cachedRefreshRead)(context, `vefaas.listTriggers:${remoteFunction.functionId}`, () => client.vefaas.listTriggers(remoteFunction.functionId));
|
|
284
348
|
const liveTimers = liveTriggers.filter((trigger) => trigger.sourceType?.toLowerCase() === 'timer');
|
|
@@ -306,8 +370,11 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
306
370
|
logicalId,
|
|
307
371
|
action: 'update',
|
|
308
372
|
resourceType: 'VOLCENGINE_VEFAAS',
|
|
309
|
-
changes: { before: liveBefore, after: desiredDefinition },
|
|
310
|
-
|
|
373
|
+
changes: { before: liveBefore, after: (0, planCompare_1.managedDefinition)(desiredDefinition) },
|
|
374
|
+
...(revertKeys.length ? { revertKeys } : {}),
|
|
375
|
+
...(!(0, planCompare_1.definitionsDiffer)(currentDefinition, { timers: desiredDefinition.timers })
|
|
376
|
+
? { drifted: true }
|
|
377
|
+
: {}),
|
|
311
378
|
driftReasons: ['PLAN_DRIFT_TIMER_TRIGGER'],
|
|
312
379
|
};
|
|
313
380
|
}
|
|
@@ -317,8 +384,43 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
317
384
|
functionName: fn.name,
|
|
318
385
|
error: String(error),
|
|
319
386
|
}));
|
|
387
|
+
throw error;
|
|
320
388
|
}
|
|
321
389
|
}
|
|
390
|
+
(0, planCapabilities_1.assertSupportedPlanUpdate)(logicalId, 'VOLCENGINE_VEFAAS', liveBefore, desiredDefinition);
|
|
391
|
+
if ((0, planCompare_1.definitionsDiffer)(liveBefore, desiredDefinition)) {
|
|
392
|
+
return {
|
|
393
|
+
logicalId,
|
|
394
|
+
action: 'update',
|
|
395
|
+
resourceType: 'VOLCENGINE_VEFAAS',
|
|
396
|
+
changes: { before: liveBefore, after: (0, planCompare_1.managedDefinition)(desiredDefinition) },
|
|
397
|
+
...(revertKeys.length ? { revertKeys } : {}),
|
|
398
|
+
...((0, planCompare_2.remoteDiffersFromDesired)(remoteAttributes, (0, planCompare_1.managedDefinition)(currentDefinition, desiredDefinition))
|
|
399
|
+
? { drifted: true }
|
|
400
|
+
: {}),
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
if (Object.keys(removedTimerItems).length > 0) {
|
|
404
|
+
return {
|
|
405
|
+
logicalId,
|
|
406
|
+
action: 'update',
|
|
407
|
+
resourceType: 'VOLCENGINE_VEFAAS',
|
|
408
|
+
changes: {
|
|
409
|
+
before: {
|
|
410
|
+
...(0, planCompare_1.managedDefinition)(currentDefinition, desiredDefinition),
|
|
411
|
+
...removedTimerItems,
|
|
412
|
+
},
|
|
413
|
+
after: (0, planCompare_1.managedDefinition)(desiredDefinition),
|
|
414
|
+
},
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
if (definitionChanged && !remoteDiffers)
|
|
418
|
+
return {
|
|
419
|
+
logicalId,
|
|
420
|
+
action: 'noop',
|
|
421
|
+
resourceType: 'VOLCENGINE_VEFAAS',
|
|
422
|
+
stateUpdate: desiredDefinition,
|
|
423
|
+
};
|
|
322
424
|
return { logicalId, action: 'noop', resourceType: 'VOLCENGINE_VEFAAS' };
|
|
323
425
|
}
|
|
324
426
|
catch (error) {
|
|
@@ -326,16 +428,7 @@ const generateFunctionPlan = async (context, state, functions) => {
|
|
|
326
428
|
logicalId,
|
|
327
429
|
error: error instanceof Error ? error.message : String(error),
|
|
328
430
|
}));
|
|
329
|
-
|
|
330
|
-
logicalId,
|
|
331
|
-
action: 'create',
|
|
332
|
-
resourceType: 'VOLCENGINE_VEFAAS',
|
|
333
|
-
changes: {
|
|
334
|
-
before: currentState.definition,
|
|
335
|
-
after: desiredDefinition,
|
|
336
|
-
},
|
|
337
|
-
drifted: true,
|
|
338
|
-
};
|
|
431
|
+
throw error;
|
|
339
432
|
}
|
|
340
433
|
});
|
|
341
434
|
const allStates = (0, stateManager_1.getAllResources)(state);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.deleteResource = exports.updateResource = exports.readResource = exports.createResource = exports.resolveRoleGrant = void 0;
|
|
4
|
+
const functionDefinition_1 = require("../../common/functionDefinition");
|
|
5
|
+
const planCompare_1 = require("../../common/planCompare");
|
|
4
6
|
const volcengineClient_1 = require("../../common/volcengineClient");
|
|
5
7
|
const common_1 = require("../../common");
|
|
6
8
|
const iamStatements_1 = require("../../common/iamStatements");
|
|
@@ -464,7 +466,7 @@ const createResource = async (context, fn, state) => {
|
|
|
464
466
|
config.Tags = [{ Key: ownershipTag_1.OWNERSHIP_TAG_KEY, Value: (0, ownershipTag_1.buildOwnershipTagValue)(context, logicalId) }];
|
|
465
467
|
const codePath = fn.code.path;
|
|
466
468
|
const codeHash = await (0, common_1.computeZipContentHash)(codePath);
|
|
467
|
-
const resourceAttributes = (0, vefaasTypes_1.extractVefaasDefinition)(config, codeHash);
|
|
469
|
+
const resourceAttributes = (0, vefaasTypes_1.extractVefaasDefinition)(config, codeHash, fn);
|
|
468
470
|
const definition = fn.iam ? { ...resourceAttributes, iam: fn.iam } : resourceAttributes;
|
|
469
471
|
const sid = (0, common_1.buildSid)('volcengine', context.service, context.stage, fn.name);
|
|
470
472
|
const dependentInstances = dependentResources.instances.map((dep) => ({
|
|
@@ -583,10 +585,11 @@ const readResource = async (context, functionName) => {
|
|
|
583
585
|
return await client.vefaas.getFunction(functionName);
|
|
584
586
|
};
|
|
585
587
|
exports.readResource = readResource;
|
|
586
|
-
const updateResource = async (context,
|
|
588
|
+
const updateResource = async (context, providedFn, state, options) => {
|
|
587
589
|
const serviceName = `${context.app}-${context.service}`;
|
|
588
|
-
const logicalId = `functions.${
|
|
590
|
+
const logicalId = `functions.${providedFn.key}`;
|
|
589
591
|
const currentState = (0, common_1.getResource)(state, logicalId);
|
|
592
|
+
const fn = (0, functionDefinition_1.withStoredFunctionIam)(providedFn, currentState?.definition);
|
|
590
593
|
if (!currentState) {
|
|
591
594
|
throw new Error(lang_1.lang.__('RESOURCE_STATE_NOT_FOUND', { logicalId }));
|
|
592
595
|
}
|
|
@@ -632,7 +635,7 @@ const updateResource = async (context, fn, state, options) => {
|
|
|
632
635
|
}
|
|
633
636
|
}
|
|
634
637
|
}
|
|
635
|
-
else {
|
|
638
|
+
else if (fn.log === false) {
|
|
636
639
|
const tlsToRemove = existingInstances.filter((i) => i.type.startsWith('VOLCENGINE_TLS_'));
|
|
637
640
|
if (tlsToRemove.length > 0) {
|
|
638
641
|
try {
|
|
@@ -652,10 +655,10 @@ const updateResource = async (context, fn, state, options) => {
|
|
|
652
655
|
}
|
|
653
656
|
// Determine if the current role is external (string TRN)
|
|
654
657
|
const currentIam = currentState.definition?.iam;
|
|
655
|
-
const isExternalRole =
|
|
658
|
+
const isExternalRole = typeof fn.iam?.role === 'string';
|
|
656
659
|
if (isExternalRole) {
|
|
657
660
|
// External role - skip role management, use TRN directly
|
|
658
|
-
role = { roleName:
|
|
661
|
+
role = { roleName: fn.iam.role, trn: fn.iam.role };
|
|
659
662
|
}
|
|
660
663
|
else if (!hasIamRole && !isTainted) {
|
|
661
664
|
// Role creation only: skip TLS so existing log resources are untouched,
|
|
@@ -706,14 +709,16 @@ const updateResource = async (context, fn, state, options) => {
|
|
|
706
709
|
// the role: drift is detected by comparing desired peer signals (network /
|
|
707
710
|
// TOS mount) against those recorded in each stored definition.
|
|
708
711
|
const derivedBaselineChanged = roleGrant?.derivedBaselineChanged ?? false;
|
|
709
|
-
if ((derivedBaselineChanged || customStatementsChanged) && iamRoleInstance) {
|
|
712
|
+
if ((options?.force || derivedBaselineChanged || customStatementsChanged) && iamRoleInstance) {
|
|
710
713
|
await client.iam.updateRolePolicy(iamRoleInstance.id, roleGrant?.executionStatements ?? (0, vefaasTypes_1.deriveVefaasExecutionStatements)(fn, context), desiredIamStatements);
|
|
711
714
|
}
|
|
712
715
|
// Check managed policy changes
|
|
713
716
|
const desiredManagedPolicies = desiredRoleConfig?.managed_policies;
|
|
714
717
|
const currentManagedPoliciesList = currentRoleConfig?.managed_policies;
|
|
715
718
|
const managedPoliciesChanged = JSON.stringify(currentManagedPoliciesList) !== JSON.stringify(desiredManagedPolicies);
|
|
716
|
-
if (
|
|
719
|
+
if (desiredManagedPolicies !== undefined &&
|
|
720
|
+
(options?.force || managedPoliciesChanged) &&
|
|
721
|
+
iamRoleInstance) {
|
|
717
722
|
await client.iam.updateManagedPolicies(iamRoleInstance.id, desiredManagedPolicies ?? []);
|
|
718
723
|
}
|
|
719
724
|
}
|
|
@@ -751,7 +756,7 @@ const updateResource = async (context, fn, state, options) => {
|
|
|
751
756
|
});
|
|
752
757
|
const codePath = fn.code.path;
|
|
753
758
|
const desiredCodeHash = await (0, common_1.computeZipContentHash)(codePath);
|
|
754
|
-
const baseDefinition = (0, vefaasTypes_1.extractVefaasDefinition)(config, desiredCodeHash);
|
|
759
|
+
const baseDefinition = (0, vefaasTypes_1.extractVefaasDefinition)(config, desiredCodeHash, fn);
|
|
755
760
|
const desiredDefinition = fn.iam ? { ...baseDefinition, iam: fn.iam } : baseDefinition;
|
|
756
761
|
const currentDefinition = currentState.definition || {};
|
|
757
762
|
const currentCodeHash = currentDefinition.codeHash;
|
|
@@ -780,7 +785,7 @@ const updateResource = async (context, fn, state, options) => {
|
|
|
780
785
|
tosMountConfig: desiredDefinition.tosMountConfig,
|
|
781
786
|
logConfig: desiredDefinition.logConfig,
|
|
782
787
|
};
|
|
783
|
-
const configChanged =
|
|
788
|
+
const configChanged = (0, planCompare_1.definitionsDiffer)(existingConfigOnly, desiredConfigOnly);
|
|
784
789
|
// The instance in state carries the provider function Id — use it directly
|
|
785
790
|
// for all follow-up calls instead of re-resolving the name every time.
|
|
786
791
|
const currentFunctionId = currentInstance.functionId;
|
|
@@ -820,7 +825,7 @@ const updateResource = async (context, fn, state, options) => {
|
|
|
820
825
|
.filter((i) => i.type !== 'VOLCENGINE_VEFAAS_FUNCTION' &&
|
|
821
826
|
// timers are fully rebuilt from the reconcile result below
|
|
822
827
|
i.type !== TIMER_TRIGGER_INSTANCE_TYPE &&
|
|
823
|
-
(
|
|
828
|
+
(fn.log !== false || !i.type.startsWith('VOLCENGINE_TLS_')))
|
|
824
829
|
.map((i) => {
|
|
825
830
|
const { sid: existingSid, id: existingId, ...rest } = i;
|
|
826
831
|
return {
|
|
@@ -846,7 +851,7 @@ const updateResource = async (context, fn, state, options) => {
|
|
|
846
851
|
const resourceState = {
|
|
847
852
|
mode: 'managed',
|
|
848
853
|
region: context.region,
|
|
849
|
-
definition: desiredDefinition,
|
|
854
|
+
definition: (0, functionDefinition_1.withLifecycleIntent)((0, planCompare_1.mergeManagedIntent)(currentState.definition ?? {}, desiredDefinition), desiredDefinition, ['timers']),
|
|
850
855
|
instances: [
|
|
851
856
|
vefaasInstance,
|
|
852
857
|
...existingDependentInstances,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTrustedServicesForFunction = exports.deriveVefaasExecutionStatements = exports.buildDefaultTrustPolicy = exports.extractVefaasDefinition = exports.functionToVefaasConfig = void 0;
|
|
4
|
+
const functionDefinition_1 = require("../../common/functionDefinition");
|
|
4
5
|
const TEMPLATE_REF_PATTERN = /^\$\{[^}]+\}$/;
|
|
5
6
|
/**
|
|
6
7
|
* Determines which Volcengine services should be trusted to assume the function's IAM role.
|
|
@@ -54,8 +55,8 @@ const functionToVefaasConfig = (fn, options) => {
|
|
|
54
55
|
return config;
|
|
55
56
|
};
|
|
56
57
|
exports.functionToVefaasConfig = functionToVefaasConfig;
|
|
57
|
-
const extractVefaasDefinition = (config, codeHash) => {
|
|
58
|
-
return {
|
|
58
|
+
const extractVefaasDefinition = (config, codeHash, fn) => {
|
|
59
|
+
return (0, functionDefinition_1.withFunctionLifecycle)({
|
|
59
60
|
functionName: config.functionName,
|
|
60
61
|
runtime: config.runtime,
|
|
61
62
|
handler: config.handler,
|
|
@@ -68,7 +69,9 @@ const extractVefaasDefinition = (config, codeHash) => {
|
|
|
68
69
|
vpcConfig: config.vpcConfig,
|
|
69
70
|
tosMountConfig: config.tosMountConfig,
|
|
70
71
|
logConfig: config.logConfig,
|
|
71
|
-
}
|
|
72
|
+
}, fn,
|
|
73
|
+
// veFaaS executor never applies HTTP triggers or custom domains; persisting them would record intent the cloud never receives.
|
|
74
|
+
{ http: false, domain: false });
|
|
72
75
|
};
|
|
73
76
|
exports.extractVefaasDefinition = extractVefaasDefinition;
|
|
74
77
|
const buildDefaultTrustPolicy = (trustedServices) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/commands/deploy.ts","../src/commands/destroy.ts","../src/commands/forceUnlock.ts","../src/commands/index.ts","../src/commands/local.ts","../src/commands/login.ts","../src/commands/logout.ts","../src/commands/migrate.ts","../src/commands/plan.ts","../src/commands/schema.ts","../src/commands/show.ts","../src/commands/validate.ts","../src/commands/whoami.ts","../src/common/apiClient.ts","../src/common/base64.ts","../src/common/certUtils.ts","../src/common/concurrency.ts","../src/common/constants.ts","../src/common/context.ts","../src/common/credentialStore.ts","../src/common/credentials.ts","../src/common/domainUtils.ts","../src/common/eventQueue.ts","../src/common/fileUtils.ts","../src/common/getVersion.ts","../src/common/hashUtils.ts","../src/common/iacHelper.ts","../src/common/iamStatements.ts","../src/common/imsClient.ts","../src/common/index.ts","../src/common/jsonOutput.ts","../src/common/lockManager.ts","../src/common/logger.ts","../src/common/migrationMarker.ts","../src/common/nameBuilder.ts","../src/common/noColor.ts","../src/common/planCompare.ts","../src/common/planFormatter.ts","../src/common/polling.ts","../src/common/providerEnum.ts","../src/common/providerNames.ts","../src/common/refreshCache.ts","../src/common/refreshPlanner.ts","../src/common/reportResourceEvent.ts","../src/common/requestHelper.ts","../src/common/retryUtils.ts","../src/common/runtimeMapper.ts","../src/common/scfClient.ts","../src/common/siCron.ts","../src/common/sidUtils.ts","../src/common/stateManager.ts","../src/common/throttleRetry.ts","../src/common/triggerMapper.ts","../src/common/aliyunClient/apigwOperations.ts","../src/common/aliyunClient/casOperations.ts","../src/common/aliyunClient/cdnOperations.ts","../src/common/aliyunClient/dnsOperations.ts","../src/common/aliyunClient/ecsOperations.ts","../src/common/aliyunClient/esOperations.ts","../src/common/aliyunClient/fc3Operations.ts","../src/common/aliyunClient/index.ts","../src/common/aliyunClient/nasOperations.ts","../src/common/aliyunClient/ossOperations.ts","../src/common/aliyunClient/ramOperations.ts","../src/common/aliyunClient/rdsOperations.ts","../src/common/aliyunClient/slsOperations.ts","../src/common/aliyunClient/tablestoreOperations.ts","../src/common/aliyunClient/types.ts","../src/common/dependencyGraph/graph.ts","../src/common/dependencyGraph/index.ts","../src/common/dependencyGraph/types.ts","../src/common/stateBackend/cosStateBackend.ts","../src/common/stateBackend/index.ts","../src/common/stateBackend/localStateBackend.ts","../src/common/stateBackend/lockUtils.ts","../src/common/stateBackend/ossStateBackend.ts","../src/common/stateBackend/remoteStateBackend.ts","../src/common/stateBackend/saasStateBackend.ts","../src/common/stateBackend/types.ts","../src/common/tencentClient/camOperations.ts","../src/common/tencentClient/clsOperations.ts","../src/common/tencentClient/cosOperations.ts","../src/common/tencentClient/dnspodOperations.ts","../src/common/tencentClient/esOperations.ts","../src/common/tencentClient/index.ts","../src/common/tencentClient/scfOperations.ts","../src/common/tencentClient/sslOperations.ts","../src/common/tencentClient/tdsqlcClusterMapper.ts","../src/common/tencentClient/tdsqlcOperations.ts","../src/common/tencentClient/types.ts","../src/common/volcengineClient/apigwOperations.ts","../src/common/volcengineClient/iamOperations.ts","../src/common/volcengineClient/index.ts","../src/common/volcengineClient/stsOperations.ts","../src/common/volcengineClient/tlsOperations.ts","../src/common/volcengineClient/tosOperations.ts","../src/common/volcengineClient/types.ts","../src/common/volcengineClient/vefaasOperations.ts","../src/lang/en.ts","../src/lang/index.ts","../src/lang/zh-CN.ts","../src/parser/bucketParser.ts","../src/parser/databaseParser.ts","../src/parser/eventParser.ts","../src/parser/functionParser.ts","../src/parser/index.ts","../src/parser/parseUtils.ts","../src/parser/tableParser.ts","../src/parser/tagParser.ts","../src/stack/alreadyExists.ts","../src/stack/bucketTypes.ts","../src/stack/deploy.ts","../src/stack/index.ts","../src/stack/ownershipTag.ts","../src/stack/aliyunStack/apigwExecutor.ts","../src/stack/aliyunStack/apigwPlanner.ts","../src/stack/aliyunStack/apigwResource.ts","../src/stack/aliyunStack/apigwTypes.ts","../src/stack/aliyunStack/databaseExecutor.ts","../src/stack/aliyunStack/databasePlanner.ts","../src/stack/aliyunStack/databaseResource.ts","../src/stack/aliyunStack/deployer.ts","../src/stack/aliyunStack/destroyer.ts","../src/stack/aliyunStack/esServerlessTypes.ts","../src/stack/aliyunStack/fc3Executor.ts","../src/stack/aliyunStack/fc3Planner.ts","../src/stack/aliyunStack/fc3Resource.ts","../src/stack/aliyunStack/fc3Types.ts","../src/stack/aliyunStack/index.ts","../src/stack/aliyunStack/ossExecutor.ts","../src/stack/aliyunStack/ossPlanner.ts","../src/stack/aliyunStack/ossResource.ts","../src/stack/aliyunStack/ossTypes.ts","../src/stack/aliyunStack/planner.ts","../src/stack/aliyunStack/rdsTypes.ts","../src/stack/aliyunStack/sharedLogProject.ts","../src/stack/aliyunStack/tablestoreExecutor.ts","../src/stack/aliyunStack/tablestorePlanner.ts","../src/stack/aliyunStack/tablestoreResource.ts","../src/stack/aliyunStack/tablestoreTypes.ts","../src/stack/localStack/aliyunFc.ts","../src/stack/localStack/bucket.ts","../src/stack/localStack/event.ts","../src/stack/localStack/function.ts","../src/stack/localStack/functionRunner.ts","../src/stack/localStack/index.ts","../src/stack/localStack/localServer.ts","../src/stack/localStack/timer.ts","../src/stack/localStack/utils.ts","../src/stack/rfsStack/function.ts","../src/stack/rfsStack/index.ts","../src/stack/scfStack/cosExecutor.ts","../src/stack/scfStack/cosPlanner.ts","../src/stack/scfStack/cosResource.ts","../src/stack/scfStack/cosTypes.ts","../src/stack/scfStack/deployer.ts","../src/stack/scfStack/destroyer.ts","../src/stack/scfStack/esServerlessExecutor.ts","../src/stack/scfStack/esServerlessPlanner.ts","../src/stack/scfStack/esServerlessResource.ts","../src/stack/scfStack/esServerlessTypes.ts","../src/stack/scfStack/index.ts","../src/stack/scfStack/planner.ts","../src/stack/scfStack/scfExecutor.ts","../src/stack/scfStack/scfPlanner.ts","../src/stack/scfStack/scfResource.ts","../src/stack/scfStack/scfTypes.ts","../src/stack/scfStack/sharedLogset.ts","../src/stack/scfStack/tdsqlcExecutor.ts","../src/stack/scfStack/tdsqlcPlanner.ts","../src/stack/scfStack/tdsqlcResource.ts","../src/stack/scfStack/tdsqlcTypes.ts","../src/stack/volcengineStack/apigwExecutor.ts","../src/stack/volcengineStack/apigwPlanner.ts","../src/stack/volcengineStack/apigwResource.ts","../src/stack/volcengineStack/apigwTypes.ts","../src/stack/volcengineStack/deployer.ts","../src/stack/volcengineStack/destroyer.ts","../src/stack/volcengineStack/index.ts","../src/stack/volcengineStack/planner.ts","../src/stack/volcengineStack/sharedLogProject.ts","../src/stack/volcengineStack/tosExecutor.ts","../src/stack/volcengineStack/tosPlanner.ts","../src/stack/volcengineStack/tosResource.ts","../src/stack/volcengineStack/tosTypes.ts","../src/stack/volcengineStack/vefaasExecutor.ts","../src/stack/volcengineStack/vefaasPlanner.ts","../src/stack/volcengineStack/vefaasResource.ts","../src/stack/volcengineStack/vefaasTypes.ts","../src/types/assets.ts","../src/types/index.ts","../src/types/tablestore.d.ts","../src/types/domains/backend.ts","../src/types/domains/bucket.ts","../src/types/domains/context.ts","../src/types/domains/database.ts","../src/types/domains/event.ts","../src/types/domains/function.ts","../src/types/domains/lock.ts","../src/types/domains/provider.ts","../src/types/domains/resolvable.ts","../src/types/domains/state.ts","../src/types/domains/table.ts","../src/types/domains/tag.ts","../src/types/domains/vars.ts","../src/types/localStack/index.ts","../src/validator/bucketSchema.ts","../src/validator/databaseSchema.ts","../src/validator/eventSchema.ts","../src/validator/functionSchema.ts","../src/validator/iacSchema.ts","../src/validator/index.ts","../src/validator/rootSchema.ts","../src/validator/schemaExport.ts","../src/validator/semanticValidation.ts","../src/validator/tableschema.ts","../src/validator/templateRefSchema.ts"],"version":"6.0.3"}
|
|
1
|
+
{"root":["../src/index.ts","../src/commands/deploy.ts","../src/commands/destroy.ts","../src/commands/forceUnlock.ts","../src/commands/index.ts","../src/commands/local.ts","../src/commands/login.ts","../src/commands/logout.ts","../src/commands/migrate.ts","../src/commands/plan.ts","../src/commands/schema.ts","../src/commands/show.ts","../src/commands/validate.ts","../src/commands/whoami.ts","../src/common/apiClient.ts","../src/common/base64.ts","../src/common/bucketPolicy.ts","../src/common/certUtils.ts","../src/common/concurrency.ts","../src/common/constants.ts","../src/common/context.ts","../src/common/credentialStore.ts","../src/common/credentials.ts","../src/common/domainUtils.ts","../src/common/eventQueue.ts","../src/common/fileUtils.ts","../src/common/functionDefinition.ts","../src/common/getVersion.ts","../src/common/hashUtils.ts","../src/common/iacHelper.ts","../src/common/iamStatements.ts","../src/common/imsClient.ts","../src/common/index.ts","../src/common/jsonOutput.ts","../src/common/lockManager.ts","../src/common/logger.ts","../src/common/migrationMarker.ts","../src/common/nameBuilder.ts","../src/common/noColor.ts","../src/common/planCapabilities.ts","../src/common/planCompare.ts","../src/common/planFormatter.ts","../src/common/planRedaction.ts","../src/common/polling.ts","../src/common/providerEnum.ts","../src/common/providerNames.ts","../src/common/refreshCache.ts","../src/common/refreshPlanner.ts","../src/common/reportResourceEvent.ts","../src/common/requestHelper.ts","../src/common/retryUtils.ts","../src/common/runtimeMapper.ts","../src/common/scfClient.ts","../src/common/siCron.ts","../src/common/sidUtils.ts","../src/common/stateManager.ts","../src/common/throttleRetry.ts","../src/common/triggerMapper.ts","../src/common/aliyunClient/apigwOperations.ts","../src/common/aliyunClient/casOperations.ts","../src/common/aliyunClient/cdnOperations.ts","../src/common/aliyunClient/dnsOperations.ts","../src/common/aliyunClient/ecsOperations.ts","../src/common/aliyunClient/esOperations.ts","../src/common/aliyunClient/fc3Operations.ts","../src/common/aliyunClient/index.ts","../src/common/aliyunClient/nasOperations.ts","../src/common/aliyunClient/ossOperations.ts","../src/common/aliyunClient/ramOperations.ts","../src/common/aliyunClient/rdsOperations.ts","../src/common/aliyunClient/slsOperations.ts","../src/common/aliyunClient/tablestoreOperations.ts","../src/common/aliyunClient/types.ts","../src/common/dependencyGraph/graph.ts","../src/common/dependencyGraph/index.ts","../src/common/dependencyGraph/types.ts","../src/common/stateBackend/cosStateBackend.ts","../src/common/stateBackend/index.ts","../src/common/stateBackend/localStateBackend.ts","../src/common/stateBackend/lockUtils.ts","../src/common/stateBackend/ossStateBackend.ts","../src/common/stateBackend/remoteStateBackend.ts","../src/common/stateBackend/saasStateBackend.ts","../src/common/stateBackend/types.ts","../src/common/tencentClient/camOperations.ts","../src/common/tencentClient/clsOperations.ts","../src/common/tencentClient/cosOperations.ts","../src/common/tencentClient/dnspodOperations.ts","../src/common/tencentClient/esOperations.ts","../src/common/tencentClient/index.ts","../src/common/tencentClient/scfOperations.ts","../src/common/tencentClient/sslOperations.ts","../src/common/tencentClient/tdsqlcClusterMapper.ts","../src/common/tencentClient/tdsqlcOperations.ts","../src/common/tencentClient/types.ts","../src/common/volcengineClient/apigwOperations.ts","../src/common/volcengineClient/iamOperations.ts","../src/common/volcengineClient/index.ts","../src/common/volcengineClient/stsOperations.ts","../src/common/volcengineClient/tlsOperations.ts","../src/common/volcengineClient/tosOperations.ts","../src/common/volcengineClient/types.ts","../src/common/volcengineClient/vefaasOperations.ts","../src/lang/en.ts","../src/lang/index.ts","../src/lang/zh-CN.ts","../src/parser/bucketParser.ts","../src/parser/databaseParser.ts","../src/parser/eventParser.ts","../src/parser/functionParser.ts","../src/parser/index.ts","../src/parser/parseUtils.ts","../src/parser/tableParser.ts","../src/parser/tagParser.ts","../src/stack/alreadyExists.ts","../src/stack/bucketTypes.ts","../src/stack/deploy.ts","../src/stack/index.ts","../src/stack/ownershipTag.ts","../src/stack/aliyunStack/apigwExecutor.ts","../src/stack/aliyunStack/apigwPlanner.ts","../src/stack/aliyunStack/apigwResource.ts","../src/stack/aliyunStack/apigwTypes.ts","../src/stack/aliyunStack/databaseExecutor.ts","../src/stack/aliyunStack/databasePlanner.ts","../src/stack/aliyunStack/databaseResource.ts","../src/stack/aliyunStack/deployer.ts","../src/stack/aliyunStack/destroyer.ts","../src/stack/aliyunStack/esServerlessTypes.ts","../src/stack/aliyunStack/fc3Executor.ts","../src/stack/aliyunStack/fc3Planner.ts","../src/stack/aliyunStack/fc3Resource.ts","../src/stack/aliyunStack/fc3Types.ts","../src/stack/aliyunStack/index.ts","../src/stack/aliyunStack/ossExecutor.ts","../src/stack/aliyunStack/ossPlanner.ts","../src/stack/aliyunStack/ossResource.ts","../src/stack/aliyunStack/ossTypes.ts","../src/stack/aliyunStack/planner.ts","../src/stack/aliyunStack/rdsTypes.ts","../src/stack/aliyunStack/sharedLogProject.ts","../src/stack/aliyunStack/tablestoreExecutor.ts","../src/stack/aliyunStack/tablestorePlanner.ts","../src/stack/aliyunStack/tablestoreResource.ts","../src/stack/aliyunStack/tablestoreTypes.ts","../src/stack/localStack/aliyunFc.ts","../src/stack/localStack/bucket.ts","../src/stack/localStack/event.ts","../src/stack/localStack/function.ts","../src/stack/localStack/functionRunner.ts","../src/stack/localStack/httpAdapter.ts","../src/stack/localStack/httpError.ts","../src/stack/localStack/index.ts","../src/stack/localStack/legacyLambda.ts","../src/stack/localStack/localContext.ts","../src/stack/localStack/localRoute.ts","../src/stack/localStack/localRuntimes.ts","../src/stack/localStack/localServer.ts","../src/stack/localStack/requestBody.ts","../src/stack/localStack/requestId.ts","../src/stack/localStack/tencent.ts","../src/stack/localStack/timer.ts","../src/stack/localStack/utils.ts","../src/stack/localStack/volcengine.ts","../src/stack/rfsStack/function.ts","../src/stack/rfsStack/index.ts","../src/stack/scfStack/cosExecutor.ts","../src/stack/scfStack/cosPlanner.ts","../src/stack/scfStack/cosResource.ts","../src/stack/scfStack/cosTypes.ts","../src/stack/scfStack/deployer.ts","../src/stack/scfStack/destroyer.ts","../src/stack/scfStack/esServerlessExecutor.ts","../src/stack/scfStack/esServerlessPlanner.ts","../src/stack/scfStack/esServerlessResource.ts","../src/stack/scfStack/esServerlessTypes.ts","../src/stack/scfStack/index.ts","../src/stack/scfStack/planner.ts","../src/stack/scfStack/scfExecutor.ts","../src/stack/scfStack/scfHttpTrigger.ts","../src/stack/scfStack/scfPlanner.ts","../src/stack/scfStack/scfResource.ts","../src/stack/scfStack/scfTypes.ts","../src/stack/scfStack/sharedLogset.ts","../src/stack/scfStack/tdsqlcExecutor.ts","../src/stack/scfStack/tdsqlcPlanner.ts","../src/stack/scfStack/tdsqlcResource.ts","../src/stack/scfStack/tdsqlcTypes.ts","../src/stack/volcengineStack/apigwDomains.ts","../src/stack/volcengineStack/apigwExecutor.ts","../src/stack/volcengineStack/apigwPlanner.ts","../src/stack/volcengineStack/apigwResource.ts","../src/stack/volcengineStack/apigwTypes.ts","../src/stack/volcengineStack/deployer.ts","../src/stack/volcengineStack/destroyer.ts","../src/stack/volcengineStack/index.ts","../src/stack/volcengineStack/planner.ts","../src/stack/volcengineStack/sharedLogProject.ts","../src/stack/volcengineStack/tosExecutor.ts","../src/stack/volcengineStack/tosPlanner.ts","../src/stack/volcengineStack/tosResource.ts","../src/stack/volcengineStack/tosTypes.ts","../src/stack/volcengineStack/vefaasExecutor.ts","../src/stack/volcengineStack/vefaasPlanner.ts","../src/stack/volcengineStack/vefaasResource.ts","../src/stack/volcengineStack/vefaasTypes.ts","../src/types/assets.ts","../src/types/index.ts","../src/types/tablestore.d.ts","../src/types/domains/backend.ts","../src/types/domains/bucket.ts","../src/types/domains/context.ts","../src/types/domains/database.ts","../src/types/domains/event.ts","../src/types/domains/function.ts","../src/types/domains/lock.ts","../src/types/domains/provider.ts","../src/types/domains/resolvable.ts","../src/types/domains/state.ts","../src/types/domains/table.ts","../src/types/domains/tag.ts","../src/types/domains/vars.ts","../src/types/localStack/index.ts","../src/validator/bucketSchema.ts","../src/validator/databaseSchema.ts","../src/validator/eventSchema.ts","../src/validator/functionSchema.ts","../src/validator/iacSchema.ts","../src/validator/index.ts","../src/validator/rootSchema.ts","../src/validator/schemaExport.ts","../src/validator/semanticValidation.ts","../src/validator/tableschema.ts","../src/validator/templateRefSchema.ts"],"version":"6.0.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geek-fun/serverlessinsight",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "Full-lifecycle serverless IaC — one open-source platform to develop, deploy and operate serverless across clouds.",
|
|
5
5
|
"homepage": "https://serverlessinsight.com",
|
|
6
6
|
"main": "dist/src/index.js",
|