gcf-common-lib 0.23.16 → 0.23.17
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 +16 -0
- package/src/index.ts +4 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
17
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
18
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -20,6 +34,8 @@ const utils_1 = require("./utils");
|
|
|
20
34
|
const storage_1 = require("@google-cloud/storage");
|
|
21
35
|
const secret_manager_1 = require("@google-cloud/secret-manager");
|
|
22
36
|
const lodash_1 = require("lodash");
|
|
37
|
+
__exportStar(require("./types"), exports);
|
|
38
|
+
__exportStar(require("./utils"), exports);
|
|
23
39
|
exports.pubSub = new pubsub_1.PubSub();
|
|
24
40
|
exports.storage = new storage_1.Storage();
|
|
25
41
|
exports.secretClient = new secret_manager_1.SecretManagerServiceClient();
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,9 @@ 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 * from './types';
|
|
12
|
+
export * from './utils';
|
|
13
|
+
|
|
11
14
|
export const pubSub = new PubSub();
|
|
12
15
|
export const storage = new Storage();
|
|
13
16
|
export const secretClient = new SecretManagerServiceClient();
|
|
@@ -122,4 +125,4 @@ export class GcfCommon {
|
|
|
122
125
|
static async getSecrets(names: string[], versions?: string[]) {
|
|
123
126
|
return Promise.all(names.map(async (name, idx) => this.getSecret(name, versions?.[idx]).catch()));
|
|
124
127
|
}
|
|
125
|
-
}
|
|
128
|
+
}
|