@simplymobile/capacitor-godex-printer 7.0.0 → 7.1.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/Package.swift ADDED
@@ -0,0 +1,28 @@
1
+ // swift-tools-version: 5.9
2
+ import PackageDescription
3
+
4
+ let package = Package(
5
+ name: "SimplymobileCapacitorGodexPrinter",
6
+ platforms: [.iOS(.v14)],
7
+ products: [
8
+ .library(
9
+ name: "SimplymobileCapacitorGodexPrinter",
10
+ targets: ["GodexPrinterPlugin"])
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: "GodexPrinterPlugin",
18
+ dependencies: [
19
+ .product(name: "Capacitor", package: "capacitor-swift-pm"),
20
+ .product(name: "Cordova", package: "capacitor-swift-pm")
21
+ ],
22
+ path: "ios/Sources/GodexPrinterPlugin"),
23
+ .testTarget(
24
+ name: "GodexPrinterPluginTests",
25
+ dependencies: ["GodexPrinterPlugin"],
26
+ path: "ios/Tests/GodexPrinterPluginTests")
27
+ ]
28
+ )
@@ -6,7 +6,12 @@ import Capacitor
6
6
  * here: https://capacitorjs.com/docs/plugins/ios
7
7
  */
8
8
  @objc(GodexPrinterPlugin)
