{"_id":"@centimoo/capacitor-tcp-printer","name":"@centimoo/capacitor-tcp-printer","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@centimoo/capacitor-tcp-printer","version":"1.0.0","description":"Native TCP printer plugin for Capacitor using Apple Network.framework. Enables raw socket printing (ESC/POS) to LAN printers on iOS.","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":{"name":"Wail Djenane"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/DzCorps/capacitor-tcp-printer.git"},"bugs":{"url":"https://github.com/DzCorps/capacitor-tcp-printer.git/issues"},"keywords":["capacitor","plugin","native","tcp","printer","escpos","ios","ionic"],"scripts":{"verify":"npm run verify:ios && npm run verify:web","verify:ios":"xcodebuild -scheme CentimooCapacitorTcpPrinter -destination generic/platform=iOS","verify:web":"npm run build","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","eslint":"eslint . --ext ts","prettier":"prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java","swiftlint":"node-swiftlint","docgen":"docgen --api TcpPrinterPlugin --output-readme README.md --output-json dist/docs.json","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","prepublishOnly":"npm run build"},"devDependencies":{"@capacitor/core":"^8.0.0","@capacitor/docgen":"^0.3.1","@capacitor/ios":"^8.0.0","@ionic/eslint-config":"^0.4.0","@ionic/prettier-config":"^4.0.0","@ionic/swiftlint-config":"^2.0.0","eslint":"^8.57.1","prettier":"^3.6.2","prettier-plugin-java":"^2.7.7","rimraf":"^6.1.0","rollup":"^4.53.2","swiftlint":"^2.0.0","typescript":"^5.9.3"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"prettier":"@ionic/prettier-config","swiftlint":"@ionic/swiftlint-config","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"capacitor":{"ios":{"src":"ios"}},"gitHead":"146ec87abb040f8d64b0e18aee79fcadb30c00a6","_id":"@centimoo/capacitor-tcp-printer@1.0.0","homepage":"https://github.com/DzCorps/capacitor-tcp-printer#readme","_nodeVersion":"25.5.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-B94ZbeZP5sHULJlYdY6bVBX0cyqP6Oz73K5bgCO4Xo72YfUGu2NlczoIScOtsJMLWRR8W0qIU6+W/eBQ0Hj/5A==","shasum":"46416bd7c5a212e5df0a09361194815b487177c2","tarball":"https://registry.npmjs.org/@centimoo/capacitor-tcp-printer/-/capacitor-tcp-printer-1.0.0.tgz","fileCount":19,"unpackedSize":54950,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEjyFP+G+sm18lDaBHTEs4enpUbT4hhwzx7hPG5VLz8OAiEA2zgdAxJzjwfe94KRn+Lm/jcj+VtQbrCxhhJ9wA05qpw="}]},"_npmUser":{"name":"piratusse","email":"wail.djenane@gmail.com"},"directories":{},"maintainers":[{"name":"piratusse","email":"wail.djenane@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/capacitor-tcp-printer_1.0.0_1773246382112_0.5339900641996775"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-11T16:26:21.960Z","1.0.0":"2026-03-11T16:26:22.260Z","modified":"2026-03-11T16:26:22.550Z"},"maintainers":[{"name":"piratusse","email":"wail.djenane@gmail.com"}],"description":"Native TCP printer plugin for Capacitor using Apple Network.framework. Enables raw socket printing (ESC/POS) to LAN printers on iOS.","homepage":"https://github.com/DzCorps/capacitor-tcp-printer#readme","keywords":["capacitor","plugin","native","tcp","printer","escpos","ios","ionic"],"repository":{"type":"git","url":"git+https://github.com/DzCorps/capacitor-tcp-printer.git"},"author":{"name":"Wail Djenane"},"bugs":{"url":"https://github.com/DzCorps/capacitor-tcp-printer.git/issues"},"license":"MIT","readme":"# @centimoo/capacitor-tcp-printer\n\nNative TCP printer plugin for Capacitor using Apple Network.framework. Enables raw socket printing (ESC/POS) to LAN printers on iOS.\n\n## Install\n\n```bash\nnpm install @centimoo/capacitor-tcp-printer\nnpx cap sync\n```\n\n## API\n\n<docgen-index>\n\n* [`connect(...)`](#connect)\n* [`send(...)`](#send)\n* [`read(...)`](#read)\n* [`disconnect(...)`](#disconnect)\n* [Interfaces](#interfaces)\n* [Enums](#enums)\n\n</docgen-index>\n\n<docgen-api>\n<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->\n\nTCP Socket Plugin interface for Capacitor\nProvides methods for TCP socket communication\n\n### connect(...)\n\n```typescript\nconnect(options: ConnectOptions) => Promise<ConnectResult>\n```\n\nConnects to a TCP server\n\n| Param         | Type                                                      | Description                                      |\n| ------------- | --------------------------------------------------------- | ------------------------------------------------ |\n| **`options`** | <code><a href=\"#connectoptions\">ConnectOptions</a></code> | Connection options including IP address and port |\n\n**Returns:** <code>Promise&lt;<a href=\"#connectresult\">ConnectResult</a>&gt;</code>\n\n--------------------\n\n\n### send(...)\n\n```typescript\nsend(options: SendOptions) => Promise<void>\n```\n\nSends data to a connected TCP server\n\n| Param         | Type                                                | Description                                         |\n| ------------- | --------------------------------------------------- | --------------------------------------------------- |\n| **`options`** | <code><a href=\"#sendoptions\">SendOptions</a></code> | Send options including client ID, data and encoding |\n\n--------------------\n\n\n### read(...)\n\n```typescript\nread(options: ReadOptions) => Promise<ReadResult>\n```\n\nReads data from a connected TCP server\n\n| Param         | Type                                                | Description                                                   |\n| ------------- | --------------------------------------------------- | ------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#readoptions\">ReadOptions</a></code> | Read options including client ID, expected length and timeout |\n\n**Returns:** <code>Promise&lt;<a href=\"#readresult\">ReadResult</a>&gt;</code>\n\n--------------------\n\n\n### disconnect(...)\n\n```typescript\ndisconnect(options: DisconnectOptions) => Promise<DisconnectResult>\n```\n\nDisconnects from a TCP server\n\n| Param         | Type                                                            | Description                       |\n| ------------- | --------------------------------------------------------------- | --------------------------------- |\n| **`options`** | <code><a href=\"#disconnectoptions\">DisconnectOptions</a></code> | Disconnect options with client ID |\n\n**Returns:** <code>Promise&lt;<a href=\"#disconnectresult\">DisconnectResult</a>&gt;</code>\n\n--------------------\n\n\n### Interfaces\n\n\n#### ConnectResult\n\nResult of a successful connection\n\n| Prop         | Type                | Description                                          |\n| ------------ | ------------------- | ---------------------------------------------------- |\n| **`client`** | <code>number</code> | Client ID that can be used for subsequent operations |\n\n\n#### ConnectOptions\n\nOptions for connecting to a TCP server\n\n| Prop            | Type                | Description                            | Default           |\n| --------------- | ------------------- | -------------------------------------- | ----------------- |\n| **`ipAddress`** | <code>string</code> | IP address of the server to connect to |                   |\n| **`port`**      | <code>number</code> | Port number of the TCP server          | <code>9100</code> |\n\n\n#### SendOptions\n\nOptions for sending data to a TCP server\n\n| Prop           | Type                                                  | Description                            | Default                        |\n| -------------- | ----------------------------------------------------- | -------------------------------------- | ------------------------------ |\n| **`client`**   | <code>number</code>                                   | Client ID from a previous connect call |                                |\n| **`data`**     | <code>number[]</code>                                 | Data string to send to the server      |                                |\n| **`encoding`** | <code><a href=\"#dataencoding\">DataEncoding</a></code> | Encoding type for the data             | <code>DataEncoding.UTF8</code> |\n\n\n#### ReadResult\n\nResult of a read operation\n\n| Prop           | Type                                                  | Description                                                                                                          |\n| -------------- | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |\n| **`result`**   | <code>string</code>                                   | Data read from the server Can be UTF-8 string, Base64 encoded string, or Hex string depending on the encoding option |\n| **`encoding`** | <code><a href=\"#dataencoding\">DataEncoding</a></code> | The encoding of the returned result                                                                                  |\n\n\n#### ReadOptions\n\nOptions for reading data from a TCP server\n\n| Prop            | Type                                                  | Description                            | Default                        |\n| --------------- | ----------------------------------------------------- | -------------------------------------- | ------------------------------ |\n| **`client`**    | <code>number</code>                                   | Client ID from a previous connect call |                                |\n| **`expectLen`** | <code>number</code>                                   | Expected number of bytes to read       |                                |\n| **`timeout`**   | <code>number</code>                                   | Read timeout in seconds                | <code>10</code>                |\n| **`encoding`**  | <code><a href=\"#dataencoding\">DataEncoding</a></code> | Preferred encoding for returned data   | <code>DataEncoding.UTF8</code> |\n\n\n#### DisconnectResult\n\nResult of a disconnect operation\n\n| Prop         | Type                | Description                     |\n| ------------ | ------------------- | ------------------------------- |\n| **`client`** | <code>number</code> | Client ID that was disconnected |\n\n\n#### DisconnectOptions\n\nOptions for disconnecting from a TCP server\n\n| Prop         | Type                | Description                            |\n| ------------ | ------------------- | -------------------------------------- |\n| **`client`** | <code>number</code> | Client ID from a previous connect call |\n\n\n### Enums\n\n\n#### DataEncoding\n\n| Members      | Value                 | Description         |\n| ------------ | --------------------- | ------------------- |\n| **`UTF8`**   | <code>'utf8'</code>   | UTF-8 text encoding |\n| **`BASE64`** | <code>'base64'</code> | Base64 encoded data |\n| **`HEX`**    | <code>'hex'</code>    | Hexadecimal string  |\n\n</docgen-api>\n","readmeFilename":"README.md","_rev":"1-bb57b033f1e53051228295adf2c0d4e9"}