firebase-tools 11.0.0 → 11.2.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/accountExporter.js +11 -4
- package/lib/accountImporter.js +93 -95
- package/lib/api.js +77 -218
- package/lib/apiv2.js +5 -4
- package/lib/appdistribution/client.js +23 -34
- package/lib/auth.js +72 -52
- package/lib/bin/firebase.js +42 -47
- package/lib/checkValidTargetFilters.js +36 -25
- package/lib/commands/appdistribution-distribute.js +2 -1
- package/lib/commands/appdistribution-testers-add.js +2 -1
- package/lib/commands/appdistribution-testers-remove.js +2 -1
- package/lib/commands/apps-android-sha-create.js +2 -1
- package/lib/commands/apps-android-sha-delete.js +2 -1
- package/lib/commands/apps-android-sha-list.js +2 -1
- package/lib/commands/apps-create.js +2 -1
- package/lib/commands/apps-list.js +2 -1
- package/lib/commands/apps-sdkconfig.js +2 -1
- package/lib/commands/auth-export.js +2 -1
- package/lib/commands/auth-import.js +7 -10
- package/lib/commands/crashlytics-symbols-upload.js +2 -1
- package/lib/commands/database-get.js +4 -3
- package/lib/commands/database-instances-create.js +2 -1
- package/lib/commands/database-instances-list.js +3 -3
- package/lib/commands/database-profile.js +4 -4
- package/lib/commands/database-push.js +4 -4
- package/lib/commands/database-remove.js +3 -3
- package/lib/commands/database-rules-canary.js +2 -1
- package/lib/commands/database-rules-get.js +2 -1
- package/lib/commands/database-rules-list.js +2 -1
- package/lib/commands/database-rules-release.js +2 -1
- package/lib/commands/database-rules-stage.js +2 -1
- package/lib/commands/database-set.js +3 -3
- package/lib/commands/database-settings-get.js +2 -1
- package/lib/commands/database-settings-set.js +2 -1
- package/lib/commands/database-update.js +2 -1
- package/lib/commands/deploy.js +26 -25
- package/lib/commands/emulators-exec.js +2 -1
- package/lib/commands/emulators-export.js +2 -1
- package/lib/commands/emulators-start.js +2 -1
- package/lib/commands/experimental-functions-shell.js +10 -8
- package/lib/commands/ext-configure.js +6 -1
- package/lib/commands/ext-dev-deprecate.js +2 -1
- package/lib/commands/ext-dev-emulators-exec.js +3 -2
- package/lib/commands/ext-dev-emulators-start.js +3 -2
- package/lib/commands/ext-dev-extension-delete.js +2 -1
- package/lib/commands/ext-dev-init.js +2 -1
- package/lib/commands/ext-dev-list.js +8 -8
- package/lib/commands/ext-dev-publish.js +2 -1
- package/lib/commands/ext-dev-register.js +2 -1
- package/lib/commands/ext-dev-undeprecate.js +2 -1
- package/lib/commands/ext-dev-unpublish.js +2 -1
- package/lib/commands/ext-dev-usage.js +2 -1
- package/lib/commands/ext-export.js +2 -1
- package/lib/commands/ext-info.js +14 -14
- package/lib/commands/ext-install.js +6 -1
- package/lib/commands/ext-list.js +2 -1
- package/lib/commands/ext-sources-create.js +2 -1
- package/lib/commands/ext-uninstall.js +7 -1
- package/lib/commands/ext-update.js +6 -1
- package/lib/commands/ext.js +4 -4
- package/lib/commands/firestore-delete.js +2 -1
- package/lib/commands/firestore-indexes-list.js +2 -1
- package/lib/commands/functions-config-clone.js +4 -3
- package/lib/commands/functions-config-export.js +2 -1
- package/lib/commands/functions-config-get.js +2 -1
- package/lib/commands/functions-config-set.js +2 -1
- package/lib/commands/functions-config-unset.js +2 -1
- package/lib/commands/functions-delete.js +3 -8
- package/lib/commands/functions-deletegcfartifacts.js +2 -1
- package/lib/commands/functions-list.js +2 -1
- package/lib/commands/functions-log.js +2 -1
- package/lib/commands/functions-secrets-access.js +2 -1
- package/lib/commands/functions-secrets-destroy.js +2 -1
- package/lib/commands/functions-secrets-get.js +2 -1
- package/lib/commands/functions-secrets-prune.js +2 -1
- package/lib/commands/functions-secrets-set.js +2 -1
- package/lib/commands/functions-shell.js +12 -10
- package/lib/commands/help.js +2 -1
- package/lib/commands/hosting-channel-create.js +2 -1
- package/lib/commands/hosting-channel-delete.js +2 -1
- package/lib/commands/hosting-channel-deploy.js +2 -1
- package/lib/commands/hosting-channel-list.js +2 -1
- package/lib/commands/hosting-channel-open.js +2 -1
- package/lib/commands/hosting-clone.js +2 -1
- package/lib/commands/hosting-disable.js +2 -1
- package/lib/commands/hosting-sites-create.js +2 -1
- package/lib/commands/hosting-sites-delete.js +2 -1
- package/lib/commands/hosting-sites-get.js +2 -1
- package/lib/commands/hosting-sites-list.js +2 -1
- package/lib/commands/index.js +23 -13
- package/lib/commands/init.js +47 -43
- package/lib/commands/login-add.js +2 -1
- package/lib/commands/login-ci.js +2 -1
- package/lib/commands/login-list.js +2 -1
- package/lib/commands/login-use.js +2 -1
- package/lib/commands/login.js +2 -1
- package/lib/commands/logout.js +2 -1
- package/lib/commands/open.js +7 -7
- package/lib/commands/projects-addfirebase.js +2 -1
- package/lib/commands/projects-create.js +2 -1
- package/lib/commands/projects-list.js +2 -1
- package/lib/commands/remoteconfig-get.js +2 -1
- package/lib/commands/remoteconfig-rollback.js +2 -1
- package/lib/commands/remoteconfig-versions-list.js +2 -1
- package/lib/commands/serve.js +30 -30
- package/lib/commands/setup-emulators-database.js +2 -1
- package/lib/commands/setup-emulators-firestore.js +2 -1
- package/lib/commands/setup-emulators-pubsub.js +2 -1
- package/lib/commands/setup-emulators-storage.js +2 -1
- package/lib/commands/setup-emulators-ui.js +2 -1
- package/lib/commands/target-apply.js +2 -1
- package/lib/commands/target-clear.js +2 -1
- package/lib/commands/target-remove.js +2 -1
- package/lib/commands/target.js +2 -1
- package/lib/commands/use.js +54 -53
- package/lib/config.js +7 -6
- package/lib/deploy/database/deploy.js +3 -2
- package/lib/deploy/database/index.js +8 -5
- package/lib/deploy/database/prepare.js +22 -20
- package/lib/deploy/database/release.js +12 -9
- package/lib/deploy/extensions/secrets.js +3 -3
- package/lib/deploy/firestore/prepare.js +2 -2
- package/lib/deploy/functions/build.js +33 -20
- package/lib/deploy/functions/ensure.js +1 -11
- package/lib/deploy/functions/prepare.js +3 -13
- package/lib/deploy/functions/prepareFunctionsUpload.js +2 -3
- package/lib/deploy/functions/release/fabricator.js +0 -1
- package/lib/deploy/functions/release/index.js +1 -5
- package/lib/deploy/functions/runtimes/discovery/index.js +18 -3
- package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +188 -54
- package/lib/deploy/functions/runtimes/golang/index.js +2 -22
- package/lib/deploy/functions/runtimes/node/index.js +3 -7
- package/lib/deploy/functions/runtimes/node/parseTriggers.js +15 -3
- package/lib/deploy/functions/services/database.js +14 -0
- package/lib/deploy/functions/services/index.js +14 -0
- package/lib/deploy/index.js +3 -3
- package/lib/deploy/lifecycleHooks.js +27 -27
- package/lib/deploy/remoteconfig/functions.js +18 -14
- package/lib/deploy/remoteconfig/prepare.js +2 -2
- package/lib/deploy/storage/prepare.js +1 -1
- package/lib/emulator/auth/apiSpec.js +14 -46
- package/lib/emulator/auth/index.js +1 -1
- package/lib/emulator/auth/operations.js +342 -93
- package/lib/emulator/auth/server.js +2 -2
- package/lib/emulator/auth/state.js +34 -32
- package/lib/emulator/commandUtils.js +1 -1
- package/lib/emulator/constants.js +1 -1
- package/lib/emulator/controller.js +7 -6
- package/lib/emulator/databaseEmulator.js +11 -9
- package/lib/emulator/download.js +1 -1
- package/lib/emulator/events/types.js +2 -3
- package/lib/emulator/firestoreEmulator.js +12 -14
- package/lib/emulator/functionsEmulator.js +65 -77
- package/lib/emulator/functionsEmulatorRuntime.js +7 -7
- package/lib/emulator/hostingEmulator.js +1 -1
- package/lib/emulator/hub.js +1 -1
- package/lib/emulator/hubClient.js +11 -22
- package/lib/emulator/hubExport.js +26 -16
- package/lib/emulator/loggingEmulator.js +1 -1
- package/lib/emulator/pubsubEmulator.js +1 -1
- package/lib/emulator/storage/crc.js +4 -4
- package/lib/emulator/storage/index.js +1 -1
- package/lib/emulator/types.js +1 -1
- package/lib/errorOut.js +2 -2
- package/lib/extensions/askUserForConsent.js +1 -2
- package/lib/extensions/askUserForParam.js +15 -18
- package/lib/extensions/emulator/optionsHelper.js +4 -4
- package/lib/extensions/extensionsApi.js +1 -22
- package/lib/extensions/extensionsHelper.js +6 -6
- package/lib/extensions/listExtensions.js +9 -10
- package/lib/extensions/manifest.js +2 -2
- package/lib/extensions/resolveSource.js +11 -7
- package/lib/extensions/secretsUtils.js +3 -3
- package/lib/extensions/types.js +24 -0
- package/lib/extensions/updateHelper.js +1 -1
- package/lib/extensions/utils.js +1 -2
- package/lib/extensions/warnings.js +3 -3
- package/lib/firestore/checkDatabaseType.js +4 -5
- package/lib/firestore/encodeFirestoreValue.js +11 -8
- package/lib/firestore/indexes.js +17 -34
- package/lib/fsAsync.js +3 -3
- package/lib/functions/events/v2.js +7 -1
- package/lib/functionsConfig.js +17 -14
- package/lib/functionsConfigClone.js +46 -46
- package/lib/gcp/cloudfunctions.js +2 -15
- package/lib/gcp/cloudfunctionsv2.js +17 -2
- package/lib/gcp/iam.js +1 -1
- package/lib/gcp/index.js +10 -10
- package/lib/gcp/rules.js +1 -1
- package/lib/gcp/runtimeconfig.js +45 -47
- package/lib/gcp/storage.js +2 -4
- package/lib/hosting/cloudRunProxy.js +19 -15
- package/lib/hosting/proxy.js +1 -1
- package/lib/index.js +29 -28
- package/lib/init/features/database.js +11 -5
- package/lib/init/features/functions/index.js +1 -1
- package/lib/init/features/functions/javascript.js +23 -20
- package/lib/init/features/functions/npm-dependencies.js +17 -14
- package/lib/init/features/functions/typescript.js +27 -24
- package/lib/init/features/hosting/github.js +6 -5
- package/lib/init/features/hosting/index.js +2 -2
- package/lib/loadCJSON.js +9 -6
- package/lib/localFunction.js +4 -4
- package/lib/logError.js +15 -12
- package/lib/management/apps.js +47 -43
- package/lib/management/database.js +33 -31
- package/lib/management/projects.js +13 -7
- package/lib/parseBoltRules.js +15 -14
- package/lib/previews.js +1 -1
- package/lib/profileReport.js +504 -512
- package/lib/profiler.js +4 -4
- package/lib/prompt.js +1 -2
- package/lib/rc.js +1 -1
- package/lib/requireAuth.js +0 -1
- package/lib/responseToError.js +8 -5
- package/lib/rtdb.js +31 -29
- package/lib/rulesDeploy.js +2 -2
- package/lib/scopes.js +9 -9
- package/lib/serve/index.js +4 -5
- package/lib/utils.js +30 -6
- package/npm-shrinkwrap.json +877 -279
- package/package.json +19 -16
- package/standalone/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const clc = require("cli-color");
|
|
4
5
|
const checkMinRequiredVersion_1 = require("../checkMinRequiredVersion");
|
|
5
6
|
const command_1 = require("../command");
|
|
6
7
|
const error_1 = require("../error");
|
|
7
8
|
const commandUtils = require("../emulator/commandUtils");
|
|
8
|
-
|
|
9
|
+
exports.command = new command_1.Command("ext:dev:emulators:exec <script>")
|
|
9
10
|
.description("deprecated: please use `firebase emulators:exec` instead")
|
|
10
11
|
.before(commandUtils.setExportOnExitOptions)
|
|
11
12
|
.option(commandUtils.FLAG_INSPECT_FUNCTIONS, commandUtils.DESC_INSPECT_FUNCTIONS)
|
|
@@ -15,7 +16,7 @@ module.exports = new command_1.Command("ext:dev:emulators:exec <script>")
|
|
|
15
16
|
.option(commandUtils.FLAG_EXPORT_ON_EXIT, commandUtils.DESC_EXPORT_ON_EXIT)
|
|
16
17
|
.option(commandUtils.FLAG_UI, commandUtils.DESC_UI)
|
|
17
18
|
.before(checkMinRequiredVersion_1.checkMinRequiredVersion, "extDevMinVersion")
|
|
18
|
-
.action((script
|
|
19
|
+
.action((script) => {
|
|
19
20
|
const localInstallCommand = `firebase ext:install ${process.cwd()}`;
|
|
20
21
|
const emulatorsExecCommand = `firebase emulators:exec '${script}`;
|
|
21
22
|
throw new error_1.FirebaseError("ext:dev:emulators:exec is no longer supported. " +
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const clc = require("cli-color");
|
|
4
5
|
const command_1 = require("../command");
|
|
5
6
|
const commandUtils = require("../emulator/commandUtils");
|
|
6
7
|
const error_1 = require("../error");
|
|
7
|
-
|
|
8
|
+
exports.command = new command_1.Command("ext:dev:emulators:start")
|
|
8
9
|
.description("deprecated: please use `firebase emulators:start`")
|
|
9
10
|
.before(commandUtils.setExportOnExitOptions)
|
|
10
11
|
.option(commandUtils.FLAG_INSPECT_FUNCTIONS, commandUtils.DESC_INSPECT_FUNCTIONS)
|
|
@@ -12,7 +13,7 @@ module.exports = new command_1.Command("ext:dev:emulators:start")
|
|
|
12
13
|
.option(commandUtils.FLAG_TEST_PARAMS, commandUtils.DESC_TEST_PARAMS)
|
|
13
14
|
.option(commandUtils.FLAG_IMPORT, commandUtils.DESC_IMPORT)
|
|
14
15
|
.option(commandUtils.FLAG_EXPORT_ON_EXIT, commandUtils.DESC_EXPORT_ON_EXIT)
|
|
15
|
-
.action((
|
|
16
|
+
.action(() => {
|
|
16
17
|
const localInstallCommand = `firebase ext:install ${process.cwd()}`;
|
|
17
18
|
const emulatorsStartCommand = "firebase emulators:start";
|
|
18
19
|
throw new error_1.FirebaseError("ext:dev:emulators:start is no longer supported. " +
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const utils = require("../utils");
|
|
4
5
|
const clc = require("cli-color");
|
|
5
6
|
const command_1 = require("../command");
|
|
@@ -10,7 +11,7 @@ const prompt_1 = require("../prompt");
|
|
|
10
11
|
const requireAuth_1 = require("../requireAuth");
|
|
11
12
|
const error_1 = require("../error");
|
|
12
13
|
const checkMinRequiredVersion_1 = require("../checkMinRequiredVersion");
|
|
13
|
-
|
|
14
|
+
exports.command = new command_1.Command("ext:dev:delete <extensionRef>")
|
|
14
15
|
.description("delete an extension")
|
|
15
16
|
.help("use this command to delete an extension, and make it unavailable for developers to install or reconfigure. " +
|
|
16
17
|
"Specify the extension you want to delete using the format '<publisherId>/<extensionId>.")
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const fs = require("fs");
|
|
4
5
|
const path = require("path");
|
|
5
6
|
const { marked } = require("marked");
|
|
@@ -24,7 +25,7 @@ function readCommonTemplates() {
|
|
|
24
25
|
changelogTemplate: fs.readFileSync(path.join(TEMPLATE_ROOT, "CHANGELOG.md"), "utf8"),
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
|
-
exports.
|
|
28
|
+
exports.command = new command_1.Command("ext:dev:init")
|
|
28
29
|
.description("initialize files for writing an extension in the current directory")
|
|
29
30
|
.before(checkMinRequiredVersion_1.checkMinRequiredVersion, "extDevMinVersion")
|
|
30
31
|
.action(async (options) => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const clc = require("cli-color");
|
|
4
5
|
const Table = require("cli-table");
|
|
5
|
-
const _ = require("lodash");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
|
-
const extensionsHelper_1 = require("../extensions/extensionsHelper");
|
|
8
7
|
const error_1 = require("../error");
|
|
9
|
-
const
|
|
10
|
-
const extensionsUtils = require("../extensions/utils");
|
|
8
|
+
const utils_1 = require("../utils");
|
|
11
9
|
const extensionsApi_1 = require("../extensions/extensionsApi");
|
|
12
10
|
const logger_1 = require("../logger");
|
|
11
|
+
const extensionsHelper_1 = require("../extensions/extensionsHelper");
|
|
13
12
|
const requireAuth_1 = require("../requireAuth");
|
|
14
|
-
|
|
13
|
+
const extensionsUtils = require("../extensions/utils");
|
|
14
|
+
exports.command = new command_1.Command("ext:dev:list <publisherId>")
|
|
15
15
|
.description("list all published extensions associated with this publisher ID")
|
|
16
16
|
.before(requireAuth_1.requireAuth)
|
|
17
17
|
.action(async (publisherId) => {
|
|
@@ -32,15 +32,15 @@ exports.default = new command_1.Command("ext:dev:list <publisherId>")
|
|
|
32
32
|
head: ["Extension ID", "Version", "Published"],
|
|
33
33
|
style: { head: ["yellow"] },
|
|
34
34
|
});
|
|
35
|
-
const sorted =
|
|
35
|
+
const sorted = extensions.sort((a, b) => new Date(b.createTime).valueOf() - new Date(a.createTime).valueOf());
|
|
36
36
|
sorted.forEach((extension) => {
|
|
37
37
|
table.push([
|
|
38
|
-
|
|
38
|
+
(0, utils_1.last)(extension.ref.split("/")),
|
|
39
39
|
extension.latestVersion,
|
|
40
40
|
extension.createTime ? extensionsUtils.formatTimestamp(extension.createTime) : "",
|
|
41
41
|
]);
|
|
42
42
|
});
|
|
43
|
-
|
|
43
|
+
(0, utils_1.logLabeledBullet)(extensionsHelper_1.logPrefix, `list of published extensions for publisher ${clc.bold(publisherId)}:`);
|
|
44
44
|
logger_1.logger.info(table.toString());
|
|
45
45
|
return { extensions: sorted };
|
|
46
46
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const clc = require("cli-color");
|
|
4
5
|
const { marked } = require("marked");
|
|
5
6
|
const TerminalRenderer = require("marked-terminal");
|
|
@@ -14,7 +15,7 @@ const utils = require("../utils");
|
|
|
14
15
|
marked.setOptions({
|
|
15
16
|
renderer: new TerminalRenderer(),
|
|
16
17
|
});
|
|
17
|
-
exports.
|
|
18
|
+
exports.command = new command_1.Command("ext:dev:publish <extensionRef>")
|
|
18
19
|
.description(`publish a new version of an extension`)
|
|
19
20
|
.withForce()
|
|
20
21
|
.help("if you have not previously published a version of this extension, this will " +
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const clc = require("cli-color");
|
|
4
5
|
const { marked } = require("marked");
|
|
5
6
|
const command_1 = require("../command");
|
|
@@ -11,7 +12,7 @@ const askUserForConsent_1 = require("../extensions/askUserForConsent");
|
|
|
11
12
|
const requirePermissions_1 = require("../requirePermissions");
|
|
12
13
|
const error_1 = require("../error");
|
|
13
14
|
const utils = require("../utils");
|
|
14
|
-
exports.
|
|
15
|
+
exports.command = new command_1.Command("ext:dev:register")
|
|
15
16
|
.description("register a publisher ID; run this before publishing your first extension.")
|
|
16
17
|
.before(requirePermissions_1.requirePermissions, ["firebaseextensions.sources.create"])
|
|
17
18
|
.before(extensionsHelper_1.ensureExtensionsApiEnabled)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const clc = require("cli-color");
|
|
4
5
|
const semver = require("semver");
|
|
5
6
|
const refs = require("../extensions/refs");
|
|
@@ -11,7 +12,7 @@ const extensionsApi_1 = require("../extensions/extensionsApi");
|
|
|
11
12
|
const versionHelper_1 = require("../extensions/versionHelper");
|
|
12
13
|
const requireAuth_1 = require("../requireAuth");
|
|
13
14
|
const error_1 = require("../error");
|
|
14
|
-
exports.
|
|
15
|
+
exports.command = new command_1.Command("ext:dev:undeprecate <extensionRef> <versionPredicate>")
|
|
15
16
|
.description("undeprecate extension versions that match the version predicate")
|
|
16
17
|
.before(requireAuth_1.requireAuth)
|
|
17
18
|
.before(extensionsHelper_1.ensureExtensionsApiEnabled)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const command_1 = require("../command");
|
|
4
5
|
const extensionsHelper_1 = require("../extensions/extensionsHelper");
|
|
5
6
|
const extensionsApi_1 = require("../extensions/extensionsApi");
|
|
@@ -10,7 +11,7 @@ const clc = require("cli-color");
|
|
|
10
11
|
const requireAuth_1 = require("../requireAuth");
|
|
11
12
|
const error_1 = require("../error");
|
|
12
13
|
const checkMinRequiredVersion_1 = require("../checkMinRequiredVersion");
|
|
13
|
-
|
|
14
|
+
exports.command = new command_1.Command("ext:dev:unpublish <extensionRef>")
|
|
14
15
|
.description("unpublish an extension")
|
|
15
16
|
.withForce()
|
|
16
17
|
.help("use this command to unpublish an extension, and make it unavailable for developers to install or reconfigure. " +
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const Table = require("cli-table");
|
|
4
5
|
const clc = require("cli-color");
|
|
5
6
|
const utils = require("../utils");
|
|
@@ -14,7 +15,7 @@ const error_1 = require("../error");
|
|
|
14
15
|
const logger_1 = require("../logger");
|
|
15
16
|
const prompt_1 = require("../prompt");
|
|
16
17
|
const shortenUrl_1 = require("../shortenUrl");
|
|
17
|
-
|
|
18
|
+
exports.command = new command_1.Command("ext:dev:usage <publisherId>")
|
|
18
19
|
.description("get usage for an extension")
|
|
19
20
|
.help("use this command to get the usage of extensions you published. " +
|
|
20
21
|
"Specify the publisher ID you used to publish your extensions, " +
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const checkMinRequiredVersion_1 = require("../checkMinRequiredVersion");
|
|
4
5
|
const command_1 = require("../command");
|
|
5
6
|
const planner = require("../deploy/extensions/planner");
|
|
@@ -13,7 +14,7 @@ const logger_1 = require("../logger");
|
|
|
13
14
|
const projectUtils_1 = require("../projectUtils");
|
|
14
15
|
const prompt_1 = require("../prompt");
|
|
15
16
|
const requirePermissions_1 = require("../requirePermissions");
|
|
16
|
-
|
|
17
|
+
exports.command = new command_1.Command("ext:export")
|
|
17
18
|
.description("export all Extension instances installed on a project to a local Firebase directory")
|
|
18
19
|
.before(requirePermissions_1.requirePermissions, ["firebaseextensions.instances.list"])
|
|
19
20
|
.before(extensionsHelper_1.ensureExtensionsApiEnabled)
|
package/lib/commands/ext-info.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const clc = require("cli-color");
|
|
4
|
-
const _ = require("lodash");
|
|
5
5
|
const checkMinRequiredVersion_1 = require("../checkMinRequiredVersion");
|
|
6
6
|
const command_1 = require("../command");
|
|
7
7
|
const extensionsApi = require("../extensions/extensionsApi");
|
|
@@ -13,7 +13,7 @@ const utils = require("../utils");
|
|
|
13
13
|
const { marked } = require("marked");
|
|
14
14
|
const TerminalRenderer = require("marked-terminal");
|
|
15
15
|
const FUNCTION_TYPE_REGEX = /\..+\.function/;
|
|
16
|
-
exports.
|
|
16
|
+
exports.command = new command_1.Command("ext:info <extensionName>")
|
|
17
17
|
.description("display information about an extension by name (extensionName@x.y.z for a specific version)")
|
|
18
18
|
.option("--markdown", "output info in Markdown suitable for constructing a README file")
|
|
19
19
|
.before(checkMinRequiredVersion_1.checkMinRequiredVersion, "extMinVersion")
|
|
@@ -65,44 +65,44 @@ exports.default = new command_1.Command("ext:info <extensionName>")
|
|
|
65
65
|
}
|
|
66
66
|
if (spec.params && Array.isArray(spec.params) && spec.params.length > 0) {
|
|
67
67
|
lines.push("", "**Configuration Parameters:**");
|
|
68
|
-
|
|
68
|
+
for (const param of spec.params) {
|
|
69
69
|
lines.push(`* ${param.label}` + (param.description ? `: ${param.description}` : ""));
|
|
70
|
-
}
|
|
70
|
+
}
|
|
71
71
|
}
|
|
72
72
|
const functions = [];
|
|
73
73
|
const otherResources = [];
|
|
74
|
-
|
|
74
|
+
for (const resource of spec.resources) {
|
|
75
75
|
if (FUNCTION_TYPE_REGEX.test(resource.type)) {
|
|
76
76
|
functions.push(resource);
|
|
77
77
|
}
|
|
78
78
|
else {
|
|
79
79
|
otherResources.push(resource);
|
|
80
80
|
}
|
|
81
|
-
}
|
|
81
|
+
}
|
|
82
82
|
if (functions.length > 0) {
|
|
83
83
|
lines.push("", "**Cloud Functions:**");
|
|
84
|
-
|
|
84
|
+
for (const func of functions) {
|
|
85
85
|
lines.push(`* **${func.name}:** ${func.description}`);
|
|
86
|
-
}
|
|
86
|
+
}
|
|
87
87
|
}
|
|
88
88
|
if (otherResources.length > 0) {
|
|
89
89
|
lines.push("", "**Other Resources**:");
|
|
90
|
-
|
|
90
|
+
for (const resource of otherResources) {
|
|
91
91
|
lines.push(`* ${resource.name} (${resource.type})`);
|
|
92
|
-
}
|
|
92
|
+
}
|
|
93
93
|
}
|
|
94
94
|
if (spec.apis) {
|
|
95
95
|
lines.push("", "**APIs Used**:");
|
|
96
|
-
|
|
96
|
+
for (const api of spec.apis) {
|
|
97
97
|
lines.push(`* ${api.apiName}` + (api.reason ? ` (Reason: ${api.reason})` : ""));
|
|
98
|
-
}
|
|
98
|
+
}
|
|
99
99
|
}
|
|
100
100
|
if (spec.roles) {
|
|
101
101
|
lines.push("", "**Access Required**:");
|
|
102
102
|
lines.push("", "This extension will operate with the following project IAM roles:");
|
|
103
|
-
|
|
103
|
+
for (const role of spec.roles) {
|
|
104
104
|
lines.push(`* ${role.role}` + (role.reason ? ` (Reason: ${role.reason})` : ""));
|
|
105
|
-
}
|
|
105
|
+
}
|
|
106
106
|
}
|
|
107
107
|
if (options.markdown) {
|
|
108
108
|
logger_1.logger.info(lines.join("\n\n"));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const clc = require("cli-color");
|
|
4
5
|
const { marked } = require("marked");
|
|
5
6
|
const TerminalRenderer = require("marked-terminal");
|
|
@@ -23,12 +24,13 @@ const manifest = require("../extensions/manifest");
|
|
|
23
24
|
marked.setOptions({
|
|
24
25
|
renderer: new TerminalRenderer(),
|
|
25
26
|
});
|
|
26
|
-
exports.
|
|
27
|
+
exports.command = new command_1.Command("ext:install [extensionName]")
|
|
27
28
|
.description("install an official extension if [extensionName] or [extensionName@version] is provided; " +
|
|
28
29
|
(previews_1.previews.extdev
|
|
29
30
|
? "install a local extension if [localPathOrUrl] or [url#root] is provided; install a published extension (not authored by Firebase) if [publisherId/extensionId] is provided "
|
|
30
31
|
: "") +
|
|
31
32
|
"or run with `-i` to see all available extensions.")
|
|
33
|
+
.option("--local", "deprecated")
|
|
32
34
|
.withForce()
|
|
33
35
|
.before(requirePermissions_1.requirePermissions, ["firebaseextensions.instances.create"])
|
|
34
36
|
.before(extensionsHelper_1.ensureExtensionsApiEnabled)
|
|
@@ -55,6 +57,9 @@ exports.default = new command_1.Command("ext:install [extensionName]")
|
|
|
55
57
|
if ((0, extensionsHelper_1.isUrlPath)(extensionName)) {
|
|
56
58
|
throw new error_1.FirebaseError(`Installing with a source url is no longer supported in the CLI. Please use Firebase Console instead.`);
|
|
57
59
|
}
|
|
60
|
+
if (options.local) {
|
|
61
|
+
utils.logLabeledWarning(extensionsHelper_1.logPrefix, "As of firebase-tools@11.0.0, the `--local` flag is no longer required, as it is the default behavior.");
|
|
62
|
+
}
|
|
58
63
|
if ((0, extensionsHelper_1.isLocalPath)(extensionName)) {
|
|
59
64
|
source = await (0, extensionsHelper_1.createSourceFromLocation)((0, projectUtils_1.needProjectId)({ projectId }), extensionName);
|
|
60
65
|
(0, displayExtensionInfo_1.displayExtInfo)(extensionName, "", source.spec);
|
package/lib/commands/ext-list.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const checkMinRequiredVersion_1 = require("../checkMinRequiredVersion");
|
|
4
5
|
const command_1 = require("../command");
|
|
5
6
|
const projectUtils_1 = require("../projectUtils");
|
|
6
7
|
const listExtensions_1 = require("../extensions/listExtensions");
|
|
7
8
|
const extensionsHelper_1 = require("../extensions/extensionsHelper");
|
|
8
9
|
const requirePermissions_1 = require("../requirePermissions");
|
|
9
|
-
|
|
10
|
+
exports.command = new command_1.Command("ext:list")
|
|
10
11
|
.description("list all the extensions that are installed in your Firebase project")
|
|
11
12
|
.before(requirePermissions_1.requirePermissions, ["firebaseextensions.instances.list"])
|
|
12
13
|
.before(extensionsHelper_1.ensureExtensionsApiEnabled)
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const checkMinRequiredVersion_1 = require("../checkMinRequiredVersion");
|
|
4
5
|
const command_1 = require("../command");
|
|
5
6
|
const projectUtils_1 = require("../projectUtils");
|
|
6
7
|
const logger_1 = require("../logger");
|
|
7
8
|
const extensionsHelper_1 = require("../extensions/extensionsHelper");
|
|
8
9
|
const requirePermissions_1 = require("../requirePermissions");
|
|
9
|
-
exports.
|
|
10
|
+
exports.command = new command_1.Command("ext:sources:create <sourceLocation>")
|
|
10
11
|
.description(`create a extension source from sourceLocation`)
|
|
11
12
|
.help("sourceLocation can be a local directory containing an extension, or URL pointing to a zipped extension. " +
|
|
12
13
|
'If using a URL, you can specify a root folder for the extension by adding "#<extensionRoot>". ' +
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const { marked } = require("marked");
|
|
4
5
|
const TerminalRenderer = require("marked-terminal");
|
|
5
6
|
const checkMinRequiredVersion_1 = require("../checkMinRequiredVersion");
|
|
6
7
|
const command_1 = require("../command");
|
|
7
8
|
const extensionsHelper_1 = require("../extensions/extensionsHelper");
|
|
8
9
|
const requirePermissions_1 = require("../requirePermissions");
|
|
10
|
+
const utils_1 = require("../utils");
|
|
9
11
|
const manifest = require("../extensions/manifest");
|
|
10
12
|
marked.setOptions({
|
|
11
13
|
renderer: new TerminalRenderer(),
|
|
12
14
|
});
|
|
13
|
-
exports.
|
|
15
|
+
exports.command = new command_1.Command("ext:uninstall <extensionInstanceId>")
|
|
14
16
|
.description("uninstall an extension that is installed in your Firebase project by instance ID")
|
|
17
|
+
.option("--local", "deprecated")
|
|
15
18
|
.withForce()
|
|
16
19
|
.before(requirePermissions_1.requirePermissions, ["firebaseextensions.instances.delete"])
|
|
17
20
|
.before(extensionsHelper_1.ensureExtensionsApiEnabled)
|
|
18
21
|
.before(checkMinRequiredVersion_1.checkMinRequiredVersion, "extMinVersion")
|
|
19
22
|
.before(extensionsHelper_1.diagnoseAndFixProject)
|
|
20
23
|
.action((instanceId, options) => {
|
|
24
|
+
if (options.local) {
|
|
25
|
+
(0, utils_1.logLabeledWarning)(extensionsHelper_1.logPrefix, "As of firebase-tools@11.0.0, the `--local` flag is no longer required, as it is the default behavior.");
|
|
26
|
+
}
|
|
21
27
|
const config = manifest.loadConfig(options);
|
|
22
28
|
manifest.removeFromManifest(instanceId, config);
|
|
23
29
|
manifest.showPostDeprecationNotice();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const clc = require("cli-color");
|
|
4
5
|
const { marked } = require("marked");
|
|
5
6
|
const TerminalRenderer = require("marked-terminal");
|
|
@@ -20,7 +21,7 @@ const askUserForEventsConfig = require("../extensions/askUserForEventsConfig");
|
|
|
20
21
|
marked.setOptions({
|
|
21
22
|
renderer: new TerminalRenderer(),
|
|
22
23
|
});
|
|
23
|
-
exports.
|
|
24
|
+
exports.command = new command_1.Command("ext:update <extensionInstanceId> [updateSource]")
|
|
24
25
|
.description(previews_1.previews.extdev
|
|
25
26
|
? "update an existing extension instance to the latest version or from a local or URL source"
|
|
26
27
|
: "update an existing extension instance to the latest version")
|
|
@@ -31,10 +32,14 @@ exports.default = new command_1.Command("ext:update <extensionInstanceId> [updat
|
|
|
31
32
|
.before(extensionsHelper_1.ensureExtensionsApiEnabled)
|
|
32
33
|
.before(checkMinRequiredVersion_1.checkMinRequiredVersion, "extMinVersion")
|
|
33
34
|
.before(extensionsHelper_1.diagnoseAndFixProject)
|
|
35
|
+
.option("--local", "deprecated")
|
|
34
36
|
.withForce()
|
|
35
37
|
.action(async (instanceId, updateSource, options) => {
|
|
36
38
|
const projectId = (0, projectUtils_1.getProjectId)(options);
|
|
37
39
|
const config = manifest.loadConfig(options);
|
|
40
|
+
if (options.local) {
|
|
41
|
+
utils.logLabeledWarning(extensionsHelper_1.logPrefix, "As of firebase-tools@11.0.0, the `--local` flag is no longer required, as it is the default behavior.");
|
|
42
|
+
}
|
|
38
43
|
const oldRefOrPath = manifest.getInstanceTarget(instanceId, config);
|
|
39
44
|
if ((0, extensionsHelper_1.isLocalPath)(oldRefOrPath)) {
|
|
40
45
|
throw new error_1.FirebaseError(`Updating an extension with local source is not neccessary. ` +
|
package/lib/commands/ext.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
exports.command = void 0;
|
|
4
4
|
const clc = require("cli-color");
|
|
5
5
|
const checkMinRequiredVersion_1 = require("../checkMinRequiredVersion");
|
|
6
6
|
const command_1 = require("../command");
|
|
@@ -10,7 +10,7 @@ const listExtensions_1 = require("../extensions/listExtensions");
|
|
|
10
10
|
const requirePermissions_1 = require("../requirePermissions");
|
|
11
11
|
const logger_1 = require("../logger");
|
|
12
12
|
const utils = require("../utils");
|
|
13
|
-
|
|
13
|
+
exports.command = new command_1.Command("ext")
|
|
14
14
|
.description("display information on how to use ext commands and extensions installed to your project")
|
|
15
15
|
.before(checkMinRequiredVersion_1.checkMinRequiredVersion, "extMinVersion")
|
|
16
16
|
.action(async (options) => {
|
|
@@ -24,11 +24,11 @@ module.exports = new command_1.Command("ext")
|
|
|
24
24
|
"ext:update",
|
|
25
25
|
"ext:uninstall",
|
|
26
26
|
];
|
|
27
|
-
|
|
27
|
+
for (const commandName of commandNames) {
|
|
28
28
|
const command = firebaseTools.getCommand(commandName);
|
|
29
29
|
logger_1.logger.info(clc.bold("\n" + command.name()));
|
|
30
30
|
command.outputHelp();
|
|
31
|
-
}
|
|
31
|
+
}
|
|
32
32
|
logger_1.logger.info();
|
|
33
33
|
try {
|
|
34
34
|
await (0, requirePermissions_1.requirePermissions)(options, ["firebaseextensions.instances.list"]);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const clc = require("cli-color");
|
|
4
5
|
const command_1 = require("../command");
|
|
5
6
|
const types_1 = require("../emulator/types");
|
|
@@ -45,7 +46,7 @@ function getConfirmationMessage(deleteOp, options) {
|
|
|
45
46
|
clc.cyan(options.project) +
|
|
46
47
|
". Are you sure?");
|
|
47
48
|
}
|
|
48
|
-
|
|
49
|
+
exports.command = new command_1.Command("firestore:delete [path]")
|
|
49
50
|
.description("Delete data from Cloud Firestore.")
|
|
50
51
|
.option("-r, --recursive", "Recursive. Delete all documents and subcollections at and under the " +
|
|
51
52
|
"specified level. May not be passed along with --shallow.")
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const command_1 = require("../command");
|
|
4
5
|
const clc = require("cli-color");
|
|
5
6
|
const fsi = require("../firestore/indexes");
|
|
@@ -7,7 +8,7 @@ const logger_1 = require("../logger");
|
|
|
7
8
|
const requirePermissions_1 = require("../requirePermissions");
|
|
8
9
|
const types_1 = require("../emulator/types");
|
|
9
10
|
const commandUtils_1 = require("../emulator/commandUtils");
|
|
10
|
-
|
|
11
|
+
exports.command = new command_1.Command("firestore:indexes")
|
|
11
12
|
.description("List indexes in your project's Cloud Firestore database.")
|
|
12
13
|
.option("--pretty", "Pretty print. When not specified the indexes are printed in the " +
|
|
13
14
|
"JSON specification format.")
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const clc = require("cli-color");
|
|
4
5
|
const command_1 = require("../command");
|
|
5
6
|
const error_1 = require("../error");
|
|
@@ -7,9 +8,9 @@ const logger_1 = require("../logger");
|
|
|
7
8
|
const projectUtils_1 = require("../projectUtils");
|
|
8
9
|
const requirePermissions_1 = require("../requirePermissions");
|
|
9
10
|
const functionsConfig = require("../functionsConfig");
|
|
10
|
-
const
|
|
11
|
+
const functionsConfigClone_1 = require("../functionsConfigClone");
|
|
11
12
|
const utils = require("../utils");
|
|
12
|
-
exports.
|
|
13
|
+
exports.command = new command_1.Command("functions:config:clone")
|
|
13
14
|
.description("clone environment config from another project")
|
|
14
15
|
.option("--from <projectId>", "the project from which to clone configuration")
|
|
15
16
|
.option("--only <keys>", "a comma-separated list of keys to clone")
|
|
@@ -46,7 +47,7 @@ exports.default = new command_1.Command("functions:config:clone")
|
|
|
46
47
|
else if (options.except) {
|
|
47
48
|
except = options.except.split(",");
|
|
48
49
|
}
|
|
49
|
-
await functionsConfigClone(options.from, projectId, only, except);
|
|
50
|
+
await (0, functionsConfigClone_1.functionsConfigClone)(options.from, projectId, only, except);
|
|
50
51
|
utils.logSuccess(`Cloned functions config from ${clc.bold(options.from)} into ${clc.bold(projectId)}`);
|
|
51
52
|
logger_1.logger.info(`\nPlease deploy your functions for the change to take effect by running ${clc.bold("firebase deploy --only functions")}\n`);
|
|
52
53
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const path = require("path");
|
|
4
5
|
const clc = require("cli-color");
|
|
5
6
|
const requireInteractive_1 = require("../requireInteractive");
|
|
@@ -69,7 +70,7 @@ function fromEntries(itr) {
|
|
|
69
70
|
}
|
|
70
71
|
return obj;
|
|
71
72
|
}
|
|
72
|
-
exports.
|
|
73
|
+
exports.command = new command_1.Command("functions:config:export")
|
|
73
74
|
.description("Export environment config as environment variables in dotenv format")
|
|
74
75
|
.before(requirePermissions_1.requirePermissions, [
|
|
75
76
|
"runtimeconfig.configs.list",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const lodash_1 = require("lodash");
|
|
4
5
|
const path_1 = require("path");
|
|
5
6
|
const command_1 = require("../command");
|
|
@@ -18,7 +19,7 @@ async function materialize(projectId, path) {
|
|
|
18
19
|
const query = parts.join(".");
|
|
19
20
|
return query ? (0, lodash_1.get)(result, query) : result;
|
|
20
21
|
}
|
|
21
|
-
exports.
|
|
22
|
+
exports.command = new command_1.Command("functions:config:get [path]")
|
|
22
23
|
.description("fetch environment config stored at the given path")
|
|
23
24
|
.before(requirePermissions_1.requirePermissions, [
|
|
24
25
|
"runtimeconfig.configs.list",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const clc = require("cli-color");
|
|
4
5
|
const command_1 = require("../command");
|
|
5
6
|
const error_1 = require("../error");
|
|
@@ -8,7 +9,7 @@ const projectUtils_1 = require("../projectUtils");
|
|
|
8
9
|
const requirePermissions_1 = require("../requirePermissions");
|
|
9
10
|
const functionsConfig = require("../functionsConfig");
|
|
10
11
|
const utils = require("../utils");
|
|
11
|
-
exports.
|
|
12
|
+
exports.command = new command_1.Command("functions:config:set [values...]")
|
|
12
13
|
.description("set environment config with key=value syntax")
|
|
13
14
|
.before(requirePermissions_1.requirePermissions, [
|
|
14
15
|
"runtimeconfig.configs.list",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const clc = require("cli-color");
|
|
4
5
|
const command_1 = require("../command");
|
|
5
6
|
const logger_1 = require("../logger");
|
|
@@ -9,7 +10,7 @@ const functionsConfig = require("../functionsConfig");
|
|
|
9
10
|
const runtimeconfig = require("../gcp/runtimeconfig");
|
|
10
11
|
const utils = require("../utils");
|
|
11
12
|
const error_1 = require("../error");
|
|
12
|
-
exports.
|
|
13
|
+
exports.command = new command_1.Command("functions:config:unset [keys...]")
|
|
13
14
|
.description("unset environment config at the specified path(s)")
|
|
14
15
|
.before(requirePermissions_1.requirePermissions, [
|
|
15
16
|
"runtimeconfig.configs.list",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.command = void 0;
|
|
3
4
|
const clc = require("cli-color");
|
|
4
5
|
const functionsConfig = require("../functionsConfig");
|
|
5
6
|
const command_1 = require("../command");
|
|
@@ -8,7 +9,6 @@ const projectUtils_1 = require("../projectUtils");
|
|
|
8
9
|
const prompt_1 = require("../prompt");
|
|
9
10
|
const functional_1 = require("../functional");
|
|
10
11
|
const requirePermissions_1 = require("../requirePermissions");
|
|
11
|
-
const ensure = require("../ensureApiEnabled");
|
|
12
12
|
const helper = require("../deploy/functions/functionsDeployHelper");
|
|
13
13
|
const utils = require("../utils");
|
|
14
14
|
const backend = require("../deploy/functions/backend");
|
|
@@ -17,7 +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
|
-
exports.
|
|
20
|
+
exports.command = new command_1.Command("functions:delete [filters...]")
|
|
21
21
|
.description("delete one or more Cloud Functions by name or group name.")
|
|
22
22
|
.option("--region <region>", "Specify region of the function to be deleted. " +
|
|
23
23
|
"If omitted, functions from all regions whose names match the filters will be deleted. ")
|
|
@@ -89,10 +89,5 @@ exports.default = new command_1.Command("functions:delete [filters...]")
|
|
|
89
89
|
exit: 1,
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
|
|
93
|
-
const arEnabled = await ensure.check((0, projectUtils_1.needProjectId)(options), "artifactregistry.googleapis.com", "functions", true);
|
|
94
|
-
if (!arEnabled) {
|
|
95
|
-
opts.ar = new containerCleaner.NoopArtifactRegistryCleaner();
|
|
96
|
-
}
|
|
97
|
-
await containerCleaner.cleanupBuildImages([], allEpToDelete, opts);
|
|
92
|
+
await containerCleaner.cleanupBuildImages([], allEpToDelete);
|
|
98
93
|
});
|