9
- public class GodexPrinterPlugin: CAPPlugin {
9
+ public class GodexPrinterPlugin: CAPPlugin, CAPBridgedPlugin {
10
+ public let identifier = "GodexPrinterPlugin"
11
+ public let jsName = "GodexPrinter"
12
+ public let pluginMethods: [CAPPluginMethod] = [
13
+ CAPPluginMethod(name: "echo", returnType: CAPPluginReturnPromise),
14
+ ]
10
15
  private let implementation = GodexPrinter()
11
16
 
12
17
  @objc func echo(_ call: CAPPluginCall) {
@@ -0,0 +1,25 @@
1
+ import XCTest
2
+ @testable import Plugin
3
+
4
+ class GodexPrinterTests: XCTestCase {
5
+ override func setUp() {
6
+ super.setUp()
7
+ // Put setup code here. This method is called before the invocation of each test method in the class.
8
+ }
9
+
10
+ override func tearDown() {
11
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
12
+ super.tearDown()
13
+ }
14
+
15
+ func testEcho() {
16
+ // This is an example of a functional test case for a plugin.
17
+ // Use XCTAssert and related functions to verify your tests produce the correct results.
18
+
19
+ let implementation = GodexPrinter()
20
+ let value = "Hello, World!"
21
+ let result = implementation.echo(value)
22
+
23
+ XCTAssertEqual(value, result)
24
+ }
25
+ }
package/package.json CHANGED
@@ -1,79 +1,81 @@
1
- {
2
- "name": "@simplymobile/capacitor-godex-printer",
3
- "version": "7.0.0",
4
- "description": "Capacitor GoDEX printer plugin",
5
- "main": "dist/plugin.cjs.js",
6
- "module": "dist/esm/index.js",
7
- "types": "dist/esm/index.d.ts",
8
- "unpkg": "dist/plugin.js",
9
- "files": [
10
- "android/src/main/",
11
- "android/libs/",
12
- "android/build.gradle",
13
- "dist/",
14
- "ios/Plugin/",
15
- "SimplymobileCapacitorGodexPrinter.podspec"
16
- ],
17
- "author": "SimplyMobile",
18
- "license": "Apache-2.0",
19
- "repository": {
20
- "type": "git",
21
- "url": "git+https://github.com/.git"
22
- },
23
- "bugs": {
24
- "url": "https://github.com/issues"
25
- },
26
- "keywords": [
27
- "capacitor",
28
- "plugin",
29
- "native"
30
- ],
31
- "scripts": {
32
- "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
33
- "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
34
- "verify:android": "cd android && ./gradlew clean build test && cd ..",
35
- "verify:web": "npm run build",
36
- "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
37
- "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
38
- "eslint": "eslint . --ext ts",
39
- "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
40
- "swiftlint": "node-swiftlint",
41
- "docgen": "docgen --api GodexPrinterPlugin --output-readme README.md --output-json dist/docs.json",
42
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
43
- "clean": "rimraf ./dist",
44
- "watch": "tsc --watch",
45
- "prepublishOnly": "npm run build"
46
- },
47
- "devDependencies": {
48
- "@capacitor/android": "^7.0.0",
49
- "@capacitor/core": "^7.0.0",
50
- "@capacitor/docgen": "^0.3.0",
51
- "@capacitor/ios": "^7.0.0",
52
- "@ionic/eslint-config": "^0.4.0",
53
- "@ionic/prettier-config": "^4.0.0",
54
- "@ionic/swiftlint-config": "^2.0.0",
55
- "eslint": "^8.57.0",
56
- "prettier": "^3.4.2",
57
- "prettier-plugin-java": "^2.6.6",
58
- "rimraf": "^6.0.1",
59
- "rollup": "^4.30.1",
60
- "swiftlint": "^2.0.0",
61
- "typescript": "~4.1.6"
62
- },
63
- "peerDependencies": {
64
- "@capacitor/core": ">=7.0.0"
65
- },
66
- "prettier": "@ionic/prettier-config",
67
- "swiftlint": "@ionic/swiftlint-config",
68
- "eslintConfig": {
69
- "extends": "@ionic/eslint-config/recommended"
70
- },
71
- "capacitor": {
72
- "ios": {
73
- "src": "ios"
74
- },
75
- "android": {
76
- "src": "android"
77
- }
78
- }
79
- }
1
+ {
2
+ "module": "dist/esm/index.js",
3
+ "devDependencies": {
4
+ "typescript": "~4.1.6",
5
+ "@capacitor/docgen": "^0.3.0",
6
+ "@capacitor/core": "^7.0.0",
7
+ "rollup": "^4.30.1",
8
+ "@capacitor/ios": "^7.0.0",
9
+ "@ionic/swiftlint-config": "^2.0.0",
10
+ "rimraf": "^6.0.1",
11
+ "@ionic/prettier-config": "^4.0.0",
12
+ "swiftlint": "^2.0.0",
13
+ "@ionic/eslint-config": "^0.4.0",
14
+ "@capacitor/android": "^7.0.0",
15
+ "eslint": "^8.57.0",
16
+ "prettier-plugin-java": "^2.6.6",
17
+ "prettier": "^3.4.2"
18
+ },
19
+ "license": "Apache-2.0",
20
+ "peerDependencies": {
21
+ "@capacitor/core": ">=7.0.0"
22
+ },
23
+ "bugs": {
24
+ "url": "https://github.com/issues"
25
+ },
26
+ "swiftlint": "@ionic/swiftlint-config",
27
+ "keywords": [
28
+ "capacitor",
29
+ "plugin",
30
+ "native"
31
+ ],
32
+ "version": "7.1.0",
33
+ "eslintConfig": {
34
+ "extends": "@ionic/eslint-config/recommended"
35
+ },
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/.git"
39
+ },
40
+ "types": "dist/esm/index.d.ts",
41
+ "main": "dist/plugin.cjs.js",
42
+ "description": "Capacitor GoDEX printer plugin",
43
+ "capacitor": {
44
+ "android": {
45
+ "src": "android"
46
+ },
47
+ "ios": {
48
+ "src": "ios"
49
+ }
50
+ },
51
+ "files": [
52
+ "android/src/main/",
53
+ "android/libs/",
54
+ "android/build.gradle",
55
+ "dist/",
56
+ "SimplymobileCapacitorGodexPrinter.podspec",
57
+ "ios/Sources",
58
+ "ios/Tests",
59
+ "Package.swift"
60
+ ],
61
+ "author": "SimplyMobile",
62
+ "name": "@simplymobile/capacitor-godex-printer",
63
+ "scripts": {
64
+ "prepublishOnly": "npm run build",
65
+ "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
66
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
67
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
68
+ "clean": "rimraf ./dist",
69
+ "docgen": "docgen --api GodexPrinterPlugin --output-readme README.md --output-json dist/docs.json",
70
+ "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
71
+ "watch": "tsc --watch",
72
+ "swiftlint": "node-swiftlint",
73
+ "verify:web": "npm run build",
74
+ "verify:ios": "xcodebuild -scheme SimplymobileCapacitorGodexPrinter -destination generic/platform=iOS",
75
+ "eslint": "eslint . --ext ts",
76
+ "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
77
+ "verify:android": "cd android && ./gradlew clean build test && cd .."
78
+ },
79
+ "unpkg": "dist/plugin.js",
80
+ "prettier": "@ionic/prettier-config"
81
+ }
@@ -1,10 +0,0 @@
1
- #import <UIKit/UIKit.h>
2
-
3
- //! Project version number for Plugin.
4
- FOUNDATION_EXPORT double PluginVersionNumber;
5
-
6
- //! Project version string for Plugin.
7
- FOUNDATION_EXPORT const unsigned char PluginVersionString[];
8
-
9
- // In this header, you should import all the public headers of your framework using statements like #import <Plugin/PublicHeader.h>
10
-
@@ -1,8 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
- #import <Capacitor/Capacitor.h>
3
-
4
- // Define the plugin using the CAP_PLUGIN Macro, and
5
- // each method the plugin supports using the CAP_PLUGIN_METHOD macro.
6
- CAP_PLUGIN(GodexPrinterPlugin, "GodexPrinter",
7
- CAP_PLUGIN_METHOD(echo, CAPPluginReturnPromise);
8
- )
@@ -1,24 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>CFBundleDevelopmentRegion</key>
6
- <string>$(DEVELOPMENT_LANGUAGE)</string>
7
- <key>CFBundleExecutable</key>
8
- <string>$(EXECUTABLE_NAME)</string>
9
- <key>CFBundleIdentifier</key>
10
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
- <key>CFBundleInfoDictionaryVersion</key>
12
- <string>6.0</string>
13
- <key>CFBundleName</key>
14
- <string>$(PRODUCT_NAME)</string>
15
- <key>CFBundlePackageType</key>
16
- <string>FMWK</string>
17
- <key>CFBundleShortVersionString</key>
18
- <string>1.0</string>
19
- <key>CFBundleVersion</key>
20
- <string>$(CURRENT_PROJECT_VERSION)</string>
21
- <key>NSPrincipalClass</key>
22
- <string></string>
23
- </dict>
24
- </plist>