@@ -23,5 +23,5 @@ jobs:
|
||||
if [ "${{ matrix.step }}" != "check" ]; then
|
||||
./scripts/install-build-deps.sh
|
||||
fi
|
||||
yarn deno:setup
|
||||
yarn polkadot-dev-deno-map
|
||||
yarn deno:${{ matrix.step }}
|
||||
|
||||
@@ -14,6 +14,8 @@ pkg/
|
||||
target/
|
||||
tmp/
|
||||
wabt/
|
||||
/import_map.json
|
||||
/mod.ts
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
// Copyright 2019-2022 @polkadot/wasm authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// auto-generated via deno/setup.ts, do not edit
|
||||
|
||||
export * as wasmBridge from 'https://deno.land/x/polkadot/wasm-bridge/mod.ts';
|
||||
export * as wasmCrypto from 'https://deno.land/x/polkadot/wasm-crypto/mod.ts';
|
||||
export * as wasmCryptoAsmjs from 'https://deno.land/x/polkadot/wasm-crypto-asmjs/mod.ts';
|
||||
export * as wasmCryptoInit from 'https://deno.land/x/polkadot/wasm-crypto-init/mod.ts';
|
||||
export * as wasmCryptoWasm from 'https://deno.land/x/polkadot/wasm-crypto-wasm/mod.ts';
|
||||
export * as wasmUtil from 'https://deno.land/x/polkadot/wasm-util/mod.ts';
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"imports": {
|
||||
"crypto": "https://deno.land/std/node/crypto.ts",
|
||||
"@polkadot/util": "https://deno.land/x/polkadot/common/mod.ts",
|
||||
"https://deno.land/x/polkadot/wasm-crypto-init/": "../packages/wasm-crypto-init/build-deno/",
|
||||
"https://deno.land/x/polkadot/wasm-bridge/": "../packages/wasm-bridge/build-deno/",
|
||||
"https://deno.land/x/polkadot/wasm-crypto-wasm/": "../packages/wasm-crypto-wasm/build-deno/",
|
||||
"https://deno.land/x/polkadot/wasm-crypto/": "../packages/wasm-crypto/build-deno/",
|
||||
"https://deno.land/x/polkadot/wasm-crypto-asmjs/": "../packages/wasm-crypto-asmjs/build-deno/",
|
||||
"https://deno.land/x/polkadot/wasm-util/": "../packages/wasm-util/build-deno/"
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
// Copyright 2019-2022 @polkadot/wasm authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import { stringCamelCase } from 'https://deno.land/x/polkadot/util/mod.ts';
|
||||
|
||||
const exports: string[] = [];
|
||||
const imports: Record<string, string> = {
|
||||
'@polkadot/util': 'https://deno.land/x/polkadot/common/mod.ts',
|
||||
crypto: 'https://deno.land/std/node/crypto.ts'
|
||||
};
|
||||
|
||||
for await (const entry of Deno.readDir('packages')) {
|
||||
if (entry.isDirectory) {
|
||||
try {
|
||||
await Deno.readTextFile(`packages/${entry.name}/src/mod.ts`);
|
||||
|
||||
exports.push(`export * as ${stringCamelCase(entry.name)} from 'https://deno.land/x/polkadot/${entry.name}/mod.ts';`);
|
||||
|
||||
imports[`https://deno.land/x/polkadot/${entry.name}/`] = `../packages/${entry.name}/build-deno/`;
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await Deno.writeTextFile('deno/check.ts', `// Copyright 2019-${new Date().getFullYear()} @polkadot/wasm authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// auto-generated via deno/setup.ts, do not edit\n\n${exports.sort().join('\n')}\n`);
|
||||
|
||||
await Deno.writeTextFile('deno/import_map.json', `${JSON.stringify({ imports }, null, 2)}\n`);
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"imports": {
|
||||
"crypto": "https://deno.land/std/node/crypto.ts",
|
||||
"@polkadot/util": "https://deno.land/x/polkadot/common/mod.ts"
|
||||
}
|
||||
}
|
||||
+3
-4
@@ -23,12 +23,11 @@
|
||||
"build:wasm": "./scripts/build.sh",
|
||||
"clean": "./scripts/clean.sh",
|
||||
"deno:build": "yarn build",
|
||||
"deno:check": "yarn build:js && deno check --import-map=deno/import_map.json deno/check.ts",
|
||||
"deno:setup": "deno run --import-map=deno/import_map.json --allow-read --allow-write deno/setup.ts",
|
||||
"deno:check": "yarn build:js && deno check --import-map=import_map.json mod.ts",
|
||||
"lint": "polkadot-dev-run-lint",
|
||||
"postinstall": "polkadot-dev-yarn-only",
|
||||
"test": "yarn test:wasm-crypto:rust",
|
||||
"test:wasm-crypto:deno": "deno test --allow-read --import-map=deno/import_map.json packages/wasm-crypto/test/deno.ts",
|
||||
"test:wasm-crypto:deno": "deno test --allow-read --import-map=import_map.json packages/wasm-crypto/test/deno.ts",
|
||||
"test:wasm-crypto:js": "yarn test:wasm-crypto:js:jest && yarn test:wasm-crypto:js:node",
|
||||
"test:wasm-crypto:js:jest": "polkadot-dev-run-test ./test/jest.spec.js",
|
||||
"test:wasm-crypto:js:node": "cd packages/wasm-crypto && node ./test/wasm.cjs && node ./test/asm.cjs",
|
||||
@@ -36,7 +35,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.18.6",
|
||||
"@polkadot/dev": "^0.67.57",
|
||||
"@polkadot/dev": "^0.67.63",
|
||||
"fflate": "^0.7.3",
|
||||
"override-require": "^1.1.1"
|
||||
},
|
||||
|
||||
@@ -1941,9 +1941,9 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@polkadot/dev@npm:^0.67.57":
|
||||
version: 0.67.57
|
||||
resolution: "@polkadot/dev@npm:0.67.57"
|
||||
"@polkadot/dev@npm:^0.67.63":
|
||||
version: 0.67.63
|
||||
resolution: "@polkadot/dev@npm:0.67.63"
|
||||
dependencies:
|
||||
"@babel/cli": ^7.18.6
|
||||
"@babel/core": ^7.18.6
|
||||
@@ -2019,6 +2019,7 @@ __metadata:
|
||||
polkadot-dev-clean-build: scripts/polkadot-dev-clean-build.mjs
|
||||
polkadot-dev-contrib: scripts/polkadot-dev-contrib.mjs
|
||||
polkadot-dev-copy-to: scripts/polkadot-dev-copy-to.mjs
|
||||
polkadot-dev-deno-map: scripts/polkadot-dev-deno-map.mjs
|
||||
polkadot-dev-run-lint: scripts/polkadot-dev-run-lint.mjs
|
||||
polkadot-dev-run-prettier: scripts/polkadot-dev-run-prettier.mjs
|
||||
polkadot-dev-run-test: scripts/polkadot-dev-run-test.mjs
|
||||
@@ -2031,7 +2032,7 @@ __metadata:
|
||||
polkadot-exec-rollup: scripts/polkadot-exec-rollup.mjs
|
||||
polkadot-exec-tsc: scripts/polkadot-exec-tsc.mjs
|
||||
polkadot-exec-webpack: scripts/polkadot-exec-webpack.mjs
|
||||
checksum: 65e2b4c6a50b174332fe88fac580f4a6e5123e58aea59ff3888ac47f18d83c7d0881bd533b761b5643c477f09f41bd7f3652d8a61b6105265fd9a4e04c44c88e
|
||||
checksum: dcd126122c2bc793930e9974dfd0fae035e1a8b97bd6df4a3cfc82bee5ec76a328570401b0b81dd1d2db7459c08a50b8169b1814934fca677d8b25b699097cc4
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -8595,7 +8596,7 @@ resolve@^2.0.0-next.3:
|
||||
resolution: "root-workspace-0b6124@workspace:."
|
||||
dependencies:
|
||||
"@babel/core": ^7.18.6
|
||||
"@polkadot/dev": ^0.67.57
|
||||
"@polkadot/dev": ^0.67.63
|
||||
fflate: ^0.7.3
|
||||
override-require: ^1.1.1
|
||||
languageName: unknown
|
||||
|
||||
Reference in New Issue
Block a user