firebase-tools-with-isolate 15.20.0 → 15.22.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.
Files changed (47) hide show
  1. package/lib/appdistribution/yaml_helper.js +2 -2
  2. package/lib/apphosting/constants.js +2 -1
  3. package/lib/apphosting/localbuilds.js +4 -2
  4. package/lib/apphosting/secrets/index.js +77 -0
  5. package/lib/archiveDirectory.js +2 -2
  6. package/lib/auth.js +2 -3
  7. package/lib/bin/cli.js +26 -18
  8. package/lib/commands/apphosting-secrets-revokeaccess.js +56 -0
  9. package/lib/commands/apptesting.js +11 -2
  10. package/lib/commands/crashlytics-symbols-upload.js +2 -2
  11. package/lib/commands/index.js +1 -0
  12. package/lib/crashlytics/sourcemap.js +2 -3
  13. package/lib/database/import.js +2 -2
  14. package/lib/dataconnect/build.js +6 -6
  15. package/lib/deploy/apphosting/util.js +9 -1
  16. package/lib/deploy/functions/prepare.js +39 -3
  17. package/lib/deploy/functions/prepareFunctionsUpload.js +1 -2
  18. package/lib/deploy/functions/release/index.js +0 -5
  19. package/lib/emulator/auth/apiSpec.js +307 -33
  20. package/lib/emulator/auth/cloudFunctions.js +2 -2
  21. package/lib/emulator/auth/operations.js +99 -9
  22. package/lib/emulator/auth/state.js +27 -0
  23. package/lib/emulator/downloadableEmulatorInfo.json +31 -31
  24. package/lib/emulator/functionsEmulatorShell.js +4 -4
  25. package/lib/emulator/functionsRuntimeWorker.js +2 -2
  26. package/lib/emulator/pubsubEmulator.js +3 -3
  27. package/lib/emulator/storage/apis/firebase.js +2 -2
  28. package/lib/emulator/storage/cloudFunctions.js +2 -2
  29. package/lib/emulator/storage/metadata.js +1 -2
  30. package/lib/emulator/storage/persistence.js +2 -2
  31. package/lib/emulator/storage/upload.js +3 -3
  32. package/lib/env.js +20 -4
  33. package/lib/experiments.js +1 -2
  34. package/lib/frameworks/angular/index.js +3 -2
  35. package/lib/frameworks/angular/utils.js +100 -2
  36. package/lib/frameworks/astro/index.js +1 -1
  37. package/lib/frameworks/astro/utils.js +1 -1
  38. package/lib/functions/python.js +4 -4
  39. package/lib/hosting/cloudRunProxy.js +8 -0
  40. package/lib/index.js +2 -2
  41. package/lib/init/features/apphosting.js +8 -1
  42. package/lib/init/features/functions/python.js +32 -20
  43. package/lib/localFunction.js +4 -2
  44. package/lib/track.js +2 -2
  45. package/lib/tsconfig.publish.tsbuildinfo +1 -1
  46. package/lib/utils.js +70 -0
  47. package/package.json +8 -11
package/lib/utils.js CHANGED
@@ -63,6 +63,9 @@ exports.commandExistsSync = commandExistsSync;
63
63
  exports.resolveWithin = resolveWithin;
64
64
  exports.toLowerSnakeCase = toLowerSnakeCase;
65
65
  exports.murmurHashV3 = murmurHashV3;
66
+ exports.formatFilesize = formatFilesize;
67
+ exports.pLimit = pLimit;
68
+ exports.stringDistance = stringDistance;
66
69
  const fs = require("fs-extra");
67
70
  const tty = require("tty");
68
71
  const path = require("node:path");
@@ -744,3 +747,70 @@ function murmurHashV3(key, seed = 0) {
744
747
  h1 ^= h1 >>> 16;
745
748
  return h1 >>> 0;
746
749
  }
