firebase-functions 7.0.0-rc.0 → 7.0.0-rc.2

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.
@@ -9,6 +9,7 @@ var logger_exports = /* @__PURE__ */ __export({
9
9
  error: () => error,
10
10
  info: () => info,
11
11
  log: () => log,
12
+ logger: () => logger,
12
13
  warn: () => warn,
13
14
  write: () => write
14
15
  });
@@ -126,6 +127,19 @@ function entryFromArgs(severity, args) {
126
127
  }
127
128
  return out;
128
129
  }
130
+ /**
131
+ * Logger object containing all logging methods.
132
+ *
133
+ * Mockable for testing purposes.
134
+ */
135
+ const logger = {
136
+ write,
137
+ debug,
138
+ log,
139
+ info,
140
+ warn,
141
+ error
142
+ };
129
143
 
130
144
  //#endregion
131
- export { debug, error, info, log, logger_exports, warn, write };
145
+ export { debug, error, info, log, logger, logger_exports, warn, write };
@@ -1,5 +1,5 @@
1
1
  import { traceContext } from "../common/trace.mjs";
2
- import { logger_exports } from "../logger/index.mjs";
2
+ import { logger } from "../logger/index.mjs";
3
3
  import { params_exports } from "../params/index.mjs";
4
4
  import { setApp } from "../common/app.mjs";
5
5
  import { Change } from "../common/change.mjs";
@@ -25,4 +25,4 @@ import { dataconnect_exports } from "./providers/dataconnect.mjs";
25
25
  const app = { setEmulatedAdminApp: setApp };
26
26
 
27
27
  //#endregion
28
- export { Change, alerts_exports as alerts, app, config, database_exports as database, dataconnect_exports as dataconnect, eventarc_exports as eventarc, firestore_exports as firestore, https_exports as https, identity_exports as identity, logger_exports as logger, onInit, params_exports as params, pubsub_exports as pubsub, remoteConfig_exports as remoteConfig, scheduler_exports as scheduler, setGlobalOptions, storage_exports as storage, tasks_exports as tasks, testLab_exports as testLab, traceContext };
28
+ export { Change, alerts_exports as alerts, app, config, database_exports as database, dataconnect_exports as dataconnect, eventarc_exports as eventarc, firestore_exports as firestore, https_exports as https, identity_exports as identity, logger, onInit, params_exports as params, pubsub_exports as pubsub, remoteConfig_exports as remoteConfig, scheduler_exports as scheduler, setGlobalOptions, storage_exports as storage, tasks_exports as tasks, testLab_exports as testLab, traceContext };
@@ -55,3 +55,16 @@ export declare function warn(...args: any[]): void;
55
55
  * @public
56
56
  */
57
57
  export declare function error(...args: any[]): void;
58
+ /**
59
+ * Logger object containing all logging methods.
60
+ *
61
+ * Mockable for testing purposes.
62
+ */
63
+ export declare const logger: {
64
+ write: typeof write;
65
+ debug: typeof debug;
66
+ log: typeof log;
67
+ info: typeof info;
68
+ warn: typeof warn;
69
+ error: typeof error;
70
+ };
@@ -10,6 +10,7 @@ var logger_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
10
10
  error: () => error,
11
11
  info: () => info,
12
12
  log: () => log,
13
+ logger: () => logger,
13
14
  warn: () => warn,
14
15
  write: () => write
15
16
  });
@@ -127,12 +128,26 @@ function entryFromArgs(severity, args) {
127
128
  }
128
129
  return out;
129
130
  }
131
+ /**
132
+ * Logger object containing all logging methods.
133
+ *
134
+ * Mockable for testing purposes.
135
+ */
136
+ const logger = {
137
+ write,
138
+ debug,
139
+ log,
140
+ info,
141
+ warn,
142
+ error
143
+ };
130
144
 
131
145
  //#endregion
132
146
  exports.debug = debug;
133
147
  exports.error = error;
134
148
  exports.info = info;
135
149
  exports.log = log;
