firebase-tools 10.7.1 → 10.7.2
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/deploy/functions/build.js +19 -8
- package/lib/deploy/functions/checkIam.js +1 -8
- package/lib/deploy/functions/containerCleaner.js +8 -7
- package/lib/deploy/functions/release/executor.js +1 -1
- package/lib/deploy/functions/runtimes/golang/index.js +3 -0
- package/lib/deploy/functions/runtimes/node/index.js +7 -0
- package/lib/deploy/functions/runtimes/node/parseTriggers.js +108 -1
- package/lib/deploy/functions/validate.js +1 -1
- package/lib/emulator/auth/cloudFunctions.js +6 -2
- package/lib/emulator/auth/operations.js +0 -1
- package/lib/emulator/auth/server.js +8 -1
- package/lib/emulator/auth/state.js +27 -24
- package/lib/emulator/databaseEmulator.js +36 -3
- package/lib/emulator/downloadableEmulators.js +7 -7
- package/lib/emulator/functionsEmulator.js +2 -6
- package/lib/emulator/functionsEmulatorRuntime.js +1 -1
- package/lib/emulator/functionsEmulatorShared.js +3 -0
- package/lib/emulator/functionsEmulatorUtils.js +5 -1
- package/lib/emulator/storage/apis/firebase.js +26 -4
- package/lib/extensions/paramHelper.js +2 -0
- package/lib/extensions/warnings.js +8 -1
- package/lib/gcp/cloudfunctionsv2.js +13 -6
- package/npm-shrinkwrap.json +214 -527
- package/package.json +3 -3
|
@@ -11,6 +11,7 @@ const askUserForParam = require("./askUserForParam");
|
|
|
11
11
|
const track_1 = require("../track");
|
|
12
12
|
const env = require("../functions/env");
|
|
13
13
|
const utils_1 = require("../utils");
|
|
14
|
+
const warnings_1 = require("./warnings");
|
|
14
15
|
function getBaseParamBindings(params) {
|
|
15
16
|
let ret = {};
|
|
16
17
|
for (const [k, v] of Object.entries(params)) {
|
|
@@ -57,6 +58,7 @@ async function getParams(args) {
|
|
|
57
58
|
paramsMessage);
|
|
58
59
|
}
|
|
59
60
|
else if (args.paramsEnvPath) {
|
|
61
|
+
(0, warnings_1.paramsFlagDeprecationWarning)();
|
|
60
62
|
params = getParamsFromFile({
|
|
61
63
|
paramSpecs: args.paramSpecs,
|
|
62
64
|
paramsEnvPath: args.paramsEnvPath,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.displayWarningsForDeploy = exports.displayWarningPrompts = void 0;
|
|
3
|
+
exports.paramsFlagDeprecationWarning = exports.displayWarningsForDeploy = exports.displayWarningPrompts = void 0;
|
|
4
4
|
const { marked } = require("marked");
|
|
5
5
|
const clc = require("cli-color");
|
|
6
6
|
const extensionsApi_1 = require("./extensionsApi");
|
|
@@ -11,6 +11,7 @@ const deploymentSummary_1 = require("../deploy/extensions/deploymentSummary");
|
|
|
11
11
|
const planner_1 = require("../deploy/extensions/planner");
|
|
12
12
|
const functional_1 = require("../functional");
|
|
13
13
|
const utils = require("../utils");
|
|
14
|
+
const logger_1 = require("../logger");
|
|
14
15
|
function displayEAPWarning({ publisherId, sourceDownloadUri, githubLink, }) {
|
|
15
16
|
const publisherNameLink = githubLink ? `[${publisherId}](${githubLink})` : publisherId;
|
|
16
17
|
const warningMsg = `This extension is in preview and is built by a developer in the [Extensions Publisher Early Access Program](http://bit.ly/firex-provider). Its functionality might change in backward-incompatible ways. Since this extension isn't built by Firebase, reach out to ${publisherNameLink} with questions about this extension.`;
|
|
@@ -68,3 +69,9 @@ async function displayWarningsForDeploy(instancesToCreate) {
|
|
|
68
69
|
return experimental.length > 0 || eapExtensions.length > 0;
|
|
69
70
|
}
|
|
70
71
|
exports.displayWarningsForDeploy = displayWarningsForDeploy;
|
|
72
|
+
function paramsFlagDeprecationWarning() {
|
|
73
|
+
logger_1.logger.warn("The --params flag is deprecated and will be removed in firebase-tools@11. " +
|
|
74
|
+
"Instead, use an extensions manifest and `firebase deploy --only extensions` to deploy extensions noninteractively. " +
|
|
75
|
+
"See https://firebase.google.com/docs/extensions/manifest for more details");
|
|
76
|
+
}
|
|
77
|
+
exports.paramsFlagDeprecationWarning = paramsFlagDeprecationWarning;
|
|
@@ -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.
|
|
3
|
+
exports.endpointFromFunction = exports.functionFromEndpoint = exports.deleteFunction = exports.updateFunction = exports.listAllFunctions = exports.listFunctions = exports.getFunction = exports.createFunction = exports.generateUploadUrl = exports.mebibytes = exports.BLOCKING_LABEL = exports.CODEBASE_LABEL = exports.API_VERSION = void 0;
|
|
4
4
|
const clc = require("cli-color");
|
|
5
5
|
const apiv2_1 = require("../apiv2");
|
|
6
6
|
const error_1 = require("../error");
|
|
@@ -39,7 +39,7 @@ const BYTES_PER_UNIT = {
|
|
|
39
39
|
Gi: 1 << 30,
|
|
40
40
|
Ti: 1 << 40,
|
|
41
41
|
};
|
|
42
|
-
function
|
|
42
|
+
function mebibytes(memory) {
|
|
43
43
|
const re = /^([0-9]+(\.[0-9]*)?)(Ki|Mi|Gi|Ti|k|M|G|T|([eE]([0-9]+)))?$/;
|
|
44
44
|
const matches = re.exec(memory);
|
|
45
45
|
if (!matches) {
|
|
@@ -54,9 +54,9 @@ function megabytes(memory) {
|
|
|
54
54
|
const suffix = matches[3] || "";
|
|
55
55
|
bytes = quantity * BYTES_PER_UNIT[suffix];
|
|
56
56
|
}
|
|
57
|
-
return bytes /
|
|
57
|
+
return bytes / (1 << 20);
|
|
58
58
|
}
|
|
59
|
-
exports.
|
|
59
|
+
exports.mebibytes = mebibytes;
|
|
60
60
|
function functionsOpLogReject(funcName, type, err) {
|
|
61
61
|
var _a, _b;
|
|
62
62
|
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) {
|
|
@@ -179,7 +179,14 @@ function functionFromEndpoint(endpoint, source) {
|
|
|
179
179
|
};
|
|
180
180
|
proto.copyIfPresent(gcfFunction, endpoint, "labels");
|
|
181
181
|
proto.copyIfPresent(gcfFunction.serviceConfig, endpoint, "environmentVariables", "serviceAccountEmail", "ingressSettings", "timeoutSeconds");
|
|
182
|
-
proto.renameIfPresent(gcfFunction.serviceConfig, endpoint, "availableMemory", "availableMemoryMb", (mb) =>
|
|
182
|
+
proto.renameIfPresent(gcfFunction.serviceConfig, endpoint, "availableMemory", "availableMemoryMb", (mb) => {
|
|
183
|
+
if (mb > 1024) {
|
|
184
|
+
return `${mb / 1024}Gi`;
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
return `${mb}Mi`;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
183
190
|
proto.renameIfPresent(gcfFunction.serviceConfig, endpoint, "minInstanceCount", "minInstances");
|
|
184
191
|
proto.renameIfPresent(gcfFunction.serviceConfig, endpoint, "maxInstanceCount", "maxInstances");
|
|
185
192
|
if (endpoint.vpc) {
|
|
@@ -289,7 +296,7 @@ function endpointFromFunction(gcfFunction) {
|
|
|
289
296
|
project,
|
|
290
297
|
region }, trigger), { entryPoint: gcfFunction.buildConfig.entryPoint, runtime: gcfFunction.buildConfig.runtime, uri: gcfFunction.serviceConfig.uri });
|
|
291
298
|
proto.copyIfPresent(endpoint, gcfFunction.serviceConfig, "serviceAccountEmail", "ingressSettings", "environmentVariables", "timeoutSeconds");
|
|
292
|
-
proto.renameIfPresent(endpoint, gcfFunction.serviceConfig, "availableMemoryMb", "availableMemory",
|
|
299
|
+
proto.renameIfPresent(endpoint, gcfFunction.serviceConfig, "availableMemoryMb", "availableMemory", mebibytes);
|
|
293
300
|
proto.renameIfPresent(endpoint, gcfFunction.serviceConfig, "minInstances", "minInstanceCount");
|
|
294
301
|
proto.renameIfPresent(endpoint, gcfFunction.serviceConfig, "maxInstances", "maxInstanceCount");
|
|
295
302
|
proto.copyIfPresent(endpoint, gcfFunction, "labels");
|