firebase-tools 12.9.0 → 12.9.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.
@@ -21,27 +21,33 @@ const DEFAULT_IGNORES = ["firebase.json", "**/.*", "**/node_modules/**"];
21
21
  async function doSetup(setup, config, options) {
22
22
  var _a;
23
23
  setup.hosting = {};
24
- let hasHostingSite = true;
25
- try {
26
- await (0, getDefaultHostingSite_1.getDefaultHostingSite)(options);
27
- }
28
- catch (err) {
29
- if (err !== getDefaultHostingSite_1.errNoDefaultSite) {
30
- throw err;
24
+ if (setup.projectId) {
25
+ let hasHostingSite = true;
26
+ try {
27
+ await (0, getDefaultHostingSite_1.getDefaultHostingSite)({ projectId: setup.projectId });
31
28
  }
32
- hasHostingSite = false;
33
- }
34
- if (!hasHostingSite) {
35
- const confirmCreate = await (0, prompt_1.promptOnce)({
36
- type: "confirm",
37
- message: "A Firebase Hosting site is required to deploy. Would you like to create one now?",
38
- default: true,
39
- });
40
- if (confirmCreate) {
41
- const newSite = await (0, interactive_1.interactiveCreateHostingSite)("", "", options);
42
- logger_1.logger.info();
43
- (0, utils_1.logSuccess)(`Firebase Hosting site ${(0, utils_1.last)(newSite.name.split("/"))} created!`);
44
- logger_1.logger.info();
29
+ catch (err) {
30
+ if (err !== getDefaultHostingSite_1.errNoDefaultSite) {
31
+ throw err;
32
+ }
33
+ hasHostingSite = false;
34
+ }
35
+ if (!hasHostingSite) {
36
+ const confirmCreate = await (0, prompt_1.promptOnce)({
37
+ type: "confirm",
38
+ message: "A Firebase Hosting site is required to deploy. Would you like to create one now?",
39
+ default: true,
40
+ });
41
+ if (confirmCreate) {
42
+ const createOptions = {
43
+ projectId: setup.projectId,
44
+ nonInteractive: options.nonInteractive,
45
+ };
46
+ const newSite = await (0, interactive_1.interactiveCreateHostingSite)("", "", createOptions);
47
+ logger_1.logger.info();
48
+ (0, utils_1.logSuccess)(`Firebase Hosting site ${(0, utils_1.last)(newSite.name.split("/"))} created!`);
49
+ logger_1.logger.info();
50
+ }
45
51
  }
46
52
  }
47
53
  let discoveredFramework = experiments.isEnabled("webframeworks")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firebase-tools",
3
- "version": "12.9.0",
3
+ "version": "12.9.1",
4
4
  "description": "Command-Line Interface for Firebase",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {