@hamak/ui-remote-fs 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.
Files changed (49) hide show
  1. package/dist/api/contracts/i-remote-fs-service.d.ts +1 -1
  2. package/dist/api/contracts/index.d.ts +1 -1
  3. package/dist/api/contracts/index.js +1 -1
  4. package/dist/api/index.d.ts +3 -3
  5. package/dist/api/index.js +3 -3
  6. package/dist/api/tokens/index.d.ts +1 -1
  7. package/dist/api/tokens/index.js +1 -1
  8. package/dist/api/types/index.d.ts +3 -3
  9. package/dist/api/types/index.js +3 -3
  10. package/dist/impl/actions/index.d.ts +1 -1
  11. package/dist/impl/actions/index.js +1 -1
  12. package/dist/impl/actions/remote-fs-actions.d.ts +2 -2
  13. package/dist/impl/actions/remote-fs-actions.js +1 -1
  14. package/dist/impl/autosave/index.d.ts +1 -1
  15. package/dist/impl/autosave/index.js +1 -1
  16. package/dist/impl/autosave/remote-fs-autosave-provider.d.ts +1 -1
  17. package/dist/impl/autosave/remote-fs-autosave-provider.d.ts.map +1 -1
  18. package/dist/impl/autosave/remote-fs-autosave-provider.js +2 -3
  19. package/dist/impl/index.d.ts +9 -9
  20. package/dist/impl/index.js +8 -8
  21. package/dist/impl/middleware/index.d.ts +2 -2
  22. package/dist/impl/middleware/index.js +2 -2
  23. package/dist/impl/middleware/remote-fs-middleware.d.ts +2 -2
  24. package/dist/impl/middleware/remote-fs-middleware.js +2 -2
  25. package/dist/impl/middleware/store-sync-middleware.d.ts +1 -1
  26. package/dist/impl/middleware/store-sync-middleware.d.ts.map +1 -1
  27. package/dist/impl/middleware/store-sync-middleware.js +9 -3
  28. package/dist/impl/plugin/index.d.ts +1 -1
  29. package/dist/impl/plugin/index.js +1 -1
  30. package/dist/impl/plugin/remote-fs-plugin-factory.d.ts +1 -1
  31. package/dist/impl/plugin/remote-fs-plugin-factory.d.ts.map +1 -1
  32. package/dist/impl/plugin/remote-fs-plugin-factory.js +16 -9
  33. package/dist/impl/providers/http-workspace-client.d.ts +1 -1
  34. package/dist/impl/providers/index.d.ts +1 -1
  35. package/dist/impl/providers/index.js +1 -1
  36. package/dist/impl/services/index.d.ts +1 -1
  37. package/dist/impl/services/index.js +1 -1
  38. package/dist/index.d.ts +1 -1
  39. package/dist/index.js +1 -1
  40. package/dist/spi/index.d.ts +3 -3
  41. package/dist/spi/index.js +3 -3
  42. package/dist/spi/middleware/index.d.ts +1 -1
  43. package/dist/spi/middleware/index.js +1 -1
  44. package/dist/spi/middleware/remote-fs-middleware.types.d.ts +10 -2
  45. package/dist/spi/middleware/remote-fs-middleware.types.d.ts.map +1 -1
  46. package/dist/spi/providers/i-remote-fs-provider.d.ts +1 -1
  47. package/dist/spi/providers/index.d.ts +3 -3
  48. package/dist/spi/providers/index.js +3 -3
  49. package/package.json +8 -4
@@ -4,7 +4,7 @@
4
4
  * Public interface for remote filesystem service.
5
5
  */
6
6
  import { FileInfo } from '@hamak/shared-utils';
7
- import { ErrorObject } from '../types/remote-fs-error.types';
7
+ import { ErrorObject } from '../types/remote-fs-error.types.js';
8
8
  /**
9
9
  * Result type for remote filesystem operations
10
10
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Remote FS Contracts
3
3
  */
4
- export * from './i-remote-fs-service';
4
+ export * from './i-remote-fs-service.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Remote FS Contracts
3
3
  */
