create-disposabl-app 0.6.8 → 0.7.1

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 (59) hide show
  1. package/dist/disposabl.js +32 -8
  2. package/dist/index.js +16 -6
  3. package/dist/templates/default/.github/scripts/mobile.sh +123 -0
  4. package/dist/templates/default/.github/scripts/release.sh +83 -0
  5. package/dist/templates/default/.github/workflows/pipeline.yml +22 -14
  6. package/dist/templates/default/AGENTS.md +2 -1
  7. package/dist/templates/default/apps/mobile/gitignore +43 -0
  8. package/dist/templates/default/apps/web/src/routeTree.gen.ts +23 -0
  9. package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.connections.tsx +354 -0
  10. package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.tsx +1 -0
  11. package/dist/templates/default/dev.ts +2 -1
  12. package/dist/templates/default/packages/backend/AGENTS.md +2 -1
  13. package/dist/templates/default/packages/backend/README.md +4 -2
  14. package/dist/templates/default/packages/backend/convex/_generated/api.d.ts +14 -0
  15. package/dist/templates/default/packages/backend/convex/_generated/server.d.ts +5 -5
  16. package/dist/templates/default/packages/backend/convex/apps/actions/create.ts +11 -13
  17. package/dist/templates/default/packages/backend/convex/apps/actions/setup.ts +21 -7
  18. package/dist/templates/default/packages/backend/convex/apps/internal.ts +1 -6
  19. package/dist/templates/default/packages/backend/convex/connections/actions/credentials.ts +56 -0
  20. package/dist/templates/default/packages/backend/convex/connections/actions/expo.ts +79 -0
  21. package/dist/templates/default/packages/backend/convex/connections/actions/github.ts +120 -0
  22. package/dist/templates/default/packages/backend/convex/connections/actions/oauth.ts +128 -0
  23. package/dist/templates/default/packages/backend/convex/connections/index.ts +80 -0
  24. package/dist/templates/default/packages/backend/convex/connections/internal.ts +148 -0
  25. package/dist/templates/default/packages/backend/convex/connections/validator.ts +35 -0
  26. package/dist/templates/default/packages/backend/convex/convex.config.ts +5 -5
  27. package/dist/templates/default/packages/backend/convex/github/actions/provision.ts +2 -6
  28. package/dist/templates/default/packages/backend/convex/github/actions/secrets.ts +25 -11
  29. package/dist/templates/default/packages/backend/convex/github/actions/tokens.ts +19 -15
  30. package/dist/templates/default/packages/backend/convex/github/internal.ts +6 -8
  31. package/dist/templates/default/packages/backend/convex/previews/token/actions/create.ts +4 -3
  32. package/dist/templates/default/packages/backend/convex/previews/token/internal.ts +28 -1
  33. package/dist/templates/default/packages/backend/convex/schema.ts +17 -1
  34. package/dist/templates/default/packages/backend/generated/openapi.json +123 -1
  35. package/dist/templates/default/packages/backend/generated/pages.json +4 -0
  36. package/dist/templates/default/packages/backend/generated/platforms.ts +12 -10
  37. package/dist/templates/default/packages/backend/gitignore +16 -0
  38. package/dist/templates/default/packages/cli/auth.ts +15 -17
  39. package/dist/templates/default/packages/cli/commands.ts +31 -1
  40. package/dist/templates/default/packages/disposabl-kit/client/components/logo.tsx +5 -0
  41. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/login.tsx +118 -84
  42. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/signUp.tsx +127 -89
  43. package/dist/templates/default/packages/disposabl-kit/client/routes/route.tsx +2 -5
  44. package/dist/templates/default/packages/sdk/src/generated/index.ts +5 -0
  45. package/dist/templates/default/packages/sdk/src/generated/sdk.gen.ts +20 -0
  46. package/dist/templates/default/packages/sdk/src/generated/types.gen.ts +53 -0
  47. package/package.json +1 -1
  48. package/dist/templates/default/.github/scripts/android-build.sh +0 -27
  49. package/dist/templates/default/.github/scripts/expo-channel.sh +0 -10
  50. package/dist/templates/default/.github/scripts/expo-env.sh +0 -37
  51. package/dist/templates/default/.github/scripts/expo-fingerprint.sh +0 -31
  52. package/dist/templates/default/.github/scripts/expo-update.sh +0 -13
  53. package/dist/templates/default/.github/scripts/package-release.sh +0 -23
  54. package/dist/templates/default/.github/scripts/release-publish.sh +0 -28
  55. package/dist/templates/default/.github/scripts/release-source.sh +0 -14
  56. package/dist/templates/default/.github/scripts/verify-artifacts.sh +0 -13
  57. package/dist/templates/default/.github/scripts/web-deploy.sh +0 -10
  58. package/dist/templates/default/apps/mobile/.env.example +0 -2
  59. package/dist/templates/default/apps/web/.env.example +0 -3
