@gapi/gcli 1.8.132 → 1.8.134
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/package.json +3 -2
- package/release/index.js +99 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gapi/gcli",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.134",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/Stradivario/gapi.git"
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"test": "jest",
|
|
15
15
|
"lint-fix": "npx eslint . --fix --ext .ts",
|
|
16
16
|
"build:release": "gapi build --single-executable && cp ./dist/gcli-linux ./release && cp ./dist/index.js ./release",
|
|
17
|
-
"build": "echo BUILD"
|
|
17
|
+
"build": "echo BUILD",
|
|
18
|
+
"introspect": "gapi schema introspect --collect-documents --collect-types"
|
|
18
19
|
},
|
|
19
20
|
"author": {
|
|
20
21
|
"name": "Kristian Tachev(Stradivario)",
|
package/release/index.js
CHANGED
|
@@ -466,6 +466,20 @@ updatedAt
|
|
|
466
466
|
packageJson
|
|
467
467
|
buildBashScript
|
|
468
468
|
customUploadFileId
|
|
469
|
+
scaleOptions {
|
|
470
|
+
minCpu
|
|
471
|
+
maxCpu
|
|
472
|
+
minMemory
|
|
473
|
+
maxMemory
|
|
474
|
+
minScale
|
|
475
|
+
maxScale
|
|
476
|
+
targetCpu
|
|
477
|
+
executorType
|
|
478
|
+
idleTimeout
|
|
479
|
+
concurrency
|
|
480
|
+
functionTimeout
|
|
481
|
+
specializationTimeout
|
|
482
|
+
}
|
|
469
483
|
`;
|
|
470
484
|
|
|
471
485
|
|
|
@@ -15492,6 +15506,7 @@ exports.createOrUpdateLambda = (cmd, type) => helpers_1.parseProjectId(cmd.proje
|
|
|
15492
15506
|
.pipe(operators_1.switchMap((res) => res.json()), operators_1.tap((res) => console.log(res)), operators_1.map((file) => (Object.assign(Object.assign({}, data), { customUploadFileId: file.id }))))
|
|
15493
15507
|
.toPromise();
|
|
15494
15508
|
})), operators_1.switchMap((payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15509
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
15495
15510
|
return gql_client_1.GraphqlClienAPI[type]({
|
|
15496
15511
|
code: cmd.code ||
|
|
15497
15512
|
(yield ReadFile(payload.file || cmd.file).toPromise()) ||
|
|
@@ -15511,6 +15526,23 @@ exports.createOrUpdateLambda = (cmd, type) => helpers_1.parseProjectId(cmd.proje
|
|
|
15511
15526
|
params: cmd.params || payload.params || [],
|
|
15512
15527
|
secret: cmd.secret || payload.secret || '',
|
|
15513
15528
|
customUploadFileId: cmd.customUploadFileId || payload.customUploadFileId || '',
|
|
15529
|
+
scaleOptions: {
|
|
15530
|
+
executorType: cmd.executorType || ((_a = payload.scaleOptions) === null || _a === void 0 ? void 0 : _a.executorType) ||
|
|
15531
|
+
'POOLMGR',
|
|
15532
|
+
maxCpu: cmd.maxCpu || ((_b = payload.scaleOptions) === null || _b === void 0 ? void 0 : _b.maxCpu) || 0,
|
|
15533
|
+
maxMemory: cmd.maxMemory || ((_c = payload.scaleOptions) === null || _c === void 0 ? void 0 : _c.maxMemory) || 0,
|
|
15534
|
+
maxScale: cmd.maxScale || ((_d = payload.scaleOptions) === null || _d === void 0 ? void 0 : _d.maxScale) || 0,
|
|
15535
|
+
minCpu: cmd.minCpu || ((_e = payload.scaleOptions) === null || _e === void 0 ? void 0 : _e.minCpu) || 0,
|
|
15536
|
+
minMemory: cmd.minMemory || ((_f = payload.scaleOptions) === null || _f === void 0 ? void 0 : _f.minMemory) || 0,
|
|
15537
|
+
minScale: cmd.minScale || ((_g = payload.scaleOptions) === null || _g === void 0 ? void 0 : _g.minScale) || 0,
|
|
15538
|
+
targetCpu: cmd.targetCpu || ((_h = payload.scaleOptions) === null || _h === void 0 ? void 0 : _h.targetCpu) || 0,
|
|
15539
|
+
idleTimeout: cmd.idleTimeout || ((_j = payload.scaleOptions) === null || _j === void 0 ? void 0 : _j.idleTimeout) || 120,
|
|
15540
|
+
concurrency: cmd.concurrency || ((_k = payload.scaleOptions) === null || _k === void 0 ? void 0 : _k.concurrency) || 500,
|
|
15541
|
+
functionTimeout: cmd.functionTimeout || ((_l = payload.scaleOptions) === null || _l === void 0 ? void 0 : _l.functionTimeout) ||
|
|
15542
|
+
60,
|
|
15543
|
+
specializationTimeout: cmd.specializationTimeout || ((_m = payload.scaleOptions) === null || _m === void 0 ? void 0 : _m.specializationTimeout) ||
|
|
15544
|
+
120,
|
|
15545
|
+
},
|
|
15514
15546
|
}).toPromise();
|
|
15515
15547
|
})), operators_1.tap((data) => {
|
|
15516
15548
|
console.dir(data, { depth: null, colors: true });
|
|
@@ -64872,20 +64904,73 @@ function registerLambdaCommands(program) {
|
|
|
64872
64904
|
.pipe(operators_1.map((m) => m.default))
|
|
64873
64905
|
.toPromise()));
|
|
64874
64906
|
const createOrUpdateOptions = [
|
|
64875
|
-
['--name <name>', '
|
|
64876
|
-
['--project <project>', 'lambda
|
|
64877
|
-
['--env <env>', '
|
|
64878
|
-
[
|
|
64879
|
-
|
|
64880
|
-
|
|
64881
|
-
|
|
64882
|
-
['--
|
|
64883
|
-
['--
|
|
64884
|
-
['--
|
|
64885
|
-
[
|
|
64886
|
-
|
|
64887
|
-
|
|
64888
|
-
|
|
64907
|
+
['--name <name>', 'Function name'],
|
|
64908
|
+
['--project <project>', 'Project in which this lambda is defined'],
|
|
64909
|
+
['--env <env>', 'Environment name for function can be NODEJS'],
|
|
64910
|
+
[
|
|
64911
|
+
'--method <method>',
|
|
64912
|
+
'HTTP Methods: GET,POST,PUT,DELETE,HEAD. To mention single method',
|
|
64913
|
+
],
|
|
64914
|
+
['--spec <spec>', 'Spec file yml or json path'],
|
|
64915
|
+
['--packageJson <packageJson>', 'Define packageJson in string format'],
|
|
64916
|
+
['--package <package>', 'Path to package.json'],
|
|
64917
|
+
[
|
|
64918
|
+
'--buildBashScript <buildBashScript>',
|
|
64919
|
+
'Package build command for builder to run with',
|
|
64920
|
+
],
|
|
64921
|
+
['--script <script>', 'Package build script path'],
|
|
64922
|
+
['--params <params>', 'Array from strings which defines route params'],
|
|
64923
|
+
['--route <route>', 'Lambda route in which will be accessible'],
|
|
64924
|
+
['--code <code>', 'URL or local path for single file source code'],
|
|
64925
|
+
['--file <file>', 'Main lambda file'],
|
|
64926
|
+
[
|
|
64927
|
+
'--executorType <executorType>',
|
|
64928
|
+
"Executor type for execution; one of 'poolmgr', 'newdeploy'",
|
|
64929
|
+
],
|
|
64930
|
+
[
|
|
64931
|
+
'--maxCpu <maxCpu>',
|
|
64932
|
+
'Maximum CPU to be assigned to pod (In millicore, minimum 1)',
|
|
64933
|
+
],
|
|
64934
|
+
[
|
|
64935
|
+
'--minCpu <minCpu>',
|
|
64936
|
+
'Minimum CPU to be assigned to pod (In millicore, minimum 1)',
|
|
64937
|
+
],
|
|
64938
|
+
[
|
|
64939
|
+
'--maxMemory <maxMemory>',
|
|
64940
|
+
'Maximum memory to be assigned to pod (In megabyte)',
|
|
64941
|
+
],
|
|
64942
|
+
[
|
|
64943
|
+
'--minMemory <minMemory>',
|
|
64944
|
+
'Minimum memory to be assigned to pod (In megabyte)',
|
|
64945
|
+
],
|
|
64946
|
+
[
|
|
64947
|
+
'--minScale <minScale>',
|
|
64948
|
+
'Minimum number of pods (Uses resource inputs to configure HPA)',
|
|
64949
|
+
],
|
|
64950
|
+
[
|
|
64951
|
+
'--maxScale <maxScale>',
|
|
64952
|
+
'Maximum number of pods (Uses resource inputs to configure HPA)',
|
|
64953
|
+
],
|
|
64954
|
+
[
|
|
64955
|
+
'--targetCpu <targetCpu>',
|
|
64956
|
+
'Target average CPU usage percentage across pods for scaling',
|
|
64957
|
+
],
|
|
64958
|
+
[
|
|
64959
|
+
'--idleTimeout <idleTimeout>',
|
|
64960
|
+
'The length of time (in seconds) that a function is idle before pod(s) are eligible for recycling',
|
|
64961
|
+
],
|
|
64962
|
+
[
|
|
64963
|
+
'--concurrency <concurrency>',
|
|
64964
|
+
'Maximum number of pods specialized concurrently to serve requests',
|
|
64965
|
+
],
|
|
64966
|
+
[
|
|
64967
|
+
'--functionTimeout <functionTimeout>',
|
|
64968
|
+
'Maximum time for a request to wait for the response from the function',
|
|
64969
|
+
],
|
|
64970
|
+
[
|
|
64971
|
+
'--specializationTimeout <specializationTimeout>',
|
|
64972
|
+
'Timeout for executor to wait for function pod creation',
|
|
64973
|
+
],
|
|
64889
64974
|
];
|
|
64890
64975
|
helpers_2.createCommand('lambda:create')(createOrUpdateOptions)(program).action(helpers_1.lazy(() => rxjs_1.from(Promise.resolve().then(() => __webpack_require__(520)))
|
|
64891
64976
|
.pipe(operators_1.map((m) => m.default))
|