firebase-tools 11.4.0 → 11.4.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/README.md CHANGED
@@ -174,11 +174,11 @@ Use `firebase:deploy --only remoteconfig` to update and publish a project's Fire
174
174
 
175
175
  The Firebase CLI can use one of four authentication methods listed in descending priority:
176
176
 
177
- - **User Token** - provide an explicit long-lived Firebase user token generated from `firebase login:ci`. Note that these tokens are extremely sensitive long-lived credentials and are not the right option for most cases. Consider using service account authorization instead. The token can be set in one of two ways:
177
+ - **User Token** - **DEPRECATED: this authentication method will be removed in a future major version of `firebase-tools`; use a service account to authenticate instead** - provide an explicit long-lived Firebase user token generated from `firebase login:ci`. Note that these tokens are extremely sensitive long-lived credentials and are not the right option for most cases. Consider using service account authorization instead. The token can be set in one of two ways:
178
178
  - Set the `--token` flag on any command, for example `firebase --token="<token>" projects:list`.
179
179
  - Set the `FIREBASE_TOKEN` environment variable.
180
180
  - **Local Login** - run `firebase login` to log in to the CLI directly as yourself. The CLI will cache an authorized user credential on your machine.
181
- - **Service Account** - set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to point to the path of a JSON service account key file.
181
+ - **Service Account** - set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to point to the path of a JSON service account key file. For more details, see Google Cloud's [Getting started with authentication](https://cloud.google.com/docs/authentication/getting-started) guide.
182
182
  - **Application Default Credentials** - if you use the `gcloud` CLI and log in with `gcloud auth application-default login`, the Firebase CLI will use them if none of the above credentials are present.
183
183
 
184
184
  ### Multiple Accounts