150
+ exports.logger = logger;
136
151
  Object.defineProperty(exports, 'logger_exports', {
137
152
  enumerable: true,
138
153
  get: function () {
package/lib/v2/index.d.ts CHANGED
@@ -5,7 +5,6 @@
5
5
  * from `firebase-functions/v2/pubsub`.
6
6
  * @packageDocumentation
7
7
  */
8
- import * as logger from "../logger";
9
8
  import * as alerts from "./providers/alerts";
10
9
  import * as database from "./providers/database";
11
10
  import * as eventarc from "./providers/eventarc";
@@ -19,7 +18,8 @@ import * as remoteConfig from "./providers/remoteConfig";
19
18
  import * as testLab from "./providers/testLab";
20
19
  import * as firestore from "./providers/firestore";
21
20
  import * as dataconnect from "./providers/dataconnect";
22
- export { alerts, database, storage, https, identity, pubsub, logger, tasks, eventarc, scheduler, remoteConfig, testLab, firestore, dataconnect, };
21
+ export { alerts, database, storage, https, identity, pubsub, tasks, eventarc, scheduler, remoteConfig, testLab, firestore, dataconnect, };
22
+ export { logger } from "../logger";
23
23
  export { setGlobalOptions } from "./options";
24
24
  export type { GlobalOptions, SupportedRegion, MemoryOption, VpcEgressSetting, IngressSetting, EventHandlerOptions, } from "./options";
25
25
  export { onInit } from "./core";
package/lib/v2/index.js CHANGED
@@ -70,12 +70,7 @@ Object.defineProperty(exports, 'identity', {
70
70
  return require_v2_providers_identity.identity_exports;
71
71
  }
72
72
  });
73
- Object.defineProperty(exports, 'logger', {
74
- enumerable: true,
75
- get: function () {
76
- return require_logger_index.logger_exports;
77
- }
78
- });
73
+ exports.logger = require_logger_index.logger;
79
74
  exports.onInit = require_common_onInit.onInit;
80
75
  Object.defineProperty(exports, 'params', {
81
76
  enumerable: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firebase-functions",
3
- "version": "7.0.0-rc.0",
3
+ "version": "7.0.0-rc.2",
4
4
  "description": "Firebase SDK for Cloud Functions",
5
5
  "keywords": [
6
6
  "firebase",
@@ -304,6 +304,175 @@
304
304
  "require": "./lib/v2/providers/dataconnect.js"
305
305
  }
306
306
  },
307
+ "typesVersions": {
308
+ "*": {
309
+ "logger": [
310
+ "lib/logger/index"
311
+ ],
312
+ "logger/compat": [
313
+ "lib/logger/compat"
314
+ ],
315
+ "params": [
316
+ "lib/params/index"
317
+ ],
318
+ "v1": [
319
+ "lib/v1/index"
320
+ ],
321
+ "v1/analytics": [
322
+ "lib/v1/providers/analytics"
323
+ ],
324
+ "v1/auth": [
325
+ "lib/v1/providers/auth"
326
+ ],
327
+ "v1/database": [
328
+ "lib/v1/providers/database"
329
+ ],
330
+ "v1/firestore": [
331
+ "lib/v1/providers/firestore"
332
+ ],
333
+ "v1/https": [
334
+ "lib/v1/providers/https"
335
+ ],
336
+ "v1/pubsub": [
337
+ "lib/v1/providers/pubsub"
338
+ ],
339
+ "v1/remoteConfig": [
340
+ "lib/v1/providers/remoteConfig"
341
+ ],
342
+ "v1/storage": [
343
+ "lib/v1/providers/storage"
344
+ ],
345
+ "v1/tasks": [
346
+ "lib/v1/providers/tasks"
347
+ ],
348
+ "v1/testLab": [
349
+ "lib/v1/providers/testLab"
350
+ ],
351
+ "core": [
352
+ "lib/v2/core"
353
+ ],
354
+ "options": [
355
+ "lib/v2/options"
356
+ ],
357
+ "https": [
358
+ "lib/v2/providers/https"
359
+ ],
360
+ "pubsub": [
361
+ "lib/v2/providers/pubsub"
362
+ ],
363
+ "storage": [
364
+ "lib/v2/providers/storage"
365
+ ],
366
+ "tasks": [
367
+ "lib/v2/providers/tasks"
368
+ ],
369
+ "alerts": [
370
+ "lib/v2/providers/alerts/index"
371
+ ],
372
+ "alerts/appDistribution": [
373
+ "lib/v2/providers/alerts/appDistribution"
374
+ ],
375
+ "alerts/billing": [
376
+ "lib/v2/providers/alerts/billing"
377
+ ],
378
+ "alerts/crashlytics": [
379
+ "lib/v2/providers/alerts/crashlytics"
380
+ ],
381
+ "alerts/performance": [
382
+ "lib/v2/providers/alerts/performance"
383
+ ],
384
+ "eventarc": [
385
+ "lib/v2/providers/eventarc"
386
+ ],
387
+ "identity": [
388
+ "lib/v2/providers/identity"
389
+ ],
390
+ "database": [
391
+ "lib/v2/providers/database"
392
+ ],
393
+ "scheduler": [
394
+ "lib/v2/providers/scheduler"
395
+ ],
396
+ "remoteConfig": [
397
+ "lib/v2/providers/remoteConfig"
398
+ ],
399
+ "testLab": [
400
+ "lib/v2/providers/testLab"
401
+ ],
402
+ "firestore": [
403
+ "lib/v2/providers/firestore"
404
+ ],
405
+ "dataconnect": [
406
+ "lib/v2/providers/dataconnect"
407
+ ],
408
+ "v2": [
409
+ "lib/v2/index"
410
+ ],
411
+ "v2/core": [
412
+ "lib/v2/core"
413
+ ],
414
+ "v2/alerts": [
415
+ "lib/v2/providers/alerts/index"
416
+ ],
417
+ "v2/alerts/appDistribution": [
418
+ "lib/v2/providers/alerts/appDistribution"
419
+ ],
420
+ "v2/alerts/billing": [
421
+ "lib/v2/providers/alerts/billing"
422
+ ],
423
+ "v2/alerts/crashlytics": [
424
+ "lib/v2/providers/alerts/crashlytics"
425
+ ],
426
+ "v2/alerts/performance": [
427
+ "lib/v2/providers/alerts/performance"
428
+ ],
429
+ "v2/base": [
430
+ "lib/v2/base"
431
+ ],
432
+ "v2/database": [
433
+ "lib/v2/providers/database"
434
+ ],
435
+ "v2/eventarc": [
436
+ "lib/v2/providers/eventarc"
437
+ ],
438
+ "v2/identity": [
439
+ "lib/v2/providers/identity"
440
+ ],
441
+ "v2/options": [
442
+ "lib/v2/options"
443
+ ],
444
+ "v2/https": [
445
+ "lib/v2/providers/https"
446
+ ],
447
+ "v2/pubsub": [
448
+ "lib/v2/providers/pubsub"
449
+ ],
450
+ "v2/storage": [
451
+ "lib/v2/providers/storage"
452
+ ],
453
+ "v2/tasks": [
454
+ "lib/v2/providers/tasks"
455
+ ],
456
+ "v2/scheduler": [
457
+ "lib/v2/providers/scheduler"
458
+ ],
459
+ "v2/remoteConfig": [
460
+ "lib/v2/providers/remoteConfig"
461
+ ],
462
+ "v2/testLab": [
463
+ "lib/v2/providers/testLab"
464
+ ],
465
+ "v2/firestore": [
466
+ "lib/v2/providers/firestore"
467
+ ],
468
+ "v2/dataconnect": [
469
+ "lib/v2/providers/dataconnect"
470
+ ],
471
+ "*": [
472
+ "lib/v2/index.d.ts"
473
+ ]
474
+ }
475
+ },
307
476
  "publishConfig": {
308
477
  "registry": "https://wombat-dressing-room.appspot.com"
309
478
  },