firebase-tools 13.32.0 → 13.33.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/deploy/functions/release/planner.js +1 -0
- package/lib/emulator/constants.js +1 -0
- package/lib/emulator/downloadableEmulators.js +9 -9
- package/lib/emulator/env.js +2 -0
- package/lib/gcp/cloudfunctions.js +15 -0
- package/lib/gcp/cloudfunctionsv2.js +3 -2
- package/lib/management/apps.js +4 -1
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@ function calculateChangesets(want, have, keyFn, deleteAll) {
|
|
|
16
16
|
.filter((id) => deleteAll || (0, deploymentTool_1.isFirebaseManaged)(have[id].labels || {}))
|
|
17
17
|
.map((id) => have[id]), keyFn);
|
|
18
18
|
const toSkipPredicate = (id) => !!(!want[id].targetedByOnly &&
|
|
19
|
+
have[id].state === "ACTIVE" &&
|
|
19
20
|
have[id].hash &&
|
|
20
21
|
want[id].hash &&
|
|
21
22
|
want[id].hash === have[id].hash);
|
|
@@ -103,6 +103,7 @@ Constants.FIREBASE_ENABLED_EXPERIMENTS = "FIREBASE_ENABLED_EXPERIMENTS";
|
|
|
103
103
|
Constants.FIRESTORE_EMULATOR_HOST = "FIRESTORE_EMULATOR_HOST";
|
|
104
104
|
Constants.FIRESTORE_EMULATOR_ENV_ALT = "FIREBASE_FIRESTORE_EMULATOR_ADDRESS";
|
|
105
105
|
Constants.FIREBASE_DATABASE_EMULATOR_HOST = "FIREBASE_DATABASE_EMULATOR_HOST";
|
|
106
|
+
Constants.FIREBASE_DATACONNECT_EMULATOR_HOST = "FIREBASE_DATACONNECT_EMULATOR_HOST";
|
|
106
107
|
Constants.FIREBASE_AUTH_EMULATOR_HOST = "FIREBASE_AUTH_EMULATOR_HOST";
|
|
107
108
|
Constants.FIREBASE_STORAGE_EMULATOR_HOST = "FIREBASE_STORAGE_EMULATOR_HOST";
|
|
108
109
|
Constants.CLOUD_STORAGE_EMULATOR_HOST = "STORAGE_EMULATOR_HOST";
|
|
@@ -48,20 +48,20 @@ const EMULATOR_UPDATE_DETAILS = {
|
|
|
48
48
|
},
|
|
49
49
|
dataconnect: process.platform === "darwin"
|
|
50
50
|
? {
|
|
51
|
-
version: "1.8.
|
|
52
|
-
expectedSize:
|
|
53
|
-
expectedChecksum: "
|
|
51
|
+
version: "1.8.4",
|
|
52
|
+
expectedSize: 25588480,
|
|
53
|
+
expectedChecksum: "421f6226a0433b824642c03eb0b6862d",
|
|
54
54
|
}
|
|
55
55
|
: process.platform === "win32"
|
|
56
56
|
? {
|
|
57
|
-
version: "1.8.
|
|
58
|
-
expectedSize:
|
|
59
|
-
expectedChecksum: "
|
|
57
|
+
version: "1.8.4",
|
|
58
|
+
expectedSize: 26020352,
|
|
59
|
+
expectedChecksum: "b78c95a7f071f127acda3a76cdcc8c48",
|
|
60
60
|
}
|
|
61
61
|
: {
|
|
62
|
-
version: "1.8.
|
|
63
|
-
expectedSize:
|
|
64
|
-
expectedChecksum: "
|
|
62
|
+
version: "1.8.4",
|
|
63
|
+
expectedSize: 25501848,
|
|
64
|
+
expectedChecksum: "0aabd622b1a99b2a0d9c9dec4c7404fc",
|
|
65
65
|
},
|
|
66
66
|
};
|
|
67
67
|
exports.DownloadDetails = {
|
package/lib/emulator/env.js
CHANGED
|
@@ -34,6 +34,8 @@ function setEnvVarsForEmulators(env, emulators) {
|
|
|
34
34
|
case types_1.Emulators.TASKS:
|
|
35
35
|
env[constants_1.Constants.CLOUD_TASKS_EMULATOR_HOST] = host;
|
|
36
36
|
break;
|
|
37
|
+
case types_1.Emulators.DATACONNECT:
|
|
38
|
+
env[constants_1.Constants.FIREBASE_DATACONNECT_EMULATOR_HOST] = host;
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
}
|
|
@@ -265,6 +265,21 @@ function endpointFromFunction(gcfFunction) {
|
|
|
265
265
|
if ((_h = gcfFunction.labels) === null || _h === void 0 ? void 0 : _h[constants_1.HASH_LABEL]) {
|
|
266
266
|
endpoint.hash = gcfFunction.labels[constants_1.HASH_LABEL];
|
|
267
267
|
}
|
|
268
|
+
proto.convertIfPresent(endpoint, gcfFunction, "state", "status", (status) => {
|
|
269
|
+
if (status === "ACTIVE") {
|
|
270
|
+
return "ACTIVE";
|
|
271
|
+
}
|
|
272
|
+
else if (status === "OFFLINE") {
|
|
273
|
+
return "FAILED";
|
|
274
|
+
}
|
|
275
|
+
else if (status === "DEPLOY_IN_PROGRESS") {
|
|
276
|
+
return "DEPLOYING";
|
|
277
|
+
}
|
|
278
|
+
else if (status === "DELETE_IN_PROGRESS") {
|
|
279
|
+
return "DELETING";
|
|
280
|
+
}
|
|
281
|
+
return "UNKONWN";
|
|
282
|
+
});
|
|
268
283
|
return endpoint;
|
|
269
284
|
}
|
|
270
285
|
exports.endpointFromFunction = endpointFromFunction;
|
|
@@ -91,7 +91,7 @@ async function createFunction(cloudFunction) {
|
|
|
91
91
|
const components = cloudFunction.name.split("/");
|
|
92
92
|
const functionId = components.splice(-1, 1)[0];
|
|
93
93
|
cloudFunction.buildConfig.environmentVariables = Object.assign(Object.assign({}, cloudFunction.buildConfig.environmentVariables), { GOOGLE_NODE_RUN_SCRIPTS: "" });
|
|
94
|
-
cloudFunction.serviceConfig.environmentVariables = Object.assign(Object.assign({}, cloudFunction.serviceConfig.environmentVariables), { FUNCTION_TARGET: cloudFunction.buildConfig.entryPoint.replaceAll("-", ".") });
|
|
94
|
+
cloudFunction.serviceConfig.environmentVariables = Object.assign(Object.assign({}, cloudFunction.serviceConfig.environmentVariables), { FUNCTION_TARGET: cloudFunction.buildConfig.entryPoint.replaceAll("-", "."), LOG_EXECUTION_ID: "true" });
|
|
95
95
|
try {
|
|
96
96
|
const res = await client.post(components.join("/"), cloudFunction, { queryParams: { functionId } });
|
|
97
97
|
return res.body;
|
|
@@ -147,7 +147,7 @@ async function updateFunction(cloudFunction) {
|
|
|
147
147
|
const fieldMasks = proto.fieldMasks(cloudFunction, "labels", "serviceConfig.environmentVariables", "serviceConfig.secretEnvironmentVariables");
|
|
148
148
|
cloudFunction.buildConfig.environmentVariables = Object.assign(Object.assign({}, cloudFunction.buildConfig.environmentVariables), { GOOGLE_NODE_RUN_SCRIPTS: "" });
|
|
149
149
|
fieldMasks.push("buildConfig.buildEnvironmentVariables");
|
|
150
|
-
cloudFunction.serviceConfig.environmentVariables = Object.assign(Object.assign({}, cloudFunction.serviceConfig.environmentVariables), { FUNCTION_TARGET: cloudFunction.buildConfig.entryPoint.replaceAll("-", ".") });
|
|
150
|
+
cloudFunction.serviceConfig.environmentVariables = Object.assign(Object.assign({}, cloudFunction.serviceConfig.environmentVariables), { FUNCTION_TARGET: cloudFunction.buildConfig.entryPoint.replaceAll("-", "."), LOG_EXECUTION_ID: "true" });
|
|
151
151
|
try {
|
|
152
152
|
const queryParams = {
|
|
153
153
|
updateMask: fieldMasks.join(","),
|
|
@@ -389,6 +389,7 @@ function endpointFromFunction(gcfFunction) {
|
|
|
389
389
|
if ((_f = gcfFunction.labels) === null || _f === void 0 ? void 0 : _f[constants_1.HASH_LABEL]) {
|
|
390
390
|
endpoint.hash = gcfFunction.labels[constants_1.HASH_LABEL];
|
|
391
391
|
}
|
|
392
|
+
proto.copyIfPresent(endpoint, gcfFunction, "state");
|
|
392
393
|
return endpoint;
|
|
393
394
|
}
|
|
394
395
|
exports.endpointFromFunction = endpointFromFunction;
|
package/lib/management/apps.js
CHANGED
|
@@ -566,13 +566,16 @@ async function findIntelligentPathForAndroid(appDir, options) {
|
|
|
566
566
|
const dirs = [];
|
|
567
567
|
for (const fileOrDir of currentFiles) {
|
|
568
568
|
if (fileOrDir.isDirectory()) {
|
|
569
|
+
if (fileOrDir.name !== "gradle") {
|
|
570
|
+
dirs.push(fileOrDir.name);
|
|
571
|
+
}
|
|
569
572
|
if (fileOrDir.name === "src") {
|
|
570
573
|
return appDir;
|
|
571
574
|
}
|
|
572
575
|
}
|
|
573
576
|
}
|
|
574
577
|
let module = path.join(appDir, "app");
|
|
575
|
-
if (dirs.length === 1) {
|
|
578
|
+
if (dirs.length === 1 && dirs[0] === "app") {
|
|
576
579
|
return module;
|
|
577
580
|
}
|
|
578
581
|
if (!options.nonInteractive) {
|