promidas 2.0.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/LICENSE +21 -0
- package/README.md +179 -0
- package/dist/builder.d.ts +158 -0
- package/dist/builder.d.ts.map +1 -0
- package/dist/builder.js +255 -0
- package/dist/builder.js.map +1 -0
- package/dist/factory.d.ts +154 -0
- package/dist/factory.d.ts.map +1 -0
- package/dist/factory.js +243 -0
- package/dist/factory.js.map +1 -0
- package/dist/fetcher/client/config.d.ts +140 -0
- package/dist/fetcher/client/config.d.ts.map +1 -0
- package/dist/fetcher/client/config.js +2 -0
- package/dist/fetcher/client/config.js.map +1 -0
- package/dist/fetcher/client/fetch-with-progress.d.ts +156 -0
- package/dist/fetcher/client/fetch-with-progress.d.ts.map +1 -0
- package/dist/fetcher/client/fetch-with-progress.js +313 -0
- package/dist/fetcher/client/fetch-with-progress.js.map +1 -0
- package/dist/fetcher/client/fetch-with-timeout.d.ts +6 -0
- package/dist/fetcher/client/fetch-with-timeout.d.ts.map +1 -0
- package/dist/fetcher/client/fetch-with-timeout.js +48 -0
- package/dist/fetcher/client/fetch-with-timeout.js.map +1 -0
- package/dist/fetcher/client/protopedia-api-custom-client.d.ts +141 -0
- package/dist/fetcher/client/protopedia-api-custom-client.d.ts.map +1 -0
- package/dist/fetcher/client/protopedia-api-custom-client.js +268 -0
- package/dist/fetcher/client/protopedia-api-custom-client.js.map +1 -0
- package/dist/fetcher/client/select-custom-fetch.d.ts +58 -0
- package/dist/fetcher/client/select-custom-fetch.d.ts.map +1 -0
- package/dist/fetcher/client/select-custom-fetch.js +58 -0
- package/dist/fetcher/client/select-custom-fetch.js.map +1 -0
- package/dist/fetcher/errors/fetcher-error.d.ts +10 -0
- package/dist/fetcher/errors/fetcher-error.d.ts.map +1 -0
- package/dist/fetcher/errors/fetcher-error.js +15 -0
- package/dist/fetcher/errors/fetcher-error.js.map +1 -0
- package/dist/fetcher/index.d.ts +73 -0
- package/dist/fetcher/index.d.ts.map +1 -0
- package/dist/fetcher/index.js +70 -0
- package/dist/fetcher/index.js.map +1 -0
- package/dist/fetcher/types/index.d.ts +9 -0
- package/dist/fetcher/types/index.d.ts.map +1 -0
- package/dist/fetcher/types/index.js +7 -0
- package/dist/fetcher/types/index.js.map +1 -0
- package/dist/fetcher/types/progress-event.types.d.ts +221 -0
- package/dist/fetcher/types/progress-event.types.d.ts.map +1 -0
- package/dist/fetcher/types/progress-event.types.js +10 -0
- package/dist/fetcher/types/progress-event.types.js.map +1 -0
- package/dist/fetcher/types/prototype-api.types.d.ts +106 -0
- package/dist/fetcher/types/prototype-api.types.d.ts.map +1 -0
- package/dist/fetcher/types/prototype-api.types.js +2 -0
- package/dist/fetcher/types/prototype-api.types.js.map +1 -0
- package/dist/fetcher/types/result.types.d.ts +75 -0
- package/dist/fetcher/types/result.types.d.ts.map +1 -0
- package/dist/fetcher/types/result.types.js +2 -0
- package/dist/fetcher/types/result.types.js.map +1 -0
- package/dist/fetcher/utils/create-client-fetch.d.ts +63 -0
- package/dist/fetcher/utils/create-client-fetch.d.ts.map +1 -0
- package/dist/fetcher/utils/create-client-fetch.js +89 -0
- package/dist/fetcher/utils/create-client-fetch.js.map +1 -0
- package/dist/fetcher/utils/create-fetch-with-stripped-headers.d.ts +6 -0
- package/dist/fetcher/utils/create-fetch-with-stripped-headers.d.ts.map +1 -0
- package/dist/fetcher/utils/create-fetch-with-stripped-headers.js +40 -0
- package/dist/fetcher/utils/create-fetch-with-stripped-headers.js.map +1 -0
- package/dist/fetcher/utils/errors/handler.d.ts +58 -0
- package/dist/fetcher/utils/errors/handler.d.ts.map +1 -0
- package/dist/fetcher/utils/errors/handler.js +243 -0
- package/dist/fetcher/utils/errors/handler.js.map +1 -0
- package/dist/fetcher/utils/errors/messages.d.ts +75 -0
- package/dist/fetcher/utils/errors/messages.d.ts.map +1 -0
- package/dist/fetcher/utils/errors/messages.js +88 -0
- package/dist/fetcher/utils/errors/messages.js.map +1 -0
- package/dist/fetcher/utils/index.d.ts +13 -0
- package/dist/fetcher/utils/index.d.ts.map +1 -0
- package/dist/fetcher/utils/index.js +12 -0
- package/dist/fetcher/utils/index.js.map +1 -0
- package/dist/fetcher/utils/log-timestamp-normalization-warnings.d.ts +10 -0
- package/dist/fetcher/utils/log-timestamp-normalization-warnings.d.ts.map +1 -0
- package/dist/fetcher/utils/log-timestamp-normalization-warnings.js +32 -0
- package/dist/fetcher/utils/log-timestamp-normalization-warnings.js.map +1 -0
- package/dist/fetcher/utils/normalize-protopedia-timestamp.d.ts +59 -0
- package/dist/fetcher/utils/normalize-protopedia-timestamp.d.ts.map +1 -0
- package/dist/fetcher/utils/normalize-protopedia-timestamp.js +81 -0
- package/dist/fetcher/utils/normalize-protopedia-timestamp.js.map +1 -0
- package/dist/fetcher/utils/normalize-prototype.d.ts +56 -0
- package/dist/fetcher/utils/normalize-prototype.d.ts.map +1 -0
- package/dist/fetcher/utils/normalize-prototype.js +113 -0
- package/dist/fetcher/utils/normalize-prototype.js.map +1 -0
- package/dist/fetcher/utils/sanitize-options.d.ts +14 -0
- package/dist/fetcher/utils/sanitize-options.d.ts.map +1 -0
- package/dist/fetcher/utils/sanitize-options.js +16 -0
- package/dist/fetcher/utils/sanitize-options.js.map +1 -0
- package/dist/fetcher/utils/string-parsers.d.ts +45 -0
- package/dist/fetcher/utils/string-parsers.d.ts.map +1 -0
- package/dist/fetcher/utils/string-parsers.js +53 -0
- package/dist/fetcher/utils/string-parsers.js.map +1 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +70 -0
- package/dist/index.js.map +1 -0
- package/dist/logger/console-logger.d.ts +74 -0
- package/dist/logger/console-logger.d.ts.map +1 -0
- package/dist/logger/console-logger.js +113 -0
- package/dist/logger/console-logger.js.map +1 -0
- package/dist/logger/factory.d.ts +88 -0
- package/dist/logger/factory.d.ts.map +1 -0
- package/dist/logger/factory.js +94 -0
- package/dist/logger/factory.js.map +1 -0
- package/dist/logger/index.d.ts +42 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +41 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/logger/logger.types.d.ts +49 -0
- package/dist/logger/logger.types.d.ts.map +1 -0
- package/dist/logger/logger.types.js +2 -0
- package/dist/logger/logger.types.js.map +1 -0
- package/dist/repository/errors/validation-error.d.ts +24 -0
- package/dist/repository/errors/validation-error.d.ts.map +1 -0
- package/dist/repository/errors/validation-error.js +26 -0
- package/dist/repository/errors/validation-error.js.map +1 -0
- package/dist/repository/index.d.ts +122 -0
- package/dist/repository/index.d.ts.map +1 -0
- package/dist/repository/index.js +44 -0
- package/dist/repository/index.js.map +1 -0
- package/dist/repository/protopedia-in-memory-repository.d.ts +560 -0
- package/dist/repository/protopedia-in-memory-repository.d.ts.map +1 -0
- package/dist/repository/protopedia-in-memory-repository.js +929 -0
- package/dist/repository/protopedia-in-memory-repository.js.map +1 -0
- package/dist/repository/schemas/index.d.ts +9 -0
- package/dist/repository/schemas/index.d.ts.map +1 -0
- package/dist/repository/schemas/index.js +11 -0
- package/dist/repository/schemas/index.js.map +1 -0
- package/dist/repository/schemas/params.d.ts +44 -0
- package/dist/repository/schemas/params.d.ts.map +1 -0
- package/dist/repository/schemas/params.js +44 -0
- package/dist/repository/schemas/params.js.map +1 -0
- package/dist/repository/schemas/serializable-snapshot.d.ts +33 -0
- package/dist/repository/schemas/serializable-snapshot.d.ts.map +1 -0
- package/dist/repository/schemas/serializable-snapshot.js +45 -0
- package/dist/repository/schemas/serializable-snapshot.js.map +1 -0
- package/dist/repository/types/analysis.types.d.ts +89 -0
- package/dist/repository/types/analysis.types.d.ts.map +1 -0
- package/dist/repository/types/analysis.types.js +2 -0
- package/dist/repository/types/analysis.types.js.map +1 -0
- package/dist/repository/types/index.d.ts +12 -0
- package/dist/repository/types/index.d.ts.map +1 -0
- package/dist/repository/types/index.js +7 -0
- package/dist/repository/types/index.js.map +1 -0
- package/dist/repository/types/repository-events.types.d.ts +110 -0
- package/dist/repository/types/repository-events.types.d.ts.map +1 -0
- package/dist/repository/types/repository-events.types.js +2 -0
- package/dist/repository/types/repository-events.types.js.map +1 -0
- package/dist/repository/types/repository.types.d.ts +330 -0
- package/dist/repository/types/repository.types.d.ts.map +1 -0
- package/dist/repository/types/repository.types.js +2 -0
- package/dist/repository/types/repository.types.js.map +1 -0
- package/dist/repository/types/result.types.d.ts +55 -0
- package/dist/repository/types/result.types.d.ts.map +1 -0
- package/dist/repository/types/result.types.js +2 -0
- package/dist/repository/types/result.types.js.map +1 -0
- package/dist/repository/types/serialization.types.d.ts +61 -0
- package/dist/repository/types/serialization.types.d.ts.map +1 -0
- package/dist/repository/types/serialization.types.js +2 -0
- package/dist/repository/types/serialization.types.js.map +1 -0
- package/dist/repository/types/snapshot-operation.types.d.ts +140 -0
- package/dist/repository/types/snapshot-operation.types.d.ts.map +1 -0
- package/dist/repository/types/snapshot-operation.types.js +2 -0
- package/dist/repository/types/snapshot-operation.types.js.map +1 -0
- package/dist/repository/utils/convert-fetch-result.d.ts +46 -0
- package/dist/repository/utils/convert-fetch-result.d.ts.map +1 -0
- package/dist/repository/utils/convert-fetch-result.js +59 -0
- package/dist/repository/utils/convert-fetch-result.js.map +1 -0
- package/dist/repository/utils/convert-store-result.d.ts +36 -0
- package/dist/repository/utils/convert-store-result.d.ts.map +1 -0
- package/dist/repository/utils/convert-store-result.js +36 -0
- package/dist/repository/utils/convert-store-result.js.map +1 -0
- package/dist/repository/utils/emit-repository-event-safely.d.ts +5 -0
- package/dist/repository/utils/emit-repository-event-safely.d.ts.map +1 -0
- package/dist/repository/utils/emit-repository-event-safely.js +17 -0
- package/dist/repository/utils/emit-repository-event-safely.js.map +1 -0
- package/dist/repository/utils/index.d.ts +3 -0
- package/dist/repository/utils/index.d.ts.map +1 -0
- package/dist/repository/utils/index.js +3 -0
- package/dist/repository/utils/index.js.map +1 -0
- package/dist/repository/validation/index.d.ts +9 -0
- package/dist/repository/validation/index.d.ts.map +1 -0
- package/dist/repository/validation/index.js +10 -0
- package/dist/repository/validation/index.js.map +1 -0
- package/dist/repository/validation/params-validators.d.ts +46 -0
- package/dist/repository/validation/params-validators.d.ts.map +1 -0
- package/dist/repository/validation/params-validators.js +68 -0
- package/dist/repository/validation/params-validators.js.map +1 -0
- package/dist/repository/validation/serializable-snapshot.d.ts +47 -0
- package/dist/repository/validation/serializable-snapshot.d.ts.map +1 -0
- package/dist/repository/validation/serializable-snapshot.js +104 -0
- package/dist/repository/validation/serializable-snapshot.js.map +1 -0
- package/dist/schemas/index.d.ts +8 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +8 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/normalized-prototype.d.ts +56 -0
- package/dist/schemas/normalized-prototype.d.ts.map +1 -0
- package/dist/schemas/normalized-prototype.js +123 -0
- package/dist/schemas/normalized-prototype.js.map +1 -0
- package/dist/store/errors/store-error.d.ts +148 -0
- package/dist/store/errors/store-error.d.ts.map +1 -0
- package/dist/store/errors/store-error.js +156 -0
- package/dist/store/errors/store-error.js.map +1 -0
- package/dist/store/index.d.ts +84 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +83 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/store.d.ts +295 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +411 -0
- package/dist/store/store.js.map +1 -0
- package/dist/store/types/index.d.ts +2 -0
- package/dist/store/types/index.d.ts.map +1 -0
- package/dist/store/types/index.js +2 -0
- package/dist/store/types/index.js.map +1 -0
- package/dist/store/types/result.types.d.ts +67 -0
- package/dist/store/types/result.types.d.ts.map +1 -0
- package/dist/store/types/result.types.js +2 -0
- package/dist/store/types/result.types.js.map +1 -0
- package/dist/types/codes.d.ts +44 -0
- package/dist/types/codes.d.ts.map +1 -0
- package/dist/types/codes.js +9 -0
- package/dist/types/codes.js.map +1 -0
- package/dist/types/index.d.ts +61 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +60 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/normalized-prototype.d.ts +95 -0
- package/dist/types/normalized-prototype.d.ts.map +1 -0
- package/dist/types/normalized-prototype.js +2 -0
- package/dist/types/normalized-prototype.js.map +1 -0
- package/dist/utils/converters/index.d.ts +15 -0
- package/dist/utils/converters/index.d.ts.map +1 -0
- package/dist/utils/converters/index.js +15 -0
- package/dist/utils/converters/index.js.map +1 -0
- package/dist/utils/converters/license-type.d.ts +23 -0
- package/dist/utils/converters/license-type.d.ts.map +1 -0
- package/dist/utils/converters/license-type.js +38 -0
- package/dist/utils/converters/license-type.js.map +1 -0
- package/dist/utils/converters/release-flag.d.ts +24 -0
- package/dist/utils/converters/release-flag.d.ts.map +1 -0
- package/dist/utils/converters/release-flag.js +40 -0
- package/dist/utils/converters/release-flag.js.map +1 -0
- package/dist/utils/converters/status.d.ts +23 -0
- package/dist/utils/converters/status.d.ts.map +1 -0
- package/dist/utils/converters/status.js +40 -0
- package/dist/utils/converters/status.js.map +1 -0
- package/dist/utils/converters/thanks-flag.d.ts +25 -0
- package/dist/utils/converters/thanks-flag.d.ts.map +1 -0
- package/dist/utils/converters/thanks-flag.js +41 -0
- package/dist/utils/converters/thanks-flag.js.map +1 -0
- package/dist/utils/deep-merge.d.ts +38 -0
- package/dist/utils/deep-merge.d.ts.map +1 -0
- package/dist/utils/deep-merge.js +85 -0
- package/dist/utils/deep-merge.js.map +1 -0
- package/dist/utils/index.d.ts +80 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +85 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger-utils.d.ts +100 -0
- package/dist/utils/logger-utils.d.ts.map +1 -0
- package/dist/utils/logger-utils.js +265 -0
- package/dist/utils/logger-utils.js.map +1 -0
- package/dist/utils/time/constants.d.ts +14 -0
- package/dist/utils/time/constants.d.ts.map +1 -0
- package/dist/utils/time/constants.js +14 -0
- package/dist/utils/time/constants.js.map +1 -0
- package/dist/utils/time/index.d.ts +28 -0
- package/dist/utils/time/index.d.ts.map +1 -0
- package/dist/utils/time/index.js +28 -0
- package/dist/utils/time/index.js.map +1 -0
- package/dist/utils/time/parser.d.ts +91 -0
- package/dist/utils/time/parser.d.ts.map +1 -0
- package/dist/utils/time/parser.js +143 -0
- package/dist/utils/time/parser.js.map +1 -0
- package/dist/utils/validation/index.d.ts +8 -0
- package/dist/utils/validation/index.d.ts.map +1 -0
- package/dist/utils/validation/index.js +7 -0
- package/dist/utils/validation/index.js.map +1 -0
- package/dist/utils/validation/normalized-prototype.d.ts +64 -0
- package/dist/utils/validation/normalized-prototype.d.ts.map +1 -0
- package/dist/utils/validation/normalized-prototype.js +97 -0
- package/dist/utils/validation/normalized-prototype.js.map +1 -0
- package/dist/utils/validation/types.d.ts +62 -0
- package/dist/utils/validation/types.d.ts.map +1 -0
- package/dist/utils/validation/types.js +8 -0
- package/dist/utils/validation/types.js.map +1 -0
- package/dist/version.d.ts +6 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/package.json +138 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repository module - Type definitions and implementation class.
|
|
3
|
+
*
|
|
4
|
+
* This module provides type definitions for the in-memory repository pattern
|
|
5
|
+
* managing ProtoPedia prototype data with automatic TTL management.
|
|
6
|
+
*
|
|
7
|
+
* ## What This Module Exports
|
|
8
|
+
*
|
|
9
|
+
* - **Type definitions**: {@link ProtopediaInMemoryRepository}, {@link NormalizedPrototype}, etc.
|
|
10
|
+
* - **Implementation class**: {@link ProtopediaInMemoryRepositoryImpl} (for advanced use)
|
|
11
|
+
* - **Re-exported types**: Logger, LogLevel, StoreConfig for convenience
|
|
12
|
+
*
|
|
13
|
+
* ## Usage
|
|
14
|
+
*
|
|
15
|
+
* See [Getting Started Guide](https://f88.github.io/promidas/getting-started.html)
|
|
16
|
+
* for usage examples and API documentation.
|
|
17
|
+
*
|
|
18
|
+
* @module
|
|
19
|
+
* @see {@link ProtopediaInMemoryRepository} for the repository interface
|
|
20
|
+
* @see https://f88.github.io/promidas/ for complete documentation
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Core data type used by the repository.
|
|
24
|
+
*
|
|
25
|
+
* Re-exported from types module for convenience when using the repository standalone.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* import type { NormalizedPrototype } from 'promidas/repository';
|
|
30
|
+
*
|
|
31
|
+
* const prototypes: NormalizedPrototype[] = await repository.getAllFromSnapshot();
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export type { NormalizedPrototype } from '../types/index.js';
|
|
35
|
+
/**
|
|
36
|
+
* Logger types for custom logger configuration.
|
|
37
|
+
*
|
|
38
|
+
* Re-exported from logger module for convenience.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```typescript
|
|
42
|
+
* import type { Logger } from 'promidas/repository';
|
|
43
|
+
*
|
|
44
|
+
* const customLogger: Logger = {
|
|
45
|
+
* debug: (msg) => console.debug(msg),
|
|
46
|
+
* info: (msg) => console.info(msg),
|
|
47
|
+
* warn: (msg) => console.warn(msg),
|
|
48
|
+
* error: (msg) => console.error(msg),
|
|
49
|
+
* };
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export type { Logger, LogLevel } from '../logger/index.js';
|
|
53
|
+
/**
|
|
54
|
+
* Statistics about the current in-memory snapshot.
|
|
55
|
+
*
|
|
56
|
+
* Provides metadata about the snapshot including size, creation time,
|
|
57
|
+
* expiration status, and TTL configuration.
|
|
58
|
+
*
|
|
59
|
+
* Re-exported from {@link PrototypeInMemoryStats} for convenience.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```typescript
|
|
63
|
+
* const stats = await repository.getStats();
|
|
64
|
+
* console.log(`Snapshot contains ${stats.size} prototypes`);
|
|
65
|
+
* console.log(`Expires: ${stats.expiresAt ? 'Yes' : 'Never'}`);
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export type { PrototypeInMemoryStats as ProtopediaInMemoryRepositoryStats } from '../store/index.js';
|
|
69
|
+
/**
|
|
70
|
+
* Configuration options for the in-memory store.
|
|
71
|
+
*
|
|
72
|
+
* Re-exported from the store module for convenience.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* import type { PrototypeInMemoryStoreConfig } from 'promidas/repository';
|
|
77
|
+
*
|
|
78
|
+
* const storeConfig: PrototypeInMemoryStoreConfig = {
|
|
79
|
+
* ttlMs: 30 * 60 * 1000,
|
|
80
|
+
* maxDataSizeBytes: 10 * 1024 * 1024,
|
|
81
|
+
* logLevel: 'info'
|
|
82
|
+
* };
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
export type { PrototypeInMemoryStoreConfig } from '../store/index.js';
|
|
86
|
+
/**
|
|
87
|
+
* Type definitions for repository operations and results.
|
|
88
|
+
*
|
|
89
|
+
* Exports all type definitions used by the repository interface:
|
|
90
|
+
*
|
|
91
|
+
* - {@link ProtopediaInMemoryRepository} - Main repository interface
|
|
92
|
+
* - {@link ProtopediaInMemoryRepositoryConfig} - Repository configuration options
|
|
93
|
+
* - {@link RepositoryEvents} - Event types for snapshot operations (Issue #19)
|
|
94
|
+
* - {@link SnapshotOperationResult} - Result type for setup/refresh operations
|
|
95
|
+
* - {@link SnapshotOperationSuccess} - Success variant with metadata
|
|
96
|
+
* - {@link SnapshotOperationFailure} - Failure variant with error details
|
|
97
|
+
* - {@link PrototypeAnalysisResult} - Statistical analysis result type
|
|
98
|
+
*/
|
|
99
|
+
export type { ProtopediaInMemoryRepository, ProtopediaInMemoryRepositoryConfig, RepositoryEvents, PrototypeAnalysisResult, SnapshotOperationResult, SnapshotOperationSuccess, SnapshotOperationFailure, } from './types/index.js';
|
|
100
|
+
/**
|
|
101
|
+
* Validation error thrown when invalid arguments are provided.
|
|
102
|
+
*
|
|
103
|
+
* This error is thrown by repository methods when arguments fail validation.
|
|
104
|
+
* It wraps internal validation errors to provide a consistent error interface.
|
|
105
|
+
*
|
|
106
|
+
* @see {@link ProtopediaInMemoryRepository.getPrototypeFromSnapshotByPrototypeId}
|
|
107
|
+
* @see {@link ProtopediaInMemoryRepository.getRandomSampleFromSnapshot}
|
|
108
|
+
*/
|
|
109
|
+
export { ValidationError } from './errors/validation-error.js';
|
|
110
|
+
/**
|
|
111
|
+
* Implementation class for the in-memory repository.
|
|
112
|
+
*
|
|
113
|
+
* This is the concrete implementation of {@link ProtopediaInMemoryRepository}.
|
|
114
|
+
* Exported for testing purposes and type inspection.
|
|
115
|
+
*
|
|
116
|
+
* **Note**: For normal usage, import from `promidas` instead.
|
|
117
|
+
* See module documentation for usage examples.
|
|
118
|
+
*
|
|
119
|
+
* @see {@link ProtopediaInMemoryRepository} for the interface definition
|
|
120
|
+
*/
|
|
121
|
+
export { ProtopediaInMemoryRepositoryImpl } from './protopedia-in-memory-repository.js';
|
|
122
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/repository/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;;;;;GAWG;AACH,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D;;;;;;;;;;;;;;;;GAgBG;AACH,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;;;;;;;;;;;;;GAcG;AACH,YAAY,EAAE,sBAAsB,IAAI,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AAErG;;;;;;;;;;;;;;;GAeG;AACH,YAAY,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAEtE;;;;;;;;;;;;GAYG;AACH,YAAY,EACV,4BAA4B,EAC5B,kCAAkC,EAClC,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;GAQG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D;;;;;;;;;;GAUG;AACH,OAAO,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Repository module - Type definitions and implementation class.
|
|
3
|
+
*
|
|
4
|
+
* This module provides type definitions for the in-memory repository pattern
|
|
5
|
+
* managing ProtoPedia prototype data with automatic TTL management.
|
|
6
|
+
*
|
|
7
|
+
* ## What This Module Exports
|
|
8
|
+
*
|
|
9
|
+
* - **Type definitions**: {@link ProtopediaInMemoryRepository}, {@link NormalizedPrototype}, etc.
|
|
10
|
+
* - **Implementation class**: {@link ProtopediaInMemoryRepositoryImpl} (for advanced use)
|
|
11
|
+
* - **Re-exported types**: Logger, LogLevel, StoreConfig for convenience
|
|
12
|
+
*
|
|
13
|
+
* ## Usage
|
|
14
|
+
*
|
|
15
|
+
* See [Getting Started Guide](https://f88.github.io/promidas/getting-started.html)
|
|
16
|
+
* for usage examples and API documentation.
|
|
17
|
+
*
|
|
18
|
+
* @module
|
|
19
|
+
* @see {@link ProtopediaInMemoryRepository} for the repository interface
|
|
20
|
+
* @see https://f88.github.io/promidas/ for complete documentation
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Validation error thrown when invalid arguments are provided.
|
|
24
|
+
*
|
|
25
|
+
* This error is thrown by repository methods when arguments fail validation.
|
|
26
|
+
* It wraps internal validation errors to provide a consistent error interface.
|
|
27
|
+
*
|
|
28
|
+
* @see {@link ProtopediaInMemoryRepository.getPrototypeFromSnapshotByPrototypeId}
|
|
29
|
+
* @see {@link ProtopediaInMemoryRepository.getRandomSampleFromSnapshot}
|
|
30
|
+
*/
|
|
31
|
+
export { ValidationError } from './errors/validation-error.js';
|
|
32
|
+
/**
|
|
33
|
+
* Implementation class for the in-memory repository.
|
|
34
|
+
*
|
|
35
|
+
* This is the concrete implementation of {@link ProtopediaInMemoryRepository}.
|
|
36
|
+
* Exported for testing purposes and type inspection.
|
|
37
|
+
*
|
|
38
|
+
* **Note**: For normal usage, import from `promidas` instead.
|
|
39
|
+
* See module documentation for usage examples.
|
|
40
|
+
*
|
|
41
|
+
* @see {@link ProtopediaInMemoryRepository} for the interface definition
|
|
42
|
+
*/
|
|
43
|
+
export { ProtopediaInMemoryRepositoryImpl } from './protopedia-in-memory-repository.js';
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/repository/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AA6FH;;;;;;;;GAQG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D;;;;;;;;;;GAUG;AACH,OAAO,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC"}
|