Skip to content

Commit

Permalink
Merge pull request #335 from permaweb/twilson63/build-xl-module
Browse files Browse the repository at this point in the history
Twilson63/build xl module
  • Loading branch information
twilson63 authored Sep 2, 2024
2 parents abd3c9f + d4d9092 commit dddf757
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "@permaweb/aos",
"version": "2.0.0-rc2",
"version": "2.0.0",
"main": "src/index.js",
"bin": "./bin/aos.js",
"repository": "https://github.com/permaweb/aos.git",
Expand Down Expand Up @@ -29,9 +29,9 @@
"yargs": "^17.7.2"
},
"aos": {
"module": "PSPMkkFrJzYI2bQbkmeEQ5ONmeR-FJZu0fNQoSCU1-I",
"sqlite": "C4bxMlK8d_wQ-QpXIIZLU8UWXu6Sd8PDJw7HN3nNE2I",
"version": "2.0.0.rc2"
"module": "zx6_08gJzKNXxLCplINj6TPv9-ElRgeRqr9F6riRBK8",
"sqlite": "CJ-iZL7RKNA43UZr3l6J5M8JegMP9RldoCoVge_vRuI",
"version": "2.0.0"
},
"devDependencies": {
"esbuild": "^0.20.1"
Expand Down
4 changes: 2 additions & 2 deletions process/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"scripts": {
"build": "ao build",
"test": "node --test --experimental-wasm-memory64",
"deploy": "ao publish -w ~/.wallet.json process.wasm -t Memory-Limit -v 1-gb -t Compute-Limit -v 9000000000000 -t Module-Format -v wasm64-unknown-emscripten-draft_2024_02_15 -t AOS-Version -v 2.0.0.rc2 -t Name -v AOS",
"deploy-sqlite": "ao publish -w ~/.wallet.json process.wasm -t Memory-Limit -v 1-gb -t Compute-Limit -v 9000000000000 -t Module-Format -v wasm64-unknown-emscripten-draft_2024_02_15 -t AOS-Version -v 2.0.0.rc2 -t Name -v AOS-SQLITE"
"deploy": "ao publish -w ~/.wallet.json process.wasm -t Memory-Limit -v 1-gb -t Compute-Limit -v 9000000000000 -t Module-Format -v wasm64-unknown-emscripten-draft_2024_02_15 -t AOS-Version -v 2.0.0 -t Name -v aos-xl",
"deploy-sqlite": "ao publish -w ~/.wallet.json process.wasm -t Memory-Limit -v 1-gb -t Compute-Limit -v 9000000000000 -t Module-Format -v wasm64-unknown-emscripten-draft_2024_02_15 -t AOS-Version -v 2.0.0 -t Name -v sqlite-xl"
}
}
5 changes: 3 additions & 2 deletions process/process.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ end
-- Implement assignable polyfills on _ao
assignment.init(ao)

local process = { _version = "2.0.0.rc2" }
local process = { _version = "2.0.0" }
local maxInboxCount = 10000

-- wrap ao.send and ao.spawn for magic table
Expand Down Expand Up @@ -336,7 +336,8 @@ function process.handle(msg, _)
if not status then
if (msg.Action == "Eval") then
table.insert(Errors, result)
return { Error = result }
local printData = table.concat(HANDLER_PRINT_LOGS, "\n")
return { Error = printData .. '\n\n' .. result }
end
--table.insert(Errors, result)
--ao.outbox.Output.data = ""
Expand Down
8 changes: 4 additions & 4 deletions src/services/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import path from 'path'
*/
export function parseError(error) {
// if we have not been given any error information, return a generic message
if(!error || Object.keys(error).length === 0) {
return {lineNumber: 0, errorMessage: "No message given by process."}
if (!error || Object.keys(error).length === 0) {
return { lineNumber: 0, errorMessage: "No message given by process." }
}

// parse error message
Expand All @@ -34,7 +34,7 @@ export function parseError(error) {
lineNumber,
errorMessage
}
}
}

// (it's going to be the last ":linenumber:")
const lineNumber = parseInt(lineNumbers[lineNumbers.length - 1].replace(/:/g, ''))
Expand Down Expand Up @@ -96,7 +96,7 @@ export function outputError(line, error, origin) {
const lineNumberPlaceholder = ' '.repeat(lineNumber.toString().length)

console.log(
chalk.bold(chalk.red('error') + ': ' + error.errorMessage) +
chalk.bold(chalk.red('error') + ':\n' + error.errorMessage) +
'\n' +
(origin ? chalk.dim(` in ${origin.file}\n`) : "") +
chalk.blue(` ${lineNumberPlaceholder} |\n ${lineNumber} | `) +
Expand Down

0 comments on commit dddf757

Please sign in to comment.