@codebolt/codeboltjs 1.1.38 → 1.1.39
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/index.d.ts +1 -1
- package/modules/fs.d.ts +1 -1
- package/modules/fs.js +5 -1
- package/package.json +1 -1
- package/src/modules/fs.ts +5 -2
package/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ declare class Codebolt {
|
|
|
25
25
|
updateFile: (filename: string, filePath: string, newContent: string) => Promise<import("@codebolt/types").UpdateFileResponse>;
|
|
26
26
|
deleteFile: (filename: string, filePath: string) => Promise<import("@codebolt/types").DeleteFileResponse>;
|
|
27
27
|
deleteFolder: (foldername: string, folderpath: string) => Promise<import("@codebolt/types").DeleteFolderResponse>;
|
|
28
|
-
listFile: (
|
|
28
|
+
listFile: (folderPath: string, isRecursive?: boolean) => Promise<unknown>;
|
|
29
29
|
};
|
|
30
30
|
git: {
|
|
31
31
|
init: (path: string) => Promise<any>;
|
package/modules/fs.d.ts
CHANGED
|
@@ -59,6 +59,6 @@ declare const cbfs: {
|
|
|
59
59
|
* @description Lists all files.
|
|
60
60
|
* @returns {Promise<FileListResponse>} A promise that resolves with the list of files.
|
|
61
61
|
*/
|
|
62
|
-
listFile: (
|
|
62
|
+
listFile: (folderPath: string, isRecursive?: boolean) => Promise<unknown>;
|
|
63
63
|
};
|
|
64
64
|
export default cbfs;
|
package/modules/fs.js
CHANGED
|
@@ -168,11 +168,15 @@ const cbfs = {
|
|
|
168
168
|
* @description Lists all files.
|
|
169
169
|
* @returns {Promise<FileListResponse>} A promise that resolves with the list of files.
|
|
170
170
|
*/
|
|
171
|
-
listFile: (
|
|
171
|
+
listFile: (folderPath, isRecursive = false) => {
|
|
172
172
|
return new Promise((resolve, reject) => {
|
|
173
173
|
websocket_1.default.getWebsocket.send(JSON.stringify({
|
|
174
174
|
"type": "fsEvent",
|
|
175
175
|
"action": "fileList",
|
|
176
|
+
message: {
|
|
177
|
+
folderPath,
|
|
178
|
+
isRecursive
|
|
179
|
+
}
|
|
176
180
|
}));
|
|
177
181
|
websocket_1.default.getWebsocket.on('message', (data) => {
|
|
178
182
|
const response = JSON.parse(data);
|
package/package.json
CHANGED
package/src/modules/fs.ts
CHANGED
|
@@ -164,12 +164,15 @@ const cbfs = {
|
|
|
164
164
|
* @description Lists all files.
|
|
165
165
|
* @returns {Promise<FileListResponse>} A promise that resolves with the list of files.
|
|
166
166
|
*/
|
|
167
|
-
listFile: (
|
|
167
|
+
listFile: (folderPath:string,isRecursive=false) => {
|
|
168
168
|
return new Promise((resolve, reject) => {
|
|
169
169
|
cbws.getWebsocket.send(JSON.stringify({
|
|
170
170
|
"type": "fsEvent",
|
|
171
171
|
"action": "fileList",
|
|
172
|
-
|
|
172
|
+
message:{
|
|
173
|
+
folderPath,
|
|
174
|
+
isRecursive
|
|
175
|
+
}
|
|
173
176
|
}));
|
|
174
177
|
cbws.getWebsocket.on('message', (data: string) => {
|
|
175
178
|
const response = JSON.parse(data);
|