@hamak/ui-remote-fs-impl 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.d.ts +5 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +4 -0
- package/dist/actions/remote-fs-actions.d.ts +189 -0
- package/dist/actions/remote-fs-actions.d.ts.map +1 -0
- package/dist/actions/remote-fs-actions.js +146 -0
- package/dist/es2015/actions/index.js +20 -0
- package/dist/es2015/actions/remote-fs-actions.js +147 -0
- package/dist/es2015/index.js +25 -0
- package/dist/es2015/middleware/index.js +21 -0
- package/dist/es2015/middleware/remote-fs-middleware.js +205 -0
- package/dist/es2015/middleware/store-sync-middleware.js +138 -0
- package/dist/es2015/plugin/index.js +20 -0
- package/dist/es2015/plugin/remote-fs-plugin-factory.js +169 -0
- package/dist/es2015/providers/http-workspace-client.js +199 -0
- package/dist/es2015/providers/index.js +20 -0
- package/dist/es2015/services/index.js +20 -0
- package/dist/es2015/services/remote-fs-service.js +16 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/middleware/index.d.ts +6 -0
- package/dist/middleware/index.d.ts.map +1 -0
- package/dist/middleware/index.js +5 -0
- package/dist/middleware/remote-fs-middleware.d.ts +50 -0
- package/dist/middleware/remote-fs-middleware.d.ts.map +1 -0
- package/dist/middleware/remote-fs-middleware.js +192 -0
- package/dist/middleware/store-sync-middleware.d.ts +35 -0
- package/dist/middleware/store-sync-middleware.d.ts.map +1 -0
- package/dist/middleware/store-sync-middleware.js +134 -0
- package/dist/plugin/index.d.ts +5 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +4 -0
- package/dist/plugin/remote-fs-plugin-factory.d.ts +84 -0
- package/dist/plugin/remote-fs-plugin-factory.d.ts.map +1 -0
- package/dist/plugin/remote-fs-plugin-factory.js +150 -0
- package/dist/providers/http-workspace-client.d.ts +99 -0
- package/dist/providers/http-workspace-client.d.ts.map +1 -0
- package/dist/providers/http-workspace-client.js +171 -0
- package/dist/providers/index.d.ts +5 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +4 -0
- package/dist/services/index.d.ts +5 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +4 -0
- package/dist/services/remote-fs-service.d.ts +10 -0
- package/dist/services/remote-fs-service.d.ts.map +1 -0
- package/dist/services/remote-fs-service.js +12 -0
- package/package.json +56 -0
- package/project.json +24 -0
- package/src/actions/index.ts +5 -0
- package/src/actions/remote-fs-actions.ts +302 -0
- package/src/index.ts +10 -0
- package/src/middleware/index.ts +6 -0
- package/src/middleware/remote-fs-middleware.ts +244 -0
- package/src/middleware/store-sync-middleware.ts +175 -0
- package/src/plugin/index.ts +5 -0
- package/src/plugin/remote-fs-plugin-factory.ts +238 -0
- package/src/providers/http-workspace-client.ts +232 -0
- package/src/providers/index.ts +5 -0
- package/src/services/index.ts +5 -0
- package/src/services/remote-fs-service.ts +13 -0
- package/tsconfig.es2015.json +21 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Remote FS Actions
|
|
3
|
+
*
|
|
4
|
+
* Action creators for remote filesystem operations.
|
|
5
|
+
* Migrated from amk/libs/ui/core/remote-fs/src/lib/remote-fs-actions.ts
|
|
6
|
+
*/
|
|
7
|
+
import { RemoteFsActionTypes, ErrorObject } from '@hamak/ui-remote-fs-api';
|
|
8
|
+
import { FileInfo } from '@hamak/shared-utils';
|
|
9
|
+
export interface LsRequestAction {
|
|
10
|
+
type: RemoteFsActionTypes.LS_REQUEST;
|
|
11
|
+
payload: {
|
|
12
|
+
path: string | string[];
|
|
13
|
+
};
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
export interface LsCompletedAction {
|
|
17
|
+
type: RemoteFsActionTypes.LS_COMPLETED;
|
|
18
|
+
payload: {
|
|
19
|
+
data: FileInfo[];
|
|
20
|
+
request: LsRequestAction;
|
|
21
|
+
};
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
export interface LsFailedAction {
|
|
25
|
+
type: RemoteFsActionTypes.LS_FAILED;
|
|
26
|
+
payload: {
|
|
27
|
+
error: ErrorObject;
|
|
28
|
+
request: LsRequestAction;
|
|
29
|
+
};
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}
|
|
32
|
+
export interface MkdirRequestAction {
|
|
33
|
+
type: RemoteFsActionTypes.MKDIR_REQUEST;
|
|
34
|
+
payload: {
|
|
35
|
+
path: string | string[];
|
|
36
|
+
};
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}
|
|
39
|
+
export interface MkdirCompletedAction {
|
|
40
|
+
type: RemoteFsActionTypes.MKDIR_COMPLETED;
|
|
41
|
+
payload: {
|
|
42
|
+
data: FileInfo;
|
|
43
|
+
request: MkdirRequestAction;
|
|
44
|
+
};
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
}
|
|
47
|
+
export interface MkdirFailedAction {
|
|
48
|
+
type: RemoteFsActionTypes.MKDIR_FAILED;
|
|
49
|
+
payload: {
|
|
50
|
+
error: ErrorObject;
|
|
51
|
+
request: MkdirRequestAction;
|
|
52
|
+
};
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
}
|
|
55
|
+
export interface GetRequestAction {
|
|
56
|
+
type: RemoteFsActionTypes.GET_REQUEST;
|
|
57
|
+
payload: {
|
|
58
|
+
path: string | string[];
|
|
59
|
+
};
|
|
60
|
+
[key: string]: any;
|
|
61
|
+
}
|
|
62
|
+
export interface GetCompletedAction {
|
|
63
|
+
type: RemoteFsActionTypes.GET_COMPLETED;
|
|
64
|
+
payload: {
|
|
65
|
+
data: FileInfo;
|
|
66
|
+
request: GetRequestAction;
|
|
67
|
+
};
|
|
68
|
+
[key: string]: any;
|
|
69
|
+
}
|
|
70
|
+
export interface GetFailedAction {
|
|
71
|
+
type: RemoteFsActionTypes.GET_FAILED;
|
|
72
|
+
payload: {
|
|
73
|
+
error: ErrorObject;
|
|
74
|
+
request: GetRequestAction;
|
|
75
|
+
};
|
|
76
|
+
[key: string]: any;
|
|
77
|
+
}
|
|
78
|
+
export interface PostRequestAction {
|
|
79
|
+
type: RemoteFsActionTypes.POST_REQUEST;
|
|
80
|
+
payload: {
|
|
81
|
+
path: string | string[];
|
|
82
|
+
content: any;
|
|
83
|
+
};
|
|
84
|
+
[key: string]: any;
|
|
85
|
+
}
|
|
86
|
+
export interface PostCompletedAction {
|
|
87
|
+
type: RemoteFsActionTypes.POST_COMPLETED;
|
|
88
|
+
payload: {
|
|
89
|
+
data: FileInfo;
|
|
90
|
+
request: PostRequestAction;
|
|
91
|
+
};
|
|
92
|
+
[key: string]: any;
|
|
93
|
+
}
|
|
94
|
+
export interface PostFailedAction {
|
|
95
|
+
type: RemoteFsActionTypes.POST_FAILED;
|
|
96
|
+
payload: {
|
|
97
|
+
error: ErrorObject;
|
|
98
|
+
request: PostRequestAction;
|
|
99
|
+
};
|
|
100
|
+
[key: string]: any;
|
|
101
|
+
}
|
|
102
|
+
export interface PutRequestAction {
|
|
103
|
+
type: RemoteFsActionTypes.PUT_REQUEST;
|
|
104
|
+
payload: {
|
|
105
|
+
path: string | string[];
|
|
106
|
+
content: any;
|
|
107
|
+
};
|
|
108
|
+
[key: string]: any;
|
|
109
|
+
}
|
|
110
|
+
export interface PutCompletedAction {
|
|
111
|
+
type: RemoteFsActionTypes.PUT_COMPLETED;
|
|
112
|
+
payload: {
|
|
113
|
+
data: FileInfo;
|
|
114
|
+
request: PutRequestAction;
|
|
115
|
+
};
|
|
116
|
+
[key: string]: any;
|
|
117
|
+
}
|
|
118
|
+
export interface PutFailedAction {
|
|
119
|
+
type: RemoteFsActionTypes.PUT_FAILED;
|
|
120
|
+
payload: {
|
|
121
|
+
error: ErrorObject;
|
|
122
|
+
request: PutRequestAction;
|
|
123
|
+
};
|
|
124
|
+
[key: string]: any;
|
|
125
|
+
}
|
|
126
|
+
export interface DeleteRequestAction {
|
|
127
|
+
type: RemoteFsActionTypes.DELETE_REQUEST;
|
|
128
|
+
payload: {
|
|
129
|
+
path: string | string[];
|
|
130
|
+
};
|
|
131
|
+
[key: string]: any;
|
|
132
|
+
}
|
|
133
|
+
export interface DeleteCompletedAction {
|
|
134
|
+
type: RemoteFsActionTypes.DELETE_COMPLETED;
|
|
135
|
+
payload: {
|
|
136
|
+
data: FileInfo;
|
|
137
|
+
request: DeleteRequestAction;
|
|
138
|
+
};
|
|
139
|
+
[key: string]: any;
|
|
140
|
+
}
|
|
141
|
+
export interface DeleteFailedAction {
|
|
142
|
+
type: RemoteFsActionTypes.DELETE_FAILED;
|
|
143
|
+
payload: {
|
|
144
|
+
error: ErrorObject;
|
|
145
|
+
request: DeleteRequestAction;
|
|
146
|
+
};
|
|
147
|
+
[key: string]: any;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Union type for all remote FS actions
|
|
151
|
+
*/
|
|
152
|
+
export type RemoteFsAction = LsRequestAction | LsCompletedAction | LsFailedAction | MkdirRequestAction | MkdirCompletedAction | MkdirFailedAction | GetRequestAction | GetCompletedAction | GetFailedAction | PostRequestAction | PostCompletedAction | PostFailedAction | PutRequestAction | PutCompletedAction | PutFailedAction | DeleteRequestAction | DeleteCompletedAction | DeleteFailedAction;
|
|
153
|
+
/**
|
|
154
|
+
* Action factory class for creating remote filesystem actions
|
|
155
|
+
*/
|
|
156
|
+
export declare class RemoteFsActionFactory {
|
|
157
|
+
types: typeof RemoteFsActionTypes;
|
|
158
|
+
ofLsRequest(path: string | string[]): LsRequestAction;
|
|
159
|
+
ofLsCompleted(data: FileInfo[], request: LsRequestAction): LsCompletedAction;
|
|
160
|
+
ofLsFailed(error: ErrorObject, request: LsRequestAction): LsFailedAction;
|
|
161
|
+
ofMkdirRequest(path: string | string[]): MkdirRequestAction;
|
|
162
|
+
ofMkdirCompleted(data: FileInfo, request: MkdirRequestAction): MkdirCompletedAction;
|
|
163
|
+
ofMkdirFailed(error: ErrorObject, request: MkdirRequestAction): MkdirFailedAction;
|
|
164
|
+
ofGetRequest(path: string | string[]): GetRequestAction;
|
|
165
|
+
ofGetCompleted(data: FileInfo, request: GetRequestAction): GetCompletedAction;
|
|
166
|
+
ofGetFailed(error: ErrorObject, request: GetRequestAction): GetFailedAction;
|
|
167
|
+
ofPostRequest(path: string | string[], content: any): PostRequestAction;
|
|
168
|
+
ofPostCompleted(data: FileInfo, request: PostRequestAction): PostCompletedAction;
|
|
169
|
+
ofPostFailed(error: ErrorObject, request: PostRequestAction): PostFailedAction;
|
|
170
|
+
ofPutRequest(path: string | string[], content: any): PutRequestAction;
|
|
171
|
+
ofPutCompleted(data: FileInfo, request: PutRequestAction): PutCompletedAction;
|
|
172
|
+
ofPutFailed(error: ErrorObject, request: PutRequestAction): PutFailedAction;
|
|
173
|
+
ofDeleteRequest(path: string | string[]): DeleteRequestAction;
|
|
174
|
+
ofDeleteCompleted(data: FileInfo, request: DeleteRequestAction): DeleteCompletedAction;
|
|
175
|
+
ofDeleteFailed(error: ErrorObject, request: DeleteRequestAction): DeleteFailedAction;
|
|
176
|
+
/**
|
|
177
|
+
* Type guard to check if an action is a remote FS action
|
|
178
|
+
*/
|
|
179
|
+
isRemoteFsAction(action: any): action is RemoteFsAction;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Singleton instance of the action factory
|
|
183
|
+
*/
|
|
184
|
+
export declare const rfsActions: RemoteFsActionFactory;
|
|
185
|
+
/**
|
|
186
|
+
* Re-export the action types enum for convenience
|
|
187
|
+
*/
|
|
188
|
+
export { RemoteFsActionTypes };
|
|
189
|
+
//# sourceMappingURL=remote-fs-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|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ators for remote filesystem operations.
|
|
5
|
+
* Migrated from amk/libs/ui/core/remote-fs/src/lib/remote-fs-actions.ts
|
|
6
|
+
*/
|
|
7
|
+
import { RemoteFsActionTypes } from '@hamak/ui-remote-fs-api';
|
|
8
|
+
/**
|
|
9
|
+
* Action factory class for creating remote filesystem actions
|
|
10
|
+
*/
|
|
11
|
+
export class RemoteFsActionFactory {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.types = RemoteFsActionTypes;
|
|
14
|
+
}
|
|
15
|
+
// LS (List) operations
|
|
16
|
+
ofLsRequest(path) {
|
|
17
|
+
return {
|
|
18
|
+
type: this.types.LS_REQUEST,
|
|
19
|
+
payload: { path },
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
ofLsCompleted(data, request) {
|
|
23
|
+
return {
|
|
24
|
+
type: this.types.LS_COMPLETED,
|
|
25
|
+
payload: { data, request },
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
ofLsFailed(error, request) {
|
|
29
|
+
return {
|
|
30
|
+
type: this.types.LS_FAILED,
|
|
31
|
+
payload: { error, request },
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
// MKDIR (Make Directory) operations
|
|
35
|
+
ofMkdirRequest(path) {
|
|
36
|
+
return {
|
|
37
|
+
type: this.types.MKDIR_REQUEST,
|
|
38
|
+
payload: { path },
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
ofMkdirCompleted(data, request) {
|
|
42
|
+
return {
|
|
43
|
+
type: this.types.MKDIR_COMPLETED,
|
|
44
|
+
payload: { data, request },
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
ofMkdirFailed(error, request) {
|
|
48
|
+
return {
|
|
49
|
+
type: this.types.MKDIR_FAILED,
|
|
50
|
+
payload: { error, request },
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
// GET (Read File) operations
|
|
54
|
+
ofGetRequest(path) {
|
|
55
|
+
return {
|
|
56
|
+
type: this.types.GET_REQUEST,
|
|
57
|
+
payload: { path },
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
ofGetCompleted(data, request) {
|
|
61
|
+
return {
|
|
62
|
+
type: this.types.GET_COMPLETED,
|
|
63
|
+
payload: { data, request },
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
ofGetFailed(error, request) {
|
|
67
|
+
return {
|
|
68
|
+
type: this.types.GET_FAILED,
|
|
69
|
+
payload: { error, request },
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
// POST (Create File) operations
|
|
73
|
+
ofPostRequest(path, content) {
|
|
74
|
+
return {
|
|
75
|
+
type: this.types.POST_REQUEST,
|
|
76
|
+
payload: { path, content },
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
ofPostCompleted(data, request) {
|
|
80
|
+
return {
|
|
81
|
+
type: this.types.POST_COMPLETED,
|
|
82
|
+
payload: { data, request },
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
ofPostFailed(error, request) {
|
|
86
|
+
return {
|
|
87
|
+
type: this.types.POST_FAILED,
|
|
88
|
+
payload: { error, request },
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
// PUT (Update File) operations
|
|
92
|
+
ofPutRequest(path, content) {
|
|
93
|
+
return {
|
|
94
|
+
type: this.types.PUT_REQUEST,
|
|
95
|
+
payload: { path, content },
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
ofPutCompleted(data, request) {
|
|
99
|
+
return {
|
|
100
|
+
type: this.types.PUT_COMPLETED,
|
|
101
|
+
payload: { data, request },
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
ofPutFailed(error, request) {
|
|
105
|
+
return {
|
|
106
|
+
type: this.types.PUT_FAILED,
|
|
107
|
+
payload: { error, request },
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
// DELETE operations
|
|
111
|
+
ofDeleteRequest(path) {
|
|
112
|
+
return {
|
|
113
|
+
type: this.types.DELETE_REQUEST,
|
|
114
|
+
payload: { path },
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
ofDeleteCompleted(data, request) {
|
|
118
|
+
return {
|
|
119
|
+
type: this.types.DELETE_COMPLETED,
|
|
120
|
+
payload: { data, request },
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
ofDeleteFailed(error, request) {
|
|
124
|
+
return {
|
|
125
|
+
type: this.types.DELETE_FAILED,
|
|
126
|
+
payload: { error, request },
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Type guard to check if an action is a remote FS action
|
|
131
|
+
*/
|
|
132
|
+
isRemoteFsAction(action) {
|
|
133
|
+
return (action &&
|
|
134
|
+
typeof action === 'object' &&
|
|
135
|
+
'type' in action &&
|
|
136
|
+
Object.values(RemoteFsActionTypes).includes(action.type));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Singleton instance of the action factory
|
|
141
|
+
*/
|
|
142
|
+
export const rfsActions = new RemoteFsActionFactory();
|
|
143
|
+
/**
|
|
144
|
+
* Re-export the action types enum for convenience
|
|
145
|
+
*/
|
|
146
|
+
export { RemoteFsActionTypes };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Remote FS Actions
|
|
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("./remote-fs-actions"), exports);
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Remote FS Actions
|
|
4
|
+
*
|
|
5
|
+
* Action creators for remote filesystem operations.
|
|
6
|
+
* Migrated from amk/libs/ui/core/remote-fs/src/lib/remote-fs-actions.ts
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.RemoteFsActionTypes = exports.rfsActions = exports.RemoteFsActionFactory = void 0;
|
|
10
|
+
const ui_remote_fs_api_1 = require("@hamak/ui-remote-fs-api");
|
|
11
|
+
Object.defineProperty(exports, "RemoteFsActionTypes", { enumerable: true, get: function () { return ui_remote_fs_api_1.RemoteFsActionTypes; } });
|
|
12
|
+
/**
|
|
13
|
+
* Action factory class for creating remote filesystem actions
|
|
14
|
+
*/
|
|
15
|
+
class RemoteFsActionFactory {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.types = ui_remote_fs_api_1.RemoteFsActionTypes;
|
|
18
|
+
}
|
|
19
|
+
// LS (List) operations
|
|
20
|
+
ofLsRequest(path) {
|
|
21
|
+
return {
|
|
22
|
+
type: this.types.LS_REQUEST,
|
|
23
|
+
payload: { path },
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
ofLsCompleted(data, request) {
|
|
27
|
+
return {
|
|
28
|
+
type: this.types.LS_COMPLETED,
|
|
29
|
+
payload: { data, request },
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
ofLsFailed(error, request) {
|
|
33
|
+
return {
|
|
34
|
+
type: this.types.LS_FAILED,
|
|
35
|
+
payload: { error, request },
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
// MKDIR (Make Directory) operations
|
|
39
|
+
ofMkdirRequest(path) {
|
|
40
|
+
return {
|
|
41
|
+
type: this.types.MKDIR_REQUEST,
|
|
42
|
+
payload: { path },
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
ofMkdirCompleted(data, request) {
|
|
46
|
+
return {
|
|
47
|
+
type: this.types.MKDIR_COMPLETED,
|
|
48
|
+
payload: { data, request },
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
ofMkdirFailed(error, request) {
|
|
52
|
+
return {
|
|
53
|
+
type: this.types.MKDIR_FAILED,
|
|
54
|
+
payload: { error, request },
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
// GET (Read File) operations
|
|
58
|
+
ofGetRequest(path) {
|
|
59
|
+
return {
|
|
60
|
+
type: this.types.GET_REQUEST,
|
|
61
|
+
payload: { path },
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
ofGetCompleted(data, request) {
|
|
65
|
+
return {
|
|
66
|
+
type: this.types.GET_COMPLETED,
|
|
67
|
+
payload: { data, request },
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
ofGetFailed(error, request) {
|
|
71
|
+
return {
|
|
72
|
+
type: this.types.GET_FAILED,
|
|
73
|
+
payload: { error, request },
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
// POST (Create File) operations
|
|
77
|
+
ofPostRequest(path, content) {
|
|
78
|
+
return {
|
|
79
|
+
type: this.types.POST_REQUEST,
|
|
80
|
+
payload: { path, content },
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
ofPostCompleted(data, request) {
|
|
84
|
+
return {
|
|
85
|
+
type: this.types.POST_COMPLETED,
|
|
86
|
+
payload: { data, request },
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
ofPostFailed(error, request) {
|
|
90
|
+
return {
|
|
91
|
+
type: this.types.POST_FAILED,
|
|
92
|
+
payload: { error, request },
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
// PUT (Update File) operations
|
|
96
|
+
ofPutRequest(path, content) {
|
|
97
|
+
return {
|
|
98
|
+
type: this.types.PUT_REQUEST,
|
|
99
|
+
payload: { path, content },
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
ofPutCompleted(data, request) {
|
|
103
|
+
return {
|
|
104
|
+
type: this.types.PUT_COMPLETED,
|
|
105
|
+
payload: { data, request },
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
ofPutFailed(error, request) {
|
|
109
|
+
return {
|
|
110
|
+
type: this.types.PUT_FAILED,
|
|
111
|
+
payload: { error, request },
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
// DELETE operations
|
|
115
|
+
ofDeleteRequest(path) {
|
|
116
|
+
return {
|
|
117
|
+
type: this.types.DELETE_REQUEST,
|
|
118
|
+
payload: { path },
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
ofDeleteCompleted(data, request) {
|
|
122
|
+
return {
|
|
123
|
+
type: this.types.DELETE_COMPLETED,
|
|
124
|
+
payload: { data, request },
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
ofDeleteFailed(error, request) {
|
|
128
|
+
return {
|
|
129
|
+
type: this.types.DELETE_FAILED,
|
|
130
|
+
payload: { error, request },
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Type guard to check if an action is a remote FS action
|
|
135
|
+
*/
|
|
136
|
+
isRemoteFsAction(action) {
|
|
137
|
+
return (action &&
|
|
138
|
+
typeof action === 'object' &&
|
|
139
|
+
'type' in action &&
|
|
140
|
+
Object.values(ui_remote_fs_api_1.RemoteFsActionTypes).includes(action.type));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
exports.RemoteFsActionFactory = RemoteFsActionFactory;
|
|
144
|
+
/**
|
|
145
|
+
* Singleton instance of the action factory
|
|
146
|
+
*/
|
|
147
|
+
exports.rfsActions = new RemoteFsActionFactory();
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* UI Remote FS Implementation
|
|
4
|
+
* HTTP-based remote filesystem implementation
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
__exportStar(require("./actions"), exports);
|
|
22
|
+
__exportStar(require("./middleware"), exports);
|
|
23
|
+
__exportStar(require("./providers"), exports);
|
|
24
|
+
__exportStar(require("./plugin"), exports);
|
|
25
|
+
__exportStar(require("./services"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Remote FS Middleware
|
|
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("./remote-fs-middleware"), exports);
|
|
21
|
+
__exportStar(require("./store-sync-middleware"), exports);
|