@jskit-ai/agent-docs 0.1.396 → 0.1.398

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.
Files changed (89) hide show
  1. package/guide/agent/app-extras/assistant-conversation.md +1 -2
  2. package/guide/agent/app-extras/assistant.md +171 -20
  3. package/guide/agent/app-extras/mobile-capacitor.md +110 -4
  4. package/guide/agent/app-extras/push-notifications.md +149 -0
  5. package/guide/agent/app-extras/realtime.md +11 -0
  6. package/guide/agent/app-setup/authentication.md +93 -1
  7. package/guide/agent/framework/client-features.md +65 -0
  8. package/guide/agent/framework/test-pass.md +3 -1
  9. package/guide/agent/framework/typed-features.md +12 -0
  10. package/guide/agent/index.md +1 -0
  11. package/guide/agent/recipes/file-uploads-and-images.md +24 -1
  12. package/guide/agent/recipes/installable-app.md +76 -82
  13. package/guide/agent/recipes/payments-and-subscriptions.md +30 -1
  14. package/package.json +1 -1
  15. package/patterns/feature-package/example/booking-engine/package.json +1 -1
  16. package/patterns/minimal-foundation/example/config/public.js +9 -1
  17. package/patterns/minimal-foundation/example/package.json +3 -3
  18. package/patterns/shell-foundation/example/config/public.js +9 -1
  19. package/patterns/shell-foundation/example/package.json +4 -4
  20. package/patterns/shell-foundation/example/packages/main/package.json +1 -1
  21. package/reference/autogen/PATTERN_INDEX.md +106 -40
  22. package/reference/autogen/README.md +4 -0
  23. package/reference/autogen/packages/assistant-core.md +4 -2
  24. package/reference/autogen/packages/assistant-runtime.md +14 -3
  25. package/reference/autogen/packages/auth-core.md +33 -0
  26. package/reference/autogen/packages/auth-provider-local-core.md +35 -2
  27. package/reference/autogen/packages/auth-provider-local-db-core.md +4 -0
  28. package/reference/autogen/packages/auth-web.md +42 -5
  29. package/reference/autogen/packages/http-runtime.md +9 -1
  30. package/reference/autogen/packages/http-web.md +36 -0
  31. package/reference/autogen/packages/mobile-capacitor.md +121 -5
  32. package/reference/autogen/packages/payments-core.md +2 -0
  33. package/reference/autogen/packages/push-core.md +128 -0
  34. package/reference/autogen/packages/push-web.md +99 -0
  35. package/reference/autogen/packages/realtime.md +6 -3
  36. package/reference/autogen/packages/store-purchases-core.md +113 -0
  37. package/reference/autogen/packages/store-purchases-web.md +55 -0
  38. package/reference/autogen/packages/uploads-image-web.md +2 -1
  39. package/reference/autogen/packages/uploads-runtime.md +21 -1
  40. package/reference/autogen/tooling/jskit-catalog.md +23 -1
  41. package/reference/autogen/tooling/jskit-release.md +4 -1
  42. package/skills/jskit/references/client-features.md +65 -0
  43. package/skills/jskit/references/pattern-index.md +106 -40
  44. package/skills/jskit/references/patterns/app/minimal-foundation/example/config/public.js +9 -1
  45. package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +3 -3
  46. package/skills/jskit/references/patterns/app/shell-foundation/example/config/public.js +9 -1
  47. package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +4 -4
  48. package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
  49. package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +3 -3
  50. package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
  51. package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
  52. package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +5 -5
  53. package/skills/jskit/references/patterns/crud/crud-feature-package/example/packages/books/package.json +3 -3
  54. package/skills/jskit/references/patterns/database/mysql-application/example/package.json +2 -2
  55. package/skills/jskit/references/patterns/database/postgres-application/example/package.json +2 -2
  56. package/skills/jskit/references/patterns/mobile/android-app-actions/PATTERN.md +78 -0
  57. package/skills/jskit/references/patterns/mobile/android-app-actions/example/android/app/src/main/java/com/example/app/SummaryWidget.kt +33 -0
  58. package/skills/jskit/references/patterns/mobile/android-app-actions/example/android/app/src/main/res/layout/summary_widget.xml +17 -0
  59. package/skills/jskit/references/patterns/mobile/android-app-actions/example/android/app/src/main/res/xml/shortcuts.xml +16 -0
  60. package/skills/jskit/references/patterns/mobile/android-app-actions/example/android/app/src/main/res/xml/summary_widget_info.xml +8 -0
  61. package/skills/jskit/references/patterns/mobile/android-application/PATTERN.md +45 -2
  62. package/skills/jskit/references/patterns/mobile/android-application/example/android/app/src/main/AndroidManifest.xml +65 -0
  63. package/skills/jskit/references/patterns/mobile/android-application/example/src/placement.js +19 -0
  64. package/skills/jskit/references/patterns/mobile/ios-app-intents/PATTERN.md +55 -0
  65. package/skills/jskit/references/patterns/mobile/ios-app-intents/example/ios/App/App/Intents/ExampleShortcuts.swift +9 -0
  66. package/skills/jskit/references/patterns/mobile/ios-app-intents/example/ios/App/App/Intents/UnreadCountIntent.swift +33 -0
  67. package/skills/jskit/references/patterns/mobile/ios-application/PATTERN.md +169 -0
  68. package/skills/jskit/references/patterns/mobile/ios-application/example/capacitor.config.json +10 -0
  69. package/skills/jskit/references/patterns/mobile/ios-application/example/ios/App/App/App.entitlements +12 -0
  70. package/skills/jskit/references/patterns/mobile/ios-application/example/ios/App/App/App.swift +20 -0
  71. package/skills/jskit/references/patterns/mobile/ios-application/example/ios/App/App/Info.plist +63 -0
  72. package/skills/jskit/references/patterns/mobile/ios-application/example/package.json +15 -0
  73. package/skills/jskit/references/patterns/mobile/ios-application/example/src/placement.js +19 -0
  74. package/skills/jskit/references/patterns/mobile/ios-live-activity/PATTERN.md +73 -0
  75. package/skills/jskit/references/patterns/mobile/ios-live-activity/example/ios/App/LiveActivities/LiveActivitiesBundle.swift +13 -0
  76. package/skills/jskit/references/patterns/mobile/ios-live-activity/example/src/deliveryActivity.js +33 -0
  77. package/skills/jskit/references/patterns/mobile/ios-share-extension/PATTERN.md +83 -0
  78. package/skills/jskit/references/patterns/mobile/ios-share-extension/example/ios/App/ShareExtension/Info.plist +31 -0
  79. package/skills/jskit/references/patterns/mobile/ios-share-extension/example/ios/App/ShareExtension/ShareExtension.entitlements +10 -0
  80. package/skills/jskit/references/patterns/mobile/ios-share-extension/example/ios/App/ShareExtension/ShareViewController.swift +94 -0
  81. package/skills/jskit/references/patterns/mobile/ios-widget/PATTERN.md +66 -0
  82. package/skills/jskit/references/patterns/mobile/ios-widget/example/ios/App/SummaryWidget/SummaryWidget.swift +64 -0
  83. package/skills/jskit/references/patterns/mobile/ios-widget/example/src/widgetSummary.js +10 -0
  84. package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
  85. package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
  86. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +3 -3
  87. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +6 -6
  88. package/skills/jskit/references/test-pass.md +3 -1
  89. package/skills/jskit/references/typed-features.md +12 -0