@@ -1,3 +1,19 @@
1
+ import { Logo } from "../../components/logo";
2
+ import { Button } from "../../components/ui/button";
3
+ import {
4
+ Card,
5
+ CardContent,
6
+ CardDescription,
7
+ CardHeader,
8
+ CardTitle,
9
+ } from "../../components/ui/card";
10
+ import {
11
+ Field,
12
+ FieldDescription,
13
+ FieldGroup,
14
+ FieldLabel,
15
+ } from "../../components/ui/field";
16
+ import { Input } from "../../components/ui/input";
1
17
  import { createFileRoute, Link, useNavigate } from "@tanstack/react-router";
2
18
  import { useSignInWithUsernamePassword } from "@convex-dev/auth/methods/username-password/react";
3
19
  import { api } from "../../../../backend/convex/_generated/api";
@@ -13,90 +29,108 @@ export function LogIn() {
13
29
  const [error, setError] = useState<string | null>(null);
14
30
 
15
31
  return (
16
- <>
17
- <form
18
- onSubmit={async (e) => {
19
- e.preventDefault();
20
- setError(null);
21
- const result = await signIn({ username, password });
22
- if (result.status === "complete") {
23
- if (request)
24
- await navigate({ to: "/consent", search: { request } });
25
- else window.location.assign(returnTo ?? "/dashboard");
26
- return;
27
- }
28
- setError(() => {
29
- switch (result.userError.error) {
30
- case "USER_NOT_FOUND":
31
- return "No account exists with that username.";
32
- case "INVALID_CREDENTIALS":
33
- return "Incorrect username or password.";
34
- case "PASSWORD_TOO_SHORT":
35
- return `Password must be at least ${result.userError.minimumLength} characters.`;
36
- case "PASSWORD_TOO_LONG":
37
- return `Password must be at most ${result.userError.maximumLength} characters.`;
38
- case "PASSWORD_HAS_SURROUNDING_WHITESPACE":
39
- return "Password can't start or end with whitespace.";
40
- case "RATE_LIMITED":
41
- return `Too many attempts. Try again in ${Math.ceil(result.userError.retryAfterMs / 1000)} seconds.`;
42
- case "OTHER_ERROR":
43
- // The mutation threw unexpectedly; the original error is
44
- // available on `cause` if you want to log or inspect it.
45
- console.error("Sign-in failed:", result.userError.cause);
46
- return "Something went wrong. Please try again.";
47
- default:
48
- result.userError satisfies never;
49
- console.error("Sign-in failed:", result.userError);
50
- return "Something went wrong. Please try again.";
51
- }
52
- });
53
- }}
54
- >
55
- <h1>Log in</h1>
56
- <label htmlFor="username">
57
- Username
58
- <input
59
- // Using a static id to help password managers behave correctly
60
- id="username"
61
- name="username"
62
- type="text"
63
- value={username}
64
- onChange={(e) => setUsername(e.target.value)}
65
- autoComplete="username"
66
- required
67
- disabled={pending}
68
- />
69
- </label>
70
- <label htmlFor="password">
71
- Password
72
- <input
73
- // Using a static id to help password managers behave correctly
74
- id="password"
75
- name="password"
76
- type="password"
77
- value={password}
78
- onChange={(e) => setPassword(e.target.value)}
79
- autoComplete="current-password"
80
- required
81
- disabled={pending}
82
- />
83
- </label>
84
- {error ? (
85
- <p role="alert">
86
- <strong>{error}</strong>
87
- </p>
88
- ) : null}
89
- <button type="submit" disabled={pending}>
90
- {pending ? "Logging in…" : "Log in"}
91
- </button>
92
- </form>
93
- <p>
94
- Don't have an account?{" "}
95
- <Link to="/signup" search={{ request, returnTo }}>
96
- Sign up
97
- </Link>
98
- </p>
99
- </>
32
+ <main className="flex min-h-[calc(100svh-73px)] flex-col items-center justify-center bg-muted p-6 md:p-10">
33
+ <div className="flex w-full max-w-sm flex-col gap-6">
34
+ <a href="/" className="self-center">
35
+ <Logo />
36
+ </a>
37
+ <Card>
38
+ <CardHeader className="text-center">
39
+ <CardTitle className="text-xl">Welcome back</CardTitle>
40
+ <CardDescription>
41
+ Enter your username and password to log in.
42
+ </CardDescription>
43
+ </CardHeader>
44
+ <CardContent>
45
+ <form
46
+ onSubmit={async (e) => {
47
+ e.preventDefault();
48
+ setError(null);
49
+ const result = await signIn({ username, password });
50
+ if (result.status === "complete") {
51
+ if (request)
52
+ await navigate({ to: "/consent", search: { request } });
53
+ else window.location.assign(returnTo ?? "/dashboard");
54
+ return;
55
+ }
56
+ setError(() => {
57
+ switch (result.userError.error) {
58
+ case "USER_NOT_FOUND":
59
+ return "No account exists with that username.";
60
+ case "INVALID_CREDENTIALS":
61
+ return "Incorrect username or password.";
62
+ case "PASSWORD_TOO_SHORT":
63
+ return `Password must be at least ${result.userError.minimumLength} characters.`;
64
+ case "PASSWORD_TOO_LONG":
65
+ return `Password must be at most ${result.userError.maximumLength} characters.`;
66
+ case "PASSWORD_HAS_SURROUNDING_WHITESPACE":
67
+ return "Password can't start or end with whitespace.";
68
+ case "RATE_LIMITED":
69
+ return `Too many attempts. Try again in ${Math.ceil(result.userError.retryAfterMs / 1000)} seconds.`;
70
+ case "OTHER_ERROR":
71
+ // The mutation threw unexpectedly; the original error is
72
+ // available on `cause` if you want to log or inspect it.
73
+ console.error("Sign-in failed:", result.userError.cause);
74
+ return "Something went wrong. Please try again.";
75
+ default:
76
+ result.userError satisfies never;
77
+ console.error("Sign-in failed:", result.userError);
78
+ return "Something went wrong. Please try again.";
79
+ }
80
+ });
81
+ }}
82
+ >
83
+ <FieldGroup>
84
+ <Field>
85
+ <FieldLabel htmlFor="username">Username</FieldLabel>
86
+ <Input
87
+ // Using a static id to help password managers behave correctly
88
+ id="username"
89
+ name="username"
90
+ type="text"
91
+ value={username}
92
+ onChange={(e) => setUsername(e.target.value)}
93
+ autoComplete="username"
94
+ required
95
+ disabled={pending}
96
+ />
97
+ </Field>
98
+ <Field>
99
+ <FieldLabel htmlFor="password">Password</FieldLabel>
100
+ <Input
101
+ // Using a static id to help password managers behave correctly
102
+ id="password"
103
+ name="password"
104
+ type="password"
105
+ value={password}
106
+ onChange={(e) => setPassword(e.target.value)}
107
+ autoComplete="current-password"
108
+ required
109
+ disabled={pending}
110
+ />
111
+ </Field>
112
+ {error ? (
113
+ <p role="alert" className="text-sm text-destructive">
114
+ <strong>{error}</strong>
115
+ </p>
116
+ ) : null}
117
+ <Field>
118
+ <Button type="submit" disabled={pending}>
119
+ {pending ? "Logging in…" : "Log in"}
120
+ </Button>
121
+ <FieldDescription className="text-center">
122
+ Don't have an account?{" "}
123
+ <Link to="/signup" search={{ request, returnTo }}>
124
+ Sign up
125
+ </Link>
126
+ </FieldDescription>
127
+ </Field>
128
+ </FieldGroup>
129
+ </form>
130
+ </CardContent>
131
+ </Card>
132
+ </div>
133
+ </main>
100
134
  );
101
135
  }
