@leverege/build-tools 2.21.4 → 2.21.5
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/server/firebaseServe.js +18 -11
- package/lib/web/firebaseServe.js +18 -11
- package/package.json +1 -1
- package/src/firebaseServe.mjs +16 -6
- package/src/.swp +0 -0
|
@@ -64,17 +64,24 @@ const targets = Object.entries(firebasercContent.targets).reduce((prev, [project
|
|
|
64
64
|
}, defaultTargets);
|
|
65
65
|
|
|
66
66
|
if (!TARGET) {
|
|
67
|
-
const {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
67
|
+
const choices = Object.keys(targets).map(t => ({
|
|
68
|
+
name: t,
|
|
69
|
+
value: t
|
|
70
|
+
}));
|
|
71
|
+
let targetEnv;
|
|
72
|
+
|
|
73
|
+
if (choices.length > 1) {
|
|
74
|
+
const res = await prompt({
|
|
75
|
+
type: 'autocomplete',
|
|
76
|
+
name: 'targetEnv',
|
|
77
|
+
message: 'Which environment would you like to serve?',
|
|
78
|
+
choices
|
|
79
|
+
});
|
|
80
|
+
targetEnv = res.targetEnv;
|
|
81
|
+
} else {
|
|
82
|
+
targetEnv = choices[0].value;
|
|
83
|
+
}
|
|
84
|
+
|
|
78
85
|
TARGET = targets[targetEnv];
|
|
79
86
|
} else {
|
|
80
87
|
TARGET = targets[TARGET];
|
package/lib/web/firebaseServe.js
CHANGED
|
@@ -64,17 +64,24 @@ const targets = Object.entries(firebasercContent.targets).reduce((prev, [project
|
|
|
64
64
|
}, defaultTargets);
|
|
65
65
|
|
|
66
66
|
if (!TARGET) {
|
|
67
|
-
const {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
67
|
+
const choices = Object.keys(targets).map(t => ({
|
|
68
|
+
name: t,
|
|
69
|
+
value: t
|
|
70
|
+
}));
|
|
71
|
+
let targetEnv;
|
|
72
|
+
|
|
73
|
+
if (choices.length > 1) {
|
|
74
|
+
const res = await prompt({
|
|
75
|
+
type: 'autocomplete',
|
|
76
|
+
name: 'targetEnv',
|
|
77
|
+
message: 'Which environment would you like to serve?',
|
|
78
|
+
choices
|
|
79
|
+
});
|
|
80
|
+
targetEnv = res.targetEnv;
|
|
81
|
+
} else {
|
|
82
|
+
targetEnv = choices[0].value;
|
|
83
|
+
}
|
|
84
|
+
|
|
78
85
|
TARGET = targets[targetEnv];
|
|
79
86
|
} else {
|
|
80
87
|
TARGET = targets[TARGET];
|
package/package.json
CHANGED
package/src/firebaseServe.mjs
CHANGED
|
@@ -72,12 +72,22 @@ const targets = Object
|
|
|
72
72
|
}, defaultTargets )
|
|
73
73
|
|
|
74
74
|
if ( !TARGET ) {
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
const choices = Object.keys( targets ).map( t => ( { name : t, value : t } ) )
|
|
76
|
+
|
|
77
|
+
let targetEnv
|
|
78
|
+
|
|
79
|
+
if ( choices.length > 1 ) {
|
|
80
|
+
const res = await prompt( {
|
|
81
|
+
type : 'autocomplete',
|
|
82
|
+
name : 'targetEnv',
|
|
83
|
+
message : 'Which environment would you like to serve?',
|
|
84
|
+
choices
|
|
85
|
+
} )
|
|
86
|
+
|
|
87
|
+
targetEnv = res.targetEnv
|
|
88
|
+
} else {
|
|
89
|
+
targetEnv = choices[0].value
|
|
90
|
+
}
|
|
81
91
|
|
|
82
92
|
TARGET = targets[targetEnv]
|
|
83
93
|
} else {
|
package/src/.swp
DELETED
|
Binary file
|