@dereekb/firebase 8.9.0 → 8.11.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 (151) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/package.json +5 -5
  3. package/src/lib/client/firestore/driver.js +2 -2
  4. package/src/lib/client/firestore/driver.js.map +1 -1
  5. package/src/lib/client/firestore/firestore.d.ts +5 -1
  6. package/src/lib/client/firestore/firestore.js +7 -2
  7. package/src/lib/client/firestore/firestore.js.map +1 -1
  8. package/src/lib/client/function/model.function.factory.d.ts +35 -9
  9. package/src/lib/client/function/model.function.factory.js +37 -11
  10. package/src/lib/client/function/model.function.factory.js.map +1 -1
  11. package/src/lib/client/index.d.ts +1 -0
  12. package/src/lib/client/index.js +1 -0
  13. package/src/lib/client/index.js.map +1 -1
  14. package/src/lib/client/storage/driver.accessor.d.ts +17 -0
  15. package/src/lib/client/storage/driver.accessor.js +105 -0
  16. package/src/lib/client/storage/driver.accessor.js.map +1 -0
  17. package/src/lib/client/storage/driver.d.ts +3 -0
  18. package/src/lib/client/storage/driver.js +13 -0
  19. package/src/lib/client/storage/driver.js.map +1 -0
  20. package/src/lib/client/storage/index.d.ts +3 -0
  21. package/src/lib/client/storage/index.js +7 -0
  22. package/src/lib/client/storage/index.js.map +1 -0
  23. package/src/lib/client/storage/storage.d.ts +5 -0
  24. package/src/lib/client/storage/storage.js +10 -0
  25. package/src/lib/client/storage/storage.js.map +1 -0
  26. package/src/lib/common/firestore/context.d.ts +2 -2
  27. package/src/lib/common/firestore/context.js +1 -1
  28. package/src/lib/common/firestore/context.js.map +1 -1
  29. package/src/lib/common/firestore/driver/driver.d.ts +2 -2
  30. package/src/lib/common/index.d.ts +1 -0
  31. package/src/lib/common/index.js +1 -0
  32. package/src/lib/common/index.js.map +1 -1
  33. package/src/lib/common/model/function.d.ts +2 -1
  34. package/src/lib/common/model/function.js +6 -2
  35. package/src/lib/common/model/function.js.map +1 -1
  36. package/src/lib/common/storage/accessor/index.d.ts +1 -0
  37. package/src/lib/common/storage/accessor/index.js +5 -0
  38. package/src/lib/common/storage/accessor/index.js.map +1 -0
  39. package/src/lib/common/storage/accessor/path.model.d.ts +26 -0
  40. package/src/lib/common/storage/accessor/path.model.js +25 -0
  41. package/src/lib/common/storage/accessor/path.model.js.map +1 -0
  42. package/src/lib/common/storage/context.d.ts +35 -0
  43. package/src/lib/common/storage/context.js +34 -0
  44. package/src/lib/common/storage/context.js.map +1 -0
  45. package/src/lib/common/storage/driver/accessor.d.ts +170 -0
  46. package/src/lib/common/storage/driver/accessor.js +3 -0
  47. package/src/lib/common/storage/driver/accessor.js.map +1 -0
  48. package/src/lib/common/storage/driver/driver.d.ts +10 -0
  49. package/src/lib/common/storage/driver/driver.js +3 -0
  50. package/src/lib/common/storage/driver/driver.js.map +1 -0
  51. package/src/lib/common/storage/driver/error.d.ts +3 -0
  52. package/src/lib/common/storage/driver/error.js +16 -0
  53. package/src/lib/common/storage/driver/error.js.map +1 -0
  54. package/src/lib/common/storage/driver/index.d.ts +4 -0
  55. package/src/lib/common/storage/driver/index.js +8 -0
  56. package/src/lib/common/storage/driver/index.js.map +1 -0
  57. package/src/lib/common/storage/driver/list.d.ts +13 -0
  58. package/src/lib/common/storage/driver/list.js +41 -0
  59. package/src/lib/common/storage/driver/list.js.map +1 -0
  60. package/src/lib/common/storage/index.d.ts +5 -0
  61. package/src/lib/common/storage/index.js +9 -0
  62. package/src/lib/common/storage/index.js.map +1 -0
  63. package/src/lib/common/storage/storage.d.ts +65 -0
  64. package/src/lib/common/storage/storage.js +55 -0
  65. package/src/lib/common/storage/storage.js.map +1 -0
  66. package/src/lib/common/storage/types.d.ts +210 -0
  67. package/src/lib/common/storage/types.js +3 -0
  68. package/src/lib/common/storage/types.js.map +1 -0
  69. package/test/CHANGELOG.md +23 -0
  70. package/test/package.json +7 -7
  71. package/test/src/lib/client/{firestore.authorized.d.ts → firebase.authorized.d.ts} +2 -2
  72. package/test/src/lib/client/firebase.authorized.js +35 -0
  73. package/test/src/lib/client/firebase.authorized.js.map +1 -0
  74. package/test/src/lib/client/firebase.d.ts +54 -0
  75. package/test/src/lib/client/{firestore.js → firebase.js} +34 -14
  76. package/test/src/lib/client/firebase.js.map +1 -0
  77. package/test/src/lib/client/firestore.mock.item.fixture.authorized.d.ts +9 -3
  78. package/test/src/lib/client/firestore.mock.item.fixture.authorized.js +13 -6
  79. package/test/src/lib/client/firestore.mock.item.fixture.authorized.js.map +1 -1
  80. package/test/src/lib/client/index.d.ts +2 -2
  81. package/test/src/lib/client/index.js +2 -2
  82. package/test/src/lib/client/index.js.map +1 -1
  83. package/test/src/lib/common/firebase.instance.d.ts +20 -0
  84. package/test/src/lib/common/firebase.instance.js +33 -0
  85. package/test/src/lib/common/firebase.instance.js.map +1 -0
  86. package/test/src/lib/common/{firestore.d.ts → firestore/firestore.d.ts} +1 -1
  87. package/test/src/lib/common/{firestore.mock.d.ts → firestore/firestore.instance.d.ts} +3 -4
  88. package/test/src/lib/common/{firestore.mock.js → firestore/firestore.instance.js} +6 -12
  89. package/test/src/lib/common/firestore/firestore.instance.js.map +1 -0
  90. package/test/src/lib/common/{firestore.js → firestore/firestore.js} +1 -1
  91. package/test/src/lib/common/firestore/firestore.js.map +1 -0
  92. package/test/src/lib/common/firestore/index.d.ts +5 -0
  93. package/test/src/lib/common/firestore/index.js +9 -0
  94. package/test/src/lib/common/firestore/index.js.map +1 -0
  95. package/test/src/lib/common/{test.driver.accessor.d.ts → firestore/test.driver.accessor.d.ts} +2 -2
  96. package/test/src/lib/common/{test.driver.accessor.js → firestore/test.driver.accessor.js} +9 -9
  97. package/test/src/lib/common/firestore/test.driver.accessor.js.map +1 -0
  98. package/test/src/lib/common/firestore/test.driver.query.d.ts +7 -0
  99. package/test/src/lib/common/{test.driver.query.js → firestore/test.driver.query.js} +5 -5
  100. package/test/src/lib/common/firestore/test.driver.query.js.map +1 -0
  101. package/test/src/lib/common/{test.iterator.d.ts → firestore/test.iterator.d.ts} +1 -1
  102. package/test/src/lib/common/{test.iterator.js → firestore/test.iterator.js} +2 -2
  103. package/test/src/lib/common/firestore/test.iterator.js.map +1 -0
  104. package/test/src/lib/common/index.d.ts +3 -8
  105. package/test/src/lib/common/index.js +3 -8
  106. package/test/src/lib/common/index.js.map +1 -1
  107. package/test/src/lib/common/mock/index.d.ts +5 -0
  108. package/test/src/lib/common/mock/index.js +9 -0
  109. package/test/src/lib/common/mock/index.js.map +1 -0
  110. package/test/src/lib/common/mock/mock.item.collection.fixture.d.ts +27 -0
  111. package/test/src/lib/common/{firestore.mock.item.fixture.js → mock/mock.item.collection.fixture.js} +7 -9
  112. package/test/src/lib/common/mock/mock.item.collection.fixture.js.map +1 -0
  113. package/test/src/lib/common/{firestore.mock.item.d.ts → mock/mock.item.d.ts} +0 -0
  114. package/test/src/lib/common/{firestore.mock.item.js → mock/mock.item.js} +1 -1
  115. package/test/src/lib/common/mock/mock.item.js.map +1 -0
  116. package/test/src/lib/common/{firestore.mock.item.query.d.ts → mock/mock.item.query.d.ts} +1 -1
  117. package/test/src/lib/common/{firestore.mock.item.query.js → mock/mock.item.query.js} +1 -1
  118. package/test/src/lib/common/mock/mock.item.query.js.map +1 -0
  119. package/test/src/lib/common/{firestore.mock.item.service.d.ts → mock/mock.item.service.d.ts} +1 -1
  120. package/test/src/lib/common/{firestore.mock.item.service.js → mock/mock.item.service.js} +11 -11
  121. package/test/src/lib/common/mock/mock.item.service.js.map +1 -0
  122. package/test/src/lib/common/mock/mock.item.storage.fixture.d.ts +18 -0
  123. package/test/src/lib/common/mock/mock.item.storage.fixture.js +39 -0
  124. package/test/src/lib/common/mock/mock.item.storage.fixture.js.map +1 -0
  125. package/test/src/lib/common/storage/index.d.ts +3 -0
  126. package/test/src/lib/common/storage/index.js +7 -0
  127. package/test/src/lib/common/storage/index.js.map +1 -0
  128. package/test/src/lib/common/storage/storage.d.ts +24 -0
  129. package/test/src/lib/common/storage/storage.instance.d.ts +13 -0
  130. package/test/src/lib/common/storage/storage.instance.js +23 -0
  131. package/test/src/lib/common/storage/storage.instance.js.map +1 -0
  132. package/test/src/lib/common/storage/storage.js +23 -0
  133. package/test/src/lib/common/storage/storage.js.map +1 -0
  134. package/test/src/lib/common/storage/test.driver.accessor.d.ts +7 -0
  135. package/test/src/lib/common/storage/test.driver.accessor.js +337 -0
  136. package/test/src/lib/common/storage/test.driver.accessor.js.map +1 -0
  137. package/test/src/lib/client/firestore.authorized.js +0 -23
  138. package/test/src/lib/client/firestore.authorized.js.map +0 -1
  139. package/test/src/lib/client/firestore.d.ts +0 -39
  140. package/test/src/lib/client/firestore.js.map +0 -1
  141. package/test/src/lib/common/firestore.js.map +0 -1
  142. package/test/src/lib/common/firestore.mock.item.fixture.d.ts +0 -27
  143. package/test/src/lib/common/firestore.mock.item.fixture.js.map +0 -1
  144. package/test/src/lib/common/firestore.mock.item.js.map +0 -1
  145. package/test/src/lib/common/firestore.mock.item.query.js.map +0 -1
  146. package/test/src/lib/common/firestore.mock.item.service.js.map +0 -1
  147. package/test/src/lib/common/firestore.mock.js.map +0 -1
  148. package/test/src/lib/common/test.driver.accessor.js.map +0 -1
  149. package/test/src/lib/common/test.driver.query.d.ts +0 -7
  150. package/test/src/lib/common/test.driver.query.js.map +0 -1
  151. package/test/src/lib/common/test.iterator.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.mockFirebaseModelServices = exports.MOCK_FIREBASE_MODEL_SERVICE_FACTORIES = exports.mockItemSubItemDeepFirebaseModelServiceFactory = exports.mockItemSubItemFirebaseModelServiceFactory = exports.mockItemUserFirebaseModelServiceFactory = exports.mockItemPrivateFirebaseModelServiceFactory = exports.mockItemFirebaseModelServiceFactory = exports.makeMockItemCollections = exports.MockItemCollections = void 0;