@@ -0,0 +1,128 @@
1
+ # packages/push-core
2
+
3
+ Generated by `npm run agent-docs:build`.
4
+ Do not edit manually.
5
+
6
+ Generated inventory for `packages/push-core`.
7
+ Use this on demand; do not load the full index at startup.
8
+
9
+ ## Scope
10
+ - Source: `packages/push-core/**/*{.js,.mjs,.cjs,.vue}`
11
+ - Excludes: `.build/`, `.git/`, `.jscpd/`, `.jskit/`, `coverage/`, `dist/`, `docs/`, `node_modules/`, `test/`, `tests/`, `__tests__/`, `.vitepress/cache/`, `.vitepress/dist/`, `skills/jskit/references/patterns/`, `*.test.*`, `*.spec.*`, `*.vitest.*`
12
+
13
+ ## Sections
14
+
15
+ ### src
16
+
17
+ ### `src/server/deviceRegistry.js`
18
+ Exports
19
+ - `createDeviceRegistry({ pushDevices })`
20
+ - `deviceTokenHash(kind, token)`
21
+
22
+ ### `src/server/inputSchemas.js`
23
+ Exports
24
+ - `forgetDeviceInput`
25
+ - `overviewInput`
26
+ - `registerDeviceInput`
27
+ - `removeDeviceInput`
28
+ - `updateSettingsInput`
29
+
30
+ ### `src/server/pushActions.js`
31
+ Exports
32
+ - `ACTION_FORGET_DEVICE`
33
+ - `ACTION_READ_PUSH`
34
+ - `ACTION_REGISTER_DEVICE`
35
+ - `ACTION_REMOVE_DEVICE`
36
+ - `ACTION_UPDATE_SETTINGS`
37
+ - `createPushActions({ push })`
38
+
39
+ ### `src/server/PushFeature.js`
40
+ Exports
41
+ - `PushFeature`
42
+
43
+ ### `src/server/pushRoutes.js`
44
+ Exports
45
+ - `PUSH_PATHS`
46
+ - `registerPushRoutes(router)`
47
+
48
+ ### `src/server/pushSenders.js`
49
+ Exports
50
+ - `createPushSenders({ env, fetchImpl, now })`
51
+ Local functions
52
+ - `settingsOf(env, kind)`
53
+
54
+ ### `src/server/pushService.js`
55
+ Exports
56
+ - `createPush({ devices, settings, senders, vapidPublicKey, environment, logger, systemOptions, now, close })`
57
+ Local functions
58
+ - `deviceOf(device)`
59
+ - `messageFor({ kind, title, body, url, data, actions, badge, group, category, channel }, own)`
60
+ - `validTimeZone(timeZone)`
61
+
62
+ ### `src/server/pushSettings.js`
63
+ Exports
64
+ - `DEFAULT_SETTINGS`
65
+ - `createPushSettings({ pushSettings })`
66
+ - `inQuietHours(settings, at)`
67
+ - `settingsOf(row)`
68
+
69
+ ### `src/server/senders/apns.js`
70
+ Exports
71
+ - `createApnsSender({ credentials, transport, now })`
72
+ - `createHttp2Transport()`
73
+ Local functions
74
+ - `apnsPayload(message)`
75
+ - `readReason(body)`
76
+
77
+ ### `src/server/senders/fcm.js`
78
+ Exports
79
+ - `createFcmSender({ serviceAccount, fetchImpl, now })`
80
+ Local functions
81
+ - `fcmMessage(token, message)`
82
+ - `readStatus(response)`
83
+
84
+ ### `src/server/senders/outcomes.js`
85
+ Exports
86
+ - `GONE`
87
+ - `SENT`
88
+ - `failed(reason)`
89
+ - `throttled(retryAfter, now)`
90
+
91
+ ### `src/server/senders/webPush.js`
92
+ Exports
93
+ - `createWebPushSender({ vapid, fetchImpl, now })`
94
+ - `isPushServiceEndpoint(endpoint)`
95
+ Local functions
96
+ - `topicOf(group)`
97
+
98
+ ### `src/server/types.js`
99
+ Exports
100
+ - `type Push`
101
+ - `type PushNotification`
102
+ - `type PushMessage`
103
+ - `type PushSender`
104
+ - `type PushSenders`
105
+ - `type PushDeviceInput`
106
+ - `type PushSettingsInput`
107
+
108
+ ### `src/shared/pushKinds.js`
109
+ Exports
110
+ - `APNS_ENVIRONMENTS`
111
+ - `PUSH_DEVICES_PER_USER`
112
+ - `PUSH_DEVICE_KINDS`
113
+ - `PUSH_KIND_PATTERN`
114
+
115
+ ### `src/shared/pushResources.js`
116
+ Exports
117
+ - `pushDeviceResource`
118
+ - `pushSettingsResource`
119
+
120
+ ### migrations
121
+
122
+ ### `migrations/push_devices_initial.cjs`
123
+ Exports
124
+ - None
125
+
126
+ ### `migrations/push_settings_initial.cjs`
127
+ Exports
128
+ - None
@@ -0,0 +1,99 @@
1
+ # packages/push-web
2
+
3
+ Generated by `npm run agent-docs:build`.
4
+ Do not edit manually.
5
+
6
+ Generated inventory for `packages/push-web`.
7
+ Use this on demand; do not load the full index at startup.
8
+
9
+ ## Scope
10
+ - Source: `packages/push-web/**/*{.js,.mjs,.cjs,.vue}`
11
+ - Excludes: `.build/`, `.git/`, `.jscpd/`, `.jskit/`, `coverage/`, `dist/`, `docs/`, `node_modules/`, `test/`, `tests/`, `__tests__/`, `.vitepress/cache/`, `.vitepress/dist/`, `skills/jskit/references/patterns/`, `*.test.*`, `*.spec.*`, `*.vitest.*`
12
+
13
+ ## Sections
14
+
15
+ ### src
16
+
17
+ ### `src/client/components/PushSettingsSection.vue`
18
+ Exports
19
+ - None
20
+ Local functions
21
+ - `request(path, options)`
22
+ - `deviceLabel(device)`
23
+ - `formBody()`
24
+ - `showSettings(settings)`
25
+ - `load()`
26
+ - `toggleDevice(on)`
27
+ - `setKind(id, on)`
28
+ - `save()`
29
+ - `removeDevice(id)`
30
+
31
+ ### `src/client/i18n.js`
32
+ Exports
33
+ - `createTextError`
34
+ - `useJskitText`
35
+
36
+ ### `src/client/index.js`
37
+ Exports
38
+ - `PushClientProvider`
39
+ - `usePushClient`
40
+ - `NO_PUSH_DEVICE`
41
+ - `createNativePushDevice`
42
+ - `createWebPushDevice`
43
+
44
+ ### `src/client/native/pushDevice.js`
45
+ Exports
46
+ - `NO_PUSH_DEVICE`
47
+ - `PUSH_NOTIFICATIONS`
48
+ - `createNativePushDevice({ plugin, platform, settings, storage })`
49
+ - `createWebPushDevice({ navigator, notification, storage, serviceWorker })`
50
+ - `type PushDevice`
51
+ Local functions
52
+ - `storedDevice(storage)`
53
+ - `parseData(data)`
54
+ - `keyBytes(publicKey)`
55
+ - `sameBytes(left, right)`
56
+
57
+ ### `src/client/notificationRouting.js`
58
+ Exports
59
+ - `routeNotificationTaps({ device, router, handlers, logger })`
60
+
61
+ ### `src/client/PushClientProvider.js`
62
+ Exports
63
+ - `PushClientProvider`
64
+ - `createPushClient({ mobile, router, logger })`
65
+ - `usePushClient()`
66
+ - `type PushClient`
67
+ Local functions
68
+ - `pushConfig()`
69
+
70
+ ### `src/client/pushRegistration.js`
71
+ Exports
72
+ - `createPushRegistration({ device, request, label })`
73
+
74
+ ### `src/client/serviceWorker/jskit-sw.js`
75
+ Exports
76
+ - None
77
+ Local functions
78
+ - `onInstall()`
79
+ - `onActivate(event)`
80
+ - `onPush(event)`
81
+ - `ownPage(url)`
82
+ - `onNotificationClick(event)`
83
+
84
+ ### `src/client/types.js`
85
+ Exports
86
+ - `type PushClient`
87
+ - `type PushDeviceRegistration`
88
+ - `type PushTap`
89
+ - `type PushNotificationsPlugin`
90
+ - `type PushMobile`
91
+
92
+ ### `src/server/PushWebFeature.js`
93
+ Exports
94
+ - `PushWebFeature`
95
+
96
+ ### `src/server/serviceWorkerRoutes.js`
97
+ Exports
98
+ - `SERVICE_WORKER_PATH`
99
+ - `registerServiceWorkerRoutes(router)`
@@ -45,6 +45,7 @@ Exports
45
45
  - `resolveRealtimeClientConfig({ env = {}, mobile = null } = {})`
