@cap-kit/test-plugin 5.0.0 → 6.0.0

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.
@@ -83,10 +83,12 @@ public final class TestPlugin: CAPPlugin, CAPBridgedPlugin {
83
83
 
84
84
  // MARK: - Version
85
85
 
86
- /// Retrieves the plugin version from the bundle.
86
+ /// Retrieves the plugin version synchronized from package.json.
87
87
  @objc func getPluginVersion(_ call: CAPPluginCall) {
88
- let version = Bundle(for: type(of: self)).infoDictionary?["CFBundleShortVersionString"] as? String ?? "0.0.1"
89
- call.resolve(["version": version])
88
+ // Standardized enum name across all CapKit plugins
89
+ call.resolve([
90
+ "version": PluginVersion.number
91
+ ])
90
92
  }
91
93
 
92
94
  // MARK: - Settings
@@ -0,0 +1,16 @@
1
+ // This file is automatically generated. Do not modify manually.
2
+ import Foundation
3
+
4
+ /**
5
+ Container for the plugin's version information.
6
+ This enum provides a centralized, single source of truth for the native
7
+ version string, synchronized directly from the project's 'package.json'.
8
+ It ensures parity across JavaScript, Android, and iOS platforms.
9
+ */
10
+ public enum PluginVersion {
11
+ /**
12
+ The semantic version string of the plugin.
13
+ Value synchronized from package.json: "6.0.0"
14
+ */
15
+ public static let number = "6.0.0"
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cap-kit/test-plugin",
3
- "version": "5.0.0",
3
+ "version": "6.0.0",
4
4
  "description": "Architectural reference and boilerplate for Cap-Kit plugins.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -31,32 +31,33 @@
31
31
  "capacitor",
32
32
  "capacitor-plugin",
33
33
  "ionic",
34
- "native"
34
+ "native",
35
+ "cap-kit"
35
36
  ],
36
37
  "publishConfig": {
37
38
  "access": "public"
38
39
  },
39
40
  "devDependencies": {
40
- "@capacitor/cli": "^8.0.1",
41
- "@capacitor/android": "^8.0.1",
42
- "@capacitor/core": "^8.0.1",
41
+ "@capacitor/cli": "^8.0.2",
42
+ "@capacitor/android": "^8.0.2",
43
+ "@capacitor/core": "^8.0.2",
43
44
  "@capacitor/docgen": "^0.3.1",
44
- "@capacitor/ios": "^8.0.1",
45
+ "@capacitor/ios": "^8.0.2",
45
46
  "@eslint/eslintrc": "^3.3.3",
46
47
  "@eslint/js": "^9.39.2",
47
48
  "eslint": "^9.39.2",
48
49
  "eslint-plugin-import": "^2.32.0",
49
- "globals": "^17.1.0",
50
+ "globals": "^17.2.0",
50
51
  "prettier": "^3.8.1",
51
52
  "prettier-plugin-java": "^2.8.1",
52
53
  "rimraf": "^6.1.2",
53
- "rollup": "^4.56.0",
54
+ "rollup": "^4.57.0",
54
55
  "swiftlint": "^2.0.0",
55
56
  "typescript": "^5.9.3",
56
- "typescript-eslint": "^8.53.1"
57
+ "typescript-eslint": "^8.54.0"
57
58
  },
58
59
  "peerDependencies": {
59
- "@capacitor/core": ">=8.0.1"
60
+ "@capacitor/core": ">=8.0.2"
60
61
  },
61
62
  "capacitor": {
62
63
  "ios": {
@@ -68,7 +69,7 @@
68
69
  },
69
70
  "scripts": {
70
71
  "verify": "pnpm run verify:ios && pnpm run verify:android && pnpm run verify:web",
71
- "verify:ios": "xcodebuild -scheme CapKitTestPlugin -destination generic/platform=iOS",
72
+ "verify:ios": "node ./scripts/sync-version.js && xcodebuild -scheme CapKitTestPlugin -destination generic/platform=iOS",
72
73
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
73
74
  "verify:web": "pnpm run build",
74
75
  "lint:android": "cd android && ./gradlew ktlintCheck",
@@ -80,7 +81,7 @@
80
81
  "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
81
82
  "swiftlint": "node-swiftlint lint ios/Sources",
82
83
  "docgen": "docgen --api TestPlugin --output-readme README.md --output-json dist/docs.json",
83
- "build": "pnpm run clean && pnpm run docgen && tsc && rollup -c rollup.config.mjs",
84
+ "build": "node ./scripts/sync-version.js && pnpm run clean && pnpm run docgen && tsc && rollup -c rollup.config.mjs",
84
85
  "clean": "rimraf ./dist",
85
86
  "watch": "tsc --watch",
86
87
  "test": "pnpm run verify",