@hamak/ui-store-api 0.11.0 → 0.12.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.
Files changed (73) hide show
  1. package/package.json +2 -2
  2. package/dist/api/index.d.ts +0 -7
  3. package/dist/api/index.d.ts.map +0 -1
  4. package/dist/api/index.js +0 -6
  5. package/dist/api/middleware-registry.d.ts +0 -33
  6. package/dist/api/middleware-registry.d.ts.map +0 -1
  7. package/dist/api/middleware-registry.js +0 -5
  8. package/dist/api/reducer-registry.d.ts +0 -41
  9. package/dist/api/reducer-registry.d.ts.map +0 -1
  10. package/dist/api/reducer-registry.js +0 -5
  11. package/dist/api/store-manager.d.ts +0 -55
  12. package/dist/api/store-manager.d.ts.map +0 -1
  13. package/dist/api/store-manager.js +0 -5
  14. package/dist/autosave/autosave-action-factory.d.ts +0 -69
  15. package/dist/autosave/autosave-action-factory.d.ts.map +0 -1
  16. package/dist/autosave/autosave-action-factory.js +0 -135
  17. package/dist/autosave/autosave-action-types.d.ts +0 -134
  18. package/dist/autosave/autosave-action-types.d.ts.map +0 -1
  19. package/dist/autosave/autosave-action-types.js +0 -44
  20. package/dist/autosave/autosave-types.d.ts +0 -86
  21. package/dist/autosave/autosave-types.d.ts.map +0 -1
  22. package/dist/autosave/autosave-types.js +0 -35
  23. package/dist/autosave/index.d.ts +0 -9
  24. package/dist/autosave/index.d.ts.map +0 -1
  25. package/dist/autosave/index.js +0 -8
  26. package/dist/es2015/api/index.js +0 -22
  27. package/dist/es2015/api/middleware-registry.js +0 -6
  28. package/dist/es2015/api/reducer-registry.js +0 -6
  29. package/dist/es2015/api/store-manager.js +0 -6
  30. package/dist/es2015/autosave/autosave-action-factory.js +0 -139
  31. package/dist/es2015/autosave/autosave-action-types.js +0 -47
  32. package/dist/es2015/autosave/autosave-types.js +0 -40
  33. package/dist/es2015/autosave/index.js +0 -24
  34. package/dist/es2015/fs/contracts/filesystem-facade.contract.js +0 -2
  35. package/dist/es2015/fs/contracts/filesystem-manager.contract.js +0 -2
  36. package/dist/es2015/fs/index.js +0 -22
  37. package/dist/es2015/tokens/index.js +0 -20
  38. package/dist/es2015/tokens/service-tokens.js +0 -13
  39. package/dist/es2015/types/extension-types.js +0 -5
  40. package/dist/es2015/types/index.js +0 -23
  41. package/dist/es2015/types/middleware-types.js +0 -5
  42. package/dist/es2015/types/reducer-types.js +0 -5
  43. package/dist/es2015/types/store-types.js +0 -5
  44. package/dist/fs/contracts/filesystem-facade.contract.d.ts +0 -57
  45. package/dist/fs/contracts/filesystem-facade.contract.d.ts.map +0 -1
  46. package/dist/fs/contracts/filesystem-facade.contract.js +0 -1
  47. package/dist/fs/contracts/filesystem-manager.contract.d.ts +0 -42
  48. package/dist/fs/contracts/filesystem-manager.contract.d.ts.map +0 -1
  49. package/dist/fs/contracts/filesystem-manager.contract.js +0 -1
  50. package/dist/fs/index.d.ts +0 -5
  51. package/dist/fs/index.d.ts.map +0 -1
  52. package/dist/fs/index.js +0 -4
  53. package/dist/tokens/index.d.ts +0 -5
  54. package/dist/tokens/index.d.ts.map +0 -1
  55. package/dist/tokens/index.js +0 -4
  56. package/dist/tokens/service-tokens.d.ts +0 -10
  57. package/dist/tokens/service-tokens.d.ts.map +0 -1
  58. package/dist/tokens/service-tokens.js +0 -10
  59. package/dist/types/extension-types.d.ts +0 -32
  60. package/dist/types/extension-types.d.ts.map +0 -1
  61. package/dist/types/extension-types.js +0 -4
  62. package/dist/types/index.d.ts +0 -8
  63. package/dist/types/index.d.ts.map +0 -1
  64. package/dist/types/index.js +0 -7
  65. package/dist/types/middleware-types.d.ts +0 -31
  66. package/dist/types/middleware-types.d.ts.map +0 -1
  67. package/dist/types/middleware-types.js +0 -4
  68. package/dist/types/reducer-types.d.ts +0 -22
  69. package/dist/types/reducer-types.d.ts.map +0 -1
  70. package/dist/types/reducer-types.js +0 -4
  71. package/dist/types/store-types.d.ts +0 -49
  72. package/dist/types/store-types.d.ts.map +0 -1
  73. package/dist/types/store-types.js +0 -4
