yeow-api 0.2.56 → 0.2.57

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/service.ts +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yeow-api",
3
- "version": "0.2.56",
3
+ "version": "0.2.57",
4
4
  "description": "Yeow API",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
package/src/service.ts CHANGED
@@ -23,7 +23,12 @@ export async function registerService(refName: string, onRequest: (path: string,
23
23
  return r;
24
24
  }
25
25
 
26
- export async function registerNativeService(refName: string, platforms: Record<string, string>, isPublic = true): Promise<{ serviceId: string }> {
26
+ // ── Register Native Service ──
27
+
28
+ type NativePlatform = string | { file: string } | { dir: string; entry: string };
29
+ type NativePlatforms = Record<string, NativePlatform>;
30
+
31
+ export async function registerNativeService(refName: string, platforms: NativePlatforms, isPublic = true): Promise<{ serviceId: string }> {
27
32
  const r = $send('service', { t: 'registerNative', refName, platforms, public: isPublic }) as { serviceId: string };
28
33
  return r;
29
34
  }