@aws-amplify/predictions 4.0.49-next.13 → 4.0.49-next.32

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 (82) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/lib/.tsbuildinfo +3 -0
  3. package/lib/Predictions.js +4 -34
  4. package/lib/Predictions.js.map +1 -1
  5. package/lib/Providers/AmazonAIConvertPredictionsProvider.js +10 -62
  6. package/lib/Providers/AmazonAIConvertPredictionsProvider.js.map +1 -1
  7. package/lib/Providers/AmazonAIIdentifyPredictionsProvider.js +18 -84
  8. package/lib/Providers/AmazonAIIdentifyPredictionsProvider.js.map +1 -1
  9. package/lib/Providers/AmazonAIInterpretPredictionsProvider.js +15 -83
  10. package/lib/Providers/AmazonAIInterpretPredictionsProvider.js.map +1 -1
  11. package/lib/Providers/AmazonAIPredictionsProvider.js +2 -18
  12. package/lib/Providers/AmazonAIPredictionsProvider.js.map +1 -1
  13. package/lib/Providers/IdentifyTextUtils.js +7 -17
  14. package/lib/Providers/IdentifyTextUtils.js.map +1 -1
  15. package/lib/index.js +2 -8
  16. package/lib/index.js.map +1 -1
  17. package/lib/types/Providers/AbstractConvertPredictionsProvider.js +2 -14
  18. package/lib/types/Providers/AbstractConvertPredictionsProvider.js.map +1 -1
  19. package/lib/types/Providers/AbstractIdentifyPredictionsProvider.js +2 -14
  20. package/lib/types/Providers/AbstractIdentifyPredictionsProvider.js.map +1 -1
  21. package/lib/types/Providers/AbstractInterpretPredictionsProvider.js +2 -14
  22. package/lib/types/Providers/AbstractInterpretPredictionsProvider.js.map +1 -1
  23. package/lib/types/Providers/index.js +5 -7
  24. package/lib/types/Providers/index.js.map +1 -1
  25. package/lib/types/index.js +2 -4
  26. package/lib/types/index.js.map +1 -1
  27. package/lib-esm/.tsbuildinfo +3 -0
  28. package/lib-esm/Predictions.js +1 -31
  29. package/lib-esm/Predictions.js.map +1 -1
  30. package/lib-esm/Providers/AmazonAIConvertPredictionsProvider.d.ts +0 -4
  31. package/lib-esm/Providers/AmazonAIConvertPredictionsProvider.js +1 -53
  32. package/lib-esm/Providers/AmazonAIConvertPredictionsProvider.js.map +1 -1
  33. package/lib-esm/Providers/AmazonAIIdentifyPredictionsProvider.d.ts +0 -4
  34. package/lib-esm/Providers/AmazonAIIdentifyPredictionsProvider.js +3 -66
  35. package/lib-esm/Providers/AmazonAIIdentifyPredictionsProvider.js.map +1 -1
  36. package/lib-esm/Providers/AmazonAIInterpretPredictionsProvider.d.ts +0 -4
  37. package/lib-esm/Providers/AmazonAIInterpretPredictionsProvider.js +1 -69
  38. package/lib-esm/Providers/AmazonAIInterpretPredictionsProvider.js.map +1 -1
  39. package/lib-esm/Providers/AmazonAIPredictionsProvider.d.ts +0 -4
  40. package/lib-esm/Providers/AmazonAIPredictionsProvider.js +1 -17
  41. package/lib-esm/Providers/AmazonAIPredictionsProvider.js.map +1 -1
  42. package/lib-esm/Providers/IdentifyTextUtils.js +1 -11
  43. package/lib-esm/Providers/IdentifyTextUtils.js.map +1 -1
  44. package/lib-esm/index.d.ts +0 -4
  45. package/lib-esm/index.js +0 -4
  46. package/lib-esm/index.js.map +1 -1
  47. package/lib-esm/types/Providers/AbstractConvertPredictionsProvider.js +1 -13
  48. package/lib-esm/types/Providers/AbstractConvertPredictionsProvider.js.map +1 -1
  49. package/lib-esm/types/Providers/AbstractIdentifyPredictionsProvider.js +1 -13
  50. package/lib-esm/types/Providers/AbstractIdentifyPredictionsProvider.js.map +1 -1
  51. package/lib-esm/types/Providers/AbstractInterpretPredictionsProvider.js +1 -13
  52. package/lib-esm/types/Providers/AbstractInterpretPredictionsProvider.js.map +1 -1
  53. package/package.json +10 -4
  54. package/src/Providers/AmazonAIConvertPredictionsProvider.ts +4 -8
  55. package/src/Providers/AmazonAIIdentifyPredictionsProvider.ts +4 -8
  56. package/src/Providers/AmazonAIInterpretPredictionsProvider.ts +2 -8
  57. package/src/Providers/AmazonAIPredictionsProvider.ts +0 -5
  58. package/src/index.ts +0 -5
  59. package/build.js +0 -5
  60. package/dist/aws-amplify-predictions.js +0 -102759
  61. package/dist/aws-amplify-predictions.js.map +0 -1
  62. package/dist/aws-amplify-predictions.min.js +0 -26
  63. package/dist/aws-amplify-predictions.min.js.map +0 -1
  64. package/index.js +0 -7
  65. package/lib/Predictions.d.ts +0 -49
  66. package/lib/Providers/AmazonAIConvertPredictionsProvider.d.ts +0 -24
  67. package/lib/Providers/AmazonAIIdentifyPredictionsProvider.d.ts +0 -53
  68. package/lib/Providers/AmazonAIInterpretPredictionsProvider.d.ts +0 -18
  69. package/lib/Providers/AmazonAIPredictionsProvider.d.ts +0 -18
  70. package/lib/Providers/IdentifyTextUtils.d.ts +0 -40
  71. package/lib/Providers/Utils.d.ts +0 -13
  72. package/lib/Providers/index.d.ts +0 -5
  73. package/lib/index.d.ts +0 -8
  74. package/lib/types/AWSTypes.d.ts +0 -125
  75. package/lib/types/Predictions.d.ts +0 -281
  76. package/lib/types/Providers/AbstractConvertPredictionsProvider.d.ts +0 -9
  77. package/lib/types/Providers/AbstractIdentifyPredictionsProvider.d.ts +0 -9
  78. package/lib/types/Providers/AbstractInterpretPredictionsProvider.d.ts +0 -7
  79. package/lib/types/Providers/AbstractPredictionsProvider.d.ts +0 -7
  80. package/lib/types/Providers/index.d.ts +0 -4
  81. package/lib/types/index.d.ts +0 -1
  82. package/webpack.config.dev.js +0 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/predictions",
