@sentio/cli 1.1.5 → 1.1.6

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.
@@ -0,0 +1,50 @@
1
+ /* eslint-disable */
2
+ const path = require('path')
3
+
4
+ module.exports = {
5
+ entry: {
6
+ lib: './src/processor.ts',
7
+ },
8
+ devtool: 'inline-source-map',
9
+ module: {
10
+ rules: [
11
+ {
12
+ test: /\.tsx?$/,
13
+ use: 'ts-loader',
14
+ exclude: /node_modules/,
15
+ },
16
+ ],
17
+ },
18
+ resolve: {
19
+ extensions: ['.ts', '.js'],
20
+ },
21
+ output: {
22
+ filename: '[name].js',
23
+ path: path.resolve(process.cwd(), 'dist'),
24
+ },
25
+ target: 'node',
26
+ mode: 'production',
27
+ externals: [
28
+ {
29
+ protobufjs: 'commonjs2 protobufjs',
30
+ aptos: 'commonjs2 aptos-sdk',
31
+ ethers: 'commonjs2 ethers',
32
+ bs58: 'commonjs2 bs58',
33
+ "bignumber.js": 'commonjs2 bignumber.js',
34
+ 'bn.js': 'commonjs2 bn.js',
35
+ 'csv-parse': 'commonjs2 csv-parse',
36
+ },
37
+ function ({ context, request }, callback) {
38
+ if (/^@(ethersproject|solana|project-serum|nice-grpc).*$/.test(request)) {
39
+ return callback(null, 'commonjs ' + request)
40
+ }
41
+ if (/^nice-grpc.*$/.test(request)) {
42
+ return callback(null, 'commonjs ' + request)
43
+ }
44
+ if (/^@sentio\/(sdk|runtime|base|protos).*$/.test(request)) {
45
+ return callback(null, 'commonjs ' + request)
46
+ }
47
+ callback()
48
+ },
49
+ ],
50
+ }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@sentio/cli",
3
3
  "license": "Apache-2.0",
4
4
  "private": false,
5
- "version": "1.1.5",
5
+ "version": "1.1.6",
6
6
  "scripts": {
7
7
  "compile": "tsc -p . && cp src/webpack.config.js lib/",
8
8
  "build": "yarn compile",
package/src/build.ts CHANGED
@@ -14,6 +14,7 @@ export async function buildProcessor(onlyGen: boolean) {
14
14
  // }
15
15
 
16
16
  if (!onlyGen) {
17
+ // TODO move this to SDK
17
18
  const WEBPACK_CONFIG = path.join(__dirname, 'webpack.config.js')
18
19
  await execStep('yarn tsc -p .', 'Compile')
19
20
  await execStep('yarn webpack --config=' + WEBPACK_CONFIG, 'Packaging')