@@ -1,86 +0,0 @@
1
- /**
2
- * Autosave Types
3
- *
4
- * Core types for the autosave feature. These are used by:
5
- * - ui-store-impl: Core autosave middleware
6
- * - Plugin providers: RemoteFs, Resource, Git autosave providers
7
- */
8
- /**
9
- * Extension state key for autosave
10
- * Used to store autosave state in FileSystemNode.state.extensionStates
11
- */
12
- export declare const AUTOSAVE_EXTENSION_KEY = "autosave";
13
- /**
14
- * Autosave configuration
15
- *
16
- * Can be set at multiple levels with inheritance:
17
- * - File node extension state (highest priority)
18
- * - Parent folder extension state
19
- * - Plugin default config
20
- * - Global default config (lowest priority)
21
- */
22
- export interface AutosaveConfig {
23
- /** Enable/disable autosave */
24
- enabled: boolean;
25
- /** Debounce delay in milliseconds before triggering save. Default: 1500 */
26
- debounceMs?: number;
27
- /** Maximum wait time before forced save regardless of continued edits. Default: 10000 */
28
- maxWaitMs?: number;
29
- /** Save when file loses focus. Default: true */
30
- saveOnBlur?: boolean;
31
- /** Retry failed saves automatically. Default: true */
32
- retryOnFailure?: boolean;
33
- /** Maximum retry attempts before giving up. Default: 3 */
34
- maxRetries?: number;
35
- /** Inherit configuration from parent folder. Default: true */
36
- inherit?: boolean;
37
- }
38
- /**
39
- * Autosave status values
40
- */
41
- export type AutosaveStatus = 'idle' | 'pending' | 'saving' | 'error' | 'disabled';
42
- /**
43
- * Autosave error information
44
- */
45
- export interface AutosaveError {
46
- /** Error code */
47
- code: string;
48
- /** Error message */
49
- message: string;
50
- /** Which retry attempt this error occurred on */
51
- attempt: number;
52
- }
53
- /**
54
- * Autosave extension state
55
- *
56
- * Stored in FileSystemNode.state.extensionStates[AUTOSAVE_EXTENSION_KEY]
57
- */
58
- export interface AutosaveExtensionState {
59
- /** Explicit configuration on this node (undefined if inherited) */
60
- config?: AutosaveConfig;
61
- /** Computed: is autosave effectively enabled for this node? */
62
- effectivelyEnabled: boolean;
63
- /** Current autosave status */
64
- status: AutosaveStatus;
65
- /** Timestamp when content first became dirty (pending save) */
66
- pendingSince?: number;
67
- /** Timestamp of last save attempt */
68
- lastSaveAttempt?: number;
69
- /** Timestamp of last successful save */
70
- lastSaveSuccess?: number;
71
- /** Last save error (cleared on success) */
72
- lastSaveError?: AutosaveError;
73
- /** Current retry count (reset on success) */
74
- retryCount?: number;
75
- /** Provider ID that handles this node */
76
- providerId?: string;
77
- }
78
- /**
79
- * Default autosave configuration values
80
- */
81
- export declare const DEFAULT_AUTOSAVE_CONFIG: Required<AutosaveConfig>;
82
- /**
83
- * Create initial autosave extension state
84
- */
85
- export declare function createInitialAutosaveState(config?: AutosaveConfig, providerId?: string): AutosaveExtensionState;
86
- //# sourceMappingURL=autosave-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"autosave-types.d.ts","sourceRoot":"","sources":["../../src/autosave/autosave-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,aAAa,CAAC;AAEjD;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,8BAA8B;IAC9B,OAAO,EAAE,OAAO,CAAC;IAEjB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,yFAAyF;IACzF,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,sDAAsD;IACtD,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,SAAS,GACT,QAAQ,GACR,OAAO,GACP,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IAEb,oBAAoB;IACpB,OAAO,EAAE,MAAM,CAAC;IAEhB,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,mEAAmE;IACnE,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB,+DAA+D;IAC/D,kBAAkB,EAAE,OAAO,CAAC;IAE5B,8BAA8B;IAC9B,MAAM,EAAE,cAAc,CAAC;IAEvB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,qCAAqC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,wCAAwC;IACxC,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,cAAc,CAQ5D,CAAC;AAEF;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,CAAC,EAAE,cAAc,EACvB,UAAU,CAAC,EAAE,MAAM,GAClB,sBAAsB,CAOxB"}
@@ -1,35 +0,0 @@
1
- /**
2
- * Autosave Types
3
- *
4
- * Core types for the autosave feature. These are used by:
5
- * - ui-store-impl: Core autosave middleware
6
- * - Plugin providers: RemoteFs, Resource, Git autosave providers
7
- */
8
- /**
9
- * Extension state key for autosave
10
- * Used to store autosave state in FileSystemNode.state.extensionStates
11
- */
12
- export const AUTOSAVE_EXTENSION_KEY = 'autosave';
13
- /**
14
- * Default autosave configuration values
15
- */
16
- export const DEFAULT_AUTOSAVE_CONFIG = {
17
- enabled: false,
18
- debounceMs: 1500,
19
- maxWaitMs: 10000,
20
- saveOnBlur: true,
21
- retryOnFailure: true,
22
- maxRetries: 3,
23
- inherit: true,
24
- };
25
- /**
26
- * Create initial autosave extension state
27
- */
28
- export function createInitialAutosaveState(config, providerId) {
29
- return {
30
- config,
31
- effectivelyEnabled: config?.enabled ?? false,
32
- status: config?.enabled === false ? 'disabled' : 'idle',
33
- providerId,
34
- };
35
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * Autosave Module
3
- *
4
- * Public API for autosave functionality.
5
- */
6
- export * from './autosave-types.js';
7
- export * from './autosave-action-types.js';
8
- export * from './autosave-action-factory.js';
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/autosave/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Autosave Module
3
- *
4
- * Public API for autosave functionality.
5
- */
6
- export * from './autosave-types.js';
7
- export * from './autosave-action-types.js';
8
- export * from './autosave-action-factory.js';
@@ -1,22 +0,0 @@
1
- "use strict";
2
- /**
3
- * API Interfaces Export
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
- };
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- __exportStar(require("./store-manager"), exports);
21
- __exportStar(require("./middleware-registry"), exports);
22
- __exportStar(require("./reducer-registry"), exports);
@@ -1,6 +0,0 @@
1
- "use strict";
2
- /**
3
- * Middleware Registry Interface
4
- * Extension point for plugins to contribute middleware
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- "use strict";
2
- /**
3
- * Reducer Registry Interface
4
- * Allows dynamic reducer registration and hot replacement
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- "use strict";
2
- /**
3
- * Store Manager Interface
4
- * Main orchestrator for Redux store management
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,139 +0,0 @@
1
- "use strict";
2
- /**
3
- * Autosave Action Factory
4
- *
5
- * Factory for creating autosave actions.
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.autosaveActions = exports.AutosaveActionFactory = void 0;
9
- const autosave_action_types_1 = require("./autosave-action-types");
10
- /**
11
- * Factory class for creating autosave actions
12
- */
13
- class AutosaveActionFactory {
14
- // ─────────────────────────────────────────────────────────────────
15
- // Configuration Actions
16
- // ─────────────────────────────────────────────────────────────────
17
- /**
18
- * Set autosave configuration for a path
19
- */
20
- setConfig(path, config) {
21
- return {
22
- type: autosave_action_types_1.AutosaveActionTypes.SET_CONFIG,
23
- payload: { path, config },
24
- };
25
- }
26
- /**
27
- * Clear autosave configuration for a path (revert to inherited)
28
- */
29
- clearConfig(path) {
30
- return {
31
- type: autosave_action_types_1.AutosaveActionTypes.CLEAR_CONFIG,
32
- payload: { path },
33
- };
34
- }
35
- // ─────────────────────────────────────────────────────────────────
36
- // Lifecycle Actions (used internally by middleware)
37
- // ─────────────────────────────────────────────────────────────────
38
- /**
39
- * Content change detected, debounce timer started
40
- */
41
- changeDetected(path, detectedAt, scheduledFor, providerId) {
42
- return {
43
- type: autosave_action_types_1.AutosaveActionTypes.CHANGE_DETECTED,
44
- payload: { path, detectedAt, scheduledFor, providerId },
45
- };
46
- }
47
- /**
48
- * Debounce timer expired, ready to save
49
- */
50
- debounceExpired(path) {
51
- return {
52
- type: autosave_action_types_1.AutosaveActionTypes.DEBOUNCE_EXPIRED,
53
- payload: { path },
54
- };
55
- }
56
- /**
57
- * Save operation started
58
- */
59
- saveStarted(path, providerId) {
60
- return {
61
- type: autosave_action_types_1.AutosaveActionTypes.SAVE_STARTED,
62
- payload: { path, providerId },
63
- };
64
- }
65
- /**
66
- * Save completed successfully
67
- */
68
- saveSucceeded(path, timestamp) {
69
- return {
70
- type: autosave_action_types_1.AutosaveActionTypes.SAVE_SUCCEEDED,
71
- payload: { path, timestamp: timestamp !== null && timestamp !== void 0 ? timestamp : Date.now() },
72
- };
73
- }
74
- /**
75
- * Save failed
76
- */
77
- saveFailed(path, error, attempt = 1) {
78
- return {
79
- type: autosave_action_types_1.AutosaveActionTypes.SAVE_FAILED,
80
- payload: {
81
- path,
82
- error: Object.assign(Object.assign({}, error), { attempt }),
83
- },
84
- };
85
- }
86
- /**
87
- * Retry scheduled
88
- */
89
- retryScheduled(path, retryAt, attempt) {
90
- return {
91
- type: autosave_action_types_1.AutosaveActionTypes.RETRY_SCHEDULED,
92
- payload: { path, retryAt, attempt },
93
- };
94
- }
95
- // ─────────────────────────────────────────────────────────────────
96
- // Manual Trigger Actions
97
- // ─────────────────────────────────────────────────────────────────
98
- /**
99
- * Flush pending save immediately (cancels debounce)
100
- */
101
- flushPending(path) {
102
- return {
103
- type: autosave_action_types_1.AutosaveActionTypes.FLUSH_PENDING,
104
- payload: { path },
105
- };
106
- }
107
- /**
108
- * Flush all pending saves
109
- */
110
- flushAllPending() {
111
- return {
112
- type: autosave_action_types_1.AutosaveActionTypes.FLUSH_ALL_PENDING,
113
- };
114
- }
115
- /**
116
- * Cancel pending save
117
- */
118
- cancelPending(path) {
119
- return {
120
- type: autosave_action_types_1.AutosaveActionTypes.CANCEL_PENDING,
121
- payload: { path },
122
- };
123
- }
124
- // ─────────────────────────────────────────────────────────────────
125
- // Type Guards
126
- // ─────────────────────────────────────────────────────────────────
127
- /**
128
- * Check if an action is an autosave action
129
- */
130
- isAutosaveAction(action) {
131
- return (typeof action.type === 'string' &&
132
- action.type.startsWith('@@autosave/'));
133
- }
134
- }
135
- exports.AutosaveActionFactory = AutosaveActionFactory;
136
- /**
137
- * Singleton instance of the autosave action factory
138
- */
139
- exports.autosaveActions = new AutosaveActionFactory();
@@ -1,47 +0,0 @@
1
- "use strict";
2
- /**
3
- * Autosave Action Types
4
- *
5
- * These actions orchestrate the autosave lifecycle but do NOT execute saves.
6
- * Actual saves are performed by plugin providers using their own actions
7
- * (e.g., PUT_REQUEST for remote-fs, UPDATE_ENTITY for remote-resource).
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.AutosaveActionTypes = void 0;
11
- /**
12
- * Autosave action type constants
13
- */
14
- var AutosaveActionTypes;
15
- (function (AutosaveActionTypes) {
16
- // ─────────────────────────────────────────────────────────────────
17
- // Configuration Actions
18
- // ─────────────────────────────────────────────────────────────────
19
- /** Set autosave configuration for a path */
20
- AutosaveActionTypes["SET_CONFIG"] = "@@autosave/SET_CONFIG";
21
- /** Clear autosave configuration (revert to inherited) */
22
- AutosaveActionTypes["CLEAR_CONFIG"] = "@@autosave/CLEAR_CONFIG";
23
- // ─────────────────────────────────────────────────────────────────
24
- // Lifecycle Actions (dispatched by middleware)
25
- // ─────────────────────────────────────────────────────────────────
26
- /** Content change detected, debounce timer started */
27
- AutosaveActionTypes["CHANGE_DETECTED"] = "@@autosave/CHANGE_DETECTED";
28
- /** Debounce timer expired, save will be triggered */
29
- AutosaveActionTypes["DEBOUNCE_EXPIRED"] = "@@autosave/DEBOUNCE_EXPIRED";
30
- /** Save operation started */
31
- AutosaveActionTypes["SAVE_STARTED"] = "@@autosave/SAVE_STARTED";
32
- /** Save completed successfully */
33
- AutosaveActionTypes["SAVE_SUCCEEDED"] = "@@autosave/SAVE_SUCCEEDED";
34
- /** Save failed */
35
- AutosaveActionTypes["SAVE_FAILED"] = "@@autosave/SAVE_FAILED";
36
- /** Retry scheduled */
37
- AutosaveActionTypes["RETRY_SCHEDULED"] = "@@autosave/RETRY_SCHEDULED";
38
- // ─────────────────────────────────────────────────────────────────
39
- // Manual Trigger Actions
40
- // ─────────────────────────────────────────────────────────────────
41
- /** Flush pending save immediately (cancels debounce) */
42
- AutosaveActionTypes["FLUSH_PENDING"] = "@@autosave/FLUSH_PENDING";
43
- /** Flush all pending saves */
44
- AutosaveActionTypes["FLUSH_ALL_PENDING"] = "@@autosave/FLUSH_ALL_PENDING";
45
- /** Cancel pending save */
46
- AutosaveActionTypes["CANCEL_PENDING"] = "@@autosave/CANCEL_PENDING";
47
- })(AutosaveActionTypes || (exports.AutosaveActionTypes = AutosaveActionTypes = {}));
@@ -1,40 +0,0 @@
1
- "use strict";
2
- /**
3
- * Autosave Types
4
- *
5
- * Core types for the autosave feature. These are used by:
6
- * - ui-store-impl: Core autosave middleware
7
- * - Plugin providers: RemoteFs, Resource, Git autosave providers
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.createInitialAutosaveState = exports.DEFAULT_AUTOSAVE_CONFIG = exports.AUTOSAVE_EXTENSION_KEY = void 0;
11
- /**
12
- * Extension state key for autosave
13
- * Used to store autosave state in FileSystemNode.state.extensionStates
14
- */
15
- exports.AUTOSAVE_EXTENSION_KEY = 'autosave';
16
- /**
17
- * Default autosave configuration values
18
- */
19
- exports.DEFAULT_AUTOSAVE_CONFIG = {
20
- enabled: false,
21
- debounceMs: 1500,
22
- maxWaitMs: 10000,
23
- saveOnBlur: true,
24
- retryOnFailure: true,
25
- maxRetries: 3,
26
- inherit: true,
27
- };
28
- /**
29
- * Create initial autosave extension state
30
- */
31
- function createInitialAutosaveState(config, providerId) {
32
- var _a;
33
- return {
34
- config,
35
- effectivelyEnabled: (_a = config === null || config === void 0 ? void 0 : config.enabled) !== null && _a !== void 0 ? _a : false,
36
- status: (config === null || config === void 0 ? void 0 : config.enabled) === false ? 'disabled' : 'idle',
37
- providerId,
38
- };
39
- }
40
- exports.createInitialAutosaveState = createInitialAutosaveState;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- /**
3
- * Autosave Module
4
- *
5
- * Public API for autosave functionality.
6
- */
7
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
- if (k2 === undefined) k2 = k;
9
- var desc = Object.getOwnPropertyDescriptor(m, k);
10
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
11
- desc = { enumerable: true, get: function() { return m[k]; } };
12
- }
13
- Object.defineProperty(o, k2, desc);
14
- }) : (function(o, m, k, k2) {
15
- if (k2 === undefined) k2 = k;
16
- o[k2] = m[k];
17
- }));
18
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- __exportStar(require("./autosave-types"), exports);
23
- __exportStar(require("./autosave-action-types"), exports);
24
- __exportStar(require("./autosave-action-factory"), exports);
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,22 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.fileSystemNodeInitialState = void 0;
18
- var shared_utils_1 = require("@hamak/shared-utils");
19
- Object.defineProperty(exports, "fileSystemNodeInitialState", { enumerable: true, get: function () { return shared_utils_1.fileSystemNodeInitialState; } });
20
- // Filesystem contracts
21
- __exportStar(require("./contracts/filesystem-manager.contract"), exports);
22
- __exportStar(require("./contracts/filesystem-facade.contract"), exports);
@@ -1,20 +0,0 @@
1
- "use strict";
2
- /**
3
- * Tokens Export
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
- };
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- __exportStar(require("./service-tokens"), exports);
@@ -1,13 +0,0 @@
1
- "use strict";
2
- /**
3
- * Dependency Injection Tokens
4
- * Used for service resolution in the microkernel
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.AUTOSAVE_REGISTRY_TOKEN = exports.STORE_EXTENSIONS_TOKEN = exports.REDUCER_REGISTRY_TOKEN = exports.MIDDLEWARE_REGISTRY_TOKEN = exports.STORE_MANAGER_TOKEN = void 0;
8
- exports.STORE_MANAGER_TOKEN = Symbol('StoreManager');
9
- exports.MIDDLEWARE_REGISTRY_TOKEN = Symbol('MiddlewareRegistry');
10
- exports.REDUCER_REGISTRY_TOKEN = Symbol('ReducerRegistry');
11
- exports.STORE_EXTENSIONS_TOKEN = Symbol('StoreExtensions');
12
- // Autosave tokens
13
- exports.AUTOSAVE_REGISTRY_TOKEN = Symbol('AutosaveRegistry');
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * Store extension types
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,23 +0,0 @@
1
- "use strict";
2
- /**
3
- * Type Definitions Export
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
- };
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- __exportStar(require("./store-types"), exports);
21
- __exportStar(require("./middleware-types"), exports);
22
- __exportStar(require("./reducer-types"), exports);
23
- __exportStar(require("./extension-types"), exports);
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * Middleware Type Definitions
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * Reducer Type Definitions
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * Store Type Definitions
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,57 +0,0 @@
1
- import { FileSystemNode, DirectoryNode, FileNode, Path } from '@hamak/shared-utils';
2
- /**
3
- * High-level facade for filesystem operations
4
- * Provides a convenient API over the filesystem manager
5
- */
6
- export interface IFileSystemFacade {
7
- /**
8
- * Get the root directory node
9
- */
10
- getRoot(): DirectoryNode;
11
- /**
12
- * Resolve a file or directory at the given path
13
- */
14
- resolve(path: Path): FileSystemNode | undefined;
15
- /**
16
- * Resolve a file at the given path
17
- */
18
- resolveFile<T = any>(path: Path): FileNode<T> | undefined;
19
- /**
20
- * Resolve a directory at the given path
21
- */
22
- resolveDirectory(path: Path): DirectoryNode | undefined;
23
- /**
24
- * Create or update a file at the given path
25
- */
26
- setFile<T = any>(path: Path, content: T, schema?: string, params?: {
27
- override?: boolean;
28
- contentIsPresent?: boolean;
29
- }): void;
30
- /**
31
- * Update file content at the given path
32
- */
33
- updateFileContent<T = any>(path: Path, content: T): void;
34
- /**
35
- * Create a directory at the given path
36
- */
37
- mkdir(path: Path, params?: {
38
- override?: boolean;
39
- }): void;
40
- /**
41
- * Remove a file or directory at the given path
42
- */
43
- remove(path: Path): void;
44
- /**
45
- * Check if a path exists
46
- */
47
- exists(path: Path): boolean;
48
- /**
49
- * Check if a path is a file
50
- */
51
- isFile(path: Path): boolean;
52
- /**
53
- * Check if a path is a directory
54
- */
55
- isDirectory(path: Path): boolean;
56
- }
57
- //# sourceMappingURL=filesystem-facade.contract.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filesystem-facade.contract.d.ts","sourceRoot":"","sources":["../../../src/fs/contracts/filesystem-facade.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEpF;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,IAAI,aAAa,CAAC;IAEzB;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,cAAc,GAAG,SAAS,CAAC;IAEhD;;OAEG;IACH,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IAE1D;;OAEG;IACH,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,aAAa,GAAG,SAAS,CAAC;IAExD;;OAEG;IACH,OAAO,CAAC,CAAC,GAAG,GAAG,EACb,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,CAAC,EACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,GAC1D,IAAI,CAAC;IAER;;OAEG;IACH,iBAAiB,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC;IAEzD;;OAEG;IACH,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAEzD;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;IAE5B;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;IAE5B;;OAEG;IACH,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;CAClC"}
@@ -1 +0,0 @@
1
- export {};