firebase-tools 11.4.1 → 11.6.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.
Files changed (203) hide show
  1. package/lib/accountImporter.js +1 -1
  2. package/lib/auth.js +3 -4
  3. package/lib/bin/firebase.js +4 -4
  4. package/lib/command.js +35 -10
  5. package/lib/commands/apps-android-sha-create.js +1 -1
  6. package/lib/commands/apps-android-sha-delete.js +1 -1
  7. package/lib/commands/apps-create.js +1 -1
  8. package/lib/commands/apps-list.js +1 -1
  9. package/lib/commands/auth-export.js +1 -1
  10. package/lib/commands/auth-import.js +1 -1
  11. package/lib/commands/database-instances-list.js +1 -1
  12. package/lib/commands/database-push.js +1 -1
  13. package/lib/commands/database-remove.js +1 -1
  14. package/lib/commands/database-set.js +1 -1
  15. package/lib/commands/database-update.js +1 -1
  16. package/lib/commands/emulators-exec.js +4 -1
  17. package/lib/commands/emulators-export.js +5 -2
  18. package/lib/commands/emulators-start.js +24 -18
  19. package/lib/commands/ext-dev-deprecate.js +1 -1
  20. package/lib/commands/ext-dev-emulators-exec.js +1 -1
  21. package/lib/commands/ext-dev-emulators-start.js +1 -1
  22. package/lib/commands/ext-dev-extension-delete.js +1 -1
  23. package/lib/commands/ext-dev-list.js +1 -1
  24. package/lib/commands/ext-dev-publish.js +4 -1
  25. package/lib/commands/ext-dev-register.js +1 -1
  26. package/lib/commands/ext-dev-undeprecate.js +1 -1
  27. package/lib/commands/ext-dev-unpublish.js +1 -1
  28. package/lib/commands/ext-dev-usage.js +1 -1
  29. package/lib/commands/ext-info.js +1 -1
  30. package/lib/commands/ext-install.js +2 -2
  31. package/lib/commands/ext-update.js +1 -1
  32. package/lib/commands/ext.js +1 -1
  33. package/lib/commands/firestore-delete.js +2 -2
  34. package/lib/commands/firestore-indexes-list.js +3 -3
  35. package/lib/commands/functions-config-clone.js +1 -1
  36. package/lib/commands/functions-config-export.js +1 -1
  37. package/lib/commands/functions-config-set.js +1 -1
  38. package/lib/commands/functions-config-unset.js +1 -1
  39. package/lib/commands/functions-delete.js +1 -1
  40. package/lib/commands/functions-secrets-set.js +1 -1
  41. package/lib/commands/help.js +1 -1
  42. package/lib/commands/hosting-channel-create.js +5 -5
  43. package/lib/commands/hosting-channel-delete.js +3 -3
  44. package/lib/commands/hosting-channel-deploy.js +6 -6
  45. package/lib/commands/hosting-channel-list.js +2 -2
  46. package/lib/commands/hosting-channel-open.js +2 -2
  47. package/lib/commands/hosting-clone.js +8 -8
  48. package/lib/commands/hosting-disable.js +1 -1
  49. package/lib/commands/hosting-sites-create.js +4 -4
  50. package/lib/commands/hosting-sites-delete.js +4 -4
  51. package/lib/commands/hosting-sites-list.js +2 -2
  52. package/lib/commands/init.js +5 -5
  53. package/lib/commands/login-add.js +1 -1
  54. package/lib/commands/login-ci.js +2 -2
  55. package/lib/commands/login-list.js +1 -1
  56. package/lib/commands/login-use.js +1 -1
  57. package/lib/commands/login.js +3 -3
  58. package/lib/commands/logout.js +1 -1
  59. package/lib/commands/open.js +3 -3
  60. package/lib/commands/projects-list.js +2 -2
  61. package/lib/commands/serve.js +1 -1
  62. package/lib/commands/target-apply.js +1 -1
  63. package/lib/commands/target-clear.js +1 -1
  64. package/lib/commands/target-remove.js +1 -1
  65. package/lib/commands/target.js +1 -1
  66. package/lib/commands/use.js +7 -7
  67. package/lib/config.js +1 -1
  68. package/lib/deploy/database/prepare.js +3 -3
  69. package/lib/deploy/database/release.js +3 -3
  70. package/lib/deploy/extensions/deploymentSummary.js +1 -1
  71. package/lib/deploy/extensions/errors.js +1 -1
  72. package/lib/deploy/extensions/secrets.js +1 -1
  73. package/lib/deploy/extensions/tasks.js +2 -2
  74. package/lib/deploy/firestore/deploy.js +2 -2
  75. package/lib/deploy/firestore/prepare.js +2 -2
  76. package/lib/deploy/functions/backend.js +7 -5
  77. package/lib/deploy/functions/build.js +110 -95
  78. package/lib/deploy/functions/checkIam.js +3 -3
  79. package/lib/deploy/functions/containerCleaner.js +2 -2
  80. package/lib/deploy/functions/deploy.js +2 -2
  81. package/lib/deploy/functions/ensure.js +2 -2
  82. package/lib/deploy/functions/params.js +5 -2
  83. package/lib/deploy/functions/prepare.js +4 -4
  84. package/lib/deploy/functions/prepareFunctionsUpload.js +2 -2
  85. package/lib/deploy/functions/pricing.js +3 -2
  86. package/lib/deploy/functions/prompts.js +2 -2
  87. package/lib/deploy/functions/release/fabricator.js +10 -9
  88. package/lib/deploy/functions/release/index.js +1 -1
  89. package/lib/deploy/functions/release/reporter.js +1 -1
  90. package/lib/deploy/functions/runtimes/discovery/parsing.js +19 -8
  91. package/lib/deploy/functions/runtimes/discovery/v1alpha1.js +112 -107
  92. package/lib/deploy/functions/runtimes/node/parseRuntimeAndValidateSDK.js +1 -1
  93. package/lib/deploy/functions/runtimes/node/parseTriggers.js +54 -26
  94. package/lib/deploy/functions/runtimes/node/versioning.js +4 -4
  95. package/lib/deploy/functions/services/storage.js +6 -0
  96. package/lib/deploy/functions/validate.js +1 -1
  97. package/lib/deploy/hosting/convertConfig.js +8 -1
  98. package/lib/deploy/hosting/deploy.js +10 -9
  99. package/lib/deploy/hosting/uploader.js +2 -2
  100. package/lib/deploy/hosting/validate.js +2 -2
  101. package/lib/deploy/index.js +7 -7
  102. package/lib/deploy/lifecycleHooks.js +5 -2
  103. package/lib/deploy/storage/prepare.js +5 -3
  104. package/lib/deploy/storage/release.js +7 -6
  105. package/lib/emulator/auth/index.js +7 -2
  106. package/lib/emulator/auth/operations.js +10 -10
  107. package/lib/emulator/commandUtils.js +33 -16
  108. package/lib/emulator/constants.js +14 -6
  109. package/lib/emulator/controller.js +55 -18
  110. package/lib/emulator/databaseEmulator.js +1 -1
  111. package/lib/emulator/downloadableEmulators.js +8 -8
  112. package/lib/emulator/emulatorLogger.js +1 -1
  113. package/lib/emulator/eventarcEmulator.js +148 -0
  114. package/lib/emulator/extensionsEmulator.js +5 -3
  115. package/lib/emulator/firestoreEmulator.js +1 -1
  116. package/lib/emulator/functionsEmulator.js +66 -14
  117. package/lib/emulator/functionsEmulatorShared.js +12 -12
  118. package/lib/emulator/hub.js +7 -3
  119. package/lib/emulator/hubClient.js +2 -2
  120. package/lib/emulator/hubExport.js +22 -2
  121. package/lib/emulator/loggingEmulator.js +2 -2
  122. package/lib/emulator/registry.js +1 -0
  123. package/lib/emulator/storage/apis/firebase.js +13 -1
  124. package/lib/emulator/storage/apis/gcloud.js +15 -8
  125. package/lib/emulator/storage/files.js +25 -4
  126. package/lib/emulator/storage/metadata.js +6 -6
  127. package/lib/emulator/storage/multipart.js +4 -3
  128. package/lib/emulator/storage/rules/runtime.js +3 -3
  129. package/lib/emulator/storage/rules/utils.js +4 -2
  130. package/lib/emulator/storage/server.js +2 -1
  131. package/lib/emulator/storage/upload.js +1 -0
  132. package/lib/emulator/types.js +4 -0
  133. package/lib/emulator/ui.js +7 -2
  134. package/lib/ensureApiEnabled.js +7 -7
  135. package/lib/extensions/askUserForConsent.js +1 -1
  136. package/lib/extensions/askUserForEventsConfig.js +1 -1
  137. package/lib/extensions/askUserForParam.js +1 -1
  138. package/lib/extensions/changelog.js +2 -2
  139. package/lib/extensions/checkProjectBilling.js +2 -2
  140. package/lib/extensions/displayExtensionInfo.js +2 -102
  141. package/lib/extensions/emulator/triggerHelper.js +2 -2
  142. package/lib/extensions/extensionsApi.js +3 -2
  143. package/lib/extensions/extensionsHelper.js +30 -2
  144. package/lib/extensions/listExtensions.js +1 -1
  145. package/lib/extensions/manifest.js +1 -1
  146. package/lib/extensions/metricsUtils.js +1 -1
  147. package/lib/extensions/paramHelper.js +1 -1
  148. package/lib/extensions/updateHelper.js +3 -9
  149. package/lib/extensions/warnings.js +2 -2
  150. package/lib/fetchMOTD.js +1 -1
  151. package/lib/firestore/delete.js +1 -1
  152. package/lib/firestore/indexes.js +2 -2
  153. package/lib/firestore/validator.js +1 -1
  154. package/lib/functional.js +16 -1
  155. package/lib/functions/env.js +3 -3
  156. package/lib/functions/runtimeConfigExport.js +1 -1
  157. package/lib/functionsConfig.js +1 -1
  158. package/lib/functionsConfigClone.js +1 -1
  159. package/lib/functionsShellCommandAction.js +1 -1
  160. package/lib/gcp/cloudfunctions.js +24 -11
  161. package/lib/gcp/cloudfunctionsv2.js +48 -24
  162. package/lib/gcp/cloudscheduler.js +58 -22
  163. package/lib/gcp/cloudtasks.js +21 -4
  164. package/lib/gcp/proto.js +18 -6
  165. package/lib/gcp/resourceManager.js +25 -3
  166. package/lib/gcp/serviceusage.js +2 -2
  167. package/lib/handlePreviewToggles.js +4 -4
  168. package/lib/hosting/implicitInit.js +1 -1
  169. package/lib/hosting/normalizedHostingConfigs.js +3 -3
  170. package/lib/index.js +2 -2
  171. package/lib/init/features/database.js +1 -1
  172. package/lib/init/features/emulators.js +1 -1
  173. package/lib/init/features/firestore/index.js +2 -2
  174. package/lib/init/features/firestore/indexes.js +1 -1
  175. package/lib/init/features/firestore/rules.js +1 -1
  176. package/lib/init/features/functions/golang.js +1 -1
  177. package/lib/init/features/functions/index.js +8 -1
  178. package/lib/init/features/hosting/github.js +9 -9
  179. package/lib/init/features/hosting/index.js +1 -1
  180. package/lib/init/features/project.js +1 -1
  181. package/lib/init/features/remoteconfig.js +1 -1
  182. package/lib/init/features/storage.js +1 -1
  183. package/lib/init/index.js +1 -1
  184. package/lib/logError.js +3 -3
  185. package/lib/management/projects.js +1 -1
  186. package/lib/parseBoltRules.js +1 -1
  187. package/lib/previews.js +1 -1
  188. package/lib/profileReport.js +2 -2
  189. package/lib/projectUtils.js +1 -1
  190. package/lib/rc.js +1 -1
  191. package/lib/requireAuth.js +1 -1
  192. package/lib/requireDatabaseInstance.js +2 -2
  193. package/lib/requirePermissions.js +2 -2
  194. package/lib/rulesDeploy.js +49 -13
  195. package/lib/serve/hosting.js +2 -1
  196. package/lib/serve/index.js +15 -0
  197. package/lib/track.js +119 -3
  198. package/lib/utils.js +24 -11
  199. package/npm-shrinkwrap.json +14 -294
  200. package/package.json +5 -4
  201. package/schema/firebase-config.json +12 -0
  202. package/templates/extensions/CHANGELOG.md +1 -7
  203. package/templates/hosting/init.js +6 -2
