@jrmc/adonis-attachment 6.0.0-alpha.2 → 6.0.0-alpha.3
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/build/commands/commands.json +1 -1
- package/build/commands/make/converter.d.ts +17 -0
- package/build/commands/make/converter.d.ts.map +1 -0
- package/build/commands/make/converter.js +27 -0
- package/build/commands/make/converter.js.map +1 -0
- package/build/index.d.ts +12 -6
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -5
- package/build/index.js.map +1 -1
- package/build/providers/attachment_provider.d.ts.map +1 -1
- package/build/providers/attachment_provider.js +20 -1
- package/build/providers/attachment_provider.js.map +1 -1
- package/build/services/converters.d.ts +10 -0
- package/build/services/converters.d.ts.map +1 -0
- package/build/services/converters.js +17 -0
- package/build/services/converters.js.map +1 -0
- package/build/src/adapters/adonis_drive_storage.d.ts.map +1 -1
- package/build/src/adapters/adonis_drive_storage.js +4 -1
- package/build/src/adapters/adonis_drive_storage.js.map +1 -1
- package/build/src/adapters/local_file_storage.d.ts.map +1 -1
- package/build/src/adapters/local_file_storage.js +9 -2
- package/build/src/adapters/local_file_storage.js.map +1 -1
- package/build/src/converters/autodetect_converter.d.ts +24 -0
- package/build/src/converters/autodetect_converter.d.ts.map +1 -0
- package/build/src/converters/autodetect_converter.js +113 -0
- package/build/src/converters/autodetect_converter.js.map +1 -0
- package/build/src/converters/configured_variant_converter_registry.d.ts +36 -0
- package/build/src/converters/configured_variant_converter_registry.d.ts.map +1 -0
- package/build/src/converters/configured_variant_converter_registry.js +81 -0
- package/build/src/converters/configured_variant_converter_registry.js.map +1 -0
- package/build/src/converters/converter.d.ts +148 -0
- package/build/src/converters/converter.d.ts.map +1 -0
- package/build/src/converters/converter.js +24 -0
- package/build/src/converters/converter.js.map +1 -0
- package/build/src/core/attachment.d.ts +7 -3
- package/build/src/core/attachment.d.ts.map +1 -1
- package/build/src/core/attachment.js +29 -4
- package/build/src/core/attachment.js.map +1 -1
- package/build/src/core/attachment_job_processor.d.ts +17 -1
- package/build/src/core/attachment_job_processor.d.ts.map +1 -1
- package/build/src/core/attachment_job_processor.js +81 -8
- package/build/src/core/attachment_job_processor.js.map +1 -1
- package/build/src/core/attachment_metadata_persister.d.ts +13 -0
- package/build/src/core/attachment_metadata_persister.d.ts.map +1 -0
- package/build/src/core/attachment_metadata_persister.js +8 -0
- package/build/src/core/attachment_metadata_persister.js.map +1 -0
- package/build/src/core/attachment_options.d.ts +3 -2
- package/build/src/core/attachment_options.d.ts.map +1 -1
- package/build/src/core/attachment_options.js.map +1 -1
- package/build/src/core/attachment_service.d.ts +24 -1
- package/build/src/core/attachment_service.d.ts.map +1 -1
- package/build/src/core/attachment_service.js +95 -4
- package/build/src/core/attachment_service.js.map +1 -1
- package/build/src/core/index.d.ts +9 -2
- package/build/src/core/index.d.ts.map +1 -1
- package/build/src/core/index.js +8 -2
- package/build/src/core/index.js.map +1 -1
- package/build/src/core/queue.d.ts +11 -1
- package/build/src/core/queue.d.ts.map +1 -1
- package/build/src/define_config.d.ts +27 -3
- package/build/src/define_config.d.ts.map +1 -1
- package/build/src/define_config.js +35 -1
- package/build/src/define_config.js.map +1 -1
- package/build/src/errors.d.ts +57 -0
- package/build/src/errors.d.ts.map +1 -0
- package/build/src/errors.js +96 -0
- package/build/src/errors.js.map +1 -0
- package/build/src/events/adonis_attachment_event_emitter.d.ts +17 -0
- package/build/src/events/adonis_attachment_event_emitter.d.ts.map +1 -0
- package/build/src/events/adonis_attachment_event_emitter.js +17 -0
- package/build/src/events/adonis_attachment_event_emitter.js.map +1 -0
- package/build/src/events/attachment_events.d.ts +43 -0
- package/build/src/events/attachment_events.d.ts.map +1 -0
- package/build/src/events/attachment_events.js +32 -0
- package/build/src/events/attachment_events.js.map +1 -0
- package/build/src/integrations/lucid/index.d.ts +1 -0
- package/build/src/integrations/lucid/index.d.ts.map +1 -1
- package/build/src/integrations/lucid/index.js +1 -0
- package/build/src/integrations/lucid/index.js.map +1 -1
- package/build/src/integrations/lucid/migrations/legacy/migrate_legacy_attachment.d.ts +3 -0
- package/build/src/integrations/lucid/migrations/legacy/migrate_legacy_attachment.d.ts.map +1 -1
- package/build/src/integrations/lucid/migrations/legacy/migrate_legacy_attachment.js +7 -2
- package/build/src/integrations/lucid/migrations/legacy/migrate_legacy_attachment.js.map +1 -1
- package/build/src/integrations/lucid/migrations/legacy/migrate_legacy_attachment_records.d.ts.map +1 -1
- package/build/src/integrations/lucid/migrations/legacy/migrate_legacy_attachment_records.js +4 -1
- package/build/src/integrations/lucid/migrations/legacy/migrate_legacy_attachment_records.js.map +1 -1
- package/build/src/integrations/lucid/models/attachment_link_model.d.ts.map +1 -1
- package/build/src/integrations/lucid/models/attachment_link_model.js +2 -1
- package/build/src/integrations/lucid/models/attachment_link_model.js.map +1 -1
- package/build/src/integrations/lucid/models/attachment_model.d.ts +3 -1
- package/build/src/integrations/lucid/models/attachment_model.d.ts.map +1 -1
- package/build/src/integrations/lucid/models/attachment_model.js +4 -0
- package/build/src/integrations/lucid/models/attachment_model.js.map +1 -1
- package/build/src/integrations/lucid/persistence/lucid_attachment_lifecycle_service.d.ts +1 -1
- package/build/src/integrations/lucid/persistence/lucid_attachment_lifecycle_service.d.ts.map +1 -1
- package/build/src/integrations/lucid/persistence/lucid_attachment_lifecycle_service.js +92 -35
- package/build/src/integrations/lucid/persistence/lucid_attachment_lifecycle_service.js.map +1 -1
- package/build/src/integrations/lucid/persistence/lucid_attachment_metadata_persister.d.ts +17 -0
- package/build/src/integrations/lucid/persistence/lucid_attachment_metadata_persister.d.ts.map +1 -0
- package/build/src/integrations/lucid/persistence/lucid_attachment_metadata_persister.js +18 -0
- package/build/src/integrations/lucid/persistence/lucid_attachment_metadata_persister.js.map +1 -0
- package/build/src/integrations/lucid/persistence/lucid_attachment_store.d.ts.map +1 -1
- package/build/src/integrations/lucid/persistence/lucid_attachment_store.js +5 -3
- package/build/src/integrations/lucid/persistence/lucid_attachment_store.js.map +1 -1
- package/build/src/integrations/lucid/persistence/lucid_variant_generation_service.d.ts +5 -2
- package/build/src/integrations/lucid/persistence/lucid_variant_generation_service.d.ts.map +1 -1
- package/build/src/integrations/lucid/persistence/lucid_variant_generation_service.js +9 -3
- package/build/src/integrations/lucid/persistence/lucid_variant_generation_service.js.map +1 -1
- package/build/src/integrations/lucid/relations/attachment_relation.d.ts +4 -1
- package/build/src/integrations/lucid/relations/attachment_relation.d.ts.map +1 -1
- package/build/src/integrations/lucid/relations/attachment_relation.js +15 -8
- package/build/src/integrations/lucid/relations/attachment_relation.js.map +1 -1
- package/build/src/integrations/lucid/schema/attachment_schema_service.d.ts +4 -0
- package/build/src/integrations/lucid/schema/attachment_schema_service.d.ts.map +1 -1
- package/build/src/integrations/lucid/schema/attachment_schema_service.js +13 -0
- package/build/src/integrations/lucid/schema/attachment_schema_service.js.map +1 -1
- package/build/src/integrations/lucid/schema/attachment_table_names.d.ts.map +1 -1
- package/build/src/integrations/lucid/schema/attachment_table_names.js +4 -1
- package/build/src/integrations/lucid/schema/attachment_table_names.js.map +1 -1
- package/build/src/media/binaries.d.ts +79 -0
- package/build/src/media/binaries.d.ts.map +1 -0
- package/build/src/media/binaries.js +288 -0
- package/build/src/media/binaries.js.map +1 -0
- package/build/src/media/blurhash.d.ts +48 -0
- package/build/src/media/blurhash.d.ts.map +1 -0
- package/build/src/media/blurhash.js +46 -0
- package/build/src/media/blurhash.js.map +1 -0
- package/build/src/media/exif.d.ts +23 -0
- package/build/src/media/exif.d.ts.map +1 -0
- package/build/src/media/exif.js +98 -0
- package/build/src/media/exif.js.map +1 -0
- package/build/src/media/media_metadata.d.ts +55 -0
- package/build/src/media/media_metadata.d.ts.map +1 -0
- package/build/src/media/media_metadata.js +27 -0
- package/build/src/media/media_metadata.js.map +1 -0
- package/build/src/media/sharp.d.ts +45 -0
- package/build/src/media/sharp.d.ts.map +1 -0
- package/build/src/media/sharp.js +76 -0
- package/build/src/media/sharp.js.map +1 -0
- package/build/src/media/v5_metadata.d.ts +20 -0
- package/build/src/media/v5_metadata.d.ts.map +1 -0
- package/build/src/media/v5_metadata.js +20 -0
- package/build/src/media/v5_metadata.js.map +1 -0
- package/build/src/queues/memory_queue.d.ts.map +1 -1
- package/build/src/queues/memory_queue.js +4 -1
- package/build/src/queues/memory_queue.js.map +1 -1
- package/build/src/sources/attachment_manager.d.ts +1 -3
- package/build/src/sources/attachment_manager.d.ts.map +1 -1
- package/build/src/sources/attachment_manager.js +19 -12
- package/build/src/sources/attachment_manager.js.map +1 -1
- package/build/src/variants/variant_converter.d.ts +4 -1
- package/build/src/variants/variant_converter.d.ts.map +1 -1
- package/build/src/variants/variant_generation_service.d.ts +9 -3
- package/build/src/variants/variant_generation_service.d.ts.map +1 -1
- package/build/src/variants/variant_generation_service.js +47 -6
- package/build/src/variants/variant_generation_service.js.map +1 -1
- package/build/stubs/config/attachment.stub +23 -2
- package/build/stubs/converters/converter.stub +18 -0
- package/build/tests/adonis_queue.spec.js +56 -1
- package/build/tests/adonis_queue.spec.js.map +1 -1
- package/build/tests/attachment_events.spec.d.ts +8 -0
- package/build/tests/attachment_events.spec.d.ts.map +1 -0
- package/build/tests/attachment_events.spec.js +65 -0
- package/build/tests/attachment_events.spec.js.map +1 -0
- package/build/tests/attachment_job_processor.spec.js +77 -2
- package/build/tests/attachment_job_processor.spec.js.map +1 -1
- package/build/tests/attachment_provider.spec.js +54 -0
- package/build/tests/attachment_provider.spec.js.map +1 -1
- package/build/tests/attachment_schema_service.spec.js +14 -0
- package/build/tests/attachment_schema_service.spec.js.map +1 -1
- package/build/tests/attachment_service.spec.js +81 -2
- package/build/tests/attachment_service.spec.js.map +1 -1
- package/build/tests/autodetect_converter.spec.d.ts +8 -0
- package/build/tests/autodetect_converter.spec.d.ts.map +1 -0
- package/build/tests/autodetect_converter.spec.js +55 -0
- package/build/tests/autodetect_converter.spec.js.map +1 -0
- package/build/tests/binary_media.spec.d.ts +8 -0
- package/build/tests/binary_media.spec.d.ts.map +1 -0
- package/build/tests/binary_media.spec.js +106 -0
- package/build/tests/binary_media.spec.js.map +1 -0
- package/build/tests/blurhash_media.spec.d.ts +8 -0
- package/build/tests/blurhash_media.spec.d.ts.map +1 -0
- package/build/tests/blurhash_media.spec.js +40 -0
- package/build/tests/blurhash_media.spec.js.map +1 -0
- package/build/tests/configure.spec.js +1 -0
- package/build/tests/configure.spec.js.map +1 -1
- package/build/tests/configured_variant_converter_registry.spec.d.ts +8 -0
- package/build/tests/configured_variant_converter_registry.spec.d.ts.map +1 -0
- package/build/tests/configured_variant_converter_registry.spec.js +73 -0
- package/build/tests/configured_variant_converter_registry.spec.js.map +1 -0
- package/build/tests/converter_config.types.d.ts +36 -0
- package/build/tests/converter_config.types.d.ts.map +1 -0
- package/build/tests/converter_config.types.js +60 -0
- package/build/tests/converter_config.types.js.map +1 -0
- package/build/tests/define_config.spec.js +91 -0
- package/build/tests/define_config.spec.js.map +1 -1
- package/build/tests/errors.spec.d.ts +8 -0
- package/build/tests/errors.spec.d.ts.map +1 -0
- package/build/tests/errors.spec.js +43 -0
- package/build/tests/errors.spec.js.map +1 -0
- package/build/tests/exif_media.spec.d.ts +8 -0
- package/build/tests/exif_media.spec.d.ts.map +1 -0
- package/build/tests/exif_media.spec.js +50 -0
- package/build/tests/exif_media.spec.js.map +1 -0
- package/build/tests/helpers/lucid_test_database.d.ts.map +1 -1
- package/build/tests/helpers/lucid_test_database.js +1 -0
- package/build/tests/helpers/lucid_test_database.js.map +1 -1
- package/build/tests/lucid_attachment_column.spec.js +1 -1
- package/build/tests/lucid_attachment_column.spec.js.map +1 -1
- package/build/tests/lucid_attachment_lifecycle_service.spec.js +54 -0
- package/build/tests/lucid_attachment_lifecycle_service.spec.js.map +1 -1
- package/build/tests/lucid_attachment_metadata_persister.spec.d.ts +8 -0
- package/build/tests/lucid_attachment_metadata_persister.spec.d.ts.map +1 -0
- package/build/tests/lucid_attachment_metadata_persister.spec.js +34 -0
- package/build/tests/lucid_attachment_metadata_persister.spec.js.map +1 -0
- package/build/tests/lucid_attachment_relation.spec.js +71 -10
- package/build/tests/lucid_attachment_relation.spec.js.map +1 -1
- package/build/tests/lucid_sqlite_integration.spec.js +2 -1
- package/build/tests/lucid_sqlite_integration.spec.js.map +1 -1
- package/build/tests/lucid_variant_generation_service.spec.js +17 -0
- package/build/tests/lucid_variant_generation_service.spec.js.map +1 -1
- package/build/tests/make_converter.spec.d.ts +8 -0
- package/build/tests/make_converter.spec.d.ts.map +1 -0
- package/build/tests/make_converter.spec.js +32 -0
- package/build/tests/make_converter.spec.js.map +1 -0
- package/build/tests/media_metadata.spec.d.ts +8 -0
- package/build/tests/media_metadata.spec.d.ts.map +1 -0
- package/build/tests/media_metadata.spec.js +51 -0
- package/build/tests/media_metadata.spec.js.map +1 -0
- package/build/tests/migrate_legacy_attachment.spec.js +15 -5
- package/build/tests/migrate_legacy_attachment.spec.js.map +1 -1
- package/build/tests/package_exports.spec.js +18 -2
- package/build/tests/package_exports.spec.js.map +1 -1
- package/build/tests/sharp_media.spec.d.ts +8 -0
- package/build/tests/sharp_media.spec.d.ts.map +1 -0
- package/build/tests/sharp_media.spec.js +84 -0
- package/build/tests/sharp_media.spec.js.map +1 -0
- package/build/tests/v5_metadata.spec.d.ts +8 -0
- package/build/tests/v5_metadata.spec.d.ts.map +1 -0
- package/build/tests/v5_metadata.spec.js +19 -0
- package/build/tests/v5_metadata.spec.js.map +1 -0
- package/build/tests/variant_generation_service.spec.js +122 -0
- package/build/tests/variant_generation_service.spec.js.map +1 -1
- package/package.json +50 -2
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jrmc/adonis-attachment
|
|
3
|
+
*
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright Jeremy Chaufourier <jeremy@chaufourier.fr>
|
|
6
|
+
*/
|
|
7
|
+
import { Exception } from '@adonisjs/core/exceptions';
|
|
8
|
+
/** Base exception for every error emitted by this package. */
|
|
9
|
+
export class AttachmentError extends Exception {
|
|
10
|
+
static code = 'E_ATTACHMENT_ERROR';
|
|
11
|
+
static status = 500;
|
|
12
|
+
constructor(message, options = {}) {
|
|
13
|
+
super(message, options);
|
|
14
|
+
const constructor = new.target;
|
|
15
|
+
this.code = options.code ?? constructor.code;
|
|
16
|
+
this.status = options.status ?? constructor.status;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/** Raised when an attachment source cannot be normalized. */
|
|
20
|
+
export class AttachmentSourceError extends AttachmentError {
|
|
21
|
+
constructor(message, options = {}) {
|
|
22
|
+
super(message, {
|
|
23
|
+
...options,
|
|
24
|
+
code: options.code ?? 'E_ATTACHMENT_SOURCE',
|
|
25
|
+
status: options.status ?? 400,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** Raised when caller-provided attachment data fails a package invariant. */
|
|
30
|
+
export class AttachmentValidationError extends AttachmentError {
|
|
31
|
+
static code = 'E_INVALID_ATTACHMENT';
|
|
32
|
+
static status = 400;
|
|
33
|
+
}
|
|
34
|
+
/** Raised when an attachment operation conflicts with current persisted state. */
|
|
35
|
+
export class AttachmentConflictError extends AttachmentError {
|
|
36
|
+
static code = 'E_ATTACHMENT_CONFLICT';
|
|
37
|
+
static status = 409;
|
|
38
|
+
}
|
|
39
|
+
/** Raised when an adapter or integration has been configured incorrectly. */
|
|
40
|
+
export class AttachmentConfigurationError extends AttachmentError {
|
|
41
|
+
static code = 'E_ATTACHMENT_CONFIGURATION';
|
|
42
|
+
}
|
|
43
|
+
export class AttachmentNotFoundError extends AttachmentError {
|
|
44
|
+
constructor(attachmentId) {
|
|
45
|
+
super(`Attachment "${attachmentId}" was not found`, {
|
|
46
|
+
code: 'E_ATTACHMENT_NOT_FOUND',
|
|
47
|
+
status: 404,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export class DeferredMetadataProcessorNotConfiguredError extends AttachmentError {
|
|
52
|
+
constructor() {
|
|
53
|
+
super('Attachment metadata jobs require a configured metadata processor', {
|
|
54
|
+
code: 'E_METADATA_PROCESSOR_NOT_CONFIGURED',
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export class DeferredMetadataNotConfiguredError extends AttachmentError {
|
|
59
|
+
constructor() {
|
|
60
|
+
super('Deferred metadata extraction requires configured extractors and a metadata persister', {
|
|
61
|
+
code: 'E_METADATA_NOT_CONFIGURED',
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export class InvalidConverterModuleError extends AttachmentError {
|
|
66
|
+
constructor(key) {
|
|
67
|
+
super(`Converter "${key}" must default-export a Converter class or a VariantConverter object`, {
|
|
68
|
+
code: 'E_INVALID_CONVERTER_MODULE',
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
export class UnknownVariantConverterError extends AttachmentError {
|
|
73
|
+
constructor(key) {
|
|
74
|
+
super(`No variant converter is registered for "${key}"`, {
|
|
75
|
+
code: 'E_UNKNOWN_VARIANT_CONVERTER',
|
|
76
|
+
status: 422,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
export class PersistedAttachmentNotFoundError extends AttachmentError {
|
|
81
|
+
constructor(id) {
|
|
82
|
+
super(`Persisted attachment "${id}" was not found`, {
|
|
83
|
+
code: 'E_PERSISTED_ATTACHMENT_NOT_FOUND',
|
|
84
|
+
status: 404,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
export class MissingOptionalDependencyError extends AttachmentError {
|
|
89
|
+
constructor(packages) {
|
|
90
|
+
const names = Array.isArray(packages) ? packages : [packages];
|
|
91
|
+
super(`Missing optional ${names.length === 1 ? 'dependency' : 'dependencies'}: ${names.join(', ')}`, {
|
|
92
|
+
code: 'E_MISSING_PACKAGE',
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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BAAoB,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACnG,IAAI,EAAE,mBAAmB;SAC1B,CAAC,CAAA;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jrmc/adonis-attachment
|
|
3
|
+
*
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright Jeremy Chaufourier <jeremy@chaufourier.fr>
|
|
6
|
+
*/
|
|
7
|
+
import type { AttachmentEventEmitter, AttachmentEventName, AttachmentEventPayload } from './attachment_events.js';
|
|
8
|
+
export type AdonisEmitter = {
|
|
9
|
+
emit(event: string, payload: unknown): void | Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
/** Adapts AdonisJS' emitter to the attachment event contract. */
|
|
12
|
+
export declare class AdonisAttachmentEventEmitter implements AttachmentEventEmitter {
|
|
13
|
+
#private;
|
|
14
|
+
constructor(emitter: AdonisEmitter);
|
|
15
|
+
emit(event: AttachmentEventName, payload: AttachmentEventPayload): void | Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=adonis_attachment_event_emitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adonis_attachment_event_emitter.d.ts","sourceRoot":"","sources":["../../../src/events/adonis_attachment_event_emitter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,wBAAwB,CAAA;AAE/B,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC5D,CAAA;AAED,iEAAiE;AACjE,qBAAa,4BAA6B,YAAW,sBAAsB;;gBAG7D,OAAO,EAAE,aAAa;IAIlC,IAAI,CAAC,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,sBAAsB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jrmc/adonis-attachment
|
|
3
|
+
*
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright Jeremy Chaufourier <jeremy@chaufourier.fr>
|
|
6
|
+
*/
|
|
7
|
+
/** Adapts AdonisJS' emitter to the attachment event contract. */
|
|
8
|
+
export class AdonisAttachmentEventEmitter {
|
|
9
|
+
#emitter;
|
|
10
|
+
constructor(emitter) {
|
|
11
|
+
this.#emitter = emitter;
|
|
12
|
+
}
|
|
13
|
+
emit(event, payload) {
|
|
14
|
+
return this.#emitter.emit(event, payload);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=adonis_attachment_event_emitter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adonis_attachment_event_emitter.js","sourceRoot":"","sources":["../../../src/events/adonis_attachment_event_emitter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH,iEAAiE;AACjE,MAAM,OAAO,4BAA4B;IAC9B,QAAQ,CAAe;IAEhC,YAAY,OAAsB;QAChC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;IACzB,CAAC;IAED,IAAI,CAAC,KAA0B,EAAE,OAA+B;QAC9D,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IAC3C,CAAC;CACF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jrmc/adonis-attachment
|
|
3
|
+
*
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright Jeremy Chaufourier <jeremy@chaufourier.fr>
|
|
6
|
+
*/
|
|
7
|
+
import type { Attachment } from '../core/attachment.js';
|
|
8
|
+
export type AttachmentEventName = 'attachment:created' | 'attachment:deleted' | 'attachment:metadata_started' | 'attachment:metadata_completed' | 'attachment:metadata_failed' | 'attachment:variant_started' | 'attachment:variant_completed' | 'attachment:variant_failed';
|
|
9
|
+
/**
|
|
10
|
+
* Identifies a Lucid relation using the v5 event payload fields. It remains
|
|
11
|
+
* optional because the core can also run without any database integration.
|
|
12
|
+
*/
|
|
13
|
+
export type AttachmentEventContext = {
|
|
14
|
+
tableName: string;
|
|
15
|
+
attributeName: string;
|
|
16
|
+
primary: {
|
|
17
|
+
key: string;
|
|
18
|
+
value: string | number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type AttachmentEventFailure = {
|
|
22
|
+
message: string;
|
|
23
|
+
code?: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Payload shared by attachment lifecycle events. `tableName`, `attributeName`
|
|
27
|
+
* and `primary` retain the v5 contract for attachments managed by Lucid.
|
|
28
|
+
*/
|
|
29
|
+
export type AttachmentEventPayload = Partial<AttachmentEventContext> & {
|
|
30
|
+
attachment: Attachment;
|
|
31
|
+
variants?: readonly string[];
|
|
32
|
+
error?: AttachmentEventFailure;
|
|
33
|
+
};
|
|
34
|
+
export interface AttachmentEventEmitter {
|
|
35
|
+
emit(event: AttachmentEventName, payload: AttachmentEventPayload): void | Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Dispatches observers without allowing their failures to alter attachment
|
|
39
|
+
* persistence or queue processing.
|
|
40
|
+
*/
|
|
41
|
+
export declare function emitAttachmentEvent(emitter: AttachmentEventEmitter | undefined, event: AttachmentEventName, payload: AttachmentEventPayload): void;
|
|
42
|
+
export declare function toAttachmentEventFailure(error: unknown): AttachmentEventFailure;
|
|
43
|
+
//# sourceMappingURL=attachment_events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment_events.d.ts","sourceRoot":"","sources":["../../../src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3
|
+
*
|
|
4
|
+
* @license MIT
|
|
5
|
+
* @copyright Jeremy Chaufourier <jeremy@chaufourier.fr>
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Dispatches observers without allowing their failures to alter attachment
|
|
9
|
+
* persistence or queue processing.
|
|
10
|
+
*/
|
|
11
|
+
export function emitAttachmentEvent(emitter, event, payload) {
|
|
12
|
+
if (!emitter) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
void Promise.resolve(emitter.emit(event, payload)).catch(() => undefined);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
// Event listeners are observational and must never fail the attachment operation.
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export function toAttachmentEventFailure(error) {
|
|
23
|
+
if (error && typeof error === 'object') {
|
|
24
|
+
const value = error;
|
|
25
|
+
return {
|
|
26
|
+
message: typeof value.message === 'string' ? value.message : String(error),
|
|
27
|
+
...(typeof value.code === 'string' ? { code: value.code } : {}),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return { message: String(error) };
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=attachment_events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment_events.js","sourceRoot":"","sources":["../../../src/events/attachment_events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA8CH;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAA2C,EAC3C,KAA0B,EAC1B,OAA+B;IAE/B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAM;IACR,CAAC;IAED,IAAI,CAAC;QACH,KAAK,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;IAC3E,CAAC;IAAC,MAAM,CAAC;QACP,kFAAkF;IACpF,CAAC;AACH,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,KAAc;IACrD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,KAA8C,CAAA;QAC5D,OAAO;YACL,OAAO,EAAE,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YAC1E,GAAG,CAAC,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAChE,CAAA;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAA;AACnC,CAAC"}
|
|
@@ -12,6 +12,7 @@ export { AttachmentSchemaService, type AttachmentSchemaServiceOptions, } from ".
|
|
|
12
12
|
export { attachment, type LucidAttachmentOptions, } from "./column/attachment_column.js";
|
|
13
13
|
export { attachmentRelation, attachmentsRelation, AttachmentRelation, AttachmentCollectionRelation, type AttachmentRelationOptions, } from "./relations/attachment_relation.js";
|
|
14
14
|
export { LucidAttachmentRepository } from "./persistence/lucid_attachment_repository.js";
|
|
15
|
+
export { LucidAttachmentMetadataPersister } from "./persistence/lucid_attachment_metadata_persister.js";
|
|
15
16
|
export { LucidAttachmentStore, type LucidAttachmentWithVariants, type LucidAttachmentStoreOptions, } from "./persistence/lucid_attachment_store.js";
|
|
16
17
|
export { LucidAttachmentLifecycleService, type AttachmentFileService, type LucidAttachmentPersistence, } from "./persistence/lucid_attachment_lifecycle_service.js";
|
|
17
18
|
export { LucidVariantGenerationService, PersistedAttachmentNotFoundError, type LucidVariantGenerationServiceOptions, } from "./persistence/lucid_variant_generation_service.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/l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kDAAkD,CAAC;AAC1D,OAAO,EACL,8BAA8B,EAC9B,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,qCAAqC,GAC3C,MAAM,0DAA0D,CAAC;AAClE,OAAO,EACL,wCAAwC,EACxC,KAAK,oCAAoC,EACzC,KAAK,kCAAkC,GACxC,MAAM,yDAAyD,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/lucid/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EACL,8BAA8B,GAC/B,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,2BAA2B,EAC3B,KAAK,oBAAoB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,uBAAuB,EACvB,KAAK,8BAA8B,GACpC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,UAAU,EACV,KAAK,sBAAsB,GAC5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,4BAA4B,EAC5B,KAAK,yBAAyB,GAC/B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,gCAAgC,EAAE,MAAM,sDAAsD,CAAC;AACxG,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,GACjC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,+BAA+B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,GAChC,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EACL,6BAA6B,EAC7B,gCAAgC,EAChC,KAAK,oCAAoC,GAC1C,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EACL,wBAAwB,EACxB,KAAK,eAAe,GACrB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,+BAA+B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,GAC/B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,8BAA8B,EACnC,KAAK,oCAAoC,EACzC,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,GAC5B,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EACL,8BAA8B,EAC9B,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,qCAAqC,GAC3C,MAAM,0DAA0D,CAAC;AAClE,OAAO,EACL,wCAAwC,EACxC,KAAK,oCAAoC,EACzC,KAAK,kCAAkC,GACxC,MAAM,yDAAyD,CAAC"}
|
|
@@ -12,6 +12,7 @@ export { AttachmentSchemaService, } from "./schema/attachment_schema_service.js"
|
|
|
12
12
|
export { attachment, } from "./column/attachment_column.js";
|
|
13
13
|
export { attachmentRelation, attachmentsRelation, AttachmentRelation, AttachmentCollectionRelation, } from "./relations/attachment_relation.js";
|
|
14
14
|
export { LucidAttachmentRepository } from "./persistence/lucid_attachment_repository.js";
|
|
15
|
+
export { LucidAttachmentMetadataPersister } from "./persistence/lucid_attachment_metadata_persister.js";
|
|
15
16
|
export { LucidAttachmentStore, } from "./persistence/lucid_attachment_store.js";
|
|
16
17
|
export { LucidAttachmentLifecycleService, } from "./persistence/lucid_attachment_lifecycle_service.js";
|
|
17
18
|
export { LucidVariantGenerationService, PersistedAttachmentNotFoundError, } from "./persistence/lucid_variant_generation_service.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/integrations/lucid/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OA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C,OAAO,EACL,uBAAuB,GAExB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,UAAU,GAEX,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,4BAA4B,GAE7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,gCAAgC,EAAE,MAAM,sDAAsD,CAAC;AACxG,OAAO,EACL,oBAAoB,GAGrB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,+BAA+B,GAGhC,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EACL,6BAA6B,EAC7B,gCAAgC,GAEjC,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EACL,wBAAwB,GAEzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,+BAA+B,GAGhC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,uBAAuB,EACvB,6BAA6B,GAQ9B,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EACL,8BAA8B,GAK/B,MAAM,0DAA0D,CAAC;AAClE,OAAO,EACL,wCAAwC,GAGzC,MAAM,yDAAyD,CAAC"}
|
|
@@ -13,6 +13,7 @@ export type LegacyAttachment = {
|
|
|
13
13
|
disk?: string;
|
|
14
14
|
path?: string;
|
|
15
15
|
meta?: Record<string, unknown>;
|
|
16
|
+
blurhash?: string;
|
|
16
17
|
variants?: LegacyVariant[];
|
|
17
18
|
};
|
|
18
19
|
export type LegacyVariant = {
|
|
@@ -24,6 +25,7 @@ export type LegacyVariant = {
|
|
|
24
25
|
disk?: string;
|
|
25
26
|
path?: string;
|
|
26
27
|
meta?: Record<string, unknown>;
|
|
28
|
+
blurhash?: string;
|
|
27
29
|
};
|
|
28
30
|
import { type AttachmentOwner } from "../../relations/attachment_owner.js";
|
|
29
31
|
import type { Attachment } from "../../../../core/attachment.js";
|
|
@@ -39,6 +41,7 @@ export type MigratedAttachmentBlob = {
|
|
|
39
41
|
mimeType: string;
|
|
40
42
|
extname: string;
|
|
41
43
|
size: number;
|
|
44
|
+
blurhash: string | null;
|
|
42
45
|
metadata: Record<string, unknown> | null;
|
|
43
46
|
};
|
|
44
47
|
export type MigratedAttachmentLink = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate_legacy_attachment.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/lucid/migrations/legacy/migrate_legacy_attachment.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"migrate_legacy_attachment.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/lucid/migrations/legacy/migrate_legacy_attachment.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MA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IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAChC,KAAK,EAAE,sBAAsB,EAAE,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,KAAK,EAAE,eAAe,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG,IAAI,CACrD,8BAA8B,EAC9B,OAAO,CACR,CAAC;AAEF;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,gBAAgB,GAAG,MAAM,EAChC,OAAO,EAAE,8BAA8B,GACtC,sBAAsB,CAwCxB;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,gBAAgB,GAAG,MAAM,EAChC,OAAO,EAAE,oCAAoC,GAC5C,UAAU,CAwBZ"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @copyright Jeremy Chaufourier <jeremy@chaufourier.fr>
|
|
6
6
|
*/
|
|
7
7
|
import { createAttachmentOwnerKey, } from "../../relations/attachment_owner.js";
|
|
8
|
+
import { AttachmentError } from "../../../../errors.js";
|
|
8
9
|
/**
|
|
9
10
|
* Converts one v5 JSON attachment document into blob and polymorphic-link rows.
|
|
10
11
|
* Callers can run it from an Ace command, another ORM migration, or a one-off script.
|
|
@@ -53,7 +54,7 @@ export function migrateLegacyAttachment(value, options) {
|
|
|
53
54
|
export function migrateLegacyAttachmentColumn(value, options) {
|
|
54
55
|
const attachment = typeof value === "string" ? parseLegacyAttachment(value) : value;
|
|
55
56
|
if (attachment.variants?.length) {
|
|
56
|
-
throw new
|
|
57
|
+
throw new AttachmentError("Legacy attachments with variants must migrate to the polymorphic table", { code: "E_LEGACY_VARIANTS_REQUIRE_RELATIONS", status: 422 });
|
|
57
58
|
}
|
|
58
59
|
const originalName = attachment.originalName ?? attachment.name;
|
|
59
60
|
return {
|
|
@@ -73,7 +74,10 @@ function parseLegacyAttachment(value) {
|
|
|
73
74
|
return JSON.parse(value);
|
|
74
75
|
}
|
|
75
76
|
catch {
|
|
76
|
-
throw new
|
|
77
|
+
throw new AttachmentError("Legacy attachment value must be valid JSON", {
|
|
78
|
+
code: "E_INVALID_LEGACY_ATTACHMENT",
|
|
79
|
+
status: 400,
|
|
80
|
+
});
|
|
77
81
|
}
|
|
78
82
|
}
|
|
79
83
|
function toBlob({ id, attachment, parentId, variantKey, originalName, defaultDisk, }) {
|
|
@@ -88,6 +92,7 @@ function toBlob({ id, attachment, parentId, variantKey, originalName, defaultDis
|
|
|
88
92
|
mimeType: attachment.mimeType,
|
|
89
93
|
extname: attachment.extname,
|
|
90
94
|
size: attachment.size,
|
|
95
|
+
blurhash: attachment.blurhash ?? null,
|
|
91
96
|
metadata: attachment.meta ?? null,
|
|
92
97
|
};
|
|
93
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate_legacy_attachment.js","sourceRoot":"","sources":["../../../../../../src/integrations/lucid/migrations/legacy/migrate_legacy_attachment.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"migrate_legacy_attachment.js","sourceRoot":"","sources":["../../../../../../src/integrations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M,IAAI,eAAe,CAAC,4CAA4C,EAAE;YACtE,IAAI,EAAE,6BAA6B;YACnC,MAAM,EAAE,GAAG;SACZ,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAC,EACd,EAAE,EACF,UAAU,EACV,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,WAAW,GAQZ;IACC,OAAO;QACL,EAAE;QACF,QAAQ;QACR,UAAU;QACV,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,WAAW;QACpC,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI;QACxC,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,YAAY;QACZ,QAAQ,EAAE,UAAU,CAAC,QAAQ;QAC7B,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,QAAQ,EAAE,UAAU,CAAC,QAAQ,IAAI,IAAI;QACrC,QAAQ,EAAE,UAAU,CAAC,IAAI,IAAI,IAAI;KAClC,CAAC;AACJ,CAAC"}
|
package/build/src/integrations/lucid/migrations/legacy/migrate_legacy_attachment_records.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate_legacy_attachment_records.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/lucid/migrations/legacy/migrate_legacy_attachment_records.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"migrate_legacy_attachment_records.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/lucid/migrations/legacy/migrate_legacy_attachment_records.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAE1E,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC5B,MAAM,gCAAgC,CAAA;AAEvC,MAAM,MAAM,+BAA+B,GAAG;IAC5C,KAAK,EAAE,eAAe,CAAA;IACtB,KAAK,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CACpD,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,MAAM,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACpD,CAAA;AAED,MAAM,MAAM,qCAAqC,GAAG;IAClD,OAAO,EAAE,QAAQ,CAAC,+BAA+B,CAAC,GAAG,aAAa,CAAC,+BAA+B,CAAC,CAAA;IACnG,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,MAAM,CAAA;IACtB,MAAM,EAAE,+BAA+B,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED;;;;GAIG;AACH,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,qCAAqC,GAC7C,OAAO,CAAC,+BAA+B,CAAC,CA4C1C"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright Jeremy Chaufourier <jeremy@chaufourier.fr>
|
|
6
6
|
*/
|
|
7
|
+
import { AttachmentError } from '../../../../errors.js';
|
|
7
8
|
import { migrateLegacyAttachment, } from './migrate_legacy_attachment.js';
|
|
8
9
|
/**
|
|
9
10
|
* Migrates a stream of legacy v5 JSON values into attachment-table rows.
|
|
@@ -13,7 +14,9 @@ import { migrateLegacyAttachment, } from './migrate_legacy_attachment.js';
|
|
|
13
14
|
export async function migrateLegacyAttachmentRecords(options) {
|
|
14
15
|
const batchSize = options.batchSize ?? 100;
|
|
15
16
|
if (!Number.isSafeInteger(batchSize) || batchSize < 1) {
|
|
16
|
-
throw new
|
|
17
|
+
throw new AttachmentError('Legacy attachment migration batchSize must be a positive integer', {
|
|
18
|
+
code: 'E_INVALID_LEGACY_MIGRATION_BATCH_SIZE',
|
|
19
|
+
});
|
|
17
20
|
}
|
|
18
21
|
const result = {
|
|
19
22
|
attachments: 0,
|
package/build/src/integrations/lucid/migrations/legacy/migrate_legacy_attachment_records.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate_legacy_attachment_records.js","sourceRoot":"","sources":["../../../../../../src/integrations/lucid/migrations/legacy/migrate_legacy_attachment_records.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,uBAAuB,GAGxB,MAAM,gCAAgC,CAAA;AAyBvC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAClD,OAA8C;IAE9C,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,GAAG,CAAA;IAE1C,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;QACtD,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"migrate_legacy_attachment_records.js","sourceRoot":"","sources":["../../../../../../src/integrations/lucid/migrations/legacy/migrate_legacy_attachment_records.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EACL,uBAAuB,GAGxB,MAAM,gCAAgC,CAAA;AAyBvC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAClD,OAA8C;IAE9C,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,GAAG,CAAA;IAE1C,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;QACtD,MAAM,IAAI,eAAe,CAAC,kEAAkE,EAAE;YAC5F,IAAI,EAAE,uCAAuC;SAC9C,CAA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CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACpC,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment_link_model.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/lucid/models/attachment_link_model.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAqB,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"attachment_link_model.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/lucid/models/attachment_link_model.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAqB,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAGvD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,SAAS;IAChD,MAAM,CAAC,KAAK,SAAqB;IACjC,MAAM,CAAC,oBAAoB,UAAO;IAG1B,EAAE,EAAE,MAAM,CAAA;IAGV,cAAc,EAAE,MAAM,CAAA;IAGtB,YAAY,EAAE,MAAM,CAAA;IAGpB,KAAK,EAAE,MAAM,CAAA;IAGb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IAGvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IAGvB,YAAY,EAAE,MAAM,CAAA;IAGpB,UAAU,EAAE,SAAS,CAAC,OAAO,eAAe,CAAC,CAAA;IAG7C,SAAS,EAAE,QAAQ,CAAA;IAGnB,SAAS,EAAE,QAAQ,CAAA;IAE3B,YAAY,IAAI,UAAU;CAS3B"}
|
|
@@ -12,6 +12,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
12
12
|
};
|
|
13
13
|
import { BaseModel, belongsTo, column } from '@adonisjs/lucid/orm';
|
|
14
14
|
import { AttachmentModel } from './attachment_model.js';
|
|
15
|
+
import { AttachmentConfigurationError } from '../../../errors.js';
|
|
15
16
|
/**
|
|
16
17
|
* Polymorphic relation between an application record and an attachment blob.
|
|
17
18
|
*/
|
|
@@ -20,7 +21,7 @@ export class AttachmentLinkModel extends BaseModel {
|
|
|
20
21
|
static selfAssignPrimaryKey = true;
|
|
21
22
|
toAttachment() {
|
|
22
23
|
if (!this.attachment) {
|
|
23
|
-
throw new
|
|
24
|
+
throw new AttachmentConfigurationError('Attachment links must load their attachment blob before they can be read');
|
|
24
25
|
}
|
|
25
26
|
return this.attachment.toAttachment();
|
|
26
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment_link_model.js","sourceRoot":"","sources":["../../../../../src/integrations/lucid/models/attachment_link_model.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;AAEH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAKlE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"attachment_link_model.js","sourceRoot":"","sources":["../../../../../src/integrations/lucid/models/attachment_link_model.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;AAEH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAKlE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAA;AAEjE;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,SAAS;IAChD,MAAM,CAAC,KAAK,GAAG,kBAAkB,CAAA;IACjC,MAAM,CAAC,oBAAoB,GAAG,IAAI,CAAA;IAgClC,YAAY;QACV,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,MAAM,IAAI,4BAA4B,CACpC,0EAA0E,CAC3E,CAAA;QACH,CAAC;QAED,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA;IACvC,CAAC;;AArCO;IADP,MAAM,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;+CACV;AAGV;IADP,MAAM,EAAE;2DACqB;AAGtB;IADP,MAAM,EAAE;yDACmB;AAGpB;IADP,MAAM,EAAE;kDACY;AAGb;IADP,MAAM,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;qDACC;AAGvB;IADP,MAAM,EAAE;qDACsB;AAGvB;IADP,MAAM,EAAE;yDACmB;AAGpB;IADP,SAAS,CAAC,GAAG,EAAE,CAAC,eAAe,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC;uDACZ;AAG7C;IADP,MAAM,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;sDACX;AAGnB;IADP,MAAM,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;sDAC7B"}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { BaseModel } from '@adonisjs/lucid/orm';
|
|
8
8
|
import type { DateTime } from 'luxon';
|
|
9
9
|
import type { Attachment } from '../../../core/attachment.js';
|
|
10
|
+
import type { AttachmentMetadata } from '../../../media/media_metadata.js';
|
|
10
11
|
/**
|
|
11
12
|
* Default Lucid model for a stored attachment blob.
|
|
12
13
|
* Applications may extend this model to add their own scopes and serialization rules.
|
|
@@ -24,7 +25,8 @@ export declare class AttachmentModel extends BaseModel {
|
|
|
24
25
|
mimeType: string;
|
|
25
26
|
extname: string;
|
|
26
27
|
size: number;
|
|
27
|
-
|
|
28
|
+
blurhash: string | null;
|
|
29
|
+
metadata: AttachmentMetadata | null;
|
|
28
30
|
createdAt: DateTime;
|
|
29
31
|
updatedAt: DateTime;
|
|
30
32
|
toAttachment(): Attachment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment_model.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/lucid/models/attachment_model.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAU,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"attachment_model.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/lucid/models/attachment_model.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAU,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAE1E;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,SAAS;IAC5C,MAAM,CAAC,KAAK,SAAgB;IAC5B,MAAM,CAAC,oBAAoB,UAAO;IAG1B,EAAE,EAAE,MAAM,CAAA;IAGV,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IAGvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IAGzB,IAAI,EAAE,MAAM,CAAA;IAGZ,IAAI,EAAE,MAAM,CAAA;IAGZ,IAAI,EAAE,MAAM,CAAA;IAGZ,YAAY,EAAE,MAAM,CAAA;IAGpB,QAAQ,EAAE,MAAM,CAAA;IAGhB,OAAO,EAAE,MAAM,CAAA;IAGf,IAAI,EAAE,MAAM,CAAA;IAGZ,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IAcvB,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAA;IAGnC,SAAS,EAAE,QAAQ,CAAA;IAGnB,SAAS,EAAE,QAAQ,CAAA;IAE3B,YAAY,IAAI,UAAU;CAc3B"}
|
|
@@ -28,6 +28,7 @@ export class AttachmentModel extends BaseModel {
|
|
|
28
28
|
mimeType: this.mimeType,
|
|
29
29
|
extname: this.extname,
|
|
30
30
|
size: this.size,
|
|
31
|
+
...(this.blurhash ? { blurhash: this.blurhash } : {}),
|
|
31
32
|
...(this.metadata ? { metadata: this.metadata } : {}),
|
|
32
33
|
};
|
|
33
34
|
}
|
|
@@ -62,6 +63,9 @@ __decorate([
|
|
|
62
63
|
__decorate([
|
|
63
64
|
column()
|
|
64
65
|
], AttachmentModel.prototype, "size", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
column()
|
|
68
|
+
], AttachmentModel.prototype, "blurhash", void 0);
|
|
65
69
|
__decorate([
|
|
66
70
|
column({
|
|
67
71
|
prepare(value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment_model.js","sourceRoot":"","sources":["../../../../../src/integrations/lucid/models/attachment_model.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"attachment_model.js","sourceRoot":"","sources":["../../../../../src/integrations/lucid/models/attachment_model.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAMvD;;;GAGG;AACH,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC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AO,CAAC,KAAc;YACpB,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBACvE,OAAO,KAAkC,CAAA;YAC3C,CAAC;YAED,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAuB,CAAA;QAChD,CAAC;KACF,CAAC;iDACyC;AAGnC;IADP,MAAM,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;kDACX;AAGnB;IADP,MAAM,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;kDAC7B"}
|
|
@@ -11,7 +11,7 @@ import type { AttachmentOwner } from '../relations/attachment_owner.js';
|
|
|
11
11
|
import { AttachmentLinkModel } from '../models/attachment_link_model.js';
|
|
12
12
|
import { AttachmentModel } from '../models/attachment_model.js';
|
|
13
13
|
import { LucidAttachmentStore } from './lucid_attachment_store.js';
|
|
14
|
-
export type AttachmentFileService = Pick<AttachmentService, 'create' | 'remove'> & Partial<Pick<AttachmentService, 'createDraft'>>;
|
|
14
|
+
export type AttachmentFileService = Pick<AttachmentService, 'create' | 'remove'> & Partial<Pick<AttachmentService, 'createDraft' | 'getVariantKeys' | 'getVariantMetadataEnabled' | 'getMetadataMode' | 'scheduleMetadataExtraction' | 'scheduleVariantGeneration'>>;
|
|
15
15
|
export type LucidAttachmentPersistence = Pick<LucidAttachmentStore, 'createOriginal' | 'findOriginal' | 'listVariants' | 'releaseOwner' | 'restoreOwner' | 'remove' | 'listOwnerLinks'> & Partial<Pick<LucidAttachmentStore, 'createCollectionItem' | 'findCollectionItem' | 'listCollection' | 'moveCollectionItem' | 'removeCollectionItem' | 'createOriginalLink' | 'createCollectionLink'>>;
|
|
16
16
|
export declare class LucidAttachmentLifecycleService {
|
|
17
17
|
#private;
|
package/build/src/integrations/lucid/persistence/lucid_attachment_lifecycle_service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucid_attachment_lifecycle_service.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/lucid/persistence/lucid_attachment_lifecycle_service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC3B,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAA;AACvF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"lucid_attachment_lifecycle_service.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/lucid/persistence/lucid_attachment_lifecycle_service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC3B,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAA;AACvF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAIlE,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,iBAAiB,EAAE,QAAQ,GAAG,QAAQ,CAAC,GAC9E,OAAO,CAAC,IAAI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