46
46
  Local functions
47
47
  - `skipReconnectPreparation()`
48
+ - `noHandshakeAuth()`
48
49
  - `createRealtimeClient({ config, logger: appLogger })`
49
50
  - `trackServedClientBuild(socket, logger)`
50
51
 
@@ -71,7 +72,7 @@ Exports
71
72
  - `createSocketRequest(socket)`
72
73
  - `realtimeAuthenticationRequired(authService)`
73
74
  - `revalidateSocket({ socket, authService, audiences, request, authenticateRequest, reuseHeld = false })`
74
- - `registerSocketAudienceBootstrap({ io, logger, authService, audiences })`
75
+ - `registerSocketAudienceBootstrap({ io, logger, authService, audiences, takeTicket })`
75
76
  - `resolveAudienceTargets(audience, event, { logger, audienceScope })`
76
77
  - `type AuthService`
77
78
  - `type RuntimeLogger`
@@ -95,10 +96,12 @@ Local functions
95
96
  - `parseCookieHeader(value = "")`
96
97
  - `authenticateWithoutRefresh(authService)`
97
98
  - `resolveSocketAuthentication(authService, socket, request = createSocketRequest(socket), authenticateRequest = authenticateWithoutRefresh(authService))`
99
+ - `ticketInvalidError()`
100
+ - `takeHandshakeTicket(socket, takeTicket)`
98
101
  - `sessionRefreshRequiredError()`
