@dejadex/web 0.1.0 → 0.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/CHANGELOG.md +26 -0
- package/LICENSE.md +19 -0
- package/README.md +19 -2
- package/THIRD_PARTY_NOTICES +7600 -0
- package/dist/identify/identifier.d.ts +12 -2
- package/dist/identify/identifier.d.ts.map +1 -1
- package/dist/identify/identifier.js +6 -1
- package/dist/identify/identifier.js.map +1 -1
- package/dist/usage/store.d.ts +6 -18
- package/dist/usage/store.d.ts.map +1 -1
- package/dist/usage/store.js +58 -8
- package/dist/usage/store.js.map +1 -1
- package/package.json +6 -3
- package/src/identify/identifier.ts +17 -5
- package/src/usage/store.ts +45 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,32 @@
|
|
|
3
3
|
All notable changes to `@dejadex/web`. Versions follow semver; before 1.0 a
|
|
4
4
|
minor version may break the client contract (`src/types.ts`), and says so here.
|
|
5
5
|
|
|
6
|
+
## 0.1.2
|
|
7
|
+
|
|
8
|
+
- **Licence:** interim proprietary terms (`LICENSE.md`; `license` is now
|
|
9
|
+
`SEE LICENSE IN LICENSE.md`, was `UNLICENSED`), to be replaced by the
|
|
10
|
+
lawyer-reviewed text.
|
|
11
|
+
- **Third-party notices:** `THIRD_PARTY_NOTICES` lists every package installed
|
|
12
|
+
with the SDK, with its version, licence and licence text, the identification
|
|
13
|
+
model the SDK downloads, and ONNX Runtime's own third-party notices. Both
|
|
14
|
+
files are in the package. The SDK's tests fail when a runtime dependency is
|
|
15
|
+
missing from it or listed at another version than the installed one.
|
|
16
|
+
- No code change.
|
|
17
|
+
|
|
18
|
+
## 0.1.1
|
|
19
|
+
|
|
20
|
+
- **Fix:** the usage database (`dejadex-usage`) no longer blocks a host's
|
|
21
|
+
`indexedDB.deleteDatabase`. The IndexedDB store closes its connection on
|
|
22
|
+
`versionchange`; before, a host deleting it on sign-out stayed blocked for
|
|
23
|
+
the life of the page, and the previous account's queued usage could be
|
|
24
|
+
drained under the next account's session.
|
|
25
|
+
- `UsageStore.close()` (optional for stores a host writes; a no-op on the
|
|
26
|
+
memory store). After a close or a `versionchange`, every call rejects with
|
|
27
|
+
`ScannerError` `INVALID_OPTIONS` ("the usage store is closed"); nothing is
|
|
28
|
+
dropped in silence.
|
|
29
|
+
- `destroy()` also closes the usage store the identifier opened itself. A store
|
|
30
|
+
passed as `options.usageStore` belongs to the host and is left open.
|
|
31
|
+
|
|
6
32
|
## 0.1.0 — first published release
|
|
7
33
|
|
|
8
34
|
- `createIdentifier`: card crops in, catalogue ids out, on the device
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Licence
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shay Axelrod. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This licence applies to the DejaDex Web SDK (@dejadex/web), the "Software".
|
|
6
|
+
|
|
7
|
+
1. Use of the Software is permitted only to parties with a written agreement
|
|
8
|
+
with DejaDex, and only with a valid DejaDex API key and leases issued under
|
|
9
|
+
that agreement.
|
|
10
|
+
|
|
11
|
+
2. No other right to use, copy, modify, distribute or sublicense the Software
|
|
12
|
+
is granted.
|
|
13
|
+
|
|
14
|
+
3. Third-party components are licensed under their own terms, listed in
|
|
15
|
+
THIRD_PARTY_NOTICES.
|
|
16
|
+
|
|
17
|
+
4. The Software is provided "as is", without warranty of any kind. To the
|
|
18
|
+
extent the law allows, there is no liability for any claim, damage or other
|
|
19
|
+
loss arising from the Software or its use.
|
package/README.md
CHANGED
|
@@ -21,7 +21,8 @@ npm install @dejadex/web
|
|
|
21
21
|
What protects the platform is the lease and the signed asset URLs, not the
|
|
22
22
|
SDK's code, which runs in browsers anyway. Releases are cut from a
|
|
23
23
|
`web-v<version>` tag by `.github/workflows/publish-web-sdk.yml` (npm trusted
|
|
24
|
-
publishing, no stored token)
|
|
24
|
+
publishing, no stored token), staged and then approved by a maintainer with
|
|
25
|
+
2FA; see `CHANGELOG.md`.
|
|
25
26
|
|
|
26
27
|
## Usage
|
|
27
28
|
|
|
@@ -69,7 +70,14 @@ await identifier.drainUsage((batch) => myBackend.postUsage(batch))
|
|
|
69
70
|
device engine and resolves its `DeviceEngineInfo` (backend, precision, threads,
|
|
70
71
|
measured `perCropMs`). `status()` reports the lease, the device engine and why
|
|
71
72
|
the server route is paused. `leaseRequest()` is the renewal body (see Usage).
|
|
72
|
-
`newSession()
|
|
73
|
+
`newSession()` and `pendingUsage()` are what their names say. `destroy()`
|
|
74
|
+
releases the device engine and closes the usage store the identifier opened;
|
|
75
|
+
a store passed as `usageStore` is the host's, and stays open.
|
|
76
|
+
|
|
77
|
+
**Sign-out.** Drain usage, `destroy()` the identifier, then
|
|
78
|
+
`indexedDB.deleteDatabase('dejadex-usage')`. An SDK store still open lets go
|
|
79
|
+
of the database when the delete arrives (and rejects later calls), so the
|
|
80
|
+
delete is never blocked and no queued usage carries into the next account.
|
|
73
81
|
|
|
74
82
|
### Where a call runs
|
|
75
83
|
|
|
@@ -213,3 +221,12 @@ The preprocessing parity fixtures in `src/identify/__fixtures__/` come from
|
|
|
213
221
|
`ml/scripts/phase0_sdk_fixtures.py`: synthetic crops, never card images. The
|
|
214
222
|
embedding half of that test runs only where the gitignored model files are on
|
|
215
223
|
disk. `DEJADEX_REQUIRE_MODELS=1` turns their absence into a failure.
|
|
224
|
+
|
|
225
|
+
## Licence
|
|
226
|
+
|
|
227
|
+
Proprietary: use requires a written agreement with DejaDex (`LICENSE.md`).
|
|
228
|
+
Third-party components keep their own licences, listed with their texts in
|
|
229
|
+
`THIRD_PARTY_NOTICES`. When a runtime dependency is added or upgraded, copy
|
|
230
|
+
its `LICENSE` from `node_modules` into that file; the SDK's tests
|
|
231
|
+
(`scripts/check-third-party-notices.mjs`) fail until its entry matches the
|
|
232
|
+
installed version.
|