@capgo/native-market 7.1.9 → 7.1.15
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/CapgoNativeMarket.podspec +16 -12
- package/Package.swift +28 -0
- package/android/src/main/java/com/getcapacitor/community/nativemarket/NativeMarket.java +97 -109
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/web.d.ts +2 -2
- package/dist/esm/web.js +6 -6
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +6 -6
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +6 -6
- package/dist/plugin.js.map +1 -1
- package/ios/Tests/NativeMarketPluginTests/NativeMarketPluginTests.swift +20 -0
- package/package.json +13 -4
- package/.eslintignore +0 -5
- package/.github/FUNDING.yml +0 -1
- package/.github/ISSUE_TEMPLATE/bug-report.md +0 -84
- package/.github/ISSUE_TEMPLATE/feature-request.md +0 -41
- package/.github/workflows/autofix.yml +0 -23
- package/.github/workflows/build.yml +0 -106
- package/.github/workflows/bump_version.yml +0 -57
- package/.github/workflows/test.yml +0 -58
- package/.prettierrc.js +0 -3
- package/CHANGELOG.md +0 -508
- package/PLUGIN_AUTHOR_README.md +0 -51
- package/android/.classpath +0 -6
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/android/gradle.properties +0 -20
- package/android/gradlew +0 -252
- package/android/gradlew.bat +0 -94
- package/android/proguard-rules.pro +0 -21
- package/android/settings.gradle +0 -2
- package/android/src/androidTest/java/com/getcapacitor/android/ExampleInstrumentedTest.java +0 -27
- package/android/src/test/java/com/getcapacitor/ExampleUnitTest.java +0 -18
- package/bun.lock +0 -820
- package/ios/Plugin/Info.plist +0 -24
- package/ios/Plugin.xcodeproj/project.pbxproj +0 -548
- package/ios/Plugin.xcworkspace/contents.xcworkspacedata +0 -10
- package/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/PluginTests/Info.plist +0 -22
- package/ios/PluginTests/PluginTests.swift +0 -25
- package/ios/Podfile +0 -16
- package/renovate.json +0 -53
- package/rollup.config.mjs +0 -22
- package/src/definitions.ts +0 -58
- package/src/index.ts +0 -10
- package/src/web.ts +0 -28
- package/tsconfig.json +0 -19
- /package/ios/{Plugin/Plugin.swift → Sources/NativeMarketPlugin/NativeMarketPlugin.swift} +0 -0
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
require 'json'
|
|
1
2
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'CapgoNativeMarket'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.license = package['license']
|
|
10
|
+
s.homepage = package['repository']['url']
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
|
+
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
+
s.ios.deployment_target = '14.0'
|
|
15
|
+
s.dependency 'Capacitor'
|
|
16
|
+
s.swift_version = '5.1'
|
|
17
|
+
end
|
package/Package.swift
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// swift-tools-version: 5.9
|
|
2
|
+
import PackageDescription
|
|
3
|
+
|
|
4
|
+
let package = Package(
|
|
5
|
+
name: "CapgoNativeMarket",
|
|
6
|
+
platforms: [.iOS(.v14)],
|
|
7
|
+
products: [
|
|
8
|
+
.library(
|
|
9
|
+
name: "CapgoNativeMarket",
|
|
10
|
+
targets: ["NativeMarketPlugin"])
|
|
11
|
+
],
|
|
12
|
+
dependencies: [
|
|
13
|
+
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
|
|
14
|
+
],
|
|
15
|
+
targets: [
|
|
16
|
+
.target(
|
|
17
|
+
name: "NativeMarketPlugin",
|
|
18
|
+
dependencies: [
|
|
19
|
+
.product(name: "Capacitor", package: "capacitor-swift-pm"),
|
|
20
|
+
.product(name: "Cordova", package: "capacitor-swift-pm")
|
|
21
|
+
],
|
|
22
|
+
path: "ios/Sources/NativeMarketPlugin"),
|
|
23
|
+
.testTarget(
|
|
24
|
+
name: "NativeMarketPluginTests",
|
|
25
|
+
dependencies: ["NativeMarketPlugin"],
|
|
26
|
+
path: "ios/Tests/NativeMarketPluginTests")
|
|
27
|
+
]
|
|
28
|
+
)
|
|
@@ -11,118 +11,106 @@ import com.getcapacitor.annotation.CapacitorPlugin;
|
|
|
11
11
|
@CapacitorPlugin(name = "NativeMarket")
|
|
12
12
|
public class NativeMarket extends Plugin {
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} catch (Exception ex) {
|
|
33
|
-
call.reject(ex.getLocalizedMessage());
|
|
14
|
+
@PluginMethod
|
|
15
|
+
public void openStoreListing(PluginCall call) {
|
|
16
|
+
try {
|
|
17
|
+
String appId = call.getString("appId");
|
|
18
|
+
if (appId == null || appId.isEmpty()) {
|
|
19
|
+
call.reject("appId is missing");
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
Context context = this.bridge.getActivity().getApplicationContext();
|
|
24
|
+
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appId));
|
|
25
|
+
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
26
|
+
context.startActivity(intent);
|
|
27
|
+
|
|
28
|
+
call.resolve();
|
|
29
|
+
} catch (Exception ex) {
|
|
30
|
+
call.reject(ex.getLocalizedMessage());
|
|
31
|
+
}
|
|
34
32
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
} catch (Exception ex) {
|
|
56
|
-
call.reject(ex.getLocalizedMessage());
|
|
33
|
+
|
|
34
|
+
@PluginMethod
|
|
35
|
+
public void openDevPage(PluginCall call) {
|
|
36
|
+
try {
|
|
37
|
+
String devId = call.getString("devId");
|
|
38
|
+
if (devId == null || devId.isEmpty()) {
|
|
39
|
+
call.reject("devId is missing");
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
Context context = this.getContext();
|
|
44
|
+
Intent intent = new Intent(Intent.ACTION_VIEW);
|
|
45
|
+
intent.setData(Uri.parse("https://play.google.com/store/apps/dev?id=" + devId));
|
|
46
|
+
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
47
|
+
context.startActivity(intent);
|
|
48
|
+
|
|
49
|
+
call.resolve();
|
|
50
|
+
} catch (Exception ex) {
|
|
51
|
+
call.reject(ex.getLocalizedMessage());
|
|
52
|
+
}
|
|
57
53
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
} catch (Exception ex) {
|
|
79
|
-
call.reject(ex.getLocalizedMessage());
|
|
54
|
+
|
|
55
|
+
@PluginMethod
|
|
56
|
+
public void openCollection(PluginCall call) {
|
|
57
|
+
try {
|
|
58
|
+
String name = call.getString("name");
|
|
59
|
+
if (name == null || name.isEmpty()) {
|
|
60
|
+
call.reject("name is missing");
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
Context context = this.getContext();
|
|
65
|
+
Intent intent = new Intent(Intent.ACTION_VIEW);
|
|
66
|
+
intent.setData(Uri.parse("https://play.google.com/store/apps/collection/" + name));
|
|
67
|
+
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
68
|
+
context.startActivity(intent);
|
|
69
|
+
|
|
70
|
+
call.resolve();
|
|
71
|
+
} catch (Exception ex) {
|
|
72
|
+
call.reject(ex.getLocalizedMessage());
|
|
73
|
+
}
|
|
80
74
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
} catch (Exception ex) {
|
|
102
|
-
call.reject(ex.getLocalizedMessage());
|
|
75
|
+
|
|
76
|
+
@PluginMethod
|
|
77
|
+
public void openEditorChoicePage(PluginCall call) {
|
|
78
|
+
try {
|
|
79
|
+
String editorChoice = call.getString("editorChoice");
|
|
80
|
+
if (editorChoice == null || editorChoice.isEmpty()) {
|
|
81
|
+
call.reject("editorChoice is missing");
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
Context context = this.getContext();
|
|
86
|
+
Intent intent = new Intent(Intent.ACTION_VIEW);
|
|
87
|
+
intent.setData(Uri.parse("https://play.google.com/store/apps/topic?id=" + editorChoice));
|
|
88
|
+
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
89
|
+
context.startActivity(intent);
|
|
90
|
+
|
|
91
|
+
call.resolve();
|
|
92
|
+
} catch (Exception ex) {
|
|
93
|
+
call.reject(ex.getLocalizedMessage());
|
|
94
|
+
}
|
|
103
95
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
call.resolve();
|
|
124
|
-
} catch (Exception ex) {
|
|
125
|
-
call.reject(ex.getLocalizedMessage());
|
|
96
|
+
|
|
97
|
+
@PluginMethod
|
|
98
|
+
public void search(PluginCall call) {
|
|
99
|
+
try {
|
|
100
|
+
String terms = call.getString("terms");
|
|
101
|
+
if (terms == null || terms.isEmpty()) {
|
|
102
|
+
call.reject("terms is missing");
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
Context context = this.getContext();
|
|
107
|
+
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=" + terms));
|
|
108
|
+
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
109
|
+
context.startActivity(intent);
|
|
110
|
+
|
|
111
|
+
call.resolve();
|
|
112
|
+
} catch (Exception ex) {
|
|
113
|
+
call.reject(ex.getLocalizedMessage());
|
|
114
|
+
}
|
|
126
115
|
}
|
|
127
|
-
}
|
|
128
116
|
}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { registerPlugin } from
|
|
2
|
-
const NativeMarket = registerPlugin(
|
|
3
|
-
web: () => import(
|
|
1
|
+
import { registerPlugin } from '@capacitor/core';
|
|
2
|
+
const NativeMarket = registerPlugin('NativeMarket', {
|
|
3
|
+
web: () => import('./web').then((m) => new m.NativeMarketWeb()),
|
|
4
4
|
});
|
|
5
|
-
export * from
|
|
5
|
+
export * from './definitions';
|
|
6
6
|
export { NativeMarket };
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WebPlugin } from
|
|
2
|
-
import type { NativeMarketPlugin } from
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
import type { NativeMarketPlugin } from './definitions';
|
|
3
3
|
export declare class NativeMarketWeb extends WebPlugin implements NativeMarketPlugin {
|
|
4
4
|
openStoreListing(options: {
|
|
5
5
|
appId: string;
|
package/dist/esm/web.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { WebPlugin } from
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
2
|
export class NativeMarketWeb extends WebPlugin {
|
|
3
3
|
openStoreListing(options) {
|
|
4
|
-
throw new Error(
|
|
4
|
+
throw new Error('Method not implemented.' + options);
|
|
5
5
|
}
|
|
6
6
|
openDevPage(options) {
|
|
7
|
-
throw new Error(
|
|
7
|
+
throw new Error('Method not implemented.' + options);
|
|
8
8
|
}
|
|
9
9
|
openCollection(options) {
|
|
10
|
-
throw new Error(
|
|
10
|
+
throw new Error('Method not implemented.' + options);
|
|
11
11
|
}
|
|
12
12
|
openEditorChoicePage(options) {
|
|
13
|
-
throw new Error(
|
|
13
|
+
throw new Error('Method not implemented.' + options);
|
|
14
14
|
}
|
|
15
15
|
search(options) {
|
|
16
|
-
throw new Error(
|
|
16
|
+
throw new Error('Method not implemented.' + options);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
//# sourceMappingURL=web.js.map
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C,gBAAgB,CAAC,OAA4C;QAC3D,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC,CAAC;IACvD,CAAC;IAED,WAAW,CAAC,OAA0B;QACpC,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC,CAAC;IACvD,CAAC;IAED,cAAc,CAAC,OAAyB;QACtC,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC,CAAC;IACvD,CAAC;IAED,oBAAoB,CAAC,OAAiC;QACpD,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,OAA0B;QAC/B,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC,CAAC;IACvD,CAAC;CACF"}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
var core = require('@capacitor/core');
|
|
4
4
|
|
|
5
|
-
const NativeMarket = core.registerPlugin(
|
|
5
|
+
const NativeMarket = core.registerPlugin('NativeMarket', {
|
|
6
6
|
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.NativeMarketWeb()),
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
class NativeMarketWeb extends core.WebPlugin {
|
|
10
10
|
openStoreListing(options) {
|
|
11
|
-
throw new Error(
|
|
11
|
+
throw new Error('Method not implemented.' + options);
|
|
12
12
|
}
|
|
13
13
|
openDevPage(options) {
|
|
14
|
-
throw new Error(
|
|
14
|
+
throw new Error('Method not implemented.' + options);
|
|
15
15
|
}
|
|
16
16
|
openCollection(options) {
|
|
17
|
-
throw new Error(
|
|
17
|
+
throw new Error('Method not implemented.' + options);
|
|
18
18
|
}
|
|
19
19
|
openEditorChoicePage(options) {
|
|
20
|
-
throw new Error(
|
|
20
|
+
throw new Error('Method not implemented.' + options);
|
|
21
21
|
}
|
|
22
22
|
search(options) {
|
|
23
|
-
throw new Error(
|
|
23
|
+
throw new Error('Method not implemented.' + options);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst NativeMarket = registerPlugin('NativeMarket', {\n web: () => import('./web').then((m) => new m.NativeMarketWeb()),\n});\nexport * from './definitions';\nexport { NativeMarket };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class NativeMarketWeb extends WebPlugin {\n openStoreListing(options) {\n throw new Error('Method not implemented.' + options);\n }\n openDevPage(options) {\n throw new Error('Method not implemented.' + options);\n }\n openCollection(options) {\n throw new Error('Method not implemented.' + options);\n }\n openEditorChoicePage(options) {\n throw new Error('Method not implemented.' + options);\n }\n search(options) {\n throw new Error('Method not implemented.' + options);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,YAAY,GAAGA,mBAAc,CAAC,cAAc,EAAE;AACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACnE,CAAC;;ACFM,MAAM,eAAe,SAASC,cAAS,CAAC;AAC/C,IAAI,gBAAgB,CAAC,OAAO,EAAE;AAC9B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC;AAC5D;AACA,IAAI,WAAW,CAAC,OAAO,EAAE;AACzB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC;AAC5D;AACA,IAAI,cAAc,CAAC,OAAO,EAAE;AAC5B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC;AAC5D;AACA,IAAI,oBAAoB,CAAC,OAAO,EAAE;AAClC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC;AAC5D;AACA,IAAI,MAAM,CAAC,OAAO,EAAE;AACpB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC;AAC5D;AACA;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
var capacitorCapacitorUpdater = (function (exports, core) {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
const NativeMarket = core.registerPlugin(
|
|
4
|
+
const NativeMarket = core.registerPlugin('NativeMarket', {
|
|
5
5
|
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.NativeMarketWeb()),
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
class NativeMarketWeb extends core.WebPlugin {
|
|
9
9
|
openStoreListing(options) {
|
|
10
|
-
throw new Error(
|
|
10
|
+
throw new Error('Method not implemented.' + options);
|
|
11
11
|
}
|
|
12
12
|
openDevPage(options) {
|
|
13
|
-
throw new Error(
|
|
13
|
+
throw new Error('Method not implemented.' + options);
|
|
14
14
|
}
|
|
15
15
|
openCollection(options) {
|
|
16
|
-
throw new Error(
|
|
16
|
+
throw new Error('Method not implemented.' + options);
|
|
17
17
|
}
|
|
18
18
|
openEditorChoicePage(options) {
|
|
19
|
-
throw new Error(
|
|
19
|
+
throw new Error('Method not implemented.' + options);
|
|
20
20
|
}
|
|
21
21
|
search(options) {
|
|
22
|
-
throw new Error(
|
|
22
|
+
throw new Error('Method not implemented.' + options);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst NativeMarket = registerPlugin('NativeMarket', {\n web: () => import('./web').then((m) => new m.NativeMarketWeb()),\n});\nexport * from './definitions';\nexport { NativeMarket };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class NativeMarketWeb extends WebPlugin {\n openStoreListing(options) {\n throw new Error('Method not implemented.' + options);\n }\n openDevPage(options) {\n throw new Error('Method not implemented.' + options);\n }\n openCollection(options) {\n throw new Error('Method not implemented.' + options);\n }\n openEditorChoicePage(options) {\n throw new Error('Method not implemented.' + options);\n }\n search(options) {\n throw new Error('Method not implemented.' + options);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,YAAY,GAAGA,mBAAc,CAAC,cAAc,EAAE;IACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACnE,CAAC;;ICFM,MAAM,eAAe,SAASC,cAAS,CAAC;IAC/C,IAAI,gBAAgB,CAAC,OAAO,EAAE;IAC9B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC;IAC5D;IACA,IAAI,WAAW,CAAC,OAAO,EAAE;IACzB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC;IAC5D;IACA,IAAI,cAAc,CAAC,OAAO,EAAE;IAC5B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC;IAC5D;IACA,IAAI,oBAAoB,CAAC,OAAO,EAAE;IAClC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC;IAC5D;IACA,IAAI,MAAM,CAAC,OAAO,EAAE;IACpB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,OAAO,CAAC;IAC5D;IACA;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import XCTest
|
|
2
|
+
@testable import NativeMarketPlugin
|
|
3
|
+
|
|
4
|
+
final class NativeMarketPluginTests: XCTestCase {
|
|
5
|
+
func testApiResultDecoding() throws {
|
|
6
|
+
let payload = """
|
|
7
|
+
{
|
|
8
|
+
"resultCount": 1,
|
|
9
|
+
"results": [
|
|
10
|
+
{ "trackId": 42 }
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
""".data(using: .utf8)!
|
|
14
|
+
|
|
15
|
+
let decoded = try JSONDecoder().decode(APIResult.self, from: payload)
|
|
16
|
+
|
|
17
|
+
XCTAssertEqual(decoded.resultCount, 1)
|
|
18
|
+
XCTAssertEqual(decoded.apps.first?.trackId, 42)
|
|
19
|
+
}
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/native-market",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.15",
|
|
4
4
|
"description": "A native market plugin for linking to google play or app store.",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
|
-
"main": "dist/
|
|
6
|
+
"main": "dist/plugin.cjs.js",
|
|
7
7
|
"types": "dist/esm/index.d.ts",
|
|
8
8
|
"author": "Martin Donadieu <martin@capgo.app>",
|
|
9
9
|
"license": "MIT",
|
|
@@ -21,15 +21,24 @@
|
|
|
21
21
|
"google play",
|
|
22
22
|
"app store"
|
|
23
23
|
],
|
|
24
|
+
"files": [
|
|
25
|
+
"android/src/main/",
|
|
26
|
+
"android/build.gradle",
|
|
27
|
+
"dist/",
|
|
28
|
+
"ios/Sources",
|
|
29
|
+
"ios/Tests",
|
|
30
|
+
"Package.swift",
|
|
31
|
+
"CapgoNativeMarket.podspec"
|
|
32
|
+
],
|
|
24
33
|
"scripts": {
|
|
25
34
|
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
26
|
-
"verify:ios": "
|
|
35
|
+
"verify:ios": "xcodebuild -scheme CapgoNativeMarket -destination generic/platform=iOS",
|
|
27
36
|
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
28
37
|
"verify:web": "npm run build",
|
|
29
38
|
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
30
39
|
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --autocorrect --format",
|
|
31
40
|
"eslint": "eslint .",
|
|
32
|
-
"prettier": "prettier
|
|
41
|
+
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
33
42
|
"swiftlint": "node-swiftlint",
|
|
34
43
|
"docgen": "docgen --api NativeMarketPlugin --output-readme README.md --output-json dist/docs.json",
|
|
35
44
|
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
package/.github/FUNDING.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
github: riderx
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 🚨 Bug Report
|
|
3
|
-
about: Report something not working
|
|
4
|
-
title: 'bug: '
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Bug Report
|
|
11
|
-
|
|
12
|
-
### Capacitor Version
|
|
13
|
-
<!--
|
|
14
|
-
Paste the output from the `npx cap doctor` command into the code block below. This will provide the versions of Capacitor packages and related dependencies.
|
|
15
|
-
-->
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
PASTE OUTPUT HERE
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Plugin Version
|
|
22
|
-
<!--
|
|
23
|
-
Paste the output from the `npx @capgo/cli@latest doctor` command into the code block below. This will provide the versions of Capacitor updater package.
|
|
24
|
-
-->
|
|
25
|
-
```
|
|
26
|
-
PASTE OUTPUT HERE
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### context(s)
|
|
30
|
-
<!--
|
|
31
|
-
Please change the value acording to your context
|
|
32
|
-
-->
|
|
33
|
-
```md
|
|
34
|
-
ManualModel: false
|
|
35
|
-
AutoMode: false
|
|
36
|
-
CapgoCloud: false
|
|
37
|
-
OnPremise: false
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Platform(s)
|
|
41
|
-
<!--
|
|
42
|
-
List the platforms that this bug affects.
|
|
43
|
-
-->
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
### Current Behavior
|
|
48
|
-
<!--
|
|
49
|
-
Describe how the bug manifests. Be specific.
|
|
50
|
-
-->
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
### Expected Behavior
|
|
55
|
-
<!--
|
|
56
|
-
Describe what the behavior should be.
|
|
57
|
-
-->
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
### Code Reproduction
|
|
62
|
-
<!--
|
|
63
|
-
To isolate the cause of the problem, we ask you to provide a minimal sample application that demonstrates the issue.
|
|
64
|
-
For full instructions, see: https://github.com/ionic-team/capacitor/blob/HEAD/CONTRIBUTING.md#creating-a-code-reproduction
|
|
65
|
-
-->
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
### Other Technical Details
|
|
70
|
-
<!--
|
|
71
|
-
Please provide the following information with your request and any other relevant technical details (versions of IDEs, local environment info, plugin information or links, etc).
|
|
72
|
-
-->
|
|
73
|
-
|
|
74
|
-
`npm --version` output:
|
|
75
|
-
|
|
76
|
-
`node --version` output:
|
|
77
|
-
|
|
78
|
-
`pod --version` output (iOS issues only):
|
|
79
|
-
|
|
80
|
-
### Additional Context
|
|
81
|
-
<!--
|
|
82
|
-
List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc.
|
|
83
|
-
-->
|
|
84
|
-
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ⚡️ Feature Request
|
|
3
|
-
about: Request a feature or change
|
|
4
|
-
title: 'feat: '
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Feature Request
|
|
11
|
-
|
|
12
|
-
### Description
|
|
13
|
-
<!--
|
|
14
|
-
Describe the feature request. If your feature request is related to a problem, be sure to describe that as well.
|
|
15
|
-
-->
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
### Platform(s)
|
|
20
|
-
<!--
|
|
21
|
-
List the platforms for which this feature should be added.
|
|
22
|
-
-->
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
### Preferred Solution
|
|
27
|
-
<!-- Describe the solution you would prefer. -->
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
### Alternatives
|
|
32
|
-
<!-- Describe alternative solutions or features you've considered, if any. -->
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
### Additional Context
|
|
37
|
-
<!--
|
|
38
|
-
List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc.
|
|
39
|
-
-->
|
|
40
|
-
|
|
41
|
-
|