99
102
  - `rememberSocketActorId(socket, actorId)`
100
103
  - `holdUntilLoginEnds(socket, actor, holdSocket, logger)`
101
- - `registerSocketAuthentication({ io, logger, authService })`
104
+ - `registerSocketAuthentication({ io, logger, authService, takeTicket })`
102
105
  - `joinContributedRooms(socket, actorId, audiences)`
103
106
 
104
107
  ### `src/server/RealtimeAudienceScopeFeature.js`
@@ -110,7 +113,7 @@ Local functions
110
113
 
111
114
  ### `src/server/realtimeCapability.js`
112
115
  Exports
113
- - `createRealtimeCapability({ io, logger, authService, events, appRoot, audienceScope, redis })`
116
+ - `createRealtimeCapability({ io, logger, authService, events, appRoot, audienceScope, redis, takeTicket })`
114
117
  - `type AuthService`
115
118
  - `type RuntimeAppRoot`
116
119
  - `type RuntimeEvents`
@@ -0,0 +1,113 @@
1
+ # packages/store-purchases-core
2
+
3
+ Generated by `npm run agent-docs:build`.
4
+ Do not edit manually.
5
+
6
+ Generated inventory for `packages/store-purchases-core`.
7
+ Use this on demand; do not load the full index at startup.
8
+
9
+ ## Scope
10
+ - Source: `packages/store-purchases-core/**/*{.js,.mjs,.cjs,.vue}`
11
+ - Excludes: `.build/`, `.git/`, `.jscpd/`, `.jskit/`, `coverage/`, `dist/`, `docs/`, `node_modules/`, `test/`, `tests/`, `__tests__/`, `.vitepress/cache/`, `.vitepress/dist/`, `skills/jskit/references/patterns/`, `*.test.*`, `*.spec.*`, `*.vitest.*`
12
+
13
+ ## Sections
14
+
15
+ ### src
16
+
17
+ ### `src/server/apple/appleStore.js`
18
+ Exports
19
+ - `createAppleStore({ settings, rootCertificates = APPLE_ROOT_CERTIFICATES, onlineChecks, apiClient })`
20
+ Local functions
21
+ - `peekPayload(jws)`
22
+ - `purchaseOf(transaction)`
23
+
24
+ ### `src/server/google/playStore.js`
25
+ Exports
26
+ - `createPlayStore({ settings, fetchImpl, now, verifyPushToken })`
27
+ - `tokenHash(token)`
28
+ Local functions
29
+ - `epoch(value)`
30
+
31
+ ### `src/server/inputSchemas.js`
32
+ Exports
33
+ - `appleTransactionInput`
34
+ - `createIntentInput`
35
+ - `googlePurchaseInput`
36
+ - `productsInput`
37
+ - `reconcileInput`
38
+
39
+ ### `src/server/ledger.js`
40
+ Exports
41
+ - `createStoreLedger({ storePurchaseLedger, storePurchaseIntents })`
42
+
43
+ ### `src/server/reconcile.js`
44
+ Exports
45
+ - `matchApple(totals, rows, reportName)`
46
+ - `matchGoogle(orders, rows, reportName)`
47
+ - `parseAppleFinancial(text)`
48
+ - `parseGoogleEarnings(text)`
49
+ Local functions
50
+ - `toMilli(value)`
51
+ - `csvFields(line)`
52
+ - `table(text, split)`
53
+
54
+ ### `src/server/storePurchases.js`
55
+ Exports
56
+ - `STORE_PURCHASE_EVENTS`
57
+ - `createStorePurchases({ ledger, catalogue, billing, apple, google, appEnv, events, logger, systemOptions, now })`
58
+
59
+ ### `src/server/storePurchasesActions.js`
60
+ Exports
61
+ - `ACTION_CONFIRM_APPLE`
62
+ - `ACTION_CONFIRM_GOOGLE`
63
+ - `ACTION_CREATE_INTENT`
64
+ - `ACTION_LIST_PRODUCTS`
65
+ - `ACTION_RECONCILE`
66
+ - `createStorePurchasesActions({ storePurchases })`
67
+
68
+ ### `src/server/StorePurchasesFeature.js`
69
+ Exports
70
+ - `StorePurchasesFeature`
71
+ Local functions
72
+ - `storesFromSettings(settings, appEnv)`
73
+
74
+ ### `src/server/storePurchasesRoutes.js`
75
+ Exports
76
+ - `STORE_PURCHASE_PATHS`
77
+ - `registerStoreNotificationRoutes(router, { storePurchases })`
78
+ - `registerStorePurchaseRoutes(router)`
79
+
80
+ ### `src/server/storeSettings.js`
81
+ Exports
82
+ - `readStoreSettings(env)`
83
+ Local functions
84
+ - `valuesOf(env, store)`
85
+
86
+ ### `src/server/types.js`
87
+ Exports
88
+ - `type StorePurchases`
89
+ - `type StorePurchasesBilling`
90
+ - `type StoreClients`
91
+
92
+ ### `src/shared/storeProducts.js`
93
+ Exports
94
+ - `STORE_PRODUCT_KINDS`
95
+ - `STORE_SOURCES`
96
+ - `validateStoreProducts(document, paymentConfiguration)`
97
+ Local functions
98
+ - `problem(productId, message)`
99
+
100
+ ### `src/shared/storeResources.js`
101
+ Exports
102
+ - `storeIntentResource`
103
+ - `storeLedgerResource`
104
+
105
+ ### migrations
106
+
107
+ ### `migrations/store_purchases_intents.cjs`
108
+ Exports
109
+ - None
110
+
111
+ ### `migrations/store_purchases_ledger.cjs`
112
+ Exports
113
+ - None
@@ -0,0 +1,55 @@
1
+ # packages/store-purchases-web
2
+
3
+ Generated by `npm run agent-docs:build`.
4
+ Do not edit manually.
5
+
6
+ Generated inventory for `packages/store-purchases-web`.
7
+ Use this on demand; do not load the full index at startup.
8
+
9
+ ## Scope
10
+ - Source: `packages/store-purchases-web/**/*{.js,.mjs,.cjs,.vue}`
11
+ - Excludes: `.build/`, `.git/`, `.jscpd/`, `.jskit/`, `coverage/`, `dist/`, `docs/`, `node_modules/`, `test/`, `tests/`, `__tests__/`, `.vitepress/cache/`, `.vitepress/dist/`, `skills/jskit/references/patterns/`, `*.test.*`, `*.spec.*`, `*.vitest.*`
12
+
13
+ ## Sections
14
+
15
+ ### src
16
+
17
+ ### `src/client/i18n.js`
18
+ Exports
19
+ - `createTextError`
20
+
21
+ ### `src/client/index.js`
22
+ Exports
23
+ - `StorePurchasesClientProvider`
24
+ - `NO_STORE_DEVICE`
25
+ - `createStoreDevice`
26
+ - `useStoreProducts`
27
+
28
+ ### `src/client/native/storeDevice.js`
29
+ Exports
30
+ - `NATIVE_PURCHASES`
31
+ - `NO_STORE_DEVICE`
32
+ - `createStoreDevice({ plugin, platform })`
33
+ - `type StoreDevice`
34
+
35
+ ### `src/client/purchase.js`
36
+ Exports
37
+ - `createStorePurchase({ device, request })`
38
+
39
+ ### `src/client/StorePurchasesClientProvider.js`
40
+ Exports
41
+ - `StorePurchasesClientProvider`
42
+ - `createStorePurchasesClient({ mobile, logger })`
43
+
44
+ ### `src/client/types.js`
45
+ Exports
46
+ - `type StorePurchasesClient`
47
+ - `type StoreProduct`
48
+ - `type StoreOffer`
49
+ - `type StoreTransaction`
50
+ - `type NativePurchasesPlugin`
51
+ - `type StorePurchasesMobile`
52
+
53
+ ### `src/client/useStoreProducts.js`
54
+ Exports
55
+ - `useStoreProducts(storePurchases)`
@@ -16,7 +16,7 @@ Use this on demand; do not load the full index at startup.
16
16
 
