@microsoft/power-apps-native-host 0.3.0 → 0.4.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.
Files changed (66) hide show
  1. package/README.md +1 -9
  2. package/compatibility/current.json +31 -3
  3. package/lib/NOTICE.txt +1323 -16
  4. package/lib/commonjs/auth/AuthContext.js +36 -15
  5. package/lib/commonjs/config/babelConfig.js +13 -0
  6. package/lib/commonjs/config/expoConfig.js +71 -0
  7. package/lib/commonjs/config/metroConfig.js +70 -0
  8. package/lib/commonjs/config/metroLogger.js +182 -0
  9. package/lib/commonjs/config/tamaguiConfig.js +98 -0
  10. package/lib/commonjs/connections/resolveConnections.js +3 -2
  11. package/lib/commonjs/connections/useConnectionRefs.js +3 -1
  12. package/lib/commonjs/index.js +3 -2
  13. package/lib/commonjs/offline/useOfflineIntegrationWithStartupGate.js +3 -1
  14. package/lib/commonjs/platform/DataverseDataSources.js +4 -0
  15. package/lib/commonjs/platform/DataverseGlobalDiscoveryApi.js +45 -0
  16. package/lib/commonjs/provider/PowerAppsHostProvider.js +1 -0
  17. package/lib/commonjs/provider/PowerAppsProvider.js +13 -8
  18. package/lib/commonjs/provider/SessionDetailsGesture.js +1 -9
  19. package/lib/commonjs/telemetry/index.js +2 -2
  20. package/lib/module/auth/AuthContext.js +36 -15
  21. package/lib/module/config/babelConfig.js +9 -0
  22. package/lib/module/config/expoConfig.js +67 -0
  23. package/lib/module/config/metroConfig.js +65 -0
  24. package/{scripts/metro-logger.js → lib/module/config/metroLogger.js} +58 -96
  25. package/lib/module/config/tamaguiConfig.js +93 -0
  26. package/lib/module/connections/resolveConnections.js +3 -2
  27. package/lib/module/connections/useConnectionRefs.js +3 -1
  28. package/lib/module/index.js +5 -1
  29. package/lib/module/offline/useOfflineIntegrationWithStartupGate.js +3 -1
  30. package/lib/module/platform/DataverseDataSources.js +3 -0
  31. package/lib/module/platform/DataverseGlobalDiscoveryApi.js +44 -0
  32. package/lib/module/provider/PowerAppsHostProvider.js +2 -1
  33. package/lib/module/provider/PowerAppsProvider.js +14 -9
  34. package/lib/module/provider/SessionDetailsGesture.js +1 -9
  35. package/lib/module/telemetry/index.js +1 -1
  36. package/lib/typescript/commonjs/config/babelConfig.d.ts +12 -0
  37. package/lib/typescript/commonjs/config/expoConfig.d.ts +21 -0
  38. package/lib/typescript/commonjs/config/metroConfig.d.ts +6 -0
  39. package/lib/typescript/commonjs/config/metroLogger.d.ts +21 -0
  40. package/lib/typescript/commonjs/config/tamaguiConfig.d.ts +1792 -0
  41. package/lib/typescript/commonjs/connections/resolveConnections.d.ts +3 -1
  42. package/lib/typescript/commonjs/connections/useConnectionRefs.d.ts +3 -1
  43. package/lib/typescript/commonjs/index.d.ts +4 -3
  44. package/lib/typescript/commonjs/platform/DataverseDataSources.d.ts +1 -0
  45. package/lib/typescript/commonjs/provider/PowerAppsProvider.d.ts +28 -5
  46. package/lib/typescript/commonjs/telemetry/index.d.ts +2 -2
  47. package/lib/typescript/module/config/babelConfig.d.ts +12 -0
  48. package/lib/typescript/module/config/expoConfig.d.ts +21 -0
  49. package/lib/typescript/module/config/metroConfig.d.ts +6 -0
  50. package/lib/typescript/module/config/metroLogger.d.ts +21 -0
  51. package/lib/typescript/module/config/tamaguiConfig.d.ts +1792 -0
  52. package/lib/typescript/module/connections/resolveConnections.d.ts +3 -1
  53. package/lib/typescript/module/connections/useConnectionRefs.d.ts +3 -1
  54. package/lib/typescript/module/index.d.ts +4 -3
  55. package/lib/typescript/module/platform/DataverseDataSources.d.ts +1 -0
  56. package/lib/typescript/module/provider/PowerAppsProvider.d.ts +28 -5
  57. package/lib/typescript/module/telemetry/index.d.ts +2 -2
  58. package/package.json +47 -13
  59. package/scripts/build-codegen-package.js +283 -0
  60. package/scripts/start-web.mjs +9 -5
  61. package/scripts/upgrade/runtime.js +126 -17
  62. package/scripts/upgrade-authoring.js +274 -179
  63. package/scripts/upgrade.js +10 -16
  64. package/src/config/generated-config.d.ts +4 -0
  65. package/src/config/index.d.ts +3 -0
  66. package/src/config/tsconfig.json +26 -0
