firebase-tools 11.4.2 → 11.5.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/accountImporter.js +1 -1
- package/lib/auth.js +3 -4
- package/lib/bin/firebase.js +4 -4
- package/lib/command.js +2 -3
- package/lib/commands/apps-android-sha-create.js +1 -1
- package/lib/commands/apps-android-sha-delete.js +1 -1
- package/lib/commands/apps-create.js +1 -1
- package/lib/commands/apps-list.js +1 -1
- package/lib/commands/auth-export.js +1 -1
- package/lib/commands/auth-import.js +1 -1
- package/lib/commands/database-instances-list.js +1 -1
- package/lib/commands/database-push.js +1 -1
- package/lib/commands/database-remove.js +1 -1
- package/lib/commands/database-set.js +1 -1
- package/lib/commands/database-update.js +1 -1
- package/lib/commands/emulators-start.js +1 -1
- package/lib/commands/ext-dev-deprecate.js +1 -1
- package/lib/commands/ext-dev-emulators-exec.js +1 -1
- package/lib/commands/ext-dev-emulators-start.js +1 -1
- package/lib/commands/ext-dev-extension-delete.js +1 -1
- package/lib/commands/ext-dev-list.js +1 -1
- package/lib/commands/ext-dev-publish.js +1 -1
- package/lib/commands/ext-dev-register.js +1 -1
- package/lib/commands/ext-dev-undeprecate.js +1 -1
- package/lib/commands/ext-dev-unpublish.js +1 -1
- package/lib/commands/ext-dev-usage.js +1 -1
- package/lib/commands/ext-info.js +1 -1
- package/lib/commands/ext-install.js +2 -2
- package/lib/commands/ext-update.js +1 -1
- package/lib/commands/ext.js +1 -1
- package/lib/commands/firestore-delete.js +2 -2
- package/lib/commands/firestore-indexes-list.js +3 -3
- package/lib/commands/functions-config-clone.js +1 -1
- package/lib/commands/functions-config-export.js +1 -1
- package/lib/commands/functions-config-set.js +1 -1
- package/lib/commands/functions-config-unset.js +1 -1
- package/lib/commands/functions-delete.js +1 -1
- package/lib/commands/functions-secrets-set.js +1 -1
- package/lib/commands/help.js +1 -1
- package/lib/commands/hosting-channel-create.js +5 -5
- package/lib/commands/hosting-channel-delete.js +3 -3
- package/lib/commands/hosting-channel-deploy.js +6 -6
- package/lib/commands/hosting-channel-list.js +2 -2
- package/lib/commands/hosting-channel-open.js +2 -2
- package/lib/commands/hosting-clone.js +8 -8
- package/lib/commands/hosting-disable.js +1 -1
- package/lib/commands/hosting-sites-create.js +4 -4
- package/lib/commands/hosting-sites-delete.js +4 -4
- package/lib/commands/hosting-sites-list.js +2 -2
- package/lib/commands/init.js +5 -5
- package/lib/commands/login-add.js +1 -1
- package/lib/commands/login-ci.js +2 -2
- package/lib/commands/login-list.js +1 -1
- package/lib/commands/login-use.js +1 -1
- package/lib/commands/login.js +1 -1
- package/lib/commands/logout.js +1 -1
- package/lib/commands/open.js +3 -3
- package/lib/commands/projects-list.js +2 -2
- package/lib/commands/serve.js +1 -1
- package/lib/commands/target-apply.js +1 -1
- package/lib/commands/target-clear.js +1 -1
- package/lib/commands/target-remove.js +1 -1
- package/lib/commands/target.js +1 -1
- package/lib/commands/use.js +7 -7
- package/lib/config.js +1 -1
- package/lib/deploy/database/prepare.js +3 -3
- package/lib/deploy/database/release.js +3 -3
- package/lib/deploy/extensions/deploymentSummary.js +1 -1
- package/lib/deploy/extensions/errors.js +1 -1
- package/lib/deploy/extensions/secrets.js +1 -1
- package/lib/deploy/extensions/tasks.js +2 -2
- package/lib/deploy/firestore/deploy.js +2 -2
- package/lib/deploy/firestore/prepare.js +2 -2
- package/lib/deploy/functions/backend.js +1 -1
- package/lib/deploy/functions/build.js +3 -0
- package/lib/deploy/functions/checkIam.js +3 -3
- package/lib/deploy/functions/containerCleaner.js +2 -2
- package/lib/deploy/functions/deploy.js +2 -2
- package/lib/deploy/functions/ensure.js +1 -1
- package/lib/deploy/functions/prepare.js +1 -1
- package/lib/deploy/functions/prepareFunctionsUpload.js +2 -2
- package/lib/deploy/functions/prompts.js +1 -1
- package/lib/deploy/functions/release/fabricator.js +2 -2
- package/lib/deploy/functions/release/index.js +1 -1
- package/lib/deploy/functions/release/reporter.js +1 -1
- package/lib/deploy/functions/runtimes/node/parseRuntimeAndValidateSDK.js +1 -1
- package/lib/deploy/functions/runtimes/node/parseTriggers.js +1 -5
- package/lib/deploy/functions/runtimes/node/versioning.js +4 -4
- package/lib/deploy/functions/validate.js +1 -1
- package/lib/deploy/hosting/deploy.js +10 -9
- package/lib/deploy/hosting/uploader.js +2 -2
- package/lib/deploy/hosting/validate.js +2 -2
- package/lib/deploy/index.js +7 -7
- package/lib/deploy/lifecycleHooks.js +5 -2
- package/lib/deploy/storage/prepare.js +5 -3
- package/lib/deploy/storage/release.js +7 -6
- package/lib/emulator/commandUtils.js +1 -1
- package/lib/emulator/controller.js +1 -1
- package/lib/emulator/databaseEmulator.js +1 -1
- package/lib/emulator/downloadableEmulators.js +1 -1
- package/lib/emulator/emulatorLogger.js +1 -1
- package/lib/emulator/extensionsEmulator.js +2 -2
- package/lib/emulator/firestoreEmulator.js +1 -1
- package/lib/emulator/functionsEmulator.js +22 -10
- package/lib/emulator/loggingEmulator.js +2 -2
- package/lib/emulator/storage/apis/firebase.js +13 -1
- package/lib/emulator/storage/apis/gcloud.js +15 -8
- package/lib/emulator/storage/files.js +7 -2
- package/lib/emulator/storage/multipart.js +4 -3
- package/lib/emulator/storage/rules/runtime.js +1 -1
- package/lib/emulator/storage/rules/utils.js +4 -2
- package/lib/emulator/types.js +1 -0
- package/lib/ensureApiEnabled.js +7 -7
- package/lib/extensions/askUserForConsent.js +1 -1
- package/lib/extensions/askUserForEventsConfig.js +1 -1
- package/lib/extensions/askUserForParam.js +1 -1
- package/lib/extensions/changelog.js +2 -2
- package/lib/extensions/checkProjectBilling.js +2 -2
- package/lib/extensions/displayExtensionInfo.js +1 -1
- package/lib/extensions/extensionsApi.js +1 -1
- package/lib/extensions/extensionsHelper.js +1 -1
- package/lib/extensions/listExtensions.js +1 -1
- package/lib/extensions/manifest.js +1 -1
- package/lib/extensions/metricsUtils.js +1 -1
- package/lib/extensions/paramHelper.js +1 -1
- package/lib/extensions/updateHelper.js +2 -2
- package/lib/extensions/warnings.js +2 -2
- package/lib/fetchMOTD.js +1 -1
- package/lib/firestore/delete.js +1 -1
- package/lib/firestore/indexes.js +2 -2
- package/lib/firestore/validator.js +1 -1
- package/lib/functions/env.js +3 -3
- package/lib/functions/runtimeConfigExport.js +1 -1
- package/lib/functionsConfig.js +1 -1
- package/lib/functionsConfigClone.js +1 -1
- package/lib/functionsShellCommandAction.js +1 -1
- package/lib/gcp/cloudfunctions.js +3 -3
- package/lib/gcp/cloudfunctionsv2.js +5 -5
- package/lib/gcp/cloudscheduler.js +33 -9
- package/lib/gcp/cloudtasks.js +17 -1
- package/lib/gcp/serviceusage.js +2 -2
- package/lib/handlePreviewToggles.js +4 -4
- package/lib/hosting/implicitInit.js +1 -1
- package/lib/hosting/normalizedHostingConfigs.js +3 -3
- package/lib/index.js +2 -2
- package/lib/init/features/database.js +1 -1
- package/lib/init/features/emulators.js +1 -1
- package/lib/init/features/firestore/index.js +2 -2
- package/lib/init/features/firestore/indexes.js +1 -1
- package/lib/init/features/firestore/rules.js +1 -1
- package/lib/init/features/functions/golang.js +1 -1
- package/lib/init/features/functions/index.js +8 -1
- package/lib/init/features/hosting/github.js +9 -9
- package/lib/init/features/hosting/index.js +1 -1
- package/lib/init/features/project.js +1 -1
- package/lib/init/features/remoteconfig.js +1 -1
- package/lib/init/features/storage.js +1 -1
- package/lib/init/index.js +1 -1
- package/lib/logError.js +3 -3
- package/lib/management/projects.js +1 -1
- package/lib/parseBoltRules.js +1 -1
- package/lib/profileReport.js +2 -2
- package/lib/projectUtils.js +1 -1
- package/lib/rc.js +1 -1
- package/lib/requireAuth.js +1 -1
- package/lib/requireDatabaseInstance.js +2 -2
- package/lib/requirePermissions.js +2 -2
- package/lib/rulesDeploy.js +11 -12
- package/lib/serve/hosting.js +2 -1
- package/lib/utils.js +10 -10
- package/npm-shrinkwrap.json +14 -294
- package/package.json +5 -4
- package/templates/hosting/init.js +6 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
|
-
const
|
|
5
|
+
const colorette_1 = require("colorette");
|
|
6
6
|
const open = require("open");
|
|
7
7
|
const command_1 = require("../command");
|
|
8
8
|
const error_1 = require("../error");
|
|
@@ -38,7 +38,7 @@ exports.command = new command_1.Command("hosting:channel:open [channelId]")
|
|
|
38
38
|
channelId = (0, api_1.normalizeName)(channelId);
|
|
39
39
|
const channel = await (0, api_1.getChannel)(projectId, siteId, channelId);
|
|
40
40
|
if (!channel) {
|
|
41
|
-
throw new error_1.FirebaseError(`Could not find the channel ${(0,
|
|
41
|
+
throw new error_1.FirebaseError(`Could not find the channel ${(0, colorette_1.bold)(channelId)} for site ${(0, colorette_1.bold)(siteId)}.`);
|
|
42
42
|
}
|
|
43
43
|
(0, utils_1.logLabeledBullet)("hosting:channel", channel.url);
|
|
44
44
|
if (!options.nonInteractive) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const
|
|
4
|
+
const colorette_1 = require("colorette");
|
|
5
5
|
const ora = require("ora");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
7
|
const error_1 = require("../error");
|
|
@@ -46,21 +46,21 @@ For example, to copy the content for a site \`my-site\` from a preview channel \
|
|
|
46
46
|
if (!sourceVersionName) {
|
|
47
47
|
const sChannel = await (0, api_1.getChannel)("-", sourceSiteId, sourceChannelId);
|
|
48
48
|
if (!sChannel) {
|
|
49
|
-
throw new error_1.FirebaseError(`Could not find the channel ${(0,
|
|
49
|
+
throw new error_1.FirebaseError(`Could not find the channel ${(0, colorette_1.bold)(sourceChannelId)} for site ${(0, colorette_1.bold)(sourceSiteId)}.`);
|
|
50
50
|
}
|
|
51
51
|
sourceVersionName = (_b = (_a = sChannel.release) === null || _a === void 0 ? void 0 : _a.version) === null || _b === void 0 ? void 0 : _b.name;
|
|
52
52
|
if (!sourceVersionName) {
|
|
53
|
-
throw new error_1.FirebaseError(`Could not find a version on the channel ${(0,
|
|
53
|
+
throw new error_1.FirebaseError(`Could not find a version on the channel ${(0, colorette_1.bold)(sourceChannelId)} for site ${(0, colorette_1.bold)(sourceSiteId)}.`);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
let tChannel = await (0, api_1.getChannel)("-", targetSiteId, targetChannelId);
|
|
57
57
|
if (!tChannel) {
|
|
58
|
-
utils.logBullet(`could not find channel ${(0,
|
|
58
|
+
utils.logBullet(`could not find channel ${(0, colorette_1.bold)(targetChannelId)} in site ${(0, colorette_1.bold)(targetSiteId)}, creating it...`);
|
|
59
59
|
try {
|
|
60
60
|
tChannel = await (0, api_1.createChannel)("-", targetSiteId, targetChannelId);
|
|
61
61
|
}
|
|
62
62
|
catch (e) {
|
|
63
|
-
throw new error_1.FirebaseError(`Could not create the channel ${(0,
|
|
63
|
+
throw new error_1.FirebaseError(`Could not create the channel ${(0, colorette_1.bold)(targetChannelId)} for site ${(0, colorette_1.bold)(targetSiteId)}.`, { original: e });
|
|
64
64
|
}
|
|
65
65
|
utils.logSuccess(`Created new channel ${targetChannelId}`);
|
|
66
66
|
try {
|
|
@@ -74,7 +74,7 @@ For example, to copy the content for a site \`my-site\` from a preview channel \
|
|
|
74
74
|
}
|
|
75
75
|
const currentTargetVersionName = (_d = (_c = tChannel.release) === null || _c === void 0 ? void 0 : _c.version) === null || _d === void 0 ? void 0 : _d.name;
|
|
76
76
|
if (equalSiteIds && sourceVersionName === currentTargetVersionName) {
|
|
77
|
-
utils.logSuccess(`Channels ${(0,
|
|
77
|
+
utils.logSuccess(`Channels ${(0, colorette_1.bold)(sourceChannelId)} and ${(0, colorette_1.bold)(targetChannel)} are serving identical versions. No need to clone.`);
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
80
|
let targetVersionName = sourceVersionName;
|
|
@@ -83,7 +83,7 @@ For example, to copy the content for a site \`my-site\` from a preview channel \
|
|
|
83
83
|
if (!equalSiteIds) {
|
|
84
84
|
const targetVersion = await (0, api_1.cloneVersion)(targetSiteId, sourceVersionName, true);
|
|
85
85
|
if (!targetVersion) {
|
|
86
|
-
throw new error_1.FirebaseError(`Could not clone the version ${(0,
|
|
86
|
+
throw new error_1.FirebaseError(`Could not clone the version ${(0, colorette_1.bold)(sourceVersion)} for site ${(0, colorette_1.bold)(targetSiteId)}.`);
|
|
87
87
|
}
|
|
88
88
|
targetVersionName = targetVersion.name;
|
|
89
89
|
}
|
|
@@ -94,7 +94,7 @@ For example, to copy the content for a site \`my-site\` from a preview channel \
|
|
|
94
94
|
throw err;
|
|
95
95
|
}
|
|
96
96
|
spinner.succeed();
|
|
97
|
-
utils.logSuccess(`Site ${(0,
|
|
97
|
+
utils.logSuccess(`Site ${(0, colorette_1.bold)(sourceSiteId)} ${sourceChannelId ? "channel" : "version"} ${(0, colorette_1.bold)(sourceChannelId || sourceVersion)} has been cloned to site ${(0, colorette_1.bold)(targetSiteId)} channel ${(0, colorette_1.bold)(targetChannelId)}.`);
|
|
98
98
|
utils.logSuccess(`Channel URL (${targetChannelId}): ${tChannel.url}`);
|
|
99
99
|
});
|
|
100
100
|
function parseProjectId(name) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const apiv2_1 = require("../apiv2");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
7
|
const api_1 = require("../api");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const
|
|
4
|
+
const colorette_1 = require("colorette");
|
|
5
5
|
const utils_1 = require("../utils");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
7
|
const api_1 = require("../hosting/api");
|
|
@@ -37,14 +37,14 @@ exports.command = new command_1.Command("hosting:sites:create [siteId]")
|
|
|
37
37
|
}
|
|
38
38
|
catch (e) {
|
|
39
39
|
if (e.status === 409) {
|
|
40
|
-
throw new error_1.FirebaseError(`Site ${(0,
|
|
40
|
+
throw new error_1.FirebaseError(`Site ${(0, colorette_1.bold)(siteId)} already exists in project ${(0, colorette_1.bold)(projectId)}.`, { original: e });
|
|
41
41
|
}
|
|
42
42
|
throw e;
|
|
43
43
|
}
|
|
44
44
|
logger_1.logger.info();
|
|
45
|
-
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Site ${(0,
|
|
45
|
+
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Site ${(0, colorette_1.bold)(siteId)} has been created in project ${(0, colorette_1.bold)(projectId)}.`);
|
|
46
46
|
if (appId) {
|
|
47
|
-
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Site ${(0,
|
|
47
|
+
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Site ${(0, colorette_1.bold)(siteId)} has been linked to web app ${(0, colorette_1.bold)(appId)}`);
|
|
48
48
|
}
|
|
49
49
|
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Site URL: ${site.defaultUrl}`);
|
|
50
50
|
logger_1.logger.info();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const
|
|
4
|
+
const colorette_1 = require("colorette");
|
|
5
5
|
const command_1 = require("../command");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
const api_1 = require("../hosting/api");
|
|
@@ -22,12 +22,12 @@ exports.command = new command_1.Command("hosting:sites:delete <siteId>")
|
|
|
22
22
|
if (!siteId) {
|
|
23
23
|
throw new error_1.FirebaseError("siteId is required");
|
|
24
24
|
}
|
|
25
|
-
logger_1.logger.info(`Deleting a site is a permanent action. If you delete a site, Firebase doesn't maintain records of deployed files or deployment history, and the site ${(0,
|
|
25
|
+
logger_1.logger.info(`Deleting a site is a permanent action. If you delete a site, Firebase doesn't maintain records of deployed files or deployment history, and the site ${(0, colorette_1.underline)(siteId)} cannot be reactivated by you or anyone else.`);
|
|
26
26
|
logger_1.logger.info();
|
|
27
27
|
const confirmed = await (0, prompt_1.promptOnce)({
|
|
28
28
|
name: "force",
|
|
29
29
|
type: "confirm",
|
|
30
|
-
message: `Are you sure you want to delete the Hosting site ${(0,
|
|
30
|
+
message: `Are you sure you want to delete the Hosting site ${(0, colorette_1.underline)(siteId)} for project ${(0, colorette_1.underline)(projectId)}? `,
|
|
31
31
|
default: false,
|
|
32
32
|
}, options);
|
|
33
33
|
if (!confirmed) {
|
|
@@ -35,5 +35,5 @@ exports.command = new command_1.Command("hosting:sites:delete <siteId>")
|
|
|
35
35
|
}
|
|
36
36
|
await (0, api_1.getSite)(projectId, siteId);
|
|
37
37
|
await (0, api_1.deleteSite)(projectId, siteId);
|
|
38
|
-
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Successfully deleted site ${(0,
|
|
38
|
+
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Successfully deleted site ${(0, colorette_1.bold)(siteId)} from project ${(0, colorette_1.bold)(projectId)}`);
|
|
39
39
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const
|
|
4
|
+
const colorette_1 = require("colorette");
|
|
5
5
|
const Table = require("cli-table");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
7
|
const api_1 = require("../hosting/api");
|
|
@@ -21,7 +21,7 @@ exports.command = new command_1.Command("hosting:sites:list")
|
|
|
21
21
|
table.push([siteId, site.defaultUrl, site.appId || "--"]);
|
|
22
22
|
}
|
|
23
23
|
logger_1.logger.info();
|
|
24
|
-
logger_1.logger.info(`Sites for project ${(0,
|
|
24
|
+
logger_1.logger.info(`Sites for project ${(0, colorette_1.bold)(projectId)}`);
|
|
25
25
|
logger_1.logger.info();
|
|
26
26
|
logger_1.logger.info(table.toString());
|
|
27
27
|
return { sites };
|
package/lib/commands/init.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const fs = require("fs");
|
|
6
6
|
const os = require("os");
|
|
7
7
|
const path = require("path");
|
|
@@ -100,11 +100,11 @@ exports.command = new command_1.Command("init [feature]")
|
|
|
100
100
|
if (warnings.length) {
|
|
101
101
|
warningText =
|
|
102
102
|
"\nBefore we get started, keep in mind:\n\n " +
|
|
103
|
-
clc.yellow.bold("* ") +
|
|
104
|
-
warnings.join("\n " + clc.yellow.bold("* ")) +
|
|
103
|
+
clc.yellow(clc.bold("* ")) +
|
|
104
|
+
warnings.join("\n " + clc.yellow(clc.bold("* "))) +
|
|
105
105
|
"\n";
|
|
106
106
|
}
|
|
107
|
-
logger_1.logger.info(clc.yellow.bold(BANNER_TEXT) +
|
|
107
|
+
logger_1.logger.info(clc.yellow(clc.bold(BANNER_TEXT)) +
|
|
108
108
|
"\nYou're about to initialize a Firebase project in this directory:\n\n " +
|
|
109
109
|
clc.bold(config.projectDir) +
|
|
110
110
|
"\n" +
|
|
@@ -150,7 +150,7 @@ exports.command = new command_1.Command("init [feature]")
|
|
|
150
150
|
var _a;
|
|
151
151
|
if (!setup.features || ((_a = setup.features) === null || _a === void 0 ? void 0 : _a.length) === 0) {
|
|
152
152
|
return utils.reject("Must select at least one feature. Use " +
|
|
153
|
-
clc.bold.underline("SPACEBAR") +
|
|
153
|
+
clc.bold(clc.underline("SPACEBAR")) +
|
|
154
154
|
" to select features, or specify a feature by running " +
|
|
155
155
|
clc.bold("firebase init [feature_name]"));
|
|
156
156
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const command_1 = require("../command");
|
|
6
6
|
const logger_1 = require("../logger");
|
|
7
7
|
const utils = require("../utils");
|
package/lib/commands/login-ci.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const command_1 = require("../command");
|
|
6
6
|
const error_1 = require("../error");
|
|
7
7
|
const logger_1 = require("../logger");
|
|
@@ -19,7 +19,7 @@ exports.command = new command_1.Command("login:ci")
|
|
|
19
19
|
const userCredentials = await auth.loginGoogle(options.localhost);
|
|
20
20
|
logger_1.logger.info();
|
|
21
21
|
utils.logSuccess("Success! Use this token to login on a CI server:\n\n" +
|
|
22
|
-
clc.bold(userCredentials.tokens.refresh_token) +
|
|
22
|
+
clc.bold(userCredentials.tokens.refresh_token || "") +
|
|
23
23
|
'\n\nExample: firebase deploy --token "$FIREBASE_TOKEN"\n');
|
|
24
24
|
return userCredentials;
|
|
25
25
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const command_1 = require("../command");
|
|
6
6
|
const logger_1 = require("../logger");
|
|
7
7
|
const utils = require("../utils");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const command_1 = require("../command");
|
|
6
6
|
const utils = require("../utils");
|
|
7
7
|
const auth = require("../auth");
|
package/lib/commands/login.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
4
|
const _ = require("lodash");
|
|
5
|
-
const clc = require("
|
|
5
|
+
const clc = require("colorette");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
7
|
const logger_1 = require("../logger");
|
|
8
8
|
const configstore_1 = require("../configstore");
|
package/lib/commands/logout.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.command = void 0;
|
|
4
4
|
const command_1 = require("../command");
|
|
5
5
|
const logger_1 = require("../logger");
|
|
6
|
-
const clc = require("
|
|
6
|
+
const clc = require("colorette");
|
|
7
7
|
const utils = require("../utils");
|
|
8
8
|
const auth = require("../auth");
|
|
9
9
|
const prompt_1 = require("../prompt");
|
package/lib/commands/open.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const open = require("open");
|
|
6
6
|
const error_1 = require("../error");
|
|
7
7
|
const api = require("../api");
|
|
@@ -79,10 +79,10 @@ exports.command = new command_1.Command("open [link]")
|
|
|
79
79
|
throw new error_1.FirebaseError(`Unable to determine URL for link: ${link}`);
|
|
80
80
|
}
|
|
81
81
|
if (link.arg !== linkName) {
|
|
82
|
-
logger_1.logger.info(`${clc.bold.cyan("Tip:")} You can also run ${clc.bold.underline(`firebase open ${link.arg}`)}`);
|
|
82
|
+
logger_1.logger.info(`${clc.bold(clc.cyan("Tip:"))} You can also run ${clc.bold(clc.underline(`firebase open ${link.arg}`))}`);
|
|
83
83
|
logger_1.logger.info();
|
|
84
84
|
}
|
|
85
85
|
logger_1.logger.info(`Opening ${clc.bold(link.name)} link in your default browser:`);
|
|
86
|
-
logger_1.logger.info(clc.bold.underline(url));
|
|
86
|
+
logger_1.logger.info(clc.bold(clc.underline(url)));
|
|
87
87
|
open(url);
|
|
88
88
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const ora = require("ora");
|
|
6
6
|
const Table = require("cli-table");
|
|
7
7
|
const command_1 = require("../command");
|
|
@@ -22,7 +22,7 @@ function logProjectsList(projects, currentProjectId) {
|
|
|
22
22
|
const table = new Table({ head: tableHead, style: { head: ["green"] } });
|
|
23
23
|
projects.forEach(({ projectId, projectNumber, displayName, resources }) => {
|
|
24
24
|
if (projectId === currentProjectId) {
|
|
25
|
-
projectId = clc.cyan.bold(`${projectId} (current)`);
|
|
25
|
+
projectId = clc.cyan(clc.bold(`${projectId} (current)`));
|
|
26
26
|
}
|
|
27
27
|
table.push([
|
|
28
28
|
displayName || NOT_SPECIFIED,
|
package/lib/commands/serve.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const command_1 = require("../command");
|
|
6
6
|
const logger_1 = require("../logger");
|
|
7
7
|
const utils = require("../utils");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const command_1 = require("../command");
|
|
6
6
|
const logger_1 = require("../logger");
|
|
7
7
|
const requireConfig_1 = require("../requireConfig");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const command_1 = require("../command");
|
|
6
6
|
const requireConfig_1 = require("../requireConfig");
|
|
7
7
|
const utils = require("../utils");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const command_1 = require("../command");
|
|
6
6
|
const requireConfig_1 = require("../requireConfig");
|
|
7
7
|
const utils = require("../utils");
|
package/lib/commands/target.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const command_1 = require("../command");
|
|
6
6
|
const logger_1 = require("../logger");
|
|
7
7
|
const requireConfig_1 = require("../requireConfig");
|
package/lib/commands/use.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const command_1 = require("../command");
|
|
6
6
|
const projects_1 = require("../management/projects");
|
|
7
7
|
const logger_1 = require("../logger");
|
|
@@ -11,12 +11,12 @@ const command_2 = require("../command");
|
|
|
11
11
|
const utils = require("../utils");
|
|
12
12
|
function listAliases(options) {
|
|
13
13
|
if (options.rc.hasProjects) {
|
|
14
|
-
logger_1.logger.info("Project aliases for", clc.bold(options.projectRoot) + ":");
|
|
14
|
+
logger_1.logger.info("Project aliases for", clc.bold(options.projectRoot || "") + ":");
|
|
15
15
|
logger_1.logger.info();
|
|
16
16
|
for (const [alias, projectId] of Object.entries(options.rc.projects)) {
|
|
17
17
|
const listing = alias + " (" + projectId + ")";
|
|
18
18
|
if (options.project === projectId || options.projectAlias === alias) {
|
|
19
|
-
logger_1.logger.info(clc.cyan.bold("* " + listing));
|
|
19
|
+
logger_1.logger.info(clc.cyan(clc.bold("* " + listing)));
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
22
22
|
logger_1.logger.info(" " + listing);
|
|
@@ -121,8 +121,8 @@ exports.command = new command_1.Command("use [alias_or_project_id]")
|
|
|
121
121
|
options.rc.addProjectAlias(results.alias, results.project);
|
|
122
122
|
utils.makeActiveProject(options.projectRoot, results.alias);
|
|
123
123
|
logger_1.logger.info();
|
|
124
|
-
logger_1.logger.info("Created alias", clc.bold(results.alias), "for", results.project + ".");
|
|
125
|
-
logger_1.logger.info("Now using alias", clc.bold(results.alias) + " (" + results.project + ")");
|
|
124
|
+
logger_1.logger.info("Created alias", clc.bold(results.alias || ""), "for", results.project + ".");
|
|
125
|
+
logger_1.logger.info("Now using alias", clc.bold(results.alias || "") + " (" + results.project + ")");
|
|
126
126
|
});
|
|
127
127
|
});
|
|
128
128
|
}
|
|
@@ -143,10 +143,10 @@ exports.command = new command_1.Command("use [alias_or_project_id]")
|
|
|
143
143
|
return utils.reject("No active project");
|
|
144
144
|
}
|
|
145
145
|
if (options.projectAlias) {
|
|
146
|
-
logger_1.logger.info("Active Project:", clc.bold.cyan(options.projectAlias + " (" + options.project + ")"));
|
|
146
|
+
logger_1.logger.info("Active Project:", clc.bold(clc.cyan(options.projectAlias + " (" + options.project + ")")));
|
|
147
147
|
}
|
|
148
148
|
else if (options.project) {
|
|
149
|
-
logger_1.logger.info("Active Project:", clc.bold.cyan(options.project));
|
|
149
|
+
logger_1.logger.info("Active Project:", clc.bold(clc.cyan(options.project)));
|
|
150
150
|
}
|
|
151
151
|
else {
|
|
152
152
|
let msg = "No project is currently active";
|
package/lib/config.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Config = void 0;
|
|
4
4
|
const _ = require("lodash");
|
|
5
|
-
const clc = require("
|
|
5
|
+
const clc = require("colorette");
|
|
6
6
|
const fs = require("fs-extra");
|
|
7
7
|
const path = require("path");
|
|
8
8
|
const cjson = require("cjson");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.prepare = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const error_1 = require("../../error");
|
|
7
7
|
const parseBoltRules_1 = require("../../parseBoltRules");
|
|
@@ -39,12 +39,12 @@ function prepare(context, options) {
|
|
|
39
39
|
deploys: deploys,
|
|
40
40
|
ruleFiles: ruleFiles,
|
|
41
41
|
};
|
|
42
|
-
utils.logBullet(clc.bold.cyan("database: ") + "checking rules syntax...");
|
|
42
|
+
utils.logBullet(clc.bold(clc.cyan("database: ")) + "checking rules syntax...");
|
|
43
43
|
return Promise.all(deploys.map((deploy) => {
|
|
44
44
|
return rtdb
|
|
45
45
|
.updateRules(context.projectId, deploy.instance, ruleFiles[deploy.rules], { dryRun: true })
|
|
46
46
|
.then(() => {
|
|
47
|
-
utils.logSuccess(clc.bold.green("database: ") +
|
|
47
|
+
utils.logSuccess(clc.bold(clc.green("database: ")) +
|
|
48
48
|
"rules syntax for database " +
|
|
49
49
|
clc.bold(deploy.instance) +
|
|
50
50
|
" is valid");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.release = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const rtdb = require("../../rtdb");
|
|
6
6
|
const utils = require("../../utils");
|
|
7
7
|
function release(context) {
|
|
@@ -13,14 +13,14 @@ function release(context) {
|
|
|
13
13
|
}
|
|
14
14
|
const deploys = context.database.deploys;
|
|
15
15
|
const ruleFiles = context.database.ruleFiles;
|
|
16
|
-
utils.logBullet(clc.bold.cyan("database: ") + "releasing rules...");
|
|
16
|
+
utils.logBullet(clc.bold(clc.cyan("database: ")) + "releasing rules...");
|
|
17
17
|
return Promise.all(deploys.map((deploy) => {
|
|
18
18
|
return rtdb
|
|
19
19
|
.updateRules(context.projectId, deploy.instance, ruleFiles[deploy.rules], {
|
|
20
20
|
dryRun: false,
|
|
21
21
|
})
|
|
22
22
|
.then(() => {
|
|
23
|
-
utils.logSuccess(clc.bold.green("database: ") +
|
|
23
|
+
utils.logSuccess(clc.bold(clc.green("database: ")) +
|
|
24
24
|
"rules for database " +
|
|
25
25
|
clc.bold(deploy.instance) +
|
|
26
26
|
" released successfully");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.deletesSummary = exports.configuresSummary = exports.updatesSummary = exports.createsSummary = exports.humanReadable = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const refs = require("../../extensions/refs");
|
|
6
6
|
const humanReadable = (dep) => `${clc.bold(dep.instanceId)} (${dep.ref ? `${refs.toExtensionVersionRef(dep.ref)}` : `Installed from local source`})`;
|
|
7
7
|
exports.humanReadable = humanReadable;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ErrorHandler = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const logger_1 = require("../../logger");
|
|
6
6
|
class ErrorHandler {
|
|
7
7
|
constructor() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.checkSpecForSecrets = exports.handleSecretParams = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const secretUtils = require("../../extensions/secretsUtils");
|
|
6
6
|
const secretManager = require("../../gcp/secretManager");
|
|
7
7
|
const planner_1 = require("./planner");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.deleteExtensionInstanceTask = exports.configureExtensionInstanceTask = exports.updateExtensionInstanceTask = exports.createExtensionInstanceTask = exports.extensionsDeploymentHandler = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const error_1 = require("../../error");
|
|
6
6
|
const extensionsApi = require("../../extensions/extensionsApi");
|
|
7
7
|
const extensionsHelper_1 = require("../../extensions/extensionsHelper");
|
|
@@ -146,5 +146,5 @@ function deleteExtensionInstanceTask(projectId, instanceSpec) {
|
|
|
146
146
|
exports.deleteExtensionInstanceTask = deleteExtensionInstanceTask;
|
|
147
147
|
function printSuccess(instanceId, type, validateOnly) {
|
|
148
148
|
const action = validateOnly ? `validated ${type} for` : `${type}d`;
|
|
149
|
-
utils.logSuccess(clc.bold.green("extensions") + ` Successfully ${action} ${instanceId}`);
|
|
149
|
+
utils.logSuccess(clc.bold(clc.green("extensions")) + ` Successfully ${action} ${instanceId}`);
|
|
150
150
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const _ = require("lodash");
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const error_1 = require("../../error");
|
|
6
6
|
const indexes_1 = require("../../firestore/indexes");
|
|
7
7
|
const logger_1 = require("../../logger");
|
|
@@ -30,7 +30,7 @@ async function deployIndexes(context, options) {
|
|
|
30
30
|
}
|
|
31
31
|
const fieldOverrides = indexesSrc.fieldOverrides || [];
|
|
32
32
|
await new indexes_1.FirestoreIndexes().deploy(options, indexes, fieldOverrides);
|
|
33
|
-
utils.logSuccess(`${clc.bold.green("firestore:")} deployed indexes in ${clc.bold(indexesFileName)} successfully`);
|
|
33
|
+
utils.logSuccess(`${clc.bold(clc.green("firestore:"))} deployed indexes in ${clc.bold(indexesFileName)} successfully`);
|
|
34
34
|
}
|
|
35
35
|
async function default_1(context, options) {
|
|
36
36
|
await Promise.all([deployRules(context), deployIndexes(context, options)]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const _ = require("lodash");
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const loadCJSON_1 = require("../../loadCJSON");
|
|
6
6
|
const rulesDeploy_1 = require("../../rulesDeploy");
|
|
7
7
|
const utils = require("../../utils");
|
|
@@ -23,7 +23,7 @@ function prepareIndexes(context, options) {
|
|
|
23
23
|
const indexesFileName = options.config.src.firestore.indexes;
|
|
24
24
|
const indexesPath = options.config.path(indexesFileName);
|
|
25
25
|
const parsedSrc = (0, loadCJSON_1.loadCJSON)(indexesPath);
|
|
26
|
-
utils.logBullet(`${clc.bold.cyan("firestore:")} reading indexes from ${clc.bold(indexesFileName)}...`);
|
|
26
|
+
utils.logBullet(`${clc.bold(clc.cyan("firestore:"))} reading indexes from ${clc.bold(indexesFileName)}...`);
|
|
27
27
|
context.firestore = context.firestore || {};
|
|
28
28
|
context.firestore.indexes = {
|
|
29
29
|
name: indexesFileName,
|
|
@@ -109,6 +109,9 @@ function toBackend(build, paramValues) {
|
|
|
109
109
|
r.resolveInts(bkEndpoint, bdEndpoint, "timeoutSeconds", "maxInstances", "minInstances", "concurrency");
|
|
110
110
|
proto.convertIfPresent(bkEndpoint, bdEndpoint, "cpu", (0, functional_1.nullsafeVisitor)((cpu) => (cpu === "gcf_gen1" ? cpu : r.resolveInt(cpu))));
|
|
111
111
|
if (bdEndpoint.vpc) {
|
|
112
|
+
if (bdEndpoint.vpc.connector && !bdEndpoint.vpc.connector.includes("/")) {
|
|
113
|
+
bdEndpoint.vpc.connector = `projects/${bdEndpoint.project}/locations/${region}/connectors/${bdEndpoint.vpc.connector}`;
|
|
114
|
+
}
|
|
112
115
|
bkEndpoint.vpc = { connector: params.resolveString(bdEndpoint.vpc.connector, paramValues) };
|
|
113
116
|
proto.copyIfPresent(bkEndpoint.vpc, bdEndpoint.vpc, "egressSettings");
|
|
114
117
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ensureServiceAgentRoles = exports.mergeBindings = exports.obtainDefaultComputeServiceAgentBindings = exports.obtainPubSubServiceAgentBindings = exports.checkHttpIam = exports.checkServiceAccountIam = exports.EVENTARC_EVENT_RECEIVER_ROLE = exports.RUN_INVOKER_ROLE = exports.SERVICE_ACCOUNT_TOKEN_CREATOR_ROLE = void 0;
|
|
4
|
-
const
|
|
4
|
+
const colorette_1 = require("colorette");
|
|
5
5
|
const logger_1 = require("../../logger");
|
|
6
6
|
const functionsDeployHelper_1 = require("./functionsDeployHelper");
|
|
7
7
|
const error_1 = require("../../error");
|
|
@@ -28,7 +28,7 @@ async function checkServiceAccountIam(projectId) {
|
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
if (!passed) {
|
|
31
|
-
throw new error_1.FirebaseError(`Missing permissions required for functions deploy. You must have permission ${(0,
|
|
31
|
+
throw new error_1.FirebaseError(`Missing permissions required for functions deploy. You must have permission ${(0, colorette_1.bold)("iam.serviceAccounts.ActAs")} on service account ${(0, colorette_1.bold)(saEmail)}.\n\n` +
|
|
32
32
|
`To address this error, ask a project Owner to assign your account the "Service Account User" role from this URL:\n\n` +
|
|
33
33
|
`https://console.cloud.google.com/iam-admin/iam?project=${projectId}`);
|
|
34
34
|
}
|
|
@@ -60,7 +60,7 @@ async function checkHttpIam(context, options, payload) {
|
|
|
60
60
|
}
|
|
61
61
|
if (!passed) {
|
|
62
62
|
void (0, track_1.track)("Error (User)", "deploy:functions:http_create_missing_iam");
|
|
63
|
-
throw new error_1.FirebaseError(`Missing required permission on project ${(0,
|
|
63
|
+
throw new error_1.FirebaseError(`Missing required permission on project ${(0, colorette_1.bold)(context.projectId)} to deploy new HTTPS functions. The permission ${(0, colorette_1.bold)(PERMISSION)} is required to deploy the following functions:\n\n- ` +
|
|
64
64
|
newHttpsEndpoints.map((func) => func.id).join("\n- ") +
|
|
65
65
|
`\n\nTo address this error, please ask a project Owner to assign your account the "Cloud Functions Admin" role at the following URL:\n\nhttps://console.cloud.google.com/iam-admin/iam?project=${context.projectId}`);
|
|
66
66
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DockerHelper = exports.deleteGcfArtifacts = exports.listGcfPaths = exports.ContainerRegistryCleaner = exports.NoopArtifactRegistryCleaner = exports.ArtifactRegistryCleaner = exports.cleanupBuildImages = void 0;
|
|
4
|
-
const clc = require("
|
|
4
|
+
const clc = require("colorette");
|
|
5
5
|
const error_1 = require("../../error");
|
|
6
6
|
const api_1 = require("../../api");
|
|
7
7
|
const logger_1 = require("../../logger");
|
|
@@ -34,7 +34,7 @@ async function retry(func) {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
async function cleanupBuildImages(haveFunctions, deletedFunctions, cleaners = {}) {
|
|
37
|
-
utils.logBullet(clc.bold.cyan("functions: ") + "cleaning up build files...");
|
|
37
|
+
utils.logBullet(clc.bold(clc.cyan("functions: ")) + "cleaning up build files...");
|
|
38
38
|
const failedDomains = new Set();
|
|
39
39
|
const cleanup = [];
|
|
40
40
|
const arCleaner = cleaners.ar || new ArtifactRegistryCleaner();
|