17
17
  ### `src/client/composables/createImageUploadRuntime.js`
18
18
  Exports
19
- - `createImageUploadRuntime({ endpoint = "", method = "POST", fieldName = "file", withCredentials = true, maxNumberOfFiles = 1, allowedMimeTypes = DEFAULT_IMAGE_UPLOAD_ALLOWED_MIME_TYPES, maxUploadBytes = DEFAULT_IMAGE_UPLOAD_MAX_BYTES, note = "", dashboardOptions = {}, imageEditorOptions = {}, compressorOptions = {}, parseResponse = parseUploadResponse, resolveRequestHeaders, onSelectedFileNameChanged = ignoreUploadEvent, onUploadSuccess, onInvalidResponse = ignoreUploadEvent, onUploadError, onRestrictionFailed, onUnavailable = ignoreUploadEvent, dependencies: { UppyClass = Uppy, DashboardPlugin = Dashboard, ImageEditorPlugin = ImageEditor, CompressorPlugin = Compressor, XHRUploadPlugin = XHRUpload } = {} })`
19
+ - `createImageUploadRuntime({ endpoint = "", method = "POST", fieldName = "file", withCredentials = true, maxNumberOfFiles = 1, allowedMimeTypes = DEFAULT_IMAGE_UPLOAD_ALLOWED_MIME_TYPES, maxUploadBytes = DEFAULT_IMAGE_UPLOAD_MAX_BYTES, note = "", dashboardOptions = {}, imageEditorOptions = {}, compressorOptions = {}, parseResponse = parseUploadResponse, resolveRequestHeaders, onSelectedFileNameChanged = ignoreUploadEvent, onUploadSuccess, onInvalidResponse = ignoreUploadEvent, onUploadError, onRestrictionFailed, onUnavailable = ignoreUploadEvent, nativeSource = getNativeSource(), dependencies: { UppyClass = Uppy, DashboardPlugin = Dashboard, ImageEditorPlugin = ImageEditor, CompressorPlugin = Compressor, XHRUploadPlugin = XHRUpload } = {} })`
20
20
  Local functions
