firebase-tools 9.23.3 → 10.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/lib/api.js +1 -1
  2. package/lib/apiv2.js +2 -2
  3. package/lib/appdistribution/client.js +1 -1
  4. package/lib/appdistribution/options-parser-util.js +1 -1
  5. package/lib/auth.js +2 -2
  6. package/lib/command.js +26 -26
  7. package/lib/commands/appdistribution-distribute.js +4 -4
  8. package/lib/commands/appdistribution-testers-add.js +2 -2
  9. package/lib/commands/appdistribution-testers-remove.js +2 -2
  10. package/lib/commands/apps-android-sha-create.js +2 -2
  11. package/lib/commands/apps-android-sha-delete.js +2 -2
  12. package/lib/commands/apps-android-sha-list.js +2 -2
  13. package/lib/commands/apps-create.js +9 -9
  14. package/lib/commands/apps-list.js +3 -3
  15. package/lib/commands/apps-sdkconfig.js +8 -8
  16. package/lib/commands/database-get.js +1 -1
  17. package/lib/commands/database-instances-create.js +4 -4
  18. package/lib/commands/database-instances-list.js +4 -4
  19. package/lib/commands/database-profile.js +1 -1
  20. package/lib/commands/database-push.js +1 -1
  21. package/lib/commands/database-remove.js +4 -4
  22. package/lib/commands/database-set.js +4 -4
  23. package/lib/commands/database-settings-get.js +1 -1
  24. package/lib/commands/database-settings-set.js +1 -1
  25. package/lib/commands/database-update.js +4 -4
  26. package/lib/commands/ext-configure.js +2 -2
  27. package/lib/commands/ext-dev-deprecate.js +4 -4
  28. package/lib/commands/ext-dev-extension-delete.js +3 -3
  29. package/lib/commands/ext-dev-init.js +3 -3
  30. package/lib/commands/ext-dev-list.js +1 -1
  31. package/lib/commands/ext-dev-publish.js +3 -3
  32. package/lib/commands/ext-dev-register.js +5 -5
  33. package/lib/commands/ext-dev-undeprecate.js +4 -4
  34. package/lib/commands/ext-dev-unpublish.js +3 -3
  35. package/lib/commands/ext-dev-usage.js +145 -0
  36. package/lib/commands/ext-export.js +8 -8
  37. package/lib/commands/ext-info.js +4 -4
  38. package/lib/commands/ext-install.js +26 -22
  39. package/lib/commands/ext-list.js +2 -2
  40. package/lib/commands/ext-sources-create.js +2 -2
  41. package/lib/commands/ext-uninstall.js +3 -3
  42. package/lib/commands/ext-update.js +17 -17
  43. package/lib/commands/ext.js +3 -3
  44. package/lib/commands/firestore-delete.js +3 -3
  45. package/lib/commands/functions-config-export.js +11 -11
  46. package/lib/commands/functions-delete.js +3 -3
  47. package/lib/commands/functions-deletegcfartifacts.js +4 -4
  48. package/lib/commands/functions-list.js +1 -1
  49. package/lib/commands/functions-log.js +1 -1
  50. package/lib/commands/hosting-channel-create.js +12 -12
  51. package/lib/commands/hosting-channel-delete.js +9 -9
  52. package/lib/commands/hosting-channel-deploy.js +17 -17
  53. package/lib/commands/hosting-channel-list.js +5 -5
  54. package/lib/commands/hosting-channel-open.js +9 -9
  55. package/lib/commands/hosting-clone.js +15 -15
  56. package/lib/commands/hosting-disable.js +4 -4
  57. package/lib/commands/hosting-sites-create.js +7 -7
  58. package/lib/commands/hosting-sites-delete.js +7 -7
  59. package/lib/commands/hosting-sites-get.js +2 -2
  60. package/lib/commands/hosting-sites-list.js +3 -3
  61. package/lib/commands/index.js +1 -0
  62. package/lib/commands/login.js +2 -2
  63. package/lib/commands/logout.js +1 -1
  64. package/lib/commands/open.js +1 -1
  65. package/lib/commands/projects-addfirebase.js +2 -2
  66. package/lib/commands/projects-create.js +2 -2
  67. package/lib/commands/projects-list.js +1 -1
  68. package/lib/commands/remoteconfig-get.js +3 -3
  69. package/lib/commands/remoteconfig-rollback.js +3 -3
  70. package/lib/commands/remoteconfig-versions-list.js +1 -1
  71. package/lib/commands/setup-emulators-storage.js +1 -1
  72. package/lib/config.js +6 -6
  73. package/lib/database/api.js +2 -2
  74. package/lib/deploy/extensions/deploy.js +4 -4
  75. package/lib/deploy/extensions/deploymentSummary.js +5 -4
  76. package/lib/deploy/extensions/index.js +1 -0
  77. package/lib/deploy/extensions/params.js +1 -1
  78. package/lib/deploy/extensions/planner.js +3 -3
  79. package/lib/deploy/extensions/prepare.js +9 -9
  80. package/lib/deploy/extensions/release.js +1 -1
  81. package/lib/deploy/extensions/secrets.js +7 -7
  82. package/lib/deploy/extensions/validate.js +2 -2
  83. package/lib/deploy/functions/backend.js +6 -4
  84. package/lib/deploy/functions/checkIam.js +7 -7
  85. package/lib/deploy/functions/containerCleaner.js +3 -3
  86. package/lib/deploy/functions/deploy.js +10 -11
  87. package/lib/deploy/functions/ensureCloudBuildEnabled.js +3 -3
  88. package/lib/deploy/functions/index.js +1 -0
  89. package/lib/deploy/functions/prepare.js +27 -21
  90. package/lib/deploy/functions/prompts.js +5 -5
  91. package/lib/deploy/functions/release/executor.js +4 -1
  92. package/lib/deploy/functions/release/fabricator.js +5 -5
  93. package/lib/deploy/functions/release/index.js +3 -3
  94. package/lib/deploy/functions/release/planner.js +6 -6
  95. package/lib/deploy/functions/release/reporter.js +8 -4
  96. package/lib/deploy/functions/runtimes/discovery/index.js +2 -2
  97. package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +14 -14
  98. package/lib/deploy/functions/runtimes/golang/index.js +9 -13
  99. package/lib/deploy/functions/runtimes/index.js +6 -10
  100. package/lib/deploy/functions/runtimes/node/index.js +6 -10
  101. package/lib/deploy/functions/runtimes/node/parseRuntimeAndValidateSDK.js +1 -1
  102. package/lib/deploy/functions/runtimes/node/parseTriggers.js +3 -3
  103. package/lib/deploy/functions/runtimes/node/validate.js +2 -1
  104. package/lib/deploy/functions/services/storage.js +1 -1
  105. package/lib/deploy/functions/triggerRegionHelper.js +1 -1
  106. package/lib/deploy/functions/validate.js +4 -3
  107. package/lib/deploy/hosting/deploy.js +7 -7
  108. package/lib/deploy/hosting/uploader.js +1 -1
  109. package/lib/deploy/hosting/validate.js +3 -3
  110. package/lib/deploy/remoteconfig/prepare.js +3 -3
  111. package/lib/deploy/remoteconfig/release.js +3 -3
  112. package/lib/deploy/storage/deploy.js +1 -1
  113. package/lib/deploy/storage/release.js +2 -2
  114. package/lib/detectProjectRoot.js +5 -5
  115. package/lib/emulator/auth/apiSpec.js +13 -7
  116. package/lib/emulator/auth/handlers.js +3 -3
  117. package/lib/emulator/auth/index.js +1 -1
  118. package/lib/emulator/auth/operations.js +256 -248
  119. package/lib/emulator/auth/server.js +11 -8
  120. package/lib/emulator/auth/state.js +12 -12
  121. package/lib/emulator/commandUtils.js +5 -5
  122. package/lib/emulator/controller.js +16 -11
  123. package/lib/emulator/downloadableEmulators.js +2 -2
  124. package/lib/emulator/emulatorLogger.js +1 -1
  125. package/lib/emulator/functionsEmulator.js +101 -74
  126. package/lib/emulator/functionsEmulatorRuntime.js +33 -18
  127. package/lib/emulator/functionsEmulatorShell.js +3 -2
  128. package/lib/emulator/functionsRuntimeWorker.js +1 -1
  129. package/lib/emulator/hubExport.js +2 -2
  130. package/lib/emulator/storage/apis/firebase.js +2 -2
  131. package/lib/emulator/storage/apis/gcloud.js +2 -2
  132. package/lib/emulator/storage/cloudFunctions.js +1 -1
  133. package/lib/emulator/storage/files.js +14 -14
  134. package/lib/emulator/storage/index.js +2 -2
  135. package/lib/emulator/storage/metadata.js +7 -6
  136. package/lib/emulator/storage/rules/runtime.js +5 -5
  137. package/lib/emulator/storage/server.js +2 -2
  138. package/lib/ensureApiEnabled.js +7 -7
  139. package/lib/error.js +3 -3
  140. package/lib/extensions/askUserForConsent.js +2 -3
  141. package/lib/extensions/askUserForParam.js +10 -10
  142. package/lib/extensions/billingMigrationHelper.js +1 -1
  143. package/lib/extensions/changelog.js +3 -3
  144. package/lib/extensions/displayExtensionInfo.js +5 -5
  145. package/lib/extensions/emulator/optionsHelper.js +1 -1
  146. package/lib/extensions/emulator/specHelper.js +1 -1
  147. package/lib/extensions/emulator/triggerHelper.js +1 -1
  148. package/lib/extensions/export.js +6 -6
  149. package/lib/extensions/extensionsApi.js +14 -1
  150. package/lib/extensions/extensionsHelper.js +38 -29
  151. package/lib/extensions/listExtensions.js +1 -1
  152. package/lib/extensions/localHelper.js +1 -1
  153. package/lib/extensions/metricsTypeDef.js +2 -0
  154. package/lib/extensions/metricsUtils.js +98 -0
  155. package/lib/extensions/paramHelper.js +6 -6
  156. package/lib/extensions/provisioningHelper.js +6 -4
  157. package/lib/extensions/resolveSource.js +1 -1
  158. package/lib/extensions/secretsUtils.js +3 -3
  159. package/lib/extensions/updateHelper.js +9 -9
  160. package/lib/extensions/utils.js +1 -1
  161. package/lib/extensions/warnings.js +10 -9
  162. package/lib/fetchWebSetup.js +2 -2
  163. package/lib/filterTargets.js +2 -2
  164. package/lib/firestore/indexes.js +2 -2
  165. package/lib/fsAsync.js +3 -3
  166. package/lib/fsutils.js +2 -2
  167. package/lib/functional.js +2 -1
  168. package/lib/functions/env.js +1 -1
  169. package/lib/functions/runtimeConfigExport.js +4 -4
  170. package/lib/functionsConfig.js +3 -3
  171. package/lib/functionsShellCommandAction.js +4 -3
  172. package/lib/gcp/cloudmonitoring.js +74 -0
  173. package/lib/gcp/cloudscheduler.js +1 -1
  174. package/lib/gcp/iam.js +2 -2
  175. package/lib/gcp/resourceManager.js +2 -2
  176. package/lib/gcp/secretManager.js +3 -2
  177. package/lib/getDefaultDatabaseInstance.js +1 -1
  178. package/lib/getDefaultHostingSite.js +1 -1
  179. package/lib/getProjectNumber.js +2 -2
  180. package/lib/handlePreviewToggles.js +5 -5
  181. package/lib/hosting/api.js +6 -6
  182. package/lib/hosting/cloudRunProxy.js +6 -6
  183. package/lib/hosting/functionsProxy.js +3 -3
  184. package/lib/hosting/implicitInit.js +2 -2
  185. package/lib/hosting/normalizedHostingConfigs.js +3 -3
  186. package/lib/hosting/proxy.js +2 -2
  187. package/lib/init/features/account.js +7 -7
  188. package/lib/init/features/database.js +9 -9
  189. package/lib/init/features/emulators.js +8 -8
  190. package/lib/init/features/firestore/index.js +3 -3
  191. package/lib/init/features/firestore/indexes.js +2 -2
  192. package/lib/init/features/firestore/rules.js +2 -2
  193. package/lib/init/features/functions/golang.js +4 -4
  194. package/lib/init/features/functions/index.js +4 -4
  195. package/lib/init/features/hosting/github.js +31 -31
  196. package/lib/init/features/project.js +8 -8
  197. package/lib/init/features/remoteconfig.js +2 -2
  198. package/lib/init/features/storage.js +2 -2
  199. package/lib/listFiles.js +1 -1
  200. package/lib/management/apps.js +3 -3
  201. package/lib/management/projects.js +6 -6
  202. package/lib/previews.js +2 -2
  203. package/lib/profiler.js +1 -1
  204. package/lib/projectPath.js +1 -1
  205. package/lib/projectUtils.js +1 -1
  206. package/lib/prompt.js +0 -1
  207. package/lib/rc.js +1 -1
  208. package/lib/requireAuth.js +2 -2
  209. package/lib/requireDatabaseInstance.js +1 -1
  210. package/lib/requireHostingSite.js +1 -1
  211. package/lib/requirePermissions.js +4 -4
  212. package/lib/rulesDeploy.js +2 -2
  213. package/lib/serve/functions.js +14 -7
  214. package/lib/serve/hosting.js +7 -7
  215. package/lib/utils.js +3 -2
  216. package/npm-shrinkwrap.json +24889 -0
  217. package/package.json +24 -24
  218. package/templates/init/functions/javascript/package.lint.json +1 -1
  219. package/templates/init/functions/javascript/package.nolint.json +1 -1
  220. package/templates/init/functions/typescript/package.lint.json +1 -1
  221. package/templates/init/functions/typescript/package.nolint.json +1 -1
  222. package/templates/init/hosting/index.html +1 -1
  223. package/CHANGELOG.md +0 -1
