backend-manager 2.5.31 → 2.5.32

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": "2.5.31",
3
+ "version": "2.5.32",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -47,9 +47,9 @@ module.exports = function (payload, config) {
47
47
  email: config.brand.email,
48
48
  },
49
49
  subject: subject,
50
- template_id: 'd-1d730ac8cc544b7cbccc8fa4a4b3f9ce',
50
+ template_id: templateId,
51
51
  asm: {
52
- group_id: 16223,
52
+ group_id: groupId,
53
53
  },
54
54
  categories: ['transactional', 'download', config.app.id],
55
55
  }
@@ -83,6 +83,9 @@ Manager.prototype.init = function (exporter, options) {
83
83
  self.libraries.functions.config()
84
84
  );
85
85
 
86
+ // Saved config
87
+ const appId = get(self.config, 'app.id');
88
+
86
89
  // Init assistant
87
90
  self.assistant = self.Assistant().init(undefined, options.assistant);
88
91
 
@@ -134,9 +137,13 @@ Manager.prototype.init = function (exporter, options) {
134
137
  self.assistant.log('Resolved backendManagerConfigPath', self.project.backendManagerConfigPath);
135
138
  }
136
139
 
140
+ if (!appId) {
141
+ console.warn('⚠️ Missing config.app.id');
142
+ }
143
+
137
144
  // Setup sentry
138
145
  if (self.options.sentry) {
139
- const sentryRelease = `${get(self.config, 'app.id') || self.project.projectId}@${self.package.version}`;
146
+ const sentryRelease = `${appId || self.project.projectId}@${self.package.version}`;
140
147
  const sentryDSN = get(self.config, 'sentry.dsn', '');
141
148
  // console.log('Sentry', sentryRelease, sentryDSN);
142
149
 
@@ -175,8 +182,8 @@ Manager.prototype.init = function (exporter, options) {
175
182
 
176
183
  // const loadedProjectId = get(self.libraries.initializedAdmin, 'options_.credential.projectId', null);
177
184
  const loadedProjectId = serviceAccount.project_id;
178
- if (!loadedProjectId || !loadedProjectId.includes(self.config.app.id)) {
179
- self.assistant.error(`Loaded app may have wrong service account: ${loadedProjectId} =/= ${self.config.app.id}`, {environment: 'production'});
185
+ if (!loadedProjectId || !loadedProjectId.includes(appId)) {
186
+ self.assistant.error(`Loaded app may have wrong service account: ${loadedProjectId} =/= ${appId}`, {environment: 'production'});
180
187
  }
181
188
  }
182
189