superapp-miniapp-invoke-native 1.0.22 → 1.0.25

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/lib/main.d.ts CHANGED
@@ -1,12 +1,2 @@
1
- declare module 'superapp-miniapp-invoke-native';
2
-
3
- export interface NativeApiParamsType {
4
- serverInfo: {
5
- area: string;
6
- env: string;
7
- };
8
- }
9
-
10
- export interface initType {
11
- init: (params: NativeApiParamsType) => void;
12
- }
1
+ declare const NativeApi: import("./src/init/type").initType;
2
+ export default NativeApi;
package/lib/main.js CHANGED
@@ -1,10 +1,3 @@
1
- var n = (i, t) => () => (t || i((t = { exports: {} }).exports, t), t.exports);
2
- var c = n((r, e) => {
3
- const o = {
4
- init(i) {
5
- return console.log("initNative", i), i;
6
- }
7
- };
8
- e.exports = o;
9
- });
10
- export default c();
1
+ import api from "@/init";
2
+ const NativeApi = api;
3
+ export default NativeApi;
package/lib/main.umd.cjs CHANGED
@@ -1 +1 @@
1
- (function(e){typeof define=="function"&&define.amd?define(e):e()})(function(){"use strict";const e={init(i){return console.log("initNative",i),i}};module.exports=e});
1
+ (function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.main=i())})(this,function(){"use strict";return{init(n){return console.log("initNative",n),n}}});
@@ -0,0 +1,3 @@
1
+ import { initType } from '@/init/type';
2
+ declare const _default: initType;
3
+ export default _default;
@@ -0,0 +1,6 @@
1
+ export default {
2
+ init(params) {
3
+ console.log('initNative', params);
4
+ return params;
5
+ },
6
+ };
@@ -0,0 +1,9 @@
1
+ export interface initType {
2
+ init: (params: NativeApiParamsType) => void;
3
+ }
4
+ export interface NativeApiParamsType {
5
+ serverInfo: {
6
+ area: string;
7
+ env: string;
8
+ };
9
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "superapp-miniapp-invoke-native",
3
3
  "type": "module",
4
- "version": "1.0.22",
4
+ "version": "1.0.25",
5
5
  "description": "Superapp中,小程序调用Native 接口的封装,如OSP项目中,需要调用Native的相机扫描,镭射扫描,获取RBAC的数据等",
6
6
  "scripts": {
7
7
  "dev": "vite",
8
- "build": "tsc && vite build",
9
- "publish": "tsc && vite build"
8
+ "build": "vite build && tsc",
9
+ "up": "yarn build && yarn publish"
10
10
  },
11
11
  "repository": {
12
12
  "type": "git",