21
21
  - `ignoreUploadEvent()`
22
22
 
@@ -55,6 +55,7 @@ Exports
55
55
 
56
56
  ### `src/client/support/uppyPlugins.js`
57
57
  Exports
58
+ - `addNativeFiles(uppy, files)`
58
59
  - `closeDashboard(uppy)`
59
60
  - `stopImageEditor(uppy)`
60
61
 
@@ -16,7 +16,27 @@ Use this on demand; do not load the full index at startup.
16
16
 
17
17
  ### `src/client/index.js`
18
18
  Exports
19
- - None
19
+ - `NO_NATIVE_SOURCE`
20
+ - `configureNativeSource`
21
+ - `createNativeSource`
22
+ - `getNativeSource`
23
+ - `UploadsNativeSourceProvider`
24
+
25
+ ### `src/client/native/nativeSource.js`
26
+ Exports
27
+ - `NO_NATIVE_SOURCE`
28
+ - `configureNativeSource(source)`
29
+ - `createNativeSource({ plugins, fileUrl, fetchImpl, now })`
30
+ - `getNativeSource()`
31
+ - `type NativeSourceKind`
32
+ - `type NativeSource`
33
+ Local functions
34
+ - `cancelled(error)`
35
+ - `extensionOf(type)`
36
+
37
+ ### `src/client/UploadsNativeSourceProvider.js`
38
+ Exports
39
+ - `UploadsNativeSourceProvider`
20
40
 
