-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
37 changed files
with
971 additions
and
344 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/swcrc", | ||
"exclude": [".*\\.test.ts$"], | ||
"jsc": { | ||
"parser": { | ||
"syntax": "typescript" | ||
}, | ||
"target": "es2021" | ||
}, | ||
"module": { | ||
"type": "commonjs" | ||
} | ||
} |
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,33 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint", "import", "sort-imports-es6-autofix"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier", | ||
"plugin:import/recommended", | ||
"plugin:import/typescript" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"sort-imports-es6-autofix/sort-imports-es6": "error", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
"argsIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_", | ||
"caughtErrorsIgnorePattern": "^_" | ||
} | ||
] | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"typescript": { | ||
"project": "tsconfig.json" | ||
} | ||
} | ||
} | ||
} |
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,13 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/swcrc", | ||
"exclude": [".*\\.test.ts$"], | ||
"jsc": { | ||
"parser": { | ||
"syntax": "typescript" | ||
}, | ||
"target": "esnext" | ||
}, | ||
"module": { | ||
"type": "es6" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,15 @@ | ||
import * as tsConfigPaths from 'tsconfig-paths' | ||
import { pathToFileURL } from 'url' | ||
import { resolve as resolveTs } from 'ts-node/esm' | ||
|
||
const { absoluteBaseUrl, paths } = tsConfigPaths.loadConfig() | ||
const matchPath = tsConfigPaths.createMatchPath(absoluteBaseUrl, paths) | ||
|
||
export function resolve(specifier, ctx, defaultResolve) { | ||
const match = matchPath(specifier) | ||
return match | ||
? resolveTs(pathToFileURL(`${match}`).href, ctx, defaultResolve) | ||
: resolveTs(specifier, ctx, defaultResolve) | ||
} | ||
|
||
export { load, transformSource } from 'ts-node/esm' |
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
"license": "Apache-2.0", | ||
"packageManager": "[email protected]", | ||
"private": true, | ||
"type": "module", | ||
"workspaces": [ | ||
"packages/*", | ||
"executor" | ||
|
@@ -18,15 +19,16 @@ | |
"check": "cd executor && cargo check --locked", | ||
"test": "vitest run", | ||
"test:watch": "vitest", | ||
"start": "yarn script:start", | ||
"dev": "yarn script:run", | ||
"start": "NODE_OPTIONS='--loader ts-node/esm --loader ./loader.js --no-warnings --experimental-specifier-resolution=node' node packages/chopsticks/src/cli.ts", | ||
"dev": "NODE_OPTIONS='--loader ts-node/esm --loader ./loader.js --no-warnings --experimental-specifier-resolution=node' LOG_LEVEL=trace node packages/chopsticks/src/cli.ts -- --config=configs/dev.yml", | ||
"script:start": "yarn start", | ||
"docs:prep": "yarn workspaces foreach -pvit run docs:prep && cp docs/* docs-src", | ||
"docs:dev": "yarn docs:prep && vitepress dev", | ||
"docs:build": "yarn docs:prep && vitepress build", | ||
"docs:preview": "yarn docs:build && vitepress preview" | ||
}, | ||
"engines": { | ||
"node": ">=v14" | ||
"node": ">=v18" | ||
}, | ||
"prettier": { | ||
"tabWidth": 2, | ||
|
@@ -38,7 +40,7 @@ | |
"*.{js,ts,css,md}": "prettier --write" | ||
}, | ||
"devDependencies": { | ||
"@swc/core": "^1.3.95", | ||
"@swc/core": "^1.3.96", | ||
"@types/node": "^20.5.7", | ||
"@types/prettier": "^3.0.0", | ||
"@typescript-eslint/eslint-plugin": "^6.5.0", | ||
|
@@ -50,6 +52,7 @@ | |
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0", | ||
"husky": "^8.0.3", | ||
"prettier": "^3.0.2", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "^0.25.1", | ||
"typedoc-plugin-markdown": "^3.16.0", | ||
"typescript": "^5.1.6", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
{ | ||
"name": "@acala-network/chopsticks", | ||
"version": "0.9.1-2", | ||
"version": "0.9.1-3", | ||
"author": "Acala Developers <[email protected]>", | ||
"license": "Apache-2.0", | ||
"bin": "./chopsticks.js", | ||
"bin": "./chopsticks.cjs", | ||
"type": "module", | ||
"scripts": { | ||
"clean": "rm -rf dist", | ||
"build": "yarn clean && tsc -p ./tsconfig.json && tsc -p ./tsconfig.esm.json && echo '{\"type\": \"module\"}' > ./dist/esm/package.json && yarn copyfiles", | ||
"copyfiles": "cp -r src/utils/template dist/cjs/utils/ && cp -r src/utils/template dist/esm/utils/", | ||
"script:start": "cd ../..; ts-node --transpile-only -r tsconfig-paths/register packages/chopsticks/src/cli.ts", | ||
"script:run": "cd ../..; LOG_LEVEL=trace ts-node-dev --transpile-only -r tsconfig-paths/register --inspect --notify=false packages/chopsticks/src/cli.ts -- --config=configs/dev.yml", | ||
"dev:karura": "cd ../..; ts-node-dev --transpile-only --inspect -r tsconfig-paths/register --notify=false packages/chopsticks/src/cli.ts -- --config=configs/karura.yml", | ||
"dev:acala": "cd ../..; ts-node-dev --transpile-only --inspect -r tsconfig-paths/register --notify=false packages/chopsticks/src/cli.ts -- --config=configs/acala.yml", | ||
"dev:polkadot": "cd ../..; ts-node-dev --transpile-only --inspect -r tsconfig-paths/register --notify=false packages/chopsticks/src/cli.ts -- --config=configs/polkadot.yml", | ||
"dev:moonriver": "cd ../..; ts-node-dev --transpile-only --inspect -r tsconfig-paths/register --notify=false packages/chopsticks/src/cli.ts -- --config=configs/moonriver.yml", | ||
"dev:moonbeam": "cd ../..; ts-node-dev --transpile-only --inspect -r tsconfig-paths/register --notify=false packages/chopsticks/src/cli.ts -- --config=configs/moonbeam.yml", | ||
"build": "yarn clean && yarn build:cjs && yarn build:esm && yarn build:types", | ||
"build:cjs": "swc ./src --config-file ../../.cjsswcrc -d dist/cjs --copy-files && echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json", | ||
"build:esm": "swc ./src --config-file ../../.esmswcrc -d dist/esm --copy-files", | ||
"build:types": "tsc -p tsconfig.json --emitDeclarationOnly --outDir dist/types", | ||
"docs:prep": "typedoc" | ||
}, | ||
"dependencies": { | ||
|
@@ -32,21 +28,21 @@ | |
"zod": "^3.22.3" | ||
}, | ||
"devDependencies": { | ||
"@swc/cli": "0.1.62", | ||
"@swc/core": "^1.3.96", | ||
"@types/global-agent": "^2.1.1", | ||
"@types/js-yaml": "^4.0.5", | ||
"@types/lodash": "^4.14.199", | ||
"@types/node": "^20.5.7", | ||
"@types/ws": "^8.5.6", | ||
"@types/yargs": "^17.0.29", | ||
"ts-node": "^10.9.1", | ||
"ts-node-dev": "^2.0.0", | ||
"typescript": "^5.1.6" | ||
}, | ||
"files": [ | ||
"dist/esm/**", | ||
"dist/cjs/**", | ||
"dist/types/**", | ||
"chopsticks.js" | ||
"chopsticks.cjs" | ||
], | ||
"main": "./dist/cjs/index.js", | ||
"module": "./dist/esm/index.js", | ||
|
@@ -71,6 +67,6 @@ | |
"default": "./dist/esm/plugins/*.js" | ||
}, | ||
"./package.json": "./package.json", | ||
"./package.esm.json": "./dist/esm/package.json" | ||
"./package.cjs.json": "./dist/cjs/package.json" | ||
} | ||
} |
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
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,7 +1,7 @@ | ||
{ | ||
"entryPoints": ["src/types.ts"], | ||
"out": "../../docs-src/chopsticks", | ||
"plugin": "typedoc-plugin-markdown", | ||
"plugin": ["typedoc-plugin-markdown"], | ||
"readme": "none", | ||
"tsconfig": "tsconfig.esm.json" | ||
"tsconfig": "tsconfig.json" | ||
} |
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,12 +1,15 @@ | ||
{ | ||
"name": "@acala-network/chopsticks-core", | ||
"version": "0.9.1-2", | ||
"version": "0.9.1-3", | ||
"author": "Acala Developers <[email protected]>", | ||
"license": "Apache-2.0", | ||
"type": "module", | ||
"scripts": { | ||
"clean": "rm -rf dist", | ||
"build": "yarn clean && tsc -p ./tsconfig.json && tsc -p ./tsconfig.esm.json && echo '{\"type\": \"module\"}' > ./dist/esm/package.json && yarn copyfiles", | ||
"copyfiles": "cp -r src/wasm-executor/*.mjs dist/cjs/wasm-executor/ && cp -r src/wasm-executor/*.mjs dist/esm/wasm-executor/", | ||
"build": "yarn clean && yarn build:cjs && yarn build:esm && yarn build:types", | ||
"build:cjs": "swc ./src --config-file ../../.cjsswcrc -d dist/cjs && echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json", | ||
"build:esm": "swc ./src --config-file ../../.esmswcrc -d dist/esm", | ||
"build:types": "tsc -p tsconfig.json --emitDeclarationOnly --outDir dist/types", | ||
"docs:prep": "typedoc" | ||
}, | ||
"dependencies": { | ||
|
@@ -21,6 +24,8 @@ | |
"zod": "^3.22.3" | ||
}, | ||
"devDependencies": { | ||
"@swc/cli": "0.1.62", | ||
"@swc/core": "^1.3.96", | ||
"@types/lodash": "^4.14.199", | ||
"typescript": "^5.1.6" | ||
}, | ||
|
@@ -46,7 +51,7 @@ | |
"default": "./dist/esm/index.js" | ||
}, | ||
"./package.json": "./package.json", | ||
"./package.esm.json": "./dist/esm/package.json" | ||
"./package.cjs.json": "./dist/cjs/package.json" | ||
}, | ||
"browser": { | ||
"./dist/cjs/wasm-executor/node-worker.js": "./dist/cjs/wasm-executor/browser-worker.js", | ||
|
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
Oops, something went wrong.