@wgb5445/aptos-intent-npm 0.0.4 → 0.0.5

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/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.4",
7
+ "version": "0.0.5",
8
8
  "type": "module",
9
9
  "license": "Apache-2.0",
10
10
  "repository": {
@@ -12,7 +12,9 @@
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
20
  "types": "dist/aptos_intent.d.ts",
@@ -22,5 +24,12 @@
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
+ };