Skip to content

Commit fff8bda

Browse files
Merge pull request #37 from vertical-blank/demo-2.0.0
update demo based on ver. 2.0.0
2 parents c1e10a0 + 6ba0d96 commit fff8bda

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

demo/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
### Download jar
77

88
```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
1010
```
1111

1212
### compile java
1313

1414
```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
1616
```
1717

1818
### generate shared object
1919

2020
```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
2222
```
2323

2424
### setup javascript
@@ -34,5 +34,5 @@ npm i
3434
## deploy to google cloud function
3535

3636
```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
3838
```

demo/js/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const ref = require('ref');
2-
const ffi = require('ffi');
1+
const ref = require('ref-napi');
2+
const ffi = require('ffi-napi');
33

4-
const version = '1.0.1'
4+
const version = '2.0.0'
55

66
const libJava = ffi.Library(__dirname + '/sqlformatterdemo', {
77
graal_create_isolate: [

demo/js/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"author": "",
1010
"license": "ISC",
1111
"dependencies": {
12-
"ffi": "^2.3.0"
12+
"ffi-napi": "^4.0.2",
13+
"ref-napi": "^3.0.1"
1314
}
1415
}

0 commit comments

Comments
 (0)