diff --git a/.changeset/eight-socks-pretend.md b/.changeset/eight-socks-pretend.md new file mode 100644 index 0000000..26d13ee --- /dev/null +++ b/.changeset/eight-socks-pretend.md @@ -0,0 +1,6 @@ +--- +"create-ao-dapp": patch +"site": patch +--- + +fix teal-sqlite template and downloads number diff --git a/create-ao-dapp/templates/ao/teal-sqlite/base/src/books/db-utils.tl b/create-ao-dapp/templates/ao/teal-sqlite/base/src/books/db-utils.tl index 37e882e..a0b7ff7 100644 --- a/create-ao-dapp/templates/ao/teal-sqlite/base/src/books/db-utils.tl +++ b/create-ao-dapp/templates/ao/teal-sqlite/base/src/books/db-utils.tl @@ -1,4 +1,4 @@ -require "factory.globals" +require "books.globals" local sqlite3 = require('lsqlite3') local dbUtils = {} diff --git a/create-ao-dapp/templates/ao/teal-sqlite/base/src/books/globals.tl b/create-ao-dapp/templates/ao/teal-sqlite/base/src/books/globals.tl index 257fde6..78a1e31 100644 --- a/create-ao-dapp/templates/ao/teal-sqlite/base/src/books/globals.tl +++ b/create-ao-dapp/templates/ao/teal-sqlite/base/src/books/globals.tl @@ -1,6 +1,7 @@ require "lsqlite3" -- Define types +global Owner: string global Variant: string global Counter: number global DB: db diff --git a/create-ao-dapp/templates/scripts/build-amalg/lua-sqlite.sh b/create-ao-dapp/templates/scripts/build-amalg/lua-sqlite.sh index 758b0ee..bfa20c8 100644 --- a/create-ao-dapp/templates/scripts/build-amalg/lua-sqlite.sh +++ b/create-ao-dapp/templates/scripts/build-amalg/lua-sqlite.sh @@ -11,4 +11,6 @@ luacheck src/process.lua \ cd src amalg.lua -s process.lua -o ../build/process.lua \ - lib.process_lib lib.db utils.db \ No newline at end of file + lib.process_lib lib.db utils.db + +echo "Build finished." \ No newline at end of file diff --git a/create-ao-dapp/templates/scripts/build-amalg/lua.sh b/create-ao-dapp/templates/scripts/build-amalg/lua.sh index 34f3688..d948fa7 100644 --- a/create-ao-dapp/templates/scripts/build-amalg/lua.sh +++ b/create-ao-dapp/templates/scripts/build-amalg/lua.sh @@ -9,4 +9,6 @@ luacheck src/process.lua \ cd src amalg.lua -s process.lua -o ../build/process.lua \ - lib.process_lib \ No newline at end of file + lib.process_lib + +echo "Build finished." \ No newline at end of file diff --git a/create-ao-dapp/templates/scripts/build-amalg/teal-sqlite.sh b/create-ao-dapp/templates/scripts/build-amalg/teal-sqlite.sh index 25acbc6..b3cafe1 100644 --- a/create-ao-dapp/templates/scripts/build-amalg/teal-sqlite.sh +++ b/create-ao-dapp/templates/scripts/build-amalg/teal-sqlite.sh @@ -16,4 +16,6 @@ cd build-lua amalg.lua -s books/main.lua -o ../build/process.lua \ books.globals books.utils.tl-utils books.db-utils -# FINAL RESULT is build/main.lua \ No newline at end of file +# FINAL RESULT is build/main.lua + +echo "Build finished." \ No newline at end of file diff --git a/create-ao-dapp/templates/scripts/build-amalg/teal.sh b/create-ao-dapp/templates/scripts/build-amalg/teal.sh index fb33da0..14155c3 100644 --- a/create-ao-dapp/templates/scripts/build-amalg/teal.sh +++ b/create-ao-dapp/templates/scripts/build-amalg/teal.sh @@ -16,4 +16,6 @@ cd build-lua amalg.lua -s counter/main.lua -o ../build/process.lua \ counter.utils.tl-utils -# FINAL RESULT is build/main.lua \ No newline at end of file +# FINAL RESULT is build/main.lua + +echo "Build finished." \ No newline at end of file diff --git a/create-ao-dapp/templates/scripts/build-squishy.sh b/create-ao-dapp/templates/scripts/build-squishy.sh index 9088508..804076c 100755 --- a/create-ao-dapp/templates/scripts/build-squishy.sh +++ b/create-ao-dapp/templates/scripts/build-squishy.sh @@ -18,4 +18,6 @@ output_line=$(grep "Output" ./squishy) output_file=$(echo "$output_line" | awk -F "'" '{print $2}') # Prepend reset_modules.lua to the squished file -cat ./src/reset_modules.lua | cat - ./$output_file > temp && mv temp ./build/process.lua \ No newline at end of file +cat ./src/reset_modules.lua | cat - ./$output_file > temp && mv temp ./build/process.lua + +echo "Build finished." \ No newline at end of file diff --git a/site/components/Downloads.tsx b/site/components/Downloads.tsx index 6ae0fac..3552c77 100644 --- a/site/components/Downloads.tsx +++ b/site/components/Downloads.tsx @@ -3,6 +3,8 @@ import React from "react"; export function Downloads() { const [downloads, setDownloads] = React.useState(null); + const EXTERNAL_DOWNLOADS = 500; + React.useEffect(() => { async function fetchDownloads() { try { @@ -10,7 +12,7 @@ export function Downloads() { "https://api.npmjs.org/downloads/point/last-year/create-ao-dapp" ); const data = await response.json(); - setDownloads(data.downloads); + setDownloads(data.downloads + EXTERNAL_DOWNLOADS); } catch (error) { console.error("Error fetching downloads:", error); }