capacitor-rfid-plugin-ox 0.3.5 → 0.5.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/README.md +206 -0
- package/dist/docs.json +277 -2
- package/dist/esm/definitions.d.ts +141 -1
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/electron-bridge.d.ts +30 -0
- package/dist/esm/electron-bridge.js +55 -0
- package/dist/esm/electron-bridge.js.map +1 -0
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web.d.ts +33 -23
- package/dist/esm/web.js +65 -35
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +128 -35
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +128 -35
- package/dist/plugin.js.map +1 -1
- package/package.json +6 -3
package/dist/plugin.js
CHANGED
|
@@ -1,64 +1,157 @@
|
|
|
1
1
|
var capacitorExample = (function (exports, core) {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
const SCAN_EVENT = 'onScanEvent';
|
|
5
|
+
/**
|
|
6
|
+
* The Electron main process sends the tags it read in one message per 250 ms
|
|
7
|
+
* window instead of one per frame — a single tag is read about 44 times a
|
|
8
|
+
* second. The contract does not change: the array is unrolled here, so a
|
|
9
|
+
* listener still gets one tag per call.
|
|
10
|
+
*/
|
|
11
|
+
const SCAN_BATCH_EVENT = 'onScanEventBatch';
|
|
12
|
+
/**
|
|
13
|
+
* On native platforms Capacitor wraps the `addListener` result into a
|
|
14
|
+
* `PluginListenerHandle` itself (`addListenerNative`), but only when
|
|
15
|
+
* `PluginHeaders` are present. Electron has none, so the bridge's raw id
|
|
16
|
+
* string reaches the UI as-is and `handle.remove()` is missing: the listener
|
|
17
|
+
* is never removed, and scanning does not start the second time the modal
|
|
18
|
+
* opens.
|
|
19
|
+
*
|
|
20
|
+
* Do not wrap it with a `Proxy`. Methods of an object exposed through
|
|
21
|
+
* `contextBridge` arrive as `writable: false, configurable: false`, and for
|
|
22
|
+
* such a property a `get` trap must return **that exact value** — even a
|
|
23
|
+
* bound copy is rejected. Otherwise the engine throws the error we saw on
|
|
24
|
+
* the device:
|
|
25
|
+
* TypeError: 'get' on proxy: property 'startScan' is a read-only and
|
|
26
|
+
* non-configurable data property on the proxy target but the proxy did
|
|
27
|
+
* not return its actual value
|
|
28
|
+
* So the bridge is used as the prototype instead: the other methods are
|
|
29
|
+
* found on it as usual, and only `addListener` is defined on top.
|
|
30
|
+
*/
|
|
31
|
+
function withListenerHandles(bridge) {
|
|
32
|
+
const plugin = Object.create(bridge);
|
|
33
|
+
// A plain `plugin.addListener = ...` does not work: the prototype property
|
|
34
|
+
// is `writable: false`, so [[Set]] blocks it.
|
|
35
|
+
Object.defineProperty(plugin, 'addListener', {
|
|
36
|
+
value: async (eventName, callback) => {
|
|
37
|
+
const ids = [bridge.addListener(eventName, callback)];
|
|
38
|
+
if (eventName === SCAN_EVENT) {
|
|
39
|
+
// A desktop app older than the batch sends one message per tag on
|
|
40
|
+
// `onScanEvent`, a newer one sends only batches. Both are listened
|
|
41
|
+
// for, because the bundle in the browser and the installed desktop
|
|
42
|
+
// app are updated separately; only one of them ever fires.
|
|
43
|
+
ids.push(bridge.addListener(SCAN_BATCH_EVENT, (batch) => {
|
|
44
|
+
for (const event of batch)
|
|
45
|
+
callback(event);
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
remove: async () => {
|
|
50
|
+
for (const id of ids)
|
|
51
|
+
bridge.removeListener(id);
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
return plugin;
|
|
57
|
+
}
|
|
58
|
+
|
|
4
59
|
const RFID = core.registerPlugin('RFID', {
|
|
5
60
|
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.RFIDWeb()),
|
|
61
|
+
electron: () => {
|
|
62
|
+
var _a, _b;
|
|
63
|
+
const bridge = (_b = (_a = window.CapacitorCustomPlatform) === null || _a === void 0 ? void 0 : _a.plugins) === null || _b === void 0 ? void 0 : _b.RFID;
|
|
64
|
+
if (!bridge) {
|
|
65
|
+
throw new Error('RFID is not registered in the Electron runtime. Register the driver in electron-plugins.js.');
|
|
66
|
+
}
|
|
67
|
+
return withListenerHandles(bridge);
|
|
68
|
+
},
|
|
6
69
|
});
|
|
7
70
|
|
|
71
|
+
const NO_READER_ON_WEB = 'No RFID Reader in the browser. Use the desktop app (ox-desktop) or the Android handheld.';
|
|
8
72
|
class RFIDWeb extends core.WebPlugin {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
73
|
+
/**
|
|
74
|
+
* The one method the browser can answer truthfully. Everything else rejects:
|
|
75
|
+
* a silent `resolve` makes the UI report a success that never happened.
|
|
76
|
+
*/
|
|
77
|
+
async isConnected() {
|
|
78
|
+
return { connected: false };
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Events never fire without a Reader, so registering a listener here would be
|
|
82
|
+
* the same silent lie as a resolving `startScan()`.
|
|
83
|
+
*/
|
|
84
|
+
async addListener() {
|
|
85
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
86
|
+
}
|
|
87
|
+
async getCapabilities() {
|
|
88
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Not `not-found`: that state tells the operator to check the cable, and
|
|
92
|
+
* there is no cable to check in a browser. The rejection carries the one
|
|
93
|
+
* useful sentence — open the desktop app or the handheld.
|
|
94
|
+
*/
|
|
95
|
+
async getConnectionState() {
|
|
96
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Not an empty list: "no readers plugged in" would send the operator to look
|
|
100
|
+
* for a cable, and the browser has no serial ports to look at.
|
|
101
|
+
*/
|
|
102
|
+
async listReaderPorts() {
|
|
103
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
104
|
+
}
|
|
105
|
+
async selectReaderPort() {
|
|
106
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
107
|
+
}
|
|
108
|
+
async startScan() {
|
|
109
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
110
|
+
}
|
|
111
|
+
async stopScan() {
|
|
112
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
113
|
+
}
|
|
114
|
+
async clearData() {
|
|
115
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
116
|
+
}
|
|
117
|
+
async getScanData() {
|
|
118
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
23
119
|
}
|
|
24
120
|
async getOutputPower() {
|
|
25
|
-
|
|
121
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
26
122
|
}
|
|
27
|
-
async setOutputPower(
|
|
28
|
-
|
|
123
|
+
async setOutputPower() {
|
|
124
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
29
125
|
}
|
|
30
126
|
async getRange() {
|
|
31
|
-
|
|
127
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
32
128
|
}
|
|
33
|
-
async setRange(
|
|
34
|
-
|
|
129
|
+
async setRange() {
|
|
130
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
35
131
|
}
|
|
36
132
|
async getQueryMode() {
|
|
37
|
-
|
|
133
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
38
134
|
}
|
|
39
|
-
async setQueryMode(
|
|
40
|
-
|
|
135
|
+
async setQueryMode() {
|
|
136
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
41
137
|
}
|
|
42
138
|
async getReaderType() {
|
|
43
|
-
|
|
139
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
44
140
|
}
|
|
45
141
|
async getFirmwareVersion() {
|
|
46
|
-
|
|
142
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
47
143
|
}
|
|
48
|
-
async writeEpc(
|
|
49
|
-
|
|
50
|
-
return { value: -1 };
|
|
144
|
+
async writeEpc() {
|
|
145
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
51
146
|
}
|
|
52
|
-
async writeEpcString(
|
|
53
|
-
|
|
54
|
-
return { value: -1 };
|
|
147
|
+
async writeEpcString() {
|
|
148
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
55
149
|
}
|
|
56
|
-
async startSearch(
|
|
57
|
-
|
|
58
|
-
return Promise.resolve();
|
|
150
|
+
async startSearch() {
|
|
151
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
59
152
|
}
|
|
60
153
|
async stopSearch() {
|
|
61
|
-
|
|
154
|
+
throw this.unimplemented(NO_READER_ON_WEB);
|
|
62
155
|
}
|
|
63
156
|
}
|
|
64
157
|
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst RFID = registerPlugin('RFID', {\n web: () => import('./web').then(m => new m.RFIDWeb()),\n});\nexport * from './definitions';\nexport { RFID };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class RFIDWeb extends WebPlugin {\n isConnected() {\n return Promise.resolve({ connected: false });\n }\n startScan() {\n return Promise.resolve();\n }\n stopScan() {\n return Promise.resolve();\n }\n clearData() {\n return Promise.resolve();\n }\n getScanData() {\n return Promise.resolve();\n }\n async getOutputPower() {\n return { value: 0 };\n }\n async setOutputPower(options) {\n return { value: options.power };\n }\n async getRange() {\n return { value: 0 };\n }\n async setRange(options) {\n return { value: options.range };\n }\n async getQueryMode() {\n return { value: 0 };\n }\n async setQueryMode(options) {\n return { value: options.queryMode };\n }\n async getReaderType() {\n return { value: 0 };\n }\n async getFirmwareVersion() {\n return { value: 'not implemented' };\n }\n async writeEpc(options) {\n console.log(options.epc);\n return { value: -1 };\n }\n async writeEpcString(options) {\n console.log(options.epc);\n return { value: -1 };\n }\n async startSearch(options) {\n console.log(options.searchableTags);\n return Promise.resolve();\n }\n async stopSearch() {\n return Promise.resolve();\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,IAAI,GAAGA,mBAAc,CAAC,MAAM,EAAE;IACpC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;IACzD,CAAC;;ICFM,MAAM,OAAO,SAASC,cAAS,CAAC;IACvC,IAAI,WAAW,GAAG;IAClB,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IACrD,KAAK;IACL,IAAI,SAAS,GAAG;IAChB,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,KAAK;IACL,IAAI,QAAQ,GAAG;IACf,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,KAAK;IACL,IAAI,SAAS,GAAG;IAChB,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,KAAK;IACL,IAAI,WAAW,GAAG;IAClB,QAAQ,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IACjC,KAAK;IACL,IAAI,MAAM,cAAc,GAAG;IAC3B,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAC5B,KAAK;IACL,IAAI,MAAM,cAAc,CAAC,OAAO,EAAE;IAClC,QAAQ,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;IACxC,KAAK;IACL,IAAI,MAAM,QAAQ,GAAG;IACrB,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAC5B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"plugin.js","sources":["esm/electron-bridge.js","esm/index.js","esm/web.js"],"sourcesContent":["const SCAN_EVENT = 'onScanEvent';\n/**\n * The Electron main process sends the tags it read in one message per 250 ms\n * window instead of one per frame — a single tag is read about 44 times a\n * second. The contract does not change: the array is unrolled here, so a\n * listener still gets one tag per call.\n */\nconst SCAN_BATCH_EVENT = 'onScanEventBatch';\n/**\n * On native platforms Capacitor wraps the `addListener` result into a\n * `PluginListenerHandle` itself (`addListenerNative`), but only when\n * `PluginHeaders` are present. Electron has none, so the bridge's raw id\n * string reaches the UI as-is and `handle.remove()` is missing: the listener\n * is never removed, and scanning does not start the second time the modal\n * opens.\n *\n * Do not wrap it with a `Proxy`. Methods of an object exposed through\n * `contextBridge` arrive as `writable: false, configurable: false`, and for\n * such a property a `get` trap must return **that exact value** — even a\n * bound copy is rejected. Otherwise the engine throws the error we saw on\n * the device:\n * TypeError: 'get' on proxy: property 'startScan' is a read-only and\n * non-configurable data property on the proxy target but the proxy did\n * not return its actual value\n * So the bridge is used as the prototype instead: the other methods are\n * found on it as usual, and only `addListener` is defined on top.\n */\nexport function withListenerHandles(bridge) {\n const plugin = Object.create(bridge);\n // A plain `plugin.addListener = ...` does not work: the prototype property\n // is `writable: false`, so [[Set]] blocks it.\n Object.defineProperty(plugin, 'addListener', {\n value: async (eventName, callback) => {\n const ids = [bridge.addListener(eventName, callback)];\n if (eventName === SCAN_EVENT) {\n // A desktop app older than the batch sends one message per tag on\n // `onScanEvent`, a newer one sends only batches. Both are listened\n // for, because the bundle in the browser and the installed desktop\n // app are updated separately; only one of them ever fires.\n ids.push(bridge.addListener(SCAN_BATCH_EVENT, (batch) => {\n for (const event of batch)\n callback(event);\n }));\n }\n return {\n remove: async () => {\n for (const id of ids)\n bridge.removeListener(id);\n },\n };\n },\n });\n return plugin;\n}\n//# sourceMappingURL=electron-bridge.js.map","import { registerPlugin } from '@capacitor/core';\nimport { withListenerHandles } from './electron-bridge';\nconst RFID = registerPlugin('RFID', {\n web: () => import('./web').then(m => new m.RFIDWeb()),\n electron: () => {\n var _a, _b;\n const bridge = (_b = (_a = window.CapacitorCustomPlatform) === null || _a === void 0 ? void 0 : _a.plugins) === null || _b === void 0 ? void 0 : _b.RFID;\n if (!bridge) {\n throw new Error('RFID is not registered in the Electron runtime. Register the driver in electron-plugins.js.');\n }\n return withListenerHandles(bridge);\n },\n});\nexport * from './definitions';\nexport { RFID };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nconst NO_READER_ON_WEB = 'No RFID Reader in the browser. Use the desktop app (ox-desktop) or the Android handheld.';\nexport class RFIDWeb extends WebPlugin {\n /**\n * The one method the browser can answer truthfully. Everything else rejects:\n * a silent `resolve` makes the UI report a success that never happened.\n */\n async isConnected() {\n return { connected: false };\n }\n /**\n * Events never fire without a Reader, so registering a listener here would be\n * the same silent lie as a resolving `startScan()`.\n */\n async addListener() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async getCapabilities() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n /**\n * Not `not-found`: that state tells the operator to check the cable, and\n * there is no cable to check in a browser. The rejection carries the one\n * useful sentence — open the desktop app or the handheld.\n */\n async getConnectionState() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n /**\n * Not an empty list: \"no readers plugged in\" would send the operator to look\n * for a cable, and the browser has no serial ports to look at.\n */\n async listReaderPorts() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async selectReaderPort() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async startScan() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async stopScan() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async clearData() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async getScanData() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async getOutputPower() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async setOutputPower() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async getRange() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async setRange() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async getQueryMode() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async setQueryMode() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async getReaderType() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async getFirmwareVersion() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async writeEpc() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async writeEpcString() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async startSearch() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n async stopSearch() {\n throw this.unimplemented(NO_READER_ON_WEB);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;IAAA,MAAM,UAAU,GAAG,aAAa,CAAC;IACjC;IACA;IACA;IACA;IACA;IACA;IACA,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;IAC5C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACO,SAAS,mBAAmB,CAAC,MAAM,EAAE;IAC5C,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACzC;IACA;IACA,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE;IACjD,QAAQ,KAAK,EAAE,OAAO,SAAS,EAAE,QAAQ,KAAK;IAC9C,YAAY,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;IAClE,YAAY,IAAI,SAAS,KAAK,UAAU,EAAE;IAC1C;IACA;IACA;IACA;IACA,gBAAgB,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC,KAAK,KAAK;IACzE,oBAAoB,KAAK,MAAM,KAAK,IAAI,KAAK;IA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
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -41,7 +41,9 @@
|
|
|
41
41
|
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
|
|
42
42
|
"clean": "rimraf ./dist",
|
|
43
43
|
"watch": "tsc --watch",
|
|
44
|
-
"prepublishOnly": "npm run build"
|
|
44
|
+
"prepublishOnly": "npm run build",
|
|
45
|
+
"test": "vitest run",
|
|
46
|
+
"test:watch": "vitest"
|
|
45
47
|
},
|
|
46
48
|
"devDependencies": {
|
|
47
49
|
"@capacitor/android": "^6.0.0",
|
|
@@ -57,7 +59,8 @@
|
|
|
57
59
|
"rimraf": "^3.0.2",
|
|
58
60
|
"rollup": "^2.32.0",
|
|
59
61
|
"swiftlint": "^1.0.1",
|
|
60
|
-
"typescript": "~4.1.5"
|
|
62
|
+
"typescript": "~4.1.5",
|
|
63
|
+
"vitest": "^0.34.6"
|
|
61
64
|
},
|
|
62
65
|
"peerDependencies": {
|
|
63
66
|
"@capacitor/core": "^6.0.0"
|