@ansight/capacitor 1.4.0 → 1.6.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.
- package/AnsightCapacitor.podspec +1 -1
- package/Package.swift +1 -1
- package/README.md +14 -0
- package/android/build.gradle +2 -2
- package/android/src/main/kotlin/ai/ansight/capacitor/AnsightCapacitorPlugin.kt +13 -1
- package/dist/esm/definitions.d.ts +8 -0
- package/dist/esm/definitions.d.ts.map +1 -1
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/options.d.ts +1 -0
- package/dist/esm/options.d.ts.map +1 -1
- package/dist/esm/options.js +7 -0
- package/dist/esm/options.js.map +1 -1
- package/dist/esm/purchases.d.ts +76 -0
- package/dist/esm/purchases.d.ts.map +1 -0
- package/dist/esm/purchases.js +20 -0
- package/dist/esm/purchases.js.map +1 -0
- package/dist/esm/session-properties.d.ts +1 -1
- package/dist/esm/session-properties.js +1 -1
- package/dist/plugin.cjs.js +32 -1
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +32 -1
- package/dist/plugin.js.map +1 -1
- package/dist/standalone.js +30 -1
- package/dist/standalone.js.map +1 -1
- package/ios/Sources/AnsightCapacitorPlugin/AnsightCapacitorPlugin.swift +11 -0
- package/package.json +2 -2
|
@@ -7,6 +7,7 @@ public final class AnsightCapacitorPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
7
7
|
public let identifier = "AnsightCapacitorPlugin"
|
|
8
8
|
public let jsName = "Ansight"
|
|
9
9
|
public let pluginMethods: [CAPPluginMethod] = [
|
|
10
|
+
CAPPluginMethod(name: "purchaseCommand", returnType: CAPPluginReturnPromise),
|
|
10
11
|
CAPPluginMethod(name: "initialize", returnType: CAPPluginReturnPromise),
|
|
11
12
|
CAPPluginMethod(name: "initializeAndActivate", returnType: CAPPluginReturnPromise),
|
|
12
13
|
CAPPluginMethod(name: "activate", returnType: CAPPluginReturnPromise),
|
|
@@ -398,6 +399,15 @@ public final class AnsightCapacitorPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
398
399
|
call.resolve(snapshotDictionary())
|
|
399
400
|
}
|
|
400
401
|
|
|
402
|
+
@objc func purchaseCommand(_ call: CAPPluginCall) {
|
|
403
|
+
guard let json = call.getString("json") else { call.reject("Missing purchase command."); return }
|
|
404
|
+
Task {
|
|
405
|
+
do { call.resolve(["json": try await PurchaseDiagnostics.shared.commandAsync(json)]) }
|
|
406
|
+
catch PurchaseDiagnosticsError.environmentNotAllowed { call.reject("Purchase interop is restricted to simulators and emulators.", PurchaseDiagnosticsError.environmentErrorCode) }
|
|
407
|
+
catch { call.reject("Purchase command failed.", "purchases_command_failed", error) }
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
401
411
|
@objc func snapshot(_ call: CAPPluginCall) {
|
|
402
412
|
call.resolve(snapshotDictionary())
|
|
403
413
|
}
|
|
@@ -793,6 +803,7 @@ public final class AnsightCapacitorPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
793
803
|
let defaultEnabled = boolValue(dictionary, "useNativeAllInOneDefaults", defaultValue: false)
|
|
794
804
|
return AnsightRemoteToolOptions(
|
|
795
805
|
visualTree: toolSuiteEnabled(remoteTools?["visualTree"], defaultValue: defaultEnabled),
|
|
806
|
+
clipboard: boolValue(remoteTools, "clipboard", defaultValue: true),
|
|
796
807
|
database: AnsightDatabaseToolsOptions(
|
|
797
808
|
additionalRoots: rootDictionaries((remoteTools?["database"] as? NSDictionary)?["additionalRoots"]).map {
|
|
798
809
|
AnsightDatabaseRoot(alias: stringValue($0, "alias") ?? "", path: stringValue($0, "path") ?? "")
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ansight/capacitor",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Capacitor bridge for
|
|
3
|
+
"version": "1.6.0",
|
|
4
|
+
"description": "Capacitor bridge for Ansight: runtime evidence from your app for coding agents. Screenshots, DOM and native trees, logs, network, and app state.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/esm/index.d.ts",
|