@gapi/gcli 1.8.135 → 1.8.137
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/.vscode/settings.json +8 -1
- package/package.json +1 -1
- package/release/index.js +27 -16
package/.vscode/settings.json
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
"editor.codeActionsOnSave": {
|
|
4
4
|
"source.fixAll.eslint": true
|
|
5
5
|
},
|
|
6
|
+
"editor.formatOnSave": true,
|
|
7
|
+
"[javascript]": {
|
|
8
|
+
"editor.formatOnSave": false
|
|
9
|
+
},
|
|
10
|
+
"[typescript]": {
|
|
11
|
+
"editor.formatOnSave": false
|
|
12
|
+
},
|
|
6
13
|
"files.exclude": {
|
|
7
14
|
"**/.classpath": true,
|
|
8
15
|
"**/.factorypath": true,
|
|
@@ -13,4 +20,4 @@
|
|
|
13
20
|
"**/*.d.ts": false,
|
|
14
21
|
"**/*.map": true
|
|
15
22
|
}
|
|
16
|
-
}
|
|
23
|
+
}
|
package/package.json
CHANGED
package/release/index.js
CHANGED
|
@@ -15476,6 +15476,7 @@ exports.createOrUpdateLambda = (cmd, type) => helpers_1.parseProjectId(cmd.proje
|
|
|
15476
15476
|
.pipe(operators_1.switchMap((projectId) => gql_client_1.GraphqlClienAPI.getProject(projectId).pipe(operators_1.map(() => projectId))), operators_1.switchMap((projectId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15477
15477
|
return (Object.assign({ projectId }, (yield load_spec_1.loadSpec(cmd.spec).toPromise())));
|
|
15478
15478
|
})), operators_1.switchMap((data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15479
|
+
var _a;
|
|
15479
15480
|
if (!data.uploadAsZip) {
|
|
15480
15481
|
return Object.assign(Object.assign({}, data), { customUploadFileId: '' });
|
|
15481
15482
|
}
|
|
@@ -15501,12 +15502,12 @@ exports.createOrUpdateLambda = (cmd, type) => helpers_1.parseProjectId(cmd.proje
|
|
|
15501
15502
|
return rxjs_1.from(fetch(config.uploadUrl, {
|
|
15502
15503
|
method: 'POST',
|
|
15503
15504
|
body: body,
|
|
15504
|
-
headers: Object.assign(Object.assign({}, body.getHeaders()), { Authorization: config.token, projectid: data.projectId, lambdaname: data.name }),
|
|
15505
|
+
headers: Object.assign(Object.assign({}, body.getHeaders()), { Authorization: (_a = process.env.GCLI_AUTH_TOKEN) !== null && _a !== void 0 ? _a : config.token, projectid: data.projectId, lambdaname: data.name }),
|
|
15505
15506
|
}))
|
|
15506
15507
|
.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 }))))
|
|
15507
15508
|
.toPromise();
|
|
15508
15509
|
})), operators_1.switchMap((payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15509
|
-
var
|
|
15510
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
15510
15511
|
return gql_client_1.GraphqlClienAPI[type]({
|
|
15511
15512
|
code: cmd.code ||
|
|
15512
15513
|
(yield ReadFile(payload.file || cmd.file).toPromise()) ||
|
|
@@ -15527,20 +15528,20 @@ exports.createOrUpdateLambda = (cmd, type) => helpers_1.parseProjectId(cmd.proje
|
|
|
15527
15528
|
secret: cmd.secret || payload.secret || '',
|
|
15528
15529
|
customUploadFileId: cmd.customUploadFileId || payload.customUploadFileId || '',
|
|
15529
15530
|
scaleOptions: {
|
|
15530
|
-
executorType: cmd.executorType || ((
|
|
15531
|
+
executorType: cmd.executorType || ((_b = payload.scaleOptions) === null || _b === void 0 ? void 0 : _b.executorType) ||
|
|
15531
15532
|
'POOLMGR',
|
|
15532
|
-
maxCpu: cmd.maxCpu || ((
|
|
15533
|
-
maxMemory: cmd.maxMemory || ((
|
|
15534
|
-
maxScale: cmd.maxScale || ((
|
|
15535
|
-
minCpu: cmd.minCpu || ((
|
|
15536
|
-
minMemory: cmd.minMemory || ((
|
|
15537
|
-
minScale: cmd.minScale || ((
|
|
15538
|
-
targetCpu: cmd.targetCpu || ((
|
|
15539
|
-
idleTimeout: cmd.idleTimeout || ((
|
|
15540
|
-
concurrency: cmd.concurrency || ((
|
|
15541
|
-
functionTimeout: cmd.functionTimeout || ((
|
|
15533
|
+
maxCpu: cmd.maxCpu || ((_c = payload.scaleOptions) === null || _c === void 0 ? void 0 : _c.maxCpu) || 0,
|
|
15534
|
+
maxMemory: cmd.maxMemory || ((_d = payload.scaleOptions) === null || _d === void 0 ? void 0 : _d.maxMemory) || 0,
|
|
15535
|
+
maxScale: cmd.maxScale || ((_e = payload.scaleOptions) === null || _e === void 0 ? void 0 : _e.maxScale) || 0,
|
|
15536
|
+
minCpu: cmd.minCpu || ((_f = payload.scaleOptions) === null || _f === void 0 ? void 0 : _f.minCpu) || 0,
|
|
15537
|
+
minMemory: cmd.minMemory || ((_g = payload.scaleOptions) === null || _g === void 0 ? void 0 : _g.minMemory) || 0,
|
|
15538
|
+
minScale: cmd.minScale || ((_h = payload.scaleOptions) === null || _h === void 0 ? void 0 : _h.minScale) || 0,
|
|
15539
|
+
targetCpu: cmd.targetCpu || ((_j = payload.scaleOptions) === null || _j === void 0 ? void 0 : _j.targetCpu) || 0,
|
|
15540
|
+
idleTimeout: cmd.idleTimeout || ((_k = payload.scaleOptions) === null || _k === void 0 ? void 0 : _k.idleTimeout) || 120,
|
|
15541
|
+
concurrency: cmd.concurrency || ((_l = payload.scaleOptions) === null || _l === void 0 ? void 0 : _l.concurrency) || 500,
|
|
15542
|
+
functionTimeout: cmd.functionTimeout || ((_m = payload.scaleOptions) === null || _m === void 0 ? void 0 : _m.functionTimeout) ||
|
|
15542
15543
|
60,
|
|
15543
|
-
specializationTimeout: cmd.specializationTimeout || ((
|
|
15544
|
+
specializationTimeout: cmd.specializationTimeout || ((_o = payload.scaleOptions) === null || _o === void 0 ? void 0 : _o.specializationTimeout) ||
|
|
15544
15545
|
120,
|
|
15545
15546
|
},
|
|
15546
15547
|
}).toPromise();
|
|
@@ -16750,6 +16751,7 @@ function registerAuthCommands(program) {
|
|
|
16750
16751
|
.description('Login to graphql-server')
|
|
16751
16752
|
.option('-k, --key <key>', 'Specify api key')
|
|
16752
16753
|
.option('-uu, --uploadUrl <key>', 'Specify upload server')
|
|
16754
|
+
.option('-i, --integration <key>', 'Initialize directories for CI/CD purposes')
|
|
16753
16755
|
.option('-t, --token <token>', 'Specify custom token generated from the website')
|
|
16754
16756
|
.option('-u, --url <url>', 'Specify api url')
|
|
16755
16757
|
.action(helpers_1.lazy(() => Promise.resolve().then(() => __webpack_require__(875)).then((m) => m.default)));
|
|
@@ -54513,14 +54515,23 @@ exports.default = (cmd) => rxjs_1.of(gql_client_1.GraphqlClienAPI.init(cmd.key))
|
|
|
54513
54515
|
encoding: 'utf-8',
|
|
54514
54516
|
}),
|
|
54515
54517
|
])))
|
|
54516
|
-
.pipe(operators_1.switchMap(() =>
|
|
54518
|
+
.pipe(operators_1.switchMap(() => cmd.integration
|
|
54519
|
+
? rxjs_1.of({
|
|
54520
|
+
user: {
|
|
54521
|
+
displayName: 'Integration Account for CI/CD',
|
|
54522
|
+
email: 'support@graphql-server.com',
|
|
54523
|
+
},
|
|
54524
|
+
refresh: '',
|
|
54525
|
+
token: '',
|
|
54526
|
+
})
|
|
54527
|
+
: gql_client_1.GraphqlClienAPI.signIn(cmd.token).toPromise()), operators_1.switchMap(({ user, refresh, token }) => rxjs_1.combineLatest([
|
|
54517
54528
|
util_1.promisify(fs_1.writeFile)(types_1.tokenDirectory, token, {
|
|
54518
54529
|
encoding: 'utf-8',
|
|
54519
54530
|
}),
|
|
54520
54531
|
util_1.promisify(fs_1.writeFile)(types_1.refreshTokenDirectory, refresh, {
|
|
54521
54532
|
encoding: 'utf-8',
|
|
54522
54533
|
}),
|
|
54523
|
-
]).pipe(operators_1.map(() => user))), operators_1.tap((user) => console.log('Logged in as', `"${user.displayName}"`, 'with email', `"${user.email}"`)))))
|
|
54534
|
+
]).pipe(operators_1.map(() => user))), operators_1.tap((user) => console.log('Logged in as', `"${user === null || user === void 0 ? void 0 : user.displayName}"`, 'with email', `"${user === null || user === void 0 ? void 0 : user.email}"`)))))
|
|
54524
54535
|
.toPromise();
|
|
54525
54536
|
|
|
54526
54537
|
|