@gapi/cli 1.8.143 → 1.8.145
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare type Tasks = '--inspect' | '--iport' | '--ihost' | '--buildOnly=false' | '--minify=false' | '--start' | '--outDir' | '--outFile' | '--hmr' | '--public-url' | '--glob' | 'add' | '--lint' | 'clean' | 'restart' | 'list' | '--url' | '--folder' | '--pattern' | '--all' | '--link-name' | 'start' | 'status' | 'unlink' | 'link' | 'bootstrap' | '--dry-run' | '--force' | '--source-root' | '--language' | '--schematics-name' | '--method' | 'remove' | 'kill' | 'stop' | '--port' | '--bundle-modules' | '--disable-excluded-folders' | '--inspect-brk' | '--path' | '--pkg-name' | '--ncc-only' | '--pkg-only' | '--assets' | '--single-executable' | '--target=browser' | '--auto-install' | '--hmr-port' | '--cache-dir' | '--cache' | '--source-maps' | '--hmr-hostname' | '--scope-hoist';
|
|
2
2
|
export declare const includes: (i: Tasks) => boolean;
|
|
3
3
|
export declare const nextOrDefault: (i: Tasks, fb?: any, type?: (p: any) => any) => any;
|
|
4
|
+
export * from './is-windows';
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
13
|
exports.nextOrDefault = exports.includes = void 0;
|
|
4
14
|
exports.includes = (i) => process.argv.toString().includes(i);
|
|
@@ -15,3 +25,4 @@ exports.nextOrDefault = (i, fb = true, type = (p) => p) => {
|
|
|
15
25
|
}
|
|
16
26
|
return fb;
|
|
17
27
|
};
|
|
28
|
+
__exportStar(require("./is-windows"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isWindows: () => boolean;
|
|
@@ -8,6 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.EnvironmentVariableService = void 0;
|
|
10
10
|
const core_1 = require("@rxdi/core");
|
|
11
|
+
const helpers_1 = require("../helpers");
|
|
11
12
|
let EnvironmentVariableService = class EnvironmentVariableService {
|
|
12
13
|
setVariables(config) {
|
|
13
14
|
let buildedEnvironments = ``;
|
|
@@ -16,10 +17,10 @@ let EnvironmentVariableService = class EnvironmentVariableService {
|
|
|
16
17
|
conf.forEach((key) => {
|
|
17
18
|
count++;
|
|
18
19
|
if (conf.length === count) {
|
|
19
|
-
buildedEnvironments +=
|
|
20
|
+
buildedEnvironments += `${helpers_1.isWindows() ? 'set' : 'export'} ${key}=${config[key]}`;
|
|
20
21
|
}
|
|
21
22
|
else {
|
|
22
|
-
buildedEnvironments +=
|
|
23
|
+
buildedEnvironments += `${helpers_1.isWindows() ? 'set' : 'export'} ${key}=${config[key]} && `;
|
|
23
24
|
}
|
|
24
25
|
});
|
|
25
26
|
return buildedEnvironments;
|
package/dist/tasks/schema.js
CHANGED
|
@@ -23,6 +23,7 @@ const node_fetch_1 = require("node-fetch");
|
|
|
23
23
|
const rxjs_1 = require("rxjs");
|
|
24
24
|
const operators_1 = require("rxjs/operators");
|
|
25
25
|
const util_1 = require("util");
|
|
26
|
+
const helpers_1 = require("../core/helpers");
|
|
26
27
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
27
28
|
const mkdirp_1 = require("../core/helpers/mkdirp");
|
|
28
29
|
const args_service_1 = require("../core/services/args.service");
|
|
@@ -140,9 +141,9 @@ export const introspectionQueryResultData = ${JSON.stringify({ __schema }, null,
|
|
|
140
141
|
generateSchema() {
|
|
141
142
|
return __awaiter(this, void 0, void 0, function* () {
|
|
142
143
|
console.log(`[GenerateSchema]: Trying to hit ${this.endpoint} ...`);
|
|
143
|
-
yield this.execService.call(
|
|
144
|
+
yield this.execService.call(`${helpers_1.isWindows() ? 'set' : 'export'} NODE_TLS_REJECT_UNAUTHORIZED=0 && node ${this.node_modules}/apollo-codegen/lib/cli.js introspect-schema ${this.endpoint} ${this.headers ? `--header "${this.headers}"` : ''} --output ${this.folder}/schema.json`);
|
|
144
145
|
console.log(`[GenerateSchema]: Endpoint ${this.endpoint} hit!`);
|
|
145
|
-
yield this.execService.call(
|
|
146
|
+
yield this.execService.call(`${helpers_1.isWindows() ? 'set' : 'export'} NODE_TLS_REJECT_UNAUTHORIZED=0 && node ${this.bashFolder}/gql2ts/index.js ${this.folder}/schema.json -o ${this.folder}/index.ts`);
|
|
146
147
|
console.log(`[GenerateSchema]: Typescript interfaces generated inside folder: ${this.folder}/index.d.ts`);
|
|
147
148
|
});
|
|
148
149
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gapi/cli",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.145",
|
|
4
4
|
"description": "Gapi command line interface",
|
|
5
5
|
"main": "./dist/main.js",
|
|
6
6
|
"types": "./dist/main.d.ts",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"author": "Kristiyan Tachev (@Stradivario)",
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@gapi/core": "^1.8.
|
|
37
|
+
"@gapi/core": "^1.8.144",
|
|
38
38
|
"graphql": "^14.6.0",
|
|
39
|
-
"@gapi/schematics": "^1.8.
|
|
39
|
+
"@gapi/schematics": "^1.8.144",
|
|
40
40
|
"node-fetch": "^2.1.2",
|
|
41
41
|
"@zeit/ncc": "^0.22.1",
|
|
42
42
|
"apollo-codegen": "0.20.2",
|