@steerprotocol/strategy-utils 2.0.6 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/asconfig.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "targets": {
3
3
  "debug": {
4
- "binaryFile": "build/untouched.wasm",
5
- "textFile": "build/untouched.wat",
4
+ "outFile": "build/debug.wasm",
5
+ "textFile": "build/debug.wat",
6
6
  "sourceMap": true,
7
7
  "debug": true
8
8
  },
9
9
  "release": {
10
- "binaryFile": "build/optimized.wasm",
11
- "textFile": "build/optimized.wat",
10
+ "outFile": "build/release.wasm",
11
+ "textFile": "build/release.wat",
12
12
  "sourceMap": true,
13
13
  "optimizeLevel": 3,
14
14
  "shrinkLevel": 0,
@@ -16,5 +16,8 @@
16
16
  "noAssert": false
17
17
  }
18
18
  },
19
- "options": {}
19
+ "options": {
20
+ "bindings": "esm",
21
+ "transform": ["json-as/transform"]
22
+ }
20
23
  }
@@ -1,4 +1,4 @@
1
- import * as JSON from '@serial-as/json'
1
+ import { JSON } from 'json-as/assembly';
2
2
 
3
3
  @serializable
4
4
  export class Candle{
package/index.html ADDED
@@ -0,0 +1,10 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <script type="module">
5
+ import { initialize, execute } from "./build/release.js";
6
+ document.body.innerText = 'Implementation missing, please fix index.html';;
7
+ </script>
8
+ </head>
9
+ <body></body>
10
+ </html>
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "@steerprotocol/strategy-utils",
3
- "version": "2.0.6",
3
+ "version": "2.1.0",
4
4
  "description": "Strategy utilities library for Steer Protocol strategies",
5
5
  "main": "assembly/index.ts",
6
6
  "types": "assembly/index.ts",
7
7
  "scripts": {
8
8
  "test": "yarn jest",
9
- "asbuild:untouched": "asc assembly/index.ts --target debug --exportRuntime --transform as-bind --transform @serial-as/transform",
10
- "asbuild:optimized": "asc assembly/index.ts --target release --exportRuntime --transform as-bind --transform @serial-as/transform",
11
- "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized",
9
+ "asbuild:debug": "asc assembly/index.ts --target debug",
10
+ "asbuild:release": "asc assembly/index.ts --target release",
11
+ "asbuild": "npm run asbuild:debug && npm run asbuild:release",
12
+ "start": "npx serve .",
12
13
  "docs": "typedoc --tsconfig ./tsconfig.json",
13
14
  "strategy": "yarn asbuild && yarn test",
14
15
  "semantic-release": "semantic-release",
@@ -17,23 +18,22 @@
17
18
  "author": "Derek Barrera <derekbarrera@gmail.com>",
18
19
  "license": "ISC",
19
20
  "dependencies": {
20
- "@assemblyscript/loader": "0.19.9",
21
21
  "@babel/preset-typescript": "^7.14.5",
22
22
  "@semantic-release/changelog": "^5.0.1",
23
23
  "@semantic-release/git": "^9.0.0",
24
- "@serial-as/json": "1.0.2",
25
24
  "@steerprotocol/base-strategy": "^0.0.2",
26
- "as-bind": "^0.8.0",
27
- "assemblyscript-json": "^1.1.0",
25
+ "as-bignum": "^0.2.23",
28
26
  "commitizen": "^4.2.4",
29
27
  "conventional-changelog-conventionalcommits": "^4.6.0",
30
- "typescript": "^4.3.5"
28
+ "json-as": "^0.5.20",
29
+ "typescript": "^4.3.5",
30
+ "visitor-as": "^0.11.4"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@babel/preset-env": "^7.14.8",
34
34
  "@types/jest": "^27.0.1",
35
35
  "@types/node": "^16.11.11",
36
- "assemblyscript": "0.19.9",
36
+ "assemblyscript": "^0.27.0",
37
37
  "babel-core": "^6.26.3",
38
38
  "babel-jest": "^27.0.6",
39
39
  "cz-conventional-changelog": "3.3.0",