firebase-tools-with-isolate 15.20.0 → 15.21.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/apphosting/constants.js +2 -1
- package/lib/apphosting/localbuilds.js +4 -2
- package/lib/archiveDirectory.js +2 -2
- package/lib/auth.js +2 -3
- package/lib/bin/cli.js +26 -18
- package/lib/commands/apptesting.js +11 -2
- package/lib/commands/crashlytics-symbols-upload.js +2 -2
- package/lib/crashlytics/sourcemap.js +2 -3
- package/lib/database/import.js +2 -2
- package/lib/dataconnect/build.js +6 -6
- package/lib/deploy/apphosting/util.js +9 -1
- package/lib/deploy/functions/prepare.js +39 -3
- package/lib/deploy/functions/prepareFunctionsUpload.js +1 -2
- package/lib/deploy/functions/release/index.js +0 -5
- package/lib/emulator/auth/apiSpec.js +307 -33
- package/lib/emulator/auth/cloudFunctions.js +2 -2
- package/lib/emulator/auth/operations.js +99 -9
- package/lib/emulator/auth/state.js +27 -0
- package/lib/emulator/downloadableEmulatorInfo.json +24 -24
- package/lib/emulator/functionsEmulatorShell.js +4 -4
- package/lib/emulator/functionsRuntimeWorker.js +2 -2
- package/lib/emulator/pubsubEmulator.js +3 -3
- package/lib/emulator/storage/apis/firebase.js +2 -2
- package/lib/emulator/storage/cloudFunctions.js +2 -2
- package/lib/emulator/storage/metadata.js +1 -2
- package/lib/emulator/storage/persistence.js +2 -2
- package/lib/emulator/storage/upload.js +3 -3
- package/lib/env.js +20 -4
- package/lib/experiments.js +1 -2
- package/lib/frameworks/angular/index.js +3 -2
- package/lib/frameworks/angular/utils.js +100 -2
- package/lib/frameworks/astro/index.js +1 -1
- package/lib/frameworks/astro/utils.js +1 -1
- package/lib/functions/python.js +4 -4
- package/lib/hosting/cloudRunProxy.js +8 -0
- package/lib/index.js +2 -2
- package/lib/init/features/apphosting.js +8 -1
- package/lib/init/features/functions/python.js +32 -20
- package/lib/localFunction.js +4 -2
- package/lib/track.js +2 -2
- package/lib/tsconfig.publish.tsbuildinfo +1 -1
- package/lib/utils.js +70 -0
- package/package.json +4 -8
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.
|
|
3
|
+
"version": "15.21.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",
|
|
@@ -144,7 +141,6 @@
|
|
|
144
141
|
"isolate-package": "1.35.0",
|
|
145
142
|
"js-yaml": "^3.14.2",
|
|
146
143
|
"jsonwebtoken": "^9.0.2",
|
|
147
|
-
"leven": "^3.1.0",
|
|
148
144
|
"libsodium-wrappers": "^0.7.10",
|
|
149
145
|
"lodash": "^4.18.0",
|
|
150
146
|
"lsofi": "^2.0.0",
|
|
@@ -156,7 +152,6 @@
|
|
|
156
152
|
"node-fetch": "^2.6.7",
|
|
157
153
|
"open": "^6.3.0",
|
|
158
154
|
"ora": "^5.4.1",
|
|
159
|
-
"p-limit": "^3.0.1",
|
|
160
155
|
"pg": "^8.11.3",
|
|
161
156
|
"pg-gateway": "^0.3.0-beta.4",
|
|
162
157
|
"pglite-2": "npm:@electric-sql/pglite@0.2.17",
|
|
@@ -175,13 +170,13 @@
|
|
|
175
170
|
"triple-beam": "^1.3.0",
|
|
176
171
|
"universal-analytics": "^0.5.3",
|
|
177
172
|
"update-notifier-cjs": "^5.1.6",
|
|
178
|
-
"uuid": "^11.1.1",
|
|
179
173
|
"winston": "^3.0.0",
|
|
180
174
|
"winston-transport": "^4.4.0",
|
|
181
175
|
"ws": "^7.5.10",
|
|
182
176
|
"yaml": "^2.8.3",
|
|
183
177
|
"zod": "^3.24.3",
|
|
184
|
-
"zod-to-json-schema": "^3.24.5"
|
|
178
|
+
"zod-to-json-schema": "^3.24.5",
|
|
179
|
+
"detect-monorepo": "^1.2.0"
|
|
185
180
|
},
|
|
186
181
|
"devDependencies": {
|
|
187
182
|
"@angular-devkit/architect": "^0.1402.2",
|
|
@@ -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",
|