backend-manager 5.0.81 → 5.0.83

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.81",
3
+ "version": "5.0.83",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
@@ -36,7 +36,6 @@ const SCHEMA = {
36
36
  pending: { type: 'boolean', default: false },
37
37
  date: '$timestamp',
38
38
  },
39
- limits: { $passthrough: true },
40
39
  payment: {
41
40
  processor: { type: 'string', default: null, nullable: true },
42
41
  resourceId: { type: 'string', default: null, nullable: true },
@@ -227,7 +226,7 @@ function resolveDefault(def, ctx) {
227
226
  case '$uuid':
228
227
  return `${uuid4()}`;
229
228
  case '$randomId':
230
- return ctx.Manager.Utilities().randomId({ size: 7 });
229
+ return ctx.Manager.Utilities().randomId({ size: 8 });
231
230
  case '$apiKey':
232
231
  return `${uidgen.generateSync()}`;
233
232
  case '$oldDate':
@@ -24,6 +24,7 @@
24
24
  id: 'UA-123456789-1',
25
25
  secret: 'ABCx1234567890ABCDEFGH',
26
26
  },
27
+ oauth2: {},
27
28
  firebaseConfig: {
28
29
  apiKey: '123-456',
29
30
  authDomain: 'PROJECT-ID.firebaseapp.com',
@@ -165,29 +165,6 @@ module.exports = {
165
165
  },
166
166
  },
167
167
 
168
- // ─── $passthrough: subscription.limits ───
169
-
170
- {
171
- name: 'subscription-limits-passthrough-preserves-all-keys',
172
- async run({ assert }) {
173
- const user = createUser({
174
- subscription: { limits: { devices: 5, seats: 10, storage: 1024 } },
175
- });
176
-
177
- assert.equal(user.subscription.limits.devices, 5, 'limits.devices preserved');
178
- assert.equal(user.subscription.limits.seats, 10, 'limits.seats preserved');
179
- assert.equal(user.subscription.limits.storage, 1024, 'limits.storage preserved');
180
- },
181
- },
182
-
183
- {
184
- name: 'subscription-limits-empty-when-not-provided',
185
- async run({ assert }) {
186
- const user = createUser({});
187
- assert.deepEqual(user.subscription.limits, {}, 'limits should be empty when not provided');
188
- },
189
- },
190
-
191
168
  // ─── $passthrough: roles (with defined defaults) ───
192
169
 
193
170
  {
@@ -493,7 +470,6 @@ module.exports = {
493
470
  status: 'active',
494
471
  expires: { timestamp: '2026-12-31T00:00:00.000Z', timestampUNIX: 1798761600 },
495
472
  trial: { claimed: true, expires: { timestamp: '2024-01-01T00:00:00.000Z', timestampUNIX: 1704067200 } },
496
- limits: { emailsPerDay: 500, contacts: 10000 },
497
473
  payment: { processor: 'stripe', resourceId: 'sub_abc', frequency: 'annually' },
498
474
  },
499
475
  roles: { admin: true, betaTester: true, developer: true, superAdmin: true },
@@ -524,7 +500,6 @@ module.exports = {
524
500
  // Everything should be preserved exactly
525
501
  assert.equal(user.auth.uid, 'V4U9wR0AiLUQRxpcP7WhgA4FX9H2', 'uid preserved');
526
502
  assert.equal(user.subscription.product.id, 'premium', 'product preserved');
527
- assert.equal(user.subscription.limits.emailsPerDay, 500, 'custom limits preserved');
528
503
  assert.equal(user.roles.superAdmin, true, 'custom role preserved');
529
504
  assert.equal(user.flags.onboarded, true, 'custom flag preserved');
530
505
  assert.equal(user.affiliate.code, 'IAN7', 'affiliate code preserved');