firebase-tools 11.24.1 → 11.25.0

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.
Files changed (37) hide show
  1. package/lib/commands/database-import.js +74 -0
  2. package/lib/commands/firestore-delete.js +12 -7
  3. package/lib/commands/firestore-indexes-list.js +5 -2
  4. package/lib/commands/index.js +1 -0
  5. package/lib/commands/init.js +5 -3
  6. package/lib/commands/logout.js +15 -15
  7. package/lib/database/import.js +125 -0
  8. package/lib/deploy/extensions/prepare.js +0 -14
  9. package/lib/deploy/firestore/deploy.js +22 -16
  10. package/lib/deploy/firestore/prepare.js +34 -24
  11. package/lib/deploy/firestore/release.js +13 -9
  12. package/lib/deploy/functions/prepare.js +1 -1
  13. package/lib/deploy/functions/release/fabricator.js +2 -24
  14. package/lib/deploy/functions/release/index.js +5 -5
  15. package/lib/deploy/functions/services/firestore.js +17 -0
  16. package/lib/deploy/functions/services/index.js +14 -0
  17. package/lib/emulator/controller.js +14 -3
  18. package/lib/extensions/emulator/optionsHelper.js +1 -1
  19. package/lib/extensions/emulator/triggerHelper.js +19 -1
  20. package/lib/extensions/paramHelper.js +7 -49
  21. package/lib/extensions/warnings.js +1 -7
  22. package/lib/firestore/delete.js +6 -1
  23. package/lib/firestore/fsConfig.js +67 -0
  24. package/lib/firestore/indexes.js +13 -13
  25. package/lib/firestore/options.js +2 -0
  26. package/lib/firestore/util.js +9 -7
  27. package/lib/functions/events/v2.js +7 -1
  28. package/lib/gcp/cloudfunctions.js +4 -1
  29. package/lib/gcp/cloudfunctionsv2.js +6 -1
  30. package/lib/gcp/firestore.js +14 -1
  31. package/lib/gcp/run.js +6 -0
  32. package/lib/init/features/hosting/github.js +1 -1
  33. package/lib/rulesDeploy.js +1 -3
  34. package/npm-shrinkwrap.json +2 -2
  35. package/package.json +1 -1
  36. package/schema/firebase-config.json +137 -29
  37. package/templates/init/functions/typescript/_eslintrc +1 -1
@@ -145,9 +145,7 @@ class RulesDeploy {
145
145
  if (resourceName === RulesetServiceType.FIREBASE_STORAGE && !subResourceName) {
146
146
  throw new error_1.FirebaseError(`Cannot release resource type "${resourceName}"`);
147
147
  }
148
- await gcp.rules.updateOrCreateRelease(this.options.project, this.rulesetNames[filename], resourceName === RulesetServiceType.FIREBASE_STORAGE
149
- ? `${resourceName}/${subResourceName}`
150
- : resourceName);
148
+ await gcp.rules.updateOrCreateRelease(this.options.project, this.rulesetNames[filename], subResourceName ? `${resourceName}/${subResourceName}` : resourceName);
151
149
  utils.logLabeledSuccess(RulesetType[this.type], `released rules ${(0, colorette_1.bold)(filename)} to ${(0, colorette_1.bold)(resourceName)}`);
152
150
  }
153
151
  async compileRuleset(filename, files) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "firebase-tools",
3
- "version": "11.24.1",
3
+ "version": "11.25.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "firebase-tools",
9
- "version": "11.24.1",
9
+ "version": "11.25.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@google-cloud/pubsub": "^3.0.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firebase-tools",
3
- "version": "11.24.1",
3
+ "version": "11.25.0",
4
4
  "description": "Command-Line Interface for Firebase",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {
@@ -426,42 +426,150 @@
426
426
  "$ref": "#/definitions/ExtensionsConfig"
427
427
  },
