bleam 0.0.10 → 0.0.12

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 (90) hide show
  1. package/dist/ai.cjs +1872 -1182
  2. package/dist/ai.d.cts +267 -234
  3. package/dist/ai.d.ts +267 -234
  4. package/dist/ai.js +1859 -1167
  5. package/dist/cli.cjs +3 -183
  6. package/dist/cli.d.cts +3 -47
  7. package/dist/cli.d.ts +3 -47
  8. package/dist/cli.js +3 -183
  9. package/dist/config.d.cts +1 -1
  10. package/dist/config.d.ts +1 -1
  11. package/dist/{files-Ds1wT8C2.js → files-BXVkPrPN.js} +6 -1
  12. package/dist/{files-Bo7h9fik.cjs → files-DxaQ-Nv0.cjs} +11 -0
  13. package/dist/files.cjs +1 -1
  14. package/dist/files.js +1 -1
  15. package/dist/index.d.cts +1 -1
  16. package/dist/index.d.ts +1 -1
  17. package/dist/platform.cjs +1 -13
  18. package/dist/platform.d.cts +1 -28
  19. package/dist/platform.d.ts +1 -28
  20. package/dist/platform.js +1 -10
  21. package/dist/schema-B5BfdswF.js +226 -0
  22. package/dist/schema-BnVZOXfu.cjs +286 -0
  23. package/dist/schema-D5eImHxu.d.cts +125 -0
  24. package/dist/schema-SSjokbtw.d.ts +125 -0
  25. package/dist/schema.cjs +10 -2
  26. package/dist/schema.d.cts +2 -2
  27. package/dist/schema.d.ts +2 -2
  28. package/dist/schema.js +2 -2
  29. package/dist/state-Dh3HLixb.js +874 -0
  30. package/dist/state-LssDgpff.cjs +973 -0
  31. package/dist/state.cjs +16 -12
  32. package/dist/state.d.cts +144 -140
  33. package/dist/state.d.ts +145 -140
  34. package/dist/state.js +3 -3
  35. package/dist/{ui-Bg11tvlc.d.ts → ui-1WepaMS4.d.cts} +1 -1
  36. package/dist/{ui-Dd7SXdbg.d.cts → ui-D7bRLYee.d.ts} +7 -7
  37. package/dist/ui.d.cts +1 -1
  38. package/dist/ui.d.ts +1 -1
  39. package/dist/window.d.cts +1 -1
  40. package/dist/window.d.ts +1 -1
  41. package/package.json +3 -1
  42. package/templates/foundation-models/app/index.tsx +77 -15
  43. package/templates/image-generation/app/index.tsx +4 -2
  44. package/templates/native/ios/Bleam/AI/Flux2/Configuration/ModelRegistry.swift +1 -1
  45. package/templates/native/ios/Bleam/AI/Flux2/Pipeline/FluxImageRunner.swift +7 -2
  46. package/templates/native/ios/Bleam/AI/TextGeneration/Bonsai/BonsaiTextGenerator.swift +46 -0
  47. package/templates/native/ios/Bleam/AI/TextGeneration/Bonsai/BonsaiTextModel.swift +107 -0
  48. package/templates/native/ios/Bleam/AI/TextGeneration/Bonsai/BonsaiTextSnapshotValidator.swift +201 -0
  49. package/templates/native/ios/Bleam/AI/TextGeneration/Core/GenerationTypes.swift +85 -0
  50. package/templates/native/ios/Bleam/AI/TextGeneration/Core/ModelCapabilities.swift +21 -0
  51. package/templates/native/ios/Bleam/AI/TextGeneration/Core/TextKVCache.swift +23 -0
  52. package/templates/native/ios/Bleam/AI/TextGeneration/Core/TokenSampler.swift +79 -0
  53. package/templates/native/ios/Bleam/AI/TextGeneration/Qwen3/Qwen3CheckpointLoader.swift +161 -0
  54. package/templates/native/ios/Bleam/AI/TextGeneration/Qwen3/Qwen3Configuration.swift +119 -0
  55. package/templates/native/ios/Bleam/AI/TextGeneration/Qwen3/Qwen3InferenceSession.swift +84 -0
  56. package/templates/native/ios/Bleam/AI/TextGeneration/Qwen3/Qwen3Layers.swift +197 -0
  57. package/templates/native/ios/Bleam/AI/TextGeneration/Qwen3/Qwen3Model.swift +130 -0
  58. package/templates/native/ios/Bleam/AI/TextGeneration/Qwen35/Qwen35Checkpoint.swift +102 -0
  59. package/templates/native/ios/Bleam/AI/TextGeneration/Qwen35/Qwen35Configuration.swift +140 -0
  60. package/templates/native/ios/Bleam/AI/TextGeneration/Qwen35/Qwen35Model.swift +112 -0
  61. package/templates/native/ios/Bleam/AI/TextGeneration/Qwen35/Qwen35Session.swift +121 -0
  62. package/templates/native/ios/Bleam/AI/TextGeneration/QwenHybrid/QwenHybridCache.swift +42 -0
  63. package/templates/native/ios/Bleam/AI/TextGeneration/QwenHybrid/QwenHybridFullAttention.swift +57 -0
  64. package/templates/native/ios/Bleam/AI/TextGeneration/QwenHybrid/QwenHybridLayers.swift +58 -0
  65. package/templates/native/ios/Bleam/AI/TextGeneration/QwenHybrid/QwenHybridLinearAttention.swift +111 -0
  66. package/templates/native/ios/Bleam/AppDelegate.swift +0 -206
  67. package/templates/native/ios/Bleam.xcodeproj/project.pbxproj +135 -129
  68. package/templates/native/ios/GenerationService/BonsaiTextGenerationRunner.swift +103 -0
  69. package/templates/native/ios/GenerationService/ImageGenerationRunner.swift +19 -7
  70. package/templates/native/ios/GenerationService/main.swift +174 -48
  71. package/templates/native/ios/Podfile.lock +173 -173
  72. package/templates/native/ios/Shared/Generation/GenerationServiceProtocol.swift +3 -0
  73. package/templates/native/ios/Shared/Generation/GenerationWorkerProtocol.swift +44 -0
  74. package/templates/native/modules/bleam-runtime/ios/AIModule.swift +239 -341
  75. package/templates/native/modules/bleam-runtime/ios/GenerationContracts.swift +47 -0
  76. package/templates/native/modules/bleam-runtime/ios/PlatformModule.swift +0 -191
  77. package/templates/text-generation/app/index.tsx +124 -0
  78. package/templates/text-generation/app.config.ts +5 -0
  79. package/templates/updates/README.md +43 -199
  80. package/templates/updates/src/index.ts +5 -98
  81. package/templates/updates/src/schema.ts +18 -173
  82. package/dist/schema-Bo5Jvqus.js +0 -90
  83. package/dist/schema-DOOjfXvs.d.ts +0 -58
  84. package/dist/schema-ENSMX_1t.d.cts +0 -58
  85. package/dist/schema-rQ13mrpD.cjs +0 -102
  86. package/dist/state-Bx0VlTlO.cjs +0 -852
  87. package/dist/state-CAwe-Vw1.js +0 -767
  88. package/templates/native/ios/PlatformHelper/main.swift +0 -726
  89. /package/dist/{config-Cms0rvqg.d.ts → config-COcRnn5a.d.cts} +0 -0
  90. /package/dist/{config-CufOVJV3.d.cts → config-Chi-flpJ.d.ts} +0 -0
