@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.
Files changed (50) hide show
  1. package/CapgoNativeMarket.podspec +16 -12
  2. package/Package.swift +28 -0
  3. package/android/src/main/java/com/getcapacitor/community/nativemarket/NativeMarket.java +97 -109
  4. package/dist/esm/index.d.ts +2 -2
  5. package/dist/esm/index.js +4 -4
  6. package/dist/esm/web.d.ts +2 -2
  7. package/dist/esm/web.js +6 -6
  8. package/dist/esm/web.js.map +1 -1
  9. package/dist/plugin.cjs.js +6 -6
  10. package/dist/plugin.cjs.js.map +1 -1
  11. package/dist/plugin.js +6 -6
  12. package/dist/plugin.js.map +1 -1
  13. package/ios/Tests/NativeMarketPluginTests/NativeMarketPluginTests.swift +20 -0
  14. package/package.json +13 -4
  15. package/.eslintignore +0 -5
  16. package/.github/FUNDING.yml +0 -1
  17. package/.github/ISSUE_TEMPLATE/bug-report.md +0 -84
  18. package/.github/ISSUE_TEMPLATE/feature-request.md +0 -41
  19. package/.github/workflows/autofix.yml +0 -23
  20. package/.github/workflows/build.yml +0 -106
  21. package/.github/workflows/bump_version.yml +0 -57
  22. package/.github/workflows/test.yml +0 -58
  23. package/.prettierrc.js +0 -3
  24. package/CHANGELOG.md +0 -508
  25. package/PLUGIN_AUTHOR_README.md +0 -51
  26. package/android/.classpath +0 -6
  27. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  28. package/android/gradle/wrapper/gradle-wrapper.properties +0 -7
  29. package/android/gradle.properties +0 -20
  30. package/android/gradlew +0 -252
  31. package/android/gradlew.bat +0 -94
  32. package/android/proguard-rules.pro +0 -21
  33. package/android/settings.gradle +0 -2
  34. package/android/src/androidTest/java/com/getcapacitor/android/ExampleInstrumentedTest.java +0 -27
  35. package/android/src/test/java/com/getcapacitor/ExampleUnitTest.java +0 -18
  36. package/bun.lock +0 -820
  37. package/ios/Plugin/Info.plist +0 -24
  38. package/ios/Plugin.xcodeproj/project.pbxproj +0 -548
  39. package/ios/Plugin.xcworkspace/contents.xcworkspacedata +0 -10
  40. package/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  41. package/ios/PluginTests/Info.plist +0 -22
  42. package/ios/PluginTests/PluginTests.swift +0 -25
  43. package/ios/Podfile +0 -16
  44. package/renovate.json +0 -53
  45. package/rollup.config.mjs +0 -22
  46. package/src/definitions.ts +0 -58
  47. package/src/index.ts +0 -10
  48. package/src/web.ts +0 -28
  49. package/tsconfig.json +0 -19
  50. /package/ios/{Plugin/Plugin.swift → Sources/NativeMarketPlugin/NativeMarketPlugin.swift} +0 -0
@@ -1,13 +1,17 @@
1
+ require 'json'
1
2
 
