ocr-space-api-wrapper 2.0.0 → 2.1.2
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/.github/workflows/npmpublish.yml +18 -0
- package/index.d.ts +3 -0
- package/index.js +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Publish Package to npmjs
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types: [created]
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v2
|
|
10
|
+
# Setup .npmrc file to publish to npm
|
|
11
|
+
- uses: actions/setup-node@v2
|
|
12
|
+
with:
|
|
13
|
+
node-version: '16.x'
|
|
14
|
+
registry-url: 'https://registry.npmjs.org'
|
|
15
|
+
- run: npm ci
|
|
16
|
+
- run: npm publish
|
|
17
|
+
env:
|
|
18
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/index.d.ts
ADDED
package/index.js
CHANGED
|
@@ -17,6 +17,7 @@ function detectInput(input) {
|
|
|
17
17
|
* Call OCR Space APIs
|
|
18
18
|
* @param {string} input Input file as url, file path or base64 image (required)
|
|
19
19
|
* @param {object} options Options
|
|
20
|
+
* @return {object} OCR results
|
|
20
21
|
*/
|
|
21
22
|
async function ocrSpace(input, options = {}) {
|
|
22
23
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ocr-space-api-wrapper",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Node.js wrapper for ocr.space APIs.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/DavideViolante/ocr-space-api-wrapper#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"axios": "^0.
|
|
34
|
+
"axios": "^0.27.2",
|
|
35
35
|
"form-data": "^4.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"eslint": "^8.0
|
|
38
|
+
"eslint": "^8.12.0",
|
|
39
39
|
"eslint-config-google": "^0.14.0",
|
|
40
|
-
"mocha": "^
|
|
40
|
+
"mocha": "^10.0.0",
|
|
41
41
|
"nyc": "^15.1.0"
|
|
42
42
|
}
|
|
43
43
|
}
|