750
+ function formatFilesize(bytes, decimals = 2) {
751
+ if (bytes <= 0)
752
+ return "0 Bytes";
753
+ const k = 1024;
754
+ const dm = decimals < 0 ? 0 : decimals;
755
+ const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
756
+ const i = Math.min(Math.floor(Math.log(bytes) / Math.log(k)), sizes.length - 1);
757
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
758
+ }
759
+ function pLimit(concurrency) {
760
+ if (!Number.isInteger(concurrency) || concurrency <= 0) {
761
+ throw new error_1.FirebaseError(`pLimit concurrency must be a positive integer, got ${concurrency}`);
762
+ }
763
+ const queue = [];
764
+ let activeCount = 0;
765
+ const next = () => {
766
+ activeCount--;
767
+ if (queue.length > 0) {
768
+ queue.shift()?.();
769
+ }
770
+ };
771
+ return (fn) => {
772
+ return new Promise((resolve, reject) => {
773
+ const run = () => {
774
+ activeCount++;
775
+ try {
776
+ Promise.resolve(fn()).then(resolve, reject).finally(next);
777
+ }
778
+ catch (err) {
779
+ reject(err);
780
+ next();
781
+ }
782
+ };
783
+ if (activeCount < concurrency) {
784
+ run();
785
+ }
786
+ else {
787
+ queue.push(run);
788
+ }
789
+ });
790
+ };
791
+ }
792
+ function stringDistance(a, b) {
793
+ if (a === b)
794
+ return 0;
795
+ if (a.length === 0)
796
+ return b.length;
797
+ if (b.length === 0)
798
+ return a.length;
799
+ const [s1, s2] = a.length <= b.length ? [a, b] : [b, a];
800
+ const v0 = new Array(s1.length + 1);
801
+ const v1 = new Array(s1.length + 1);
802
+ for (let i = 0; i <= s1.length; i++) {
803
+ v0[i] = i;
804
+ }
805
+ for (let i = 0; i < s2.length; i++) {
806
+ v1[0] = i + 1;
807
+ for (let j = 0; j < s1.length; j++) {
808
+ const cost = s1[j] === s2[i] ? 0 : 1;
809
+ v1[j + 1] = Math.min(v1[j] + 1, v0[j + 1] + 1, v0[j] + cost);
810
+ }
811
+ for (let j = 0; j <= s1.length; j++) {
812
+ v0[j] = v1[j];
813
+ }
814
+ }
815
+ return v0[s1.length];
816
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firebase-tools-with-isolate",
3
- "version": "15.20.0",
3
+ "version": "15.22.0",
4
4
  "description": "Command-Line Interface for Firebase with monorepo support",
5
5
  "main": "./lib/index.js",
6
6
  "mcpName": "io.github.firebase/firebase-mcp",
@@ -128,12 +128,9 @@
128
128
  "cross-env": "^7.0.3",
129
129
  "cross-spawn": "^7.0.5",
130
130
  "csv-parse": "^5.0.4",
131
- "deep-equal-in-any-order": "^2.0.6",
132
- "detect-monorepo": "^1.2.0",
133
131
  "exegesis": "^4.2.0",
134
132
  "exegesis-express": "^4.0.0",
135
133
  "express": "^4.16.4",
136
- "filesize": "^6.1.0",
137
134
  "form-data": "^4.0.1",
138
135
  "fs-extra": "^10.1.0",
139
136
  "fuzzy": "^0.1.3",
@@ -141,10 +138,8 @@
141
138
  "glob": "^10.5.0",
142
139
  "google-auth-library": "^9.11.0",
143
140
  "ignore": "^7.0.4",
144
- "isolate-package": "1.35.0",
145
- "js-yaml": "^3.14.2",
141
+ "js-yaml": "^4.2.0",
146
142
  "jsonwebtoken": "^9.0.2",
147
- "leven": "^3.1.0",
148
143
  "libsodium-wrappers": "^0.7.10",
149
144
  "lodash": "^4.18.0",
150
145
  "lsofi": "^2.0.0",
@@ -156,7 +151,6 @@
156
151
  "node-fetch": "^2.6.7",
157
152
  "open": "^6.3.0",
158
153
  "ora": "^5.4.1",
159
- "p-limit": "^3.0.1",
160
154
  "pg": "^8.11.3",
161
155
  "pg-gateway": "^0.3.0-beta.4",
162
156
  "pglite-2": "npm:@electric-sql/pglite@0.2.17",
@@ -175,13 +169,14 @@
175
169
  "triple-beam": "^1.3.0",
176
170
  "universal-analytics": "^0.5.3",
177
171
  "update-notifier-cjs": "^5.1.6",
178
- "uuid": "^11.1.1",
179
172
  "winston": "^3.0.0",
180
173
  "winston-transport": "^4.4.0",
181
174
  "ws": "^7.5.10",
182
175
  "yaml": "^2.8.3",
183
176
  "zod": "^3.24.3",
184
- "zod-to-json-schema": "^3.24.5"
177
+ "zod-to-json-schema": "^3.24.5",
178
+ "detect-monorepo": "^1.2.0",
179
+ "isolate-package": "1.35.0"
185
180
  },
186
181
  "devDependencies": {
187
182
  "@angular-devkit/architect": "^0.1402.2",
@@ -204,7 +199,7 @@
204
199
  "@types/html-escaper": "^3.0.0",
205
200
  "@types/inquirer": "^8.1.3",
206
201
  "@types/inquirer-autocomplete-prompt": "^2.0.2",
207
- "@types/js-yaml": "^3.12.2",
202
+ "@types/js-yaml": "^4.0.9",
208
203
  "@types/jsonwebtoken": "^9.0.5",
209
204
  "@types/libsodium-wrappers": "^0.7.9",
210
205
  "@types/lodash": "^4.14.149",
@@ -237,6 +232,7 @@
237
232
  "astro": "^2.2.3",
238
233
  "chai": "^4.3.4",
239
234
  "chai-as-promised": "^7.1.1",
235
+ "deep-equal-in-any-order": "^2.0.6",
240
236
  "eslint": "^8.56.0",
241
237
  "eslint-config-google": "^0.14.0",
242
238
  "eslint-config-prettier": "^9.1.0",
@@ -291,6 +287,7 @@
291
287
  "picomatch": "^2.3.2",
292
288
  "qs": "^6.15.2",
293
289
  "tar": "^7.5.11",
290
+ "@opentelemetry/core": "^2.8.0",
294
291
  "basic-ftp": "^5.2.2",
295
292
  "@babel/traverse": "^7.23.2",
296
293
  "universal-analytics": {