@ibm-aspera/sdk 0.20.0 → 0.21.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.
- package/dist/commonjs/app/core.js +8 -2
- package/dist/commonjs/http-gateway/core.js +2 -1
- package/dist/commonjs/models/aspera-sdk.model.js +15 -1
- package/dist/commonjs/models/models.d.ts +52 -21
- package/dist/js/aspera-sdk.js +1 -1
- package/dist/js/aspera-sdk.js.LICENSE.txt +1 -1
- package/dist/js/aspera-sdk.js.map +1 -1
- package/package.json +1 -1
|
@@ -1440,11 +1440,11 @@ var supportsMethod = function (method) {
|
|
|
1440
1440
|
// We currently do not support calculating file checksums when using HTTP Gateway. In theory it should be possible
|
|
1441
1441
|
// to calculate this directly in the browser similar to how `readAsArrayBuffer()` is implemented.
|
|
1442
1442
|
// HTTP Gateway also does not support showing native transfer client UI (about, preferences, etc.).
|
|
1443
|
-
if (index_1.asperaSdk.useHttpGateway && (method === 'get_checksum' || method === 'show_about' || method === 'open_preferences' || method === 'show_transfer_manager' || method === 'show_transfer_monitor' || method === 'authenticate' || method === 'test_ssh_ports' || method === 'show_save_file_dialog' || method === 'read_directory')) {
|
|
1443
|
+
if (index_1.asperaSdk.useHttpGateway && (method === 'get_checksum' || method === 'show_about' || method === 'open_preferences' || method === 'show_transfer_manager' || method === 'show_transfer_monitor' || method === 'authenticate' || method === 'test_ssh_ports' || method === 'show_save_file_dialog' || method === 'read_directory' || method === 'get_files_list' || method === 'update_branding' || method === 'show_directory' || method === 'modify_transfer' || method === 'resume_transfer')) {
|
|
1444
1444
|
return false;
|
|
1445
1445
|
}
|
|
1446
1446
|
// Reading directory contents is only supported by the Desktop App (not Connect).
|
|
1447
|
-
if (index_1.asperaSdk.useConnect && method === 'read_directory') {
|
|
1447
|
+
if (index_1.asperaSdk.useConnect && (method === 'read_directory' || method === 'get_files_list' || method === 'update_branding')) {
|
|
1448
1448
|
return false;
|
|
1449
1449
|
}
|
|
1450
1450
|
// HTTP Gateway and Connect do not have any RPC methods so fallback to true
|
|
@@ -1486,6 +1486,12 @@ var getCapabilities = function () {
|
|
|
1486
1486
|
testSshPorts: supportsMethod('test_ssh_ports'),
|
|
1487
1487
|
showSaveFileDialog: supportsMethod('show_save_file_dialog'),
|
|
1488
1488
|
readDirectory: supportsMethod('read_directory'),
|
|
1489
|
+
getFilesList: supportsMethod('get_files_list'),
|
|
1490
|
+
setBranding: supportsMethod('update_branding'),
|
|
1491
|
+
showDirectory: supportsMethod('show_directory'),
|
|
1492
|
+
folderUpload: !index_1.asperaSdk.useOldHttpGateway,
|
|
1493
|
+
modifyTransfer: supportsMethod('modify_transfer'),
|
|
1494
|
+
resumeTransfer: supportsMethod('resume_transfer'),
|
|
1489
1495
|
};
|
|
1490
1496
|
};
|
|
1491
1497
|
exports.getCapabilities = getCapabilities;
|
|
@@ -304,7 +304,8 @@ var getSdkTransfer = function (transferSpec) {
|
|
|
304
304
|
},
|
|
305
305
|
end_time: '',
|
|
306
306
|
explorer_path: '',
|
|
307
|
-
|
|
307
|
+
previous_status: 'initiating',
|
|
308
|
+
status: 'initiating',
|
|
308
309
|
bytes_written: 0,
|
|
309
310
|
bytes_expected: 0,
|
|
310
311
|
calculated_rate_kbps: 0,
|
|
@@ -124,10 +124,24 @@ var ActivityTracking = /** @class */ (function () {
|
|
|
124
124
|
* @param webSocketEvent the event type.
|
|
125
125
|
*/
|
|
126
126
|
ActivityTracking.prototype.handleWebSocketEvents = function (webSocketEvent) {
|
|
127
|
+
var current_status = status_1.statusService.getStatus();
|
|
127
128
|
if (webSocketEvent === 'CLOSED') {
|
|
128
129
|
status_1.statusService.setStatus('DISCONNECTED');
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (webSocketEvent !== 'RECONNECT') {
|
|
133
|
+
return;
|
|
129
134
|
}
|
|
130
|
-
|
|
135
|
+
// Only treat RECONNECT as a transition to RUNNING when we have prior verification of
|
|
136
|
+
// IBM Aspera for desktop. For example, if IBM Aspera for desktop was RUNNING and verified,
|
|
137
|
+
// and then the user quits and restarts the application.
|
|
138
|
+
//
|
|
139
|
+
// TODO: This potentially leads to a data race if the application was quit/restarted because it was being
|
|
140
|
+
// upgraded. The new application may have newer RPC methods, but transitioning to RUNNING here could
|
|
141
|
+
// potentially lead to an application seeing stale RPC methods if they call `hasCapability()`, for example,
|
|
142
|
+
// in the status event listener.
|
|
143
|
+
var wasPreviouslyVerified = index_1.asperaSdk.globals.rpcMethods.length > 0;
|
|
144
|
+
if (current_status === 'DISCONNECTED' || (current_status === 'DEGRADED' && wasPreviouslyVerified)) {
|
|
131
145
|
status_1.statusService.setStatus('RUNNING');
|
|
132
146
|
}
|
|
133
147
|
};
|
|
@@ -663,6 +663,8 @@ export interface AsperaSdkTransfer {
|
|
|
663
663
|
explorer_path: string;
|
|
664
664
|
/** The status of the transfer */
|
|
665
665
|
status: TransferStatus;
|
|
666
|
+
/** The previous status of the transfer */
|
|
667
|
+
previous_status: TransferStatus;
|
|
666
668
|
/** The transfer error description if the status is error */
|
|
667
669
|
error_desc?: string;
|
|
668
670
|
/** The transfer error code (SSH or HTTP) if the status is error */
|
|
@@ -964,70 +966,99 @@ export interface RpcMethod {
|
|
|
964
966
|
*/
|
|
965
967
|
export interface SdkCapabilities {
|
|
966
968
|
/**
|
|
967
|
-
* Whether the
|
|
969
|
+
* Whether the transfer client can read file contents for generating image previews.
|
|
968
970
|
*
|
|
969
|
-
*
|
|
970
|
-
* with the required RPC methods.
|
|
971
|
+
* This is supported when using HTTP Gateway, Connect, or IBM Aspera for desktop.
|
|
971
972
|
*/
|
|
972
973
|
imagePreview: boolean;
|
|
973
974
|
/**
|
|
974
|
-
* Whether the
|
|
975
|
+
* Whether the transfer client can calculate checksums of a file chunk.
|
|
975
976
|
*/
|
|
976
977
|
fileChecksum: boolean;
|
|
977
978
|
/**
|
|
978
979
|
* Whether the transfer client supports showing the about page.
|
|
979
980
|
*
|
|
980
|
-
* This is supported when using Connect or IBM Aspera for desktop
|
|
981
|
-
* but not HTTP Gateway.
|
|
981
|
+
* This is supported when using Connect or IBM Aspera for desktop.
|
|
982
982
|
*/
|
|
983
983
|
showAbout: boolean;
|
|
984
984
|
/**
|
|
985
985
|
* Whether the transfer client supports showing the preferences page.
|
|
986
986
|
*
|
|
987
|
-
* This is supported when using Connect or IBM Aspera for desktop
|
|
988
|
-
* but not HTTP Gateway.
|
|
987
|
+
* This is supported when using Connect or IBM Aspera for desktop.
|
|
989
988
|
*/
|
|
990
989
|
showPreferences: boolean;
|
|
991
990
|
/**
|
|
992
991
|
* Whether the transfer client supports showing the transfer manager.
|
|
993
992
|
*
|
|
994
|
-
* This is supported when using Connect or IBM Aspera for desktop
|
|
995
|
-
* but not HTTP Gateway.
|
|
993
|
+
* This is supported when using Connect or IBM Aspera for desktop.
|
|
996
994
|
*/
|
|
997
995
|
showTransferManager: boolean;
|
|
998
996
|
/**
|
|
999
997
|
* Whether the transfer client supports showing the transfer rate monitor.
|
|
1000
998
|
*
|
|
1001
|
-
* This is supported when using Connect or IBM Aspera for desktop
|
|
1002
|
-
* but not HTTP Gateway.
|
|
999
|
+
* This is supported when using Connect or IBM Aspera for desktop.
|
|
1003
1000
|
*/
|
|
1004
1001
|
showTransferMonitor: boolean;
|
|
1005
1002
|
/**
|
|
1006
1003
|
* Whether the transfer client supports authenticating a transfer specification.
|
|
1007
1004
|
*
|
|
1008
|
-
* This is supported when using Connect or IBM Aspera for desktop
|
|
1009
|
-
* but not HTTP Gateway.
|
|
1005
|
+
* This is supported when using Connect or IBM Aspera for desktop.
|
|
1010
1006
|
*/
|
|
1011
1007
|
authenticate: boolean;
|
|
1012
1008
|
/**
|
|
1013
1009
|
* Whether the transfer client supports testing SSH port connectivity.
|
|
1014
1010
|
*
|
|
1015
|
-
* This is supported when using Connect or IBM Aspera for desktop
|
|
1016
|
-
* but not HTTP Gateway.
|
|
1011
|
+
* This is supported when using Connect or IBM Aspera for desktop.
|
|
1017
1012
|
*/
|
|
1018
1013
|
testSshPorts: boolean;
|
|
1019
1014
|
/**
|
|
1020
1015
|
* Whether the transfer client supports showing the save file dialog.
|
|
1021
1016
|
*
|
|
1022
|
-
* This is supported when using Connect or IBM Aspera for desktop
|
|
1023
|
-
* but not HTTP Gateway.
|
|
1017
|
+
* This is supported when using Connect or IBM Aspera for desktop.
|
|
1024
1018
|
*/
|
|
1025
1019
|
showSaveFileDialog: boolean;
|
|
1026
1020
|
/**
|
|
1027
|
-
* Whether the
|
|
1021
|
+
* Whether the transfer client can read directory contents.
|
|
1028
1022
|
*
|
|
1029
|
-
* This is supported when using IBM Aspera for desktop
|
|
1030
|
-
* but not Connect or HTTP Gateway.
|
|
1023
|
+
* This is only supported when using IBM Aspera for desktop.
|
|
1031
1024
|
*/
|
|
1032
1025
|
readDirectory: boolean;
|
|
1026
|
+
/**
|
|
1027
|
+
* Whether the transfer client supports getting file-level progress for a given transfer.
|
|
1028
|
+
*
|
|
1029
|
+
* This is supported when using IBM Aspera for desktop.
|
|
1030
|
+
*/
|
|
1031
|
+
getFilesList: boolean;
|
|
1032
|
+
/**
|
|
1033
|
+
* Whether the transfer client supports customized branding settings.
|
|
1034
|
+
*
|
|
1035
|
+
* This is supported when using IBM Aspera for desktop.
|
|
1036
|
+
*/
|
|
1037
|
+
setBranding: boolean;
|
|
1038
|
+
/**
|
|
1039
|
+
* Whether the transfer client supports highlighting the destination directory of the transfer
|
|
1040
|
+
* using the system's file browser (ex: Finder or Windows Explorer).
|
|
1041
|
+
*
|
|
1042
|
+
* This is supported when using Connect or IBM Aspera for desktop.
|
|
1043
|
+
*/
|
|
1044
|
+
showDirectory: boolean;
|
|
1045
|
+
/**
|
|
1046
|
+
* Whether the transfer client supports uploading folders.
|
|
1047
|
+
*
|
|
1048
|
+
* This is supported when using Connect, IBM Aspera for desktop, and HTTP Gateway v3 or newer. HTTP Gateway v2 and older
|
|
1049
|
+
* do not support uploading folders.
|
|
1050
|
+
*/
|
|
1051
|
+
folderUpload: boolean;
|
|
1052
|
+
/**
|
|
1053
|
+
* Whether the transfer client can modify a running transfer.
|
|
1054
|
+
*
|
|
1055
|
+
* This is supported when using Connect or IBM Aspera for desktop.
|
|
1056
|
+
*/
|
|
1057
|
+
modifyTransfer: boolean;
|
|
1058
|
+
/**
|
|
1059
|
+
* Whether the transfer client resume a stopped transfer.
|
|
1060
|
+
*
|
|
1061
|
+
* This is supported when using Connect or IBM Aspera for desktop.
|
|
1062
|
+
*/
|
|
1063
|
+
resumeTransfer: boolean;
|
|
1033
1064
|
}
|