mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-06-13 09:21:12 +00:00
+2
-1
@@ -7,7 +7,8 @@ module.exports = {
|
|||||||
...base,
|
...base,
|
||||||
ignorePatterns: [
|
ignorePatterns: [
|
||||||
...base.ignorePatterns,
|
...base.ignorePatterns,
|
||||||
'jest/**/*'
|
'jest/**/*',
|
||||||
|
'**/deno/*.ts'
|
||||||
],
|
],
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
...base.parserOptions,
|
...base.parserOptions,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ jobs:
|
|||||||
pr:
|
pr:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
step: ['lint', 'test', 'build']
|
step: ['lint', 'test', 'build', 'deno']
|
||||||
name: ${{ matrix.step }}
|
name: ${{ matrix.step }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
@@ -13,7 +13,11 @@ jobs:
|
|||||||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: denoland/setup-deno@v1
|
||||||
|
with:
|
||||||
|
deno-version: vx.x.x
|
||||||
- name: ${{ matrix.step }}
|
- name: ${{ matrix.step }}
|
||||||
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
yarn install --immutable | grep -v 'YN0013'
|
yarn install --immutable | grep -v 'YN0013'
|
||||||
yarn ${{ matrix.step }}
|
yarn ${{ matrix.step }}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
// Copyright 2020-2022 @polkadot/phishing authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
// auto-generated via deno/setup.ts, do not edit
|
||||||
|
|
||||||
|
export * as phishing from 'https://deno.land/x/polkadot/phishing/mod.ts';
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"imports": {
|
||||||
|
"https://deno.land/x/polkadot/phishing/": "../packages/phishing/build-deno/"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
// Copyright 2020-2022 @polkadot/phishing 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> = {};
|
||||||
|
|
||||||
|
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 2020-${new Date().getFullYear()} @polkadot/phishing 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`);
|
||||||
@@ -21,6 +21,9 @@
|
|||||||
"build:release:ipfs": "node scripts/ipfsUpload.mjs",
|
"build:release:ipfs": "node scripts/ipfsUpload.mjs",
|
||||||
"build:rollup": "polkadot-exec-rollup --config",
|
"build:rollup": "polkadot-exec-rollup --config",
|
||||||
"clean": "polkadot-dev-clean-build",
|
"clean": "polkadot-dev-clean-build",
|
||||||
|
"deno": "yarn build && yarn deno:setup && yarn deno:check",
|
||||||
|
"deno:check": "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",
|
||||||
"lint": "polkadot-dev-run-lint",
|
"lint": "polkadot-dev-run-lint",
|
||||||
"phishing:addrcheck": "polkadot-dev-run-test --runInBand --detectOpenHandles packages/phishing/src/addrcheck",
|
"phishing:addrcheck": "polkadot-dev-run-test --runInBand --detectOpenHandles packages/phishing/src/addrcheck",
|
||||||
"phishing:crosscheck": "polkadot-dev-run-test --runInBand --detectOpenHandles packages/phishing/src/crosscheck",
|
"phishing:crosscheck": "polkadot-dev-run-test --runInBand --detectOpenHandles packages/phishing/src/crosscheck",
|
||||||
|
|||||||
Reference in New Issue
Block a user