@hamak/ui-store 0.6.0 → 0.7.2
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/dist/api/api/index.d.ts +3 -3
- package/dist/api/api/index.js +3 -3
- package/dist/api/api/middleware-registry.d.ts +1 -1
- package/dist/api/api/reducer-registry.d.ts +1 -1
- package/dist/api/api/store-manager.d.ts +3 -3
- package/dist/api/autosave/autosave-action-factory.d.ts +2 -2
- package/dist/api/autosave/autosave-action-factory.js +1 -1
- package/dist/api/autosave/autosave-action-types.d.ts +1 -1
- package/dist/api/autosave/index.d.ts +3 -3
- package/dist/api/autosave/index.js +3 -3
- package/dist/api/fs/index.d.ts +2 -2
- package/dist/api/fs/index.js +2 -2
- package/dist/api/index.d.ts +5 -5
- package/dist/api/index.js +5 -5
- package/dist/api/tokens/index.d.ts +1 -1
- package/dist/api/tokens/index.js +1 -1
- package/dist/api/tokens/service-tokens.d.ts +8 -0
- package/dist/api/tokens/service-tokens.d.ts.map +1 -1
- package/dist/api/tokens/service-tokens.js +11 -0
- package/dist/api/types/extension-types.d.ts +1 -1
- package/dist/api/types/index.d.ts +4 -4
- package/dist/api/types/index.js +4 -4
- package/dist/api/types/store-types.d.ts +20 -12
- package/dist/api/types/store-types.d.ts.map +1 -1
- package/dist/impl/autosave/autosave-config-resolver.d.ts +1 -1
- package/dist/impl/autosave/autosave-config-resolver.js +1 -1
- package/dist/impl/autosave/autosave-middleware.d.ts +2 -2
- package/dist/impl/autosave/autosave-middleware.js +2 -2
- package/dist/impl/autosave/autosave-registry.d.ts +1 -1
- package/dist/impl/autosave/autosave-sync-middleware.d.ts +1 -1
- package/dist/impl/autosave/autosave-sync-middleware.js +1 -1
- package/dist/impl/autosave/index.d.ts +4 -4
- package/dist/impl/autosave/index.js +4 -4
- package/dist/impl/core/index.d.ts +3 -3
- package/dist/impl/core/index.js +3 -3
- package/dist/impl/core/middleware-registry.d.ts +1 -1
- package/dist/impl/core/reducer-registry.d.ts +1 -1
- package/dist/impl/core/store-manager.d.ts +16 -4
- package/dist/impl/core/store-manager.d.ts.map +1 -1
- package/dist/impl/core/store-manager.js +19 -2
- package/dist/impl/extensions/store-extensions.d.ts +1 -1
- package/dist/impl/fs/commands/fs-commands.d.ts +3 -3
- package/dist/impl/fs/commands/fs-commands.d.ts.map +1 -1
- package/dist/impl/fs/commands/fs-commands.js +35 -9
- package/dist/impl/fs/commands/structure-commands.d.ts +25 -0
- package/dist/impl/fs/commands/structure-commands.d.ts.map +1 -1
- package/dist/impl/fs/core/fs-adapter.d.ts +3 -3
- package/dist/impl/fs/core/fs-adapter.js +2 -2
- package/dist/impl/fs/core/fs-facade.d.ts +2 -2
- package/dist/impl/fs/index.d.ts +6 -6
- package/dist/impl/fs/index.js +6 -6
- package/dist/impl/fs/utils/data-updater.d.ts +1 -1
- package/dist/impl/index.d.ts +8 -7
- package/dist/impl/index.d.ts.map +1 -1
- package/dist/impl/index.js +8 -7
- package/dist/impl/middleware/index.d.ts +2 -2
- package/dist/impl/middleware/index.js +2 -2
- package/dist/impl/persistence/index.d.ts +9 -0
- package/dist/impl/persistence/index.d.ts.map +1 -0
- package/dist/impl/persistence/index.js +8 -0
- package/dist/impl/persistence/persistence-filter.d.ts +11 -0
- package/dist/impl/persistence/persistence-filter.d.ts.map +1 -0
- package/dist/impl/persistence/persistence-filter.js +24 -0
- package/dist/impl/persistence/persistence-resolver.d.ts +9 -0
- package/dist/impl/persistence/persistence-resolver.d.ts.map +1 -0
- package/dist/impl/persistence/persistence-resolver.js +22 -0
- package/dist/impl/persistence/persistence-wiring.d.ts +29 -0
- package/dist/impl/persistence/persistence-wiring.d.ts.map +1 -0
- package/dist/impl/persistence/persistence-wiring.js +69 -0
- package/dist/impl/persistence/web-storage-persistence-provider.d.ts +46 -0
- package/dist/impl/persistence/web-storage-persistence-provider.d.ts.map +1 -0
- package/dist/impl/persistence/web-storage-persistence-provider.js +155 -0
- package/dist/impl/plugin/index.d.ts +1 -1
- package/dist/impl/plugin/index.js +1 -1
- package/dist/impl/plugin/store-plugin-factory.d.ts +13 -1
- package/dist/impl/plugin/store-plugin-factory.d.ts.map +1 -1
- package/dist/impl/plugin/store-plugin-factory.js +60 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/spi/autosave/i-autosave-registry.d.ts +1 -1
- package/dist/spi/autosave/index.d.ts +2 -2
- package/dist/spi/autosave/index.js +2 -2
- package/dist/spi/index.d.ts +4 -4
- package/dist/spi/index.js +4 -4
- package/dist/spi/middleware/index.d.ts +1 -1
- package/dist/spi/middleware/index.js +1 -1
- package/dist/spi/middleware/middleware-provider.d.ts +1 -1
- package/dist/spi/persistence/index.d.ts +1 -1
- package/dist/spi/persistence/index.js +1 -1
- package/package.json +8 -4
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Web Storage Persistence Provider
|
|
3
|
+
*
|
|
4
|
+
* Concrete `IPersistenceProvider` backed by a Web Storage area
|
|
5
|
+
* (`localStorage` / `sessionStorage`). When the backing storage is
|
|
6
|
+
* unavailable — SSR, private-mode quota errors, disabled storage — it
|
|
7
|
+
* degrades gracefully to an in-memory map so callers never throw. This mirrors
|
|
8
|
+
* the `createLocalStorageActiveProjectStorage` fallback pattern used
|
|
9
|
+
* downstream. See amah/app-framework#30.
|
|
10
|
+
*/
|
|
11
|
+
/** Default namespace every persisted key is prefixed with. */
|
|
12
|
+
export const DEFAULT_PERSISTENCE_NAMESPACE = '@hamak/ui-store';
|
|
13
|
+
const PROBE_KEY = '@hamak/ui-store:__persist_probe__';
|
|
14
|
+
export class WebStoragePersistenceProvider {
|
|
15
|
+
/**
|
|
16
|
+
* @param storage Backing web storage, or `null` to run in-memory only.
|
|
17
|
+
* @param namespace Key prefix; `clear()` only removes keys under this prefix
|
|
18
|
+
* so it never wipes unrelated app state.
|
|
19
|
+
*/
|
|
20
|
+
constructor(storage, namespace = DEFAULT_PERSISTENCE_NAMESPACE) {
|
|
21
|
+
Object.defineProperty(this, "storage", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
writable: true,
|
|
25
|
+
value: storage
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(this, "namespace", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: namespace
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(this, "memory", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true,
|
|
37
|
+
value: new Map()
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(this, "available", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
writable: true,
|
|
43
|
+
value: void 0
|
|
44
|
+
});
|
|
45
|
+
this.available = WebStoragePersistenceProvider.probe(storage);
|
|
46
|
+
}
|
|
47
|
+
isAvailable() {
|
|
48
|
+
return this.available;
|
|
49
|
+
}
|
|
50
|
+
async save(key, state) {
|
|
51
|
+
const serialized = JSON.stringify(state);
|
|
52
|
+
const fullKey = this.fullKey(key);
|
|
53
|
+
if (this.available && this.storage) {
|
|
54
|
+
try {
|
|
55
|
+
this.storage.setItem(fullKey, serialized);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
console.warn('[persistence] save failed, falling back to memory:', e);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
this.memory.set(fullKey, serialized);
|
|
63
|
+
}
|
|
64
|
+
async load(key) {
|
|
65
|
+
const fullKey = this.fullKey(key);
|
|
66
|
+
let raw = null;
|
|
67
|
+
if (this.available && this.storage) {
|
|
68
|
+
try {
|
|
69
|
+
raw = this.storage.getItem(fullKey);
|
|
70
|
+
}
|
|
71
|
+
catch (e) {
|
|
72
|
+
console.warn('[persistence] load failed:', e);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (raw == null) {
|
|
76
|
+
raw = this.memory.get(fullKey) ?? null;
|
|
77
|
+
}
|
|
78
|
+
if (raw == null)
|
|
79
|
+
return null;
|
|
80
|
+
try {
|
|
81
|
+
return JSON.parse(raw);
|
|
82
|
+
}
|
|
83
|
+
catch (e) {
|
|
84
|
+
console.warn('[persistence] could not parse persisted state:', e);
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
async remove(key) {
|
|
89
|
+
const fullKey = this.fullKey(key);
|
|
90
|
+
this.memory.delete(fullKey);
|
|
91
|
+
if (this.available && this.storage) {
|
|
92
|
+
try {
|
|
93
|
+
this.storage.removeItem(fullKey);
|
|
94
|
+
}
|
|
95
|
+
catch (e) {
|
|
96
|
+
console.warn('[persistence] remove failed:', e);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
async clear() {
|
|
101
|
+
// Only remove keys under our namespace — never the whole storage area.
|
|
102
|
+
for (const memKey of [...this.memory.keys()]) {
|
|
103
|
+
if (memKey.startsWith(this.namespace))
|
|
104
|
+
this.memory.delete(memKey);
|
|
105
|
+
}
|
|
106
|
+
if (this.available && this.storage) {
|
|
107
|
+
try {
|
|
108
|
+
const toRemove = [];
|
|
109
|
+
for (let i = 0; i < this.storage.length; i++) {
|
|
110
|
+
const k = this.storage.key(i);
|
|
111
|
+
if (k && k.startsWith(this.namespace))
|
|
112
|
+
toRemove.push(k);
|
|
113
|
+
}
|
|
114
|
+
toRemove.forEach((k) => this.storage.removeItem(k));
|
|
115
|
+
}
|
|
116
|
+
catch (e) {
|
|
117
|
+
console.warn('[persistence] clear failed:', e);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
fullKey(key) {
|
|
122
|
+
return `${this.namespace}:${key}`;
|
|
123
|
+
}
|
|
124
|
+
/** Verify the storage area is usable with a write/remove round-trip. */
|
|
125
|
+
static probe(storage) {
|
|
126
|
+
if (!storage)
|
|
127
|
+
return false;
|
|
128
|
+
try {
|
|
129
|
+
storage.setItem(PROBE_KEY, '1');
|
|
130
|
+
storage.removeItem(PROBE_KEY);
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function getWindowStorage(kind) {
|
|
139
|
+
try {
|
|
140
|
+
const g = globalThis;
|
|
141
|
+
return g[kind] ?? null;
|
|
142
|
+
}
|
|
143
|
+
catch {
|
|
144
|
+
// Accessing storage can throw in some sandboxed environments.
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/** Provider backed by `window.localStorage` (in-memory fallback when absent). */
|
|
149
|
+
export function createLocalStoragePersistenceProvider(namespace) {
|
|
150
|
+
return new WebStoragePersistenceProvider(getWindowStorage('localStorage'), namespace);
|
|
151
|
+
}
|
|
152
|
+
/** Provider backed by `window.sessionStorage` (in-memory fallback when absent). */
|
|
153
|
+
export function createSessionStoragePersistenceProvider(namespace) {
|
|
154
|
+
return new WebStoragePersistenceProvider(getWindowStorage('sessionStorage'), namespace);
|
|
155
|
+
}
|
|
@@ -3,13 +3,25 @@
|
|
|
3
3
|
* Creates a microkernel plugin for Redux store management
|
|
4
4
|
*/
|
|
5
5
|
import type { PluginModule } from '@hamak/microkernel-spi';
|
|
6
|
-
import { type StorePluginExtensions } from '../../api';
|
|
6
|
+
import { type StorePluginExtensions, type StorePersistenceConfig } from '../../api/index.js';
|
|
7
|
+
import type { IPersistenceProvider } from '../../spi/index.js';
|
|
7
8
|
export declare const FILESYSTEM_ADAPTER_TOKEN = "FILESYSTEM_ADAPTER";
|
|
8
9
|
export interface StorePluginConfig extends StorePluginExtensions {
|
|
9
10
|
/** Enable Redux DevTools integration */
|
|
10
11
|
devTools?: boolean;
|
|
11
12
|
/** Enable logger middleware in development */
|
|
12
13
|
logger?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* State persistence configuration. When `enabled`, the whitelisted slice is
|
|
16
|
+
* rehydrated on boot and saved (debounced) on change. See #30.
|
|
17
|
+
*/
|
|
18
|
+
persistence?: StorePersistenceConfig;
|
|
19
|
+
/**
|
|
20
|
+
* Custom persistence provider to mount instead of the default web-storage
|
|
21
|
+
* one. Takes precedence over any DI-registered provider and over the
|
|
22
|
+
* `persistence.storage` default. See #30.
|
|
23
|
+
*/
|
|
24
|
+
persistenceProvider?: IPersistenceProvider;
|
|
13
25
|
}
|
|
14
26
|
export declare function createStorePlugin(config?: StorePluginConfig): PluginModule;
|
|
15
27
|
//# sourceMappingURL=store-plugin-factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-plugin-factory.d.ts","sourceRoot":"","sources":["../../../src/impl/plugin/store-plugin-factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"store-plugin-factory.d.ts","sourceRoot":"","sources":["../../../src/impl/plugin/store-plugin-factory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAQL,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC5B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AActD,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAE7D,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,WAAW,CAAC,EAAE,sBAAsB,CAAC;IAErC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,oBAAoB,CAAC;CAC5C;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,GAAE,iBAAsB,GAC7B,YAAY,CAmMd"}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
* Store Plugin Factory
|
|
3
3
|
* Creates a microkernel plugin for Redux store management
|
|
4
4
|
*/
|
|
5
|
-
import { STORE_MANAGER_TOKEN, MIDDLEWARE_REGISTRY_TOKEN, REDUCER_REGISTRY_TOKEN, STORE_EXTENSIONS_TOKEN, } from '../../api';
|
|
6
|
-
import { StoreManager } from '../core/store-manager';
|
|
7
|
-
import { createEventBridgeMiddleware, createLoggerMiddleware, } from '../middleware';
|
|
8
|
-
import { applyStoreExtensions, createStoreExtensionsCollector, } from '../extensions/store-extensions';
|
|
9
|
-
import { createFileSystemAdapter } from '../fs/core/fs-adapter';
|
|
5
|
+
import { STORE_MANAGER_TOKEN, MIDDLEWARE_REGISTRY_TOKEN, REDUCER_REGISTRY_TOKEN, STORE_EXTENSIONS_TOKEN, PERSISTENCE_PROVIDER_TOKEN, PERSISTENCE_PROVIDER_GLOBAL_TOKEN, } from '../../api/index.js';
|
|
6
|
+
import { StoreManager } from '../core/store-manager.js';
|
|
7
|
+
import { createEventBridgeMiddleware, createLoggerMiddleware, } from '../middleware/index.js';
|
|
8
|
+
import { applyStoreExtensions, createStoreExtensionsCollector, } from '../extensions/store-extensions.js';
|
|
9
|
+
import { createFileSystemAdapter } from '../fs/core/fs-adapter.js';
|
|
10
|
+
import { resolvePersistenceProvider, loadPersistedState } from '../persistence/index.js';
|
|
10
11
|
// DI token for filesystem adapter
|
|
11
12
|
export const FILESYSTEM_ADAPTER_TOKEN = 'FILESYSTEM_ADAPTER';
|
|
12
13
|
export function createStorePlugin(config = {}) {
|
|
@@ -14,6 +15,8 @@ export function createStorePlugin(config = {}) {
|
|
|
14
15
|
const middlewareRegistry = storeManager.getMiddlewareRegistry();
|
|
15
16
|
const reducerRegistry = storeManager.getReducerRegistry();
|
|
16
17
|
const extensionsCollector = createStoreExtensionsCollector();
|
|
18
|
+
// Resolved once in initialize(), reused in activate() for rehydrate + save.
|
|
19
|
+
let persistenceProvider;
|
|
17
20
|
// Create filesystem adapter with 'fs' slice name
|
|
18
21
|
const fileSystemAdapter = createFileSystemAdapter('fs');
|
|
19
22
|
const registerDefaultMiddleware = (hooks) => {
|
|
@@ -95,15 +98,67 @@ export function createStorePlugin(config = {}) {
|
|
|
95
98
|
provide: FILESYSTEM_ADAPTER_TOKEN,
|
|
96
99
|
useValue: fileSystemAdapter,
|
|
97
100
|
});
|
|
101
|
+
// Back-compat aliases (global symbol registry). The unique-symbol tokens
|
|
102
|
+
// above only resolve for consumers that import them from
|
|
103
|
+
// `@hamak/ui-store-api`. Several sibling plugins (ui-navigation, auth,
|
|
104
|
+
// notification, event-channel) deliberately stay decoupled and look the
|
|
105
|
+
// store services up via `Symbol.for(...)` keys instead. Register the same
|
|
106
|
+
// instances under those global keys so those lookups succeed instead of
|
|
107
|
+
// silently no-opping. See amah/app-framework#28 and #5.
|
|
108
|
+
ctx.provide({
|
|
109
|
+
provide: Symbol.for('StoreManager'),
|
|
110
|
+
useValue: storeManager,
|
|
111
|
+
});
|
|
112
|
+
ctx.provide({
|
|
113
|
+
provide: Symbol.for('@hamak/ui-store:StoreExtensionsRegistry'),
|
|
114
|
+
useValue: extensionsCollector,
|
|
115
|
+
});
|
|
116
|
+
// Resolve the persistence provider (Option B, #30). Precedence:
|
|
117
|
+
// 1. explicit mount-time provider (config.persistenceProvider)
|
|
118
|
+
// 2. a provider another plugin already registered under the token
|
|
119
|
+
// 3. a default built from `persistence.storage`
|
|
120
|
+
// The resolved instance is re-provided under both the unique and global
|
|
121
|
+
// tokens so sibling plugins can look it up the same way they do the store.
|
|
122
|
+
persistenceProvider = config.persistenceProvider;
|
|
123
|
+
if (!persistenceProvider) {
|
|
124
|
+
try {
|
|
125
|
+
persistenceProvider = ctx.resolve(PERSISTENCE_PROVIDER_TOKEN);
|
|
126
|
+
}
|
|
127
|
+
catch {
|
|
128
|
+
// No provider registered yet — fall through to the default.
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (!persistenceProvider && config.persistence?.enabled) {
|
|
132
|
+
persistenceProvider = resolvePersistenceProvider(config.persistence);
|
|
133
|
+
}
|
|
134
|
+
if (persistenceProvider) {
|
|
135
|
+
ctx.provide({
|
|
136
|
+
provide: PERSISTENCE_PROVIDER_TOKEN,
|
|
137
|
+
useValue: persistenceProvider,
|
|
138
|
+
});
|
|
139
|
+
ctx.provide({
|
|
140
|
+
provide: PERSISTENCE_PROVIDER_GLOBAL_TOKEN,
|
|
141
|
+
useValue: persistenceProvider,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
98
144
|
registerDefaultMiddleware(ctx.hooks);
|
|
99
145
|
registerConfigExtensions();
|
|
100
146
|
console.log('[ui-store] Plugin initialized with filesystem support');
|
|
101
147
|
},
|
|
102
148
|
async activate(ctx) {
|
|
103
149
|
applyStoreExtensions(extensionsCollector, middlewareRegistry, reducerRegistry);
|
|
150
|
+
// Rehydrate the persisted slice before store creation (load() is async,
|
|
151
|
+
// but preloadedState must be supplied synchronously). See #30.
|
|
152
|
+
let preloadedState;
|
|
153
|
+
if (persistenceProvider && config.persistence?.enabled) {
|
|
154
|
+
preloadedState = await loadPersistedState(persistenceProvider, config.persistence);
|
|
155
|
+
}
|
|
104
156
|
// Initialize the store after all plugins have registered middleware/reducers
|
|
105
157
|
const store = storeManager.initialize({
|
|
106
158
|
devTools: config.devTools,
|
|
159
|
+
preloadedState,
|
|
160
|
+
persistence: config.persistence,
|
|
161
|
+
persistenceProvider,
|
|
107
162
|
});
|
|
108
163
|
// Bridge Redux state changes to microkernel events
|
|
109
164
|
store.subscribe(() => {
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* the appropriate provider for each file.
|
|
7
7
|
*/
|
|
8
8
|
import type { FileSystemNode } from '@hamak/shared-utils';
|
|
9
|
-
import type { IAutosaveProvider } from './i-autosave-provider';
|
|
9
|
+
import type { IAutosaveProvider } from './i-autosave-provider.js';
|
|
10
10
|
/**
|
|
11
11
|
* Registry for autosave providers
|
|
12
12
|
*/
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Service Provider Interfaces for autosave functionality.
|
|
5
5
|
*/
|
|
6
|
-
export * from './i-autosave-provider';
|
|
7
|
-
export * from './i-autosave-registry';
|
|
6
|
+
export * from './i-autosave-provider.js';
|
|
7
|
+
export * from './i-autosave-registry.js';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/spi/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* UI Store SPI
|
|
3
3
|
* Service Provider Interfaces for Redux store extensions
|
|
4
4
|
*/
|
|
5
|
-
export * from '../api';
|
|
6
|
-
export * from './middleware';
|
|
7
|
-
export * from './persistence';
|
|
8
|
-
export * from './autosave';
|
|
5
|
+
export * from '../api/index.js';
|
|
6
|
+
export * from './middleware/index.js';
|
|
7
|
+
export * from './persistence/index.js';
|
|
8
|
+
export * from './autosave/index.js';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/spi/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Service Provider Interfaces for Redux store extensions
|
|
4
4
|
*/
|
|
5
5
|
// Re-export API for convenience
|
|
6
|
-
export * from '../api';
|
|
7
|
-
export * from './middleware';
|
|
8
|
-
export * from './persistence';
|
|
9
|
-
export * from './autosave';
|
|
6
|
+
export * from '../api/index.js';
|
|
7
|
+
export * from './middleware/index.js';
|
|
8
|
+
export * from './persistence/index.js';
|
|
9
|
+
export * from './autosave/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './middleware-provider';
|
|
1
|
+
export * from './middleware-provider.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './middleware-provider';
|
|
1
|
+
export * from './middleware-provider.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './persistence-provider';
|
|
1
|
+
export * from './persistence-provider.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './persistence-provider';
|
|
1
|
+
export * from './persistence-provider.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hamak/ui-store",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Redux store management for microkernel-based applications",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "tsc -p tsconfig.lib.json",
|
|
22
|
+
"build": "tsc -p tsconfig.lib.json && node ../../scripts/fix-esm-extensions.mjs ./dist",
|
|
23
23
|
"clean": "rm -rf dist",
|
|
24
24
|
"test": "vitest run",
|
|
25
25
|
"test:watch": "vitest"
|
|
@@ -43,8 +43,12 @@
|
|
|
43
43
|
},
|
|
44
44
|
"typesVersions": {
|
|
45
45
|
"*": {
|
|
46
|
-
"api": [
|
|
47
|
-
|
|
46
|
+
"api": [
|
|
47
|
+
"./dist/api/index.d.ts"
|
|
48
|
+
],
|
|
49
|
+
"spi": [
|
|
50
|
+
"./dist/spi/index.d.ts"
|
|
51
|
+
]
|
|
48
52
|
}
|
|
49
53
|
},
|
|
50
54
|
"dependencies": {
|