4
- export * from './i-remote-fs-service';
4
+ export * from './i-remote-fs-service.js';
@@ -2,7 +2,7 @@
2
2
  * UI Remote FS API
3
3
  * Public interfaces, types, and contracts for remote filesystem
4
4
  */
5
- export * from './types';
6
- export * from './contracts';
7
- export * from './tokens';
5
+ export * from './types/index.js';
6
+ export * from './contracts/index.js';
7
+ export * from './tokens/index.js';
8
8
  //# sourceMappingURL=index.d.ts.map
package/dist/api/index.js CHANGED
@@ -2,6 +2,6 @@
2
2
  * UI Remote FS API
3
3
  * Public interfaces, types, and contracts for remote filesystem
4
4
  */
5
- export * from './types';
6
- export * from './contracts';
7
- export * from './tokens';
5
+ export * from './types/index.js';
6
+ export * from './contracts/index.js';
7
+ export * from './tokens/index.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Dependency Injection Tokens
3
3
  */
4
- export * from './remote-fs.tokens';
4
+ export * from './remote-fs.tokens.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Dependency Injection Tokens
3
3
  */
4
- export * from './remote-fs.tokens';
4
+ export * from './remote-fs.tokens.js';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Remote FS Type Definitions
3
3
  */
4
- export * from './remote-fs-action.types';
5
- export * from './remote-fs-error.types';
6
- export * from './remote-fs-config.types';
4
+ export * from './remote-fs-action.types.js';
5
+ export * from './remote-fs-error.types.js';
6
+ export * from './remote-fs-config.types.js';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Remote FS Type Definitions
3
3
  */
4
- export * from './remote-fs-action.types';
5
- export * from './remote-fs-error.types';
6
- export * from './remote-fs-config.types';
4
+ export * from './remote-fs-action.types.js';
5
+ export * from './remote-fs-error.types.js';
6
+ export * from './remote-fs-config.types.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Remote FS Actions
3
3
  */
4
- export * from './remote-fs-actions';
4
+ export * from './remote-fs-actions.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Remote FS Actions
3
3
  */
4
- export * from './remote-fs-actions';
4
+ export * from './remote-fs-actions.js';
@@ -4,9 +4,9 @@
4
4
  * Action creators for remote filesystem operations.
5
5
  * Migrated from amk/libs/ui/core/remote-fs/src/lib/remote-fs-actions.ts
6
6
  */
7
- import { RemoteFsActionTypes, ErrorObject } from '../../api';
7
+ import { RemoteFsActionTypes, ErrorObject } from '../../api/index.js';
8
8
  import { FileInfo } from '@hamak/shared-utils';
