capacitor-hugin-gmp3 0.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Ana plugin arayüzü. Hugin printer ile iletişim sağlayan tüm metodları tanımlar.\n */\nexport interface CapacitorHuginGMP3Plugin {\n /**\n * Kütüphane sürümünü döner.\n */\n GetLibraryVersion(): Promise<{ version: string }>;\n\n /**\n * Cihaza bağlantı kurar.\n * @param options Bağlantı bilgileri.\n */\n Connect(options: ConnectOptions): Promise<{ connected: boolean }>;\n\n /**\n * Satış işlemi başlatır.\n * @param options Satış nesnesi (JSON string olarak).\n */\n Sale(options: { saleItem: SaleItem }): Promise<{ orderNo?: number; result: boolean; message?: string }>;\n\n /**\n * X raporu yazdırır.\n * @param type Rapor tipi (1 | 2 | 3).\n */\n PrintXReport(type: 1 | 2 | 3): Promise<{ result: boolean; message: string }>;\n\n /**\n * Z raporu yazdırır.\n */\n PrintZReport(): Promise<{ result: boolean }>;\n\n /**\n * Kayıtlı KDV oranlarını getirir.\n */\n GetVatRates(): Promise<string[]>;\n\n /**\n * Tanımlı departmanları getirir.\n */\n GetDepartments(): Promise<Department[]>;\n\n /**\n * Departman ekler veya günceller.\n * @param Department Departman bilgileri.\n */\n SetDepartment(Department: Department): Promise<{ result: boolean }>;\n\n /**\n * Belirli bir KDV oranını ayarlar.\n * @param vatRate KDV oran bilgisi.\n */\n SetVatRate(vatRate: VatRate): Promise<{ result: boolean }>;\n}\n\n/**\n * Bağlantı ayarları.\n */\nexport interface ConnectOptions {\n /** Terminal numarası (seri numara). */\n terminalNo: string;\n /** Cihaz IP adresi. */\n ip: string;\n /** Cihaz port numarası. */\n port: number;\n}\n\n/**\n * KDV oran bilgisi.\n */\nexport interface VatRate {\n /** KDV index (0-7). */\n index: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;\n /** KDV oranı (%). */\n vatRate: number; // 0.00 - 99.99\n}\n\n/**\n * Departman bilgisi.\n */\nexport interface Department {\n /** Departman ID (1-8). */\n id: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;\n /** Departman ismi. */\n name: string;\n /** Departmana atanmış KDV ID (1-8). */\n vatId: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;\n /** Fiyat (0 - 999.999,99). */\n price: number;\n /** Tartılabilir mi? 0 = tartılamaz, 1 = tartılabilir. */\n weighable: 0 | 1;\n /** Opsiyonel limit. (Eğer varsa) */\n limit?: number;\n}\n\n/**\n * Satış bilgisi.\n */\nexport interface SaleItem {\n /** Satışta yer alan ürünler. */\n FiscalItems: FiscalItem[];\n /** Satışa uygulanan indirimler. */\n Adjustments: Adj[];\n /** Ödeme bilgileri. */\n Payments: Payment[];\n /** Fiş altı notları. */\n FooterNotes: string[];\n /** Fiş kapanış bilgisi. */\n EndOfReceiptInfo: EndOfReceiptInfo;\n}\n\n/**\n * Fiş kapanış bilgileri.\n */\ninterface EndOfReceiptInfo {\n /** Fişi kapat. */\n CloseReceiptFlag: boolean;\n /** Barkod basılsın mı? */\n BarcodeFlag: boolean;\n /** Barkod numarası. */\n Barcode: string | null;\n}\n\n/**\n * Ödeme bilgileri.\n */\ninterface Payment {\n /** Ödeme tipi (örn: nakit, kredi). */\n Type: number;\n /** Ödeme indexi. */\n Index: number;\n /** Ödenen toplam tutar. */\n PaidTotal: number;\n /** EFT ile mi yapıldı? */\n viaByEFT: boolean;\n /** Sıra numarası. */\n SequenceNo: number;\n}\n\n/**\n * Satışta yer alan ürün bilgisi.\n */\ninterface FiscalItem {\n /** Ürün ID. */\n Id: number;\n /** Miktar. */\n Quantity: number;\n /** Fiyat. */\n Price: number;\n /** Ürün adı. */\n Name: string;\n /** Departman ID. */\n DeptId: number;\n /** Ürün durumu. */\n Status: number;\n /** Ürüne özel indirim. */\n Adj: Adj | null;\n /** Not satırı 1. */\n NoteLine1: string | null;\n /** Not satırı 2. */\n NoteLine2: string | null;\n}\n\n/**\n * İndirim bilgisi.\n */\ninterface Adj {\n /** İndirim tipi. */\n Type: number;\n /** İndirim tutarı. */\n Amount: number;\n /** İndirim yüzdesi. */\n percentage: number;\n /** Not satırı 1. */\n NoteLine1: string | null;\n /** Not satırı 2. */\n NoteLine2: string | null;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { CapacitorHuginGMP3Plugin } from './definitions';
2
+ declare const CapacitorHuginGMP3: CapacitorHuginGMP3Plugin;
3
+ export * from './definitions';
4
+ export { CapacitorHuginGMP3 };
@@ -0,0 +1,7 @@
1
+ import { registerPlugin } from '@capacitor/core';
2
+ const CapacitorHuginGMP3 = registerPlugin('CapacitorHuginGMP3', {
3
+ web: () => import('./web').then((m) => new m.CapacitorHuginGMP3Web()),
4
+ });
5
+ export * from './definitions';
6
+ export { CapacitorHuginGMP3 };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,kBAAkB,GAAG,cAAc,CAA2B,oBAAoB,EAAE;IACxF,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;CACtE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { CapacitorHuginGMP3Plugin } from './definitions';\n\nconst CapacitorHuginGMP3 = registerPlugin<CapacitorHuginGMP3Plugin>('CapacitorHuginGMP3', {\n web: () => import('./web').then((m) => new m.CapacitorHuginGMP3Web()),\n});\n\nexport * from './definitions';\nexport { CapacitorHuginGMP3 };\n"]}
@@ -0,0 +1,32 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ import type { ConnectOptions, CapacitorHuginGMP3Plugin, Department, VatRate, SaleItem } from './definitions';
3
+ export declare class CapacitorHuginGMP3Web extends WebPlugin implements CapacitorHuginGMP3Plugin {
4
+ Sale(options: {
5
+ saleItem: SaleItem;
6
+ }): Promise<{
7
+ orderNo?: number;
8
+ result: boolean;
9
+ message?: string;
10
+ }>;
11
+ GetVatRates(): Promise<string[]>;
12
+ GetDepartments(): Promise<Department[]>;
13
+ SetDepartment(Department: Department): Promise<{
14
+ result: boolean;
15
+ }>;
16
+ SetVatRate(vatRate: VatRate): Promise<{
17
+ result: boolean;
18
+ }>;
19
+ PrintXReport(type: number): Promise<{
20
+ result: boolean;
21
+ message: string;
22
+ }>;
23
+ PrintZReport(): Promise<{
24
+ result: boolean;
25
+ }>;
26
+ Connect(options: ConnectOptions): Promise<{
27
+ connected: boolean;
28
+ }>;
29
+ GetLibraryVersion(): Promise<{
30
+ version: string;
31
+ }>;
32
+ }
@@ -0,0 +1,36 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ export class CapacitorHuginGMP3Web extends WebPlugin {
3
+ Sale(options) {
4
+ console.log('sale', options);
5
+ throw new Error('Method not implemented.');
6
+ }
7
+ GetVatRates() {
8
+ throw new Error('Method not implemented.');
9
+ }
10
+ GetDepartments() {
11
+ throw new Error('Method not implemented.');
12
+ }
13
+ SetDepartment(Department) {
14
+ console.log('setDepartment', Department);
15
+ throw new Error('Method not implemented.');
16
+ }
17
+ SetVatRate(vatRate) {
18
+ console.log('setVatRate', vatRate);
19
+ throw new Error('Method not implemented.');
20
+ }
21
+ PrintXReport(type) {
22
+ console.log('printXReport', type);
23
+ throw new Error('Method not implemented.');
24
+ }
25
+ PrintZReport() {
26
+ throw new Error('Method not implemented.');
27
+ }
28
+ Connect(options) {
29
+ console.log('connect', options);
30
+ throw new Error('Method not implemented.');
31
+ }
32
+ GetLibraryVersion() {
33
+ throw new Error('Method not implemented.');
34
+ }
35
+ }
36
+ //# sourceMappingURL=web.js.map
@@ -0,0 +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,qBAAsB,SAAQ,SAAS;IAClD,IAAI,CAAC,OAAgC;QACnC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,WAAW;QACT,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,cAAc;QACZ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,aAAa,CAAC,UAAsB;QAClC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;QACzC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,UAAU,CAAC,OAAgB;QACzB,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,YAAY,CAAC,IAAW;QACtB,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,YAAY;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,CAAC,OAAuB;QAC7B,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,iBAAiB;QACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { ConnectOptions, CapacitorHuginGMP3Plugin, Department, VatRate, SaleItem } from './definitions';\n\nexport class CapacitorHuginGMP3Web extends WebPlugin implements CapacitorHuginGMP3Plugin {\n Sale(options: { saleItem: SaleItem; }): Promise<{ orderNo?: number, result: boolean, message?: string; }> {\n console.log('sale', options);\n throw new Error('Method not implemented.');\n }\n GetVatRates(): Promise<string[]> {\n throw new Error('Method not implemented.');\n }\n GetDepartments(): Promise<Department[]> {\n throw new Error('Method not implemented.');\n }\n SetDepartment(Department: Department): Promise<{ result: boolean; }> {\n console.log('setDepartment', Department);\n throw new Error('Method not implemented.');\n }\n SetVatRate(vatRate: VatRate): Promise<{ result: boolean; }> {\n console.log('setVatRate', vatRate);\n throw new Error('Method not implemented.');\n }\n PrintXReport(type:number): Promise<{ result: boolean, message: string }> {\n console.log('printXReport', type);\n throw new Error('Method not implemented.');\n }\n PrintZReport(): Promise<{ result: boolean }> {\n throw new Error('Method not implemented.');\n }\n Connect(options: ConnectOptions): Promise<{ connected: boolean }> {\n console.log('connect', options);\n throw new Error('Method not implemented.');\n }\n GetLibraryVersion(): Promise<{ version: string }> {\n throw new Error('Method not implemented.');\n }\n}\n"]}
@@ -0,0 +1,50 @@
1
+ 'use strict';
2
+
3
+ var core = require('@capacitor/core');
4
+
5
+ const CapacitorHuginGMP3 = core.registerPlugin('CapacitorHuginGMP3', {
6
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorHuginGMP3Web()),
7
+ });
8
+
9
+ class CapacitorHuginGMP3Web extends core.WebPlugin {
10
+ Sale(options) {
11
+ console.log('sale', options);
12
+ throw new Error('Method not implemented.');
13
+ }
14
+ GetVatRates() {
15
+ throw new Error('Method not implemented.');
16
+ }
17
+ GetDepartments() {
18
+ throw new Error('Method not implemented.');
19
+ }
20
+ SetDepartment(Department) {
21
+ console.log('setDepartment', Department);
22
+ throw new Error('Method not implemented.');
23
+ }
24
+ SetVatRate(vatRate) {
25
+ console.log('setVatRate', vatRate);
26
+ throw new Error('Method not implemented.');
27
+ }
28
+ PrintXReport(type) {
29
+ console.log('printXReport', type);
30
+ throw new Error('Method not implemented.');
31
+ }
32
+ PrintZReport() {
33
+ throw new Error('Method not implemented.');
34
+ }
35
+ Connect(options) {
36
+ console.log('connect', options);
37
+ throw new Error('Method not implemented.');
38
+ }
39
+ GetLibraryVersion() {
40
+ throw new Error('Method not implemented.');
41
+ }
42
+ }
43
+
44
+ var web = /*#__PURE__*/Object.freeze({
45
+ __proto__: null,
46
+ CapacitorHuginGMP3Web: CapacitorHuginGMP3Web
47
+ });
48
+
49
+ exports.CapacitorHuginGMP3 = CapacitorHuginGMP3;
50
+ //# sourceMappingURL=plugin.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorHuginGMP3 = registerPlugin('CapacitorHuginGMP3', {\n web: () => import('./web').then((m) => new m.CapacitorHuginGMP3Web()),\n});\nexport * from './definitions';\nexport { CapacitorHuginGMP3 };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorHuginGMP3Web extends WebPlugin {\n Sale(options) {\n console.log('sale', options);\n throw new Error('Method not implemented.');\n }\n GetVatRates() {\n throw new Error('Method not implemented.');\n }\n GetDepartments() {\n throw new Error('Method not implemented.');\n }\n SetDepartment(Department) {\n console.log('setDepartment', Department);\n throw new Error('Method not implemented.');\n }\n SetVatRate(vatRate) {\n console.log('setVatRate', vatRate);\n throw new Error('Method not implemented.');\n }\n PrintXReport(type) {\n console.log('printXReport', type);\n throw new Error('Method not implemented.');\n }\n PrintZReport() {\n throw new Error('Method not implemented.');\n }\n Connect(options) {\n console.log('connect', options);\n throw new Error('Method not implemented.');\n }\n GetLibraryVersion() {\n throw new Error('Method not implemented.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,kBAAkB,GAAGA,mBAAc,CAAC,oBAAoB,EAAE;AAChE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;AACzE,CAAC;;ACFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;AACrD,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;AACpC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA,IAAI,WAAW,GAAG;AAClB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA,IAAI,cAAc,GAAG;AACrB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA,IAAI,aAAa,CAAC,UAAU,EAAE;AAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,CAAC;AAChD,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA,IAAI,UAAU,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC;AAC1C,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA,IAAI,YAAY,CAAC,IAAI,EAAE;AACvB,QAAQ,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC;AACzC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA,IAAI,YAAY,GAAG;AACnB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA,IAAI,OAAO,CAAC,OAAO,EAAE;AACrB,QAAQ,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC;AACvC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA,IAAI,iBAAiB,GAAG;AACxB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA;;;;;;;;;"}
package/dist/plugin.js ADDED
@@ -0,0 +1,53 @@
1
+ var capacitorCapacitorHuginGMP3 = (function (exports, core) {
2
+ 'use strict';
3
+
4
+ const CapacitorHuginGMP3 = core.registerPlugin('CapacitorHuginGMP3', {
5
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorHuginGMP3Web()),
6
+ });
7
+
8
+ class CapacitorHuginGMP3Web extends core.WebPlugin {
9
+ Sale(options) {
10
+ console.log('sale', options);
11
+ throw new Error('Method not implemented.');
12
+ }
13
+ GetVatRates() {
14
+ throw new Error('Method not implemented.');
15
+ }
16
+ GetDepartments() {
17
+ throw new Error('Method not implemented.');
18
+ }
19
+ SetDepartment(Department) {
20
+ console.log('setDepartment', Department);
21
+ throw new Error('Method not implemented.');
22
+ }
23
+ SetVatRate(vatRate) {
24
+ console.log('setVatRate', vatRate);
25
+ throw new Error('Method not implemented.');
26
+ }
27
+ PrintXReport(type) {
28
+ console.log('printXReport', type);
29
+ throw new Error('Method not implemented.');
30
+ }
31
+ PrintZReport() {
32
+ throw new Error('Method not implemented.');
33
+ }
34
+ Connect(options) {
35
+ console.log('connect', options);
36
+ throw new Error('Method not implemented.');
37
+ }
38
+ GetLibraryVersion() {
39
+ throw new Error('Method not implemented.');
40
+ }
41
+ }
42
+
43
+ var web = /*#__PURE__*/Object.freeze({
44
+ __proto__: null,
45
+ CapacitorHuginGMP3Web: CapacitorHuginGMP3Web
46
+ });
47
+
48
+ exports.CapacitorHuginGMP3 = CapacitorHuginGMP3;
49
+
50
+ return exports;
51
+
52
+ })({}, capacitorExports);
53
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorHuginGMP3 = registerPlugin('CapacitorHuginGMP3', {\n web: () => import('./web').then((m) => new m.CapacitorHuginGMP3Web()),\n});\nexport * from './definitions';\nexport { CapacitorHuginGMP3 };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorHuginGMP3Web extends WebPlugin {\n Sale(options) {\n console.log('sale', options);\n throw new Error('Method not implemented.');\n }\n GetVatRates() {\n throw new Error('Method not implemented.');\n }\n GetDepartments() {\n throw new Error('Method not implemented.');\n }\n SetDepartment(Department) {\n console.log('setDepartment', Department);\n throw new Error('Method not implemented.');\n }\n SetVatRate(vatRate) {\n console.log('setVatRate', vatRate);\n throw new Error('Method not implemented.');\n }\n PrintXReport(type) {\n console.log('printXReport', type);\n throw new Error('Method not implemented.');\n }\n PrintZReport() {\n throw new Error('Method not implemented.');\n }\n Connect(options) {\n console.log('connect', options);\n throw new Error('Method not implemented.');\n }\n GetLibraryVersion() {\n throw new Error('Method not implemented.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,kBAAkB,GAAGA,mBAAc,CAAC,oBAAoB,EAAE;IAChE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;IACzE,CAAC;;ICFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;IACrD,IAAI,IAAI,CAAC,OAAO,EAAE;IAClB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IACpC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,WAAW,GAAG;IAClB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,cAAc,GAAG;IACrB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,aAAa,CAAC,UAAU,EAAE;IAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,CAAC;IAChD,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,UAAU,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC;IAC1C,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,YAAY,CAAC,IAAI,EAAE;IACvB,QAAQ,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC;IACzC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,YAAY,GAAG;IACnB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,OAAO,CAAC,OAAO,EAAE;IACrB,QAAQ,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC;IACvC,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,iBAAiB,GAAG;IACxB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA;;;;;;;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ import Foundation
2
+
3
+ @objc public class HuginGMP3: NSObject {
4
+ @objc public func echo(_ value: String) -> String {
5
+ print(value)
6
+ return value
7
+ }
8
+ }
@@ -0,0 +1,23 @@
1
+ import Foundation
2
+ import Capacitor
3
+
4
+ /**
5
+ * Please read the Capacitor iOS Plugin Development Guide
6
+ * here: https://capacitorjs.com/docs/plugins/ios
7
+ */
8
+ @objc(HuginGMP3Plugin)
9
+ public class HuginGMP3Plugin: CAPPlugin, CAPBridgedPlugin {
10
+ public let identifier = "HuginGMP3Plugin"
11
+ public let jsName = "HuginGMP3"
12
+ public let pluginMethods: [CAPPluginMethod] = [
13
+ CAPPluginMethod(name: "echo", returnType: CAPPluginReturnPromise)
14
+ ]
15
+ private let implementation = HuginGMP3()
16
+
17
+ @objc func echo(_ call: CAPPluginCall) {
18
+ let value = call.getString("value") ?? ""
19
+ call.resolve([
20
+ "value": implementation.echo(value)
21
+ ])
22
+ }
23
+ }
@@ -0,0 +1,15 @@
1
+ import XCTest
2
+ @testable import HuginGMP3Plugin
3
+
4
+ class HuginGMP3Tests: XCTestCase {
5
+ func testEcho() {
6
+ // This is an example of a functional test case for a plugin.
7
+ // Use XCTAssert and related functions to verify your tests produce the correct results.
8
+
9
+ let implementation = HuginGMP3()
10
+ let value = "Hello, World!"
11
+ let result = implementation.echo(value)
12
+
13
+ XCTAssertEqual(value, result)
14
+ }
15
+ }
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "capacitor-hugin-gmp3",
3
+ "version": "0.1.0",
4
+ "description": "Hugin plugin for TCP/IP",
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/build.gradle",
12
+ "dist/",
13
+ "ios/Sources",
14
+ "ios/Tests",
15
+ "Package.swift",
16
+ "CapacitorHuginGMP3Plugin.podspec"
17
+ ],
18
+ "author": "Kasım Yüksel KERZZ",
19
+ "license": "MIT",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https:/.git"
23
+ },
24
+ "bugs": {
25
+ "url": "https://issues"
26
+ },
27
+ "keywords": [
28
+ "capacitor",
29
+ "plugin",
30
+ "native"
31
+ ],
32
+ "scripts": {
33
+ "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
34
+ "verify:ios": "xcodebuild -scheme CapacitorHuginGMP3Plugin -destination generic/platform=iOS",
35
+ "verify:android": "cd android && ./gradlew clean build test && cd ..",
36
+ "verify:web": "npm run build",
37
+ "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
38
+ "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
39
+ "eslint": "eslint . --ext ts",
40
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
41
+ "swiftlint": "node-swiftlint",
42
+ "docgen": "docgen --api CapacitorHuginGMP3Plugin --output-readme README.md --output-json dist/docs.json",
43
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
44
+ "clean": "rimraf ./dist",
45
+ "watch": "tsc --watch",
46
+ "prepublishOnly": "npm run build"
47
+ },
48
+ "devDependencies": {
49
+ "@capacitor/android": "^7.0.0",
50
+ "@capacitor/core": "^7.0.0",
51
+ "@capacitor/docgen": "^0.3.0",
52
+ "@capacitor/ios": "^7.0.0",
53
+ "@ionic/eslint-config": "^0.4.0",
54
+ "@ionic/prettier-config": "^4.0.0",
55
+ "@ionic/swiftlint-config": "^2.0.0",
56
+ "eslint": "^8.57.0",
57
+ "prettier": "^3.4.2",
58
+ "prettier-plugin-java": "^2.6.6",
59
+ "rimraf": "^6.0.1",
60
+ "rollup": "^4.30.1",
61
+ "swiftlint": "^2.0.0",
62
+ "typescript": "~4.1.5"
63
+ },
64
+ "peerDependencies": {
65
+ "@capacitor/core": ">=7.0.0"
66
+ },
67
+ "prettier": "@ionic/prettier-config",
68
+ "swiftlint": "@ionic/swiftlint-config",
69
+ "eslintConfig": {
70
+ "extends": "@ionic/eslint-config/recommended"
71
+ },
72
+ "capacitor": {
73
+ "android": {
74
+ "src": "android"
75
+ }
76
+ }
77
+ }