@ibm-aspera/sdk 0.2.12 → 0.2.29
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/.editorconfig +13 -0
- package/.github/CODEOWNERS +1 -0
- package/.github/CODE_OF_CONDUCT.md +128 -0
- package/.github/CONTRIBUTING.md +147 -0
- package/.github/dependabot.yml +10 -0
- package/.github/workflows/ci.yml +39 -0
- package/.github/workflows/documentation.yml +44 -0
- package/.github/workflows/publish.yml +23 -0
- package/.github/workflows/version.yml +32 -0
- package/CHANGELOG.md +204 -0
- package/docs/DEVELOPMENT.md +38 -0
- package/eslint.config.js +104 -0
- package/example/README.md +7 -0
- package/example/index.html +14 -0
- package/example/package-lock.json +2989 -0
- package/example/package.json +30 -0
- package/example/public/404.html +5 -0
- package/example/public/sdk-code.js +326 -0
- package/example/src/App/App.scss +40 -0
- package/example/src/App/index.tsx +196 -0
- package/example/src/Views/AllTogether.tsx +26 -0
- package/example/src/Views/DragDrop.tsx +23 -0
- package/example/src/Views/Home.tsx +10 -0
- package/example/src/Views/Initialize.tsx +31 -0
- package/example/src/Views/Installer.tsx +154 -0
- package/example/src/Views/MonitorTransfers.tsx +88 -0
- package/example/src/Views/Other.tsx +24 -0
- package/example/src/Views/SelectItems.tsx +46 -0
- package/example/src/Views/StartTransfer.tsx +37 -0
- package/example/src/Views/Test.tsx +20 -0
- package/example/src/Views/Views.scss +111 -0
- package/example/src/helpers/index.ts +19 -0
- package/example/src/index.scss +47 -0
- package/example/src/main.tsx +17 -0
- package/example/src/vite-env.d.ts +2 -0
- package/example/tsconfig.json +30 -0
- package/example/vite.config.ts +23 -0
- package/jest.config.js +19 -0
- package/jest.setup.js +0 -0
- package/package.json +4 -4
- package/renovate.json +12 -0
- package/src/app/core.ts +765 -0
- package/src/app/installer.ts +53 -0
- package/src/connect/core.ts +83 -0
- package/src/constants/constants.ts +19 -0
- package/src/constants/messages.ts +35 -0
- package/src/helpers/client/client.ts +11 -0
- package/src/helpers/client/http-client.ts +92 -0
- package/src/helpers/client/safari-client.ts +334 -0
- package/src/helpers/helpers.ts +253 -0
- package/src/helpers/http.ts +39 -0
- package/src/helpers/ws.ts +191 -0
- package/src/http-gateway/core.ts +273 -0
- package/src/http-gateway/download.ts +217 -0
- package/src/http-gateway/index.ts +19 -0
- package/src/http-gateway/models.ts +20 -0
- package/src/http-gateway/upload.ts +148 -0
- package/src/index.ts +72 -0
- package/src/models/aspera-sdk.model.ts +446 -0
- package/src/models/models.ts +740 -0
- package/tests/client.spec.ts +52 -0
- package/tests/core.spec.ts +13 -0
- package/tests/helpers.spec.ts +127 -0
- package/tests/http.spec.ts +14 -0
- package/tests/installer.spec.ts +135 -0
- package/tests/mocks.ts +11 -0
- package/tsconfig.json +14 -0
- package/tsconfig.module.json +16 -0
- package/typedoc.js +7 -0
- package/webpack.config.js +35 -0
- package/dist/commonjs/app/core.d.ts +0 -191
- package/dist/commonjs/app/core.js +0 -682
- package/dist/commonjs/app/installer.d.ts +0 -9
- package/dist/commonjs/app/installer.js +0 -50
- package/dist/commonjs/connect/core.d.ts +0 -11
- package/dist/commonjs/connect/core.js +0 -73
- package/dist/commonjs/constants/constants.d.ts +0 -8
- package/dist/commonjs/constants/constants.js +0 -11
- package/dist/commonjs/constants/messages.d.ts +0 -35
- package/dist/commonjs/constants/messages.js +0 -38
- package/dist/commonjs/helpers/client/client.d.ts +0 -5
- package/dist/commonjs/helpers/client/client.js +0 -7
- package/dist/commonjs/helpers/client/http-client.d.ts +0 -42
- package/dist/commonjs/helpers/client/http-client.js +0 -84
- package/dist/commonjs/helpers/client/safari-client.d.ts +0 -101
- package/dist/commonjs/helpers/client/safari-client.js +0 -264
- package/dist/commonjs/helpers/helpers.d.ts +0 -109
- package/dist/commonjs/helpers/helpers.js +0 -249
- package/dist/commonjs/helpers/http.d.ts +0 -16
- package/dist/commonjs/helpers/http.js +0 -42
- package/dist/commonjs/helpers/ws.d.ts +0 -62
- package/dist/commonjs/helpers/ws.js +0 -176
- package/dist/commonjs/http-gateway/core.d.ts +0 -76
- package/dist/commonjs/http-gateway/core.js +0 -254
- package/dist/commonjs/http-gateway/download.d.ts +0 -14
- package/dist/commonjs/http-gateway/download.js +0 -186
- package/dist/commonjs/http-gateway/index.d.ts +0 -11
- package/dist/commonjs/http-gateway/index.js +0 -11
- package/dist/commonjs/http-gateway/models.d.ts +0 -16
- package/dist/commonjs/http-gateway/models.js +0 -2
- package/dist/commonjs/http-gateway/upload.d.ts +0 -14
- package/dist/commonjs/http-gateway/upload.js +0 -124
- package/dist/commonjs/index.d.ts +0 -8
- package/dist/commonjs/index.js +0 -100
- package/dist/commonjs/models/aspera-sdk.model.d.ts +0 -245
- package/dist/commonjs/models/aspera-sdk.model.js +0 -312
- package/dist/commonjs/models/models.d.ts +0 -712
- package/dist/commonjs/models/models.js +0 -2
- package/dist/js/aspera-sdk.js +0 -3
- package/dist/js/aspera-sdk.js.LICENSE.txt +0 -15
- package/dist/js/aspera-sdk.js.map +0 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# IBM Aspera TypeScript SDK
|
|
2
|
+
|
|
3
|
+
This JavaScript SDK enables web applications to utilize Aspera file-transfer capabilities via the IBM Aspera App for Desktop.
|
|
4
|
+
|
|
5
|
+
## Development
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
* Install [Node.js 18](https://nodejs.org/en/download/)
|
|
10
|
+
- If you are on macOS, we recommend installing Node.js via a package manager such as [nvm](https://github.com/nvm-sh/nvm).
|
|
11
|
+
* Git
|
|
12
|
+
|
|
13
|
+
### Build
|
|
14
|
+
|
|
15
|
+
```shell
|
|
16
|
+
$ git clone https://github.com/IBM/aspera-sdk-js.git
|
|
17
|
+
$ cd aspera-sdk-js
|
|
18
|
+
$ npm install
|
|
19
|
+
$ npm run build
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Testing
|
|
23
|
+
|
|
24
|
+
To run the test app:
|
|
25
|
+
```shell
|
|
26
|
+
$ npm run dev
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
To run the unit tests:
|
|
30
|
+
```shell
|
|
31
|
+
$ npm run test
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Documentation
|
|
35
|
+
|
|
36
|
+
```shell
|
|
37
|
+
$ npm run docs
|
|
38
|
+
```
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
const { defineConfig, globalIgnores } = require('eslint/config');
|
|
2
|
+
const globals = require('globals');
|
|
3
|
+
const tsParser = require('@typescript-eslint/parser');
|
|
4
|
+
const typescriptEslint = require('@typescript-eslint/eslint-plugin');
|
|
5
|
+
|
|
6
|
+
module.exports = defineConfig([{
|
|
7
|
+
languageOptions: {
|
|
8
|
+
globals: {
|
|
9
|
+
...globals.browser,
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
parser: tsParser,
|
|
13
|
+
'sourceType': 'module',
|
|
14
|
+
|
|
15
|
+
parserOptions: {
|
|
16
|
+
'project': 'tsconfig.json',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
plugins: {
|
|
21
|
+
'@typescript-eslint': typescriptEslint,
|
|
22
|
+
},
|
|
23
|
+
'rules': {
|
|
24
|
+
'@typescript-eslint/consistent-type-definitions': 'error',
|
|
25
|
+
'@typescript-eslint/dot-notation': 'off',
|
|
26
|
+
|
|
27
|
+
'@typescript-eslint/explicit-member-accessibility': ['off', {
|
|
28
|
+
'accessibility': 'explicit',
|
|
29
|
+
}],
|
|
30
|
+
'indent': ['error', 2],
|
|
31
|
+
'@typescript-eslint/naming-convention': 'off',
|
|
32
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
33
|
+
'@typescript-eslint/no-empty-interface': 'error',
|
|
34
|
+
'@typescript-eslint/no-inferrable-types': ['error', {
|
|
35
|
+
'ignoreParameters': true,
|
|
36
|
+
}],
|
|
37
|
+
'@typescript-eslint/no-shadow': ['error', {
|
|
38
|
+
'hoist': 'all',
|
|
39
|
+
}],
|
|
40
|
+
'semi-style': ['error', 'last'],
|
|
41
|
+
semi: [2, 'always'],
|
|
42
|
+
'no-trailing-spaces': ['error'],
|
|
43
|
+
'no-extra-semi': 'off',
|
|
44
|
+
'space-in-parens': [2, 'never'],
|
|
45
|
+
'comma-spacing': [2, {
|
|
46
|
+
before: false,
|
|
47
|
+
after: true,
|
|
48
|
+
}],
|
|
49
|
+
'@typescript-eslint/no-unused-expressions': 'error',
|
|
50
|
+
'@typescript-eslint/no-use-before-define': 'error',
|
|
51
|
+
'@typescript-eslint/prefer-function-type': 'error',
|
|
52
|
+
'quotes': ['error', 'single'],
|
|
53
|
+
'semi': ['error', 'always'],
|
|
54
|
+
'@typescript-eslint/unified-signatures': 'error',
|
|
55
|
+
'brace-style': ['error', '1tbs'],
|
|
56
|
+
'curly': 'error',
|
|
57
|
+
'eol-last': 'error',
|
|
58
|
+
'eqeqeq': ['error', 'smart'],
|
|
59
|
+
'guard-for-in': 'error',
|
|
60
|
+
'id-blacklist': 'off',
|
|
61
|
+
'id-match': 'off',
|
|
62
|
+
'no-bitwise': 'error',
|
|
63
|
+
'no-caller': 'error',
|
|
64
|
+
'no-console': ['error', {
|
|
65
|
+
'allow': [
|
|
66
|
+
'log',
|
|
67
|
+
'warn',
|
|
68
|
+
'dir',
|
|
69
|
+
'timeLog',
|
|
70
|
+
'assert',
|
|
71
|
+
'clear',
|
|
72
|
+
'count',
|
|
73
|
+
'countReset',
|
|
74
|
+
'group',
|
|
75
|
+
'groupEnd',
|
|
76
|
+
'table',
|
|
77
|
+
'dirxml',
|
|
78
|
+
'error',
|
|
79
|
+
'groupCollapsed',
|
|
80
|
+
'Console',
|
|
81
|
+
'profile',
|
|
82
|
+
'profileEnd',
|
|
83
|
+
'timeStamp',
|
|
84
|
+
'context',
|
|
85
|
+
],
|
|
86
|
+
}],
|
|
87
|
+
'no-debugger': 'error',
|
|
88
|
+
'no-empty': 'off',
|
|
89
|
+
'no-eval': 'error',
|
|
90
|
+
'no-fallthrough': 'error',
|
|
91
|
+
'no-new-wrappers': 'error',
|
|
92
|
+
'no-restricted-imports': 'error',
|
|
93
|
+
'no-throw-literal': 'error',
|
|
94
|
+
'no-trailing-spaces': 'error',
|
|
95
|
+
'no-underscore-dangle': 'off',
|
|
96
|
+
'no-unused-labels': 'error',
|
|
97
|
+
'no-var': 'error',
|
|
98
|
+
'prefer-const': 'error',
|
|
99
|
+
'radix': 'error',
|
|
100
|
+
'spaced-comment': ['error', 'always', {
|
|
101
|
+
'markers': ['/'],
|
|
102
|
+
}],
|
|
103
|
+
},
|
|
104
|
+
}, globalIgnores(['**/example'])]);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>IBM Aspera JavaScript SDK Test Application</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
<script src="sdk-code.js"></script>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|