@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.
Files changed (111) hide show
  1. package/.editorconfig +13 -0
  2. package/.github/CODEOWNERS +1 -0
  3. package/.github/CODE_OF_CONDUCT.md +128 -0
  4. package/.github/CONTRIBUTING.md +147 -0
  5. package/.github/dependabot.yml +10 -0
  6. package/.github/workflows/ci.yml +39 -0
  7. package/.github/workflows/documentation.yml +44 -0
  8. package/.github/workflows/publish.yml +23 -0
  9. package/.github/workflows/version.yml +32 -0
  10. package/CHANGELOG.md +204 -0
  11. package/docs/DEVELOPMENT.md +38 -0
  12. package/eslint.config.js +104 -0
  13. package/example/README.md +7 -0
  14. package/example/index.html +14 -0
  15. package/example/package-lock.json +2989 -0
  16. package/example/package.json +30 -0
  17. package/example/public/404.html +5 -0
  18. package/example/public/sdk-code.js +326 -0
  19. package/example/src/App/App.scss +40 -0
  20. package/example/src/App/index.tsx +196 -0
  21. package/example/src/Views/AllTogether.tsx +26 -0
  22. package/example/src/Views/DragDrop.tsx +23 -0
  23. package/example/src/Views/Home.tsx +10 -0
  24. package/example/src/Views/Initialize.tsx +31 -0
  25. package/example/src/Views/Installer.tsx +154 -0
  26. package/example/src/Views/MonitorTransfers.tsx +88 -0
  27. package/example/src/Views/Other.tsx +24 -0
  28. package/example/src/Views/SelectItems.tsx +46 -0
  29. package/example/src/Views/StartTransfer.tsx +37 -0
  30. package/example/src/Views/Test.tsx +20 -0
  31. package/example/src/Views/Views.scss +111 -0
  32. package/example/src/helpers/index.ts +19 -0
  33. package/example/src/index.scss +47 -0
  34. package/example/src/main.tsx +17 -0
  35. package/example/src/vite-env.d.ts +2 -0
  36. package/example/tsconfig.json +30 -0
  37. package/example/vite.config.ts +23 -0
  38. package/jest.config.js +19 -0
  39. package/jest.setup.js +0 -0
  40. package/package.json +4 -4
  41. package/renovate.json +12 -0
  42. package/src/app/core.ts +765 -0
  43. package/src/app/installer.ts +53 -0
  44. package/src/connect/core.ts +83 -0
  45. package/src/constants/constants.ts +19 -0
  46. package/src/constants/messages.ts +35 -0
  47. package/src/helpers/client/client.ts +11 -0
  48. package/src/helpers/client/http-client.ts +92 -0
  49. package/src/helpers/client/safari-client.ts +334 -0
  50. package/src/helpers/helpers.ts +253 -0
  51. package/src/helpers/http.ts +39 -0
  52. package/src/helpers/ws.ts +191 -0
  53. package/src/http-gateway/core.ts +273 -0
  54. package/src/http-gateway/download.ts +217 -0
  55. package/src/http-gateway/index.ts +19 -0
  56. package/src/http-gateway/models.ts +20 -0
  57. package/src/http-gateway/upload.ts +148 -0
  58. package/src/index.ts +72 -0
  59. package/src/models/aspera-sdk.model.ts +446 -0
  60. package/src/models/models.ts +740 -0
  61. package/tests/client.spec.ts +52 -0
  62. package/tests/core.spec.ts +13 -0
  63. package/tests/helpers.spec.ts +127 -0
  64. package/tests/http.spec.ts +14 -0
  65. package/tests/installer.spec.ts +135 -0
  66. package/tests/mocks.ts +11 -0
  67. package/tsconfig.json +14 -0
  68. package/tsconfig.module.json +16 -0
  69. package/typedoc.js +7 -0
  70. package/webpack.config.js +35 -0
  71. package/dist/commonjs/app/core.d.ts +0 -191
  72. package/dist/commonjs/app/core.js +0 -682
  73. package/dist/commonjs/app/installer.d.ts +0 -9
  74. package/dist/commonjs/app/installer.js +0 -50
  75. package/dist/commonjs/connect/core.d.ts +0 -11
  76. package/dist/commonjs/connect/core.js +0 -73
  77. package/dist/commonjs/constants/constants.d.ts +0 -8
  78. package/dist/commonjs/constants/constants.js +0 -11
  79. package/dist/commonjs/constants/messages.d.ts +0 -35
  80. package/dist/commonjs/constants/messages.js +0 -38
  81. package/dist/commonjs/helpers/client/client.d.ts +0 -5
  82. package/dist/commonjs/helpers/client/client.js +0 -7
  83. package/dist/commonjs/helpers/client/http-client.d.ts +0 -42
  84. package/dist/commonjs/helpers/client/http-client.js +0 -84
  85. package/dist/commonjs/helpers/client/safari-client.d.ts +0 -101
  86. package/dist/commonjs/helpers/client/safari-client.js +0 -264
  87. package/dist/commonjs/helpers/helpers.d.ts +0 -109
  88. package/dist/commonjs/helpers/helpers.js +0 -249
  89. package/dist/commonjs/helpers/http.d.ts +0 -16
  90. package/dist/commonjs/helpers/http.js +0 -42
  91. package/dist/commonjs/helpers/ws.d.ts +0 -62
  92. package/dist/commonjs/helpers/ws.js +0 -176
  93. package/dist/commonjs/http-gateway/core.d.ts +0 -76
  94. package/dist/commonjs/http-gateway/core.js +0 -254
  95. package/dist/commonjs/http-gateway/download.d.ts +0 -14
  96. package/dist/commonjs/http-gateway/download.js +0 -186
  97. package/dist/commonjs/http-gateway/index.d.ts +0 -11
  98. package/dist/commonjs/http-gateway/index.js +0 -11
  99. package/dist/commonjs/http-gateway/models.d.ts +0 -16
  100. package/dist/commonjs/http-gateway/models.js +0 -2
  101. package/dist/commonjs/http-gateway/upload.d.ts +0 -14
  102. package/dist/commonjs/http-gateway/upload.js +0 -124
  103. package/dist/commonjs/index.d.ts +0 -8
  104. package/dist/commonjs/index.js +0 -100
  105. package/dist/commonjs/models/aspera-sdk.model.d.ts +0 -245
  106. package/dist/commonjs/models/aspera-sdk.model.js +0 -312
  107. package/dist/commonjs/models/models.d.ts +0 -712
  108. package/dist/commonjs/models/models.js +0 -2
  109. package/dist/js/aspera-sdk.js +0 -3
  110. package/dist/js/aspera-sdk.js.LICENSE.txt +0 -15
  111. 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
+ ```
@@ -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,7 @@
1
+ # IBM Aspera JavaScript SDK Test Application
2
+
3
+ Test application for IBM Aspera JavaScript SDK and code sample examples.
4
+
5
+ ## Run application
6
+
7
+ To run the application first run `npm ci`. Then `npm start` to run the test app in your browser.
@@ -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>