firebase-tools-with-isolate 15.26.0 → 15.28.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/appcheck/api.js +19 -0
- package/lib/appcheck/providers.js +240 -0
- package/lib/commands/appcheck-apps-list.js +78 -0
- package/lib/commands/appcheck-debugtokens-create.js +2 -2
- package/lib/commands/appcheck-debugtokens-delete.js +2 -2
- package/lib/commands/appcheck-debugtokens-list.js +2 -2
- package/lib/commands/appcheck-prompts.js +55 -0
- package/lib/commands/appcheck-providers-get.js +73 -0
- package/lib/commands/appcheck-providers-list.js +67 -0
- package/lib/commands/appcheck-providers-set.js +96 -0
- package/lib/commands/ext-export.js +140 -3
- package/lib/commands/ext-uninstall.js +35 -1
- package/lib/commands/functions-delete.js +19 -5
- package/lib/commands/functions-kits-install.js +417 -0
- package/lib/commands/functions-kits-list.js +27 -0
- package/lib/commands/index.js +11 -0
- package/lib/crashlytics/filters.js +12 -4
- package/lib/crashlytics/reports.js +2 -0
- package/lib/crashlytics/types.js +8 -1
- package/lib/dataconnect/client.js +11 -0
- package/lib/dataconnect/schemaMigration.js +16 -5
- package/lib/deploy/extensions/secrets.js +18 -0
- package/lib/deploy/functions/backend.js +11 -1
- package/lib/deploy/functions/build.js +1 -1
- package/lib/deploy/functions/functionsDeployHelper.js +39 -15
- package/lib/deploy/functions/params.js +5 -1
- package/lib/deploy/functions/prepare.js +69 -22
- package/lib/deploy/functions/prompts.js +1 -1
- package/lib/deploy/functions/release/lifecycle.js +11 -0
- package/lib/deploy/functions/release/planner.js +5 -2
- package/lib/deploy/functions/runtimes/dart/features.js +51 -0
- package/lib/deploy/functions/runtimes/dart/index.js +60 -16
- package/lib/emulator/controller.js +1 -0
- package/lib/emulator/downloadableEmulatorInfo.json +31 -31
- package/lib/emulator/functionsEmulator.js +7 -2
- package/lib/experiments.js +17 -5
- package/lib/extensions/export.js +73 -0
- package/lib/extensions/replacementRegistry.js +30 -0
- package/lib/extensions/replacements.json +464 -0
- package/lib/fetchMOTD.js +3 -0
- package/lib/functions/env.js +31 -7
- package/lib/functions/iac/export.js +16 -1
- package/lib/functions/kits/config.js +8 -0
- package/lib/functions/projectConfig.js +19 -11
- package/lib/functions/python.js +1 -1
- package/lib/gcp/runv2.js +1 -0
- package/lib/gcp/secretManager.js +3 -3
- package/lib/init/features/functions/dart.js +1 -1
- package/lib/mcp/onemcp/index.js +2 -1
- package/lib/mcp/onemcp/onemcp_server.js +38 -11
- package/lib/mcp/prompts/crashlytics/connect.js +1 -1
- package/lib/mcp/resources/guides/crashlytics_issues.js +3 -3
- package/lib/mcp/resources/guides/crashlytics_reports.js +32 -11
- package/lib/mcp/tool.js +5 -0
- package/lib/mcp/tools/core/deploy.js +2 -0
- package/lib/mcp/tools/core/login.js +59 -4
- package/lib/mcp/tools/crashlytics/notes.js +3 -3
- package/lib/mcp/tools/crashlytics/reports.js +2 -0
- package/lib/mcp/tools/dataconnect/compile.js +23 -2
- package/lib/mcp/tools/dataconnect/list_services.js +3 -4
- package/lib/mcp/util/crashlytics/availability.js +54 -1
- package/lib/serve/functions.js +1 -1
- package/lib/tsconfig.publish.tsbuildinfo +1 -1
- package/lib/unzip.js +12 -2
- package/package.json +2 -1
- package/schema/firebase-config.json +3 -3
- package/templates/init/functions/dart/_gitignore +1 -0
- package/templates/init/functions/typescript/index-kit-migration.ts +49 -0
- package/templates/init/functions/typescript/index-kit.ts +35 -0
- package/templates/init/functions/typescript/index.ts +3 -3
- package/templates/init/functions/typescript/package-ongraphrequest.lint.json +3 -3
- package/templates/init/functions/typescript/package.lint.json +3 -3
- package/templates/init/functions/typescript/tsconfig.dev.json +4 -0
- package/lib/appcheck/prompts.js +0 -41
|
@@ -44,46 +44,46 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"pubsub": {
|
|
47
|
-
"version": "0.8.
|
|
48
|
-
"expectedSize":
|
|
49
|
-
"expectedChecksum": "
|
|
50
|
-
"expectedChecksumSHA256": "
|
|
51
|
-
"remoteUrl": "https://storage.googleapis.com/firebase-preview-drop/emulator/pubsub-emulator-0.8.
|
|
52
|
-
"downloadPathRelativeToCacheDir": "pubsub-emulator-0.8.
|
|
53
|
-
"binaryPathRelativeToCacheDir": "pubsub-emulator-0.8.
|
|
47
|
+
"version": "0.8.35",
|
|
48
|
+
"expectedSize": 53015972,
|
|
49
|
+
"expectedChecksum": "04cb782e3edf7a2b117990af8506453e",
|
|
50
|
+
"expectedChecksumSHA256": "b0f3b73a14b716ecf8925b7b8a0c8c858ffabddcf03df8b2b7fba682f48dc616",
|
|
51
|
+
"remoteUrl": "https://storage.googleapis.com/firebase-preview-drop/emulator/pubsub-emulator-0.8.35.zip",
|
|
52
|
+
"downloadPathRelativeToCacheDir": "pubsub-emulator-0.8.35.zip",
|
|
53
|
+
"binaryPathRelativeToCacheDir": "pubsub-emulator-0.8.35/pubsub-emulator/bin/cloud-pubsub-emulator"
|
|
54
54
|
},
|
|
55
55
|
"dataconnect": {
|
|
56
56
|
"darwin": {
|
|
57
|
-
"version": "3.4.
|
|
58
|
-
"expectedSize":
|
|
59
|
-
"expectedChecksum": "
|
|
60
|
-
"expectedChecksumSHA256": "
|
|
61
|
-
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-macos-amd64-v3.4.
|
|
62
|
-
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.
|
|
57
|
+
"version": "3.4.18",
|
|
58
|
+
"expectedSize": 33375408,
|
|
59
|
+
"expectedChecksum": "e38f131497fc43df55c3a47ee87e7fd4",
|
|
60
|
+
"expectedChecksumSHA256": "52518fefdd2e52581b0d8d035c6498f304ac493d3757f4fd35851b1f028a9460",
|
|
61
|
+
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-macos-amd64-v3.4.18",
|
|
62
|
+
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.18"
|
|
63
63
|
},
|
|
64
64
|
"darwin_arm64": {
|
|
65
|
-
"version": "3.4.
|
|
66
|
-
"expectedSize":
|
|
67
|
-
"expectedChecksum": "
|
|
68
|
-
"expectedChecksumSHA256": "
|
|
69
|
-
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-macos-arm64-v3.4.
|
|
70
|
-
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.
|
|
65
|
+
"version": "3.4.18",
|
|
66
|
+
"expectedSize": 31505922,
|
|
67
|
+
"expectedChecksum": "6a7cfdd68a7671bb660eb8489372a890",
|
|
68
|
+
"expectedChecksumSHA256": "96cdec1fd6561af5c10f915f6f3bfd59a7405bf5e9b8fabfedb40cd57d6d5d76",
|
|
69
|
+
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-macos-arm64-v3.4.18",
|
|
70
|
+
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.18"
|
|
71
71
|
},
|
|
72
72
|
"win32": {
|
|
73
|
-
"version": "3.4.
|
|
74
|
-
"expectedSize":
|
|
75
|
-
"expectedChecksum": "
|
|
76
|
-
"expectedChecksumSHA256": "
|
|
77
|
-
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-windows-amd64-v3.4.
|
|
78
|
-
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.
|
|
73
|
+
"version": "3.4.18",
|
|
74
|
+
"expectedSize": 33414144,
|
|
75
|
+
"expectedChecksum": "d2504c643ac8355b90aa31be7575807c",
|
|
76
|
+
"expectedChecksumSHA256": "a92f2d01950af613d28b92c2cd7baa85e7629fa201b8ff8dddce73d5584dccc5",
|
|
77
|
+
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-windows-amd64-v3.4.18",
|
|
78
|
+
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.18.exe"
|
|
79
79
|
},
|
|
80
80
|
"linux": {
|
|
81
|
-
"version": "3.4.
|
|
82
|
-
"expectedSize":
|
|
83
|
-
"expectedChecksum": "
|
|
84
|
-
"expectedChecksumSHA256": "
|
|
85
|
-
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-linux-amd64-v3.4.
|
|
86
|
-
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.
|
|
81
|
+
"version": "3.4.18",
|
|
82
|
+
"expectedSize": 32510136,
|
|
83
|
+
"expectedChecksum": "c8b4640f3ea59c813a708814bd2c0f8c",
|
|
84
|
+
"expectedChecksumSHA256": "bb381de594485653812bee518ddae025c13e1050670d6fa186f6003c3c9b71ec",
|
|
85
|
+
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-linux-amd64-v3.4.18",
|
|
86
|
+
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.18"
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -367,9 +367,13 @@ class FunctionsEmulator {
|
|
|
367
367
|
projectAlias: this.args.projectAlias,
|
|
368
368
|
isEmulator: true,
|
|
369
369
|
configDir: emulatableBackend.configDir,
|
|
370
|
+
projectDir: this.args.projectDir,
|
|
370
371
|
};
|
|
371
372
|
const userEnvs = functionsEnv.loadUserEnvs(userEnvOpt);
|
|
372
|
-
const discoveredBuild = await runtimeDelegate.discoverBuild(runtimeConfig,
|
|
373
|
+
const discoveredBuild = await runtimeDelegate.discoverBuild(runtimeConfig, {
|
|
374
|
+
...userEnvs,
|
|
375
|
+
...environment,
|
|
376
|
+
});
|
|
373
377
|
if (discoveredBuild.extensions && this.args.extensionsEmulator) {
|
|
374
378
|
await this.args.extensionsEmulator.addDynamicExtensions(emulatableBackend.codebase, discoveredBuild);
|
|
375
379
|
await this.loadDynamicExtensionBackends();
|
|
@@ -379,6 +383,7 @@ class FunctionsEmulator {
|
|
|
379
383
|
build: discoveredBuild,
|
|
380
384
|
firebaseConfig: JSON.parse(firebaseConfig),
|
|
381
385
|
userEnvs,
|
|
386
|
+
codebase: emulatableBackend.codebase,
|
|
382
387
|
nonInteractive: false,
|
|
383
388
|
isEmulator: true,
|
|
384
389
|
});
|
|
@@ -957,6 +962,7 @@ class FunctionsEmulator {
|
|
|
957
962
|
projectId: this.args.projectId,
|
|
958
963
|
projectAlias: this.args.projectAlias,
|
|
959
964
|
isEmulator: true,
|
|
965
|
+
projectDir: this.args.projectDir,
|
|
960
966
|
};
|
|
961
967
|
if (functionsEnv.hasUserEnvs(projectInfo)) {
|
|
962
968
|
try {
|
|
@@ -1134,7 +1140,6 @@ class FunctionsEmulator {
|
|
|
1134
1140
|
port: 8081 + (0, utils_1.randomInt)(0, 1000),
|
|
1135
1141
|
});
|
|
1136
1142
|
const childProcess = (0, python_1.runWithVirtualEnv)(args, backend.functionsDir, {
|
|
1137
|
-
...process.env,
|
|
1138
1143
|
...envs,
|
|
1139
1144
|
PYTHONUNBUFFERED: "1",
|
|
1140
1145
|
DEBUG: "False",
|
package/lib/experiments.js
CHANGED
|
@@ -122,11 +122,12 @@ exports.ALL_EXPERIMENTS = experiments({
|
|
|
122
122
|
"without a notice.",
|
|
123
123
|
},
|
|
124
124
|
appcheckadmin: {
|
|
125
|
-
shortDescription: "Manage App Check enforcement from the CLI.",
|
|
126
|
-
fullDescription: "Enables the `firebase appcheck:services`
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
125
|
+
shortDescription: "Manage App Check enforcement and attestation providers from the CLI.",
|
|
126
|
+
fullDescription: "Enables the `firebase appcheck:services`, `firebase appcheck:providers` and " +
|
|
127
|
+
"`firebase appcheck:apps` commands for reading and changing App Check enforcement per " +
|
|
128
|
+
"service and the attestation providers of each app. These commands are in preview and " +
|
|
129
|
+
"may change until the surface is API council approved. The `firebase appcheck:debugtokens` " +
|
|
130
|
+
"commands are generally available and are not affected by this experiment.",
|
|
130
131
|
},
|
|
131
132
|
ailogic: {
|
|
132
133
|
shortDescription: "Manage Firebase AI Logic from the CLI.",
|
|
@@ -215,6 +216,17 @@ exports.ALL_EXPERIMENTS = experiments({
|
|
|
215
216
|
default: true,
|
|
216
217
|
public: true,
|
|
217
218
|
},
|
|
219
|
+
extMigrationFeatures: {
|
|
220
|
+
shortDescription: "Enable features intended to assist with the migration of Extension instances to Kits.",
|
|
221
|
+
default: false,
|
|
222
|
+
public: false,
|
|
223
|
+
},
|
|
224
|
+
fdcapimigration: {
|
|
225
|
+
shortDescription: "Enable the FDC API schema migration path.",
|
|
226
|
+
fullDescription: "API based Schema Migration behind experimental flag.",
|
|
227
|
+
default: true,
|
|
228
|
+
public: false,
|
|
229
|
+
},
|
|
218
230
|
});
|
|
219
231
|
function isValidExperiment(name) {
|
|
220
232
|
return Object.keys(exports.ALL_EXPERIMENTS).includes(name);
|
package/lib/extensions/export.js
CHANGED
|
@@ -3,11 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.parameterizeProject = parameterizeProject;
|
|
4
4
|
exports.setSecretParamsToLatest = setSecretParamsToLatest;
|
|
5
5
|
exports.displayExportInfo = displayExportInfo;
|
|
6
|
+
exports.functionsEnvFromInstance = functionsEnvFromInstance;
|
|
7
|
+
exports.ejectSecretsFromInstance = ejectSecretsFromInstance;
|
|
6
8
|
const planner_1 = require("../deploy/extensions/planner");
|
|
7
9
|
const deploymentSummary_1 = require("../deploy/extensions/deploymentSummary");
|
|
8
10
|
const logger_1 = require("../logger");
|
|
9
11
|
const secretManager_1 = require("../gcp/secretManager");
|
|
10
12
|
const secretsUtils_1 = require("./secretsUtils");
|
|
13
|
+
const secrets_1 = require("../deploy/extensions/secrets");
|
|
14
|
+
const error_1 = require("../error");
|
|
11
15
|
function parameterizeProject(projectId, projectNumber, spec) {
|
|
12
16
|
const newParams = {};
|
|
13
17
|
for (const [key, val] of Object.entries(spec.params)) {
|
|
@@ -60,3 +64,72 @@ function displaySpecs(specs) {
|
|
|
60
64
|
logger_1.logger.info("");
|
|
61
65
|
}
|
|
62
66
|
}
|
|
67
|
+
function functionsEnvFromInstance(instance) {
|
|
68
|
+
const liveParams = instance.config?.params || {};
|
|
69
|
+
const liveSystemParams = instance.config?.systemParams || {};
|
|
70
|
+
const specParams = instance.config?.source?.spec?.params || {};
|
|
71
|
+
const specSystemParams = instance.config?.source?.spec?.systemParams || {};
|
|
72
|
+
const envs = {};
|
|
73
|
+
specParams.forEach((specParam) => {
|
|
74
|
+
if (specParam.type === "SECRET") {
|
|
75
|
+
const renamed = "FIREBASE_SECRET_REF_" + specParam.param;
|
|
76
|
+
envs[renamed] = liveParams[specParam.param];
|
|
77
|
+
}
|
|
78
|
+
else if (specParam.param in liveParams) {
|
|
79
|
+
envs[specParam.param] = liveParams[specParam.param];
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
envs[specParam.param] = specParam.default ?? "";
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
for (const [sysParamName, sysParamValue] of Object.entries(liveSystemParams)) {
|
|
86
|
+
let renamed = sysParamName
|
|
87
|
+
.replace(/^firebaseextensions\.v1beta\.(v2)?function\//, "EXT_MIGRATED_SYSTEM_")
|
|
88
|
+
.toUpperCase();
|
|
89
|
+
if (renamed === "EXT_MIGRATED_SYSTEM_LOCATION") {
|
|
90
|
+
renamed = "DEFAULT_FUNCTION_REGION";
|
|
91
|
+
}
|
|
92
|
+
envs[renamed] = sysParamValue;
|
|
93
|
+
}
|
|
94
|
+
for (const specSystemParam of Object.values(specSystemParams)) {
|
|
95
|
+
if (specSystemParam.param in liveSystemParams) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
if ("default" in specSystemParam) {
|
|
99
|
+
const renamed = specSystemParam.param
|
|
100
|
+
.replace(/^firebaseextensions\.v1beta\.(v2)?function\//, "EXT_MIGRATED_SYSTEM_")
|
|
101
|
+
.toUpperCase();
|
|
102
|
+
envs[renamed] = specSystemParam.default ?? "";
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (typeof instance.config.allowedEventTypes !== "undefined") {
|
|
106
|
+
envs["EXT_SELECTED_EVENTS"] = instance.config.allowedEventTypes.toString();
|
|
107
|
+
}
|
|
108
|
+
if (typeof instance.config.eventarcChannel !== "undefined") {
|
|
109
|
+
envs["EVENTARC_CHANNEL"] = instance.config.eventarcChannel;
|
|
110
|
+
}
|
|
111
|
+
return envs;
|
|
112
|
+
}
|
|
113
|
+
async function ejectSecretsFromInstance(instance) {
|
|
114
|
+
const secretsChanged = [];
|
|
115
|
+
const liveParams = instance.config?.params || {};
|
|
116
|
+
for (const specParam of instance.config?.source?.spec?.params ?? []) {
|
|
117
|
+
if (specParam.type !== "SECRET") {
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
const secretName = specParam.param;
|
|
121
|
+
const resourceName = liveParams[secretName];
|
|
122
|
+
if (!resourceName) {
|
|
123
|
+
throw new error_1.FirebaseError(`Secret ${secretName} was defined in the extension spec, but is missing in live deployed secrets.`, { exit: 1 });
|
|
124
|
+
}
|
|
125
|
+
const match = resourceName.match(secretManager_1.SECRET_VERSION_NAME_REGEX);
|
|
126
|
+
if (!match?.groups) {
|
|
127
|
+
throw new error_1.FirebaseError(`Invalid secret version resource name [${resourceName}].`);
|
|
128
|
+
}
|
|
129
|
+
const projectId = match.groups.project;
|
|
130
|
+
const secretId = match.groups.secret;
|
|
131
|
+
await (0, secrets_1.transferSecretToKits)(projectId, secretId);
|
|
132
|
+
secretsChanged.push(`${projectId}/${secretId}`);
|
|
133
|
+
}
|
|
134
|
+
return secretsChanged;
|
|
135
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getExtensionReplacement = getExtensionReplacement;
|
|
4
|
+
exports.getDeprecationWarningMessage = getDeprecationWarningMessage;
|
|
5
|
+
const replacementsData = require("./replacements.json");
|
|
6
|
+
const DECOMMISSION_DATE_STR = "March 31, 2027";
|
|
7
|
+
const registry = replacementsData;
|
|
8
|
+
function getExtensionReplacement(extensionRef) {
|
|
9
|
+
if (!extensionRef) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
return registry.replacements?.[extensionRef];
|
|
13
|
+
}
|
|
14
|
+
function getDeprecationWarningMessage(extensionRef) {
|
|
15
|
+
const replacement = getExtensionReplacement(extensionRef);
|
|
16
|
+
if (!replacement) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
switch (replacement.status) {
|
|
20
|
+
case "REPLACEMENT_AVAILABLE":
|
|
21
|
+
return (`Extension '${extensionRef}' is deprecated and will be decommissioned on ${DECOMMISSION_DATE_STR}.\n` +
|
|
22
|
+
` Recommended replacement: ${replacement.npmPackage}`);
|
|
23
|
+
case "CONFIRMED_NO_REPLACEMENT":
|
|
24
|
+
return (`Extension '${extensionRef}' is deprecated and will be decommissioned on ${DECOMMISSION_DATE_STR}.\n` +
|
|
25
|
+
` Note: No npm package replacement is planned for this extension.`);
|
|
26
|
+
case "PENDING_PUBLISHER":
|
|
27
|
+
return (`Extension '${extensionRef}' is deprecated and will be decommissioned on ${DECOMMISSION_DATE_STR}.\n` +
|
|
28
|
+
` A replacement package has not yet been announced by the publisher.`);
|
|
29
|
+
}
|
|
30
|
+
}
|