backend-manager 5.0.137 → 5.0.138

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backend-manager",
3
- "version": "5.0.137",
3
+ "version": "5.0.138",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -175,21 +175,21 @@ Manager.prototype.init = function (exporter, options) {
175
175
  }, options.assistant);
176
176
 
177
177
  // Helper functions for URLs based on environment
178
- self.project.getFunctionsUrl = function(env) {
178
+ self.getFunctionsUrl = function(env) {
179
179
  const isDev = env === 'development' || (!env && self.assistant.isDevelopment());
180
180
  return isDev
181
181
  ? `http://localhost:5001/${self.project.projectId}/${self.project.resourceZone}`
182
182
  : `https://${self.project.resourceZone}-${self.project.projectId}.cloudfunctions.net`;
183
183
  };
184
184
 
185
- self.project.getApiUrl = function(env) {
185
+ self.getApiUrl = function(env) {
186
186
  const isDev = env === 'development' || (!env && self.assistant.isDevelopment());
187
187
  return isDev
188
188
  ? 'http://localhost:5002'
189
189
  : `https://api.${(self.config.brand?.url || '').replace(/^https?:\/\//, '')}`;
190
190
  };
191
191
 
192
- self.project.getWebsiteUrl = function(env) {
192
+ self.getWebsiteUrl = function(env) {
193
193
  const isDev = env === 'development' || (!env && self.assistant.isDevelopment());
194
194
  return isDev
195
195
  ? 'https://localhost:4000'
@@ -197,18 +197,18 @@ Manager.prototype.init = function (exporter, options) {
197
197
  };
198
198
 
199
199
  // Set more properties (need to wait for assistant to determine if DEV)
200
- self.project.functionsUrl = self.project.getFunctionsUrl();
200
+ self.project.functionsUrl = self.getFunctionsUrl();
201
201
 
202
202
  // Set API URL (like web-manager's getApiUrl)
203
203
  // Testing: http://localhost:5002 (hosting emulator with rewrites)
204
204
  // Development: http://localhost:5002 (local hosting)
205
205
  // Production: https://api.{domain}
206
- self.project.apiUrl = self.project.getApiUrl();
206
+ self.project.apiUrl = self.getApiUrl();
207
207
 
208
208
  // Set website URL
209
209
  // Development: https://localhost:4000 (local hosting)
210
210
  // Production: https://{domain} (from brand.url)
211
- self.project.websiteUrl = self.project.getWebsiteUrl();
211
+ self.project.websiteUrl = self.getWebsiteUrl();
212
212
 
213
213
  // Set environment
214
214
  process.env.ENVIRONMENT = process.env.ENVIRONMENT || self.assistant.meta.environment;