firebase-tools 11.4.2 → 11.7.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 +35 -10
- 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/crashlytics-mappingfile-generateid.js +26 -0
- package/lib/commands/crashlytics-mappingfile-upload.js +46 -0
- package/lib/commands/crashlytics-symbols-upload.js +18 -87
- 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-exec.js +4 -1
- package/lib/commands/emulators-export.js +5 -2
- package/lib/commands/emulators-start.js +24 -18
- 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 +4 -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 +3 -1
- package/lib/commands/functions-secrets-get.js +2 -0
- 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/index.js +3 -0
- 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 +3 -3
- 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/crashlytics/buildToolsJarHelper.js +51 -0
- 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 +4 -4
- package/lib/deploy/functions/build.js +78 -8
- package/lib/deploy/functions/checkIam.js +9 -8
- 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/params.js +15 -15
- 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 +24 -7
- package/lib/deploy/functions/release/index.js +3 -1
- package/lib/deploy/functions/release/reporter.js +1 -1
- package/lib/deploy/functions/runtimes/discovery/index.js +1 -16
- package/lib/deploy/functions/runtimes/discovery/parsing.js +16 -0
- package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +59 -131
- package/lib/deploy/functions/runtimes/node/parseRuntimeAndValidateSDK.js +1 -1
- package/lib/deploy/functions/runtimes/node/parseTriggers.js +2 -6
- 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/auth/index.js +7 -2
- package/lib/emulator/auth/operations.js +10 -10
- package/lib/emulator/commandUtils.js +33 -16
- package/lib/emulator/constants.js +14 -6
- package/lib/emulator/controller.js +50 -18
- package/lib/emulator/databaseEmulator.js +1 -1
- package/lib/emulator/downloadableEmulators.js +8 -8
- package/lib/emulator/emulatorLogger.js +1 -1
- package/lib/emulator/eventarcEmulator.js +148 -0
- package/lib/emulator/extensionsEmulator.js +5 -3
- package/lib/emulator/firestoreEmulator.js +1 -1
- package/lib/emulator/functionsEmulator.js +66 -14
- package/lib/emulator/functionsEmulatorRuntime.js +12 -23
- package/lib/emulator/functionsEmulatorShared.js +6 -1
- package/lib/emulator/hub.js +7 -3
- package/lib/emulator/hubClient.js +2 -2
- package/lib/emulator/hubExport.js +22 -2
- package/lib/emulator/loggingEmulator.js +2 -2
- package/lib/emulator/registry.js +1 -0
- package/lib/emulator/storage/apis/firebase.js +26 -12
- package/lib/emulator/storage/apis/gcloud.js +15 -8
- package/lib/emulator/storage/files.js +21 -4
- package/lib/emulator/storage/multipart.js +6 -5
- package/lib/emulator/storage/rules/runtime.js +3 -3
- package/lib/emulator/storage/rules/utils.js +4 -2
- package/lib/emulator/storage/server.js +2 -1
- package/lib/emulator/storage/upload.js +1 -0
- package/lib/emulator/types.js +4 -0
- package/lib/emulator/ui.js +7 -2
- 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 +3 -2
- package/lib/extensions/extensionsHelper.js +30 -2
- 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 +11 -11
- 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 +63 -22
- 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/serve/index.js +15 -0
- package/lib/track.js +122 -3
- package/lib/utils.js +24 -11
- package/npm-shrinkwrap.json +523 -294
- package/package.json +6 -4
- package/schema/firebase-config.json +12 -0
- package/templates/extensions/CHANGELOG.md +1 -7
- 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 utils = require("../utils");
|
|
5
|
-
const clc = require("
|
|
5
|
+
const clc = require("colorette");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
7
|
const extensionsHelper_1 = require("../extensions/extensionsHelper");
|
|
8
8
|
const extensionsApi_1 = require("../extensions/extensionsApi");
|
|
@@ -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 Table = require("cli-table");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
7
|
const error_1 = require("../error");
|
|
@@ -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 { marked } = require("marked");
|
|
6
6
|
const TerminalRenderer = require("marked-terminal");
|
|
7
7
|
const command_1 = require("../command");
|
|
@@ -17,12 +17,14 @@ marked.setOptions({
|
|
|
17
17
|
});
|
|
18
18
|
exports.command = new command_1.Command("ext:dev:publish <extensionRef>")
|
|
19
19
|
.description(`publish a new version of an extension`)
|
|
20
|
+
.option(`-s, --stage <stage>`, `release stage (supports "rc", "alpha", "beta", and "stable")`)
|
|
20
21
|
.withForce()
|
|
21
22
|
.help("if you have not previously published a version of this extension, this will " +
|
|
22
23
|
"create the extension. If you have previously published a version of this extension, this version must " +
|
|
23
24
|
"be greater than previous versions.")
|
|
24
25
|
.before(requireAuth_1.requireAuth)
|
|
25
26
|
.action(async (extensionRef, options) => {
|
|
27
|
+
var _a;
|
|
26
28
|
const { publisherId, extensionId, version } = refs.parse(extensionRef);
|
|
27
29
|
if (version) {
|
|
28
30
|
throw new error_1.FirebaseError(`The input extension reference must be of the format ${clc.bold("<publisherId>/<extensionId>")}. Version should not be supplied and will be inferred directly from extension.yaml. Please increment the version in extension.yaml if you would like to bump/specify a version.`);
|
|
@@ -37,6 +39,7 @@ exports.command = new command_1.Command("ext:dev:publish <extensionRef>")
|
|
|
37
39
|
rootDirectory: extensionYamlDirectory,
|
|
38
40
|
nonInteractive: options.nonInteractive,
|
|
39
41
|
force: options.force,
|
|
42
|
+
stage: (_a = options.stage) !== null && _a !== void 0 ? _a : "stable",
|
|
40
43
|
});
|
|
41
44
|
if (res) {
|
|
42
45
|
utils.logLabeledBullet(extensionsHelper_1.logPrefix, marked(`[Install Link](${(0, publishHelpers_1.consoleInstallLink)(res.ref)})`));
|
|
@@ -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 { marked } = require("marked");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
7
|
const extensionsApi_1 = require("../extensions/extensionsApi");
|
|
@@ -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 semver = require("semver");
|
|
6
6
|
const refs = require("../extensions/refs");
|
|
7
7
|
const utils = require("../utils");
|
|
@@ -7,7 +7,7 @@ const extensionsApi_1 = require("../extensions/extensionsApi");
|
|
|
7
7
|
const utils = require("../utils");
|
|
8
8
|
const refs = require("../extensions/refs");
|
|
9
9
|
const prompt_1 = require("../prompt");
|
|
10
|
-
const clc = require("
|
|
10
|
+
const clc = require("colorette");
|
|
11
11
|
const requireAuth_1 = require("../requireAuth");
|
|
12
12
|
const error_1 = require("../error");
|
|
13
13
|
const checkMinRequiredVersion_1 = require("../checkMinRequiredVersion");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
4
|
const Table = require("cli-table");
|
|
5
|
-
const clc = require("
|
|
5
|
+
const clc = require("colorette");
|
|
6
6
|
const utils = require("../utils");
|
|
7
7
|
const command_1 = require("../command");
|
|
8
8
|
const cloudmonitoring_1 = require("../gcp/cloudmonitoring");
|
package/lib/commands/ext-info.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 checkMinRequiredVersion_1 = require("../checkMinRequiredVersion");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
7
|
const extensionsApi = require("../extensions/extensionsApi");
|
|
@@ -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 { marked } = require("marked");
|
|
6
6
|
const TerminalRenderer = require("marked-terminal");
|
|
7
7
|
const displayExtensionInfo_1 = require("../extensions/displayExtensionInfo");
|
|
@@ -89,7 +89,7 @@ exports.command = new command_1.Command("ext:install [extensionName]")
|
|
|
89
89
|
throw new error_1.FirebaseError(`Could not find the extension.yaml for extension '${clc.bold(extensionName)}'. Please make sure this is a valid extension and try again.`);
|
|
90
90
|
}
|
|
91
91
|
if (learnMore) {
|
|
92
|
-
utils.logLabeledBullet(extensionsHelper_1.logPrefix, `You selected: ${clc.bold(spec.displayName)}.\n` +
|
|
92
|
+
utils.logLabeledBullet(extensionsHelper_1.logPrefix, `You selected: ${clc.bold(spec.displayName || "")}.\n` +
|
|
93
93
|
`${spec.description}\n` +
|
|
94
94
|
`View details: https://firebase.google.com/products/extensions/${spec.name}\n`);
|
|
95
95
|
}
|
|
@@ -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 { marked } = require("marked");
|
|
6
6
|
const TerminalRenderer = require("marked-terminal");
|
|
7
7
|
const checkMinRequiredVersion_1 = require("../checkMinRequiredVersion");
|
package/lib/commands/ext.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 checkMinRequiredVersion_1 = require("../checkMinRequiredVersion");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
7
|
const projectUtils_1 = require("../projectUtils");
|
|
@@ -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 types_1 = require("../emulator/types");
|
|
7
7
|
const commandUtils_1 = require("../emulator/commandUtils");
|
|
@@ -12,7 +12,7 @@ const utils = require("../utils");
|
|
|
12
12
|
function getConfirmationMessage(deleteOp, options) {
|
|
13
13
|
if (options.allCollections) {
|
|
14
14
|
return ("You are about to delete " +
|
|
15
|
-
clc.bold.yellow.underline("THE ENTIRE DATABASE") +
|
|
15
|
+
clc.bold(clc.yellow(clc.underline("THE ENTIRE DATABASE"))) +
|
|
16
16
|
" for " +
|
|
17
17
|
clc.cyan(options.project) +
|
|
18
18
|
". Are you sure?");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
4
|
const command_1 = require("../command");
|
|
5
|
-
const clc = require("
|
|
5
|
+
const clc = require("colorette");
|
|
6
6
|
const fsi = require("../firestore/indexes");
|
|
7
7
|
const logger_1 = require("../logger");
|
|
8
8
|
const requirePermissions_1 = require("../requirePermissions");
|
|
@@ -20,11 +20,11 @@ exports.command = new command_1.Command("firestore:indexes")
|
|
|
20
20
|
const fieldOverrides = await indexApi.listFieldOverrides(options.project);
|
|
21
21
|
const indexSpec = indexApi.makeIndexSpec(indexes, fieldOverrides);
|
|
22
22
|
if (options.pretty) {
|
|
23
|
-
logger_1.logger.info(clc.bold.white("Compound Indexes"));
|
|
23
|
+
logger_1.logger.info(clc.bold(clc.white("Compound Indexes")));
|
|
24
24
|
indexApi.prettyPrintIndexes(indexes);
|
|
25
25
|
if (fieldOverrides) {
|
|
26
26
|
logger_1.logger.info();
|
|
27
|
-
logger_1.logger.info(clc.bold.white("Field Overrides"));
|
|
27
|
+
logger_1.logger.info(clc.bold(clc.white("Field Overrides")));
|
|
28
28
|
indexApi.printFieldOverrides(fieldOverrides);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -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");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.command = void 0;
|
|
4
4
|
const path = require("path");
|
|
5
|
-
const clc = require("
|
|
5
|
+
const clc = require("colorette");
|
|
6
6
|
const requireInteractive_1 = require("../requireInteractive");
|
|
7
7
|
const command_1 = require("../command");
|
|
8
8
|
const error_1 = require("../error");
|
|
@@ -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");
|
|
@@ -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 requirePermissions_1 = require("../requirePermissions");
|
|
@@ -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 functionsConfig = require("../functionsConfig");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
7
|
const error_1 = require("../error");
|
|
@@ -17,6 +17,7 @@ const fabricator = require("../deploy/functions/release/fabricator");
|
|
|
17
17
|
const executor = require("../deploy/functions/release/executor");
|
|
18
18
|
const reporter = require("../deploy/functions/release/reporter");
|
|
19
19
|
const containerCleaner = require("../deploy/functions/containerCleaner");
|
|
20
|
+
const getProjectNumber_1 = require("../getProjectNumber");
|
|
20
21
|
exports.command = new command_1.Command("functions:delete [filters...]")
|
|
21
22
|
.description("delete one or more Cloud Functions by name or group name.")
|
|
22
23
|
.option("--region <region>", "Specify region of the function to be deleted. " +
|
|
@@ -78,6 +79,7 @@ exports.command = new command_1.Command("functions:delete [filters...]")
|
|
|
78
79
|
appEngineLocation,
|
|
79
80
|
executor: new executor.QueueExecutor({}),
|
|
80
81
|
sources: {},
|
|
82
|
+
projectNumber: options.projectNumber || (await (0, getProjectNumber_1.getProjectNumber)({ projectId: context.projectId })),
|
|
81
83
|
});
|
|
82
84
|
const summary = await fab.applyPlan(plan);
|
|
83
85
|
await reporter.logAndTrackDeployStats(summary);
|
|
@@ -6,8 +6,10 @@ const command_1 = require("../command");
|
|
|
6
6
|
const logger_1 = require("../logger");
|
|
7
7
|
const projectUtils_1 = require("../projectUtils");
|
|
8
8
|
const secretManager_1 = require("../gcp/secretManager");
|
|
9
|
+
const requirePermissions_1 = require("../requirePermissions");
|
|
9
10
|
exports.command = new command_1.Command("functions:secrets:get <KEY>")
|
|
10
11
|
.description("Get metadata for secret and its versions")
|
|
12
|
+
.before(requirePermissions_1.requirePermissions, ["secretmanager.secrets.get"])
|
|
11
13
|
.action(async (key, options) => {
|
|
12
14
|
const projectId = (0, projectUtils_1.needProjectId)(options);
|
|
13
15
|
const versions = await (0, secretManager_1.listSecretVersions)(projectId, key);
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.command = void 0;
|
|
4
4
|
const tty = require("tty");
|
|
5
5
|
const fs = require("fs");
|
|
6
|
-
const clc = require("
|
|
6
|
+
const clc = require("colorette");
|
|
7
7
|
const secrets_1 = require("../functions/secrets");
|
|
8
8
|
const command_1 = require("../command");
|
|
9
9
|
const requirePermissions_1 = require("../requirePermissions");
|
package/lib/commands/help.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
|
|
4
|
+
const colorette_1 = require("colorette");
|
|
5
5
|
const api_1 = require("../hosting/api");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
7
|
const expireUtils_1 = require("../hosting/expireUtils");
|
|
@@ -46,7 +46,7 @@ exports.command = new command_1.Command("hosting:channel:create [channelId]")
|
|
|
46
46
|
}
|
|
47
47
|
catch (e) {
|
|
48
48
|
if (e.status === 409) {
|
|
49
|
-
throw new error_1.FirebaseError(`Channel ${(0,
|
|
49
|
+
throw new error_1.FirebaseError(`Channel ${(0, colorette_1.bold)(channelId)} already exists on site ${(0, colorette_1.bold)(site)}. Deploy to ${(0, colorette_1.bold)(channelId)} with: ${(0, colorette_1.yellow)(`firebase hosting:channel:deploy ${channelId}`)}`, { original: e });
|
|
50
50
|
}
|
|
51
51
|
throw e;
|
|
52
52
|
}
|
|
@@ -58,10 +58,10 @@ exports.command = new command_1.Command("hosting:channel:create [channelId]")
|
|
|
58
58
|
logger_1.logger.debug("[hosting] unable to add auth domain", e);
|
|
59
59
|
}
|
|
60
60
|
logger_1.logger.info();
|
|
61
|
-
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Channel ${(0,
|
|
62
|
-
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Channel ${(0,
|
|
61
|
+
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Channel ${(0, colorette_1.bold)(channelId)} has been created on site ${(0, colorette_1.bold)(site)}.`);
|
|
62
|
+
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Channel ${(0, colorette_1.bold)(channelId)} will expire at ${(0, colorette_1.bold)((0, utils_1.datetimeString)(new Date(channel.expireTime)))}.`);
|
|
63
63
|
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Channel URL: ${channel.url}`);
|
|
64
64
|
logger_1.logger.info();
|
|
65
|
-
logger_1.logger.info(`To deploy to this channel, use ${(0,
|
|
65
|
+
logger_1.logger.info(`To deploy to this channel, use ${(0, colorette_1.yellow)(`firebase hosting:channel:deploy ${channelId}`)}.`);
|
|
66
66
|
return channel;
|
|
67
67
|
});
|
|
@@ -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 { marked } = require("marked");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
7
|
const utils_1 = require("../utils");
|
|
@@ -27,7 +27,7 @@ exports.command = new command_1.Command("hosting:channel:delete <channelId>")
|
|
|
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 Channel ${(0,
|
|
30
|
+
message: `Are you sure you want to delete the Hosting Channel ${(0, colorette_1.underline)(channelId)} for site ${(0, colorette_1.underline)(siteId)}?`,
|
|
31
31
|
default: false,
|
|
32
32
|
}, options);
|
|
33
33
|
if (!confirmed) {
|
|
@@ -43,5 +43,5 @@ exports.command = new command_1.Command("hosting:channel:delete <channelId>")
|
|
|
43
43
|
logger_1.logger.debug("[hosting] unable to remove auth domain", e);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
(0, utils_1.logLabeledSuccess)("hosting:channels", `Successfully deleted channel ${(0,
|
|
46
|
+
(0, utils_1.logLabeledSuccess)("hosting:channels", `Successfully deleted channel ${(0, colorette_1.bold)(channelId)} for site ${(0, colorette_1.bold)(siteId)}.`);
|
|
47
47
|
});
|
|
@@ -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 error_1 = require("../error");
|
|
7
7
|
const api_1 = require("../hosting/api");
|
|
@@ -40,7 +40,7 @@ exports.command = new command_1.Command("hosting:channel:deploy [channelId]")
|
|
|
40
40
|
}
|
|
41
41
|
channelId = (0, api_1.normalizeName)(channelId);
|
|
42
42
|
if (channelId.toLowerCase().trim() === "live") {
|
|
43
|
-
throw new error_1.FirebaseError(`Cannot deploy to the ${(0,
|
|
43
|
+
throw new error_1.FirebaseError(`Cannot deploy to the ${(0, colorette_1.bold)("live")} channel using this command. Please use ${(0, colorette_1.bold)((0, colorette_1.yellow)("firebase deploy"))} instead.`);
|
|
44
44
|
}
|
|
45
45
|
if (options.only) {
|
|
46
46
|
options.only = options.only
|
|
@@ -77,7 +77,7 @@ exports.command = new command_1.Command("hosting:channel:deploy [channelId]")
|
|
|
77
77
|
else {
|
|
78
78
|
chan = await (0, api_1.createChannel)(projectId, site, channelId, expireTTL);
|
|
79
79
|
logger_1.logger.debug("[hosting] created new channnel for site", site, chan);
|
|
80
|
-
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Channel ${(0,
|
|
80
|
+
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Channel ${(0, colorette_1.bold)(channelId)} has been created on site ${(0, colorette_1.bold)(site)}.`);
|
|
81
81
|
}
|
|
82
82
|
siteInfo.url = chan.url;
|
|
83
83
|
siteInfo.expireTime = chan.expireTime;
|
|
@@ -105,7 +105,7 @@ exports.command = new command_1.Command("hosting:channel:deploy [channelId]")
|
|
|
105
105
|
deploys[d.target || d.site] = d;
|
|
106
106
|
let expires = "";
|
|
107
107
|
if (d.expireTime) {
|
|
108
|
-
expires = `[expires ${(0,
|
|
108
|
+
expires = `[expires ${(0, colorette_1.bold)((0, utils_1.datetimeString)(new Date(d.expireTime)))}]`;
|
|
109
109
|
}
|
|
110
110
|
const versionPrefix = `sites/${d.site}/versions/`;
|
|
111
111
|
const versionName = versionNames.find((v) => {
|
|
@@ -114,9 +114,9 @@ exports.command = new command_1.Command("hosting:channel:deploy [channelId]")
|
|
|
114
114
|
let version = "";
|
|
115
115
|
if (versionName) {
|
|
116
116
|
d.version = versionName.replace(versionPrefix, "");
|
|
117
|
-
version = ` [version ${(0,
|
|
117
|
+
version = ` [version ${(0, colorette_1.bold)(d.version)}]`;
|
|
118
118
|
}
|
|
119
|
-
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Channel URL (${(0,
|
|
119
|
+
(0, utils_1.logLabeledSuccess)(LOG_TAG, `Channel URL (${(0, colorette_1.bold)(d.site || d.target || "")}): ${d.url} ${expires}${version}`);
|
|
120
120
|
});
|
|
121
121
|
return deploys;
|
|
122
122
|
});
|
|
@@ -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 api_1 = require("../hosting/api");
|
|
7
7
|
const command_1 = require("../command");
|
|
@@ -33,7 +33,7 @@ exports.command = new command_1.Command("hosting:channel:list")
|
|
|
33
33
|
]);
|
|
34
34
|
}
|
|
35
35
|
logger_1.logger.info();
|
|
36
|
-
logger_1.logger.info(`Channels for site ${(0,
|
|
36
|
+
logger_1.logger.info(`Channels for site ${(0, colorette_1.bold)(siteId)}`);
|
|
37
37
|
logger_1.logger.info();
|
|
38
38
|
logger_1.logger.info(table.toString());
|
|
39
39
|
return { channels };
|
|
@@ -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/index.js
CHANGED
|
@@ -34,6 +34,9 @@ function load(client) {
|
|
|
34
34
|
client.crashlytics = {};
|
|
35
35
|
client.crashlytics.symbols = {};
|
|
36
36
|
client.crashlytics.symbols.upload = loadCommand("crashlytics-symbols-upload");
|
|
37
|
+
client.crashlytics.mappingfile = {};
|
|
38
|
+
client.crashlytics.mappingfile.generateid = loadCommand("crashlytics-mappingfile-generateid");
|
|
39
|
+
client.crashlytics.mappingfile.upload = loadCommand("crashlytics-mappingfile-upload");
|
|
37
40
|
client.database = {};
|
|
38
41
|
client.database.get = loadCommand("database-get");
|
|
39
42
|
client.database.instances = {};
|
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
|
}
|