diff --git a/intern-log/.gitignore b/intern-log/.gitignore
index b9491f9..6a268a8 100644
--- a/intern-log/.gitignore
+++ b/intern-log/.gitignore
@@ -2,3 +2,8 @@ node_modules/
dist/
release/
*.local
+android/.gradle/
+android/build/
+android/app/build/
+android/local.properties
+server/data/
diff --git a/intern-log/README.md b/intern-log/README.md
index f7e5eb7..f993144 100644
--- a/intern-log/README.md
+++ b/intern-log/README.md
@@ -24,6 +24,8 @@
- 密码库:企业账号密码管理,主密码 PBKDF2 派生 AES-256-GCM 加密,支持解锁、锁定、搜索、复制、随机密码生成、修改主密码;备份文件中密码保持密文
- 用户系统:每位用户独立 IndexedDB 数据库隔离存储;登录密码仅存 PBKDF2 哈希;30 分钟无操作自动退出;创建用户时可迁移升级前数据
- 记账系统:支出/收入记录、报销跟踪(面向出差垫付)、月度汇总与分类分布
+- 多端同步:自建同步服务端(server 目录,Docker 部署见 server/DEPLOY.md),设置页配置后桌面、网页、手机 PWA 数据互通;密码库以密文同步
+- 安卓应用:Capacitor 脚手架已就绪,本机构建 APK 需 Android Studio:pnpm build && npx cap sync android,进入 android 目录执行 gradlew assembleDebug
- PWA:在 Edge/Chrome 中打开后,地址栏右侧点「安装」或菜单选择「将此站点作为应用安装」,即可获得独立窗口与桌面图标,离线可用
- Electron 桌面版:pnpm dist 产出 release/InternLog-Setup-<版本>.exe(NSIS 安装包)与 release/win-unpacked/InternLog.exe(免安装版);数据存于系统用户目录,与浏览器数据互不影响
- 全局搜索:Ctrl+K 唤起,覆盖工作记录与备忘录,点击结果跳转定位
diff --git a/intern-log/android/.gitignore b/intern-log/android/.gitignore
new file mode 100644
index 0000000..48354a3
--- /dev/null
+++ b/intern-log/android/.gitignore
@@ -0,0 +1,101 @@
+# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
+
+# Built application files
+*.apk
+*.aar
+*.ap_
+*.aab
+
+# Files for the ART/Dalvik VM
+*.dex
+
+# Java class files
+*.class
+
+# Generated files
+bin/
+gen/
+out/
+# Uncomment the following line in case you need and you don't have the release build type files in your app
+# release/
+
+# Gradle files
+.gradle/
+build/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Proguard folder generated by Eclipse
+proguard/
+
+# Log Files
+*.log
+
+# Android Studio Navigation editor temp files
+.navigation/
+
+# Android Studio captures folder
+captures/
+
+# IntelliJ
+*.iml
+.idea/workspace.xml
+.idea/tasks.xml
+.idea/gradle.xml
+.idea/assetWizardSettings.xml
+.idea/dictionaries
+.idea/libraries
+# Android Studio 3 in .gitignore file.
+.idea/caches
+.idea/modules.xml
+# Comment next line if keeping position of elements in Navigation Editor is relevant for you
+.idea/navEditor.xml
+
+# Keystore files
+# Uncomment the following lines if you do not want to check your keystore files in.
+#*.jks
+#*.keystore
+
+# External native build folder generated in Android Studio 2.2 and later
+.externalNativeBuild
+.cxx/
+
+# Google Services (e.g. APIs or Firebase)
+# google-services.json
+
+# Freeline
+freeline.py
+freeline/
+freeline_project_description.json
+
+# fastlane
+fastlane/report.xml
+fastlane/Preview.html
+fastlane/screenshots
+fastlane/test_output
+fastlane/readme.md
+
+# Version control
+vcs.xml
+
+# lint
+lint/intermediates/
+lint/generated/
+lint/outputs/
+lint/tmp/
+# lint/reports/
+
+# Android Profiling
+*.hprof
+
+# Cordova plugins for Capacitor
+capacitor-cordova-android-plugins
+
+# Copied web assets
+app/src/main/assets/public
+
+# Generated Config files
+app/src/main/assets/capacitor.config.json
+app/src/main/assets/capacitor.plugins.json
+app/src/main/res/xml/config.xml
diff --git a/intern-log/android/app/.gitignore b/intern-log/android/app/.gitignore
new file mode 100644
index 0000000..043df80
--- /dev/null
+++ b/intern-log/android/app/.gitignore
@@ -0,0 +1,2 @@
+/build/*
+!/build/.npmkeep
diff --git a/intern-log/android/app/build.gradle b/intern-log/android/app/build.gradle
new file mode 100644
index 0000000..85da203
--- /dev/null
+++ b/intern-log/android/app/build.gradle
@@ -0,0 +1,54 @@
+apply plugin: 'com.android.application'
+
+android {
+ namespace "cn.linyux.internlog"
+ compileSdk rootProject.ext.compileSdkVersion
+ defaultConfig {
+ applicationId "cn.linyux.internlog"
+ minSdkVersion rootProject.ext.minSdkVersion
+ targetSdkVersion rootProject.ext.targetSdkVersion
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ aaptOptions {
+ // 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
+ ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
+ }
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+repositories {
+ flatDir{
+ dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
+ }
+}
+
+dependencies {
+ implementation fileTree(include: ['*.jar'], dir: 'libs')
+ implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
+ implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
+ implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
+ implementation project(':capacitor-android')
+ testImplementation "junit:junit:$junitVersion"
+ androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
+ androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
+ implementation project(':capacitor-cordova-android-plugins')
+}
+
+apply from: 'capacitor.build.gradle'
+
+try {
+ def servicesJSON = file('google-services.json')
+ if (servicesJSON.text) {
+ apply plugin: 'com.google.gms.google-services'
+ }
+} catch(Exception e) {
+ logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
+}
diff --git a/intern-log/android/app/capacitor.build.gradle b/intern-log/android/app/capacitor.build.gradle
new file mode 100644
index 0000000..fdb4970
--- /dev/null
+++ b/intern-log/android/app/capacitor.build.gradle
@@ -0,0 +1,19 @@
+// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
+
+android {
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_17
+ targetCompatibility JavaVersion.VERSION_17
+ }
+}
+
+apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
+dependencies {
+
+
+}
+
+
+if (hasProperty('postBuildExtras')) {
+ postBuildExtras()
+}
diff --git a/intern-log/android/app/proguard-rules.pro b/intern-log/android/app/proguard-rules.pro
new file mode 100644
index 0000000..f1b4245
--- /dev/null
+++ b/intern-log/android/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/intern-log/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java b/intern-log/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..f2c2217
--- /dev/null
+++ b/intern-log/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.getcapacitor.myapp;
+
+import static org.junit.Assert.*;
+
+import android.content.Context;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.platform.app.InstrumentationRegistry;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+
+ @Test
+ public void useAppContext() throws Exception {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
+
+ assertEquals("com.getcapacitor.app", appContext.getPackageName());
+ }
+}
diff --git a/intern-log/android/app/src/main/AndroidManifest.xml b/intern-log/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..4d7ca38
--- /dev/null
+++ b/intern-log/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intern-log/android/app/src/main/java/cn/linyux/internlog/MainActivity.java b/intern-log/android/app/src/main/java/cn/linyux/internlog/MainActivity.java
new file mode 100644
index 0000000..63c11e5
--- /dev/null
+++ b/intern-log/android/app/src/main/java/cn/linyux/internlog/MainActivity.java
@@ -0,0 +1,5 @@
+package cn.linyux.internlog;
+
+import com.getcapacitor.BridgeActivity;
+
+public class MainActivity extends BridgeActivity {}
diff --git a/intern-log/android/app/src/main/res/drawable-land-hdpi/splash.png b/intern-log/android/app/src/main/res/drawable-land-hdpi/splash.png
new file mode 100644
index 0000000..e31573b
Binary files /dev/null and b/intern-log/android/app/src/main/res/drawable-land-hdpi/splash.png differ
diff --git a/intern-log/android/app/src/main/res/drawable-land-mdpi/splash.png b/intern-log/android/app/src/main/res/drawable-land-mdpi/splash.png
new file mode 100644
index 0000000..f7a6492
Binary files /dev/null and b/intern-log/android/app/src/main/res/drawable-land-mdpi/splash.png differ
diff --git a/intern-log/android/app/src/main/res/drawable-land-xhdpi/splash.png b/intern-log/android/app/src/main/res/drawable-land-xhdpi/splash.png
new file mode 100644
index 0000000..8077255
Binary files /dev/null and b/intern-log/android/app/src/main/res/drawable-land-xhdpi/splash.png differ
diff --git a/intern-log/android/app/src/main/res/drawable-land-xxhdpi/splash.png b/intern-log/android/app/src/main/res/drawable-land-xxhdpi/splash.png
new file mode 100644
index 0000000..14c6c8f
Binary files /dev/null and b/intern-log/android/app/src/main/res/drawable-land-xxhdpi/splash.png differ
diff --git a/intern-log/android/app/src/main/res/drawable-land-xxxhdpi/splash.png b/intern-log/android/app/src/main/res/drawable-land-xxxhdpi/splash.png
new file mode 100644
index 0000000..244ca25
Binary files /dev/null and b/intern-log/android/app/src/main/res/drawable-land-xxxhdpi/splash.png differ
diff --git a/intern-log/android/app/src/main/res/drawable-port-hdpi/splash.png b/intern-log/android/app/src/main/res/drawable-port-hdpi/splash.png
new file mode 100644
index 0000000..74faaa5
Binary files /dev/null and b/intern-log/android/app/src/main/res/drawable-port-hdpi/splash.png differ
diff --git a/intern-log/android/app/src/main/res/drawable-port-mdpi/splash.png b/intern-log/android/app/src/main/res/drawable-port-mdpi/splash.png
new file mode 100644
index 0000000..e944f4a
Binary files /dev/null and b/intern-log/android/app/src/main/res/drawable-port-mdpi/splash.png differ
diff --git a/intern-log/android/app/src/main/res/drawable-port-xhdpi/splash.png b/intern-log/android/app/src/main/res/drawable-port-xhdpi/splash.png
new file mode 100644
index 0000000..564a82f
Binary files /dev/null and b/intern-log/android/app/src/main/res/drawable-port-xhdpi/splash.png differ
diff --git a/intern-log/android/app/src/main/res/drawable-port-xxhdpi/splash.png b/intern-log/android/app/src/main/res/drawable-port-xxhdpi/splash.png
new file mode 100644
index 0000000..bfabe68
Binary files /dev/null and b/intern-log/android/app/src/main/res/drawable-port-xxhdpi/splash.png differ
diff --git a/intern-log/android/app/src/main/res/drawable-port-xxxhdpi/splash.png b/intern-log/android/app/src/main/res/drawable-port-xxxhdpi/splash.png
new file mode 100644
index 0000000..6929071
Binary files /dev/null and b/intern-log/android/app/src/main/res/drawable-port-xxxhdpi/splash.png differ
diff --git a/intern-log/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/intern-log/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..c7bd21d
--- /dev/null
+++ b/intern-log/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intern-log/android/app/src/main/res/drawable/ic_launcher_background.xml b/intern-log/android/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..d5fccc5
--- /dev/null
+++ b/intern-log/android/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/intern-log/android/app/src/main/res/drawable/splash.png b/intern-log/android/app/src/main/res/drawable/splash.png
new file mode 100644
index 0000000..f7a6492
Binary files /dev/null and b/intern-log/android/app/src/main/res/drawable/splash.png differ
diff --git a/intern-log/android/app/src/main/res/layout/activity_main.xml b/intern-log/android/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..b5ad138
--- /dev/null
+++ b/intern-log/android/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/intern-log/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/intern-log/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..036d09b
--- /dev/null
+++ b/intern-log/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/intern-log/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/intern-log/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..036d09b
--- /dev/null
+++ b/intern-log/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/intern-log/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/intern-log/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..c023e50
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/intern-log/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/intern-log/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..2127973
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ
diff --git a/intern-log/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/intern-log/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..b441f37
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/intern-log/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/intern-log/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..72905b8
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/intern-log/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/intern-log/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..8ed0605
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ
diff --git a/intern-log/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/intern-log/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..9502e47
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/intern-log/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/intern-log/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..4d1e077
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/intern-log/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/intern-log/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..df0f158
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ
diff --git a/intern-log/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/intern-log/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..853db04
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/intern-log/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/intern-log/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..6cdf97c
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/intern-log/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/intern-log/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..2960cbb
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ
diff --git a/intern-log/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/intern-log/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..8e3093a
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/intern-log/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/intern-log/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..46de6e2
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/intern-log/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/intern-log/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..d2ea9ab
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/intern-log/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/intern-log/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..a40d73e
Binary files /dev/null and b/intern-log/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/intern-log/android/app/src/main/res/values/ic_launcher_background.xml b/intern-log/android/app/src/main/res/values/ic_launcher_background.xml
new file mode 100644
index 0000000..c5d5899
--- /dev/null
+++ b/intern-log/android/app/src/main/res/values/ic_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #FFFFFF
+
\ No newline at end of file
diff --git a/intern-log/android/app/src/main/res/values/strings.xml b/intern-log/android/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..b053f1b
--- /dev/null
+++ b/intern-log/android/app/src/main/res/values/strings.xml
@@ -0,0 +1,7 @@
+
+
+ 实习工作日志
+ 实习工作日志
+ cn.linyux.internlog
+ cn.linyux.internlog
+
diff --git a/intern-log/android/app/src/main/res/values/styles.xml b/intern-log/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..be874e5
--- /dev/null
+++ b/intern-log/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/intern-log/android/app/src/main/res/xml/file_paths.xml b/intern-log/android/app/src/main/res/xml/file_paths.xml
new file mode 100644
index 0000000..bd0c4d8
--- /dev/null
+++ b/intern-log/android/app/src/main/res/xml/file_paths.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/intern-log/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java b/intern-log/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java
new file mode 100644
index 0000000..0297327
--- /dev/null
+++ b/intern-log/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java
@@ -0,0 +1,18 @@
+package com.getcapacitor.myapp;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+
+ @Test
+ public void addition_isCorrect() throws Exception {
+ assertEquals(4, 2 + 2);
+ }
+}
diff --git a/intern-log/android/build.gradle b/intern-log/android/build.gradle
new file mode 100644
index 0000000..85a5dda
--- /dev/null
+++ b/intern-log/android/build.gradle
@@ -0,0 +1,29 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+
+ repositories {
+ google()
+ mavenCentral()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:8.2.1'
+ classpath 'com.google.gms:google-services:4.4.0'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+apply from: "variables.gradle"
+
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/intern-log/android/capacitor.settings.gradle b/intern-log/android/capacitor.settings.gradle
new file mode 100644
index 0000000..280dd74
--- /dev/null
+++ b/intern-log/android/capacitor.settings.gradle
@@ -0,0 +1,3 @@
+// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
+include ':capacitor-android'
+project(':capacitor-android').projectDir = new File('../node_modules/.pnpm/@capacitor+android@6.2.2_@capacitor+core@6.2.2/node_modules/@capacitor/android/capacitor')
diff --git a/intern-log/android/gradle.properties b/intern-log/android/gradle.properties
new file mode 100644
index 0000000..2e87c52
--- /dev/null
+++ b/intern-log/android/gradle.properties
@@ -0,0 +1,22 @@
+# 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.
+org.gradle.jvmargs=-Xmx1536m
+
+# 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
diff --git a/intern-log/android/gradle/wrapper/gradle-wrapper.jar b/intern-log/android/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..033e24c
Binary files /dev/null and b/intern-log/android/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/intern-log/android/gradle/wrapper/gradle-wrapper.properties b/intern-log/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..c747538
--- /dev/null
+++ b/intern-log/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,7 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
+networkTimeout=10000
+validateDistributionUrl=true
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/intern-log/android/gradlew b/intern-log/android/gradlew
new file mode 100644
index 0000000..fcb6fca
--- /dev/null
+++ b/intern-log/android/gradlew
@@ -0,0 +1,248 @@
+#!/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##*/}
+APP_HOME=$( cd "${APP_HOME:-./}" && 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/intern-log/android/gradlew.bat b/intern-log/android/gradlew.bat
new file mode 100644
index 0000000..93e3f59
--- /dev/null
+++ b/intern-log/android/gradlew.bat
@@ -0,0 +1,92 @@
+@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/intern-log/android/settings.gradle b/intern-log/android/settings.gradle
new file mode 100644
index 0000000..3b4431d
--- /dev/null
+++ b/intern-log/android/settings.gradle
@@ -0,0 +1,5 @@
+include ':app'
+include ':capacitor-cordova-android-plugins'
+project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/')
+
+apply from: 'capacitor.settings.gradle'
\ No newline at end of file
diff --git a/intern-log/android/variables.gradle b/intern-log/android/variables.gradle
new file mode 100644
index 0000000..8ef305d
--- /dev/null
+++ b/intern-log/android/variables.gradle
@@ -0,0 +1,16 @@
+ext {
+ minSdkVersion = 22
+ compileSdkVersion = 34
+ targetSdkVersion = 34
+ androidxActivityVersion = '1.8.0'
+ androidxAppCompatVersion = '1.6.1'
+ androidxCoordinatorLayoutVersion = '1.2.0'
+ androidxCoreVersion = '1.12.0'
+ androidxFragmentVersion = '1.6.2'
+ coreSplashScreenVersion = '1.0.1'
+ androidxWebkitVersion = '1.9.0'
+ junitVersion = '4.13.2'
+ androidxJunitVersion = '1.1.5'
+ androidxEspressoCoreVersion = '3.5.1'
+ cordovaAndroidVersion = '10.1.1'
+}
\ No newline at end of file
diff --git a/intern-log/capacitor.config.json b/intern-log/capacitor.config.json
new file mode 100644
index 0000000..ed28c67
--- /dev/null
+++ b/intern-log/capacitor.config.json
@@ -0,0 +1,8 @@
+{
+ "appId": "cn.linyux.internlog",
+ "appName": "实习工作日志",
+ "webDir": "dist",
+ "server": {
+ "androidScheme": "https"
+ }
+}
diff --git a/intern-log/index.html b/intern-log/index.html
index 3c070b2..4e8c293 100644
--- a/intern-log/index.html
+++ b/intern-log/index.html
@@ -2,7 +2,7 @@
-
+
diff --git a/intern-log/package.json b/intern-log/package.json
index 1b9b5fc..e8b32f0 100644
--- a/intern-log/package.json
+++ b/intern-log/package.json
@@ -8,18 +8,22 @@
"build": "vite build",
"preview": "vite preview",
"electron": "electron electron/main.cjs",
- "dist": "vite build && electron-builder"
+ "dist": "vite build && electron-builder",
+ "cap:sync": "vite build && npx cap sync android"
},
"dependencies": {
"dexie": "^4.0.8",
- "vue": "^3.5.13"
+ "vue": "^3.5.13",
+ "@capacitor/core": "^6.2.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.1",
"typescript": "~5.6.3",
"vite": "^5.4.11",
"electron": "^33.2.0",
- "electron-builder": "^25.1.8"
+ "electron-builder": "^25.1.8",
+ "@capacitor/cli": "^6.2.0",
+ "@capacitor/android": "^6.2.0"
},
"description": "实习工作日志:打卡、记录、备忘录与密码库",
"main": "electron/main.cjs",
diff --git a/intern-log/pnpm-lock.yaml b/intern-log/pnpm-lock.yaml
index 0f96e5e..b887dda 100644
--- a/intern-log/pnpm-lock.yaml
+++ b/intern-log/pnpm-lock.yaml
@@ -8,6 +8,9 @@ importers:
.:
dependencies:
+ '@capacitor/core':
+ specifier: ^6.2.0
+ version: 6.2.2
dexie:
specifier: ^4.0.8
version: 4.4.6
@@ -15,6 +18,12 @@ importers:
specifier: ^3.5.13
version: 3.5.44(typescript@5.6.3)
devDependencies:
+ '@capacitor/android':
+ specifier: ^6.2.0
+ version: 6.2.2(@capacitor/core@6.2.2)
+ '@capacitor/cli':
+ specifier: ^6.2.0
+ version: 6.2.2(supports-color@7.2.0)
'@vitejs/plugin-vue':
specifier: ^5.2.1
version: 5.2.4(vite@5.4.21(@types/node@26.6.5))(vue@3.5.44(typescript@5.6.3))
@@ -53,6 +62,19 @@ packages:
resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==}
engines: {node: '>=6.9.0'}
+ '@capacitor/android@6.2.2':
+ resolution: {integrity: sha512-JjIu1ryNE16PQTp51rb4NEygxP7cSCDMmUqx4f5f12xscKdGKTjO9bkEP3TroLnTa/J6p2QopIhRbrd3E/7DrA==}
+ peerDependencies:
+ '@capacitor/core': ^6.2.0
+
+ '@capacitor/cli@6.2.2':
+ resolution: {integrity: sha512-5wEYSHBzRKJKZnhD2sVJAP0t0kUT7o2/vlgEGzFE3t2w+inL9qMDN7zxg6pvqveJiPNZT2k93ZvJDdRKIn/w1w==}
+ engines: {node: '>=18.0.0'}
+ hasBin: true
+
+ '@capacitor/core@6.2.2':
+ resolution: {integrity: sha512-qEI3DcwJEPzhW+hVGKH8m4jbujtkdUiGkpMLHmpR8epACU7wEsV6NF8pCHzpsMYjc80oK7Cmpcw+MIienv/YRw==}
+
'@develar/schema-utils@2.6.5':
resolution: {integrity: sha512-0cp4PsWQ/9avqTVMCtZ+GirikIA36ikvjtHweU4/j8yLtgObI0+JUPhYFScgwlteveGB1rt3Cm8UhN04XayDig==}
engines: {node: '>= 8.9.0'}
@@ -225,6 +247,46 @@ packages:
'@gar/promisify@1.1.3':
resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==}
+ '@ionic/cli-framework-output@2.2.8':
+ resolution: {integrity: sha512-TshtaFQsovB4NWRBydbNFawql6yul7d5bMiW1WYYf17hd99V6xdDdk3vtF51bw6sLkxON3bDQpWsnUc9/hVo3g==}
+ engines: {node: '>=16.0.0'}
+
+ '@ionic/utils-array@2.1.5':
+ resolution: {integrity: sha512-HD72a71IQVBmQckDwmA8RxNVMTbxnaLbgFOl+dO5tbvW9CkkSFCv41h6fUuNsSEVgngfkn0i98HDuZC8mk+lTA==}
+ engines: {node: '>=10.3.0'}
+
+ '@ionic/utils-fs@3.1.6':
+ resolution: {integrity: sha512-eikrNkK89CfGPmexjTfSWl4EYqsPSBh0Ka7by4F0PLc1hJZYtJxUZV3X4r5ecA8ikjicUmcbU7zJmAjmqutG/w==}
+ engines: {node: '>=10.3.0'}
+
+ '@ionic/utils-fs@3.1.7':
+ resolution: {integrity: sha512-2EknRvMVfhnyhL1VhFkSLa5gOcycK91VnjfrTB0kbqkTFCOXyXgVLI5whzq7SLrgD9t1aqos3lMMQyVzaQ5gVA==}
+ engines: {node: '>=16.0.0'}
+
+ '@ionic/utils-object@2.1.5':
+ resolution: {integrity: sha512-XnYNSwfewUqxq+yjER1hxTKggftpNjFLJH0s37jcrNDwbzmbpFTQTVAp4ikNK4rd9DOebX/jbeZb8jfD86IYxw==}
+ engines: {node: '>=10.3.0'}
+
+ '@ionic/utils-process@2.1.10':
+ resolution: {integrity: sha512-mZ7JEowcuGQK+SKsJXi0liYTcXd2bNMR3nE0CyTROpMECUpJeAvvaBaPGZf5ERQUPeWBVuwqAqjUmIdxhz5bxw==}
+ engines: {node: '>=10.3.0'}
+
+ '@ionic/utils-stream@3.1.5':
+ resolution: {integrity: sha512-hkm46uHvEC05X/8PHgdJi4l4zv9VQDELZTM+Kz69odtO9zZYfnt8DkfXHJqJ+PxmtiE5mk/ehJWLnn/XAczTUw==}
+ engines: {node: '>=10.3.0'}
+
+ '@ionic/utils-subprocess@2.1.11':
+ resolution: {integrity: sha512-6zCDixNmZCbMCy5np8klSxOZF85kuDyzZSTTQKQP90ZtYNCcPYmuFSzaqDwApJT4r5L3MY3JrqK1gLkc6xiUPw==}
+ engines: {node: '>=10.3.0'}
+
+ '@ionic/utils-terminal@2.3.3':
+ resolution: {integrity: sha512-RnuSfNZ5fLEyX3R5mtcMY97cGD1A0NVBbarsSQ6yMMfRJ5YHU7hHVyUfvZeClbqkBC/pAqI/rYJuXKCT9YeMCQ==}
+ engines: {node: '>=10.3.0'}
+
+ '@ionic/utils-terminal@2.3.5':
+ resolution: {integrity: sha512-3cKScz9Jx2/Pr9ijj1OzGlBDfcmx7OMVBt4+P1uRR0SSW4cm1/y3Mo4OY3lfkuaYifMNBW8Wz6lQHbs1bihr7A==}
+ engines: {node: '>=16.0.0'}
+
'@isaacs/cliui@8.0.2':
resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
engines: {node: '>=12'}
@@ -419,6 +481,9 @@ packages:
'@types/estree@1.0.9':
resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==}
+ '@types/fs-extra@8.1.5':
+ resolution: {integrity: sha512-0dzKcwO+S8s2kuF5Z9oUWatQJj5Uq/iqphEtE3GQJVRRYm/tD1LglU2UnXi2A8jLq5umkGouOXOR9y0n613ZwQ==}
+
'@types/fs-extra@9.0.13':
resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==}
@@ -443,6 +508,9 @@ packages:
'@types/responselike@1.0.3':
resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==}
+ '@types/slice-ansi@4.0.0':
+ resolution: {integrity: sha512-+OpjSaq85gvlZAYINyzKpLeiFkSC4EsC6IIiT6v6TLSU5k5U83fHGj9Lel8oKEXM0HqgrMVCjXPDPVICtxF7EQ==}
+
'@types/verror@1.10.11':
resolution: {integrity: sha512-RlDm9K7+o5stv0Co8i8ZRGxDbrTxhJtgjqjFyVh/tXQyl/rYtTKlnTvZ88oSTeYREWurwx20Js4kTuKCsFkUtg==}
@@ -595,6 +663,10 @@ packages:
base64-js@1.5.1:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
+ big-integer@1.6.52:
+ resolution: {integrity: sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==}
+ engines: {node: '>=0.6'}
+
bl@4.1.0:
resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==}
@@ -608,6 +680,10 @@ packages:
resolution: {integrity: sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==}
deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
+ bplist-parser@0.3.2:
+ resolution: {integrity: sha512-apC2+fspHGI3mMKj+dGevkGo/tCqVB8jMb6i+OX+E29p0Iposz07fABkRIfVUPNd5A5VbuOz1bZbnmkKLYF+wQ==}
+ engines: {node: '>= 5.10.0'}
+
brace-expansion@1.1.21:
resolution: {integrity: sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==}
@@ -711,6 +787,10 @@ packages:
resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==}
engines: {node: '>= 6'}
+ commander@9.5.0:
+ resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==}
+ engines: {node: ^12.20.0 || >=14}
+
compare-version@0.1.2:
resolution: {integrity: sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A==}
engines: {node: '>=0.10.0'}
@@ -777,6 +857,10 @@ packages:
resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==}
engines: {node: '>= 0.4'}
+ define-lazy-prop@2.0.0:
+ resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==}
+ engines: {node: '>=8'}
+
define-properties@1.2.1:
resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==}
engines: {node: '>= 0.4'}
@@ -846,6 +930,10 @@ packages:
engines: {node: '>= 12.20.55'}
hasBin: true
+ elementtree@0.1.7:
+ resolution: {integrity: sha512-wkgGT6kugeQk/P6VZ/f4T+4HB41BVgNBq5CDIZVbQ02nvTVqAiVTbskxxu3eA/X96lMlfYOwnLQpN2v5E1zDEg==}
+ engines: {node: '>= 0.4.0'}
+
emoji-regex@8.0.0:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
@@ -1005,6 +1093,11 @@ packages:
engines: {node: '>=12'}
deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
+ glob@9.3.5:
+ resolution: {integrity: sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==}
+ engines: {node: '>=16 || 14 >=14.17'}
+ deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
+
global-agent@3.0.0:
resolution: {integrity: sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==}
engines: {node: '>=10.0'}
@@ -1106,6 +1199,10 @@ packages:
inherits@2.0.4:
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
+ ini@4.1.3:
+ resolution: {integrity: sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==}
+ engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
+
ip-address@10.7.4:
resolution: {integrity: sha512-DWBMKyeM25D70nrIiTkgQth59/G+naKOTep6huF9j+GmeK3DMD60Zvxg5d5qQnz+38AHgou6ean2LECX+lrKDg==}
engines: {node: '>= 12'}
@@ -1114,6 +1211,11 @@ packages:
resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==}
hasBin: true
+ is-docker@2.2.1:
+ resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==}
+ engines: {node: '>=8'}
+ hasBin: true
+
is-fullwidth-code-point@3.0.0:
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
engines: {node: '>=8'}
@@ -1129,6 +1231,10 @@ packages:
resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==}
engines: {node: '>=10'}
+ is-wsl@2.2.0:
+ resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==}
+ engines: {node: '>=8'}
+
isarray@1.0.0:
resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==}
@@ -1178,6 +1284,14 @@ packages:
keyv@4.5.4:
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
+ kleur@3.0.3:
+ resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==}
+ engines: {node: '>=6'}
+
+ kleur@4.1.5:
+ resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
+ engines: {node: '>=6'}
+
lazy-val@1.0.5:
resolution: {integrity: sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==}
@@ -1273,6 +1387,10 @@ packages:
resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==}
engines: {node: '>=10'}
+ minimatch@8.0.7:
+ resolution: {integrity: sha512-V+1uQNdzybxa14e/p00HZnQNNcTjnRJjDxg2V8wtkjFctq4M7hXFws4oekyTP0Jebeq7QYtpFyOeBAjc88zvYg==}
+ engines: {node: '>=16 || 14 >=14.17'}
+
minimatch@9.0.9:
resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==}
engines: {node: '>=16 || 14 >=14.17'}
@@ -1304,6 +1422,10 @@ packages:
resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==}
engines: {node: '>=8'}
+ minipass@4.2.8:
+ resolution: {integrity: sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==}
+ engines: {node: '>=8'}
+
minipass@5.0.0:
resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==}
engines: {node: '>=8'}
@@ -1329,6 +1451,11 @@ packages:
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
+ native-run@2.0.3:
+ resolution: {integrity: sha512-U1PllBuzW5d1gfan+88L+Hky2eZx+9gv3Pf6rNBxKbORxi7boHzqiA6QFGSnqMem4j0A9tZ08NMIs5+0m/VS1Q==}
+ engines: {node: '>=16.0.0'}
+ hasBin: true
+
negotiator@0.6.4:
resolution: {integrity: sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==}
engines: {node: '>= 0.6'}
@@ -1377,6 +1504,10 @@ packages:
resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==}
engines: {node: '>=6'}
+ open@8.4.2:
+ resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==}
+ engines: {node: '>=12'}
+
ora@5.4.1:
resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==}
engines: {node: '>=10'}
@@ -1445,6 +1576,10 @@ packages:
resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==}
engines: {node: '>=10'}
+ prompts@2.4.2:
+ resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==}
+ engines: {node: '>= 6'}
+
pump@3.0.4:
resolution: {integrity: sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==}
@@ -1497,6 +1632,11 @@ packages:
deprecated: Rimraf versions prior to v4 are no longer supported
hasBin: true
+ rimraf@4.4.1:
+ resolution: {integrity: sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==}
+ engines: {node: '>=14'}
+ hasBin: true
+
roarr@2.15.4:
resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==}
engines: {node: '>=8.0'}
@@ -1518,6 +1658,9 @@ packages:
sanitize-filename@1.6.4:
resolution: {integrity: sha512-9ZyI08PsvdQl2r/bBIGubpVdR3RR9sY6RDiWFPreA21C/EFlQhmgo20UZlNjZMMZNubusLhAQozkA0Od5J21Eg==}
+ sax@1.1.4:
+ resolution: {integrity: sha512-5f3k2PbGGp+YtKJjOItpg3P99IMD84E4HOvcfleTb5joCHNXYLsR9yWFPOYGgaeMPDubQILTCMdsFb2OMeOjtg==}
+
sax@1.6.1:
resolution: {integrity: sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q==}
engines: {node: '>=11.0.0'}
@@ -1560,10 +1703,17 @@ packages:
resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==}
engines: {node: '>=10'}
+ sisteransi@1.0.5:
+ resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}
+
slice-ansi@3.0.0:
resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==}
engines: {node: '>=8'}
+ slice-ansi@4.0.0:
+ resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==}
+ engines: {node: '>=10'}
+
smart-buffer@4.2.0:
resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==}
engines: {node: '>= 6.0.0', npm: '>= 3.0.0'}
@@ -1587,6 +1737,10 @@ packages:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
engines: {node: '>=0.10.0'}
+ split2@4.2.0:
+ resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==}
+ engines: {node: '>= 10.x'}
+
sprintf-js@1.1.3:
resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==}
@@ -1640,6 +1794,9 @@ packages:
temp-file@3.4.0:
resolution: {integrity: sha512-C5tjlC/HCtVUOi3KWVokd4vHVViOmGjtLwIh4MuzPo/nMYTV/p1urt3RnMz2IWXDdKEGJH3k5+KPxtqRsUYGtg==}
+ through2@4.0.2:
+ resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==}
+
tmp-promise@3.0.3:
resolution: {integrity: sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==}
@@ -1647,9 +1804,16 @@ packages:
resolution: {integrity: sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw==}
engines: {node: '>=14.14'}
+ tree-kill@1.2.2:
+ resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==}
+ hasBin: true
+
truncate-utf8-bytes@1.0.2:
resolution: {integrity: sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==}
+ tslib@2.8.1:
+ resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
+
type-fest@0.13.1:
resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==}
engines: {node: '>=10'}
@@ -1681,6 +1845,10 @@ packages:
resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==}
engines: {node: '>= 10.0.0'}
+ untildify@4.0.0:
+ resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==}
+ engines: {node: '>=8'}
+
uri-js@4.4.1:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
@@ -1755,6 +1923,14 @@ packages:
wrappy@1.0.2:
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
+ xml2js@0.5.0:
+ resolution: {integrity: sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==}
+ engines: {node: '>=4.0.0'}
+
+ xmlbuilder@11.0.1:
+ resolution: {integrity: sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==}
+ engines: {node: '>=4.0'}
+
xmlbuilder@15.1.1:
resolution: {integrity: sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==}
engines: {node: '>=8.0'}
@@ -1802,6 +1978,36 @@ snapshots:
'@babel/helper-string-parser': 7.29.7
'@babel/helper-validator-identifier': 7.29.7
+ '@capacitor/android@6.2.2(@capacitor/core@6.2.2)':
+ dependencies:
+ '@capacitor/core': 6.2.2
+
+ '@capacitor/cli@6.2.2(supports-color@7.2.0)':
+ dependencies:
+ '@ionic/cli-framework-output': 2.2.8(supports-color@7.2.0)
+ '@ionic/utils-fs': 3.1.7(supports-color@7.2.0)
+ '@ionic/utils-subprocess': 2.1.11(supports-color@7.2.0)
+ '@ionic/utils-terminal': 2.3.5(supports-color@7.2.0)
+ commander: 9.5.0
+ debug: 4.4.3(supports-color@7.2.0)
+ env-paths: 2.2.1
+ kleur: 4.1.5
+ native-run: 2.0.3(supports-color@7.2.0)
+ open: 8.4.2
+ plist: 3.1.1
+ prompts: 2.4.2
+ rimraf: 4.4.1
+ semver: 7.8.5
+ tar: 6.2.1
+ tslib: 2.8.1
+ xml2js: 0.5.0
+ transitivePeerDependencies:
+ - supports-color
+
+ '@capacitor/core@6.2.2':
+ dependencies:
+ tslib: 2.8.1
+
'@develar/schema-utils@2.6.5':
dependencies:
ajv: 6.15.0
@@ -1949,6 +2155,105 @@ snapshots:
'@gar/promisify@1.1.3': {}
+ '@ionic/cli-framework-output@2.2.8(supports-color@7.2.0)':
+ dependencies:
+ '@ionic/utils-terminal': 2.3.5(supports-color@7.2.0)
+ debug: 4.4.3(supports-color@7.2.0)
+ tslib: 2.8.1
+ transitivePeerDependencies:
+ - supports-color
+
+ '@ionic/utils-array@2.1.5(supports-color@7.2.0)':
+ dependencies:
+ debug: 4.4.3(supports-color@7.2.0)
+ tslib: 2.8.1
+ transitivePeerDependencies:
+ - supports-color
+
+ '@ionic/utils-fs@3.1.6(supports-color@7.2.0)':
+ dependencies:
+ '@types/fs-extra': 8.1.5
+ debug: 4.4.3(supports-color@7.2.0)
+ fs-extra: 9.1.0
+ tslib: 2.8.1
+ transitivePeerDependencies:
+ - supports-color
+
+ '@ionic/utils-fs@3.1.7(supports-color@7.2.0)':
+ dependencies:
+ '@types/fs-extra': 8.1.5
+ debug: 4.4.3(supports-color@7.2.0)
+ fs-extra: 9.1.0
+ tslib: 2.8.1
+ transitivePeerDependencies:
+ - supports-color
+
+ '@ionic/utils-object@2.1.5(supports-color@7.2.0)':
+ dependencies:
+ debug: 4.4.3(supports-color@7.2.0)
+ tslib: 2.8.1
+ transitivePeerDependencies:
+ - supports-color
+
+ '@ionic/utils-process@2.1.10(supports-color@7.2.0)':
+ dependencies:
+ '@ionic/utils-object': 2.1.5(supports-color@7.2.0)
+ '@ionic/utils-terminal': 2.3.3(supports-color@7.2.0)
+ debug: 4.4.3(supports-color@7.2.0)
+ signal-exit: 3.0.7
+ tree-kill: 1.2.2
+ tslib: 2.8.1
+ transitivePeerDependencies:
+ - supports-color
+
+ '@ionic/utils-stream@3.1.5(supports-color@7.2.0)':
+ dependencies:
+ debug: 4.4.3(supports-color@7.2.0)
+ tslib: 2.8.1
+ transitivePeerDependencies:
+ - supports-color
+
+ '@ionic/utils-subprocess@2.1.11(supports-color@7.2.0)':
+ dependencies:
+ '@ionic/utils-array': 2.1.5(supports-color@7.2.0)
+ '@ionic/utils-fs': 3.1.6(supports-color@7.2.0)
+ '@ionic/utils-process': 2.1.10(supports-color@7.2.0)
+ '@ionic/utils-stream': 3.1.5(supports-color@7.2.0)
+ '@ionic/utils-terminal': 2.3.3(supports-color@7.2.0)
+ cross-spawn: 7.0.6
+ debug: 4.4.3(supports-color@7.2.0)
+ tslib: 2.8.1
+ transitivePeerDependencies:
+ - supports-color
+
+ '@ionic/utils-terminal@2.3.3(supports-color@7.2.0)':
+ dependencies:
+ '@types/slice-ansi': 4.0.0
+ debug: 4.4.3(supports-color@7.2.0)
+ signal-exit: 3.0.7
+ slice-ansi: 4.0.0
+ string-width: 4.2.3
+ strip-ansi: 6.0.1
+ tslib: 2.8.1
+ untildify: 4.0.0
+ wrap-ansi: 7.0.0
+ transitivePeerDependencies:
+ - supports-color
+
+ '@ionic/utils-terminal@2.3.5(supports-color@7.2.0)':
+ dependencies:
+ '@types/slice-ansi': 4.0.0
+ debug: 4.4.3(supports-color@7.2.0)
+ signal-exit: 3.0.7
+ slice-ansi: 4.0.0
+ string-width: 4.2.3
+ strip-ansi: 6.0.1
+ tslib: 2.8.1
+ untildify: 4.0.0
+ wrap-ansi: 7.0.0
+ transitivePeerDependencies:
+ - supports-color
+
'@isaacs/cliui@8.0.2':
dependencies:
string-width: 5.1.2
@@ -2076,7 +2381,7 @@ snapshots:
dependencies:
'@types/http-cache-semantics': 4.2.0
'@types/keyv': 3.1.4
- '@types/node': 20.19.43
+ '@types/node': 26.6.5
'@types/responselike': 1.0.3
'@types/debug@4.1.13':
@@ -2085,6 +2390,10 @@ snapshots:
'@types/estree@1.0.9': {}
+ '@types/fs-extra@8.1.5':
+ dependencies:
+ '@types/node': 26.6.5
+
'@types/fs-extra@9.0.13':
dependencies:
'@types/node': 26.6.5
@@ -2093,7 +2402,7 @@ snapshots:
'@types/keyv@3.1.4':
dependencies:
- '@types/node': 20.19.43
+ '@types/node': 26.6.5
'@types/ms@2.1.0': {}
@@ -2113,7 +2422,9 @@ snapshots:
'@types/responselike@1.0.3':
dependencies:
- '@types/node': 20.19.43
+ '@types/node': 26.6.5
+
+ '@types/slice-ansi@4.0.0': {}
'@types/verror@1.10.11':
optional: true
@@ -2314,8 +2625,7 @@ snapshots:
assert-plus@1.0.0:
optional: true
- astral-regex@2.0.0:
- optional: true
+ astral-regex@2.0.0: {}
async-exit-hook@2.0.1: {}
@@ -2331,6 +2641,8 @@ snapshots:
base64-js@1.5.1: {}
+ big-integer@1.6.52: {}
+
bl@4.1.0:
dependencies:
buffer: 5.7.1
@@ -2346,6 +2658,10 @@ snapshots:
boolean@3.2.0:
optional: true
+ bplist-parser@0.3.2:
+ dependencies:
+ big-integer: 1.6.52
+
brace-expansion@1.1.21:
dependencies:
balanced-match: 1.0.2
@@ -2487,6 +2803,8 @@ snapshots:
commander@5.1.0: {}
+ commander@9.5.0: {}
+
compare-version@0.1.2: {}
compress-commons@4.1.2:
@@ -2553,6 +2871,8 @@ snapshots:
gopd: 1.2.0
optional: true
+ define-lazy-prop@2.0.0: {}
+
define-properties@1.2.1:
dependencies:
define-data-property: 1.1.4
@@ -2669,6 +2989,10 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ elementtree@0.1.7:
+ dependencies:
+ sax: 1.1.4
+
emoji-regex@8.0.0: {}
emoji-regex@9.2.2: {}
@@ -2878,6 +3202,13 @@ snapshots:
minimatch: 5.1.9
once: 1.4.0
+ glob@9.3.5:
+ dependencies:
+ fs.realpath: 1.0.0
+ minimatch: 8.0.7
+ minipass: 4.2.8
+ path-scurry: 1.11.1
+
global-agent@3.0.0:
dependencies:
boolean: 3.2.0
@@ -3000,12 +3331,16 @@ snapshots:
inherits@2.0.4: {}
+ ini@4.1.3: {}
+
ip-address@10.7.4: {}
is-ci@3.0.1:
dependencies:
ci-info: 3.9.0
+ is-docker@2.2.1: {}
+
is-fullwidth-code-point@3.0.0: {}
is-interactive@1.0.0: {}
@@ -3014,6 +3349,10 @@ snapshots:
is-unicode-supported@0.1.0: {}
+ is-wsl@2.2.0:
+ dependencies:
+ is-docker: 2.2.1
+
isarray@1.0.0: {}
isbinaryfile@4.0.10: {}
@@ -3061,6 +3400,10 @@ snapshots:
dependencies:
json-buffer: 3.0.1
+ kleur@3.0.3: {}
+
+ kleur@4.1.5: {}
+
lazy-val@1.0.5: {}
lazystream@1.0.1:
@@ -3153,6 +3496,10 @@ snapshots:
dependencies:
brace-expansion: 2.1.7
+ minimatch@8.0.7:
+ dependencies:
+ brace-expansion: 2.1.7
+
minimatch@9.0.9:
dependencies:
brace-expansion: 2.1.7
@@ -3187,6 +3534,8 @@ snapshots:
dependencies:
yallist: 4.0.0
+ minipass@4.2.8: {}
+
minipass@5.0.0: {}
minipass@7.1.3: {}
@@ -3202,6 +3551,22 @@ snapshots:
nanoid@3.3.20: {}
+ native-run@2.0.3(supports-color@7.2.0):
+ dependencies:
+ '@ionic/utils-fs': 3.1.7(supports-color@7.2.0)
+ '@ionic/utils-terminal': 2.3.5(supports-color@7.2.0)
+ bplist-parser: 0.3.2
+ debug: 4.4.3(supports-color@7.2.0)
+ elementtree: 0.1.7
+ ini: 4.1.3
+ plist: 3.1.1
+ split2: 4.2.0
+ through2: 4.0.2
+ tslib: 2.8.1
+ yauzl: 2.10.0
+ transitivePeerDependencies:
+ - supports-color
+
negotiator@0.6.4: {}
node-abi@3.98.0:
@@ -3258,6 +3623,12 @@ snapshots:
dependencies:
mimic-fn: 2.1.0
+ open@8.4.2:
+ dependencies:
+ define-lazy-prop: 2.0.0
+ is-docker: 2.2.1
+ is-wsl: 2.2.0
+
ora@5.4.1:
dependencies:
bl: 4.1.0
@@ -3322,6 +3693,11 @@ snapshots:
err-code: 2.0.3
retry: 0.12.0
+ prompts@2.4.2:
+ dependencies:
+ kleur: 3.0.3
+ sisteransi: 1.0.5
+
pump@3.0.4:
dependencies:
end-of-stream: 1.4.5
@@ -3380,6 +3756,10 @@ snapshots:
dependencies:
glob: 7.2.3
+ rimraf@4.4.1:
+ dependencies:
+ glob: 9.3.5
+
roarr@2.15.4:
dependencies:
boolean: 3.2.0
@@ -3432,6 +3812,8 @@ snapshots:
dependencies:
truncate-utf8-bytes: 1.0.2
+ sax@1.1.4: {}
+
sax@1.6.1: {}
semver-compare@1.0.0:
@@ -3462,6 +3844,8 @@ snapshots:
dependencies:
semver: 7.8.5
+ sisteransi@1.0.5: {}
+
slice-ansi@3.0.0:
dependencies:
ansi-styles: 4.3.0
@@ -3469,6 +3853,12 @@ snapshots:
is-fullwidth-code-point: 3.0.0
optional: true
+ slice-ansi@4.0.0:
+ dependencies:
+ ansi-styles: 4.3.0
+ astral-regex: 2.0.0
+ is-fullwidth-code-point: 3.0.0
+
smart-buffer@4.2.0: {}
socks-proxy-agent@7.0.0(supports-color@7.2.0):
@@ -3493,6 +3883,8 @@ snapshots:
source-map@0.6.1: {}
+ split2@4.2.0: {}
+
sprintf-js@1.1.3:
optional: true
@@ -3562,16 +3954,24 @@ snapshots:
async-exit-hook: 2.0.1
fs-extra: 10.1.0
+ through2@4.0.2:
+ dependencies:
+ readable-stream: 3.6.2
+
tmp-promise@3.0.3:
dependencies:
tmp: 0.2.7
tmp@0.2.7: {}
+ tree-kill@1.2.2: {}
+
truncate-utf8-bytes@1.0.2:
dependencies:
utf8-byte-length: 1.0.5
+ tslib@2.8.1: {}
+
type-fest@0.13.1:
optional: true
@@ -3593,6 +3993,8 @@ snapshots:
universalify@2.0.1: {}
+ untildify@4.0.0: {}
+
uri-js@4.4.1:
dependencies:
punycode: 2.3.1
@@ -3653,6 +4055,13 @@ snapshots:
wrappy@1.0.2: {}
+ xml2js@0.5.0:
+ dependencies:
+ sax: 1.6.1
+ xmlbuilder: 11.0.1
+
+ xmlbuilder@11.0.1: {}
+
xmlbuilder@15.1.1: {}
y18n@5.0.8: {}
diff --git a/intern-log/src/App.vue b/intern-log/src/App.vue
index 97a21c4..70e0ee9 100644
--- a/intern-log/src/App.vue
+++ b/intern-log/src/App.vue
@@ -11,6 +11,8 @@ import VaultView from './views/VaultView.vue'
import SettingsView from './views/SettingsView.vue'
import LoginView from './views/LoginView.vue'
import { getSession, logoutUser, openUserDatabase, type Session } from './db/auth'
+import { getSetting, } from './db/repo'
+import { isSyncConfigured, runSync } from './sync/engine'
import { clockIn, getAttendance, getWorkRule, getWeeklyNote, searchLogItems, searchMemos, smartClockOut, type WorkRule } from './db/repo'
import { addDays, hhmm, todayStr, weekStart } from './lib/date'
import { useToasts } from './lib/toast'
@@ -39,6 +41,7 @@ async function onLogin(s: Session) {
armSessionTimer()
await refreshClock()
await refreshTip()
+ startSyncTimer()
showToast('欢迎,' + s.username)
const mt = sessionStorage.getItem('dsh_migrate_toast')
if (mt) {
@@ -54,6 +57,33 @@ async function doLogout(auto: boolean) {
showToast(auto ? '长时间未操作已自动退出' : '已退出登录')
}
+// ---- 自动同步:登录后与每 5 分钟,静默执行 ----
+let syncTimer: number | null = null
+let lastSyncToast = 0
+async function maybeAutoSync() {
+ if (!session.value) return
+ try {
+ if (!(await isSyncConfigured())) return
+ const result = await runSync({
+ baseUrl: await getSetting('sync_base_url', ''),
+ username: await getSetting('sync_username', ''),
+ password: await getSetting('sync_password', '')
+ })
+ if (result.pushed || result.pulled || result.removed) showToast('云同步完成:推送 ' + result.pushed + ' · 拉取 ' + result.pulled)
+ } catch (e) {
+ const now = Date.now()
+ if (now - lastSyncToast > 10 * 60 * 1000) {
+ lastSyncToast = now
+ showToast(e instanceof Error ? e.message : '自动同步失败')
+ }
+ }
+}
+function startSyncTimer() {
+ if (syncTimer !== null) window.clearInterval(syncTimer)
+ syncTimer = window.setInterval(() => { maybeAutoSync() }, 5 * 60 * 1000)
+ maybeAutoSync()
+}
+
// ---- 全局搜索 ----
const gsInput = ref(null)
const searchQ = ref('')
@@ -188,6 +218,7 @@ onMounted(async () => {
armSessionTimer()
await refreshClock()
await refreshTip()
+ startSyncTimer()
}
})
diff --git a/intern-log/src/db/schema.ts b/intern-log/src/db/schema.ts
index d45ef38..6970895 100644
--- a/intern-log/src/db/schema.ts
+++ b/intern-log/src/db/schema.ts
@@ -78,6 +78,22 @@ export interface Transaction {
created_at: string
}
+// 同步镜像:记录上次同步时每条数据的哈希,用于增量差异检测
+export interface SyncMirror {
+ id?: number
+ table: string
+ uuid: string
+ hash: string
+}
+
+// 删除墓碑:同步时告知其他端该记录已删除
+export interface SyncTombstone {
+ id?: number
+ table: string
+ uuid: string
+ deleted_at: string
+}
+
export class WorklogDB extends Dexie {
project!: Table
work_log!: Table
@@ -88,6 +104,8 @@ export class WorklogDB extends Dexie {
memo!: Table
credential!: Table
transaction!: Table
+ sync_mirror!: Table
+ tombstone!: Table
constructor(dbName = 'intern_worklog') {
super(dbName)
@@ -106,6 +124,10 @@ export class WorklogDB extends Dexie {
this.version(3).stores({
transaction: '++id, date, type, category'
})
+ this.version(4).stores({
+ sync_mirror: '++id, table, uuid',
+ tombstone: '++id, table, uuid, deleted_at'
+ })
}
}
@@ -121,7 +143,7 @@ export function unbindDatabase(): void {
db = undefined
}
-export const SCHEMA_VERSION = 3
+export const SCHEMA_VERSION = 4
export const EXPENSE_CATEGORIES: string[] = ['餐饮', '交通', '住房', '通讯', '学习', '娱乐', '其他']
export const INCOME_CATEGORIES: string[] = ['工资', '报销', '其他']
diff --git a/intern-log/src/styles/tokens.css b/intern-log/src/styles/tokens.css
index 997dffe..d048fe9 100644
--- a/intern-log/src/styles/tokens.css
+++ b/intern-log/src/styles/tokens.css
@@ -110,7 +110,13 @@ button, input, select, textarea { font: inherit; color: inherit; }
.dot.normal { background: var(--ok); }
.dot.late, .dot.early, .dot.incomplete { background: var(--warn); }
.dot.absent { background: var(--danger); }
-.dot.none { background: var(--dot-empty); }
+.dot.none, .dot.leave { background: var(--dot-empty); }
+
+/* 移动端:避免 iOS 聚焦缩放,输入字号提到 16px */
+@media (max-width: 720px) {
+ input, select, textarea { font-size: 16px !important; }
+ input[type="checkbox"] { font-size: initial; }
+}
.dot.rest { background: var(--border); }
.icon { display: inline-flex; align-items: center; justify-content: center; flex: none; }
diff --git a/intern-log/src/sync/engine.ts b/intern-log/src/sync/engine.ts
new file mode 100644
index 0000000..6708044
--- /dev/null
+++ b/intern-log/src/sync/engine.ts
@@ -0,0 +1,205 @@
+// 多端同步引擎:全量差异对比 + 记录级新者胜 + 软删除墓碑
+import { db } from '../db/schema'
+import { getSetting, setSetting } from '../db/repo'
+import { nowLocalISO } from '../lib/date'
+
+const TABLES = ['project', 'work_log', 'log_item', 'attendance', 'weekly_note', 'setting', 'memo', 'credential', 'transaction']
+
+// 本地敏感或临时性的设置不参与同步
+const EXCLUDE_SETTING_KEYS = new Set(['sync_cursor', 'sync_last_time', 'last_project', 'last_category'])
+
+export const SYNC_TABLES = TABLES
+
+interface AnyRow { [key: string]: any }
+
+function newUuid(): string {
+ if (typeof crypto !== 'undefined' && crypto.randomUUID) return crypto.randomUUID()
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
+ const r = (Math.random() * 16) | 0
+ return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16)
+ })
+}
+
+function stripId(row: AnyRow): AnyRow {
+ const copy: AnyRow = { ...row }
+ delete copy.id
+ return copy
+}
+
+function rowHash(row: AnyRow): string {
+ return JSON.stringify(row)
+}
+
+async function getTable(name: string): Promise {
+ return (db as unknown as AnyRow)[name].toArray()
+}
+
+// 一次性补齐 uuid 与 updated_at,缺失时回填
+async function ensureSyncFields(): Promise {
+ for (const t of TABLES) {
+ const table = (db as unknown as AnyRow)[t]
+ const rows: AnyRow[] = await table.toArray()
+ for (const row of rows) {
+ if (t === 'setting' && EXCLUDE_SETTING_KEYS.has(row.key)) continue
+ const patch: AnyRow = {}
+ if (!row.uuid) patch.uuid = newUuid()
+ if (!row.updated_at) patch.updated_at = row.created_at || nowLocalISO()
+ if (Object.keys(patch).length) await table.update(row.id, patch)
+ }
+ }
+}
+
+export interface SyncResult {
+ pushed: number
+ pulled: number
+ removed: number
+ at: string
+}
+
+export interface SyncConfig {
+ baseUrl: string
+ username: string
+ password: string
+}
+
+export async function isSyncConfigured(): Promise {
+ const values = await Promise.all([
+ getSetting('sync_base_url', ''),
+ getSetting('sync_username', ''),
+ getSetting('sync_password', '')
+ ])
+ return !!(values[0].trim() && values[1].trim() && values[2].trim())
+}
+
+export async function getSyncLastTime(): Promise {
+ return getSetting('sync_last_time', '')
+}
+
+// 云端账号注册(服务端存 PBKDF2 哈希)
+export async function registerCloudAccount(baseUrl: string, username: string, password: string): Promise {
+ const base = baseUrl.trim().replace(/\/+$/, '')
+ if (!base || !username.trim() || password.length < 6) {
+ throw new Error('请完整填写同步地址、用户名与至少 6 位的密码')
+ }
+ let resp: Response
+ try {
+ resp = await fetch(base + '/api/auth/register', {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify({ username: username.trim(), password })
+ })
+ } catch {
+ throw new Error('无法访问同步服务:请检查地址、端口与网络')
+ }
+ if (resp.status === 409) throw new Error('云端用户名已存在,可直接同步')
+ if (!resp.ok) throw new Error('云端注册失败:' + resp.status)
+}
+
+// 执行一次完整同步
+export async function runSync(config: SyncConfig): Promise {
+ const base = config.baseUrl.trim().replace(/\/+$/, '')
+ if (!base) throw new Error('请先配置同步服务地址')
+ await ensureSyncFields()
+
+ // 1. 载入镜像,计算本地差异
+ const mirrorRows = await db.sync_mirror.toArray()
+ const mirror = new Map()
+ for (const m of mirrorRows) mirror.set(m.table + '|' + m.uuid, m)
+
+ const pushTables: Record = {}
+ const tombstones: { table: string; uuid: string; deleted_at: string }[] = []
+ let pushed = 0
+
+ for (const t of TABLES) {
+ let rows: AnyRow[] = await getTable(t)
+ if (t === 'setting') rows = rows.filter(r => !EXCLUDE_SETTING_KEYS.has(r.key))
+ const current = new Map()
+ for (const row of rows) current.set(row.uuid, row)
+
+ for (const [u, row] of current) {
+ const clean = stripId(row)
+ const h = rowHash(clean)
+ const m = mirror.get(t + '|' + u)
+ if (!m || m.hash !== h) {
+ pushTables[t] = pushTables[t] || []
+ pushTables[t].push(clean)
+ pushed++
+ }
+ }
+ for (const [key, m] of mirror) {
+ if (key.startsWith(t + '|') && !current.has(m.uuid)) {
+ tombstones.push({ table: t, uuid: m.uuid, deleted_at: nowLocalISO() })
+ }
+ }
+ pushTables[t] = pushTables[t] || []
+ }
+
+ // 2. 与服务端交换
+ let resp: Response
+ try {
+ resp = await fetch(base + '/api/sync', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Authorization: 'Bearer ' + config.username.trim() + ':' + config.password
+ },
+ body: JSON.stringify({ device: 'client', tables: pushTables, tombstones })
+ })
+ } catch {
+ throw new Error('无法访问同步服务:请检查地址、端口与网络')
+ }
+ if (resp.status === 401) throw new Error('云端账号或密码不正确')
+ if (!resp.ok) throw new Error('同步服务返回 ' + resp.status)
+ const data = await resp.json()
+ const serverTables: Record = data.tables || {}
+ const serverTombstones: { table: string; uuid: string; deleted_at: string }[] = data.tombstones || []
+
+ // 3. 应用服务端权威数据
+ let pulled = 0
+ let removed = 0
+ const finalMirror: { table: string; uuid: string; hash: string }[] = []
+
+ for (const t of TABLES) {
+ const table = (db as unknown as AnyRow)[t]
+ const localRows: AnyRow[] = await table.toArray()
+ const byUuid = new Map()
+ for (const row of localRows) byUuid.set(row.uuid, row)
+
+ const serverRows: AnyRow[] = serverTables[t] || []
+ const dead = new Set(serverTombstones.filter(x => x.table === t).map(x => x.uuid))
+
+ for (const [u, row] of byUuid) {
+ if (dead.has(u)) {
+ await table.delete(row.id)
+ removed++
+ }
+ }
+ for (const [u, srow] of serverRows) {
+ if (dead.has(u)) continue
+ const local = byUuid.get(u)
+ if (!local) {
+ await table.add({ ...srow })
+ pulled++
+ } else {
+ const localUa = String(local.updated_at || '')
+ const serverUa = String(srow.updated_at || '')
+ if (serverUa > localUa) {
+ await table.update(local.id, { ...srow })
+ pulled++
+ }
+ }
+ }
+ const finalRows: AnyRow[] = await table.toArray()
+ for (const row of finalRows) {
+ if (t === 'setting' && EXCLUDE_SETTING_KEYS.has(row.key)) continue
+ finalMirror.push({ table: t, uuid: row.uuid, hash: rowHash(stripId(row)) })
+ }
+ }
+
+ // 4. 重建镜像
+ await db.sync_mirror.clear()
+ if (finalMirror.length) await db.sync_mirror.bulkAdd(finalMirror.map(m => ({ ...m })))
+ const at = nowLocalISO()
+ await setSetting('sync_last_time', at)
+ return { pushed, pulled, removed, at }
+}
diff --git a/intern-log/src/views/SettingsView.vue b/intern-log/src/views/SettingsView.vue
index 10ee07c..d1b8545 100644
--- a/intern-log/src/views/SettingsView.vue
+++ b/intern-log/src/views/SettingsView.vue
@@ -13,6 +13,7 @@ import { downloadCsv } from '../lib/csv'
import { hhmm, parseDateStr, todayStr } from '../lib/date'
import { computeDay } from '../domain/attendance'
import { changeLoginPassword, deleteCurrentUser, getSession } from '../db/auth'
+import { getSyncLastTime, isSyncConfigured, registerCloudAccount, runSync, type SyncResult } from '../sync/engine'
import { showToast } from '../lib/toast'
const rule = ref({ work_start: '09:00', work_end: '18:00', grace_minutes: 10, lunch_minutes: 60, remind_weekly: 'friday' })
@@ -34,6 +35,54 @@ const newLoginPwd1 = ref('')
const newLoginPwd2 = ref('')
const accError = ref('')
const deleteAccConfirm = ref(false)
+const syncBase = ref('')
+const syncUser = ref('')
+const syncPwd = ref('')
+const syncStatus = ref('')
+const syncError = ref('')
+const syncing = ref(false)
+const lastSync = ref('')
+
+async function loadSyncInfo() {
+ syncBase.value = await getSetting('sync_base_url', '')
+ syncUser.value = await getSetting('sync_username', '')
+ syncPwd.value = await getSetting('sync_password', '')
+ lastSync.value = await getSyncLastTime()
+}
+
+async function saveSyncConfig() {
+ await setSetting('sync_base_url', syncBase.value.trim())
+ await setSetting('sync_username', syncUser.value.trim())
+ await setSetting('sync_password', syncPwd.value)
+ showToast('同步配置已保存')
+}
+
+async function registerCloud() {
+ syncError.value = ''
+ try {
+ await registerCloudAccount(syncBase.value, syncUser.value, syncPwd.value)
+ await saveSyncConfig()
+ showToast('云端账号已注册,可直接同步')
+ } catch (e) {
+ syncError.value = e instanceof Error ? e.message : '注册失败'
+ }
+}
+
+async function doSyncNow() {
+ if (syncing.value) return
+ syncError.value = ''
+ syncing.value = true
+ try {
+ await saveSyncConfig()
+ const result: SyncResult = await runSync({ baseUrl: syncBase.value, username: syncUser.value, password: syncPwd.value })
+ lastSync.value = result.at
+ syncStatus.value = '推送 ' + result.pushed + ' 条 · 拉取 ' + result.pulled + ' 条 · 删除 ' + result.removed + ' 条'
+ showToast('同步完成')
+ } catch (e) {
+ syncError.value = e instanceof Error ? e.message : '同步失败'
+ }
+ syncing.value = false
+}
async function doChangeLoginPwd() {
accError.value = ''
@@ -64,6 +113,7 @@ async function load() {
aiBase.value = await getSetting('ai_base_url', '')
aiKey.value = await getSetting('ai_api_key', '')
aiModel.value = await getSetting('ai_model', '')
+ await loadSyncInfo()
}
async function saveAi() {
@@ -291,6 +341,31 @@ async function doImport() {
+
+
多端数据同步
+
在自建同步服务端注册云端账号后,手机(PWA)、桌面与网页端登录同一账号即可互通数据;密码库以密文同步,主密码永不出本机
+
+
+
+
+
+
上次同步:{{ lastSync || '--' }} · {{ syncStatus }}
+
{{ syncError }}
+
+
AI 润色配置(可选)
diff --git a/server/DEPLOY.md b/server/DEPLOY.md
new file mode 100644
index 0000000..b78187d
--- /dev/null
+++ b/server/DEPLOY.md
@@ -0,0 +1,32 @@
+# 同步服务端部署指南
+
+## 部署(在 124.221.192.176 上执行)
+
+1. 上传 server 目录到服务器(如 ~/internlog-sync/)
+2. 启动:
+
+ cd ~/internlog-sync
+ docker compose up -d --build
+
+3. 验证:curl http://127.0.0.1:3780/api/health 应返回 {"ok":true}
+
+数据保存在 ./data/(用户注册表 + 每用户数据文件),直接打包该目录即备份。
+
+## 建议:启用 HTTPS
+
+客户端在手机浏览器使用时,建议用 nginx 反向代理复用现有证书:
+
+ location /sync-api/ {
+ proxy_pass http://127.0.0.1:3780/;
+ proxy_set_header Host $host;
+ }
+
+客户端同步地址填 https://gitea.linyux.cn/sync-api 即可全程加密。
+不加代理时客户端可临时填 http://124.221.192.176:3780(明文,仅建议内网或过渡期使用)。
+
+## 接口
+
+- POST /api/auth/register {username, password}
+- POST /api/auth/login {username, password}
+- POST /api/sync Authorization: Bearer ,body: {tables, tombstones}
+- GET /api/health
diff --git a/server/Dockerfile b/server/Dockerfile
new file mode 100644
index 0000000..d380d84
--- /dev/null
+++ b/server/Dockerfile
@@ -0,0 +1,6 @@
+FROM node:22-alpine
+WORKDIR /app
+ENV NODE_ENV=production
+COPY package.json index.js ./
+EXPOSE 3780
+CMD ["node", "index.js"]
diff --git a/server/docker-compose.yml b/server/docker-compose.yml
new file mode 100644
index 0000000..385d042
--- /dev/null
+++ b/server/docker-compose.yml
@@ -0,0 +1,9 @@
+services:
+ internlog-sync:
+ build: .
+ container_name: internlog-sync
+ ports:
+ - "3780:3780"
+ volumes:
+ - ./data:/app/data
+ restart: unless-stopped
diff --git a/server/index.js b/server/index.js
new file mode 100644
index 0000000..b1f4574
--- /dev/null
+++ b/server/index.js
@@ -0,0 +1,206 @@
+// 实习工作日志 · 多端同步服务端
+// 零依赖:node:http + node:crypto + JSON 文件存储(个人规模足够,便于备份)
+import http from 'node:http'
+import crypto from 'node:crypto'
+import fs from 'node:fs'
+import path from 'node:path'
+import { fileURLToPath } from 'node:url'
+
+const __dirname = path.dirname(fileURLToPath(import.meta.url))
+const DATA_DIR = process.env.DATA_DIR || path.join(__dirname, 'data')
+const PORT = Number(process.env.PORT || 3780)
+const TOKEN_TTL_MS = 30 * 24 * 60 * 60 * 1000 // 30 天
+const ITER = 150000
+
+const TABLES = ['project', 'work_log', 'log_item', 'attendance', 'weekly_note', 'setting', 'memo', 'credential', 'transaction']
+
+fs.mkdirSync(DATA_DIR, { recursive: true })
+
+// ---------- 存储辅助 ----------
+function readJson(file, fallback) {
+ try {
+ return JSON.parse(fs.readFileSync(path.join(DATA_DIR, file), 'utf-8'))
+ } catch {
+ return fallback
+ }
+}
+function writeJson(file, data) {
+ const tmp = path.join(DATA_DIR, file + '.tmp')
+ fs.writeFileSync(tmp, JSON.stringify(data))
+ fs.renameSync(tmp, path.join(DATA_DIR, file))
+}
+
+if (!fs.existsSync(path.join(DATA_DIR, 'secret.key'))) {
+ writeJson('secret.key', { secret: crypto.randomBytes(32).toString('hex') })
+}
+const SECRET = readJson('secret.key', { secret: 'fallback-secret' }).secret
+
+const registryFile = 'registry.json'
+let registry = readJson(registryFile, { users: [] })
+function saveRegistry() { writeJson(registryFile, registry) }
+
+function userFile(userId) { return path.join(DATA_DIR, 'users', userId + '.json') }
+function loadUserData(userId) {
+ return readJson('users/' + userId + '.json', { userId, cursor: 0, tables: {}, tombstones: {} })
+}
+function saveUserData(userId, data) {
+ fs.mkdirSync(path.join(DATA_DIR, 'users'), { recursive: true })
+ writeJson('users/' + userId + '.json', data)
+}
+
+// ---------- 认证 ----------
+function pbkdf2Hash(password, salt) {
+ return crypto.pbkdf2Sync(password, salt, ITER, 32, 'sha256').toString('hex')
+}
+function makeToken(userId) {
+ const payload = base64url(JSON.stringify({ userId, exp: Date.now() + TOKEN_TTL_MS }))
+ const sig = crypto.createHmac('sha256', SECRET).update(payload).digest('base64url')
+ return payload + '.' + sig
+}
+function verifyToken(token) {
+ const parts = String(token || '').split('.')
+ if (parts.length !== 2) return null
+ const expect = crypto.createHmac('sha256', SECRET).update(parts[0]).digest('base64url')
+ const a = Buffer.from(parts[1])
+ const b = Buffer.from(expect)
+ if (a.length !== b.length || !crypto.timingSafeEqual(a, b)) return null
+ try {
+ const payload = JSON.parse(Buffer.from(parts[0], 'base64url').toString('utf-8'))
+ if (!payload.userId || payload.exp < Date.now()) return null
+ return payload
+ } catch {
+ return null
+ }
+}
+function base64url(s) {
+ return Buffer.from(s).toString('base64url')
+}
+
+// ---------- HTTP 基础 ----------
+function json(res, status, data) {
+ const body = JSON.stringify(data)
+ res.writeHead(status, {
+ 'Content-Type': 'application/json; charset=utf-8',
+ 'Access-Control-Allow-Origin': '*',
+ 'Access-Control-Allow-Methods': 'GET,POST,OPTIONS',
+ 'Access-Control-Allow-Headers': 'Content-Type, Authorization'
+ })
+ res.end(body)
+}
+function readBody(req, limit = 20 * 1024 * 1024) {
+ return new Promise((resolve, reject) => {
+ let size = 0
+ const chunks = []
+ req.on('data', c => {
+ size += c.length
+ if (size > limit) { reject(new Error('body too large')); req.destroy(); return }
+ chunks.push(c)
+ })
+ req.on('end', () => {
+ try { resolve(JSON.parse(Buffer.concat(chunks).toString('utf-8') || '{}')) }
+ catch { reject(new Error('invalid json')) }
+ })
+ req.on('error', reject)
+ })
+}
+
+// ---------- 路由 ----------
+async function handle(req, res) {
+ const url = new URL(req.url, 'http://localhost')
+ const route = url.pathname
+
+ if (req.method === 'OPTIONS') { json(res, 204, {}); return }
+
+ if (req.method === 'GET' && route === '/api/health') { json(res, 200, { ok: true }); return }
+
+ if (req.method === 'POST' && route === '/api/auth/register') {
+ const body = await readBody(req)
+ const username = String(body.username || '').trim()
+ const password = String(body.password || '')
+ if (username.length < 2 || username.length > 20) { json(res, 400, { error: '用户名需 2 到 20 个字符' }); return }
+ if (password.length < 6) { json(res, 400, { error: '密码至少 6 位' }); return }
+ if (registry.users.find(u => u.username === username)) { json(res, 409, { error: '用户名已存在' }); return }
+ const salt = crypto.randomBytes(16).toString('hex')
+ const userId = 'cu_' + crypto.randomBytes(6).toString('hex')
+ registry.users.push({ id: userId, username, pwd_hash: pbkdf2Hash(password, salt), pwd_salt: salt, created_at: new Date().toISOString() })
+ saveRegistry()
+ json(res, 200, { userId, username, token: makeToken(userId) })
+ return
+ }
+
+ if (req.method === 'POST' && route === '/api/auth/login') {
+ const body = await readBody(req)
+ const username = String(body.username || '').trim()
+ const rec = registry.users.find(u => u.username === username)
+ if (!rec) { json(res, 401, { error: '用户不存在' }); return }
+ if (pbkdf2Hash(String(body.password || ''), rec.pwd_salt) !== rec.pwd_hash) { json(res, 401, { error: '密码不正确' }); return }
+ json(res, 200, { userId: rec.id, username: rec.username, token: makeToken(rec.id) })
+ return
+ }
+
+ if (req.method === 'POST' && route === '/api/sync') {
+ const auth = verifyToken(String(req.headers['authorization'] || '').replace(/^Bearer\s+/i, '').trim())
+ if (!auth) { json(res, 401, { error: '未认证' }); return }
+ const body = await readBody(req)
+ const userData = loadUserData(auth.userId)
+ if (!userData.cursor) userData.cursor = 0
+ if (!userData.tables) userData.tables = {}
+ if (!userData.tombstones) userData.tombstones = {}
+
+ // 应用推送的变更(新者胜)
+ const incomingTables = body.tables || {}
+ for (const t of TABLES) {
+ const rows = incomingTables[t] || []
+ userData.tables[t] = userData.tables[t] || {}
+ for (const row of rows) {
+ if (!row || !row.uuid) continue
+ const clean = {}
+ for (const k of Object.keys(row)) if (k !== 'id') clean[k] = row[k]
+ const existing = userData.tables[t][row.uuid]
+ if (!existing || String(clean.updated_at || '') >= String(existing.updated_at || '')) {
+ userData.tables[t][row.uuid] = clean
+ }
+ }
+ }
+ // 应用墓碑
+ const incomingTombs = body.tombstones || []
+ for (const tb of incomingTombs) {
+ if (!TABLES.includes(tb.table) || !tb.uuid) continue
+ userData.tombstones[tb.table] = userData.tombstones[tb.table] || {}
+ const prev = userData.tombstones[tb.table][tb.uuid]
+ if (!prev || tb.deleted_at > prev) userData.tombstones[tb.table][tb.uuid] = tb.deleted_at
+ }
+ // 墓碑生效:清除被删数据
+ for (const t of TABLES) {
+ const tombs = userData.tombstones[t] || {}
+ for (const [u, deletedAt] of Object.entries(tombs)) {
+ const row = userData.tables[t][u]
+ if (row && String(row.updated_at || '') <= String(deletedAt)) delete userData.tables[t][u]
+ }
+ }
+ saveUserData(auth.userId, userData)
+
+ // 返回权威全量
+ const outTables = {}
+ const outTombs = []
+ for (const t of TABLES) {
+ outTables[t] = Object.values(userData.tables[t] || {})
+ const tombs = userData.tombstones[t] || {}
+ for (const [u, deletedAt] of Object.entries(tombs)) outTombs.push({ table: t, uuid: u, deleted_at: deletedAt })
+ }
+ json(res, 200, { tables: outTables, tombstones: outTombs, serverTime: new Date().toISOString() })
+ return
+ }
+
+ json(res, 404, { error: 'not found' })
+}
+
+const server = http.createServer((req, res) => {
+ handle(req, res).catch(err => {
+ json(res, 500, { error: err.message || 'server error' })
+ })
+})
+
+server.listen(PORT, () => {
+ console.log('internlog sync server listening on ' + PORT)
+})
diff --git a/server/package.json b/server/package.json
new file mode 100644
index 0000000..ee46e70
--- /dev/null
+++ b/server/package.json
@@ -0,0 +1,9 @@
+{
+ "name": "internlog-sync-server",
+ "private": true,
+ "version": "1.0.0",
+ "type": "module",
+ "scripts": {
+ "start": "node index.js"
+ }
+}
diff --git a/实习工作日志系统-设计方案.md b/实习工作日志系统-设计方案.md
index ba86fa5..3ed4319 100644
--- a/实习工作日志系统-设计方案.md
+++ b/实习工作日志系统-设计方案.md
@@ -1,6 +1,6 @@
# 实习工作日志系统 设计方案
-- 版本:v1.11(记账系统)
+- 版本:v1.13(多端同步与安卓应用)
- 范围:个人版全量功能;团队版仅作扩展预留
## 1. 产品定位
@@ -163,6 +163,30 @@ AI 润色为可选进阶:将统计、成果、周记交给大模型按四段
| 汇总 | 按月展示收入、支出、结余、待报销四卡片;支出分类分布条形图 |
| 明细 | 月度流水表格,类型与报销状态筛选,支持弹窗编辑、删除确认、标记已报销 |
+### 3.13 多端同步与安卓应用
+
+**同步服务端**(server 目录,零依赖 Node,Docker 部署于自有服务器):
+
+| 项 | 说明 |
+|---|---|
+| 存储 | JSON 文件按用户隔离(users/用户ID.json),注册表独立;整目录复制即备份 |
+| 认证 | 登录密码 PBKDF2 哈希;HMAC 签名 token(30 天有效期) |
+| 接口 | 注册 / 登录 / 全量同步 / 健康检查;CORS 开放以支持手机浏览器 |
+| 同步模型 | 客户端全量差异对比 + 记录级新者胜(updated_at)+ 软删除墓碑;本地 IndexedDB 始终为主存储,离线可用 |
+
+**客户端同步引擎**(src/sync/engine.ts):
+
+- 一次性补齐每行 uuid 与 updated_at;镜像表(sync_mirror)做哈希差异检测
+- 删除通过墓碑表传播到服务端与其他端
+- 设置页配置同步地址与云端账号;登录后自动同步(5 分钟间隔,静默),支持立即手动同步
+- 密码库以密文同步,主密码永不出本机;本地临时设置(上次项目、分类等)不同步
+
+**安卓应用(Capacitor)**:
+
+- 复用全部前端代码;npx cap add android 生成工程,pnpm cap:sync 同步资源
+- 本机构建 APK 需 Android Studio(SDK + JDK 17):进入 android 目录执行 gradlew assembleDebug,产物在 app/build/outputs/apk/debug/
+- 分发:apk 直接安装(允许未知来源),或上架应用市场
+
## 4. 数据模型(SQLite)
### 4.1 建表语句
@@ -506,3 +530,4 @@ src/
- v1.10:Electron 桌面应用——pnpm dist 一键产出 NSIS 安装包与免安装目录;主进程加载本地构建产物,数据存于系统用户目录;窗口禁用菜单栏、外部链接交由系统浏览器打开
- v1.11:新增记账系统——支出/收入录入(金额以分存储)、固定分类枚举、报销跟踪(待报销/已报销与待报销金额汇总)、月度汇总卡片与支出分类分布、月度流水筛选与弹窗编辑;备份格式升级至 v3 并向下兼容
- v1.12:「今日」视图升级为「详情」——支持前后翻页、日期选择器自由切换日期,对任意一天进行查看、打卡、记录与修改
+- v1.13:多端同步与安卓应用——自建零依赖同步服务端(Docker 部署、按用户 JSON 隔离、HMAC token);客户端同步引擎(uuid 与 updated_at 补齐、镜像哈希差异、墓碑传播、记录级新者胜);设置页同步配置与自动同步;Capacitor 安卓工程脚手架与移动端 UI 适配(安全区、输入字号)