@@ -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("cli-color");
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");
@@ -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("cli-color");
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");
@@ -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("cli-color");
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 cli_color_1 = require("cli-color");
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, cli_color_1.bold)(channelId)} already exists on site ${(0, cli_color_1.bold)(site)}. Deploy to ${(0, cli_color_1.bold)(channelId)} with: ${(0, cli_color_1.yellow)(`firebase hosting:channel:deploy ${channelId}`)}`, { original: e });
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, cli_color_1.bold)(channelId)} has been created on site ${(0, cli_color_1.bold)(site)}.`);
62
- (0, utils_1.logLabeledSuccess)(LOG_TAG, `Channel ${(0, cli_color_1.bold)(channelId)} will expire at ${(0, cli_color_1.bold)((0, utils_1.datetimeString)(new Date(channel.expireTime)))}.`);
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, cli_color_1.yellow)(`firebase hosting:channel:deploy ${channelId}`)}.`);
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 cli_color_1 = require("cli-color");
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, cli_color_1.underline)(channelId)} for site ${(0, cli_color_1.underline)(siteId)}?`,
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, cli_color_1.bold)(channelId)} for site ${(0, cli_color_1.bold)(siteId)}.`);
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 cli_color_1 = require("cli-color");
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, cli_color_1.bold)("live")} channel using this command. Please use ${(0, cli_color_1.bold)((0, cli_color_1.yellow)("firebase deploy"))} instead.`);
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, cli_color_1.bold)(channelId)} has been created on site ${(0, cli_color_1.bold)(site)}.`);
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, cli_color_1.bold)((0, utils_1.datetimeString)(new Date(d.expireTime)))}]`;
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, cli_color_1.bold)(d.version)}]`;
117
+ version = ` [version ${(0, colorette_1.bold)(d.version)}]`;
118
118
  }
119
- (0, utils_1.logLabeledSuccess)(LOG_TAG, `Channel URL (${(0, cli_color_1.bold)(d.site || d.target)}): ${d.url} ${expires}${version}`);
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 cli_color_1 = require("cli-color");
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, cli_color_1.bold)(siteId)}`);
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 cli_color_1 = require("cli-color");
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, cli_color_1.bold)(channelId)} for site ${(0, cli_color_1.bold)(siteId)}.`);
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 cli_color_1 = require("cli-color");
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, cli_color_1.bold)(sourceChannelId)} for site ${(0, cli_color_1.bold)(sourceSiteId)}.`);
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, cli_color_1.bold)(sourceChannelId)} for site ${(0, cli_color_1.bold)(sourceSiteId)}.`);
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, cli_color_1.bold)(targetChannelId)} in site ${(0, cli_color_1.bold)(targetSiteId)}, creating it...`);
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, cli_color_1.bold)(targetChannelId)} for site ${(0, cli_color_1.bold)(targetSiteId)}.`, { original: e });
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, cli_color_1.bold)(sourceChannelId)} and ${(0, cli_color_1.bold)(targetChannel)} are serving identical versions. No need to clone.`);
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, cli_color_1.bold)(sourceVersion)} for site ${(0, cli_color_1.bold)(targetSiteId)}.`);
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, 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)}.`);
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("cli-color");
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 cli_color_1 = require("cli-color");
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, cli_color_1.bold)(siteId)} already exists in project ${(0, cli_color_1.bold)(projectId)}.`, { original: e });
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, cli_color_1.bold)(siteId)} has been created in project ${(0, cli_color_1.bold)(projectId)}.`);
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, cli_color_1.bold)(siteId)} has been linked to web app ${(0, cli_color_1.bold)(appId)}`);
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 cli_color_1 = require("cli-color");
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, cli_color_1.underline)(siteId)} cannot be reactivated by you or anyone else.`);
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, cli_color_1.underline)(siteId)} for project ${(0, cli_color_1.underline)(projectId)}? `,
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, cli_color_1.bold)(siteId)} from project ${(0, cli_color_1.bold)(projectId)}`);
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 cli_color_1 = require("cli-color");
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, cli_color_1.bold)(projectId)}`);
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 };
@@ -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("cli-color");
4
+ const clc = require("colorette");
5
5
  const fs = require("fs");
6
6
  const os = require("os");
7
7
  const path = require("path");
@@ -100,11 +100,11 @@ exports.command = new command_1.Command("init [feature]")
100
100
  if (warnings.length) {
101
101
  warningText =
102
102
  "\nBefore we get started, keep in mind:\n\n " +
103
- clc.yellow.bold("* ") +
104
- warnings.join("\n " + clc.yellow.bold("* ")) +
103
+ clc.yellow(clc.bold("* ")) +
104
+ warnings.join("\n " + clc.yellow(clc.bold("* "))) +
105
105
  "\n";
106
106
  }
107
- logger_1.logger.info(clc.yellow.bold(BANNER_TEXT) +
107
+ logger_1.logger.info(clc.yellow(clc.bold(BANNER_TEXT)) +
108
108
  "\nYou're about to initialize a Firebase project in this directory:\n\n " +
109
109
  clc.bold(config.projectDir) +
110
110
  "\n" +
@@ -150,7 +150,7 @@ exports.command = new command_1.Command("init [feature]")
150
150
  var _a;
151
151
  if (!setup.features || ((_a = setup.features) === null || _a === void 0 ? void 0 : _a.length) === 0) {
152
152
  return utils.reject("Must select at least one feature. Use " +
153
- clc.bold.underline("SPACEBAR") +
153
+ clc.bold(clc.underline("SPACEBAR")) +
154
154
  " to select features, or specify a feature by running " +
155
155
  clc.bold("firebase init [feature_name]"));
156
156
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.command = void 0;
4
- const clc = require("cli-color");
4
+ const clc = require("colorette");
5
5
  const command_1 = require("../command");
6
6
  const logger_1 = require("../logger");
7
7
  const utils = require("../utils");
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.command = void 0;
4
- const clc = require("cli-color");
4
+ const clc = require("colorette");
5
5
  const command_1 = require("../command");
6
6
  const error_1 = require("../error");
7
7
  const logger_1 = require("../logger");
@@ -19,7 +19,7 @@ exports.command = new command_1.Command("login:ci")
19
19
  const userCredentials = await auth.loginGoogle(options.localhost);
20
20
  logger_1.logger.info();
21
21
  utils.logSuccess("Success! Use this token to login on a CI server:\n\n" +
22
- clc.bold(userCredentials.tokens.refresh_token) +
22
+ clc.bold(userCredentials.tokens.refresh_token || "") +
23
23
  '\n\nExample: firebase deploy --token "$FIREBASE_TOKEN"\n');
24
24
  return userCredentials;
25
25
  });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.command = void 0;
4
- const clc = require("cli-color");
4
+ const clc = require("colorette");
5
5
  const command_1 = require("../command");
6
6
  const logger_1 = require("../logger");
7
7
  const utils = require("../utils");
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.command = void 0;
4
- const clc = require("cli-color");
4
+ const clc = require("colorette");
5
5
  const command_1 = require("../command");
6
6
  const utils = require("../utils");
7
7
  const auth = require("../auth");
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.command = void 0;
4
4
  const _ = require("lodash");
5
- const clc = require("cli-color");
5
+ const clc = require("colorette");
6
6
  const command_1 = require("../command");
7
7
  const logger_1 = require("../logger");
8
8
  const configstore_1 = require("../configstore");
@@ -28,11 +28,11 @@ exports.command = new command_1.Command("login")
28
28
  return user;
29
29
  }
30
30
  if (!options.reauth) {
31
- 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
+ utils.logBullet("Firebase optionally collects CLI and Emulator Suite 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");
32
32
  const collectUsage = await (0, prompt_1.promptOnce)({
33
33
  type: "confirm",
34
34
  name: "collectUsage",
35
- message: "Allow Firebase to collect CLI usage and error reporting information?",
35
+ message: "Allow Firebase to collect CLI and Emulator Suite usage and error reporting information?",
36
36
  });
37
37
  configstore_1.configstore.set("usage", collectUsage);
38
38
  if (collectUsage) {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.command = void 0;
4
4
  const command_1 = require("../command");
5
5
  const logger_1 = require("../logger");
6
- const clc = require("cli-color");
6
+ const clc = require("colorette");
7
7
  const utils = require("../utils");
8
8
  const auth = require("../auth");
9
9
  const prompt_1 = require("../prompt");
@@ -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("cli-color");
4
+ const clc = require("colorette");
5
5
  const open = require("open");
6
6
  const error_1 = require("../error");
7
7
  const api = require("../api");
@@ -79,10 +79,10 @@ exports.command = new command_1.Command("open [link]")
79
79
  throw new error_1.FirebaseError(`Unable to determine URL for link: ${link}`);
80
80
  }
81
81
  if (link.arg !== linkName) {
82
- logger_1.logger.info(`${clc.bold.cyan("Tip:")} You can also run ${clc.bold.underline(`firebase open ${link.arg}`)}`);
82
+ logger_1.logger.info(`${clc.bold(clc.cyan("Tip:"))} You can also run ${clc.bold(clc.underline(`firebase open ${link.arg}`))}`);
83
83
  logger_1.logger.info();
84
84
  }
85
85
  logger_1.logger.info(`Opening ${clc.bold(link.name)} link in your default browser:`);
86
- logger_1.logger.info(clc.bold.underline(url));
86
+ logger_1.logger.info(clc.bold(clc.underline(url)));
87
87
  open(url);
88
88
  });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.command = void 0;
4
- const clc = require("cli-color");
4
+ const clc = require("colorette");
5
5
  const ora = require("ora");
6
6
  const Table = require("cli-table");
7
7
  const command_1 = require("../command");
@@ -22,7 +22,7 @@ function logProjectsList(projects, currentProjectId) {
22
22
  const table = new Table({ head: tableHead, style: { head: ["green"] } });
23
23
  projects.forEach(({ projectId, projectNumber, displayName, resources }) => {
24
24
  if (projectId === currentProjectId) {
25
- projectId = clc.cyan.bold(`${projectId} (current)`);
25
+ projectId = clc.cyan(clc.bold(`${projectId} (current)`));
26
26
  }
27
27
  table.push([
28
28
  displayName || NOT_SPECIFIED,
@@ -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("cli-color");
4
+ const clc = require("colorette");
5
5
  const command_1 = require("../command");
6
6
  const logger_1 = require("../logger");
7
7
  const utils = require("../utils");
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.command = void 0;
4
- const clc = require("cli-color");
4
+ const clc = require("colorette");
5
5
  const command_1 = require("../command");
6
6
  const logger_1 = require("../logger");
7
7
  const requireConfig_1 = require("../requireConfig");
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.command = void 0;
4
- const clc = require("cli-color");
4
+ const clc = require("colorette");
5
5
  const command_1 = require("../command");
6
6
  const requireConfig_1 = require("../requireConfig");
7
7
  const utils = require("../utils");
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.command = void 0;
4
- const clc = require("cli-color");
4
+ const clc = require("colorette");
5
5
  const command_1 = require("../command");
6
6
  const requireConfig_1 = require("../requireConfig");
7
7
  const utils = require("../utils");
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.command = void 0;
4
- const clc = require("cli-color");
4
+ const clc = require("colorette");
5
5
  const command_1 = require("../command");
6
6
  const logger_1 = require("../logger");
7
7
  const requireConfig_1 = require("../requireConfig");
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.command = void 0;
4
- const clc = require("cli-color");
4
+ const clc = require("colorette");
5
5
  const command_1 = require("../command");
6
6
  const projects_1 = require("../management/projects");
7
7
  const logger_1 = require("../logger");
@@ -11,12 +11,12 @@ const command_2 = require("../command");
11
11
  const utils = require("../utils");
12
12
  function listAliases(options) {
13
13
  if (options.rc.hasProjects) {
14
- logger_1.logger.info("Project aliases for", clc.bold(options.projectRoot) + ":");
14
+ logger_1.logger.info("Project aliases for", clc.bold(options.projectRoot || "") + ":");
15
15
  logger_1.logger.info();
16
16
  for (const [alias, projectId] of Object.entries(options.rc.projects)) {
17
17
  const listing = alias + " (" + projectId + ")";
18
18
  if (options.project === projectId || options.projectAlias === alias) {
19
- logger_1.logger.info(clc.cyan.bold("* " + listing));
19
+ logger_1.logger.info(clc.cyan(clc.bold("* " + listing)));
20
20
  }
21
21
  else {
22
22
  logger_1.logger.info(" " + listing);
@@ -121,8 +121,8 @@ exports.command = new command_1.Command("use [alias_or_project_id]")
121
121
  options.rc.addProjectAlias(results.alias, results.project);
122
122
  utils.makeActiveProject(options.projectRoot, results.alias);
123
123
  logger_1.logger.info();
124
- logger_1.logger.info("Created alias", clc.bold(results.alias), "for", results.project + ".");
125
- logger_1.logger.info("Now using alias", clc.bold(results.alias) + " (" + results.project + ")");
124
+ logger_1.logger.info("Created alias", clc.bold(results.alias || ""), "for", results.project + ".");
125
+ logger_1.logger.info("Now using alias", clc.bold(results.alias || "") + " (" + results.project + ")");
126
126
  });
127
127
  });
128
128
  }
@@ -143,10 +143,10 @@ exports.command = new command_1.Command("use [alias_or_project_id]")
143
143
  return utils.reject("No active project");
144
144
  }
145
145
  if (options.projectAlias) {
146
- logger_1.logger.info("Active Project:", clc.bold.cyan(options.projectAlias + " (" + options.project + ")"));
146
+ logger_1.logger.info("Active Project:", clc.bold(clc.cyan(options.projectAlias + " (" + options.project + ")")));
147
147
  }
148
148
  else if (options.project) {
149
- logger_1.logger.info("Active Project:", clc.bold.cyan(options.project));
149
+ logger_1.logger.info("Active Project:", clc.bold(clc.cyan(options.project)));
150
150
  }
151
151
  else {
152
152
  let msg = "No project is currently active";
package/lib/config.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Config = void 0;
4
4
  const _ = require("lodash");
5
- const clc = require("cli-color");
5
+ const clc = require("colorette");
6
6
  const fs = require("fs-extra");
7
7
  const path = require("path");
8
8
  const cjson = require("cjson");
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.prepare = void 0;
4
- const clc = require("cli-color");
4
+ const clc = require("colorette");
5
5
  const path = require("path");
6
6
  const error_1 = require("../../error");
7
7
  const parseBoltRules_1 = require("../../parseBoltRules");
@@ -39,12 +39,12 @@ function prepare(context, options) {
39
39
  deploys: deploys,
40
40
  ruleFiles: ruleFiles,
41
41
  };
42
- utils.logBullet(clc.bold.cyan("database: ") + "checking rules syntax...");
42
+ utils.logBullet(clc.bold(clc.cyan("database: ")) + "checking rules syntax...");
43
43
  return Promise.all(deploys.map((deploy) => {
44
44
  return rtdb
45
45
  .updateRules(context.projectId, deploy.instance, ruleFiles[deploy.rules], { dryRun: true })
46
46
  .then(() => {
47
- utils.logSuccess(clc.bold.green("database: ") +
47
+ utils.logSuccess(clc.bold(clc.green("database: ")) +
48
48
  "rules syntax for database " +
49
49
  clc.bold(deploy.instance) +
50
50
  " is valid");