@wgb5445/aptos-intent-npm 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -135,4 +135,7 @@ export function initSync(module: SyncInitInput): InitOutput;
135
135
  *
136
136
  * @returns {Promise<InitOutput>}
137
137
  */
138
- export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
138
+ export function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
139
+
140
+
141
+ export function get_wasm()
package/entry.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from "../pkg/aptos_intent.js";
2
+
3
+ export async function get_wasm (){
4
+ return (await import("../pkg/aptos_intent_bg.wasm")).default()
5
+ }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "Aptos Labs <opensource@aptoslabs.com>"
5
5
  ],
6
6
  "description": "Generating Move Script from intent",
7
- "version": "0.0.3",
7
+ "version": "0.0.5",
8
8
  "type": "module",
9
9
  "license": "Apache-2.0",
10
10
  "repository": {
@@ -12,15 +12,24 @@
12
12
  "url": "https://github.com/aptos-labs/aptos-core"
13
13
  },
14
14
  "files": [
15
- "dist"
15
+ "dist",
16
+ "entry.js",
17
+ "rollup.config.mjs"
16
18
  ],
17
19
  "module": "dist/esm/entry.js",
18
- "types": "aptos_intent.d.ts",
20
+ "types": "dist/aptos_intent.d.ts",
19
21
  "homepage": "https://aptoslabs.com",
20
22
  "sideEffects": [
21
23
  "./snippets/*"
22
24
  ],
23
25
  "devDependencies": {
24
26
  "@rollup/plugin-wasm": "^6.2.2"
27
+ },
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/aptos_intent.d.ts",
31
+ "import": "./dist/esm/entry.js",
32
+ "default": "./dist/cjs/entry.js"
33
+ }
25
34
  }
26
35
  }
@@ -0,0 +1,20 @@
1
+ import { wasm } from '@rollup/plugin-wasm';
2
+ import typescript from '@rollup/plugin-typescript';
3
+ import { format } from 'path';
4
+ export default {
5
+ input: 'entry.js',
6
+ output: [
7
+ {
8
+ dir: 'dist/esm',
9
+ format: "esm",
10
+
11
+ },
12
+ {
13
+ dir: 'dist/cjs',
14
+ format: "cjs"
15
+ }
16
+ ],
17
+ plugins: [wasm({
18
+ maxFileSize: 10000000
19
+ })]
20
+ };