@aws-amplify/predictions 4.0.49-next.20 → 4.0.49-next.36

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 (46) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/lib/.tsbuildinfo +3 -0
  3. package/lib/Providers/AmazonAIConvertPredictionsProvider.d.ts +0 -4
  4. package/lib/Providers/AmazonAIConvertPredictionsProvider.js +0 -4
  5. package/lib/Providers/AmazonAIConvertPredictionsProvider.js.map +1 -1
  6. package/lib/Providers/AmazonAIIdentifyPredictionsProvider.d.ts +0 -4
  7. package/lib/Providers/AmazonAIIdentifyPredictionsProvider.js +3 -7
  8. package/lib/Providers/AmazonAIIdentifyPredictionsProvider.js.map +1 -1
  9. package/lib/Providers/AmazonAIInterpretPredictionsProvider.d.ts +0 -4
  10. package/lib/Providers/AmazonAIInterpretPredictionsProvider.js +0 -4
  11. package/lib/Providers/AmazonAIInterpretPredictionsProvider.js.map +1 -1
  12. package/lib/Providers/AmazonAIPredictionsProvider.d.ts +0 -4
  13. package/lib/Providers/AmazonAIPredictionsProvider.js +0 -4
  14. package/lib/Providers/AmazonAIPredictionsProvider.js.map +1 -1
  15. package/lib/index.d.ts +0 -4
  16. package/lib/index.js +1 -5
  17. package/lib/index.js.map +1 -1
  18. package/lib-esm/.tsbuildinfo +3 -0
  19. package/lib-esm/Providers/AmazonAIConvertPredictionsProvider.d.ts +0 -4
  20. package/lib-esm/Providers/AmazonAIConvertPredictionsProvider.js +0 -4
  21. package/lib-esm/Providers/AmazonAIConvertPredictionsProvider.js.map +1 -1
  22. package/lib-esm/Providers/AmazonAIIdentifyPredictionsProvider.d.ts +0 -4
  23. package/lib-esm/Providers/AmazonAIIdentifyPredictionsProvider.js +2 -6
  24. package/lib-esm/Providers/AmazonAIIdentifyPredictionsProvider.js.map +1 -1
  25. package/lib-esm/Providers/AmazonAIInterpretPredictionsProvider.d.ts +0 -4
  26. package/lib-esm/Providers/AmazonAIInterpretPredictionsProvider.js +0 -4
  27. package/lib-esm/Providers/AmazonAIInterpretPredictionsProvider.js.map +1 -1
  28. package/lib-esm/Providers/AmazonAIPredictionsProvider.d.ts +0 -4
  29. package/lib-esm/Providers/AmazonAIPredictionsProvider.js +0 -4
  30. package/lib-esm/Providers/AmazonAIPredictionsProvider.js.map +1 -1
  31. package/lib-esm/index.d.ts +0 -4
  32. package/lib-esm/index.js +1 -5
  33. package/lib-esm/index.js.map +1 -1
  34. package/package.json +12 -6
  35. package/src/Providers/AmazonAIConvertPredictionsProvider.ts +4 -8
  36. package/src/Providers/AmazonAIIdentifyPredictionsProvider.ts +4 -8
  37. package/src/Providers/AmazonAIInterpretPredictionsProvider.ts +2 -8
  38. package/src/Providers/AmazonAIPredictionsProvider.ts +0 -5
  39. package/src/index.ts +1 -6
  40. package/build.js +0 -5
  41. package/dist/aws-amplify-predictions.js +0 -106813
  42. package/dist/aws-amplify-predictions.js.map +0 -1
  43. package/dist/aws-amplify-predictions.min.js +0 -142
  44. package/dist/aws-amplify-predictions.min.js.map +0 -1
  45. package/index.js +0 -7
  46. package/webpack.config.dev.js +0 -6
package/lib-esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
@@ -14,8 +14,4 @@ import { Predictions } from './Predictions';
14
14
  import { AmazonAIConvertPredictionsProvider, AmazonAIIdentifyPredictionsProvider, AmazonAIPredictionsProvider, AmazonAIInterpretPredictionsProvider, } from './Providers';
15
15
  export * from './types';
16
16
  export { Predictions, AmazonAIIdentifyPredictionsProvider, AmazonAIConvertPredictionsProvider, AmazonAIPredictionsProvider, AmazonAIInterpretPredictionsProvider, };
17
- /**
18
- * @deprecated use named import
19
- */
20
- export default Predictions;
21
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EACN,kCAAkC,EAClC,mCAAmC,EACnC,2BAA2B,EAC3B,oCAAoC,GACpC,MAAM,aAAa,CAAC;AAErB,cAAc,SAAS,CAAC;AAExB,OAAO,EACN,WAAW,EACX,mCAAmC,EACnC,kCAAkC,EAClC,2BAA2B,EAC3B,oCAAoC,GACpC,CAAC;AAEF;;GAEG;AACH,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EACN,kCAAkC,EAClC,mCAAmC,EACnC,2BAA2B,EAC3B,oCAAoC,GACpC,MAAM,aAAa,CAAC;AAErB,cAAc,SAAS,CAAC;AAExB,OAAO,EACN,WAAW,EACX,mCAAmC,EACnC,kCAAkC,EAClC,2BAA2B,EAC3B,oCAAoC,GACpC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/predictions",
3
- "version": "4.0.49-next.20+072846a9f",
3
+ "version": "4.0.49-next.36+580cda186",
4
4
  "description": "Machine learning category of aws-amplify",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib-esm/index.js",
@@ -25,9 +25,10 @@
25
25
  "build": "npm run clean && npm run build:esm && npm run build:cjs",
26
26
  "clean": "rimraf lib-esm lib dist",
27
27
  "format": "echo \"Not implemented\"",
28
- "lint": "tslint 'src/**/*.ts'",
28
+ "lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
29
29
  "generate-docs-local": "typedoc --out docs src",
30
- "generate-docs-root": "typedoc --out ../../docs src"
30
+ "generate-docs-root": "typedoc --out ../../docs src",
31
+ "ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 87.84"
31
32
  },
32
33
  "repository": {
33
34
  "type": "git",
@@ -39,9 +40,14 @@
39
40
  "url": "https://github.com/aws/aws-amplify/issues"
40
41
  },
41
42
  "homepage": "https://aws-amplify.github.io/",
43
+ "files": [
44
+ "lib",
45
+ "lib-esm",
46
+ "src"
47
+ ],
42
48
  "dependencies": {
43
- "@aws-amplify/core": "4.6.2-next.20+072846a9f",
44
- "@aws-amplify/storage": "4.5.2-next.20+072846a9f",
49
+ "@aws-amplify/core": "4.6.2-next.36+580cda186",
50
+ "@aws-amplify/storage": "4.5.2-next.36+580cda186",
45
51
  "@aws-sdk/client-comprehend": "3.6.1",
46
52
  "@aws-sdk/client-polly": "3.6.1",
47
53
  "@aws-sdk/client-rekognition": "3.6.1",
@@ -96,5 +102,5 @@
96
102
  "lib-esm"
97
103
  ]
98
104
  },
99
- "gitHead": "072846a9f0bd91f145e58aca2fca91a6478286b0"
105
+ "gitHead": "580cda186f10ead3bb99acb7a4825c435c657d33"
100
106
  }
@@ -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
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5
5
  * the License. A copy of the License is located at
@@ -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]);