@gapi/gcli 1.8.123 → 1.8.124

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/release/index.js +3 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gapi/gcli",
3
- "version": "1.8.123",
3
+ "version": "1.8.124",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/Stradivario/gapi.git"
package/release/index.js CHANGED
@@ -15102,27 +15102,16 @@ module.exports.default = module.exports; // For TypeScript
15102
15102
 
15103
15103
  "use strict";
15104
15104
 
15105
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15106
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15107
- return new (P || (P = Promise))(function (resolve, reject) {
15108
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15109
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
15110
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
15111
- step((generator = generator.apply(thisArg, _arguments || [])).next());
15112
- });
15113
- };
15114
15105
  Object.defineProperty(exports, "__esModule", { value: true });
15115
15106
  exports.loadSpec = void 0;
15116
- const fs_1 = __webpack_require__(747);
15117
15107
  const js_yaml_1 = __webpack_require__(627);
15118
15108
  const rxjs_1 = __webpack_require__(139);
15119
15109
  const operators_1 = __webpack_require__(599);
15120
- const util_1 = __webpack_require__(853);
15121
15110
  const read_file_1 = __webpack_require__(470);
15122
15111
  exports.loadSpec = (spec) => rxjs_1.combineLatest([
15123
- rxjs_1.from(util_1.promisify(fs_1.stat)(spec)).pipe(operators_1.switchMap(() => read_file_1.readFileAsObservable(spec)), operators_1.map((spec) => JSON.parse(spec)), operators_1.catchError(() => rxjs_1.from(read_file_1.readFileAsObservable(spec)).pipe(operators_1.map((file) => js_yaml_1.default.load(file)), operators_1.catchError(() => rxjs_1.of(false))))),
15124
- rxjs_1.from(util_1.promisify(fs_1.stat)('spec.json')).pipe(operators_1.map(() => 'spec.json'), operators_1.switchMap((file) => read_file_1.readFileAsObservable(file)), operators_1.map((spec) => JSON.parse(spec)), operators_1.catchError(() => rxjs_1.of(false))),
15125
- rxjs_1.from(util_1.promisify(fs_1.stat)('spec.yaml')).pipe(operators_1.switchMap(() => __awaiter(void 0, void 0, void 0, function* () { return js_yaml_1.default.load(yield read_file_1.readFileAsObservable('spec.yaml').toPromise()); })), operators_1.catchError(() => rxjs_1.of(false))),
15112
+ read_file_1.readFileAsObservable(spec).pipe(operators_1.map((spec) => JSON.parse(spec)), operators_1.catchError(() => rxjs_1.from(read_file_1.readFileAsObservable(spec)).pipe(operators_1.map((file) => js_yaml_1.load(file)), operators_1.catchError(() => rxjs_1.of(false))))),
15113
+ read_file_1.readFileAsObservable('spec.json').pipe(operators_1.map((spec) => JSON.parse(spec)), operators_1.catchError(() => rxjs_1.of(false))),
15114
+ read_file_1.readFileAsObservable('spec.yaml').pipe(operators_1.map((data) => js_yaml_1.load(data)), operators_1.catchError(() => rxjs_1.of(false))),
15126
15115
  ]).pipe(operators_1.map(([custom, json, yaml]) => (custom || json || yaml)));
15127
15116
 
15128
15117