Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 304f3a8ca9 |
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -4,12 +4,13 @@ android {
|
|||||||
namespace = "io.ionic.starter"
|
namespace = "io.ionic.starter"
|
||||||
compileSdk = rootProject.ext.compileSdkVersion
|
compileSdk = rootProject.ext.compileSdkVersion
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "io.longtime.app"
|
applicationId "com.basedeployer.app"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
manifestPlaceholders = [googleMapsApiKey: System.getenv("VITE_GOOGLE_MAPS_KEY") ?: ""]
|
||||||
aaptOptions {
|
aaptOptions {
|
||||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||||
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
|
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
|
||||||
|
|||||||
@@ -25,11 +25,15 @@
|
|||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
<data android:scheme="io.longtime.app" />
|
<data android:scheme="com.basedeployer.app" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
<meta-data
|
||||||
|
android:name="com.google.android.geo.API_KEY"
|
||||||
|
android:value="${googleMapsApiKey}" />
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
android:authorities="${applicationId}.fileprovider"
|
android:authorities="${applicationId}.fileprovider"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Longtime</string>
|
<string name="app_name">Base Deployer</string>
|
||||||
<string name="title_activity_main">Longtime</string>
|
<string name="title_activity_main">Base Deployer</string>
|
||||||
<string name="package_name">io.ionic.starter</string>
|
<string name="package_name">io.ionic.starter</string>
|
||||||
<string name="custom_url_scheme">io.ionic.starter</string>
|
<string name="custom_url_scheme">io.ionic.starter</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -15,5 +15,4 @@ ext {
|
|||||||
cordovaAndroidVersion = '14.0.1'
|
cordovaAndroidVersion = '14.0.1'
|
||||||
rgcfaIncludeGoogle = true
|
rgcfaIncludeGoogle = true
|
||||||
androidxCredentialsVersion = '1.3.0'
|
androidxCredentialsVersion = '1.3.0'
|
||||||
javaVersion = JavaVersion.VERSION_17
|
|
||||||
}
|
}
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
import type { CapacitorConfig } from '@capacitor/cli';
|
import type { CapacitorConfig } from '@capacitor/cli';
|
||||||
|
|
||||||
const config: CapacitorConfig = {
|
const config: CapacitorConfig = {
|
||||||
appId: 'io.longtime.app',
|
appId: 'com.basedeployer.app',
|
||||||
appName: 'Longtime',
|
appName: 'Base Deployer',
|
||||||
webDir: 'dist',
|
webDir: 'dist',
|
||||||
plugins: {
|
plugins: {
|
||||||
FirebaseAuthentication: {
|
FirebaseAuthentication: {
|
||||||
|
|||||||
+114
-33
@@ -11,10 +11,29 @@ workflows:
|
|||||||
- $HOME/.gradle/caches
|
- $HOME/.gradle/caches
|
||||||
- $HOME/.gradle/wrapper
|
- $HOME/.gradle/wrapper
|
||||||
scripts:
|
scripts:
|
||||||
|
# Template ships with optional native plugins (maps, push, firebase auth) that most apps
|
||||||
|
# won't use. Keeping unused plugins in package.json adds SPM/Gradle deps and bloats the
|
||||||
|
# build. Strip any that have no import in src/ so only actually-used plugins are compiled.
|
||||||
|
- name: Strip unused scaffold packages
|
||||||
|
script: |
|
||||||
|
for pkg in "@capacitor/google-maps" "@capacitor/push-notifications" "@capacitor-firebase/authentication"; do
|
||||||
|
if ! grep -rq "$pkg" src/; then
|
||||||
|
node -e "const fs=require('fs'),p=JSON.parse(fs.readFileSync('package.json','utf8'));delete p.dependencies['${pkg}'];fs.writeFileSync('package.json',JSON.stringify(p,null,2));"
|
||||||
|
echo "Stripped $pkg (not used in src/)"
|
||||||
|
else
|
||||||
|
echo "Keeping $pkg (used in src/)"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Delete package-lock.json (generated if user ever ran npm locally) so it doesn't
|
||||||
|
# conflict with yarn.lock. --legacy-peer-deps silences peer dep warnings from older
|
||||||
|
# Ionic/React packages that haven't updated their peerDependencies for React 18/19.
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
script: npm install --legacy-peer-deps
|
script: rm -f package-lock.json && npm install --legacy-peer-deps
|
||||||
- name: Build web assets
|
- name: Build web assets
|
||||||
script: npm run build
|
script: npm run build
|
||||||
|
# Firebase config files are injected as base64 env vars by the Appcakes backend at
|
||||||
|
# build time. Decode them here so cap sync and Gradle can pick them up. Optional —
|
||||||
|
# builds without Firebase still succeed; native Firebase SDK just won't initialise.
|
||||||
- name: Write Firebase config
|
- name: Write Firebase config
|
||||||
script: |
|
script: |
|
||||||
if [ -n "$GOOGLE_SERVICES_JSON" ]; then
|
if [ -n "$GOOGLE_SERVICES_JSON" ]; then
|
||||||
@@ -27,6 +46,8 @@ workflows:
|
|||||||
echo "$GOOGLE_SERVICE_INFO_PLIST" | base64 --decode > ios/App/App/GoogleService-Info.plist
|
echo "$GOOGLE_SERVICE_INFO_PLIST" | base64 --decode > ios/App/App/GoogleService-Info.plist
|
||||||
echo "Wrote GoogleService-Info.plist ($(wc -c < ios/App/App/GoogleService-Info.plist) bytes)"
|
echo "Wrote GoogleService-Info.plist ($(wc -c < ios/App/App/GoogleService-Info.plist) bytes)"
|
||||||
fi
|
fi
|
||||||
|
# cap sync copies the built web assets (dist/) into android/app/src/main/assets/public/
|
||||||
|
# and updates Capacitor plugin registrations in MainActivity. Must run after npm build.
|
||||||
- name: Capacitor sync
|
- name: Capacitor sync
|
||||||
script: npx cap sync android
|
script: npx cap sync android
|
||||||
- name: Set up debug keystore
|
- name: Set up debug keystore
|
||||||
@@ -62,8 +83,18 @@ workflows:
|
|||||||
- $HOME/.gradle/caches
|
- $HOME/.gradle/caches
|
||||||
- $HOME/.gradle/wrapper
|
- $HOME/.gradle/wrapper
|
||||||
scripts:
|
scripts:
|
||||||
|
- name: Strip unused scaffold packages
|
||||||
|
script: |
|
||||||
|
for pkg in "@capacitor/google-maps" "@capacitor/push-notifications" "@capacitor-firebase/authentication"; do
|
||||||
|
if ! grep -rq "$pkg" src/; then
|
||||||
|
node -e "const fs=require('fs'),p=JSON.parse(fs.readFileSync('package.json','utf8'));delete p.dependencies['${pkg}'];fs.writeFileSync('package.json',JSON.stringify(p,null,2));"
|
||||||
|
echo "Stripped $pkg (not used in src/)"
|
||||||
|
else
|
||||||
|
echo "Keeping $pkg (used in src/)"
|
||||||
|
fi
|
||||||
|
done
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
script: npm install --legacy-peer-deps
|
script: rm -f package-lock.json && npm install --legacy-peer-deps
|
||||||
- name: Build web assets
|
- name: Build web assets
|
||||||
script: npm run build
|
script: npm run build
|
||||||
- name: Write Firebase config
|
- name: Write Firebase config
|
||||||
@@ -99,8 +130,18 @@ workflows:
|
|||||||
- $HOME/.gradle/caches
|
- $HOME/.gradle/caches
|
||||||
- $HOME/.gradle/wrapper
|
- $HOME/.gradle/wrapper
|
||||||
scripts:
|
scripts:
|
||||||
|
- name: Strip unused scaffold packages
|
||||||
|
script: |
|
||||||
|
for pkg in "@capacitor/google-maps" "@capacitor/push-notifications" "@capacitor-firebase/authentication"; do
|
||||||
|
if ! grep -rq "$pkg" src/; then
|
||||||
|
node -e "const fs=require('fs'),p=JSON.parse(fs.readFileSync('package.json','utf8'));delete p.dependencies['${pkg}'];fs.writeFileSync('package.json',JSON.stringify(p,null,2));"
|
||||||
|
echo "Stripped $pkg (not used in src/)"
|
||||||
|
else
|
||||||
|
echo "Keeping $pkg (used in src/)"
|
||||||
|
fi
|
||||||
|
done
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
script: npm install --legacy-peer-deps
|
script: rm -f package-lock.json && npm install --legacy-peer-deps
|
||||||
- name: Build web assets
|
- name: Build web assets
|
||||||
script: npm run build
|
script: npm run build
|
||||||
- name: Write Firebase config
|
- name: Write Firebase config
|
||||||
@@ -136,8 +177,18 @@ workflows:
|
|||||||
- $HOME/.gradle/caches
|
- $HOME/.gradle/caches
|
||||||
- $HOME/.gradle/wrapper
|
- $HOME/.gradle/wrapper
|
||||||
scripts:
|
scripts:
|
||||||
|
- name: Strip unused scaffold packages
|
||||||
|
script: |
|
||||||
|
for pkg in "@capacitor/google-maps" "@capacitor/push-notifications" "@capacitor-firebase/authentication"; do
|
||||||
|
if ! grep -rq "$pkg" src/; then
|
||||||
|
node -e "const fs=require('fs'),p=JSON.parse(fs.readFileSync('package.json','utf8'));delete p.dependencies['${pkg}'];fs.writeFileSync('package.json',JSON.stringify(p,null,2));"
|
||||||
|
echo "Stripped $pkg (not used in src/)"
|
||||||
|
else
|
||||||
|
echo "Keeping $pkg (used in src/)"
|
||||||
|
fi
|
||||||
|
done
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
script: npm install --legacy-peer-deps
|
script: rm -f package-lock.json && npm install --legacy-peer-deps
|
||||||
- name: Build web assets
|
- name: Build web assets
|
||||||
script: npm run build
|
script: npm run build
|
||||||
- name: Write Firebase config
|
- name: Write Firebase config
|
||||||
@@ -174,28 +225,39 @@ workflows:
|
|||||||
node: 22
|
node: 22
|
||||||
xcode: latest
|
xcode: latest
|
||||||
scripts:
|
scripts:
|
||||||
|
- name: Strip unused scaffold packages
|
||||||
|
script: |
|
||||||
|
for pkg in "@capacitor/google-maps" "@capacitor/push-notifications" "@capacitor-firebase/authentication"; do
|
||||||
|
if ! grep -rq "$pkg" src/; then
|
||||||
|
node -e "const fs=require('fs'),p=JSON.parse(fs.readFileSync('package.json','utf8'));delete p.dependencies['${pkg}'];fs.writeFileSync('package.json',JSON.stringify(p,null,2));"
|
||||||
|
echo "Stripped $pkg (not used in src/)"
|
||||||
|
else
|
||||||
|
echo "Keeping $pkg (used in src/)"
|
||||||
|
fi
|
||||||
|
done
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
script: npm install --legacy-peer-deps
|
script: rm -f package-lock.json && npm install --legacy-peer-deps
|
||||||
- name: Build web assets
|
- name: Build web assets
|
||||||
script: npm run build
|
script: npm run build
|
||||||
|
# First sync: regenerates CapApp-SPM/Package.swift with the correct plugin list.
|
||||||
|
# Note: this project uses Capacitor SPM (no CocoaPods/Podfile), so cap sync replaces
|
||||||
|
# pod install — it regenerates CapApp-SPM/Package.swift and copies web assets.
|
||||||
|
- name: Capacitor sync
|
||||||
|
script: npx cap sync ios
|
||||||
|
# Decode Firebase plist to disk so it is present during the second sync.
|
||||||
- name: Write Firebase config
|
- name: Write Firebase config
|
||||||
script: |
|
script: |
|
||||||
if [ -n "$GOOGLE_SERVICE_INFO_PLIST" ]; then
|
if [ -n "$GOOGLE_SERVICE_INFO_PLIST" ]; then
|
||||||
echo "$GOOGLE_SERVICE_INFO_PLIST" | base64 --decode > ios/App/App/GoogleService-Info.plist
|
echo "$GOOGLE_SERVICE_INFO_PLIST" | base64 --decode > ios/App/App/GoogleService-Info.plist
|
||||||
ruby -e "
|
|
||||||
require 'xcodeproj'
|
|
||||||
project = Xcodeproj::Project.open('ios/App/App.xcodeproj')
|
|
||||||
target = project.targets.find { |t| t.name == 'App' }
|
|
||||||
app_group = project.main_group['App']
|
|
||||||
unless app_group.files.find { |f| f.path == 'GoogleService-Info.plist' }
|
|
||||||
file_ref = app_group.new_reference('GoogleService-Info.plist')
|
|
||||||
target.resources_build_phase.add_file_reference(file_ref)
|
|
||||||
project.save
|
|
||||||
end
|
|
||||||
"
|
|
||||||
fi
|
fi
|
||||||
|
# Second sync ensures CapApp-SPM/Package.swift is consistent after the plist write.
|
||||||
- name: Capacitor sync
|
- name: Capacitor sync
|
||||||
script: npx cap sync ios
|
script: npx cap sync ios
|
||||||
|
# Run configure_xcode.rb after both syncs so its xcodeproj changes (plist file
|
||||||
|
# reference + SPM product linking) are not overwritten by a subsequent cap sync.
|
||||||
|
# configure_xcode.rb is stamped fresh from template on every build push.
|
||||||
|
- name: Configure Xcode project
|
||||||
|
script: ruby configure_xcode.rb
|
||||||
- name: Set up signing
|
- name: Set up signing
|
||||||
script: |
|
script: |
|
||||||
keychain initialize
|
keychain initialize
|
||||||
@@ -220,11 +282,23 @@ workflows:
|
|||||||
echo "No signing credentials configured — build will fail at signing"
|
echo "No signing credentials configured — build will fail at signing"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
# --workspace: Capacitor SPM projects require workspace context for Xcode to resolve
|
||||||
|
# the CapApp-SPM local package. Using --project causes xcodebuild to fail on
|
||||||
|
# Xcode 26+ because SPM resolution requires workspace scope. App.xcworkspace is a
|
||||||
|
# static file committed to the template (not generated by cap sync) that wraps
|
||||||
|
# App.xcodeproj for this purpose.
|
||||||
|
# --no-show-build-settings: xcode-project runs xcodebuild -showBuildSettings as a
|
||||||
|
# pre-build diagnostic. Xcode 26 fails this step for SPM projects even with
|
||||||
|
# --workspace, so we skip it. The actual archive step still surfaces real errors.
|
||||||
|
# --disable-xcpretty: xcpretty reformats and filters xcodebuild output, swallowing
|
||||||
|
# the actual error lines when a build fails. Raw output makes failures debuggable.
|
||||||
- name: Build IPA
|
- name: Build IPA
|
||||||
script: |
|
script: |
|
||||||
xcode-project build-ipa \
|
xcode-project build-ipa \
|
||||||
--project ios/App/App.xcodeproj \
|
--workspace ios/App/App.xcworkspace \
|
||||||
--scheme App
|
--scheme App \
|
||||||
|
--no-show-build-settings \
|
||||||
|
--disable-xcpretty
|
||||||
artifacts:
|
artifacts:
|
||||||
- build/ios/ipa/*.ipa
|
- build/ios/ipa/*.ipa
|
||||||
|
|
||||||
@@ -236,28 +310,31 @@ workflows:
|
|||||||
node: 22
|
node: 22
|
||||||
xcode: latest
|
xcode: latest
|
||||||
scripts:
|
scripts:
|
||||||
|
- name: Strip unused scaffold packages
|
||||||
|
script: |
|
||||||
|
for pkg in "@capacitor/google-maps" "@capacitor/push-notifications" "@capacitor-firebase/authentication"; do
|
||||||
|
if ! grep -rq "$pkg" src/; then
|
||||||
|
node -e "const fs=require('fs'),p=JSON.parse(fs.readFileSync('package.json','utf8'));delete p.dependencies['${pkg}'];fs.writeFileSync('package.json',JSON.stringify(p,null,2));"
|
||||||
|
echo "Stripped $pkg (not used in src/)"
|
||||||
|
else
|
||||||
|
echo "Keeping $pkg (used in src/)"
|
||||||
|
fi
|
||||||
|
done
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
script: npm install --legacy-peer-deps
|
script: rm -f package-lock.json && npm install --legacy-peer-deps
|
||||||
- name: Build web assets
|
- name: Build web assets
|
||||||
script: npm run build
|
script: npm run build
|
||||||
- name: Write Firebase config
|
- name: Capacitor sync
|
||||||
|
script: npx cap sync ios
|
||||||
|
- name: Configure Xcode project
|
||||||
script: |
|
script: |
|
||||||
if [ -n "$GOOGLE_SERVICE_INFO_PLIST" ]; then
|
if [ -n "$GOOGLE_SERVICE_INFO_PLIST" ]; then
|
||||||
echo "$GOOGLE_SERVICE_INFO_PLIST" | base64 --decode > ios/App/App/GoogleService-Info.plist
|
echo "$GOOGLE_SERVICE_INFO_PLIST" | base64 --decode > ios/App/App/GoogleService-Info.plist
|
||||||
ruby -e "
|
|
||||||
require 'xcodeproj'
|
|
||||||
project = Xcodeproj::Project.open('ios/App/App.xcodeproj')
|
|
||||||
target = project.targets.find { |t| t.name == 'App' }
|
|
||||||
app_group = project.main_group['App']
|
|
||||||
unless app_group.files.find { |f| f.path == 'GoogleService-Info.plist' }
|
|
||||||
file_ref = app_group.new_reference('GoogleService-Info.plist')
|
|
||||||
target.resources_build_phase.add_file_reference(file_ref)
|
|
||||||
project.save
|
|
||||||
end
|
|
||||||
"
|
|
||||||
fi
|
fi
|
||||||
- name: Capacitor sync
|
- name: Capacitor sync
|
||||||
script: npx cap sync ios
|
script: npx cap sync ios
|
||||||
|
- name: Configure Xcode project
|
||||||
|
script: ruby configure_xcode.rb
|
||||||
- name: Set up signing
|
- name: Set up signing
|
||||||
script: |
|
script: |
|
||||||
keychain initialize
|
keychain initialize
|
||||||
@@ -279,12 +356,16 @@ workflows:
|
|||||||
echo "$CM_PROVISIONING_PROFILE" | base64 --decode > "$HOME/Library/MobileDevice/Provisioning Profiles/profile.mobileprovision"
|
echo "$CM_PROVISIONING_PROFILE" | base64 --decode > "$HOME/Library/MobileDevice/Provisioning Profiles/profile.mobileprovision"
|
||||||
xcode-project use-profiles
|
xcode-project use-profiles
|
||||||
fi
|
fi
|
||||||
|
# See ios-debug Build IPA comments for --workspace, --no-show-build-settings,
|
||||||
|
# and --disable-xcpretty rationale — same reasons apply here.
|
||||||
- name: Build IPA
|
- name: Build IPA
|
||||||
script: |
|
script: |
|
||||||
xcode-project build-ipa \
|
xcode-project build-ipa \
|
||||||
--project ios/App/App.xcodeproj \
|
--workspace ios/App/App.xcworkspace \
|
||||||
--scheme App \
|
--scheme App \
|
||||||
--config Release
|
--config Release \
|
||||||
|
--no-show-build-settings \
|
||||||
|
--disable-xcpretty
|
||||||
- name: Publish
|
- name: Publish
|
||||||
script: |
|
script: |
|
||||||
if [ "$SUBMIT_TO_TESTFLIGHT" = "true" ] || [ "$SUBMIT_TO_APP_STORE" = "true" ]; then
|
if [ "$SUBMIT_TO_TESTFLIGHT" = "true" ] || [ "$SUBMIT_TO_APP_STORE" = "true" ]; then
|
||||||
|
|||||||
@@ -0,0 +1,118 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
# configure_xcode.rb — stamped fresh from template on every build (see gitea.service.ts)
|
||||||
|
#
|
||||||
|
# 1. Adds GoogleService-Info.plist to the Xcode target if present (xcodeproj gem)
|
||||||
|
# 2. Scans Swift sources for Firebase imports and injects matching products into
|
||||||
|
# CapApp-SPM/Package.swift — the correct approach for Capacitor SPM projects
|
||||||
|
# where all native linking goes through CapApp-SPM, not App.xcodeproj directly.
|
||||||
|
|
||||||
|
require 'xcodeproj'
|
||||||
|
|
||||||
|
PROJECT_PATH = 'ios/App/App.xcodeproj'
|
||||||
|
TARGET_NAME = 'App'
|
||||||
|
PLIST_SRC = 'ios/App/App/GoogleService-Info.plist'
|
||||||
|
CAP_APP_SPM = 'ios/App/CapApp-SPM/Package.swift'
|
||||||
|
|
||||||
|
# ── 1. GoogleService-Info.plist ───────────────────────────────────────────────
|
||||||
|
if File.exist?(PLIST_SRC)
|
||||||
|
project = Xcodeproj::Project.open(PROJECT_PATH)
|
||||||
|
target = project.targets.find { |t| t.name == TARGET_NAME }
|
||||||
|
if target
|
||||||
|
app_group = project.main_group['App']
|
||||||
|
unless app_group&.files&.find { |f| f.path == 'GoogleService-Info.plist' }
|
||||||
|
file_ref = app_group.new_reference('GoogleService-Info.plist')
|
||||||
|
target.resources_build_phase.add_file_reference(file_ref)
|
||||||
|
project.save
|
||||||
|
puts "Added GoogleService-Info.plist to target"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# ── 2. Scan Swift sources for Firebase imports ────────────────────────────────
|
||||||
|
swift_files = Dir['ios/App/App/**/*.swift']
|
||||||
|
firebase_imports = swift_files
|
||||||
|
.flat_map { |f| File.readlines(f) rescue [] }
|
||||||
|
.grep(/^\s*import\s+Firebase\w+/)
|
||||||
|
.map { |l| l.strip.split(/\s+/).last }
|
||||||
|
.uniq
|
||||||
|
.sort
|
||||||
|
|
||||||
|
if firebase_imports.empty?
|
||||||
|
puts "No Firebase imports found — skipping CapApp-SPM update"
|
||||||
|
exit 0
|
||||||
|
end
|
||||||
|
|
||||||
|
puts "Firebase imports detected: #{firebase_imports.join(', ')}"
|
||||||
|
|
||||||
|
unless File.exist?(CAP_APP_SPM)
|
||||||
|
warn "WARNING: #{CAP_APP_SPM} not found — was cap sync run?"
|
||||||
|
exit 0
|
||||||
|
end
|
||||||
|
|
||||||
|
# ── 3. Detect firebase-ios-sdk URL and version from node_modules ──────────────
|
||||||
|
# Read from the ACTUAL node_modules on this build machine (populated by npm install)
|
||||||
|
# so the version we inject matches what @capacitor-firebase/* already resolved.
|
||||||
|
firebase_url = nil
|
||||||
|
firebase_version = nil
|
||||||
|
|
||||||
|
Dir['node_modules/@capacitor-firebase/**/Package.swift',
|
||||||
|
'node_modules/@capacitor/push-notifications/**/Package.swift'].each do |f|
|
||||||
|
content = File.read(f) rescue next
|
||||||
|
url_m = content.match(/\.package\(url:\s*"(https:\/\/github\.com\/firebase\/firebase-ios-sdk[^"]*)"/)
|
||||||
|
ver_m = content.match(/firebase-ios-sdk[^)]+from:\s*"(\d+)\.(\d+)\.(\d+)"/)
|
||||||
|
next unless url_m && ver_m
|
||||||
|
|
||||||
|
firebase_url = url_m[1]
|
||||||
|
major = ver_m[1].to_i
|
||||||
|
firebase_version = "#{major}.0.0"
|
||||||
|
puts "Detected firebase-ios-sdk from #{f}: url=#{firebase_url} → using from: \"#{firebase_version}\""
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
# Fallback — should rarely be needed
|
||||||
|
unless firebase_url
|
||||||
|
firebase_url = 'https://github.com/firebase/firebase-ios-sdk.git'
|
||||||
|
firebase_version = '11.0.0'
|
||||||
|
puts "Could not detect firebase-ios-sdk version from node_modules — using fallback #{firebase_version}"
|
||||||
|
end
|
||||||
|
|
||||||
|
firebase_pkg = 'firebase-ios-sdk'
|
||||||
|
|
||||||
|
lines = File.read(CAP_APP_SPM).split("\n")
|
||||||
|
|
||||||
|
# ── 4. Inject firebase-ios-sdk as a direct package dependency if missing ──────
|
||||||
|
# Normalise URL check to handle both with and without .git suffix
|
||||||
|
firebase_url_base = firebase_url.sub(/\.git$/, '')
|
||||||
|
unless lines.any? { |l| l.include?(firebase_url_base) }
|
||||||
|
last_pkg_idx = lines.rindex { |l| l.include?('.package(') }
|
||||||
|
if last_pkg_idx
|
||||||
|
lines[last_pkg_idx] = lines[last_pkg_idx].rstrip
|
||||||
|
lines[last_pkg_idx] += ',' unless lines[last_pkg_idx].end_with?(',')
|
||||||
|
lines.insert(last_pkg_idx + 1,
|
||||||
|
" .package(url: \"#{firebase_url}\", from: \"#{firebase_version}\")")
|
||||||
|
puts "Added #{firebase_pkg} to CapApp-SPM package dependencies"
|
||||||
|
else
|
||||||
|
warn "WARNING: no .package( line found in #{CAP_APP_SPM} — cannot inject dependency"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# ── 5. Inject each detected product into the target dependencies if missing ───
|
||||||
|
firebase_imports.each do |product|
|
||||||
|
next if product == 'Firebase' # umbrella import — not a linkable SPM product
|
||||||
|
|
||||||
|
product_str = ".product(name: \"#{product}\", package: \"#{firebase_pkg}\")"
|
||||||
|
next if lines.any? { |l| l.include?(product_str) }
|
||||||
|
|
||||||
|
last_prod_idx = lines.rindex { |l| l.include?('.product(') }
|
||||||
|
if last_prod_idx
|
||||||
|
lines[last_prod_idx] = lines[last_prod_idx].rstrip
|
||||||
|
lines[last_prod_idx] += ',' unless lines[last_prod_idx].end_with?(',')
|
||||||
|
lines.insert(last_prod_idx + 1, " #{product_str}")
|
||||||
|
puts "Added #{product} to CapApp-SPM target dependencies"
|
||||||
|
else
|
||||||
|
warn "WARNING: no .product( line found in #{CAP_APP_SPM} — cannot inject #{product}"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
File.write(CAP_APP_SPM, lines.join("\n"))
|
||||||
|
puts "CapApp-SPM/Package.swift updated"
|
||||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -308,7 +308,7 @@
|
|||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
|
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = io.longtime.app;
|
PRODUCT_BUNDLE_IDENTIFIER = com.basedeployer.app;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -330,7 +330,7 @@
|
|||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = io.longtime.app;
|
PRODUCT_BUNDLE_IDENTIFIER = com.basedeployer.app;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "group:App.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
<string>Longtime</string>
|
<string>Base Deployer</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
@@ -51,10 +51,10 @@
|
|||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleURLName</key>
|
<key>CFBundleURLName</key>
|
||||||
<string>io.longtime.app</string>
|
<string>com.basedeployer.app</string>
|
||||||
<key>CFBundleURLSchemes</key>
|
<key>CFBundleURLSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>io.longtime.app</string>
|
<string>com.basedeployer.app</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
|
|||||||
+12
-3
@@ -10,6 +10,7 @@
|
|||||||
"lint": "eslint"
|
"lint": "eslint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@capacitor-firebase/authentication": "^8.0.0",
|
||||||
"@capacitor/android": "8.3.4",
|
"@capacitor/android": "8.3.4",
|
||||||
"@capacitor/app": "8.1.0",
|
"@capacitor/app": "8.1.0",
|
||||||
"@capacitor/core": "8.3.4",
|
"@capacitor/core": "8.3.4",
|
||||||
@@ -17,20 +18,28 @@
|
|||||||
"@capacitor/haptics": "8.0.2",
|
"@capacitor/haptics": "8.0.2",
|
||||||
"@capacitor/ios": "8.3.4",
|
"@capacitor/ios": "8.3.4",
|
||||||
"@capacitor/keyboard": "8.0.3",
|
"@capacitor/keyboard": "8.0.3",
|
||||||
|
"@capacitor/preferences": "^8.0.1",
|
||||||
"@capacitor/push-notifications": "^8.1.1",
|
"@capacitor/push-notifications": "^8.1.1",
|
||||||
"@capacitor/status-bar": "8.0.2",
|
"@capacitor/status-bar": "8.0.2",
|
||||||
|
"@hookform/resolvers": "^3.9.0",
|
||||||
"@ionic/pwa-elements": "^3.0.0",
|
"@ionic/pwa-elements": "^3.0.0",
|
||||||
"@ionic/react": "^8.5.0",
|
"@ionic/react": "8.8.7",
|
||||||
"@ionic/react-router": "^8.5.0",
|
"@ionic/react-router": "8.8.7",
|
||||||
|
"@reown/appkit": "^1.8.21",
|
||||||
|
"@reown/appkit-adapter-wagmi": "^1.8.21",
|
||||||
|
"@supabase/supabase-js": "^2.108.1",
|
||||||
|
"@tanstack/react-query": "^5.101.1",
|
||||||
|
"firebase": "^11.0.0",
|
||||||
"ionicons": "^7.4.0",
|
"ionicons": "^7.4.0",
|
||||||
"katex": "^0.16.0",
|
"katex": "^0.16.0",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-hook-form": "^7.54.0",
|
"react-hook-form": "^7.54.0",
|
||||||
"react-katex": "^3.0.1",
|
"react-katex": "^3.0.1",
|
||||||
"@supabase/supabase-js": "^2.0.0",
|
|
||||||
"react-router": "^5.3.4",
|
"react-router": "^5.3.4",
|
||||||
"react-router-dom": "^5.3.4",
|
"react-router-dom": "^5.3.4",
|
||||||
|
"viem": "^2.53.1",
|
||||||
|
"wagmi": "^3.6.18",
|
||||||
"zod": "^3.24.0",
|
"zod": "^3.24.0",
|
||||||
"zustand": "^5.0.0"
|
"zustand": "^5.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+77
-26
@@ -1,32 +1,83 @@
|
|||||||
import React from "react";
|
import React, { useEffect } from 'react';
|
||||||
import { Redirect, Route } from "react-router-dom";
|
import { Redirect, Route } from 'react-router-dom';
|
||||||
import { IonApp, IonRouterOutlet } from "@ionic/react";
|
import { IonApp, IonRouterOutlet } from '@ionic/react';
|
||||||
import { IonReactRouter } from "@ionic/react-router";
|
import { IonReactRouter } from '@ionic/react-router';
|
||||||
|
|
||||||
import "@ionic/react/css/core.css";
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||||
import "@ionic/react/css/normalize.css";
|
import { WagmiProvider } from 'wagmi';
|
||||||
import "@ionic/react/css/structure.css";
|
import { WagmiAdapter } from '@reown/appkit-adapter-wagmi';
|
||||||
import "@ionic/react/css/typography.css";
|
import { base, type AppKitNetwork } from '@reown/appkit/networks';
|
||||||
import "@ionic/react/css/padding.css";
|
import { createAppKit } from '@reown/appkit/react';
|
||||||
import "@ionic/react/css/float-elements.css";
|
|
||||||
import "@ionic/react/css/text-alignment.css";
|
|
||||||
import "@ionic/react/css/text-transformation.css";
|
|
||||||
import "@ionic/react/css/flex-utils.css";
|
|
||||||
import "@ionic/react/css/display.css";
|
|
||||||
|
|
||||||
import "./theme/variables.css";
|
import { setStatusBarStyle, Style } from './utils/statusBar';
|
||||||
|
|
||||||
import Home from "./pages/Home";
|
import '@ionic/react/css/core.css';
|
||||||
|
import '@ionic/react/css/normalize.css';
|
||||||
|
import '@ionic/react/css/structure.css';
|
||||||
|
import '@ionic/react/css/typography.css';
|
||||||
|
import '@ionic/react/css/padding.css';
|
||||||
|
import '@ionic/react/css/float-elements.css';
|
||||||
|
import '@ionic/react/css/text-alignment.css';
|
||||||
|
import '@ionic/react/css/text-transformation.css';
|
||||||
|
import '@ionic/react/css/flex-utils.css';
|
||||||
|
import '@ionic/react/css/display.css';
|
||||||
|
|
||||||
const App: React.FC = () => (
|
import './theme/variables.css';
|
||||||
<IonApp>
|
|
||||||
<IonReactRouter>
|
import Home from './pages/Home';
|
||||||
<IonRouterOutlet>
|
|
||||||
<Route path="/home" component={Home} exact />
|
// Setup QueryClient
|
||||||
<Redirect exact from="/" to="/home" />
|
const queryClient = new QueryClient();
|
||||||
</IonRouterOutlet>
|
|
||||||
</IonReactRouter>
|
// Setup AppKit
|
||||||
</IonApp>
|
const projectId =
|
||||||
);
|
import.meta.env.VITE_WALLETCONNECT_PROJECT_ID ||
|
||||||
|
'01e0a2bf8d37317e040edb7878d70804';
|
||||||
|
|
||||||
|
const metadata = {
|
||||||
|
name: 'Base Deployer',
|
||||||
|
description: 'Base Mainnet GM dApp',
|
||||||
|
url: 'https://basedeployer.app',
|
||||||
|
icons: ['https://avatars.githubusercontent.com/u/37784886'],
|
||||||
|
};
|
||||||
|
|
||||||
|
const networks = [base as any] as [AppKitNetwork, ...AppKitNetwork[]];
|
||||||
|
|
||||||
|
const wagmiAdapter = new WagmiAdapter({
|
||||||
|
networks,
|
||||||
|
projectId,
|
||||||
|
ssr: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
createAppKit({
|
||||||
|
adapters: [wagmiAdapter],
|
||||||
|
networks,
|
||||||
|
projectId,
|
||||||
|
metadata,
|
||||||
|
features: {
|
||||||
|
analytics: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const App: React.FC = () => {
|
||||||
|
useEffect(() => {
|
||||||
|
setStatusBarStyle(Style.Dark); // Dark background, light icons
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<WagmiProvider config={wagmiAdapter.wagmiConfig}>
|
||||||
|
<QueryClientProvider client={queryClient}>
|
||||||
|
<IonApp>
|
||||||
|
<IonReactRouter>
|
||||||
|
<IonRouterOutlet>
|
||||||
|
<Route path="/home" component={Home} exact />
|
||||||
|
<Redirect exact from="/" to="/home" />
|
||||||
|
</IonRouterOutlet>
|
||||||
|
</IonReactRouter>
|
||||||
|
</IonApp>
|
||||||
|
</QueryClientProvider>
|
||||||
|
</WagmiProvider>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
export default App;
|
export default App;
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
const Hello = () => (
|
|
||||||
<div>
|
|
||||||
<p>Hello</p>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
|
|
||||||
export default Hello;
|
|
||||||
+10
-11
@@ -5,7 +5,7 @@ import { Capacitor } from '@capacitor/core';
|
|||||||
import App from './App';
|
import App from './App';
|
||||||
|
|
||||||
// ── Ionic initialisation ──────────────────────────────────────────────────────
|
// ── Ionic initialisation ──────────────────────────────────────────────────────
|
||||||
// ?mode=md|ios overrides (used by AppSuite preview); otherwise follow the platform.
|
// ?mode=md|ios overrides (used by Appcakes preview); otherwise follow the platform.
|
||||||
const _urlMode = new URLSearchParams(window.location.search).get('mode');
|
const _urlMode = new URLSearchParams(window.location.search).get('mode');
|
||||||
const _platform = Capacitor.getPlatform(); // 'ios' | 'android' | 'web'
|
const _platform = Capacitor.getPlatform(); // 'ios' | 'android' | 'web'
|
||||||
setupIonicReact({
|
setupIonicReact({
|
||||||
@@ -13,7 +13,7 @@ setupIonicReact({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Derive the studio parent origin dynamically so this works in both dev
|
// Derive the studio parent origin dynamically so this works in both dev
|
||||||
// (parent at localhost:3000) and production (parent at appcakes.qqura.com).
|
// (parent at localhost:3000) and production (parent at studio.appcakes.dev).
|
||||||
const studioOrigin = (() => {
|
const studioOrigin = (() => {
|
||||||
try {
|
try {
|
||||||
if (document.referrer) return new URL(document.referrer).origin;
|
if (document.referrer) return new URL(document.referrer).origin;
|
||||||
@@ -43,19 +43,13 @@ window.addEventListener('message', (e) => {
|
|||||||
|
|
||||||
// Re-apply after React Fast Refresh so insets survive soft HMR cycles.
|
// Re-apply after React Fast Refresh so insets survive soft HMR cycles.
|
||||||
if (import.meta.hot) {
|
if (import.meta.hot) {
|
||||||
import.meta.hot.on('vite:beforeUpdate', () => {
|
|
||||||
const c = (window as any).Ionic?.config;
|
|
||||||
if (c) c.animated = false;
|
|
||||||
});
|
|
||||||
import.meta.hot.on('vite:afterUpdate', () => {
|
import.meta.hot.on('vite:afterUpdate', () => {
|
||||||
_applyInsets(sessionStorage.getItem('__apsuite_sat'), sessionStorage.getItem('__apsuite_sab'));
|
_applyInsets(sessionStorage.getItem('__apsuite_sat'), sessionStorage.getItem('__apsuite_sab'));
|
||||||
const c = (window as any).Ionic?.config;
|
|
||||||
if (c) c.animated = true;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Session bridge ────────────────────────────────────────────────────────────
|
// ── Session bridge ────────────────────────────────────────────────────────────
|
||||||
// Post auth session to the AppSuite parent frame so the AI can test auth-protected
|
// Post auth session to the Appcakes parent frame so the AI can test auth-protected
|
||||||
// Edge Functions. Uses import.meta.glob so Vite never errors if supabase.ts is absent.
|
// Edge Functions. Uses import.meta.glob so Vite never errors if supabase.ts is absent.
|
||||||
(async () => {
|
(async () => {
|
||||||
const mods = import.meta.glob('./supabase.ts', { eager: false });
|
const mods = import.meta.glob('./supabase.ts', { eager: false });
|
||||||
@@ -79,12 +73,17 @@ if (import.meta.hot) {
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
// ── Runtime error reporting ───────────────────────────────────────────────────
|
// ── Runtime error reporting ───────────────────────────────────────────────────
|
||||||
// Forward uncaught errors to the AppSuite dev server so the AI can read them.
|
// Forward uncaught errors to the Appcakes dev server so the AI can read them.
|
||||||
|
// Extract projectId from the preview URL (/preview/{projectId}/) so errors are
|
||||||
|
// scoped per-project on the server rather than mixed into a global queue.
|
||||||
|
const _previewMatch = window.location.pathname.match(/\/preview\/([^/]+)/);
|
||||||
|
const _projectId = _previewMatch?.[1] ?? null;
|
||||||
|
|
||||||
function reportError(message: string, stack?: string) {
|
function reportError(message: string, stack?: string) {
|
||||||
fetch(`${studioOrigin}/api/agent/runtime-error`, {
|
fetch(`${studioOrigin}/api/agent/runtime-error`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ message, stack }),
|
body: JSON.stringify({ message, stack, projectId: _projectId }),
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1152
-20
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
|||||||
import { createClient } from '@supabase/supabase-js';
|
|
||||||
import type { Database } from './database.types';
|
|
||||||
|
|
||||||
export const supabase = createClient<Database>(
|
|
||||||
'https://gsltltsypffowdpfdhkf.supabase.co',
|
|
||||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdzbHRsdHN5cGZmb3dkcGZkaGtmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzk1Njg0MTIsImV4cCI6MjA5NTE0NDQxMn0.XH2adPZPr9p0fQwP3mXDP6wIS41DByW7ZAPSMA0_TYI',
|
|
||||||
);
|
|
||||||
Vendored
+51
@@ -0,0 +1,51 @@
|
|||||||
|
// Ambient test globals for optional *.test.* files in the editor / tsc.
|
||||||
|
// No test runner is installed in the template; stubs avoid spurious TS errors.
|
||||||
|
|
||||||
|
interface Matchers<R = void> {
|
||||||
|
toBeDefined(): R;
|
||||||
|
toBe(expected: unknown): R;
|
||||||
|
toEqual(expected: unknown): R;
|
||||||
|
toBeTruthy(): R;
|
||||||
|
toBeFalsy(): R;
|
||||||
|
toBeNull(): R;
|
||||||
|
toContain(item: unknown): R;
|
||||||
|
toHaveLength(length: number): R;
|
||||||
|
toMatch(expected: string | RegExp): R;
|
||||||
|
toThrow(expected?: string | RegExp | Error): R;
|
||||||
|
not: Matchers<R>;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Expect {
|
||||||
|
<T = unknown>(actual: T): Matchers;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare const expect: Expect;
|
||||||
|
|
||||||
|
type TestCaseFn = (
|
||||||
|
name: string,
|
||||||
|
fn?: () => void | Promise<void>,
|
||||||
|
timeout?: number,
|
||||||
|
) => void;
|
||||||
|
|
||||||
|
declare const test: TestCaseFn;
|
||||||
|
declare const it: TestCaseFn;
|
||||||
|
declare const describe: TestCaseFn;
|
||||||
|
|
||||||
|
declare function beforeEach(fn: () => void | Promise<void>): void;
|
||||||
|
declare function afterEach(fn: () => void | Promise<void>): void;
|
||||||
|
declare function beforeAll(fn: () => void | Promise<void>): void;
|
||||||
|
declare function afterAll(fn: () => void | Promise<void>): void;
|
||||||
|
|
||||||
|
declare module "@testing-library/react" {
|
||||||
|
export function render(
|
||||||
|
ui: unknown,
|
||||||
|
options?: object,
|
||||||
|
): {
|
||||||
|
baseElement: Element;
|
||||||
|
container: Element;
|
||||||
|
unmount(): void;
|
||||||
|
rerender(ui: unknown): void;
|
||||||
|
};
|
||||||
|
export const screen: Record<string, (...args: unknown[]) => Element>;
|
||||||
|
export function cleanup(): void;
|
||||||
|
}
|
||||||
+64
-44
@@ -1,65 +1,85 @@
|
|||||||
/* Ionic CSS Variables — customise to match your app's brand */
|
/* Ionic CSS Variables — customise to match your app's brand */
|
||||||
:root {
|
:root {
|
||||||
--ion-color-primary: #3880ff;
|
--ion-color-primary: #2667ff;
|
||||||
--ion-color-primary-rgb: 56, 128, 255;
|
--ion-color-primary-rgb: 38, 103, 255;
|
||||||
--ion-color-primary-contrast: #ffffff;
|
--ion-color-primary-contrast: #ffffff;
|
||||||
--ion-color-primary-contrast-rgb: 255, 255, 255;
|
--ion-color-primary-contrast-rgb: 255, 255, 255;
|
||||||
--ion-color-primary-shade: #3171e0;
|
--ion-color-primary-shade: #215be0;
|
||||||
--ion-color-primary-tint: #4c8dff;
|
--ion-color-primary-tint: #3c76ff;
|
||||||
|
|
||||||
--ion-color-secondary: #3dc2ff;
|
--ion-color-secondary: #7cc7ff;
|
||||||
--ion-color-secondary-rgb: 61, 194, 255;
|
--ion-color-secondary-rgb: 124, 199, 255;
|
||||||
--ion-color-secondary-contrast: #ffffff;
|
--ion-color-secondary-contrast: #0a1020;
|
||||||
--ion-color-secondary-contrast-rgb: 255, 255, 255;
|
--ion-color-secondary-contrast-rgb: 10, 16, 32;
|
||||||
--ion-color-secondary-shade: #36abe0;
|
--ion-color-secondary-shade: #6dafdf;
|
||||||
--ion-color-secondary-tint: #50c8ff;
|
--ion-color-secondary-tint: #89cdff;
|
||||||
|
|
||||||
--ion-color-tertiary: #5260ff;
|
--ion-color-tertiary: #9fd6ff;
|
||||||
--ion-color-tertiary-rgb: 82, 96, 255;
|
--ion-color-tertiary-rgb: 159, 214, 255;
|
||||||
--ion-color-tertiary-contrast: #ffffff;
|
--ion-color-tertiary-contrast: #0a1020;
|
||||||
--ion-color-tertiary-contrast-rgb: 255, 255, 255;
|
--ion-color-tertiary-contrast-rgb: 10, 16, 32;
|
||||||
--ion-color-tertiary-shade: #4854e0;
|
--ion-color-tertiary-shade: #8cbcb;
|
||||||
--ion-color-tertiary-tint: #6370ff;
|
--ion-color-tertiary-tint: #a9daff;
|
||||||
|
|
||||||
--ion-color-success: #2dd36f;
|
--ion-color-success: #15803d;
|
||||||
--ion-color-success-rgb: 45, 211, 111;
|
--ion-color-success-rgb: 21, 128, 61;
|
||||||
--ion-color-success-contrast: #ffffff;
|
--ion-color-success-contrast: #ffffff;
|
||||||
--ion-color-success-contrast-rgb: 255, 255, 255;
|
--ion-color-success-contrast-rgb: 255, 255, 255;
|
||||||
--ion-color-success-shade: #28ba62;
|
--ion-color-success-shade: #127136;
|
||||||
--ion-color-success-tint: #42d77d;
|
--ion-color-success-tint: #2c8d50;
|
||||||
|
|
||||||
--ion-color-warning: #ffc409;
|
--ion-color-warning: #eab308;
|
||||||
--ion-color-warning-rgb: 255, 196, 9;
|
--ion-color-warning-rgb: 234, 179, 8;
|
||||||
--ion-color-warning-contrast: #000000;
|
--ion-color-warning-contrast: #0a1020;
|
||||||
--ion-color-warning-contrast-rgb: 0, 0, 0;
|
--ion-color-warning-contrast-rgb: 10, 16, 32;
|
||||||
--ion-color-warning-shade: #e0ac08;
|
--ion-color-warning-shade: #ce9d07;
|
||||||
--ion-color-warning-tint: #ffca22;
|
--ion-color-warning-tint: #ecbb21;
|
||||||
|
|
||||||
--ion-color-danger: #eb445a;
|
--ion-color-danger: #c2410c;
|
||||||
--ion-color-danger-rgb: 235, 68, 90;
|
--ion-color-danger-rgb: 194, 65, 12;
|
||||||
--ion-color-danger-contrast: #ffffff;
|
--ion-color-danger-contrast: #ffffff;
|
||||||
--ion-color-danger-contrast-rgb: 255, 255, 255;
|
--ion-color-danger-contrast-rgb: 255, 255, 255;
|
||||||
--ion-color-danger-shade: #cf3c4f;
|
--ion-color-danger-shade: #ab390a;
|
||||||
--ion-color-danger-tint: #ed576b;
|
--ion-color-danger-tint: #c85424;
|
||||||
|
|
||||||
--ion-color-dark: #222428;
|
--ion-color-dark: #0a1020;
|
||||||
--ion-color-dark-rgb: 34, 36, 40;
|
--ion-color-dark-rgb: 10, 16, 32;
|
||||||
--ion-color-dark-contrast: #ffffff;
|
--ion-color-dark-contrast: #ffffff;
|
||||||
--ion-color-dark-contrast-rgb: 255, 255, 255;
|
--ion-color-dark-contrast-rgb: 255, 255, 255;
|
||||||
--ion-color-dark-shade: #1e2023;
|
--ion-color-dark-shade: #090e1c;
|
||||||
--ion-color-dark-tint: #383a3e;
|
--ion-color-dark-tint: #222836;
|
||||||
|
|
||||||
--ion-color-medium: #92949c;
|
--ion-color-medium: #6b7a99;
|
||||||
--ion-color-medium-rgb: 146, 148, 156;
|
--ion-color-medium-rgb: 107, 122, 153;
|
||||||
--ion-color-medium-contrast: #ffffff;
|
--ion-color-medium-contrast: #ffffff;
|
||||||
--ion-color-medium-contrast-rgb: 255, 255, 255;
|
--ion-color-medium-contrast-rgb: 255, 255, 255;
|
||||||
--ion-color-medium-shade: #808289;
|
--ion-color-medium-shade: #5e6b87;
|
||||||
--ion-color-medium-tint: #9d9fa6;
|
--ion-color-medium-tint: #7a87a3;
|
||||||
|
|
||||||
--ion-color-light: #f4f5f8;
|
--ion-color-light: #f8fbff;
|
||||||
--ion-color-light-rgb: 244, 245, 248;
|
--ion-color-light-rgb: 248, 251, 255;
|
||||||
--ion-color-light-contrast: #000000;
|
--ion-color-light-contrast: #0a1020;
|
||||||
--ion-color-light-contrast-rgb: 0, 0, 0;
|
--ion-color-light-contrast-rgb: 10, 16, 32;
|
||||||
--ion-color-light-shade: #d7d8da;
|
--ion-color-light-shade: #dadde0;
|
||||||
--ion-color-light-tint: #f5f6f9;
|
--ion-color-light-tint: #f9fbff;
|
||||||
|
|
||||||
|
--app-background: #0a1020;
|
||||||
|
--app-surface: #121b36;
|
||||||
|
--app-surface-secondary: #f7faff;
|
||||||
|
--app-text-primary: #f8fbff;
|
||||||
|
--app-text-secondary: rgba(248, 251, 255, 0.7);
|
||||||
|
--app-text-tertiary: rgba(248, 251, 255, 0.5);
|
||||||
|
--app-accent-soft: rgba(38, 103, 255, 0.12);
|
||||||
|
--app-accent-softer: rgba(38, 103, 255, 0.08);
|
||||||
|
--app-success-soft: rgba(21, 128, 61, 0.12);
|
||||||
|
--app-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: var(--app-background);
|
||||||
|
color: var(--app-text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
ion-content.home-content {
|
||||||
|
--background: var(--app-background);
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-1
@@ -1,3 +1,6 @@
|
|||||||
|
// NOTE: @ionic/react and @ionic/react-router are pinned to 8.8.7 in package.json.
|
||||||
|
// 8.8.8 introduced a regression that breaks IonRouterOutlet page transition animations.
|
||||||
|
// Do not upgrade until the upstream fix is confirmed.
|
||||||
import { defineConfig, type Plugin } from 'vite';
|
import { defineConfig, type Plugin } from 'vite';
|
||||||
import react from '@vitejs/plugin-react';
|
import react from '@vitejs/plugin-react';
|
||||||
|
|
||||||
@@ -14,8 +17,18 @@ const injectRouterBasename: Plugin = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const hideScrollbars: Plugin = {
|
||||||
|
name: 'hide-scrollbars',
|
||||||
|
transformIndexHtml(html) {
|
||||||
|
return html.replace(
|
||||||
|
'</head>',
|
||||||
|
'<style>*{scrollbar-width:none!important;-ms-overflow-style:none!important}*::-webkit-scrollbar{display:none!important}</style></head>',
|
||||||
|
);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [injectRouterBasename, react()],
|
plugins: [injectRouterBasename, hideScrollbars, react()],
|
||||||
server: {
|
server: {
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: 8100,
|
port: 8100,
|
||||||
|
|||||||
Reference in New Issue
Block a user