@marktiderman/genesis-supabase 0.2.0 → 0.3.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.
- package/README.md +377 -23
- package/dist/blocks.d.ts +19 -0
- package/dist/blocks.js +3 -0
- package/dist/blocks.js.map +1 -0
- package/dist/chunk-FAA2FTF4.js +110 -0
- package/dist/chunk-FAA2FTF4.js.map +1 -0
- package/dist/chunk-T2HGFC4C.js +37 -0
- package/dist/chunk-T2HGFC4C.js.map +1 -0
- package/dist/index-BSGz3RGk.d.ts +317 -0
- package/dist/index.d.ts +4 -103
- package/dist/index.js +60 -3
- package/dist/index.js.map +1 -1
- package/dist/native.d.ts +90 -6
- package/dist/native.js +70 -2
- package/dist/native.js.map +1 -1
- package/functions/genesis-apple-revoke/apple.ts +237 -0
- package/functions/genesis-apple-revoke/handler.ts +227 -0
- package/functions/genesis-apple-revoke/index.ts +55 -0
- package/functions/genesis-push-send/expo.ts +117 -0
- package/functions/genesis-push-send/handler.ts +462 -0
- package/functions/genesis-push-send/index.ts +54 -0
- package/functions/genesis-support-cleanup/handler.ts +80 -0
- package/functions/genesis-support-cleanup/index.ts +39 -0
- package/functions/genesis-support-intake/contract.ts +193 -0
- package/functions/genesis-support-intake/handler.ts +170 -0
- package/functions/genesis-support-intake/index.ts +47 -0
- package/functions/genesis-support-notify/handler.ts +167 -0
- package/functions/genesis-support-notify/index.ts +15 -0
- package/functions/tests/genesis-apple-revoke_test.ts +81 -0
- package/functions/tests/genesis-push-send_test.ts +53 -0
- package/migrations/0003_genesis_apple_token_revocation.sql +205 -0
- package/migrations/0004_genesis_tenant_features.sql +333 -0
- package/migrations/0005_genesis_push.sql +524 -0
- package/migrations/0006_genesis_support.sql +846 -0
- package/migrations/tests/0003_genesis_apple_token_revocation.test.sql +230 -0
- package/migrations/tests/0004_genesis_tenant_features.test.sql +418 -0
- package/migrations/tests/0005_genesis_push.test.sql +407 -0
- package/migrations/tests/0006_genesis_support.test.sql +552 -0
- package/package.json +91 -4
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marktiderman/genesis-supabase",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"description": "Supabase for Genesis apps on web and React Native: a client with PKCE and safe defaults, Keychain session storage that survives interrupted writes, refresh only while the app is in front, native Sign in with Apple and OAuth redirects, in-app account deletion, and a result helper. Part of the Genesis framework.",
|
|
7
|
+
"description": "Supabase for Genesis apps on web and React Native: a client with PKCE and safe defaults, Keychain session storage that survives interrupted writes, refresh only while the app is in front, native Sign in with Apple and Google, OAuth redirects, in-app account deletion, per-tenant feature switches (tenant_features), and a result helper. Part of the Genesis framework.",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+https://github.com/marktiderman/genesis.git",
|
|
@@ -27,22 +27,109 @@
|
|
|
27
27
|
"./native": {
|
|
28
28
|
"types": "./dist/native.d.ts",
|
|
29
29
|
"import": "./dist/native.js"
|
|
30
|
+
},
|
|
31
|
+
"./blocks": {
|
|
32
|
+
"types": "./dist/blocks.d.ts",
|
|
33
|
+
"import": "./dist/blocks.js"
|
|
30
34
|
}
|
|
31
35
|
},
|
|
32
36
|
"files": [
|
|
33
37
|
"dist",
|
|
38
|
+
"functions",
|
|
34
39
|
"migrations",
|
|
35
40
|
"README.md"
|
|
36
41
|
],
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@marktiderman/genesis-features": "^0.3.0"
|
|
44
|
+
},
|
|
37
45
|
"peerDependencies": {
|
|
38
|
-
"@supabase/supabase-js": "^2.118.0"
|
|
46
|
+
"@supabase/supabase-js": "^2.118.0",
|
|
47
|
+
"@react-native-google-signin/google-signin": "*"
|
|
39
48
|
},
|
|
40
49
|
"devDependencies": {
|
|
41
50
|
"@supabase/supabase-js": "^2.118.0",
|
|
42
51
|
"tsup": "^8.3.0",
|
|
43
|
-
"typescript": "
|
|
52
|
+
"typescript": "~6.0.3",
|
|
44
53
|
"vitest": "^4.1.12"
|
|
45
54
|
},
|
|
55
|
+
"genesis": {
|
|
56
|
+
"blocks": {
|
|
57
|
+
"account": {
|
|
58
|
+
"feature": {
|
|
59
|
+
"name": "Account",
|
|
60
|
+
"summary": "Sign-in, profile and in-app account deletion, with Sign in with Apple token revocation.",
|
|
61
|
+
"keywords": [
|
|
62
|
+
"sign in",
|
|
63
|
+
"account deletion",
|
|
64
|
+
"apple"
|
|
65
|
+
],
|
|
66
|
+
"audience": [
|
|
67
|
+
"person"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"platforms": [
|
|
71
|
+
"web",
|
|
72
|
+
"native"
|
|
73
|
+
],
|
|
74
|
+
"migrations": [
|
|
75
|
+
{
|
|
76
|
+
"file": "migrations/0001_genesis_account_deletion.sql",
|
|
77
|
+
"test": "migrations/tests/0001_genesis_account_deletion.test.sql"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"file": "migrations/0003_genesis_apple_token_revocation.sql",
|
|
81
|
+
"test": "migrations/tests/0003_genesis_apple_token_revocation.test.sql"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"functions": [
|
|
85
|
+
{
|
|
86
|
+
"dir": "functions/genesis-apple-revoke",
|
|
87
|
+
"verifyJwt": false,
|
|
88
|
+
"secrets": [
|
|
89
|
+
"APPLE_TEAM_ID",
|
|
90
|
+
"APPLE_KEY_ID",
|
|
91
|
+
"APPLE_PRIVATE_KEY",
|
|
92
|
+
"APPLE_CLIENT_IDS"
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"install": [
|
|
97
|
+
"@supabase/supabase-js@^2.118.0"
|
|
98
|
+
],
|
|
99
|
+
"steps": [
|
|
100
|
+
"Enable the sign-in providers you use in Supabase Auth (email, Apple), and deploy genesis-apple-revoke if you offer Sign in with Apple."
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"tenant-features": {
|
|
104
|
+
"feature": {
|
|
105
|
+
"name": "Tenant feature switches",
|
|
106
|
+
"summary": "A tenant's admins turn a shipped feature off or back on for their tenant with a reason; members hide what is off.",
|
|
107
|
+
"keywords": [
|
|
108
|
+
"feature toggle",
|
|
109
|
+
"per tenant",
|
|
110
|
+
"organization settings"
|
|
111
|
+
],
|
|
112
|
+
"audience": [
|
|
113
|
+
"admin"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"migrations": [
|
|
117
|
+
{
|
|
118
|
+
"file": "migrations/0004_genesis_tenant_features.sql",
|
|
119
|
+
"test": "migrations/tests/0004_genesis_tenant_features.test.sql"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"steps": [
|
|
123
|
+
"Give tenant_features your membership rule in a migration of your own: create private.genesis_tenant_admin(tenant uuid, person uuid) returns boolean, and revoke execute on it from public, anon, authenticated (genesis-supabase README, Tenant feature switches). Without it nobody can change a switch."
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"peerDependenciesMeta": {
|
|
129
|
+
"@react-native-google-signin/google-signin": {
|
|
130
|
+
"optional": true
|
|
131
|
+
}
|
|
132
|
+
},
|
|
46
133
|
"scripts": {
|
|
47
134
|
"build": "tsup && node ../../scripts/check-exports-resolve.mjs",
|
|
48
135
|
"clean": "rm -rf dist",
|