firebase-tools 11.7.0 → 11.9.0
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/lib/auth.js +1 -1
- package/lib/deploy/functions/build.js +39 -25
- package/lib/deploy/functions/cache/applyHash.js +29 -0
- package/lib/deploy/functions/cache/hash.js +30 -0
- package/lib/deploy/functions/cel.js +249 -0
- package/lib/deploy/functions/functionsDeployHelper.js +12 -1
- package/lib/deploy/functions/params.js +259 -102
- package/lib/deploy/functions/prepare.js +34 -4
- package/lib/deploy/functions/prepareFunctionsUpload.js +13 -5
- package/lib/deploy/functions/release/fabricator.js +17 -1
- package/lib/deploy/functions/release/planner.js +17 -0
- package/lib/deploy/functions/runtimes/node/parseTriggers.js +9 -0
- package/lib/deploy/functions/services/index.js +11 -0
- package/lib/deploy/functions/services/remoteConfig.js +14 -0
- package/lib/emulator/extensionsEmulator.js +1 -0
- package/lib/emulator/functionsEmulator.js +18 -59
- package/lib/emulator/functionsRuntimeWorker.js +38 -7
- package/lib/emulator/storage/apis/firebase.js +139 -125
- package/lib/emulator/storage/apis/gcloud.js +102 -42
- package/lib/emulator/storage/files.js +25 -15
- package/lib/emulator/storage/metadata.js +86 -56
- package/lib/emulator/storage/rules/runtime.js +10 -2
- package/lib/emulator/storage/upload.js +45 -9
- package/lib/extensions/extensionsHelper.js +1 -1
- package/lib/functions/constants.js +14 -0
- package/lib/functions/events/v2.js +2 -1
- package/lib/functions/secrets.js +8 -1
- package/lib/gcp/cloudfunctions.js +15 -18
- package/lib/gcp/cloudfunctionsv2.js +15 -18
- package/lib/gcp/cloudscheduler.js +2 -1
- package/lib/gcp/secretManager.js +15 -1
- package/lib/gcp/storage.js +15 -1
- package/lib/previews.js +1 -1
- package/lib/track.js +1 -1
- package/npm-shrinkwrap.json +54 -30
- package/package.json +6 -5
- package/templates/init/storage/storage.rules +1 -1
package/lib/functions/secrets.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateEndpointSecret = exports.pruneAndDestroySecrets = exports.pruneSecrets = exports.inUse = exports.of = exports.ensureSecret = exports.ensureValidKey = exports.labels = exports.isFirebaseManaged = void 0;
|
|
3
|
+
exports.updateEndpointSecret = exports.pruneAndDestroySecrets = exports.pruneSecrets = exports.inUse = exports.getSecretVersions = exports.of = exports.ensureSecret = exports.ensureValidKey = exports.labels = exports.isFirebaseManaged = void 0;
|
|
4
4
|
const utils = require("../utils");
|
|
5
5
|
const poller = require("../operation-poller");
|
|
6
6
|
const gcf = require("../gcp/cloudfunctions");
|
|
@@ -85,6 +85,13 @@ function of(endpoints) {
|
|
|
85
85
|
return endpoints.reduce((envs, endpoint) => [...envs, ...(endpoint.secretEnvironmentVariables || [])], []);
|
|
86
86
|
}
|
|
87
87
|
exports.of = of;
|
|
88
|
+
function getSecretVersions(endpoint) {
|
|
89
|
+
return (endpoint.secretEnvironmentVariables || []).reduce((memo, { secret, version }) => {
|
|
90
|
+
memo[secret] = version || "";
|
|
91
|
+
return memo;
|
|
92
|
+
}, {});
|
|
93
|
+
}
|
|
94
|
+
exports.getSecretVersions = getSecretVersions;
|
|
88
95
|
function inUse(projectInfo, secret, endpoint) {
|
|
89
96
|
const { projectId, projectNumber } = projectInfo;
|
|
90
97
|
for (const sev of of([endpoint])) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.functionFromEndpoint = exports.endpointFromFunction = exports.listAllFunctions = exports.listFunctions = exports.deleteFunction = exports.updateFunction = exports.setInvokerUpdate = exports.setInvokerCreate = exports.getIamPolicy = exports.setIamPolicy = exports.createFunction = exports.generateUploadUrl = exports.
|
|
3
|
+
exports.functionFromEndpoint = exports.endpointFromFunction = exports.listAllFunctions = exports.listFunctions = exports.deleteFunction = exports.updateFunction = exports.setInvokerUpdate = exports.setInvokerCreate = exports.getIamPolicy = exports.setIamPolicy = exports.createFunction = exports.generateUploadUrl = exports.API_VERSION = void 0;
|
|
4
4
|
const clc = require("colorette");
|
|
5
5
|
const error_1 = require("../error");
|
|
6
6
|
const logger_1 = require("../logger");
|
|
@@ -11,18 +11,9 @@ const runtimes = require("../deploy/functions/runtimes");
|
|
|
11
11
|
const projectConfig = require("../functions/projectConfig");
|
|
12
12
|
const apiv2_1 = require("../apiv2");
|
|
13
13
|
const api_1 = require("../api");
|
|
14
|
+
const constants_1 = require("../functions/constants");
|
|
14
15
|
exports.API_VERSION = "v1";
|
|
15
|
-
exports.CODEBASE_LABEL = "firebase-functions-codebase";
|
|
16
16
|
const client = new apiv2_1.Client({ urlPrefix: api_1.functionsOrigin, apiVersion: exports.API_VERSION });
|
|
17
|
-
exports.BLOCKING_LABEL = "deployment-blocking";
|
|
18
|
-
const BLOCKING_LABEL_KEY_TO_EVENT = {
|
|
19
|
-
"before-create": "providers/cloud.auth/eventTypes/user.beforeCreate",
|
|
20
|
-
"before-sign-in": "providers/cloud.auth/eventTypes/user.beforeSignIn",
|
|
21
|
-
};
|
|
22
|
-
const BLOCKING_EVENT_TO_LABEL_KEY = {
|
|
23
|
-
"providers/cloud.auth/eventTypes/user.beforeCreate": "before-create",
|
|
24
|
-
"providers/cloud.auth/eventTypes/user.beforeSignIn": "before-sign-in",
|
|
25
|
-
};
|
|
26
17
|
function functionsOpLogReject(funcName, type, err) {
|
|
27
18
|
var _a, _b;
|
|
28
19
|
if (((_b = (_a = err === null || err === void 0 ? void 0 : err.context) === null || _a === void 0 ? void 0 : _a.response) === null || _b === void 0 ? void 0 : _b.statusCode) === 429) {
|
|
@@ -199,7 +190,7 @@ async function listAllFunctions(projectId) {
|
|
|
199
190
|
}
|
|
200
191
|
exports.listAllFunctions = listAllFunctions;
|
|
201
192
|
function endpointFromFunction(gcfFunction) {
|
|
202
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
193
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
203
194
|
const [, project, , region, , id] = gcfFunction.name.split("/");
|
|
204
195
|
let trigger;
|
|
205
196
|
let uri;
|
|
@@ -220,10 +211,10 @@ function endpointFromFunction(gcfFunction) {
|
|
|
220
211
|
callableTrigger: {},
|
|
221
212
|
};
|
|
222
213
|
}
|
|
223
|
-
else if ((_e = gcfFunction.labels) === null || _e === void 0 ? void 0 : _e[
|
|
214
|
+
else if ((_e = gcfFunction.labels) === null || _e === void 0 ? void 0 : _e[constants_1.BLOCKING_LABEL]) {
|
|
224
215
|
trigger = {
|
|
225
216
|
blockingTrigger: {
|
|
226
|
-
eventType: BLOCKING_LABEL_KEY_TO_EVENT[gcfFunction.labels[
|
|
217
|
+
eventType: constants_1.BLOCKING_LABEL_KEY_TO_EVENT[gcfFunction.labels[constants_1.BLOCKING_LABEL]],
|
|
227
218
|
},
|
|
228
219
|
};
|
|
229
220
|
}
|
|
@@ -263,7 +254,10 @@ function endpointFromFunction(gcfFunction) {
|
|
|
263
254
|
endpoint.vpc = { connector: gcfFunction.vpcConnector };
|
|
264
255
|
proto.convertIfPresent(endpoint.vpc, gcfFunction, "egressSettings", "vpcConnectorEgressSettings", (raw) => raw);
|
|
265
256
|
}
|
|
266
|
-
endpoint.codebase = ((_g = gcfFunction.labels) === null || _g === void 0 ? void 0 : _g[
|
|
257
|
+
endpoint.codebase = ((_g = gcfFunction.labels) === null || _g === void 0 ? void 0 : _g[constants_1.CODEBASE_LABEL]) || projectConfig.DEFAULT_CODEBASE;
|
|
258
|
+
if ((_h = gcfFunction.labels) === null || _h === void 0 ? void 0 : _h[constants_1.HASH_LABEL]) {
|
|
259
|
+
endpoint.hash = gcfFunction.labels[constants_1.HASH_LABEL];
|
|
260
|
+
}
|
|
267
261
|
return endpoint;
|
|
268
262
|
}
|
|
269
263
|
exports.endpointFromFunction = endpointFromFunction;
|
|
@@ -312,7 +306,7 @@ function functionFromEndpoint(endpoint, sourceUploadUrl) {
|
|
|
312
306
|
}
|
|
313
307
|
else if (backend.isBlockingTriggered(endpoint)) {
|
|
314
308
|
gcfFunction.httpsTrigger = {};
|
|
315
|
-
gcfFunction.labels = Object.assign(Object.assign({}, gcfFunction.labels), { [
|
|
309
|
+
gcfFunction.labels = Object.assign(Object.assign({}, gcfFunction.labels), { [constants_1.BLOCKING_LABEL]: constants_1.BLOCKING_EVENT_TO_LABEL_KEY[endpoint.blockingTrigger.eventType] });
|
|
316
310
|
}
|
|
317
311
|
else {
|
|
318
312
|
gcfFunction.httpsTrigger = {};
|
|
@@ -337,10 +331,13 @@ function functionFromEndpoint(endpoint, sourceUploadUrl) {
|
|
|
337
331
|
}
|
|
338
332
|
const codebase = endpoint.codebase || projectConfig.DEFAULT_CODEBASE;
|
|
339
333
|
if (codebase !== projectConfig.DEFAULT_CODEBASE) {
|
|
340
|
-
gcfFunction.labels = Object.assign(Object.assign({}, gcfFunction.labels), { [
|
|
334
|
+
gcfFunction.labels = Object.assign(Object.assign({}, gcfFunction.labels), { [constants_1.CODEBASE_LABEL]: codebase });
|
|
341
335
|
}
|
|
342
336
|
else {
|
|
343
|
-
(_b = gcfFunction.labels) === null || _b === void 0 ? true : delete _b[
|
|
337
|
+
(_b = gcfFunction.labels) === null || _b === void 0 ? true : delete _b[constants_1.CODEBASE_LABEL];
|
|
338
|
+
}
|
|
339
|
+
if (endpoint.hash) {
|
|
340
|
+
gcfFunction.labels = Object.assign(Object.assign({}, gcfFunction.labels), { [constants_1.HASH_LABEL]: endpoint.hash });
|
|
344
341
|
}
|
|
345
342
|
return gcfFunction;
|
|
346
343
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.endpointFromFunction = exports.functionFromEndpoint = exports.deleteFunction = exports.updateFunction = exports.listAllFunctions = exports.listFunctions = exports.getFunction = exports.createFunction = exports.generateUploadUrl = exports.mebibytes = exports.
|
|
3
|
+
exports.endpointFromFunction = exports.functionFromEndpoint = exports.deleteFunction = exports.updateFunction = exports.listAllFunctions = exports.listFunctions = exports.getFunction = exports.createFunction = exports.generateUploadUrl = exports.mebibytes = exports.API_VERSION = void 0;
|
|
4
4
|
const clc = require("colorette");
|
|
5
5
|
const apiv2_1 = require("../apiv2");
|
|
6
6
|
const error_1 = require("../error");
|
|
@@ -12,22 +12,13 @@ const runtimes = require("../deploy/functions/runtimes");
|
|
|
12
12
|
const proto = require("./proto");
|
|
13
13
|
const utils = require("../utils");
|
|
14
14
|
const projectConfig = require("../functions/projectConfig");
|
|
15
|
+
const constants_1 = require("../functions/constants");
|
|
15
16
|
exports.API_VERSION = "v2alpha";
|
|
16
|
-
exports.CODEBASE_LABEL = "firebase-functions-codebase";
|
|
17
17
|
const client = new apiv2_1.Client({
|
|
18
18
|
urlPrefix: api_1.functionsV2Origin,
|
|
19
19
|
auth: true,
|
|
20
20
|
apiVersion: exports.API_VERSION,
|
|
21
21
|
});
|
|
22
|
-
exports.BLOCKING_LABEL = "deployment-blocking";
|
|
23
|
-
const BLOCKING_LABEL_KEY_TO_EVENT = {
|
|
24
|
-
"before-create": "providers/cloud.auth/eventTypes/user.beforeCreate",
|
|
25
|
-
"before-sign-in": "providers/cloud.auth/eventTypes/user.beforeSignIn",
|
|
26
|
-
};
|
|
27
|
-
const BLOCKING_EVENT_TO_LABEL_KEY = {
|
|
28
|
-
"providers/cloud.auth/eventTypes/user.beforeCreate": "before-create",
|
|
29
|
-
"providers/cloud.auth/eventTypes/user.beforeSignIn": "before-sign-in",
|
|
30
|
-
};
|
|
31
22
|
const BYTES_PER_UNIT = {
|
|
32
23
|
"": 1,
|
|
33
24
|
k: 1e3,
|
|
@@ -243,20 +234,23 @@ function functionFromEndpoint(endpoint, source) {
|
|
|
243
234
|
gcfFunction.labels = Object.assign(Object.assign({}, gcfFunction.labels), { "deployment-callable": "true" });
|
|
244
235
|
}
|
|
245
236
|
else if (backend.isBlockingTriggered(endpoint)) {
|
|
246
|
-
gcfFunction.labels = Object.assign(Object.assign({}, gcfFunction.labels), { [
|
|
237
|
+
gcfFunction.labels = Object.assign(Object.assign({}, gcfFunction.labels), { [constants_1.BLOCKING_LABEL]: constants_1.BLOCKING_EVENT_TO_LABEL_KEY[endpoint.blockingTrigger.eventType] });
|
|
247
238
|
}
|
|
248
239
|
const codebase = endpoint.codebase || projectConfig.DEFAULT_CODEBASE;
|
|
249
240
|
if (codebase !== projectConfig.DEFAULT_CODEBASE) {
|
|
250
|
-
gcfFunction.labels = Object.assign(Object.assign({}, gcfFunction.labels), { [
|
|
241
|
+
gcfFunction.labels = Object.assign(Object.assign({}, gcfFunction.labels), { [constants_1.CODEBASE_LABEL]: codebase });
|
|
251
242
|
}
|
|
252
243
|
else {
|
|
253
|
-
(_b = gcfFunction.labels) === null || _b === void 0 ? true : delete _b[
|
|
244
|
+
(_b = gcfFunction.labels) === null || _b === void 0 ? true : delete _b[constants_1.CODEBASE_LABEL];
|
|
245
|
+
}
|
|
246
|
+
if (endpoint.hash) {
|
|
247
|
+
gcfFunction.labels = Object.assign(Object.assign({}, gcfFunction.labels), { [constants_1.HASH_LABEL]: endpoint.hash });
|
|
254
248
|
}
|
|
255
249
|
return gcfFunction;
|
|
256
250
|
}
|
|
257
251
|
exports.functionFromEndpoint = functionFromEndpoint;
|
|
258
252
|
function endpointFromFunction(gcfFunction) {
|
|
259
|
-
var _a, _b, _c, _d, _e;
|
|
253
|
+
var _a, _b, _c, _d, _e, _f;
|
|
260
254
|
const [, project, , region, , id] = gcfFunction.name.split("/");
|
|
261
255
|
let trigger;
|
|
262
256
|
if (((_a = gcfFunction.labels) === null || _a === void 0 ? void 0 : _a["deployment-scheduled"]) === "true") {
|
|
@@ -274,10 +268,10 @@ function endpointFromFunction(gcfFunction) {
|
|
|
274
268
|
callableTrigger: {},
|
|
275
269
|
};
|
|
276
270
|
}
|
|
277
|
-
else if ((_d = gcfFunction.labels) === null || _d === void 0 ? void 0 : _d[
|
|
271
|
+
else if ((_d = gcfFunction.labels) === null || _d === void 0 ? void 0 : _d[constants_1.BLOCKING_LABEL]) {
|
|
278
272
|
trigger = {
|
|
279
273
|
blockingTrigger: {
|
|
280
|
-
eventType: BLOCKING_LABEL_KEY_TO_EVENT[gcfFunction.labels[
|
|
274
|
+
eventType: constants_1.BLOCKING_LABEL_KEY_TO_EVENT[gcfFunction.labels[constants_1.BLOCKING_LABEL]],
|
|
281
275
|
},
|
|
282
276
|
};
|
|
283
277
|
}
|
|
@@ -341,7 +335,10 @@ function endpointFromFunction(gcfFunction) {
|
|
|
341
335
|
endpoint.vpc = { connector: gcfFunction.serviceConfig.vpcConnector };
|
|
342
336
|
proto.renameIfPresent(endpoint.vpc, gcfFunction.serviceConfig, "egressSettings", "vpcConnectorEgressSettings");
|
|
343
337
|
}
|
|
344
|
-
endpoint.codebase = ((_e = gcfFunction.labels) === null || _e === void 0 ? void 0 : _e[
|
|
338
|
+
endpoint.codebase = ((_e = gcfFunction.labels) === null || _e === void 0 ? void 0 : _e[constants_1.CODEBASE_LABEL]) || projectConfig.DEFAULT_CODEBASE;
|
|
339
|
+
if ((_f = gcfFunction.labels) === null || _f === void 0 ? void 0 : _f[constants_1.HASH_LABEL]) {
|
|
340
|
+
endpoint.hash = gcfFunction.labels[constants_1.HASH_LABEL];
|
|
341
|
+
}
|
|
345
342
|
return endpoint;
|
|
346
343
|
}
|
|
347
344
|
exports.endpointFromFunction = endpointFromFunction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.jobFromEndpoint = exports.topicNameForEndpoint = exports.jobNameForEndpoint = exports.createOrReplaceJob = exports.deleteJob = void 0;
|
|
3
|
+
exports.jobFromEndpoint = exports.topicNameForEndpoint = exports.jobNameForEndpoint = exports.createOrReplaceJob = exports.getJob = exports.deleteJob = void 0;
|
|
4
4
|
const _ = require("lodash");
|
|
5
5
|
const error_1 = require("../error");
|
|
6
6
|
const logger_1 = require("../logger");
|
|
@@ -29,6 +29,7 @@ function getJob(name) {
|
|
|
29
29
|
resolveOnHTTPError: true,
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
+
exports.getJob = getJob;
|
|
32
33
|
function updateJob(job) {
|
|
33
34
|
let fieldMasks;
|
|
34
35
|
let json;
|
package/lib/gcp/secretManager.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ensureServiceAgentRole = exports.setIamPolicy = exports.getIamPolicy = exports.addVersion = exports.deleteSecret = exports.patchSecret = exports.createSecret = exports.toSecretVersionResourceName = exports.parseSecretVersionResourceName = exports.parseSecretResourceName = exports.secretExists = exports.destroySecretVersion = exports.accessSecretVersion = exports.getSecretVersion = exports.listSecretVersions = exports.listSecrets = exports.getSecret = exports.secretManagerConsoleUri = void 0;
|
|
3
|
+
exports.ensureServiceAgentRole = exports.setIamPolicy = exports.getIamPolicy = exports.addVersion = exports.deleteSecret = exports.patchSecret = exports.createSecret = exports.toSecretVersionResourceName = exports.parseSecretVersionResourceName = exports.parseSecretResourceName = exports.secretExists = exports.destroySecretVersion = exports.accessSecretVersion = exports.getSecretVersion = exports.listSecretVersions = exports.getSecretMetadata = exports.listSecrets = exports.getSecret = exports.secretManagerConsoleUri = void 0;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
const error_1 = require("../error");
|
|
6
6
|
const apiv2_1 = require("../apiv2");
|
|
@@ -44,6 +44,20 @@ async function listSecrets(projectId, filter) {
|
|
|
44
44
|
return secrets;
|
|
45
45
|
}
|
|
46
46
|
exports.listSecrets = listSecrets;
|
|
47
|
+
async function getSecretMetadata(projectId, secretName, version) {
|
|
48
|
+
const secretInfo = {};
|
|
49
|
+
try {
|
|
50
|
+
secretInfo.secret = await getSecret(projectId, secretName);
|
|
51
|
+
secretInfo.secretVersion = getSecretVersion(projectId, secretName, version);
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
if (err.status !== 404) {
|
|
55
|
+
throw err;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return secretInfo;
|
|
59
|
+
}
|
|
60
|
+
exports.getSecretMetadata = getSecretMetadata;
|
|
47
61
|
async function listSecretVersions(projectId, name, filter) {
|
|
48
62
|
const secrets = [];
|
|
49
63
|
const path = `projects/${projectId}/secrets/${name}/versions`;
|
package/lib/gcp/storage.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getServiceAccount = exports.getBucket = exports.deleteObject = exports.uploadObject = exports.upload = exports.getDefaultBucket = void 0;
|
|
3
|
+
exports.getServiceAccount = exports.listBuckets = exports.getBucket = exports.deleteObject = exports.uploadObject = exports.upload = exports.getDefaultBucket = void 0;
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const api_1 = require("../api");
|
|
6
6
|
const apiv2_1 = require("../apiv2");
|
|
@@ -80,6 +80,20 @@ async function getBucket(bucketName) {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
exports.getBucket = getBucket;
|
|
83
|
+
async function listBuckets(projectId) {
|
|
84
|
+
try {
|
|
85
|
+
const localAPIClient = new apiv2_1.Client({ urlPrefix: api_1.storageOrigin });
|
|
86
|
+
const result = await localAPIClient.get(`/storage/v1/b?project=${projectId}`);
|
|
87
|
+
return result.body.items.map((bucket) => bucket.name);
|
|
88
|
+
}
|
|
89
|
+
catch (err) {
|
|
90
|
+
logger_1.logger.debug(err);
|
|
91
|
+
throw new error_1.FirebaseError("Failed to read the storage buckets", {
|
|
92
|
+
original: err,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.listBuckets = listBuckets;
|
|
83
97
|
async function getServiceAccount(projectId) {
|
|
84
98
|
try {
|
|
85
99
|
const localAPIClient = new apiv2_1.Client({ urlPrefix: api_1.storageOrigin });
|
package/lib/previews.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.previews = void 0;
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
5
|
const configstore_1 = require("./configstore");
|
|
6
|
-
exports.previews = Object.assign({ rtdbrules: false, ext: false, extdev: false, rtdbmanagement: false, golang: false, deletegcfartifacts: false, emulatoruisnapshot: false, frameworkawareness: false, functionsparams: false, crossservicerules: false }, configstore_1.configstore.get("previews"));
|
|
6
|
+
exports.previews = Object.assign({ rtdbrules: false, ext: false, extdev: false, rtdbmanagement: false, golang: false, deletegcfartifacts: false, emulatoruisnapshot: false, frameworkawareness: false, functionsparams: false, crossservicerules: false, skipdeployingnoopfunctions: false }, configstore_1.configstore.get("previews"));
|
|
7
7
|
if (process.env.FIREBASE_CLI_PREVIEWS) {
|
|
8
8
|
process.env.FIREBASE_CLI_PREVIEWS.split(",").forEach((feature) => {
|
|
9
9
|
if ((0, lodash_1.has)(exports.previews, feature)) {
|
package/lib/track.js
CHANGED
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "firebase-tools",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.9.0",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "firebase-tools",
|
|
9
|
-
"version": "11.
|
|
9
|
+
"version": "11.9.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@google-cloud/pubsub": "^3.0.1",
|
|
13
13
|
"abort-controller": "^3.0.0",
|
|
14
14
|
"ajv": "^6.12.6",
|
|
15
15
|
"archiver": "^5.0.0",
|
|
16
|
+
"async-lock": "1.3.2",
|
|
16
17
|
"body-parser": "^1.19.0",
|
|
17
18
|
"chokidar": "^3.0.2",
|
|
18
19
|
"cjson": "^0.3.1",
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
"configstore": "^5.0.1",
|
|
23
24
|
"cors": "^2.8.5",
|
|
24
25
|
"cross-env": "^5.1.3",
|
|
25
|
-
"cross-spawn": "^7.0.
|
|
26
|
+
"cross-spawn": "^7.0.3",
|
|
26
27
|
"csv-parse": "^5.0.4",
|
|
27
28
|
"exegesis": "^4.1.0",
|
|
28
29
|
"exegesis-express": "^4.0.0",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"node-fetch": "^2.6.7",
|
|
49
50
|
"open": "^6.3.0",
|
|
50
51
|
"ora": "^5.4.1",
|
|
51
|
-
"portfinder": "^1.0.
|
|
52
|
+
"portfinder": "^1.0.32",
|
|
52
53
|
"progress": "^2.0.3",
|
|
53
54
|
"proxy-agent": "^5.0.0",
|
|
54
55
|
"request": "^2.87.0",
|
|
@@ -78,6 +79,7 @@
|
|
|
78
79
|
"@google/events": "^5.1.1",
|
|
79
80
|
"@manifoldco/swagger-to-ts": "^2.0.0",
|
|
80
81
|
"@types/archiver": "^5.1.0",
|
|
82
|
+
"@types/async-lock": "^1.1.5",
|
|
81
83
|
"@types/body-parser": "^1.17.0",
|
|
82
84
|
"@types/chai": "^4.3.0",
|
|
83
85
|
"@types/chai-as-promised": "^7.1.4",
|
|
@@ -2165,6 +2167,12 @@
|
|
|
2165
2167
|
"@types/glob": "*"
|
|
2166
2168
|
}
|
|
2167
2169
|
},
|
|
2170
|
+
"node_modules/@types/async-lock": {
|
|
2171
|
+
"version": "1.1.5",
|
|
2172
|
+
"resolved": "https://registry.npmjs.org/@types/async-lock/-/async-lock-1.1.5.tgz",
|
|
2173
|
+
"integrity": "sha512-A9ClUfmj6wwZMLRz0NaYzb98YH1exlHdf/cdDSKBfMQJnPOdO8xlEW0Eh2QsTTntGzOFWURcEjYElkZ1IY4GCQ==",
|
|
2174
|
+
"dev": true
|
|
2175
|
+
},
|
|
2168
2176
|
"node_modules/@types/body-parser": {
|
|
2169
2177
|
"version": "1.17.0",
|
|
2170
2178
|
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz",
|
|
@@ -3518,6 +3526,11 @@
|
|
|
3518
3526
|
"lodash": "^4.17.14"
|
|
3519
3527
|
}
|
|
3520
3528
|
},
|
|
3529
|
+
"node_modules/async-lock": {
|
|
3530
|
+
"version": "1.3.2",
|
|
3531
|
+
"resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.3.2.tgz",
|
|
3532
|
+
"integrity": "sha512-phnXdS3RP7PPcmP6NWWzWMU0sLTeyvtZCxBPpZdkYE3seGLKSQZs9FrmVO/qwypq98FUtWWUEYxziLkdGk5nnA=="
|
|
3533
|
+
},
|
|
3521
3534
|
"node_modules/asynckit": {
|
|
3522
3535
|
"version": "0.4.0",
|
|
3523
3536
|
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
|
@@ -4683,9 +4696,9 @@
|
|
|
4683
4696
|
}
|
|
4684
4697
|
},
|
|
4685
4698
|
"node_modules/cross-spawn": {
|
|
4686
|
-
"version": "7.0.
|
|
4687
|
-
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.
|
|
4688
|
-
"integrity": "sha512-
|
|
4699
|
+
"version": "7.0.3",
|
|
4700
|
+
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
|
4701
|
+
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
|
4689
4702
|
"dependencies": {
|
|
4690
4703
|
"path-key": "^3.1.0",
|
|
4691
4704
|
"shebang-command": "^2.0.0",
|
|
@@ -9555,11 +9568,11 @@
|
|
|
9555
9568
|
}
|
|
9556
9569
|
},
|
|
9557
9570
|
"node_modules/mkdirp": {
|
|
9558
|
-
"version": "0.5.
|
|
9559
|
-
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.
|
|
9560
|
-
"integrity": "sha512-
|
|
9571
|
+
"version": "0.5.6",
|
|
9572
|
+
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
|
|
9573
|
+
"integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
|
|
9561
9574
|
"dependencies": {
|
|
9562
|
-
"minimist": "^1.2.
|
|
9575
|
+
"minimist": "^1.2.6"
|
|
9563
9576
|
},
|
|
9564
9577
|
"bin": {
|
|
9565
9578
|
"mkdirp": "bin/cmd.js"
|
|
@@ -10896,13 +10909,13 @@
|
|
|
10896
10909
|
}
|
|
10897
10910
|
},
|
|
10898
10911
|
"node_modules/portfinder": {
|
|
10899
|
-
"version": "1.0.
|
|
10900
|
-
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.
|
|
10901
|
-
"integrity": "sha512-
|
|
10912
|
+
"version": "1.0.32",
|
|
10913
|
+
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz",
|
|
10914
|
+
"integrity": "sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==",
|
|
10902
10915
|
"dependencies": {
|
|
10903
|
-
"async": "^2.6.
|
|
10904
|
-
"debug": "^3.
|
|
10905
|
-
"mkdirp": "^0.5.
|
|
10916
|
+
"async": "^2.6.4",
|
|
10917
|
+
"debug": "^3.2.7",
|
|
10918
|
+
"mkdirp": "^0.5.6"
|
|
10906
10919
|
},
|
|
10907
10920
|
"engines": {
|
|
10908
10921
|
"node": ">= 0.12.0"
|
|
@@ -15976,6 +15989,12 @@
|
|
|
15976
15989
|
"@types/glob": "*"
|
|
15977
15990
|
}
|
|
15978
15991
|
},
|
|
15992
|
+
"@types/async-lock": {
|
|
15993
|
+
"version": "1.1.5",
|
|
15994
|
+
"resolved": "https://registry.npmjs.org/@types/async-lock/-/async-lock-1.1.5.tgz",
|
|
15995
|
+
"integrity": "sha512-A9ClUfmj6wwZMLRz0NaYzb98YH1exlHdf/cdDSKBfMQJnPOdO8xlEW0Eh2QsTTntGzOFWURcEjYElkZ1IY4GCQ==",
|
|
15996
|
+
"dev": true
|
|
15997
|
+
},
|
|
15979
15998
|
"@types/body-parser": {
|
|
15980
15999
|
"version": "1.17.0",
|
|
15981
16000
|
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.17.0.tgz",
|
|
@@ -17102,6 +17121,11 @@
|
|
|
17102
17121
|
"lodash": "^4.17.14"
|
|
17103
17122
|
}
|
|
17104
17123
|
},
|
|
17124
|
+
"async-lock": {
|
|
17125
|
+
"version": "1.3.2",
|
|
17126
|
+
"resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.3.2.tgz",
|
|
17127
|
+
"integrity": "sha512-phnXdS3RP7PPcmP6NWWzWMU0sLTeyvtZCxBPpZdkYE3seGLKSQZs9FrmVO/qwypq98FUtWWUEYxziLkdGk5nnA=="
|
|
17128
|
+
},
|
|
17105
17129
|
"asynckit": {
|
|
17106
17130
|
"version": "0.4.0",
|
|
17107
17131
|
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
|
@@ -17992,9 +18016,9 @@
|
|
|
17992
18016
|
}
|
|
17993
18017
|
},
|
|
17994
18018
|
"cross-spawn": {
|
|
17995
|
-
"version": "7.0.
|
|
17996
|
-
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.
|
|
17997
|
-
"integrity": "sha512-
|
|
18019
|
+
"version": "7.0.3",
|
|
18020
|
+
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
|
18021
|
+
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
|
17998
18022
|
"requires": {
|
|
17999
18023
|
"path-key": "^3.1.0",
|
|
18000
18024
|
"shebang-command": "^2.0.0",
|
|
@@ -21829,11 +21853,11 @@
|
|
|
21829
21853
|
}
|
|
21830
21854
|
},
|
|
21831
21855
|
"mkdirp": {
|
|
21832
|
-
"version": "0.5.
|
|
21833
|
-
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.
|
|
21834
|
-
"integrity": "sha512-
|
|
21856
|
+
"version": "0.5.6",
|
|
21857
|
+
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
|
|
21858
|
+
"integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
|
|
21835
21859
|
"requires": {
|
|
21836
|
-
"minimist": "^1.2.
|
|
21860
|
+
"minimist": "^1.2.6"
|
|
21837
21861
|
}
|
|
21838
21862
|
},
|
|
21839
21863
|
"mkdirp-classic": {
|
|
@@ -22852,13 +22876,13 @@
|
|
|
22852
22876
|
}
|
|
22853
22877
|
},
|
|
22854
22878
|
"portfinder": {
|
|
22855
|
-
"version": "1.0.
|
|
22856
|
-
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.
|
|
22857
|
-
"integrity": "sha512-
|
|
22879
|
+
"version": "1.0.32",
|
|
22880
|
+
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz",
|
|
22881
|
+
"integrity": "sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==",
|
|
22858
22882
|
"requires": {
|
|
22859
|
-
"async": "^2.6.
|
|
22860
|
-
"debug": "^3.
|
|
22861
|
-
"mkdirp": "^0.5.
|
|
22883
|
+
"async": "^2.6.4",
|
|
22884
|
+
"debug": "^3.2.7",
|
|
22885
|
+
"mkdirp": "^0.5.6"
|
|
22862
22886
|
},
|
|
22863
22887
|
"dependencies": {
|
|
22864
22888
|
"debug": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "firebase-tools",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.9.0",
|
|
4
4
|
"description": "Command-Line Interface for Firebase",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
"lint:quiet": "npm run lint:ts -- --quiet && npm run lint:other",
|
|
22
22
|
"lint:ts": "eslint --config .eslintrc.js --ext .ts,.js .",
|
|
23
23
|
"mocha": "nyc mocha 'src/test/**/*.{ts,js}'",
|
|
24
|
-
"mocha:storage-spec": "mocha 'src/test/emulators/storage/*.spec.ts'",
|
|
25
|
-
"mocha:storage-emulator-integration": "mocha 'scripts/storage-emulator-integration/tests.ts'",
|
|
26
24
|
"prepare": "npm run clean && npm run build -- --build tsconfig.publish.json",
|
|
27
25
|
"test": "npm run lint:quiet && npm run test:compile && npm run mocha",
|
|
28
26
|
"test:client-integration": "bash ./scripts/client-integration-tests/run.sh",
|
|
@@ -35,6 +33,7 @@
|
|
|
35
33
|
"test:hosting-rewrites": "bash ./scripts/hosting-tests/rewrites-tests/run.sh",
|
|
36
34
|
"test:import-export": "bash ./scripts/emulator-import-export-tests/run.sh",
|
|
37
35
|
"test:triggers-end-to-end": "bash ./scripts/triggers-end-to-end-tests/run.sh",
|
|
36
|
+
"test:triggers-end-to-end:inspect": "bash ./scripts/triggers-end-to-end-tests/run.sh inspect",
|
|
38
37
|
"test:storage-deploy": "bash ./scripts/storage-deploy-tests/run.sh",
|
|
39
38
|
"test:storage-emulator-integration": "bash ./scripts/storage-emulator-integration/run.sh"
|
|
40
39
|
},
|
|
@@ -94,6 +93,7 @@
|
|
|
94
93
|
"abort-controller": "^3.0.0",
|
|
95
94
|
"ajv": "^6.12.6",
|
|
96
95
|
"archiver": "^5.0.0",
|
|
96
|
+
"async-lock": "1.3.2",
|
|
97
97
|
"body-parser": "^1.19.0",
|
|
98
98
|
"chokidar": "^3.0.2",
|
|
99
99
|
"cjson": "^0.3.1",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"configstore": "^5.0.1",
|
|
104
104
|
"cors": "^2.8.5",
|
|
105
105
|
"cross-env": "^5.1.3",
|
|
106
|
-
"cross-spawn": "^7.0.
|
|
106
|
+
"cross-spawn": "^7.0.3",
|
|
107
107
|
"csv-parse": "^5.0.4",
|
|
108
108
|
"exegesis": "^4.1.0",
|
|
109
109
|
"exegesis-express": "^4.0.0",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"node-fetch": "^2.6.7",
|
|
130
130
|
"open": "^6.3.0",
|
|
131
131
|
"ora": "^5.4.1",
|
|
132
|
-
"portfinder": "^1.0.
|
|
132
|
+
"portfinder": "^1.0.32",
|
|
133
133
|
"progress": "^2.0.3",
|
|
134
134
|
"proxy-agent": "^5.0.0",
|
|
135
135
|
"request": "^2.87.0",
|
|
@@ -156,6 +156,7 @@
|
|
|
156
156
|
"@google/events": "^5.1.1",
|
|
157
157
|
"@manifoldco/swagger-to-ts": "^2.0.0",
|
|
158
158
|
"@types/archiver": "^5.1.0",
|
|
159
|
+
"@types/async-lock": "^1.1.5",
|
|
159
160
|
"@types/body-parser": "^1.17.0",
|
|
160
161
|
"@types/chai": "^4.3.0",
|
|
161
162
|
"@types/chai-as-promised": "^7.1.4",
|