firebase-tools 10.2.0 → 10.3.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/apiv2.js +3 -0
- package/lib/appdistribution/options-parser-util.js +1 -1
- package/lib/auth.js +3 -3
- package/lib/command.js +1 -1
- package/lib/commands/apps-android-sha-create.js +2 -2
- package/lib/commands/apps-sdkconfig.js +1 -1
- package/lib/commands/auth-import.js +1 -1
- package/lib/commands/database-rules-list.js +2 -2
- package/lib/commands/emulators-start.js +1 -1
- package/lib/commands/ext-configure.js +58 -4
- package/lib/commands/ext-dev-init.js +49 -49
- package/lib/commands/ext-export.js +7 -2
- package/lib/commands/ext-install.js +163 -104
- package/lib/commands/ext-uninstall.js +17 -8
- package/lib/commands/ext-update.js +64 -11
- package/lib/commands/functions-config-clone.js +1 -1
- package/lib/commands/functions-config-export.js +1 -1
- package/lib/commands/hosting-clone.js +3 -3
- package/lib/commands/remoteconfig-get.js +1 -1
- package/lib/config.js +6 -3
- package/lib/deploy/extensions/deploymentSummary.js +3 -3
- package/lib/deploy/extensions/planner.js +7 -6
- package/lib/deploy/extensions/tasks.js +1 -1
- package/lib/deploy/functions/backend.js +21 -5
- package/lib/deploy/functions/checkIam.js +5 -5
- package/lib/deploy/functions/containerCleaner.js +3 -3
- package/lib/deploy/functions/ensure.js +3 -3
- package/lib/deploy/functions/functionsDeployHelper.js +2 -2
- package/lib/deploy/functions/prepare.js +5 -3
- package/lib/deploy/functions/pricing.js +1 -1
- package/lib/deploy/functions/prompts.js +2 -2
- package/lib/deploy/functions/release/fabricator.js +7 -7
- package/lib/deploy/functions/release/index.js +1 -1
- package/lib/deploy/functions/release/planner.js +43 -26
- package/lib/deploy/functions/release/reporter.js +3 -0
- package/lib/deploy/functions/runtimes/discovery/index.js +6 -6
- package/lib/deploy/functions/runtimes/discovery/parsing.js +1 -1
- package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +22 -12
- package/lib/deploy/functions/runtimes/golang/index.js +2 -2
- package/lib/deploy/functions/runtimes/node/index.js +53 -0
- package/lib/deploy/functions/runtimes/node/parseRuntimeAndValidateSDK.js +2 -2
- package/lib/deploy/functions/runtimes/node/parseTriggers.js +52 -15
- package/lib/deploy/functions/runtimes/node/versioning.js +2 -2
- package/lib/deploy/functions/services/firebaseAlerts.js +30 -0
- package/lib/deploy/functions/services/index.js +9 -1
- package/lib/deploy/functions/services/storage.js +10 -4
- package/lib/deploy/functions/triggerRegionHelper.js +1 -1
- package/lib/deploy/functions/validate.js +3 -3
- package/lib/deploy/hosting/client.js +9 -0
- package/lib/deploy/hosting/convertConfig.js +6 -0
- package/lib/deploy/hosting/deploy.js +2 -2
- package/lib/deploy/hosting/hashcache.js +21 -19
- package/lib/deploy/hosting/index.js +5 -5
- package/lib/deploy/hosting/prepare.js +25 -25
- package/lib/deploy/hosting/release.js +21 -24
- package/lib/deploy/hosting/uploader.js +5 -5
- package/lib/deploy/remoteconfig/functions.js +2 -2
- package/lib/emulator/auth/cloudFunctions.js +1 -1
- package/lib/emulator/auth/operations.js +1 -1
- package/lib/emulator/commandUtils.js +5 -1
- package/lib/emulator/constants.js +4 -0
- package/lib/emulator/controller.js +54 -24
- package/lib/emulator/download.js +18 -1
- package/lib/emulator/downloadableEmulators.js +30 -13
- package/lib/emulator/emulatorLogger.js +12 -1
- package/lib/emulator/extensions/validation.js +70 -0
- package/lib/emulator/extensionsEmulator.js +175 -0
- package/lib/emulator/functionsEmulator.js +106 -44
- package/lib/emulator/functionsEmulatorRuntime.js +44 -36
- package/lib/emulator/functionsEmulatorShared.js +17 -10
- package/lib/emulator/functionsEmulatorShell.js +1 -1
- package/lib/emulator/functionsEmulatorUtils.js +4 -4
- package/lib/emulator/functionsRuntimeWorker.js +2 -2
- package/lib/emulator/hub.js +4 -3
- package/lib/emulator/loggingEmulator.js +1 -1
- package/lib/emulator/pubsubEmulator.js +1 -1
- package/lib/emulator/registry.js +10 -2
- package/lib/emulator/storage/apis/firebase.js +314 -332
- package/lib/emulator/storage/apis/gcloud.js +241 -121
- package/lib/emulator/storage/crc.js +5 -1
- package/lib/emulator/storage/errors.js +9 -0
- package/lib/emulator/storage/files.js +159 -300
- package/lib/emulator/storage/index.js +27 -73
- package/lib/emulator/storage/metadata.js +65 -51
- package/lib/emulator/storage/multipart.js +62 -0
- package/lib/emulator/storage/persistence.js +78 -0
- package/lib/emulator/storage/rules/config.js +33 -0
- package/lib/emulator/storage/rules/manager.js +81 -0
- package/lib/emulator/storage/rules/runtime.js +8 -7
- package/lib/emulator/storage/rules/utils.js +48 -0
- package/lib/emulator/storage/server.js +2 -2
- package/lib/emulator/storage/upload.js +106 -0
- package/lib/emulator/types.js +3 -0
- package/lib/ensureApiEnabled.js +5 -1
- package/lib/error.js +1 -1
- package/lib/extensions/askUserForParam.js +1 -1
- package/lib/extensions/changelog.js +3 -1
- package/lib/extensions/checkProjectBilling.js +1 -1
- package/lib/extensions/displayExtensionInfo.js +1 -1
- package/lib/extensions/emulator/optionsHelper.js +56 -8
- package/lib/extensions/emulator/specHelper.js +10 -23
- package/lib/extensions/export.js +1 -51
- package/lib/extensions/extensionsApi.js +1 -1
- package/lib/extensions/extensionsHelper.js +32 -19
- package/lib/extensions/listExtensions.js +2 -0
- package/lib/extensions/manifest.js +144 -0
- package/lib/extensions/metricsUtils.js +4 -4
- package/lib/extensions/paramHelper.js +9 -8
- package/lib/extensions/refs.js +1 -1
- package/lib/extensions/secretsUtils.js +3 -3
- package/lib/functional.js +1 -1
- package/lib/functions/env.js +6 -7
- package/lib/functions/events/v2.js +11 -0
- package/lib/gcp/cloudfunctions.js +42 -11
- package/lib/gcp/cloudfunctionsv2.js +48 -17
- package/lib/gcp/cloudtasks.js +1 -1
- package/lib/gcp/docker.js +2 -2
- package/lib/gcp/resourceManager.js +4 -4
- package/lib/gcp/run.js +2 -2
- package/lib/gcp/storage.js +1 -0
- package/lib/hosting/api.js +1 -1
- package/lib/hosting/functionsProxy.js +15 -5
- package/lib/hosting/proxy.js +2 -2
- package/lib/init/features/account.js +1 -1
- package/lib/management/database.js +1 -1
- package/lib/previews.js +1 -1
- package/lib/responseToError.js +16 -7
- package/lib/serve/functions.js +2 -1
- package/lib/serve/hosting.js +1 -1
- package/lib/utils.js +15 -2
- package/npm-shrinkwrap.json +904 -412
- package/package.json +3 -3
- package/schema/firebase-config.json +32 -0
- package/templates/init/functions/javascript/package.lint.json +3 -3
- package/templates/init/functions/javascript/package.nolint.json +2 -2
- package/templates/init/functions/typescript/package.lint.json +7 -7
- package/templates/init/functions/typescript/package.nolint.json +3 -3
- package/lib/deploy/extensions/params.js +0 -39
- package/lib/deploy/functions/eventTypes.js +0 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "firebase-tools",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.0",
|
|
4
4
|
"description": "Command-Line Interface for Firebase",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"mime": "^2.5.2",
|
|
120
120
|
"minimatch": "^3.0.4",
|
|
121
121
|
"morgan": "^1.10.0",
|
|
122
|
-
"node-fetch": "^2.6.
|
|
122
|
+
"node-fetch": "^2.6.7",
|
|
123
123
|
"open": "^6.3.0",
|
|
124
124
|
"ora": "^5.4.1",
|
|
125
125
|
"portfinder": "^1.0.23",
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"@types/mocha": "^9.0.0",
|
|
173
173
|
"@types/multer": "^1.4.3",
|
|
174
174
|
"@types/node": "^12.20.39",
|
|
175
|
-
"@types/node-fetch": "^2.5.
|
|
175
|
+
"@types/node-fetch": "^2.5.12",
|
|
176
176
|
"@types/progress": "^2.0.3",
|
|
177
177
|
"@types/puppeteer": "^5.4.2",
|
|
178
178
|
"@types/request": "^2.48.1",
|
|
@@ -174,6 +174,11 @@
|
|
|
174
174
|
},
|
|
175
175
|
"type": "object"
|
|
176
176
|
},
|
|
177
|
+
"extensions": {
|
|
178
|
+
"properties": {
|
|
179
|
+
},
|
|
180
|
+
"type": "object"
|
|
181
|
+
},
|
|
177
182
|
"firestore": {
|
|
178
183
|
"additionalProperties": false,
|
|
179
184
|
"properties": {
|
|
@@ -622,6 +627,9 @@
|
|
|
622
627
|
},
|
|
623
628
|
"glob": {
|
|
624
629
|
"type": "string"
|
|
630
|
+
},
|
|
631
|
+
"region": {
|
|
632
|
+
"type": "string"
|
|
625
633
|
}
|
|
626
634
|
},
|
|
627
635
|
"required": [
|
|
@@ -696,6 +704,9 @@
|
|
|
696
704
|
"function": {
|
|
697
705
|
"type": "string"
|
|
698
706
|
},
|
|
707
|
+
"region": {
|
|
708
|
+
"type": "string"
|
|
709
|
+
},
|
|
699
710
|
"source": {
|
|
700
711
|
"type": "string"
|
|
701
712
|
}
|
|
@@ -774,6 +785,9 @@
|
|
|
774
785
|
},
|
|
775
786
|
"regex": {
|
|
776
787
|
"type": "string"
|
|
788
|
+
},
|
|
789
|
+
"region": {
|
|
790
|
+
"type": "string"
|
|
777
791
|
}
|
|
778
792
|
},
|
|
779
793
|
"required": [
|
|
@@ -1095,6 +1109,9 @@
|
|
|
1095
1109
|
},
|
|
1096
1110
|
"glob": {
|
|
1097
1111
|
"type": "string"
|
|
1112
|
+
},
|
|
1113
|
+
"region": {
|
|
1114
|
+
"type": "string"
|
|
1098
1115
|
}
|
|
1099
1116
|
},
|
|
1100
1117
|
"required": [
|
|
@@ -1169,6 +1186,9 @@
|
|
|
1169
1186
|
"function": {
|
|
1170
1187
|
"type": "string"
|
|
1171
1188
|
},
|
|
1189
|
+
"region": {
|
|
1190
|
+
"type": "string"
|
|
1191
|
+
},
|
|
1172
1192
|
"source": {
|
|
1173
1193
|
"type": "string"
|
|
1174
1194
|
}
|
|
@@ -1247,6 +1267,9 @@
|
|
|
1247
1267
|
},
|
|
1248
1268
|
"regex": {
|
|
1249
1269
|
"type": "string"
|
|
1270
|
+
},
|
|
1271
|
+
"region": {
|
|
1272
|
+
"type": "string"
|
|
1250
1273
|
}
|
|
1251
1274
|
},
|
|
1252
1275
|
"required": [
|
|
@@ -1568,6 +1591,9 @@
|
|
|
1568
1591
|
},
|
|
1569
1592
|
"glob": {
|
|
1570
1593
|
"type": "string"
|
|
1594
|
+
},
|
|
1595
|
+
"region": {
|
|
1596
|
+
"type": "string"
|
|
1571
1597
|
}
|
|
1572
1598
|
},
|
|
1573
1599
|
"required": [
|
|
@@ -1642,6 +1668,9 @@
|
|
|
1642
1668
|
"function": {
|
|
1643
1669
|
"type": "string"
|
|
1644
1670
|
},
|
|
1671
|
+
"region": {
|
|
1672
|
+
"type": "string"
|
|
1673
|
+
},
|
|
1645
1674
|
"source": {
|
|
1646
1675
|
"type": "string"
|
|
1647
1676
|
}
|
|
@@ -1720,6 +1749,9 @@
|
|
|
1720
1749
|
},
|
|
1721
1750
|
"regex": {
|
|
1722
1751
|
"type": "string"
|
|
1752
|
+
},
|
|
1753
|
+
"region": {
|
|
1754
|
+
"type": "string"
|
|
1723
1755
|
}
|
|
1724
1756
|
},
|
|
1725
1757
|
"required": [
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
},
|
|
15
15
|
"main": "index.js",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"firebase-admin": "^
|
|
18
|
-
"firebase-functions": "^3.
|
|
17
|
+
"firebase-admin": "^10.0.2",
|
|
18
|
+
"firebase-functions": "^3.18.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"eslint": "^
|
|
21
|
+
"eslint": "^8.9.0",
|
|
22
22
|
"eslint-config-google": "^0.14.0",
|
|
23
23
|
"firebase-functions-test": "^0.2.0"
|
|
24
24
|
},
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
},
|
|
15
15
|
"main": "lib/index.js",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"firebase-admin": "^
|
|
18
|
-
"firebase-functions": "^3.
|
|
17
|
+
"firebase-admin": "^10.0.2",
|
|
18
|
+
"firebase-functions": "^3.18.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
22
|
-
"@typescript-eslint/parser": "^
|
|
23
|
-
"eslint": "^
|
|
21
|
+
"@typescript-eslint/eslint-plugin": "^5.12.0",
|
|
22
|
+
"@typescript-eslint/parser": "^5.12.0",
|
|
23
|
+
"eslint": "^8.9.0",
|
|
24
24
|
"eslint-config-google": "^0.14.0",
|
|
25
|
-
"eslint-plugin-import": "^2.
|
|
25
|
+
"eslint-plugin-import": "^2.25.4",
|
|
26
26
|
"firebase-functions-test": "^0.2.0",
|
|
27
|
-
"typescript": "^
|
|
27
|
+
"typescript": "^4.5.4"
|
|
28
28
|
},
|
|
29
29
|
"private": true
|
|
30
30
|
}
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
},
|
|
14
14
|
"main": "lib/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"firebase-admin": "^
|
|
17
|
-
"firebase-functions": "^3.
|
|
16
|
+
"firebase-admin": "^10.0.2",
|
|
17
|
+
"firebase-functions": "^3.18.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"typescript": "^
|
|
20
|
+
"typescript": "^4.5.4",
|
|
21
21
|
"firebase-functions-test": "^0.2.0"
|
|
22
22
|
},
|
|
23
23
|
"private": true
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readParams = void 0;
|
|
4
|
-
const path = require("path");
|
|
5
|
-
const logger_1 = require("../../logger");
|
|
6
|
-
const paramHelper_1 = require("../../extensions/paramHelper");
|
|
7
|
-
const error_1 = require("../../error");
|
|
8
|
-
const ENV_DIRECTORY = "extensions";
|
|
9
|
-
function readParams(args) {
|
|
10
|
-
const filesToCheck = [
|
|
11
|
-
`${args.instanceId}.env`,
|
|
12
|
-
...args.aliases.map((alias) => `${args.instanceId}.env.${alias}`),
|
|
13
|
-
`${args.instanceId}.env.${args.projectNumber}`,
|
|
14
|
-
`${args.instanceId}.env.${args.projectId}`,
|
|
15
|
-
];
|
|
16
|
-
let noFilesFound = true;
|
|
17
|
-
const combinedParams = {};
|
|
18
|
-
for (const fileToCheck of filesToCheck) {
|
|
19
|
-
try {
|
|
20
|
-
const params = readParamsFile(args.projectDir, fileToCheck);
|
|
21
|
-
logger_1.logger.debug(`Successfully read params from ${fileToCheck}`);
|
|
22
|
-
noFilesFound = false;
|
|
23
|
-
Object.assign(combinedParams, params);
|
|
24
|
-
}
|
|
25
|
-
catch (err) {
|
|
26
|
-
logger_1.logger.debug(`${err}`);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
if (noFilesFound) {
|
|
30
|
-
throw new error_1.FirebaseError(`No params file found for ${args.instanceId}`);
|
|
31
|
-
}
|
|
32
|
-
return combinedParams;
|
|
33
|
-
}
|
|
34
|
-
exports.readParams = readParams;
|
|
35
|
-
function readParamsFile(projectDir, fileName) {
|
|
36
|
-
const paramPath = path.join(projectDir, ENV_DIRECTORY, fileName);
|
|
37
|
-
const params = (0, paramHelper_1.readEnvFile)(paramPath);
|
|
38
|
-
return params;
|
|
39
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PUBSUB_V2_EVENT = exports.STORAGE_V2_EVENTS = void 0;
|
|
4
|
-
exports.STORAGE_V2_EVENTS = [
|
|
5
|
-
"google.cloud.storage.object.v1.finalized",
|
|
6
|
-
"google.cloud.storage.object.v1.archived",
|
|
7
|
-
"google.cloud.storage.object.v1.deleted",
|
|
8
|
-
"google.cloud.storage.object.v1.metadataUpdated",
|
|
9
|
-
];
|
|
10
|
-
exports.PUBSUB_V2_EVENT = "google.cloud.pubsub.topic.v1.messagePublished";
|