firebase-tools 10.2.0 → 10.2.1
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/apiv2.js +3 -0
- package/lib/commands/auth-import.js +1 -1
- package/lib/commands/functions-config-clone.js +1 -1
- package/lib/deploy/hosting/client.js +9 -0
- package/lib/deploy/hosting/convertConfig.js +6 -0
- package/lib/deploy/hosting/index.js +5 -5
- package/lib/deploy/hosting/prepare.js +25 -25
- package/lib/deploy/hosting/release.js +21 -24
- package/lib/emulator/commandUtils.js +5 -1
- package/lib/emulator/downloadableEmulators.js +29 -12
- package/lib/emulator/functionsEmulator.js +14 -4
- package/lib/extensions/listExtensions.js +2 -0
- package/lib/gcp/storage.js +1 -0
- package/lib/hosting/functionsProxy.js +15 -5
- package/lib/previews.js +1 -1
- package/lib/responseToError.js +16 -7
- package/lib/serve/hosting.js +1 -1
- package/npm-shrinkwrap.json +124 -25
- package/package.json +3 -3
- package/schema/firebase-config.json +27 -0
package/lib/apiv2.js
CHANGED
|
@@ -93,7 +93,7 @@ module.exports = new command_1.Command("auth:import [dataFile]")
|
|
|
93
93
|
if (err) {
|
|
94
94
|
throw new error_1.FirebaseError(`Validation Error: ${err}`);
|
|
95
95
|
}
|
|
96
|
-
currentBatch.push(
|
|
96
|
+
currentBatch.push(value);
|
|
97
97
|
if (currentBatch.length === MAX_BATCH_SIZE) {
|
|
98
98
|
batches.push(currentBatch);
|
|
99
99
|
currentBatch = [];
|
|
@@ -38,7 +38,7 @@ exports.default = new command_1.Command("functions:config:clone")
|
|
|
38
38
|
else if (options.only && options.except) {
|
|
39
39
|
throw new error_1.FirebaseError("Cannot use both --only and --except at the same time.");
|
|
40
40
|
}
|
|
41
|
-
let only
|
|
41
|
+
let only;
|
|
42
42
|
let except = [];
|
|
43
43
|
if (options.only) {
|
|
44
44
|
only = options.only.split(",");
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.client = void 0;
|
|
4
|
+
const api_1 = require("../../api");
|
|
5
|
+
const apiv2_1 = require("../../apiv2");
|
|
6
|
+
exports.client = new apiv2_1.Client({
|
|
7
|
+
urlPrefix: api_1.hostingApiOrigin,
|
|
8
|
+
apiVersion: "v1beta1",
|
|
9
|
+
});
|
|
@@ -46,6 +46,12 @@ function convertConfig(config) {
|
|
|
46
46
|
}
|
|
47
47
|
else if ("function" in rewrite) {
|
|
48
48
|
vRewrite.function = rewrite.function;
|
|
49
|
+
if (rewrite.region) {
|
|
50
|
+
vRewrite.functionRegion = rewrite.region;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
vRewrite.functionRegion = "us-central1";
|
|
54
|
+
}
|
|
49
55
|
}
|
|
50
56
|
else if ("dynamicLinks" in rewrite) {
|
|
51
57
|
vRewrite.dynamicLinks = rewrite.dynamicLinks;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.release = exports.deploy = exports.prepare = void 0;
|
|
4
|
-
|
|
5
|
-
exports
|
|
6
|
-
|
|
4
|
+
var prepare_1 = require("./prepare");
|
|
5
|
+
Object.defineProperty(exports, "prepare", { enumerable: true, get: function () { return prepare_1.prepare; } });
|
|
6
|
+
var deploy_1 = require("./deploy");
|
|
7
7
|
Object.defineProperty(exports, "deploy", { enumerable: true, get: function () { return deploy_1.deploy; } });
|
|
8
|
-
|
|
9
|
-
exports
|
|
8
|
+
var release_1 = require("./release");
|
|
9
|
+
Object.defineProperty(exports, "release", { enumerable: true, get: function () { return release_1.release; } });
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prepare = void 0;
|
|
4
|
+
const error_1 = require("../../error");
|
|
5
|
+
const client_1 = require("./client");
|
|
6
|
+
const projectUtils_1 = require("../../projectUtils");
|
|
7
|
+
const normalizedHostingConfigs_1 = require("../../hosting/normalizedHostingConfigs");
|
|
8
|
+
const validate_1 = require("./validate");
|
|
9
|
+
const convertConfig_1 = require("./convertConfig");
|
|
5
10
|
const deploymentTool = require("../../deploymentTool");
|
|
6
|
-
|
|
7
|
-
const { normalizedHostingConfigs } = require("../../hosting/normalizedHostingConfigs");
|
|
8
|
-
const { validateDeploy } = require("./validate");
|
|
9
|
-
module.exports = function (context, options) {
|
|
11
|
+
async function prepare(context, options) {
|
|
10
12
|
if (options.public) {
|
|
11
|
-
if (
|
|
12
|
-
throw new FirebaseError("Cannot specify --public option with multi-site configuration.");
|
|
13
|
+
if (Array.isArray(options.config.get("hosting"))) {
|
|
14
|
+
throw new error_1.FirebaseError("Cannot specify --public option with multi-site configuration.");
|
|
13
15
|
}
|
|
14
16
|
options.config.set("hosting.public", options.public);
|
|
15
17
|
}
|
|
16
|
-
const
|
|
18
|
+
const projectNumber = await (0, projectUtils_1.needProjectNumber)(options);
|
|
19
|
+
const configs = (0, normalizedHostingConfigs_1.normalizedHostingConfigs)(options, { resolveTargets: true });
|
|
17
20
|
if (configs.length === 0) {
|
|
18
21
|
return Promise.resolve();
|
|
19
22
|
}
|
|
20
23
|
context.hosting = {
|
|
21
|
-
deploys: configs.map(
|
|
24
|
+
deploys: configs.map((cfg) => {
|
|
22
25
|
return { config: cfg, site: cfg.site };
|
|
23
26
|
}),
|
|
24
27
|
};
|
|
25
28
|
const versionCreates = [];
|
|
26
|
-
|
|
29
|
+
for (const deploy of context.hosting.deploys) {
|
|
27
30
|
const cfg = deploy.config;
|
|
28
|
-
validateDeploy(deploy, options);
|
|
31
|
+
(0, validate_1.validateDeploy)(deploy, options);
|
|
29
32
|
const data = {
|
|
30
|
-
config: convertConfig(cfg),
|
|
33
|
+
config: (0, convertConfig_1.convertConfig)(cfg),
|
|
31
34
|
labels: deploymentTool.labels(),
|
|
32
35
|
};
|
|
33
|
-
versionCreates.push(
|
|
34
|
-
.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
data,
|
|
38
|
-
})
|
|
39
|
-
.then(function (result) {
|
|
40
|
-
deploy.version = result.body.name;
|
|
36
|
+
versionCreates.push(client_1.client
|
|
37
|
+
.post(`/projects/${projectNumber}/sites/${deploy.site}/versions`, data)
|
|
38
|
+
.then((res) => {
|
|
39
|
+
deploy.version = res.body.name;
|
|
41
40
|
}));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
}
|
|
41
|
+
}
|
|
42
|
+
await Promise.all(versionCreates);
|
|
43
|
+
}
|
|
44
|
+
exports.prepare = prepare;
|
|
@@ -1,34 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.release = void 0;
|
|
4
|
+
const client_1 = require("./client");
|
|
5
|
+
const logger_1 = require("../../logger");
|
|
6
|
+
const projectUtils_1 = require("../../projectUtils");
|
|
3
7
|
const utils = require("../../utils");
|
|
4
|
-
|
|
5
|
-
module.exports = function (context, options) {
|
|
8
|
+
async function release(context, options) {
|
|
6
9
|
if (!context.hosting || !context.hosting.deploys) {
|
|
7
|
-
return
|
|
10
|
+
return;
|
|
8
11
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
-
logger.debug("[hosting] finalized version for " + deploy.site + ":", finalizeResult.body);
|
|
18
|
-
utils.logLabeledSuccess("hosting[" + deploy.site + "]", "version finalized");
|
|
19
|
-
utils.logLabeledBullet("hosting[" + deploy.site + "]", "releasing new version...");
|
|
12
|
+
const projectNumber = await (0, projectUtils_1.needProjectNumber)(options);
|
|
13
|
+
logger_1.logger.debug(JSON.stringify(context.hosting.deploys, null, 2));
|
|
14
|
+
await Promise.all(context.hosting.deploys.map(async (deploy) => {
|
|
15
|
+
utils.logLabeledBullet(`hosting[${deploy.site}]`, "finalizing version...");
|
|
16
|
+
const finalizeResult = await client_1.client.patch(`/${deploy.version}`, { status: "FINALIZED" }, { queryParams: { updateMask: "status" } });
|
|
17
|
+
logger_1.logger.debug(`[hosting] finalized version for ${deploy.site}:${finalizeResult.body}`);
|
|
18
|
+
utils.logLabeledSuccess(`hosting[${deploy.site}]`, "version finalized");
|
|
19
|
+
utils.logLabeledBullet(`hosting[${deploy.site}]`, "releasing new version...");
|
|
20
20
|
const channelSegment = context.hostingChannel && context.hostingChannel !== "live"
|
|
21
21
|
? `/channels/${context.hostingChannel}`
|
|
22
22
|
: "";
|
|
23
23
|
if (channelSegment) {
|
|
24
|
-
logger.debug("[hosting] releasing to channel:", context.hostingChannel);
|
|
24
|
+
logger_1.logger.debug("[hosting] releasing to channel:", context.hostingChannel);
|
|
25
25
|
}
|
|
26
|
-
const releaseResult = await
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
data: { message: options.message || null },
|
|
30
|
-
});
|
|
31
|
-
logger.debug("[hosting] release:", releaseResult.body);
|
|
32
|
-
utils.logLabeledSuccess("hosting[" + deploy.site + "]", "release complete");
|
|
26
|
+
const releaseResult = await client_1.client.post(`/projects/${projectNumber}/sites/${deploy.site}${channelSegment}/releases`, { message: options.message || null }, { queryParams: { versionName: deploy.version } });
|
|
27
|
+
logger_1.logger.debug("[hosting] release:", releaseResult.body);
|
|
28
|
+
utils.logLabeledSuccess(`hosting[${deploy.site}]`, "release complete");
|
|
33
29
|
}));
|
|
34
|
-
}
|
|
30
|
+
}
|
|
31
|
+
exports.release = release;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emulatorExec = exports.shutdownWhenKilled = exports.setExportOnExitOptions = exports.parseInspectionPort = exports.beforeEmulatorCommand = exports.warnEmulatorNotSupported = exports.printNoticeIfEmulated = exports.DESC_TEST_PARAMS = exports.FLAG_TEST_PARAMS = exports.DESC_TEST_CONFIG = exports.FLAG_TEST_CONFIG = exports.DESC_UI = exports.FLAG_UI = exports.EXPORT_ON_EXIT_USAGE_ERROR = exports.DESC_EXPORT_ON_EXIT = exports.FLAG_EXPORT_ON_EXIT = exports.FLAG_EXPORT_ON_EXIT_NAME = exports.DESC_IMPORT = exports.FLAG_IMPORT = exports.DESC_INSPECT_FUNCTIONS = exports.FLAG_INSPECT_FUNCTIONS = exports.DESC_ONLY = exports.FLAG_ONLY = void 0;
|
|
3
|
+
exports.emulatorExec = exports.shutdownWhenKilled = exports.setExportOnExitOptions = exports.parseInspectionPort = exports.beforeEmulatorCommand = exports.warnEmulatorNotSupported = exports.printNoticeIfEmulated = exports.DESC_TEST_PARAMS = exports.FLAG_TEST_PARAMS = exports.DESC_TEST_CONFIG = exports.FLAG_TEST_CONFIG = exports.DESC_UI = exports.FLAG_UI = exports.EXPORT_ON_EXIT_CWD_DANGER = exports.EXPORT_ON_EXIT_USAGE_ERROR = exports.DESC_EXPORT_ON_EXIT = exports.FLAG_EXPORT_ON_EXIT = exports.FLAG_EXPORT_ON_EXIT_NAME = exports.DESC_IMPORT = exports.FLAG_IMPORT = exports.DESC_INSPECT_FUNCTIONS = exports.FLAG_INSPECT_FUNCTIONS = exports.DESC_ONLY = exports.FLAG_ONLY = void 0;
|
|
4
4
|
const clc = require("cli-color");
|
|
5
5
|
const childProcess = require("child_process");
|
|
6
6
|
const controller = require("../emulator/controller");
|
|
@@ -36,6 +36,7 @@ exports.DESC_EXPORT_ON_EXIT = "automatically export emulator data (emulators:exp
|
|
|
36
36
|
`when no dir is provided the location of ${exports.FLAG_IMPORT} is used`;
|
|
37
37
|
exports.EXPORT_ON_EXIT_USAGE_ERROR = `"${exports.FLAG_EXPORT_ON_EXIT_NAME}" must be used with "${exports.FLAG_IMPORT}"` +
|
|
38
38
|
` or provide a dir directly to "${exports.FLAG_EXPORT_ON_EXIT}"`;
|
|
39
|
+
exports.EXPORT_ON_EXIT_CWD_DANGER = `"${exports.FLAG_EXPORT_ON_EXIT_NAME}" must not point to the current directory or parents. Please choose a new/dedicated directory for exports.`;
|
|
39
40
|
exports.FLAG_UI = "--ui";
|
|
40
41
|
exports.DESC_UI = "run the Emulator UI";
|
|
41
42
|
exports.FLAG_TEST_CONFIG = "--test-config <firebase.json file>";
|
|
@@ -131,6 +132,9 @@ function setExportOnExitOptions(options) {
|
|
|
131
132
|
if (options.exportOnExit === true || !options.exportOnExit) {
|
|
132
133
|
throw new error_1.FirebaseError(exports.EXPORT_ON_EXIT_USAGE_ERROR);
|
|
133
134
|
}
|
|
135
|
+
if (path.resolve(".").startsWith(path.resolve(options.exportOnExit))) {
|
|
136
|
+
throw new error_1.FirebaseError(exports.EXPORT_ON_EXIT_CWD_DANGER);
|
|
137
|
+
}
|
|
134
138
|
}
|
|
135
139
|
return;
|
|
136
140
|
}
|
|
@@ -13,6 +13,7 @@ const path = require("path");
|
|
|
13
13
|
const os = require("os");
|
|
14
14
|
const registry_1 = require("./registry");
|
|
15
15
|
const download_1 = require("../emulator/download");
|
|
16
|
+
const previews_1 = require("../previews");
|
|
16
17
|
const EMULATOR_INSTANCE_KILL_TIMEOUT = 4000;
|
|
17
18
|
const CACHE_DIR = process.env.FIREBASE_EMULATORS_PATH || path.join(os.homedir(), ".cache", "firebase", "emulators");
|
|
18
19
|
exports.DownloadDetails = {
|
|
@@ -49,19 +50,35 @@ exports.DownloadDetails = {
|
|
|
49
50
|
namePrefix: "cloud-storage-rules-emulator",
|
|
50
51
|
},
|
|
51
52
|
},
|
|
52
|
-
ui:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
ui: previews_1.previews.emulatoruisnapshot
|
|
54
|
+
? {
|
|
55
|
+
version: "SNAPSHOT",
|
|
56
|
+
downloadPath: path.join(CACHE_DIR, "ui-vSNAPSHOT.zip"),
|
|
57
|
+
unzipDir: path.join(CACHE_DIR, "ui-vSNAPSHOT"),
|
|
58
|
+
binaryPath: path.join(CACHE_DIR, "ui-vSNAPSHOT", "server.bundle.js"),
|
|
59
|
+
opts: {
|
|
60
|
+
cacheDir: CACHE_DIR,
|
|
61
|
+
remoteUrl: "https://storage.googleapis.com/firebase-preview-drop/emulator/ui-vSNAPSHOT.zip",
|
|
62
|
+
expectedSize: -1,
|
|
63
|
+
expectedChecksum: "",
|
|
64
|
+
skipCache: true,
|
|
65
|
+
skipChecksumAndSize: true,
|
|
66
|
+
namePrefix: "ui",
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
: {
|
|
70
|
+
version: "1.6.5",
|
|
71
|
+
downloadPath: path.join(CACHE_DIR, "ui-v1.6.5.zip"),
|
|
72
|
+
unzipDir: path.join(CACHE_DIR, "ui-v1.6.5"),
|
|
73
|
+
binaryPath: path.join(CACHE_DIR, "ui-v1.6.5", "server.bundle.js"),
|
|
74
|
+
opts: {
|
|
75
|
+
cacheDir: CACHE_DIR,
|
|
76
|
+
remoteUrl: "https://storage.googleapis.com/firebase-preview-drop/emulator/ui-v1.6.5.zip",
|
|
77
|
+
expectedSize: 3816994,
|
|
78
|
+
expectedChecksum: "92dfff4b2ef8ab616e8a60cc93e0a00b",
|
|
79
|
+
namePrefix: "ui",
|
|
80
|
+
},
|
|
63
81
|
},
|
|
64
|
-
},
|
|
65
82
|
pubsub: {
|
|
66
83
|
downloadPath: path.join(CACHE_DIR, "pubsub-emulator-0.1.0.zip"),
|
|
67
84
|
version: "0.1.0",
|
|
@@ -243,6 +243,7 @@ class FunctionsEmulator {
|
|
|
243
243
|
triggerDefinitions = (0, functionsEmulatorShared_1.emulatedFunctionsByRegion)(emulatableBackend.predefinedTriggers);
|
|
244
244
|
}
|
|
245
245
|
else {
|
|
246
|
+
const runtimeConfig = this.getRuntimeConfig(emulatableBackend);
|
|
246
247
|
const runtimeDelegate = await (0, runtimes_1.getRuntimeDelegate)({
|
|
247
248
|
projectId: this.args.projectId,
|
|
248
249
|
projectDir: this.args.projectDir,
|
|
@@ -253,7 +254,7 @@ class FunctionsEmulator {
|
|
|
253
254
|
logger_1.logger.debug(`Building ${runtimeDelegate.name} source`);
|
|
254
255
|
await runtimeDelegate.build();
|
|
255
256
|
logger_1.logger.debug(`Analyzing ${runtimeDelegate.name} backend spec`);
|
|
256
|
-
const discoveredBackend = await runtimeDelegate.discoverSpec(
|
|
257
|
+
const discoveredBackend = await runtimeDelegate.discoverSpec(runtimeConfig, Object.assign(Object.assign(Object.assign(Object.assign({}, this.getSystemEnvs()), this.getEmulatorEnvs()), { FIREBASE_CONFIG: this.getFirebaseConfig() }), emulatableBackend.env));
|
|
257
258
|
const endpoints = backend.allEndpoints(discoveredBackend);
|
|
258
259
|
triggerDefinitions = (0, functionsEmulatorShared_1.emulatedFunctionsFromEndpoints)(endpoints);
|
|
259
260
|
}
|
|
@@ -521,6 +522,16 @@ class FunctionsEmulator {
|
|
|
521
522
|
}
|
|
522
523
|
return process.execPath;
|
|
523
524
|
}
|
|
525
|
+
getRuntimeConfig(backend) {
|
|
526
|
+
const configPath = `${backend.functionsDir}/.runtimeconfig.json`;
|
|
527
|
+
try {
|
|
528
|
+
const configContent = fs.readFileSync(configPath, "utf8");
|
|
529
|
+
return JSON.parse(configContent.toString());
|
|
530
|
+
}
|
|
531
|
+
catch (e) {
|
|
532
|
+
}
|
|
533
|
+
return {};
|
|
534
|
+
}
|
|
524
535
|
getUserEnvs(backend) {
|
|
525
536
|
const projectInfo = {
|
|
526
537
|
functionsSource: backend.functionsDir,
|
|
@@ -543,11 +554,10 @@ class FunctionsEmulator {
|
|
|
543
554
|
envs.K_REVISION = "1";
|
|
544
555
|
envs.PORT = "80";
|
|
545
556
|
if (trigger) {
|
|
546
|
-
const
|
|
547
|
-
const target = service.replace(/-/g, ".");
|
|
557
|
+
const target = trigger.entryPoint;
|
|
548
558
|
envs.FUNCTION_TARGET = target;
|
|
549
559
|
envs.FUNCTION_SIGNATURE_TYPE = (0, functionsEmulatorShared_1.getSignatureType)(trigger);
|
|
550
|
-
envs.K_SERVICE =
|
|
560
|
+
envs.K_SERVICE = trigger.name;
|
|
551
561
|
}
|
|
552
562
|
return envs;
|
|
553
563
|
}
|
|
@@ -8,6 +8,7 @@ const extensionsApi_1 = require("./extensionsApi");
|
|
|
8
8
|
const extensionsHelper_1 = require("./extensionsHelper");
|
|
9
9
|
const utils = require("../utils");
|
|
10
10
|
const extensionsUtils = require("./utils");
|
|
11
|
+
const logger_1 = require("../logger");
|
|
11
12
|
async function listExtensions(projectId) {
|
|
12
13
|
const instances = await (0, extensionsApi_1.listInstances)(projectId);
|
|
13
14
|
if (instances.length < 1) {
|
|
@@ -47,6 +48,7 @@ async function listExtensions(projectId) {
|
|
|
47
48
|
});
|
|
48
49
|
});
|
|
49
50
|
utils.logLabeledBullet(extensionsHelper_1.logPrefix, `list of extensions installed in ${clc.bold(projectId)}:`);
|
|
51
|
+
logger_1.logger.info(table.toString());
|
|
50
52
|
return formatted;
|
|
51
53
|
}
|
|
52
54
|
exports.listExtensions = listExtensions;
|
package/lib/gcp/storage.js
CHANGED
|
@@ -29,6 +29,7 @@ async function upload(source, uploadUrl, extraHeaders) {
|
|
|
29
29
|
method: "PUT",
|
|
30
30
|
path: url.pathname,
|
|
31
31
|
queryParams: url.searchParams,
|
|
32
|
+
responseType: "xml",
|
|
32
33
|
headers: Object.assign({ "content-type": "application/zip" }, extraHeaders),
|
|
33
34
|
body: source.stream,
|
|
34
35
|
skipLog: { resBody: true },
|
|
@@ -1,26 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.functionsProxy = void 0;
|
|
3
4
|
const lodash_1 = require("lodash");
|
|
4
5
|
const proxy_1 = require("./proxy");
|
|
5
6
|
const projectUtils_1 = require("../projectUtils");
|
|
6
7
|
const registry_1 = require("../emulator/registry");
|
|
7
8
|
const types_1 = require("../emulator/types");
|
|
8
9
|
const functionsEmulator_1 = require("../emulator/functionsEmulator");
|
|
9
|
-
|
|
10
|
+
const error_1 = require("../error");
|
|
11
|
+
function functionsProxy(options) {
|
|
10
12
|
return (rewrite) => {
|
|
11
13
|
return new Promise((resolve) => {
|
|
12
14
|
const projectId = (0, projectUtils_1.needProjectId)(options);
|
|
13
|
-
|
|
15
|
+
if (!("function" in rewrite)) {
|
|
16
|
+
throw new error_1.FirebaseError(`A non-function rewrite cannot be used in functionsProxy`, {
|
|
17
|
+
exit: 2,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
if (!rewrite.region) {
|
|
21
|
+
rewrite.region = "us-central1";
|
|
22
|
+
}
|
|
23
|
+
let url = `https://${rewrite.region}-${projectId}.cloudfunctions.net/${rewrite.function}`;
|
|
14
24
|
let destLabel = "live";
|
|
15
25
|
if ((0, lodash_1.includes)(options.targets, "functions")) {
|
|
16
26
|
destLabel = "local";
|
|
17
27
|
const functionsEmu = registry_1.EmulatorRegistry.get(types_1.Emulators.FUNCTIONS);
|
|
18
28
|
if (functionsEmu) {
|
|
19
|
-
url = functionsEmulator_1.FunctionsEmulator.getHttpFunctionUrl(functionsEmu.getInfo().host, functionsEmu.getInfo().port, projectId, rewrite.function,
|
|
29
|
+
url = functionsEmulator_1.FunctionsEmulator.getHttpFunctionUrl(functionsEmu.getInfo().host, functionsEmu.getInfo().port, projectId, rewrite.function, rewrite.region);
|
|
20
30
|
}
|
|
21
31
|
}
|
|
22
|
-
resolve((0, proxy_1.proxyRequestHandler)(url, `${destLabel} Function ${rewrite.function}`));
|
|
32
|
+
resolve((0, proxy_1.proxyRequestHandler)(url, `${destLabel} Function ${rewrite.region}/${rewrite.function}`));
|
|
23
33
|
});
|
|
24
34
|
};
|
|
25
35
|
}
|
|
26
|
-
exports.
|
|
36
|
+
exports.functionsProxy = functionsProxy;
|
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, functionsv2: false, golang: false, deletegcfartifacts: false, artifactregistry: false }, configstore_1.configstore.get("previews"));
|
|
6
|
+
exports.previews = Object.assign({ rtdbrules: false, ext: false, extdev: false, rtdbmanagement: false, functionsv2: false, golang: false, deletegcfartifacts: false, artifactregistry: false, emulatoruisnapshot: 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/responseToError.js
CHANGED
|
@@ -2,16 +2,25 @@
|
|
|
2
2
|
const _ = require("lodash");
|
|
3
3
|
const { FirebaseError } = require("./error");
|
|
4
4
|
module.exports = function (response, body) {
|
|
5
|
-
if (typeof body === "string" && response.statusCode === 404) {
|
|
6
|
-
body = {
|
|
7
|
-
error: {
|
|
8
|
-
message: "Not Found",
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
5
|
if (response.statusCode < 400) {
|
|
13
6
|
return null;
|
|
14
7
|
}
|
|
8
|
+
if (typeof body === "string") {
|
|
9
|
+
if (response.statusCode === 404) {
|
|
10
|
+
body = {
|
|
11
|
+
error: {
|
|
12
|
+
message: "Not Found",
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
body = {
|
|
18
|
+
error: {
|
|
19
|
+
message: body,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
15
24
|
if (typeof body !== "object") {
|
|
16
25
|
try {
|
|
17
26
|
body = JSON.parse(body);
|
package/lib/serve/hosting.js
CHANGED
|
@@ -46,7 +46,7 @@ function startServer(options, config, port, init) {
|
|
|
46
46
|
},
|
|
47
47
|
},
|
|
48
48
|
rewriters: {
|
|
49
|
-
function: (0, functionsProxy_1.
|
|
49
|
+
function: (0, functionsProxy_1.functionsProxy)(options),
|
|
50
50
|
run: (0, cloudRunProxy_1.default)(options),
|
|
51
51
|
},
|
|
52
52
|
}).listen(() => {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "firebase-tools",
|
|
3
|
-
"version": "10.2.
|
|
3
|
+
"version": "10.2.1",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "firebase-tools",
|
|
9
|
-
"version": "10.2.
|
|
9
|
+
"version": "10.2.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@google-cloud/pubsub": "^2.18.4",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"mime": "^2.5.2",
|
|
44
44
|
"minimatch": "^3.0.4",
|
|
45
45
|
"morgan": "^1.10.0",
|
|
46
|
-
"node-fetch": "^2.6.
|
|
46
|
+
"node-fetch": "^2.6.7",
|
|
47
47
|
"open": "^6.3.0",
|
|
48
48
|
"ora": "^5.4.1",
|
|
49
49
|
"portfinder": "^1.0.23",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@types/mocha": "^9.0.0",
|
|
100
100
|
"@types/multer": "^1.4.3",
|
|
101
101
|
"@types/node": "^12.20.39",
|
|
102
|
-
"@types/node-fetch": "^2.5.
|
|
102
|
+
"@types/node-fetch": "^2.5.12",
|
|
103
103
|
"@types/progress": "^2.0.3",
|
|
104
104
|
"@types/puppeteer": "^5.4.2",
|
|
105
105
|
"@types/request": "^2.48.1",
|
|
@@ -835,6 +835,15 @@
|
|
|
835
835
|
"tslib": "^1.11.1"
|
|
836
836
|
}
|
|
837
837
|
},
|
|
838
|
+
"node_modules/@firebase/firestore/node_modules/node-fetch": {
|
|
839
|
+
"version": "2.6.1",
|
|
840
|
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
|
841
|
+
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
|
|
842
|
+
"dev": true,
|
|
843
|
+
"engines": {
|
|
844
|
+
"node": "4.x || >=6.0.0"
|
|
845
|
+
}
|
|
846
|
+
},
|
|
838
847
|
"node_modules/@firebase/functions": {
|
|
839
848
|
"version": "0.5.1",
|
|
840
849
|
"resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.5.1.tgz",
|
|
@@ -877,6 +886,15 @@
|
|
|
877
886
|
"tslib": "^1.11.1"
|
|
878
887
|
}
|
|
879
888
|
},
|
|
889
|
+
"node_modules/@firebase/functions/node_modules/node-fetch": {
|
|
890
|
+
"version": "2.6.1",
|
|
891
|
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
|
892
|
+
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
|
|
893
|
+
"dev": true,
|
|
894
|
+
"engines": {
|
|
895
|
+
"node": "4.x || >=6.0.0"
|
|
896
|
+
}
|
|
897
|
+
},
|
|
880
898
|
"node_modules/@firebase/installations": {
|
|
881
899
|
"version": "0.4.17",
|
|
882
900
|
"resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.4.17.tgz",
|
|
@@ -2120,9 +2138,9 @@
|
|
|
2120
2138
|
"integrity": "sha512-U7PMwkDmc3bnL0e4U8oA0POpi1vfsYDc+DEUS2+rPxm9NlLcW1dBa5JcRhO633PoPUcCSWMNXrMsqhmAVEo+IQ=="
|
|
2121
2139
|
},
|
|
2122
2140
|
"node_modules/@types/node-fetch": {
|
|
2123
|
-
"version": "2.5.
|
|
2124
|
-
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.
|
|
2125
|
-
"integrity": "sha512-
|
|
2141
|
+
"version": "2.5.12",
|
|
2142
|
+
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz",
|
|
2143
|
+
"integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
|
|
2126
2144
|
"dev": true,
|
|
2127
2145
|
"dependencies": {
|
|
2128
2146
|
"@types/node": "*",
|
|
@@ -6780,11 +6798,11 @@
|
|
|
6780
6798
|
}
|
|
6781
6799
|
},
|
|
6782
6800
|
"node_modules/google-p12-pem": {
|
|
6783
|
-
"version": "3.
|
|
6784
|
-
"resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.
|
|
6785
|
-
"integrity": "sha512-
|
|
6801
|
+
"version": "3.1.3",
|
|
6802
|
+
"resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.1.3.tgz",
|
|
6803
|
+
"integrity": "sha512-MC0jISvzymxePDVembypNefkAQp+DRP7dBE+zNUPaIjEspIlYg0++OrsNr248V9tPbz6iqtZ7rX1hxWA5B8qBQ==",
|
|
6786
6804
|
"dependencies": {
|
|
6787
|
-
"node-forge": "^0.
|
|
6805
|
+
"node-forge": "^1.0.0"
|
|
6788
6806
|
},
|
|
6789
6807
|
"bin": {
|
|
6790
6808
|
"gp12-pem": "build/src/bin/gp12-pem.js"
|
|
@@ -6793,6 +6811,14 @@
|
|
|
6793
6811
|
"node": ">=10"
|
|
6794
6812
|
}
|
|
6795
6813
|
},
|
|
6814
|
+
"node_modules/google-p12-pem/node_modules/node-forge": {
|
|
6815
|
+
"version": "1.2.1",
|
|
6816
|
+
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.2.1.tgz",
|
|
6817
|
+
"integrity": "sha512-Fcvtbb+zBcZXbTTVwqGA5W+MKBj56UjVRevvchv5XrcyXbmNdesfZL37nlcWOfpgHhgmxApw3tQbTr4CqNmX4w==",
|
|
6818
|
+
"engines": {
|
|
6819
|
+
"node": ">= 6.13.0"
|
|
6820
|
+
}
|
|
6821
|
+
},
|
|
6796
6822
|
"node_modules/got": {
|
|
6797
6823
|
"version": "9.6.0",
|
|
6798
6824
|
"resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz",
|
|
@@ -9164,11 +9190,22 @@
|
|
|
9164
9190
|
}
|
|
9165
9191
|
},
|
|
9166
9192
|
"node_modules/node-fetch": {
|
|
9167
|
-
"version": "2.6.
|
|
9168
|
-
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.
|
|
9169
|
-
"integrity": "sha512-
|
|
9193
|
+
"version": "2.6.7",
|
|
9194
|
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
|
|
9195
|
+
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
|
|
9196
|
+
"dependencies": {
|
|
9197
|
+
"whatwg-url": "^5.0.0"
|
|
9198
|
+
},
|
|
9170
9199
|
"engines": {
|
|
9171
9200
|
"node": "4.x || >=6.0.0"
|
|
9201
|
+
},
|
|
9202
|
+
"peerDependencies": {
|
|
9203
|
+
"encoding": "^0.1.0"
|
|
9204
|
+
},
|
|
9205
|
+
"peerDependenciesMeta": {
|
|
9206
|
+
"encoding": {
|
|
9207
|
+
"optional": true
|
|
9208
|
+
}
|
|
9172
9209
|
}
|
|
9173
9210
|
},
|
|
9174
9211
|
"node_modules/node-fetch-h2": {
|
|
@@ -9187,6 +9224,7 @@
|
|
|
9187
9224
|
"version": "0.10.0",
|
|
9188
9225
|
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz",
|
|
9189
9226
|
"integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==",
|
|
9227
|
+
"dev": true,
|
|
9190
9228
|
"engines": {
|
|
9191
9229
|
"node": ">= 6.0.0"
|
|
9192
9230
|
}
|
|
@@ -12379,6 +12417,11 @@
|
|
|
12379
12417
|
"lodash": "^4.17.10"
|
|
12380
12418
|
}
|
|
12381
12419
|
},
|
|
12420
|
+
"node_modules/tr46": {
|
|
12421
|
+
"version": "0.0.3",
|
|
12422
|
+
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
|
12423
|
+
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
|
|
12424
|
+
},
|
|
12382
12425
|
"node_modules/traverse": {
|
|
12383
12426
|
"version": "0.3.9",
|
|
12384
12427
|
"resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz",
|
|
@@ -13062,6 +13105,11 @@
|
|
|
13062
13105
|
"defaults": "^1.0.3"
|
|
13063
13106
|
}
|
|
13064
13107
|
},
|
|
13108
|
+
"node_modules/webidl-conversions": {
|
|
13109
|
+
"version": "3.0.1",
|
|
13110
|
+
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
|
13111
|
+
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
|
|
13112
|
+
},
|
|
13065
13113
|
"node_modules/websocket-driver": {
|
|
13066
13114
|
"version": "0.7.3",
|
|
13067
13115
|
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz",
|
|
@@ -13091,6 +13139,15 @@
|
|
|
13091
13139
|
"integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==",
|
|
13092
13140
|
"dev": true
|
|
13093
13141
|
},
|
|
13142
|
+
"node_modules/whatwg-url": {
|
|
13143
|
+
"version": "5.0.0",
|
|
13144
|
+
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
|
13145
|
+
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
|
|
13146
|
+
"dependencies": {
|
|
13147
|
+
"tr46": "~0.0.3",
|
|
13148
|
+
"webidl-conversions": "^3.0.0"
|
|
13149
|
+
}
|
|
13150
|
+
},
|
|
13094
13151
|
"node_modules/which": {
|
|
13095
13152
|
"version": "1.3.1",
|
|
13096
13153
|
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
|
@@ -14048,6 +14105,12 @@
|
|
|
14048
14105
|
"requires": {
|
|
14049
14106
|
"tslib": "^1.11.1"
|
|
14050
14107
|
}
|
|
14108
|
+
},
|
|
14109
|
+
"node-fetch": {
|
|
14110
|
+
"version": "2.6.1",
|
|
14111
|
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
|
14112
|
+
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
|
|
14113
|
+
"dev": true
|
|
14051
14114
|
}
|
|
14052
14115
|
}
|
|
14053
14116
|
},
|
|
@@ -14089,6 +14152,12 @@
|
|
|
14089
14152
|
"requires": {
|
|
14090
14153
|
"tslib": "^1.11.1"
|
|
14091
14154
|
}
|
|
14155
|
+
},
|
|
14156
|
+
"node-fetch": {
|
|
14157
|
+
"version": "2.6.1",
|
|
14158
|
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
|
14159
|
+
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
|
|
14160
|
+
"dev": true
|
|
14092
14161
|
}
|
|
14093
14162
|
}
|
|
14094
14163
|
},
|
|
@@ -15189,9 +15258,9 @@
|
|
|
15189
15258
|
"integrity": "sha512-U7PMwkDmc3bnL0e4U8oA0POpi1vfsYDc+DEUS2+rPxm9NlLcW1dBa5JcRhO633PoPUcCSWMNXrMsqhmAVEo+IQ=="
|
|
15190
15259
|
},
|
|
15191
15260
|
"@types/node-fetch": {
|
|
15192
|
-
"version": "2.5.
|
|
15193
|
-
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.
|
|
15194
|
-
"integrity": "sha512-
|
|
15261
|
+
"version": "2.5.12",
|
|
15262
|
+
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz",
|
|
15263
|
+
"integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
|
|
15195
15264
|
"dev": true,
|
|
15196
15265
|
"requires": {
|
|
15197
15266
|
"@types/node": "*",
|
|
@@ -18861,11 +18930,18 @@
|
|
|
18861
18930
|
}
|
|
18862
18931
|
},
|
|
18863
18932
|
"google-p12-pem": {
|
|
18864
|
-
"version": "3.
|
|
18865
|
-
"resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.
|
|
18866
|
-
"integrity": "sha512-
|
|
18933
|
+
"version": "3.1.3",
|
|
18934
|
+
"resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-3.1.3.tgz",
|
|
18935
|
+
"integrity": "sha512-MC0jISvzymxePDVembypNefkAQp+DRP7dBE+zNUPaIjEspIlYg0++OrsNr248V9tPbz6iqtZ7rX1hxWA5B8qBQ==",
|
|
18867
18936
|
"requires": {
|
|
18868
|
-
"node-forge": "^0.
|
|
18937
|
+
"node-forge": "^1.0.0"
|
|
18938
|
+
},
|
|
18939
|
+
"dependencies": {
|
|
18940
|
+
"node-forge": {
|
|
18941
|
+
"version": "1.2.1",
|
|
18942
|
+
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.2.1.tgz",
|
|
18943
|
+
"integrity": "sha512-Fcvtbb+zBcZXbTTVwqGA5W+MKBj56UjVRevvchv5XrcyXbmNdesfZL37nlcWOfpgHhgmxApw3tQbTr4CqNmX4w=="
|
|
18944
|
+
}
|
|
18869
18945
|
}
|
|
18870
18946
|
},
|
|
18871
18947
|
"got": {
|
|
@@ -20757,9 +20833,12 @@
|
|
|
20757
20833
|
}
|
|
20758
20834
|
},
|
|
20759
20835
|
"node-fetch": {
|
|
20760
|
-
"version": "2.6.
|
|
20761
|
-
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.
|
|
20762
|
-
"integrity": "sha512-
|
|
20836
|
+
"version": "2.6.7",
|
|
20837
|
+
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
|
|
20838
|
+
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
|
|
20839
|
+
"requires": {
|
|
20840
|
+
"whatwg-url": "^5.0.0"
|
|
20841
|
+
}
|
|
20763
20842
|
},
|
|
20764
20843
|
"node-fetch-h2": {
|
|
20765
20844
|
"version": "2.3.0",
|
|
@@ -20773,7 +20852,8 @@
|
|
|
20773
20852
|
"node-forge": {
|
|
20774
20853
|
"version": "0.10.0",
|
|
20775
20854
|
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz",
|
|
20776
|
-
"integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA=="
|
|
20855
|
+
"integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==",
|
|
20856
|
+
"dev": true
|
|
20777
20857
|
},
|
|
20778
20858
|
"node-gyp": {
|
|
20779
20859
|
"version": "8.4.1",
|
|
@@ -23281,6 +23361,11 @@
|
|
|
23281
23361
|
"lodash": "^4.17.10"
|
|
23282
23362
|
}
|
|
23283
23363
|
},
|
|
23364
|
+
"tr46": {
|
|
23365
|
+
"version": "0.0.3",
|
|
23366
|
+
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
|
23367
|
+
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
|
|
23368
|
+
},
|
|
23284
23369
|
"traverse": {
|
|
23285
23370
|
"version": "0.3.9",
|
|
23286
23371
|
"resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz",
|
|
@@ -23783,6 +23868,11 @@
|
|
|
23783
23868
|
"defaults": "^1.0.3"
|
|
23784
23869
|
}
|
|
23785
23870
|
},
|
|
23871
|
+
"webidl-conversions": {
|
|
23872
|
+
"version": "3.0.1",
|
|
23873
|
+
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
|
23874
|
+
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
|
|
23875
|
+
},
|
|
23786
23876
|
"websocket-driver": {
|
|
23787
23877
|
"version": "0.7.3",
|
|
23788
23878
|
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz",
|
|
@@ -23806,6 +23896,15 @@
|
|
|
23806
23896
|
"integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==",
|
|
23807
23897
|
"dev": true
|
|
23808
23898
|
},
|
|
23899
|
+
"whatwg-url": {
|
|
23900
|
+
"version": "5.0.0",
|
|
23901
|
+
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
|
23902
|
+
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
|
|
23903
|
+
"requires": {
|
|
23904
|
+
"tr46": "~0.0.3",
|
|
23905
|
+
"webidl-conversions": "^3.0.0"
|
|
23906
|
+
}
|
|
23907
|
+
},
|
|
23809
23908
|
"which": {
|
|
23810
23909
|
"version": "1.3.1",
|
|
23811
23910
|
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "firebase-tools",
|
|
3
|
-
"version": "10.2.
|
|
3
|
+
"version": "10.2.1",
|
|
4
4
|
"description": "Command-Line Interface for Firebase",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"mime": "^2.5.2",
|
|
120
120
|
"minimatch": "^3.0.4",
|
|
121
121
|
"morgan": "^1.10.0",
|
|
122
|
-
"node-fetch": "^2.6.
|
|
122
|
+
"node-fetch": "^2.6.7",
|
|
123
123
|
"open": "^6.3.0",
|
|
124
124
|
"ora": "^5.4.1",
|
|
125
125
|
"portfinder": "^1.0.23",
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"@types/mocha": "^9.0.0",
|
|
173
173
|
"@types/multer": "^1.4.3",
|
|
174
174
|
"@types/node": "^12.20.39",
|
|
175
|
-
"@types/node-fetch": "^2.5.
|
|
175
|
+
"@types/node-fetch": "^2.5.12",
|
|
176
176
|
"@types/progress": "^2.0.3",
|
|
177
177
|
"@types/puppeteer": "^5.4.2",
|
|
178
178
|
"@types/request": "^2.48.1",
|
|
@@ -622,6 +622,9 @@
|
|
|
622
622
|
},
|
|
623
623
|
"glob": {
|
|
624
624
|
"type": "string"
|
|
625
|
+
},
|
|
626
|
+
"region": {
|
|
627
|
+
"type": "string"
|
|
625
628
|
}
|
|
626
629
|
},
|
|
627
630
|
"required": [
|
|
@@ -696,6 +699,9 @@
|
|
|
696
699
|
"function": {
|
|
697
700
|
"type": "string"
|
|
698
701
|
},
|
|
702
|
+
"region": {
|
|
703
|
+
"type": "string"
|
|
704
|
+
},
|
|
699
705
|
"source": {
|
|
700
706
|
"type": "string"
|
|
701
707
|
}
|
|
@@ -774,6 +780,9 @@
|
|
|
774
780
|
},
|
|
775
781
|
"regex": {
|
|
776
782
|
"type": "string"
|
|
783
|
+
},
|
|
784
|
+
"region": {
|
|
785
|
+
"type": "string"
|
|
777
786
|
}
|
|
778
787
|
},
|
|
779
788
|
"required": [
|
|
@@ -1095,6 +1104,9 @@
|
|
|
1095
1104
|
},
|
|
1096
1105
|
"glob": {
|
|
1097
1106
|
"type": "string"
|
|
1107
|
+
},
|
|
1108
|
+
"region": {
|
|
1109
|
+
"type": "string"
|
|
1098
1110
|
}
|
|
1099
1111
|
},
|
|
1100
1112
|
"required": [
|
|
@@ -1169,6 +1181,9 @@
|
|
|
1169
1181
|
"function": {
|
|
1170
1182
|
"type": "string"
|
|
1171
1183
|
},
|
|
1184
|
+
"region": {
|
|
1185
|
+
"type": "string"
|
|
1186
|
+
},
|
|
1172
1187
|
"source": {
|
|
1173
1188
|
"type": "string"
|
|
1174
1189
|
}
|
|
@@ -1247,6 +1262,9 @@
|
|
|
1247
1262
|
},
|
|
1248
1263
|
"regex": {
|
|
1249
1264
|
"type": "string"
|
|
1265
|
+
},
|
|
1266
|
+
"region": {
|
|
1267
|
+
"type": "string"
|
|
1250
1268
|
}
|
|
1251
1269
|
},
|
|
1252
1270
|
"required": [
|
|
@@ -1568,6 +1586,9 @@
|
|
|
1568
1586
|
},
|
|
1569
1587
|
"glob": {
|
|
1570
1588
|
"type": "string"
|
|
1589
|
+
},
|
|
1590
|
+
"region": {
|
|
1591
|
+
"type": "string"
|
|
1571
1592
|
}
|
|
1572
1593
|
},
|
|
1573
1594
|
"required": [
|
|
@@ -1642,6 +1663,9 @@
|
|
|
1642
1663
|
"function": {
|
|
1643
1664
|
"type": "string"
|
|
1644
1665
|
},
|
|
1666
|
+
"region": {
|
|
1667
|
+
"type": "string"
|
|
1668
|
+
},
|
|
1645
1669
|
"source": {
|
|
1646
1670
|
"type": "string"
|
|
1647
1671
|
}
|
|
@@ -1720,6 +1744,9 @@
|
|
|
1720
1744
|
},
|
|
1721
1745
|
"regex": {
|
|
1722
1746
|
"type": "string"
|
|
1747
|
+
},
|
|
1748
|
+
"region": {
|
|
1749
|
+
"type": "string"
|
|
1723
1750
|
}
|
|
1724
1751
|
},
|
|
1725
1752
|
"required": [
|