diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 27201978..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,2 +0,0 @@ -// @generated by expo-module-scripts -module.exports = require('expo-module-scripts/eslintrc.base.js'); diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 030ef144..00000000 --- a/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -*.pbxproj -text -# specific for windows script files -*.bat text eol=crlf \ No newline at end of file diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml deleted file mode 100644 index 4b221450..00000000 --- a/.github/actions/setup/action.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Setup -description: Setup Node.js and install dependencies - -runs: - using: composite - steps: - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: .nvmrc - cache: 'yarn' - - - name: Install dependencies - run: yarn install --immutable - shell: bash - - - name: Prepare project checkout - run: yarn prepare - shell: bash diff --git a/.github/workflows/check-updates.yml b/.github/workflows/check-updates.yml deleted file mode 100644 index dee11ac6..00000000 --- a/.github/workflows/check-updates.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Check for a new client version -on: - schedule: - - cron: '*/5 * * * *' - workflow_dispatch: - -jobs: - skip-duplicates: - name: Skip update if job is already in progress - runs-on: ubuntu-latest - outputs: - should-skip: ${{ steps.skip-check.outputs.should_skip }} - steps: - - id: skip-check - uses: fkirc/skip-duplicate-actions@v5 - with: - do_not_skip: '[]' - skip_after_successful_duplicate: 'false' - concurrent_skipping: 'always' - - check-update: - runs-on: ubuntu-latest - needs: skip-duplicates - if: ${{ needs.skip-duplicates.outputs.should-skip != 'true' }} - outputs: - latest: ${{ steps.check-update.outputs.latest }} - dev: ${{ steps.check-update.outputs.dev }} - integration: ${{ steps.check-update.outputs.dev }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup - uses: ./.github/actions/setup - - - name: Check for updates - id: check-update - run: yarn check-updates - - update-latest: - name: Update latest tag - needs: - - check-update - if: ${{ needs.check-update.outputs.latest != ''}} - uses: ./.github/workflows/update-and-publish.yml - secrets: inherit - with: - npmTag: latest - version: ${{ needs.check-update.outputs.latest }} - - update-dev: - name: Update dev tag - needs: - - check-update - if: ${{ needs.check-update.outputs.dev != ''}} - uses: ./.github/workflows/update-and-publish.yml - secrets: inherit - with: - npmTag: dev - version: ${{ needs.check-update.outputs.dev }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6b9aa47..04f0244a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,18 +1,17 @@ name: CI -on: - push: - branches: - - main - pull_request: - branches: - - main -concurrency: - group: ci-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true +on: [push, pull_request] jobs: - test: - name: Run test - uses: ./.github/workflows/test.yml - secrets: inherit + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: yarn + - run: corepack enable + - run: yarn install --immutable + - run: yarn typecheck + - run: yarn prepare diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 26eaec1b..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: Test -on: - workflow_call: - inputs: - ref: - description: Ref to run the tests on - type: string - required: false - -jobs: - lint-test: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - - - name: Setup - uses: ./.github/actions/setup - - - name: Lint files - run: yarn lint - - - name: Typecheck files - run: yarn typecheck - - test-ios: - name: E2E test for iOS - runs-on: macos-14 - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - - - name: Setup - uses: ./.github/actions/setup - - - name: Install macOS dependencies - run: | - brew tap wix/brew - brew install applesimutils - env: - HOMEBREW_NO_AUTO_UPDATE: 1 - HOMEBREW_NO_INSTALL_CLEANUP: 1 - - name: Install CocoaPods dependecies - working-directory: example - run: yarn pod-install - - - name: Detox build - working-directory: example - run: yarn detox build --configuration ios.sim.release - - - name: Detox test - working-directory: example - run: yarn detox test --configuration ios.sim.release --cleanup --headless - - test-android: - name: E2E test for Android - runs-on: ubuntu-latest - steps: - # default runner has not enough space for creating emulators - - name: Free disk space - uses: jlumbroso/free-disk-space@v1.3.1 - with: - android: false - tool-cache: true - dotnet: true - haskell: true - swap-storage: true - docker-images: true - large-packages: false - - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - - - name: Setup Java - uses: actions/setup-java@v3 - with: - cache: gradle - distribution: temurin - java-version: 17 - - - name: Setup - uses: ./.github/actions/setup - - - name: Detox build - working-directory: example - run: yarn detox build --configuration android.emu.release - - - name: Enable KVM group perms # make android simulator use KVM and run much faster - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm - - - name: Detox test - uses: reactivecircus/android-emulator-runner@v2 - with: - working-directory: example - api-level: 28 - arch: x86_64 - avd-name: Pixel_API_28 - script: yarn detox test --configuration android.emu.release --headless diff --git a/.github/workflows/update-and-publish.yml b/.github/workflows/update-and-publish.yml deleted file mode 100644 index 57225e21..00000000 --- a/.github/workflows/update-and-publish.yml +++ /dev/null @@ -1,139 +0,0 @@ -name: Update prisma client and publish the package -on: - workflow_call: - inputs: - npmTag: - description: npm tag to publish to - type: string - required: true - version: - description: npm version to publish - type: string - required: true - secrets: - SLACK_WEBHOOK_URL: - required: true - NPM_TOKEN: - required: true - workflow_dispatch: - inputs: - npmTag: - description: npm tag to publish to - type: string - required: true - version: - description: npm version to publish - type: string - required: true - -concurrency: - group: publish - -jobs: - update: - name: Update client & engines on a temporary branch - runs-on: ubuntu-latest - env: - TMP_BRANCH_NAME: tmp/release-${{ inputs.npmTag }}-${{ inputs.version }} - NPM_TAG: ${{ inputs.npmTag }} - NPM_VERSION: ${{ inputs.version }} - outputs: - tmpBranch: ${{ steps.do-update.outputs.tmpBranch }} - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - token: ${{ secrets.PRISMA_BOT_TOKEN }} - - - name: Setup - uses: ./.github/actions/setup - - - name: Update version in temporary branch - id: do-update - run: | - git checkout -b "$TMP_BRANCH_NAME" - yarn bump-client "$NPM_TAG" "$NPM_VERSION" - git config user.email prismabots@gmail.com - git config user.name Prismo - git commit -am "chore(deps): Update prisma to $NPM_VERSION on $NPM_TAG" - git push origin "$TMP_BRANCH_NAME" - echo "tmpBranch=$TMP_BRANCH_NAME" >> "$GITHUB_OUTPUT" - - test: - name: Test release branch - needs: - - update - uses: ./.github/workflows/test.yml - with: - ref: ${{ needs.update.outputs.tmpBranch }} - secrets: inherit - - publish: - name: Merge temp branch back and publish - runs-on: ubuntu-latest - needs: - - update - - test - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - token: ${{ secrets.PRISMA_BOT_TOKEN }} - - - name: Merge temp release branch back into main - env: - TMP_BRANCH_NAME: ${{ needs.update.outputs.tmpBranch }} - run: | - git fetch origin "$TMP_BRANCH_NAME" - git merge --ff-only "origin/$TMP_BRANCH_NAME" - - - name: Setup - uses: ./.github/actions/setup - - - name: Publish - env: - NPM_TAG: ${{ inputs.npmTag }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: yarn npm publish --tag "$NPM_TAG" - - - name: Push - run: git push origin main - - notify-on-failure: - name: Notify on publish failure - needs: - - update - - test - - publish - if: ${{ always() && contains(needs.*.result, 'failure') }} - - runs-on: ubuntu-latest - steps: - - name: Set current job url in SLACK_FOOTER env var - run: echo "SLACK_FOOTER=<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID|Click here to go to the job logs>" >> $GITHUB_ENV - - - name: Slack Notification on Failure - uses: rtCamp/action-slack-notify@v2.3.0 - env: - SLACK_TITLE: 'React Native publish failed' - SLACK_COLOR: '#FF0000' - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_CHANNEL: feed-react-native-publish-failures - - finalize: - name: Cleanup - runs-on: ubuntu-latest - needs: - - update - - test - - publish - if: always() - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Remove temporary branch - env: - TMP_BRANCH_NAME: ${{ needs.update.outputs.tmpBranch }} - run: | - git push --delete origin "$TMP_BRANCH_NAME" diff --git a/.gitignore b/.gitignore index 0c25a906..640e8bb0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,85 +1,9 @@ -# OSX -# .DS_Store - -# XDE -.expo/ - -# VSCode .vscode/ jsconfig.json - -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -project.xcworkspace - -# Android/IJ -# -.classpath -.cxx -.gradle -.idea -.project -.settings -local.properties -android.iml - -# Cocoapods -# -example/ios/Pods - -# Ruby -example/vendor/ - -# node.js -# node_modules/ -npm-debug.log -yarn-debug.log -yarn-error.log - -# BUCK -buck-out/ -\.buckd/ -android/app/libs -android/keystores/debug.keystore - -# Yarn +lib/ +/native/query-compiler/target/ +/native/PrismaQueryCompiler.xcframework/ .yarn/* -!.yarn/patches -!.yarn/plugins !.yarn/releases -!.yarn/sdks -!.yarn/versions - -# Expo -.expo/ - -# Turborepo -.turbo/ - -# generated by bob -lib/ - -# config plugin output -!plugin/build - -# development client -example/client/* -engines \ No newline at end of file diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index fb3e6603..00000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -v18.20.2 diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index ef538c28..00000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -3.1.2 diff --git a/.versions/engine b/.versions/engine deleted file mode 100644 index 1e221af8..00000000 --- a/.versions/engine +++ /dev/null @@ -1 +0,0 @@ -c74f8976aaa3212c16a61537319f9024d0c21e85 \ No newline at end of file diff --git a/.versions/prisma-dev b/.versions/prisma-dev deleted file mode 100644 index 04153423..00000000 --- a/.versions/prisma-dev +++ /dev/null @@ -1 +0,0 @@ -6.1.0-dev.17 \ No newline at end of file diff --git a/.versions/prisma-latest b/.versions/prisma-latest deleted file mode 100644 index 5fe60723..00000000 --- a/.versions/prisma-latest +++ /dev/null @@ -1 +0,0 @@ -6.0.1 diff --git a/.watchmanconfig b/.watchmanconfig deleted file mode 100644 index 0967ef42..00000000 --- a/.watchmanconfig +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/.yarnrc.yml b/.yarnrc.yml index eed42233..bd0044b7 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,11 +1,2 @@ -compressionLevel: mixed - -enableGlobalCache: false - -nmHoistingLimits: workspaces - nodeLinker: node-modules - -npmAuthToken: ${NODE_AUTH_TOKEN-} - yarnPath: .yarn/releases/yarn-4.1.1.cjs diff --git a/PrismaReactNative.podspec b/PrismaReactNative.podspec new file mode 100644 index 00000000..1ac9fc8e --- /dev/null +++ b/PrismaReactNative.podspec @@ -0,0 +1,19 @@ +require "json" + +package = JSON.parse(File.read(File.join(__dir__, "package.json"))) + +Pod::Spec.new do |s| + s.name = "PrismaReactNative" + s.version = package["version"] + s.summary = package["description"] + s.homepage = package["homepage"] + s.license = package["license"] + s.author = package["author"] + s.source = { git: package["repository"]["url"] } + s.platforms = { ios: "16.4" } + s.static_framework = true + s.dependency "ExpoModulesCore" + s.source_files = "ios/**/*.{h,m,mm,swift}", "native/include/*.h" + s.public_header_files = "native/include/*.h" + s.vendored_frameworks = "native/PrismaQueryCompiler.xcframework" +end diff --git a/README.md b/README.md index bf623007..a29df350 100644 --- a/README.md +++ b/README.md @@ -1,184 +1,101 @@ -# Early Access: Prisma ORM for React Native and Expo +# React Native Prisma 7.9 -A Prisma engine adaptation for React Native. Please note that this is in [Early Access](https://www.prisma.io/docs/orm/more/releases#early-access) +面向 Expo 与 React Native 新架构的 Prisma 7.9 同步本地数据库方案。 -## Installation +- 将 Prisma 7.9 Query Compiler 精简为 SQLite 原生库,通过 Expo Modules JSI 同步调用。 +- 通过 `expo-sqlite` 的 JSI 同步接口直接读写 SQLite。 +- CRUD、聚合、关联查询和查询计划事务直接返回结果,不为每次本地查询额外创建 Promise。 +- 避免数据库已经返回、界面仍等待 Promise 调度后才更新的问题。 +- 支持 Expo 默认 Hermes,不在运行时加载 WebAssembly,也不携带旧版完整 Query Engine。 +- 当前 iOS 开发基线为 Expo 58、React Native 0.87、Prisma 7.9.1。 -Install `@prisma/client`, `@prisma/react-native` and the `react-native-quick-base64` dependency: +`release` 已包含 iPhone 与 arm64/x86_64 模拟器的原生 Query Compiler;安装后需要重新生成原生工程或执行 `bun ios`。 -``` -npm i --save --save-exact @prisma/client@latest @prisma/react-native@latest react-native-quick-base64 -``` - -To ensure migration files are copied into the app bundle you need to either enable the Expo plugin or configure ios and Android manually: - -### Expo - -If you are using Expo, you can add the expo plugin to automatically copy migration files. Modify your `app.json` by adding the react-native-prisma plugin: - -```json -{ - "expo": { - // ... The rest of your expo config - "plugins": ["@prisma/react-native"] - } -} -``` - -To activate the plugin, run prebuild: - -``` -npx expo prebuild --clean -``` +## 安装 -The Expo plugin simply configures the Android and ios projects during the prebuild phase. If you are not using Expo, you can do this manually: +`prisma`、`@prisma/client` 与本包版本必须一致: - -### iOS - -Go into `Xcode` → `Build Phases` → `Bundle React Native Code and images` and modify it so that it looks like this: - -![xcode_build_phases](xcode.png) - -```bash -set -e - -WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh" -REACT_NATIVE_XCODE="../node_modules/react-native/scripts/react-native-xcode.sh" -PRISMA_MIGRATIONS="../node_modules/@prisma/react-native/copy-migrations.sh" # Add this - -/bin/sh -c "$WITH_ENVIRONMENT $PRISMA_MIGRATIONS $REACT_NATIVE_XCODE" # Add it to the list of running scripts +```sh +bun add @prisma/client@7.9.1 expo-sqlite github:song-react/react-native-prisma#release +bun add -d prisma@7.9.1 ``` -### Android +生成器配置: -For Android you need to modify your apps `app/Build.gradle`. Add the following at the top of the file. - -```groovy -apply from: "../../node_modules/@prisma/react-native/react-native-prisma.gradle" -``` - -## Enable React Native support in your schema file - -React Native support is currently a preview feature and has to be activated in your schema.prisma file. You can place this file in the root of the application: - -```ts +```prisma generator client { - provider = "prisma-client-js" - previewFeatures = ["reactNative"] + provider = "prisma-client" + output = "../generated/prisma" } datasource db { provider = "sqlite" - url = "file:./app.db" } -// Your data model - model User { - id Int @id @default(autoincrement()) - name String + id Int @id @default(autoincrement()) + name String } ``` -You can create the database file and initial migration using Prisma migrate: +每次生成 Prisma Client 后执行准备脚本: -``` -npx prisma@latest migrate dev -``` - - -you can now generate the Prisma Client like this: - -``` -npx prisma@latest generate -``` - -## Reactive queries - -This package contains an extension to the Prisma client that allows you to use reactive queries. Use at your own convenience and care since it might introduce large re-renders in your app. - -```ts -import { PrismaClient } from '@prisma/client/react-native'; -import { reactiveHooksExtension } from '@prisma/react-native'; - -const baseClient = new PrismaClient(); - -export const extendedClient = baseClient.$extends(reactiveHooksExtension()); -``` - -Then in your React component you can use the hook: - -```tsx -import { Text } from 'react-native'; -import { extendedClient } from './myDbModule'; - -export default function App { - - // Will automatically re-render the component with new data - const users = extendedClient.user.useFindMany(); - - return ( - { users } - ) +```json +{ + "scripts": { + "db:generate": "prisma generate && prisma-react-native generated/prisma", + "db:migrate": "prisma migrate dev && bun db:generate", + "db:push": "prisma db push && bun db:generate", + "db:studio": "prisma studio", + "postinstall": "bun db:generate && prisma-react-native generated/prisma" + } } ``` -Bear in mind, for the reactive queries to work you have to use the extended client to modify the data: +`prisma-react-native` 会移除生成客户端中的 Node 与 WebAssembly 依赖,并接入 Hermes 可用的同步原生 Query Compiler。 +它还会把 `prisma/migrations/*/migration.sql` 嵌入生成的 Client,供设备端首次启动和版本升级时执行。 + +## Demo ```ts -extendedClient.user.create({ ...userData }); -``` +import { PrismaClient } from './generated/prisma/client'; +import { + PrismaExpoSQLite, + queriesExtension, +} from '@prisma/react-native'; -There are several hooks you can use for your reactive queries: +export const db = new PrismaClient({ + adapter: new PrismaExpoSQLite('app.db'), +}).$extends(queriesExtension()); -```ts -useFindMany(); -useFindFirst(); -useFindUnique(); +// 自动应用尚未执行的迁移,并完成首次连接。 +export const databaseReady = db.$applyPendingMigrations(); ``` -### Non hook reactive queries - -It is also possible to use callbacks for this queries in case you are not using hooks, but you still want to get notified when data changes +连接完成后直接同步调用: ```ts -import { PrismaClient } from '@prisma/client/react-native'; -import { reactiveQueriesExtension } from '@prisma/react-native'; +const start = async () => { + await databaseReady; -const baseClient = new PrismaClient(); + const user = db.user.create({ data: { name: 'Ada' } }); + const users = db.user.findMany({ orderBy: { id: 'desc' } }); + const count = db.user.count(); -export const extendedClient = baseClient.$extends(reactiveQueriesExtension()); + console.log(user, users, count); +}; ``` -## Applying migrations - -On application start you need to run the migrations to make sure the database is in a consistent state with your Prisma generated client: +## API ```ts -import '@prisma/react-native'; -import { PrismaClient } from '@prisma/client/react-native'; - -const baseClient = new PrismaClient(); - -async function initializeDb() { - try { - baseClient.$applyPendingMigrations(); - } catch (e) { - console.error(`failed to apply migrations: ${e}`); - throw new Error( - 'Applying migrations failed, your app is now in an inconsistent state. We cannot guarantee safety, it is now your responsibility to reset the database or tell the user to re-install the app' - ); - } -} +import { queriesExtension } from '@prisma/react-native'; +import { PrismaExpoSQLite } from '@prisma/react-native'; ``` -Care must be taken to ensure migrations will always succeed. Migrations will be executed on the users device at runtime, and if they fail to run, your application will most likely be unable to work correctly. In such a situation, the only option for the user might be to delete all app data and start over. - -## Material - -🎥 Watch the introduction at App.js here: https://www.youtube.com/watch?v=keZYUjAYSJM +开发时使用 `prisma migrate dev` 生成迁移;`prisma db push` 只更新开发机数据库,不会更新用户设备。App 启动时调用一次 `$applyPendingMigrations()`,之后 CRUD、聚合和查询计划事务均同步返回。 -📖 Read the announcement post here: https://www.prisma.io/blog/bringing-prisma-orm-to-react-native-and-expo +## 发布分支 -📹 Watch Catalin build an app with Prisma and Expo here: https://www.youtube.com/watch?v=65Iqes0lxpQ +- `main`:完整 TypeScript 源码。 +- `release`:iOS 原生 Query Compiler、CommonJS、ESM、类型声明及混淆 JS,可直接作为 Git 依赖安装。 diff --git a/android/CMakeLists.txt b/android/CMakeLists.txt deleted file mode 100644 index 65ad3a33..00000000 --- a/android/CMakeLists.txt +++ /dev/null @@ -1,54 +0,0 @@ -cmake_minimum_required(VERSION 3.9.0) -project(Prisma) - -set (PACKAGE_NAME "react-native-prisma") -set (CMAKE_VERBOSE_MAKEFILE ON) -set (CMAKE_CXX_STANDARD 17) -set (BUILD_DIR ${CMAKE_SOURCE_DIR}/build) - - -add_library( - ${PACKAGE_NAME} - SHARED - ../cpp/react-native-prisma.cpp - ../cpp/macros.h - ../cpp/QueryEngineHostObject.cpp - ../cpp/QueryEngineHostObject.h - ../cpp/react-native-prisma.h - ../cpp/ThreadPool.cpp - ../cpp/ThreadPool.h - ../cpp/utils.h - ../cpp/utils.cpp - ../engines/android/query_engine.h - cpp-adapter.cpp -) - -include_directories( - ../cpp - ../engines/android -) - -set_target_properties( - ${PACKAGE_NAME} PROPERTIES - CXX_STANDARD 17 - CXX_EXTENSIONS OFF - POSITION_INDEPENDENT_CODE ON -) - -find_package(ReactAndroid REQUIRED CONFIG) -find_package(fbjni REQUIRED CONFIG) - -cmake_path(SET QUERY_ENGINE_LIB ${CMAKE_CURRENT_SOURCE_DIR}/../engines/android/jniLibs/${ANDROID_ABI}/libquery_engine.a NORMALIZE) - -add_library(query_engine STATIC IMPORTED) -set_target_properties(query_engine PROPERTIES IMPORTED_LOCATION ${QUERY_ENGINE_LIB}) - -target_link_libraries( - ${PACKAGE_NAME} - query_engine - fbjni::fbjni - ReactAndroid::jsi - ReactAndroid::turbomodulejsijni - ReactAndroid::react_nativemodule_core - android -) \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle deleted file mode 100644 index c169c722..00000000 --- a/android/build.gradle +++ /dev/null @@ -1,162 +0,0 @@ -buildscript { - repositories { - google() - mavenCentral() - } - - dependencies { - classpath "com.android.tools.build:gradle:7.2.1" - } -} - -def isNewArchitectureEnabled() { - return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" -} - -apply plugin: "com.android.library" - -if (isNewArchitectureEnabled()) { - apply plugin: "com.facebook.react" -} - -def getExtOrDefault(name) { - return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["Prisma_" + name] -} - -def getExtOrIntegerDefault(name) { - return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["Prisma_" + name]).toInteger() -} - -def supportsNamespace() { - def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.') - def major = parsed[0].toInteger() - def minor = parsed[1].toInteger() - - // Namespace support was added in 7.3.0 - return (major == 7 && minor >= 3) || major >= 8 -} - -def resolveBuildType() { - Gradle gradle = getGradle() - String tskReqStr = gradle.getStartParameter().getTaskRequests()['args'].toString() - - return tskReqStr.contains('Release') ? 'release' : 'debug' -} - -android { - if (supportsNamespace()) { - namespace "com.prisma" - - sourceSets { - main { - manifest.srcFile "src/main/AndroidManifestNew.xml" - } - } - } - - // ndkVersion getExtOrDefault("ndkVersion") - compileSdkVersion getExtOrIntegerDefault("compileSdkVersion") - - defaultConfig { - minSdkVersion getExtOrIntegerDefault("minSdkVersion") - targetSdkVersion getExtOrIntegerDefault("targetSdkVersion") - buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() - - externalNativeBuild { - cmake { - cppFlags "-O2", "-fexceptions", "-frtti", "-DONANDROID", "-lz" - abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' - arguments '-DANDROID_STL=c++_shared' - } - } - - packagingOptions { - doNotStrip resolveBuildType() == 'debug' ? "**/**/*.so" : '' - excludes = [ - "META-INF", - "META-INF/**", - "**/libjsi.so", - "**/libreact_nativemodule_core.so", - "**/libturbomodulejsijni.so", - "**/libc++_shared.so", - "**/libfbjni.so" - ] - } - } - - externalNativeBuild { - cmake { - path "CMakeLists.txt" - } - } - - buildFeatures { - buildConfig true - prefab true - } - - buildTypes { - release { - minifyEnabled false - } - } - - lintOptions { - disable "GradleCompatible" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - sourceSets { - main { - if (isNewArchitectureEnabled()) { - java.srcDirs += [ - "src/newarch", - // This is needed to build Kotlin project with NewArch enabled - "${project.buildDir}/generated/source/codegen/java" - ] - } else { - java.srcDirs += ["src/oldarch"] - } - } - } -} - -repositories { - mavenCentral() - google() -} - - -dependencies { - // For < 0.71, this will be from the local maven repo - // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin - //noinspection GradleDynamicVersion - implementation "com.facebook.react:react-native:+" -} - -// Resolves "LOCAL_SRC_FILES points to a missing file, Check that libfb.so exists or that its path is correct". -tasks.whenTaskAdded { task -> - if (task.name.contains("configureCMakeDebug")) { - rootProject.getTasksByName("packageReactNdkDebugLibs", true).forEach { - task.dependsOn(it) - } - } - // We want to add a dependency for both configureCMakeRelease and configureCMakeRelWithDebInfo - if (task.name.contains("configureCMakeRel")) { - rootProject.getTasksByName("packageReactNdkReleaseLibs", true).forEach { - task.dependsOn(it) - } - } -} - -if (isNewArchitectureEnabled()) { - react { - jsRootDir = file("../src/") - libraryName = "Prisma" - codegenJavaPackageName = "com.prisma" - } -} diff --git a/android/cpp-adapter.cpp b/android/cpp-adapter.cpp deleted file mode 100644 index 8957ec53..00000000 --- a/android/cpp-adapter.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "react-native-prisma.h" -#include -#include -#include -#include -#include - -namespace jni = facebook::jni; -namespace react = facebook::react; -namespace jsi = facebook::jsi; - -struct PrismaModule : jni::JavaClass { - static constexpr auto kJavaDescriptor = "Lcom/prisma/PrismaModule;"; - - static void registerNatives() { - javaClassStatic()->registerNatives( - {makeNativeMethod("installNativeJsi", PrismaModule::installNativeJsi)}); - } - -private: - static void installNativeJsi( - jni::alias_ref thiz, jlong jsiRuntimePtr, - jni::alias_ref jsCallInvokerHolder, - jni::alias_ref docPath, - jni::alias_ref migrationsPath) { - auto jsiRuntime = reinterpret_cast(jsiRuntimePtr); - auto jsCallInvoker = jsCallInvokerHolder->cthis()->getCallInvoker(); - std::string docPathString = docPath->toStdString(); - std::string migrationsPathString = migrationsPath->toStdString(); - - prisma::install_cxx(*jsiRuntime, jsCallInvoker, docPathString.c_str(), - migrationsPathString.c_str()); - } -}; - -JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *) { - return jni::initialize(vm, [] { PrismaModule::registerNatives(); }); -} \ No newline at end of file diff --git a/android/gradle.properties b/android/gradle.properties deleted file mode 100644 index a59aaeb9..00000000 --- a/android/gradle.properties +++ /dev/null @@ -1,5 +0,0 @@ -Prisma_kotlinVersion=1.7.0 -Prisma_minSdkVersion=21 -Prisma_targetSdkVersion=34 -Prisma_compileSdkVersion=34 -Prisma_ndkversion=21.4.7075529 diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml deleted file mode 100644 index 5605b402..00000000 --- a/android/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - diff --git a/android/src/main/AndroidManifestNew.xml b/android/src/main/AndroidManifestNew.xml deleted file mode 100644 index a2f47b60..00000000 --- a/android/src/main/AndroidManifestNew.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/android/src/main/java/com/prisma/PrismaModule.java b/android/src/main/java/com/prisma/PrismaModule.java deleted file mode 100644 index 97d5d43d..00000000 --- a/android/src/main/java/com/prisma/PrismaModule.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.prisma; - -import android.content.res.AssetManager; -import android.os.Environment; - -import androidx.annotation.NonNull; - -import com.facebook.react.bridge.Promise; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.ReactMethod; -import com.facebook.react.turbomodule.core.CallInvokerHolderImpl; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -public class PrismaModule extends PrismaSpec { - public static final String NAME = "Prisma"; - - PrismaModule(ReactApplicationContext context) { - super(context); - } - - @Override - @NonNull - public String getName() { - return NAME; - } - - static { -// System.loadLibrary("query-engine"); - System.loadLibrary("react-native-prisma"); - } - - public static native void installNativeJsi(long jsContextNativePointer, CallInvokerHolderImpl callInvoker, String docPath, String migrationsPath); - - public String copyDirorfileFromAssetManager(String arg_assetDir, String arg_destinationDir) throws IOException - { - String sd_path = getReactApplicationContext().getCacheDir().getAbsolutePath(); - String dest_dir_path = sd_path + addLeadingSlash(arg_destinationDir); - File dest_dir = new File(dest_dir_path); - - createDir(dest_dir); - - AssetManager asset_manager = getReactApplicationContext().getAssets(); - String[] files = asset_manager.list(arg_assetDir); - - for (int i = 0; i < files.length; i++) - { - - String abs_asset_file_path = addTrailingSlash(arg_assetDir) + files[i]; - String sub_files[] = asset_manager.list(abs_asset_file_path); - - if (sub_files.length == 0) - { - // It is a file - String dest_file_path = addTrailingSlash(dest_dir_path) + files[i]; - copyAssetFile(abs_asset_file_path, dest_file_path); - } else - { - // It is a sub directory - copyDirorfileFromAssetManager(abs_asset_file_path, addTrailingSlash(arg_destinationDir) + files[i]); - } - } - - return dest_dir_path; - } - - - public void copyAssetFile(String assetFilePath, String destinationFilePath) throws IOException - { - InputStream in = getReactApplicationContext().getAssets().open(assetFilePath); - OutputStream out = new FileOutputStream(destinationFilePath); - - byte[] buf = new byte[1024]; - int len; - while ((len = in.read(buf)) > 0) - out.write(buf, 0, len); - in.close(); - out.close(); - } - - public String addTrailingSlash(String path) - { - if (path.charAt(path.length() - 1) != '/') - { - path += "/"; - } - return path; - } - - public String addLeadingSlash(String path) - { - if (path.charAt(0) != '/') - { - path = "/" + path; - } - return path; - } - - public void createDir(File dir) throws IOException - { - if (dir.exists()) - { - if (!dir.isDirectory()) - { - throw new IOException("Can't create directory, a file is in the way"); - } - } else - { - dir.mkdirs(); - if (!dir.isDirectory()) - { - throw new IOException("Unable to create directory"); - } - } - } - - @ReactMethod(isBlockingSynchronousMethod = true) - public void install() { - ReactApplicationContext context = this.getReactApplicationContext(); - long jsContextPointer = context.getJavaScriptContextHolder().get(); - CallInvokerHolderImpl jsCallInvokerHolder = (CallInvokerHolderImpl)context.getCatalystInstance().getJSCallInvokerHolder(); - String dbPath = context.getDatabasePath("defaultDatabase").getAbsolutePath().replace("defaultDatabase", ""); - String migrationsPath; - try { - migrationsPath = copyDirorfileFromAssetManager("migrations", "migrations"); - } catch (IOException e) { - throw new RuntimeException(e); - } - installNativeJsi( - jsContextPointer, - jsCallInvokerHolder, - dbPath, migrationsPath - ); - } -} diff --git a/android/src/main/java/com/prisma/PrismaPackage.java b/android/src/main/java/com/prisma/PrismaPackage.java deleted file mode 100644 index cd0f7889..00000000 --- a/android/src/main/java/com/prisma/PrismaPackage.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.prisma; - -import androidx.annotation.Nullable; - -import com.facebook.react.bridge.NativeModule; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.module.model.ReactModuleInfo; -import com.facebook.react.module.model.ReactModuleInfoProvider; -import com.facebook.react.TurboReactPackage; - -import java.util.HashMap; -import java.util.Map; - -public class PrismaPackage extends TurboReactPackage { - - @Nullable - @Override - public NativeModule getModule(String name, ReactApplicationContext reactContext) { - if (name.equals(PrismaModule.NAME)) { - return new PrismaModule(reactContext); - } else { - return null; - } - } - - @Override - public ReactModuleInfoProvider getReactModuleInfoProvider() { - return () -> { - final Map moduleInfos = new HashMap<>(); - boolean isTurboModule = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; - moduleInfos.put( - PrismaModule.NAME, - new ReactModuleInfo( - PrismaModule.NAME, - PrismaModule.NAME, - false, // canOverrideExistingModule - false, // needsEagerInit - true, // hasConstants - false, // isCxxModule - isTurboModule // isTurboModule - )); - return moduleInfos; - }; - } -} diff --git a/android/src/newarch/PrismaSpec.java b/android/src/newarch/PrismaSpec.java deleted file mode 100644 index 442b4972..00000000 --- a/android/src/newarch/PrismaSpec.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.prisma; - -import com.facebook.react.bridge.ReactApplicationContext; - -abstract class PrismaSpec extends NativePrismaSpec { - PrismaSpec(ReactApplicationContext context) { - super(context); - } -} diff --git a/android/src/oldarch/PrismaSpec.java b/android/src/oldarch/PrismaSpec.java deleted file mode 100644 index dd3e1069..00000000 --- a/android/src/oldarch/PrismaSpec.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.prisma; - -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.ReactContextBaseJavaModule; -import com.facebook.react.bridge.Promise; - -abstract class PrismaSpec extends ReactContextBaseJavaModule { - PrismaSpec(ReactApplicationContext context) { - super(context); - } - - public abstract void install(); -} diff --git a/app.plugin.js b/app.plugin.js deleted file mode 100644 index 3ae4fa6e..00000000 --- a/app.plugin.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./expo'); diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index 21769e85..00000000 --- a/babel.config.js +++ /dev/null @@ -1,4 +0,0 @@ -/* eslint-env node */ -module.exports = { - presets: ['module:@react-native/babel-preset'], -}; diff --git a/copy-migrations.sh b/copy-migrations.sh deleted file mode 100755 index 43205c26..00000000 --- a/copy-migrations.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -echo "Copying prisma migration files..." - -MIGRATIONS_TARGET=${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH} - -rm -rf "$MIGRATIONS_TARGET/migrations" -mkdir "$MIGRATIONS_TARGET/migrations" -cp -r ${SRCROOT}/../migrations ${MIGRATIONS_TARGET} - -echo "migration files copied ✅" \ No newline at end of file diff --git a/cpp/QueryEngineHostObject.cpp b/cpp/QueryEngineHostObject.cpp deleted file mode 100644 index 8fa6c038..00000000 --- a/cpp/QueryEngineHostObject.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "QueryEngineHostObject.h" - -namespace prisma { -namespace jsi = facebook::jsi; - -QueryEngineHostObject::QueryEngineHostObject( - std::string id, std::function log_callback) { - this->id = id; - this->log_callback = log_callback; -} - -void QueryEngineHostObject::setEngine(QueryEngine *ptr) { this->engine = ptr; } - -} // namespace prisma diff --git a/cpp/QueryEngineHostObject.h b/cpp/QueryEngineHostObject.h deleted file mode 100644 index ec18d023..00000000 --- a/cpp/QueryEngineHostObject.h +++ /dev/null @@ -1,26 +0,0 @@ - -#ifndef query_engine_host_object_h -#define query_engine_host_object_h - -#include "query_engine.h" -#include -#include -#include - -namespace prisma { -namespace jsi = facebook::jsi; - -class JSI_EXPORT QueryEngineHostObject : public jsi::HostObject { -public: - QueryEngineHostObject(std::string id, - std::function log_callback); - - void setEngine(QueryEngine *ptr); - - std::string id; - std::function log_callback; - QueryEngine *engine; -}; -} // namespace prisma - -#endif diff --git a/cpp/ThreadPool.cpp b/cpp/ThreadPool.cpp deleted file mode 100644 index 9a4c1b72..00000000 --- a/cpp/ThreadPool.cpp +++ /dev/null @@ -1,117 +0,0 @@ -#include "ThreadPool.h" - -namespace prisma { - -ThreadPool::ThreadPool() : done(false) { - // This returns the number of threads supported by the system. If the - // function can't figure out this information, it returns 0. 0 is not good, - // so we create at least 1 - auto numberOfThreads = std::thread::hardware_concurrency(); - if (numberOfThreads == 0) { - numberOfThreads = 1; - } - - for (unsigned i = 0; i < numberOfThreads; ++i) { - // The threads will execute the private member `doWork`. Note that we need - // to pass a reference to the function (namespaced with the class name) as - // the first argument, and the current object as second argument - threads.push_back(std::thread(&ThreadPool::doWork, this)); - } -} - -// The destructor joins all the threads so the program can exit gracefully. -// This will be executed if there is any exception (e.g. creating the threads) -ThreadPool::~ThreadPool() { - // So threads know it's time to shut down - done = true; - - // Wake up all the threads, so they can finish and be joined - workQueueConditionVariable.notify_all(); - - for (auto &thread : threads) { - if (thread.joinable()) { - thread.join(); - } - } - - threads.clear(); -} - -// This function will be called by the server every time there is a request -// that needs to be processed by the thread pool -void ThreadPool::queueWork(std::function task) { - // Grab the mutex - std::lock_guard g(workQueueMutex); - - // Push the request to the queue - workQueue.push(task); - - // Notify one thread that there are requests to process - workQueueConditionVariable.notify_one(); -} - -// Function used by the threads to grab work from the queue -void ThreadPool::doWork() { - // Loop while the queue is not destructing - while (!done) { - std::function task; - - // Create a scope, so we don't lock the queue for longer than necessary - { - std::unique_lock g(workQueueMutex); - workQueueConditionVariable.wait(g, [&] { - // Only wake up if there are elements in the queue or the program is - // shutting down - return !workQueue.empty() || done; - }); - - // If we are shutting down exit witout trying to process more work - if (done) { - break; - } - - task = workQueue.front(); - workQueue.pop(); - } - ++busy; - task(); - --busy; - } -} - -void ThreadPool::waitFinished() { - std::unique_lock g(workQueueMutex); - workQueueConditionVariable.wait( - g, [&] { return workQueue.empty() && (busy == 0); }); -} - -void ThreadPool::restartPool() { - // So threads know it's time to shut down - done = true; - - // Wake up all the threads, so they can finish and be joined - workQueueConditionVariable.notify_all(); - - for (auto &thread : threads) { - if (thread.joinable()) { - thread.join(); - } - } - - threads.clear(); - - auto numberOfThreads = std::thread::hardware_concurrency(); - if (numberOfThreads == 0) { - numberOfThreads = 1; - } - - for (unsigned i = 0; i < numberOfThreads; ++i) { - // The threads will execute the private member `doWork`. Note that we need - // to pass a reference to the function (namespaced with the class name) as - // the first argument, and the current object as second argument - threads.push_back(std::thread(&ThreadPool::doWork, this)); - } - - done = false; -} -} // namespace prisma diff --git a/cpp/ThreadPool.h b/cpp/ThreadPool.h deleted file mode 100644 index f368a9f3..00000000 --- a/cpp/ThreadPool.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef ThreadPool_h -#define ThreadPool_h - -#include -#include -#include -#include -#include -#include -#include - -namespace prisma { - -class ThreadPool { -public: - ThreadPool(); - ~ThreadPool(); - void queueWork(std::function task); - void waitFinished(); - void restartPool(); - -private: - unsigned int busy; - // This condition variable is used for the threads to wait until there is work - // to do - std::condition_variable_any workQueueConditionVariable; - - // We store the threads in a vector, so we can later stop them gracefully - std::vector threads; - - // Mutex to protect workQueue - std::mutex workQueueMutex; - - // Queue of requests waiting to be processed - std::queue> workQueue; - - // This will be set to true when the thread pool is shutting down. This tells - // the threads to stop looping and finish - bool done; - - // Function used by the threads to grab work from the queue - void doWork(); -}; - -} // namespace prisma - -#endif /* ThreadPool_h */ diff --git a/cpp/macros.h b/cpp/macros.h deleted file mode 100644 index 592e0c4e..00000000 --- a/cpp/macros.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef macros_h -#define macros_h - -#define HOSTFN(name, basecount) \ -jsi::Function::createFromHostFunction( \ -rt, \ -jsi::PropNameID::forAscii(rt, name), \ -basecount, \ -[=](jsi::Runtime &rt, const jsi::Value &thisValue, const jsi::Value *args, size_t count) -> jsi::Value - -#endif /* macros_h */ diff --git a/cpp/react-native-prisma.cpp b/cpp/react-native-prisma.cpp deleted file mode 100644 index 387fbd0b..00000000 --- a/cpp/react-native-prisma.cpp +++ /dev/null @@ -1,274 +0,0 @@ -#include "react-native-prisma.h" -#include "QueryEngineHostObject.h" -#include "ThreadPool.h" -#include "macros.h" -#include "query_engine.h" -#include "utils.h" -#include -#include - -namespace prisma { - -namespace jsi = facebook::jsi; - -static std::string base_path; -std::string migrations_path; -std::shared_ptr call_invoker; -std::unordered_map> - engine_map; -ThreadPool thread_pool; - -// Pure C function that is used by Rust to call the log callback -extern void log_callback(const char *id, const char *msg) { - if (engine_map.count(id)) { - auto engine = engine_map[id]; - engine->log_callback(msg); - } -} - -void install_cxx(jsi::Runtime &rt, - std::shared_ptr call_invoker_param, - const char *base_path_param, - const char *migrations_path_param) { - base_path = std::string(base_path_param); - migrations_path = std::string(migrations_path_param); - call_invoker = call_invoker_param; - - auto create = HOSTFN("create", 1) { - // Rust will return a pointer to the internal struct, C++ has nothing to do - // with this it will only be passed to the stateless functions - QueryEngine *ptr; - // Each query engine requires a unique id to route the logging messages - std::string id = get_uuid(); - - jsi::Object params = args[0].asObject(rt); - - std::string datamodel = - params.getProperty(rt, "datamodel").asString(rt).utf8(rt); - std::string log_level = - params.getProperty(rt, "logLevel").asString(rt).utf8(rt); - bool log_queries = params.getProperty(rt, "logQueries").asBool(); - std::shared_ptr js_log_callback = - std::make_shared(params.getProperty(rt, "logCallback")); - bool ignore_env_var_errors = - params.getProperty(rt, "ignoreEnvVarErrors").asBool(); - std::string env = params.getProperty(rt, "env").asString(rt).utf8(rt); - std::string datasource_overrides = - params.getProperty(rt, "datasourceOverrides").asString(rt).utf8(rt); - - ConstructorOptionsNative nativeOptions = ConstructorOptionsNative{""}; - ConstructorOptions options = - ConstructorOptions{.id = id.c_str(), - .datamodel = datamodel.c_str(), - .base_path = base_path.c_str(), - .log_level = log_level.c_str(), - .log_queries = log_queries, - .datasource_overrides = datasource_overrides.c_str(), - .env = env.c_str(), - .ignore_env_var_errors = ignore_env_var_errors, - .native = nativeOptions, - .log_callback = &log_callback}; - - char *error_ptr; - - int prisma_res = prisma_create(options, &ptr, &error_ptr); - - if (prisma_res != PRISMA_OK) { - auto error_string = std::string(error_ptr); - free(error_ptr); - throw std::runtime_error("Failed to create prisma engine: " + - error_string); - } - - auto log_callback_fn = [&rt, js_log_callback](std::string msg) { - call_invoker->invokeAsync([&rt, msg, &js_log_callback] { - js_log_callback->asObject(rt).asFunction(rt).call( - rt, jsi::String::createFromUtf8(rt, msg)); - }); - }; - - QueryEngineHostObject engineHostObject = - QueryEngineHostObject(id, log_callback_fn); - - engineHostObject.setEngine(ptr); - - auto engine = std::make_shared(engineHostObject); - engine_map[id] = engine; - - return jsi::Object::createFromHostObject(rt, engine); - }); - - auto connect = HOSTFN("connect", 2) { - std::shared_ptr queryEngineHostObject = - args[0].asObject(rt).asHostObject(rt); - std::string trace = args[1].asString(rt).utf8(rt); - char *error_ptr; - - int result = prisma_connect(queryEngineHostObject->engine, trace.c_str(), - &error_ptr); - if (result != PRISMA_OK) { - std::string error_message(error_ptr); - free(error_ptr); - throw std::runtime_error(error_message); - } - return {}; - }); - - auto execute = HOSTFN("execute", 4) { - std::shared_ptr queryEngineHostObject = - args[0].asObject(rt).asHostObject(rt); - std::string body = args[1].asString(rt).utf8(rt); - std::string trace = args[2].asString(rt).utf8(rt); - std::string tx_id; - if (count > 3 && args[3].isString()) { - tx_id = args[3].asString(rt).utf8(rt); - } - - auto promise_constructor = rt.global().getPropertyAsFunction(rt, "Promise"); - - auto promise = promise_constructor.callAsConstructor(rt, HOSTFN("executor", 2) { - auto resolve = std::make_shared(rt, args[0]); - auto reject = std::make_shared(rt, args[1]); - - auto task = [&rt, &queryEngineHostObject, body = std::move(body), - trace = std::move(trace), tx_id = std::move(tx_id), resolve, - reject]() { - const char *response; - char *error_ptr; - - if (!tx_id.empty()) { - response = prisma_query(queryEngineHostObject->engine, body.c_str(), - trace.c_str(), tx_id.c_str(), &error_ptr); - } else { - response = prisma_query(queryEngineHostObject->engine, body.c_str(), - trace.c_str(), nullptr, &error_ptr); - } - - call_invoker->invokeAsync([&rt, response = std::move(response), - error_ptr, resolve, reject]() { - if (error_ptr == nullptr) { - resolve->asObject(rt).asFunction(rt).call( - rt, jsi::String::createFromUtf8(rt, response)); - } else { - auto errCtr = rt.global().getPropertyAsFunction(rt, "Error"); - std::string error_message(error_ptr); - free(error_ptr); - - auto error = errCtr.callAsConstructor( - rt, jsi::String::createFromUtf8(rt, error_message)); - - reject->asObject(rt).asFunction(rt).call(rt, error); - } - }); - }; - - thread_pool.queueWork(task); - - return {}; - })); - - return promise; - }); - - auto start_transaction = HOSTFN("startTransaction", 3) { - std::shared_ptr queryEngineHostObject = - args[0].asObject(rt).asHostObject(rt); - std::string body = args[1].asString(rt).utf8(rt); - std::string trace = args[2].asString(rt).utf8(rt); - - const char *response = prisma_start_transaction( - queryEngineHostObject->engine, body.c_str(), trace.c_str()); - - if (response == nullptr) { - throw std::runtime_error("prisma engine did not start transaction"); - } - - return jsi::String::createFromUtf8(rt, std::string(response)); - }); - - auto commit_transaction = HOSTFN("commitTransaction", 3) { - std::shared_ptr queryEngineHostObject = - args[0].asObject(rt).asHostObject(rt); - std::string body = args[1].asString(rt).utf8(rt); - std::string trace = args[2].asString(rt).utf8(rt); - - const char *response = prisma_commit_transaction( - queryEngineHostObject->engine, body.c_str(), trace.c_str()); - - if (response == nullptr) { - throw std::runtime_error("prisma engine did not commit transaction"); - } - - return jsi::String::createFromUtf8(rt, std::string(response)); - }); - - auto rollback_transaction = HOSTFN("rollbackTransaction", 3) { - std::shared_ptr queryEngineHostObject = - args[0].asObject(rt).asHostObject(rt); - std::string body = args[1].asString(rt).utf8(rt); - std::string trace = args[2].asString(rt).utf8(rt); - - const char *response = prisma_rollback_transaction( - queryEngineHostObject->engine, body.c_str(), trace.c_str()); - - if (response == nullptr) { - throw std::runtime_error("prisma engine did not rollback transaction"); - } - - return jsi::String::createFromUtf8(rt, std::string(response)); - }); - - auto disconnect = HOSTFN("disconnect", 2) { - std::shared_ptr queryEngineHostObject = - args[0].asObject(rt).asHostObject(rt); - std::string trace = args[1].asString(rt).utf8(rt); - - engine_map.erase(queryEngineHostObject->id); - - int res = prisma_disconnect(queryEngineHostObject->engine, trace.c_str()); - - if (res != PRISMA_OK) { - throw std::runtime_error("Could not disconnect from prisma query engine"); - } - return {}; - }); - - auto apply_pending_migrations = HOSTFN("applyPendingMigrations", 1) { - std::shared_ptr queryEngineHostObject = - args[0].asObject(rt).asHostObject(rt); - char *error_ptr; - int res = prisma_apply_pending_migrations( - queryEngineHostObject->engine, migrations_path.c_str(), &error_ptr); - - if (res != PRISMA_OK) { - auto error_string = std::string(error_ptr); - free(error_ptr); - throw std::runtime_error(error_string); - } - - return {}; - }); - - jsi::Object module = jsi::Object(rt); - module.setProperty(rt, "create", std::move(create)); - module.setProperty(rt, "connect", std::move(connect)); - module.setProperty(rt, "execute", std::move(execute)); - module.setProperty(rt, "startTransaction", std::move(start_transaction)); - module.setProperty(rt, "commitTransaction", std::move(commit_transaction)); - module.setProperty(rt, "rollbackTransaction", - std::move(rollback_transaction)); - module.setProperty(rt, "disconnect", std::move(disconnect)); - module.setProperty(rt, "applyPendingMigrations", - std::move(apply_pending_migrations)); - - rt.global().setProperty(rt, "__PrismaProxy", std::move(module)); -} - -void invalidate() { - for (auto &engine : engine_map) { - prisma_destroy(engine.second->engine); - } - engine_map.clear(); -} - -} // namespace prisma diff --git a/cpp/react-native-prisma.h b/cpp/react-native-prisma.h deleted file mode 100644 index 316a921f..00000000 --- a/cpp/react-native-prisma.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef PRISMA_H -#define PRISMA_H - -#include -#include - -namespace prisma { - -namespace jsi = facebook::jsi; -namespace react = facebook::react; - -void install_cxx(jsi::Runtime &rt, - std::shared_ptr jsCallInvoker, - const char *basePathStr, const char *migrations_path); -void invalidate(); -} // namespace prisma - -#endif /* PRISMA_H */ diff --git a/cpp/utils.cpp b/cpp/utils.cpp deleted file mode 100644 index 6e19c16b..00000000 --- a/cpp/utils.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "utils.h" -#include -#include - -// Semi random function, more than enough for our purposes -std::string get_uuid() { - static std::random_device dev; - static std::mt19937 rng(dev()); - - std::uniform_int_distribution dist(0, 15); - - const char *v = "0123456789abcdef"; - const bool dash[] = {0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0}; - - std::string res; - for (int i = 0; i < 16; i++) { - if (dash[i]) - res += "-"; - res += v[dist(rng)]; - res += v[dist(rng)]; - } - return res; -} \ No newline at end of file diff --git a/cpp/utils.h b/cpp/utils.h deleted file mode 100644 index d1d5ab02..00000000 --- a/cpp/utils.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once -#include - -std::string get_uuid(); \ No newline at end of file diff --git a/example/.bundle/config b/example/.bundle/config deleted file mode 100644 index 848943bb..00000000 --- a/example/.bundle/config +++ /dev/null @@ -1,2 +0,0 @@ -BUNDLE_PATH: "vendor/bundle" -BUNDLE_FORCE_RUBY_PLATFORM: 1 diff --git a/example/.detoxrc.js b/example/.detoxrc.js deleted file mode 100644 index e26ba46a..00000000 --- a/example/.detoxrc.js +++ /dev/null @@ -1,50 +0,0 @@ -/** @type {Detox.DetoxConfig} */ -module.exports = { - testRunner: { - args: { - $0: 'jest', - config: 'e2e/jest.config.js', - }, - jest: { - setupTimeout: 120000, - }, - }, - apps: { - 'ios.release': { - type: 'ios.app', - binaryPath: 'ios/build/Build/Products/Release-iphonesimulator/Prisma.app', - build: - 'xcodebuild -quiet -workspace ios/PrismaExample.xcworkspace -scheme Release -configuration Release -sdk iphonesimulator -derivedDataPath ios/build', - }, - 'android.release': { - type: 'android.apk', - binaryPath: 'android/app/build/outputs/apk/release/app-release.apk', - build: - 'cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ..', - }, - }, - devices: { - simulator: { - type: 'ios.simulator', - device: { - type: 'iPhone 15', - }, - }, - emulator: { - type: 'android.emulator', - device: { - avdName: 'Pixel_API_28', - }, - }, - }, - configurations: { - 'ios.sim.release': { - device: 'simulator', - app: 'ios.release', - }, - 'android.emu.release': { - device: 'emulator', - app: 'android.release', - }, - }, -}; diff --git a/example/.ruby-version b/example/.ruby-version deleted file mode 100644 index 15a27998..00000000 --- a/example/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -3.3.0 diff --git a/example/.watchmanconfig b/example/.watchmanconfig deleted file mode 100644 index 0967ef42..00000000 --- a/example/.watchmanconfig +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/example/Gemfile b/example/Gemfile deleted file mode 100644 index 7558f393..00000000 --- a/example/Gemfile +++ /dev/null @@ -1,7 +0,0 @@ -source 'https://rubygems.org' - -# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby ">= 2.6.10" - -gem 'cocoapods', '1.14' -gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' diff --git a/example/Gemfile.lock b/example/Gemfile.lock deleted file mode 100644 index 7b06f222..00000000 --- a/example/Gemfile.lock +++ /dev/null @@ -1,105 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (3.0.7) - base64 - nkf - rexml - activesupport (6.1.7.6) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 1.6, < 2) - minitest (>= 5.1) - tzinfo (~> 2.0) - zeitwerk (~> 2.3) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) - algoliasearch (1.27.5) - httpclient (~> 2.8, >= 2.8.3) - json (>= 1.5.1) - atomos (0.1.3) - base64 (0.2.0) - claide (1.1.0) - cocoapods (1.14.0) - addressable (~> 2.8) - claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.14.0) - cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 2.0) - cocoapods-plugins (>= 1.0.0, < 2.0) - cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.6.0, < 2.0) - cocoapods-try (>= 1.1.0, < 2.0) - colored2 (~> 3.1) - escape (~> 0.0.4) - fourflusher (>= 2.3.0, < 3.0) - gh_inspector (~> 1.0) - molinillo (~> 0.8.0) - nap (~> 1.0) - ruby-macho (>= 2.3.0, < 3.0) - xcodeproj (>= 1.23.0, < 2.0) - cocoapods-core (1.14.0) - activesupport (>= 5.0, < 8) - addressable (~> 2.8) - algoliasearch (~> 1.0) - concurrent-ruby (~> 1.1) - fuzzy_match (~> 2.0.4) - nap (~> 1.0) - netrc (~> 0.11) - public_suffix (~> 4.0) - typhoeus (~> 1.0) - cocoapods-deintegrate (1.0.5) - cocoapods-downloader (2.1) - cocoapods-plugins (1.0.0) - nap - cocoapods-search (1.0.1) - cocoapods-trunk (1.6.0) - nap (>= 0.8, < 2.0) - netrc (~> 0.11) - cocoapods-try (1.2.0) - colored2 (3.1.2) - concurrent-ruby (1.2.2) - escape (0.0.4) - ethon (0.16.0) - ffi (>= 1.15.0) - ffi (1.16.3) - fourflusher (2.3.1) - fuzzy_match (2.0.4) - gh_inspector (1.1.3) - httpclient (2.8.3) - i18n (1.14.1) - concurrent-ruby (~> 1.0) - json (2.7.1) - minitest (5.20.0) - molinillo (0.8.0) - nanaimo (0.3.0) - nap (1.1.0) - netrc (0.11.0) - nkf (0.2.0) - public_suffix (4.0.7) - rexml (3.2.6) - ruby-macho (2.5.1) - typhoeus (1.4.1) - ethon (>= 0.9.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - xcodeproj (1.24.0) - CFPropertyList (>= 2.3.3, < 4.0) - atomos (~> 0.1.3) - claide (>= 1.0.2, < 2.0) - colored2 (~> 3.1) - nanaimo (~> 0.3.0) - rexml (~> 3.2.4) - zeitwerk (2.6.13) - -PLATFORMS - ruby - -DEPENDENCIES - activesupport (>= 6.1.7.3, < 7.1.0) - cocoapods (= 1.14) - -RUBY VERSION - ruby 2.7.6p219 - -BUNDLED WITH - 2.4.2 diff --git a/example/README.md b/example/README.md deleted file mode 100644 index 12470c30..00000000 --- a/example/README.md +++ /dev/null @@ -1,79 +0,0 @@ -This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli). - -# Getting Started - ->**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. - -## Step 1: Start the Metro Server - -First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native. - -To start Metro, run the following command from the _root_ of your React Native project: - -```bash -# using npm -npm start - -# OR using Yarn -yarn start -``` - -## Step 2: Start your Application - -Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app: - -### For Android - -```bash -# using npm -npm run android - -# OR using Yarn -yarn android -``` - -### For iOS - -```bash -# using npm -npm run ios - -# OR using Yarn -yarn ios -``` - -If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly. - -This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively. - -## Step 3: Modifying your App - -Now that you have successfully run the app, let's modify it. - -1. Open `App.tsx` in your text editor of choice and edit some lines. -2. For **Android**: Press the R key twice or select **"Reload"** from the **Developer Menu** (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) to see your changes! - - For **iOS**: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes! - -## Congratulations! :tada: - -You've successfully run and modified your React Native App. :partying_face: - -### Now what? - -- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps). -- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started). - -# Troubleshooting - -If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page. - -# Learn More - -To learn more about React Native, take a look at the following resources: - -- [React Native Website](https://reactnative.dev) - learn more about React Native. -- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment. -- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**. -- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts. -- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native. diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle deleted file mode 100644 index ad320b80..00000000 --- a/example/android/app/build.gradle +++ /dev/null @@ -1,131 +0,0 @@ -apply plugin: "com.android.application" -apply plugin: "org.jetbrains.kotlin.android" -apply plugin: "com.facebook.react" -apply from: "../../../react-native-prisma.gradle" - -/** - * This is the configuration block to customize your React Native Android app. - * By default you don't need to apply any configuration, just uncomment the lines you need. - */ -react { - /* Folders */ - // The root of your project, i.e. where "package.json" lives. Default is '..' - // root = file("../") - // The folder where the react-native NPM package is. Default is ../node_modules/react-native - // reactNativeDir = file("../node_modules/react-native") - // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen - // codegenDir = file("../node_modules/@react-native/codegen") - // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js - // cliFile = file("../node_modules/react-native/cli.js") - - /* Variants */ - // The list of variants to that are debuggable. For those we're going to - // skip the bundling of the JS bundle and the assets. By default is just 'debug'. - // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. - // debuggableVariants = ["liteDebug", "prodDebug"] - - /* Bundling */ - // A list containing the node command and its flags. Default is just 'node'. - // nodeExecutableAndArgs = ["node"] - // - // The command to run when bundling. By default is 'bundle' - // bundleCommand = "ram-bundle" - // - // The path to the CLI configuration file. Default is empty. - // bundleConfig = file(../rn-cli.config.js) - // - // The name of the generated asset file containing your JS bundle - // bundleAssetName = "MyApplication.android.bundle" - // - // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' - // entryFile = file("../js/MyApplication.android.js") - // - // A list of extra flags to pass to the 'bundle' commands. - // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle - // extraPackagerArgs = [] - - /* Hermes Commands */ - // The hermes compiler command to run. By default it is 'hermesc' - // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" - // - // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" - // hermesFlags = ["-O", "-output-source-map"] -} - -/** - * Set this to true to Run Proguard on Release builds to minify the Java bytecode. - */ -def enableProguardInReleaseBuilds = false - -/** - * The preferred build flavor of JavaScriptCore (JSC) - * - * For example, to use the international variant, you can use: - * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` - * - * The international variant includes ICU i18n library and necessary data - * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that - * give correct results when using with locales other than en-US. Note that - * this variant is about 6MiB larger per architecture than default. - */ -def jscFlavor = 'org.webkit:android-jsc:+' - -android { - ndkVersion rootProject.ext.ndkVersion - buildToolsVersion rootProject.ext.buildToolsVersion - compileSdk rootProject.ext.compileSdkVersion - - namespace "com.prismaexample" - defaultConfig { - applicationId "com.prismaexample" - minSdkVersion rootProject.ext.minSdkVersion - targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1 - versionName "1.0" - testBuildType System.getProperty('testBuildType', 'debug') - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - } - signingConfigs { - debug { - storeFile file('debug.keystore') - storePassword 'android' - keyAlias 'androiddebugkey' - keyPassword 'android' - } - } - buildTypes { - debug { - signingConfig signingConfigs.debug - } - release { - // Caution! In production, you need to generate your own keystore file. - // see https://reactnative.dev/docs/signed-apk-android. - signingConfig signingConfigs.debug - minifyEnabled enableProguardInReleaseBuilds - proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" - proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro" - } - } -} - -dependencies { - // The version of react-native is set by the React Native Gradle Plugin - implementation("com.facebook.react:react-android") - implementation("com.facebook.react:flipper-integration") - androidTestImplementation('com.wix:detox:+') - implementation('androidx.appcompat:appcompat:1.1.0') - - if (hermesEnabled.toBoolean()) { - implementation("com.facebook.react:hermes-android") - } else { - implementation jscFlavor - } -} - -configurations.all { - resolutionStrategy { - force 'androidx.test:core:1.5.0' - } -} - -apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) diff --git a/example/android/app/debug.keystore b/example/android/app/debug.keystore deleted file mode 100644 index 364e105e..00000000 Binary files a/example/android/app/debug.keystore and /dev/null differ diff --git a/example/android/app/proguard-rules.pro b/example/android/app/proguard-rules.pro deleted file mode 100644 index 11b02572..00000000 --- a/example/android/app/proguard-rules.pro +++ /dev/null @@ -1,10 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: diff --git a/example/android/app/src/androidTest/java/com/prismaexample/DetoxTest.java b/example/android/app/src/androidTest/java/com/prismaexample/DetoxTest.java deleted file mode 100644 index e4a4aaed..00000000 --- a/example/android/app/src/androidTest/java/com/prismaexample/DetoxTest.java +++ /dev/null @@ -1,30 +0,0 @@ - -package com.prismaexample; - -import com.wix.detox.Detox; -import com.wix.detox.config.DetoxConfig; - -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; - -import androidx.test.ext.junit.runners.AndroidJUnit4; -import androidx.test.filters.LargeTest; -import androidx.test.rule.ActivityTestRule; - -@RunWith(AndroidJUnit4.class) -@LargeTest -public class DetoxTest { - @Rule - public ActivityTestRule mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false); - - @Test - public void runDetoxTests() { - DetoxConfig detoxConfig = new DetoxConfig(); - detoxConfig.idlePolicyConfig.masterTimeoutSec = 90; - detoxConfig.idlePolicyConfig.idleResourceTimeoutSec = 60; - detoxConfig.rnContextLoadTimeoutSec = (BuildConfig.DEBUG ? 180 : 60); - - Detox.runTests(mActivityRule, detoxConfig); - } -} \ No newline at end of file diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index eb98c01a..00000000 --- a/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 5d684a23..00000000 --- a/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - diff --git a/example/android/app/src/main/assets/migrations/0_init/migration.sql b/example/android/app/src/main/assets/migrations/0_init/migration.sql deleted file mode 100644 index d2e6651e..00000000 --- a/example/android/app/src/main/assets/migrations/0_init/migration.sql +++ /dev/null @@ -1,53 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "email" TEXT NOT NULL, - "name" TEXT, - "nick" TEXT -); - --- CreateTable -CREATE TABLE "Profile" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "bio" TEXT NOT NULL, - "userId" INTEGER NOT NULL, - CONSTRAINT "Profile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "Post" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL, - "title" TEXT NOT NULL, - "published" BOOLEAN NOT NULL DEFAULT false, - "authorId" INTEGER NOT NULL, - CONSTRAINT "Post_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "Category" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "name" TEXT NOT NULL -); - --- CreateTable -CREATE TABLE "_CategoryToPost" ( - "A" INTEGER NOT NULL, - "B" INTEGER NOT NULL, - CONSTRAINT "_CategoryToPost_A_fkey" FOREIGN KEY ("A") REFERENCES "Category" ("id") ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT "_CategoryToPost_B_fkey" FOREIGN KEY ("B") REFERENCES "Post" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateIndex -CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); - --- CreateIndex -CREATE UNIQUE INDEX "Profile_userId_key" ON "Profile"("userId"); - --- CreateIndex -CREATE UNIQUE INDEX "_CategoryToPost_AB_unique" ON "_CategoryToPost"("A", "B"); - --- CreateIndex -CREATE INDEX "_CategoryToPost_B_index" ON "_CategoryToPost"("B"); - diff --git a/example/android/app/src/main/assets/migrations/20240118142005_nick2/migration.sql b/example/android/app/src/main/assets/migrations/20240118142005_nick2/migration.sql deleted file mode 100644 index 6af8f23f..00000000 --- a/example/android/app/src/main/assets/migrations/20240118142005_nick2/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE "User" ADD COLUMN "nick2" TEXT; diff --git a/example/android/app/src/main/assets/migrations/20240119102352_nick3/migration.sql b/example/android/app/src/main/assets/migrations/20240119102352_nick3/migration.sql deleted file mode 100644 index 42103e81..00000000 --- a/example/android/app/src/main/assets/migrations/20240119102352_nick3/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE "User" ADD COLUMN "nick3" TEXT; diff --git a/example/android/app/src/main/assets/migrations/20240119143417_nick4/migration.sql b/example/android/app/src/main/assets/migrations/20240119143417_nick4/migration.sql deleted file mode 100644 index 616a6b93..00000000 --- a/example/android/app/src/main/assets/migrations/20240119143417_nick4/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE "User" ADD COLUMN "nick4" TEXT; diff --git a/example/android/app/src/main/assets/migrations/20240122145141_my_field/migration.sql b/example/android/app/src/main/assets/migrations/20240122145141_my_field/migration.sql deleted file mode 100644 index 17fa170f..00000000 --- a/example/android/app/src/main/assets/migrations/20240122145141_my_field/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE "User" ADD COLUMN "myField" TEXT; diff --git a/example/android/app/src/main/assets/migrations/migration_lock.toml b/example/android/app/src/main/assets/migrations/migration_lock.toml deleted file mode 100644 index e5e5c470..00000000 --- a/example/android/app/src/main/assets/migrations/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "sqlite" \ No newline at end of file diff --git a/example/android/app/src/main/java/com/prismaexample/MainActivity.kt b/example/android/app/src/main/java/com/prismaexample/MainActivity.kt deleted file mode 100644 index 5459b2db..00000000 --- a/example/android/app/src/main/java/com/prismaexample/MainActivity.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.prismaexample - -import com.facebook.react.ReactActivity -import com.facebook.react.ReactActivityDelegate -import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled -import com.facebook.react.defaults.DefaultReactActivityDelegate - -class MainActivity : ReactActivity() { - - /** - * Returns the name of the main component registered from JavaScript. This is used to schedule - * rendering of the component. - */ - override fun getMainComponentName(): String = "PrismaExample" - - /** - * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] - * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] - */ - override fun createReactActivityDelegate(): ReactActivityDelegate = - DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) -} diff --git a/example/android/app/src/main/java/com/prismaexample/MainApplication.kt b/example/android/app/src/main/java/com/prismaexample/MainApplication.kt deleted file mode 100644 index b86a256f..00000000 --- a/example/android/app/src/main/java/com/prismaexample/MainApplication.kt +++ /dev/null @@ -1,45 +0,0 @@ -package com.prismaexample - -import android.app.Application -import com.facebook.react.PackageList -import com.facebook.react.ReactApplication -import com.facebook.react.ReactHost -import com.facebook.react.ReactNativeHost -import com.facebook.react.ReactPackage -import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load -import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost -import com.facebook.react.defaults.DefaultReactNativeHost -import com.facebook.react.flipper.ReactNativeFlipper -import com.facebook.soloader.SoLoader - -class MainApplication : Application(), ReactApplication { - - override val reactNativeHost: ReactNativeHost = - object : DefaultReactNativeHost(this) { - override fun getPackages(): List { - // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); - return PackageList(this).packages - } - - override fun getJSMainModuleName(): String = "index" - - override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG - - override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED - override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED - } - - override val reactHost: ReactHost - get() = getDefaultReactHost(this.applicationContext, reactNativeHost) - - override fun onCreate() { - super.onCreate() - SoLoader.init(this, false) - if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { - // If you opted-in for the New Architecture, we load the native entry point for this app. - load() - } - ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager) - } -} diff --git a/example/android/app/src/main/res/drawable/rn_edit_text_material.xml b/example/android/app/src/main/res/drawable/rn_edit_text_material.xml deleted file mode 100644 index 73b37e4d..00000000 --- a/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index a2f59082..00000000 Binary files a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 1b523998..00000000 Binary files a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index ff10afd6..00000000 Binary files a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index 115a4c76..00000000 Binary files a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index dcd3cd80..00000000 Binary files a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 459ca609..00000000 Binary files a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 8ca12fe0..00000000 Binary files a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 8e19b410..00000000 Binary files a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index b824ebdd..00000000 Binary files a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 4c19a13c..00000000 Binary files a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/example/android/app/src/main/res/values/strings.xml b/example/android/app/src/main/res/values/strings.xml deleted file mode 100644 index c518fb81..00000000 --- a/example/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - PrismaExample - diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 7ba83a2a..00000000 --- a/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/example/android/app/src/main/res/xml/network_security_config.xml b/example/android/app/src/main/res/xml/network_security_config.xml deleted file mode 100644 index c7755e76..00000000 --- a/example/android/app/src/main/res/xml/network_security_config.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - 10.0.2.2 - localhost - - \ No newline at end of file diff --git a/example/android/build.gradle b/example/android/build.gradle deleted file mode 100644 index fb94af9f..00000000 --- a/example/android/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -buildscript { - ext { - buildToolsVersion = "34.0.0" - minSdkVersion = 21 - compileSdkVersion = 34 - targetSdkVersion = 34 - ndkVersion = "25.1.8937393" - kotlinVersion = "1.8.0" - } - repositories { - google() - mavenCentral() - - } - dependencies { - classpath("com.android.tools.build:gradle") - classpath("com.facebook.react:react-native-gradle-plugin") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") - } -} - -allprojects { - repositories { - maven { - url "$rootDir/../node_modules/detox/Detox-android" - } - } -} - -apply plugin: "com.facebook.react.rootproject" diff --git a/example/android/gradle.properties b/example/android/gradle.properties deleted file mode 100644 index a46a5b90..00000000 --- a/example/android/gradle.properties +++ /dev/null @@ -1,41 +0,0 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m -org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true - -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app's APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true -# Automatically convert third-party libraries to use AndroidX -android.enableJetifier=true - -# Use this property to specify which architecture you want to build. -# You can also override it from the CLI using -# ./gradlew -PreactNativeArchitectures=x86_64 -reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 - -# Use this property to enable support to the new architecture. -# This will allow you to use TurboModules and the Fabric render in -# your application. You should enable this flag either if you want -# to write custom TurboModules/Fabric components OR use libraries that -# are providing them. -newArchEnabled=false - -# Use this property to enable or disable the Hermes JS engine. -# If set to false, you will be using JSC instead. -hermesEnabled=true diff --git a/example/android/gradle/wrapper/gradle-wrapper.jar b/example/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 7f93135c..00000000 Binary files a/example/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index d11cdd90..00000000 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip -networkTimeout=10000 -validateDistributionUrl=true -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/example/android/gradlew b/example/android/gradlew deleted file mode 100755 index 0adc8e1a..00000000 --- a/example/android/gradlew +++ /dev/null @@ -1,249 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/example/android/gradlew.bat b/example/android/gradlew.bat deleted file mode 100644 index 93e3f59f..00000000 --- a/example/android/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/example/android/settings.gradle b/example/android/settings.gradle deleted file mode 100644 index f2bca566..00000000 --- a/example/android/settings.gradle +++ /dev/null @@ -1,4 +0,0 @@ -rootProject.name = 'PrismaExample' -apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) -include ':app' -includeBuild('../node_modules/@react-native/gradle-plugin') diff --git a/example/app.json b/example/app.json deleted file mode 100644 index 6b936fd7..00000000 --- a/example/app.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "PrismaExample", - "displayName": "PrismaExample" -} diff --git a/example/babel.config.js b/example/babel.config.js deleted file mode 100644 index d3622460..00000000 --- a/example/babel.config.js +++ /dev/null @@ -1,19 +0,0 @@ -/* eslint-env node */ -const path = require('path'); - -const pak = require('../package.json'); - -module.exports = { - presets: ['module:@react-native/babel-preset', 'nativewind/babel'], - plugins: [ - [ - 'module-resolver', - { - extensions: ['.tsx', '.ts', '.js', '.json'], - alias: { - [pak.name]: path.join(__dirname, '..', pak.source), - }, - }, - ], - ], -}; diff --git a/example/dev.db b/example/dev.db deleted file mode 100644 index a36fd182..00000000 Binary files a/example/dev.db and /dev/null differ diff --git a/example/dev.db-journal b/example/dev.db-journal deleted file mode 100644 index 8265c0d5..00000000 Binary files a/example/dev.db-journal and /dev/null differ diff --git a/example/e2e/jest.config.js b/example/e2e/jest.config.js deleted file mode 100644 index 4f980203..00000000 --- a/example/e2e/jest.config.js +++ /dev/null @@ -1,12 +0,0 @@ -/** @type {import('@jest/types').Config.InitialOptions} */ -module.exports = { - rootDir: '..', - testMatch: ['/e2e/**/*.test.js'], - testTimeout: 120000, - maxWorkers: 1, - globalSetup: 'detox/runners/jest/globalSetup', - globalTeardown: 'detox/runners/jest/globalTeardown', - reporters: ['detox/runners/jest/reporter'], - testEnvironment: 'detox/runners/jest/testEnvironment', - verbose: true, -}; diff --git a/example/e2e/starter.test.js b/example/e2e/starter.test.js deleted file mode 100644 index a1c5c14b..00000000 --- a/example/e2e/starter.test.js +++ /dev/null @@ -1,14 +0,0 @@ -/* eslint-disable no-undef */ -describe('Example', () => { - beforeAll(async () => { - await device.launchApp(); - }); - - beforeEach(async () => { - await device.reloadReactNative(); - }); - - it('Show basic test passed indicator', async () => { - await expect(element(by.id('test_indicator'))).toBeVisible(); - }); -}); diff --git a/example/global.css b/example/global.css deleted file mode 100644 index b5c61c95..00000000 --- a/example/global.css +++ /dev/null @@ -1,3 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; diff --git a/example/globals.d.ts b/example/globals.d.ts deleted file mode 100644 index a13e3136..00000000 --- a/example/globals.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/example/index.js b/example/index.js deleted file mode 100644 index e77bb4a6..00000000 --- a/example/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import { AppRegistry } from 'react-native'; - -import { name as appName } from './app.json'; -import App from './src/App'; - -AppRegistry.registerComponent(appName, () => App); diff --git a/example/ios/.xcode.env b/example/ios/.xcode.env deleted file mode 100644 index 3d5782c7..00000000 --- a/example/ios/.xcode.env +++ /dev/null @@ -1,11 +0,0 @@ -# This `.xcode.env` file is versioned and is used to source the environment -# used when running script phases inside Xcode. -# To customize your local environment, you can create an `.xcode.env.local` -# file that is not versioned. - -# NODE_BINARY variable contains the PATH to the node executable. -# -# Customize the NODE_BINARY variable here. -# For example, to use nvm with brew, add the following line -# . "$(brew --prefix nvm)/nvm.sh" --no-use -export NODE_BINARY=$(command -v node) diff --git a/example/ios/.xcode.env.local b/example/ios/.xcode.env.local deleted file mode 100644 index 36623492..00000000 --- a/example/ios/.xcode.env.local +++ /dev/null @@ -1 +0,0 @@ -export NODE_BINARY=$(command -v node) \ No newline at end of file diff --git a/example/ios/File.swift b/example/ios/File.swift deleted file mode 100644 index cb2608fd..00000000 --- a/example/ios/File.swift +++ /dev/null @@ -1,6 +0,0 @@ -// -// File.swift -// PrismaExample -// - -import Foundation diff --git a/example/ios/Podfile b/example/ios/Podfile deleted file mode 100644 index 05475bc6..00000000 --- a/example/ios/Podfile +++ /dev/null @@ -1,34 +0,0 @@ -# Resolve react_native_pods.rb with node to allow for hoisting -require Pod::Executable.execute_command('node', ['-p', - 'require.resolve( - "react-native/scripts/react_native_pods.rb", - {paths: [process.argv[1]]}, - )', __dir__]).strip - -platform :ios, min_ios_version_supported -prepare_react_native_project! -inhibit_all_warnings! - -linkage = ENV['USE_FRAMEWORKS'] -if linkage != nil - Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green - use_frameworks! :linkage => linkage.to_sym -end - -target 'PrismaExample' do - config = use_native_modules! - - use_react_native!( - :path => config[:reactNativePath], - :app_path => "#{Pod::Config.instance.installation_root}/.." - ) - - post_install do |installer| - # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 - react_native_post_install( - installer, - config[:reactNativePath], - :mac_catalyst_enabled => false - ) - end -end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock deleted file mode 100644 index d04dbb46..00000000 --- a/example/ios/Podfile.lock +++ /dev/null @@ -1,1315 +0,0 @@ -PODS: - - boost (1.83.0) - - DoubleConversion (1.1.6) - - FBLazyVector (0.73.2) - - FBReactNativeSpec (0.73.2): - - RCT-Folly (= 2022.05.16.00) - - RCTRequired (= 0.73.2) - - RCTTypeSafety (= 0.73.2) - - React-Core (= 0.73.2) - - React-jsi (= 0.73.2) - - ReactCommon/turbomodule/core (= 0.73.2) - - fmt (6.2.1) - - GCDWebServer (3.5.4): - - GCDWebServer/Core (= 3.5.4) - - GCDWebServer/Core (3.5.4) - - glog (0.3.5) - - hermes-engine (0.73.2): - - hermes-engine/Pre-built (= 0.73.2) - - hermes-engine/Pre-built (0.73.2) - - libevent (2.1.12) - - RCT-Folly (2022.05.16.00): - - boost - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - RCT-Folly/Default (= 2022.05.16.00) - - RCT-Folly/Default (2022.05.16.00): - - boost - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - RCT-Folly/Fabric (2022.05.16.00): - - boost - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - RCT-Folly/Futures (2022.05.16.00): - - boost - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - libevent - - RCTRequired (0.73.2) - - RCTTypeSafety (0.73.2): - - FBLazyVector (= 0.73.2) - - RCTRequired (= 0.73.2) - - React-Core (= 0.73.2) - - React (0.73.2): - - React-Core (= 0.73.2) - - React-Core/DevSupport (= 0.73.2) - - React-Core/RCTWebSocket (= 0.73.2) - - React-RCTActionSheet (= 0.73.2) - - React-RCTAnimation (= 0.73.2) - - React-RCTBlob (= 0.73.2) - - React-RCTImage (= 0.73.2) - - React-RCTLinking (= 0.73.2) - - React-RCTNetwork (= 0.73.2) - - React-RCTSettings (= 0.73.2) - - React-RCTText (= 0.73.2) - - React-RCTVibration (= 0.73.2) - - React-callinvoker (0.73.2) - - React-Codegen (0.73.2): - - DoubleConversion - - FBReactNativeSpec - - glog - - hermes-engine - - RCT-Folly - - RCTRequired - - RCTTypeSafety - - React-Core - - React-jsi - - React-jsiexecutor - - React-NativeModulesApple - - React-rncore - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - React-Core (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.2) - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/CoreModulesHeaders (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/Default (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/DevSupport (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.2) - - React-Core/RCTWebSocket (= 0.73.2) - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector (= 0.73.2) - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTActionSheetHeaders (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTAnimationHeaders (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTBlobHeaders (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTImageHeaders (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTLinkingHeaders (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTNetworkHeaders (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTSettingsHeaders (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTTextHeaders (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTVibrationHeaders (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-Core/Default - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-Core/RCTWebSocket (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-Core/Default (= 0.73.2) - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.6.1) - - Yoga - - React-CoreModules (0.73.2): - - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety (= 0.73.2) - - React-Codegen - - React-Core/CoreModulesHeaders (= 0.73.2) - - React-jsi (= 0.73.2) - - React-NativeModulesApple - - React-RCTBlob - - React-RCTImage (= 0.73.2) - - ReactCommon - - SocketRocket (= 0.6.1) - - React-cxxreact (0.73.2): - - boost (= 1.83.0) - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.2) - - React-debug (= 0.73.2) - - React-jsi (= 0.73.2) - - React-jsinspector (= 0.73.2) - - React-logger (= 0.73.2) - - React-perflogger (= 0.73.2) - - React-runtimeexecutor (= 0.73.2) - - React-debug (0.73.2) - - React-Fabric (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/animations (= 0.73.2) - - React-Fabric/attributedstring (= 0.73.2) - - React-Fabric/componentregistry (= 0.73.2) - - React-Fabric/componentregistrynative (= 0.73.2) - - React-Fabric/components (= 0.73.2) - - React-Fabric/core (= 0.73.2) - - React-Fabric/imagemanager (= 0.73.2) - - React-Fabric/leakchecker (= 0.73.2) - - React-Fabric/mounting (= 0.73.2) - - React-Fabric/scheduler (= 0.73.2) - - React-Fabric/telemetry (= 0.73.2) - - React-Fabric/templateprocessor (= 0.73.2) - - React-Fabric/textlayoutmanager (= 0.73.2) - - React-Fabric/uimanager (= 0.73.2) - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/animations (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/attributedstring (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/componentregistry (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/componentregistrynative (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/components/inputaccessory (= 0.73.2) - - React-Fabric/components/legacyviewmanagerinterop (= 0.73.2) - - React-Fabric/components/modal (= 0.73.2) - - React-Fabric/components/rncore (= 0.73.2) - - React-Fabric/components/root (= 0.73.2) - - React-Fabric/components/safeareaview (= 0.73.2) - - React-Fabric/components/scrollview (= 0.73.2) - - React-Fabric/components/text (= 0.73.2) - - React-Fabric/components/textinput (= 0.73.2) - - React-Fabric/components/unimplementedview (= 0.73.2) - - React-Fabric/components/view (= 0.73.2) - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/inputaccessory (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/modal (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/rncore (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/root (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/safeareaview (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/scrollview (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/text (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/textinput (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/unimplementedview (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/view (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - Yoga - - React-Fabric/core (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/mounting (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/scheduler (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/telemetry (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/textlayoutmanager (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/uimanager - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/uimanager (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-FabricImage (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - RCTRequired (= 0.73.2) - - RCTTypeSafety (= 0.73.2) - - React-Fabric - - React-graphics - - React-ImageManager - - React-jsi - - React-jsiexecutor (= 0.73.2) - - React-logger - - React-rendererdebug - - React-utils - - ReactCommon - - Yoga - - React-graphics (0.73.2): - - glog - - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core/Default (= 0.73.2) - - React-utils - - React-hermes (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - RCT-Folly/Futures (= 2022.05.16.00) - - React-cxxreact (= 0.73.2) - - React-jsi - - React-jsiexecutor (= 0.73.2) - - React-jsinspector (= 0.73.2) - - React-perflogger (= 0.73.2) - - React-ImageManager (0.73.2): - - glog - - RCT-Folly/Fabric - - React-Core/Default - - React-debug - - React-Fabric - - React-graphics - - React-rendererdebug - - React-utils - - React-jserrorhandler (0.73.2): - - RCT-Folly/Fabric (= 2022.05.16.00) - - React-debug - - React-jsi - - React-Mapbuffer - - React-jsi (0.73.2): - - boost (= 1.83.0) - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-jsiexecutor (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-cxxreact (= 0.73.2) - - React-jsi (= 0.73.2) - - React-perflogger (= 0.73.2) - - React-jsinspector (0.73.2) - - React-logger (0.73.2): - - glog - - React-Mapbuffer (0.73.2): - - glog - - React-debug - - react-native-http-bridge-refurbished (1.3.2): - - GCDWebServer - - React - - react-native-network-info (5.2.1): - - React - - react-native-prisma (0.2.1): - - glog - - RCT-Folly (= 2022.05.16.00) - - React - - React-callinvoker - - React-Core - - react-native-quick-base64 (2.0.8): - - React-Core - - React-nativeconfig (0.73.2) - - React-NativeModulesApple (0.73.2): - - glog - - hermes-engine - - React-callinvoker - - React-Core - - React-cxxreact - - React-jsi - - React-runtimeexecutor - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - React-perflogger (0.73.2) - - React-RCTActionSheet (0.73.2): - - React-Core/RCTActionSheetHeaders (= 0.73.2) - - React-RCTAnimation (0.73.2): - - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety - - React-Codegen - - React-Core/RCTAnimationHeaders - - React-jsi - - React-NativeModulesApple - - ReactCommon - - React-RCTAppDelegate (0.73.2): - - RCT-Folly - - RCTRequired - - RCTTypeSafety - - React-Core - - React-CoreModules - - React-hermes - - React-nativeconfig - - React-NativeModulesApple - - React-RCTFabric - - React-RCTImage - - React-RCTNetwork - - React-runtimescheduler - - ReactCommon - - React-RCTBlob (0.73.2): - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-Codegen - - React-Core/RCTBlobHeaders - - React-Core/RCTWebSocket - - React-jsi - - React-NativeModulesApple - - React-RCTNetwork - - ReactCommon - - React-RCTFabric (0.73.2): - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2022.05.16.00) - - React-Core - - React-debug - - React-Fabric - - React-FabricImage - - React-graphics - - React-ImageManager - - React-jsi - - React-nativeconfig - - React-RCTImage - - React-RCTText - - React-rendererdebug - - React-runtimescheduler - - React-utils - - Yoga - - React-RCTImage (0.73.2): - - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety - - React-Codegen - - React-Core/RCTImageHeaders - - React-jsi - - React-NativeModulesApple - - React-RCTNetwork - - ReactCommon - - React-RCTLinking (0.73.2): - - React-Codegen - - React-Core/RCTLinkingHeaders (= 0.73.2) - - React-jsi (= 0.73.2) - - React-NativeModulesApple - - ReactCommon - - ReactCommon/turbomodule/core (= 0.73.2) - - React-RCTNetwork (0.73.2): - - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety - - React-Codegen - - React-Core/RCTNetworkHeaders - - React-jsi - - React-NativeModulesApple - - ReactCommon - - React-RCTSettings (0.73.2): - - RCT-Folly (= 2022.05.16.00) - - RCTTypeSafety - - React-Codegen - - React-Core/RCTSettingsHeaders - - React-jsi - - React-NativeModulesApple - - ReactCommon - - React-RCTText (0.73.2): - - React-Core/RCTTextHeaders (= 0.73.2) - - Yoga - - React-RCTVibration (0.73.2): - - RCT-Folly (= 2022.05.16.00) - - React-Codegen - - React-Core/RCTVibrationHeaders - - React-jsi - - React-NativeModulesApple - - ReactCommon - - React-rendererdebug (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - RCT-Folly (= 2022.05.16.00) - - React-debug - - React-rncore (0.73.2) - - React-runtimeexecutor (0.73.2): - - React-jsi (= 0.73.2) - - React-runtimescheduler (0.73.2): - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-callinvoker - - React-cxxreact - - React-debug - - React-jsi - - React-rendererdebug - - React-runtimeexecutor - - React-utils - - React-utils (0.73.2): - - glog - - RCT-Folly (= 2022.05.16.00) - - React-debug - - ReactCommon (0.73.2): - - React-logger (= 0.73.2) - - ReactCommon/turbomodule (= 0.73.2) - - ReactCommon/turbomodule (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.2) - - React-cxxreact (= 0.73.2) - - React-jsi (= 0.73.2) - - React-logger (= 0.73.2) - - React-perflogger (= 0.73.2) - - ReactCommon/turbomodule/bridging (= 0.73.2) - - ReactCommon/turbomodule/core (= 0.73.2) - - ReactCommon/turbomodule/bridging (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.2) - - React-cxxreact (= 0.73.2) - - React-jsi (= 0.73.2) - - React-logger (= 0.73.2) - - React-perflogger (= 0.73.2) - - ReactCommon/turbomodule/core (0.73.2): - - DoubleConversion - - fmt (~> 6.2.1) - - glog - - hermes-engine - - RCT-Folly (= 2022.05.16.00) - - React-callinvoker (= 0.73.2) - - React-cxxreact (= 0.73.2) - - React-jsi (= 0.73.2) - - React-logger (= 0.73.2) - - React-perflogger (= 0.73.2) - - RNReanimated (3.7.2): - - glog - - RCT-Folly (= 2022.05.16.00) - - React-Core - - ReactCommon/turbomodule/core - - SocketRocket (0.6.1) - - Yoga (1.14.0) - -DEPENDENCIES: - - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - - libevent (~> 2.1.12) - - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - - RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) - - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) - - React (from `../node_modules/react-native/`) - - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) - - React-Codegen (from `build/generated/ios`) - - React-Core (from `../node_modules/react-native/`) - - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) - - React-debug (from `../node_modules/react-native/ReactCommon/react/debug`) - - React-Fabric (from `../node_modules/react-native/ReactCommon`) - - React-FabricImage (from `../node_modules/react-native/ReactCommon`) - - React-graphics (from `../node_modules/react-native/ReactCommon/react/renderer/graphics`) - - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) - - React-ImageManager (from `../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios`) - - React-jserrorhandler (from `../node_modules/react-native/ReactCommon/jserrorhandler`) - - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector-modern`) - - React-logger (from `../node_modules/react-native/ReactCommon/logger`) - - React-Mapbuffer (from `../node_modules/react-native/ReactCommon`) - - react-native-http-bridge-refurbished (from `../node_modules/react-native-http-bridge-refurbished`) - - react-native-network-info (from `../node_modules/react-native-network-info`) - - react-native-prisma (from `../..`) - - react-native-quick-base64 (from `../node_modules/react-native-quick-base64`) - - React-nativeconfig (from `../node_modules/react-native/ReactCommon`) - - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) - - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) - - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) - - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) - - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) - - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) - - React-RCTFabric (from `../node_modules/react-native/React`) - - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) - - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) - - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) - - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) - - React-RCTText (from `../node_modules/react-native/Libraries/Text`) - - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - - React-rendererdebug (from `../node_modules/react-native/ReactCommon/react/renderer/debug`) - - React-rncore (from `../node_modules/react-native/ReactCommon`) - - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) - - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) - - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) - - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - - RNReanimated (from `../node_modules/react-native-reanimated`) - - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) - -SPEC REPOS: - trunk: - - fmt - - GCDWebServer - - libevent - - SocketRocket - -EXTERNAL SOURCES: - boost: - :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" - DoubleConversion: - :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" - FBLazyVector: - :path: "../node_modules/react-native/Libraries/FBLazyVector" - FBReactNativeSpec: - :path: "../node_modules/react-native/React/FBReactNativeSpec" - glog: - :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" - hermes-engine: - :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" - :tag: hermes-2023-11-17-RNv0.73.0-21043a3fc062be445e56a2c10ecd8be028dd9cc5 - RCT-Folly: - :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" - RCTRequired: - :path: "../node_modules/react-native/Libraries/RCTRequired" - RCTTypeSafety: - :path: "../node_modules/react-native/Libraries/TypeSafety" - React: - :path: "../node_modules/react-native/" - React-callinvoker: - :path: "../node_modules/react-native/ReactCommon/callinvoker" - React-Codegen: - :path: build/generated/ios - React-Core: - :path: "../node_modules/react-native/" - React-CoreModules: - :path: "../node_modules/react-native/React/CoreModules" - React-cxxreact: - :path: "../node_modules/react-native/ReactCommon/cxxreact" - React-debug: - :path: "../node_modules/react-native/ReactCommon/react/debug" - React-Fabric: - :path: "../node_modules/react-native/ReactCommon" - React-FabricImage: - :path: "../node_modules/react-native/ReactCommon" - React-graphics: - :path: "../node_modules/react-native/ReactCommon/react/renderer/graphics" - React-hermes: - :path: "../node_modules/react-native/ReactCommon/hermes" - React-ImageManager: - :path: "../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios" - React-jserrorhandler: - :path: "../node_modules/react-native/ReactCommon/jserrorhandler" - React-jsi: - :path: "../node_modules/react-native/ReactCommon/jsi" - React-jsiexecutor: - :path: "../node_modules/react-native/ReactCommon/jsiexecutor" - React-jsinspector: - :path: "../node_modules/react-native/ReactCommon/jsinspector-modern" - React-logger: - :path: "../node_modules/react-native/ReactCommon/logger" - React-Mapbuffer: - :path: "../node_modules/react-native/ReactCommon" - react-native-http-bridge-refurbished: - :path: "../node_modules/react-native-http-bridge-refurbished" - react-native-network-info: - :path: "../node_modules/react-native-network-info" - react-native-prisma: - :path: "../.." - react-native-quick-base64: - :path: "../node_modules/react-native-quick-base64" - React-nativeconfig: - :path: "../node_modules/react-native/ReactCommon" - React-NativeModulesApple: - :path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios" - React-perflogger: - :path: "../node_modules/react-native/ReactCommon/reactperflogger" - React-RCTActionSheet: - :path: "../node_modules/react-native/Libraries/ActionSheetIOS" - React-RCTAnimation: - :path: "../node_modules/react-native/Libraries/NativeAnimation" - React-RCTAppDelegate: - :path: "../node_modules/react-native/Libraries/AppDelegate" - React-RCTBlob: - :path: "../node_modules/react-native/Libraries/Blob" - React-RCTFabric: - :path: "../node_modules/react-native/React" - React-RCTImage: - :path: "../node_modules/react-native/Libraries/Image" - React-RCTLinking: - :path: "../node_modules/react-native/Libraries/LinkingIOS" - React-RCTNetwork: - :path: "../node_modules/react-native/Libraries/Network" - React-RCTSettings: - :path: "../node_modules/react-native/Libraries/Settings" - React-RCTText: - :path: "../node_modules/react-native/Libraries/Text" - React-RCTVibration: - :path: "../node_modules/react-native/Libraries/Vibration" - React-rendererdebug: - :path: "../node_modules/react-native/ReactCommon/react/renderer/debug" - React-rncore: - :path: "../node_modules/react-native/ReactCommon" - React-runtimeexecutor: - :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" - React-runtimescheduler: - :path: "../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" - React-utils: - :path: "../node_modules/react-native/ReactCommon/react/utils" - ReactCommon: - :path: "../node_modules/react-native/ReactCommon" - RNReanimated: - :path: "../node_modules/react-native-reanimated" - Yoga: - :path: "../node_modules/react-native/ReactCommon/yoga" - -SPEC CHECKSUMS: - boost: d3f49c53809116a5d38da093a8aa78bf551aed09 - DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 - FBLazyVector: fbc4957d9aa695250b55d879c1d86f79d7e69ab4 - FBReactNativeSpec: 86de768f89901ef6ed3207cd686362189d64ac88 - fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - GCDWebServer: 2c156a56c8226e2d5c0c3f208a3621ccffbe3ce4 - glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 - hermes-engine: b361c9ef5ef3cda53f66e195599b47e1f84ffa35 - libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 - RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 - RCTRequired: 9b1e7e262745fb671e33c51c1078d093bd30e322 - RCTTypeSafety: a759e3b086eccf3e2cbf2493d22f28e082f958e6 - React: 805f5dd55bbdb92c36b4914c64aaae4c97d358dc - React-callinvoker: 6a697867607c990c2c2c085296ee32cfb5e47c01 - React-Codegen: c4447ffa339f4e7a22e0c9c800eec9084f31899c - React-Core: 49f66fecc7695464e9b7bc7dc7cd9473d2c60584 - React-CoreModules: 710e7c557a1a8180bd1645f5b4bf79f4bd3f5417 - React-cxxreact: 345857b5e4be000c0527df78be3b41a0677a20ce - React-debug: f1637bce73342b2f6eee4982508fdfb088667a87 - React-Fabric: 4dfcff8f14d8e5a7a60b11b7862dad2a9d99c65b - React-FabricImage: 4a9e9510b7f28bbde6a743b18c0cb941a142e938 - React-graphics: dd5af9d8b1b45171fd6933e19fed522f373bcb10 - React-hermes: a52d183a5cf8ccb7020ce3df4275b89d01e6b53e - React-ImageManager: c5b7db131eff71443d7f3a8d686fd841d18befd3 - React-jserrorhandler: 97a6a12e2344c3c4fdd7ba1edefb005215c732f8 - React-jsi: a182068133f80918cd0eec77875abaf943a0b6be - React-jsiexecutor: dacd00ce8a18fc00a0ae6c25e3015a6437e5d2e8 - React-jsinspector: 03644c063fc3621c9a4e8bf263a8150909129618 - React-logger: 66b168e2b2bee57bd8ce9e69f739d805732a5570 - React-Mapbuffer: 9ee041e1d7be96da6d76a251f92e72b711c651d6 - react-native-http-bridge-refurbished: 88fe66aa55e63807bd8cbaa372c062bc76ed4962 - react-native-network-info: d1290ffc0bd0709e11436f5b8d7f605dcc5c4530 - react-native-prisma: abb2f1b788c7fde4f056fa7d125fa82e706fa8dd - react-native-quick-base64: 777057ea4286f806b00259ede65dc79c7c706320 - React-nativeconfig: d753fbbc8cecc8ae413d615599ac378bbf6999bb - React-NativeModulesApple: 964f4eeab1b4325e8b6a799cf4444c3fd4eb0a9c - React-perflogger: 29efe63b7ef5fbaaa50ef6eaa92482f98a24b97e - React-RCTActionSheet: 69134c62aefd362027b20da01cd5d14ffd39db3f - React-RCTAnimation: 3b5a57087c7a5e727855b803d643ac1d445488f5 - React-RCTAppDelegate: a3ce9b69c0620a1717d08e826d4dc7ad8a3a3cae - React-RCTBlob: 26ea660f2be1e6de62f2d2ad9a9c7b9bfabb786f - React-RCTFabric: bb6dbbff2f80b9489f8b2f1d2554aa040aa2e3cd - React-RCTImage: 27b27f4663df9e776d0549ed2f3536213e793f1b - React-RCTLinking: 962880ce9d0e2ea83fd182953538fc4ed757d4da - React-RCTNetwork: 73a756b44d4ad584bae13a5f1484e3ce12accac8 - React-RCTSettings: 6d7f8d807f05de3d01cfb182d14e5f400716faac - React-RCTText: 73006e95ca359595c2510c1c0114027c85a6ddd3 - React-RCTVibration: 599f427f9cbdd9c4bf38959ca020e8fef0717211 - React-rendererdebug: f2946e0a1c3b906e71555a7c4a39aa6a6c0e639b - React-rncore: 74030de0ffef7b1a3fb77941168624534cc9ae7f - React-runtimeexecutor: 2d1f64f58193f00a3ad71d3f89c2bfbfe11cf5a5 - React-runtimescheduler: df8945a656356ff10f58f65a70820478bfcf33ad - React-utils: f5bc61e7ea3325c0732ae2d755f4441940163b85 - ReactCommon: 45b5d4f784e869c44a6f5a8fad5b114ca8f78c53 - RNReanimated: 3850671fd0c67051ea8e1e648e8c3e86bf3a28eb - SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - Yoga: 13c8ef87792450193e117976337b8527b49e8c03 - -PODFILE CHECKSUM: 0485f7e52cf89aa2ec3fcb550f67bb9b58bd9c2b - -COCOAPODS: 1.15.2 diff --git a/example/ios/PrismaExample-Bridging-Header.h b/example/ios/PrismaExample-Bridging-Header.h deleted file mode 100644 index e11d920b..00000000 --- a/example/ios/PrismaExample-Bridging-Header.h +++ /dev/null @@ -1,3 +0,0 @@ -// -// Use this file to import your target's public headers that you would like to expose to Swift. -// diff --git a/example/ios/PrismaExample.xcodeproj/project.pbxproj b/example/ios/PrismaExample.xcodeproj/project.pbxproj deleted file mode 100644 index 2526ad6f..00000000 --- a/example/ios/PrismaExample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,527 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 0C80B921A6F3F58F76C31292 /* libPods-PrismaExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-PrismaExample.a */; }; - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 00E356F21AD99517003FC87E /* PrismaExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PrismaExampleTests.m; sourceTree = ""; }; - 13B07F961A680F5B00A75B9A /* Prisma.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Prisma.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = PrismaExample/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = PrismaExample/AppDelegate.mm; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = PrismaExample/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = PrismaExample/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = PrismaExample/main.m; sourceTree = ""; }; - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-PrismaExample-PrismaExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PrismaExample-PrismaExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 3B4392A12AC88292D35C810B /* Pods-PrismaExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PrismaExample.debug.xcconfig"; path = "Target Support Files/Pods-PrismaExample/Pods-PrismaExample.debug.xcconfig"; sourceTree = ""; }; - 5709B34CF0A7D63546082F79 /* Pods-PrismaExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PrismaExample.release.xcconfig"; path = "Target Support Files/Pods-PrismaExample/Pods-PrismaExample.release.xcconfig"; sourceTree = ""; }; - 5B7EB9410499542E8C5724F5 /* Pods-PrismaExample-PrismaExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PrismaExample-PrismaExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-PrismaExample-PrismaExampleTests/Pods-PrismaExample-PrismaExampleTests.debug.xcconfig"; sourceTree = ""; }; - 5DCACB8F33CDC322A6C60F78 /* libPods-PrismaExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PrismaExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = PrismaExample/LaunchScreen.storyboard; sourceTree = ""; }; - 89C6BE57DB24E9ADA2F236DE /* Pods-PrismaExample-PrismaExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PrismaExample-PrismaExampleTests.release.xcconfig"; path = "Target Support Files/Pods-PrismaExample-PrismaExampleTests/Pods-PrismaExample-PrismaExampleTests.release.xcconfig"; sourceTree = ""; }; - ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 0C80B921A6F3F58F76C31292 /* libPods-PrismaExample.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00E356EF1AD99517003FC87E /* PrismaExampleTests */ = { - isa = PBXGroup; - children = ( - 00E356F21AD99517003FC87E /* PrismaExampleTests.m */, - 00E356F01AD99517003FC87E /* Supporting Files */, - ); - path = PrismaExampleTests; - sourceTree = ""; - }; - 00E356F01AD99517003FC87E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 00E356F11AD99517003FC87E /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 13B07FAE1A68108700A75B9A /* PrismaExample */ = { - isa = PBXGroup; - children = ( - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.mm */, - 13B07FB51A68108700A75B9A /* Images.xcassets */, - 13B07FB61A68108700A75B9A /* Info.plist */, - 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, - 13B07FB71A68108700A75B9A /* main.m */, - ); - name = PrismaExample; - sourceTree = ""; - }; - 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { - isa = PBXGroup; - children = ( - ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - 5DCACB8F33CDC322A6C60F78 /* libPods-PrismaExample.a */, - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-PrismaExample-PrismaExampleTests.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 832341AE1AAA6A7D00B99B32 /* Libraries */ = { - isa = PBXGroup; - children = ( - ); - name = Libraries; - sourceTree = ""; - }; - 83CBB9F61A601CBA00E9B192 = { - isa = PBXGroup; - children = ( - 13B07FAE1A68108700A75B9A /* PrismaExample */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, - 00E356EF1AD99517003FC87E /* PrismaExampleTests */, - 83CBBA001A601CBA00E9B192 /* Products */, - 2D16E6871FA4F8E400B85C8A /* Frameworks */, - BBD78D7AC51CEA395F1C20DB /* Pods */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - usesTabs = 0; - }; - 83CBBA001A601CBA00E9B192 /* Products */ = { - isa = PBXGroup; - children = ( - 13B07F961A680F5B00A75B9A /* Prisma.app */, - ); - name = Products; - sourceTree = ""; - }; - BBD78D7AC51CEA395F1C20DB /* Pods */ = { - isa = PBXGroup; - children = ( - 3B4392A12AC88292D35C810B /* Pods-PrismaExample.debug.xcconfig */, - 5709B34CF0A7D63546082F79 /* Pods-PrismaExample.release.xcconfig */, - 5B7EB9410499542E8C5724F5 /* Pods-PrismaExample-PrismaExampleTests.debug.xcconfig */, - 89C6BE57DB24E9ADA2F236DE /* Pods-PrismaExample-PrismaExampleTests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 13B07F861A680F5B00A75B9A /* PrismaExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "PrismaExample" */; - buildPhases = ( - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PrismaExample; - productName = PrismaExample; - productReference = 13B07F961A680F5B00A75B9A /* Prisma.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1210; - TargetAttributes = { - 13B07F861A680F5B00A75B9A = { - LastSwiftMigration = 1120; - }; - }; - }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "PrismaExample" */; - compatibilityVersion = "Xcode 12.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 83CBB9F61A601CBA00E9B192; - productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 13B07F861A680F5B00A75B9A /* PrismaExample */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 13B07F8E1A680F5B00A75B9A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(SRCROOT)/.xcode.env.local", - "$(SRCROOT)/.xcode.env", - ); - name = "Bundle React Native code and images"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\nPRISMA_MIGRATIONS=\"../../copy-migrations.sh\"\n\n/bin/sh -c $PRISMA_MIGRATIONS\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; - }; - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PrismaExample/Pods-PrismaExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PrismaExample/Pods-PrismaExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PrismaExample/Pods-PrismaExample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-PrismaExample-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PrismaExample/Pods-PrismaExample-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-PrismaExample/Pods-PrismaExample-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-PrismaExample/Pods-PrismaExample-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 13B07F871A680F5B00A75B9A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-PrismaExample.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 24CMR7378R; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = PrismaExample/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = Prisma; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = io.prisma.example; - PRODUCT_NAME = Prisma; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; - SUPPORTS_MACCATALYST = NO; - SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; - SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-PrismaExample.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 24CMR7378R; - INFOPLIST_FILE = PrismaExample/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = Prisma; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = io.prisma.example; - PRODUCT_NAME = Prisma; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; - SUPPORTS_MACCATALYST = NO; - SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; - SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - 83CBBA201A601CBA00E9B192 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++20"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; - LD_RUNPATH_SEARCH_PATHS = ( - /usr/lib/swift, - "$(inherited)", - ); - LIBRARY_SEARCH_PATHS = ( - "\"$(SDKROOT)/usr/lib/swift\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(inherited)\"", - ); - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - OTHER_CFLAGS = "$(inherited)"; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-DFOLLY_NO_CONFIG", - "-DFOLLY_MOBILE=1", - "-DFOLLY_USE_LIBCPP=1", - "-DFOLLY_CFG_NO_COROUTINES=1", - ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-Wl", - "-ld_classic", - ); - REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; - SDKROOT = iphoneos; - USE_HERMES = true; - }; - name = Debug; - }; - 83CBBA211A601CBA00E9B192 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++20"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; - LD_RUNPATH_SEARCH_PATHS = ( - /usr/lib/swift, - "$(inherited)", - ); - LIBRARY_SEARCH_PATHS = ( - "\"$(SDKROOT)/usr/lib/swift\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(inherited)\"", - ); - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_CFLAGS = "$(inherited)"; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-DFOLLY_NO_CONFIG", - "-DFOLLY_MOBILE=1", - "-DFOLLY_USE_LIBCPP=1", - "-DFOLLY_CFG_NO_COROUTINES=1", - ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-Wl", - "-ld_classic", - ); - REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; - SDKROOT = iphoneos; - USE_HERMES = true; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "PrismaExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "PrismaExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} diff --git a/example/ios/PrismaExample.xcodeproj/xcshareddata/xcschemes/Debug.xcscheme b/example/ios/PrismaExample.xcodeproj/xcshareddata/xcschemes/Debug.xcscheme deleted file mode 100644 index d614870b..00000000 --- a/example/ios/PrismaExample.xcodeproj/xcshareddata/xcschemes/Debug.xcscheme +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/ios/PrismaExample.xcodeproj/xcshareddata/xcschemes/Release.xcscheme b/example/ios/PrismaExample.xcodeproj/xcshareddata/xcschemes/Release.xcscheme deleted file mode 100644 index ad3ee8e9..00000000 --- a/example/ios/PrismaExample.xcodeproj/xcshareddata/xcschemes/Release.xcscheme +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/ios/PrismaExample.xcworkspace/contents.xcworkspacedata b/example/ios/PrismaExample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 34d332a0..00000000 --- a/example/ios/PrismaExample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/example/ios/PrismaExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/PrismaExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/example/ios/PrismaExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/example/ios/PrismaExample/AppDelegate.h b/example/ios/PrismaExample/AppDelegate.h deleted file mode 100644 index 5d280825..00000000 --- a/example/ios/PrismaExample/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : RCTAppDelegate - -@end diff --git a/example/ios/PrismaExample/AppDelegate.mm b/example/ios/PrismaExample/AppDelegate.mm deleted file mode 100644 index 399c48db..00000000 --- a/example/ios/PrismaExample/AppDelegate.mm +++ /dev/null @@ -1,33 +0,0 @@ -#import "AppDelegate.h" -#import "GCDWebServer/GCDWebServer.h" -#import - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - self.moduleName = @"PrismaExample"; - // You can add your custom initial props in the dictionary below. - // They will be passed down to the ViewController used by React Native. - self.initialProps = @{}; - - [GCDWebServer setLogLevel:4]; - - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge -{ - return [self getBundleURL]; -} - -- (NSURL *)getBundleURL -{ -#if DEBUG - return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; -#else - return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; -#endif -} - -@end diff --git a/example/ios/PrismaExample/Images.xcassets/AppIcon.appiconset/Contents.json b/example/ios/PrismaExample/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index f156cb6f..00000000 --- a/example/ios/PrismaExample/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "images" : [ - { - "filename" : "Frame 20.png", - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example/ios/PrismaExample/Images.xcassets/AppIcon.appiconset/Frame 20.png b/example/ios/PrismaExample/Images.xcassets/AppIcon.appiconset/Frame 20.png deleted file mode 100644 index a5a32ce9..00000000 Binary files a/example/ios/PrismaExample/Images.xcassets/AppIcon.appiconset/Frame 20.png and /dev/null differ diff --git a/example/ios/PrismaExample/Images.xcassets/Contents.json b/example/ios/PrismaExample/Images.xcassets/Contents.json deleted file mode 100644 index 73c00596..00000000 --- a/example/ios/PrismaExample/Images.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example/ios/PrismaExample/Images.xcassets/Logo.imageset/Contents.json b/example/ios/PrismaExample/Images.xcassets/Logo.imageset/Contents.json deleted file mode 100644 index 5b033657..00000000 --- a/example/ios/PrismaExample/Images.xcassets/Logo.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "Frame 20.png", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example/ios/PrismaExample/Images.xcassets/Logo.imageset/Frame 20.png b/example/ios/PrismaExample/Images.xcassets/Logo.imageset/Frame 20.png deleted file mode 100644 index a5a32ce9..00000000 Binary files a/example/ios/PrismaExample/Images.xcassets/Logo.imageset/Frame 20.png and /dev/null differ diff --git a/example/ios/PrismaExample/Info.plist b/example/ios/PrismaExample/Info.plist deleted file mode 100644 index 7df94dfb..00000000 --- a/example/ios/PrismaExample/Info.plist +++ /dev/null @@ -1,51 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - Prisma - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSAllowsLocalNetworking - - - NSLocationWhenInUseUsageDescription - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/example/ios/PrismaExample/LaunchScreen.storyboard b/example/ios/PrismaExample/LaunchScreen.storyboard deleted file mode 100644 index c27f5a17..00000000 --- a/example/ios/PrismaExample/LaunchScreen.storyboard +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/ios/PrismaExample/main.m b/example/ios/PrismaExample/main.m deleted file mode 100644 index d645c724..00000000 --- a/example/ios/PrismaExample/main.m +++ /dev/null @@ -1,10 +0,0 @@ -#import - -#import "AppDelegate.h" - -int main(int argc, char *argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/example/ios/PrismaExampleTests/Info.plist b/example/ios/PrismaExampleTests/Info.plist deleted file mode 100644 index ba72822e..00000000 --- a/example/ios/PrismaExampleTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/example/ios/PrismaExampleTests/PrismaExampleTests.m b/example/ios/PrismaExampleTests/PrismaExampleTests.m deleted file mode 100644 index fbc04f84..00000000 --- a/example/ios/PrismaExampleTests/PrismaExampleTests.m +++ /dev/null @@ -1,66 +0,0 @@ -#import -#import - -#import -#import - -#define TIMEOUT_SECONDS 600 -#define TEXT_TO_LOOK_FOR @"Welcome to React" - -@interface PrismaExampleTests : XCTestCase - -@end - -@implementation PrismaExampleTests - -- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test -{ - if (test(view)) { - return YES; - } - for (UIView *subview in [view subviews]) { - if ([self findSubviewInView:subview matching:test]) { - return YES; - } - } - return NO; -} - -- (void)testRendersWelcomeScreen -{ - UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; - NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; - BOOL foundElement = NO; - - __block NSString *redboxError = nil; -#ifdef DEBUG - RCTSetLogFunction( - ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { - if (level >= RCTLogLevelError) { - redboxError = message; - } - }); -#endif - - while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { - [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - - foundElement = [self findSubviewInView:vc.view - matching:^BOOL(UIView *view) { - if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { - return YES; - } - return NO; - }]; - } - -#ifdef DEBUG - RCTSetLogFunction(RCTDefaultLogFunction); -#endif - - XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); - XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); -} - -@end diff --git a/example/ios/link-assets-manifest.json b/example/ios/link-assets-manifest.json deleted file mode 100644 index f43dc5ad..00000000 --- a/example/ios/link-assets-manifest.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "migIndex": 1, - "data": [ - { - "path": "migrations/20240117094901_init/migration.sql", - "sha1": "c2cba8c542661584c2409ac71985d902b25bdd71" - }, - { - "path": "migrations/migration_lock.toml", - "sha1": "d31af1640ea175950b3b0e25f68481f74ef5d8ed" - } - ] -} diff --git a/example/metro.config.js b/example/metro.config.js deleted file mode 100644 index e3999cb0..00000000 --- a/example/metro.config.js +++ /dev/null @@ -1,51 +0,0 @@ -/* eslint-env node */ -const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); -const escape = require('escape-string-regexp'); -const exclusionList = require('metro-config/src/defaults/exclusionList'); -const { withNativeWind } = require('nativewind/metro'); -const path = require('path'); - -const pak = require('../package.json'); - -const root = path.resolve(__dirname, '..'); -const modules = Object.keys({ ...pak.peerDependencies }); - -/** - * Metro configuration - * https://facebook.github.io/metro/docs/configuration - * - * @type {import('metro-config').MetroConfig} - */ -const config = { - watchFolders: [root], - - // We need to make sure that only one version is loaded for peerDependencies - // So we block them at the root, and alias them to the versions in example's node_modules - resolver: { - blacklistRE: exclusionList( - modules.map( - (m) => - new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`) - ) - ), - - extraNodeModules: modules.reduce((acc, name) => { - acc[name] = path.join(__dirname, 'node_modules', name); - return acc; - }, {}), - }, - - transformer: { - getTransformOptions: async () => ({ - transform: { - experimentalImportSupport: false, - inlineRequires: true, - }, - }), - }, -}; - -module.exports = withNativeWind( - mergeConfig(getDefaultConfig(__dirname), config), - { input: './global.css' } -); diff --git a/example/migrations/0_init/migration.sql b/example/migrations/0_init/migration.sql deleted file mode 100644 index d2e6651e..00000000 --- a/example/migrations/0_init/migration.sql +++ /dev/null @@ -1,53 +0,0 @@ --- CreateTable -CREATE TABLE "User" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "email" TEXT NOT NULL, - "name" TEXT, - "nick" TEXT -); - --- CreateTable -CREATE TABLE "Profile" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "bio" TEXT NOT NULL, - "userId" INTEGER NOT NULL, - CONSTRAINT "Profile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "Post" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" DATETIME NOT NULL, - "title" TEXT NOT NULL, - "published" BOOLEAN NOT NULL DEFAULT false, - "authorId" INTEGER NOT NULL, - CONSTRAINT "Post_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE -); - --- CreateTable -CREATE TABLE "Category" ( - "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, - "name" TEXT NOT NULL -); - --- CreateTable -CREATE TABLE "_CategoryToPost" ( - "A" INTEGER NOT NULL, - "B" INTEGER NOT NULL, - CONSTRAINT "_CategoryToPost_A_fkey" FOREIGN KEY ("A") REFERENCES "Category" ("id") ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT "_CategoryToPost_B_fkey" FOREIGN KEY ("B") REFERENCES "Post" ("id") ON DELETE CASCADE ON UPDATE CASCADE -); - --- CreateIndex -CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); - --- CreateIndex -CREATE UNIQUE INDEX "Profile_userId_key" ON "Profile"("userId"); - --- CreateIndex -CREATE UNIQUE INDEX "_CategoryToPost_AB_unique" ON "_CategoryToPost"("A", "B"); - --- CreateIndex -CREATE INDEX "_CategoryToPost_B_index" ON "_CategoryToPost"("B"); - diff --git a/example/migrations/20240118142005_nick2/migration.sql b/example/migrations/20240118142005_nick2/migration.sql deleted file mode 100644 index 6af8f23f..00000000 --- a/example/migrations/20240118142005_nick2/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE "User" ADD COLUMN "nick2" TEXT; diff --git a/example/migrations/20240119102352_nick3/migration.sql b/example/migrations/20240119102352_nick3/migration.sql deleted file mode 100644 index 42103e81..00000000 --- a/example/migrations/20240119102352_nick3/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE "User" ADD COLUMN "nick3" TEXT; diff --git a/example/migrations/20240119143417_nick4/migration.sql b/example/migrations/20240119143417_nick4/migration.sql deleted file mode 100644 index 616a6b93..00000000 --- a/example/migrations/20240119143417_nick4/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE "User" ADD COLUMN "nick4" TEXT; diff --git a/example/migrations/20240122145141_my_field/migration.sql b/example/migrations/20240122145141_my_field/migration.sql deleted file mode 100644 index 17fa170f..00000000 --- a/example/migrations/20240122145141_my_field/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE "User" ADD COLUMN "myField" TEXT; diff --git a/example/migrations/migration_lock.toml b/example/migrations/migration_lock.toml deleted file mode 100644 index e5e5c470..00000000 --- a/example/migrations/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (i.e. Git) -provider = "sqlite" \ No newline at end of file diff --git a/example/package.json b/example/package.json deleted file mode 100644 index 8439e183..00000000 --- a/example/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "react-native-prisma-example", - "version": "0.0.1", - "private": true, - "scripts": { - "android": "react-native run-android", - "ios": "react-native run-ios --simulator='iPhone 15' --scheme='Debug'", - "start": "react-native start", - "pods": "pod-install", - "build:android": "cd android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a", - "build:ios": "cd ios && xcodebuild -workspace PrismaExample.xcworkspace -scheme PrismaExample -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO", - "ios:release": "react-native run-ios --simulator='iPhone 15' --scheme='Release'", - "prisma:generate": "prisma generate" - }, - "dependencies": { - "@prisma/client": "6.1.0-dev.17", - "chance": "^1.1.11", - "nativewind": "^4.0.23", - "react": "18.2.0", - "react-native": "0.73.2", - "react-native-http-bridge-refurbished": "^1.2.9", - "react-native-network-info": "^5.2.1", - "react-native-quick-base64": "^2.0.8", - "react-native-reanimated": "^3.7.2", - "react-native-url-polyfill": "^2.0.0", - "text-encoding": "^0.7.0" - }, - "devDependencies": { - "@babel/core": "^7.20.0", - "@babel/preset-env": "^7.20.0", - "@babel/runtime": "^7.20.0", - "@react-native/babel-preset": "^0.73.18", - "@react-native/metro-config": "^0.73.2", - "@react-native/typescript-config": "^0.73.1", - "@types/chance": "^1.1.6", - "@types/text-encoding": "^0", - "babel-plugin-module-resolver": "^5.0.0", - "detox": "20.20.3", - "jest": "^29", - "pod-install": "0.2.0", - "prisma": "6.1.0-dev.17", - "tailwindcss": "^3.4.0" - }, - "engines": { - "node": ">=18" - } -} diff --git a/example/react-native.config.js b/example/react-native.config.js deleted file mode 100644 index 9ddf8c8f..00000000 --- a/example/react-native.config.js +++ /dev/null @@ -1,12 +0,0 @@ -/* eslint-env node */ -const path = require('path'); - -const pak = require('../package.json'); - -module.exports = { - dependencies: { - [pak.name]: { - root: path.join(__dirname, '..'), - }, - }, -}; diff --git a/example/schema.prisma b/example/schema.prisma deleted file mode 100644 index 94f5d399..00000000 --- a/example/schema.prisma +++ /dev/null @@ -1,46 +0,0 @@ -generator client { - provider = "prisma-client-js" - previewFeatures = ["reactNative"] -} - -datasource db { - provider = "sqlite" - url = "file:./dev.db" -} - -model User { - id Int @id @default(autoincrement()) - email String @unique - name String? - posts Post[] - profile Profile? - nick String? - nick2 String? - nick3 String? - nick4 String? - myField String? -} - -model Profile { - id Int @id @default(autoincrement()) - bio String - user User @relation(fields: [userId], references: [id]) - userId Int @unique -} - -model Post { - id Int @id @default(autoincrement()) - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - title String - published Boolean @default(false) - author User @relation(fields: [authorId], references: [id]) - authorId Int - categories Category[] -} - -model Category { - id Int @id @default(autoincrement()) - name String - posts Post[] -} diff --git a/example/src/App.tsx b/example/src/App.tsx deleted file mode 100644 index 88a7319f..00000000 --- a/example/src/App.tsx +++ /dev/null @@ -1,112 +0,0 @@ -import '@prisma/react-native'; -import React, { useEffect, useState } from 'react'; -import { - Clipboard, - SafeAreaView, - ScrollView, - Text, - TouchableOpacity, - View, -} from 'react-native'; -import { NetworkInfo } from 'react-native-network-info'; -import { atob, btoa } from 'react-native-quick-base64'; - -import 'react-native-url-polyfill/auto'; -import '../global.css'; -import { Button } from './Button'; -import './server'; -import { - hooksPrisma, - createRandomUser, - deleteUsers, - initializeDB, - runE2EQuery, - // createRandomUserGeneric, -} from './db'; - -// global.TextEncoder = require('text-encoding').TextEncoder; -global.atob = atob; -global.btoa = btoa; - -export default function App() { - const [prismaTime, setPrismaTime] = useState(0); - const [IP, setIP] = useState(''); - const [dbInitialized, setDbInitialized] = useState(false); - const [e2eSuccess, setE2ESuccess] = useState(false); - - useEffect(() => { - const setup = async () => { - await initializeDB(); - NetworkInfo.getIPAddress().then((ip) => { - setIP(`${ip}:3000`); - }); - setDbInitialized(true); - await runE2EQuery(); - setE2ESuccess(true); - }; - - setup(); - }, []); - - const createUser = async () => { - const start = performance.now(); - - await createRandomUser(); - - const end = performance.now(); - setPrismaTime(end - start); - }; - - const users = hooksPrisma.user.useFindMany(); - - if (!dbInitialized) { - return ( - - Initializing database... - - ); - } - - const copyIP = () => { - Clipboard.setString(IP); - console.warn('IP copied to clipboard'); - }; - - return ( - - - - ▲ Prisma - {e2eSuccess ? ( - - ) : ( - - )} - - - - HTTP Server Running on Port 3000 - - - - - Engine Response - - {prismaTime.toFixed(0)}ms - - - {JSON.stringify(users, null, 4)} - - -