@adep/cli 0.4.0 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,48 @@
1
+ // swift-tools-version: 5.9
2
+ //
3
+ // adep-bridge 的 Swift Package Manager 清单(APP-015)。
4
+ //
5
+ // ⚠️ **这是双形态中的一支,不是替代品**:CocoaPods 形态(`ios/AdepBridge.podspec`)**必须同时保留**——
6
+ // Capacitor 官方口径是「插件同时是 CocoaPods 与 SPM 库」;自 Capacitor 8 起 `cap add ios` 默认建 SPM 工程,
7
+ // 没有本文件的插件会被静默跳过(运行时表现为 "plugin is not implemented")。两支并存,各管一条消费路径。
8
+ //
9
+ // 命名与布局**不能随意改**(改了 Capacitor CLI 就找不到这个包):
10
+ // - 本文件必须在 **npm 包根**:`cap sync ios` 按 npm 包根路径写入 `.package(name:path:)`
11
+ // (`path: ".../node_modules/@adep/bridge"`),落在 `ios/` 下不会被消费。
12
+ // - `name` / product 名 = `AdepBridge`:由 npm 名 `@adep/bridge` 按官方规则派生
13
+ // (剥 `@`、`/`→`_`、分段首字母大写)。用别的名字会在 app 侧报
14
+ // "product 'X' required by package 'capapp-spm' target 'CapApp-SPM' not found"。
15
+ // 与既有 `s.name = 'AdepBridge'`(podspec)、`@objc(AdepBridge)` 一致。
16
+ // - `path: "ios/Sources"`:既有 Swift 源码就平铺在这(与 podspec 的 `source_files` glob 同一目录),
17
+ // 避免为 SPM 搬目录而牵动 podspec 与 capacitor.plugin.json。
18
+ //
19
+ // 版本与平台下限**两形态必须一致**(本仓判据见 `packages/cli/src/__tests__/adep-bridge-spm.test.ts`):
20
+ // - `platforms: [.iOS(.v14)]` ↔ podspec 的 `s.ios.deployment_target = '14.0'`。
21
+ // Capacitor 7 官方迁移要求把 iOS 下限从 13 抬到 14;两端不一致 = 同一插件对同一消费方给出不同平台约束。
22
+ // - `capacitor-swift-pm` 用 `from: "7.0.0"`(区间):app 侧按自己装的 `@capacitor/ios` 钉 exact 版本,
23
+ // 这里给区间让 SPM 能同时解析两者;写 `branch:` / `exact:` 会与 app 侧冲突。
24
+ // 与 podspec 的 `s.dependency 'Capacitor'`(无版本约束)对应——语义都是「跟随消费方的 Capacitor 版本」。
25
+ // - `Capacitor` **与** `Cordova` 两个 product 都要声明:只写 `Capacitor` 会报
26
+ // `fatal error: module 'Cordova' not found`(Capacitor.framework 的头文件里 `@_exported import Cordova`)。
27
+ import PackageDescription
28
+
29
+ let package = Package(
30
+ name: "AdepBridge",
31
+ platforms: [.iOS(.v14)],
32
+ products: [
33
+ .library(name: "AdepBridge", targets: ["AdepBridge"])
34
+ ],
35
+ dependencies: [
36
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
37
+ ],
38
+ targets: [
39
+ .target(
40
+ name: "AdepBridge",
41
+ dependencies: [
42
+ .product(name: "Capacitor", package: "capacitor-swift-pm"),
43
+ .product(name: "Cordova", package: "capacitor-swift-pm"),
44
+ ],
45
+ path: "ios/Sources"
46
+ )
47
+ ]
48
+ )
@@ -3,11 +3,14 @@ Pod::Spec.new do |s|
3
3
  s.version = '0.1.0'
4
4
  s.summary = 'AgentDeploy mobile shell native bridge (APP-009)'
5
5
  s.description = 'Native-side permission gate + ownerKey Keychain storage + native capability invoke routing'
6
- s.homepage = 'https://adep.jajabjbj.top'
6
+ s.homepage = 'https://adep.top'
7
7
  s.license = 'MIT'
8
8
  s.author = 'AgentDeploy'
9
- s.source = { :git => 'https://adep.jajabjbj.top/adep-bridge.git', :tag => s.version.to_s }
10
- s.ios.deployment_target = '13.0'
9
+ s.source = { :git => 'https://adep.top/adep-bridge.git', :tag => s.version.to_s }
10
+ # iOS 下限与 SPM 形态(包根 Package.swift 的 platforms)**必须一致**:
11
+ # Capacitor 7 官方迁移要求抬到 14(原 13)。两端不一致 = 同一插件对两条消费路径给出不同平台约束。
12
+ # 一致性由 packages/cli/src/__tests__/adep-bridge-spm.test.ts 钉住。
13
+ s.ios.deployment_target = '14.0'
11
14
  s.source_files = 'Sources/**/*.swift'
12
15
  s.swift_version = '5.1'
13
16
  s.dependency 'Capacitor'