gcf-common-lib 0.23.16 → 0.23.18
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 +1 -1
- package/src/index.js +34 -1
- package/src/index.ts +9 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
2
28
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
29
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
30
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -12,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
38
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
39
|
};
|
|
14
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.GcfCommon = exports.secretClient = exports.storage = exports.pubSub = void 0;
|
|
41
|
+
exports.GcfCommon = exports.secretClient = exports.storage = exports.pubSub = exports._mongodb = exports._rxjs = exports._secret_manager = exports._pubsub = exports._storage = void 0;
|
|
16
42
|
const pubsub_1 = require("@google-cloud/pubsub");
|
|
17
43
|
const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
18
44
|
const noop_1 = __importDefault(require("lodash/noop"));
|
|
@@ -20,6 +46,13 @@ const utils_1 = require("./utils");
|
|
|
20
46
|
const storage_1 = require("@google-cloud/storage");
|
|
21
47
|
const secret_manager_1 = require("@google-cloud/secret-manager");
|
|
22
48
|
const lodash_1 = require("lodash");
|
|
49
|
+
exports._storage = __importStar(require("@google-cloud/storage"));
|
|
50
|
+
exports._pubsub = __importStar(require("@google-cloud/pubsub"));
|
|
51
|
+
exports._secret_manager = __importStar(require("@google-cloud/secret-manager"));
|
|
52
|
+
exports._rxjs = __importStar(require("rxjs"));
|
|
53
|
+
exports._mongodb = __importStar(require("mongodb"));
|
|
54
|
+
__exportStar(require("./types"), exports);
|
|
55
|
+
__exportStar(require("./utils"), exports);
|
|
23
56
|
exports.pubSub = new pubsub_1.PubSub();
|
|
24
57
|
exports.storage = new storage_1.Storage();
|
|
25
58
|
exports.secretClient = new secret_manager_1.SecretManagerServiceClient();
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,14 @@ import { TContext, TEvent, TGSEvent, TMetadata, TPSEvent, TResponse } from './ty
|
|
|
8
8
|
import { mapValues } from 'lodash';
|
|
9
9
|
import Dict = NodeJS.Dict;
|
|
10
10
|
|
|
11
|
+
export * as _storage from '@google-cloud/storage';
|
|
12
|
+
export * as _pubsub from '@google-cloud/pubsub';
|
|
13
|
+
export * as _secret_manager from '@google-cloud/secret-manager';
|
|
14
|
+
export * as _rxjs from 'rxjs';
|
|
15
|
+
export * as _mongodb from 'mongodb';
|
|
16
|
+
export * from './types';
|
|
17
|
+
export * from './utils';
|
|
18
|
+
|
|
11
19
|
export const pubSub = new PubSub();
|
|
12
20
|
export const storage = new Storage();
|
|
13
21
|
export const secretClient = new SecretManagerServiceClient();
|
|
@@ -122,4 +130,4 @@ export class GcfCommon {
|
|
|
122
130
|
static async getSecrets(names: string[], versions?: string[]) {
|
|
123
131
|
return Promise.all(names.map(async (name, idx) => this.getSecret(name, versions?.[idx]).catch()));
|
|
124
132
|
}
|
|
125
|
-
}
|
|
133
|
+
}
|