-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update CHANGELOG * Bump version. Add esm to main package * Prettify * Fix complex argument resolver * Bump fcl packages * Update build script * Refactor files to use a different structure * Update folder structure * Update build process * Update configs * Add npm-run-all package * Update path to cli * Bump version * Update tests * Fixed key type issue. Update tests * Bump alpha version * Remove module statement in package.json * Bump alpha version * Add tests for bad inputs * Add txId field to resolved transaction * Bump version * Add more tests * Update mainnet access node * Update package.json * Update paths * Bump version * Fix require in bin * Fix parser to handle comments properly * Fix paths. bump version * Remove comma * Fix package files * Add execution limit config * Fix block comments regexp * Bump version * Bump version to release
- Loading branch information
Maksim Daunarovich
authored
Nov 1, 2021
1 parent
3564459
commit 41fca98
Showing
38 changed files
with
1,583 additions
and
16,540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": [["@babel/preset-env", { "targets": { "node": "current" } }]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/usr/bin/env node | ||
|
||
require("esm")(module /*, options*/)("../src/generator/cli").run(process.argv); | ||
import ESModule from "esm" | ||
ESModule("esm")(module /*, options*/)("../generator/src/cli").run(process.argv); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import path from "path"; | ||
import { emulator, init } from "flow-js-testing"; | ||
import { executeScript, mutate } from "../../src"; | ||
import { authorization } from "../utils"; | ||
|
||
// Increase timeout if your tests failing due to timeout | ||
jest.setTimeout(10000); | ||
|
||
describe("optional arguments", () => { | ||
beforeEach(async () => { | ||
const basePath = path.resolve(__dirname, "../cadence"); | ||
// You can specify different port to parallelize execution of describe blocks | ||
const port = 8080; | ||
// Setting logging flag to true will pipe emulator output to console | ||
const logging = false; | ||
|
||
await init(basePath, { port }); | ||
return emulator.start(port, logging); | ||
}); | ||
|
||
// Stop emulator, so it could be restarted | ||
afterEach(async () => { | ||
return emulator.stop(); | ||
}); | ||
|
||
it("shall throw - from faulty script", async () => { | ||
const executionResult = await executeScript({ | ||
code: ` | ||
pub fun main(): Int{ | ||
return "bazinga" | ||
} | ||
`, | ||
}); | ||
const [result, err] = executionResult; | ||
expect(result).toBe(null) | ||
expect(err).not.toBe(null) | ||
}); | ||
|
||
it("shall throw - transaction", async ()=>{ | ||
const cadence = ` | ||
transaction{ | ||
prepare(singer: AuthAccount){ | ||
log("all cool") | ||
} | ||
} | ||
`; | ||
const payer = (()=>{})(); | ||
const [txResult, err] = await mutate({ cadence, payer }); | ||
expect(txResult).toBe(null) | ||
expect(err).not.toBe(null) | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "flow-cadut-generator", | ||
"amdName": "flowCadutGenerator", | ||
"version": "0.0.1", | ||
"private": true, | ||
"author": "Maksim Daunarovich", | ||
"license": "Apache-2.0", | ||
"main": "dist/generator.js", | ||
"module": "dist/generator.module.js", | ||
"umd:main": "dist/generator.umd.js", | ||
"source": "src/index.js", | ||
"scripts": { | ||
"build": "microbundle", | ||
"dev": "microbundle watch" | ||
}, | ||
"peerDependencies": { | ||
"flow-cadut": "^0.1.10" | ||
}, | ||
"mangle": { | ||
"regex": "^_" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.