{"_id":"@9wick/esptool-js","name":"@9wick/esptool-js","dist-tags":{"latest":"0.4.3"},"versions":{"0.4.3":{"name":"@9wick/esptool-js","private":false,"version":"0.4.3","module":"lib/index.js","main":"lib/index.js","types":"lib/index.d.ts","license":"Apache-2.0","type":"module","scripts":{"build":"npm run clean && tsc && rollup --config","clean":"rimraf lib bundle.js .parcel-cache esptool-js-*.tgz","format":"prettier --write \"src/**/*.ts\"","genDocs":"rimraf docs && typedoc","lint":"eslint . --ext .ts","lintAndFix":"eslint . --ext .ts --fix","prepare":"npm run build","test":"echo \"Error: no test specified\"","prepublishOnly":"npm run test && npm run lint"},"repository":{"type":"git","url":"git+https://github.com/espressif/esptool-js.git"},"bugs":{"url":"https://github.com/espressif/esptool-js/issues"},"dependencies":{"atob-lite":"^2.0.0","pako":"^2.1.0","tslib":"^2.4.1"},"devDependencies":{"@rollup/plugin-babel":"^6.0.2","@rollup/plugin-commonjs":"^23.0.2","@rollup/plugin-json":"^6.0.0","@rollup/plugin-node-resolve":"^15.0.1","@rollup/plugin-terser":"^0.1.0","@types/atob-lite":"^2.0.2","@types/pako":"^2.0.0","@types/w3c-web-serial":"^1.0.3","@typescript-eslint/eslint-plugin":"^5.43.0","@typescript-eslint/parser":"^5.43.0","babel-loader":"^9.1.0","eslint":"^8.28.0","eslint-config-prettier":"^8.5.0","eslint-plugin-jsdoc":"^46.4.5","eslint-plugin-prettier":"^4.2.1","prettier":"^2.7.1","rimraf":"^3.0.2","rollup":"^3.3.0","typedoc":"^0.25.2","typescript":"^4.8.4"},"_id":"@9wick/esptool-js@0.4.3","gitHead":"627f6a062b5a3d75a7d601162c1118073aabb443","description":"This repository contains a Javascript implementation of [esptool](https://github.com/espressif/esptool), a serial flasher utility for Espressif chips. `esptool-js` is based on [Web Serial API](https://wicg.github.io/serial/) and works in Google Chrome and","homepage":"https://github.com/espressif/esptool-js#readme","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-NYN8xIWmyAvDDongMDoKLpSZGMqwjMd6NKs1ZzP6QRDcg7mllDrJYqz7cAVhliTZQ0JLbhElzALYjIsGvYpeNA==","shasum":"204503c0bb73cd053cbf84946b5cc380fdf21bdd","tarball":"https://registry.npmjs.org/@9wick/esptool-js/-/esptool-js-0.4.3.tgz","fileCount":40,"unpackedSize":347060,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGlbuNqZEYrHSZ/G8M4cL3e8F9xnm9yF0MMIOEu+gTGLAiAd5iQ4N/kkO9BaQPvWXJOygJB48JB+0qBdJrXOrUWftA=="}]},"_npmUser":{"name":"kido","email":"kido@9wick.com"},"directories":{},"maintainers":[{"name":"kido","email":"kido@9wick.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/esptool-js_0.4.3_1720750274465_0.47090137268753796"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-12T02:11:14.337Z","0.4.3":"2024-07-12T02:11:14.596Z","modified":"2024-07-12T02:11:14.874Z"},"maintainers":[{"name":"kido","email":"kido@9wick.com"}],"description":"This repository contains a Javascript implementation of [esptool](https://github.com/espressif/esptool), a serial flasher utility for Espressif chips. `esptool-js` is based on [Web Serial API](https://wicg.github.io/serial/) and works in Google Chrome and","homepage":"https://github.com/espressif/esptool-js#readme","repository":{"type":"git","url":"git+https://github.com/espressif/esptool-js.git"},"bugs":{"url":"https://github.com/espressif/esptool-js/issues"},"license":"Apache-2.0","readme":"# Javascript implementation of esptool\n\nThis repository contains a Javascript implementation of [esptool](https://github.com/espressif/esptool), a serial flasher utility for Espressif chips. `esptool-js` is based on [Web Serial API](https://wicg.github.io/serial/) and works in Google Chrome and Microsoft Edge [version 89 or later](https://developer.mozilla.org/en-US/docs/Web/API/Serial#browser_compatibility) browsers and Google Chrome on Android [version 61 or later](https://developer.mozilla.org/en-US/docs/Web/API/USB#browser_compatibility) via the [web-serial-polyfill](https://github.com/google/web-serial-polyfill) compatibility layer.\n\n**NOTE:** Unlike the Python-based esptool, `esptool-js` doesn't implement generation of binary images out of ELF files, and doesn't include companion tools similar to [espefuse.py](https://github.com/espressif/esptool/wiki/espefuse) and [espsecure.py](https://github.com/espressif/esptool/wiki/espsecure).\n\n## Usage\n\n**CDN**\n\n`https://unpkg.com/esptool-js/lib/index.js` or `https://unpkg.com/esptool-js/bundle.js` to use the single bundle JavaScript file.\n\n**NPM**\n\n`npm install --save esptool-js`\n\n**Yarn**\n\n`yarn add --save esptool-js`\n\nCheck an example project [here](./examples/typescript).\n\n**Nightly builds** for <a href=\"https://nightly.link/espressif/esptool-js/workflows/ci/main\">ESPTOOL-JS</a>\n\n## Define port filters for device using WebSerial\n\n```js\nconst portFilters: { usbVendorId?: number | undefined, usbProductId?: number | undefined }[] = [];\nconst device = await navigator.serial.requestPort({ filters: portFilters });\n```\n\n## Inject a Terminal to use with esptool-js\n\n```js\n// You can use any JavaScript compatible terminal by wrapping it in a helper object like this:\nlet espLoaderTerminal = {\n  clean() {\n    // Implement the clean function call for your terminal here.\n  },\n  writeLine(data) {\n    // Implement the writeLine function call for your terminal here.\n  },\n  write(data) {\n    // Implement the write function call for your terminal here.\n  },\n};\n```\n\nYou can pass this terminal object to `ESPLoader` constructor as shown in the [examples projects](./examples/).\n\n## Live demo\n\nVisit https://espressif.github.io/esptool-js/ to see this tool in action.\n\n## Testing it locally\n\n```sh\nnpm install\nnpm run build\ncd examples/typescript\nnpm install\nnpm run dev # Run local sever with example code\n```\n\nThen open `http://localhost:1234` in a Chrome browser. The `npm run build` step builds the `lib` used in the example `examples/typescript/index.html`. Update this reference as described in [Usage](#usage) section.\n\n## Test from Pull Request artifact\n\nIf you are testing the main branch or any Pull Request (PR) artifact you can follow these steps:\n\n1. Get the `esptool-js-<version>.tgz` where `<version>` is the current version and download it.\n2. Add the following line to your project's package.json dependencies\n\n```json\n\"dependencies\": {\n  \"esptool-js\": \"file:../path/to/esptool-js-<version>.tgz\"\n}\n```\n3. Use the package like `import \"esptool-js/lib/index.js\"` when added in package.json as shown before.\n\n## License\n\nThe code in this repository is Copyright (c) 2023 Espressif Systems (Shanghai) Co. Ltd. It is licensed under Apache 2.0 license, as described in [LICENSE](LICENSE) file.\n","readmeFilename":"README.md"}