@@ -28,9 +28,9 @@ exports.default = new command_1.Command("hosting:clone <source> <targetChannel>"
28
28
  if (!targetSiteId || !targetChannelId) {
29
29
  throw new error_1.FirebaseError(`"${targetChannel}" is not a valid target channel. Must be in the form "<site>:<channel>" (to clone to the active website, use "live" as the channel).`);
30
30
  }
31
- targetChannelId = api_1.normalizeName(targetChannelId);
31
+ targetChannelId = (0, api_1.normalizeName)(targetChannelId);
32
32
  if (sourceChannelId) {
33
- sourceChannelId = api_1.normalizeName(sourceChannelId);
33
+ sourceChannelId = (0, api_1.normalizeName)(sourceChannelId);
34
34
  }
35
35
  const equalSiteIds = sourceSiteId == targetSiteId;
36
36
  const equalChannelIds = sourceChannelId == targetChannelId;
@@ -38,28 +38,28 @@ exports.default = new command_1.Command("hosting:clone <source> <targetChannel>"
38
38
  throw new error_1.FirebaseError(`Source and destination cannot be equal. Please pick a different source or desination.`);
39
39
  }
40
40
  if (!sourceVersionName) {
41
- const sChannel = await api_1.getChannel("-", sourceSiteId, sourceChannelId);
41
+ const sChannel = await (0, api_1.getChannel)("-", sourceSiteId, sourceChannelId);
42
42
  if (!sChannel) {
43
- throw new error_1.FirebaseError(`Could not find the channel ${cli_color_1.bold(sourceChannelId)} for site ${cli_color_1.bold(sourceSiteId)}.`);
43
+ throw new error_1.FirebaseError(`Could not find the channel ${(0, cli_color_1.bold)(sourceChannelId)} for site ${(0, cli_color_1.bold)(sourceSiteId)}.`);
44
44
  }
45
45
  sourceVersionName = (_b = (_a = sChannel.release) === null || _a === void 0 ? void 0 : _a.version) === null || _b === void 0 ? void 0 : _b.name;
46
46
  if (!sourceVersionName) {
47
- throw new error_1.FirebaseError(`Could not find a version on the channel ${cli_color_1.bold(sourceChannelId)} for site ${cli_color_1.bold(sourceSiteId)}.`);
47
+ throw new error_1.FirebaseError(`Could not find a version on the channel ${(0, cli_color_1.bold)(sourceChannelId)} for site ${(0, cli_color_1.bold)(sourceSiteId)}.`);
48
48
  }
49
49
  }
50
- let tChannel = await api_1.getChannel("-", targetSiteId, targetChannelId);
50
+ let tChannel = await (0, api_1.getChannel)("-", targetSiteId, targetChannelId);
51
51
  if (!tChannel) {
52
- utils.logBullet(`could not find channel ${cli_color_1.bold(targetChannelId)} in site ${cli_color_1.bold(targetSiteId)}, creating it...`);
52
+ utils.logBullet(`could not find channel ${(0, cli_color_1.bold)(targetChannelId)} in site ${(0, cli_color_1.bold)(targetSiteId)}, creating it...`);
53
53
  try {
54
- tChannel = await api_1.createChannel("-", targetSiteId, targetChannelId);
54
+ tChannel = await (0, api_1.createChannel)("-", targetSiteId, targetChannelId);
55
55
  }
56
56
  catch (e) {
57
- throw new error_1.FirebaseError(`Could not create the channel ${cli_color_1.bold(targetChannelId)} for site ${cli_color_1.bold(targetSiteId)}.`, { original: e });
57
+ throw new error_1.FirebaseError(`Could not create the channel ${(0, cli_color_1.bold)(targetChannelId)} for site ${(0, cli_color_1.bold)(targetSiteId)}.`, { original: e });
58
58
  }
59
59
  utils.logSuccess(`Created new channel ${targetChannelId}`);
60
60
  try {
61
61
  const tProjectId = parseProjectId(tChannel.name);
62
- await api_1.addAuthDomains(tProjectId, [tChannel.url]);
62
+ await (0, api_1.addAuthDomains)(tProjectId, [tChannel.url]);
63
63
  }
64
64
  catch (e) {
65
65
  utils.logLabeledWarning("hosting:clone", marked(`Unable to add channel domain to Firebase Auth. Visit the Firebase Console at ${utils.consoleUrl(targetSiteId, "/authentication/providers")}`));
@@ -68,27 +68,27 @@ exports.default = new command_1.Command("hosting:clone <source> <targetChannel>"
68
68
  }
69
69
  const currentTargetVersionName = (_d = (_c = tChannel.release) === null || _c === void 0 ? void 0 : _c.version) === null || _d === void 0 ? void 0 : _d.name;
70
70
  if (equalSiteIds && sourceVersionName == currentTargetVersionName) {
71
- utils.logSuccess(`Channels ${cli_color_1.bold(sourceChannelId)} and ${cli_color_1.bold(targetChannel)} are serving identical versions. No need to clone.`);
71
+ utils.logSuccess(`Channels ${(0, cli_color_1.bold)(sourceChannelId)} and ${(0, cli_color_1.bold)(targetChannel)} are serving identical versions. No need to clone.`);
72
72
  return;
73
73
  }
74
74
  let targetVersionName = sourceVersionName;
75
75
  const spinner = ora("Cloning site content...").start();
76
76
  try {
77
77
  if (!equalSiteIds) {
78
- const targetVersion = await api_1.cloneVersion(targetSiteId, sourceVersionName, true);
78
+ const targetVersion = await (0, api_1.cloneVersion)(targetSiteId, sourceVersionName, true);
79
79
  if (!targetVersion) {
80
- throw new error_1.FirebaseError(`Could not clone the version ${cli_color_1.bold(sourceVersion)} for site ${cli_color_1.bold(targetSiteId)}.`);
80
+ throw new error_1.FirebaseError(`Could not clone the version ${(0, cli_color_1.bold)(sourceVersion)} for site ${(0, cli_color_1.bold)(targetSiteId)}.`);
81
81
  }
82
82
  targetVersionName = targetVersion.name;
83
83
  }
84
- await api_1.createRelease(targetSiteId, targetChannelId, targetVersionName);
84
+ await (0, api_1.createRelease)(targetSiteId, targetChannelId, targetVersionName);
85
85
  }
86
86
  catch (err) {
87
87
  spinner.fail();
88
88
  throw err;
89
89
  }
90
90
  spinner.succeed();
91
- utils.logSuccess(`Site ${cli_color_1.bold(sourceSiteId)} ${sourceChannelId ? "channel" : "version"} ${cli_color_1.bold(sourceChannelId || sourceVersion)} has been cloned to site ${cli_color_1.bold(targetSiteId)} channel ${cli_color_1.bold(targetChannelId)}.`);
91
+ utils.logSuccess(`Site ${(0, cli_color_1.bold)(sourceSiteId)} ${sourceChannelId ? "channel" : "version"} ${(0, cli_color_1.bold)(sourceChannelId || sourceVersion)} has been cloned to site ${(0, cli_color_1.bold)(targetSiteId)} channel ${(0, cli_color_1.bold)(targetChannelId)}.`);
92
92
  utils.logSuccess(`Channel URL (${targetChannelId}): ${tChannel.url}`);
93
93
  });
94
94
  function parseProjectId(name) {
@@ -10,17 +10,17 @@ const requirePermissions_1 = require("../requirePermissions");
10
10
  const utils = require("../utils");
11
11
  exports.default = new command_1.Command("hosting:disable")
12
12
  .description("stop serving web traffic to your Firebase Hosting site")
13
- .option("-y, --confirm", "skip confirmation")
13
+ .option("-f, --force", "skip confirmation")
14
14
  .option("-s, --site <siteName>", "the site to disable")
15
15
  .before(requirePermissions_1.requirePermissions, ["firebasehosting.sites.update"])
16
16
  .before(requireHostingSite_1.requireHostingSite)
17
17
  .action(async (options) => {
18
18
  const siteToDisable = options.site;
19
- const confirm = await prompt_1.promptOnce({
19
+ const confirm = await (0, prompt_1.promptOnce)({
20
20
  type: "confirm",
21
- name: "confirm",
21
+ name: "force",
22
22
  message: `Are you sure you want to disable Firebase Hosting for the site ${clc.underline(siteToDisable)}\n${clc.underline("This will immediately make your site inaccessible!")}`,
23
- });
23
+ }, options);
24
24
  if (!confirm) {
25
25
  return;
26
26
  }
@@ -15,13 +15,13 @@ exports.default = new command_1.Command("hosting:sites:create [siteId]")
15
15
  .option("--app <appId>", "specify an existing Firebase Web App ID")
16
16
  .before(requirePermissions_1.requirePermissions, ["firebasehosting.sites.update"])
17
17
  .action(async (siteId, options) => {
18
- const projectId = projectUtils_1.needProjectId(options);
18
+ const projectId = (0, projectUtils_1.needProjectId)(options);
19
19
  const appId = options.app;
20
20
  if (!siteId) {
21
21
  if (options.nonInteractive) {
22
22
  throw new error_1.FirebaseError(`"siteId" argument must be provided in a non-interactive environment`);
23
23
  }
24
- siteId = await prompt_1.promptOnce({
24
+ siteId = await (0, prompt_1.promptOnce)({
25
25
  type: "input",
26
26
  message: "Please provide an unique, URL-friendly id for the site (<id>.web.app):",
27
27
  validate: (s) => s.length > 0,
@@ -32,20 +32,20 @@ exports.default = new command_1.Command("hosting:sites:create [siteId]")
32
32
  }
33
33
  let site;
34
34
  try {
35
- site = await api_1.createSite(projectId, siteId, appId);
35
+ site = await (0, api_1.createSite)(projectId, siteId, appId);
36
36
  }
37
37
  catch (e) {
38
38
  if (e.status === 409) {
39
- throw new error_1.FirebaseError(`Site ${cli_color_1.bold(siteId)} already exists in project ${cli_color_1.bold(projectId)}.`, { original: e });
39
+ throw new error_1.FirebaseError(`Site ${(0, cli_color_1.bold)(siteId)} already exists in project ${(0, cli_color_1.bold)(projectId)}.`, { original: e });
40
40
  }
41
41
  throw e;
42
42
  }
43
43
  logger_1.logger.info();
44
- utils_1.logLabeledSuccess(LOG_TAG, `Site ${cli_color_1.bold(siteId)} has been created in project ${cli_color_1.bold(projectId)}.`);
44
+ (0, utils_1.logLabeledSuccess)(LOG_TAG, `Site ${(0, cli_color_1.bold)(siteId)} has been created in project ${(0, cli_color_1.bold)(projectId)}.`);
45
45
  if (appId) {
46
- utils_1.logLabeledSuccess(LOG_TAG, `Site ${cli_color_1.bold(siteId)} has been linked to web app ${cli_color_1.bold(appId)}`);
46
+ (0, utils_1.logLabeledSuccess)(LOG_TAG, `Site ${(0, cli_color_1.bold)(siteId)} has been linked to web app ${(0, cli_color_1.bold)(appId)}`);
47
47
  }
48
- utils_1.logLabeledSuccess(LOG_TAG, `Site URL: ${site.defaultUrl}`);
48
+ (0, utils_1.logLabeledSuccess)(LOG_TAG, `Site URL: ${site.defaultUrl}`);
49
49
  logger_1.logger.info();
50
50
  logger_1.logger.info(`To deploy to this site, follow the guide at https://firebase.google.com/docs/hosting/multisites.`);
51
51
  return site;
@@ -17,22 +17,22 @@ exports.default = new command_1.Command("hosting:sites:delete <siteId>")
17
17
  .before(requireConfig)
18
18
  .before(requirePermissions_1.requirePermissions, ["firebasehosting.sites.delete"])
19
19
  .action(async (siteId, options) => {
20
- const projectId = projectUtils_1.needProjectId(options);
20
+ const projectId = (0, projectUtils_1.needProjectId)(options);
21
21
  if (!siteId) {
22
22
  throw new error_1.FirebaseError("siteId is required");
23
23
  }
24
- 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 ${cli_color_1.underline(siteId)} cannot be reactivated by you or anyone else.`);
24
+ 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, cli_color_1.underline)(siteId)} cannot be reactivated by you or anyone else.`);
25
25
  logger_1.logger.info();
26
- const confirmed = await prompt_1.promptOnce({
26
+ const confirmed = await (0, prompt_1.promptOnce)({
27
27
  name: "force",
28
28
  type: "confirm",
29
- message: `Are you sure you want to delete the Hosting site ${cli_color_1.underline(siteId)} for project ${cli_color_1.underline(projectId)}? `,
29
+ message: `Are you sure you want to delete the Hosting site ${(0, cli_color_1.underline)(siteId)} for project ${(0, cli_color_1.underline)(projectId)}? `,
30
30
  default: false,
31
31
  }, options);
32
32
  if (!confirmed) {
33
33
  return;
34
34
  }
35
- await api_1.getSite(projectId, siteId);
36
- await api_1.deleteSite(projectId, siteId);
37
- utils_1.logLabeledSuccess(LOG_TAG, `Successfully deleted site ${cli_color_1.bold(siteId)} from project ${cli_color_1.bold(projectId)}`);
35
+ await (0, api_1.getSite)(projectId, siteId);
36
+ await (0, api_1.deleteSite)(projectId, siteId);
37
+ (0, utils_1.logLabeledSuccess)(LOG_TAG, `Successfully deleted site ${(0, cli_color_1.bold)(siteId)} from project ${(0, cli_color_1.bold)(projectId)}`);
38
38
  });
@@ -11,11 +11,11 @@ exports.default = new command_1.Command("hosting:sites:get <siteId>")
11
11
  .description("print info about a Firebase Hosting site")
12
12
  .before(requirePermissions_1.requirePermissions, ["firebasehosting.sites.get"])
13
13
  .action(async (siteId, options) => {
14
- const projectId = projectUtils_1.needProjectId(options);
14
+ const projectId = (0, projectUtils_1.needProjectId)(options);
15
15
  if (!siteId) {
16
16
  throw new error_1.FirebaseError("<siteId> must be specified");
17
17
  }
18
- const site = await api_1.getSite(projectId, siteId);
18
+ const site = await (0, api_1.getSite)(projectId, siteId);
19
19
  const table = new Table();
20
20
  table.push(["Site ID:", site.name.split("/").pop()]);
21
21
  table.push(["Default URL:", site.defaultUrl]);
@@ -12,15 +12,15 @@ exports.default = new command_1.Command("hosting:sites:list")
12
12
  .description("list Firebase Hosting sites")
13
13
  .before(requirePermissions_1.requirePermissions, ["firebasehosting.sites.get"])
14
14
  .action(async (options) => {
15
- const projectId = projectUtils_1.needProjectId(options);
16
- const sites = await api_1.listSites(projectId);
15
+ const projectId = (0, projectUtils_1.needProjectId)(options);
16
+ const sites = await (0, api_1.listSites)(projectId);
17
17
  const table = new Table({ head: TABLE_HEAD, style: { head: ["green"] } });
18
18
  for (const site of sites) {
19
19
  const siteId = site.name.split("/").pop();
20
20
  table.push([siteId, site.defaultUrl, site.appId || "--"]);
21
21
  }
22
22
  logger_1.logger.info();
23
- logger_1.logger.info(`Sites for project ${cli_color_1.bold(projectId)}`);
23
+ logger_1.logger.info(`Sites for project ${(0, cli_color_1.bold)(projectId)}`);
24
24
  logger_1.logger.info();
25
25
  logger_1.logger.info(table.toString());
26
26
  return { sites };
@@ -83,6 +83,7 @@ module.exports = function (client) {
83
83
  client.ext.dev.unpublish = loadCommand("ext-dev-unpublish");
84
84
  client.ext.dev.publish = loadCommand("ext-dev-publish");
85
85
  client.ext.dev.delete = loadCommand("ext-dev-extension-delete");
86
+ client.ext.dev.usage = loadCommand("ext-dev-usage");
86
87
  }
87
88
  client.firestore = {};
88
89
  client.firestore.delete = loadCommand("firestore-delete");
@@ -28,7 +28,7 @@ module.exports = new command_1.Command("login")
28
28
  }
29
29
  if (!options.reauth) {
30
30
  utils.logBullet("Firebase optionally collects CLI usage and error reporting information to help improve our products. Data is collected in accordance with Google's privacy policy (https://policies.google.com/privacy) and is not used to identify you.\n");
31
- const collectUsage = await prompt_1.promptOnce({
31
+ const collectUsage = await (0, prompt_1.promptOnce)({
32
32
  type: "confirm",
33
33
  name: "collectUsage",
34
34
  message: "Allow Firebase to collect CLI usage and error reporting information?",
@@ -38,7 +38,7 @@ module.exports = new command_1.Command("login")
38
38
  utils.logBullet("To change your data collection preference at any time, run `firebase logout` and log in again.");
39
39
  }
40
40
  }
41
- const useLocalhost = utils_1.isCloudEnvironment() ? false : options.localhost;
41
+ const useLocalhost = (0, utils_1.isCloudEnvironment)() ? false : options.localhost;
42
42
  const result = await auth.loginGoogle(useLocalhost, _.get(user, "email"));
43
43
  configstore_1.configstore.set("user", result.user);
44
44
  configstore_1.configstore.set("tokens", result.tokens);
@@ -38,7 +38,7 @@ module.exports = new command_1.Command("logout [email]")
38
38
  value: a,
39
39
  };
40
40
  });
41
- newDefaultAccount = await prompt_1.promptOnce({
41
+ newDefaultAccount = await (0, prompt_1.promptOnce)({
42
42
  type: "list",
43
43
  message: "You are logging out of your default account, which account should become the new default?",
44
44
  choices,
@@ -52,7 +52,7 @@ exports.default = new command_1.Command("open [link]")
52
52
  throw new error_1.FirebaseError("Unrecognized link name. Valid links are:\n\n" + _.map(LINKS, "arg").join("\n"));
53
53
  }
54
54
  if (!link) {
55
- const name = await prompt_1.promptOnce({
55
+ const name = await (0, prompt_1.promptOnce)({
56
56
  type: "list",
57
57
  message: "What link would you like to open?",
58
58
  choices: CHOICES,
@@ -9,10 +9,10 @@ module.exports = new command_1.Command("projects:addfirebase [projectId]")
9
9
  .before(requireAuth_1.requireAuth)
10
10
  .action(async (projectId, options) => {
11
11
  if (!options.nonInteractive && !projectId) {
12
- projectId = await projects_1.promptAvailableProjectId();
12
+ projectId = await (0, projects_1.promptAvailableProjectId)();
13
13
  }
14
14
  if (!projectId) {
15
15
  throw new error_1.FirebaseError("Project ID cannot be empty");
16
16
  }
17
- return projects_1.addFirebaseToCloudProjectAndLog(projectId);
17
+ return (0, projects_1.addFirebaseToCloudProjectAndLog)(projectId);
18
18
  });
@@ -17,7 +17,7 @@ module.exports = new command_1.Command("projects:create [projectId]")
17
17
  throw new error_1.FirebaseError("Invalid argument, please provide only one type of project parent (organization or folder)");
18
18
  }
19
19
  if (!options.nonInteractive) {
20
- await prompt_1.prompt(options, projects_1.PROJECTS_CREATE_QUESTIONS);
20
+ await (0, prompt_1.prompt)(options, projects_1.PROJECTS_CREATE_QUESTIONS);
21
21
  }
22
22
  if (!options.projectId) {
23
23
  throw new error_1.FirebaseError("Project ID cannot be empty");
@@ -29,7 +29,7 @@ module.exports = new command_1.Command("projects:create [projectId]")
29
29
  else if (options.folder) {
30
30
  parentResource = { type: projects_1.ProjectParentResourceType.FOLDER, id: options.folder };
31
31
  }
32
- return projects_1.createFirebaseProjectAndLog(options.projectId, {
32
+ return (0, projects_1.createFirebaseProjectAndLog)(options.projectId, {
33
33
  displayName: options.displayName,
34
34
  parentResource,
35
35
  });
@@ -47,7 +47,7 @@ module.exports = new command_1.Command("projects:list")
47
47
  const spinner = ora("Preparing the list of your Firebase projects").start();
48
48
  let projects;
49
49
  try {
50
- projects = await projects_1.listFirebaseProjects();
50
+ projects = await (0, projects_1.listFirebaseProjects)();
51
51
  }
52
52
  catch (err) {
53
53
  spinner.fail();
@@ -28,7 +28,7 @@ module.exports = new command_1.Command("remoteconfig:get")
28
28
  .before(requirePermissions_1.requirePermissions, ["cloudconfig.configs.get"])
29
29
  .action(async (options) => {
30
30
  utils.assertIsStringOrUndefined(options.versionNumber);
31
- const template = await rcGet.getTemplate(projectUtils_1.needProjectId(options), checkValidOptionalNumber(options.versionNumber));
31
+ const template = await rcGet.getTemplate((0, projectUtils_1.needProjectId)(options), checkValidOptionalNumber(options.versionNumber));
32
32
  const table = new Table({ head: tableHead, style: { head: ["green"] } });
33
33
  if (template.conditions) {
34
34
  let updatedConditions = template.conditions
@@ -40,9 +40,9 @@ module.exports = new command_1.Command("remoteconfig:get")
40
40
  }
41
41
  table.push(["conditions", updatedConditions]);
42
42
  }
43
- const updatedParameters = get_1.parseTemplateForTable(template.parameters);
43
+ const updatedParameters = (0, get_1.parseTemplateForTable)(template.parameters);
44
44
  table.push(["parameters", updatedParameters]);
45
- const updatedParameterGroups = get_1.parseTemplateForTable(template.parameterGroups);
45
+ const updatedParameterGroups = (0, get_1.parseTemplateForTable)(template.parameterGroups);
46
46
  table.push(["parameterGroups", updatedParameterGroups]);
47
47
  table.push(["version", util.inspect(template.version, { showHidden: false, depth: null })]);
48
48
  const fileOut = !!options.output;
@@ -16,7 +16,7 @@ module.exports = new command_1.Command("remoteconfig:rollback")
16
16
  .withForce()
17
17
  .action(async (options) => {
18
18
  var _a;
19
- const templateVersion = await versionslist_1.getVersions(projectUtils_1.needProjectId(options), 1);
19
+ const templateVersion = await (0, versionslist_1.getVersions)((0, projectUtils_1.needProjectId)(options), 1);
20
20
  let targetVersion = 0;
21
21
  if (options.versionNumber) {
22
22
  targetVersion = options.versionNumber;
@@ -34,7 +34,7 @@ module.exports = new command_1.Command("remoteconfig:rollback")
34
34
  `. ` +
35
35
  `Invalid Version Number`);
36
36
  }
37
- const confirm = await prompt_1.promptOnce({
37
+ const confirm = await (0, prompt_1.promptOnce)({
38
38
  type: "confirm",
39
39
  name: "force",
40
40
  message: "Proceed to rollback template to version " + targetVersion + "?",
@@ -43,5 +43,5 @@ module.exports = new command_1.Command("remoteconfig:rollback")
43
43
  if (!confirm) {
44
44
  return;
45
45
  }
46
- return rollback_1.rollbackTemplate(projectUtils_1.needProjectId(options), targetVersion);
46
+ return (0, rollback_1.rollbackTemplate)((0, projectUtils_1.needProjectId)(options), targetVersion);
47
47
  });
@@ -18,7 +18,7 @@ module.exports = new command_1.Command("remoteconfig:versions:list")
18
18
  .before(requireAuth_1.requireAuth)
19
19
  .before(requirePermissions_1.requirePermissions, ["cloudconfig.configs.get"])
20
20
  .action(async (options) => {
21
- const versionsList = await rcVersion.getVersions(projectUtils_1.needProjectId(options), options.limit);
21
+ const versionsList = await rcVersion.getVersions((0, projectUtils_1.needProjectId)(options), options.limit);
22
22
  const table = new Table({ head: tableHead, style: { head: ["green"] } });
23
23
  for (let item = 0; item < versionsList.versions.length; item++) {
24
24
  pushTableContents(table, versionsList.versions[item]);
@@ -6,5 +6,5 @@ const EMULATOR_NAME = "storage";
6
6
  module.exports = new command_1.Command(`setup:emulators:${EMULATOR_NAME}`)
7
7
  .description(`downloads the ${EMULATOR_NAME} emulator`)
8
8
  .action(() => {
9
- return download_1.downloadEmulator(EMULATOR_NAME);
9
+ return (0, download_1.downloadEmulator)(EMULATOR_NAME);
10
10
  });
package/lib/config.js CHANGED
@@ -22,7 +22,7 @@ class Config {
22
22
  this.defaults = {};
23
23
  this.notes = {};
24
24
  this.options = options || {};
25
- this.projectDir = options.projectDir || detectProjectRoot_1.detectProjectRoot(options);
25
+ this.projectDir = options.projectDir || (0, detectProjectRoot_1.detectProjectRoot)(options);
26
26
  this._src = src;
27
27
  if (this._src.firebase) {
28
28
  this.defaults.project = this._src.firebase;
@@ -64,7 +64,7 @@ class Config {
64
64
  });
65
65
  }
66
66
  parseFile(target, filePath) {
67
- const fullPath = projectPath_1.resolveProjectPath(this.options, filePath);
67
+ const fullPath = (0, projectPath_1.resolveProjectPath)(this.options, filePath);
68
68
  const ext = path.extname(filePath);
69
69
  if (!fsutils.fileExistsSync(fullPath)) {
70
70
  throw new error_1.FirebaseError("Parse Error: Imported file " + filePath + " does not exist", {
@@ -148,7 +148,7 @@ class Config {
148
148
  const writeTo = this.path(p);
149
149
  let next;
150
150
  if (fsutils.fileExistsSync(writeTo) && !force) {
151
- next = prompt_1.promptOnce({
151
+ next = (0, prompt_1.promptOnce)({
152
152
  type: "confirm",
153
153
  message: "File " + clc.underline(p) + " already exists. Overwrite?",
154
154
  default: false,
@@ -168,17 +168,17 @@ class Config {
168
168
  });
169
169
  }
170
170
  static load(options, allowMissing) {
171
- const pd = detectProjectRoot_1.detectProjectRoot(options);
171
+ const pd = (0, detectProjectRoot_1.detectProjectRoot)(options);
172
172
  const filename = options.configPath || Config.FILENAME;
173
173
  if (pd) {
174
174
  try {
175
175
  const filePath = path.resolve(pd, path.basename(filename));
176
176
  const data = cjson.load(filePath);
177
- const validator = firebaseConfigValidate_1.getValidator();
177
+ const validator = (0, firebaseConfigValidate_1.getValidator)();
178
178
  const valid = validator(data);
179
179
  if (!valid && validator.errors) {
180
180
  for (const e of validator.errors) {
181
- logger_1.logger.debug(firebaseConfigValidate_1.getErrorMessage(e));
181
+ logger_1.logger.debug((0, firebaseConfigValidate_1.getErrorMessage)(e));
182
182
  }
183
183
  }
184
184
  return new Config(data, options);
@@ -4,11 +4,11 @@ exports.realtimeOriginOrCustomUrl = exports.realtimeOriginOrEmulatorOrCustomUrl
4
4
  const utils_1 = require("../utils");
5
5
  const constants_1 = require("../emulator/constants");
6
6
  function realtimeOriginOrEmulatorOrCustomUrl(host) {
7
- return utils_1.envOverride(constants_1.Constants.FIREBASE_DATABASE_EMULATOR_HOST, utils_1.envOverride("FIREBASE_REALTIME_URL", host), addHttpIfRequired);
7
+ return (0, utils_1.envOverride)(constants_1.Constants.FIREBASE_DATABASE_EMULATOR_HOST, (0, utils_1.envOverride)("FIREBASE_REALTIME_URL", host), addHttpIfRequired);
8
8
  }
9
9
  exports.realtimeOriginOrEmulatorOrCustomUrl = realtimeOriginOrEmulatorOrCustomUrl;
10
10
  function realtimeOriginOrCustomUrl(host) {
11
- return utils_1.envOverride("FIREBASE_REALTIME_URL", host);
11
+ return (0, utils_1.envOverride)("FIREBASE_REALTIME_URL", host);
12
12
  }
13
13
  exports.realtimeOriginOrCustomUrl = realtimeOriginOrCustomUrl;
14
14
  function addHttpIfRequired(val) {
@@ -11,14 +11,14 @@ const secrets_1 = require("./secrets");
11
11
  const validate_1 = require("./validate");
12
12
  async function deploy(context, options, payload) {
13
13
  var _a, _b, _c, _d, _e, _f;
14
- const projectId = projectUtils_1.needProjectId(options);
15
- await validate_1.checkBilling(projectId, options.nonInteractive);
16
- await provisioningHelper_1.bulkCheckProductsProvisioned(projectId, [
14
+ const projectId = (0, projectUtils_1.needProjectId)(options);
15
+ await (0, validate_1.checkBilling)(projectId, options.nonInteractive);
16
+ await (0, provisioningHelper_1.bulkCheckProductsProvisioned)(projectId, [
17
17
  ...((_a = payload.instancesToCreate) !== null && _a !== void 0 ? _a : []),
18
18
  ...((_b = payload.instancesToUpdate) !== null && _b !== void 0 ? _b : []),
19
19
  ...((_c = payload.instancesToConfigure) !== null && _c !== void 0 ? _c : []),
20
20
  ]);
21
- await secrets_1.handleSecretParams(payload, context.have, options.nonInteractive);
21
+ await (0, secrets_1.handleSecretParams)(payload, context.have, options.nonInteractive);
22
22
  const errorHandler = new errors_1.ErrorHandler();
23
23
  const validationQueue = new queue_1.default({
24
24
  retries: 5,
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deletesSummary = exports.configuresSummary = exports.updatesSummary = exports.createsSummary = exports.humanReadable = void 0;
4
4
  const clc = require("cli-color");
5
5
  const refs = require("../../extensions/refs");
6
- exports.humanReadable = (dep) => `${clc.bold(dep.instanceId)} (${dep.ref ? `${refs.toExtensionVersionRef(dep.ref)}` : `Installed from local source`})`;
6
+ const humanReadable = (dep) => `${clc.bold(dep.instanceId)} (${dep.ref ? `${refs.toExtensionVersionRef(dep.ref)}` : `Installed from local source`})`;
7
+ exports.humanReadable = humanReadable;
7
8
  const humanReadableUpdate = (from, to) => {
8
9
  var _a, _b, _c, _d, _e;
9
10
  if (((_a = from.ref) === null || _a === void 0 ? void 0 : _a.publisherId) == ((_b = to.ref) === null || _b === void 0 ? void 0 : _b.publisherId) &&
@@ -18,7 +19,7 @@ const humanReadableUpdate = (from, to) => {
18
19
  }
19
20
  };
20
21
  function createsSummary(toCreate) {
21
- const instancesToCreate = toCreate.map((s) => `\t${exports.humanReadable(s)}`).join("\n");
22
+ const instancesToCreate = toCreate.map((s) => `\t${(0, exports.humanReadable)(s)}`).join("\n");
22
23
  return toCreate.length
23
24
  ? `The following extension instances will be created:\n${instancesToCreate}\n`
24
25
  : "";
@@ -37,14 +38,14 @@ function updatesSummary(toUpdate, have) {
37
38
  }
38
39
  exports.updatesSummary = updatesSummary;
39
40
  function configuresSummary(toConfigure) {
40
- const instancesToConfigure = toConfigure.map((s) => `\t${exports.humanReadable(s)}`).join("\n");
41
+ const instancesToConfigure = toConfigure.map((s) => `\t${(0, exports.humanReadable)(s)}`).join("\n");
41
42
  return toConfigure.length
42
43
  ? `The following extension instances will be configured:\n${instancesToConfigure}\n`
43
44
  : "";
44
45
  }
45
46
  exports.configuresSummary = configuresSummary;
46
47
  function deletesSummary(toDelete) {
47
- const instancesToDelete = toDelete.map((s) => `\t${exports.humanReadable(s)}`).join("\n");
48
+ const instancesToDelete = toDelete.map((s) => `\t${(0, exports.humanReadable)(s)}`).join("\n");
48
49
  return toDelete.length
49
50
  ? `The following extension instances are not listed in 'firebase.json':\n${instancesToDelete}\n`
50
51
  : "";
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.release = exports.deploy = exports.prepare = void 0;
3
4
  var prepare_1 = require("./prepare");
4
5
  Object.defineProperty(exports, "prepare", { enumerable: true, get: function () { return prepare_1.prepare; } });
5
6
  var deploy_1 = require("./deploy");
@@ -34,6 +34,6 @@ function readParams(args) {
34
34
  exports.readParams = readParams;
35
35
  function readParamsFile(projectDir, fileName) {
36
36
  const paramPath = path.join(projectDir, ENV_DIRECTORY, fileName);
37
- const params = paramHelper_1.readEnvFile(paramPath);
37
+ const params = (0, paramHelper_1.readEnvFile)(paramPath);
38
38
  return params;
39
39
  }
@@ -52,15 +52,15 @@ async function want(args) {
52
52
  const instanceId = e[0];
53
53
  const ref = refs.parse(e[1]);
54
54
  ref.version = await resolveVersion(ref);
55
- const params = params_1.readParams({
55
+ const params = (0, params_1.readParams)({
56
56
  projectDir: args.projectDir,
57
57
  instanceId,
58
58
  projectId: args.projectId,
59
59
  projectNumber: args.projectNumber,
60
60
  aliases: args.aliases,
61
61
  });
62
- const autoPopulatedParams = await extensionsHelper_1.getFirebaseProjectParams(args.projectId);
63
- const subbedParams = extensionsHelper_1.substituteParams(params, autoPopulatedParams);
62
+ const autoPopulatedParams = await (0, extensionsHelper_1.getFirebaseProjectParams)(args.projectId);
63
+ const subbedParams = (0, extensionsHelper_1.substituteParams)(params, autoPopulatedParams);
64
64
  instanceSpecs.push({
65
65
  instanceId,
66
66
  ref,
@@ -15,11 +15,11 @@ const secrets_1 = require("./secrets");
15
15
  const warnings_1 = require("../../extensions/warnings");
16
16
  async function prepare(context, options, payload) {
17
17
  var _a;
18
- const projectId = projectUtils_1.needProjectId(options);
19
- const projectNumber = await projectUtils_1.needProjectNumber(options);
20
- const aliases = projectUtils_1.getAliases(options, projectId);
21
- await extensionsHelper_1.ensureExtensionsApiEnabled(options);
22
- await requirePermissions_1.requirePermissions(options, ["firebaseextensions.instances.list"]);
18
+ const projectId = (0, projectUtils_1.needProjectId)(options);
19
+ const projectNumber = await (0, projectUtils_1.needProjectNumber)(options);
20
+ const aliases = (0, projectUtils_1.getAliases)(options, projectId);
21
+ await (0, extensionsHelper_1.ensureExtensionsApiEnabled)(options);
22
+ await (0, requirePermissions_1.requirePermissions)(options, ["firebaseextensions.instances.list"]);
23
23
  context.have = await planner.have(projectId);
24
24
  context.want = await planner.want({
25
25
  projectId,
@@ -30,13 +30,13 @@ async function prepare(context, options, payload) {
30
30
  });
31
31
  const usingSecrets = await Promise.all((_a = context.have) === null || _a === void 0 ? void 0 : _a.map(secrets_1.checkSpecForSecrets));
32
32
  if (usingSecrets.some((i) => i)) {
33
- await secretsUtils_1.ensureSecretManagerApiEnabled(options);
33
+ await (0, secretsUtils_1.ensureSecretManagerApiEnabled)(options);
34
34
  }
35
35
  payload.instancesToCreate = context.want.filter((i) => { var _a; return !((_a = context.have) === null || _a === void 0 ? void 0 : _a.some(matchesInstanceId(i))); });
36
36
  payload.instancesToConfigure = context.want.filter((i) => { var _a; return (_a = context.have) === null || _a === void 0 ? void 0 : _a.some(isConfigure(i)); });
37
37
  payload.instancesToUpdate = context.want.filter((i) => { var _a; return (_a = context.have) === null || _a === void 0 ? void 0 : _a.some(isUpdate(i)); });
38
38
  payload.instancesToDelete = context.have.filter((i) => { var _a; return !((_a = context.want) === null || _a === void 0 ? void 0 : _a.some(matchesInstanceId(i))); });
39
- if (await warnings_1.displayWarningsForDeploy(payload.instancesToCreate)) {
39
+ if (await (0, warnings_1.displayWarningsForDeploy)(payload.instancesToCreate)) {
40
40
  if (!options.force && options.nonInteractive) {
41
41
  throw new error_1.FirebaseError("Pass the --force flag to acknowledge these terms in non-interactive mode");
42
42
  }
@@ -50,7 +50,7 @@ async function prepare(context, options, payload) {
50
50
  throw new error_1.FirebaseError("Deployment cancelled");
51
51
  }
52
52
  }
53
- if (await warnings_1.displayWarningsForDeploy(payload.instancesToCreate)) {
53
+ if (await (0, warnings_1.displayWarningsForDeploy)(payload.instancesToCreate)) {
54
54
  if (!options.force && options.nonInteractive) {
55
55
  throw new error_1.FirebaseError("Pass the --force flag to acknowledge these terms in non-interactive mode");
56
56
  }
@@ -97,7 +97,7 @@ async function prepare(context, options, payload) {
97
97
  permissionsNeeded.push("firebaseextensions.instances.delete");
98
98
  }
99
99
  }
100
- await requirePermissions_1.requirePermissions(options, permissionsNeeded);
100
+ await (0, requirePermissions_1.requirePermissions)(options, permissionsNeeded);
101
101
  }
102
102
  exports.prepare = prepare;
103
103
  const matchesInstanceId = (dep) => (test) => {
@@ -8,7 +8,7 @@ const errors_1 = require("./errors");
8
8
  const projectUtils_1 = require("../../projectUtils");
9
9
  async function release(context, options, payload) {
10
10
  var _a, _b, _c, _d;
11
- const projectId = projectUtils_1.needProjectId(options);
11
+ const projectId = (0, projectUtils_1.needProjectId)(options);
12
12
  const errorHandler = new errors_1.ErrorHandler();
13
13
  const deploymentQueue = new queue_1.default({
14
14
  retries: 5,