create-disposabl-app 0.20.6 → 0.20.7
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/disposabl.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1563,7 +1563,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
|
1563
1563
|
import { Command, CommanderError } from "commander";
|
|
1564
1564
|
import * as p2 from "@clack/prompts";
|
|
1565
1565
|
// package.json
|
|
1566
|
-
var version = "0.20.
|
|
1566
|
+
var version = "0.20.7";
|
|
1567
1567
|
|
|
1568
1568
|
// ../cli/telemetry.ts
|
|
1569
1569
|
var import_proper_lockfile2 = __toESM(require_proper_lockfile(), 1);
|
|
@@ -3,23 +3,17 @@
|
|
|
3
3
|
Generated with the pinned Hey API generator from `packages/backend/generated/openapi.json`.
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
|
-
import { client,
|
|
6
|
+
import { client, usersCurrent } from "@disposabl/sdk";
|
|
7
7
|
|
|
8
8
|
client.setConfig({
|
|
9
9
|
baseUrl: "https://your-deployment.convex.site",
|
|
10
10
|
auth: process.env.DISPOSABL_API_KEY,
|
|
11
11
|
throwOnError: true,
|
|
12
12
|
});
|
|
13
|
-
const { data:
|
|
14
|
-
body: { name: "My app", platforms: ["web", "api"] },
|
|
15
|
-
});
|
|
16
|
-
const { data: page } = await appsList({
|
|
17
|
-
query: { paginationOpts: { numItems: 20, cursor: null } },
|
|
18
|
-
});
|
|
19
|
-
const { data: app } = await appsGet({ query: { appId: created!.appId } });
|
|
13
|
+
const { data: user } = await usersCurrent();
|
|
20
14
|
```
|
|
21
15
|
|
|
22
|
-
|
|
16
|
+
With Authentication enabled, create API keys at `/dashboard/api-keys`. Keep server integration keys on the server. The API also accepts OAuth tokens issued through its MCP authorization server.
|
|
23
17
|
|
|
24
18
|
Run `bun run generate` in `packages/backend`, then `bun run generate` here to update the typed operations. Query parameters use JSON encoding. The backend refuses incompatible contract regeneration without `--accept-breaking`; review that diff before accepting a major contract version.
|
|
25
19
|
|
|
@@ -28,7 +22,7 @@ Run `bun run generate` in `packages/backend`, then `bun run generate` here to up
|
|
|
28
22
|
The SDK sends no analytics by itself. An application can explicitly wrap calls and forward the approved operation name and outcome to its own analytics project:
|
|
29
23
|
|
|
30
24
|
```ts
|
|
31
|
-
import {
|
|
25
|
+
import { usersCurrent, createSdkAnalytics } from "@disposabl/sdk";
|
|
32
26
|
|
|
33
27
|
const analytics = createSdkAnalytics({
|
|
34
28
|
enabled: true, // defaults to true; set false to opt out
|
|
@@ -37,7 +31,7 @@ const analytics = createSdkAnalytics({
|
|
|
37
31
|
posthog.capture("sdk_operation", { operation, outcome });
|
|
38
32
|
},
|
|
39
33
|
});
|
|
40
|
-
const result = await analytics.track("
|
|
34
|
+
const result = await analytics.track("usersCurrent", () => usersCurrent());
|
|
41
35
|
```
|
|
42
36
|
|
|
43
37
|
Supply your own initialized `posthog` (or another sink); the SDK includes no project key or transport. Set `e2e: true` for E2E builds; `E2E_TELEMETRY_DISABLED=1` also disables capture in Node. Capture failures are ignored. Use field-style responses (the default) or `throwOnError: true` so the wrapper can detect failures. The wrapper cannot detect errors hidden by `responseStyle: "data"`. Only wrapped calls emit events. These owner-configured events are separate from any Disposabl platform usage telemetry; avoid enabling PostHog autocapture or sending request content in the sink.
|