@aws-amplify/predictions 6.0.5 → 6.0.6-unstable.f2b7a8d.0
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/package.json
CHANGED
|
@@ -1,121 +1,121 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
2
|
+
"name": "@aws-amplify/predictions",
|
|
3
|
+
"version": "6.0.6-unstable.f2b7a8d.0+f2b7a8d",
|
|
4
|
+
"description": "Machine learning category of aws-amplify",
|
|
5
|
+
"main": "./dist/cjs/index.js",
|
|
6
|
+
"module": "./dist/esm/index.mjs",
|
|
7
|
+
"typings": "./dist/esm/index.d.ts",
|
|
8
|
+
"react-native": "./src/index.ts",
|
|
9
|
+
"sideEffects": [
|
|
10
|
+
"./dist/cjs/Predictions.js",
|
|
11
|
+
"./dist/esm/Predictions.mjs"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"test": "npm run lint && jest -w 1 --passWithNoTests --coverage --maxWorkers 2",
|
|
15
|
+
"test:size": "size-limit",
|
|
16
|
+
"build-with-test": "npm run clean && npm run build",
|
|
17
|
+
"build:umd": "webpack && webpack --config ./webpack.config.dev.js",
|
|
18
|
+
"build:esm-cjs": "rollup -c rollup.config.mjs",
|
|
19
|
+
"build:cjs:watch": "rimraf dist/cjs && tsc -m commonjs --outDir dist/cjs --watch",
|
|
20
|
+
"build:esm:watch": "rimraf dist/esm && tsc -m esnext --outDir dist/esm --watch",
|
|
21
|
+
"build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
|
|
22
|
+
"clean": "npm run clean:size && rimraf dist lib lib-esm",
|
|
23
|
+
"clean:size": "rimraf dual-publish-tmp tmp*",
|
|
24
|
+
"format": "echo \"Not implemented\"",
|
|
25
|
+
"lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
|
|
26
|
+
"generate-docs-local": "typedoc --out docs src",
|
|
27
|
+
"generate-docs-root": "typedoc --out ../../docs src",
|
|
28
|
+
"ts-coverage": "typescript-coverage-report -p ./tsconfig.json -t 87.84"
|
|
29
|
+
},
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/aws-amplify/amplify-js.git"
|
|
33
|
+
},
|
|
34
|
+
"author": "Amazon Web Services",
|
|
35
|
+
"license": "Apache-2.0",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/aws/aws-amplify/issues"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://aws-amplify.github.io/",
|
|
40
|
+
"files": [
|
|
41
|
+
"dist/cjs",
|
|
42
|
+
"dist/esm",
|
|
43
|
+
"src"
|
|
44
|
+
],
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@aws-amplify/storage": "6.0.6-unstable.f2b7a8d.0+f2b7a8d",
|
|
47
|
+
"@aws-sdk/client-comprehend": "3.398.0",
|
|
48
|
+
"@aws-sdk/client-polly": "3.398.0",
|
|
49
|
+
"@aws-sdk/client-rekognition": "3.398.0",
|
|
50
|
+
"@aws-sdk/client-textract": "3.398.0",
|
|
51
|
+
"@aws-sdk/client-translate": "3.398.0",
|
|
52
|
+
"@smithy/eventstream-codec": "2.0.9",
|
|
53
|
+
"@smithy/util-utf8": "2.0.0",
|
|
54
|
+
"buffer": "4.9.2",
|
|
55
|
+
"tslib": "^2.5.0",
|
|
56
|
+
"uuid": "^9.0.0"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"@aws-amplify/core": "6.0.6-unstable.f2b7a8d.0+f2b7a8d"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@aws-amplify/core": "6.0.6-unstable.f2b7a8d.0+f2b7a8d",
|
|
63
|
+
"@rollup/plugin-typescript": "11.1.5",
|
|
64
|
+
"rollup": "3.29.4",
|
|
65
|
+
"typescript": "5.0.2"
|
|
66
|
+
},
|
|
67
|
+
"size-limit": [
|
|
68
|
+
{
|
|
69
|
+
"name": "Predictions",
|
|
70
|
+
"path": "./dist/esm/index.mjs",
|
|
71
|
+
"import": "{ Predictions }",
|
|
72
|
+
"limit": "69.8 kB"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"jest": {
|
|
76
|
+
"globals": {
|
|
77
|
+
"ts-jest": {
|
|
78
|
+
"diagnostics": {
|
|
79
|
+
"pathRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$"
|
|
80
|
+
},
|
|
81
|
+
"tsConfig": {
|
|
82
|
+
"downlevelIteration": true,
|
|
83
|
+
"allowJs": true,
|
|
84
|
+
"types": [
|
|
85
|
+
"@types/jest"
|
|
86
|
+
],
|
|
87
|
+
"outDir": "./tsconfig.json",
|
|
88
|
+
"noEmitOnError": false,
|
|
89
|
+
"noImplicitAny": false,
|
|
90
|
+
"skipLibCheck": true
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"transform": {
|
|
95
|
+
"^.+\\.(js|jsx|ts|tsx)$": "ts-jest"
|
|
96
|
+
},
|
|
97
|
+
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
|
|
98
|
+
"moduleFileExtensions": [
|
|
99
|
+
"ts",
|
|
100
|
+
"tsx",
|
|
101
|
+
"js",
|
|
102
|
+
"json",
|
|
103
|
+
"jsx"
|
|
104
|
+
],
|
|
105
|
+
"testEnvironment": "jsdom",
|
|
106
|
+
"testURL": "http://localhost/",
|
|
107
|
+
"coverageThreshold": {
|
|
108
|
+
"global": {
|
|
109
|
+
"branches": 0,
|
|
110
|
+
"functions": 0,
|
|
111
|
+
"lines": 0,
|
|
112
|
+
"statements": 0
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"coveragePathIgnorePatterns": [
|
|
116
|
+
"/node_modules/",
|
|
117
|
+
"dist"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"gitHead": "f2b7a8d78058af2e1c04f7d507525641def667c3"
|
|
121
121
|
}
|
|
@@ -203,9 +203,8 @@ export class AmazonAIIdentifyPredictionsProvider {
|
|
|
203
203
|
};
|
|
204
204
|
|
|
205
205
|
const detectTextCommand = new DetectTextCommand(rekognitionParam);
|
|
206
|
-
const rekognitionData =
|
|
207
|
-
detectTextCommand
|
|
208
|
-
);
|
|
206
|
+
const rekognitionData =
|
|
207
|
+
await this.rekognitionClient.send(detectTextCommand);
|
|
209
208
|
|
|
210
209
|
const rekognitionResponse = categorizeRekognitionBlocks(
|
|
211
210
|
rekognitionData.TextDetections as TextDetectionList
|
|
@@ -400,7 +399,7 @@ export class AmazonAIIdentifyPredictionsProvider {
|
|
|
400
399
|
...makeCamelCase(celebrity, ['Id', 'Name', 'Urls']),
|
|
401
400
|
pose: makeCamelCase(celebrity.Face?.Pose),
|
|
402
401
|
},
|
|
403
|
-
} as IdentifyEntity
|
|
402
|
+
}) as IdentifyEntity
|
|
404
403
|
) ?? [];
|
|
405
404
|
return { entities: faces };
|
|
406
405
|
} else if (
|