create-disposabl-app 0.20.16 → 0.20.18
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 +1 -1
- package/dist/index.js +3 -1
- package/dist/templates/default/.github/scripts/apple.sh +9 -0
- package/dist/templates/default/.github/scripts/release.sh +11 -1
- package/dist/templates/default/.github/workflows/pipeline.yml +1 -1
- package/dist/templates/default/apps/docs/content/mobile.mdx +2 -0
- package/dist/templates/default/apps/docs/content/publishing/apple.mdx +12 -0
- package/dist/templates/default/apps/docs/content/publishing/google-play.mdx +12 -0
- package/dist/templates/default/apps/docs/content/publishing/index.mdx +23 -0
- package/dist/templates/default/apps/mobile/eas.json +2 -0
- package/dist/templates/default/apps/mobile/package.json +15 -14
- package/dist/templates/default/apps/mobile/scripts/android-release-verify.mjs +62 -7
- package/dist/templates/default/apps/mobile/scripts/play-aab.mjs +4 -0
- package/dist/templates/default/apps/mobile/scripts/verify-play-aab.mjs +48 -0
- package/dist/templates/default/bun.lock +111 -169
- package/dist/templates/default/disposabl.json +1 -1
- package/dist/templates/default/package.json +6 -6
- package/dist/templates/default/packages/backend/convex/authEmail.ts +1 -1
- package/dist/templates/default/packages/backend/convex/convex.config.ts +1 -0
- package/dist/templates/default/packages/backend/convex/users/internal.ts +13 -16
- package/dist/templates/default/packages/disposabl-kit/PAYMENTS.md +8 -0
- package/dist/templates/default/packages/disposabl-kit/client/components/cookie-consent.tsx +117 -0
- package/dist/templates/default/packages/disposabl-kit/client/components/google-sign-in.tsx +0 -2
- package/dist/templates/default/packages/disposabl-kit/client/components/legal-page.tsx +19 -1
- package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/verify-email.tsx +4 -2
- package/dist/templates/default/packages/disposabl-kit/client/routes/pricing.tsx +18 -4
- package/dist/templates/default/packages/disposabl-kit/client/styles/cookie-consent.css +54 -0
- package/dist/templates/default/packages/disposabl-kit/legal/config.ts +10 -7
- package/dist/templates/default/packages/disposabl-kit/legal/documents/privacy.ts +3 -1
- package/dist/templates/default/packages/disposabl-kit/legal/index.ts +2 -1
- package/dist/templates/default/packages/disposabl-kit/legal/publisher.ts +5 -1
- package/dist/templates/default/packages/disposabl-kit/legal/types.ts +18 -0
- package/dist/templates/default/packages/disposabl-kit/lib/auth-errors.ts +2 -0
- package/dist/templates/default/packages/disposabl-kit/mobile/billing/account-billing.tsx +168 -99
- package/dist/templates/default/packages/disposabl-kit/mobile/components/auth-ui.tsx +9 -21
- package/dist/templates/default/packages/disposabl-kit/mobile/components/email-verification.tsx +4 -2
- package/dist/templates/default/packages/disposabl-kit/mobile/components/settings-page.tsx +52 -20
- package/dist/templates/default/packages/disposabl-kit/mobile/layout.tsx +13 -4
- package/dist/templates/default/packages/disposabl-kit/mobile/lib/auth-errors.ts +2 -0
- package/dist/templates/default/packages/disposabl-kit/package.json +14 -9
- package/dist/templates/default/packages/disposabl-kit/payments/catalog.ts +6 -0
- package/dist/templates/default/packages/disposabl-kit/payments/config.ts +5 -3
- package/dist/templates/default/packages/disposabl-kit/server/billing-functions.ts +15 -3
- package/dist/templates/default/packages/disposabl-kit/server/billing-native-capability.ts +33 -6
- package/dist/templates/default/packages/disposabl-kit/server/billing.ts +11 -3
- package/dist/templates/default/packages/disposabl-kit/server/revenuecat-contract.ts +87 -8
- package/dist/templates/default/packages/disposabl-kit/server/revenuecat-functions.ts +34 -8
- package/dist/templates/default/packages/disposabl-kit/server/revenuecat-validator.ts +3 -0
- package/dist/templates/default/packages/tests/billing-setup.test.ts +14 -14
- package/dist/templates/default/packages/tests/billing.test.ts +22 -0
- package/dist/templates/default/packages/tests/components/mobile-account-billing.test.mjs +149 -0
- package/dist/templates/default/packages/tests/flows/email-delivery.e2e.ts +1 -1
- package/dist/templates/default/packages/tests/flows/legal.e2e.ts +7 -5
- package/dist/templates/default/packages/tests/flows/password-backend.e2e.ts +1 -1
- package/dist/templates/default/packages/tests/helpers/auth-email-setup/probe.test.mjs +1 -1
- package/dist/templates/default/packages/tests/ios-ota.test.ts +32 -10
- package/dist/templates/default/packages/tests/mobile-account-billing.test.ts +19 -0
- package/dist/templates/default/packages/tests/native-billing.test.ts +71 -0
- package/dist/templates/default/packages/tests/package-release.test.ts +16 -0
- package/dist/templates/default/packages/tests/revenuecat-inbox.test.ts +91 -3
- package/dist/templates/default/patches/expo-modules-core@58.1.0.patch +23 -0
- package/dist/templates/default/vendor/README.md +4 -10
- package/dist/templates/default/vendor/convex-auth-2.0.0-disposabl.2.patch +2096 -0
- package/dist/templates/default/vendor/convex-auth-2.0.0-disposabl.2.tgz +0 -0
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ test("email module honors the deployment origin and optional sender", async () =
|
|
|
30
30
|
});
|
|
31
31
|
for (const name of [
|
|
32
32
|
"signUpWithEmailPassword",
|
|
33
|
-
"
|
|
33
|
+
"completeSignUpWithEmailPassword",
|
|
34
34
|
"signInWithEmailPassword",
|
|
35
35
|
"changePassword",
|
|
36
36
|
"startPasswordRecovery",
|
|
@@ -141,6 +141,25 @@ else if (!args.includes('update')) process.exit(5);
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
test("product iOS delivery requires public store configuration", async () => {
|
|
145
|
+
const config = {
|
|
146
|
+
GH_REPO: "disposabl-dev/create-disposabl-app",
|
|
147
|
+
EXPO_PUBLIC_REVENUECAT_IOS_API_KEY: "fixture",
|
|
148
|
+
EXPO_PUBLIC_REVENUECAT_IOS_MONTHLY_PRODUCT: "monthly",
|
|
149
|
+
EXPO_PUBLIC_REVENUECAT_IOS_APP_ID: "app",
|
|
150
|
+
EXPO_PUBLIC_REVENUECAT_IOS_TOPUP_PRODUCT: "topup",
|
|
151
|
+
};
|
|
152
|
+
for (const name of Object.keys(config).filter((key) => key !== "GH_REPO")) {
|
|
153
|
+
for (const operation of ["ota-plan", "production", "deliver"]) {
|
|
154
|
+
const result = await run(operation, { ...config, [name]: " " });
|
|
155
|
+
assert.notEqual(result.status, 0);
|
|
156
|
+
assert.match(result.stderr, new RegExp(`Missing ${name}`));
|
|
157
|
+
assert.equal(result.trace, "");
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
assert.equal((await run("ota-plan", config)).status, 0);
|
|
161
|
+
});
|
|
162
|
+
|
|
144
163
|
test("iOS reuses only a matching finished production binary", async () => {
|
|
145
164
|
const result = await run("ota-plan");
|
|
146
165
|
assert.equal(result.status, 0, result.stderr);
|
|
@@ -148,21 +167,24 @@ test("iOS reuses only a matching finished production binary", async () => {
|
|
|
148
167
|
assert.match(result.trace, /"--build-profile","ios-production"/);
|
|
149
168
|
assert.match(result.trace, /"--channel","production"/);
|
|
150
169
|
assert.match(result.trace, /"--app-identifier","app.test"/);
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
for (const [reason, candidate] of [
|
|
173
|
+
["no binary", null],
|
|
174
|
+
["different runtime", { ...build, runtime: { version: "different" } }],
|
|
175
|
+
["simulator", { ...build, isForIosSimulator: true }],
|
|
176
|
+
["different project", { ...build, app: { id: "other" } }],
|
|
177
|
+
["preview channel", { ...build, updateChannel: { name: "preview" } }],
|
|
178
|
+
["missing archive", { ...build, artifacts: {} }],
|
|
179
|
+
] as const) {
|
|
180
|
+
test(`iOS requests a build for ${reason}`, async () => {
|
|
159
181
|
const mismatch = await run("ota-plan", {
|
|
160
182
|
BUILDS: JSON.stringify(candidate ? [candidate] : []),
|
|
161
183
|
});
|
|
162
184
|
assert.equal(mismatch.status, 0, mismatch.stderr);
|
|
163
185
|
assert.match(mismatch.output, /action=build/);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
166
188
|
|
|
167
189
|
test("iOS build lookup errors do not trigger a replacement build", async () => {
|
|
168
190
|
for (const values of [
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { test } from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
|
|
6
|
+
test("mobile billing preserves the balance across store failures", () => {
|
|
7
|
+
const result = spawnSync(
|
|
8
|
+
process.execPath,
|
|
9
|
+
[
|
|
10
|
+
"test",
|
|
11
|
+
join(import.meta.dirname, "components/mobile-account-billing.test.mjs"),
|
|
12
|
+
],
|
|
13
|
+
{
|
|
14
|
+
encoding: "utf8",
|
|
15
|
+
env: { ...process.env, E2E_TELEMETRY_DISABLED: "1", DO_NOT_TRACK: "1" },
|
|
16
|
+
},
|
|
17
|
+
);
|
|
18
|
+
assert.equal(result.status, 0, result.stdout + result.stderr);
|
|
19
|
+
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { creditQuantity } from "../disposabl-kit/payments/config";
|
|
1
2
|
import { test } from "node:test";
|
|
2
3
|
import assert from "node:assert/strict";
|
|
3
4
|
import { BillingSession } from "../disposabl-kit/mobile/billing/session";
|
|
@@ -845,3 +846,73 @@ test("web handoff rechecks the storefront and account after link creation", asyn
|
|
|
845
846
|
);
|
|
846
847
|
}
|
|
847
848
|
});
|
|
849
|
+
|
|
850
|
+
test("reviewer qualification exposes only configured top-ups to the authenticated allowlist", async () => {
|
|
851
|
+
const { nativeTopupRoutes, reviewerNativeSubscriptionsEnabled } =
|
|
852
|
+
await import("../disposabl-kit/server/billing-native-capability");
|
|
853
|
+
const reviewer = "a".repeat(32);
|
|
854
|
+
const env = {
|
|
855
|
+
REVENUECAT_CONSUMABLE_OWNER: "custom",
|
|
856
|
+
REVENUECAT_WEBHOOK_AUTH: "fixture",
|
|
857
|
+
REVENUECAT_PROJECT_ID: "project",
|
|
858
|
+
AUTUMN_SECRET_KEY: "am_sk_live_fixture",
|
|
859
|
+
REVENUECAT_ENVIRONMENT: "PRODUCTION",
|
|
860
|
+
REVENUECAT_ROUTES: JSON.stringify([
|
|
861
|
+
{ app: "apple", store: "APP_STORE", product: "coins" },
|
|
862
|
+
]),
|
|
863
|
+
REVENUECAT_MANAGED_MONTHLY_ROUTES: JSON.stringify([
|
|
864
|
+
{ app: "apple", store: "APP_STORE", product: "monthly" },
|
|
865
|
+
]),
|
|
866
|
+
REVENUECAT_REVIEWER_USERS: JSON.stringify([reviewer]),
|
|
867
|
+
};
|
|
868
|
+
const expected = [{ app: "apple", store: "APP_STORE", product: "coins" }];
|
|
869
|
+
assert.equal(reviewerNativeSubscriptionsEnabled(true, env, reviewer), true);
|
|
870
|
+
assert.deepEqual(nativeTopupRoutes(true, env, reviewer), expected);
|
|
871
|
+
for (const userId of [
|
|
872
|
+
undefined,
|
|
873
|
+
"b".repeat(32),
|
|
874
|
+
"",
|
|
875
|
+
"$RCAnonymousID:foreign",
|
|
876
|
+
]) {
|
|
877
|
+
assert.equal(reviewerNativeSubscriptionsEnabled(true, env, userId), false);
|
|
878
|
+
assert.deepEqual(nativeTopupRoutes(true, env, userId), []);
|
|
879
|
+
}
|
|
880
|
+
for (const changes of [
|
|
881
|
+
{ REVENUECAT_ROUTES: "[]" },
|
|
882
|
+
{ REVENUECAT_REVIEWER_USERS: "bad" },
|
|
883
|
+
{ REVENUECAT_WEBHOOK_AUTH: "" },
|
|
884
|
+
{ REVENUECAT_MANAGED_MONTHLY_ROUTES: "[]" },
|
|
885
|
+
]) {
|
|
886
|
+
assert.equal(
|
|
887
|
+
reviewerNativeSubscriptionsEnabled(
|
|
888
|
+
true,
|
|
889
|
+
{ ...env, ...changes },
|
|
890
|
+
reviewer,
|
|
891
|
+
),
|
|
892
|
+
false,
|
|
893
|
+
);
|
|
894
|
+
assert.deepEqual(
|
|
895
|
+
nativeTopupRoutes(true, { ...env, ...changes }, reviewer),
|
|
896
|
+
[],
|
|
897
|
+
);
|
|
898
|
+
}
|
|
899
|
+
assert.equal(reviewerNativeSubscriptionsEnabled(false, env, reviewer), false);
|
|
900
|
+
assert.deepEqual(
|
|
901
|
+
nativeTopupRoutes(
|
|
902
|
+
true,
|
|
903
|
+
{ ...env, REVENUECAT_CONSUMABLE_INTEGRATION_VERIFIED: "true" },
|
|
904
|
+
"b".repeat(32),
|
|
905
|
+
),
|
|
906
|
+
expected,
|
|
907
|
+
);
|
|
908
|
+
assert.deepEqual(
|
|
909
|
+
nativeTopupRoutes(
|
|
910
|
+
true,
|
|
911
|
+
{ ...env, REVENUECAT_CONSUMABLE_INTEGRATION_VERIFIED: "true" },
|
|
912
|
+
reviewer,
|
|
913
|
+
),
|
|
914
|
+
expected,
|
|
915
|
+
);
|
|
916
|
+
assert.equal(creditQuantity("monthly"), 750);
|
|
917
|
+
assert.equal(creditQuantity("topup"), 500);
|
|
918
|
+
});
|
|
@@ -17,6 +17,7 @@ function release(options: {
|
|
|
17
17
|
prepared?: string;
|
|
18
18
|
available?: string;
|
|
19
19
|
failure?: boolean;
|
|
20
|
+
visibleAfter?: number;
|
|
20
21
|
}) {
|
|
21
22
|
const directory = mkdtempSync(join(tmpdir(), "package-release-"));
|
|
22
23
|
try {
|
|
@@ -49,9 +50,12 @@ fi`,
|
|
|
49
50
|
executable(
|
|
50
51
|
"npm",
|
|
51
52
|
`echo "npm $*" >> calls
|
|
53
|
+
count=$(grep -c "^npm " calls)
|
|
54
|
+
(( count > VISIBLE_AFTER )) || exit 1
|
|
52
55
|
[[ -n "$AVAILABLE" ]] || { echo 'E404 or registry unavailable' >&2; exit 1; }
|
|
53
56
|
printf '%s\\n' "$AVAILABLE"`,
|
|
54
57
|
);
|
|
58
|
+
executable("sleep", ":");
|
|
55
59
|
executable(
|
|
56
60
|
"node",
|
|
57
61
|
`if [[ "$1" == -p ]]; then
|
|
@@ -73,6 +77,7 @@ fi`,
|
|
|
73
77
|
PREPARED: options.prepared ?? "",
|
|
74
78
|
AVAILABLE: options.available ?? "",
|
|
75
79
|
FAIL_RELEASE: String(options.failure ?? false),
|
|
80
|
+
VISIBLE_AFTER: String(options.visibleAfter ?? 0),
|
|
76
81
|
},
|
|
77
82
|
});
|
|
78
83
|
const calls = join(directory, "calls");
|
|
@@ -126,3 +131,14 @@ test("a mismatched registry version cannot report ready", () => {
|
|
|
126
131
|
assert.match(result.calls, /no matching published version/);
|
|
127
132
|
assert.doesNotMatch(result.calls, / ready /);
|
|
128
133
|
});
|
|
134
|
+
|
|
135
|
+
test("new publication waits for delayed registry visibility", () => {
|
|
136
|
+
const result = release({
|
|
137
|
+
prepared: "1.0.0",
|
|
138
|
+
available: "1.0.0",
|
|
139
|
+
visibleAfter: 2,
|
|
140
|
+
});
|
|
141
|
+
assert.equal(result.status, 0, result.stderr);
|
|
142
|
+
assert.equal((result.calls.match(/npm view/g) ?? []).length, 3);
|
|
143
|
+
assert.match(result.calls, /report typescript-sdk ready version=1\.0\.0/);
|
|
144
|
+
});
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
inspectReviewDeliveries,
|
|
28
28
|
} from "../disposabl-kit/server/revenuecat-functions";
|
|
29
29
|
|
|
30
|
-
import { creditQuantity } from "../disposabl-kit/payments/config";
|
|
30
|
+
import { creditQuantity, pricing } from "../disposabl-kit/payments/config";
|
|
31
31
|
import { paymentsEnabled } from "../disposabl-kit/features";
|
|
32
32
|
|
|
33
33
|
const config = {
|
|
@@ -919,7 +919,7 @@ describe("RevenueCat consumable inbox", () => {
|
|
|
919
919
|
assert.equal(f.jobs.length, 2);
|
|
920
920
|
assert.deepEqual(balanceRequest(event.customer, id, "grant"), {
|
|
921
921
|
customer_id: event.customer,
|
|
922
|
-
feature_id:
|
|
922
|
+
feature_id: pricing.featureId,
|
|
923
923
|
balance_id: id,
|
|
924
924
|
included_grant: creditQuantity("topup"),
|
|
925
925
|
});
|
|
@@ -984,7 +984,7 @@ describe("RevenueCat consumable inbox", () => {
|
|
|
984
984
|
});
|
|
985
985
|
assert.deepEqual(balanceRequest(event.customer, id, "refund"), {
|
|
986
986
|
customer_id: event.customer,
|
|
987
|
-
feature_id:
|
|
987
|
+
feature_id: pricing.featureId,
|
|
988
988
|
balance_id: id,
|
|
989
989
|
remaining: 0,
|
|
990
990
|
});
|
|
@@ -998,3 +998,91 @@ describe("RevenueCat consumable inbox", () => {
|
|
|
998
998
|
assert.equal(g.tables.revenueCatPurchases![0].state, "refund_unknown");
|
|
999
999
|
});
|
|
1000
1000
|
});
|
|
1001
|
+
|
|
1002
|
+
test("reviewer sandbox routing is disabled by default and bound to exact account and product", () => {
|
|
1003
|
+
const env = {
|
|
1004
|
+
REVENUECAT_CONSUMABLE_OWNER: "custom",
|
|
1005
|
+
REVENUECAT_WEBHOOK_AUTH: "Bearer fixture",
|
|
1006
|
+
REVENUECAT_PROJECT_ID: "proj",
|
|
1007
|
+
REVENUECAT_ENVIRONMENT: "PRODUCTION",
|
|
1008
|
+
AUTUMN_SECRET_KEY: "am_sk_live_fixture",
|
|
1009
|
+
REVENUECAT_ROUTES: JSON.stringify([
|
|
1010
|
+
{ app: "app", store: "APP_STORE", product: "topup" },
|
|
1011
|
+
]),
|
|
1012
|
+
REVENUECAT_MANAGED_MONTHLY_ROUTES: JSON.stringify([
|
|
1013
|
+
{ app: "app", store: "APP_STORE", product: "monthly" },
|
|
1014
|
+
]),
|
|
1015
|
+
};
|
|
1016
|
+
const reviewer = "a".repeat(32);
|
|
1017
|
+
const body = {
|
|
1018
|
+
api_version: "1.0",
|
|
1019
|
+
event: {
|
|
1020
|
+
id: "delivery",
|
|
1021
|
+
app_id: "app",
|
|
1022
|
+
app_user_id: reviewer,
|
|
1023
|
+
original_app_user_id: reviewer,
|
|
1024
|
+
environment: "SANDBOX",
|
|
1025
|
+
store: "APP_STORE",
|
|
1026
|
+
product_id: "monthly",
|
|
1027
|
+
transaction_id: "tx",
|
|
1028
|
+
type: "RENEWAL",
|
|
1029
|
+
expiration_at_ms: 1900000000000,
|
|
1030
|
+
},
|
|
1031
|
+
};
|
|
1032
|
+
assert.equal(
|
|
1033
|
+
selectRevenueCatRoute(body, revenueCatConfigs(true, env)!),
|
|
1034
|
+
null,
|
|
1035
|
+
);
|
|
1036
|
+
const configs = revenueCatConfigs(true, {
|
|
1037
|
+
...env,
|
|
1038
|
+
REVENUECAT_REVIEWER_USERS: JSON.stringify([reviewer]),
|
|
1039
|
+
})!;
|
|
1040
|
+
const route = selectRevenueCatRoute(body, configs)!;
|
|
1041
|
+
assert.equal(parseRevenueCatEvent(body, route)?.expiresAt, 1900000000000);
|
|
1042
|
+
assert.equal(
|
|
1043
|
+
selectRevenueCatRoute(
|
|
1044
|
+
{ ...body, event: { ...body.event, app_user_id: "b".repeat(32) } },
|
|
1045
|
+
configs,
|
|
1046
|
+
),
|
|
1047
|
+
null,
|
|
1048
|
+
);
|
|
1049
|
+
assert.equal(
|
|
1050
|
+
selectRevenueCatRoute(
|
|
1051
|
+
{ ...body, event: { ...body.event, store: "PLAY_STORE" } },
|
|
1052
|
+
configs,
|
|
1053
|
+
),
|
|
1054
|
+
null,
|
|
1055
|
+
);
|
|
1056
|
+
assert.equal(
|
|
1057
|
+
selectRevenueCatRoute(
|
|
1058
|
+
{ ...body, event: { ...body.event, product_id: "other" } },
|
|
1059
|
+
configs,
|
|
1060
|
+
),
|
|
1061
|
+
null,
|
|
1062
|
+
);
|
|
1063
|
+
assert.equal(
|
|
1064
|
+
parseTransfer(
|
|
1065
|
+
{
|
|
1066
|
+
api_version: "1.0",
|
|
1067
|
+
event: {
|
|
1068
|
+
id: "transfer",
|
|
1069
|
+
type: "TRANSFER",
|
|
1070
|
+
app_id: "app",
|
|
1071
|
+
environment: "SANDBOX",
|
|
1072
|
+
store: "APP_STORE",
|
|
1073
|
+
transferred_from: [reviewer],
|
|
1074
|
+
transferred_to: [reviewer],
|
|
1075
|
+
},
|
|
1076
|
+
},
|
|
1077
|
+
route,
|
|
1078
|
+
),
|
|
1079
|
+
null,
|
|
1080
|
+
);
|
|
1081
|
+
assert.equal(
|
|
1082
|
+
revenueCatConfigs(true, {
|
|
1083
|
+
...env,
|
|
1084
|
+
REVENUECAT_REVIEWER_USERS: JSON.stringify(["$RCAnonymousID:bad"]),
|
|
1085
|
+
}),
|
|
1086
|
+
null,
|
|
1087
|
+
);
|
|
1088
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
diff --git a/android/src/main/java/expo/modules/kotlin/jni/fabric/NativeStatePropsGetter.kt b/android/src/main/java/expo/modules/kotlin/jni/fabric/NativeStatePropsGetter.kt
|
|
2
|
+
index 1509bddac6ae6ee7e21857b27def28e8454fc33a..ed01ecde2f87404a42ea2899d5ab0016cd3a9df7 100644
|
|
3
|
+
--- a/android/src/main/java/expo/modules/kotlin/jni/fabric/NativeStatePropsGetter.kt
|
|
4
|
+
+++ b/android/src/main/java/expo/modules/kotlin/jni/fabric/NativeStatePropsGetter.kt
|
|
5
|
+
@@ -1,10 +1,18 @@
|
|
6
|
+
package expo.modules.kotlin.jni.fabric
|
|
7
|
+
|
|
8
|
+
import com.facebook.jni.HybridData
|
|
9
|
+
+import com.facebook.soloader.SoLoader
|
|
10
|
+
import com.facebook.yoga.annotations.DoNotStrip
|
|
11
|
+
|
|
12
|
+
@DoNotStrip
|
|
13
|
+
class NativeStatePropsGetter {
|
|
14
|
+
+ companion object {
|
|
15
|
+
+ init {
|
|
16
|
+
+ // Expo UI can be destroyed before the JavaScript runtime installs JNI bindings.
|
|
17
|
+
+ SoLoader.loadLibrary("expo-modules-core")
|
|
18
|
+
+ }
|
|
19
|
+
+ }
|
|
20
|
+
+
|
|
21
|
+
// We can't use StateWrapper directly, as this class is not exposed
|
|
22
|
+
external fun getStateProps(stateWrapper: Any): Map<String, Any?>?
|
|
23
|
+
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
# Convex Auth snapshot
|
|
2
2
|
|
|
3
|
-
The product selects `convex-auth-
|
|
3
|
+
The product selects `convex-auth-2.0.0-disposabl.2.tgz`, a locally patched build of official Convex Auth 2.0.0 source commit [`f73ec4399f1883ba383817bdc34350669ef5e6d3`](https://github.com/convex/convex-auth/commit/f73ec4399f1883ba383817bdc34350669ef5e6d3). Archive SHA-256: `42d6065e5410999290b9b599af064b128bdb4897a8784759ccbdba7aef2c01a5`. Source patch: `convex-auth-2.0.0-disposabl.2.patch`, SHA-256 `17a735461744bd35c1dfea5aa323dc2fde7ba8cf82f8e6b416b3d25e8e50a205`. It contains the Apache 2.0 license, source, compiled JavaScript and declarations. It is a local security patch, not the unmodified npm release.
|
|
4
4
|
|
|
5
|
-
The
|
|
5
|
+
The patch retains the Google HTTPS relay, token-store serialization, session exchange and bounded auth erasure. Stable 2.0 moves Google mappings into its provider component. The transitional schema retains old core mappings and fences and rejects old sessions. The internal `authMigration:advance` coordinator copies fences and mappings in bounded atomic batches and retires attributed legacy sessions and refresh tokens; run repeatedly until complete. Migration signs existing users out. Before production migration, quiesce app-specific auth/deletion writers and verify the exact deployment, backups and rollback plan. Never call component migration advance or lock operations directly. Historical unattributed tokens and challenges remain unverified; identity digests and user fences remain retained.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
On an owned local Convex backend with outbound traffic blocked, the selected old package was upgraded to the patched stable package on the same database. A fixture seeded 205 real app IDs and Google mappings, an erased user, an identity cutoff, legacy OAuth request/ticket rows and a legacy session with 205 tokens. All 204 unfenced mappings retained their owner IDs; fenced identities and old sessions were denied; tokens were cleared; inert sign-in and refresh passed. A separate conflicting mapping remained blocked across retries. This does not prove production migration, live Google OAuth or native behavior. The source patch applied cleanly to the official core; official codegen, build, typecheck and 1,007 upstream core tests passed.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
At product revisions `5319558` and fixture-only follow-on `5d4a279`, the selected archive matched all 1,333 installed files. Offline frozen installation and backend, kit, web, mobile and test typechecks passed. Six marker cases passed from source and six from compiled runtime; 23 upstream OAuth cases passed. The earlier 99 non-OAuth source cases passed, followed by all 51 cases in the four previously omitted email suites using native Vitest 4.1.6 against final `.2` source.
|
|
12
|
-
|
|
13
|
-
Fresh isolated Convex runs passed product identity fencing and bounded erasure, independent SDK OAuth-grant revocation, API authentication, and email/password signup, verification, change and recovery. The email flow also denied login and recovery for the fenced identity while preserving the other account. Senders and provider adapters were inert; no real email or provider login was performed. The corrected ownership guard passed before product fixture mutations. Generated auth-off and auth/payments web profiles passed installation, typechecks and retained email setup tests.
|
|
14
|
-
|
|
15
|
-
These results establish local package and component behavior. They do not establish production authentication, real provider delivery, native runtime behavior or complete account deletion. The combined web/backend gate at `5319558` passed 292 unit tests and 43 E2E tests, with 55 unit and 24 E2E skips explicitly recorded. Separate `.2` fixtures also passed the local deletion coordinator and authenticated browser handoff/session exchange. Skipped opt-in fixtures are not implied coverage. The older artifacts and descriptions below are historical evidence, not supported compatibility paths or current rebuild instructions.
|
|
9
|
+
Rebuild from the exact upstream source: apply the patch with `patch -p1` in `packages/core`, install pinned workspace dependencies, run the upstream component codegen and `pnpm --filter @convex-dev/auth build`, copy the upstream root `LICENSE` to `packages/core/LICENSE`, and run `npm pack --ignore-scripts`. Compare source, compiled JavaScript and declarations, and record the resulting archive hash.
|
|
16
10
|
|
|
17
11
|
## Historical snapshots
|
|
18
12
|
|