9
- import { RequestOptions } from '../../spi';
9
+ import { RequestOptions } from '../../spi/index.js';
10
10
  export interface LsRequestAction {
11
11
  type: RemoteFsActionTypes.LS_REQUEST;
12
12
  payload: {
@@ -4,7 +4,7 @@
4
4
  * Action creators for remote filesystem operations.
5
5
  * Migrated from amk/libs/ui/core/remote-fs/src/lib/remote-fs-actions.ts
6
6
  */
7
- import { RemoteFsActionTypes } from '../../api';
7
+ import { RemoteFsActionTypes } from '../../api/index.js';
8
8
  /**
9
9
  * Action factory class for creating remote filesystem actions
10
10
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Remote FS Autosave
3
3
  */
4
- export * from './remote-fs-autosave-provider';
4
+ export * from './remote-fs-autosave-provider.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Remote FS Autosave
3
3
  */
4
- export * from './remote-fs-autosave-provider';
4
+ export * from './remote-fs-autosave-provider.js';
@@ -7,7 +7,7 @@
7
7
  import type { Dispatch, AnyAction } from 'redux';
8
8
  import type { FileSystemNode } from '@hamak/shared-utils';
9
9
  import type { IAutosaveProvider, AutosaveResult } from '@hamak/ui-store-spi';
10
- import type { IPathTranslator } from '../../spi';
10
+ import type { IPathTranslator } from '../../spi/index.js';
11
11
  /**
12
12
  * Configuration for RemoteFsAutosaveProvider
13
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"remote-fs-autosave-provider.d.ts","sourceRoot":"","sources":["../../../src/impl/autosave/remote-fs-autosave-provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGjD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,mEAAmE;IACnE,cAAc,EAAE,eAAe,CAAC;CACjC;AAED;;;;;;GAMG;AACH,qBAAa,wBAAyB,YAAW,iBAAiB;IAChE,QAAQ,CAAC,EAAE,eAAe;IAC1B,QAAQ,CAAC,QAAQ,MAAM;IAEvB,OAAO,CAAC,cAAc,CAAkB;gBAE5B,MAAM,EAAE,8BAA8B;IAIlD;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO;IAQxD;;;OAGG;IACG,IAAI,CACR,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC,GAC5B,OAAO,CAAC,cAAc,CAAC;IAwB1B;;;OAGG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;CAG9B"}
1
+ {"version":3,"file":"remote-fs-autosave-provider.d.ts","sourceRoot":"","sources":["../../../src/impl/autosave/remote-fs-autosave-provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGjD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,mEAAmE;IACnE,cAAc,EAAE,eAAe,CAAC;CACjC;AAED;;;;;;GAMG;AACH,qBAAa,wBAAyB,YAAW,iBAAiB;IAChE,QAAQ,CAAC,EAAE,eAAe;IAC1B,QAAQ,CAAC,QAAQ,MAAM;IAEvB,OAAO,CAAC,cAAc,CAAkB;gBAE5B,MAAM,EAAE,8BAA8B;IAIlD;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO;IAKxD;;;OAGG;IACG,IAAI,CACR,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC,GAC5B,OAAO,CAAC,cAAc,CAAC;IAwB1B;;;OAGG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;CAG9B"}
@@ -4,7 +4,7 @@
4
4
  * Implements autosave for files managed by the remote filesystem plugin.
5
5
  * Uses PUT_REQUEST actions to save files to the remote server.
6
6
  */
7
- import { rfsActions } from '../actions/remote-fs-actions';
7
+ import { rfsActions } from '../actions/remote-fs-actions.js';
8
8
  /**
9
9
  * Autosave provider for remote filesystem
10
10
  *
@@ -39,8 +39,7 @@ export class RemoteFsAutosaveProvider {
39
39
  * Returns true if the path is under the remote mount point.
40
40
  */
41
41
  supports(path, _node) {
42
- // Check if path translator can translate this path to a remote path
43
- const remotePath = this.pathTranslator.toRemotePath({ getSegments: () => path });
42
+ const remotePath = this.pathTranslator.toRemotePath(path);
44
43
  return remotePath !== undefined;
45
44
  }
46
45
  /**
@@ -2,13 +2,13 @@
2
2
  * UI Remote FS Implementation
3
3
  * HTTP-based remote filesystem implementation
4
4
  */
5
- export * from '../api';
6
- export * from '../spi/providers';
7
- export type { RemoteFsMiddlewareFactory, StoreSyncMiddlewareFactory } from '../spi/middleware';
8
- export * from './actions';
9
- export * from './middleware';
10
- export * from './providers';
11
- export * from './plugin';
12
- export * from './services';
13
- export * from './autosave';
5
+ export * from '../api/index.js';
6
+ export * from '../spi/providers/index.js';
7
+ export type { RemoteFsMiddlewareFactory, StoreSyncMiddlewareFactory } from '../spi/middleware/index.js';
8
+ export * from './actions/index.js';
9
+ export * from './middleware/index.js';
10
+ export * from './providers/index.js';
11
+ export * from './plugin/index.js';
12
+ export * from './services/index.js';
13
+ export * from './autosave/index.js';
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -3,11 +3,11 @@
3
3
  * HTTP-based remote filesystem implementation
4
4
  */
5
5
  // Re-export API and SPI for convenience
6
- export * from '../api';
7
- export * from '../spi/providers';
8
- export * from './actions';
9
- export * from './middleware';
10
- export * from './providers';
11
- export * from './plugin';
12
- export * from './services';
13
- export * from './autosave';
6
+ export * from '../api/index.js';
7
+ export * from '../spi/providers/index.js';
8
+ export * from './actions/index.js';
9
+ export * from './middleware/index.js';
10
+ export * from './providers/index.js';
11
+ export * from './plugin/index.js';
12
+ export * from './services/index.js';
13
+ export * from './autosave/index.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Remote FS Middleware
3
3
  */
4
- export * from './remote-fs-middleware';
5
- export * from './store-sync-middleware';
4
+ export * from './remote-fs-middleware.js';
5
+ export * from './store-sync-middleware.js';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Remote FS Middleware
3
3
  */
4
- export * from './remote-fs-middleware';
5
- export * from './store-sync-middleware';
4
+ export * from './remote-fs-middleware.js';
5
+ export * from './store-sync-middleware.js';
@@ -5,8 +5,8 @@
5
5
  * Migrated from amk/libs/ui/core/remote-fs/src/lib/remote-fs-middleware.ts
6
6
  */
7
7
  import { AnyAction, Middleware } from '@reduxjs/toolkit';
8
- import type { IWorkspaceClient, IPathTranslator } from '../../spi';
9
- import { type ErrorObject } from '../../api';
8
+ import type { IWorkspaceClient, IPathTranslator } from '../../spi/index.js';
9
+ import { type ErrorObject } from '../../api/index.js';
10
10
  /**
11
11
  * Configuration for remote FS middleware
12
12
  */
@@ -5,8 +5,8 @@
5
5
  * Migrated from amk/libs/ui/core/remote-fs/src/lib/remote-fs-middleware.ts
6
6
  */
7
7
  import { Pathway } from '@hamak/shared-utils';
8
- import { RemoteFsActionTypes } from '../../api';
9
- import { rfsActions, } from '../actions/remote-fs-actions';
8
+ import { RemoteFsActionTypes } from '../../api/index.js';
9
+ import { rfsActions, } from '../actions/remote-fs-actions.js';
10
10
  /**
11
11
  * Create remote filesystem middleware
12
12
  *
@@ -6,7 +6,7 @@
6
6
  * Migrated from amk/libs/ui/core/remote-fs/src/lib/store-fs-adapter-middleware.ts
7
7
  */
8
8
  import { Middleware } from '@reduxjs/toolkit';
9
- import { StoreSyncMiddlewareConfig } from '../../spi';
9
+ import { StoreSyncMiddlewareConfig } from '../../spi/index.js';
10
10
  /**
11
11
  * Create store sync middleware
12
12
  *
@@ -1 +1 @@
1
- {"version":3,"file":"store-sync-middleware.d.ts","sourceRoot":"","sources":["../../../src/impl/middleware/store-sync-middleware.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAa,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAWtD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,GAAG,GAAG,EAC/C,MAAM,EAAE,yBAAyB,GAChC,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CA8HnB;AAED,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"store-sync-middleware.d.ts","sourceRoot":"","sources":["../../../src/impl/middleware/store-sync-middleware.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAa,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAWtD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,GAAG,GAAG,EAC/C,MAAM,EAAE,yBAAyB,GAChC,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAsInB;AAED,eAAe,yBAAyB,CAAC"}
@@ -6,8 +6,8 @@
6
6
  * Migrated from amk/libs/ui/core/remote-fs/src/lib/store-fs-adapter-middleware.ts
7
7
  */
8
8
  import { Pathway } from '@hamak/shared-utils';
9
- import { RemoteFsActionTypes } from '../../api';
10
- import { rfsActions, } from '../actions/remote-fs-actions';
9
+ import { RemoteFsActionTypes } from '../../api/index.js';
10
+ import { rfsActions, } from '../actions/remote-fs-actions.js';
11
11
  /**
12
12
  * Create store sync middleware
13
13
  *
@@ -34,6 +34,12 @@ import { rfsActions, } from '../actions/remote-fs-actions';
34
34
  export function createStoreSyncMiddleware(config) {
35
35
  const { fileSystemAdapter, autoReload = true, transformContent } = config;
36
36
  const storeFsActions = fileSystemAdapter.getActions();
37
+ // Selects the fs slice out of root state for the existence probe below.
38
+ // Defaults to the adapter's own slice key (`'fs'` in the canonical store) so a
39
+ // host whose slice is named differently isn't silently missed. Overridable via
40
+ // config.sliceSelector. See amah/app-framework#31.
41
+ const sliceSelector = config.sliceSelector ??
42
+ ((state) => state?.[fileSystemAdapter.sliceName]);
37
43
  const storeSyncMiddleware = (store) => (next) => (action) => {
38
44
  const result = next(action);
39
45
  const anyAction = action;
@@ -90,7 +96,7 @@ export function createStoreSyncMiddleware(config) {
90
96
  content = transformContent(content);
91
97
  }
92
98
  // Check if file exists in Store FS
93
- const fileSystemNode = fileSystemAdapter.createSelector((state) => state.fileSystem, localPath)(store.getState());
99
+ const fileSystemNode = fileSystemAdapter.createSelector(sliceSelector, localPath)(store.getState());
94
100
  if (fileSystemNode === undefined) {
95
101
  // File doesn't exist, create it with content
96
102
  dispatch(storeFsActions.setFile(localPath, content, 'xs:any', {
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Remote FS Plugin Factory
3
3
  */
4
- export * from './remote-fs-plugin-factory';
4
+ export * from './remote-fs-plugin-factory.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Remote FS Plugin Factory
3
3
  */
4
- export * from './remote-fs-plugin-factory';
4
+ export * from './remote-fs-plugin-factory.js';
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import type { PluginModule } from '@hamak/microkernel-spi';
8
8
  import type { Pathway } from '@hamak/shared-utils';
9
- import { IWorkspaceClient, IPathTranslator } from '../../spi';
9
+ import { IWorkspaceClient, IPathTranslator } from '../../spi/index.js';
10
10
  /**
11
11
  * Configuration for Remote FS plugin
12
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"remote-fs-plugin-factory.d.ts","sourceRoot":"","sources":["../../../src/impl/plugin/remote-fs-plugin-factory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAKnD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAkB,MAAM,WAAW,CAAC;AAU9E;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,CAAC;IAEzC;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAEhC;;OAEG;IACH,oBAAoB,CAAC,EAAE,eAAe,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,2BAA2B,GAAG,YAAY,CAkItF;AAED,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"remote-fs-plugin-factory.d.ts","sourceRoot":"","sources":["../../../src/impl/plugin/remote-fs-plugin-factory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAKnD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAkB,MAAM,WAAW,CAAC;AAU9E;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,CAAC;IAEzC;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAEhC;;OAEG;IACH,oBAAoB,CAAC,EAAE,eAAe,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,2BAA2B,GAAG,YAAY,CAyItF;AAED,eAAe,oBAAoB,CAAC"}
@@ -4,11 +4,11 @@
4
4
  * Creates a microkernel plugin for remote filesystem operations.
5
5
  * Integrates HTTP-based remote filesystem with Redux Store FS.
6
6
  */
7
- import { WORKSPACE_CLIENT_TOKEN, PATH_TRANSLATOR_TOKEN, } from '../../api';
8
- import { PathTranslator } from '../../spi';
9
- import { HttpWorkspaceClient } from '../providers/http-workspace-client';
10
- import { createRemoteFsMiddleware } from '../middleware/remote-fs-middleware';
11
- import { createStoreSyncMiddleware } from '../middleware/store-sync-middleware';
7
+ import { WORKSPACE_CLIENT_TOKEN, PATH_TRANSLATOR_TOKEN, } from '../../api/index.js';
8
+ import { PathTranslator } from '../../spi/index.js';
9
+ import { HttpWorkspaceClient } from '../providers/http-workspace-client.js';
10
+ import { createRemoteFsMiddleware } from '../middleware/remote-fs-middleware.js';
11
+ import { createStoreSyncMiddleware } from '../middleware/store-sync-middleware.js';
12
12
  import { STORE_MANAGER_TOKEN, STORE_EXTENSIONS_TOKEN, } from '@hamak/ui-store-api';
13
13
  /**
14
14
  * Create Remote FS plugin
@@ -74,10 +74,13 @@ export function createRemoteFsPlugin(config) {
74
74
  ctx.provide({ provide: PATH_TRANSLATOR_TOKEN, useValue: pathTranslator });
75
75
  // Note: IRemoteFsService implementation will be added in future phases
76
76
  // ctx.provide({ provide: REMOTE_FS_SERVICE_TOKEN, useValue: remoteFsService });
77
- log('Plugin initialized');
78
- },
79
- async activate(ctx) {
80
- log('Activating plugin...');
77
+ // Register the middleware during initialize() — NOT activate(). The store
78
+ // plugin drains the extensions collector and locks its middleware registry
79
+ // in its own activate(); since this plugin `dependsOn: ['store']`, its
80
+ // activate() runs after the store's, by which point the collector is gone.
81
+ // Registering here (store's initialize() has already provided the manager,
82
+ // init runs in topological order) ensures the middleware is collected
83
+ // regardless of activation order. See amah/app-framework#31.
81
84
  // Resolve store manager from DI
82
85
  try {
83
86
  storeManager = ctx.resolve(STORE_MANAGER_TOKEN);
@@ -133,6 +136,10 @@ export function createRemoteFsPlugin(config) {
133
136
  middleware: middlewareExtensions,
134
137
  });
135
138
  log('Middleware registered');
139
+ log('Plugin initialized');
140
+ },
141
+ async activate(ctx) {
142
+ log('Activating plugin...');
136
143
  // Emit ready event
137
144
  ctx.hooks.emit('ui-remote-fs:ready', {
138
145
  workspaceClient,
@@ -5,7 +5,7 @@
5
5
  * Migrated from amk/libs/server/ws/ws-client/src/lib/server-ws-ws-client.ts
6
6
  */
7
7
  import { AxiosInstance } from 'axios';
8
- import { IWorkspaceClient, RequestOptions } from '../../spi';
8
+ import { IWorkspaceClient, RequestOptions } from '../../spi/index.js';
9
9
  import { FileInfo } from '@hamak/shared-utils';
10
10
  /**
11
11
  * Configuration for HTTP workspace client
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Remote FS Providers
3
3
  */
4
- export * from './http-workspace-client';
4
+ export * from './http-workspace-client.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Remote FS Providers
3
3
  */
4
- export * from './http-workspace-client';
4
+ export * from './http-workspace-client.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Remote FS Services
3
3
  */
4
- export * from './remote-fs-service';
4
+ export * from './remote-fs-service.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Remote FS Services
3
3
  */
4
- export * from './remote-fs-service';
4
+ export * from './remote-fs-service.js';
package/dist/index.d.ts CHANGED
@@ -2,5 +2,5 @@
2
2
  * @hamak/ui-remote-fs
3
3
  * Remote filesystem integration for microkernel-based applications
4
4
  */
5
- export * from './impl';
5
+ export * from './impl/index.js';
6
6
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * @hamak/ui-remote-fs
3
3
  * Remote filesystem integration for microkernel-based applications
4
4
  */
5
- export * from './impl';
5
+ export * from './impl/index.js';
@@ -2,7 +2,7 @@
2
2
  * UI Remote FS SPI
3
3
  * Service Provider Interfaces for extensibility
4
4
  */
5
- export * from '../api';
6
- export * from './providers';
7
- export * from './middleware';
5
+ export * from '../api/index.js';
6
+ export * from './providers/index.js';
7
+ export * from './middleware/index.js';
8
8
  //# sourceMappingURL=index.d.ts.map
package/dist/spi/index.js CHANGED
@@ -2,6 +2,6 @@
2
2
  * UI Remote FS SPI
3
3
  * Service Provider Interfaces for extensibility
4
4
  */
5
- export * from '../api';
6
- export * from './providers';
7
- export * from './middleware';
5
+ export * from '../api/index.js';
6
+ export * from './providers/index.js';
7
+ export * from './middleware/index.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Remote FS Middleware Types
3
3
  */
4
- export * from './remote-fs-middleware.types';
4
+ export * from './remote-fs-middleware.types.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Remote FS Middleware Types
3
3
  */
4
- export * from './remote-fs-middleware.types';
4
+ export * from './remote-fs-middleware.types.js';
@@ -4,8 +4,8 @@
4
4
  * Type definitions for remote filesystem middleware.
5
5
  */
6
6
  import { Middleware } from 'redux';
7
- import { IWorkspaceClient } from '../providers/i-workspace-client';
8
- import { IPathTranslator } from '../providers/i-path-translator';
7
+ import { IWorkspaceClient } from '../providers/i-workspace-client.js';
8
+ import { IPathTranslator } from '../providers/i-path-translator.js';
9
9
  /**
10
10
  * Configuration for remote FS middleware
11
11
  */
@@ -49,6 +49,14 @@ export interface StoreSyncMiddlewareConfig {
49
49
  * Optional transform function for file content before storing
50
50
  */
51
51
  transformContent?: (content: any) => any;
52
+ /**
53
+ * Selects the filesystem slice out of the root Redux state, used by the
54
+ * GET_COMPLETED existence probe. Defaults to `(state) => state[adapter.sliceName]`
55
+ * — i.e. the slice key the adapter was created with (`'fs'` in the canonical
56
+ * store). Provide this when the host mounts the fs slice under a different key
57
+ * (e.g. `filesystem`) or uses a facade adapter. See amah/app-framework#31.
58
+ */
59
+ sliceSelector?: (state: any) => any;
52
60
  }
53
61
  /**
54
62
  * Type for remote FS middleware factory
@@ -1 +1 @@
1
- {"version":3,"file":"remote-fs-middleware.types.d.ts","sourceRoot":"","sources":["../../../src/spi/middleware/remote-fs-middleware.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC;IAEzB;;OAEG;IACH,cAAc,EAAE,eAAe,CAAC;IAEhC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAE9C;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,iBAAiB,EAAE,GAAG,CAAC;IAEvB;;OAEG;IACH,cAAc,EAAE,eAAe,CAAC;IAEhC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,CAAC,CAAC,GAAG,GAAG,IAAI,CAC/C,MAAM,EAAE,wBAAwB,KAC7B,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAEvB;;GAEG;AACH,MAAM,MAAM,0BAA0B,CAAC,CAAC,GAAG,GAAG,IAAI,CAChD,MAAM,EAAE,yBAAyB,KAC9B,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"remote-fs-middleware.types.d.ts","sourceRoot":"","sources":["../../../src/spi/middleware/remote-fs-middleware.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC;IAEzB;;OAEG;IACH,cAAc,EAAE,eAAe,CAAC;IAEhC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAE9C;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,iBAAiB,EAAE,GAAG,CAAC;IAEvB;;OAEG;IACH,cAAc,EAAE,eAAe,CAAC;IAEhC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,CAAC;IAEzC;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,CAAC,CAAC,GAAG,GAAG,IAAI,CAC/C,MAAM,EAAE,wBAAwB,KAC7B,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAEvB;;GAEG;AACH,MAAM,MAAM,0BAA0B,CAAC,CAAC,GAAG,GAAG,IAAI,CAChD,MAAM,EAAE,yBAAyB,KAC9B,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC"}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Provider abstraction for remote filesystem backends.
5
5
  */
6
- import { IWorkspaceClient } from './i-workspace-client';
6
+ import { IWorkspaceClient } from './i-workspace-client.js';
7
7
  /**
8
8
  * Interface for remote filesystem provider implementations
9
9
  *
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Remote FS Provider Interfaces
3
3
  */
4
- export * from './i-workspace-client';
5
- export * from './i-remote-fs-provider';
6
- export * from './i-path-translator';
4
+ export * from './i-workspace-client.js';
5
+ export * from './i-remote-fs-provider.js';
6
+ export * from './i-path-translator.js';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Remote FS Provider Interfaces
3
3
  */
4
- export * from './i-workspace-client';
5
- export * from './i-remote-fs-provider';
6
- export * from './i-path-translator';
4
+ export * from './i-workspace-client.js';
5
+ export * from './i-remote-fs-provider.js';
6
+ export * from './i-path-translator.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hamak/ui-remote-fs",
3
- "version": "0.6.0",
3
+ "version": "0.7.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Remote filesystem synchronization 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": ["./dist/api/index.d.ts"],
47
- "spi": ["./dist/spi/index.d.ts"]
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": {