21
41
  ### `src/server/multipart/readSingleMultipartFile.js`
22
42
  Exports
@@ -309,6 +309,18 @@ Local functions
309
309
  - `checkDarkScheme(projectRoot, checkedFiles, wholeApp)`
310
310
  - `formatFindings(result)`
311
311
 
312
+ ### `scripts/mobile-build.mjs`
313
+ Exports
314
+ - `buildMobile({ appRoot, build = runVite })`
315
+ - `runBuild(argv)`
316
+ Local functions
317
+ - `usage()`
318
+ - `parseBuildArgs(argv)`
319
+ - `readWebDir(appRoot)`
320
+ - `readApiBaseUrl(appRoot)`
321
+ - `runVite(appRoot, args)`
322
+ - `serviceWorkersIn(directory)`
323
+
312
324
  ### `scripts/navigation.mjs`
313
325
  Exports
314
326
  - `NAVIGATION_RULES`
@@ -475,6 +487,12 @@ Local functions
475
487
  - `fastifyNames(code)`
476
488
  - `fastifyCalls({ code, masked, position })`
477
489
 
490
+ ### `scripts/store-purchases.mjs`
491
+ Exports
492
+ - `runStorePurchases(argv, { env = process.env, fetchImpl = globalThis.fetch, write = (text) => process.stdout.write(text) } = {})`
493
+ Local functions
494
+ - `parseReconcileArgs(args)`
495
+
478
496
  ### `scripts/testing/budget.mjs`
479
497
  Exports
480
498
  - `BUDGET_VARIABLE`
@@ -485,6 +503,7 @@ Local functions
485
503
 
486
504
  ### `scripts/testing/command.mjs`
487
505
  Exports
506
+ - `testFilesOf(args, { cwd = process.cwd() } = {})`
488
507
  - `defaultTestFiles(cwd)`
489
508
  - `findTestFiles(patterns, cwd)`
490
509
  - `missedTestFiles(defaultFiles, cwd)`
@@ -680,7 +699,8 @@ Exports
680
699
  - `verifyInputs({ projectRoot, config, env, nodeVersion })`
681
700
  - `readPass(root, key)`
682
701
  - `writePass(root, pass)`
683
- - `runVerify({ projectRoot = process.cwd(), argv = [], env = process.env, nodeVersion = process.version, host = os.hostname(), runCheck = runProjectCheck, runPart = npmPart, print = (line) => process.stdout.write(`${line}\n`), now = Date.now } = {})`
702
+ - `runVerify({ projectRoot = process.cwd(), argv = [], env = process.env, nodeVersion = process.version, host = os.hostname(), runCheck = runProjectCheck, runPart = npmPart, listPart = listPartFiles, print = (line) => process.stdout.write(`${line}\n`), printError = (line) => process.stderr.write(`${line}\n`), now = Date.now } = {})`
703
+ - `listPartFiles({ projectRoot, script, command, files, env })`
684
704
  - `ciPassName({ tree, commits })`
685
705
  - `recordedCiPass({ name, repository, token, fetch = globalThis.fetch })`
686
706
  - `runVerifyPass({ projectRoot = process.cwd(), argv = [], env = process.env, fetch = globalThis.fetch, print = (line) => process.stdout.write(`${line}\n`) } = {})`
@@ -696,4 +716,6 @@ Local functions
696
716
  - `namedCheckouts({ projectRoot, config, env })`
697
717
  - `npmPart({ script, args, cwd, env })`
698
718
  - `passedAlready(pass, file, projectRoot)`
719
+ - `toPosix(file)`
720
+ - `listVerify({ projectRoot, config, words, env, listPart, print, printError })`
699
721
  - `parseCommits(argv)`
@@ -49,7 +49,8 @@ Local functions
49
49
 
50
50
  ### `src/npm-publication.mjs`
51
51
  Exports