2
- Pod::Spec.new do |s|
3
- s.name = 'CapgoNativeMarket'
4
- s.version = '0.0.1'
5
- s.summary = 'A native market plugin for linking to google play / Apple store.'
6
- s.license = 'MIT'
7
- s.homepage = 'https://github.com/Cap-go/native-market'
8
- s.author = 'Priyank Patel <priyank.patel@stackspace.ca>'
9
- s.source = { :git => 'https://github.com/Cap-go/native-market', :tag => s.version.to_s }
10
- s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
11
- s.ios.deployment_target = '14.0'
12
- s.dependency 'Capacitor'
13
- end
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
- @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(
25
- Intent.ACTION_VIEW,
26
- Uri.parse("market://details?id=" + appId)
27
- );
28
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
29
- context.startActivity(intent);
30
-
31
- call.resolve();
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
- @PluginMethod
38
- public void openDevPage(PluginCall call) {
39
- try {
40
- String devId = call.getString("devId");
41
- if (devId == null || devId.isEmpty()) {
42
- call.reject("devId is missing");
43
- return;
44
- }
45
-
46
- Context context = this.getContext();
47
- Intent intent = new Intent(Intent.ACTION_VIEW);
48
- intent.setData(
49
- Uri.parse("https://play.google.com/store/apps/dev?id=" + devId)
50
- );
51
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
52
- context.startActivity(intent);
53
-
54
- call.resolve();
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
- @PluginMethod
61
- public void openCollection(PluginCall call) {
62
- try {
63
- String name = call.getString("name");
64
- if (name == null || name.isEmpty()) {
65
- call.reject("name is missing");
66
- return;
67
- }
68
-
69
- Context context = this.getContext();
70
- Intent intent = new Intent(Intent.ACTION_VIEW);
71
- intent.setData(
72
- Uri.parse("https://play.google.com/store/apps/collection/" + name)
73
- );
74
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
75
- context.startActivity(intent);
76
-
77
- call.resolve();
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
- @PluginMethod
84
- public void openEditorChoicePage(PluginCall call) {
85
- try {
86
- String editorChoice = call.getString("editorChoice");
87
- if (editorChoice == null || editorChoice.isEmpty()) {
88
- call.reject("editorChoice is missing");
89
- return;
90
- }
91
-
92
- Context context = this.getContext();
93
- Intent intent = new Intent(Intent.ACTION_VIEW);
94
- intent.setData(
95
- Uri.parse("https://play.google.com/store/apps/topic?id=" + editorChoice)
96
- );
97
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
98
- context.startActivity(intent);
99
-
100
- call.resolve();
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
- @PluginMethod
107
- public void search(PluginCall call) {
108
- try {
109
- String terms = call.getString("terms");
110
- if (terms == null || terms.isEmpty()) {
111
- call.reject("terms is missing");
112
- return;
113
- }
114
-
115
- Context context = this.getContext();
116
- Intent intent = new Intent(
117
- Intent.ACTION_VIEW,
118
- Uri.parse("market://search?q=" + terms)
119
- );
120
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
121
- context.startActivity(intent);
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
  }
@@ -1,4 +1,4 @@
1
- import type { NativeMarketPlugin } from "./definitions";
1
+ import type { NativeMarketPlugin } from './definitions';
2
2
  declare const NativeMarket: NativeMarketPlugin;
3
- export * from "./definitions";
3
+ export * from './definitions';
4
4
  export { NativeMarket };
package/dist/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { registerPlugin } from "@capacitor/core";
2
- const NativeMarket = registerPlugin("NativeMarket", {
3
- web: () => import("./web").then((m) => new m.NativeMarketWeb()),
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 "./definitions";
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 "@capacitor/core";
2
- import type { NativeMarketPlugin } from "./definitions";
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 "@capacitor/core";
1
+ import { WebPlugin } from '@capacitor/core';
2
2
  export class NativeMarketWeb extends WebPlugin {
3
3
  openStoreListing(options) {
4
- throw new Error("Method not implemented." + options);
4
+ throw new Error('Method not implemented.' + options);
5
5
  }
6
6
  openDevPage(options) {
7
- throw new Error("Method not implemented." + options);
7
+ throw new Error('Method not implemented.' + options);
8
8
  }
9
9
  openCollection(options) {
10
- throw new Error("Method not implemented." + options);
10
+ throw new Error('Method not implemented.' + options);
11
11
  }
12
12
  openEditorChoicePage(options) {
13
- throw new Error("Method not implemented." + options);
13
+ throw new Error('Method not implemented.' + options);
14
14
  }
15
15
  search(options) {
16
- throw new Error("Method not implemented." + options);
16
+ throw new Error('Method not implemented.' + options);
17
17
  }
18
18
  }
19
19
  //# sourceMappingURL=web.js.map
@@ -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,OAGhB;QACC,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"}
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"}
@@ -2,25 +2,25 @@
2
2
 
3
3
  var core = require('@capacitor/core');
4
4
 
5
- const NativeMarket = core.registerPlugin("NativeMarket", {
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("Method not implemented." + options);
11
+ throw new Error('Method not implemented.' + options);
12
12
  }
13
13
  openDevPage(options) {
14
- throw new Error("Method not implemented." + options);
14
+ throw new Error('Method not implemented.' + options);
15
15
  }
16
16
  openCollection(options) {
17
- throw new Error("Method not implemented." + options);
17
+ throw new Error('Method not implemented.' + options);
18
18
  }
19
19
  openEditorChoicePage(options) {
20
- throw new Error("Method not implemented." + options);
20
+ throw new Error('Method not implemented.' + options);
21
21
  }
22
22
  search(options) {
23
- throw new Error("Method not implemented." + options);
23
+ throw new Error('Method not implemented.' + options);
24
24
  }
25
25
  }
26
26
 
@@ -1 +1 @@
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;;;;;;;;;"}
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("NativeMarket", {
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("Method not implemented." + options);
10
+ throw new Error('Method not implemented.' + options);
11
11
  }
12
12
  openDevPage(options) {
13
- throw new Error("Method not implemented." + options);
13
+ throw new Error('Method not implemented.' + options);
14
14
  }
15
15
  openCollection(options) {
16
- throw new Error("Method not implemented." + options);
16
+ throw new Error('Method not implemented.' + options);
17
17
  }
18
18
  openEditorChoicePage(options) {
19
- throw new Error("Method not implemented." + options);
19
+ throw new Error('Method not implemented.' + options);
20
20
  }
21
21
  search(options) {
22
- throw new Error("Method not implemented." + options);
22
+ throw new Error('Method not implemented.' + options);
23
23
  }
24
24
  }
25
25
 
@@ -1 +1 @@
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;;;;;;;;;;;;;;;"}
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.9",
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/esm/index.js",
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": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -sdk iphoneos -scheme Plugin && cd ..",
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 --config .prettierrc.js \"**/*.{css,html,ts,js,java}\"",
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/.eslintignore DELETED
@@ -1,5 +0,0 @@
1
- build
2
- dist
3
- example
4
- examples
5
- docs
@@ -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
-