@@ -0,0 +1,12 @@
1
+ export interface BabelConfigApi {
2
+ cache(value: boolean): void;
3
+ }
4
+ export interface PowerAppsBabelConfigOptions {
5
+ presets?: unknown[];
6
+ plugins?: unknown[];
7
+ }
8
+ export declare function createPowerAppsBabelConfig(api: BabelConfigApi, options?: PowerAppsBabelConfigOptions): {
9
+ presets: unknown[];
10
+ plugins: unknown[];
11
+ };
12
+ //# sourceMappingURL=babelConfig.d.ts.map
@@ -0,0 +1,21 @@
1
+ import type { ConfigContext, ExpoConfig } from 'expo/config';
2
+ export interface PowerAppsExpoConfigSettings {
3
+ name: string;
4
+ slug: string;
5
+ scheme: string;
6
+ androidPackage: string;
7
+ iosBundleIdentifier: string;
8
+ version: string;
9
+ versionCode: number;
10
+ iconPath?: string | null;
11
+ /**
12
+ * Optional splash image. When omitted, falls back to the `APP_SPLASH_PATH`
13
+ * environment variable and then to the branding placeholder, so the template
14
+ * needs no wiring of its own and prebuild always emits replaceable slots.
15
+ */
16
+ splashPath?: string | null;
17
+ isDevClient?: boolean;
18
+ }
19
+ export type CustomizePowerAppsExpoConfig = (config: ExpoConfig) => ExpoConfig;
20
+ export declare function createPowerAppsExpoConfig(baseConfig: ConfigContext['config'], settings: PowerAppsExpoConfigSettings, customize?: CustomizePowerAppsExpoConfig): ExpoConfig;
21
+ //# sourceMappingURL=expoConfig.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { getDefaultConfig } from 'expo/metro-config.js';
2
+ type PowerAppsMetroConfig = ReturnType<typeof getDefaultConfig>;
3
+ type CustomizeMetroConfig = (config: PowerAppsMetroConfig) => PowerAppsMetroConfig;
4
+ export declare function createPowerAppsMetroConfig(projectRoot: string, customize?: CustomizeMetroConfig): PowerAppsMetroConfig;
5
+ export {};
6
+ //# sourceMappingURL=metroConfig.d.ts.map
@@ -0,0 +1,21 @@
1
+ import type { IncomingMessage, ServerResponse } from 'node:http';
2
+ type InstrumentationContext = {
3
+ phase: string;
4
+ logPath: string;
5
+ };
6
+ type InstrumentationErrorHandler = (error: Error, context: InstrumentationContext) => void;
7
+ type MetroNext = (error?: Error) => void;
8
+ export type MetroMiddleware = (request: IncomingMessage, response: ServerResponse, next: MetroNext) => unknown;
9
+ export type MetroLoggingOptions = {
10
+ projectRoot?: string;
11
+ maxBodyBytes?: number;
12
+ onError?: InstrumentationErrorHandler;
13
+ };
14
+ export declare function redactMetroLog(value: unknown): string;
15
+ export declare function enablePowerNativeMetroLogging(options?: MetroLoggingOptions): {
16
+ logDir: string;
17
+ logPath: string;
18
+ };
19
+ export declare function withPowerNativeMetroLogging(middleware: MetroMiddleware, options?: MetroLoggingOptions): MetroMiddleware;
20
+ export {};
21
+ //# sourceMappingURL=metroLogger.d.ts.map