package/dist/cli.js CHANGED
@@ -85,8 +85,6 @@ Commands:
85
85
  Build and install a standalone macOS app
86
86
  publish ota [dir] [--service-url <url>]
87
87
  Publish an OTA update to the local update service
88
- publish platform [dir] [--service-url <url>] [--redeploy]
89
- Build and publish a platform update locally
90
88
  doctor [dir] Check the local Bleam environment
91
89
  typecheck [dir] Typecheck project files
92
90
  check [dir] [--write] Format, lint, and organize imports
@@ -121,13 +119,6 @@ function parsePublishOtaOptions(argv) {
121
119
  serviceUrl: url.origin
122
120
  };
123
121
  }
124
- function parsePublishPlatformOptions(argv) {
125
- const redeploy = argv.includes("--redeploy");
126
- return {
127
- ...parsePublishOtaOptions(argv.filter((argument) => argument !== "--redeploy")),
128
- redeploy
129
- };
130
- }
131
122
  function invocationRoot() {
132
123
  const pwd = process.env.PWD;
133
124
  return pwd && path.isAbsolute(pwd) ? pwd : process.cwd();
@@ -186,7 +177,7 @@ function parseDevOptions(argv) {
186
177
  function parseNewOptions(argv) {
187
178
  const root = invocationRoot();
188
179
  let projectRoot;
189
- let template = "basic";
180
+ let template = "text-generation";
190
181
  for (let index = 0; index < argv.length; index += 1) {
191
182
  const arg = argv[index];
192
183
  if (arg === "--help" || arg === "-h") {
@@ -215,6 +206,7 @@ const projectTemplates = [
215
206
  "basic",
216
207
  "state",
217
208
  "foundation-models",
209
+ "text-generation",
218
210
  "image-generation"
219
211
  ];
220
212
  function projectTemplate(value) {
@@ -717,27 +709,6 @@ function prepareNativeIcon(nativeRoot, iconPath) {
717
709
  }
718
710
  }, null, 2)}\n`);
719
711
  }
720
- function platformInputFingerprint(config) {
721
- const iconSha256 = config.iconPath ? sha256(config.iconPath) : null;
722
- return createHash("sha256").update(JSON.stringify({
723
- schemaVersion: 1,
724
- bleamPlatformVersion: config.runtimeVersion,
725
- name: config.name,
726
- appVersion: config.version ?? "1.0.0",
727
- buildNumber: config.buildNumber,
728
- bundleIdentifier: config.bundleIdentifier,
729
- teamIdentifier: config.teamId,
730
- appGroups: config.appGroups,
731
- appearance: config.appearance,
732
- iconSha256,
733
- updateServiceUrl: process.env.BLEAM_UPDATE_SERVICE_URL ?? localUpdateServiceUrl,
734
- target: {
735
- os: "macos",
736
- architecture: "arm64",
737
- minimumMacOSVersion: "14.0"
738
- }
739
- })).digest("hex");
740
- }
741
712
  function patchNativeProject(nativeRoot, config) {
742
713
  const projectPath = path.join(nativeRoot, "ios", "Bleam.xcodeproj", "project.pbxproj");
743
714
  const infoPlistPath = path.join(nativeRoot, "ios", "Bleam", "Info.plist");
@@ -751,7 +722,6 @@ function patchNativeProject(nativeRoot, config) {
751
722
  const version = xcodeSettingValue(config.version ?? "1.0.0");
752
723
  const buildNumber = xcodeSettingValue(config.buildNumber);
753
724
  const primaryAppGroup = config.appGroups[0];
754
- const fingerprint = platformInputFingerprint(config);
755
725
  let project = readFileSync(projectPath, "utf8");
756
726
  project = project.replace(/PRODUCT_BUNDLE_IDENTIFIER = ([^;]+);/g, (_, current) => {
757
727
  return `PRODUCT_BUNDLE_IDENTIFIER = ${current.endsWith(".GenerationService") ? generationBundleIdentifier : bundleIdentifier};`;
@@ -769,7 +739,6 @@ function patchNativeProject(nativeRoot, config) {
769
739
  infoPlist = replacePlistString(infoPlist, "CFBundleDisplayName", config.name);
770
740
  infoPlist = replacePlistString(infoPlist, "CFBundleShortVersionString", config.version ?? "1.0.0");
771
741
  infoPlist = replaceOrInsertPlistString(infoPlist, "BleamRuntimeVersion", config.runtimeVersion);
772
- infoPlist = replaceOrInsertPlistString(infoPlist, "BleamPlatformFingerprint", fingerprint);
773
742
  infoPlist = replaceOrInsertPlistString(infoPlist, "BleamTeamIdentifier", config.teamId ?? "");
774
743
  const updateServiceUrl = process.env.BLEAM_UPDATE_SERVICE_URL ?? localUpdateServiceUrl;
775
744
  infoPlist = replaceOrInsertPlistString(infoPlist, "BleamUpdateServiceURL", updateServiceUrl);
@@ -1053,147 +1022,6 @@ async function publishOta(options) {
1053
1022
  console.log(`Published OTA update ${releaseId}`);
1054
1023
  console.log(`${options.serviceUrl}/v1/apps/${encodeURIComponent(config.bundleIdentifier)}/ota/${runtimeVersion}`);
1055
1024
  }
1056
- function compareVersions(left, right) {
1057
- const parse = (value) => {
1058
- const match = /^(\d+)\.(\d+)\.(\d+)(?:-([^+]+))?(?:\+.*)?$/.exec(value);
1059
- if (!match) throw new Error(`Invalid Bleam platform version: ${value}`);
1060
- return {
1061
- core: match.slice(1, 4).map(Number),
1062
- prerelease: match[4]?.split(".")
1063
- };
1064
- };
1065
- const a = parse(left);
1066
- const b = parse(right);
1067
- for (let index = 0; index < a.core.length; index += 1) if (a.core[index] !== b.core[index]) return (a.core[index] ?? 0) < (b.core[index] ?? 0) ? -1 : 1;
1068
- if (!a.prerelease && !b.prerelease) return 0;
1069
- if (!a.prerelease) return 1;
1070
- if (!b.prerelease) return -1;
1071
- const length = Math.max(a.prerelease.length, b.prerelease.length);
1072
- for (let index = 0; index < length; index += 1) {
1073
- const aPart = a.prerelease[index];
1074
- const bPart = b.prerelease[index];
1075
- if (aPart === void 0) return -1;
1076
- if (bPart === void 0) return 1;
1077
- if (aPart === bPart) continue;
1078
- const aNumber = /^\d+$/.test(aPart) ? Number(aPart) : void 0;
1079
- const bNumber = /^\d+$/.test(bPart) ? Number(bPart) : void 0;
1080
- if (aNumber !== void 0 && bNumber !== void 0) return aNumber < bNumber ? -1 : 1;
1081
- if (aNumber !== void 0) return -1;
1082
- if (bNumber !== void 0) return 1;
1083
- return aPart < bPart ? -1 : 1;
1084
- }
1085
- return 0;
1086
- }
1087
- function platformPublicationReason(active, target, redeploy) {
1088
- if (active && compareVersions(target.bleamPlatformVersion, active.bleamPlatformVersion) < 0) throw new Error(`Cannot publish older Bleam platform ${target.bleamPlatformVersion} over ${active.bleamPlatformVersion}. Rollback requires a separate release operation.`);
1089
- const unchanged = active?.platformFingerprint === target.platformFingerprint;
1090
- if (unchanged && !redeploy) throw new Error("Platform inputs are unchanged. Developer code and ordinary assets must be published with bleam publish ota. Use --redeploy only to intentionally republish identical platform inputs.");
1091
- if (!unchanged && redeploy) throw new Error("--redeploy requires an existing release with the same platform fingerprint; publish normally because platform inputs changed.");
1092
- if (unchanged) return "redeploy";
1093
- if (!active) return "first-release";
1094
- if (!active.platformFingerprint) return "legacy-migration";
1095
- if (active.bleamPlatformVersion !== target.bleamPlatformVersion) return "runtime-upgrade";
1096
- return "signed-input-change";
1097
- }
1098
- async function activePlatformRelease(serviceUrl, config) {
1099
- const response = await fetch(`${serviceUrl}/v1/apps/${encodeURIComponent(config.bundleIdentifier ?? "")}/platform/macos-arm64`, { cache: "no-store" });
1100
- if (response.status === 404) return void 0;
1101
- if (!response.ok) throw new Error(`Could not resolve the active platform release: ${response.status} ${await response.text()}`);
1102
- const release = await response.json();
1103
- if (release.kind !== "platform" || release.bundleIdentifier !== config.bundleIdentifier || release.teamIdentifier !== config.teamId || typeof release.bleamPlatformVersion !== "string" || release.platformFingerprint !== void 0 && (typeof release.platformFingerprint !== "string" || !/^[a-f0-9]{64}$/.test(release.platformFingerprint))) throw new Error("The active platform release is invalid for this app");
1104
- return {
1105
- bleamPlatformVersion: release.bleamPlatformVersion,
1106
- platformFingerprint: release.platformFingerprint
1107
- };
1108
- }
1109
- async function publishPlatform(options) {
1110
- const config = readProjectConfig(options);
1111
- if (!config.bundleIdentifier) throw missingBuildFieldError("bundleIdentifier");
1112
- if (!config.teamId) throw missingBuildFieldError("teamId");
1113
- const fingerprint = platformInputFingerprint(config);
1114
- const active = await activePlatformRelease(options.serviceUrl, config);
1115
- console.log(`Bleam platform: ${active?.bleamPlatformVersion ?? "none"} -> ${config.runtimeVersion}`);
1116
- console.log(`Platform fingerprint: ${active?.platformFingerprint ?? "none"} -> ${fingerprint}`);
1117
- const reason = platformPublicationReason(active, {
1118
- bleamPlatformVersion: config.runtimeVersion,
1119
- platformFingerprint: fingerprint
1120
- }, options.redeploy);
1121
- if (reason === "redeploy") console.log("Redeploying unchanged platform inputs by explicit request");
1122
- else if (reason === "first-release") console.log("Publishing the first platform release for this app");
1123
- else if (reason === "legacy-migration") console.log("Migrating the active legacy release to platform fingerprints");
1124
- else if (reason === "runtime-upgrade") console.log("Publishing a Bleam platform runtime upgrade");
1125
- else console.log("Publishing changed signed app metadata or resources");
1126
- const archivePath = await buildNativeArchives({
1127
- projectRoot: options.projectRoot,
1128
- output: path.join(options.projectRoot, "dist"),
1129
- configuration: "Release",
1130
- clean: false
1131
- });
1132
- const products = path.join(archivePath, "Products", "Applications");
1133
- const appName = readdirSync(products).find((name) => name.endsWith(".app"));
1134
- if (!appName) throw new Error(`Archive does not contain a macOS app: ${archivePath}`);
1135
- const outputRoot = path.join(options.projectRoot, ".bleam", "publish", "platform");
1136
- const stagingRoot = path.join(outputRoot, "app");
1137
- const artifactPath = path.join(outputRoot, "platform.zip");
1138
- rmSync(outputRoot, {
1139
- recursive: true,
1140
- force: true
1141
- });
1142
- mkdirSync(stagingRoot, { recursive: true });
1143
- execFileSync("ditto", [path.join(products, appName), path.join(stagingRoot, appName)]);
1144
- runInheritedCommand("zip", [
1145
- "-q",
1146
- "-r",
1147
- "-y",
1148
- artifactPath,
1149
- "app"
1150
- ], outputRoot);
1151
- const sizeBytes = readFileSync(artifactPath).byteLength;
1152
- const digest = sha256(artifactPath);
1153
- const releaseId = `platform_${Date.now().toString(36)}_${digest.slice(0, 12)}`;
1154
- const release = platformRelease(config, releaseId, sizeBytes, digest, options.redeploy);
1155
- const response = await fetch(`${options.serviceUrl}/v1/local/releases/platform`, {
1156
- method: "POST",
1157
- headers: { "content-type": "application/json" },
1158
- body: JSON.stringify({
1159
- release,
1160
- artifactBase64: readFileSync(artifactPath).toString("base64")
1161
- })
1162
- });
1163
- if (!response.ok) throw new Error(`Local platform publication failed: ${response.status} ${await response.text()}`);
1164
- console.log(`Published platform update ${releaseId}`);
1165
- console.log(`${options.serviceUrl}/v1/apps/${encodeURIComponent(config.bundleIdentifier)}/platform/macos-arm64`);
1166
- }
1167
- function platformRelease(config, releaseId, sizeBytes, digest, redeploy = false) {
1168
- if (!config.bundleIdentifier) throw missingBuildFieldError("bundleIdentifier");
1169
- if (!config.teamId) throw missingBuildFieldError("teamId");
1170
- return {
1171
- schemaVersion: 1,
1172
- kind: "platform",
1173
- bundleIdentifier: config.bundleIdentifier,
1174
- teamIdentifier: config.teamId,
1175
- channel: "stable",
1176
- releaseId,
1177
- appVersion: config.version ?? "1.0.0",
1178
- buildNumber: config.buildNumber,
1179
- bleamPlatformVersion: config.runtimeVersion,
1180
- platformFingerprint: platformInputFingerprint(config),
1181
- redeploy,
1182
- target: {
1183
- os: "macos",
1184
- architecture: "arm64",
1185
- installLocation: "user-applications",
1186
- minimumMacOSVersion: "14.0"
1187
- },
1188
- artifact: {
1189
- format: "bleam-macos-app-zip-v1",
1190
- downloadId: releaseId,
1191
- sizeBytes,
1192
- sha256: digest
1193
- },
1194
- publishedAt: (/* @__PURE__ */ new Date()).toISOString()
1195
- };
1196
- }
1197
1025
  function runtimeCacheRoot() {
1198
1026
  return path.join(os.homedir(), "Library", "Caches", "bleam", "runtimes", runtimeVersion, artifactPlatform());
1199
1027
  }
@@ -2070,11 +1898,7 @@ async function main(argv = process.argv.slice(2)) {
2070
1898
  await publishOta(parsePublishOtaOptions(publishArgs));
2071
1899
  return;
2072
1900
  }
2073
- if (kind === "platform") {
2074
- await publishPlatform(parsePublishPlatformOptions(publishArgs));
2075
- return;
2076
- }
2077
- throw new Error("Usage: bleam publish <ota|platform> [dir] [--service-url <url>] [--redeploy]");
1901
+ throw new Error("Usage: bleam publish ota [dir] [--service-url <url>]");
2078
1902
  }
2079
1903
  if (command === "doctor") {
2080
1904
  runDoctor(parseDoctorOptions(args));
@@ -2119,10 +1943,6 @@ const __test = {
2119
1943
  parseBuildOptions,
2120
1944
  parseNewOptions,
2121
1945
  parsePublishOtaOptions,
2122
- parsePublishPlatformOptions,
2123
- platformInputFingerprint,
2124
- platformPublicationReason,
2125
- platformRelease,
2126
1946
  podInstallInputStamp,
2127
1947
  replaceOrInsertPlistString
2128
1948
  };
package/dist/config.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as HexColor, c as defineConfig, i as BleamUserInterfaceStyle, n as BleamConfig, o as appConfig, r as BleamInternalExpoConfig, s as createExpoConfig, t as BleamAppearance } from "./config-CufOVJV3.cjs";
1
+ import { a as HexColor, c as defineConfig, i as BleamUserInterfaceStyle, n as BleamConfig, o as appConfig, r as BleamInternalExpoConfig, s as createExpoConfig, t as BleamAppearance } from "./config-COcRnn5a.cjs";
2
2
  export { BleamAppearance, BleamConfig, BleamInternalExpoConfig, BleamUserInterfaceStyle, HexColor, appConfig, createExpoConfig, defineConfig };
package/dist/config.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as HexColor, c as defineConfig, i as BleamUserInterfaceStyle, n as BleamConfig, o as appConfig, r as BleamInternalExpoConfig, s as createExpoConfig, t as BleamAppearance } from "./config-Cms0rvqg.js";
1
+ import { a as HexColor, c as defineConfig, i as BleamUserInterfaceStyle, n as BleamConfig, o as appConfig, r as BleamInternalExpoConfig, s as createExpoConfig, t as BleamAppearance } from "./config-Chi-flpJ.js";
2
2
  export { BleamAppearance, BleamConfig, BleamInternalExpoConfig, BleamUserInterfaceStyle, HexColor, appConfig, createExpoConfig, defineConfig };
@@ -84,6 +84,11 @@ async function nativeRemove(path, recursive) {
84
84
  }
85
85
  fileManager().removeItemAtPathError(path, null);
86
86
  }
87
+ async function nativeCopy(source, destination) {
88
+ ensureDirectory(parentDirectory(destination));
89
+ if (fileManager().fileExistsAtPath(destination)) fileManager().removeItemAtPathError(destination, null);
90
+ if (!fileManager().copyItemAtPathToPathError(source, destination, null)) throw new Error(`Could not copy file from ${source} to ${destination}`);
91
+ }
87
92
  async function nativeReadText(path) {
88
93
  return String(NSString.stringWithContentsOfFileEncodingError(path, NSUTF8StringEncoding, null));
89
94
  }
@@ -442,4 +447,4 @@ const files = {
442
447
  };
443
448
 
444
449
  //#endregion
445
- export { files as i, DownloadTask as n, FileRef as r, DirectoryRef as t };
450
+ export { nativeCopy as a, files as i, DownloadTask as n, FileRef as r, DirectoryRef as t };
@@ -84,6 +84,11 @@ async function nativeRemove(path, recursive) {
84
84
  }
85
85
  fileManager().removeItemAtPathError(path, null);
86
86
  }
87
+ async function nativeCopy(source, destination) {
88
+ ensureDirectory(parentDirectory(destination));
89
+ if (fileManager().fileExistsAtPath(destination)) fileManager().removeItemAtPathError(destination, null);
90
+ if (!fileManager().copyItemAtPathToPathError(source, destination, null)) throw new Error(`Could not copy file from ${source} to ${destination}`);
91
+ }
87
92
  async function nativeReadText(path) {
88
93
  return String(NSString.stringWithContentsOfFileEncodingError(path, NSUTF8StringEncoding, null));
89
94
  }
@@ -465,4 +470,10 @@ Object.defineProperty(exports, 'files', {
465
470
  get: function () {
466
471
  return files;
467
472
  }
473
+ });
474
+ Object.defineProperty(exports, 'nativeCopy', {
475
+ enumerable: true,
476
+ get: function () {
477
+ return nativeCopy;
478
+ }
468
479
  });
package/dist/files.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  require('./native-runtime-CsXnXkQn.cjs');
2
- const require_files = require('./files-Bo7h9fik.cjs');
2
+ const require_files = require('./files-DxaQ-Nv0.cjs');
3
3
 
4
4
  exports.DirectoryRef = require_files.DirectoryRef;
5
5
  exports.DownloadTask = require_files.DownloadTask;
package/dist/files.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import "./native-runtime-C85Nuc4F.js";
2
- import { i as files, n as DownloadTask, r as FileRef, t as DirectoryRef } from "./files-Ds1wT8C2.js";
2
+ import { i as files, n as DownloadTask, r as FileRef, t as DirectoryRef } from "./files-BXVkPrPN.js";
3
3
 
4
4
  export { DirectoryRef, DownloadTask, FileRef, files };
package/dist/index.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as HexColor, c as defineConfig, i as BleamUserInterfaceStyle, n as BleamConfig, o as appConfig, r as BleamInternalExpoConfig, s as createExpoConfig, t as BleamAppearance } from "./config-CufOVJV3.cjs";
1
+ import { a as HexColor, c as defineConfig, i as BleamUserInterfaceStyle, n as BleamConfig, o as appConfig, r as BleamInternalExpoConfig, s as createExpoConfig, t as BleamAppearance } from "./config-COcRnn5a.cjs";
2
2
  export { BleamAppearance, BleamConfig, BleamInternalExpoConfig, BleamUserInterfaceStyle, HexColor, appConfig, createExpoConfig, defineConfig };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as HexColor, c as defineConfig, i as BleamUserInterfaceStyle, n as BleamConfig, o as appConfig, r as BleamInternalExpoConfig, s as createExpoConfig, t as BleamAppearance } from "./config-Cms0rvqg.js";
1
+ import { a as HexColor, c as defineConfig, i as BleamUserInterfaceStyle, n as BleamConfig, o as appConfig, r as BleamInternalExpoConfig, s as createExpoConfig, t as BleamAppearance } from "./config-Chi-flpJ.js";
2
2
  export { BleamAppearance, BleamConfig, BleamInternalExpoConfig, BleamUserInterfaceStyle, HexColor, appConfig, createExpoConfig, defineConfig };
package/dist/platform.cjs CHANGED
@@ -3,15 +3,6 @@ let expo = require("expo");
3
3
  expo = require_chunk.__toESM(expo);
4
4
 
5
5
  //#region src/platform.ts
6
- function getHelperStatus() {
7
- return (0, expo.requireNativeModule)("Platform").helperStatus();
8
- }
9
- function downloadPlatformUpdate() {
10
- return (0, expo.requireNativeModule)("Platform").downloadPlatformUpdate();
11
- }
12
- function updateAndRelaunch(releaseId) {
13
- return (0, expo.requireNativeModule)("Platform").updateAndRelaunch(releaseId);
14
- }
15
6
  function getPermissionState(capability) {
16
7
  return (0, expo.requireNativeModule)("Platform").permissionState(capability);
17
8
  }
@@ -20,8 +11,5 @@ function getPermissionStates() {
20
11
  }
21
12
 
22
13
  //#endregion
23
- exports.downloadPlatformUpdate = downloadPlatformUpdate;
24
- exports.getHelperStatus = getHelperStatus;
25
14
  exports.getPermissionState = getPermissionState;
26
- exports.getPermissionStates = getPermissionStates;
27
- exports.updateAndRelaunch = updateAndRelaunch;
15
+ exports.getPermissionStates = getPermissionStates;
@@ -1,5 +1,4 @@
1
1
  //#region src/platform.d.ts
2
- type HelperCapability = 'platform-updates';
3
2
  type PermissionCapability = 'camera' | 'microphone' | 'photos' | 'contacts' | 'calendars' | 'reminders' | 'location';
4
3
  type PermissionStatus = 'not-determined' | 'denied' | 'restricted' | 'limited' | 'granted' | 'unsupported';
5
4
  interface PermissionState {
@@ -9,33 +8,7 @@ interface PermissionState {
9
8
  canAskAgain: boolean;
10
9
  expires: 'never';
11
10
  }
12
- interface HelperStatus {
13
- healthy: boolean;
14
- protocolVersion: 1;
15
- helperVersion: string;
16
- platformVersion: string;
17
- capabilities: HelperCapability[];
18
- updatesSupported: boolean;
19
- installPath: string;
20
- reason?: 'reinstall_required';
21
- }
22
- interface PlatformDownload {
23
- releaseId: string;
24
- appVersion: string;
25
- buildNumber: string;
26
- platformVersion: string;
27
- platformFingerprint: string;
28
- redeploy: boolean;
29
- artifactPath: string;
30
- appPath: string;
31
- sizeBytes: number;
32
- sha256: string;
33
- verified: true;
34
- }
35
- declare function getHelperStatus(): Promise<HelperStatus>;
36
- declare function downloadPlatformUpdate(): Promise<PlatformDownload>;
37
- declare function updateAndRelaunch(releaseId: string): Promise<void>;
38
11
  declare function getPermissionState(capability: PermissionCapability): Promise<PermissionState>;
39
12
  declare function getPermissionStates(): Promise<PermissionState[]>;
40
13
  //#endregion
41
- export { HelperCapability, HelperStatus, PermissionCapability, PermissionState, PermissionStatus, PlatformDownload, downloadPlatformUpdate, getHelperStatus, getPermissionState, getPermissionStates, updateAndRelaunch };
14
+ export { PermissionCapability, PermissionState, PermissionStatus, getPermissionState, getPermissionStates };
@@ -1,5 +1,4 @@
1
1
  //#region src/platform.d.ts
2
- type HelperCapability = 'platform-updates';
3
2
  type PermissionCapability = 'camera' | 'microphone' | 'photos' | 'contacts' | 'calendars' | 'reminders' | 'location';
4
3
  type PermissionStatus = 'not-determined' | 'denied' | 'restricted' | 'limited' | 'granted' | 'unsupported';
5
4
  interface PermissionState {
@@ -9,33 +8,7 @@ interface PermissionState {
9
8
  canAskAgain: boolean;
10
9
  expires: 'never';
11
10
  }
12
- interface HelperStatus {
13
- healthy: boolean;
14
- protocolVersion: 1;
15
- helperVersion: string;
16
- platformVersion: string;
17
- capabilities: HelperCapability[];
18
- updatesSupported: boolean;
19
- installPath: string;
20
- reason?: 'reinstall_required';
21
- }
22
- interface PlatformDownload {
23
- releaseId: string;
24
- appVersion: string;
25
- buildNumber: string;
26
- platformVersion: string;
27
- platformFingerprint: string;
28
- redeploy: boolean;
29
- artifactPath: string;
30
- appPath: string;
31
- sizeBytes: number;
32
- sha256: string;
33
- verified: true;
34
- }
35
- declare function getHelperStatus(): Promise<HelperStatus>;
36
- declare function downloadPlatformUpdate(): Promise<PlatformDownload>;
37
- declare function updateAndRelaunch(releaseId: string): Promise<void>;
38
11
  declare function getPermissionState(capability: PermissionCapability): Promise<PermissionState>;
39
12
  declare function getPermissionStates(): Promise<PermissionState[]>;
40
13
  //#endregion
41
- export { HelperCapability, HelperStatus, PermissionCapability, PermissionState, PermissionStatus, PlatformDownload, downloadPlatformUpdate, getHelperStatus, getPermissionState, getPermissionStates, updateAndRelaunch };
14
+ export { PermissionCapability, PermissionState, PermissionStatus, getPermissionState, getPermissionStates };
package/dist/platform.js CHANGED
@@ -1,15 +1,6 @@
1
1
  import { requireNativeModule } from "expo";
2
2
 
3
3
  //#region src/platform.ts
4
- function getHelperStatus() {
5
- return requireNativeModule("Platform").helperStatus();
6
- }
7
- function downloadPlatformUpdate() {
8
- return requireNativeModule("Platform").downloadPlatformUpdate();
9
- }
10
- function updateAndRelaunch(releaseId) {
11
- return requireNativeModule("Platform").updateAndRelaunch(releaseId);
12
- }
13
4
  function getPermissionState(capability) {
14
5
  return requireNativeModule("Platform").permissionState(capability);
15
6
  }
@@ -18,4 +9,4 @@ function getPermissionStates() {
18
9
  }
19
10
 
20
11
  //#endregion
21
- export { downloadPlatformUpdate, getHelperStatus, getPermissionState, getPermissionStates, updateAndRelaunch };
12
+ export { getPermissionState, getPermissionStates };