@dereekb/firebase 13.40.0 → 13.42.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.
- package/eslint/index.esm.js +145 -170
- package/eslint/package.json +3 -3
- package/index.esm.js +2865 -551
- package/package.json +5 -5
- package/src/lib/common/firestore/snapshot/snapshot.field.d.ts +4 -0
- package/src/lib/common/storage/context.d.ts +9 -1
- package/src/lib/common/storage/driver/accessor.d.ts +12 -0
- package/src/lib/common/storage/index.d.ts +1 -0
- package/src/lib/common/storage/storage.url.d.ts +69 -0
- package/src/lib/model/calendar/calendar.action.d.ts +34 -0
- package/src/lib/model/calendar/calendar.api.d.ts +147 -0
- package/src/lib/model/calendar/calendar.api.error.d.ts +24 -0
- package/src/lib/model/calendar/calendar.d.ts +460 -0
- package/src/lib/model/calendar/calendar.expand.d.ts +95 -0
- package/src/lib/model/calendar/calendar.ics.d.ts +322 -0
- package/src/lib/model/calendar/calendar.id.d.ts +110 -0
- package/src/lib/model/calendar/calendar.processing.d.ts +77 -0
- package/src/lib/model/calendar/calendar.query.d.ts +76 -0
- package/src/lib/model/calendar/calendar.schedule.d.ts +82 -0
- package/src/lib/model/calendar/calendar.type.d.ts +188 -0
- package/src/lib/model/calendar/calendar.util.d.ts +485 -0
- package/src/lib/model/calendar/index.d.ts +12 -0
- package/src/lib/model/index.d.ts +1 -0
- package/src/lib/model/notification/notification.message.d.ts +83 -0
- package/src/lib/model/notification/notification.query.d.ts +41 -0
- package/src/lib/model/oidcmodel/oidcmodel.query.d.ts +36 -0
- package/src/lib/model/storagefile/storagefile.api.d.ts +23 -2
- package/src/lib/model/storagefile/storagefile.create.d.ts +14 -3
- package/src/lib/model/storagefile/storagefile.query.d.ts +36 -0
- package/src/lib/model/system/index.d.ts +1 -0
- package/src/lib/model/system/system.scheduler.d.ts +235 -0
- package/test/index.esm.js +24 -1
- package/test/package.json +6 -6
package/test/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { performAsyncTasks, cachedGetter, bitwiseObjectDencoder, modelFieldConversions, compareStrings, waitForMs, isEvenNumber, unique, arrayFactory, mapGetter, randomNumberFactory, randomFromArrayFactory, idBatchFactory, arrayContainsDuplicateValue, useCallback, readableStreamToBuffer, SLASH_PATH_SEPARATOR } from '@dereekb/util';
|
|
2
2
|
import { initializeTestEnvironment } from '@firebase/rules-unit-testing';
|
|
3
3
|
export { assertFails, assertSucceeds } from '@firebase/rules-unit-testing';
|
|
4
|
-
import { firebaseStorageContextFactory, firestoreContextFactory, firebaseFirestoreClientDrivers, firebaseStorageClientDrivers, firestoreModelIdentity, snapshotConverterFunctions, firestoreBoolean, optionalFirestoreNumber, optionalFirestoreDate, optionalFirestoreArray, optionalFirestoreString, firestoreDate, firestoreBitwiseObjectMap, firestoreUniqueStringArray, firestoreNumber, firestoreString, firestoreUID, copyUserRelatedDataAccessorFactoryFunction, firestoreSubObject, defaultPagedItemPageDataConverter, AbstractFirestoreDocument, AbstractFirestoreDocumentWithParent, firebaseModelServiceFactory, grantFullAccessIfAdmin, firebaseModelsService, systemStateFirestoreCollection, allChildDocumentsUnderParent, where, makeDocuments, getDocumentSnapshotPairs, useDocumentSnapshot, useDocumentSnapshotData, firestoreIdBatchVerifierFactory, limit, orderBy, limitToLast, whereDocumentId, loadAllFirestoreDocumentSnapshotPairs, loadAllFirestoreDocumentSnapshot, iterateFirestoreDocumentSnapshotPairs, iterateFirestoreDocumentSnapshots, iterateFirestoreDocumentSnapshotPairBatches, iterateFirestoreDocumentSnapshotBatches, whereStringHasRootIdentityModelKey, whereStringValueHasPrefix, whereDateIsAfterWithSort, whereDateIsBeforeWithSort, whereDateIsOnOrAfterWithSort, whereDateIsOnOrBeforeWithSort, whereDateIsInRange, whereDateIsBetween, startAt, orderByDocumentId, startAtValue, startAfter, endAt, endAtValue, endBefore, streamFromOnSnapshot, latestSnapshotsFromDocuments, newDocuments, loadDocumentsForDocumentReferences, loadDocumentsForDocumentReferencesFromValues, loadDocumentsForKeys, loadDocumentsForKeysFromValues, loadDocumentsForIds, loadDocumentsForIdsFromValues, firestoreDocumentLoader, setIdAndKeyFromKeyIdRefOnDocumentData, firestoreModelIdFromDocument, firestoreModelIdsFromDocuments, firestoreModelKeyFromDocument, firestoreModelKeysFromDocuments, documentReferenceFromDocument, documentReferencesFromDocuments, limitedFirestoreDocumentAccessorSnapshotCache, mapLatestSnapshotsFromDocuments, streamDocumentSnapshotsData, dataFromDocumentSnapshots, streamDocumentSnapshotDataPairs, streamDocumentSnapshotDataPairsWithData, getDocumentSnapshots, getDocumentSnapshotPair, getDocumentSnapshotDataPair, getDocumentSnapshotDataPairs, getDocumentSnapshotDataPairsWithData, getDocumentSnapshotDataTuples, getDocumentSnapshotData, getDocumentSnapshotsData, getDataFromDocumentSnapshots, loadDocumentsForSnapshots, firestoreDocumentSnapshotPairsLoader, documentData, documentDataFunction, documentDataWithIdAndKey, setIdAndKeyFromSnapshotOnDocumentData, firebaseQuerySnapshotAccumulator, firebaseQueryItemAccumulator, uploadFileWithStream, iterateStorageListFilesByEachFile } from '@dereekb/firebase';
|
|
4
|
+
import { firebaseStorageContextFactory, firestoreContextFactory, firebaseFirestoreClientDrivers, firebaseStorageClientDrivers, firestoreModelIdentity, snapshotConverterFunctions, firestoreBoolean, optionalFirestoreNumber, optionalFirestoreDate, optionalFirestoreArray, optionalFirestoreString, firestoreDate, firestoreBitwiseObjectMap, firestoreUniqueStringArray, firestoreNumber, firestoreString, firestoreUID, copyUserRelatedDataAccessorFactoryFunction, firestoreSubObject, defaultPagedItemPageDataConverter, AbstractFirestoreDocument, AbstractFirestoreDocumentWithParent, firebaseModelServiceFactory, grantFullAccessIfAdmin, firebaseModelsService, systemStateFirestoreCollection, allChildDocumentsUnderParent, where, makeDocuments, getDocumentSnapshotPairs, useDocumentSnapshot, useDocumentSnapshotData, firestoreIdBatchVerifierFactory, limit, orderBy, limitToLast, whereDocumentId, loadAllFirestoreDocumentSnapshotPairs, loadAllFirestoreDocumentSnapshot, iterateFirestoreDocumentSnapshotPairs, iterateFirestoreDocumentSnapshots, iterateFirestoreDocumentSnapshotPairBatches, iterateFirestoreDocumentSnapshotBatches, whereStringHasRootIdentityModelKey, whereStringValueHasPrefix, whereDateIsAfterWithSort, whereDateIsBeforeWithSort, whereDateIsOnOrAfterWithSort, whereDateIsOnOrBeforeWithSort, whereDateIsInRange, whereDateIsBetween, startAt, orderByDocumentId, startAtValue, startAfter, endAt, endAtValue, endBefore, streamFromOnSnapshot, latestSnapshotsFromDocuments, newDocuments, loadDocumentsForDocumentReferences, loadDocumentsForDocumentReferencesFromValues, loadDocumentsForKeys, loadDocumentsForKeysFromValues, loadDocumentsForIds, loadDocumentsForIdsFromValues, firestoreDocumentLoader, setIdAndKeyFromKeyIdRefOnDocumentData, firestoreModelIdFromDocument, firestoreModelIdsFromDocuments, firestoreModelKeyFromDocument, firestoreModelKeysFromDocuments, documentReferenceFromDocument, documentReferencesFromDocuments, limitedFirestoreDocumentAccessorSnapshotCache, mapLatestSnapshotsFromDocuments, streamDocumentSnapshotsData, dataFromDocumentSnapshots, streamDocumentSnapshotDataPairs, streamDocumentSnapshotDataPairsWithData, getDocumentSnapshots, getDocumentSnapshotPair, getDocumentSnapshotDataPair, getDocumentSnapshotDataPairs, getDocumentSnapshotDataPairsWithData, getDocumentSnapshotDataTuples, getDocumentSnapshotData, getDocumentSnapshotsData, getDataFromDocumentSnapshots, loadDocumentsForSnapshots, firestoreDocumentSnapshotPairsLoader, documentData, documentDataFunction, documentDataWithIdAndKey, setIdAndKeyFromSnapshotOnDocumentData, firebaseQuerySnapshotAccumulator, firebaseQueryItemAccumulator, storagePublicDownloadUrl, uploadFileWithStream, iterateStorageListFilesByEachFile } from '@dereekb/firebase';
|
|
5
5
|
import { setLogLevel } from 'firebase/firestore';
|
|
6
6
|
import { AbstractTestContextFixture, instanceWrapTestContextFactory, AbstractWrappedFixtureWithInstance, itShouldFail, callbackTest, expectFail } from '@dereekb/util/test';
|
|
7
7
|
import { existsSync, readFileSync, createReadStream } from 'node:fs';
|
|
@@ -13221,6 +13221,29 @@ function _ts_generator(thisArg, body) {
|
|
|
13221
13221
|
})();
|
|
13222
13222
|
});
|
|
13223
13223
|
});
|
|
13224
|
+
describe('getPublicUrl()', function() {
|
|
13225
|
+
it('should be reproducible by storagePublicDownloadUrl() from the bucket and path alone.', function() {
|
|
13226
|
+
// The point of this case: the CLIENT derives a public url with storagePublicDownloadUrl() rather
|
|
13227
|
+
// than calling anything, and that derivation is only useful if it matches what the SERVER actually
|
|
13228
|
+
// produces. Only the server driver implements getPublicUrl(), so this pins the shared function
|
|
13229
|
+
// against the real `@google-cloud/storage` output instead of against a reading of its source.
|
|
13230
|
+
if (existsFile.getPublicUrl) {
|
|
13231
|
+
var publicUrl = existsFile.getPublicUrl();
|
|
13232
|
+
var _existsFile_storagePath = existsFile.storagePath, bucketId = _existsFile_storagePath.bucketId, pathString = _existsFile_storagePath.pathString;
|
|
13233
|
+
// split off the origin the server resolved (localhost in the emulator, GCS in production) and
|
|
13234
|
+
// hand it back, so what is under test is the bucket + path half of the url
|
|
13235
|
+
var apiEndpoint = publicUrl.slice(0, publicUrl.indexOf("/".concat(bucketId, "/")));
|
|
13236
|
+
expect(apiEndpoint).toBeTruthy();
|
|
13237
|
+
expect(storagePublicDownloadUrl({
|
|
13238
|
+
apiEndpoint: apiEndpoint,
|
|
13239
|
+
storagePath: {
|
|
13240
|
+
bucketId: bucketId,
|
|
13241
|
+
pathString: pathString
|
|
13242
|
+
}
|
|
13243
|
+
})).toBe(publicUrl);
|
|
13244
|
+
}
|
|
13245
|
+
});
|
|
13246
|
+
});
|
|
13224
13247
|
// Cannot be tested, will throw "Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information."
|
|
13225
13248
|
describe('getSignedUrl()', function() {
|
|
13226
13249
|
it('should return the signed read url.', function() {
|
package/test/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase/test",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.42.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@dereekb/date": "13.
|
|
7
|
-
"@dereekb/firebase": "13.
|
|
8
|
-
"@dereekb/model": "13.
|
|
9
|
-
"@dereekb/rxjs": "13.
|
|
10
|
-
"@dereekb/util": "13.
|
|
6
|
+
"@dereekb/date": "13.42.0",
|
|
7
|
+
"@dereekb/firebase": "13.42.0",
|
|
8
|
+
"@dereekb/model": "13.42.0",
|
|
9
|
+
"@dereekb/rxjs": "13.42.0",
|
|
10
|
+
"@dereekb/util": "13.42.0",
|
|
11
11
|
"@firebase/rules-unit-testing": "5.0.0",
|
|
12
12
|
"date-fns": "^4.1.0",
|
|
13
13
|
"firebase": "^12.12.1",
|