@ankhorage/expo-runtime 3.0.1 → 3.0.3
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/CHANGELOG.md +13 -0
- package/dist/expoRuntimePlanningMetadata.d.ts +1 -1
- package/dist/expoRuntimePlanningMetadata.js +1 -1
- package/dist/expoRuntimePlanningMetadata.js.map +1 -1
- package/dist/generatedSources.js +1 -1
- package/dist/generatedSources.js.map +1 -1
- package/package.json +3 -3
- package/src/expoRuntimePlanningMetadata.ts +1 -1
- package/src/generatedSources.test.ts +11 -0
- package/src/generatedSources.ts +1 -1
- package/src/resolveExpoRuntimePlan.test.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ankhorage/expo-runtime
|
|
2
2
|
|
|
3
|
+
## 3.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 62d80af: Require the released permissions adapter with blocked, limited, iOS notification, and settings
|
|
8
|
+
recovery normalization in generated Expo runtime plans.
|
|
9
|
+
|
|
10
|
+
## 3.0.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- a6576bc: Emit the generated barcode-scanner adapter with the canonical source format.
|
|
15
|
+
|
|
3
16
|
## 3.0.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -26,7 +26,7 @@ export interface ExpoRuntimeHintMetadata {
|
|
|
26
26
|
readonly plugin?: ExpoRuntimeConfigPlugin;
|
|
27
27
|
}
|
|
28
28
|
export declare const GENERATED_RUNTIME_DEPENDENCY_VERSIONS: {
|
|
29
|
-
readonly '@ankhorage/permissions': "^0.2.
|
|
29
|
+
readonly '@ankhorage/permissions': "^0.2.3";
|
|
30
30
|
readonly '@ankhorage/expo-runtime': "^3.0.0";
|
|
31
31
|
};
|
|
32
32
|
export declare const EXPO_RUNTIME_PROVIDER_PACKAGES: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EXPO_PLATFORM } from './platform';
|
|
2
2
|
const GENERATED_ANKHORAGE_DEPENDENCY_VERSIONS = {
|
|
3
|
-
'@ankhorage/permissions': '^0.2.
|
|
3
|
+
'@ankhorage/permissions': '^0.2.3',
|
|
4
4
|
'@ankhorage/expo-runtime': '^3.0.0',
|
|
5
5
|
};
|
|
6
6
|
const GENERATED_EXPO_DEPENDENCY_VERSIONS = Object.fromEntries(Object.values(EXPO_PLATFORM.packages).map((dependency) => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expoRuntimePlanningMetadata.js","sourceRoot":"","sources":["../src/expoRuntimePlanningMetadata.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAA4B,MAAM,YAAY,CAAC;AAgCrE,MAAM,uCAAuC,GAAG;IAC9C,wBAAwB,EAAE,QAAQ;IAClC,yBAAyB,EAAE,QAAQ;CACM,CAAC;AAE5C,MAAM,kCAAkC,GAAG,MAAM,CAAC,WAAW,CAC3D,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,UAA+B,EAAE,EAAE,CAAC;IAC7E,UAAU,CAAC,IAAI;IACf,UAAU,CAAC,OAAO;CACnB,CAAC,CACiC,CAAC;AAEtC,MAAM,CAAC,MAAM,qCAAqC,GAAG;IACnD,GAAG,uCAAuC;IAC1C,GAAG,kCAAkC;CACc,CAAC;AAEtD,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,WAAW,EAAE,wBAAwB;CACmB,CAAC;AAE3D,MAAM,yBAAyB,GAAG;IAChC,gBAAgB,EAAE;QAChB,MAAM,EAAE;YACN,IAAI,EAAE,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI;YACxC,OAAO,EAAE;gBACP,qBAAqB,EAAE,KAAK;gBAC5B,gBAAgB,EAAE,sBAAsB;gBACxC,oBAAoB,EAAE,KAAK;gBAC3B,kBAAkB,EA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AAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;QACrD,eAAe,EAAE,YAAY;QAC7B,WAAW,EAAE,UAAU;QACvB,OAAO,EAAE,6BAA6B,UAAU,SAAS,OAAO,IAAI;QACpE,OAAO;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,UAAkB;IAC5D,OAAO;QACL,QAAQ,EAAE,SAAS;QACnB,eAAe,EAAE,YAAY;QAC7B,WAAW,EAAE,UAAU;QACvB,OAAO,EAAE,0DAA0D,UAAU,IAAI;KAClF,CAAC;AACJ,CAAC","sourcesContent":["import type {\n AnkhorageCapabilityName,\n ScreenCapabilityRequirement,\n ScreenPermissionRequirement,\n} from '@ankhorage/contracts';\nimport type { PermissionSupport } from '@ankhorage/permissions/expo/manifest';\n\nimport { EXPO_PLATFORM, type ExpoPlatformPackage } from './platform';\n\nexport interface ExpoRuntimeConfigPlugin {\n readonly name: string;\n readonly options?: Readonly<Record<string, boolean | string>>;\n}\n\nexport type ExpoRuntimeProviderId = 'permissions';\nexport type ExpoRuntimeAdapterId = 'ExpoBarcodeScannerAdapter';\n\nexport interface ExpoRuntimeDiagnostic {\n readonly severity: 'error' | 'warning';\n readonly requirementType: 'capability' | 'configHint' | 'package' | 'permission';\n readonly requirement: string;\n readonly message: string;\n readonly support?: PermissionSupport;\n}\n\nexport interface ExpoRuntimeCapabilityMetadata {\n readonly impliedPermissions?: readonly ScreenPermissionRequirement[];\n readonly requiredPackages?: readonly string[];\n readonly providers?: readonly ExpoRuntimeProviderId[];\n readonly runtimeAdapters?: readonly ExpoRuntimeAdapterId[];\n readonly androidPermissions?: readonly string[];\n readonly plugins?: readonly ExpoRuntimeConfigPlugin[];\n}\n\nexport interface ExpoRuntimeHintMetadata {\n readonly androidPermissions?: readonly string[];\n readonly plugin?: ExpoRuntimeConfigPlugin;\n}\n\nconst GENERATED_ANKHORAGE_DEPENDENCY_VERSIONS = {\n '@ankhorage/permissions': '^0.2.
|
|
1
|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,CAAC;AACJ,CAAC","sourcesContent":["import type {\n AnkhorageCapabilityName,\n ScreenCapabilityRequirement,\n ScreenPermissionRequirement,\n} from '@ankhorage/contracts';\nimport type { PermissionSupport } from '@ankhorage/permissions/expo/manifest';\n\nimport { EXPO_PLATFORM, type ExpoPlatformPackage } from './platform';\n\nexport interface ExpoRuntimeConfigPlugin {\n readonly name: string;\n readonly options?: Readonly<Record<string, boolean | string>>;\n}\n\nexport type ExpoRuntimeProviderId = 'permissions';\nexport type ExpoRuntimeAdapterId = 'ExpoBarcodeScannerAdapter';\n\nexport interface ExpoRuntimeDiagnostic {\n readonly severity: 'error' | 'warning';\n readonly requirementType: 'capability' | 'configHint' | 'package' | 'permission';\n readonly requirement: string;\n readonly message: string;\n readonly support?: PermissionSupport;\n}\n\nexport interface ExpoRuntimeCapabilityMetadata {\n readonly impliedPermissions?: readonly ScreenPermissionRequirement[];\n readonly requiredPackages?: readonly string[];\n readonly providers?: readonly ExpoRuntimeProviderId[];\n readonly runtimeAdapters?: readonly ExpoRuntimeAdapterId[];\n readonly androidPermissions?: readonly string[];\n readonly plugins?: readonly ExpoRuntimeConfigPlugin[];\n}\n\nexport interface ExpoRuntimeHintMetadata {\n readonly androidPermissions?: readonly string[];\n readonly plugin?: ExpoRuntimeConfigPlugin;\n}\n\nconst GENERATED_ANKHORAGE_DEPENDENCY_VERSIONS = {\n '@ankhorage/permissions': '^0.2.3',\n '@ankhorage/expo-runtime': '^3.0.0',\n} as const satisfies Record<string, string>;\n\nconst GENERATED_EXPO_DEPENDENCY_VERSIONS = Object.fromEntries(\n Object.values(EXPO_PLATFORM.packages).map((dependency: ExpoPlatformPackage) => [\n dependency.name,\n dependency.version,\n ]),\n) as Readonly<Record<string, string>>;\n\nexport const GENERATED_RUNTIME_DEPENDENCY_VERSIONS = {\n ...GENERATED_ANKHORAGE_DEPENDENCY_VERSIONS,\n ...GENERATED_EXPO_DEPENDENCY_VERSIONS,\n} as const satisfies Readonly<Record<string, string>>;\n\nexport const EXPO_RUNTIME_PROVIDER_PACKAGES = {\n permissions: '@ankhorage/permissions',\n} as const satisfies Record<ExpoRuntimeProviderId, string>;\n\nconst EXPO_RUNTIME_CONFIG_HINTS = {\n cameraPermission: {\n plugin: {\n name: EXPO_PLATFORM.packages.camera.name,\n options: {\n barcodeScannerEnabled: false,\n cameraPermission: 'Allow camera access.',\n microphonePermission: false,\n recordAudioAndroid: false,\n },\n },\n },\n microphonePermission: {\n plugin: {\n name: EXPO_PLATFORM.packages.audio.name,\n options: {\n enableBackgroundPlayback: false,\n enableBackgroundRecording: false,\n microphonePermission: 'Allow microphone access.',\n },\n },\n },\n recordAudioAndroid: {\n plugin: {\n name: EXPO_PLATFORM.packages.audio.name,\n options: {\n enableBackgroundPlayback: false,\n enableBackgroundRecording: false,\n recordAudioAndroid: true,\n },\n },\n },\n mediaLibraryPermission: {\n plugin: {\n name: EXPO_PLATFORM.packages.mediaLibrary.name,\n options: {\n photosPermission: 'Allow photo library access.',\n savePhotosPermission: 'Allow saving to the photo library.',\n },\n },\n },\n locationWhenInUsePermission: {\n plugin: {\n name: EXPO_PLATFORM.packages.location.name,\n options: {\n locationWhenInUsePermission: 'Allow location access while using the app.',\n },\n },\n },\n locationAlwaysAndWhenInUsePermission: {\n plugin: {\n name: EXPO_PLATFORM.packages.location.name,\n options: {\n locationAlwaysAndWhenInUsePermission: 'Allow location access.',\n isAndroidBackgroundLocationEnabled: true,\n isAndroidForegroundServiceEnabled: true,\n isIosBackgroundLocationEnabled: true,\n },\n },\n },\n notificationsPermission: {\n plugin: {\n name: EXPO_PLATFORM.packages.notifications.name,\n },\n },\n} as const satisfies Readonly<Record<string, ExpoRuntimeHintMetadata>>;\n\nexport const EXPO_CAPABILITY_RUNTIME_REGISTRY = {\n barcodeScanner: {\n impliedPermissions: [{ permission: 'camera' }],\n requiredPackages: [EXPO_PLATFORM.packages.camera.name],\n providers: ['permissions'],\n runtimeAdapters: ['ExpoBarcodeScannerAdapter'],\n plugins: [\n {\n name: EXPO_PLATFORM.packages.camera.name,\n options: {\n cameraPermission: 'Allow camera access to scan barcodes.',\n barcodeScannerEnabled: true,\n microphonePermission: false,\n recordAudioAndroid: false,\n },\n },\n ],\n },\n} as const satisfies Readonly<\n Partial<Record<AnkhorageCapabilityName, ExpoRuntimeCapabilityMetadata>>\n>;\n\nexport function findCapabilityMetadata(\n registry: Readonly<Partial<Record<AnkhorageCapabilityName, ExpoRuntimeCapabilityMetadata>>>,\n requirement: ScreenCapabilityRequirement,\n): ExpoRuntimeCapabilityMetadata | undefined {\n return Object.entries(registry).find(([name]) => name === requirement.capability)?.[1];\n}\n\nexport function findConfigHintMetadata(configHint: string): ExpoRuntimeHintMetadata | undefined {\n return Object.entries(EXPO_RUNTIME_CONFIG_HINTS).find(([name]) => name === configHint)?.[1];\n}\n\nexport function unknownPermissionDiagnostic(permission: string): ExpoRuntimeDiagnostic {\n return {\n severity: 'error',\n requirementType: 'permission',\n requirement: permission,\n message: `Unknown permission '${permission}' cannot be resolved for Expo runtime generation.`,\n };\n}\n\nexport function unsupportedPermissionDiagnostic(\n permission: string,\n support: PermissionSupport,\n): ExpoRuntimeDiagnostic {\n return {\n severity: support === 'limited' ? 'warning' : 'error',\n requirementType: 'permission',\n requirement: permission,\n message: `Expo runtime support for '${permission}' is '${support}'.`,\n support,\n };\n}\n\nexport function unknownCapabilityDiagnostic(capability: string): ExpoRuntimeDiagnostic {\n return {\n severity: 'warning',\n requirementType: 'capability',\n requirement: capability,\n message: `No Expo runtime metadata is registered for capability '${capability}'.`,\n };\n}\n"]}
|
package/dist/generatedSources.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatedSources.js","sourceRoot":"","sources":["../src/generatedSources.ts"],"names":[],"mappings":"AAAA,MAAM,gCAAgC,GAAG;IACvC,gEAAgE;IAChE,kCAAkC;IAClC,IAAI;CACI,CAAC;AAEX,MAAM,UAAU,+BAA+B;IAC7C,OAAO,gCAAgC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACnD,CAAC","sourcesContent":["const EXPO_BARCODE_SCANNER_VIEW_SOURCE = [\n 'export { ExpoBarcodeScannerAdapter as ExpoBarcodeScannerView }',\n
|
|
1
|
+
{"version":3,"file":"generatedSources.js","sourceRoot":"","sources":["../src/generatedSources.ts"],"names":[],"mappings":"AAAA,MAAM,gCAAgC,GAAG;IACvC,gEAAgE;IAChE,kCAAkC;IAClC,IAAI;CACI,CAAC;AAEX,MAAM,UAAU,+BAA+B;IAC7C,OAAO,gCAAgC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACnD,CAAC","sourcesContent":["const EXPO_BARCODE_SCANNER_VIEW_SOURCE = [\n 'export { ExpoBarcodeScannerAdapter as ExpoBarcodeScannerView }',\n \" from '@ankhorage/expo-runtime';\",\n '\\n',\n] as const;\n\nexport function getExpoBarcodeScannerViewSource(): string {\n return EXPO_BARCODE_SCANNER_VIEW_SOURCE.join('');\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/expo-runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.3",
|
|
5
5
|
"description": "Declarative runtime integration for Expo apps: maps app capabilities to permissions, packages, config plugins, providers, and adapters",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/expo-runtime#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"version-packages": "changeset version"
|
|
118
118
|
},
|
|
119
119
|
"peerDependencies": {
|
|
120
|
-
"@ankhorage/permissions": "^0.2.
|
|
120
|
+
"@ankhorage/permissions": "^0.2.3",
|
|
121
121
|
"@ankhorage/zora": "^3.0.0",
|
|
122
122
|
"expo": "~57.0.15",
|
|
123
123
|
"expo-camera": "~57.0.4",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"devDependencies": {
|
|
164
164
|
"@ankhorage/devtools": "^1.6.0",
|
|
165
165
|
"@ankhorage/paradox": "^0.1.21",
|
|
166
|
-
"@ankhorage/permissions": "^0.2.
|
|
166
|
+
"@ankhorage/permissions": "^0.2.3",
|
|
167
167
|
"@ankhorage/zora": "^3.0.0",
|
|
168
168
|
"@changesets/cli": "^2.31.0",
|
|
169
169
|
"@react-native-picker/picker": "2.11.4",
|
|
@@ -38,7 +38,7 @@ export interface ExpoRuntimeHintMetadata {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
const GENERATED_ANKHORAGE_DEPENDENCY_VERSIONS = {
|
|
41
|
-
'@ankhorage/permissions': '^0.2.
|
|
41
|
+
'@ankhorage/permissions': '^0.2.3',
|
|
42
42
|
'@ankhorage/expo-runtime': '^3.0.0',
|
|
43
43
|
} as const satisfies Record<string, string>;
|
|
44
44
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import { getExpoBarcodeScannerViewSource } from './generatedSources';
|
|
4
|
+
|
|
5
|
+
describe('generated Expo runtime sources', () => {
|
|
6
|
+
it('emits the barcode scanner view adapter in canonical source format', () => {
|
|
7
|
+
expect(getExpoBarcodeScannerViewSource()).toBe(
|
|
8
|
+
"export { ExpoBarcodeScannerAdapter as ExpoBarcodeScannerView } from '@ankhorage/expo-runtime';\n",
|
|
9
|
+
);
|
|
10
|
+
});
|
|
11
|
+
});
|
package/src/generatedSources.ts
CHANGED
|
@@ -196,7 +196,7 @@ describe('resolveExpoRuntimePlan platform-neutral permissions', () => {
|
|
|
196
196
|
|
|
197
197
|
const SUPPORTED_PERMISSION_DEPENDENCIES = [
|
|
198
198
|
{ name: '@ankhorage/expo-runtime', version: '^3.0.0' },
|
|
199
|
-
{ name: '@ankhorage/permissions', version: '^0.2.
|
|
199
|
+
{ name: '@ankhorage/permissions', version: '^0.2.3' },
|
|
200
200
|
{ name: 'expo-audio', version: EXPO_PLATFORM.packages.audio.version },
|
|
201
201
|
{ name: 'expo-location', version: EXPO_PLATFORM.packages.location.version },
|
|
202
202
|
{ name: 'expo-media-library', version: EXPO_PLATFORM.packages.mediaLibrary.version },
|