capacitor-event-bird 0.0.9 → 0.0.11
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/README.md +10 -0
- package/dist/docs.json +10 -0
- package/dist/esm/definitions.d.ts +1 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +1 -0
- package/dist/esm/web.js +3 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +3 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +3 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/CapacitorEventBirdPlugin/CapacitorEventBirdPlugin.swift +9 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ npx cap sync
|
|
|
15
15
|
|
|
16
16
|
* [`echo(...)`](#echo)
|
|
17
17
|
* [`logout()`](#logout)
|
|
18
|
+
* [`waitlistAfterInit()`](#waitlistafterinit)
|
|
18
19
|
|
|
19
20
|
</docgen-index>
|
|
20
21
|
|
|
@@ -44,4 +45,13 @@ logout() => Promise<void>
|
|
|
44
45
|
|
|
45
46
|
--------------------
|
|
46
47
|
|
|
48
|
+
|
|
49
|
+
### waitlistAfterInit()
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
waitlistAfterInit() => Promise<void>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
--------------------
|
|
56
|
+
|
|
47
57
|
</docgen-api>
|
package/dist/docs.json
CHANGED
|
@@ -30,6 +30,16 @@
|
|
|
30
30
|
"docs": "",
|
|
31
31
|
"complexTypes": [],
|
|
32
32
|
"slug": "logout"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "waitlistAfterInit",
|
|
36
|
+
"signature": "() => Promise<void>",
|
|
37
|
+
"parameters": [],
|
|
38
|
+
"returns": "Promise<void>",
|
|
39
|
+
"tags": [],
|
|
40
|
+
"docs": "",
|
|
41
|
+
"complexTypes": [],
|
|
42
|
+
"slug": "waitlistafterinit"
|
|
33
43
|
}
|
|
34
44
|
],
|
|
35
45
|
"properties": []
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface CapacitorEventBirdPlugin {\n echo(options: { value: string }): Promise<{ value: string }>;\n logout(): Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface CapacitorEventBirdPlugin {\n echo(options: { value: string }): Promise<{ value: string }>;\n logout(): Promise<void>;\n waitlistAfterInit(): Promise<void>\n}\n"]}
|
package/dist/esm/web.d.ts
CHANGED
package/dist/esm/web.js
CHANGED
|
@@ -7,5 +7,8 @@ export class CapacitorEventBirdWeb extends WebPlugin {
|
|
|
7
7
|
async logout() {
|
|
8
8
|
console.log('logout in web isnt really needed it already works');
|
|
9
9
|
}
|
|
10
|
+
async waitlistAfterInit() {
|
|
11
|
+
console.log('waitlistAfterInit in web isnt really needed it already works');
|
|
12
|
+
}
|
|
10
13
|
}
|
|
11
14
|
//# 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,qBAAsB,SAAQ,SAAS;IAClD,KAAK,CAAC,IAAI,CAAC,OAA0B;QACnC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,MAAM;QACV,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC;IACnE,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { CapacitorEventBirdPlugin } from './definitions';\n\nexport class CapacitorEventBirdWeb extends WebPlugin implements CapacitorEventBirdPlugin {\n async echo(options: { value: string }): Promise<{ value: string }> {\n console.log('ECHO', options);\n return options;\n }\n\n async logout(): Promise<void> {\n console.log('logout in web isnt really needed it already works');\n }\n}\n"]}
|
|
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,KAAK,CAAC,IAAI,CAAC,OAA0B;QACnC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,MAAM;QACV,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC;IACnE,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC,CAAC;IAC9E,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { CapacitorEventBirdPlugin } from './definitions';\n\nexport class CapacitorEventBirdWeb extends WebPlugin implements CapacitorEventBirdPlugin {\n async echo(options: { value: string }): Promise<{ value: string }> {\n console.log('ECHO', options);\n return options;\n }\n\n async logout(): Promise<void> {\n console.log('logout in web isnt really needed it already works');\n }\n\n async waitlistAfterInit(): Promise<void> {\n console.log('waitlistAfterInit in web isnt really needed it already works');\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -14,6 +14,9 @@ class CapacitorEventBirdWeb extends core.WebPlugin {
|
|
|
14
14
|
async logout() {
|
|
15
15
|
console.log('logout in web isnt really needed it already works');
|
|
16
16
|
}
|
|
17
|
+
async waitlistAfterInit() {
|
|
18
|
+
console.log('waitlistAfterInit in web isnt really needed it already works');
|
|
19
|
+
}
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
var web = /*#__PURE__*/Object.freeze({
|
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 '@capacitor/core';\nconst CapacitorEventBird = registerPlugin('CapacitorEventBird', {\n web: () => import('./web').then((m) => new m.CapacitorEventBirdWeb()),\n});\nexport * from './definitions';\nexport { CapacitorEventBird };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorEventBirdWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async logout() {\n console.log('logout in web isnt really needed it already works');\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,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;AACpC,QAAQ,OAAO,OAAO;AACtB;AACA,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC;AACxE;AACA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorEventBird = registerPlugin('CapacitorEventBird', {\n web: () => import('./web').then((m) => new m.CapacitorEventBirdWeb()),\n});\nexport * from './definitions';\nexport { CapacitorEventBird };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorEventBirdWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async logout() {\n console.log('logout in web isnt really needed it already works');\n }\n async waitlistAfterInit() {\n console.log('waitlistAfterInit in web isnt really needed it already works');\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,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;AACpC,QAAQ,OAAO,OAAO;AACtB;AACA,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC;AACxE;AACA,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC;AACnF;AACA;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -13,6 +13,9 @@ var capacitorCapacitorEventBird = (function (exports, core) {
|
|
|
13
13
|
async logout() {
|
|
14
14
|
console.log('logout in web isnt really needed it already works');
|
|
15
15
|
}
|
|
16
|
+
async waitlistAfterInit() {
|
|
17
|
+
console.log('waitlistAfterInit in web isnt really needed it already works');
|
|
18
|
+
}
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
var web = /*#__PURE__*/Object.freeze({
|
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 '@capacitor/core';\nconst CapacitorEventBird = registerPlugin('CapacitorEventBird', {\n web: () => import('./web').then((m) => new m.CapacitorEventBirdWeb()),\n});\nexport * from './definitions';\nexport { CapacitorEventBird };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorEventBirdWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async logout() {\n console.log('logout in web isnt really needed it already works');\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,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IACpC,QAAQ,OAAO,OAAO;IACtB;IACA,IAAI,MAAM,MAAM,GAAG;IACnB,QAAQ,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC;IACxE;IACA;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorEventBird = registerPlugin('CapacitorEventBird', {\n web: () => import('./web').then((m) => new m.CapacitorEventBirdWeb()),\n});\nexport * from './definitions';\nexport { CapacitorEventBird };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorEventBirdWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async logout() {\n console.log('logout in web isnt really needed it already works');\n }\n async waitlistAfterInit() {\n console.log('waitlistAfterInit in web isnt really needed it already works');\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,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IACpC,QAAQ,OAAO,OAAO;IACtB;IACA,IAAI,MAAM,MAAM,GAAG;IACnB,QAAQ,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC;IACxE;IACA,IAAI,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC;IACnF;IACA;;;;;;;;;;;;;;;"}
|
|
@@ -9,6 +9,7 @@ public class CapacitorEventBirdPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
9
9
|
public let pluginMethods: [CAPPluginMethod] = [
|
|
10
10
|
CAPPluginMethod(name: "echo", returnType: CAPPluginReturnPromise),
|
|
11
11
|
CAPPluginMethod(name: "logout", returnType: CAPPluginReturnPromise),
|
|
12
|
+
CAPPluginMethod(name: "waitlistAfterInit", returnType: CAPPluginReturnPromise),
|
|
12
13
|
]
|
|
13
14
|
|
|
14
15
|
private var pendingEchoCalls: [CAPPluginCall] = []
|
|
@@ -17,6 +18,7 @@ public class CapacitorEventBirdPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
17
18
|
|
|
18
19
|
@objc func echo(_ call: CAPPluginCall) {
|
|
19
20
|
if let token = savedToken {
|
|
21
|
+
print("[Native] JS called echo, passing the token.")
|
|
20
22
|
call.resolve(["value": token])
|
|
21
23
|
} else {
|
|
22
24
|
print("[Native] JS called echo, but token not ready. Queuing callback.")
|
|
@@ -35,13 +37,15 @@ public class CapacitorEventBirdPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
35
37
|
pendingEchoCalls.removeAll()
|
|
36
38
|
}
|
|
37
39
|
|
|
38
|
-
@objc public func removeAuthToken() {
|
|
39
|
-
print("[Native] Removing auth token in plugin")
|
|
40
|
-
self.savedToken = nil
|
|
41
|
-
}
|
|
42
|
-
|
|
43
40
|
@objc func logout(_ call: CAPPluginCall) {
|
|
44
41
|
NotificationCenter.default.post(name: Notification.Name("NativeLogoutEvent"), object: nil)
|
|
42
|
+
savedToken = nil
|
|
43
|
+
pendingEchoCalls.removeAll()
|
|
44
|
+
call.resolve()
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@objc func waitlistAfterInit(_ call: CAPPluginCall) {
|
|
48
|
+
NotificationCenter.default.post(name: Notification.Name("WaitlistAfterInit"), object: nil)
|
|
45
49
|
call.resolve()
|
|
46
50
|
}
|
|
47
51
|
}
|