@legendapp/spark 0.0.1-next.10
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/LICENSE +21 -0
- package/README.md +27 -0
- package/ai-codex.ts +1 -0
- package/ai.ts +1 -0
- package/app-documents.ts +1 -0
- package/app.ts +1 -0
- package/audio.ts +1 -0
- package/auth-session.ts +1 -0
- package/bin/spark.cjs +5 -0
- package/camera.ts +13 -0
- package/clipboard.ts +1 -0
- package/config-plugin.cjs +1 -0
- package/config-plugin.d.cts +2 -0
- package/config.cjs +1 -0
- package/config.d.cts +1 -0
- package/context-menu.ts +1 -0
- package/contracts.ts +2 -0
- package/customize.ts +2 -0
- package/diagnostics.ts +1 -0
- package/dialogs.ts +2 -0
- package/drag-drop.ts +1 -0
- package/expo-config.cjs +1 -0
- package/expo-config.d.cts +1 -0
- package/files.ts +1 -0
- package/global-shortcuts.ts +1 -0
- package/html.ts +1 -0
- package/init-template.cjs +2 -0
- package/links.ts +1 -0
- package/markdown.ts +1 -0
- package/menus.ts +1 -0
- package/metro-gate.cjs +1 -0
- package/metro.cjs +4 -0
- package/metro.d.cts +12 -0
- package/native.cjs +3 -0
- package/native.d.cts +6 -0
- package/notifications.ts +1 -0
- package/package.json +248 -0
- package/patches/camera/react-native-nitro-image.patch +320 -0
- package/patches/camera/react-native-nitro-modules.patch +50 -0
- package/patches/camera/react-native-vision-camera.patch +2662 -0
- package/patches/camera/upstream.json +22 -0
- package/patches/dependencies.json +14 -0
- package/patches/react-native-enriched-html@1.1.1.patch +854 -0
- package/patches/react-native-enriched-markdown@1.1.1.patch +7751 -0
- package/postinstall.cjs +1 -0
- package/processes.ts +1 -0
- package/runtime-entry.cjs +1 -0
- package/schema.json +636 -0
- package/secure-storage.ts +1 -0
- package/settings-observable.ts +1 -0
- package/settings-window.ts +1 -0
- package/settings.ts +1 -0
- package/shortcuts-commands.ts +1 -0
- package/shortcuts-keyboard.ts +3 -0
- package/shortcuts.ts +1 -0
- package/skills/spark/SKILL.md +56 -0
- package/skills/spark/UPGRADING.md +322 -0
- package/sqlite.ts +1 -0
- package/system.ts +1 -0
- package/tray.ts +1 -0
- package/ui-classnames.ts +1 -0
- package/ui-glass.ts +1 -0
- package/ui-search.ts +1 -0
- package/ui-sidebar.ts +1 -0
- package/ui-split-view.ts +1 -0
- package/ui-swipe.ts +1 -0
- package/ui-symbol.ts +1 -0
- package/ui-uniwind.ts +1 -0
- package/ui.ts +1 -0
- package/updates.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-ai/package.json +19 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/availability.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/index.ts +15 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/invocation-command.cjs +11 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/invocation-command.d.cts +2 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/invocations.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/output.ts +62 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/run.ts +12 -0
- package/vendor/node_modules/@legendapp/spark-ai/src/types.ts +16 -0
- package/vendor/node_modules/@legendapp/spark-audio/RNSparkAudio.podspec +18 -0
- package/vendor/node_modules/@legendapp/spark-audio/macos/RNSparkAudio.h +5 -0
- package/vendor/node_modules/@legendapp/spark-audio/macos/RNSparkAudio.mm +256 -0
- package/vendor/node_modules/@legendapp/spark-audio/package.json +52 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/NativeSparkAudio.ts +7 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/desktop.ts +43 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/events.ts +11 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/hooks.ts +65 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/index.android.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/index.ios.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/index.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/index.web.ts +101 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/index.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/media-session-unavailable.ts +7 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/media-session.ts +58 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/media-session.web.ts +43 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/media-types.ts +59 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/mobile.ts +46 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/player.ts +97 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/status-listeners.ts +28 -0
- package/vendor/node_modules/@legendapp/spark-audio/src/types.ts +26 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/SparkAudio.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/SparkAudio.def +3 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/SparkAudio.h +193 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/SparkAudio.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/SparkAudio.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/SparkAudio.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-audio/windows/SparkAudio.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/package.json +42 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/core.ts +86 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/index.android.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/index.ios.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/index.ts +38 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/index.web.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/mobile.ts +108 -0
- package/vendor/node_modules/@legendapp/spark-auth-session/src/types.ts +49 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/add-desktop.js +207 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/build-mode.js +7 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/build.js +379 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/cli-arguments.js +61 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/commands.js +113 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/create.js +160 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/credentials.js +130 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-ai.cjs +108 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-artifacts.js +315 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-cli.cjs +75 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-github.cjs +133 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-policy.cjs +102 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-provider.cjs +2 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/customize-worker.cjs +273 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/dependency-pins.js +157 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/dev-command.js +92 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/dev.js +415 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/enriched-html-pins.js +128 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/errors.js +100 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/examples.js +43 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/executable.js +19 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-dev-extension.cjs +51 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-dev-patch.cjs +69 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-dev-preload.cjs +19 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-metro.cjs +41 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-native.cjs +14 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/expo-node.js +21 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/go-profile.js +20 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/helpers.js +79 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/index.js +280 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/init-template.cjs +26 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/init-template.d.cts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/js-runtime.cjs +96 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/json.js +16 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/local.js +124 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/macos-release.js +11 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/metro-gate.cjs +33 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/metro.cjs +84 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/metro.js +25 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migration-helpers.cjs +152 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migration-helpers.d.cts +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migrations.cjs +184 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/migrations.d.cts +16 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/native-metadata.js +26 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/native-patch-preflight.js +88 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/native-preparation.js +88 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/notary-profiles.js +75 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/npm-bin/npm +6 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/npm-bin/npm.cmd +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/pack-archive.js +23 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/package-manager-config.js +43 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/package-manager.js +58 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/package.js +201 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/platform.js +48 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/process.js +64 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/project-version.js +12 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/project.js +419 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/release-driver.js +35 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/release.js +123 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/release.json +42 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/runner-install.js +254 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/runtime-bootstrap.ps1 +87 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/runtime-bootstrap.sh +107 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/runtime-downloads.tsv +13 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/runtime-entry.cjs +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/sdk-install.js +71 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/sdk-transfer.js +113 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/session-status.js +26 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/signing.js +176 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/universal.cjs +29 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/updates.js +157 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/upgrade.js +102 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/windows-associations.js +45 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/windows-associations.ps1 +57 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/windows-geometry.js +33 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/windows-metro.js +112 -0
- package/vendor/node_modules/@legendapp/spark-cli/dist/windows.js +137 -0
- package/vendor/node_modules/@legendapp/spark-cli/package.json +25 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/.claude/skills/spark/SKILL.md +9 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/AGENTS.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/App.tsx +23 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/CLAUDE.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/README.md +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/app.json +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/assets/icon.png +0 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/desktop.config.json +21 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/gitignore +9 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/index.ts +5 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/metro.config.js +3 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/package.json +102 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/blank-typescript/tsconfig.json +10 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/diff-lite/App.tsx +34 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/diff-lite/Git.macos.tsx +13 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/diff-lite/Git.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/diff-lite/compare.ts +12 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/App.tsx +34 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/Integration.macos.tsx +59 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/Integration.tsx +13 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/Integration.web.tsx +14 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/Integration.windows.tsx +59 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/document.ts +58 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/io.desktop.ts +27 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/io.macos.ts +7 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/io.ts +31 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/io.web.ts +21 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/io.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/sessions.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/document-editor/useDocument.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/Lifecycle.desktop.tsx +25 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/Lifecycle.macos.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/Lifecycle.tsx +14 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/Lifecycle.web.tsx +20 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/Lifecycle.windows.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/OpenFiles.desktop.tsx +23 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/OpenFiles.macos.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/OpenFiles.tsx +2 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/OpenFiles.windows.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/document.ts +58 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/io.desktop.ts +27 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/io.macos.ts +7 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/io.ts +31 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/io.web.ts +21 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/io.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/lifecycle-types.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/lifetime.ts +23 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/records.ts +51 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/storage.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/example-shared/useModel.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/Activation.desktop.tsx +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/Activation.macos.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/Activation.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/Activation.windows.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/App.tsx +38 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/assets.desktop.ts +7 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/assets.macos.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/assets.ts +18 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/assets.web.ts +37 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/assets.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/model.ts +91 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/music-lite/store.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Activation.desktop.tsx +5 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Activation.macos.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Activation.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Activation.windows.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/App.tsx +92 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Desktop.desktop.ts +47 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Desktop.macos.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Desktop.ts +7 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Desktop.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/Theme.tsx +17 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/model.ts +61 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/search.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/session.ts +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/store.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/notes-lite/window-session.ts +63 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/.claude/skills/spark/SKILL.md +9 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/AGENTS.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/App.tsx +57 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/CLAUDE.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/README.md +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/app.json +19 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/assets/icon.png +0 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/desktop.config.json +64 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/gitignore +11 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/global.css +31 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/index.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/metro.config.js +7 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/package.json +116 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/react-native.config.js +2 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/tsconfig.json +10 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/universal/uniwind-types.d.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/.claude/skills/spark/SKILL.md +9 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/AGENTS.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/App.tsx +16 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/CLAUDE.md +4 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/README.md +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/app.json +15 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/assets/icon.png +0 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/desktop.config.json +10 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/gitignore +9 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/index.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/metro.config.js +3 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/package.json +103 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/react-native.config.js +2 -0
- package/vendor/node_modules/@legendapp/spark-cli/templates/windows/tsconfig.json +10 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/RNDesktopClipboard.podspec +16 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/macos/RNDesktopClipboard.h +4 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/macos/RNDesktopClipboard.mm +81 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/package.json +52 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/NativeDesktopClipboard.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/desktop.ts +63 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/expo.ts +22 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/formats.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/index.android.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/index.ios.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/index.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/index.web.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/index.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/options.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/src/types.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/SparkClipboard.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/SparkClipboard.def +3 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/SparkClipboard.h +142 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/SparkClipboard.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/SparkClipboard.vcxproj +145 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/SparkClipboard.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-clipboard/windows/SparkClipboard.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-codex/RNCodex.podspec +22 -0
- package/vendor/node_modules/@legendapp/spark-codex/cpp/HybridCodexAppServer.hpp +23 -0
- package/vendor/node_modules/@legendapp/spark-codex/cpp/HybridCodexAppServer.mm +1541 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitro.json +21 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/.gitattributes +1 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/ios/RNCodex+autolinking.rb +62 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/ios/RNCodex-Swift-Cxx-Bridge.cpp +17 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/ios/RNCodex-Swift-Cxx-Bridge.hpp +27 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/ios/RNCodex-Swift-Cxx-Umbrella.hpp +38 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/ios/RNCodexAutolinking.mm +35 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/ios/RNCodexAutolinking.swift +16 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/shared/c++/CodexAvailability.hpp +95 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/shared/c++/CodexRunResult.hpp +99 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/shared/c++/HybridCodexAppServerSpec.cpp +24 -0
- package/vendor/node_modules/@legendapp/spark-codex/nitrogen/generated/shared/c++/HybridCodexAppServerSpec.hpp +71 -0
- package/vendor/node_modules/@legendapp/spark-codex/package.json +35 -0
- package/vendor/node_modules/@legendapp/spark-codex/react-native.config.js +11 -0
- package/vendor/node_modules/@legendapp/spark-codex/src/Codex.nitro.ts +30 -0
- package/vendor/node_modules/@legendapp/spark-codex/src/index.ts +65 -0
- package/vendor/node_modules/@legendapp/spark-codex/src/native.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-commands/package.json +21 -0
- package/vendor/node_modules/@legendapp/spark-commands/src/bindings.ts +90 -0
- package/vendor/node_modules/@legendapp/spark-commands/src/index.tsx +400 -0
- package/vendor/node_modules/@legendapp/spark-commands/src/router.ts +138 -0
- package/vendor/node_modules/@legendapp/spark-commands/src/storage.ts +20 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/RNContextMenu.podspec +16 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/macos/RNContextMenu.h +9 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/macos/RNContextMenu.mm +159 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/package.json +47 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/src/NativeContextMenu.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/src/index.ts +29 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/SparkContextMenu.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/SparkContextMenu.def +3 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/SparkContextMenu.h +113 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/SparkContextMenu.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/SparkContextMenu.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/SparkContextMenu.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-context-menu/windows/SparkContextMenu.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/RNDesktopApp.podspec +27 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/cpp/SparkBinaryJSI.hpp +89 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/cpp/SparkBinaryWindows.hpp +22 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/RNDesktopApp.h +4 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/RNDesktopApp.mm +60 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkBinaryJSI.h +48 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkDesktop.h +35 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkDesktop.mm +198 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkDesktopError.h +20 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkInstance.h +27 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkInstance.mm +207 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkLifecycle.h +26 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkLifecycle.mm +49 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkQuitCoordinator.h +9 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkQuitCoordinator.mm +70 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkTestDriver.h +44 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkTestDriver.mm +349 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/SparkWindow.mm +86 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/macos/recent-documents/RNRecentDocumentController.mm +55 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/package.json +41 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/NativeDesktopApp.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/api.ts +121 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/contracts/accelerator.ts +40 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/contracts/index.ts +56 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/contracts/menu.ts +130 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/contracts/native-buffer.ts +22 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/contracts/path.ts +24 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/customize-hooks.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/customize.ts +117 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/events.ts +75 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/index.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/index.windows.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/open-requests.ts +43 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/restoration.ts +11 -0
- package/vendor/node_modules/@legendapp/spark-desktop-app/src/transport.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/accessibility-state.cjs +50 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/app.plugin.cjs +107 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/app.plugin.d.cts +3 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/autolinking.cjs +42 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/config.cjs +177 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/config.d.cts +113 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/customize-provider.cjs +16 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/customize.cjs +16 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/entitlements.cjs +23 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/expo.cjs +27 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/expo.d.cts +3 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/fabric-lifecycle.cjs +125 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/helpers.cjs +20 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/identity.cjs +29 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/keyboard-events.cjs +44 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/lifecycle.cjs +20 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/native-patches.cjs +106 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/native-patches.d.cts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/package.json +21 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-scroll-view.cjs +144 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-text-alignment.cjs +60 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/rtl-text-input-alignment.cjs +112 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/schema.json +636 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/test-driver.cjs +11 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/test-driver.d.cts +2 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/text-input-accessibility.cjs +47 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/updates.cjs +27 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/validation.cjs +36 -0
- package/vendor/node_modules/@legendapp/spark-desktop-config/windows.plugin.cjs +73 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/AppDelegate.mm +209 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/SparkCustomize.mm +517 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/package.json +14 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/windows/SparkComponentGeometry.h +9 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/windows/application.inc +849 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/windows/launch.inc +67 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/windows/notifications.inc +60 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/windows/runtime.inc +63 -0
- package/vendor/node_modules/@legendapp/spark-desktop-host/windows/runtimes.inc +162 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/RNDesktopLinks.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/common/AuthLoopback.h +119 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/macos/RNDesktopLinks.h +4 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/macos/RNDesktopLinks.mm +80 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/package.json +53 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/NativeDesktopLinks.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/api.ts +31 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/expo.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/index.android.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/index.ios.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/index.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/index.web.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/index.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/src/native.ts +9 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/SparkLinks.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/SparkLinks.def +3 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/SparkLinks.h +128 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/SparkLinks.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/SparkLinks.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/SparkLinks.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-desktop-links/windows/SparkLinks.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/RNDesktopShortcuts.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/macos/RNDesktopShortcuts.h +4 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/macos/RNDesktopShortcuts.mm +58 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/macos/keyboard-manager/RNKeyboardManager.h +12 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/macos/keyboard-manager/RNKeyboardManager.mm +307 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/NativeDesktopShortcuts.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/api.ts +45 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/index.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/index.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/keyboard-manager/NativeKeyboardManager.ts +12 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/keyboard-manager/codes.ts +108 -0
- package/vendor/node_modules/@legendapp/spark-desktop-shortcuts/src/keyboard-manager/index.ts +99 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/RNDesktopWindows.podspec +22 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/RNDesktopWindows.h +4 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/RNDesktopWindows.mm +339 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/SparkWindowGeometry.h +63 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/LegendWindowRegistry.h +20 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/LegendWindowRegistry.mm +27 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/RNWindowManager.h +12 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/RNWindowManager.mm +3189 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/RNWindowManagerStartup.mm +31 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/macos/window-manager/SidebarStartupFallbacks.mm +14 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/package.json +48 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/NativeDesktopWindowManager.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/api.ts +192 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/diagnostics.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/index.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/index.windows.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/macos-adapter.ts +55 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/macos.ts +51 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/transport.ts +41 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/types.ts +140 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/validation.ts +162 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/window-manager/NativeWindowManager.ts +28 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows/WindowProvider.tsx +20 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows/createWindowsNavigator.tsx +78 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows/index.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows/primaryWindowLifecycle.ts +34 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows/types.ts +11 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows/usePrimaryWindowLifecycle.ts +18 -0
- package/vendor/node_modules/@legendapp/spark-desktop-windows/src/windows/useWindowFocusEffect.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-documents/package.json +22 -0
- package/vendor/node_modules/@legendapp/spark-documents/src/controller.ts +97 -0
- package/vendor/node_modules/@legendapp/spark-documents/src/documentTransition.ts +13 -0
- package/vendor/node_modules/@legendapp/spark-documents/src/hooks.ts +139 -0
- package/vendor/node_modules/@legendapp/spark-documents/src/index.tsx +50 -0
- package/vendor/node_modules/@legendapp/spark-documents/src/reload.ts +39 -0
- package/vendor/node_modules/@legendapp/spark-documents/src/requests.ts +15 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/RNDesktopDrag.podspec +20 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/macos/RNDesktopDragView.h +4 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/macos/RNDesktopDragView.mm +94 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/package.json +45 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/src/DesktopDragViewNativeComponent.ts +16 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/src/contracts.ts +83 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/src/index.tsx +60 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/ReactPackageProvider.cpp +21 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/SparkDragDrop.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/SparkDragDrop.def +3 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/SparkDragDrop.h +215 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/SparkDragDrop.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/SparkDragDrop.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/SparkDragDrop.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-drag-drop/windows/SparkDragDrop.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/RNFileDialog.podspec +18 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/ios/RNFileDialog.h +9 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/ios/RNFileDialog.mm +261 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/package.json +50 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/src/NativeFileDialog.ts +9 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/src/index.ts +36 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/src/native.ts +16 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/src/options.ts +74 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/src/types.ts +42 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/SparkFileDialog.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/SparkFileDialog.def +3 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/SparkFileDialog.h +112 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/SparkFileDialog.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/SparkFileDialog.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/SparkFileDialog.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-file-dialog/windows/SparkFileDialog.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-file-system/RNDesktopFileSystem.podspec +18 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/RNDesktopFileSystem.h +4 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/RNDesktopFileSystem.mm +222 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/SparkFileMutations.h +25 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/SparkFileMutations.mm +216 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/file-scanner/RNFileScanner.h +9 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/file-scanner/RNFileScanner.mm +82 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/file-scanner/RNFileScannerCore.h +47 -0
- package/vendor/node_modules/@legendapp/spark-file-system/macos/file-scanner/RNFileScannerCore.mm +306 -0
- package/vendor/node_modules/@legendapp/spark-file-system/package.json +49 -0
- package/vendor/node_modules/@legendapp/spark-file-system/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-file-system/src/NativeDesktopFileSystem.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-file-system/src/file-scanner/NativeFileScanner.ts +11 -0
- package/vendor/node_modules/@legendapp/spark-file-system/src/file-scanner/index.ts +93 -0
- package/vendor/node_modules/@legendapp/spark-file-system/src/handles.ts +79 -0
- package/vendor/node_modules/@legendapp/spark-file-system/src/index.ts +150 -0
- package/vendor/node_modules/@legendapp/spark-file-system/src/path.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/SparkFileSystem.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/SparkFileSystem.def +3 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/SparkFileSystem.h +371 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/SparkFileSystem.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/SparkFileSystem.vcxproj +146 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/SparkFileSystem.vcxproj.filters +45 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/Trash.h +52 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-file-system/windows/SparkFileSystem.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/RNDesktopGlobalShortcuts.podspec +18 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/macos/RNDesktopGlobalShortcuts.h +3 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/macos/RNDesktopGlobalShortcuts.mm +68 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/package.json +47 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/src/NativeDesktopGlobalShortcuts.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/src/index.ts +45 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/SparkGlobalShortcuts.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/SparkGlobalShortcuts.def +3 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/SparkGlobalShortcuts.h +81 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/SparkGlobalShortcuts.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/SparkGlobalShortcuts.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/SparkGlobalShortcuts.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-global-shortcuts/windows/SparkGlobalShortcuts.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-html/package.json +24 -0
- package/vendor/node_modules/@legendapp/spark-html/src/Html.tsx +22 -0
- package/vendor/node_modules/@legendapp/spark-html/src/HtmlInput.tsx +102 -0
- package/vendor/node_modules/@legendapp/spark-html/src/index.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-html/src/types.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-markdown/package.json +24 -0
- package/vendor/node_modules/@legendapp/spark-markdown/src/Markdown.tsx +25 -0
- package/vendor/node_modules/@legendapp/spark-markdown/src/MarkdownInput.tsx +111 -0
- package/vendor/node_modules/@legendapp/spark-markdown/src/index.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/RNDesktopMessageDialog.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/macos/RNDesktopMessageDialog.h +3 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/macos/RNDesktopMessageDialog.mm +137 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/src/NativeDesktopMessageDialog.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/src/index.ts +146 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/SparkMessageDialog.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/SparkMessageDialog.def +3 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/SparkMessageDialog.h +145 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/SparkMessageDialog.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/SparkMessageDialog.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/SparkMessageDialog.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-message-dialog/windows/SparkMessageDialog.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/RNNativeMenu.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/ios/RNNativeMenu.h +10 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/ios/RNNativeMenu.mm +272 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/src/NativeMenu.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/src/api.ts +128 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/src/hooks.ts +103 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/src/index.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/src/index.windows.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-native-menu/src/windows-menus.ts +49 -0
- package/vendor/node_modules/@legendapp/spark-notifications/RNDesktopNotifications.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-notifications/macos/RNDesktopNotifications.h +4 -0
- package/vendor/node_modules/@legendapp/spark-notifications/macos/RNDesktopNotifications.mm +156 -0
- package/vendor/node_modules/@legendapp/spark-notifications/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-notifications/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-notifications/src/NativeDesktopNotifications.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-notifications/src/index.ts +141 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/SparkNotifications.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/SparkNotifications.def +3 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/SparkNotifications.h +175 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/SparkNotifications.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/SparkNotifications.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/SparkNotifications.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-notifications/windows/SparkNotifications.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-processes/RNDesktopProcesses.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-processes/macos/RNDesktopProcesses.h +3 -0
- package/vendor/node_modules/@legendapp/spark-processes/macos/RNDesktopProcesses.mm +226 -0
- package/vendor/node_modules/@legendapp/spark-processes/package.json +47 -0
- package/vendor/node_modules/@legendapp/spark-processes/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-processes/src/NativeDesktopProcesses.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-processes/src/index.ts +135 -0
- package/vendor/node_modules/@legendapp/spark-processes/src/types.ts +34 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/SparkProcesses.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/SparkProcesses.def +3 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/SparkProcesses.h +220 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/SparkProcesses.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/SparkProcesses.vcxproj +145 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/SparkProcesses.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-processes/windows/SparkProcesses.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/package.json +18 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/components.tsx +52 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/index.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/types.ts +24 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/useInputShortcuts.macos.ts +55 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/useInputShortcuts.ts +13 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/useInputValue.ts +14 -0
- package/vendor/node_modules/@legendapp/spark-rich-text/src/value.ts +16 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/RNDesktopSecureStorage.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/macos/RNDesktopSecureStorage.h +4 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/macos/RNDesktopSecureStorage.mm +62 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/package.json +52 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/NativeDesktopSecureStorage.ts +6 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/desktop.ts +26 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/expo.ts +13 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/index.android.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/index.ios.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/index.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/index.web.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/index.windows.ts +2 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/options.ts +7 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/src/unavailable.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/SparkSecureStorage.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/SparkSecureStorage.def +3 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/SparkSecureStorage.h +48 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/SparkSecureStorage.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/SparkSecureStorage.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/SparkSecureStorage.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-secure-storage/windows/SparkSecureStorage.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-settings/package.json +20 -0
- package/vendor/node_modules/@legendapp/spark-settings/src/fileStorage.ts +11 -0
- package/vendor/node_modules/@legendapp/spark-settings/src/filename.ts +1 -0
- package/vendor/node_modules/@legendapp/spark-settings/src/filename.windows.ts +9 -0
- package/vendor/node_modules/@legendapp/spark-settings/src/index.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-settings/src/storage/index.ts +142 -0
- package/vendor/node_modules/@legendapp/spark-settings/src/store.ts +79 -0
- package/vendor/node_modules/@legendapp/spark-settings-ui/package.json +20 -0
- package/vendor/node_modules/@legendapp/spark-settings-ui/src/index.tsx +439 -0
- package/vendor/node_modules/@legendapp/spark-settings-ui/src/options.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-sqlite/package.json +16 -0
- package/vendor/node_modules/@legendapp/spark-sqlite/src/database.ts +182 -0
- package/vendor/node_modules/@legendapp/spark-sqlite/src/index.ts +20 -0
- package/vendor/node_modules/@legendapp/spark-sqlite/src/types.ts +22 -0
- package/vendor/node_modules/@legendapp/spark-system/RNDesktopSystem.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-system/macos/RNDesktopSystem.h +3 -0
- package/vendor/node_modules/@legendapp/spark-system/macos/RNDesktopSystem.mm +143 -0
- package/vendor/node_modules/@legendapp/spark-system/macos/SparkAppearancePreferences.h +9 -0
- package/vendor/node_modules/@legendapp/spark-system/macos/SparkAppearancePreferences.mm +31 -0
- package/vendor/node_modules/@legendapp/spark-system/macos/SparkDockTile.h +24 -0
- package/vendor/node_modules/@legendapp/spark-system/macos/SparkDockTile.mm +101 -0
- package/vendor/node_modules/@legendapp/spark-system/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-system/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-system/src/NativeDesktopSystem.ts +3 -0
- package/vendor/node_modules/@legendapp/spark-system/src/index.ts +158 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/SparkSystem.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/SparkSystem.def +3 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/SparkSystem.h +158 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/SparkSystem.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/SparkSystem.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/SparkSystem.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-system/windows/SparkSystem.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-tray/RNDesktopTray.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-tray/macos/RNDesktopTray.h +4 -0
- package/vendor/node_modules/@legendapp/spark-tray/macos/RNDesktopTray.mm +75 -0
- package/vendor/node_modules/@legendapp/spark-tray/package.json +46 -0
- package/vendor/node_modules/@legendapp/spark-tray/react-native.config.js +6 -0
- package/vendor/node_modules/@legendapp/spark-tray/src/NativeDesktopTray.ts +4 -0
- package/vendor/node_modules/@legendapp/spark-tray/src/index.ts +103 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/ReactPackageProvider.cpp +20 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/SparkTray.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/SparkTray.def +3 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/SparkTray.h +163 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/SparkTray.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/SparkTray.vcxproj +143 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/SparkTray.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-tray/windows/SparkTray.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-ui/RNSparkUI.podspec +17 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/RNSparkButton.h +4 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/RNSparkButton.mm +54 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/RNSparkLayoutDirection.h +17 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/RNSparkTextInput.h +4 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/RNSparkTextInput.mm +58 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/appkit-split-view/RNSidebarSplitViewComponent.h +15 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/appkit-split-view/RNSidebarSplitViewComponent.mm +1554 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/glass-effect-view/RNGlassEffectView.mm +76 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/native-select/RNNativeSegmentedControl.h +15 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/native-select/RNNativeSegmentedControl.mm +198 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/native-select/RNNativeSelect.h +15 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/native-select/RNNativeSelect.mm +184 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/sf-symbol/RNSFSymbol.h +15 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/sf-symbol/RNSFSymbol.mm +159 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/sidebar/RNSidebar.h +18 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/sidebar/RNSidebar.mm +708 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/swipe-actions/RNSwipeActions.h +10 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/swipe-actions/RNSwipeActions.mm +446 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/text-input-search/RNTextInputSearch.h +15 -0
- package/vendor/node_modules/@legendapp/spark-ui/macos/text-input-search/RNTextInputSearch.mm +188 -0
- package/vendor/node_modules/@legendapp/spark-ui/package.json +74 -0
- package/vendor/node_modules/@legendapp/spark-ui/react-native.config.js +5 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/SparkButtonNativeComponent.ts +12 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/SparkSelectNativeComponent.ts +12 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/SparkTextInputNativeComponent.ts +13 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/appkit-split-view/SidebarSplitViewNativeComponent.ts +42 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/appkit-split-view/index.tsx +94 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/availability.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/classnames/index.ts +8 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/control.ts +42 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/desktop.tsx +56 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/glass-effect-view/index.tsx +15 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.android.tsx +39 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.ios.tsx +59 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.web.tsx +54 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/index.windows.tsx +1 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/mobile-input.tsx +11 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/native-select/NativeSegmentedControlNativeComponent.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/native-select/NativeSelectNativeComponent.ts +17 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/select.ts +9 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/sf-symbol/SFSymbolNativeComponent.ts +13 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/sf-symbol/index.tsx +27 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/sidebar/SidebarItemNativeComponent.ts +25 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/sidebar/SidebarNativeComponent.ts +29 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/sidebar/index.tsx +115 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/specialized.ts +22 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/swipe-actions/SwipeActionsNativeComponent.ts +11 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/swipe-actions/index.tsx +41 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/text-input-search/TextInputSearchNativeComponent.ts +33 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/text-input-search/index.tsx +34 -0
- package/vendor/node_modules/@legendapp/spark-ui/src/types.ts +39 -0
- package/vendor/node_modules/@legendapp/spark-ui/uniwind.ts +10 -0
- package/vendor/node_modules/@legendapp/spark-ui/uniwind.web.ts +19 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/ExperimentalFeatures.props +33 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/LICENSE +25 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/ReactPackageProvider.cpp +21 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/ReactPackageProvider.h +24 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/ReactPackageProvider.idl +9 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/SparkAppearance.h +61 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/SparkUI.cpp +2 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/SparkUI.def +3 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/SparkUI.h +186 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/SparkUI.rc +0 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/SparkUI.vcxproj +144 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/SparkUI.vcxproj.filters +44 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/pch.cpp +1 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/pch.h +30 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/resource.h +5 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI/targetver.h +8 -0
- package/vendor/node_modules/@legendapp/spark-ui/windows/SparkUI.sln +43 -0
- package/vendor/node_modules/@legendapp/spark-updates/RNDesktopUpdates.podspec +18 -0
- package/vendor/node_modules/@legendapp/spark-updates/Sparkle.podspec.json +39 -0
- package/vendor/node_modules/@legendapp/spark-updates/macos/RNDesktopUpdates.h +4 -0
- package/vendor/node_modules/@legendapp/spark-updates/macos/RNDesktopUpdates.mm +97 -0
- package/vendor/node_modules/@legendapp/spark-updates/macos/SparkUpdateState.h +39 -0
- package/vendor/node_modules/@legendapp/spark-updates/package.json +44 -0
- package/vendor/node_modules/@legendapp/spark-updates/src/NativeDesktopUpdates.ts +5 -0
- package/vendor/node_modules/@legendapp/spark-updates/src/index.ts +115 -0
- package/vendor/node_modules/@legendapp/spark-webview/package.json +15 -0
- package/vendor/node_modules/@legendapp/spark-webview/src/WebView.tsx +11 -0
- package/vendor/node_modules/@legendapp/spark-webview/src/adapter.ts +55 -0
- package/vendor/node_modules/@legendapp/spark-webview/src/index.ts +2 -0
- package/vendor/node_modules/@legendapp/spark-webview/src/types.ts +32 -0
- package/vendor/node_modules/@legendapp/spark-webview/src/view-props.ts +28 -0
- package/vendor/node_modules/@legendapp/spark-window-options/index.cjs +62 -0
- package/vendor/node_modules/@legendapp/spark-window-options/index.d.ts +25 -0
- package/vendor/node_modules/@legendapp/spark-window-options/package.json +12 -0
- package/webview.ts +1 -0
- package/windows-macos.ts +1 -0
- package/windows.ts +1 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { runnerDownloadMessage } from "./session-status.js";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import { closeSync, existsSync, ftruncateSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { spawn } from "node:child_process";
|
|
5
|
+
import { open } from "node:fs/promises";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { setTimeout as sleep } from "node:timers/promises";
|
|
8
|
+
import { run } from "./commands.js";
|
|
9
|
+
import { sparkHome, readRuntime, registerRuntime } from "./local.js";
|
|
10
|
+
import { architecture } from "./platform.js";
|
|
11
|
+
import { VERSION } from "./project.js";
|
|
12
|
+
import { installedRelease } from "./release.js";
|
|
13
|
+
const defaults = { fetch: globalThis.fetch, run };
|
|
14
|
+
function readLegacyPid(lock) {
|
|
15
|
+
try {
|
|
16
|
+
const content = readFileSync(lock, "utf8").trim();
|
|
17
|
+
if (/^\d+$/.test(content))
|
|
18
|
+
return Number(content);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
if (error.code !== "ENOENT")
|
|
22
|
+
throw error;
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
/** The kernel releases this advisory lock if the installer exits, including on a crash. */
|
|
27
|
+
export async function acquireRunnerLock(lock, waitMs = 600_000) {
|
|
28
|
+
const deadline = Date.now() + waitMs;
|
|
29
|
+
let child;
|
|
30
|
+
let exited;
|
|
31
|
+
while (true) {
|
|
32
|
+
if (Date.now() >= deadline)
|
|
33
|
+
throw new Error("Another process is installing Runner. Retry desktop launch when it finishes.");
|
|
34
|
+
const existingPid = readLegacyPid(lock);
|
|
35
|
+
if (existingPid) {
|
|
36
|
+
try {
|
|
37
|
+
process.kill(existingPid, 0);
|
|
38
|
+
if (Date.now() >= deadline)
|
|
39
|
+
throw new Error("Another process is installing Runner. Retry desktop launch when it finishes.");
|
|
40
|
+
await sleep(Math.min(1000, deadline - Date.now()));
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
if (error.code !== "ESRCH")
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const existed = existsSync(lock);
|
|
49
|
+
const observed = existed ? lstatSync(lock) : undefined;
|
|
50
|
+
const remaining = Math.max(1, deadline - Date.now());
|
|
51
|
+
child = spawn("/usr/bin/lockf", ["-k", "-t", String(Math.max(1, Math.ceil(remaining / 1000))), lock, process.execPath, "-e", "process.stdout.write('locked\\n'); process.stdin.resume()"], { detached: true, stdio: ["pipe", "pipe", "pipe"] });
|
|
52
|
+
let stderr = "";
|
|
53
|
+
child.stderr.setEncoding("utf8").on("data", chunk => { stderr += chunk; });
|
|
54
|
+
exited = new Promise(resolve => child.once("close", (code, signal) => resolve({ code, signal })));
|
|
55
|
+
try {
|
|
56
|
+
await new Promise((resolve, reject) => {
|
|
57
|
+
let output = "";
|
|
58
|
+
child.stdout.setEncoding("utf8").on("data", chunk => {
|
|
59
|
+
output += chunk;
|
|
60
|
+
if (output.includes("locked\n"))
|
|
61
|
+
resolve();
|
|
62
|
+
});
|
|
63
|
+
child.once("error", reject);
|
|
64
|
+
void exited.then(({ code }) => reject(new Error(`Could not acquire Runner install lock${stderr ? `: ${stderr.trim()}` : ` (lockf exited ${code})`}`)));
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
try {
|
|
69
|
+
process.kill(-child.pid, "SIGTERM");
|
|
70
|
+
}
|
|
71
|
+
catch { }
|
|
72
|
+
await exited;
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
75
|
+
const stopKeeper = async () => { child.stdin.end(); await exited; };
|
|
76
|
+
let fd;
|
|
77
|
+
try {
|
|
78
|
+
const acquired = lstatSync(lock);
|
|
79
|
+
if (observed && (acquired.dev !== observed.dev || acquired.ino !== observed.ino)) {
|
|
80
|
+
await stopKeeper();
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
const content = readFileSync(lock, "utf8").trim();
|
|
84
|
+
const legacyPid = readLegacyPid(lock);
|
|
85
|
+
if (legacyPid) {
|
|
86
|
+
let legacyLive = false;
|
|
87
|
+
try {
|
|
88
|
+
process.kill(legacyPid, 0);
|
|
89
|
+
legacyLive = true;
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
if (error.code !== "ESRCH")
|
|
93
|
+
throw error;
|
|
94
|
+
}
|
|
95
|
+
if (legacyLive) {
|
|
96
|
+
await stopKeeper();
|
|
97
|
+
if (Date.now() >= deadline)
|
|
98
|
+
throw new Error("Another process is installing Runner. Retry desktop launch when it finishes.");
|
|
99
|
+
await sleep(Math.min(1000, deadline - Date.now()));
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else if (!content && existed) {
|
|
104
|
+
const age = Date.now() - statSync(lock).mtimeMs;
|
|
105
|
+
if (age < 30_000) {
|
|
106
|
+
await stopKeeper();
|
|
107
|
+
if (Date.now() >= deadline)
|
|
108
|
+
throw new Error("Another process is installing Runner. Retry desktop launch when it finishes.");
|
|
109
|
+
await sleep(Math.min(1000, deadline - Date.now()));
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
fd = openSync(lock, "r+");
|
|
114
|
+
ftruncateSync(fd, 0);
|
|
115
|
+
writeFileSync(fd, `v2:${process.pid}`);
|
|
116
|
+
closeSync(fd);
|
|
117
|
+
fd = undefined;
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
if (fd !== undefined) {
|
|
122
|
+
try {
|
|
123
|
+
closeSync(fd);
|
|
124
|
+
}
|
|
125
|
+
catch { }
|
|
126
|
+
}
|
|
127
|
+
await stopKeeper();
|
|
128
|
+
throw error;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
let released = false;
|
|
132
|
+
let releasePromise;
|
|
133
|
+
let unexpectedExit;
|
|
134
|
+
void exited.then(result => { if (!released)
|
|
135
|
+
unexpectedExit = result; });
|
|
136
|
+
const release = () => releasePromise ??= (async () => {
|
|
137
|
+
released = true;
|
|
138
|
+
child.stdin.end();
|
|
139
|
+
const result = await exited;
|
|
140
|
+
if (result.code !== 0)
|
|
141
|
+
throw new Error(`Runner install lock process exited unexpectedly (${result.signal ?? result.code}).`);
|
|
142
|
+
})();
|
|
143
|
+
return Object.assign(release, {
|
|
144
|
+
assertAlive() {
|
|
145
|
+
if (unexpectedExit)
|
|
146
|
+
throw new Error(`Runner install lock process exited unexpectedly (${unexpectedExit.signal ?? unexpectedExit.code}).`);
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
export async function downloadAsset(asset, file, request = globalThis.fetch) {
|
|
151
|
+
console.log(runnerDownloadMessage(asset.size));
|
|
152
|
+
for (let attempt = 0; attempt < 3; attempt++) {
|
|
153
|
+
let handle;
|
|
154
|
+
try {
|
|
155
|
+
const response = await request(asset.url, { signal: AbortSignal.timeout(300_000) });
|
|
156
|
+
if (!response.ok || !response.body)
|
|
157
|
+
throw new Error(`Download failed: HTTP ${response.status}`);
|
|
158
|
+
handle = await open(file, "w", 0o600);
|
|
159
|
+
const hash = createHash("sha256");
|
|
160
|
+
let bytes = 0, reported = -1;
|
|
161
|
+
for await (const chunk of response.body) {
|
|
162
|
+
bytes += chunk.byteLength;
|
|
163
|
+
if (bytes > asset.size)
|
|
164
|
+
throw new Error("Download exceeds its declared size");
|
|
165
|
+
hash.update(chunk);
|
|
166
|
+
await handle.writeFile(chunk);
|
|
167
|
+
const percent = Math.floor(bytes / asset.size * 10) * 10;
|
|
168
|
+
if (percent !== reported) {
|
|
169
|
+
console.log(`Downloading Spark Runner ${"█".repeat(percent / 10)}${"░".repeat(10 - percent / 10)} ${percent}%`);
|
|
170
|
+
reported = percent;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if (bytes !== asset.size || hash.digest("hex") !== asset.sha256)
|
|
174
|
+
throw new Error("Download checksum or size mismatch");
|
|
175
|
+
await handle.close();
|
|
176
|
+
handle = undefined;
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
catch (error) {
|
|
180
|
+
await handle?.close();
|
|
181
|
+
handle = undefined;
|
|
182
|
+
rmSync(file, { force: true });
|
|
183
|
+
if (attempt === 2)
|
|
184
|
+
throw error;
|
|
185
|
+
console.log(`Runner download interrupted; retrying (${attempt + 1}/2)…`);
|
|
186
|
+
await sleep(500 * (attempt + 1));
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
async function verify(app, asset, deps) {
|
|
191
|
+
const runtime = readRuntime(app);
|
|
192
|
+
if (!runtime || runtime.mode !== "go" || runtime.platform !== "macos" || runtime.arch !== architecture("macos") || runtime.fingerprint !== asset.fingerprint)
|
|
193
|
+
throw new Error("Downloaded Runner has incompatible runtime metadata");
|
|
194
|
+
await deps.run(path.dirname(app), ["codesign", "--verify", "--deep", "--strict", app], { capture: true });
|
|
195
|
+
const signature = await deps.run(path.dirname(app), ["codesign", "-dvvv", app], { capture: true });
|
|
196
|
+
if (!signature.includes(`TeamIdentifier=${asset.teamId}\n`) || !signature.includes("Authority=Developer ID Application:"))
|
|
197
|
+
throw new Error("Runner publisher signature does not match this SDK");
|
|
198
|
+
await deps.run(path.dirname(app), ["spctl", "--assess", "--type", "execute", app], { capture: true });
|
|
199
|
+
}
|
|
200
|
+
/** A checksum-pinned, signed app is promoted atomically and registered only after validation. */
|
|
201
|
+
export async function installRunner(asset, cache = sparkHome(), deps = defaults) {
|
|
202
|
+
const parent = path.join(cache, "downloads", VERSION);
|
|
203
|
+
const destination = path.join(parent, asset.sha256);
|
|
204
|
+
const app = path.join(destination, asset.app);
|
|
205
|
+
mkdirSync(parent, { recursive: true });
|
|
206
|
+
const lock = `${destination}.lock`;
|
|
207
|
+
const releaseLock = await acquireRunnerLock(lock);
|
|
208
|
+
let staging;
|
|
209
|
+
try {
|
|
210
|
+
if (existsSync(app)) {
|
|
211
|
+
try {
|
|
212
|
+
await verify(app, asset, deps);
|
|
213
|
+
}
|
|
214
|
+
catch {
|
|
215
|
+
rmSync(destination, { recursive: true, force: true });
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
if (!existsSync(app)) {
|
|
219
|
+
staging = mkdtempSync(path.join(parent, ".runner-"));
|
|
220
|
+
const archive = path.join(staging, "runner.zip");
|
|
221
|
+
await downloadAsset(asset, archive, deps.fetch);
|
|
222
|
+
const unpacked = path.join(staging, "unpacked");
|
|
223
|
+
mkdirSync(unpacked);
|
|
224
|
+
// Only publisher-pinned bytes reach the platform extractor.
|
|
225
|
+
await deps.run(staging, ["ditto", "-x", "-k", archive, unpacked], { capture: true });
|
|
226
|
+
await verify(path.join(unpacked, asset.app), asset, deps);
|
|
227
|
+
releaseLock.assertAlive();
|
|
228
|
+
renameSync(unpacked, destination);
|
|
229
|
+
}
|
|
230
|
+
releaseLock.assertAlive();
|
|
231
|
+
registerRuntime(app);
|
|
232
|
+
console.log("Spark Runner installed, opening your app…");
|
|
233
|
+
return app;
|
|
234
|
+
}
|
|
235
|
+
finally {
|
|
236
|
+
if (staging)
|
|
237
|
+
rmSync(staging, { recursive: true, force: true });
|
|
238
|
+
await releaseLock();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
export async function acquireRunner(platform) {
|
|
242
|
+
const release = installedRelease();
|
|
243
|
+
let app;
|
|
244
|
+
if (release) {
|
|
245
|
+
const target = `${platform}-${architecture(platform)}`;
|
|
246
|
+
const asset = release.runners[target];
|
|
247
|
+
if (!asset)
|
|
248
|
+
throw new Error(`This Spark release has no Runner for ${target}. Use a custom development build.`);
|
|
249
|
+
if (process.platform !== "darwin")
|
|
250
|
+
throw new Error("This release's macOS Runner requires macOS.");
|
|
251
|
+
app = await installRunner(asset);
|
|
252
|
+
}
|
|
253
|
+
return app;
|
|
254
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
param(
|
|
2
|
+
[Parameter(Mandatory = $true, Position = 0)][string]$Entry,
|
|
3
|
+
[Parameter(ValueFromRemainingArguments = $true)][string[]]$ScriptArgs
|
|
4
|
+
)
|
|
5
|
+
$ErrorActionPreference = 'Stop'
|
|
6
|
+
$platform = 'win32'
|
|
7
|
+
$arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant()
|
|
8
|
+
if ($arch -notin @('arm64', 'x64')) { throw "Unsupported runtime architecture: $arch" }
|
|
9
|
+
$sparkHome = if ($env:SPARK_HOME) { $env:SPARK_HOME } else { Join-Path $env:USERPROFILE '.spark' }
|
|
10
|
+
$cache = Join-Path $sparkHome 'tooling/runtimes'
|
|
11
|
+
$assets = Import-Csv (Join-Path $PSScriptRoot 'runtime-downloads.tsv') -Delimiter "`t"
|
|
12
|
+
|
|
13
|
+
function Test-Compatible([string]$Executable, [string]$Kind = '') {
|
|
14
|
+
if (-not (Test-Path -LiteralPath $Executable -PathType Leaf)) { return $false }
|
|
15
|
+
try {
|
|
16
|
+
& $Executable (Join-Path $PSScriptRoot 'js-runtime.cjs') $Kind 2>$null | Out-Null
|
|
17
|
+
return $LASTEXITCODE -eq 0
|
|
18
|
+
} catch { return $false }
|
|
19
|
+
}
|
|
20
|
+
function Start-Runtime([string]$Executable) {
|
|
21
|
+
$env:SPARK_JS_RUNTIME = $Executable
|
|
22
|
+
$env:PATH = "$(Split-Path -Parent $Executable);$env:PATH"
|
|
23
|
+
& $Executable $Entry @ScriptArgs
|
|
24
|
+
exit $LASTEXITCODE
|
|
25
|
+
}
|
|
26
|
+
function Get-Asset([string]$Kind) {
|
|
27
|
+
return $assets | Where-Object { $_.runtime -eq $Kind -and $_.platform -eq $platform -and $_.arch -eq $arch } | Select-Object -First 1
|
|
28
|
+
}
|
|
29
|
+
function Get-Destination($Asset) {
|
|
30
|
+
return Join-Path $cache "$($Asset.runtime)-$($Asset.version)-$platform-$arch-$($Asset.sha256)"
|
|
31
|
+
}
|
|
32
|
+
function Test-Cached($Asset) {
|
|
33
|
+
$destination = Get-Destination $Asset
|
|
34
|
+
$executable = Join-Path $destination $Asset.executable
|
|
35
|
+
$marker = Join-Path $destination '.binary-sha256'
|
|
36
|
+
return (Test-Path -LiteralPath $executable -PathType Leaf) -and (Test-Path -LiteralPath $marker -PathType Leaf) -and
|
|
37
|
+
((Get-FileHash -LiteralPath $executable -Algorithm SHA256).Hash -eq (Get-Content -LiteralPath $marker -Raw).Trim()) -and (Test-Compatible $executable)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
$requested = $env:SPARK_JS_RUNTIME
|
|
41
|
+
if ($requested -and $requested -notin @('node', 'bun')) {
|
|
42
|
+
if (-not (Test-Compatible $requested)) { throw "Unsupported or missing runtime: $requested" }
|
|
43
|
+
Start-Runtime $requested
|
|
44
|
+
}
|
|
45
|
+
$choices = if ($requested) { @($requested) } else { @('bun', 'node') }
|
|
46
|
+
foreach ($kind in $choices) {
|
|
47
|
+
$command = Get-Command "$kind.exe" -CommandType Application -ErrorAction SilentlyContinue | Select-Object -First 1
|
|
48
|
+
if ($command -and (Test-Compatible $command.Source $requested)) { Start-Runtime $command.Source }
|
|
49
|
+
$asset = Get-Asset $kind
|
|
50
|
+
if ($asset -and (Test-Cached $asset)) { Start-Runtime (Join-Path (Get-Destination $asset) $asset.executable) }
|
|
51
|
+
}
|
|
52
|
+
$download = if ($requested) { $requested } elseif ($env:SPARK_RUNTIME_DOWNLOAD) { $env:SPARK_RUNTIME_DOWNLOAD } else { 'bun' }
|
|
53
|
+
if ($download -notin @('node', 'bun')) { throw 'SPARK_RUNTIME_DOWNLOAD must be node or bun.' }
|
|
54
|
+
$asset = Get-Asset $download
|
|
55
|
+
if (-not $asset) { throw "No pinned $download download for $platform/$arch. Install a compatible runtime manually." }
|
|
56
|
+
$destination = Get-Destination $asset
|
|
57
|
+
New-Item -ItemType Directory -Path $cache -Force | Out-Null
|
|
58
|
+
$lock = $null
|
|
59
|
+
$staging = $null
|
|
60
|
+
try {
|
|
61
|
+
# An OS file lock is released even when installation is interrupted or crashes.
|
|
62
|
+
for ($attempt = 0; $attempt -lt 60 -and -not $lock; $attempt++) {
|
|
63
|
+
try { $lock = [IO.File]::Open("$destination.lock", [IO.FileMode]::OpenOrCreate, [IO.FileAccess]::ReadWrite, [IO.FileShare]::None) }
|
|
64
|
+
catch [IO.IOException] { Start-Sleep -Seconds 1 }
|
|
65
|
+
}
|
|
66
|
+
if (-not $lock) { throw "Another process is installing $download; retry shortly." }
|
|
67
|
+
if (-not (Test-Cached $asset)) {
|
|
68
|
+
$staging = Join-Path $cache ".install-$download-$([Guid]::NewGuid())"
|
|
69
|
+
New-Item -ItemType Directory -Path $staging | Out-Null
|
|
70
|
+
$archive = Join-Path $staging 'archive.zip'
|
|
71
|
+
Write-Host "Downloading Spark's private $download $($asset.version) runtime..."
|
|
72
|
+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
|
73
|
+
Invoke-WebRequest -Uri $asset.url -OutFile $archive -UseBasicParsing -TimeoutSec 300
|
|
74
|
+
if ((Get-Item -LiteralPath $archive).Length -gt 134217728 -or (Get-FileHash -LiteralPath $archive -Algorithm SHA256).Hash -ne $asset.sha256) { throw 'Runtime download checksum or size mismatch.' }
|
|
75
|
+
$unpacked = Join-Path $staging 'unpacked'
|
|
76
|
+
Expand-Archive -LiteralPath $archive -DestinationPath $unpacked
|
|
77
|
+
$executable = Join-Path $unpacked $asset.executable
|
|
78
|
+
if (-not (Test-Compatible $executable)) { throw 'Downloaded runtime cannot run on this machine.' }
|
|
79
|
+
(Get-FileHash -LiteralPath $executable -Algorithm SHA256).Hash | Set-Content -LiteralPath (Join-Path $unpacked '.binary-sha256')
|
|
80
|
+
if (Test-Path -LiteralPath $destination) { Remove-Item -LiteralPath $destination -Recurse -Force }
|
|
81
|
+
Move-Item -LiteralPath $unpacked -Destination $destination
|
|
82
|
+
}
|
|
83
|
+
} finally {
|
|
84
|
+
if ($staging -and (Test-Path -LiteralPath $staging)) { Remove-Item -LiteralPath $staging -Recurse -Force }
|
|
85
|
+
if ($lock) { $lock.Dispose() }
|
|
86
|
+
}
|
|
87
|
+
Start-Runtime (Join-Path $destination $asset.executable)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# This entry point intentionally needs no JavaScript runtime or package manager.
|
|
3
|
+
set -eu
|
|
4
|
+
here=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
5
|
+
[ "$#" -gt 0 ] || { echo 'Usage: runtime-bootstrap.sh <JavaScript entry> [arguments...]' >&2; exit 2; }
|
|
6
|
+
entry=$1
|
|
7
|
+
shift
|
|
8
|
+
case $(uname -s) in Darwin) platform=darwin ;; Linux) platform=linux ;; *) echo 'Use runtime-bootstrap.ps1 on Windows.' >&2; exit 1 ;; esac
|
|
9
|
+
case $(uname -m) in arm64|aarch64) arch=arm64 ;; x86_64|amd64) arch=x64 ;; *) echo 'Unsupported runtime architecture.' >&2; exit 1 ;; esac
|
|
10
|
+
cache=${SPARK_HOME:-"$HOME/.spark"}/tooling/runtimes
|
|
11
|
+
|
|
12
|
+
compatible() {
|
|
13
|
+
[ -f "$1" ] && [ -x "$1" ] && "$1" "$here/js-runtime.cjs" "${2:-}" >/dev/null 2>&1
|
|
14
|
+
}
|
|
15
|
+
launch() {
|
|
16
|
+
runtime_path=$1
|
|
17
|
+
shift
|
|
18
|
+
SPARK_JS_RUNTIME=$runtime_path
|
|
19
|
+
export SPARK_JS_RUNTIME
|
|
20
|
+
PATH="$(dirname -- "$runtime_path"):$PATH"
|
|
21
|
+
export PATH
|
|
22
|
+
exec "$runtime_path" "$entry" "$@"
|
|
23
|
+
}
|
|
24
|
+
asset() {
|
|
25
|
+
row=$(awk -F '\t' -v kind="$1" -v platform="$platform" -v arch="$arch" '$1 == kind && $3 == platform && $4 == arch { print }' "$here/runtime-downloads.tsv")
|
|
26
|
+
[ -n "$row" ] || return 1
|
|
27
|
+
read -r kind version target cpu url checksum relative <<EOF
|
|
28
|
+
$row
|
|
29
|
+
EOF
|
|
30
|
+
destination="$cache/$kind-$version-$target-$cpu-$checksum"
|
|
31
|
+
runtime_path="$destination/$relative"
|
|
32
|
+
}
|
|
33
|
+
sha256() {
|
|
34
|
+
if command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | awk '{print $1}'
|
|
35
|
+
else sha256sum "$1" | awk '{print $1}'; fi
|
|
36
|
+
}
|
|
37
|
+
cached() {
|
|
38
|
+
[ -f "$runtime_path" ] && [ -f "$destination/.binary-sha256" ] &&
|
|
39
|
+
[ "$(sha256 "$runtime_path")" = "$(cat "$destination/.binary-sha256")" ] && compatible "$runtime_path"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
requested=${SPARK_JS_RUNTIME:-}
|
|
43
|
+
case "$requested" in
|
|
44
|
+
'') choices='bun node' ;;
|
|
45
|
+
node|bun) choices=$requested ;;
|
|
46
|
+
*) compatible "$requested" || { echo "Unsupported or missing runtime: $requested" >&2; exit 1; }
|
|
47
|
+
launch "$requested" "$@" ;;
|
|
48
|
+
esac
|
|
49
|
+
for kind in $choices; do
|
|
50
|
+
candidate=$(command -v "$kind" || true)
|
|
51
|
+
if [ -n "$candidate" ] && compatible "$candidate" "$requested"; then launch "$candidate" "$@"; fi
|
|
52
|
+
if asset "$kind" && cached; then launch "$runtime_path" "$@"; fi
|
|
53
|
+
done
|
|
54
|
+
download=${requested:-${SPARK_RUNTIME_DOWNLOAD:-bun}}
|
|
55
|
+
case "$download" in node|bun) ;; *) echo 'SPARK_RUNTIME_DOWNLOAD must be node or bun.' >&2; exit 2 ;; esac
|
|
56
|
+
asset "$download" || { echo "No pinned $download download for $platform/$arch. Install a compatible runtime manually." >&2; exit 1; }
|
|
57
|
+
mkdir -p "$cache"
|
|
58
|
+
lock="$destination.lock"
|
|
59
|
+
owned=0
|
|
60
|
+
staging=''
|
|
61
|
+
cleanup() {
|
|
62
|
+
[ -z "$staging" ] || rm -rf -- "$staging"
|
|
63
|
+
[ "$owned" = 0 ] || rm -rf -- "$lock"
|
|
64
|
+
}
|
|
65
|
+
trap cleanup EXIT
|
|
66
|
+
trap 'exit 130' INT
|
|
67
|
+
trap 'exit 143' TERM
|
|
68
|
+
attempt=0
|
|
69
|
+
until mkdir "$lock" 2>/dev/null; do
|
|
70
|
+
attempt=$((attempt + 1))
|
|
71
|
+
[ "$attempt" -lt 60 ] || { echo "Another process is installing $download; retry shortly." >&2; exit 1; }
|
|
72
|
+
if [ -f "$lock/pid" ]; then
|
|
73
|
+
pid=$(cat "$lock/pid" 2>/dev/null || true)
|
|
74
|
+
# Do not reap here: another waiter could acquire a new lock between a
|
|
75
|
+
# stale-owner check and removal. Normal failures/signals use the trap above.
|
|
76
|
+
case "$pid" in ''|*[!0-9]*) ;; *) if ! kill -0 "$pid" 2>/dev/null; then
|
|
77
|
+
echo "Interrupted runtime installation. Remove $lock and retry." >&2
|
|
78
|
+
exit 1
|
|
79
|
+
fi ;; esac
|
|
80
|
+
fi
|
|
81
|
+
sleep 1
|
|
82
|
+
done
|
|
83
|
+
owned=1
|
|
84
|
+
echo "$$" > "$lock/pid"
|
|
85
|
+
if ! cached; then
|
|
86
|
+
staging=$(mktemp -d "$cache/.install-$download-XXXXXX")
|
|
87
|
+
archive="$staging/archive"
|
|
88
|
+
echo "Downloading Spark's private $kind $version runtime…" >&2
|
|
89
|
+
curl --fail --location --proto '=https' --tlsv1.2 --retry 2 --connect-timeout 20 --max-time 300 --max-filesize 134217728 --output "$archive" "$url"
|
|
90
|
+
[ "$(sha256 "$archive")" = "$checksum" ] || { echo 'Runtime download checksum mismatch.' >&2; exit 1; }
|
|
91
|
+
mkdir "$staging/unpacked"
|
|
92
|
+
case "$url" in
|
|
93
|
+
*.zip) unzip -q "$archive" -d "$staging/unpacked" ;;
|
|
94
|
+
*.tar.gz) tar -xzf "$archive" -C "$staging/unpacked" ;;
|
|
95
|
+
*) echo 'Unsupported runtime archive.' >&2; exit 1 ;;
|
|
96
|
+
esac
|
|
97
|
+
compatible "$staging/unpacked/$relative" || { echo 'Downloaded runtime cannot run on this machine.' >&2; exit 1; }
|
|
98
|
+
sha256 "$staging/unpacked/$relative" > "$staging/unpacked/.binary-sha256"
|
|
99
|
+
# The lock owns this versioned cache entry. Publish only verified complete files.
|
|
100
|
+
[ ! -e "$destination" ] || rm -rf -- "$destination"
|
|
101
|
+
mv "$staging/unpacked" "$destination"
|
|
102
|
+
fi
|
|
103
|
+
cleanup
|
|
104
|
+
owned=0
|
|
105
|
+
staging=''
|
|
106
|
+
trap - EXIT INT TERM
|
|
107
|
+
launch "$runtime_path" "$@"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
runtime version platform arch url sha256 executable
|
|
2
|
+
node 24.19.0 darwin arm64 https://nodejs.org/dist/v24.19.0/node-v24.19.0-darwin-arm64.tar.gz 8294b7aa9b03997481c06babf1e8b270c859358f27da57a11509afe537ac381d node-v24.19.0-darwin-arm64/bin/node
|
|
3
|
+
node 24.19.0 darwin x64 https://nodejs.org/dist/v24.19.0/node-v24.19.0-darwin-x64.tar.gz d1b5e999db158c62fe8f7267a4476b035d8bd93b1a605bac24a3f0dd166e3316 node-v24.19.0-darwin-x64/bin/node
|
|
4
|
+
node 24.19.0 win32 arm64 https://nodejs.org/dist/v24.19.0/node-v24.19.0-win-arm64.zip 8502f4a50b458d4cc38ed8f2001556c2cd239d464920f74017926ccb1e1c157f node-v24.19.0-win-arm64/node.exe
|
|
5
|
+
node 24.19.0 win32 x64 https://nodejs.org/dist/v24.19.0/node-v24.19.0-win-x64.zip 57f71ab3652e797d84acddc79c81cc9ff1c6ddb2a1974cdb83f00fee9bff4c73 node-v24.19.0-win-x64/node.exe
|
|
6
|
+
node 24.19.0 linux arm64 https://nodejs.org/dist/v24.19.0/node-v24.19.0-linux-arm64.tar.gz d28c8a5bf0a808f0ed434a1dce8c54ae98f0371c0bd86ac58abc613f73e6643f node-v24.19.0-linux-arm64/bin/node
|
|
7
|
+
node 24.19.0 linux x64 https://nodejs.org/dist/v24.19.0/node-v24.19.0-linux-x64.tar.gz f625d97cd707df4ff96254916fbc5ff014f09c09effe5a1e0ca8f6d41a8789d4 node-v24.19.0-linux-x64/bin/node
|
|
8
|
+
bun 1.3.14 darwin arm64 https://github.com/oven-sh/bun/releases/download/bun-v1.3.14/bun-darwin-aarch64.zip d8b96221828ad6f97ac7ac0ab7e95872341af763001e8803e8267652c2652620 bun-darwin-aarch64/bun
|
|
9
|
+
bun 1.3.14 darwin x64 https://github.com/oven-sh/bun/releases/download/bun-v1.3.14/bun-darwin-x64.zip 4183df3374623e5bab315c547cfa0974533cd457d86b73b639f7a87974cd6633 bun-darwin-x64/bun
|
|
10
|
+
bun 1.3.14 win32 arm64 https://github.com/oven-sh/bun/releases/download/bun-v1.3.14/bun-windows-aarch64.zip 89841f5a57f2348b67ec0839b718f4bf4ea7d07c371c9ba4b77b6c790f918953 bun-windows-aarch64/bun.exe
|
|
11
|
+
bun 1.3.14 win32 x64 https://github.com/oven-sh/bun/releases/download/bun-v1.3.14/bun-windows-x64.zip 0a0620930b6675d7ba440e81f4e0e00d3cfbe096c4b140d3fff02205e9e18922 bun-windows-x64/bun.exe
|
|
12
|
+
bun 1.3.14 linux arm64 https://github.com/oven-sh/bun/releases/download/bun-v1.3.14/bun-linux-aarch64.zip a27ffb63a8310375836e0d6f668ae17fa8d8d18b88c37c821c65331973a19a3b bun-linux-aarch64/bun
|
|
13
|
+
bun 1.3.14 linux x64 https://github.com/oven-sh/bun/releases/download/bun-v1.3.14/bun-linux-x64.zip 951ee2aee855f08595aeec6225226a298d3fea83a3dcd6465c09cbccdf7e848f bun-linux-x64/bun
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Replaced by withDesktop with the app-specific worker registry.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
import { parseArgs } from "node:util";
|
|
3
|
+
import { packageManager, managerCommand, applyOverrides, localArchive } from "./package-manager.js";
|
|
4
|
+
// Standalone bootstrap, copied into SDK bundles. Requires Node; no framework checkout.
|
|
5
|
+
import { createHash } from "node:crypto";
|
|
6
|
+
import { existsSync, lstatSync, readFileSync, readdirSync, readlinkSync, mkdirSync, writeFileSync } from "node:fs";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
const root = import.meta.dirname;
|
|
9
|
+
const metadata = JSON.parse(readFileSync(path.join(root, "sdk.json"), "utf8"));
|
|
10
|
+
const actual = {};
|
|
11
|
+
function visit(relative) {
|
|
12
|
+
const file = path.join(root, relative), stat = lstatSync(file);
|
|
13
|
+
if (stat.isDirectory())
|
|
14
|
+
for (const name of readdirSync(file).sort())
|
|
15
|
+
visit(path.join(relative, name));
|
|
16
|
+
else {
|
|
17
|
+
let content;
|
|
18
|
+
if (stat.isSymbolicLink()) {
|
|
19
|
+
const target = readlinkSync(file);
|
|
20
|
+
if (!path.resolve(path.dirname(file), target).startsWith(root + path.sep))
|
|
21
|
+
throw new Error("SDK symlink escapes bundle");
|
|
22
|
+
content = `symlink:${target}`;
|
|
23
|
+
}
|
|
24
|
+
else if (stat.isFile())
|
|
25
|
+
content = readFileSync(file);
|
|
26
|
+
else
|
|
27
|
+
throw new Error("Unsupported SDK file");
|
|
28
|
+
actual[relative.replaceAll(path.sep, "/")] = createHash("sha256").update(content).digest("hex");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
for (const name of ["packages", "runtimes"])
|
|
32
|
+
if (existsSync(path.join(root, name)))
|
|
33
|
+
visit(name);
|
|
34
|
+
if (metadata.schema !== 1 || JSON.stringify(actual) !== JSON.stringify(metadata.sha256))
|
|
35
|
+
throw new Error("SDK checksum mismatch");
|
|
36
|
+
const manifest = JSON.parse(readFileSync(path.join(root, "packages/manifest.json"), "utf8"));
|
|
37
|
+
const overrides = {};
|
|
38
|
+
for (const [name, file] of Object.entries(manifest)) {
|
|
39
|
+
if (typeof file !== "string" || path.basename(file) !== file || !actual[`packages/${file}`])
|
|
40
|
+
throw new Error("Invalid SDK manifest");
|
|
41
|
+
overrides[name] = localArchive(path.join(root, "packages", file));
|
|
42
|
+
}
|
|
43
|
+
if (!overrides["@legendapp/spark"])
|
|
44
|
+
throw new Error("SDK has no CLI");
|
|
45
|
+
const tooling = path.join(root, ".cli");
|
|
46
|
+
mkdirSync(tooling, { recursive: true });
|
|
47
|
+
const { values } = parseArgs({ options: { "package-manager": { type: "string" } } });
|
|
48
|
+
const manager = packageManager(root, values["package-manager"]);
|
|
49
|
+
const builds = ["@legendapp/spark", "react-native-enriched-markdown", "fsevents"];
|
|
50
|
+
const pkg = { name: "spark-sdk-tools", private: true, pnpm: { onlyBuiltDependencies: builds }, dependencies: { ...metadata.tooling?.dependencies, "@legendapp/spark": overrides["@legendapp/spark"] } };
|
|
51
|
+
applyOverrides(pkg, { ...metadata.tooling?.overrides, ...overrides }, manager);
|
|
52
|
+
if (manager === "pnpm")
|
|
53
|
+
builds.push(`@legendapp/spark@file:${path.relative(tooling, overrides["@legendapp/spark"].slice(5)).replaceAll("\\", "/")}`);
|
|
54
|
+
writeFileSync(path.join(tooling, "package.json"), JSON.stringify(pkg, null, 2));
|
|
55
|
+
if (manager === "yarn")
|
|
56
|
+
writeFileSync(path.join(tooling, ".yarnrc.yml"), "nodeLinker: node-modules\n");
|
|
57
|
+
if (manager === "pnpm") {
|
|
58
|
+
const allowBuilds = Object.fromEntries(builds.map(name => [name, true]));
|
|
59
|
+
writeFileSync(path.join(tooling, "pnpm-workspace.yaml"), JSON.stringify({ nodeLinker: "hoisted", overrides: pkg.pnpm.overrides, allowBuilds }));
|
|
60
|
+
}
|
|
61
|
+
const [executable, ...args] = managerCommand(manager, ["install"]);
|
|
62
|
+
// Only fixed manager names + 'install' use a Windows shell; paths/CLI arguments
|
|
63
|
+
// are always passed directly to Node without shell interpolation.
|
|
64
|
+
const install = spawnSync(executable, args, { cwd: tooling, stdio: "inherit", env: { ...process.env, ...(manager === "yarn" ? { YARN_ENABLE_IMMUTABLE_INSTALLS: "false" } : {}) }, shell: process.platform === "win32" && executable === manager });
|
|
65
|
+
if (install.error || install.status !== 0)
|
|
66
|
+
throw new Error(`SDK CLI installation failed: ${install.error ?? install.status}`);
|
|
67
|
+
const cli = path.join(tooling, "node_modules/@legendapp/spark/bin/spark.cjs");
|
|
68
|
+
const register = spawnSync(process.execPath, [cli, "sdk", "import", root], { cwd: root, stdio: "inherit" });
|
|
69
|
+
if (register.error || register.status !== 0)
|
|
70
|
+
throw new Error("SDK registration failed");
|
|
71
|
+
console.log(`SDK installed. Keep this directory in place.\nCreate an app: node ${JSON.stringify(cli)} create MyApp --universal --package-manager ${manager}`);
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, lstatSync, readlinkSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { createHash } from "node:crypto";
|
|
4
|
+
import { readJson, writeJson, VERSION } from "./project.js";
|
|
5
|
+
import { readRuntime, registerPackages, registerRuntime } from "./local.js";
|
|
6
|
+
export function treeHashes(root) {
|
|
7
|
+
const result = {};
|
|
8
|
+
function visit(relative) {
|
|
9
|
+
const file = path.join(root, relative), stat = lstatSync(file);
|
|
10
|
+
if (stat.isSymbolicLink()) {
|
|
11
|
+
const target = readlinkSync(file);
|
|
12
|
+
const resolved = path.resolve(path.dirname(file), target);
|
|
13
|
+
if (!resolved.startsWith(path.resolve(root) + path.sep))
|
|
14
|
+
throw new Error(`SDK link escapes bundle: ${relative}`);
|
|
15
|
+
result[relative.replaceAll(path.sep, "/")] = createHash("sha256").update(`symlink:${target}`).digest("hex");
|
|
16
|
+
}
|
|
17
|
+
else if (stat.isDirectory()) {
|
|
18
|
+
for (const name of readdirSync(file).sort())
|
|
19
|
+
visit(path.join(relative, name));
|
|
20
|
+
}
|
|
21
|
+
else if (stat.isFile())
|
|
22
|
+
result[relative.replaceAll(path.sep, "/")] = createHash("sha256").update(readFileSync(file)).digest("hex");
|
|
23
|
+
else
|
|
24
|
+
throw new Error(`Unsupported SDK file: ${relative}`);
|
|
25
|
+
}
|
|
26
|
+
for (const name of ["packages", "runtimes"])
|
|
27
|
+
if (existsSync(path.join(root, name)))
|
|
28
|
+
visit(name);
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
export function verifySDK(root) {
|
|
32
|
+
const metadata = readJson(path.join(root, "sdk.json"));
|
|
33
|
+
if (metadata.schema !== 1 || metadata.framework !== VERSION || !Array.isArray(metadata.runtimes))
|
|
34
|
+
throw new Error("Incompatible SDK bundle");
|
|
35
|
+
const actual = treeHashes(root);
|
|
36
|
+
if (JSON.stringify(actual) !== JSON.stringify(metadata.sha256))
|
|
37
|
+
throw new Error("SDK checksum mismatch; obtain an intact bundle before installing");
|
|
38
|
+
const archives = readJson(path.join(root, "packages/manifest.json"));
|
|
39
|
+
for (const file of Object.values(archives)) {
|
|
40
|
+
if (typeof file !== "string" || path.basename(file) !== file || !actual[`packages/${file}`])
|
|
41
|
+
throw new Error("Invalid SDK archive manifest");
|
|
42
|
+
}
|
|
43
|
+
for (const relative of metadata.runtimes) {
|
|
44
|
+
if (typeof relative !== "string" || !relative.startsWith("runtimes/") || relative.includes("..") || !readRuntime(path.join(root, relative)))
|
|
45
|
+
throw new Error("Invalid bundled Spark Runner");
|
|
46
|
+
}
|
|
47
|
+
return metadata;
|
|
48
|
+
}
|
|
49
|
+
export function importSDK(root) {
|
|
50
|
+
root = path.resolve(root);
|
|
51
|
+
const metadata = verifySDK(root);
|
|
52
|
+
// Register only after every package and client has passed verification.
|
|
53
|
+
registerPackages(path.join(root, "packages/manifest.json"));
|
|
54
|
+
for (const relative of metadata.runtimes)
|
|
55
|
+
registerRuntime(path.join(root, relative));
|
|
56
|
+
return root;
|
|
57
|
+
}
|
|
58
|
+
export function exportSDK(manifest, destination, runtimes = []) {
|
|
59
|
+
destination = path.resolve(destination);
|
|
60
|
+
if (existsSync(destination))
|
|
61
|
+
throw new Error(`SDK destination already exists: ${destination}`);
|
|
62
|
+
const pending = `${destination}.pending`;
|
|
63
|
+
if (existsSync(pending))
|
|
64
|
+
throw new Error(`Remove or recover the previous incomplete export: ${pending}`);
|
|
65
|
+
mkdirSync(path.join(pending, "packages"), { recursive: true });
|
|
66
|
+
try {
|
|
67
|
+
const packages = readJson(manifest);
|
|
68
|
+
for (const [name, file] of Object.entries(packages)) {
|
|
69
|
+
if (typeof file !== "string" || path.basename(file) !== file)
|
|
70
|
+
throw new Error(`Invalid archive path for ${name}`);
|
|
71
|
+
cpSync(path.join(path.dirname(manifest), file), path.join(pending, "packages", file));
|
|
72
|
+
}
|
|
73
|
+
writeJson(path.join(pending, "packages/manifest.json"), packages);
|
|
74
|
+
const clients = [];
|
|
75
|
+
for (const app of runtimes) {
|
|
76
|
+
const runtime = readRuntime(app);
|
|
77
|
+
if (!runtime || runtime.mode !== "go")
|
|
78
|
+
throw new Error(`Not a compatible Spark Runner: ${app}`);
|
|
79
|
+
const relative = `runtimes/${runtime.platform}-${runtime.arch}/${path.basename(app)}`;
|
|
80
|
+
if (clients.includes(relative))
|
|
81
|
+
throw new Error("Duplicate Spark Runner target");
|
|
82
|
+
cpSync(app, path.join(pending, relative), { recursive: true, verbatimSymlinks: true });
|
|
83
|
+
clients.push(relative);
|
|
84
|
+
}
|
|
85
|
+
const cli = existsSync(path.join(import.meta.dirname, "sdk-install.js")) ? import.meta.dirname : path.resolve(import.meta.dirname, "../dist");
|
|
86
|
+
for (const name of ["sdk-install", "package-manager", "executable"]) {
|
|
87
|
+
const source = readFileSync(path.join(cli, `${name}.js`), "utf8")
|
|
88
|
+
.replaceAll("./package-manager.js", "./package-manager.mjs").replaceAll("./executable.js", "./executable.mjs");
|
|
89
|
+
writeFileSync(path.join(pending, name === "sdk-install" ? "install.mjs" : `${name}.mjs`), source);
|
|
90
|
+
}
|
|
91
|
+
const template = readJson(path.resolve(import.meta.dirname, "../templates/universal/package.json"));
|
|
92
|
+
const tooling = {
|
|
93
|
+
dependencies: Object.fromEntries(["react", "react-native", "react-dom", "expo"].map(name => [name, template.dependencies[name]])),
|
|
94
|
+
overrides: template.overrides,
|
|
95
|
+
};
|
|
96
|
+
writeJson(path.join(pending, "sdk.json"), { schema: 1, framework: VERSION, runtimes: clients, tooling, sha256: treeHashes(pending) });
|
|
97
|
+
writeFileSync(path.join(pending, "README.md"), `# Spark SDK ${VERSION}
|
|
98
|
+
|
|
99
|
+
Requires Node 24.19.0+ and npm, pnpm, Yarn, or Bun. Run \`node install.mjs\` in this directory (optionally pass \`--package-manager npm|pnpm|yarn|bun\`). The installer prints the CLI command to create an app; add \`--universal\` for Settings or \`--example document-editor\` for the editor.
|
|
100
|
+
|
|
101
|
+
Keep this directory in place after installing. Its package archives and optional Spark Runner runtimes are registered by path. Transfer before installing, preserving executable permissions and symlinks. Third-party npm dependencies still require internet access.
|
|
102
|
+
|
|
103
|
+
Included runtimes: ${clients.length ? clients.join(", ") : "none (install a matching Spark Runner or build a development client)"}. Compatibility checks reject mismatched native modules. Native Windows compilation and clean-machine acceptance require Windows; public hosting and production signing are separate workflows.
|
|
104
|
+
`);
|
|
105
|
+
verifySDK(pending);
|
|
106
|
+
renameSync(pending, destination);
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
rmSync(pending, { recursive: true, force: true });
|
|
110
|
+
throw error;
|
|
111
|
+
}
|
|
112
|
+
return destination;
|
|
113
|
+
}
|