428
428
  "firestore": {
429
- "additionalProperties": false,
430
- "properties": {
431
- "indexes": {
432
- "type": "string"
433
- },
434
- "postdeploy": {
435
- "anyOf": [
436
- {
437
- "items": {
438
- "type": "string"
439
- },
440
- "type": "array"
429
+ "anyOf": [
430
+ {
431
+ "additionalProperties": false,
432
+ "properties": {
433
+ "database": {
434
+ "type": "string"
441
435
  },
442
- {
436
+ "indexes": {
443
437
  "type": "string"
444
- }
445
- ]
446
- },
447
- "predeploy": {
448
- "anyOf": [
449
- {
450
- "items": {
451
- "type": "string"
452
- },
453
- "type": "array"
454
438
  },
455
- {
439
+ "postdeploy": {
440
+ "anyOf": [
441
+ {
442
+ "items": {
443
+ "type": "string"
444
+ },
445
+ "type": "array"
446
+ },
447
+ {
448
+ "type": "string"
449
+ }
450
+ ]
451
+ },
452
+ "predeploy": {
453
+ "anyOf": [
454
+ {
455
+ "items": {
456
+ "type": "string"
457
+ },
458
+ "type": "array"
459
+ },
460
+ {
461
+ "type": "string"
462
+ }
463
+ ]
464
+ },
465
+ "rules": {
456
466
  "type": "string"
457
467
  }
458
- ]
468
+ },
469
+ "type": "object"
459
470
  },
460
- "rules": {
461
- "type": "string"
471
+ {
472
+ "items": {
473
+ "anyOf": [
474
+ {
475
+ "additionalProperties": false,
476
+ "properties": {
477
+ "database": {
478
+ "type": "string"
479
+ },
480
+ "indexes": {
481
+ "type": "string"
482
+ },
483
+ "postdeploy": {
484
+ "anyOf": [
485
+ {
486
+ "items": {
487
+ "type": "string"
488
+ },
489
+ "type": "array"
490
+ },
491
+ {
492
+ "type": "string"
493
+ }
494
+ ]
495
+ },
496
+ "predeploy": {
497
+ "anyOf": [
498
+ {
499
+ "items": {
500
+ "type": "string"
501
+ },
502
+ "type": "array"
503
+ },
504
+ {
505
+ "type": "string"
506
+ }
507
+ ]
508
+ },
509
+ "rules": {
510
+ "type": "string"
511
+ },
512
+ "target": {
513
+ "type": "string"
514
+ }
515
+ },
516
+ "required": [
517
+ "target"
518
+ ],
519
+ "type": "object"
520
+ },
521
+ {
522
+ "additionalProperties": false,
523
+ "properties": {
524
+ "database": {
525
+ "type": "string"
526
+ },
527
+ "indexes": {
528
+ "type": "string"
529
+ },
530
+ "postdeploy": {
531
+ "anyOf": [
532
+ {
533
+ "items": {
534
+ "type": "string"
535
+ },
536
+ "type": "array"
537
+ },
538
+ {
539
+ "type": "string"
540
+ }
541
+ ]
542
+ },
543
+ "predeploy": {
544
+ "anyOf": [
545
+ {
546
+ "items": {
547
+ "type": "string"
548
+ },
549
+ "type": "array"
550
+ },
551
+ {
552
+ "type": "string"
553
+ }
554
+ ]
555
+ },
556
+ "rules": {
557
+ "type": "string"
558
+ },
559
+ "target": {
560
+ "type": "string"
561
+ }
562
+ },
563
+ "required": [
564
+ "database"
565
+ ],
566
+ "type": "object"
567
+ }
568
+ ]
569
+ },
570
+ "type": "array"
462
571
  }
463
- },
464
- "type": "object"
572
+ ]
465
573
  },
466
574
  "functions": {
467
575
  "anyOf": [
@@ -27,6 +27,6 @@ module.exports = {
27
27
  rules: {
28
28
  "quotes": ["error", "double"],
29
29
  "import/no-unresolved": 0,
30
- "indent": ["error", 2]
30
+ "indent": ["error", 2],
31
31
  },
32
32
  };