102
136
 
@@ -1,3 +1,19 @@
1
+ import { Logo } from "../../components/logo";
2
+ import { Button } from "../../components/ui/button";
3
+ import {
4
+ Card,
5
+ CardContent,
6
+ CardDescription,
7
+ CardHeader,
8
+ CardTitle,
9
+ } from "../../components/ui/card";
10
+ import {
11
+ Field,
12
+ FieldDescription,
13
+ FieldGroup,
14
+ FieldLabel,
15
+ } from "../../components/ui/field";
16
+ import { Input } from "../../components/ui/input";
1
17
  import { createFileRoute, Link, useNavigate } from "@tanstack/react-router";
2
18
  import { DEFAULT_MIN_PASSWORD_LENGTH } from "@convex-dev/auth/methods/username-password";
3
19
  import { useSignUpWithUsernamePassword } from "@convex-dev/auth/methods/username-password/react";
@@ -14,95 +30,117 @@ export function SignUp() {
14
30
  const [error, setError] = useState<string | null>(null);
15
31
 
16
32
  return (
17
- <>
18
- <form
19
- onSubmit={async (e) => {
20
- e.preventDefault();
21
- setError(null);
22
- const result = await signUp({ username, password });
23
- if (result.status === "complete") {
24
- if (request)
25
- await navigate({ to: "/consent", search: { request } });
26
- else window.location.assign(returnTo ?? "/dashboard");
27
- return;
28
- }
29
- setError(() => {
30
- switch (result.userError.error) {
31
- case "USERNAME_TAKEN":
32
- return "That username is already taken.";
33
- case "USERNAME_TOO_SHORT":
34
- return `Username must be at least ${result.userError.minimumLength} characters.`;
35
- case "USERNAME_HAS_SURROUNDING_WHITESPACE":
36
- return "Username can't start or end with whitespace.";
37
- case "USERNAME_HAS_INVALID_CHARACTERS":
38
- return "Username contains characters that aren't allowed.";
39
- case "PASSWORD_TOO_SHORT":
40
- return `Password must be at least ${result.userError.minimumLength} characters.`;
41
- case "PASSWORD_TOO_LONG":
42
- return `Password must be at most ${result.userError.maximumLength} characters.`;
43
- case "PASSWORD_HAS_SURROUNDING_WHITESPACE":
44
- return "Password can't start or end with whitespace.";
45
- case "PASSWORD_TOO_COMMON":
46
- return "This password is one of the most commonly used passwords. Please choose a different one.";
47
- case "OTHER_ERROR":
48
- // The mutation threw unexpectedly; the original error is
49
- // available on `cause` if you want to log or inspect it.
50
- console.error("Sign-up failed:", result.userError.cause);
51
- return "Something went wrong. Please try again.";
52
- default:
53
- result.userError satisfies never;
54
- console.error("Sign-up failed:", result.userError);
55
- return "Something went wrong. Please try again.";
56
- }
57
- });
58
- }}
59
- >
60
- <h1>Sign up</h1>
61
- <label htmlFor="username">
62
- Username
63
- <input
64
- // Using a static id to help password managers behave correctly
65
- id="username"
66
- name="username"
67
- type="text"
68
- value={username}
69
- onChange={(e) => setUsername(e.target.value)}
70
- autoComplete="username"
71
- required
72
- disabled={pending}
73
- />
74
- </label>
75
- <label htmlFor="password">
76
- Password
77
- <input
78
- // Using a static id to help password managers behave correctly
79
- id="password"
80
- name="password"
81
- type="password"
82
- value={password}
83
- onChange={(e) => setPassword(e.target.value)}
84
- autoComplete="new-password"
85
- minLength={DEFAULT_MIN_PASSWORD_LENGTH}
86
- required
87
- disabled={pending}
88
- />
89
- </label>
90
- {error ? (
91
- <p role="alert">
92
- <strong>{error}</strong>
93
- </p>
94
- ) : null}
95
- <button type="submit" disabled={pending}>
96
- {pending ? "Creating account…" : "Create account"}
97
- </button>
98
- </form>
99
- <p>
100
- Already have an account?{" "}
101
- <Link to="/login" search={{ request, returnTo }}>
102
- Log in
103
- </Link>
104
- </p>
105
- </>
33
+ <main className="flex min-h-[calc(100svh-73px)] flex-col items-center justify-center bg-muted p-6 md:p-10">
34
+ <div className="flex w-full max-w-sm flex-col gap-6">
35
+ <a href="/" className="self-center">
36
+ <Logo />
37
+ </a>
38
+ <Card>
39
+ <CardHeader className="text-center">
40
+ <CardTitle className="text-xl">Create your account</CardTitle>
41
+ <CardDescription>
42
+ Enter a username and password to create your account.
43
+ </CardDescription>
44
+ </CardHeader>
45
+ <CardContent>
46
+ <form
47
+ onSubmit={async (e) => {
48
+ e.preventDefault();
49
+ setError(null);
50
+ const result = await signUp({ username, password });
51
+ if (result.status === "complete") {
52
+ if (request)
53
+ await navigate({ to: "/consent", search: { request } });
54
+ else window.location.assign(returnTo ?? "/dashboard");
55
+ return;
56
+ }
57
+ setError(() => {
58
+ switch (result.userError.error) {
59
+ case "USERNAME_TAKEN":
60
+ return "That username is already taken.";
61
+ case "USERNAME_TOO_SHORT":
62
+ return `Username must be at least ${result.userError.minimumLength} characters.`;
63
+ case "USERNAME_HAS_SURROUNDING_WHITESPACE":
64
+ return "Username can't start or end with whitespace.";
65
+ case "USERNAME_HAS_INVALID_CHARACTERS":
66
+ return "Username contains characters that aren't allowed.";
67
+ case "PASSWORD_TOO_SHORT":
68
+ return `Password must be at least ${result.userError.minimumLength} characters.`;
69
+ case "PASSWORD_TOO_LONG":
70
+ return `Password must be at most ${result.userError.maximumLength} characters.`;
71
+ case "PASSWORD_HAS_SURROUNDING_WHITESPACE":
72
+ return "Password can't start or end with whitespace.";
73
+ case "PASSWORD_TOO_COMMON":
74
+ return "This password is one of the most commonly used passwords. Please choose a different one.";
75
+ case "OTHER_ERROR":
76
+ // The mutation threw unexpectedly; the original error is
77
+ // available on `cause` if you want to log or inspect it.
78
+ console.error("Sign-up failed:", result.userError.cause);
79
+ return "Something went wrong. Please try again.";
80
+ default:
81
+ result.userError satisfies never;
82
+ console.error("Sign-up failed:", result.userError);
83
+ return "Something went wrong. Please try again.";
84
+ }
85
+ });
86
+ }}
87
+ >
88
+ <FieldGroup>
89
+ <Field>
90
+ <FieldLabel htmlFor="username">Username</FieldLabel>
91
+ <Input
92
+ // Using a static id to help password managers behave correctly
93
+ id="username"
94
+ name="username"
95
+ type="text"
96
+ value={username}
97
+ onChange={(e) => setUsername(e.target.value)}
98
+ autoComplete="username"
99
+ required
100
+ disabled={pending}
101
+ />
102
+ </Field>
103
+ <Field>
104
+ <FieldLabel htmlFor="password">Password</FieldLabel>
105
+ <Input
106
+ // Using a static id to help password managers behave correctly
107
+ id="password"
108
+ name="password"
109
+ type="password"
110
+ value={password}
111
+ onChange={(e) => setPassword(e.target.value)}
112
+ autoComplete="new-password"
113
+ minLength={DEFAULT_MIN_PASSWORD_LENGTH}
114
+ required
115
+ disabled={pending}
116
+ />
117
+ <FieldDescription>
118
+ Must be at least {DEFAULT_MIN_PASSWORD_LENGTH} characters
119
+ long.
120
+ </FieldDescription>
121
+ </Field>
122
+ {error ? (
123
+ <p role="alert" className="text-sm text-destructive">
124
+ <strong>{error}</strong>
125
+ </p>
126
+ ) : null}
127
+ <Field>
128
+ <Button type="submit" disabled={pending}>
129
+ {pending ? "Creating account…" : "Create account"}
130
+ </Button>
131
+ <FieldDescription className="text-center">
132
+ Already have an account?{" "}
133
+ <Link to="/login" search={{ request, returnTo }}>
134
+ Log in
135
+ </Link>
136
+ </FieldDescription>
137
+ </Field>
138
+ </FieldGroup>
139
+ </form>
140
+ </CardContent>
141
+ </Card>
142
+ </div>
143
+ </main>
106
144
  );
107
145
  }
