@proteinjs/db-file 1.9.0 → 1.10.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/CHANGELOG.md +22 -0
- package/dist/generated/index.js +1 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/src/FileStorage.d.ts +19 -6
- package/dist/src/FileStorage.d.ts.map +1 -1
- package/dist/src/FileStorage.js +33 -8
- package/dist/src/FileStorage.js.map +1 -1
- package/dist/src/FileVariantMaker.d.ts +8 -3
- package/dist/src/FileVariantMaker.d.ts.map +1 -1
- package/dist/src/FileVariantMaker.js.map +1 -1
- package/dist/src/tables/FileTable.d.ts +28 -3
- package/dist/src/tables/FileTable.d.ts.map +1 -1
- package/dist/src/tables/FileTable.js +23 -0
- package/dist/src/tables/FileTable.js.map +1 -1
- package/dist/test/FileDerivedProvenance.test.d.ts +2 -0
- package/dist/test/FileDerivedProvenance.test.d.ts.map +1 -0
- package/dist/test/FileDerivedProvenance.test.js +420 -0
- package/dist/test/FileDerivedProvenance.test.js.map +1 -0
- package/dist/test/FileMediaMetadata.test.js +30 -0
- package/dist/test/FileMediaMetadata.test.js.map +1 -1
- package/generated/index.ts +1 -1
- package/package.json +2 -2
- package/src/FileStorage.ts +32 -7
- package/src/FileVariantMaker.ts +8 -3
- package/src/tables/FileTable.ts +47 -4
- package/test/FileDerivedProvenance.test.ts +248 -0
- package/test/FileMediaMetadata.test.ts +19 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileMediaMetadata.test.js","sourceRoot":"","sources":["../../test/FileMediaMetadata.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAA8C;AAE9C,+CAA8C;AAC9C,kDAAiD;AAEjD,6DAA4D;AAE5D;IAAA;QACW,UAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IAqB7C,CAAC;IAnBO,gDAAU,GAAhB,UAAiB,IAAU,EAAE,QAA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CAAC,WAAW,mCAAI,SAAS,CAAC,CAAC,aAAa,EAAE,CAAC;;;;SACtD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/generated/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ import '@proteinjs/user';
|
|
|
9
9
|
/** Generate Source Graph */
|
|
10
10
|
|
|
11
11
|
const sourceGraph =
|
|
12
|
-
'{"options":{"directed":true,"multigraph":false,"compound":false},"nodes":[{"v":"@proteinjs/db-file/FileCopyForOthers","value":{"packageName":"@proteinjs/db-file","name":"FileCopyForOthers","filePath":"src/FileCopyForOthers.ts","qualifiedName":"@proteinjs/db-file/FileCopyForOthers","properties":[],"methods":[{"name":"appliesTo","returnType":{"packageName":"","name":"boolean","filePath":null,"qualifiedName":"/boolean","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}}]},{"name":"make","returnType":{"packageName":"","name":"Promise<Buffer>","filePath":null,"qualifiedName":"/Promise<Buffer>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}},{"name":"bytes","type":{"packageName":"","name":"Buffer","filePath":null,"qualifiedName":"/Buffer","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/reflection","name":"Loadable","filePath":null,"qualifiedName":"@proteinjs/reflection/Loadable","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/reflection/Loadable"},{"v":"/Error"},{"v":"@proteinjs/db-file/FileReachabilityResolver","value":{"packageName":"@proteinjs/db-file","name":"FileReachabilityResolver","filePath":"src/FileReachabilityResolver.ts","qualifiedName":"@proteinjs/db-file/FileReachabilityResolver","properties":[],"methods":[{"name":"canReadViaReference","returnType":{"packageName":"","name":"Promise<boolean>","filePath":null,"qualifiedName":"/Promise<boolean>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/reflection","name":"Loadable","filePath":null,"qualifiedName":"@proteinjs/reflection/Loadable","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/db-file/DefaultFileStorageDriverFactory","value":{"packageName":"@proteinjs/db-file","name":"DefaultFileStorageDriverFactory","filePath":"src/FileStorage.ts","qualifiedName":"@proteinjs/db-file/DefaultFileStorageDriverFactory","properties":[],"methods":[{"name":"getDriver","returnType":{"packageName":"@proteinjs/db-file","name":"FileStorageDriver","filePath":null,"qualifiedName":"@proteinjs/db-file/FileStorageDriver","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/reflection","name":"Loadable","filePath":null,"qualifiedName":"@proteinjs/reflection/Loadable","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/db-file/FileStorage","value":{"packageName":"@proteinjs/db-file","name":"FileStorage","filePath":"src/FileStorage.ts","qualifiedName":"@proteinjs/db-file/FileStorage","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"driver","type":{"packageName":"@proteinjs/db-file","name":"FileStorageDriver","filePath":null,"qualifiedName":"@proteinjs/db-file/FileStorageDriver","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"derivations","type":null,"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"serviceMetadata","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"logger","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private"}],"methods":[{"name":"getDriver","returnType":{"packageName":"@proteinjs/db-file","name":"FileStorageDriver","filePath":null,"qualifiedName":"@proteinjs/db-file/FileStorageDriver","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"public","parameters":[]},{"name":"createFile","returnType":{"packageName":"","name":"Promise<File>","filePath":null,"qualifiedName":"/Promise<File>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fileMetaData","type":{"packageName":"","name":"Omit<File, keyof ScopedRecord>","filePath":null,"qualifiedName":"/Omit<File, keyof ScopedRecord>","typeParameters":null,"directParents":null}},{"name":"fileData","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"getFile","returnType":{"packageName":"","name":"Promise<File>","filePath":null,"qualifiedName":"/Promise<File>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"getVariant","returnType":{"packageName":"","name":"Promise<File | undefined>","filePath":null,"qualifiedName":"/Promise<File | undefined>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"kind","type":{"packageName":"@proteinjs/db-file","name":"FileVariantKind","filePath":null,"qualifiedName":"@proteinjs/db-file/FileVariantKind","typeParameters":null,"directParents":null}}]},{"name":"deriveVariants","returnType":{"packageName":"","name":"Promise<{ file: File; variants: Partial<Record<FileVariantKind, File>> }>","filePath":null,"qualifiedName":"/Promise<{ file: File; variants: Partial<Record<FileVariantKind, File>> }>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}},{"name":"bytes","type":{"packageName":"","name":"Buffer","filePath":null,"qualifiedName":"/Buffer","typeParameters":null,"directParents":null}}]},{"name":"getFileData","returnType":{"packageName":"","name":"Promise<string>","filePath":null,"qualifiedName":"/Promise<string>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"getAuthorizedFileData","returnType":{"packageName":"","name":"Promise<string>","filePath":null,"qualifiedName":"/Promise<string>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}}]},{"name":"getSignedUrl","returnType":{"packageName":"","name":"Promise<string | undefined>","filePath":null,"qualifiedName":"/Promise<string | undefined>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"options","type":{"packageName":"@proteinjs/db-file","name":"{ ttlMs?: number }","filePath":null,"qualifiedName":"@proteinjs/db-file/{ ttlMs?: number }","typeParameters":null,"directParents":null}}]},{"name":"updateFileData","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"data","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"updateFile","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"","name":"Omit<File, keyof ScopedRecord>","filePath":null,"qualifiedName":"/Omit<File, keyof ScopedRecord>","typeParameters":null,"directParents":null}}]},{"name":"deleteFile","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"servedFileId","returnType":{"packageName":"","name":"Promise<string>","filePath":null,"qualifiedName":"/Promise<string>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}}]},{"name":"ownedByCaller","returnType":{"packageName":"","name":"boolean","filePath":null,"qualifiedName":"/boolean","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}}]},{"name":"makeCopyForOthers","returnType":{"packageName":"","name":"Promise<string>","filePath":null,"qualifiedName":"/Promise<string>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}}]},{"name":"deriveOnce","returnType":{"packageName":"","name":"Promise<string | undefined>","filePath":null,"qualifiedName":"/Promise<string | undefined>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}},{"name":"kind","type":{"packageName":"@proteinjs/db-file","name":"FileVariantKind","filePath":null,"qualifiedName":"@proteinjs/db-file/FileVariantKind","typeParameters":null,"directParents":null}}]},{"name":"makeVariant","returnType":{"packageName":"","name":"Promise<string>","filePath":null,"qualifiedName":"/Promise<string>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}},{"name":"kind","type":{"packageName":"@proteinjs/db-file","name":"FileVariantKind","filePath":null,"qualifiedName":"@proteinjs/db-file/FileVariantKind","typeParameters":null,"directParents":null}},{"name":"bytes","type":{"packageName":"","name":"Buffer","filePath":null,"qualifiedName":"/Buffer","typeParameters":null,"directParents":null}}]},{"name":"dropDerivedFiles","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}}]},{"name":"notFound","returnType":{"packageName":"@proteinjs/service","name":"ServiceRefusal","filePath":null,"qualifiedName":"@proteinjs/service/ServiceRefusal","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private","parameters":[]}],"typeParameters":[],"directParentInterfaces":[{"packageName":"@proteinjs/db-file","name":"FileStorageService","filePath":null,"qualifiedName":"@proteinjs/db-file/FileStorageService","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/db-file/FileStorageService","value":{"packageName":"@proteinjs/db-file","name":"FileStorageService","filePath":"src/services/FileStorageService.ts","qualifiedName":"@proteinjs/db-file/FileStorageService","properties":[],"methods":[{"name":"createFile","returnType":{"packageName":"","name":"Promise<File>","filePath":null,"qualifiedName":"/Promise<File>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"fileMetaData","type":{"packageName":"","name":"Omit<File, keyof ScopedRecord>","filePath":null,"qualifiedName":"/Omit<File, keyof ScopedRecord>","typeParameters":null,"directParents":null}},{"name":"fileData","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"getFile","returnType":{"packageName":"","name":"Promise<File>","filePath":null,"qualifiedName":"/Promise<File>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"getFileData","returnType":{"packageName":"","name":"Promise<string>","filePath":null,"qualifiedName":"/Promise<string>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"updateFileData","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"data","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"updateFile","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"","name":"Omit<File, keyof ScopedRecord>","filePath":null,"qualifiedName":"/Omit<File, keyof ScopedRecord>","typeParameters":null,"directParents":null}}]},{"name":"deleteFile","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/service","name":"Service","filePath":null,"qualifiedName":"@proteinjs/service/Service","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"/\'not-found\' | \'precondition-failed\' | \'forbidden\' | \'unavailable\' | \'unknown\'"},{"v":"@proteinjs/db-file/FileStorageTableWatcher","value":{"packageName":"@proteinjs/db-file","name":"FileStorageTableWatcher","filePath":"src/FileStorageTableWatcher.ts","qualifiedName":"@proteinjs/db-file/FileStorageTableWatcher","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"logger","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private"}],"methods":[{"name":"name","returnType":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[]},{"name":"table","returnType":{"packageName":"","name":"Table<File>","filePath":null,"qualifiedName":"/Table<File>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[]},{"name":"beforeDelete","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"recordsToDelete","type":{"packageName":"","name":"T[]","filePath":null,"qualifiedName":"/T[]","typeParameters":null,"directParents":null}},{"name":"initialQb","type":{"packageName":"","name":"QueryBuilder<T>","filePath":null,"qualifiedName":"/QueryBuilder<T>","typeParameters":null,"directParents":null}},{"name":"deleteQb","type":{"packageName":"","name":"QueryBuilder<T>","filePath":null,"qualifiedName":"/QueryBuilder<T>","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParentInterfaces":[{"packageName":"@proteinjs/db","name":"TableWatcher","filePath":null,"qualifiedName":"@proteinjs/db/TableWatcher","properties":[],"methods":[],"typeParameters":["@proteinjs/db-file/File"],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/db/TableWatcher"},{"v":"/\'preview\' | \'stage\'"},{"v":"/readonly FileVariantKind[]"},{"v":"@proteinjs/db-file/FileVariantMaker","value":{"packageName":"@proteinjs/db-file","name":"FileVariantMaker","filePath":"src/FileVariantMaker.ts","qualifiedName":"@proteinjs/db-file/FileVariantMaker","properties":[],"methods":[{"name":"appliesTo","returnType":{"packageName":"","name":"boolean","filePath":null,"qualifiedName":"/boolean","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}},{"name":"kind","type":{"packageName":"@proteinjs/db-file","name":"FileVariantKind","filePath":null,"qualifiedName":"@proteinjs/db-file/FileVariantKind","typeParameters":null,"directParents":null}}]},{"name":"make","returnType":{"packageName":"","name":"Promise<FileVariant>","filePath":null,"qualifiedName":"/Promise<FileVariant>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}},{"name":"bytes","type":{"packageName":"","name":"Buffer","filePath":null,"qualifiedName":"/Buffer","typeParameters":null,"directParents":null}},{"name":"kind","type":{"packageName":"@proteinjs/db-file","name":"FileVariantKind","filePath":null,"qualifiedName":"@proteinjs/db-file/FileVariantKind","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/reflection","name":"Loadable","filePath":null,"qualifiedName":"@proteinjs/reflection/Loadable","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/db-file/getFile","value":{"packageName":"@proteinjs/db-file","name":"getFile","filePath":"src/routes/getFile.ts","qualifiedName":"@proteinjs/db-file/getFile","type":{"packageName":"@proteinjs/server-api","name":"Route","filePath":null,"qualifiedName":"@proteinjs/server-api/Route","typeParameters":[],"directParents":[{"packageName":"@proteinjs/server-api","name":"Route","filePath":null,"qualifiedName":"@proteinjs/server-api/Route","typeParameters":[],"directParents":null}]},"isExported":true,"isConst":true,"sourceType":0}},{"v":"@proteinjs/server-api/Route"},{"v":"@proteinjs/db-file/getFileVariant","value":{"packageName":"@proteinjs/db-file","name":"getFileVariant","filePath":"src/routes/getFileVariant.ts","qualifiedName":"@proteinjs/db-file/getFileVariant","type":{"packageName":"@proteinjs/server-api","name":"Route","filePath":null,"qualifiedName":"@proteinjs/server-api/Route","typeParameters":[],"directParents":[{"packageName":"@proteinjs/server-api","name":"Route","filePath":null,"qualifiedName":"@proteinjs/server-api/Route","typeParameters":[],"directParents":null}]},"isExported":true,"isConst":true,"sourceType":0}},{"v":"@proteinjs/db-file/FileData","value":{"packageName":"@proteinjs/db-file","name":"FileData","filePath":"src/tables/FileDataTable.ts","qualifiedName":"@proteinjs/db-file/FileData","properties":[{"name":"file","type":{"packageName":"","name":"Reference<File>","filePath":null,"qualifiedName":"/Reference<File>","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"order","type":{"packageName":"","name":"number","filePath":null,"qualifiedName":"/number","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"data","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/user","name":"ScopedRecord","filePath":null,"qualifiedName":"@proteinjs/user/ScopedRecord","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/user/ScopedRecord"},{"v":"@proteinjs/db-file/FileDataTable","value":{"packageName":"@proteinjs/db-file","name":"FileDataTable","filePath":"src/tables/FileDataTable.ts","qualifiedName":"@proteinjs/db-file/FileDataTable","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"name","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"auth","type":{"packageName":"","name":"Table<FileData>[\'auth\']","filePath":null,"qualifiedName":"/Table<FileData>[\'auth\']","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"columns","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParentInterfaces":[],"directParentClasses":[{"packageName":"@proteinjs/db","name":"Table","filePath":null,"qualifiedName":"@proteinjs/db/Table","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[],"typeParameters":["@proteinjs/db-file/FileData"],"directParentInterfaces":[],"directParentClasses":[]}],"sourceType":2}},{"v":"@proteinjs/db/Table"},{"v":"@proteinjs/db-file/File","value":{"packageName":"@proteinjs/db-file","name":"File","filePath":"src/tables/FileTable.ts","qualifiedName":"@proteinjs/db-file/File","properties":[{"name":"name","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"type","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"size","type":{"packageName":"","name":"number","filePath":null,"qualifiedName":"/number","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"preview","type":{"packageName":"","name":"Reference<File> | null","filePath":null,"qualifiedName":"/Reference<File> | null","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"stage","type":{"packageName":"","name":"Reference<File> | null","filePath":null,"qualifiedName":"/Reference<File> | null","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"variantOf","type":{"packageName":"","name":"Reference<File> | null","filePath":null,"qualifiedName":"/Reference<File> | null","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"copyForOthers","type":{"packageName":"","name":"Reference<File> | null","filePath":null,"qualifiedName":"/Reference<File> | null","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"width","type":{"packageName":"","name":"number","filePath":null,"qualifiedName":"/number","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"height","type":{"packageName":"","name":"number","filePath":null,"qualifiedName":"/number","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"durationMs","type":{"packageName":"","name":"number","filePath":null,"qualifiedName":"/number","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"sourceUrl","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"sourcePageUrl","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"retrievedAt","type":{"packageName":"","name":"Date","filePath":null,"qualifiedName":"/Date","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"license","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"licenseUrl","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"attribution","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"contentHash","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"origin","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"originModel","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/user","name":"ScopedRecord","filePath":null,"qualifiedName":"@proteinjs/user/ScopedRecord","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/db-file/FileTable","value":{"packageName":"@proteinjs/db-file","name":"FileTable","filePath":"src/tables/FileTable.ts","qualifiedName":"@proteinjs/db-file/FileTable","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"name","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"auth","type":{"packageName":"","name":"Table<File>[\'auth\']","filePath":null,"qualifiedName":"/Table<File>[\'auth\']","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"columns","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"indexes","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParentInterfaces":[],"directParentClasses":[{"packageName":"@proteinjs/db","name":"Table","filePath":null,"qualifiedName":"@proteinjs/db/Table","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[],"typeParameters":["@proteinjs/db-file/File"],"directParentInterfaces":[],"directParentClasses":[]}],"sourceType":2}},{"v":"@proteinjs/service/Service"}],"edges":[{"v":"@proteinjs/db-file/FileCopyForOthers","w":"@proteinjs/reflection/Loadable","value":"extends interface"},{"v":"@proteinjs/db-file/FileReachabilityResolver","w":"@proteinjs/reflection/Loadable","value":"extends interface"},{"v":"@proteinjs/db-file/DefaultFileStorageDriverFactory","w":"@proteinjs/reflection/Loadable","value":"extends interface"},{"v":"@proteinjs/db-file/FileStorage","w":"@proteinjs/db-file/FileStorageService","value":"implements interface"},{"v":"@proteinjs/db-file/FileStorageTableWatcher","w":"@proteinjs/db/TableWatcher","value":"implements interface"},{"v":"@proteinjs/db-file/FileVariantMaker","w":"@proteinjs/reflection/Loadable","value":"extends interface"},{"v":"@proteinjs/db-file/getFile","w":"@proteinjs/server-api/Route","value":"has type"},{"v":"@proteinjs/db-file/getFileVariant","w":"@proteinjs/server-api/Route","value":"has type"},{"v":"@proteinjs/db-file/FileData","w":"@proteinjs/user/ScopedRecord","value":"extends interface"},{"v":"@proteinjs/db-file/FileDataTable","w":"@proteinjs/db/Table","value":"extends class"},{"v":"@proteinjs/db-file/File","w":"@proteinjs/user/ScopedRecord","value":"extends interface"},{"v":"@proteinjs/db-file/FileTable","w":"@proteinjs/db/Table","value":"extends class"},{"v":"@proteinjs/db-file/FileStorageService","w":"@proteinjs/service/Service","value":"extends interface"}]}';
|
|
12
|
+
'{"options":{"directed":true,"multigraph":false,"compound":false},"nodes":[{"v":"@proteinjs/db-file/FileCopyForOthers","value":{"packageName":"@proteinjs/db-file","name":"FileCopyForOthers","filePath":"src/FileCopyForOthers.ts","qualifiedName":"@proteinjs/db-file/FileCopyForOthers","properties":[],"methods":[{"name":"appliesTo","returnType":{"packageName":"","name":"boolean","filePath":null,"qualifiedName":"/boolean","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}}]},{"name":"make","returnType":{"packageName":"","name":"Promise<Buffer>","filePath":null,"qualifiedName":"/Promise<Buffer>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}},{"name":"bytes","type":{"packageName":"","name":"Buffer","filePath":null,"qualifiedName":"/Buffer","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/reflection","name":"Loadable","filePath":null,"qualifiedName":"@proteinjs/reflection/Loadable","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/reflection/Loadable"},{"v":"/Error"},{"v":"@proteinjs/db-file/FileReachabilityResolver","value":{"packageName":"@proteinjs/db-file","name":"FileReachabilityResolver","filePath":"src/FileReachabilityResolver.ts","qualifiedName":"@proteinjs/db-file/FileReachabilityResolver","properties":[],"methods":[{"name":"canReadViaReference","returnType":{"packageName":"","name":"Promise<boolean>","filePath":null,"qualifiedName":"/Promise<boolean>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/reflection","name":"Loadable","filePath":null,"qualifiedName":"@proteinjs/reflection/Loadable","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/db-file/DefaultFileStorageDriverFactory","value":{"packageName":"@proteinjs/db-file","name":"DefaultFileStorageDriverFactory","filePath":"src/FileStorage.ts","qualifiedName":"@proteinjs/db-file/DefaultFileStorageDriverFactory","properties":[],"methods":[{"name":"getDriver","returnType":{"packageName":"@proteinjs/db-file","name":"FileStorageDriver","filePath":null,"qualifiedName":"@proteinjs/db-file/FileStorageDriver","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/reflection","name":"Loadable","filePath":null,"qualifiedName":"@proteinjs/reflection/Loadable","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/db-file/FileStorage","value":{"packageName":"@proteinjs/db-file","name":"FileStorage","filePath":"src/FileStorage.ts","qualifiedName":"@proteinjs/db-file/FileStorage","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"driver","type":{"packageName":"@proteinjs/db-file","name":"FileStorageDriver","filePath":null,"qualifiedName":"@proteinjs/db-file/FileStorageDriver","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"derivations","type":null,"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private"},{"name":"serviceMetadata","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"logger","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private"}],"methods":[{"name":"getDriver","returnType":{"packageName":"@proteinjs/db-file","name":"FileStorageDriver","filePath":null,"qualifiedName":"@proteinjs/db-file/FileStorageDriver","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"public","parameters":[]},{"name":"createFile","returnType":{"packageName":"","name":"Promise<File>","filePath":null,"qualifiedName":"/Promise<File>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fileMetaData","type":{"packageName":"","name":"Omit<File, keyof ScopedRecord>","filePath":null,"qualifiedName":"/Omit<File, keyof ScopedRecord>","typeParameters":null,"directParents":null}},{"name":"fileData","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"getFile","returnType":{"packageName":"","name":"Promise<File>","filePath":null,"qualifiedName":"/Promise<File>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"getVariant","returnType":{"packageName":"","name":"Promise<File | undefined>","filePath":null,"qualifiedName":"/Promise<File | undefined>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"kind","type":{"packageName":"@proteinjs/db-file","name":"FileVariantKind","filePath":null,"qualifiedName":"@proteinjs/db-file/FileVariantKind","typeParameters":null,"directParents":null}}]},{"name":"deriveVariants","returnType":{"packageName":"","name":"Promise<{ file: File; variants: Partial<Record<FileVariantKind, File>> }>","filePath":null,"qualifiedName":"/Promise<{ file: File; variants: Partial<Record<FileVariantKind, File>> }>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}},{"name":"bytes","type":{"packageName":"","name":"Buffer","filePath":null,"qualifiedName":"/Buffer","typeParameters":null,"directParents":null}}]},{"name":"getFileData","returnType":{"packageName":"","name":"Promise<string>","filePath":null,"qualifiedName":"/Promise<string>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"getAuthorizedFileData","returnType":{"packageName":"","name":"Promise<string>","filePath":null,"qualifiedName":"/Promise<string>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}}]},{"name":"getSignedUrl","returnType":{"packageName":"","name":"Promise<string | undefined>","filePath":null,"qualifiedName":"/Promise<string | undefined>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"options","type":{"packageName":"@proteinjs/db-file","name":"{ ttlMs?: number }","filePath":null,"qualifiedName":"@proteinjs/db-file/{ ttlMs?: number }","typeParameters":null,"directParents":null}}]},{"name":"updateFileData","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"data","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"updateFile","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"","name":"Omit<File, keyof ScopedRecord>","filePath":null,"qualifiedName":"/Omit<File, keyof ScopedRecord>","typeParameters":null,"directParents":null}}]},{"name":"deleteFile","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"servedFileId","returnType":{"packageName":"","name":"Promise<string>","filePath":null,"qualifiedName":"/Promise<string>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}}]},{"name":"ownedByCaller","returnType":{"packageName":"","name":"boolean","filePath":null,"qualifiedName":"/boolean","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}}]},{"name":"makeCopyForOthers","returnType":{"packageName":"","name":"Promise<string>","filePath":null,"qualifiedName":"/Promise<string>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}}]},{"name":"deriveOnce","returnType":{"packageName":"","name":"Promise<string | undefined>","filePath":null,"qualifiedName":"/Promise<string | undefined>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}},{"name":"kind","type":{"packageName":"@proteinjs/db-file","name":"FileVariantKind","filePath":null,"qualifiedName":"@proteinjs/db-file/FileVariantKind","typeParameters":null,"directParents":null}}]},{"name":"makeVariant","returnType":{"packageName":"","name":"Promise<string>","filePath":null,"qualifiedName":"/Promise<string>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}},{"name":"kind","type":{"packageName":"@proteinjs/db-file","name":"FileVariantKind","filePath":null,"qualifiedName":"@proteinjs/db-file/FileVariantKind","typeParameters":null,"directParents":null}},{"name":"bytes","type":{"packageName":"","name":"Buffer","filePath":null,"qualifiedName":"/Buffer","typeParameters":null,"directParents":null}}]},{"name":"dropDerivedFiles","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}}]},{"name":"provenanceOf","returnType":{"packageName":"","name":"Partial<File>","filePath":null,"qualifiedName":"/Partial<File>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}}]},{"name":"notFound","returnType":{"packageName":"@proteinjs/service","name":"ServiceRefusal","filePath":null,"qualifiedName":"@proteinjs/service/ServiceRefusal","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"private","parameters":[]}],"typeParameters":[],"directParentInterfaces":[{"packageName":"@proteinjs/db-file","name":"FileStorageService","filePath":null,"qualifiedName":"@proteinjs/db-file/FileStorageService","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/db-file/FileStorageService","value":{"packageName":"@proteinjs/db-file","name":"FileStorageService","filePath":"src/services/FileStorageService.ts","qualifiedName":"@proteinjs/db-file/FileStorageService","properties":[],"methods":[{"name":"createFile","returnType":{"packageName":"","name":"Promise<File>","filePath":null,"qualifiedName":"/Promise<File>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"fileMetaData","type":{"packageName":"","name":"Omit<File, keyof ScopedRecord>","filePath":null,"qualifiedName":"/Omit<File, keyof ScopedRecord>","typeParameters":null,"directParents":null}},{"name":"fileData","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"getFile","returnType":{"packageName":"","name":"Promise<File>","filePath":null,"qualifiedName":"/Promise<File>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"getFileData","returnType":{"packageName":"","name":"Promise<string>","filePath":null,"qualifiedName":"/Promise<string>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"updateFileData","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}},{"name":"data","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]},{"name":"updateFile","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"","name":"Omit<File, keyof ScopedRecord>","filePath":null,"qualifiedName":"/Omit<File, keyof ScopedRecord>","typeParameters":null,"directParents":null}}]},{"name":"deleteFile","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"fileId","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/service","name":"Service","filePath":null,"qualifiedName":"@proteinjs/service/Service","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"/\'not-found\' | \'precondition-failed\' | \'forbidden\' | \'unavailable\' | \'unknown\'"},{"v":"@proteinjs/db-file/FileStorageTableWatcher","value":{"packageName":"@proteinjs/db-file","name":"FileStorageTableWatcher","filePath":"src/FileStorageTableWatcher.ts","qualifiedName":"@proteinjs/db-file/FileStorageTableWatcher","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"logger","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"private"}],"methods":[{"name":"name","returnType":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[]},{"name":"table","returnType":{"packageName":"","name":"Table<File>","filePath":null,"qualifiedName":"/Table<File>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[]},{"name":"beforeDelete","returnType":{"packageName":"","name":"Promise<void>","filePath":null,"qualifiedName":"/Promise<void>","typeParameters":null,"directParents":null},"isAsync":true,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"recordsToDelete","type":{"packageName":"","name":"T[]","filePath":null,"qualifiedName":"/T[]","typeParameters":null,"directParents":null}},{"name":"initialQb","type":{"packageName":"","name":"QueryBuilder<T>","filePath":null,"qualifiedName":"/QueryBuilder<T>","typeParameters":null,"directParents":null}},{"name":"deleteQb","type":{"packageName":"","name":"QueryBuilder<T>","filePath":null,"qualifiedName":"/QueryBuilder<T>","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParentInterfaces":[{"packageName":"@proteinjs/db","name":"TableWatcher","filePath":null,"qualifiedName":"@proteinjs/db/TableWatcher","properties":[],"methods":[],"typeParameters":["@proteinjs/db-file/File"],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/db/TableWatcher"},{"v":"/\'preview\' | \'stage\'"},{"v":"/readonly FileVariantKind[]"},{"v":"@proteinjs/db-file/FileVariantMaker","value":{"packageName":"@proteinjs/db-file","name":"FileVariantMaker","filePath":"src/FileVariantMaker.ts","qualifiedName":"@proteinjs/db-file/FileVariantMaker","properties":[],"methods":[{"name":"appliesTo","returnType":{"packageName":"","name":"boolean","filePath":null,"qualifiedName":"/boolean","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}},{"name":"kind","type":{"packageName":"@proteinjs/db-file","name":"FileVariantKind","filePath":null,"qualifiedName":"@proteinjs/db-file/FileVariantKind","typeParameters":null,"directParents":null}}]},{"name":"make","returnType":{"packageName":"","name":"Promise<FileVariant>","filePath":null,"qualifiedName":"/Promise<FileVariant>","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":true,"isStatic":false,"visibility":"public","parameters":[{"name":"file","type":{"packageName":"@proteinjs/db-file","name":"File","filePath":null,"qualifiedName":"@proteinjs/db-file/File","typeParameters":null,"directParents":null}},{"name":"bytes","type":{"packageName":"","name":"Buffer","filePath":null,"qualifiedName":"/Buffer","typeParameters":null,"directParents":null}},{"name":"kind","type":{"packageName":"@proteinjs/db-file","name":"FileVariantKind","filePath":null,"qualifiedName":"@proteinjs/db-file/FileVariantKind","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/reflection","name":"Loadable","filePath":null,"qualifiedName":"@proteinjs/reflection/Loadable","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/db-file/getFile","value":{"packageName":"@proteinjs/db-file","name":"getFile","filePath":"src/routes/getFile.ts","qualifiedName":"@proteinjs/db-file/getFile","type":{"packageName":"@proteinjs/server-api","name":"Route","filePath":null,"qualifiedName":"@proteinjs/server-api/Route","typeParameters":[],"directParents":[{"packageName":"@proteinjs/server-api","name":"Route","filePath":null,"qualifiedName":"@proteinjs/server-api/Route","typeParameters":[],"directParents":null}]},"isExported":true,"isConst":true,"sourceType":0}},{"v":"@proteinjs/server-api/Route"},{"v":"@proteinjs/db-file/getFileVariant","value":{"packageName":"@proteinjs/db-file","name":"getFileVariant","filePath":"src/routes/getFileVariant.ts","qualifiedName":"@proteinjs/db-file/getFileVariant","type":{"packageName":"@proteinjs/server-api","name":"Route","filePath":null,"qualifiedName":"@proteinjs/server-api/Route","typeParameters":[],"directParents":[{"packageName":"@proteinjs/server-api","name":"Route","filePath":null,"qualifiedName":"@proteinjs/server-api/Route","typeParameters":[],"directParents":null}]},"isExported":true,"isConst":true,"sourceType":0}},{"v":"@proteinjs/service/Service"},{"v":"@proteinjs/db-file/FileData","value":{"packageName":"@proteinjs/db-file","name":"FileData","filePath":"src/tables/FileDataTable.ts","qualifiedName":"@proteinjs/db-file/FileData","properties":[{"name":"file","type":{"packageName":"","name":"Reference<File>","filePath":null,"qualifiedName":"/Reference<File>","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"order","type":{"packageName":"","name":"number","filePath":null,"qualifiedName":"/number","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"data","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/user","name":"ScopedRecord","filePath":null,"qualifiedName":"@proteinjs/user/ScopedRecord","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/user/ScopedRecord"},{"v":"@proteinjs/db-file/FileDataTable","value":{"packageName":"@proteinjs/db-file","name":"FileDataTable","filePath":"src/tables/FileDataTable.ts","qualifiedName":"@proteinjs/db-file/FileDataTable","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"name","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"auth","type":{"packageName":"","name":"Table<FileData>[\'auth\']","filePath":null,"qualifiedName":"/Table<FileData>[\'auth\']","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"columns","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParentInterfaces":[],"directParentClasses":[{"packageName":"@proteinjs/db","name":"Table","filePath":null,"qualifiedName":"@proteinjs/db/Table","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[],"typeParameters":["@proteinjs/db-file/FileData"],"directParentInterfaces":[],"directParentClasses":[]}],"sourceType":2}},{"v":"@proteinjs/db/Table"},{"v":"@proteinjs/db-file/File","value":{"packageName":"@proteinjs/db-file","name":"File","filePath":"src/tables/FileTable.ts","qualifiedName":"@proteinjs/db-file/File","properties":[{"name":"name","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"type","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"size","type":{"packageName":"","name":"number","filePath":null,"qualifiedName":"/number","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"preview","type":{"packageName":"","name":"Reference<File> | null","filePath":null,"qualifiedName":"/Reference<File> | null","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"stage","type":{"packageName":"","name":"Reference<File> | null","filePath":null,"qualifiedName":"/Reference<File> | null","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"variantOf","type":{"packageName":"","name":"Reference<File> | null","filePath":null,"qualifiedName":"/Reference<File> | null","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"copyForOthers","type":{"packageName":"","name":"Reference<File> | null","filePath":null,"qualifiedName":"/Reference<File> | null","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"width","type":{"packageName":"","name":"number","filePath":null,"qualifiedName":"/number","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"height","type":{"packageName":"","name":"number","filePath":null,"qualifiedName":"/number","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"durationMs","type":{"packageName":"","name":"number","filePath":null,"qualifiedName":"/number","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"transparent","type":{"packageName":"","name":"boolean","filePath":null,"qualifiedName":"/boolean","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"sourceUrl","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"sourcePageUrl","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"retrievedAt","type":{"packageName":"","name":"Date","filePath":null,"qualifiedName":"/Date","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"license","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"licenseUrl","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"attribution","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"contentHash","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"origin","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"originModel","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":true,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/user","name":"ScopedRecord","filePath":null,"qualifiedName":"@proteinjs/user/ScopedRecord","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/db-file/FileTable","value":{"packageName":"@proteinjs/db-file","name":"FileTable","filePath":"src/tables/FileTable.ts","qualifiedName":"@proteinjs/db-file/FileTable","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"provenanceColumns","type":{"packageName":"","name":"ReadonlyArray<keyof File>","filePath":null,"qualifiedName":"/ReadonlyArray<keyof File>","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":true,"visibility":"public"},{"name":"name","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"auth","type":{"packageName":"","name":"Table<File>[\'auth\']","filePath":null,"qualifiedName":"/Table<File>[\'auth\']","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"columns","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"indexes","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParentInterfaces":[],"directParentClasses":[{"packageName":"@proteinjs/db","name":"Table","filePath":null,"qualifiedName":"@proteinjs/db/Table","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[],"typeParameters":["@proteinjs/db-file/File"],"directParentInterfaces":[],"directParentClasses":[]}],"sourceType":2}}],"edges":[{"v":"@proteinjs/db-file/FileCopyForOthers","w":"@proteinjs/reflection/Loadable","value":"extends interface"},{"v":"@proteinjs/db-file/FileReachabilityResolver","w":"@proteinjs/reflection/Loadable","value":"extends interface"},{"v":"@proteinjs/db-file/DefaultFileStorageDriverFactory","w":"@proteinjs/reflection/Loadable","value":"extends interface"},{"v":"@proteinjs/db-file/FileStorage","w":"@proteinjs/db-file/FileStorageService","value":"implements interface"},{"v":"@proteinjs/db-file/FileStorageTableWatcher","w":"@proteinjs/db/TableWatcher","value":"implements interface"},{"v":"@proteinjs/db-file/FileVariantMaker","w":"@proteinjs/reflection/Loadable","value":"extends interface"},{"v":"@proteinjs/db-file/getFile","w":"@proteinjs/server-api/Route","value":"has type"},{"v":"@proteinjs/db-file/getFileVariant","w":"@proteinjs/server-api/Route","value":"has type"},{"v":"@proteinjs/db-file/FileStorageService","w":"@proteinjs/service/Service","value":"extends interface"},{"v":"@proteinjs/db-file/FileData","w":"@proteinjs/user/ScopedRecord","value":"extends interface"},{"v":"@proteinjs/db-file/FileDataTable","w":"@proteinjs/db/Table","value":"extends class"},{"v":"@proteinjs/db-file/File","w":"@proteinjs/user/ScopedRecord","value":"extends interface"},{"v":"@proteinjs/db-file/FileTable","w":"@proteinjs/db/Table","value":"extends class"}]}';
|
|
13
13
|
|
|
14
14
|
/** Generate Source Links */
|
|
15
15
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteinjs/db-file",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "File storage in the db",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
},
|
|
47
47
|
"main": "./dist/generated/index.js",
|
|
48
48
|
"types": "./dist/generated/index.d.ts",
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "1869253aa80229c8cd09077e450bb6804d2a2d57"
|
|
50
50
|
}
|
package/src/FileStorage.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Reference, getDbAsSystem } from '@proteinjs/db';
|
|
2
2
|
import { ScopedRecord, UserRepo, getScopedDb, getScopedDbAsSystem } from '@proteinjs/user';
|
|
3
|
-
import { File } from './tables/FileTable';
|
|
3
|
+
import { File, FileTable } from './tables/FileTable';
|
|
4
4
|
import { tables } from './tables/tables';
|
|
5
5
|
import { FileStorageService, getFileStorageService } from './services/FileStorageService';
|
|
6
6
|
import { FileStorageDriver } from './FileStorageDriver';
|
|
@@ -138,8 +138,9 @@ export class FileStorage implements FileStorageService {
|
|
|
138
138
|
* not derive it, gets its variant on the first request from a surface that draws it; every
|
|
139
139
|
* later request is served the same row without the maker). Server-only, like `getSignedUrl` —
|
|
140
140
|
* the browser asks by URL, never by service call. Access is the original's ({@link getFile});
|
|
141
|
-
* the variant is stored as the owner's own File whoever's read made it,
|
|
142
|
-
*
|
|
141
|
+
* the variant is stored as the owner's own File whoever's read made it, carrying the original's
|
|
142
|
+
* provenance ({@link FileTable.provenanceColumns}), and is served like any File afterwards —
|
|
143
|
+
* with the same non-owner copy rule.
|
|
143
144
|
* @returns The variant's File row, or `undefined` when the caller cannot read the original, no
|
|
144
145
|
* maker is registered, the maker does not apply to this file for this kind, or the
|
|
145
146
|
* maker could not make it of these bytes (the consumer then draws the original).
|
|
@@ -164,8 +165,9 @@ export class FileStorage implements FileStorageService {
|
|
|
164
165
|
/**
|
|
165
166
|
* Make and store every variant the registered maker applies to, with the original's bytes in
|
|
166
167
|
* hand (the ingest's door — one decode of bytes just stored, never a re-read). Each is named on
|
|
167
|
-
* the row
|
|
168
|
-
*
|
|
168
|
+
* the row and carries the original's provenance ({@link FileTable.provenanceColumns}); a kind
|
|
169
|
+
* the maker does not apply to is left unset (the read path may derive it later if the maker's
|
|
170
|
+
* rule changes). With no maker registered nothing is made.
|
|
169
171
|
* @returns The caller's file row with each variant made here named on it (the row as the caller
|
|
170
172
|
* holds it, not a re-read — an unset column stays unset), and the variant Files made.
|
|
171
173
|
*/
|
|
@@ -370,7 +372,8 @@ export class FileStorage implements FileStorageService {
|
|
|
370
372
|
|
|
371
373
|
/**
|
|
372
374
|
* Makes the copy (the maker's bytes, from the original's), stores it as a File in the owner's
|
|
373
|
-
* scope
|
|
375
|
+
* scope — the original's name, type, dimensions and provenance ({@link provenanceOf}) on it —
|
|
376
|
+
* and names it on the original's row. Two non-owners reading at once may both get here:
|
|
374
377
|
* the row's word wins — decided in ONE transaction (the read of the row and the write of its
|
|
375
378
|
* word together, so racing writers are serialized and the loser's transaction, retried, finds
|
|
376
379
|
* the winner named) — and a copy that lost is deleted after the commit, the first is served.
|
|
@@ -395,6 +398,7 @@ export class FileStorage implements FileStorageService {
|
|
|
395
398
|
...(file.width !== undefined && file.width !== null ? { width: file.width } : {}),
|
|
396
399
|
...(file.height !== undefined && file.height !== null ? { height: file.height } : {}),
|
|
397
400
|
...(file.durationMs !== undefined && file.durationMs !== null ? { durationMs: file.durationMs } : {}),
|
|
401
|
+
...this.provenanceOf(file),
|
|
398
402
|
scope: file.scope,
|
|
399
403
|
});
|
|
400
404
|
await driver.createFile(copy, copyBytes.toString('base64'));
|
|
@@ -453,7 +457,9 @@ export class FileStorage implements FileStorageService {
|
|
|
453
457
|
|
|
454
458
|
/**
|
|
455
459
|
* Makes the variant (the maker's answer from the original's bytes), stores it as a File in the
|
|
456
|
-
* OWNER's scope naming its original
|
|
460
|
+
* OWNER's scope naming its original and carrying the original's provenance ({@link provenanceOf}
|
|
461
|
+
* — the maker answers the bytes, their type and their dimensions, never where they came from),
|
|
462
|
+
* and names it on the original's row. Two readers may derive
|
|
457
463
|
* the same kind at once: the row's word wins — decided in ONE transaction, exactly as the copy
|
|
458
464
|
* for others is named — and the variant that lost is deleted after the commit. The maker's own
|
|
459
465
|
* failure (it could not make the variant of these bytes) is thrown as {@link FileVariantNotMade}
|
|
@@ -479,6 +485,7 @@ export class FileStorage implements FileStorageService {
|
|
|
479
485
|
size: made.bytes.length,
|
|
480
486
|
...(made.width !== undefined ? { width: made.width } : {}),
|
|
481
487
|
...(made.height !== undefined ? { height: made.height } : {}),
|
|
488
|
+
...this.provenanceOf(file),
|
|
482
489
|
variantOf: new Reference<File>(tables.File.name, file.id),
|
|
483
490
|
scope: file.scope,
|
|
484
491
|
});
|
|
@@ -522,6 +529,24 @@ export class FileStorage implements FileStorageService {
|
|
|
522
529
|
}
|
|
523
530
|
}
|
|
524
531
|
|
|
532
|
+
/**
|
|
533
|
+
* The provenance a derived File carries — its original's, column for column, as the table names
|
|
534
|
+
* them ({@link FileTable.provenanceColumns}): a rendition of the bytes came to exist the way the
|
|
535
|
+
* bytes did, from where they did, under the rights they carry. Only what the row holds is
|
|
536
|
+
* copied, so a row with no provenance derives rows with none — nothing is invented. A row that
|
|
537
|
+
* is itself derived already carries its original's, so a derivation of it carries the same.
|
|
538
|
+
*/
|
|
539
|
+
private provenanceOf(file: File): Partial<File> {
|
|
540
|
+
const provenance: Partial<File> = {};
|
|
541
|
+
for (const column of FileTable.provenanceColumns) {
|
|
542
|
+
const value = file[column];
|
|
543
|
+
if (value !== undefined && value !== null) {
|
|
544
|
+
Object.assign(provenance, { [column]: value });
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
return provenance;
|
|
548
|
+
}
|
|
549
|
+
|
|
525
550
|
/**
|
|
526
551
|
* THE answer a byte door gives a caller who does not get the file's bytes — a row that is not
|
|
527
552
|
* there, one this caller cannot read, or a copy that cannot be made for them: a 404 refusal in
|
package/src/FileVariantMaker.ts
CHANGED
|
@@ -10,7 +10,11 @@ export type FileVariantKind = 'preview' | 'stage';
|
|
|
10
10
|
|
|
11
11
|
export const FILE_VARIANT_KINDS: readonly FileVariantKind[] = ['preview', 'stage'];
|
|
12
12
|
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* What the maker hands back for a variant: the bytes, their type, and the facts a consumer renders
|
|
15
|
+
* from without loading them. Where the bytes came from is not the maker's to answer: the library
|
|
16
|
+
* writes the original's provenance on the variant's row (`FileTable.provenanceColumns`).
|
|
17
|
+
*/
|
|
14
18
|
export interface FileVariant {
|
|
15
19
|
bytes: Buffer;
|
|
16
20
|
type: string;
|
|
@@ -21,8 +25,9 @@ export interface FileVariant {
|
|
|
21
25
|
/**
|
|
22
26
|
* How a derived File of a File is made — ONE owner for "a variant of this file's bytes".
|
|
23
27
|
*
|
|
24
|
-
* The library owns the seat on the row, the lifecycle
|
|
25
|
-
* (`FileStorage.deriveVariants` at ingest, `FileStorage.getVariant`
|
|
28
|
+
* The library owns the seat on the row, the lifecycle, the access rule and the provenance (the
|
|
29
|
+
* original's) for every variant (`FileStorage.deriveVariants` at ingest, `FileStorage.getVariant`
|
|
30
|
+
* on the read path); the one
|
|
26
31
|
* package that knows the file's format registers how the variant's bytes are made — a picture's
|
|
27
32
|
* 512 px thumbnail (`preview`) and its 1600 px rendition for the stage (`stage`) are two answers
|
|
28
33
|
* of the same maker, never two mechanisms. Dependency direction is the
|
package/src/tables/FileTable.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Table,
|
|
3
|
+
StringColumn,
|
|
4
|
+
IntegerColumn,
|
|
5
|
+
BooleanColumn,
|
|
6
|
+
ReferenceColumn,
|
|
7
|
+
Reference,
|
|
8
|
+
DateColumn,
|
|
9
|
+
} from '@proteinjs/db';
|
|
2
10
|
import { ScopedRecord, withScopedRecordColumns, createScopedIndex } from '@proteinjs/user';
|
|
3
11
|
|
|
4
12
|
const FILE_TABLE_NAME = 'file';
|
|
@@ -15,8 +23,9 @@ export interface File extends ScopedRecord {
|
|
|
15
23
|
* A VARIANT — one of the derived Files of this file the {@link FileVariantMaker} seam makes
|
|
16
24
|
* (`preview`, `stage`): the same lifecycle for each — named here, made once (at ingest with the
|
|
17
25
|
* bytes in hand, or lazily on the first request through `FileStorage.getVariant`), dropped when
|
|
18
|
-
* this file's bytes change (`FileStorage.updateFileData`), deleted with this file (cascade),
|
|
19
|
-
* readable by whoever can read this file (`variantOf`)
|
|
26
|
+
* this file's bytes change (`FileStorage.updateFileData`), deleted with this file (cascade),
|
|
27
|
+
* readable by whoever can read this file (`variantOf`), and carrying this file's provenance
|
|
28
|
+
* ({@link FileTable.provenanceColumns}) — a rendition's provenance is its original's.
|
|
20
29
|
*/
|
|
21
30
|
preview?: Reference<File> | null;
|
|
22
31
|
/**
|
|
@@ -43,7 +52,8 @@ export interface File extends ScopedRecord {
|
|
|
43
52
|
* it. `null`/absent means no copy has been made yet: the next non-owner read makes one when the
|
|
44
53
|
* maker applies to this file, and serves the original when it does not. Dropped when the
|
|
45
54
|
* original's bytes change (`FileStorage.updateFileData`) and deleted with this file (cascade).
|
|
46
|
-
* The owner is never served it — their own scoped read serves the original.
|
|
55
|
+
* The owner is never served it — their own scoped read serves the original. Carries this
|
|
56
|
+
* file's provenance ({@link FileTable.provenanceColumns}), as every derived File does.
|
|
47
57
|
*/
|
|
48
58
|
copyForOthers?: Reference<File> | null;
|
|
49
59
|
/**
|
|
@@ -55,6 +65,15 @@ export interface File extends ScopedRecord {
|
|
|
55
65
|
width?: number;
|
|
56
66
|
height?: number;
|
|
57
67
|
durationMs?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the picture has see-through pixels — read off the BYTES at ingest (the alpha channel's
|
|
70
|
+
* pixels, never the file's declared colour type alone and never the producer that made it): a
|
|
71
|
+
* mark made on a transparent background is true; a photograph, a JPEG, an opaque PNG false.
|
|
72
|
+
* A viewer reads it to seat the picture on the surface its thumbnail sat on instead of a black
|
|
73
|
+
* stage (a see-through mark on black is not the mark the person saw). Absent for video, for
|
|
74
|
+
* non-media files and for pictures stored before the column existed — read as opaque.
|
|
75
|
+
*/
|
|
76
|
+
transparent?: boolean;
|
|
58
77
|
/**
|
|
59
78
|
* Web provenance — set when the bytes were fetched from the internet on the user's behalf
|
|
60
79
|
* (a saved web image): the direct URL the bytes came from, the page they were found on, and
|
|
@@ -100,6 +119,29 @@ export interface File extends ScopedRecord {
|
|
|
100
119
|
}
|
|
101
120
|
|
|
102
121
|
export class FileTable extends Table<File> {
|
|
122
|
+
/**
|
|
123
|
+
* The columns that are a file's PROVENANCE — where its bytes came from and under what terms: the
|
|
124
|
+
* producer (`origin`, `originModel`), the web source (`sourceUrl`, `sourcePageUrl`,
|
|
125
|
+
* `retrievedAt`) and the rights record (`license`, `licenseUrl`, `attribution`). ONE list, the
|
|
126
|
+
* table's own: every derived File the library makes of a file — a variant (`preview`, `stage`)
|
|
127
|
+
* and the copy for others — carries these from the row it was made from (`FileStorage` writes
|
|
128
|
+
* them at insert), so a consumer reads a rendition's provenance off the row it draws, without a
|
|
129
|
+
* join, and a row with none derives rows with none. A column that describes THE ROW'S OWN bytes
|
|
130
|
+
* (`size`, `contentHash`, the media dimensions) is not provenance and is never copied — the
|
|
131
|
+
* maker answers those. A new provenance column is added HERE with its column; nothing else
|
|
132
|
+
* names the list.
|
|
133
|
+
*/
|
|
134
|
+
static readonly provenanceColumns: ReadonlyArray<keyof File> = [
|
|
135
|
+
'origin',
|
|
136
|
+
'originModel',
|
|
137
|
+
'sourceUrl',
|
|
138
|
+
'sourcePageUrl',
|
|
139
|
+
'retrievedAt',
|
|
140
|
+
'license',
|
|
141
|
+
'licenseUrl',
|
|
142
|
+
'attribution',
|
|
143
|
+
];
|
|
144
|
+
|
|
103
145
|
public name = FILE_TABLE_NAME;
|
|
104
146
|
public auth: Table<File>['auth'] = {
|
|
105
147
|
db: {
|
|
@@ -124,6 +166,7 @@ export class FileTable extends Table<File> {
|
|
|
124
166
|
width: new IntegerColumn('width'),
|
|
125
167
|
height: new IntegerColumn('height'),
|
|
126
168
|
durationMs: new IntegerColumn('duration_ms'),
|
|
169
|
+
transparent: new BooleanColumn('transparent'),
|
|
127
170
|
// Web provenance (see the interface docs). URLs can be long — MAX, like any URL storage.
|
|
128
171
|
sourceUrl: new StringColumn('source_url', {}, 'MAX'),
|
|
129
172
|
sourcePageUrl: new StringColumn('source_page_url', {}, 'MAX'),
|