firebase-tools 15.30.0 → 15.30.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/commands/ext-export.js +10 -1
- package/lib/commands/ext-migrate.js +11 -5
- package/lib/commands/ext-uninstall.js +40 -1
- package/lib/commands/functions-kits-install.js +4 -1
- package/lib/commands/functions-kits-uninstall.js +2 -1
- package/lib/deploy/functions/build.js +9 -7
- package/lib/deploy/functions/ensure.js +42 -2
- package/lib/deploy/functions/functionsDeployHelper.js +7 -0
- package/lib/deploy/functions/params.js +2 -1
- package/lib/deploy/functions/prepare.js +3 -4
- package/lib/deploy/functions/release/planner.js +2 -4
- package/lib/emulator/downloadableEmulatorInfo.json +7 -7
- package/lib/extensions/export.js +63 -1
- package/lib/extensions/migrate.js +16 -2
- package/lib/functions/env.js +21 -4
- package/lib/functions/kits/install.js +21 -6
- package/lib/gcp/iam.js +8 -17
- package/lib/tsconfig.compile.tsbuildinfo +1 -1
- package/lib/tsconfig.publish.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/templates/init/functions/typescript/tsconfig.json +2 -1
package/lib/gcp/iam.js
CHANGED
|
@@ -155,23 +155,14 @@ async function generateManagedServiceAccountName(projectId, prefix) {
|
|
|
155
155
|
}
|
|
156
156
|
throw new error_1.FirebaseError("Failed to generate a unique service account name after 10 attempts.");
|
|
157
157
|
}
|
|
158
|
-
function computeRolesEtag(roles
|
|
158
|
+
function computeRolesEtag(roles) {
|
|
159
|
+
const ALPHA_CHARS = "abcdefghijklmnopqrstuvwxyz";
|
|
159
160
|
const BASE38_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
const sorted = Array.from(roles).sort();
|
|
168
|
-
const hashBuffer = crypto
|
|
169
|
-
.createHash("sha256")
|
|
170
|
-
.update(salt + sorted.join(","))
|
|
171
|
-
.digest();
|
|
172
|
-
let hashStr = "";
|
|
173
|
-
for (const byte of hashBuffer) {
|
|
174
|
-
hashStr += BASE38_CHARS[byte % 38];
|
|
161
|
+
const sorted = Array.from(new Set(roles)).sort();
|
|
162
|
+
const hashBuffer = crypto.createHash("sha256").update(sorted.join(",")).digest();
|
|
163
|
+
let hashStr = ALPHA_CHARS[hashBuffer[0] % ALPHA_CHARS.length];
|
|
164
|
+
for (let i = 1; i < hashBuffer.length; i++) {
|
|
165
|
+
hashStr += BASE38_CHARS[hashBuffer[i] % BASE38_CHARS.length];
|
|
175
166
|
}
|
|
176
|
-
return
|
|
167
|
+
return hashStr;
|
|
177
168
|
}
|