firebase-tools 15.26.0 → 15.27.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/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 +75 -3
- package/lib/commands/functions-kits-install.js +294 -0
- package/lib/commands/index.js +10 -0
- package/lib/crashlytics/filters.js +12 -4
- package/lib/crashlytics/reports.js +2 -0
- package/lib/crashlytics/types.js +8 -1
- package/lib/deploy/functions/backend.js +11 -1
- package/lib/deploy/functions/build.js +1 -1
- package/lib/deploy/functions/params.js +5 -1
- package/lib/deploy/functions/prepare.js +26 -13
- 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/emulator/controller.js +1 -0
- package/lib/emulator/functionsEmulator.js +3 -1
- package/lib/experiments.js +11 -5
- package/lib/extensions/export.js +47 -0
- package/lib/functions/env.js +20 -7
- package/lib/functions/projectConfig.js +19 -11
- package/lib/functions/python.js +1 -1
- package/lib/gcp/runv2.js +1 -0
- 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/crashlytics/notes.js +3 -3
- package/lib/mcp/tools/crashlytics/reports.js +2 -0
- package/lib/mcp/util/crashlytics/availability.js +54 -1
- package/lib/serve/functions.js +1 -1
- package/lib/tsconfig.compile.tsbuildinfo +1 -1
- package/lib/tsconfig.publish.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/schema/firebase-config.json +3 -3
- package/templates/init/functions/typescript/index-kit-migration.ts +49 -0
- package/templates/init/functions/typescript/index-kit.ts +35 -0
- package/lib/appcheck/prompts.js +0 -41
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
4
|
+
const clc = require("colorette");
|
|
5
|
+
const command_1 = require("../command");
|
|
6
|
+
const projectUtils_1 = require("../projectUtils");
|
|
7
|
+
const requireAuth_1 = require("../requireAuth");
|
|
8
|
+
const requirePermissions_1 = require("../requirePermissions");
|
|
9
|
+
const logger_1 = require("../logger");
|
|
10
|
+
const utils_1 = require("../utils");
|
|
11
|
+
const api_1 = require("../appcheck/api");
|
|
12
|
+
const providers_1 = require("../appcheck/providers");
|
|
13
|
+
const appcheck_prompts_1 = require("./appcheck-prompts");
|
|
14
|
+
exports.command = new command_1.Command("appcheck:providers:set <provider>")
|
|
15
|
+
.description("configure an App Check attestation provider for an app")
|
|
16
|
+
.help(`configures one attestation provider for one app.
|
|
17
|
+
|
|
18
|
+
<provider> is one of:
|
|
19
|
+
|
|
20
|
+
${(0, providers_1.providerHelp)()}
|
|
21
|
+
|
|
22
|
+
Flags per provider:
|
|
23
|
+
|
|
24
|
+
all --token-ttl <30m|1h|1d, between 30m and 7d>
|
|
25
|
+
device-check --key-id <id> --private-key <value or @file>
|
|
26
|
+
recaptcha-enterprise --site-key <key> --min-score <0.0-1.0>
|
|
27
|
+
recaptcha-v3 --site-secret <value or @file> --min-score <0.0-1.0>
|
|
28
|
+
play-integrity --min-device-integrity <${Object.keys(providers_1.DEVICE_INTEGRITY_LEVELS).join("|")}>
|
|
29
|
+
--[no-]require-licensed --[no-]allow-unrecognized-version
|
|
30
|
+
app-attest only --token-ttl
|
|
31
|
+
|
|
32
|
+
Secrets accept @path to read a file, so a private key does not end up in your shell history.
|
|
33
|
+
|
|
34
|
+
On iOS and Android, use \`recaptcha-enterprise\` for the reCAPTCHA attestation provider that the mobile SDKs added in June 2026 (Apple 12.15.0, Android firebase-appcheck-recaptcha 19.0.0). It is in public preview there and uses the same site key settings as the web provider.
|
|
35
|
+
|
|
36
|
+
This command changes how a token is checked, it does not turn enforcement on. Use \`appcheck:services:set\` for that.
|
|
37
|
+
|
|
38
|
+
For example:
|
|
39
|
+
|
|
40
|
+
\`firebase appcheck:providers:set device-check --app 1:123:ios:abc --key-id ABCD1234EF --private-key @AuthKey.p8\``)
|
|
41
|
+
.option("--app <appId>", "the app id of your Firebase app")
|
|
42
|
+
.option("--token-ttl <duration>", "how long App Check tokens stay valid, e.g. 30m, 1h, 1d")
|
|
43
|
+
.option("--key-id <keyId>", "device-check: the Apple key identifier")
|
|
44
|
+
.option("--private-key <value>", "device-check: the .p8 contents, or @path to the file")
|
|
45
|
+
.option("--site-key <siteKey>", "recaptcha-enterprise: the reCAPTCHA Enterprise site key")
|
|
46
|
+
.option("--site-secret <value>", "recaptcha-v3: the site secret, or @path to a file")
|
|
47
|
+
.option("--min-score <score>", "recaptcha: minimum score to accept, 0.0 to 1.0")
|
|
48
|
+
.option("--min-device-integrity <level>", `play-integrity: minimum device level (${Object.keys(providers_1.DEVICE_INTEGRITY_LEVELS).join(", ")})`)
|
|
49
|
+
.option("--require-licensed", "play-integrity: require the LICENSED account verdict")
|
|
50
|
+
.option("--no-require-licensed", "play-integrity: stop requiring the LICENSED verdict")
|
|
51
|
+
.option("--allow-unrecognized-version", "play-integrity: allow unrecognized app versions")
|
|
52
|
+
.option("--no-allow-unrecognized-version", "play-integrity: reject unrecognized app versions")
|
|
53
|
+
.before(requireAuth_1.requireAuth)
|
|
54
|
+
.before(requirePermissions_1.requirePermissions, [
|
|
55
|
+
"firebaseappcheck.appAttestConfig.update",
|
|
56
|
+
"firebaseappcheck.deviceCheckConfig.update",
|
|
57
|
+
"firebaseappcheck.playIntegrityConfig.update",
|
|
58
|
+
"firebaseappcheck.recaptchaEnterpriseConfig.update",
|
|
59
|
+
"firebaseappcheck.recaptchaV3Config.update",
|
|
60
|
+
])
|
|
61
|
+
.action(async (provider, options) => {
|
|
62
|
+
const providerType = (0, providers_1.parseProviderType)(provider);
|
|
63
|
+
const { update, updateMask } = (0, providers_1.buildProviderUpdate)(providerType, options);
|
|
64
|
+
const { appId, platform } = await (0, appcheck_prompts_1.getOrPromptApp)(options, `Select the app to configure ${providerType} for:`);
|
|
65
|
+
const projectNumber = await (0, projectUtils_1.needProjectNumber)(options);
|
|
66
|
+
(0, providers_1.assertProviderSupportsPlatform)(providerType, platform, appId);
|
|
67
|
+
const result = await (0, api_1.updateProviderConfig)(projectNumber, appId, providerType, update, updateMask);
|
|
68
|
+
(0, utils_1.logSuccess)(`Updated ${clc.bold(providerType)} for app ${clc.bold(appId)}.`);
|
|
69
|
+
if (result.keyId) {
|
|
70
|
+
logger_1.logger.info(` Key id: ${result.keyId}`);
|
|
71
|
+
}
|
|
72
|
+
if (result.privateKeySet) {
|
|
73
|
+
logger_1.logger.info(` Private key: set`);
|
|
74
|
+
}
|
|
75
|
+
if (result.siteKey) {
|
|
76
|
+
logger_1.logger.info(` Site key: ${result.siteKey}`);
|
|
77
|
+
}
|
|
78
|
+
if (result.siteSecretSet) {
|
|
79
|
+
logger_1.logger.info(` Site secret: set`);
|
|
80
|
+
}
|
|
81
|
+
const minScore = result.riskAnalysis?.minValidScore ?? result.minValidScore;
|
|
82
|
+
if (minScore !== undefined) {
|
|
83
|
+
logger_1.logger.info(` Min score: ${minScore}`);
|
|
84
|
+
}
|
|
85
|
+
if (result.deviceIntegrity?.minDeviceRecognitionLevel) {
|
|
86
|
+
logger_1.logger.info(` Min device: ${result.deviceIntegrity.minDeviceRecognitionLevel}`);
|
|
87
|
+
}
|
|
88
|
+
if (providerType === "play-integrity") {
|
|
89
|
+
const licensed = result.accountDetails?.requireLicensed ?? false;
|
|
90
|
+
const unrecognized = result.appIntegrity?.allowUnrecognizedVersion ?? false;
|
|
91
|
+
logger_1.logger.info(` Licensed: ${licensed ? "required" : "not required"}`);
|
|
92
|
+
logger_1.logger.info(` Unrecognized versions: ${unrecognized ? "allowed" : "not allowed"}`);
|
|
93
|
+
}
|
|
94
|
+
logger_1.logger.info(` Token TTL: ${(0, providers_1.formatTokenTtl)(result.tokenTtl)}`);
|
|
95
|
+
return result;
|
|
96
|
+
});
|
|
@@ -15,20 +15,45 @@ const logger_1 = require("../logger");
|
|
|
15
15
|
const projectUtils_1 = require("../projectUtils");
|
|
16
16
|
const prompt_1 = require("../prompt");
|
|
17
17
|
const requirePermissions_1 = require("../requirePermissions");
|
|
18
|
+
const extensionsApi_1 = require("../extensions/extensionsApi");
|
|
19
|
+
const utils_1 = require("../utils");
|
|
20
|
+
const env_1 = require("../functions/env");
|
|
21
|
+
const fs_1 = require("fs");
|
|
22
|
+
const path_1 = require("path");
|
|
23
|
+
const utils_2 = require("../utils");
|
|
24
|
+
const clc = require("colorette");
|
|
25
|
+
const experiments = require("../experiments");
|
|
18
26
|
exports.command = new command_1.Command("ext:export")
|
|
19
|
-
.description("export
|
|
27
|
+
.description("export Extension instances installed on a project to a local Firebase directory")
|
|
28
|
+
.option(`--mode <target>`, `experimental: controls the target system of the export (supports "extensions", "functions")`)
|
|
29
|
+
.option(`--instance <instanceId>`, `scope the export to the single instance with the specified instance id`)
|
|
20
30
|
.before(requirePermissions_1.requirePermissions, ["firebaseextensions.instances.list"])
|
|
21
31
|
.before(extensionsHelper_1.ensureExtensionsApiEnabled)
|
|
22
32
|
.before(checkMinRequiredVersion_1.checkMinRequiredVersion, "extMinVersion")
|
|
23
33
|
.withForce()
|
|
24
34
|
.action(async (options) => {
|
|
35
|
+
if (experiments.isEnabled("extMigrationFeatures") && options.mode === "functions") {
|
|
36
|
+
await fnHandler(options);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
await extHandler(options);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
async function extHandler(options) {
|
|
25
43
|
const projectId = (0, projectUtils_1.needProjectId)(options);
|
|
26
44
|
const projectNumber = await (0, getProjectNumber_1.getProjectNumber)(options);
|
|
27
|
-
|
|
45
|
+
let have = await Promise.all(await planner.have(projectId));
|
|
28
46
|
if (have.length === 0) {
|
|
29
47
|
logger_1.logger.info(`No extension instances installed on ${projectId}, so there is nothing to export.`);
|
|
30
48
|
return;
|
|
31
49
|
}
|
|
50
|
+
if (options.instance) {
|
|
51
|
+
have = have.filter((s) => s.instanceId === options.instance);
|
|
52
|
+
if (have.length === 0) {
|
|
53
|
+
logger_1.logger.info(`No extension instances installed on ${projectId} match specified instance ID ${options.instance}.`);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
32
57
|
const [withRef, withoutRef] = (0, functional_1.partition)(have, (s) => !!s.ref);
|
|
33
58
|
const withRefSubbed = await Promise.all(withRef.map(async (i) => {
|
|
34
59
|
const subbed = await (0, export_1.setSecretParamsToLatest)(i);
|
|
@@ -64,4 +89,51 @@ exports.command = new command_1.Command("ext:export")
|
|
|
64
89
|
force: options.force,
|
|
65
90
|
}, true);
|
|
66
91
|
(0, etags_1.saveEtags)(options.rc, projectId, have);
|
|
67
|
-
}
|
|
92
|
+
}
|
|
93
|
+
async function fnHandler(options) {
|
|
94
|
+
if (!options.instance) {
|
|
95
|
+
logger_1.logger.info(`ext:export must specify an --instance <instanceId> option when exporting to Functions. Use ext:list to find your instance IDs.`);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const projectId = (0, projectUtils_1.needProjectId)(options);
|
|
99
|
+
const instance = await (0, extensionsApi_1.getInstance)(projectId, options.instance);
|
|
100
|
+
if (typeof instance === "undefined") {
|
|
101
|
+
logger_1.logger.info(`No extension matching instance ID ${options.instance} found`);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const instanceId = (0, utils_1.last)(instance.name.split("/")) ?? "";
|
|
105
|
+
if (instanceId !== options.instance) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const convertedEnv = (0, export_1.functionsEnvFromInstance)(instance);
|
|
109
|
+
for (const key of Object.keys(convertedEnv)) {
|
|
110
|
+
console.log(`${key}=${convertedEnv[key]}`);
|
|
111
|
+
}
|
|
112
|
+
let writeLocationOpts;
|
|
113
|
+
if (typeof options.projectRoot !== "undefined") {
|
|
114
|
+
writeLocationOpts = {
|
|
115
|
+
functionsSource: instanceId,
|
|
116
|
+
configDir: (0, path_1.join)(options.projectRoot, instanceId),
|
|
117
|
+
projectId: projectId,
|
|
118
|
+
isEmulator: false,
|
|
119
|
+
projectDir: options.projectRoot,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
writeLocationOpts = {
|
|
124
|
+
functionsSource: instanceId,
|
|
125
|
+
configDir: instanceId,
|
|
126
|
+
projectId: projectId,
|
|
127
|
+
isEmulator: false,
|
|
128
|
+
projectDir: options.cwd ?? process.cwd(),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
if ((0, env_1.hasUserEnvs)(writeLocationOpts)) {
|
|
132
|
+
logger_1.logger.info(`Exported extensions config appears to already exist in /${instanceId}, aborting write.`);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
(0, utils_2.logBullet)(clc.cyan(clc.bold("functions: ")) +
|
|
136
|
+
`Saving exported extensions config as a Function Kits .env file`);
|
|
137
|
+
(0, fs_1.mkdirSync)(instanceId, { recursive: true });
|
|
138
|
+
(0, env_1.writeUserEnvs)(convertedEnv, writeLocationOpts);
|
|
139
|
+
}
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
4
|
+
exports.generateUniqueId = generateUniqueId;
|
|
5
|
+
exports.parseNpmPackageSpecifier = parseNpmPackageSpecifier;
|
|
6
|
+
exports.validateNpmPackageName = validateNpmPackageName;
|
|
7
|
+
exports.sanitizePackageNameToKitName = sanitizePackageNameToKitName;
|
|
8
|
+
exports.isThirdPartyPackage = isThirdPartyPackage;
|
|
9
|
+
exports.checkPackageHasShrinkwrap = checkPackageHasShrinkwrap;
|
|
10
|
+
const clc = require("colorette");
|
|
11
|
+
const crypto = require("crypto");
|
|
12
|
+
const path = require("path");
|
|
13
|
+
const fs = require("fs-extra");
|
|
14
|
+
const command_1 = require("../command");
|
|
15
|
+
const error_1 = require("../error");
|
|
16
|
+
const projectConfig_1 = require("../functions/projectConfig");
|
|
17
|
+
const experiments = require("../experiments");
|
|
18
|
+
const logger_1 = require("../logger");
|
|
19
|
+
const prompt_1 = require("../prompt");
|
|
20
|
+
const spawn_1 = require("../init/spawn");
|
|
21
|
+
const templates_1 = require("../templates");
|
|
22
|
+
const supported = require("../deploy/functions/runtimes/supported");
|
|
23
|
+
const self = require("./functions-kits-install");
|
|
24
|
+
const PACKAGE_NO_LINTING_TEMPLATE = (0, templates_1.readTemplateSync)("init/functions/typescript/package.nolint.json");
|
|
25
|
+
const TSCONFIG_TEMPLATE = (0, templates_1.readTemplateSync)("init/functions/typescript/tsconfig.json");
|
|
26
|
+
const GITIGNORE_TEMPLATE = (0, templates_1.readTemplateSync)("init/functions/typescript/_gitignore");
|
|
27
|
+
const INDEX_KIT_TEMPLATE = (0, templates_1.readTemplateSync)("init/functions/typescript/index-kit.ts");
|
|
28
|
+
const INDEX_KIT_MIGRATION_TEMPLATE = (0, templates_1.readTemplateSync)("init/functions/typescript/index-kit-migration.ts");
|
|
29
|
+
const TEMPLATES = {
|
|
30
|
+
installation: INDEX_KIT_TEMPLATE,
|
|
31
|
+
migration: INDEX_KIT_MIGRATION_TEMPLATE,
|
|
32
|
+
};
|
|
33
|
+
const FUNCTION_KITS_DIR = "function-kits";
|
|
34
|
+
function generateUniqueId(baseId, existingIds) {
|
|
35
|
+
if (!existingIds.has(baseId)) {
|
|
36
|
+
return baseId;
|
|
37
|
+
}
|
|
38
|
+
const prefix = baseId.slice(0, 35);
|
|
39
|
+
let candidate = "";
|
|
40
|
+
do {
|
|
41
|
+
const randomSuffix = crypto.randomBytes(2).toString("hex");
|
|
42
|
+
candidate = `${prefix}-${randomSuffix}`;
|
|
43
|
+
} while (existingIds.has(candidate));
|
|
44
|
+
return candidate;
|
|
45
|
+
}
|
|
46
|
+
function parseNpmPackageSpecifier(rawPkg) {
|
|
47
|
+
const lastAt = rawPkg.lastIndexOf("@");
|
|
48
|
+
if (lastAt > 0) {
|
|
49
|
+
return {
|
|
50
|
+
packageName: rawPkg.substring(0, lastAt),
|
|
51
|
+
version: rawPkg.substring(lastAt + 1),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
return { packageName: rawPkg };
|
|
55
|
+
}
|
|
56
|
+
function validateNpmPackageName(packageName) {
|
|
57
|
+
const npmPackageRegex = /^(?:@[a-z0-9_.-]+\/[a-z0-9_.-]+|[a-z0-9_.-]+)$/i;
|
|
58
|
+
if (!packageName || packageName.length > 214 || !npmPackageRegex.test(packageName)) {
|
|
59
|
+
throw new error_1.FirebaseError(`Invalid NPM package name '${packageName}'. Package names must be valid npm package specifiers (e.g. 'my-kit' or '@scope/my-kit').`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function sanitizePackageNameToKitName(packageName) {
|
|
63
|
+
const parts = packageName.split("/");
|
|
64
|
+
const nameWithoutScope = parts[parts.length - 1] || packageName;
|
|
65
|
+
const sanitized = nameWithoutScope.toLowerCase().replace(/[^a-z0-9_-]/g, "");
|
|
66
|
+
return sanitized.slice(0, 40);
|
|
67
|
+
}
|
|
68
|
+
function isThirdPartyPackage(packageName) {
|
|
69
|
+
return !packageName.startsWith("@firebase-functions-kits/");
|
|
70
|
+
}
|
|
71
|
+
async function checkPackageHasShrinkwrap(rawPkgName) {
|
|
72
|
+
try {
|
|
73
|
+
const output = await (0, spawn_1.spawnWithOutput)("npm", ["pack", rawPkgName, "--dry-run", "--json"]);
|
|
74
|
+
const parsed = JSON.parse(output);
|
|
75
|
+
if (Array.isArray(parsed) && parsed.length > 0) {
|
|
76
|
+
const pkgInfo = parsed[0];
|
|
77
|
+
if (pkgInfo.hasShrinkwrap) {
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
if (Array.isArray(pkgInfo.files)) {
|
|
81
|
+
return pkgInfo.files.some((f) => f.path === "npm-shrinkwrap.json" || f.path === "npm-shrinkwrap.js");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
logger_1.logger.debug(`Failed to inspect package shrinkwrap for ${rawPkgName}: ${(0, error_1.getErrMsg)(err)}`);
|
|
87
|
+
}
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
exports.command = new command_1.Command("functions:kits:install")
|
|
91
|
+
.description("install a function kit into your project")
|
|
92
|
+
.option("--npm_package <package>", "NPM package name or specifier to install as a function kit")
|
|
93
|
+
.option("--template [installation|migration]", "template to use for the kit index file", "installation")
|
|
94
|
+
.action(async (options) => {
|
|
95
|
+
experiments.assertEnabled("kits", "install a function kit");
|
|
96
|
+
if (!options.config) {
|
|
97
|
+
throw new error_1.FirebaseError("Not in a Firebase project directory (firebase.json not found).");
|
|
98
|
+
}
|
|
99
|
+
const templateType = options.template || "installation";
|
|
100
|
+
if (!(templateType in TEMPLATES)) {
|
|
101
|
+
throw new error_1.FirebaseError(`Invalid template '${templateType}'. Template must be 'installation' or 'migration'.`);
|
|
102
|
+
}
|
|
103
|
+
const rawPkgName = options.npm_package;
|
|
104
|
+
if (!rawPkgName) {
|
|
105
|
+
throw new error_1.FirebaseError("set the --npm_package option to a valid NPM package and try again.");
|
|
106
|
+
}
|
|
107
|
+
const { packageName, version } = parseNpmPackageSpecifier(rawPkgName);
|
|
108
|
+
validateNpmPackageName(packageName);
|
|
109
|
+
const isThirdParty = isThirdPartyPackage(packageName);
|
|
110
|
+
if (isThirdParty) {
|
|
111
|
+
logger_1.logger.warn(clc.yellow(`Warning: Package ${clc.bold(packageName)} is a third-party kit (outside the @firebase-functions-kits scope).`));
|
|
112
|
+
}
|
|
113
|
+
const hasShrinkwrap = await self.checkPackageHasShrinkwrap(rawPkgName);
|
|
114
|
+
if (!hasShrinkwrap) {
|
|
115
|
+
logger_1.logger.warn(clc.yellow(`Warning: Package ${clc.bold(packageName)} does not have an npm-shrinkwrap.json file. npm-shrinkwrap guarantees that you deploy the same version of dependencies that the publisher tested against. Since this kit does not have an npm-shrinkwrap, it is possible that deploys or updates may introduce bugs or vulnerabilities in newer dependency versions that the publisher did not test against.`));
|
|
116
|
+
}
|
|
117
|
+
if (isThirdParty || !hasShrinkwrap) {
|
|
118
|
+
let confirmMessage;
|
|
119
|
+
if (isThirdParty && !hasShrinkwrap) {
|
|
120
|
+
confirmMessage = `Are you sure you want to install the third-party kit ${packageName} without locked dependencies?`;
|
|
121
|
+
}
|
|
122
|
+
else if (isThirdParty) {
|
|
123
|
+
confirmMessage = `Are you sure you want to install the third-party kit ${packageName}?`;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
confirmMessage = `Are you sure you want to install ${packageName} without locked dependencies?`;
|
|
127
|
+
}
|
|
128
|
+
const confirmInstallation = await (0, prompt_1.confirm)({
|
|
129
|
+
message: confirmMessage,
|
|
130
|
+
default: false,
|
|
131
|
+
nonInteractive: options.nonInteractive,
|
|
132
|
+
});
|
|
133
|
+
if (!confirmInstallation) {
|
|
134
|
+
throw new error_1.FirebaseError("Installation cancelled.");
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
let existingFunctions = [];
|
|
138
|
+
const configFunctions = options.config.src.functions;
|
|
139
|
+
if (configFunctions && (!Array.isArray(configFunctions) || configFunctions.length > 0)) {
|
|
140
|
+
try {
|
|
141
|
+
existingFunctions = (0, projectConfig_1.normalizeAndValidate)(configFunctions);
|
|
142
|
+
}
|
|
143
|
+
catch (err) {
|
|
144
|
+
throw new error_1.FirebaseError(`Invalid existing functions configuration: ${(0, error_1.getErrMsg)(err)}`);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
const existingKitIds = new Set();
|
|
148
|
+
const existingCodebases = new Set();
|
|
149
|
+
const existingInstanceIds = new Set();
|
|
150
|
+
for (const c of existingFunctions) {
|
|
151
|
+
if ((0, projectConfig_1.isKitConfig)(c)) {
|
|
152
|
+
if (c.kit) {
|
|
153
|
+
existingKitIds.add(c.kit);
|
|
154
|
+
}
|
|
155
|
+
if (c.instances) {
|
|
156
|
+
for (const instId of Object.keys(c.instances)) {
|
|
157
|
+
existingInstanceIds.add(instId);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
else if (c.codebase) {
|
|
162
|
+
existingCodebases.add(c.codebase);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const baseKitId = sanitizePackageNameToKitName(packageName);
|
|
166
|
+
const defaultKitId = generateUniqueId(baseKitId, existingKitIds);
|
|
167
|
+
const kitId = await (0, prompt_1.input)({
|
|
168
|
+
message: "What would you like to name this kit?",
|
|
169
|
+
default: defaultKitId,
|
|
170
|
+
nonInteractive: options.nonInteractive,
|
|
171
|
+
validate: (val) => {
|
|
172
|
+
try {
|
|
173
|
+
(0, projectConfig_1.validateKit)(val);
|
|
174
|
+
}
|
|
175
|
+
catch (err) {
|
|
176
|
+
return (0, error_1.getErrMsg)(err);
|
|
177
|
+
}
|
|
178
|
+
if (existingKitIds.has(val)) {
|
|
179
|
+
return `functions.kit must be unique but '${val}' was used more than once.`;
|
|
180
|
+
}
|
|
181
|
+
return true;
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
(0, projectConfig_1.validateKit)(kitId);
|
|
185
|
+
if (existingKitIds.has(kitId)) {
|
|
186
|
+
throw new error_1.FirebaseError(`functions.kit must be unique but '${kitId}' was used more than once.`);
|
|
187
|
+
}
|
|
188
|
+
const instanceCollisions = new Set([...existingInstanceIds, ...existingCodebases]);
|
|
189
|
+
const defaultInstanceId = generateUniqueId(kitId, instanceCollisions);
|
|
190
|
+
const instanceId = await (0, prompt_1.input)({
|
|
191
|
+
message: "What would you like to name this instance?",
|
|
192
|
+
default: defaultInstanceId,
|
|
193
|
+
nonInteractive: options.nonInteractive,
|
|
194
|
+
validate: (val) => {
|
|
195
|
+
try {
|
|
196
|
+
(0, projectConfig_1.validateKitInstanceId)(val);
|
|
197
|
+
}
|
|
198
|
+
catch (err) {
|
|
199
|
+
return (0, error_1.getErrMsg)(err);
|
|
200
|
+
}
|
|
201
|
+
if (existingInstanceIds.has(val)) {
|
|
202
|
+
return `functions kit instance ID must be unique across all kits, but '${val}' was used more than once.`;
|
|
203
|
+
}
|
|
204
|
+
if (existingCodebases.has(val)) {
|
|
205
|
+
return `functions codebase name and kit instance ID must be mutually exclusive, but '${val}' was used as both a codebase name and a kit instance ID.`;
|
|
206
|
+
}
|
|
207
|
+
return true;
|
|
208
|
+
},
|
|
209
|
+
});
|
|
210
|
+
(0, projectConfig_1.validateKitInstanceId)(instanceId);
|
|
211
|
+
if (existingInstanceIds.has(instanceId)) {
|
|
212
|
+
throw new error_1.FirebaseError(`functions kit instance ID must be unique across all kits, but '${instanceId}' was used more than once.`);
|
|
213
|
+
}
|
|
214
|
+
if (existingCodebases.has(instanceId)) {
|
|
215
|
+
throw new error_1.FirebaseError(`functions codebase name and kit instance ID must be mutually exclusive, but '${instanceId}' was used as both a codebase name and a kit instance ID.`);
|
|
216
|
+
}
|
|
217
|
+
const sourcePath = path.join(FUNCTION_KITS_DIR, kitId);
|
|
218
|
+
const configDirPath = path.join(FUNCTION_KITS_DIR, kitId, `config-${instanceId}`);
|
|
219
|
+
const absSourcePath = options.config.path(sourcePath);
|
|
220
|
+
const absConfigDirPath = options.config.path(configDirPath);
|
|
221
|
+
await fs.ensureDir(absSourcePath);
|
|
222
|
+
await fs.ensureDir(absConfigDirPath);
|
|
223
|
+
const relPackageJsonPath = path.join(sourcePath, "package.json");
|
|
224
|
+
const absPackageJsonPath = options.config.path(relPackageJsonPath);
|
|
225
|
+
let pkgJson = {};
|
|
226
|
+
if (await fs.pathExists(absPackageJsonPath)) {
|
|
227
|
+
try {
|
|
228
|
+
pkgJson = (await fs.readJson(absPackageJsonPath));
|
|
229
|
+
}
|
|
230
|
+
catch (err) {
|
|
231
|
+
logger_1.logger.debug(`Failed to read existing package.json: ${(0, error_1.getErrMsg)(err)}`);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
const latestNodeVersion = supported.latest("nodejs").replace("nodejs", "");
|
|
236
|
+
const subbedTemplate = PACKAGE_NO_LINTING_TEMPLATE.replace("{{RUNTIME}}", latestNodeVersion);
|
|
237
|
+
try {
|
|
238
|
+
pkgJson = JSON.parse(subbedTemplate);
|
|
239
|
+
}
|
|
240
|
+
catch (err) {
|
|
241
|
+
throw new error_1.FirebaseError("Failed to parse package.nolint.json template: " + (0, error_1.getErrMsg)(err));
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
pkgJson.name = `${kitId}-wrapper`;
|
|
245
|
+
pkgJson.dependencies = pkgJson.dependencies || {};
|
|
246
|
+
pkgJson.dependencies[packageName] = version || "latest";
|
|
247
|
+
await options.config.askWriteProjectFile(relPackageJsonPath, pkgJson);
|
|
248
|
+
await options.config.askWriteProjectFile(path.join(sourcePath, "tsconfig.json"), TSCONFIG_TEMPLATE);
|
|
249
|
+
await options.config.askWriteProjectFile(path.join(sourcePath, ".gitignore"), GITIGNORE_TEMPLATE);
|
|
250
|
+
const relIndexTsPath = path.join(sourcePath, "src", "index.ts");
|
|
251
|
+
const absIndexTsPath = options.config.path(relIndexTsPath);
|
|
252
|
+
if (!(await fs.pathExists(absIndexTsPath))) {
|
|
253
|
+
const template = templateType === "migration" ? INDEX_KIT_MIGRATION_TEMPLATE : INDEX_KIT_TEMPLATE;
|
|
254
|
+
const indexContent = template.replace("{{PACKAGE_NAME}}", packageName);
|
|
255
|
+
await options.config.askWriteProjectFile(relIndexTsPath, indexContent);
|
|
256
|
+
}
|
|
257
|
+
const installArgs = isThirdParty ? ["install", "--ignore-scripts"] : ["install"];
|
|
258
|
+
logger_1.logger.info(clc.bold(`Running npm ${installArgs.join(" ")}...`));
|
|
259
|
+
try {
|
|
260
|
+
await (0, spawn_1.wrapSpawn)("npm", installArgs, absSourcePath);
|
|
261
|
+
}
|
|
262
|
+
catch (err) {
|
|
263
|
+
throw new error_1.FirebaseError(`NPM install failed: ${(0, error_1.getErrMsg)(err)}`);
|
|
264
|
+
}
|
|
265
|
+
logger_1.logger.info(clc.bold("Building TypeScript source..."));
|
|
266
|
+
try {
|
|
267
|
+
await (0, spawn_1.wrapSpawn)("npm", ["run", "build"], absSourcePath);
|
|
268
|
+
}
|
|
269
|
+
catch (err) {
|
|
270
|
+
throw new error_1.FirebaseError(`TypeScript build failed: ${(0, error_1.getErrMsg)(err)}`);
|
|
271
|
+
}
|
|
272
|
+
const newKitConfig = {
|
|
273
|
+
kit: kitId,
|
|
274
|
+
sourcePackage: {
|
|
275
|
+
name: packageName,
|
|
276
|
+
},
|
|
277
|
+
source: sourcePath,
|
|
278
|
+
instances: {
|
|
279
|
+
[instanceId]: configDirPath,
|
|
280
|
+
},
|
|
281
|
+
predeploy: ['npm --prefix "$RESOURCE_DIR" run build'],
|
|
282
|
+
};
|
|
283
|
+
if (!options.config.src.functions) {
|
|
284
|
+
options.config.src.functions = [newKitConfig];
|
|
285
|
+
}
|
|
286
|
+
else if (Array.isArray(options.config.src.functions)) {
|
|
287
|
+
options.config.src.functions.push(newKitConfig);
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
options.config.src.functions = [options.config.src.functions, newKitConfig];
|
|
291
|
+
}
|
|
292
|
+
options.config.writeProjectFile("firebase.json", options.config.src);
|
|
293
|
+
logger_1.logger.info(clc.green(`✔ Function kit ${clc.bold(kitId)} successfully installed.`));
|
|
294
|
+
});
|
package/lib/commands/index.js
CHANGED
|
@@ -29,6 +29,12 @@ function load(client) {
|
|
|
29
29
|
client.appcheck.services.list = loadCommand("appcheck-services-list");
|
|
30
30
|
client.appcheck.services.get = loadCommand("appcheck-services-get");
|
|
31
31
|
client.appcheck.services.set = loadCommand("appcheck-services-set");
|
|
32
|
+
client.appcheck.providers = {};
|
|
33
|
+
client.appcheck.providers.list = loadCommand("appcheck-providers-list");
|
|
34
|
+
client.appcheck.providers.get = loadCommand("appcheck-providers-get");
|
|
35
|
+
client.appcheck.providers.set = loadCommand("appcheck-providers-set");
|
|
36
|
+
client.appcheck.apps = {};
|
|
37
|
+
client.appcheck.apps.list = loadCommand("appcheck-apps-list");
|
|
32
38
|
}
|
|
33
39
|
client.appdistribution = {};
|
|
34
40
|
client.appdistribution.distribute = loadCommand("appdistribution-distribute");
|
|
@@ -179,6 +185,10 @@ function load(client) {
|
|
|
179
185
|
client.functions.secrets.set = loadCommand("functions-secrets-set");
|
|
180
186
|
client.functions.artifacts = {};
|
|
181
187
|
client.functions.artifacts.setpolicy = loadCommand("functions-artifacts-setpolicy");
|
|
188
|
+
if (experiments.isEnabled("kits")) {
|
|
189
|
+
client.functions.kits = {};
|
|
190
|
+
client.functions.kits.install = loadCommand("functions-kits-install");
|
|
191
|
+
}
|
|
182
192
|
client.help = loadCommand("help");
|
|
183
193
|
client.hosting = {};
|
|
184
194
|
client.hosting.channel = {};
|
|
@@ -24,7 +24,10 @@ exports.EventFilterSchema = zod_1.z
|
|
|
24
24
|
.optional()
|
|
25
25
|
.describe(`Counts events originating from the given app versions. Must be obtained from the *displayName* field in an API response. `),
|
|
26
26
|
issueId: zod_1.z.string().optional().describe(`Count events for the given issue`),
|
|
27
|
-
issueVariantId: zod_1.z
|
|
27
|
+
issueVariantId: zod_1.z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe(`Count events for the given issue variant. Only supported for mobile apps.`),
|
|
28
31
|
issueErrorTypes: zod_1.z
|
|
29
32
|
.array(zod_1.z.enum(["FATAL", "NON_FATAL", "ANR"]))
|
|
30
33
|
.optional()
|
|
@@ -32,7 +35,7 @@ exports.EventFilterSchema = zod_1.z
|
|
|
32
35
|
issueSignals: zod_1.z
|
|
33
36
|
.array(zod_1.z.enum(["SIGNAL_EARLY", "SIGNAL_FRESH", "SIGNAL_REGRESSED", "SIGNAL_REPETITIVE"]))
|
|
34
37
|
.optional()
|
|
35
|
-
.describe(`Counts events matching the given signals
|
|
38
|
+
.describe(`Counts events matching the given signals. Only supported for mobile apps.`),
|
|
36
39
|
operatingSystemDisplayNames: zod_1.z
|
|
37
40
|
.array(zod_1.z.string())
|
|
38
41
|
.optional()
|
|
@@ -40,11 +43,15 @@ exports.EventFilterSchema = zod_1.z
|
|
|
40
43
|
deviceDisplayNames: zod_1.z
|
|
41
44
|
.array(zod_1.z.string())
|
|
42
45
|
.optional()
|
|
43
|
-
.describe(`Must be obtained from the *displayName* field in an API response.`),
|
|
46
|
+
.describe(`Must be obtained from the *displayName* field in an API response. Only supported for mobile apps.`),
|
|
44
47
|
deviceFormFactors: zod_1.z
|
|
45
48
|
.array(zod_1.z.enum(["PHONE", "TABLET", "DESKTOP", "TV", "WATCH"]))
|
|
46
49
|
.optional()
|
|
47
|
-
.describe(`Counts events originating from the given device form factors
|
|
50
|
+
.describe(`Counts events originating from the given device form factors. Only supported for mobile apps.`),
|
|
51
|
+
browserFilterDisplayNames: zod_1.z
|
|
52
|
+
.array(zod_1.z.string())
|
|
53
|
+
.optional()
|
|
54
|
+
.describe(`Counts events originating from the given browser filter display names. Only supported for web apps.`),
|
|
48
55
|
})
|
|
49
56
|
.optional()
|
|
50
57
|
.describe(`Only events matching the given filters will be counted. All filters are optional.
|
|
@@ -60,6 +67,7 @@ const toolToParamMap = {
|
|
|
60
67
|
operatingSystemDisplayNames: "filter.operating_system.display_names",
|
|
61
68
|
deviceDisplayNames: "filter.device.display_names",
|
|
62
69
|
deviceFormFactors: "filter.device.form_factors",
|
|
70
|
+
browserFilterDisplayNames: "filter.browser.display_names",
|
|
63
71
|
};
|
|
64
72
|
function filterToUrlSearchParams(filter) {
|
|
65
73
|
const params = new URLSearchParams();
|
|
@@ -18,6 +18,8 @@ var CrashlyticsReport;
|
|
|
18
18
|
CrashlyticsReport["TOP_OPERATING_SYSTEMS"] = "topOperatingSystems";
|
|
19
19
|
CrashlyticsReport["TOP_APPLE_DEVICES"] = "topAppleDevices";
|
|
20
20
|
CrashlyticsReport["TOP_ANDROID_DEVICES"] = "topAndroidDevices";
|
|
21
|
+
CrashlyticsReport["TOP_BROWSERS"] = "topBrowsers";
|
|
22
|
+
CrashlyticsReport["WEB_METRICS"] = "webMetrics";
|
|
21
23
|
})(CrashlyticsReport || (exports.CrashlyticsReport = CrashlyticsReport = {}));
|
|
22
24
|
exports.CrashlyticsReportSchema = zod_1.z.nativeEnum(CrashlyticsReport);
|
|
23
25
|
exports.ReportInputSchema = zod_1.z.object({
|
package/lib/crashlytics/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ThreadState = exports.Signal = exports.State = exports.SessionEventType = exports.FormFactor = exports.TrackType = exports.ErrorType = void 0;
|
|
3
|
+
exports.TimeGranularity = exports.ThreadState = exports.Signal = exports.State = exports.SessionEventType = exports.FormFactor = exports.TrackType = exports.ErrorType = void 0;
|
|
4
4
|
var ErrorType;
|
|
5
5
|
(function (ErrorType) {
|
|
6
6
|
ErrorType["ERROR_TYPE_UNSPECIFIED"] = "ERROR_TYPE_UNSPECIFIED";
|
|
@@ -58,3 +58,10 @@ var ThreadState;
|
|
|
58
58
|
ThreadState["THREAD_STATE_NATIVE_RUNNABLE"] = "THREAD_STATE_NATIVE_RUNNABLE";
|
|
59
59
|
ThreadState["THREAD_STATE_NATIVE_WAITING"] = "THREAD_STATE_NATIVE_WAITING";
|
|
60
60
|
})(ThreadState || (exports.ThreadState = ThreadState = {}));
|
|
61
|
+
var TimeGranularity;
|
|
62
|
+
(function (TimeGranularity) {
|
|
63
|
+
TimeGranularity["TIME_GRANULARITY_UNSPECIFIED"] = "TIME_GRANULARITY_UNSPECIFIED";
|
|
64
|
+
TimeGranularity["TIME_GRANULARITY_NONE"] = "TIME_GRANULARITY_NONE";
|
|
65
|
+
TimeGranularity["TIME_GRANULARITY_HOUR"] = "TIME_GRANULARITY_HOUR";
|
|
66
|
+
TimeGranularity["TIME_GRANULARITY_DAY"] = "TIME_GRANULARITY_DAY";
|
|
67
|
+
})(TimeGranularity || (exports.TimeGranularity = TimeGranularity = {}));
|
|
@@ -246,10 +246,20 @@ async function loadExistingBackend(ctx) {
|
|
|
246
246
|
}
|
|
247
247
|
async function loadCloudRunServices(ctx, existingBackend, unreachableRegions, onlyMissing) {
|
|
248
248
|
try {
|
|
249
|
+
const runServiceIdsByRegion = {};
|
|
250
|
+
for (const [region, endpoints] of Object.entries(existingBackend.endpoints)) {
|
|
251
|
+
const ids = Object.values(endpoints)
|
|
252
|
+
.map((e) => e.runServiceId)
|
|
253
|
+
.filter((id) => !!id);
|
|
254
|
+
runServiceIdsByRegion[region] = new Set(ids);
|
|
255
|
+
}
|
|
249
256
|
const runServices = await run.listServices(ctx.projectId);
|
|
250
257
|
for (const service of runServices) {
|
|
251
258
|
const endpoint = run.endpointFromService(service);
|
|
252
|
-
|
|
259
|
+
const hasMatchingId = !!existingBackend.endpoints[endpoint.region]?.[endpoint.id];
|
|
260
|
+
const hasMatchingServiceId = !!(endpoint.runServiceId && runServiceIdsByRegion[endpoint.region]?.has(endpoint.runServiceId));
|
|
261
|
+
const alreadyLoaded = hasMatchingId || hasMatchingServiceId;
|
|
262
|
+
if (!onlyMissing || !alreadyLoaded) {
|
|
253
263
|
existingBackend.endpoints[endpoint.region] =
|
|
254
264
|
existingBackend.endpoints[endpoint.region] || {};
|
|
255
265
|
existingBackend.endpoints[endpoint.region][endpoint.id] = endpoint;
|
|
@@ -82,7 +82,7 @@ exports.AllIngressSettings = [
|
|
|
82
82
|
"ALLOW_INTERNAL_AND_GCLB",
|
|
83
83
|
];
|
|
84
84
|
async function resolveBackend(opts) {
|
|
85
|
-
const { paramValues: paramValues, secretRefs: secretRefs } = await params.resolveParams(opts.build.params, opts.firebaseConfig, envWithTypes(opts.build.params, opts.userEnvs), opts.nonInteractive, opts.force, opts.isEmulator);
|
|
85
|
+
const { paramValues: paramValues, secretRefs: secretRefs } = await params.resolveParams(opts.build.params, opts.firebaseConfig, envWithTypes(opts.build.params, opts.userEnvs), opts.codebase, opts.nonInteractive, opts.force, opts.isEmulator);
|
|
86
86
|
return { backend: toBackend(opts.build, paramValues), envs: paramValues, secretRefs: secretRefs };
|
|
87
87
|
}
|
|
88
88
|
function envWithTypes(definedParams, rawEnvs) {
|
|
@@ -10,6 +10,7 @@ exports.isSelectInput = isSelectInput;
|
|
|
10
10
|
exports.isResourceInput = isResourceInput;
|
|
11
11
|
exports.isMultiSelectInput = isMultiSelectInput;
|
|
12
12
|
exports.resolveParams = resolveParams;
|
|
13
|
+
const clc = require("colorette");
|
|
13
14
|
const logger_1 = require("../../logger");
|
|
14
15
|
const error_1 = require("../../error");
|
|
15
16
|
const prompt_1 = require("../../prompt");
|
|
@@ -162,7 +163,7 @@ function canSatisfyParam(param, value) {
|
|
|
162
163
|
}
|
|
163
164
|
(0, functional_1.assertExhaustive)(param);
|
|
164
165
|
}
|
|
165
|
-
async function resolveParams(params, firebaseConfig, userEnvs, nonInteractive, force, isEmulator = false) {
|
|
166
|
+
async function resolveParams(params, firebaseConfig, userEnvs, codebase, nonInteractive, force, isEmulator = false) {
|
|
166
167
|
const paramValues = populateDefaultParams(firebaseConfig);
|
|
167
168
|
const secretRefs = {};
|
|
168
169
|
const [resolved, outstanding] = (0, functional_1.partition)(params, (param) => {
|
|
@@ -183,6 +184,9 @@ async function resolveParams(params, firebaseConfig, userEnvs, nonInteractive, f
|
|
|
183
184
|
"To continue, either run `firebase deploy` with an interactive terminal, or add values to a dotenv file. " +
|
|
184
185
|
"For information regarding how to use dotenv files, see https://firebase.google.com/docs/functions/config-env");
|
|
185
186
|
}
|
|
187
|
+
if (needPrompt.length > 0) {
|
|
188
|
+
logger_1.logger.info(`Prompting for parameters for codebase ${clc.bold(codebase)}:`);
|
|
189
|
+
}
|
|
186
190
|
for (const param of needPrompt) {
|
|
187
191
|
const promptable = param;
|
|
188
192
|
let paramDefault = promptable.default;
|