@minca/core 0.2.0 → 0.4.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 +2 -2
- package/dist/{session → hosting}/hosting.d.ts +2 -8
- package/dist/hosting/hosting.d.ts.map +1 -0
- package/dist/{session → hosting}/hosting.js +3 -3
- package/dist/hosting/hosting.js.map +1 -0
- package/dist/identity/abilities.d.ts +0 -2
- package/dist/identity/abilities.d.ts.map +1 -1
- package/dist/identity/abilities.js +2 -2
- package/dist/identity/abilities.js.map +1 -1
- package/dist/identity/account-vault.d.ts +0 -2
- package/dist/identity/account-vault.d.ts.map +1 -1
- package/dist/identity/account-vault.js +1 -1
- package/dist/identity/account-vault.js.map +1 -1
- package/dist/identity/crypto-p256.d.ts +1 -1
- package/dist/identity/crypto-p256.d.ts.map +1 -1
- package/dist/identity/ucan.d.ts +2 -1
- package/dist/identity/ucan.d.ts.map +1 -1
- package/dist/identity/ucan.js +1 -1
- package/dist/identity/ucan.js.map +1 -1
- package/dist/inbox/inbox.d.ts +0 -21
- package/dist/inbox/inbox.d.ts.map +1 -1
- package/dist/inbox/inbox.js +4 -4
- package/dist/inbox/inbox.js.map +1 -1
- package/dist/inbox/index.d.ts +4 -5
- package/dist/inbox/index.d.ts.map +1 -1
- package/dist/inbox/index.js +2 -3
- package/dist/inbox/index.js.map +1 -1
- package/dist/inbox/names.d.ts +0 -4
- package/dist/inbox/names.d.ts.map +1 -1
- package/dist/inbox/names.js +2 -2
- package/dist/inbox/names.js.map +1 -1
- package/dist/index.d.ts +50 -84
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -60
- package/dist/index.js.map +1 -1
- package/dist/network/mesh.d.ts.map +1 -1
- package/dist/network/mesh.js +23 -3
- package/dist/network/mesh.js.map +1 -1
- package/dist/network/network-manager.d.ts +5 -0
- package/dist/network/network-manager.d.ts.map +1 -1
- package/dist/network/network-manager.js +3 -0
- package/dist/network/network-manager.js.map +1 -1
- package/dist/network/peer-auth.d.ts +17 -5
- package/dist/network/peer-auth.d.ts.map +1 -1
- package/dist/network/peer-auth.js +19 -9
- package/dist/network/peer-auth.js.map +1 -1
- package/dist/network/rendezvous.d.ts +2 -0
- package/dist/network/rendezvous.d.ts.map +1 -1
- package/dist/network/rendezvous.js +5 -0
- package/dist/network/rendezvous.js.map +1 -1
- package/dist/network/rtc-transport.d.ts.map +1 -1
- package/dist/network/rtc-transport.js +9 -3
- package/dist/network/rtc-transport.js.map +1 -1
- package/dist/network/transport.d.ts +12 -0
- package/dist/network/transport.d.ts.map +1 -1
- package/dist/network/ws-transport.d.ts +1 -1
- package/dist/network/ws-transport.d.ts.map +1 -1
- package/dist/network/ws-transport.js +14 -4
- package/dist/network/ws-transport.js.map +1 -1
- package/dist/node/carrier.d.ts +1 -33
- package/dist/node/carrier.d.ts.map +1 -1
- package/dist/node/carrier.js +38 -68
- package/dist/node/carrier.js.map +1 -1
- package/dist/node/index.d.ts +5 -16
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +2 -9
- package/dist/node/index.js.map +1 -1
- package/dist/node/node-carriers.d.ts.map +1 -1
- package/dist/node/node-carriers.js +21 -52
- package/dist/node/node-carriers.js.map +1 -1
- package/dist/node/node-context.d.ts +0 -2
- package/dist/node/node-context.d.ts.map +1 -1
- package/dist/node/node-context.js.map +1 -1
- package/dist/node/node-hosting.d.ts.map +1 -1
- package/dist/node/node-hosting.js +14 -5
- package/dist/node/node-hosting.js.map +1 -1
- package/dist/node/node-records.js +2 -2
- package/dist/node/node-records.js.map +1 -1
- package/dist/node/node.d.ts.map +1 -1
- package/dist/node/node.js +152 -36
- package/dist/node/node.js.map +1 -1
- package/dist/node/space-checks.d.ts +3 -1
- package/dist/node/space-checks.d.ts.map +1 -1
- package/dist/node/space-checks.js +7 -3
- package/dist/node/space-checks.js.map +1 -1
- package/dist/node/space-holding.d.ts +5 -0
- package/dist/node/space-holding.d.ts.map +1 -1
- package/dist/node/space-holding.js +90 -5
- package/dist/node/space-holding.js.map +1 -1
- package/dist/node/space-lines.d.ts +3 -0
- package/dist/node/space-lines.d.ts.map +1 -1
- package/dist/node/space-lines.js +13 -1
- package/dist/node/space-lines.js.map +1 -1
- package/dist/node/space-membership.js +4 -4
- package/dist/node/space-membership.js.map +1 -1
- package/dist/node/space-mirrors.d.ts +1 -1
- package/dist/node/space-mirrors.d.ts.map +1 -1
- package/dist/node/space-mirrors.js +17 -5
- package/dist/node/space-mirrors.js.map +1 -1
- package/dist/node/space-peers.d.ts +7 -2
- package/dist/node/space-peers.d.ts.map +1 -1
- package/dist/node/space-peers.js +44 -10
- package/dist/node/space-peers.js.map +1 -1
- package/dist/node/space-runtime.d.ts +7 -3
- package/dist/node/space-runtime.d.ts.map +1 -1
- package/dist/node/space-runtime.js +32 -10
- package/dist/node/space-runtime.js.map +1 -1
- package/dist/node/space-standing.d.ts +1 -1
- package/dist/node/space-standing.d.ts.map +1 -1
- package/dist/node/space-standing.js +23 -42
- package/dist/node/space-standing.js.map +1 -1
- package/dist/node/space-warrants.js +1 -1
- package/dist/node/space-warrants.js.map +1 -1
- package/dist/node/space-writing.d.ts.map +1 -1
- package/dist/node/space-writing.js +21 -32
- package/dist/node/space-writing.js.map +1 -1
- package/dist/node/stores.d.ts +9 -57
- package/dist/node/stores.d.ts.map +1 -1
- package/dist/node/stores.js +1 -72
- package/dist/node/stores.js.map +1 -1
- package/dist/node/types.d.ts +19 -8
- package/dist/node/types.d.ts.map +1 -1
- package/dist/node/writer-keys.d.ts +15 -14
- package/dist/node/writer-keys.d.ts.map +1 -1
- package/dist/node/writer-keys.js +3 -115
- package/dist/node/writer-keys.js.map +1 -1
- package/dist/privacy/direct.d.ts +0 -7
- package/dist/privacy/direct.d.ts.map +1 -1
- package/dist/privacy/direct.js +2 -2
- package/dist/privacy/direct.js.map +1 -1
- package/dist/query/filter.d.ts +0 -2
- package/dist/query/filter.d.ts.map +1 -1
- package/dist/query/filter.js +1 -1
- package/dist/query/filter.js.map +1 -1
- package/dist/query/types.d.ts +2 -6
- package/dist/query/types.d.ts.map +1 -1
- package/dist/query/types.js.map +1 -1
- package/dist/records/key.d.ts +18 -19
- package/dist/records/key.d.ts.map +1 -1
- package/dist/records/key.js +55 -43
- package/dist/records/key.js.map +1 -1
- package/dist/records/links.js +1 -1
- package/dist/records/rules.d.ts +1 -1
- package/dist/records/rules.d.ts.map +1 -1
- package/dist/records/rules.js +6 -4
- package/dist/records/rules.js.map +1 -1
- package/dist/schemas/direct.d.ts +70 -0
- package/dist/schemas/direct.d.ts.map +1 -0
- package/dist/schemas/direct.js +39 -0
- package/dist/schemas/direct.js.map +1 -0
- package/dist/schemas/index.d.ts +10 -73
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +8 -66
- package/dist/schemas/index.js.map +1 -1
- package/dist/space/account-registry.d.ts +0 -3
- package/dist/space/account-registry.d.ts.map +1 -1
- package/dist/space/account-registry.js.map +1 -1
- package/dist/space/own-automations.d.ts +51 -95
- package/dist/space/own-automations.d.ts.map +1 -1
- package/dist/space/own-automations.js +100 -295
- package/dist/space/own-automations.js.map +1 -1
- package/dist/space/pass.d.ts +8 -3
- package/dist/space/pass.d.ts.map +1 -1
- package/dist/space/pass.js +4 -3
- package/dist/space/pass.js.map +1 -1
- package/dist/space/space-manager.d.ts +1 -3
- package/dist/space/space-manager.d.ts.map +1 -1
- package/dist/space/space-manager.js +5 -7
- package/dist/space/space-manager.js.map +1 -1
- package/dist/storage/body-cache.d.ts +29 -0
- package/dist/storage/body-cache.d.ts.map +1 -0
- package/dist/storage/body-cache.js +64 -0
- package/dist/storage/body-cache.js.map +1 -0
- package/dist/storage/encrypted-adapter.d.ts +0 -5
- package/dist/storage/encrypted-adapter.d.ts.map +1 -1
- package/dist/storage/encrypted-adapter.js +1 -1
- package/dist/storage/encrypted-adapter.js.map +1 -1
- package/dist/storage/mirror.d.ts.map +1 -1
- package/dist/storage/mirror.js +35 -16
- package/dist/storage/mirror.js.map +1 -1
- package/dist/storage/segment.d.ts +6 -2
- package/dist/storage/segment.d.ts.map +1 -1
- package/dist/storage/segment.js +8 -4
- package/dist/storage/segment.js.map +1 -1
- package/dist/storage/shared-store.d.ts +32 -0
- package/dist/storage/shared-store.d.ts.map +1 -0
- package/dist/storage/{folder-reconcile.js → shared-store.js} +15 -15
- package/dist/storage/shared-store.js.map +1 -0
- package/dist/storage/storage-provider.d.ts +19 -9
- package/dist/storage/storage-provider.d.ts.map +1 -1
- package/dist/storage/storage-provider.js +155 -62
- package/dist/storage/storage-provider.js.map +1 -1
- package/dist/sync/sync-engine.d.ts +17 -4
- package/dist/sync/sync-engine.d.ts.map +1 -1
- package/dist/sync/sync-engine.js +298 -84
- package/dist/sync/sync-engine.js.map +1 -1
- package/dist/sync/sync-messages.d.ts +5 -1
- package/dist/sync/sync-messages.d.ts.map +1 -1
- package/dist/sync/sync-messages.js +1 -1
- package/dist/sync/sync-messages.js.map +1 -1
- package/dist/types.d.ts +19 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/index.d.ts +5 -5
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +5 -5
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/step.d.ts +8 -0
- package/dist/utils/step.d.ts.map +1 -0
- package/dist/utils/step.js +15 -0
- package/dist/utils/step.js.map +1 -0
- package/docs/README.md +4 -3
- package/docs/actions.md +41 -2
- package/docs/agents.md +13 -10
- package/docs/automations.md +16 -48
- package/docs/blueprints-and-guides.md +2 -2
- package/docs/bots.md +3 -3
- package/docs/building-an-app.md +2 -2
- package/docs/collections.md +2 -4
- package/docs/computed.md +1 -2
- package/docs/node.md +108 -40
- package/docs/proposing-collections.md +3 -3
- package/docs/query-format.md +6 -5
- package/docs/records-and-queries.md +12 -13
- package/docs/sign-in.md +16 -16
- package/docs/spaces.md +0 -5
- package/docs/standard-library.md +6 -8
- package/docs/storage.md +114 -22
- package/docs/usernames.md +1 -1
- package/package.json +15 -25
- package/dist/identity/account-store.d.ts +0 -83
- package/dist/identity/account-store.d.ts.map +0 -1
- package/dist/identity/account-store.js +0 -234
- package/dist/identity/account-store.js.map +0 -1
- package/dist/identity/device-key.d.ts +0 -26
- package/dist/identity/device-key.d.ts.map +0 -1
- package/dist/identity/device-key.js +0 -48
- package/dist/identity/device-key.js.map +0 -1
- package/dist/identity/idb.d.ts +0 -19
- package/dist/identity/idb.d.ts.map +0 -1
- package/dist/identity/idb.js +0 -56
- package/dist/identity/idb.js.map +0 -1
- package/dist/node/actions.d.ts +0 -85
- package/dist/node/actions.d.ts.map +0 -1
- package/dist/node/actions.js +0 -921
- package/dist/node/actions.js.map +0 -1
- package/dist/node/host.d.ts +0 -187
- package/dist/node/host.d.ts.map +0 -1
- package/dist/node/host.js +0 -818
- package/dist/node/host.js.map +0 -1
- package/dist/node/usage.d.ts +0 -32
- package/dist/node/usage.d.ts.map +0 -1
- package/dist/node/usage.js +0 -217
- package/dist/node/usage.js.map +0 -1
- package/dist/node/watch-notifications.d.ts +0 -25
- package/dist/node/watch-notifications.d.ts.map +0 -1
- package/dist/node/watch-notifications.js +0 -166
- package/dist/node/watch-notifications.js.map +0 -1
- package/dist/node/worker.d.ts +0 -83
- package/dist/node/worker.d.ts.map +0 -1
- package/dist/node/worker.js +0 -305
- package/dist/node/worker.js.map +0 -1
- package/dist/node-worker.d.ts +0 -2
- package/dist/node-worker.d.ts.map +0 -1
- package/dist/node-worker.js +0 -16
- package/dist/node-worker.js.map +0 -1
- package/dist/schemas/automations.d.ts +0 -390
- package/dist/schemas/automations.d.ts.map +0 -1
- package/dist/schemas/automations.js +0 -619
- package/dist/schemas/automations.js.map +0 -1
- package/dist/schemas/blueprints.d.ts +0 -122
- package/dist/schemas/blueprints.d.ts.map +0 -1
- package/dist/schemas/blueprints.js +0 -337
- package/dist/schemas/blueprints.js.map +0 -1
- package/dist/schemas/choosing.d.ts +0 -19
- package/dist/schemas/choosing.d.ts.map +0 -1
- package/dist/schemas/choosing.js +0 -69
- package/dist/schemas/choosing.js.map +0 -1
- package/dist/schemas/connectors.d.ts +0 -202
- package/dist/schemas/connectors.d.ts.map +0 -1
- package/dist/schemas/connectors.js +0 -140
- package/dist/schemas/connectors.js.map +0 -1
- package/dist/schemas/cron.d.ts +0 -14
- package/dist/schemas/cron.d.ts.map +0 -1
- package/dist/schemas/cron.js +0 -75
- package/dist/schemas/cron.js.map +0 -1
- package/dist/schemas/geo.d.ts +0 -63
- package/dist/schemas/geo.d.ts.map +0 -1
- package/dist/schemas/geo.js +0 -131
- package/dist/schemas/geo.js.map +0 -1
- package/dist/schemas/guides.d.ts +0 -26
- package/dist/schemas/guides.d.ts.map +0 -1
- package/dist/schemas/guides.js +0 -33
- package/dist/schemas/guides.js.map +0 -1
- package/dist/schemas/library/annotations.d.ts +0 -616
- package/dist/schemas/library/annotations.d.ts.map +0 -1
- package/dist/schemas/library/annotations.js +0 -156
- package/dist/schemas/library/annotations.js.map +0 -1
- package/dist/schemas/library/collections.d.ts +0 -211
- package/dist/schemas/library/collections.d.ts.map +0 -1
- package/dist/schemas/library/collections.js +0 -57
- package/dist/schemas/library/collections.js.map +0 -1
- package/dist/schemas/library/community.d.ts +0 -1136
- package/dist/schemas/library/community.d.ts.map +0 -1
- package/dist/schemas/library/community.js +0 -315
- package/dist/schemas/library/community.js.map +0 -1
- package/dist/schemas/library/life.d.ts +0 -1440
- package/dist/schemas/library/life.d.ts.map +0 -1
- package/dist/schemas/library/life.js +0 -202
- package/dist/schemas/library/life.js.map +0 -1
- package/dist/schemas/library/media.d.ts +0 -1002
- package/dist/schemas/library/media.d.ts.map +0 -1
- package/dist/schemas/library/media.js +0 -110
- package/dist/schemas/library/media.js.map +0 -1
- package/dist/schemas/library/money.d.ts +0 -1221
- package/dist/schemas/library/money.d.ts.map +0 -1
- package/dist/schemas/library/money.js +0 -168
- package/dist/schemas/library/money.js.map +0 -1
- package/dist/schemas/library/planning.d.ts +0 -1107
- package/dist/schemas/library/planning.d.ts.map +0 -1
- package/dist/schemas/library/planning.js +0 -214
- package/dist/schemas/library/planning.js.map +0 -1
- package/dist/schemas/library/publishing.d.ts +0 -1499
- package/dist/schemas/library/publishing.d.ts.map +0 -1
- package/dist/schemas/library/publishing.js +0 -285
- package/dist/schemas/library/publishing.js.map +0 -1
- package/dist/schemas/library/social.d.ts +0 -1257
- package/dist/schemas/library/social.d.ts.map +0 -1
- package/dist/schemas/library/social.js +0 -147
- package/dist/schemas/library/social.js.map +0 -1
- package/dist/schemas/standard.d.ts +0 -21
- package/dist/schemas/standard.d.ts.map +0 -1
- package/dist/schemas/standard.js +0 -39
- package/dist/schemas/standard.js.map +0 -1
- package/dist/session/account-hint.d.ts +0 -13
- package/dist/session/account-hint.d.ts.map +0 -1
- package/dist/session/account-hint.js +0 -54
- package/dist/session/account-hint.js.map +0 -1
- package/dist/session/auth.d.ts +0 -411
- package/dist/session/auth.d.ts.map +0 -1
- package/dist/session/auth.js +0 -1529
- package/dist/session/auth.js.map +0 -1
- package/dist/session/channel-room.d.ts +0 -26
- package/dist/session/channel-room.d.ts.map +0 -1
- package/dist/session/channel-room.js +0 -56
- package/dist/session/channel-room.js.map +0 -1
- package/dist/session/connect-code.d.ts +0 -127
- package/dist/session/connect-code.d.ts.map +0 -1
- package/dist/session/connect-code.js +0 -408
- package/dist/session/connect-code.js.map +0 -1
- package/dist/session/connect.d.ts +0 -386
- package/dist/session/connect.d.ts.map +0 -1
- package/dist/session/connect.js +0 -583
- package/dist/session/connect.js.map +0 -1
- package/dist/session/connection.d.ts +0 -135
- package/dist/session/connection.d.ts.map +0 -1
- package/dist/session/connection.js +0 -215
- package/dist/session/connection.js.map +0 -1
- package/dist/session/credentials.d.ts +0 -30
- package/dist/session/credentials.d.ts.map +0 -1
- package/dist/session/credentials.js +0 -63
- package/dist/session/credentials.js.map +0 -1
- package/dist/session/hosting.d.ts.map +0 -1
- package/dist/session/hosting.js.map +0 -1
- package/dist/session/index.d.ts +0 -29
- package/dist/session/index.d.ts.map +0 -1
- package/dist/session/index.js +0 -21
- package/dist/session/index.js.map +0 -1
- package/dist/session/pairing.d.ts +0 -97
- package/dist/session/pairing.d.ts.map +0 -1
- package/dist/session/pairing.js +0 -251
- package/dist/session/pairing.js.map +0 -1
- package/dist/session/password-strength.d.ts +0 -22
- package/dist/session/password-strength.d.ts.map +0 -1
- package/dist/session/password-strength.js +0 -130
- package/dist/session/password-strength.js.map +0 -1
- package/dist/session/places.d.ts +0 -71
- package/dist/session/places.d.ts.map +0 -1
- package/dist/session/places.js +0 -130
- package/dist/session/places.js.map +0 -1
- package/dist/session/popup.d.ts +0 -13
- package/dist/session/popup.d.ts.map +0 -1
- package/dist/session/popup.js +0 -23
- package/dist/session/popup.js.map +0 -1
- package/dist/session/stay-signed-in.d.ts +0 -49
- package/dist/session/stay-signed-in.d.ts.map +0 -1
- package/dist/session/stay-signed-in.js +0 -141
- package/dist/session/stay-signed-in.js.map +0 -1
- package/dist/storage/blob/directory.d.ts +0 -14
- package/dist/storage/blob/directory.d.ts.map +0 -1
- package/dist/storage/blob/directory.js +0 -87
- package/dist/storage/blob/directory.js.map +0 -1
- package/dist/storage/blob/memory.d.ts +0 -6
- package/dist/storage/blob/memory.d.ts.map +0 -1
- package/dist/storage/blob/memory.js +0 -20
- package/dist/storage/blob/memory.js.map +0 -1
- package/dist/storage/blob/s3.d.ts +0 -16
- package/dist/storage/blob/s3.d.ts.map +0 -1
- package/dist/storage/blob/s3.js +0 -91
- package/dist/storage/blob/s3.js.map +0 -1
- package/dist/storage/directory-access.d.ts +0 -36
- package/dist/storage/directory-access.d.ts.map +0 -1
- package/dist/storage/directory-access.js +0 -89
- package/dist/storage/directory-access.js.map +0 -1
- package/dist/storage/folder-adapter.d.ts +0 -94
- package/dist/storage/folder-adapter.d.ts.map +0 -1
- package/dist/storage/folder-adapter.js +0 -215
- package/dist/storage/folder-adapter.js.map +0 -1
- package/dist/storage/folder-reconcile.d.ts +0 -33
- package/dist/storage/folder-reconcile.d.ts.map +0 -1
- package/dist/storage/folder-reconcile.js.map +0 -1
- package/dist/storage/index.d.ts +0 -6
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/index.js +0 -5
- package/dist/storage/index.js.map +0 -1
- package/dist/storage/indexeddb-adapter.d.ts +0 -8
- package/dist/storage/indexeddb-adapter.d.ts.map +0 -1
- package/dist/storage/indexeddb-adapter.js +0 -103
- package/dist/storage/indexeddb-adapter.js.map +0 -1
package/dist/node/worker.d.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node/worker
|
|
3
|
-
* A browser node in a worker, off the page's main thread, so checking
|
|
4
|
-
* signatures, decrypting and syncing never make the page stutter.
|
|
5
|
-
*
|
|
6
|
-
* The page calls {@link startNodeInWorker} and gets a node with the usual API.
|
|
7
|
-
* The worker runs {@link runNodeWorker} (the `@minca/core/node-worker`
|
|
8
|
-
* entry does it) and holds the node itself. Two things stay on the page: the
|
|
9
|
-
* root signer, since a passkey needs a document and a key in a tab should stay
|
|
10
|
-
* there, and WebRTC, since not every browser has it in workers. The worker
|
|
11
|
-
* reaches both by message.
|
|
12
|
-
*
|
|
13
|
-
* In a `SharedWorker`, the tabs that open the same account's stores with the
|
|
14
|
-
* same key share one node: one copy in memory, one set of connections. Each
|
|
15
|
-
* tab brings its signer and its WebRTC; the node uses the WebRTC of the tab
|
|
16
|
-
* open longest. It closes when the last tab leaves. A tab that goes without
|
|
17
|
-
* saying so is noticed by a Web Lock it holds while open.
|
|
18
|
-
*/
|
|
19
|
-
import type { RootSigner } from '../identity/root-signer.js';
|
|
20
|
-
import { type StoreFactory, type WorkerStores } from './stores.js';
|
|
21
|
-
import type { NodeConfig, NodeNetworkConfig, P2PNode } from './types.js';
|
|
22
|
-
/**
|
|
23
|
-
* What a worker needs to start a node: `NodeConfig`, less what can't be sent
|
|
24
|
-
* to it. The signer stays on the page, and the stores are described.
|
|
25
|
-
*/
|
|
26
|
-
export interface WorkerNodeConfig extends Pick<NodeConfig, 'accountKey' | 'contactKey' | 'contactsSpace' | 'sessionTtlSeconds' | 'sessionKey' | 'cache'> {
|
|
27
|
-
readonly stores: WorkerStores;
|
|
28
|
-
readonly network?: Pick<NodeNetworkConfig, 'relays' | 'nodes' | 'hosts' | 'iceServers'>;
|
|
29
|
-
}
|
|
30
|
-
/** What of a network config reaches the worker: plain data, never transports */
|
|
31
|
-
export declare function workerNetwork(network: NodeNetworkConfig): NonNullable<WorkerNodeConfig['network']>;
|
|
32
|
-
/** A `Worker`, a `SharedWorker`'s port, or a port to either */
|
|
33
|
-
export interface WorkerLike {
|
|
34
|
-
postMessage(message: unknown, transfer: Transferable[]): void;
|
|
35
|
-
/** A dedicated worker ends with the node it holds */
|
|
36
|
-
terminate?(): void;
|
|
37
|
-
/** Where a worker that fails to load says so (a `Worker`, or a `SharedWorker` beside its port) */
|
|
38
|
-
addEventListener?(type: 'error', listener: () => void): void;
|
|
39
|
-
}
|
|
40
|
-
/** The name of the error when a worker never said the node started: it failed to load, or took too long */
|
|
41
|
-
export declare const WORKER_NOT_STARTED = "WorkerNotStarted";
|
|
42
|
-
/**
|
|
43
|
-
* Starts a node in `worker`, or joins the one it already runs for the same
|
|
44
|
-
* account and stores (a `SharedWorker`), and returns it, used from here.
|
|
45
|
-
* Closing it lets go of it from this tab: the signer and connections kept
|
|
46
|
-
* here stop, a dedicated worker ends, and a shared node closes once no tab
|
|
47
|
-
* uses it.
|
|
48
|
-
*
|
|
49
|
-
* @param worker Running `runNodeWorker`, as `@minca/core/node-worker` does
|
|
50
|
-
* @param config.signer Who the node acts for; its key stays on this side
|
|
51
|
-
* @param startTimeoutMs How long to wait for the worker to say the node started. Default 30 s.
|
|
52
|
-
* @throws When the worker could not start the node, with its reason, or said nothing in time
|
|
53
|
-
*/
|
|
54
|
-
export declare function startNodeInWorker(worker: WorkerLike, config: WorkerNodeConfig & {
|
|
55
|
-
readonly signer: RootSigner;
|
|
56
|
-
}, startTimeoutMs?: number): Promise<P2PNode>;
|
|
57
|
-
/**
|
|
58
|
-
* Starts a page's node: in `worker` when one is given, or here. The stores
|
|
59
|
-
* are described so a worker can open them; `stores` replaces them here only.
|
|
60
|
-
*/
|
|
61
|
-
export declare function startPageNode(config: Omit<WorkerNodeConfig, 'network'> & {
|
|
62
|
-
readonly signer: RootSigner;
|
|
63
|
-
readonly network?: NodeNetworkConfig;
|
|
64
|
-
}, options?: {
|
|
65
|
-
readonly worker?: () => WorkerLike;
|
|
66
|
-
readonly stores?: StoreFactory;
|
|
67
|
-
}): Promise<P2PNode>;
|
|
68
|
-
/** What `runNodeWorker` listens on: a dedicated worker's scope, or a shared worker's */
|
|
69
|
-
interface WorkerScope {
|
|
70
|
-
addEventListener(type: 'message' | 'connect', listener: (event: MessageEvent) => void): void;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* In a worker: starts a node when a page asks (`startNodeInWorker`), or lets
|
|
74
|
-
* the page share the one already running for the same account and stores,
|
|
75
|
-
* and serves it until the last page using it lets go. In a `SharedWorker`
|
|
76
|
-
* each page arrives by `connect`.
|
|
77
|
-
*/
|
|
78
|
-
export declare function runNodeWorker(scope?: WorkerScope, options?: {
|
|
79
|
-
/** Opens the stores the page described. Default `workerStores`; a test hands out memory ones. */
|
|
80
|
-
readonly openStores?: (stores: WorkerStores) => StoreFactory;
|
|
81
|
-
}): void;
|
|
82
|
-
export {};
|
|
83
|
-
//# sourceMappingURL=worker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/node/worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAO7D,OAAO,EAA+B,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAChG,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,YAA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AAC,MAAM,CAAC,EAAE,MAAM,UAAU,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAA;CAAO,GACnF,OAAO,CAAC,OAAO,CAAC,CAgBlB;AAQD,wFAAwF;AACxF,UAAU,WAAW;IACnB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,GAAG,IAAI,CAAC;CAC9F;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,KAAK,GAAE,WAAwB,EAC/B,OAAO,GAAE;IACP,iGAAiG;IACjG,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,YAAY,CAAC;CACzD,GACL,IAAI,CAqGN"}
|
package/dist/node/worker.js
DELETED
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
import { createTransportSwitch, remoteTransport, serveTransport } from '../network/remote-transport.js';
|
|
2
|
-
import { didOf } from '../identity/did.js';
|
|
3
|
-
import { isRecord } from '../utils/guards.js';
|
|
4
|
-
import { createNode } from './node.js';
|
|
5
|
-
import { remoteNode, remoteSigner, serveNode, serveSigner } from './remote.js';
|
|
6
|
-
import { workerStores, writerKeysFor } from './stores.js';
|
|
7
|
-
/** What of a network config reaches the worker: plain data, never transports */
|
|
8
|
-
export function workerNetwork(network) {
|
|
9
|
-
return {
|
|
10
|
-
...(network.relays ? { relays: network.relays } : {}),
|
|
11
|
-
...(network.nodes ? { nodes: network.nodes } : {}),
|
|
12
|
-
...(network.hosts ? { hosts: network.hosts } : {}),
|
|
13
|
-
...(network.iceServers ? { iceServers: network.iceServers } : {}),
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
const TAG = 'minca-worker';
|
|
17
|
-
/** The name of the error when a worker never said the node started: it failed to load, or took too long */
|
|
18
|
-
export const WORKER_NOT_STARTED = 'WorkerNotStarted';
|
|
19
|
-
/** The lock a tab holds while it uses a node, so the worker learns when the tab is gone */
|
|
20
|
-
const tabLock = (tab) => `minca-node-tab:${tab}`;
|
|
21
|
-
/** Web Locks, where this runtime has them */
|
|
22
|
-
function locks() {
|
|
23
|
-
return globalThis.navigator?.locks ?? null;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Starts a node in `worker`, or joins the one it already runs for the same
|
|
27
|
-
* account and stores (a `SharedWorker`), and returns it, used from here.
|
|
28
|
-
* Closing it lets go of it from this tab: the signer and connections kept
|
|
29
|
-
* here stop, a dedicated worker ends, and a shared node closes once no tab
|
|
30
|
-
* uses it.
|
|
31
|
-
*
|
|
32
|
-
* @param worker Running `runNodeWorker`, as `@minca/core/node-worker` does
|
|
33
|
-
* @param config.signer Who the node acts for; its key stays on this side
|
|
34
|
-
* @param startTimeoutMs How long to wait for the worker to say the node started. Default 30 s.
|
|
35
|
-
* @throws When the worker could not start the node, with its reason, or said nothing in time
|
|
36
|
-
*/
|
|
37
|
-
export async function startNodeInWorker(worker, config, startTimeoutMs = 30_000) {
|
|
38
|
-
const { signer, ...sent } = config;
|
|
39
|
-
const tab = globalThis.crypto.randomUUID();
|
|
40
|
-
const nodes = new MessageChannel();
|
|
41
|
-
const signing = new MessageChannel();
|
|
42
|
-
const connections = new MessageChannel();
|
|
43
|
-
const stopSigner = serveSigner(signer, signing.port1);
|
|
44
|
-
const stopConnections = serveTransport(connections.port1);
|
|
45
|
-
const letGo = await holdTabLock(tab);
|
|
46
|
-
const stop = () => {
|
|
47
|
-
stopSigner();
|
|
48
|
-
stopConnections();
|
|
49
|
-
for (const port of [nodes.port1, signing.port1, connections.port1])
|
|
50
|
-
port.close();
|
|
51
|
-
letGo();
|
|
52
|
-
worker.terminate?.();
|
|
53
|
-
};
|
|
54
|
-
const started = startedOn(nodes.port1, worker, startTimeoutMs);
|
|
55
|
-
worker.postMessage({ [TAG]: true, kind: 'start', tab, config: sent }, [
|
|
56
|
-
nodes.port2,
|
|
57
|
-
signing.port2,
|
|
58
|
-
connections.port2,
|
|
59
|
-
]);
|
|
60
|
-
try {
|
|
61
|
-
await started;
|
|
62
|
-
const node = await remoteNode(nodes.port1);
|
|
63
|
-
return Object.freeze({
|
|
64
|
-
...node,
|
|
65
|
-
async close() {
|
|
66
|
-
try {
|
|
67
|
-
await node.close();
|
|
68
|
-
}
|
|
69
|
-
finally {
|
|
70
|
-
stop();
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
catch (error) {
|
|
76
|
-
stop();
|
|
77
|
-
throw error;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
/** Holds this tab's lock until the returned function lets go, so the worker learns when the tab is gone */
|
|
81
|
-
async function holdTabLock(tab) {
|
|
82
|
-
let letGo = () => { };
|
|
83
|
-
await new Promise((granted) => {
|
|
84
|
-
const held = locks();
|
|
85
|
-
if (!held)
|
|
86
|
-
return granted();
|
|
87
|
-
held
|
|
88
|
-
.request(tabLock(tab), () => {
|
|
89
|
-
granted();
|
|
90
|
-
return new Promise((resolve) => {
|
|
91
|
-
letGo = resolve;
|
|
92
|
-
});
|
|
93
|
-
})
|
|
94
|
-
// Taken from this tab (`steal`): the worker has let go of it already.
|
|
95
|
-
.catch(() => { });
|
|
96
|
-
});
|
|
97
|
-
return () => letGo();
|
|
98
|
-
}
|
|
99
|
-
/** Settles once the worker says whether the node started; a worker that never loads says nothing, so it times out */
|
|
100
|
-
function startedOn(port, worker, timeoutMs) {
|
|
101
|
-
return new Promise((resolve, reject) => {
|
|
102
|
-
const done = () => {
|
|
103
|
-
globalThis.clearTimeout(timer);
|
|
104
|
-
port.removeEventListener('message', onMessage);
|
|
105
|
-
};
|
|
106
|
-
const giveUp = () => {
|
|
107
|
-
done();
|
|
108
|
-
const error = new Error('The node’s worker did not start.');
|
|
109
|
-
error.name = WORKER_NOT_STARTED;
|
|
110
|
-
reject(error);
|
|
111
|
-
};
|
|
112
|
-
const onMessage = (event) => {
|
|
113
|
-
const message = event.data;
|
|
114
|
-
if (!isRecord(message) || message[TAG] !== true)
|
|
115
|
-
return;
|
|
116
|
-
done();
|
|
117
|
-
if (message.ok === true)
|
|
118
|
-
resolve();
|
|
119
|
-
else
|
|
120
|
-
reject(new Error(typeof message.error === 'string' ? message.error : 'The node could not start'));
|
|
121
|
-
};
|
|
122
|
-
const timer = globalThis.setTimeout(giveUp, timeoutMs);
|
|
123
|
-
worker.addEventListener?.('error', giveUp);
|
|
124
|
-
port.addEventListener('message', onMessage);
|
|
125
|
-
port.start();
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
/** A signer made of every tab's: the newest first, since an app's newest tab holds its freshest grant */
|
|
129
|
-
function createSignerSwitch(did) {
|
|
130
|
-
const signers = new Map();
|
|
131
|
-
const signer = Object.freeze({
|
|
132
|
-
did,
|
|
133
|
-
async delegate(params) {
|
|
134
|
-
let refused = new Error('No tab is open to sign with');
|
|
135
|
-
for (const each of [...signers.values()].reverse()) {
|
|
136
|
-
try {
|
|
137
|
-
return await each.delegate(params);
|
|
138
|
-
}
|
|
139
|
-
catch (error) {
|
|
140
|
-
refused = error;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
throw refused;
|
|
144
|
-
},
|
|
145
|
-
});
|
|
146
|
-
return {
|
|
147
|
-
signer,
|
|
148
|
-
add: (tab, added) => void signers.set(tab, added),
|
|
149
|
-
remove: (tab) => void signers.delete(tab),
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
/** The same account's same stores: what makes two tabs' nodes one */
|
|
153
|
-
function nodeKey(did, stores, sessionDid) {
|
|
154
|
-
// An app's tabs share a node only while they sign with one key: a tab connected again with a new one gets its own.
|
|
155
|
-
const signs = sessionDid ? ` key:${sessionDid}` : '';
|
|
156
|
-
return 'indexedDB' in stores
|
|
157
|
-
? `${did}${signs} idb:${stores.indexedDB}`
|
|
158
|
-
: `${did}${signs} folder:${stores.basePath ?? ''}`;
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Starts a page's node: in `worker` when one is given, or here. The stores
|
|
162
|
-
* are described so a worker can open them; `stores` replaces them here only.
|
|
163
|
-
*/
|
|
164
|
-
export async function startPageNode(config, options = {}) {
|
|
165
|
-
if (options.worker && options.stores)
|
|
166
|
-
throw new Error('A node in a worker opens its own stores: pass worker or stores, not both');
|
|
167
|
-
const { network, stores, ...shared } = config;
|
|
168
|
-
return options.worker
|
|
169
|
-
? startNodeInWorker(options.worker(), {
|
|
170
|
-
...shared,
|
|
171
|
-
stores,
|
|
172
|
-
...(network ? { network: workerNetwork(network) } : {}),
|
|
173
|
-
})
|
|
174
|
-
: createNode({
|
|
175
|
-
...shared,
|
|
176
|
-
stores: options.stores ?? workerStores(stores),
|
|
177
|
-
...withWriterKey(stores),
|
|
178
|
-
...(network ? { network } : {}),
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
/** The account's lasting writer key, kept in this origin beside its stores, when it names an account */
|
|
182
|
-
function withWriterKey(stores) {
|
|
183
|
-
const writerKey = writerKeysFor(stores);
|
|
184
|
-
return writerKey ? { writerKey } : {};
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* In a worker: starts a node when a page asks (`startNodeInWorker`), or lets
|
|
188
|
-
* the page share the one already running for the same account and stores,
|
|
189
|
-
* and serves it until the last page using it lets go. In a `SharedWorker`
|
|
190
|
-
* each page arrives by `connect`.
|
|
191
|
-
*/
|
|
192
|
-
export function runNodeWorker(scope = globalThis, options = {}) {
|
|
193
|
-
const openStores = options.openStores ?? workerStores;
|
|
194
|
-
const held = new Map();
|
|
195
|
-
async function attach(tab, sent, ports) {
|
|
196
|
-
const [nodePort, signerPort, transportPort] = ports;
|
|
197
|
-
if (!nodePort || !signerPort || !transportPort)
|
|
198
|
-
return;
|
|
199
|
-
let entry;
|
|
200
|
-
try {
|
|
201
|
-
if (!isWorkerNodeConfig(sent))
|
|
202
|
-
throw new Error('The page sent no node config');
|
|
203
|
-
const signer = await remoteSigner(signerPort);
|
|
204
|
-
const sessionDid = sent.sessionKey ? await didOf(sent.sessionKey.publicKey) : undefined;
|
|
205
|
-
const key = nodeKey(signer.did, sent.stores, sessionDid);
|
|
206
|
-
entry = held.get(key) ?? start(key, sent, signer);
|
|
207
|
-
const own = entry;
|
|
208
|
-
own.signers.add(tab, signer);
|
|
209
|
-
own.connections.add(tab, remoteTransport(transportPort, own.iceServers));
|
|
210
|
-
own.tabs.set(tab, () => { });
|
|
211
|
-
const node = await own.node;
|
|
212
|
-
const detach = () => detachTab(key, own, tab);
|
|
213
|
-
// Said before serving, so it reaches the page ahead of any reply.
|
|
214
|
-
nodePort.postMessage({ [TAG]: true, ok: true });
|
|
215
|
-
// This tab's view: closing it lets go of the node, which others may still use.
|
|
216
|
-
own.tabs.set(tab, serveNode(Object.freeze({ ...node, close: detach }), nodePort));
|
|
217
|
-
// The tab is gone when its lock comes free: nobody is left to answer on its ports.
|
|
218
|
-
void locks()
|
|
219
|
-
?.request(tabLock(tab), async () => {
|
|
220
|
-
await detach();
|
|
221
|
-
for (const port of ports)
|
|
222
|
-
port.close();
|
|
223
|
-
})
|
|
224
|
-
.catch(() => { });
|
|
225
|
-
}
|
|
226
|
-
catch (error) {
|
|
227
|
-
if (entry)
|
|
228
|
-
forgetTab(entry, tab);
|
|
229
|
-
const reason = error instanceof Error ? error.message : String(error);
|
|
230
|
-
nodePort.postMessage({ [TAG]: true, ok: false, error: reason });
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
/** Lets go of the node for one tab; the last tab out closes it */
|
|
234
|
-
async function detachTab(key, entry, tab) {
|
|
235
|
-
const stopServing = entry.tabs.get(tab);
|
|
236
|
-
if (!stopServing)
|
|
237
|
-
return;
|
|
238
|
-
forgetTab(entry, tab);
|
|
239
|
-
stopServing();
|
|
240
|
-
if (entry.tabs.size > 0)
|
|
241
|
-
return;
|
|
242
|
-
held.delete(key);
|
|
243
|
-
await (await entry.node).close();
|
|
244
|
-
}
|
|
245
|
-
function start(key, config, signer) {
|
|
246
|
-
const { stores, network, ...rest } = config;
|
|
247
|
-
const signers = createSignerSwitch(signer.did);
|
|
248
|
-
const connections = createTransportSwitch();
|
|
249
|
-
let meshIce = () => [];
|
|
250
|
-
const entry = {
|
|
251
|
-
signers,
|
|
252
|
-
connections,
|
|
253
|
-
iceServers: () => meshIce(),
|
|
254
|
-
tabs: new Map(),
|
|
255
|
-
node: createNode({
|
|
256
|
-
...rest,
|
|
257
|
-
signer: signers.signer,
|
|
258
|
-
stores: openStores(stores),
|
|
259
|
-
...withWriterKey(stores),
|
|
260
|
-
...(network
|
|
261
|
-
? {
|
|
262
|
-
network: {
|
|
263
|
-
...network,
|
|
264
|
-
createTransport: (iceServers) => {
|
|
265
|
-
meshIce = iceServers;
|
|
266
|
-
return connections.transport;
|
|
267
|
-
},
|
|
268
|
-
},
|
|
269
|
-
}
|
|
270
|
-
: {}),
|
|
271
|
-
}),
|
|
272
|
-
};
|
|
273
|
-
held.set(key, entry);
|
|
274
|
-
// A node that fails to start is forgotten, so the next tab tries again.
|
|
275
|
-
entry.node.catch(() => {
|
|
276
|
-
if (held.get(key) === entry)
|
|
277
|
-
held.delete(key);
|
|
278
|
-
});
|
|
279
|
-
return entry;
|
|
280
|
-
}
|
|
281
|
-
const listen = (port) => port.addEventListener('message', (event) => {
|
|
282
|
-
const message = event.data;
|
|
283
|
-
if (!isRecord(message) || message[TAG] !== true || message.kind !== 'start')
|
|
284
|
-
return;
|
|
285
|
-
const tab = typeof message.tab === 'string' ? message.tab : globalThis.crypto.randomUUID();
|
|
286
|
-
void attach(tab, message.config, event.ports);
|
|
287
|
-
});
|
|
288
|
-
// A shared worker hears from each page on a port of its own; a dedicated one, on its scope.
|
|
289
|
-
scope.addEventListener('connect', (event) => {
|
|
290
|
-
for (const port of event.ports) {
|
|
291
|
-
listen(port);
|
|
292
|
-
port.start();
|
|
293
|
-
}
|
|
294
|
-
});
|
|
295
|
-
listen(scope);
|
|
296
|
-
}
|
|
297
|
-
function forgetTab(entry, tab) {
|
|
298
|
-
entry.tabs.delete(tab);
|
|
299
|
-
entry.signers.remove(tab);
|
|
300
|
-
entry.connections.remove(tab);
|
|
301
|
-
}
|
|
302
|
-
function isWorkerNodeConfig(value) {
|
|
303
|
-
return isRecord(value) && isRecord(value.stores);
|
|
304
|
-
}
|
|
305
|
-
//# sourceMappingURL=worker.js.map
|
package/dist/node/worker.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../src/node/worker.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACxG,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,aAAa,EAAwC,MAAM,aAAa,CAAC;AAehG,gFAAgF;AAChF,MAAM,UAAU,aAAa,CAAC,OAA0B;IACtD,OAAO;QACL,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrD,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAClD,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAClD,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,UAA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CAAC;AAED,SAAS,SAAS,CAAC,KAAW,EAAE,GAAW;IACzC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACvB,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAc;IACxC,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC"}
|
package/dist/node-worker.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-worker.d.ts","sourceRoot":"","sources":["../src/node-worker.ts"],"names":[],"mappings":""}
|
package/dist/node-worker.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A worker script that runs a browser node: the page starts one with
|
|
3
|
-
* `startNodeInWorker`, or with `worker` in `createMincaAuth` and
|
|
4
|
-
* `createMincaConnection`. A bundler needs a file of the app's own to point
|
|
5
|
-
* `new Worker` at, holding just this import:
|
|
6
|
-
*
|
|
7
|
-
* ```ts
|
|
8
|
-
* // minca-worker.ts
|
|
9
|
-
* import '@minca/core/node-worker';
|
|
10
|
-
* // the app
|
|
11
|
-
* const worker = () => new Worker(new URL('./minca-worker.ts', import.meta.url), { type: 'module' });
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
import { runNodeWorker } from './node/worker.js';
|
|
15
|
-
runNodeWorker();
|
|
16
|
-
//# sourceMappingURL=node-worker.js.map
|
package/dist/node-worker.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-worker.js","sourceRoot":"","sources":["../src/node-worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,aAAa,EAAE,CAAC"}
|