3
- "version": "4.0.49-next.13+5341c9f6f",
3
+ "version": "4.0.49-next.32+4137aa79c",
4
4
  "description": "Machine learning category of aws-amplify",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib-esm/index.js",
@@ -39,9 +39,14 @@
39
39
  "url": "https://github.com/aws/aws-amplify/issues"
40
40
  },
41
41
  "homepage": "https://aws-amplify.github.io/",
42
+ "files": [
43
+ "lib",
44
+ "lib-esm",
45
+ "src"
46
+ ],
42
47
  "dependencies": {
43
- "@aws-amplify/core": "4.6.2-next.13+5341c9f6f",
44
- "@aws-amplify/storage": "4.5.2-next.13+5341c9f6f",
48
+ "@aws-amplify/core": "4.6.2-next.32+4137aa79c",
49
+ "@aws-amplify/storage": "4.5.2-next.32+4137aa79c",
45
50
  "@aws-sdk/client-comprehend": "3.6.1",
46
51
  "@aws-sdk/client-polly": "3.6.1",
47
52
  "@aws-sdk/client-rekognition": "3.6.1",
@@ -49,6 +54,7 @@
49
54
  "@aws-sdk/client-translate": "3.6.1",
50
55
  "@aws-sdk/eventstream-marshaller": "3.6.1",
51
56
  "@aws-sdk/util-utf8-node": "3.6.1",
57
+ "tslib": "^2.0.0",
52
58
  "uuid": "^3.2.1"
53
59
  },
54
60
  "jest": {
@@ -95,5 +101,5 @@
95
101
  "lib-esm"
96
102
  ]
97
103
  },
98
- "gitHead": "5341c9f6f1ca10fee8e34706a0e6d47afa338ba2"
104
+ "gitHead": "4137aa79c6c2362afc581d3915d77f5067ea6700"
99
105
  }
@@ -254,9 +254,10 @@ export class AmazonAIConvertPredictionsProvider extends AbstractConvertPredictio
254
254
  let fullText = '';