108
146
 
@@ -1,3 +1,4 @@
1
+ import { Logo } from "../components/logo";
1
2
  import { useState } from "react";
2
3
  import { createFileRoute, Outlet } from "@tanstack/react-router";
3
4
  import { ConvexAuthProvider } from "@convex-dev/auth/react";
@@ -59,11 +60,7 @@ function SiteHeader() {
59
60
  aria-label="Main navigation"
60
61
  >
61
62
  <a href="/" aria-label="Disposabl home">
62
- <img
63
- src="/disposabl-logo.svg"
64
- alt="Disposabl"
65
- className="h-9 w-auto"
66
- />
63
+ <Logo />
67
64
  </a>
68
65
  {authenticationEnabled && <AuthLinks />}
69
66
  </nav>
@@ -5,6 +5,7 @@ export {
5
5
  appsDelete,
6
6
  appsGet,
7
7
  appsList,
8
+ connectionsStatus,
8
9
  type Options,
9
10
  previewsGet,
10
11
  previewsList,
@@ -30,6 +31,10 @@ export type {
30
31
  AppsListResponse,
31
32
  AppsListResponses,
32
33
  ClientOptions,
34
+ ConnectionsStatusData,
35
+ ConnectionsStatusErrors,
36
+ ConnectionsStatusResponse,
37
+ ConnectionsStatusResponses,
33
38
  PreviewsGetData,
34
39
  PreviewsGetErrors,
35
40
  PreviewsGetResponse,
@@ -21,6 +21,9 @@ import type {
21
21
  AppsListData,
22
22
  AppsListErrors,
23
23
  AppsListResponses,
24
+ ConnectionsStatusData,
25
+ ConnectionsStatusErrors,
26
+ ConnectionsStatusResponses,
24
27
  PreviewsGetData,
25
28
  PreviewsGetErrors,
26
29
  PreviewsGetResponses,
@@ -117,6 +120,23 @@ export const appsList = <ThrowOnError extends boolean = false>(
117
120
  ...options,
118
121
  });
119
122
 
123
+ export const connectionsStatus = <ThrowOnError extends boolean = false>(
124
+ options?: Options<ConnectionsStatusData, ThrowOnError>,
125
+ ): RequestResult<
126
+ ConnectionsStatusResponses,
127
+ ConnectionsStatusErrors,
128
+ ThrowOnError
129
+ > =>
130
+ (options?.client ?? client).get<
131
+ ConnectionsStatusResponses,
132
+ ConnectionsStatusErrors,
133
+ ThrowOnError
134
+ >({
135
+ security: [{ scheme: "bearer", type: "http" }],
136
+ url: "/api/connections/status",
137
+ ...options,
138
+ });
139
+
120
140
  export const previewsGet = <ThrowOnError extends boolean = false>(
121
141
  options: Options<PreviewsGetData, ThrowOnError>,
122
142
  ): RequestResult<PreviewsGetResponses, PreviewsGetErrors, ThrowOnError> =>
@@ -231,6 +231,59 @@ export type AppsListResponses = {
231
231
 
232
232
  export type AppsListResponse = AppsListResponses[keyof AppsListResponses];
233
233
 
234
+ export type ConnectionsStatusData = {
235
+ body?: never;
236
+ path?: never;
237
+ query?: never;
238
+ url: "/api/connections/status";
239
+ };
240
+
241
+ export type ConnectionsStatusErrors = {
242
+ /**
243
+ * Invalid arguments
244
+ */
245
+ 400: unknown;
246
+ /**
247
+ * Authentication required
248
+ */
249
+ 401: unknown;
250
+ /**
251
+ * Insufficient scope
252
+ */
253
+ 403: unknown;
254
+ /**
255
+ * Internal error
256
+ */
257
+ 500: unknown;
258
+ };
259
+
260
+ export type ConnectionsStatusResponses = {
261
+ /**
262
+ * Success
263
+ */
264
+ 200: {
265
+ github: {
266
+ owner: string;
267
+ } | null;
268
+ convex: {
269
+ name: string;
270
+ } | null;
271
+ expo: {
272
+ name: string;
273
+ } | null;
274
+ ready: boolean;
275
+ available: {
276
+ github: boolean;
277
+ convex: boolean;
278
+ expo: boolean;
279
+ };
280
+ githubInstallUrl: string | null;
281
+ };
282
+ };
283
+
284
+ export type ConnectionsStatusResponse =
285
+ ConnectionsStatusResponses[keyof ConnectionsStatusResponses];
286
+
234
287
  export type PreviewsGetData = {
235
288
  body?: never;
236
289
  path?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-disposabl-app",
3
- "version": "0.6.8",
3
+ "version": "0.7.1",
4
4
  "description": "Create a Disposabl app",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- test "$(gh api "repos/$GH_REPO/$SOURCE_PATH" --jq 'if has("head") then (if .state == "open" then .head.sha else "closed" end) else .object.sha end')" = "$SOURCE"
4
- if [[ "$CHANNEL" == production ]]; then
5
- : "${ANDROID_KEYSTORE_BASE64:?}" "${ANDROID_KEYSTORE_PASSWORD:?}" "${ANDROID_KEY_ALIAS:?}" "${ANDROID_KEY_PASSWORD:?}"
6
- export ANDROID_KEYSTORE_PATH="$RUNNER_TEMP/android-release.jks"
7
- trap 'rm -f "$ANDROID_KEYSTORE_PATH"' EXIT
8
- (umask 077; printf '%s' "$ANDROID_KEYSTORE_BASE64" | base64 --decode > "$ANDROID_KEYSTORE_PATH")
9
- fi
10
- bun x --no-install expo prebuild --platform android --no-install
11
- test "$(bun x --no-install expo-updates runtimeversion:resolve --platform android --workflow managed | jq -er .runtimeVersion)" = "$RUNTIME"
12
- task=assembleRelease
13
- artifact=android.apk
14
- binary=android/app/build/outputs/apk/release/app-release.apk
15
- fingerprint=assets/fingerprint
16
- if [[ "$CHANNEL" == production ]]; then
17
- task=bundleRelease
18
- artifact=android.aab
19
- binary=android/app/build/outputs/bundle/release/app-release.aab
20
- fingerprint=base/assets/fingerprint
21
- fi
22
- (cd android && ./gradlew ":app:$task" --no-daemon --build-cache)
23
- test "$(unzip -p "$binary" "$fingerprint")" = "$RUNTIME"
24
- test "$(bun x --no-install expo-updates runtimeversion:resolve --platform android --workflow managed | jq -er .runtimeVersion)" = "$RUNTIME"
25
- mkdir -p ../../dist/release
26
- cp "$binary" "../../dist/release/$artifact"
27
- jq --arg sha "$(sha256sum "$binary" | cut -d' ' -f1)" '. + {sha256: $sha, action: "build"}' <<< "$MANIFEST" > ../../dist/release/android.json
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- for ((offset=0; ; offset+=25)); do
4
- bun x "$EAS_CLI" channel:list --json --limit 25 --offset "$offset" > "$RUNNER_TEMP/channels.json"
5
- if jq -e --arg channel "$CHANNEL" 'any(.currentPage[]; .name == $channel)' "$RUNNER_TEMP/channels.json" > /dev/null; then
6
- jq -e --arg channel "$CHANNEL" '.currentPage[] | select(.name == $channel) | (.isPaused == false) and (.updateBranches | length == 1) and (.updateBranches[0].name == $channel) and ((.branchMapping | fromjson).data == [{branchId: .updateBranches[0].id, branchMappingLogic: "true"}])' "$RUNNER_TEMP/channels.json" > /dev/null || { echo 'Preview channel must point only to its same-named branch'; exit 1; }
7
- break
8
- fi
9
- if [[ $(jq '.currentPage | length' "$RUNNER_TEMP/channels.json") -lt 25 ]]; then bun x "$EAS_CLI" channel:create "$CHANNEL" --non-interactive; break; fi
10
- done