File tree 3 files changed +9
-8
lines changed
3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 6
6
### Download jar
7
7
8
8
``` bash
9
- wget https://repo1.maven.org/maven2/com/github/vertical-blank/sql-formatter/1 .0.1 /sql-formatter-1 .0.1 .jar
9
+ wget https://repo1.maven.org/maven2/com/github/vertical-blank/sql-formatter/2 .0.0 /sql-formatter-2 .0.0 .jar
10
10
```
11
11
12
12
### compile java
13
13
14
14
``` bash
15
- path/to/graalvm/bin/javac src/main/java/com/github/vertical_blank/sqlformatter/SqlFormatterDemo.java -cp ./sql-formatter-1 .0.1 .jar
15
+ path/to/graalvm/bin/javac src/main/java/com/github/vertical_blank/sqlformatter/SqlFormatterDemo.java -cp ./sql-formatter-2 .0.0 .jar
16
16
```
17
17
18
18
### generate shared object
19
19
20
20
``` bash
21
- path/to/graalvm/bin/native-image --shared -H:Name=sqlformatterdemo -cp src/main/java/:sql-formatter-1 .0.1 .jar
21
+ path/to/graalvm/bin/native-image --shared -H:Name=sqlformatterdemo -cp src/main/java/:sql-formatter-2 .0.0 .jar
22
22
```
23
23
24
24
### setup javascript
34
34
## deploy to google cloud function
35
35
36
36
``` bash
37
- gcloud functions deploy format_sql --runtime nodejs8 --entry-point handler --trigger-http
37
+ gcloud functions deploy format_sql --runtime nodejs12 --entry-point handler --trigger-http
38
38
```
Original file line number Diff line number Diff line change 1
- const ref = require ( 'ref' ) ;
2
- const ffi = require ( 'ffi' ) ;
1
+ const ref = require ( 'ref-napi ' ) ;
2
+ const ffi = require ( 'ffi-napi ' ) ;
3
3
4
- const version = '1 .0.1 '
4
+ const version = '2 .0.0 '
5
5
6
6
const libJava = ffi . Library ( __dirname + '/sqlformatterdemo' , {
7
7
graal_create_isolate : [
Original file line number Diff line number Diff line change 9
9
"author" : " " ,
10
10
"license" : " ISC" ,
11
11
"dependencies" : {
12
- "ffi" : " ^2.3.0"
12
+ "ffi-napi" : " ^4.0.2" ,
13
+ "ref-napi" : " ^3.0.1"
13
14
}
14
15
}
You can’t perform that action at this time.
0 commit comments