create-disposabl-app 0.20.22 → 0.20.24
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 -0
- package/dist/disposabl.js +1 -1
- package/dist/index.js +1 -1
- package/dist/templates/default/AGENTS.md +3 -0
- package/dist/templates/default/apps/docs/content/publishing/apple.mdx +1 -1
- package/dist/templates/default/apps/docs/content/publishing/google-play.mdx +1 -1
- package/dist/templates/default/package.json +1 -0
- package/dist/templates/default/packages/disposabl-kit/client/lib/convex-client.ts +26 -0
- package/dist/templates/default/packages/disposabl-kit/client/routes/route.tsx +3 -2
- package/dist/templates/default/packages/skill/SKILL.md +2 -0
- package/dist/templates/default/packages/tests/convex-web-prerender.test.ts +34 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,6 +101,8 @@ bunx --package create-disposabl-app disposabl previews token create --configure
|
|
|
101
101
|
|
|
102
102
|
Push the generated initial commit to `main` before opening feature pull requests. A same-repository pull request to `main` starts a CI preview; changes pushed to `main` start the production workflow. A feature branch push by itself does not deploy. Desktop installers build only on pushes to `main`, when their inputs change; PRs retain web and mobile previews. Build and delivery requirements depend on the selected platforms.
|
|
103
103
|
|
|
104
|
+
Before pushing implementation commits, run `bun run check:preview` from a clean checkout of the intended commit with the app's development web URLs configured. It runs the pipeline checks and a production web build locally. When you change Convex functions or schemas, run `bun run dev` to regenerate the bindings and commit the changes under `packages/backend/convex/_generated` with the source.
|
|
105
|
+
|
|
104
106
|
See the [coding-agent guide](https://github.com/disposabl-dev/create-disposabl-app/blob/main/packages/skill/SKILL.md) for the full delivery workflow, or [report a problem](https://github.com/disposabl-dev/create-disposabl-app/issues).
|
|
105
107
|
|
|
106
108
|
Set `features` to include `faster-ci` in `disposabl.json` to use Blacksmith runners (the GitHub App must be installed). The initial selection job remains GitHub-hosted so it can read the configuration.
|
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.24";
|
|
1567
1567
|
|
|
1568
1568
|
// ../cli/telemetry.ts
|
|
1569
1569
|
var import_proper_lockfile2 = __toESM(require_proper_lockfile(), 1);
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
- Run `bun run test` for the platforms selected in `disposabl.json`. Backend checks always apply; API checks only apply when the API platform is selected. Use `--target` for an explicitly scoped run and report which platforms were tested.
|
|
11
11
|
- Use deterministic locators and assertions by default. No E2E login, model subscription, or API key is required. Coding agents should extend the flows when application behavior changes.
|
|
12
12
|
- Build and verify locally when the toolchain is available. Do not push or start GitHub Actions merely to test a change. Mobile tests need a locally built and installed app plus a simulator/emulator; a successful compilation is not behavioral proof.
|
|
13
|
+
- Before pushing app code for a preview, run `bun run check:preview` with the app's development web environment from a clean checkout of the commit you plan to push. This also runs the production web build and prerenders public routes.
|
|
14
|
+
- After changes to Convex functions or schemas, let the app's development backend regenerate `packages/backend/convex/_generated` and commit those changes with the source.
|
|
15
|
+
- Use the starter's Convex provider in web routes. Start separate realtime clients or subscriptions after browser hydration to keep public route prerendering independent of live connections.
|
|
13
16
|
- Run checks against the app's development or isolated preview backend. Never copy another app's credentials or seed production data. Report missing infrastructure and failed tests rather than silently skipping required platforms.
|
|
14
17
|
- E2E telemetry is disabled by the provided commands. Leave it disabled until it follows Disposabl's telemetry preference.
|
|
15
18
|
- PostHog analytics is production-only; do not enable it for local development or E2E runs.
|
|
@@ -7,6 +7,6 @@ description: Build, test, and submit an iOS release.
|
|
|
7
7
|
2. **Build and upload.** Build a signed production iOS binary with EAS and upload it to App Store Connect. Upload success is not approval. Wait for [Apple processing](https://developer.apple.com/help/app-store-connect/manage-builds/upload-builds/), resolve export-compliance questions accurately, and select the processed build for the correct version.
|
|
8
8
|
3. **Test the installed build.** Install through TestFlight or an appropriate signed distribution, then exercise login, the main flow, persistence, privacy controls, and account deletion. TestFlight purchases use Apple's sandbox. Verify the real transaction through the app, RevenueCat, and your billing balance before enabling production purchase readiness. Configure all products and the Paid Apps Agreement as needed; [Apple reviews in-app purchases in sandbox](https://developer.apple.com/help/app-review/before-submitting-for-review/configure-in-app-purchases/).
|
|
9
9
|
4. **Complete the listing and review details.** Use genuine screenshots from the relevant Apple devices and accurate descriptions, privacy information, support and privacy URLs. Provide the dedicated Apple review account and clear steps to the main features. Include external services and other details Apple needs. Keep the account usable throughout review.
|
|
10
|
-
5. **Submit and follow the status.** Associate the correct build with the version,
|
|
10
|
+
5. **Submit and follow the status.** Associate the correct build with the version. For the first purchase of each type, add the app version and purchase to the same draft submission; include a new subscription group with its subscription too. Check the draft contains every intended item, then submit it and monitor App Review. See [Apple's purchase submission instructions](https://developer.apple.com/help/app-store-connect/manage-submissions-to-app-review/submit-an-in-app-purchase/). [Selecting a build](https://developer.apple.com/help/app-store-connect/manage-builds/choose-a-build-to-submit/) and uploading it are separate from submitting it for review and releasing it. Choose automatic release after approval or complete the manual release step.
|
|
11
11
|
|
|
12
12
|
See [review access and updates](/publishing) for shared preparation. A compatible EAS Update can update JavaScript and assets, but it cannot replace a new signed binary when native capabilities change.
|
|
@@ -5,7 +5,7 @@ description: Sign, test, and submit an Android release.
|
|
|
5
5
|
|
|
6
6
|
1. **Keep the same signing identity.** Confirm the package name and increase the version code. Build a release Android App Bundle with the correct upload key. A debug APK proves neither release signing nor upgrade continuity. With Play App Signing, Google uses the app signing key for distributed installs; the upload key signs the bundle you send to Play. Preserve the upload keystore and its recovery process. See [Android app signing](https://developer.android.com/studio/publish/app-signing).
|
|
7
7
|
2. **Check the right fingerprint.** In Play Console's App Integrity page, distinguish the upload certificate from the app signing certificate and compare the complete fingerprint and algorithm. Google Android OAuth clients commonly require the app signing certificate's **SHA-1**; other registration flows may request **SHA-256**. Neither fingerprint is a substitute for the other. See [Google's client authentication guide](https://developers.google.com/android/guides/client-auth).
|
|
8
|
-
3. **Upload and test.** Upload the signed bundle to a suitable Play testing track and install the Play-delivered build on a device. EAS can build a bundle without a Play service account. If automated submission is not configured, download the verified bundle and upload it manually in Play Console. A successful EAS build or upload is not a Play review decision.
|
|
8
|
+
3. **Upload and test.** Upload the signed bundle to a suitable Play testing track and install the Play-delivered build on a device. EAS can build a bundle without a Play service account. If automated submission is not configured, download the verified bundle and upload it manually in Play Console. Configure [license testers](https://developer.android.com/google/play/billing/test) for genuine test purchases and verify credit or entitlement delivery. Test-track users who are not license testers can incur real charges. A successful EAS build or upload is not a Play review decision.
|
|
9
9
|
4. **Complete review access and declarations.** Provide a dedicated Google review account that works without the reviewer's own provider accounts, personal payment, or an inaccessible one-time code. Test its complete flow and credits first. Complete the Data safety form, privacy policy, and app access instructions from the actual release. If users can create accounts, provide both the in-app deletion path and an accessible [web deletion request link](https://support.google.com/googleplay/android-developer/answer/13327111), including any retained-data exceptions. Give users a way to report offensive AI-generated content when applicable.
|
|
10
10
|
5. **Submit and follow the status.** Verify the intended track, release notes, device screenshots, content declarations, and signing details. Submit in Play Console and follow the release through review and publication; a testing-track upload alone does not mean the production release is live.
|
|
11
11
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"private": true,
|
|
4
4
|
"scripts": {
|
|
5
5
|
"check": "bun fmt --check && bun run generate && turbo run typecheck lint && bun fmt --check",
|
|
6
|
+
"check:preview": "bun install --frozen-lockfile && bun run check && bun run build --filter=@disposabl/web",
|
|
6
7
|
"hooks:install": ".githooks/install",
|
|
7
8
|
"test": "bun run --cwd packages/tests test",
|
|
8
9
|
"test:unit": "bun run --cwd packages/tests test:unit",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ConnectionState } from "convex/browser";
|
|
2
|
+
import { ConvexReactClient } from "convex/react";
|
|
3
|
+
|
|
4
|
+
const disconnected: ConnectionState = {
|
|
5
|
+
hasInflightRequests: false,
|
|
6
|
+
isWebSocketConnected: false,
|
|
7
|
+
timeOfOldestInflightRequest: null,
|
|
8
|
+
hasEverConnected: false,
|
|
9
|
+
connectionCount: 0,
|
|
10
|
+
connectionRetries: 0,
|
|
11
|
+
inflightMutations: 0,
|
|
12
|
+
inflightActions: 0,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
class ServerConvexClient extends ConvexReactClient {
|
|
16
|
+
override connectionState(): ConnectionState {
|
|
17
|
+
// Reading the live state opens a WebSocket during static rendering.
|
|
18
|
+
return disconnected;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function createWebConvexClient(url: string): ConvexReactClient {
|
|
23
|
+
return typeof window === "undefined"
|
|
24
|
+
? new ServerConvexClient(url)
|
|
25
|
+
: new ConvexReactClient(url);
|
|
26
|
+
}
|
|
@@ -4,6 +4,7 @@ import { LegalFooter } from "../components/legal-page";
|
|
|
4
4
|
import { LogOut } from "../components/ui/log-out";
|
|
5
5
|
import { useContext, useState } from "react";
|
|
6
6
|
import { ThemeProvider } from "../lib/theme";
|
|
7
|
+
import { createWebConvexClient } from "../lib/convex-client";
|
|
7
8
|
import {
|
|
8
9
|
createFileRoute,
|
|
9
10
|
Outlet,
|
|
@@ -12,7 +13,7 @@ import {
|
|
|
12
13
|
import { ConvexAuthProvider, useAuthToken } from "@convex-dev/auth/react";
|
|
13
14
|
import {
|
|
14
15
|
ConvexProvider,
|
|
15
|
-
ConvexReactClient,
|
|
16
|
+
type ConvexReactClient,
|
|
16
17
|
useConvexAuth,
|
|
17
18
|
useQuery,
|
|
18
19
|
} from "convex/react";
|
|
@@ -33,7 +34,7 @@ function Providers() {
|
|
|
33
34
|
const url = import.meta.env.VITE_CONVEX_URL;
|
|
34
35
|
if (!url)
|
|
35
36
|
throw new Error("Set VITE_CONVEX_URL to your Convex deployment URL");
|
|
36
|
-
return
|
|
37
|
+
return createWebConvexClient(url);
|
|
37
38
|
});
|
|
38
39
|
|
|
39
40
|
return (
|
|
@@ -65,6 +65,8 @@ Use the host's worktree and delegation tools when required. Keep tokens in ignor
|
|
|
65
65
|
|
|
66
66
|
Before generating the product, write a concise `APP_BRIEF.md` with its purpose, selected platforms and intended user flow. Commit that real change, push the feature branch, and open its PR. Keep the starter usable while the selected native builds from the initial `main` push run in parallel with generation.
|
|
67
67
|
|
|
68
|
+
Before pushing implementation commits to that PR, regenerate and commit Convex bindings when backend functions or schemas change. Run `bun run check:preview` in a clean local checkout of the intended commit with the app's development web URLs. This runs the pipeline's checks and production web build before CI starts.
|
|
69
|
+
|
|
68
70
|
An installer from `main` receives production updates, not PR preview updates. After the generated app passes review and its selected-platform checks, merge through the authorized delivery workflow to publish the production update. Compatible Android JavaScript and asset changes use EAS Update; native dependency or configuration changes need a new binary. Desktop delivery needs its configured native update feed. Do not report that an update reached an installed app until that behavior is verified.
|
|
69
71
|
|
|
70
72
|
## Preview updates every two minutes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ConvexProvider, useConvexConnectionState } from "convex/react";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { test } from "node:test";
|
|
4
|
+
import { createElement } from "react";
|
|
5
|
+
import { renderToStaticMarkup } from "react-dom/server";
|
|
6
|
+
import { createWebConvexClient } from "../disposabl-kit/client/lib/convex-client";
|
|
7
|
+
|
|
8
|
+
test("prerendering the Convex connection state leaves the WebSocket unopened", () => {
|
|
9
|
+
const webSocket = globalThis.WebSocket;
|
|
10
|
+
globalThis.WebSocket = new Proxy(webSocket, {
|
|
11
|
+
construct() {
|
|
12
|
+
throw new Error("Prerendering opened a WebSocket");
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
function PickupStatus() {
|
|
18
|
+
const { isWebSocketConnected } = useConvexConnectionState();
|
|
19
|
+
return createElement(
|
|
20
|
+
"p",
|
|
21
|
+
null,
|
|
22
|
+
isWebSocketConnected ? "Live" : "Loading",
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const client = createWebConvexClient("https://starter-check.convex.cloud");
|
|
27
|
+
const html = renderToStaticMarkup(
|
|
28
|
+
createElement(ConvexProvider, { client }, createElement(PickupStatus)),
|
|
29
|
+
);
|
|
30
|
+
assert.equal(html, "<p>Loading</p>");
|
|
31
|
+
} finally {
|
|
32
|
+
globalThis.WebSocket = webSocket;
|
|
33
|
+
}
|
|
34
|
+
});
|