@base44-preview/sdk 0.8.46-pr.272.2f95f82 → 0.8.46-pr.272.cea651e
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/dist/actor.d.ts +1 -1
- package/dist/actor.js +1 -1
- package/dist/client.js +1 -1
- package/dist/modules/actors.d.ts +1 -1
- package/dist/modules/actors.js +1 -1
- package/dist/modules/actors.types.d.ts +2 -2
- package/dist/modules/analytics.js +1 -1
- package/dist/modules/connectors.types.d.ts +3 -3
- package/package.json +1 -1
package/dist/actor.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export declare abstract class Actor<Incoming = unknown, Outgoing = unknown> {
|
|
|
51
51
|
abstract handleTick(): void | Promise<void>;
|
|
52
52
|
/**
|
|
53
53
|
* Optional wake hook: runs once when the instance starts, before any
|
|
54
|
-
* connection is handled.
|
|
54
|
+
* connection is handled. It is safe to load persisted state here.
|
|
55
55
|
*/
|
|
56
56
|
handleStart(): void | Promise<void>;
|
|
57
57
|
/**
|
package/dist/actor.js
CHANGED
|
@@ -39,7 +39,7 @@ export class Actor {
|
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Optional wake hook: runs once when the instance starts, before any
|
|
42
|
-
* connection is handled.
|
|
42
|
+
* connection is handled. It is safe to load persisted state here.
|
|
43
43
|
*/
|
|
44
44
|
handleStart() { }
|
|
45
45
|
/**
|
package/dist/client.js
CHANGED
|
@@ -113,7 +113,7 @@ export function createClient(config) {
|
|
|
113
113
|
});
|
|
114
114
|
// Dedicated client for actor connection-token mints: no onError (a legacy
|
|
115
115
|
// actor answers every mint with an expected 409 before the proxy fallback,
|
|
116
|
-
// which must not reach the app's error handler
|
|
116
|
+
// which must not reach the app's error handler; the actors module forwards
|
|
117
117
|
// genuine failures itself via onMintError) and no constructor token
|
|
118
118
|
// (auth is per-request so a login/logout is picked up on every reconnect).
|
|
119
119
|
const actorsAxiosClient = createAxiosClient({
|
package/dist/modules/actors.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ interface ActorsConfig {
|
|
|
35
35
|
* The legacy platform-proxy URL, byte-for-byte what PartySocket built before
|
|
36
36
|
* the direct path existed: same scheme swap (including its localhost-needs-a-
|
|
37
37
|
* port quirk), case-preserved party segment, `_pk` first in the query. The
|
|
38
|
-
* `handler` param is load-bearing
|
|
38
|
+
* `handler` param is load-bearing. The proxy reads it for the actor name.
|
|
39
39
|
*/
|
|
40
40
|
export declare function buildProxyActorUrl(rawHost: string, actorName: string, instanceId: string, connectionId: string, appId: string, token: string | null | undefined, functionsVersion?: string): string;
|
|
41
41
|
/**
|
package/dist/modules/actors.js
CHANGED
|
@@ -172,7 +172,7 @@ function makeActorRef(actorName, instanceId, config, connections) {
|
|
|
172
172
|
* The legacy platform-proxy URL, byte-for-byte what PartySocket built before
|
|
173
173
|
* the direct path existed: same scheme swap (including its localhost-needs-a-
|
|
174
174
|
* port quirk), case-preserved party segment, `_pk` first in the query. The
|
|
175
|
-
* `handler` param is load-bearing
|
|
175
|
+
* `handler` param is load-bearing. The proxy reads it for the actor name.
|
|
176
176
|
*/
|
|
177
177
|
export function buildProxyActorUrl(rawHost, actorName, instanceId, connectionId, appId, token, functionsVersion) {
|
|
178
178
|
let host = rawHost.replace(/^(http|https|ws|wss):\/\//, "");
|
|
@@ -35,7 +35,7 @@ type ToServerFor<N extends string> = N extends keyof ActorRegistry ? ActorRegist
|
|
|
35
35
|
/** Options for {@link ActorRef.connect}. */
|
|
36
36
|
export interface ActorConnectOptions {
|
|
37
37
|
/**
|
|
38
|
-
* The connection id,
|
|
38
|
+
* The connection id, used as the actor's `conn.id`. Supply a stable value
|
|
39
39
|
* (e.g. persisted per tab) so a reconnect reuses the same server-side
|
|
40
40
|
* identity; omit for an auto-generated per-connection id.
|
|
41
41
|
*/
|
|
@@ -62,7 +62,7 @@ export interface Connection<N extends string = string> {
|
|
|
62
62
|
/**
|
|
63
63
|
* Tear down the socket, heartbeat, and all listeners. Safe to call more
|
|
64
64
|
* than once. A connection also closes itself when it fails permanently.
|
|
65
|
-
*
|
|
65
|
+
* See {@link ActorRef.connect}.
|
|
66
66
|
*/
|
|
67
67
|
close(): void;
|
|
68
68
|
}
|
|
@@ -255,7 +255,7 @@ async function getSessionContext(userAuthModule) {
|
|
|
255
255
|
// With no token there is no identity to resolve: `me()` can only answer 401,
|
|
256
256
|
// which the browser logs to the console before any handler here sees it. On
|
|
257
257
|
// a public page that request is the sole reason an error appears, so skip
|
|
258
|
-
// it. This is not memoized
|
|
258
|
+
// it. This is not memoized. A visitor who logs in later must still resolve.
|
|
259
259
|
if (!userAuthModule.hasToken()) {
|
|
260
260
|
return { user_id: null, session_id: getAnalyticsSessionId() };
|
|
261
261
|
}
|
|
@@ -87,7 +87,7 @@ export interface ConnectorApiResponse<T = unknown> {
|
|
|
87
87
|
status: number | null;
|
|
88
88
|
/**
|
|
89
89
|
* The parsed upstream response body, or proxy error details when no response
|
|
90
|
-
* was received. `null` when the response was binary. See {@link dataBase64}.
|
|
90
|
+
* was received. It is `null` when the response was binary. See {@link dataBase64}.
|
|
91
91
|
*/
|
|
92
92
|
data: T | null;
|
|
93
93
|
/**
|
|
@@ -148,9 +148,9 @@ export interface ConnectorProxyRawResponse {
|
|
|
148
148
|
*
|
|
149
149
|
* ## Metered connectors
|
|
150
150
|
*
|
|
151
|
-
* A few [platform connectors](#shared-connectors) are backed by paid third-party APIs that charge Base44 per call. For those, the OAuth token is **not** available to your code, and {@linkcode getConnection | getConnection()} rejects with a `403`. Call them with {@linkcode callApi | callApi()} instead
|
|
151
|
+
* A few [platform connectors](#shared-connectors) are backed by paid third-party APIs that charge Base44 per call. For those, the OAuth token is **not** available to your code, and {@linkcode getConnection | getConnection()} rejects with a `403`. Call them with {@linkcode callApi | callApi()} instead. Base44 attaches the credential server-side, forwards the request, and bills your workspace's integration credits for the call.
|
|
152
152
|
*
|
|
153
|
-
* This applies to platform connectors only. A workspace-registered or app user connector runs on **your own** OAuth app, so the provider invoices you directly and there is nothing for Base44 to meter
|
|
153
|
+
* This applies to platform connectors only. A workspace-registered or app user connector runs on **your own** OAuth app, so the provider invoices you directly and there is nothing for Base44 to meter. Those keep normal token access via {@linkcode getWorkspaceConnection | getWorkspaceConnection()} and {@linkcode getCurrentAppUserConnection | getCurrentAppUserConnection()}.
|
|
154
154
|
*
|
|
155
155
|
* Two things to keep in mind when writing against a metered connector:
|
|
156
156
|
*
|