255
255
  connection.onmessage = message => {
256
256
  try {
257
- const decodedMessage = AmazonAIConvertPredictionsProvider.serializeDataFromTranscribe(
258
- message
259
- );
257
+ const decodedMessage =
258
+ AmazonAIConvertPredictionsProvider.serializeDataFromTranscribe(
259
+ message
260
+ );
260
261
  if (decodedMessage) {
261
262
  fullText += decodedMessage + ' ';
262
263
  }
@@ -427,8 +428,3 @@ export class AmazonAIConvertPredictionsProvider extends AbstractConvertPredictio
427
428
  return signedUrl;
428
429
  }
429
430
  }
430
-
431
- /**
432
- * @deprecated use named import
433
- */
434
- export default AmazonAIConvertPredictionsProvider;
@@ -3,7 +3,7 @@ import {
3
3
  ConsoleLogger as Logger,
4
4
  getAmplifyUserAgent,
5
5
  } from '@aws-amplify/core';
6
- import Storage from '@aws-amplify/storage';
6
+ import { Storage } from '@aws-amplify/storage';
7
7
  import { AbstractIdentifyPredictionsProvider } from '../types/Providers';
8
8
  import {
9
9
  RekognitionClient,
@@ -80,7 +80,8 @@ export class AmazonAIIdentifyPredictionsProvider extends AbstractIdentifyPredict
80
80
  };
81
81
  Storage.get(source.key, storageConfig)
82
82
  .then((url: string) => {
83
- const parser = /https:\/\/([a-zA-Z0-9%-_.]+)\.s3\.[A-Za-z0-9%-._~]+\/([a-zA-Z0-9%-._~/]+)\?/;
83
+ const parser =
84
+ /https:\/\/([a-zA-Z0-9%-_.]+)\.s3\.[A-Za-z0-9%-._~]+\/([a-zA-Z0-9%-._~/]+)\?/;
84
85
  const parsedURL = url.match(parser);
85
86
  if (parsedURL.length < 3) rej('Invalid S3 key was given.');
86
87
  res({
@@ -449,7 +450,7 @@ export class AmazonAIIdentifyPredictionsProvider extends AbstractIdentifyPredict
449
450
  'Beard',
450
451
  'Mustache',
451
452
  'EyesOpen',
452
- 'MouthOpen'
453
+ 'MouthOpen',
453
454
  ];
454
455
  const faceAttributes = makeCamelCase(detail, attributeKeys);
455
456
  if (detail.Emotions) {
@@ -479,8 +480,3 @@ export class AmazonAIIdentifyPredictionsProvider extends AbstractIdentifyPredict
479
480
  return ('' + externalImageId).replace(/::/g, '/');
480
481
  }
481
482
  }
482
-
483
- /**
484
- * @deprecated use named import
485
- */
486
- export default AmazonAIIdentifyPredictionsProvider;
@@ -45,9 +45,8 @@ export class AmazonAIInterpretPredictionsProvider extends AbstractInterpretPredi
45
45
  } = {},
46
46
  } = ({} = input);
47
47
 
48
- const {
49
- text: { source: { language = undefined } = {} } = {},
50
- } = ({} = input as any); // language is only required for specific interpret types
48
+ const { text: { source: { language = undefined } = {} } = {} } = ({} =
49
+ input as any); // language is only required for specific interpret types
51
50
 
52
51
  const comprehendClient = new ComprehendClient({
53
52
  credentials,
@@ -284,8 +283,3 @@ export class AmazonAIInterpretPredictionsProvider extends AbstractInterpretPredi
284
283
  }
285
284
  }
286
285
  }
287
-
288
- /**
289
- * @deprecated use named import
290
- */
291
- export default AmazonAIInterpretPredictionsProvider;
@@ -65,8 +65,3 @@ export class AmazonAIPredictionsProvider extends AbstractPredictionsProvider {
65
65
  return this.identifyProvider.identify(input);
66
66
  }
67
67
  }
68
-
69
- /**
70
- * @deprecated use named import
71
- */
72
- export default AmazonAIPredictionsProvider;
package/src/index.ts CHANGED
@@ -28,8 +28,3 @@ export {
28
28
  AmazonAIPredictionsProvider,
29
29
  AmazonAIInterpretPredictionsProvider,
30
30
  };
31
-
32
- /**
33
- * @deprecated use named import
34
- */
35
- export default Predictions;
package/build.js DELETED
@@ -1,5 +0,0 @@
1
- 'use strict';
2
-
3
- const build = require('../../scripts/build');
4
-
5
- build(process.argv[2], process.argv[3]);