4
- const firestore_mock_item_1 = require("./firestore.mock.item");
4
+ const mock_item_1 = require("./mock.item");
5
5
  const firebase_1 = require("@dereekb/firebase");
6
6
  // MARK: Collections
7
7
  class MockItemCollections {
@@ -9,15 +9,15 @@ class MockItemCollections {
9
9
  exports.MockItemCollections = MockItemCollections;
10
10
  function makeMockItemCollections(firestoreContext) {
11
11
  return {
12
- mockItemCollection: (0, firestore_mock_item_1.mockItemFirestoreCollection)(firestoreContext),
13
- mockItemPrivateCollectionFactory: (0, firestore_mock_item_1.mockItemPrivateFirestoreCollection)(firestoreContext),
14
- mockItemPrivateCollectionGroup: (0, firestore_mock_item_1.mockItemPrivateFirestoreCollectionGroup)(firestoreContext),
15
- mockItemUserCollectionFactory: (0, firestore_mock_item_1.mockItemUserFirestoreCollection)(firestoreContext),
16
- mockItemUserCollectionGroup: (0, firestore_mock_item_1.mockItemUserFirestoreCollectionGroup)(firestoreContext),
17
- mockItemSubItemCollectionFactory: (0, firestore_mock_item_1.mockItemSubItemFirestoreCollection)(firestoreContext),
18
- mockItemSubItemCollectionGroup: (0, firestore_mock_item_1.mockItemSubItemFirestoreCollectionGroup)(firestoreContext),
19
- mockItemSubItemDeepCollectionFactory: (0, firestore_mock_item_1.mockItemSubItemDeepFirestoreCollection)(firestoreContext),
20
- mockItemSubItemDeepCollectionGroup: (0, firestore_mock_item_1.mockItemSubItemDeepFirestoreCollectionGroup)(firestoreContext)
12
+ mockItemCollection: (0, mock_item_1.mockItemFirestoreCollection)(firestoreContext),
13
+ mockItemPrivateCollectionFactory: (0, mock_item_1.mockItemPrivateFirestoreCollection)(firestoreContext),
14
+ mockItemPrivateCollectionGroup: (0, mock_item_1.mockItemPrivateFirestoreCollectionGroup)(firestoreContext),
15
+ mockItemUserCollectionFactory: (0, mock_item_1.mockItemUserFirestoreCollection)(firestoreContext),
16
+ mockItemUserCollectionGroup: (0, mock_item_1.mockItemUserFirestoreCollectionGroup)(firestoreContext),
17
+ mockItemSubItemCollectionFactory: (0, mock_item_1.mockItemSubItemFirestoreCollection)(firestoreContext),
18
+ mockItemSubItemCollectionGroup: (0, mock_item_1.mockItemSubItemFirestoreCollectionGroup)(firestoreContext),
19
+ mockItemSubItemDeepCollectionFactory: (0, mock_item_1.mockItemSubItemDeepFirestoreCollection)(firestoreContext),
20
+ mockItemSubItemDeepCollectionGroup: (0, mock_item_1.mockItemSubItemDeepFirestoreCollectionGroup)(firestoreContext)
21
21
  };
22
22
  }
23
23
  exports.makeMockItemCollections = makeMockItemCollections;
@@ -71,4 +71,4 @@ exports.MOCK_FIREBASE_MODEL_SERVICE_FACTORIES = {
71
71
  mockItemSubItemDeep: exports.mockItemSubItemDeepFirebaseModelServiceFactory
72
72
  };
73
73
  exports.mockFirebaseModelServices = (0, firebase_1.firebaseModelsService)(exports.MOCK_FIREBASE_MODEL_SERVICE_FACTORIES);
74
- //# sourceMappingURL=firestore.mock.item.service.js.map
74
+ //# sourceMappingURL=mock.item.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock.item.service.js","sourceRoot":"","sources":["../../../../../../../../packages/firebase/test/src/lib/common/mock/mock.item.service.ts"],"names":[],"mappings":";;;AAAA,2CAmCqB;AACrB,gDAAkK;AAIlK,oBAAoB;AACpB,MAAsB,mBAAmB;CAUxC;AAVD,kDAUC;AAED,SAAgB,uBAAuB,CAAC,gBAAkC;IACxE,OAAO;QACL,kBAAkB,EAAE,IAAA,uCAA2B,EAAC,gBAAgB,CAAC;QACjE,gCAAgC,EAAE,IAAA,8CAAkC,EAAC,gBAAgB,CAAC;QACtF,8BAA8B,EAAE,IAAA,mDAAuC,EAAC,gBAAgB,CAAC;QACzF,6BAA6B,EAAE,IAAA,2CAA+B,EAAC,gBAAgB,CAAC;QAChF,2BAA2B,EAAE,IAAA,gDAAoC,EAAC,gBAAgB,CAAC;QACnF,gCAAgC,EAAE,IAAA,8CAAkC,EAAC,gBAAgB,CAAC;QACtF,8BAA8B,EAAE,IAAA,mDAAuC,EAAC,gBAAgB,CAAC;QACzF,oCAAoC,EAAE,IAAA,kDAAsC,EAAC,gBAAgB,CAAC;QAC9F,kCAAkC,EAAE,IAAA,uDAA2C,EAAC,g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zK,eAAe,EAAE,UAAU,MAAgF,EAAE,OAA4B,EAAE,KAA8B;;QACvK,MAAM,KAAK,GAAyC,MAAA,OAAO,CAAC,aAAa,mCAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QAC5F,OAAO,KAAK,CAAC;IACf,CAAC;IACD,sBAAsB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,8BAA8B;CACpE,CAAC,CAAC;AAEU,QAAA,8CAA8C,GAAG,IAAA,sCAA2B,EAAkG;IACzL,eAAe,EAAE,UAAU,MAAwF,EAAE,OAA4B,EAAE,KAAkC;;QACnL,MAAM,KAAK,GAA6C,MAAA,OAAO,CAAC,aAAa,mCAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QAChG,OAAO,KAAK,CAAC;IACf,CAAC;IACD,sBAAsB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,kCAAkC;CACxE,CAAC,CAAC;AAcU,QAAA,qCAAqC,GAAG;IACnD,QAAQ,EAAE,2CAAmC;IAC7C,eAAe,EAAE,kDAA0C;IAC3D,YAAY,EAAE,+CAAuC;IACrD,WAAW,EAAE,kDAA0C;IACvD,mBAAmB,EAAE,sDAA8C;CACpE,CAAC;AAEW,QAAA,yBAAyB,GAAG,IAAA,gCAAqB,EAAoF,6CAAqC,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { AbstractWrappedFixtureWithInstance, JestTestWrappedContextFactoryBuilder } from '@dereekb/util/test';
2
+ import { TestFirebaseStorageContextFixture, TestFirebaseStorageInstance } from '../storage/storage.instance';
3
+ export declare class MockItemStorageFixtureInstance implements TestFirebaseStorageInstance {
4
+ readonly fixture: MockItemStorageFixture;
5
+ constructor(fixture: MockItemStorageFixture);
6
+ get storage(): import("../../../../../../../dist/packages/firebase/src").FirebaseStorage;
7
+ get storageContext(): import("..").TestFirebaseStorageContext<import("../../../../../../../dist/packages/firebase/src").FirebaseStorageContext<import("../../../../../../../dist/packages/firebase/src").FirebaseStorage>>;
8
+ }
9
+ /**
10
+ * Used to expose a CollectionReference to MockItem for simple tests.
11
+ */
12
+ export declare class MockItemStorageFixture extends AbstractWrappedFixtureWithInstance<MockItemStorageFixtureInstance, TestFirebaseStorageContextFixture> implements TestFirebaseStorageInstance {
13
+ get storage(): import("../../../../../../../dist/packages/firebase/src").FirebaseStorage;
14
+ get storageContext(): import("..").TestFirebaseStorageContext<import("../../../../../../../dist/packages/firebase/src").FirebaseStorageContext<import("../../../../../../../dist/packages/firebase/src").FirebaseStorage>>;
15
+ }
16
+ export interface MockItemStorageFirebaseStorageContextConfig {
17
+ }
18
+ export declare function testWithMockItemStorageFixture(config?: MockItemStorageFirebaseStorageContextConfig): JestTestWrappedContextFactoryBuilder<MockItemStorageFixture, TestFirebaseStorageContextFixture>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.testWithMockItemStorageFixture = exports.MockItemStorageFixture = exports.MockItemStorageFixtureInstance = void 0;
4
+ const test_1 = require("@dereekb/util/test");
5
+ // MARK: Test Item Testing Fixture
6
+ class MockItemStorageFixtureInstance {
7
+ constructor(fixture) {
8
+ this.fixture = fixture;
9
+ }
10
+ get storage() {
11
+ return this.fixture.parent.storage;
12
+ }
13
+ get storageContext() {
14
+ return this.fixture.parent.storageContext;
15
+ }
16
+ }
17
+ exports.MockItemStorageFixtureInstance = MockItemStorageFixtureInstance;
18
+ /**
19
+ * Used to expose a CollectionReference to MockItem for simple tests.
20
+ */
21
+ class MockItemStorageFixture extends test_1.AbstractWrappedFixtureWithInstance {
22
+ get storage() {
23
+ return this.instance.storage;
24
+ }
25
+ get storageContext() {
26
+ return this.instance.storageContext;
27
+ }
28
+ }
29
+ exports.MockItemStorageFixture = MockItemStorageFixture;
30
+ function testWithMockItemStorageFixture(config) {
31
+ return (0, test_1.instanceWrapJestTestContextFactory)({
32
+ wrapFixture: (fixture) => new MockItemStorageFixture(fixture),
33
+ makeInstance: (wrap) => new MockItemStorageFixtureInstance(wrap),
34
+ teardownInstance: (instance) => { }
35
+ // TODO: Utilize config here using the setup/teardown later if needed.
36
+ });
37
+ }
38
+ exports.testWithMockItemStorageFixture = testWithMockItemStorageFixture;
39
+ //# sourceMappingURL=mock.item.storage.fixture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock.item.storage.fixture.js","sourceRoot":"","sources":["../../../../../../../../packages/firebase/test/src/lib/common/mock/mock.item.storage.fixture.ts"],"names":[],"mappings":";;;AAAA,6CAAkJ;AAGlJ,kCAAkC;AAClC,MAAa,8BAA8B;IACzC,YAAqB,OAA+B;QAA/B,YAAO,GAAP,OAAO,CAAwB;IAAG,CAAC;IAExD,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;IACrC,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC;IAC5C,CAAC;CACF;AAVD,wEAUC;AAED;;GAEG;AACH,MAAa,sBAAuB,SAAQ,yCAAqG;IAC/I,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;IAC/B,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;IACtC,CAAC;CACF;AARD,wDAQC;AAID,SAAgB,8BAA8B,CAAC,MAAoD;IACjG,OAAO,IAAA,yCAAkC,EAAC;QACxC,WAAW,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,sBAAsB,CAAC,OAAO,CAAC;QAC7D,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,8BAA8B,CAAC,IAAI,CAAC;QAChE,gBAAgB,EAAE,CAAC,QAAwC,EAAE,EAAE,GAAE,CAAC;QAClE,sEAAsE;KACvE,CAAC,CAAC;AACL,CAAC;AAPD,wEAOC"}
@@ -0,0 +1,3 @@
1
+ export * from './storage';
2
+ export * from './storage.instance';
3
+ export * from './test.driver.accessor';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./storage"), exports);
5
+ tslib_1.__exportStar(require("./storage.instance"), exports);
6
+ tslib_1.__exportStar(require("./test.driver.accessor"), exports);
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/firebase/test/src/lib/common/storage/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,6DAAmC;AACnC,iEAAuC"}
@@ -0,0 +1,24 @@
1
+ import { FirebaseStorageAccessorDriver, FirebaseStorageContext, FirebaseStorageDrivers } from '@dereekb/firebase';
2
+ export declare function makeTestingFirebaseStorageAccesorDriver(driver: FirebaseStorageAccessorDriver): TestingFirebaseStorageAccessorDriver;
3
+ /**
4
+ * Used to override/extend a FirebaseStorageAccessorDriver to provide better isolation between tests.
5
+ */
6
+ export declare type TestingFirebaseStorageAccessorDriver = FirebaseStorageAccessorDriver;
7
+ /**
8
+ * Drivers used for testing. Provides additional functionality for controlling storage access to prevent cross-test contamination.
9
+ */
10
+ export interface TestingFirebaseStorageDrivers extends FirebaseStorageDrivers {
11
+ storageDriverType: 'testing';
12
+ storageAccessorDriver: TestingFirebaseStorageAccessorDriver;
13
+ }
14
+ /**
15
+ * Extends the input drivers to generate new drivers for a testing environment.
16
+ *
17
+ * @param drivers
18
+ * @returns
19
+ */
20
+ export declare function makeTestingFirebaseStorageDrivers(drivers: FirebaseStorageDrivers): TestingFirebaseStorageDrivers;
21
+ export interface TestingFirebaseStorageContextExtension {
22
+ drivers: TestingFirebaseStorageDrivers;
23
+ }
24
+ export declare type TestFirebaseStorageContext<C = FirebaseStorageContext> = C & TestingFirebaseStorageContextExtension;
@@ -0,0 +1,13 @@
1
+ import { AbstractJestTestContextFixture, JestTestContextFactory } from '@dereekb/util/test';
2
+ import { FirebaseStorage } from '@dereekb/firebase';
3
+ import { TestFirebaseStorageContext } from './storage';
4
+ export declare class TestFirebaseStorageInstance {
5
+ readonly storageContext: TestFirebaseStorageContext;
6
+ constructor(storageContext: TestFirebaseStorageContext);
7
+ get storage(): FirebaseStorage;
8
+ }
9
+ export declare class TestFirebaseStorageContextFixture<F extends TestFirebaseStorageInstance = TestFirebaseStorageInstance> extends AbstractJestTestContextFixture<F> {
10
+ get storage(): FirebaseStorage;
11
+ get storageContext(): TestFirebaseStorageContext;
12
+ }
13
+ export declare type JestTestFirebaseStorageContextFactory = JestTestContextFactory<TestFirebaseStorageContextFixture>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TestFirebaseStorageContextFixture = exports.TestFirebaseStorageInstance = void 0;
4
+ const test_1 = require("@dereekb/util/test");
5
+ class TestFirebaseStorageInstance {
6
+ constructor(storageContext) {
7
+ this.storageContext = storageContext;
8
+ }
9
+ get storage() {
10
+ return this.storageContext.storage;
11
+ }
12
+ }
13
+ exports.TestFirebaseStorageInstance = TestFirebaseStorageInstance;
14
+ class TestFirebaseStorageContextFixture extends test_1.AbstractJestTestContextFixture {
15
+ get storage() {
16
+ return this.instance.storage;
17
+ }
18
+ get storageContext() {
19
+ return this.instance.storageContext;
20
+ }
21
+ }
22
+ exports.TestFirebaseStorageContextFixture = TestFirebaseStorageContextFixture;
23
+ //# sourceMappingURL=storage.instance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.instance.js","sourceRoot":"","sources":["../../../../../../../../packages/firebase/test/src/lib/common/storage/storage.instance.ts"],"names":[],"mappings":";;;AAAA,6CAA4F;AAI5F,MAAa,2BAA2B;IACtC,YAAqB,cAA0C;QAA1C,mBAAc,GAAd,cAAc,CAA4B;IAAG,CAAC;IAEnE,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;IACrC,CAAC;CACF;AAND,kEAMC;AAED,MAAa,iCAAuG,SAAQ,qCAAiC;IAC3J,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;IAC/B,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;IACtC,CAAC;CACF;AARD,8EAQC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeTestingFirebaseStorageDrivers = exports.makeTestingFirebaseStorageAccesorDriver = void 0;
4
+ let bucketTestNameKey = 0;
5
+ function makeTestingFirebaseStorageAccesorDriver(driver) {
6
+ const time = new Date().getTime();
7
+ const random = Math.ceil(Math.random() * 999999) % 999999;
8
+ const testBucketName = `test-bucket-${time}-${random}-${(bucketTestNameKey += 1)}`;
9
+ const injectedDriver = Object.assign(Object.assign({}, driver), { defaultBucket: () => testBucketName });
10
+ return injectedDriver;
11
+ }
12
+ exports.makeTestingFirebaseStorageAccesorDriver = makeTestingFirebaseStorageAccesorDriver;
13
+ /**
14
+ * Extends the input drivers to generate new drivers for a testing environment.
15
+ *
16
+ * @param drivers
17
+ * @returns
18
+ */
19
+ function makeTestingFirebaseStorageDrivers(drivers) {
20
+ return Object.assign(Object.assign({}, drivers), { storageDriverType: 'testing', storageAccessorDriver: makeTestingFirebaseStorageAccesorDriver(drivers.storageAccessorDriver) });
21
+ }
22
+ exports.makeTestingFirebaseStorageDrivers = makeTestingFirebaseStorageDrivers;
23
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../../../../../../packages/firebase/test/src/lib/common/storage/storage.ts"],"names":[],"mappings":";;;AAEA,IAAI,iBAAiB,GAAG,CAAC,CAAC;AAE1B,SAAgB,uCAAuC,CAAC,MAAqC;IAC3F,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAClC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC;IAC1D,MAAM,cAAc,GAAG,eAAe,IAAI,IAAI,MAAM,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC,EAAE,CAAC;IAEnF,MAAM,cAAc,mCACf,MAAM,KACT,aAAa,EAAE,GAAG,EAAE,CAAC,cAAc,GACpC,CAAC;IAEF,OAAO,cAAc,CAAC;AACxB,CAAC;AAXD,0FAWC;AAcD;;;;;GAKG;AACH,SAAgB,iCAAiC,CAAC,OAA+B;IAC/E,uCACK,OAAO,KACV,iBAAiB,EAAE,SAAS,EAC5B,qBAAqB,EAAE,uCAAuC,CAAC,OAAO,CAAC,qBAAqB,CAAC,IAC7F;AACJ,CAAC;AAND,8EAMC"}
@@ -0,0 +1,7 @@
1
+ import { MockItemStorageFixture } from '../mock/mock.item.storage.fixture';
2
+ /**
3
+ * Describes accessor driver tests, using a MockItemCollectionFixture.
4
+ *
5
+ * @param f
6
+ */
7
+ export declare function describeFirebaseStorageAccessorDriverTests(f: MockItemStorageFixture): void;
@@ -0,0 +1,337 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.describeFirebaseStorageAccessorDriverTests = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const test_1 = require("@dereekb/util/test");
6
+ const util_1 = require("@dereekb/util");
7
+ /**
8
+ * Describes accessor driver tests, using a MockItemCollectionFixture.
9
+ *
10
+ * @param f
11
+ */
12
+ function describeFirebaseStorageAccessorDriverTests(f) {
13
+ describe('FirebaseStorageAccessor', () => {
14
+ describe('file()', () => {
15
+ const doesNotExistFilePath = 'test.png';
16
+ let doesNotExistFile;
17
+ const existsFilePath = 'exists.txt';
18
+ const existsFileContent = 'Hello! \ud83d\ude0a';
19
+ let existsFile;
20
+ beforeEach(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
21
+ doesNotExistFile = f.storageContext.file(doesNotExistFilePath);
22
+ existsFile = f.storageContext.file(existsFilePath);
23
+ yield existsFile.upload(existsFileContent, { stringFormat: 'raw', contentType: 'text/plain' });
24
+ }));
25
+ describe('uploading', () => {
26
+ let uploadFile;
27
+ beforeEach(() => {
28
+ uploadFile = f.storageContext.file('upload.txt');
29
+ });
30
+ describe('upload()', () => {
31
+ describe('string types', () => {
32
+ (0, test_1.itShouldFail)('if stringFormat is not defined in the options', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
33
+ const contentType = 'text/plain';
34
+ const data = existsFileContent;
35
+ yield (0, test_1.expectFail)(() => uploadFile.upload(data, { contentType }));
36
+ }));
37
+ it('should upload a raw UTF-16 string.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
38
+ const contentType = 'text/plain';
39
+ const data = existsFileContent;
40
+ yield uploadFile.upload(data, { stringFormat: 'raw', contentType });
41
+ const metadata = yield uploadFile.getMetadata();
42
+ expect(metadata.contentType).toBe(contentType);
43
+ const result = yield uploadFile.getBytes();
44
+ expect(result).toBeDefined();
45
+ const decoded = Buffer.from(result).toString('utf-8');
46
+ expect(decoded).toBe(data);
47
+ }));
48
+ it('should upload a base64 string.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
49
+ const bytes = yield existsFile.getBytes();
50
+ const data = Buffer.from(bytes).toString('base64');
51
+ const contentType = 'text/plain';
52
+ yield uploadFile.upload(data, { stringFormat: 'base64', contentType });
53
+ const metadata = yield uploadFile.getMetadata();
54
+ expect(metadata.contentType).toBe(contentType);
55
+ const result = yield uploadFile.getBytes();
56
+ expect(result).toBeDefined();
57
+ const decoded = Buffer.from(result).toString('utf-8');
58
+ expect(decoded).toBe(existsFileContent);
59
+ }));
60
+ it('should upload a base64url string.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
61
+ const bytes = yield existsFile.getBytes();
62
+ const data = Buffer.from(bytes).toString('base64url');
63
+ const contentType = 'text/plain';
64
+ yield uploadFile.upload(data, { stringFormat: 'base64url', contentType });
65
+ const metadata = yield uploadFile.getMetadata();
66
+ expect(metadata.contentType).toBe(contentType);
67
+ const result = yield uploadFile.getBytes();
68
+ expect(result).toBeDefined();
69
+ const decoded = Buffer.from(result).toString('utf-8');
70
+ expect(decoded).toBe(existsFileContent);
71
+ }));
72
+ });
73
+ describe('data types', () => {
74
+ // NOTE: We can really only test how a NodeJS environment will behave here.
75
+ it('should upload a Uint8Array', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
76
+ const dataBuffer = Buffer.from(existsFileContent, 'utf-8');
77
+ const data = new Uint8Array(dataBuffer);
78
+ const contentType = 'text/plain';
79
+ yield uploadFile.upload(data, { contentType });
80
+ const metadata = yield uploadFile.getMetadata();
81
+ expect(metadata.contentType).toBe(contentType);
82
+ }));
83
+ it('should upload a Buffer', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
84
+ const buffer = Buffer.from(existsFileContent, 'utf-8');
85
+ const contentType = 'text/plain';
86
+ yield uploadFile.upload(buffer, { contentType });
87
+ const metadata = yield uploadFile.getMetadata();
88
+ expect(metadata.contentType).toBe(contentType);
89
+ }));
90
+ it('should upload a Blob', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
91
+ const buffer = Buffer.from(existsFileContent, 'utf-8');
92
+ const data = new Uint8Array(buffer);
93
+ const blob = data.buffer; // blob-like
94
+ const contentType = 'text/plain';
95
+ yield uploadFile.upload(blob, { contentType });
96
+ const metadata = yield uploadFile.getMetadata();
97
+ expect(metadata.contentType).toBe(contentType);
98
+ }));
99
+ // NOTE: File extends Blob, so above test should cover it ok.
100
+ });
101
+ // TODO: Test uploading other types.
102
+ });
103
+ describe('uploadStream()', () => {
104
+ it('should upload using a WritableStream', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
105
+ if (uploadFile.uploadStream != null) {
106
+ const contentType = 'text/plain';
107
+ const data = existsFileContent;
108
+ const stream = uploadFile.uploadStream();
109
+ yield (0, util_1.useCallback)((cb) => stream.write(data, 'utf-8', cb));
110
+ yield (0, util_1.useCallback)((cb) => stream.end(cb));
111
+ const metadata = yield uploadFile.getMetadata();
112
+ expect(metadata.contentType).toBe(contentType);
113
+ const result = yield uploadFile.getBytes();
114
+ expect(result).toBeDefined();
115
+ const decoded = Buffer.from(result).toString('utf-8');
116
+ expect(decoded).toBe(data);
117
+ }
118
+ }));
119
+ });
120
+ });
121
+ describe('exists()', () => {
122
+ it('should return true if the file exists.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
123
+ const result = yield existsFile.exists();
124
+ expect(result).toBe(true);
125
+ }));
126
+ it('should return false if the file exists.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
127
+ const result = yield doesNotExistFile.exists();
128
+ expect(result).toBe(false);
129
+ }));
130
+ });
131
+ describe('getMetadata()', () => {
132
+ (0, test_1.itShouldFail)('if the file does not exist.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
133
+ yield (0, test_1.expectFail)(() => doesNotExistFile.getMetadata());
134
+ }));
135
+ it('should return the metadata.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
136
+ const result = yield existsFile.getMetadata();
137
+ expect(result).toBeDefined();
138
+ }));
139
+ });
140
+ describe('getBytes()', () => {
141
+ (0, test_1.itShouldFail)('if the file does not exist.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
142
+ yield (0, test_1.expectFail)(() => doesNotExistFile.getBytes());
143
+ }));
144
+ it('should download the file.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
145
+ const result = yield existsFile.getBytes();
146
+ expect(result).toBeDefined();
147
+ const decoded = Buffer.from(result).toString('utf-8');
148
+ expect(decoded).toBe(existsFileContent);
149
+ }));
150
+ describe('with maxDownloadSizeBytes configuration', () => {
151
+ it('should download up to the maxDownloadSizeBytes number of bytes', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
152
+ const charactersToTake = 5;
153
+ const result = yield existsFile.getBytes(charactersToTake); // each normal utf-8 character is 1 byte
154
+ expect(result).toBeDefined();
155
+ const decoded = Buffer.from(result).toString('utf-8');
156
+ expect(decoded).toBe(existsFileContent.substring(0, charactersToTake));
157
+ }));
158
+ });
159
+ });
160
+ describe('getStream()', () => {
161
+ it('should download the file.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
162
+ if (existsFile.getStream != null) {
163
+ // only test if the driver/file has getStream available
164
+ const stream = existsFile.getStream();
165
+ expect(stream).toBeDefined();
166
+ const buffer = yield (0, util_1.readableStreamToBuffer)(stream);
167
+ const decoded = buffer.toString('utf-8');
168
+ expect(decoded).toBe(existsFileContent);
169
+ }
170
+ }));
171
+ });
172
+ describe('getDownloadUrl()', () => {
173
+ (0, test_1.itShouldFail)('if the file does not exist.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
174
+ yield (0, test_1.expectFail)(() => doesNotExistFile.getDownloadUrl());
175
+ }));
176
+ it('should return the download url.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
177
+ const result = yield existsFile.getDownloadUrl();
178
+ expect(result).toBeDefined();
179
+ expect(typeof result).toBe('string');
180
+ }));
181
+ });
182
+ describe('delete()', () => {
183
+ (0, test_1.itShouldFail)('if the file does not exist.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
184
+ yield (0, test_1.expectFail)(() => doesNotExistFile.delete());
185
+ }));
186
+ it('should delete the file at the path.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
187
+ yield existsFile.delete();
188
+ const result = yield existsFile.exists();
189
+ expect(result).toBe(false);
190
+ }));
191
+ describe('ignoreNotFound=true', () => {
192
+ it('should not throw an error if the file does not exist.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
193
+ yield doesNotExistFile.delete({ ignoreNotFound: true });
194
+ }));
195
+ });
196
+ });
197
+ });
198
+ describe('folder()', () => {
199
+ const doesNotExistFolderPath = '/doesnotexist/';
200
+ let doesNotExistFolder;
201
+ const existsFolderPath = '/test/two/';
202
+ let existsFolder;
203
+ const existsFileName = 'exists.txt';
204
+ const existsFilePath = existsFolderPath + existsFileName;
205
+ const existsFileContent = 'Hello! \ud83d\ude0a';
206
+ let existsFile;
207
+ beforeEach(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
208
+ doesNotExistFolder = f.storageContext.folder(doesNotExistFolderPath);
209
+ existsFolder = f.storageContext.folder(existsFolderPath);
210
+ existsFile = f.storageContext.file(existsFilePath);
211
+ yield existsFile.upload(existsFileContent, { stringFormat: 'raw', contentType: 'text/plain' });
212
+ }));
213
+ describe('exists', () => {
214
+ it('should return false if there are no items in the folder.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
215
+ const exists = yield doesNotExistFolder.exists();
216
+ expect(exists).toBe(false);
217
+ }));
218
+ it('should return true if there are items in the folder.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
219
+ const exists = yield existsFolder.exists();
220
+ expect(exists).toBe(true);
221
+ }));
222
+ });
223
+ describe('list', () => {
224
+ const existsBFileName = 'a.txt';
225
+ const existsBFilePath = existsFolderPath + existsBFileName;
226
+ const existsCFolderPath = existsFolderPath + 'c/';
227
+ const existsCFilePath = existsCFolderPath + 'c.txt';
228
+ const otherFolderPath = '/other/';
229
+ const otherFolderFilePath = otherFolderPath + 'other.txt';
230
+ beforeEach(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
231
+ yield f.storageContext.file(existsBFilePath).upload(existsFileContent, { stringFormat: 'raw', contentType: 'text/plain' });
232
+ yield f.storageContext.file(existsCFilePath).upload(existsFileContent, { stringFormat: 'raw', contentType: 'text/plain' });
233
+ yield f.storageContext.file(otherFolderFilePath).upload(existsFileContent, { stringFormat: 'raw', contentType: 'text/plain' });
234
+ }));
235
+ describe('file()', () => {
236
+ it('should return the file for the result.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
237
+ const result = yield existsFolder.list();
238
+ expect(result).toBeDefined();
239
+ const files = result.files();
240
+ const fileResult = files.find((x) => x.name === existsFileName);
241
+ const file = fileResult.file();
242
+ const exists = yield file.exists();
243
+ expect(exists).toBe(true);
244
+ }));
245
+ });
246
+ describe('folder()', () => {
247
+ it('should return the folder for the result.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
248
+ const rootFolder = yield f.storageContext.folder('/');
249
+ const result = yield rootFolder.list();
250
+ expect(result).toBeDefined();
251
+ const folders = result.folders();
252
+ const folderResult = folders.find((x) => x.name === 'test');
253
+ const folder = folderResult.folder();
254
+ const exists = yield folder.exists();
255
+ expect(exists).toBe(true);
256
+ }));
257
+ });
258
+ describe('next()', () => {
259
+ it('should return the next set of results.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
260
+ const maxResults = 1;
261
+ const rootFolder = yield f.storageContext.folder(existsFolderPath);
262
+ const result = yield rootFolder.list({ maxResults });
263
+ expect(result).toBeDefined();
264
+ const files = result.files();
265
+ expect(files.length).toBe(maxResults);
266
+ const next = yield result.next();
267
+ expect(next).toBeDefined();
268
+ const nextFiles = next.files();
269
+ expect(nextFiles.length).toBe(maxResults);
270
+ expect(nextFiles[0].storagePath.pathString).not.toBe(files[0].storagePath.pathString);
271
+ expect(next.hasNext).toBe(false);
272
+ }));
273
+ (0, test_1.itShouldFail)('if next() is called and hasNext was false.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
274
+ const rootFolder = yield f.storageContext.folder(existsFolderPath);
275
+ const result = yield rootFolder.list({});
276
+ expect(result.hasNext).toBe(false);
277
+ yield (0, test_1.expectFail)(() => result.next());
278
+ }));
279
+ });
280
+ it('should list all the direct files and folders that exist on the test path.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
281
+ const result = yield existsFolder.list();
282
+ expect(result).toBeDefined();
283
+ const files = result.files();
284
+ expect(files.length).toBe(2);
285
+ const fileNames = new Set(files.map((x) => x.name));
286
+ expect(fileNames).toContain(existsFileName);
287
+ expect(fileNames).toContain(existsBFileName);
288
+ const folders = result.folders();
289
+ expect(folders.length).toBe(1);
290
+ const folderNames = new Set(folders.map((x) => x.name));
291
+ expect(folderNames).toContain('c');
292
+ }));
293
+ it('should list all the direct folders that exist at the root.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
294
+ const rootFolder = yield f.storageContext.folder('/');
295
+ const result = yield rootFolder.list();
296
+ expect(result).toBeDefined();
297
+ const files = result.files();
298
+ expect(files.length).toBe(0); // files are under /test/ and /other/
299
+ const folders = result.folders();
300
+ expect(folders.length).toBe(2);
301
+ const names = new Set(folders.map((x) => x.name));
302
+ expect(names).toContain('test');
303
+ expect(names).toContain('other');
304
+ }));
305
+ describe('maxResults', () => {
306
+ it('should respect the max results.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
307
+ const maxResults = 1;
308
+ const rootFolder = yield f.storageContext.folder(existsFolderPath);
309
+ const result = yield rootFolder.list({ maxResults });
310
+ expect(result).toBeDefined();
311
+ const files = result.files();
312
+ expect(files.length).toBe(maxResults);
313
+ const folders = result.folders();
314
+ expect(folders.length).toBe(1);
315
+ const names = new Set(folders.map((x) => x.name));
316
+ expect(names).toContain('c');
317
+ }));
318
+ it('prefixes/folders are unaffected by maxResults.', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
319
+ const maxResults = 1;
320
+ const rootFolder = yield f.storageContext.folder('/');
321
+ const result = yield rootFolder.list({ maxResults });
322
+ expect(result).toBeDefined();
323
+ const files = result.files();
324
+ expect(files.length).toBe(0); // files are under /test/ and /other/
325
+ const folders = result.folders();
326
+ expect(folders.length).toBe(2);
327
+ const names = new Set(folders.map((x) => x.name));
328
+ expect(names).toContain('test');
329
+ expect(names).toContain('other');
330
+ }));
331
+ });
332
+ });
333
+ });
334
+ });
335
+ }
336
+ exports.describeFirebaseStorageAccessorDriverTests = describeFirebaseStorageAccessorDriverTests;
337
+ //# sourceMappingURL=test.driver.accessor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.driver.accessor.js","sourceRoot":"","sources":["../../../../../../../../packages/firebase/test/src/lib/common/storage/test.driver.accessor.ts"],"names":[],"mappings":";;;;AACA,6CAA8D;AAC9D,wCAAqF;AAGrF;;;;GAIG;AACH,SAAgB,0CAA0C,CA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