Skip to content

Commit 00bb724

Browse files
committed
support enableLongLiving
1 parent 7694dd2 commit 00bb724

6 files changed

Lines changed: 19 additions & 9 deletions

File tree

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"license": "ISC",
2424
"dependencies": {
2525
"@alicloud/fc2": "^2.6.6",
26-
"@alicloud/fc20230330": "4.3.2",
26+
"@alicloud/fc20230330": "4.3.3",
2727
"@alicloud/pop-core": "^1.8.0",
2828
"@serverless-cd/srm-aliyun-pop-core": "^0.0.7-beta.21",
2929
"@serverless-cd/srm-aliyun-ram20150501": "^0.0.2-beta.9",

src/interface/function.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export interface IFunction {
125125
memorySize?: number;
126126
timeout?: number;
127127
sessionAffinity?: string;
128+
enableLongLiving?: boolean;
128129

129130
logConfig?: 'auto' | ILogConfig;
130131
nasConfig?: 'auto' | INasConfig;

src/schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,9 @@
11481148
],
11491149
"type": "number"
11501150
},
1151+
"enableLongLiving": {
1152+
"type": "boolean"
1153+
},
11511154
"endpoint": {
11521155
"type": "string"
11531156
},

src/subCommands/deploy/impl/function.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ export default class Service extends Base {
138138
return;
139139
}
140140

141+
if (_.get(this.remote, 'disableOndemand') === false) {
142+
_.unset(this.remote, 'disableOndemand');
143+
}
144+
141145
_.unset(this.local, 'endpoint');
142146
const { code } = this.local;
143147
_.unset(this.local, 'code');

src/subCommands/plan/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ export default class Plan {
115115
_.unset(local, 'concurrencyConfig');
116116
_.unset(local, 'customContainerConfig.registryConfig');
117117
_.unset(remote, 'functionArn');
118-
118+
if (_.get(remote, 'disableOndemand') === false) {
119+
_.unset(remote, 'disableOndemand');
120+
}
119121
const config = FC.replaceFunctionConfig(local, remote);
120122
return diffConvertPlanYaml(config.remote, config.local, { deep: 0, complete: true });
121123
}

0 commit comments

Comments
 (0)