@sentio/sdk 2.40.0-rc.36 → 2.40.0-rc.38
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/tsup.config.ts +1 -15
- package/package.json +6 -3
- package/src/bundle.config.ts +22 -0
- package/src/tsup.config.ts +1 -15
package/lib/tsup.config.ts
CHANGED
@@ -18,19 +18,5 @@ export default defineConfig({
|
|
18
18
|
// },
|
19
19
|
publicDir: '../abis',
|
20
20
|
splitting: false,
|
21
|
-
external: [
|
22
|
-
'protobufjs',
|
23
|
-
'@aptos-labs/ts-sdk',
|
24
|
-
'ethers',
|
25
|
-
'bs58',
|
26
|
-
'bn.js',
|
27
|
-
'csv-parse',
|
28
|
-
'node-fetch',
|
29
|
-
/^nice-grpc.*$/,
|
30
|
-
/^prettier.*$/,
|
31
|
-
/^@(solana|project-serum).*$/,
|
32
|
-
/^@sentio\/(sdk|runtime|protos|bigdecimal|ethers).*$/,
|
33
|
-
/^@typemove\/.*$/,
|
34
|
-
/^@mysten\/(bcs|sui.js\/).*$/
|
35
|
-
]
|
21
|
+
external: [/^@sentio\/(sdk|runtime).*$/]
|
36
22
|
})
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sentio/sdk",
|
3
|
-
"version": "2.40.0-rc.
|
3
|
+
"version": "2.40.0-rc.38",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -82,8 +82,8 @@
|
|
82
82
|
"typechain": "^8.3.2",
|
83
83
|
"utility-types": "^3.11.0",
|
84
84
|
"yaml": "^2.3.4",
|
85
|
-
"@sentio/
|
86
|
-
"@sentio/
|
85
|
+
"@sentio/runtime": "^2.40.0-rc.38",
|
86
|
+
"@sentio/protos": "2.40.0-rc.38"
|
87
87
|
},
|
88
88
|
"peerDependencies": {
|
89
89
|
"tsup": "npm:@sentio/tsup@^6.7.2"
|
@@ -102,6 +102,9 @@
|
|
102
102
|
"scripts": {
|
103
103
|
"build": "pnpm gen && pnpm compile",
|
104
104
|
"build:all": "pnpm --filter=$(node -p \"require('./package.json').name\")... build",
|
105
|
+
"build:bundle": "pnpm gen && pnpm bundle && pnpm bundle:dts",
|
106
|
+
"bundle": "tsup --config src/bundle.config.ts && cp src/tsup.config.ts lib",
|
107
|
+
"bundle:dts": "tsc --emitDeclarationOnly --declaration",
|
105
108
|
"compile": "tsc && cp src/tsup.config.ts lib",
|
106
109
|
"gen": "pnpm gen:eth && pnpm gen:aptos && pnpm gen:sui && pnpm gen:solana && pnpm gen:fuel && pnpm gen:store",
|
107
110
|
"gen:aptos": "tsx src/aptos/codegen/run.ts src/aptos/abis src/aptos/builtin && pnpm gen:aptos_test",
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { defineConfig } from 'tsup'
|
2
|
+
import packageJson from '../package.json'
|
3
|
+
|
4
|
+
const entry = Object.values(packageJson.exports).map((p) => p.replace('lib', 'src').replace('.js', '.ts'))
|
5
|
+
|
6
|
+
export default defineConfig({
|
7
|
+
esbuildOptions: (options) => {
|
8
|
+
options.banner = {
|
9
|
+
js: `import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);`
|
10
|
+
}
|
11
|
+
},
|
12
|
+
entry,
|
13
|
+
outDir: 'lib',
|
14
|
+
minify: true,
|
15
|
+
sourcemap: true,
|
16
|
+
clean: true,
|
17
|
+
// https://github.com/egoist/tsup/issues/920, use `tsc --emitDeclarationOnly --declaration` as a workaround
|
18
|
+
// dts: true,
|
19
|
+
format: 'esm',
|
20
|
+
// keepNames: true,
|
21
|
+
external: ['@project-serum/anchor', /^@sentio\/(runtime).*$/, 'graphql']
|
22
|
+
})
|
package/src/tsup.config.ts
CHANGED
@@ -18,19 +18,5 @@ export default defineConfig({
|
|
18
18
|
// },
|
19
19
|
publicDir: '../abis',
|
20
20
|
splitting: false,
|
21
|
-
external: [
|
22
|
-
'protobufjs',
|
23
|
-
'@aptos-labs/ts-sdk',
|
24
|
-
'ethers',
|
25
|
-
'bs58',
|
26
|
-
'bn.js',
|
27
|
-
'csv-parse',
|
28
|
-
'node-fetch',
|
29
|
-
/^nice-grpc.*$/,
|
30
|
-
/^prettier.*$/,
|
31
|
-
/^@(solana|project-serum).*$/,
|
32
|
-
/^@sentio\/(sdk|runtime|protos|bigdecimal|ethers).*$/,
|
33
|
-
/^@typemove\/.*$/,
|
34
|
-
/^@mysten\/(bcs|sui.js\/).*$/
|
35
|
-
]
|
21
|
+
external: [/^@sentio\/(sdk|runtime).*$/]
|
36
22
|
})
|