@@ -224,21 +224,14 @@ or `HTTP_PROXY` value in your environment to the URL of your proxy (e.g.
224
224
  The Firebase CLI requires a browser to complete authentication, but is fully
225
225
  compatible with CI and other headless environments.
226
226
 
227
- 1. On a machine with a browser, install the Firebase CLI.
228
- 2. Run `firebase login:ci` to log in and print out a new [refresh token](https://developers.google.com/identity/protocols/OAuth2)
229
- (the current CLI session will not be affected).
230
- 3. Store the output token in a secure but accessible way in your CI system.
227
+ Complete the following steps to run Firebase commands in a CI environment. Find detailed instructions for each step in Google Cloud's [Getting started with authentication](https://cloud.google.com/docs/authentication/getting-started) guide.
231
228
 
232
- There are two ways to use this token when running Firebase commands:
229
+ 1. Create a service account and grant it the appropriate level of access to your project.
230
+ 1. Create a service account key (JSON file) for that service account.
231
+ 1. Store the key file in a secure, accessible way in your CI system.
232
+ 1. Set `GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json` in your CI system when running Firebase commands.
233
233
 
234
- 1. Store the token as the environment variable `FIREBASE_TOKEN` and it will
235
- automatically be utilized.
236
- 2. Run all commands with the `--token <token>` flag in your CI system.
237
-
238
- The order of precedence for token loading is flag, environment variable, active project.
239
-
240
- On any machine with the Firebase CLI, running `firebase logout --token <token>`
241
- will immediately revoke access for the specified token.
234
+ To disable access for the service account, [find the service account](https://console.cloud.google.com/projectselector/iam-admin/serviceaccounts) for your project in the Google Cloud Console, and then either remove the key, or disable or delete the service account.
242
235
 
243
236
  ## Using as a Module
244
237
 
package/lib/command.js CHANGED
@@ -64,6 +64,7 @@ class Command {
64
64
  });
65
65
  if (this.helpText) {
66
66
  cmd.on("--help", () => {
67
+ console.log();
67
68
  console.log(this.helpText);
68
69
  });
69
70
  }
@@ -12,6 +12,11 @@ const { marked } = require("marked");
12
12
  const logger_1 = require("../logger");
13
13
  exports.command = new command_1.Command("hosting:clone <source> <targetChannel>")
14
14
  .description("clone a version from one site to another")
15
+ .help(`<source> and <targetChannel> accept the following format: <siteId>:<channelId>
16
+
17
+ For example, to copy the content for a site \`my-site\` from a preview channel \`staging\` to a \`live\` channel, the command would look be:
18
+
19
+ firebase hosting:clone my-site:foo my-site:live`)
15
20
  .before(requireAuth_1.requireAuth)
16
21
  .action(async (source = "", targetChannel = "") => {
17
22
  var _a, _b, _c, _d;
@@ -14,6 +14,8 @@ exports.command = new command_1.Command("login:ci")
14
14
  if (options.nonInteractive) {
15
15
  throw new error_1.FirebaseError("Cannot run login:ci in non-interactive mode.");
16
16
  }
17
+ utils.logWarning("Authenticating with a `login:ci` token is deprecated and will be removed in a future major version of `firebase-tools`. " +
18
+ "Instead, use a service account key with `GOOGLE_APPLICATION_CREDENTIALS`: https://cloud.google.com/docs/authentication/getting-started");
17
19
  const userCredentials = await auth.loginGoogle(options.localhost);
18
20
  logger_1.logger.info();
19
21
  utils.logSuccess("Success! Use this token to login on a CI server:\n\n" +
@@ -19,7 +19,7 @@ exports.obtainStorageBindings = obtainStorageBindings;
19
19
  async function ensureStorageTriggerRegion(endpoint) {
20
20
  const { eventTrigger } = endpoint;
21
21
  if (!eventTrigger.region) {
22
- logger_1.logger.debug("Looking up bucket region for the storage event trigger");
22
+ logger_1.logger.debug(`Looking up bucket region for the storage event trigger on bucket ${eventTrigger.eventFilters.bucket}`);
23
23
  try {
24
24
  const bucket = await storage.getBucket(eventTrigger.eventFilters.bucket);
25
25
  eventTrigger.region = bucket.location.toLowerCase();
@@ -4,6 +4,7 @@ exports.convertConfig = void 0;
4
4
  const error_1 = require("../../error");
5
5
  const backend_1 = require("../functions/backend");
6
6
  const backend = require("../functions/backend");
7
+ const utils_1 = require("../../utils");
7
8
  function has(obj, k) {
8
9
  return obj[k] !== undefined;
9
10
  }
@@ -132,7 +133,10 @@ async function convertConfig(context, payload, config, finalize) {
132
133
  vRewrite.functionRegion = foundEndpoint.region;
133
134
  }
134
135
  else {
135
- throw new error_1.FirebaseError(`Unable to find a valid endpoint for function ${vRewrite.function}`);
136
+ if (rewrite.region && rewrite.region !== "us-central1") {
137
+ throw new error_1.FirebaseError(`Unable to find a valid endpoint for function \`${vRewrite.function}\``);
138
+ }
139
+ (0, utils_1.logLabeledWarning)(`hosting[${config.site}]`, `Unable to find a valid endpoint for function \`${vRewrite.function}\`, but still including it in the config`);
136
140
  }
137
141
  }
138
142
  }
@@ -36,7 +36,7 @@ async function deploy(context, options) {
36
36
  (0, utils_1.logLabeledBullet)(`hosting[${deploy.site}]`, 'no "public" directory to upload, continuing with release');
37
37
  return runDeploys(deploys, debugging);
38
38
  }
39
- (0, utils_1.logLabeledBullet)("hosting[" + deploy.site + "]", "beginning deploy...");
39
+ (0, utils_1.logLabeledBullet)(`hosting[${deploy.site}]`, "beginning deploy...");
40
40
  const t0 = Date.now();
41
41
  const publicDir = options.config.path(deploy.config.public);
42
42
  const files = (0, listFiles_1.listFiles)(publicDir, deploy.config.ignore);
@@ -18,9 +18,8 @@ const adminSdkConfig_1 = require("../adminSdkConfig");
18
18
  const types_1 = require("./rules/types");
19
19
  const upload_1 = require("./upload");
20
20
  class StoredFile {
21
- constructor(metadata, path) {
21
+ constructor(metadata) {
22
22
  this.metadata = metadata;
23
- this._path = path;
24
23
  }
25
24
  get metadata() {
26
25
  return this._metadata;
@@ -28,12 +27,6 @@ class StoredFile {
28
27
  set metadata(value) {
29
28
  this._metadata = value;
30
29
  }
31
- get path() {
32
- return this._path;
33
- }
34
- set path(value) {
35
- this._path = value;
36
- }
37
30
  }
38
31
  exports.StoredFile = StoredFile;
39
32
  class StorageLayer {
@@ -163,7 +156,7 @@ class StorageLayer {
163
156
  }
164
157
  this._persistence.deleteFile(filePath, true);
165
158
  this._persistence.renameFile(upload.path, filePath);
166
- this._files.set(filePath, new StoredFile(metadata, this._persistence.getDiskPath(filePath)));
159
+ this._files.set(filePath, new StoredFile(metadata));
167
160
  this._cloudFunctions.dispatch("finalize", new metadata_1.CloudStorageObjectMetadata(metadata));
168
161
  return metadata;
169
162
  }
@@ -202,7 +195,7 @@ class StorageLayer {
202
195
  cacheControl: newMetadata.cacheControl,
203
196
  customMetadata: newMetadata.metadata,
204
197
  }, this._cloudFunctions, sourceBytes, incomingMetadata);
205
- const file = new StoredFile(copiedFileMetadata, this._persistence.getDiskPath(destinationFilePath));
198
+ const file = new StoredFile(copiedFileMetadata);
206
199
  this._files.set(destinationFilePath, file);
207
200
  this._cloudFunctions.dispatch("finalize", new metadata_1.CloudStorageObjectMetadata(file.metadata));
208
201
  return file.metadata;
@@ -306,13 +299,14 @@ class StorageLayer {
306
299
  await fse.writeFile(bucketsFilePath, JSON.stringify(bucketsList, undefined, 2));
307
300
  const blobsDirPath = path.join(storageExportPath, "blobs");
308
301
  await fse.ensureDir(blobsDirPath);
309
- await fse.copy(this.dirPath, blobsDirPath, { recursive: true });
310
302
  const metadataDirPath = path.join(storageExportPath, "metadata");
311
303
  await fse.ensureDir(metadataDirPath);
312
304
  try {
313
305
  for (var _b = __asyncValues(this._files.entries()), _c; _c = await _b.next(), !_c.done;) {
314
- const [p, file] = _c.value;
315
- const metadataExportPath = path.join(metadataDirPath, encodeURIComponent(p)) + ".json";
306
+ const [, file] = _c.value;
307
+ const diskFileName = this._persistence.getDiskFileName(this.path(file.metadata.bucket, file.metadata.name));
308
+ await fse.copy(path.join(this.dirPath, diskFileName), path.join(blobsDirPath, diskFileName));
309
+ const metadataExportPath = path.join(metadataDirPath, encodeURIComponent(diskFileName)) + ".json";
316
310
  await fse.writeFile(metadataExportPath, metadata_1.StoredFileMetadata.toJSON(file.metadata));
317
311
  }
318
312
  }
@@ -348,15 +342,14 @@ class StorageLayer {
348
342
  logger_1.logger.warn(`Could not find file "${blobPath}" in storage export.`);
349
343
  continue;
350
344
  }
351
- let decodedBlobPath = decodeURIComponent(blobPath);
352
- const decodedBlobPathSep = getPathSep(decodedBlobPath);
353
- if (decodedBlobPathSep !== path.sep) {
354
- decodedBlobPath = decodedBlobPath.split(decodedBlobPathSep).join(path.sep);
345
+ let fileName = metadata.name;
346
+ const objectNameSep = getPathSep(fileName);
347
+ if (fileName !== path.sep) {
348
+ fileName = fileName.split(objectNameSep).join(path.sep);
355
349
  }
356
- const blobDiskPath = this._persistence.getDiskPath(decodedBlobPath);
357
- const file = new StoredFile(metadata, blobDiskPath);
358
- this._files.set(decodedBlobPath, file);
359
- fse.copyFileSync(blobAbsPath, blobDiskPath);
350
+ const filepath = this.path(metadata.bucket, fileName);
351
+ this._persistence.copyFromExternalPath(blobAbsPath, filepath);
352
+ this._files.set(filepath, new StoredFile(metadata));
360
353
  }
361
354
  }
362
355
  *walkDirSync(dir) {
@@ -374,6 +367,6 @@ class StorageLayer {
374
367
  }
375
368
  exports.StorageLayer = StorageLayer;
376
369
  function getPathSep(decodedPath) {
377
- const firstSepIndex = decodedPath.search(/[^a-z0-9-_.]/g);
370
+ const firstSepIndex = decodedPath.search(/[\/|\\\\]/g);
378
371
  return decodedPath[firstSepIndex];
379
372
  }
@@ -4,9 +4,12 @@ exports.Persistence = void 0;
4
4
  const fs_1 = require("fs");
5
5
  const rimraf = require("rimraf");
6
6
  const fs = require("fs");
7
+ const fse = require("fs-extra");
7
8
  const path = require("path");
9
+ const uuid = require("uuid");
8
10
  class Persistence {
9
11
  constructor(dirPath) {
12
+ this._diskPathMap = new Map();
10
13
  this.reset(dirPath);
11
14
  }
12
15
  reset(dirPath) {
@@ -14,22 +17,18 @@ class Persistence {
14
17
  (0, fs_1.mkdirSync)(dirPath, {
15
18
  recursive: true,
16
19
  });
20
+ this._diskPathMap = new Map();
17
21
  }
18
22
  get dirPath() {
19
23
  return this._dirPath;
20
24
  }
21
25
  appendBytes(fileName, bytes) {
22
- const filepath = this.getDiskPath(fileName);
23
- let fd;
24
- try {
25
- fs.appendFileSync(filepath, bytes);
26
- return filepath;
27
- }
28
- finally {
29
- if (fd) {
30
- (0, fs_1.closeSync)(fd);
31
- }
26
+ if (!this._diskPathMap.has(fileName)) {
27
+ this._diskPathMap.set(fileName, this.generateNewDiskName());
32
28
  }
29
+ const filepath = this.getDiskPath(fileName);
30
+ fs.appendFileSync(filepath, bytes);
31
+ return filepath;
33
32
  }
34
33
  readBytes(fileName, size, fileOffset) {
35
34
  let fd;
@@ -55,6 +54,7 @@ class Persistence {
55
54
  throw err;
56
55
  }
57
56
  }
57
+ this._diskPathMap.delete(fileName);
58
58
  }
59
59
  deleteAll() {
60
60
  return new Promise((resolve, reject) => {
@@ -63,16 +63,30 @@ class Persistence {
63
63
  reject(err);
64
64
  }
65
65
  else {
66
+ this._diskPathMap = new Map();
66
67
  resolve();
67
68
  }
68
69
  });
69
70
  });
70
71
  }
71
72
  renameFile(oldName, newName) {
72
- (0, fs_1.renameSync)(this.getDiskPath(oldName), this.getDiskPath(newName));
73
+ const oldNameId = this.getDiskFileName(oldName);
74
+ this._diskPathMap.set(newName, oldNameId);
75
+ this._diskPathMap.delete(oldName);
73
76
  }
74
77
  getDiskPath(fileName) {
75
- return path.join(this._dirPath, encodeURIComponent(fileName));
78
+ const shortenedDiskPath = this.getDiskFileName(fileName);
79
+ return path.join(this._dirPath, encodeURIComponent(shortenedDiskPath));
80
+ }
81
+ getDiskFileName(fileName) {
82
+ return this._diskPathMap.get(fileName);
83
+ }
84
+ copyFromExternalPath(sourcePath, newName) {
85
+ this._diskPathMap.set(newName, this.generateNewDiskName());
86
+ fse.copyFileSync(sourcePath, this.getDiskPath(newName));
87
+ }
88
+ generateNewDiskName() {
89
+ return uuid.v4();
76
90
  }
77
91
  }
78
92
  exports.Persistence = Persistence;
package/lib/index.js CHANGED
@@ -9,7 +9,7 @@ program.version(pkg.version);
9
9
  program.option("-P, --project <alias_or_project_id>", "the Firebase project to use for this command");
10
10
  program.option("--account <email>", "the Google account to use for authorization");
11
11
  program.option("-j, --json", "output JSON instead of text, also triggers non-interactive mode");
12
- program.option("--token <token>", "supply an auth token for this command");
12
+ program.option("--token <token>", "DEPRECATED - will be removed in a future major version - supply an auth token for this command");
13
13
  program.option("--non-interactive", "error out of the command instead of waiting for prompts");
14
14
  program.option("-i, --interactive", "force prompts to be displayed");
15
15
  program.option("--debug", "print verbose debug output and keep a debug log file");
@@ -32,9 +32,13 @@ async function requireAuth(options) {
32
32
  let tokenOpt = utils.getInheritedOption(options, "token");
33
33
  if (tokenOpt) {
34
34
  logger_1.logger.debug("> authorizing via --token option");
35
+ utils.logWarning("Authenticating with `--token` is deprecated and will be removed in a future major version of `firebase-tools`. " +
36
+ "Instead, use a service account key with `GOOGLE_APPLICATION_CREDENTIALS`: https://cloud.google.com/docs/authentication/getting-started");
35
37
  }
36
38
  else if (process.env.FIREBASE_TOKEN) {
37
39
  logger_1.logger.debug("> authorizing via FIREBASE_TOKEN environment variable");
40
+ utils.logWarning("Authenticating with `FIREBASE_TOKEN` is deprecated and will be removed in a future major version of `firebase-tools`. " +
41
+ "Instead, use a service account key with `GOOGLE_APPLICATION_CREDENTIALS`: https://cloud.google.com/docs/authentication/getting-started");
38
42
  }
39
43
  else if (user) {
40
44
  logger_1.logger.debug(`> authorizing via signed-in user (${user.email})`);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "firebase-tools",
3
- "version": "11.4.0",
3
+ "version": "11.4.1",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "firebase-tools",
9
- "version": "11.4.0",
9
+ "version": "11.4.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@google-cloud/pubsub": "^3.0.1",
@@ -16,7 +16,7 @@
16
16
  "body-parser": "^1.19.0",
17
17
  "chokidar": "^3.0.2",
18
18
  "cjson": "^0.3.1",
19
- "cli-color": "^2.0.2",
19
+ "cli-color": "2.0.1",
20
20
  "cli-table": "0.3.11",
21
21
  "commander": "^4.0.1",
22
22
  "configstore": "^5.0.1",
@@ -24,6 +24,7 @@
24
24
  "cross-env": "^5.1.3",
25
25
  "cross-spawn": "^7.0.1",
26
26
  "csv-parse": "^5.0.4",
27
+ "es5-ext": "0.10.53",
27
28
  "exegesis": "^4.1.0",
28
29
  "exegesis-express": "^4.0.0",
29
30
  "express": "^4.16.4",
@@ -130,7 +131,7 @@
130
131
  "eslint-plugin-prettier": "^4.0.0",
131
132
  "firebase": "^7.24.0",
132
133
  "firebase-admin": "^9.4.2",
133
- "firebase-functions": "^3.15.0",
134
+ "firebase-functions": "^3.22.0",
134
135
  "google-discovery-to-swagger": "^2.1.0",
135
136
  "mocha": "^9.1.3",
136
137
  "nock": "^13.0.5",
@@ -4205,12 +4206,12 @@
4205
4206
  }
4206
4207
  },
4207
4208
  "node_modules/cli-color": {
4208
- "version": "2.0.2",
4209
- "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.2.tgz",
4210
- "integrity": "sha512-g4JYjrTW9MGtCziFNjkqp3IMpGhnJyeB0lOtRPjQkYhXzKYr6tYnXKyEVnMzITxhpbahsEW9KsxOYIDKwcsIBw==",
4209
+ "version": "2.0.1",
4210
+ "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.1.tgz",
4211
+ "integrity": "sha512-eBbxZF6fqPUNnf7CLAFOersUnyYzv83tHFLSlts+OAHsNendaqv2tHCq+/MO+b3Y+9JeoUlIvobyxG/Z8GNeOg==",
4211
4212
  "dependencies": {
4212
4213
  "d": "^1.0.1",
4213
- "es5-ext": "^0.10.59",
4214
+ "es5-ext": "^0.10.53",
4214
4215
  "es6-iterator": "^2.0.3",
4215
4216
  "memoizee": "^0.4.15",
4216
4217
  "timers-ext": "^0.1.7"
@@ -5176,19 +5177,20 @@
5176
5177
  }
5177
5178
  },
5178
5179
  "node_modules/es5-ext": {
5179
- "version": "0.10.61",
5180
- "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.61.tgz",
5181
- "integrity": "sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA==",
5182
- "hasInstallScript": true,
5180
+ "version": "0.10.53",
5181
+ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz",
5182
+ "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==",
5183
5183
  "dependencies": {
5184
- "es6-iterator": "^2.0.3",
5185
- "es6-symbol": "^3.1.3",
5186
- "next-tick": "^1.1.0"
5187
- },
5188
- "engines": {
5189
- "node": ">=0.10"
5184
+ "es6-iterator": "~2.0.3",
5185
+ "es6-symbol": "~3.1.3",
5186
+ "next-tick": "~1.0.0"
5190
5187
  }
5191
5188
  },
5189
+ "node_modules/es5-ext/node_modules/next-tick": {
5190
+ "version": "1.0.0",
5191
+ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
5192
+ "integrity": "sha512-mc/caHeUcdjnC/boPWJefDr4KUIWQNv+tlnFnJd38QMou86QtxQzBJfxgGRzvx8jazYRqrVlaHarfO72uNxPOg=="
5193
+ },
5192
5194
  "node_modules/es6-error": {
5193
5195
  "version": "4.1.1",
5194
5196
  "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
@@ -6426,16 +6428,17 @@
6426
6428
  "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
6427
6429
  },
6428
6430
  "node_modules/firebase-functions": {
6429
- "version": "3.18.1",
6430
- "resolved": "https://registry.npmjs.org/firebase-functions/-/firebase-functions-3.18.1.tgz",
6431
- "integrity": "sha512-sPYZc9U/o0MjrpL3yz0pmoviJ1SkDoMV54X1rT/O2g0JTbV9eoQZsZuRoIUeaY3gmWFcMnN5TbJsPQUVh+omtw==",
6431
+ "version": "3.22.0",
6432
+ "resolved": "https://registry.npmjs.org/firebase-functions/-/firebase-functions-3.22.0.tgz",
6433
+ "integrity": "sha512-d1BxBpT95MhvVqXkpLWDvWbyuX7e2l69cFAiqG3U1XQDaMV88bM9S+Zg7H8i9pitEGFr+76ErjKgrY0n+g3ZDA==",
6432
6434
  "dev": true,
6433
6435
  "dependencies": {
6434
6436
  "@types/cors": "^2.8.5",
6435
6437
  "@types/express": "4.17.3",
6436
6438
  "cors": "^2.8.5",
6437
6439
  "express": "^4.17.1",
6438
- "lodash": "^4.17.14"
6440
+ "lodash": "^4.17.14",
6441
+ "node-fetch": "^2.6.7"
6439
6442
  },
6440
6443
  "bin": {
6441
6444
  "firebase-functions": "lib/bin/firebase-functions.js"
@@ -6444,7 +6447,7 @@
6444
6447
  "node": "^8.13.0 || >=10.10.0"
6445
6448
  },
6446
6449
  "peerDependencies": {
6447
- "firebase-admin": "^8.0.0 || ^9.0.0 || ^10.0.0"
6450
+ "firebase-admin": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0"
6448
6451
  }
6449
6452
  },
6450
6453
  "node_modules/firebase-functions/node_modules/@types/express": {
@@ -17474,12 +17477,12 @@
17474
17477
  "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw=="
17475
17478
  },
17476
17479
  "cli-color": {
17477
- "version": "2.0.2",
17478
- "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.2.tgz",
17479
- "integrity": "sha512-g4JYjrTW9MGtCziFNjkqp3IMpGhnJyeB0lOtRPjQkYhXzKYr6tYnXKyEVnMzITxhpbahsEW9KsxOYIDKwcsIBw==",
17480
+ "version": "2.0.1",
17481
+ "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.1.tgz",
17482
+ "integrity": "sha512-eBbxZF6fqPUNnf7CLAFOersUnyYzv83tHFLSlts+OAHsNendaqv2tHCq+/MO+b3Y+9JeoUlIvobyxG/Z8GNeOg==",
17480
17483
  "requires": {
17481
17484
  "d": "^1.0.1",
17482
- "es5-ext": "^0.10.59",
17485
+ "es5-ext": "^0.10.53",
17483
17486
  "es6-iterator": "^2.0.3",
17484
17487
  "memoizee": "^0.4.15",
17485
17488
  "timers-ext": "^0.1.7"
@@ -18264,13 +18267,20 @@
18264
18267
  }
18265
18268
  },
18266
18269
  "es5-ext": {
18267
- "version": "0.10.61",
18268
- "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.61.tgz",
18269
- "integrity": "sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA==",
18270
+ "version": "0.10.53",
18271
+ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz",
18272
+ "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==",
18270
18273
  "requires": {
18271
- "es6-iterator": "^2.0.3",
18272
- "es6-symbol": "^3.1.3",
18273
- "next-tick": "^1.1.0"
18274
+ "es6-iterator": "~2.0.3",
18275
+ "es6-symbol": "~3.1.3",
18276
+ "next-tick": "~1.0.0"
18277
+ },
18278
+ "dependencies": {
18279
+ "next-tick": {
18280
+ "version": "1.0.0",
18281
+ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
18282
+ "integrity": "sha512-mc/caHeUcdjnC/boPWJefDr4KUIWQNv+tlnFnJd38QMou86QtxQzBJfxgGRzvx8jazYRqrVlaHarfO72uNxPOg=="
18283
+ }
18274
18284
  }
18275
18285
  },
18276
18286
  "es6-error": {
@@ -19223,16 +19233,17 @@
19223
19233
  }
19224
19234
  },
19225
19235
  "firebase-functions": {
19226
- "version": "3.18.1",
19227
- "resolved": "https://registry.npmjs.org/firebase-functions/-/firebase-functions-3.18.1.tgz",
19228
- "integrity": "sha512-sPYZc9U/o0MjrpL3yz0pmoviJ1SkDoMV54X1rT/O2g0JTbV9eoQZsZuRoIUeaY3gmWFcMnN5TbJsPQUVh+omtw==",
19236
+ "version": "3.22.0",
19237
+ "resolved": "https://registry.npmjs.org/firebase-functions/-/firebase-functions-3.22.0.tgz",
19238
+ "integrity": "sha512-d1BxBpT95MhvVqXkpLWDvWbyuX7e2l69cFAiqG3U1XQDaMV88bM9S+Zg7H8i9pitEGFr+76ErjKgrY0n+g3ZDA==",
19229
19239
  "dev": true,
19230
19240
  "requires": {
19231
19241
  "@types/cors": "^2.8.5",
19232
19242
  "@types/express": "4.17.3",
19233
19243
  "cors": "^2.8.5",
19234
19244
  "express": "^4.17.1",
19235
- "lodash": "^4.17.14"
19245
+ "lodash": "^4.17.14",
19246
+ "node-fetch": "^2.6.7"
19236
19247
  },
19237
19248
  "dependencies": {
19238
19249
  "@types/express": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firebase-tools",
3
- "version": "11.4.0",
3
+ "version": "11.4.1",
4
4
  "description": "Command-Line Interface for Firebase",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {
@@ -26,11 +26,12 @@
26
26
  "test:client-integration": "bash ./scripts/client-integration-tests/run.sh",
27
27
  "test:compile": "tsc --project tsconfig.compile.json",
28
28
  "test:emulator": "bash ./scripts/emulator-tests/run.sh",
29
- "test:import-export": "bash ./scripts/emulator-import-export-tests/run.sh",
30
29
  "test:extensions-deploy": "bash ./scripts/extensions-deploy-tests/run.sh",
31
30
  "test:extensions-emulator": "bash ./scripts/extensions-emulator-tests/run.sh",
31
+ "test:functions-deploy": "bash ./scripts/functions-deploy-tests/run.sh",
32
32
  "test:hosting": "bash ./scripts/hosting-tests/run.sh",
33
33
  "test:hosting-rewrites": "bash ./scripts/hosting-tests/rewrites-tests/run.sh",
34
+ "test:import-export": "bash ./scripts/emulator-import-export-tests/run.sh",
34
35
  "test:triggers-end-to-end": "bash ./scripts/triggers-end-to-end-tests/run.sh",
35
36
  "test:storage-deploy": "bash ./scripts/storage-deploy-tests/run.sh",
36
37
  "test:storage-emulator-integration": "bash ./scripts/storage-emulator-integration/run.sh"
@@ -94,7 +95,7 @@
94
95
  "body-parser": "^1.19.0",
95
96
  "chokidar": "^3.0.2",
96
97
  "cjson": "^0.3.1",
97
- "cli-color": "^2.0.2",
98
+ "cli-color": "2.0.1",
98
99
  "cli-table": "0.3.11",
99
100
  "commander": "^4.0.1",
100
101
  "configstore": "^5.0.1",
@@ -102,6 +103,7 @@
102
103
  "cross-env": "^5.1.3",
103
104
  "cross-spawn": "^7.0.1",
104
105
  "csv-parse": "^5.0.4",
106
+ "es5-ext": "0.10.53",
105
107
  "exegesis": "^4.1.0",
106
108
  "exegesis-express": "^4.0.0",
107
109
  "express": "^4.16.4",
@@ -205,7 +207,7 @@
205
207
  "eslint-plugin-prettier": "^4.0.0",
206
208
  "firebase": "^7.24.0",
207
209
  "firebase-admin": "^9.4.2",
208
- "firebase-functions": "^3.15.0",
210
+ "firebase-functions": "^3.22.0",
209
211
  "google-discovery-to-swagger": "^2.1.0",
210
212
  "mocha": "^9.1.3",
211
213
  "nock": "^13.0.5",