52
- - `createPublicationInspection({ directory, registry, configPath = "", env = process.env })`
52
+ - `assertGitModes(tarball, spec)`
53
+ - `createPublicationInspection({ directory, registry, configPath = "", env = process.env, gitModes = false })`
53
54
  - `fileState(file)`
54
55
  - `inParallel(items, work, limit = REGISTRY_CONCURRENCY)`
55
56
  - `npmEnvironment(env = process.env)`
@@ -61,6 +62,8 @@ Local functions
61
62
  - `archiveContents(file)`
62
63
  - `archiveManifest(file)`
63
64
  - `runPackCommand(record, env)`
65
+ - `gitMode(mode)`
66
+ - `withGitModes(root)`
64
67
  - `listFiles(root, relative, names)`
65
68
  - `sameSnapshot(left, right)`
66
69
 
@@ -611,6 +611,71 @@ watch(() => query.data.value, (payload) => { form.prompt = payload.prompt; });
611
611
 
612
612
  ## Helpers and sizes
613
613
 
614
+ ### Server paths
615
+
616
+ **Every call and address on the app's own server goes through `http-web`: its
617
+ HTTP client for requests, and `serverUrl(path)` for anything else that names a
618
+ server path (a link, an image, a download).** On the web `serverUrl` returns the
619
+ path as it is; inside a Capacitor app, whose screens load from the app itself,
620
+ it joins the path to `config.mobile.apiBaseUrl`. It refuses a relative path and
621
+ another site's address.
622
+
623
+ Why: a bundled app's page is not on the server's site, so a bare `"/api/..."`
624
+ reaches nothing there, and only one resolver knows where the server is.
625
+
626
+ ```js
627
+ // good
628
+ import { serverUrl } from "@jskit-ai/http-web/client";
629
+ const href = serverUrl(`/api/invoices/${id}/pdf`);
630
+
631
+ // bad: works on the web, reaches nothing inside the app
632
+ const href = `/api/invoices/${id}/pdf`;
633
+ ```
634
+
635
+ ### Streams, sockets and signed links
636
+
637
+ **What cannot send the page's credentials signs in another way, through
638
+ `http-web`: `openEventStream(path)` and `openWebSocket(path)` for a stream,
639
+ `signedUrl(path, { ttl })` for an address, and `frameUrl(path)` for a frame.**
640
+ An `EventSource`, a `WebSocket`, an `<img>`, a download and an `<iframe>` send
641
+ no `Authorization` header, and inside a Capacitor app no cookie either.
642
+
643
+ - `openEventStream(path)` and `openWebSocket(path)` ask `POST
644
+ /api/session/ticket` for a ticket (purpose `events` or `socket`: single use,
645
+ 30 seconds, carrying the page's credentials, an app's token or the browser's
646
+ cookies), connect to `serverUrl(path)` with it in `jskit_ticket`, and keep
647
+ the connection open: a dropped one reconnects with a fresh ticket after a
648
+ delay that doubles up to 30 seconds, at once when the page comes back (an
649
+ app's resume, a tab shown again, the network back). Each answers `on(event,
650
+ handler)`, whose listeners stay across reconnections and which returns the
651
+ function that stops, `connection` (the open one, or null), and `close()`;
652
+ the socket's `send(data)` answers false while it reconnects. Signed out, a
653
+ stream goes without a ticket, as a public one does. Tickets live in the
654
+ server's process, so a deployment of several servers routes a stream to the
655
+ server that issued its ticket (sticky routing).
656
+ - `signedUrl(path, { ttl })` asks `POST /api/session/link` for a link to that
657
+ server path, signed (HMAC) for this session and user: 5 minutes, at most an
658
+ hour (`ttl` in seconds). It opens that path alone, by GET, and only while the
659
+ session lives; the server checks it before the route's own authorization.
660
+ - `frameUrl(path)` is the signed link for a frame showing one of the server's
661
+ pages: it starts the frame's own session, in cookies a frame inside another
662
+ site's page keeps (`SameSite=None`, `Secure`, `Partitioned`), lasting no
663
+ longer than the session that asked, then goes on to `path`.
664
+
665
+ Why: a token in an address is in every log that keeps the address; a ticket is
666
+ spent the moment it is used, and a signed link opens one path for minutes.
667
+
668
+ ```js
669
+ // good
670
+ import { openEventStream, signedUrl } from "@jskit-ai/http-web/client";
671
+ const stream = openEventStream(`/api/imports/${id}/events`);
672
+ const stop = stream.on("message", (event) => progress.push(JSON.parse(event.data)));
673
+ const src = await signedUrl(`/api/photos/${id}`);
674
+
675
+ // bad: signs in on the web only, and its retry never gets a new ticket
676
+ const source = new EventSource(`/api/imports/${id}/events`);
677
+ ```
678
+
614
679
  ### One helper per package
615
680
 
616
681
  **A pure helper exists once in a package and is imported; one the kernel owns