@marktiderman/genesis-cli 1.6.0 → 1.7.0
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 +156 -1
- package/dist/cli.js +2769 -567
- package/dist/cli.js.map +1 -1
- package/dist/{config-CUdwT-nY.d.ts → config-CrZbM3jD.d.ts} +45 -2
- package/dist/doctor.d.ts +2 -2
- package/dist/doctor.js +133 -5
- package/dist/doctor.js.map +1 -1
- package/dist/expo.d.ts +91 -8
- package/dist/expo.js +207 -14
- package/dist/expo.js.map +1 -1
- package/dist/genesis-catalog.json +502 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +140 -9
- package/dist/index.js.map +1 -1
- package/dist/scaffolder.d.ts +1 -1
- package/dist/scaffolder.js +7 -4
- package/dist/scaffolder.js.map +1 -1
- package/dist/starter/.eas/scripts/rollout-health.mjs +85 -0
- package/dist/starter/.eas/workflows/deploy-production.yml +149 -0
- package/dist/starter/.eas/workflows/e2e.yml +77 -0
- package/dist/starter/.eas/workflows/pr-preview.yml +117 -0
- package/dist/starter/.eas/workflows/rollout.yml +120 -0
- package/dist/starter/.env.example +11 -0
- package/dist/starter/.fingerprintignore +7 -0
- package/dist/starter/.maestro/README.md +38 -0
- package/dist/starter/.maestro/config.yaml +5 -0
- package/dist/starter/.maestro/flows/deep-link.yaml +22 -0
- package/dist/starter/.maestro/flows/launch.yaml +17 -0
- package/dist/starter/.maestro/flows/settings-version.yaml +28 -0
- package/dist/starter/.maestro/flows/sign-in-screen.yaml +17 -0
- package/dist/starter/.maestro/subflows/sign-in.yaml +20 -0
- package/dist/starter/README.md +314 -0
- package/dist/starter/__tests__/app-config.test.ts +51 -0
- package/dist/starter/__tests__/check-in-photos.test.ts +57 -0
- package/dist/starter/__tests__/components/css-stub.js +2 -0
- package/dist/starter/__tests__/components/fake-supabase.ts +136 -0
- package/dist/starter/__tests__/components/links.test.ts +25 -0
- package/dist/starter/__tests__/components/render-app.ts +22 -0
- package/dist/starter/__tests__/components/reports.ts +10 -0
- package/dist/starter/__tests__/components/resolver.js +12 -0
- package/dist/starter/__tests__/components/root-layout.test.tsx +55 -0
- package/dist/starter/__tests__/components/session-storage.test.tsx +81 -0
- package/dist/starter/__tests__/components/settings.test.tsx +134 -0
- package/dist/starter/__tests__/components/setup.ts +69 -0
- package/dist/starter/__tests__/components/sign-in.test.tsx +90 -0
- package/dist/starter/__tests__/components/tabs-feature-off.test.tsx +19 -0
- package/dist/starter/__tests__/components/tabs.test.tsx +43 -0
- package/dist/starter/__tests__/components/tabs.ts +12 -0
- package/dist/starter/__tests__/entry.test.ts +28 -0
- package/dist/starter/__tests__/inline-copy.ts +59 -0
- package/dist/starter/__tests__/starter.test.ts +319 -0
- package/dist/starter/_gitignore +13 -0
- package/dist/starter/app.config.ts +44 -0
- package/dist/starter/babel.config.js +9 -0
- package/dist/starter/eas.json +47 -0
- package/dist/starter/eslint.config.js +5 -0
- package/dist/starter/genesis.config.json +12 -0
- package/dist/starter/global.css +3 -0
- package/dist/starter/index.ts +14 -0
- package/dist/starter/jest.config.js +36 -0
- package/dist/starter/metro.config.js +38 -0
- package/dist/starter/package.json +93 -0
- package/dist/starter/pnpm-workspace.yaml +73 -0
- package/dist/starter/src/app/(app)/(home)/_layout.tsx +6 -0
- package/dist/starter/src/app/(app)/(home)/check-in.tsx +41 -0
- package/dist/starter/src/app/(app)/(home)/index.tsx +34 -0
- package/dist/starter/src/app/(app)/_layout.tsx +27 -0
- package/dist/starter/src/app/(app)/notifications/_layout.tsx +6 -0
- package/dist/starter/src/app/(app)/notifications/index.tsx +36 -0
- package/dist/starter/src/app/(app)/settings/_layout.tsx +6 -0
- package/dist/starter/src/app/(app)/settings/index.tsx +96 -0
- package/dist/starter/src/app/(app)/settings/notifications.tsx +16 -0
- package/dist/starter/src/app/(app)/settings/support/[id].tsx +23 -0
- package/dist/starter/src/app/(app)/settings/support/ideas.tsx +20 -0
- package/dist/starter/src/app/(app)/settings/support/index.tsx +20 -0
- package/dist/starter/src/app/(app)/settings/support/new.tsx +35 -0
- package/dist/starter/src/app/(app)/settings/support/shipped.tsx +20 -0
- package/dist/starter/src/app/+native-intent.ts +11 -0
- package/dist/starter/src/app/_layout.tsx +20 -0
- package/dist/starter/src/app/sign-in.tsx +69 -0
- package/dist/starter/src/copy.ts +118 -0
- package/dist/starter/src/forms/check-in.json +121 -0
- package/dist/starter/src/lib/account.ts +42 -0
- package/dist/starter/src/lib/app.ts +52 -0
- package/dist/starter/src/lib/auth.ts +80 -0
- package/dist/starter/src/lib/check-in-photos.ts +66 -0
- package/dist/starter/src/lib/check-in.ts +85 -0
- package/dist/starter/src/lib/define-starter.ts +148 -0
- package/dist/starter/src/lib/devtools-overlay.ts +34 -0
- package/dist/starter/src/lib/devtools.ts +23 -0
- package/dist/starter/src/lib/env.ts +33 -0
- package/dist/starter/src/lib/google-signin.ts +23 -0
- package/dist/starter/src/lib/links.ts +40 -0
- package/dist/starter/src/lib/native-modules.ts +27 -0
- package/dist/starter/src/lib/notifications.ts +15 -0
- package/dist/starter/src/lib/observability.ts +45 -0
- package/dist/starter/src/lib/push.ts +49 -0
- package/dist/starter/src/lib/supabase.ts +65 -0
- package/dist/starter/src/lib/support.ts +44 -0
- package/dist/starter/src/lib/updates.ts +61 -0
- package/dist/starter/starter.config.ts +37 -0
- package/dist/starter/supabase/config.toml +26 -0
- package/dist/starter/supabase/functions/genesis-apple-revoke/apple.ts +237 -0
- package/dist/starter/supabase/functions/genesis-apple-revoke/handler.ts +227 -0
- package/dist/starter/supabase/functions/genesis-apple-revoke/index.ts +55 -0
- package/dist/starter/supabase/functions/genesis-push-send/expo.ts +117 -0
- package/dist/starter/supabase/functions/genesis-push-send/handler.ts +462 -0
- package/dist/starter/supabase/functions/genesis-push-send/index.ts +54 -0
- package/dist/starter/supabase/migrations/20261024000000_genesis_account_deletion.sql +133 -0
- package/dist/starter/supabase/migrations/20261024000100_genesis_app_release_policy.sql +82 -0
- package/dist/starter/supabase/migrations/20261024000200_genesis_apple_token_revocation.sql +205 -0
- package/dist/starter/supabase/migrations/20261024000400_genesis_push.sql +524 -0
- package/dist/starter/supabase/migrations/20261024000600_genesis_support.sql +846 -0
- package/dist/starter/supabase/tests/database/genesis_account_deletion.test.sql +138 -0
- package/dist/starter/supabase/tests/database/genesis_app_release_policy.test.sql +148 -0
- package/dist/starter/supabase/tests/database/genesis_apple_token_revocation.test.sql +230 -0
- package/dist/starter/supabase/tests/database/genesis_push.test.sql +407 -0
- package/dist/starter/supabase/tests/database/genesis_support.test.sql +552 -0
- package/dist/starter/tailwind.config.mjs +15 -0
- package/dist/starter/tsconfig.json +14 -0
- package/dist/starter/vitest.config.mts +7 -0
- package/dist/templates/ci/app-ci.yml +17 -0
- package/dist/templates/ci/genesis-upgrade.yml +21 -0
- package/dist/templates/ci/supabase-ci.yml +20 -0
- package/dist/templates/eas/eas.json +47 -0
- package/dist/templates/eas/scripts/rollout-health.mjs +85 -0
- package/dist/templates/eas/workflows/deploy-production.yml +149 -0
- package/dist/templates/eas/workflows/e2e.yml +77 -0
- package/dist/templates/eas/workflows/pr-preview.yml +117 -0
- package/dist/templates/eas/workflows/rollout.yml +120 -0
- package/dist/templates/maestro/config.yaml +5 -0
- package/dist/templates/maestro/flows/deep-link.yaml +22 -0
- package/dist/templates/maestro/flows/launch.yaml +17 -0
- package/dist/templates/maestro/flows/settings-version.yaml +28 -0
- package/dist/templates/maestro/flows/sign-in-screen.yaml +17 -0
- package/dist/templates/maestro/subflows/sign-in.yaml +20 -0
- package/dist/vite.js +133 -5
- package/dist/vite.js.map +1 -1
- package/package.json +4 -4
|
@@ -198,11 +198,48 @@ interface GenesisLinks {
|
|
|
198
198
|
/** Also add `webcredentials:` domains (password autofill). Default true. */
|
|
199
199
|
webcredentials?: boolean;
|
|
200
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Apple's collected data types (`NSPrivacyCollectedDataType`), every one in
|
|
203
|
+
* Apple's reference, keyed by the stores' own words, lower case, as Genesis
|
|
204
|
+
* blocks name them in `privacy.collects`. Look one up with
|
|
205
|
+
* {@link privacyDataType}, which ignores case (blocks write `"device ID"`,
|
|
206
|
+
* `"user ID"`). The values are Apple's exact strings, `PhotosorVideos`
|
|
207
|
+
* included.
|
|
208
|
+
*/
|
|
209
|
+
declare const PRIVACY_DATA_TYPES: Readonly<Record<string, string>>;
|
|
210
|
+
/** Apple's string for a data type in the stores' words, whatever its case, or undefined. */
|
|
211
|
+
declare function privacyDataType(type: string): string | undefined;
|
|
212
|
+
/** Apple's collection purposes (`NSPrivacyCollectedDataTypePurposes`), by the stores' words. */
|
|
213
|
+
declare const PRIVACY_PURPOSES: Readonly<Record<string, string>>;
|
|
214
|
+
/** One kind of data the app collects, as a Genesis block's `privacy.collects` entry says it. */
|
|
215
|
+
interface GenesisDataUse {
|
|
216
|
+
/** A key of {@link PRIVACY_DATA_TYPES}: `"email address"`, `"user id"`, `"crash data"`… */
|
|
217
|
+
type: string;
|
|
218
|
+
/** Keys of {@link PRIVACY_PURPOSES}: `"app functionality"`, `"analytics"`… */
|
|
219
|
+
purposes: string[];
|
|
220
|
+
/** Tied to the person's identity. */
|
|
221
|
+
linked: boolean;
|
|
222
|
+
/** Used to track the person across other companies' apps and websites. */
|
|
223
|
+
tracking: boolean;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* The `privacy` block: what goes in the iOS privacy manifest's collected data
|
|
227
|
+
* types. Left out, the Genesis blocks the app's packages carry decide.
|
|
228
|
+
*/
|
|
229
|
+
interface GenesisPrivacy {
|
|
230
|
+
/** The Genesis blocks whose data the app sends anywhere (`account`, `observability`, `push`). Default: found from package.json. */
|
|
231
|
+
blocks?: string[];
|
|
232
|
+
/** Every kind of data the app collects. Replaces what the blocks give, so list everything. */
|
|
233
|
+
collects?: GenesisDataUse[];
|
|
234
|
+
/** `NSPrivacyTracking`. Default false; true needs `NSPrivacyTrackingDomains` in app.config. */
|
|
235
|
+
tracking?: boolean;
|
|
236
|
+
}
|
|
201
237
|
/** genesis.config.json, parsed, with its shared blocks validated. */
|
|
202
238
|
interface GenesisConfigFile {
|
|
203
239
|
/** The whole parsed file, for blocks other readers own (`doctor`, `features`). */
|
|
204
240
|
raw: Record<string, unknown>;
|
|
205
241
|
links?: GenesisLinks;
|
|
242
|
+
privacy?: GenesisPrivacy;
|
|
206
243
|
}
|
|
207
244
|
interface LoadedConfig {
|
|
208
245
|
config: DoctorConfig;
|
|
@@ -214,13 +251,19 @@ interface LoadedConfig {
|
|
|
214
251
|
declare function loadConfig(root: string, configPath?: string): LoadedConfig;
|
|
215
252
|
/**
|
|
216
253
|
* Reads `<root>/genesis.config.json` and validates its shared blocks (today:
|
|
217
|
-
* `links`). Returns null when the file doesn't exist; throws a
|
|
254
|
+
* `links` and `privacy`). Returns null when the file doesn't exist; throws a
|
|
218
255
|
* GenesisConfigError naming the file when it isn't valid.
|
|
219
256
|
*/
|
|
220
257
|
declare function readGenesisConfig(root: string): GenesisConfigFile | null;
|
|
258
|
+
/**
|
|
259
|
+
* Check a `privacy` block (genesis.config.json's, or the plugin's `privacy`
|
|
260
|
+
* option): a misspelt data type or purpose fails the build, since Xcode's
|
|
261
|
+
* privacy report ignores values it doesn't know.
|
|
262
|
+
*/
|
|
263
|
+
declare function validatePrivacy(raw: unknown, source?: string): GenesisPrivacy;
|
|
221
264
|
/** Check the `links` block, so a typo'd host fails the build instead of shipping links that never open. */
|
|
222
265
|
declare function validateLinks(raw: unknown, source?: string): GenesisLinks;
|
|
223
266
|
/** Check the shape, so a typo fails loudly instead of silently disabling a check. */
|
|
224
267
|
declare function validateConfig(raw: unknown, source?: string): DoctorConfig;
|
|
225
268
|
|
|
226
|
-
export { type AllowEntry as A, type DoctorConfig as D, type Finding as F, type
|
|
269
|
+
export { type AllowEntry as A, type DoctorConfig as D, type Finding as F, type GenesisDataUse as G, type Level as L, type NativePackConfig as N, PRIVACY_DATA_TYPES as P, type RuleSetting as R, type SourceFile as S, type GenesisPrivacy as a, type GenesisLinks as b, GenesisConfigError as c, PRIVACY_PURPOSES as d, validatePrivacy as e, DoctorConfigError as f, type DoctorContext as g, type DoctorPlugin as h, type DoctorResult as i, type GenesisConfigFile as j, type GenesisFacts as k, type PatternRule as l, type DoctorPack as m, type FindingInput as n, type PluginSpec as o, privacyDataType as p, type SupabasePackConfig as q, readGenesisConfig as r, loadConfig as s, validateConfig as t, validateLinks as v };
|
package/dist/doctor.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DoctorConfig,
|
|
2
|
-
export { A as AllowEntry,
|
|
1
|
+
import { D as DoctorConfig, k as GenesisFacts, l as PatternRule, h as DoctorPlugin, i as DoctorResult, F as Finding } from './config-CrZbM3jD.js';
|
|
2
|
+
export { A as AllowEntry, f as DoctorConfigError, g as DoctorContext, m as DoctorPack, n as FindingInput, c as GenesisConfigError, j as GenesisConfigFile, b as GenesisLinks, L as Level, N as NativePackConfig, o as PluginSpec, R as RuleSetting, S as SourceFile, q as SupabasePackConfig, s as loadConfig, r as readGenesisConfig, t as validateConfig, v as validateLinks } from './config-CrZbM3jD.js';
|
|
3
3
|
|
|
4
4
|
/** The installed folder of `name`, looking in node_modules from `from` upward (works with hoisting and pnpm). */
|
|
5
5
|
declare function findPackageDir(from: string, name: string): string | null;
|
package/dist/doctor.js
CHANGED
|
@@ -51,6 +51,54 @@ var GenesisConfigError = class extends Error {
|
|
|
51
51
|
var DoctorConfigError = class extends GenesisConfigError {
|
|
52
52
|
name = "DoctorConfigError";
|
|
53
53
|
};
|
|
54
|
+
var PRIVACY_DATA_TYPES = {
|
|
55
|
+
name: "NSPrivacyCollectedDataTypeName",
|
|
56
|
+
"email address": "NSPrivacyCollectedDataTypeEmailAddress",
|
|
57
|
+
"phone number": "NSPrivacyCollectedDataTypePhoneNumber",
|
|
58
|
+
"physical address": "NSPrivacyCollectedDataTypePhysicalAddress",
|
|
59
|
+
"other user contact info": "NSPrivacyCollectedDataTypeOtherUserContactInfo",
|
|
60
|
+
health: "NSPrivacyCollectedDataTypeHealth",
|
|
61
|
+
fitness: "NSPrivacyCollectedDataTypeFitness",
|
|
62
|
+
"payment info": "NSPrivacyCollectedDataTypePaymentInfo",
|
|
63
|
+
"credit info": "NSPrivacyCollectedDataTypeCreditInfo",
|
|
64
|
+
"other financial info": "NSPrivacyCollectedDataTypeOtherFinancialInfo",
|
|
65
|
+
"precise location": "NSPrivacyCollectedDataTypePreciseLocation",
|
|
66
|
+
"coarse location": "NSPrivacyCollectedDataTypeCoarseLocation",
|
|
67
|
+
"sensitive info": "NSPrivacyCollectedDataTypeSensitiveInfo",
|
|
68
|
+
contacts: "NSPrivacyCollectedDataTypeContacts",
|
|
69
|
+
"emails or text messages": "NSPrivacyCollectedDataTypeEmailsOrTextMessages",
|
|
70
|
+
"photos or videos": "NSPrivacyCollectedDataTypePhotosorVideos",
|
|
71
|
+
"audio data": "NSPrivacyCollectedDataTypeAudioData",
|
|
72
|
+
"gameplay content": "NSPrivacyCollectedDataTypeGameplayContent",
|
|
73
|
+
"customer support": "NSPrivacyCollectedDataTypeCustomerSupport",
|
|
74
|
+
"other user content": "NSPrivacyCollectedDataTypeOtherUserContent",
|
|
75
|
+
"browsing history": "NSPrivacyCollectedDataTypeBrowsingHistory",
|
|
76
|
+
"search history": "NSPrivacyCollectedDataTypeSearchHistory",
|
|
77
|
+
"user id": "NSPrivacyCollectedDataTypeUserID",
|
|
78
|
+
"device id": "NSPrivacyCollectedDataTypeDeviceID",
|
|
79
|
+
"purchase history": "NSPrivacyCollectedDataTypePurchaseHistory",
|
|
80
|
+
"product interaction": "NSPrivacyCollectedDataTypeProductInteraction",
|
|
81
|
+
"advertising data": "NSPrivacyCollectedDataTypeAdvertisingData",
|
|
82
|
+
"other usage data": "NSPrivacyCollectedDataTypeOtherUsageData",
|
|
83
|
+
"crash data": "NSPrivacyCollectedDataTypeCrashData",
|
|
84
|
+
"performance data": "NSPrivacyCollectedDataTypePerformanceData",
|
|
85
|
+
"other diagnostic data": "NSPrivacyCollectedDataTypeOtherDiagnosticData",
|
|
86
|
+
"environment scanning": "NSPrivacyCollectedDataTypeEnvironmentScanning",
|
|
87
|
+
hands: "NSPrivacyCollectedDataTypeHands",
|
|
88
|
+
head: "NSPrivacyCollectedDataTypeHead",
|
|
89
|
+
"other data types": "NSPrivacyCollectedDataTypeOtherDataTypes"
|
|
90
|
+
};
|
|
91
|
+
function privacyDataType(type) {
|
|
92
|
+
return PRIVACY_DATA_TYPES[type.toLowerCase()];
|
|
93
|
+
}
|
|
94
|
+
var PRIVACY_PURPOSES = {
|
|
95
|
+
"app functionality": "NSPrivacyCollectedDataTypePurposeAppFunctionality",
|
|
96
|
+
analytics: "NSPrivacyCollectedDataTypePurposeAnalytics",
|
|
97
|
+
"product personalization": "NSPrivacyCollectedDataTypePurposeProductPersonalization",
|
|
98
|
+
"developer advertising": "NSPrivacyCollectedDataTypePurposeDeveloperAdvertising",
|
|
99
|
+
"third-party advertising": "NSPrivacyCollectedDataTypePurposeThirdPartyAdvertising",
|
|
100
|
+
other: "NSPrivacyCollectedDataTypePurposeOther"
|
|
101
|
+
};
|
|
54
102
|
var STRING_LISTS = ["src", "extensions", "ignore", "tokenFiles", "ignoreTokenPrefixes", "localPrimitiveDirs", "build"];
|
|
55
103
|
var STRINGS = ["uiPackage", "rulesDoc"];
|
|
56
104
|
var KNOWN = /* @__PURE__ */ new Set([
|
|
@@ -115,8 +163,48 @@ function readGenesisConfig(root) {
|
|
|
115
163
|
if (!existsSync(file)) return null;
|
|
116
164
|
const raw = readJson(file);
|
|
117
165
|
if (!isObject(raw)) throw new GenesisConfigError(`${file}: the config must be a JSON object`);
|
|
118
|
-
const
|
|
119
|
-
|
|
166
|
+
const out = { raw };
|
|
167
|
+
if (raw.links !== void 0) out.links = validateLinks(raw.links, file);
|
|
168
|
+
if (raw.privacy !== void 0) out.privacy = validatePrivacy(raw.privacy, file);
|
|
169
|
+
return out;
|
|
170
|
+
}
|
|
171
|
+
var PRIVACY_KEYS = /* @__PURE__ */ new Set(["blocks", "collects", "tracking"]);
|
|
172
|
+
var DATA_USE_KEYS = /* @__PURE__ */ new Set(["type", "purposes", "linked", "tracking"]);
|
|
173
|
+
function validatePrivacy(raw, source = "config") {
|
|
174
|
+
const fail = (msg) => {
|
|
175
|
+
throw new GenesisConfigError(`${source}: ${msg}`);
|
|
176
|
+
};
|
|
177
|
+
if (!isObject(raw)) fail(`"privacy" must be an object`);
|
|
178
|
+
const c = raw;
|
|
179
|
+
for (const key of Object.keys(c)) if (!PRIVACY_KEYS.has(key)) fail(`privacy: unknown setting "${key}"`);
|
|
180
|
+
const out = {};
|
|
181
|
+
if (c.blocks !== void 0) {
|
|
182
|
+
if (!isStringList(c.blocks)) fail(`privacy.blocks must be a list of block ids`);
|
|
183
|
+
out.blocks = [...new Set(c.blocks)];
|
|
184
|
+
}
|
|
185
|
+
if (c.tracking !== void 0) {
|
|
186
|
+
if (typeof c.tracking !== "boolean") fail(`privacy.tracking must be true or false`);
|
|
187
|
+
out.tracking = c.tracking;
|
|
188
|
+
}
|
|
189
|
+
if (c.collects !== void 0) {
|
|
190
|
+
if (!Array.isArray(c.collects)) fail(`privacy.collects must be a list`);
|
|
191
|
+
out.collects = c.collects.map((entry, i) => {
|
|
192
|
+
const where = `privacy.collects[${i}]`;
|
|
193
|
+
if (!isObject(entry)) return fail(`${where} must be an object`);
|
|
194
|
+
for (const key of Object.keys(entry)) if (!DATA_USE_KEYS.has(key)) fail(`${where}: unknown setting "${key}"`);
|
|
195
|
+
if (typeof entry.type !== "string" || !privacyDataType(entry.type)) {
|
|
196
|
+
fail(`${where}.type "${String(entry.type)}" is not one of ${Object.keys(PRIVACY_DATA_TYPES).join(", ")}`);
|
|
197
|
+
}
|
|
198
|
+
if (!isStringList(entry.purposes) || entry.purposes.length === 0) fail(`${where}.purposes must be a non-empty list`);
|
|
199
|
+
for (const p of entry.purposes) {
|
|
200
|
+
if (!(p in PRIVACY_PURPOSES)) fail(`${where}.purposes: "${p}" is not one of ${Object.keys(PRIVACY_PURPOSES).join(", ")}`);
|
|
201
|
+
}
|
|
202
|
+
if (typeof entry.linked !== "boolean") fail(`${where}.linked must be true or false`);
|
|
203
|
+
if (typeof entry.tracking !== "boolean") fail(`${where}.tracking must be true or false`);
|
|
204
|
+
return { type: entry.type, purposes: [...new Set(entry.purposes)], linked: entry.linked, tracking: entry.tracking };
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
return out;
|
|
120
208
|
}
|
|
121
209
|
var LINK_KEYS = /* @__PURE__ */ new Set(["hosts", "paths", "webcredentials"]);
|
|
122
210
|
var HOST = /^(?=.{1,253}$)(\*\.)?([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/;
|
|
@@ -1019,11 +1107,51 @@ var NATIVE_WRAPPED_PRIMITIVES = Object.freeze({
|
|
|
1019
1107
|
function wrappedPrimitivesIn(namedImports) {
|
|
1020
1108
|
return namedImports.split(",").map((n) => n.trim()).filter((n) => n && !/^type\s/.test(n)).map((n) => n.split(/\s+as\s+/)[0].trim()).filter((n) => n && Object.hasOwn(NATIVE_WRAPPED_PRIMITIVES, n));
|
|
1021
1109
|
}
|
|
1110
|
+
var api = (category, ...reasons) => ({
|
|
1111
|
+
NSPrivacyAccessedAPIType: `NSPrivacyAccessedAPICategory${category}`,
|
|
1112
|
+
NSPrivacyAccessedAPITypeReasons: reasons
|
|
1113
|
+
});
|
|
1022
1114
|
var PRIVACY_APIS = {
|
|
1023
|
-
"
|
|
1024
|
-
|
|
1025
|
-
]
|
|
1115
|
+
"react-native": [api("FileTimestamp", "C617.1"), api("UserDefaults", "CA92.1"), api("SystemBootTime", "35F9.1")],
|
|
1116
|
+
expo: [api("FileTimestamp", "0A2A.1", "3B52.1"), api("DiskSpace", "E174.1", "85F4.1"), api("UserDefaults", "CA92.1")],
|
|
1117
|
+
"expo-updates": [api("UserDefaults", "CA92.1")],
|
|
1118
|
+
"expo-application": [api("FileTimestamp", "C617.1")],
|
|
1119
|
+
"expo-notifications": [api("UserDefaults", "CA92.1")],
|
|
1120
|
+
"@react-native-async-storage/async-storage": [api("FileTimestamp", "C617.1")],
|
|
1121
|
+
"@sentry/react-native": [api("UserDefaults", "CA92.1"), api("SystemBootTime", "35F9.1"), api("FileTimestamp", "C617.1")]
|
|
1026
1122
|
};
|
|
1123
|
+
var appFunctionality = (type, ...more) => ({
|
|
1124
|
+
type,
|
|
1125
|
+
purposes: ["app functionality", ...more],
|
|
1126
|
+
linked: true,
|
|
1127
|
+
tracking: false
|
|
1128
|
+
});
|
|
1129
|
+
({
|
|
1130
|
+
account: {
|
|
1131
|
+
collects: [appFunctionality("email address"), appFunctionality("user id"), appFunctionality("name")]
|
|
1132
|
+
},
|
|
1133
|
+
observability: {
|
|
1134
|
+
collects: [
|
|
1135
|
+
appFunctionality("crash data"),
|
|
1136
|
+
appFunctionality("performance data"),
|
|
1137
|
+
appFunctionality("other diagnostic data"),
|
|
1138
|
+
appFunctionality("user id", "analytics"),
|
|
1139
|
+
{ type: "product interaction", purposes: ["analytics"], linked: true, tracking: false }
|
|
1140
|
+
]
|
|
1141
|
+
},
|
|
1142
|
+
push: {
|
|
1143
|
+
collects: [appFunctionality("device ID")]
|
|
1144
|
+
},
|
|
1145
|
+
support: {
|
|
1146
|
+
collects: [
|
|
1147
|
+
appFunctionality("user id"),
|
|
1148
|
+
appFunctionality("customer support"),
|
|
1149
|
+
appFunctionality("other user content"),
|
|
1150
|
+
appFunctionality("photos or videos"),
|
|
1151
|
+
appFunctionality("other diagnostic data")
|
|
1152
|
+
]
|
|
1153
|
+
}
|
|
1154
|
+
});
|
|
1027
1155
|
function privacyApisFor(dependencies2) {
|
|
1028
1156
|
return Object.keys(PRIVACY_APIS).filter((pkg) => pkg in dependencies2).flatMap((pkg) => PRIVACY_APIS[pkg]);
|
|
1029
1157
|
}
|