@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.
- package/CHANGELOG.md +32 -0
- package/lib/.tsbuildinfo +3 -0
- package/lib/Predictions.js +4 -34
- package/lib/Predictions.js.map +1 -1
- package/lib/Providers/AmazonAIConvertPredictionsProvider.js +10 -62
- package/lib/Providers/AmazonAIConvertPredictionsProvider.js.map +1 -1
- package/lib/Providers/AmazonAIIdentifyPredictionsProvider.js +18 -84
- package/lib/Providers/AmazonAIIdentifyPredictionsProvider.js.map +1 -1
- package/lib/Providers/AmazonAIInterpretPredictionsProvider.js +15 -83
- package/lib/Providers/AmazonAIInterpretPredictionsProvider.js.map +1 -1
- package/lib/Providers/AmazonAIPredictionsProvider.js +2 -18
- package/lib/Providers/AmazonAIPredictionsProvider.js.map +1 -1
- package/lib/Providers/IdentifyTextUtils.js +7 -17
- package/lib/Providers/IdentifyTextUtils.js.map +1 -1
- package/lib/index.js +2 -8
- package/lib/index.js.map +1 -1
- package/lib/types/Providers/AbstractConvertPredictionsProvider.js +2 -14
- package/lib/types/Providers/AbstractConvertPredictionsProvider.js.map +1 -1
- package/lib/types/Providers/AbstractIdentifyPredictionsProvider.js +2 -14
- package/lib/types/Providers/AbstractIdentifyPredictionsProvider.js.map +1 -1
- package/lib/types/Providers/AbstractInterpretPredictionsProvider.js +2 -14
- package/lib/types/Providers/AbstractInterpretPredictionsProvider.js.map +1 -1
- package/lib/types/Providers/index.js +5 -7
- package/lib/types/Providers/index.js.map +1 -1
- package/lib/types/index.js +2 -4
- package/lib/types/index.js.map +1 -1
- package/lib-esm/.tsbuildinfo +3 -0
- package/lib-esm/Predictions.js +1 -31
- package/lib-esm/Predictions.js.map +1 -1
- package/lib-esm/Providers/AmazonAIConvertPredictionsProvider.d.ts +0 -4
- package/lib-esm/Providers/AmazonAIConvertPredictionsProvider.js +1 -53
- package/lib-esm/Providers/AmazonAIConvertPredictionsProvider.js.map +1 -1
- package/lib-esm/Providers/AmazonAIIdentifyPredictionsProvider.d.ts +0 -4
- package/lib-esm/Providers/AmazonAIIdentifyPredictionsProvider.js +3 -66
- package/lib-esm/Providers/AmazonAIIdentifyPredictionsProvider.js.map +1 -1
- package/lib-esm/Providers/AmazonAIInterpretPredictionsProvider.d.ts +0 -4
- package/lib-esm/Providers/AmazonAIInterpretPredictionsProvider.js +1 -69
- package/lib-esm/Providers/AmazonAIInterpretPredictionsProvider.js.map +1 -1
- package/lib-esm/Providers/AmazonAIPredictionsProvider.d.ts +0 -4
- package/lib-esm/Providers/AmazonAIPredictionsProvider.js +1 -17
- package/lib-esm/Providers/AmazonAIPredictionsProvider.js.map +1 -1
- package/lib-esm/Providers/IdentifyTextUtils.js +1 -11
- package/lib-esm/Providers/IdentifyTextUtils.js.map +1 -1
- package/lib-esm/index.d.ts +0 -4
- package/lib-esm/index.js +0 -4
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/types/Providers/AbstractConvertPredictionsProvider.js +1 -13
- package/lib-esm/types/Providers/AbstractConvertPredictionsProvider.js.map +1 -1
- package/lib-esm/types/Providers/AbstractIdentifyPredictionsProvider.js +1 -13
- package/lib-esm/types/Providers/AbstractIdentifyPredictionsProvider.js.map +1 -1
- package/lib-esm/types/Providers/AbstractInterpretPredictionsProvider.js +1 -13
- package/lib-esm/types/Providers/AbstractInterpretPredictionsProvider.js.map +1 -1
- package/package.json +10 -4
- package/src/Providers/AmazonAIConvertPredictionsProvider.ts +4 -8
- package/src/Providers/AmazonAIIdentifyPredictionsProvider.ts +4 -8
- package/src/Providers/AmazonAIInterpretPredictionsProvider.ts +2 -8
- package/src/Providers/AmazonAIPredictionsProvider.ts +0 -5
- package/src/index.ts +0 -5
- package/build.js +0 -5
- package/dist/aws-amplify-predictions.js +0 -102759
- package/dist/aws-amplify-predictions.js.map +0 -1
- package/dist/aws-amplify-predictions.min.js +0 -26
- package/dist/aws-amplify-predictions.min.js.map +0 -1
- package/index.js +0 -7
- package/lib/Predictions.d.ts +0 -49
- package/lib/Providers/AmazonAIConvertPredictionsProvider.d.ts +0 -24
- package/lib/Providers/AmazonAIIdentifyPredictionsProvider.d.ts +0 -53
- package/lib/Providers/AmazonAIInterpretPredictionsProvider.d.ts +0 -18
- package/lib/Providers/AmazonAIPredictionsProvider.d.ts +0 -18
- package/lib/Providers/IdentifyTextUtils.d.ts +0 -40
- package/lib/Providers/Utils.d.ts +0 -13
- package/lib/Providers/index.d.ts +0 -5
- package/lib/index.d.ts +0 -8
- package/lib/types/AWSTypes.d.ts +0 -125
- package/lib/types/Predictions.d.ts +0 -281
- package/lib/types/Providers/AbstractConvertPredictionsProvider.d.ts +0 -9
- package/lib/types/Providers/AbstractIdentifyPredictionsProvider.d.ts +0 -9
- package/lib/types/Providers/AbstractInterpretPredictionsProvider.d.ts +0 -7
- package/lib/types/Providers/AbstractPredictionsProvider.d.ts +0 -7
- package/lib/types/Providers/index.d.ts +0 -4
- package/lib/types/index.d.ts +0 -1
- 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.
|
|
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.
|
|
44
|
-
"@aws-amplify/storage": "4.5.2-next.
|
|
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": "
|
|
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 =
|
|
258
|
-
|
|
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 =
|
|
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
|
-
|
|
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;
|
package/src/index.ts
CHANGED