Skip to content

Commit b6b2d55

Browse files
committed
everything building
1 parent 4edd10c commit b6b2d55

File tree

15 files changed

+58
-45
lines changed

15 files changed

+58
-45
lines changed

examples/simple-storage/protocol/package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{
22
"name": "@web3api/examples-simple-storage",
3+
"version": "0.0.1-alpha.1",
4+
"license": "MIT",
35
"scripts": {
6+
"codegen": "yarn subgraph:codegen",
7+
"build": "w3 build && yarn contracts:build",
8+
"test:env:up": "w3 test-env up && yarn contracts:deploy",
9+
"test:env:down": "w3 test-env down",
410
"contracts:build": "",
5-
"subgraph:codegen": "cd subgraph && graph codegen --out-dir generated/",
6-
"subgraph:build": "cd subgraph && graph build"
11+
"subgraph:codegen": "cd src/subgraph && graph codegen --out-dir generated/"
712
},
813
"devDependencies": {
914
"@graphprotocol/graph-cli": "^0.18.0",

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "root",
3+
"license": "MIT",
34
"private": true,
45
"workspaces": {
56
"packages": [
@@ -8,7 +9,10 @@
89
]
910
},
1011
"scripts": {
11-
"test:ci:client-js": "yarn workspace @web3api/client-js test:ci"
12+
"build": "yarn build:wasm-ts && yarn build:cli && yarn build:client-js",
13+
"build:cli": "yarn workspace @web3api/cli build",
14+
"build:client-js": "yarn workspace @web3api/client-js build",
15+
"build:wasm-ts": "yarn workspace @web3api/wasm-ts build"
1216
},
1317
"devDependencies": {
1418
"lerna": "3.22.1"

packages/cli/.gitignore

-3
This file was deleted.

packages/cli/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@web3api/cli",
33
"version": "0.0.1-alpha.1",
4+
"license": "MIT",
45
"bin": {
56
"w3": "bin/w3"
67
},

packages/cli/src/commands/test-env.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,18 @@ export default {
3636
"Starting test environment...",
3737
"Failed to start test environment",
3838
"Warning starting test environment",
39-
async apinner => {
40-
return startupTestEnv();
39+
async spinner => {
40+
// TODO: support verbose logging
41+
return startupTestEnv(true);
4142
}
4243
)
4344
} else if (command === "down") {
4445
return await withSpinner(
4546
"Shutting down test environment...",
4647
"Failed to shutdown test environment",
4748
"Warning shutting down test environment",
48-
async apinner => {
49-
return await shutdownTestEnv();
49+
async spinner => {
50+
return await shutdownTestEnv(true);
5051
}
5152
)
5253
} else {

packages/cli/src/lib/env/test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
const testEnv = require("@web3api/client-test-env");
22

3-
export async function startupTestEnv() {
4-
await testEnv.up();
3+
export async function startupTestEnv(quiet: boolean) {
4+
await testEnv.up(quiet);
55
}
66

7-
export async function shutdownTestEnv() {
8-
await testEnv.down();
7+
export async function shutdownTestEnv(quiet: boolean) {
8+
await testEnv.down(quiet);
99
}

packages/client-js/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"name": "@web3api/client-js",
33
"version": "0.0.1-alpha.1",
4+
"license": "MIT",
45
"scripts": {
6+
"build": "rm -rf build && tsc",
57
"test": "jest --passWithNoTests --verbose",
68
"test:watch": "jest --watch --passWithNoTests --verbose",
79
"test:ci": "yarn test:env:up && yarn test && yarn test:env:down",
@@ -26,6 +28,7 @@
2628
"@types/js-yaml": "3.11.1",
2729
"@web3api/client-test-env": "0.0.1-alpha.1",
2830
"jest": "26.2.2",
29-
"ts-jest": "26.1.4"
31+
"ts-jest": "26.1.4",
32+
"typescript": "3.9.7"
3033
}
3134
}

packages/client-js/src/Web3API.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export class Web3API {
223223
);
224224

225225
const result = await WASMLoader.instantiate(
226-
wasm,
226+
wasm as any,
227227
getHostImports(() => result as ASCModule, portals)
228228
) as any;
229229

packages/client-js/tsconfig.json

+24-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
11
{
22
"compilerOptions": {
33
"rootDir": "src",
4-
"outDir": "dist",
5-
"target": "es2015",
6-
"module": "commonjs",
7-
"composite": true,
4+
"outDir": "build",
5+
"esModuleInterop": true,
6+
"lib": [
7+
"es2015",
8+
"es5",
9+
"dom"
10+
],
11+
"moduleResolution": "node",
812
"declaration": true,
13+
"preserveSymlinks": true,
14+
"preserveWatchOutput": true,
15+
"pretty": false,
16+
"forceConsistentCasingInFileNames": true,
17+
"noFallthroughCasesInSwitch": true,
18+
"noImplicitAny": true,
19+
"noImplicitReturns": true,
20+
"noUnusedLocals": true,
21+
"module": "commonjs",
922
"sourceMap": true,
10-
"esModuleInterop": true,
11-
"strict": true,
12-
"lib": ["es2015", "es6", "esnext.asynciterable", "dom"]
23+
"target": "es5"
1324
},
14-
"include": ["src/**/*.ts"],
15-
"exclude": ["src/**/__tests__/**/*.ts"],
16-
"references": []
25+
"include": [
26+
"./src/**/*"
27+
],
28+
"exclude": [
29+
"./src/**/__tests__"
30+
]
1731
}

packages/client-test-env/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { exec } = require('child_process');
22

3-
async function runCommand(command) {
3+
async function runCommand(command, quiet) {
44

55
if (!quiet) {
66
console.log(`> ${command}`)
@@ -26,11 +26,11 @@ async function runCommand(command) {
2626
})
2727
}
2828

29-
async function up(quite = false) {
29+
async function up(quiet = false) {
3030
await runCommand('docker-compose up -d', quiet)
3131
}
3232

33-
async function down(quite = false) {
33+
async function down(quiet = false) {
3434
await runCommand('docker-compose down', quiet)
3535
}
3636

packages/client-test-env/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@web3api/client-test-env",
33
"version": "0.0.1-alpha.1",
4+
"license": "MIT",
45
"main": "index.js",
56
"scripts": {
67
"up": "docker-compose up",

packages/wasm-ts/assembly/index.ts

-8
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ export {
2424
Bytes
2525
} from "./lib/core/Bytes";
2626

27-
export {
28-
JSON,
29-
JSONDecoder,
30-
JSONEncoder,
31-
JSONHandler,
32-
ThrowingJSONHandler
33-
} from "./lib/core/JSON";
34-
3527
///////////////////////////
3628
/// ASM Runtime Helpers ///
3729
///////////////////////////

packages/wasm-ts/assembly/lib/core/JSON.ts

-7
This file was deleted.

packages/wasm-ts/package.json

+2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
"name": "@web3api/wasm-ts",
33
"version": "0.0.1-alpha.1",
4+
"license": "MIT",
45
"main": "./assembly/index.ts",
56
"scripts": {
7+
"build": "asc ./assembly/index.ts --outFile ./build/index.wasm -d ./build/index.d.ts",
68
"test": "asp --verbose",
79
"test:ci": "asp --summary"
810
},

yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -10099,7 +10099,7 @@ typeforce@^1.11.3, typeforce@^1.11.5:
1009910099
resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.18.0.tgz#d7416a2c5845e085034d70fcc5b6cc4a90edbfdc"
1010010100
integrity sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==
1010110101

10102-
typescript@^3.9.6:
10102+
typescript@3.9.7, typescript@^3.9.6:
1010310103
version "3.9.7"
1010410104
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
1010510105
integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==

0 commit comments

Comments
 (0)