UNPKG

scandit-sdk

Version:

Scandit Barcode Scanner SDK for the Web

229 lines (228 loc) 12.5 kB
{ "name": "scandit-sdk", "version": "5.12.0", "description": "Scandit Barcode Scanner SDK for the Web", "main": "build/main/index.js", "typings": "build/main/index.d.ts", "module": "build/module/index.js", "browser": "build/browser/index.min.js", "unpkg": "build/browser/index.min.js", "sideEffects": [ "**/*.css", "**/*.scss" ], "author": "Scandit - Lorenzo Wölckner <lorenzo@scandit.com>", "contributors": [ { "name": "Lorenzo Wölckner", "email": "lorenzo@scandit.com" }, { "name": "Sébastien Roch", "email": "sebastien@scandit.com" } ], "homepage": "https://www.scandit.com/products/sdk-web/", "license": "SEE LICENSE IN LICENSE", "bugs": { "email": "support@scandit.com" }, "repository": { "type": "git", "url": "https://github.com/scandit" }, "scripts": { "info": "npm-scripts-info", "build:browser-esm": "run-p --print-label build:browser-esm:*", "build:browser-esm:default": "cross-env CACHE_FOLDER=esm-default rollup -c rollup.config.js -f es -o build/browser/index.esm.js", "build:browser-esm:minified": "cross-env CACHE_FOLDER=esm-minified ROLLUP_MODE=minify rollup -c rollup.config.js -f es -o build/browser/index.esm.min.js", "build:browser-umd": "run-p --print-label build:browser-umd:*", "build:browser-umd:default": "cross-env CACHE_FOLDER=umd-default rollup -c rollup.config.js -f umd --name ScanditSDK -o build/browser/index.js", "build:browser-umd:minified": "cross-env CACHE_FOLDER=umd-minified ROLLUP_MODE=minify rollup -c rollup.config.js -f umd --name ScanditSDK -o build/browser/index.min.js", "build:main": "run-s cache-invalidate:main && shx mkdir -p build/main/styles && shx cp -rf src/styles/* build/main/styles && tsc -p tsconfig.json && run-s \"replace:* build/main/index.js build/main/lib/workers/dataCaptureWorker.js\"", "build:module": "run-s cache-invalidate:module && shx mkdir -p build/module/styles && shx cp -rf src/styles/* build/module/styles && tsc -p tsconfig.module.json && run-s \"replace:* build/module/index.js build/module/lib/workers/dataCaptureWorker.js\"", "build": "shx mkdir -p build && run-p --print-label --aggregate-output build:* copy-sdc && run-s lint:build-check", "cache-invalidate:main": "cross-env grep -q @\"$npm_package_version\" build/main/lib/workers/dataCaptureWorker.js >/dev/null 2>&1 && grep -q \"$(openssl dgst -sha256 scandit-datacapture-sdk/scandit-engine-sdk.wasm | shx sed \"s/.*=\\s//g\")\" build/main/lib/workers/dataCaptureWorker.js >/dev/null 2>&1 && shx echo 'Executing incremental build...' || (shx echo 'Executing clean build - inconsistent NPM package version / WASM hash in WebWorker file...' && yarn clean:main)", "cache-invalidate:module": "cross-env grep -q @\"$npm_package_version\" build/module/lib/workers/dataCaptureWorker.js >/dev/null 2>&1 && grep -q \"$(openssl dgst -sha256 scandit-datacapture-sdk/scandit-engine-sdk.wasm | shx sed \"s/.*=\\s//g\")\" build/module/lib/workers/dataCaptureWorker.js >/dev/null 2>&1 && shx echo 'Executing incremental build...' || (shx echo 'Executing clean build - inconsistent NPM package version / WASM hash in WebWorker file...' && yarn clean:module)", "clean:browser": "shx rm -rf build/browser", "clean:main": "shx rm -rf build/main", "clean:module": "shx rm -rf build/module", "clean:sdc": "shx rm -f build/scandit-* && shx rm -rf build/resources", "clean": "run-p --print-label clean:*", "copy-sdc": "shx mkdir -p build && shx rm -rf build/resources && shx cp -rf \"scandit-datacapture-sdk/*\" build/ && run-s \"prepend:sdc-version build/scandit-engine-sdk.min.js\" && run-s \"prepend:sdc-version build/scandit-engine-sdk-ocr.min.js\" && run-s \"prepend:sdc-version build/scandit-engine-sdk-ocr-simd.min.js\"", "coverage:check": "nyc report && nyc check-coverage --lines 95 --functions 90 --branches 90", "coverage:generate": "nyc report --reporter=lcov", "coverage": "run-s test coverage:generate && open-cli coverage/lcov-report/index.html", "describe": "npm-scripts-info", "docs:copy-special": "shx mkdir -p docs && echo-cli \"<html><head><link rel=\\\"stylesheet\\\" href=\\\"assets/css/main.css\\\"><style>body{margin:20px}</style></head><body>\" > docs/CHANGELOG.html && marked CHANGELOG.md >> docs/CHANGELOG.html && echo-cli \"</body></html>\" >> docs/CHANGELOG.html && shx mv docs/CHANGELOG.html docs/CHANGELOG.md && shx cp LICENSE docs", "docs:html": "shx rm -rf docs && typedoc --options typedoc.json && run-s docs:copy-special && yarn replace --quiet --count \"__namedParameters\" \"parameters\" docs -r && yarn replace --quiet --count 'querySelectorAll\\(\".tsd-description\"\\)' \"children\" docs/assets/js/main.js", "docs": "run-s docs:html && open-cli docs/index.html", "e2e:serve": "http-server ./ -a 127.0.0.1 -p 2674 -s -m '{\"application/wasm\": [\"wasm\"]}'", "e2e:run": "nightwatch --retries 1", "e2e": "run-p -r e2e:serve \"e2e:run {@}\" --", "fix:code": "tslint --fix --project . && prettier --ignore-path .gitignore --write --loglevel warn \"src/**/*.ts\" \"e2e/**/*.js\" \"./*.js\" \"**/*.json\"", "fix:doc": "markdownlint --fix *.md && prettier --ignore-path .gitignore --write --loglevel warn \"./*.md\"", "fix:style": "stylelint --fix src/**/*.scss", "fix": "run-p --print-label --aggregate-output fix:*", "license": "shx rm LICENSE && shx cp LICENSE_HEADER LICENSE && yarn licenses generate-disclaimer --production >> LICENSE && cat LICENSE_MANUAL >> LICENSE && run-s docs:copy-special", "lint:worker-compat": "cross-env BROWSERSLIST_CONFIG=.browserslistrc.worker yarn eslint src/lib/workers/dataCaptureWorker.ts", "lint:tsc": "tsc -p tsconfig.json --incremental false --tsBuildInfoFile null --noEmit", "lint:tslint": "tslint --project .", "lint:stylelint": "stylelint src/**/*.scss", "lint:markdownlint": "markdownlint *.md", "lint:secret-detection": "! grep -q '[A-Za-z0-9+/]\\{64\\}' *.html || (echo '\\x1b[33mLicense Key detected in html file\\x1b[0m' && exit 1)", "lint:build-check": "! grep -q 'require([^)]*)' build/browser/*.js || (echo '\\x1b[33m Library requirements (require) detected in built browser libraries, check for broken build dependencies\\x1b[0m' && exit 1)", "lint": "run-p --print-label --aggregate-output lint:*", "prepend:sdc-version": "cross-env yarn replace --quiet --count --multiline false \"^\" \"wasmJSVersion=\\'$npm_package_version\\';\"", "preversion": "run-s clean lint test coverage:generate coverage:check license docs:html && (git diff --exit-code HEAD || (echo \"File(s) modified during release, aborting\" && exit 1))", "postversion": "run-s clean build && npm pack --dry-run && echo-cli \"Run 'npm publish' to publish files when ready\"", "release": "run-s reset && yarn version", "replace:sdc-version": "cross-env yarn replace --quiet --count \"%VERSION%\" \"$npm_package_version\"", "replace:sdc-wasm-hash": "yarn replace --quiet --count \"%SDC_WASM_HASH%\" \"$(node -e \"console.log(require('./hash-sdc-wasm.js'))\")\"", "replace:sdc-ocr-wasm-hash": "yarn replace --quiet --count \"%SDC_OCR_WASM_HASH%\" \"$(node -e \"console.log(require('./hash-sdc-ocr-wasm.js'))\")\"", "replace:sdc-ocr-simd-wasm-hash": "yarn replace --quiet --count \"%SDC_OCR_SIMD_WASM_HASH%\" \"$(node -e \"console.log(require('./hash-sdc-ocr-simd-wasm.js'))\")\"", "reset": "git clean -dfx && git reset --hard && yarn --frozen-lockfile", "size-info": "cross-env CACHE_FOLDER=size-info ROLLUP_MODE=size-info rollup -c rollup.config.js -f umd --name ScanditSDK -o \"$TMPDIR\"index.js", "test": "run-s build:main copy-sdc \"replace:* build/main/index.js build/main/lib/workers/dataCaptureWorker.js\" && nyc --silent ava", "watch": "run-s copy-sdc && shx mkdir -p .tmp && cross-env CACHE_FOLDER=watch rollup -c rollup.config.js --watch -f umd --name ScanditSDK -o .tmp/index.js", "_postinstall": "husky install", "prepublishOnly": "pinst --disable", "postpublish": "pinst --enable" }, "scripts-info": { "info": "Display information about the scripts", "lint": "Lint all source files", "fix": "Try to automatically fix all linting problems", "build": "Build (rebuild) and create all output modules", "test": "Build (rebuild) main library and run unit tests", "coverage": "Run tests, generate HTML coverage report, and open it in a browser", "e2e": "Run E2E tests. You must specify a comma-separated list of browsers with '-e chrome,firefox,safari'", "clean": "Remove build output folders", "watch": "Start the development environment by building the default browser module, opening the browser and watching the source files for changes with automatic reloading", "docs": "Generate HTML API documentation and open it in a browser", "license": "Generate LICENSE file with copyright and licenses of dependencies", "reset": "Delete all untracked files, reset the repo to the last commit and install all needed packages", "size-info": "Build (rebuild) browser UMD library and show bundle size information", "release": "Clean, build, test, generate and check coverage, generate license, generate docs and prepare release" }, "engines": { "node": ">=10.18" }, "keywords": [ "scandit", "barcode", "barcode-scanner", "qr", "scan", "scanner", "scanning", "code", "webassembly", "sdk", "javascript", "typescript", "web component" ], "files": [ "package.json", "CHANGELOG.md", "example_background.html", "example_ocr.html", "example_web_component.html", "example.html", "LICENSE", "README.md", "build/", "docs/", "!**/.tsbuildinfo", "!**/*.spec.*" ], "devDependencies": { "@babel/core": "^7.18.2", "@babel/plugin-transform-runtime": "^7.18.2", "@babel/preset-env": "^7.18.2", "@istanbuljs/nyc-config-typescript": "^1.0.2", "@rollup/plugin-commonjs": "20.0.0", "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-replace": "^4.0.0", "@types/emscripten": "^1.39.6", "@types/howler": "2.2.7", "@types/js-cookie": "^3.0.2", "@types/node": "^17.0.38", "@types/node-fetch": "^2.6.1", "@types/sinon": "^10.0.11", "@types/ua-parser-js": "^0.7.36", "@typescript-eslint/parser": "^5.27.0", "autoprefixer": "^10.4.7", "ava": "^3.15.0", "browser-env": "^3.3.0", "canvas": "^2.9.1", "chromedriver": "~101.0.0", "cross-env": "^7.0.3", "cssnano": "^5.1.10", "doiuse": "^4.4.1", "echo-cli": "^2.0.0", "eslint": "^8.16.0", "eslint-plugin-compat": "^4.0.2", "esm": "^3.2.25", "fake-indexeddb": "^3.1.7", "geckodriver": "^3.0.1", "gl": "4.9.0", "http-server": "^14.1.1", "husky": "^8.0.1", "ignore-styles": "^5.0.1", "lint-staged": "^13.0.0", "markdownlint-cli": "^0.31.1", "marked": "^4.0.16", "nightwatch": "^1.7.13", "node-fetch": "^2.6.7", "node-sass": "^7.0.1", "npm-run-all": "^4.1.5", "npm-scripts-info": "^0.3.9", "nyc": "^15.1.0", "open-cli": "^7.0.1", "pinst": "^3.0.0", "postcss": "^8.4.14", "prettier": "^2.6.2", "replace": "^1.2.1", "rollup": "^2.75.5", "rollup-plugin-babel": "^4.4.0", "rollup-plugin-command": "^1.1.3", "rollup-plugin-filesize": "^9.1.2", "rollup-plugin-livereload": "^2.0.5", "rollup-plugin-sass": "^1.2.12", "rollup-plugin-serve": "^1.1.0", "rollup-plugin-sizes": "^1.0.4", "rollup-plugin-sourcemaps": "^0.6.3", "rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.31.2", "rollup-plugin-visualizer": "^5.6.0", "selenium-server": "^3.141.59", "shx": "^0.3.4", "sinon": "^14.0.0", "stylelint": "^14.8.5", "stylelint-config-standard-scss": "^4.0.0", "tslint": "^6.1.3", "tslint-config-prettier": "^1.18.0", "tslint-eslint-rules": "^5.4.0", "tslint-microsoft-contrib": "^6.2.0", "tslint-misc-rules": "^3.6.0", "tslint-sonarts": "^1.9.0", "typedoc": "^0.21.10", "typescript": "~4.7.2" }, "dependencies": { "@babel/runtime-corejs2": "^7.18.3", "@juggle/resize-observer": "^3.3.1", "csstype": "^3.1.0", "eventemitter3": "^4.0.7", "howler": "^2.2.3", "js-cookie": "^3.0.1", "objectFitPolyfill": "^2.3.5", "tslib": "^2.4.0", "ua-parser-js": "^1.0.2" }, "resolutions": { "**/**/minimist": "^1.2.5" } }