Skip to content

Commit dc3cb35

Browse files
committed
SD-26: Add wallet connection and shielder sdk
1 parent cefd521 commit dc3cb35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+4959
-720
lines changed

.github/actions/setup-project/action.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Setup project
22
description: Setup npm project in Node.js
33

4-
#inputs:
5-
# NPM_TOKEN:
6-
# required: true
7-
# description: NPM_TOKEN
4+
inputs:
5+
NPM_TOKEN:
6+
required: true
7+
description: NPM_TOKEN
88

99
outputs:
1010
node-version:
@@ -32,8 +32,12 @@ runs:
3232
key: os-${{ runner.os }}/node-${{ steps.node.outputs.version }}/node_modules-${{ hashFiles('package-lock.json') }}
3333
- name: Install dependencies
3434
if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
35-
run: npm ci
35+
run: |
36+
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
37+
npm ci
3638
shell: bash
39+
env:
40+
NPM_TOKEN: ${{ inputs.NPM_TOKEN }}
3741
- name: Cache node_modules
3842
if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
3943
uses: actions/cache@v4

.github/workflows/chromatic.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v4
1818
- uses: ./.github/actions/setup-project
19-
# with:
20-
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
19+
with:
20+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2121

2222
storybook:
2323
name: Chromatic toolset initialization

.github/workflows/code-quality.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: ./.github/actions/setup-project
14-
# with:
15-
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
14+
with:
15+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1616

1717
lint-commits:
1818
name: Lint commits
@@ -23,6 +23,8 @@ jobs:
2323
with:
2424
fetch-depth: 0
2525
- uses: ./.github/actions/setup-project
26+
with:
27+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2628
- run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
2729

2830
type-check:
@@ -32,6 +34,8 @@ jobs:
3234
steps:
3335
- uses: actions/checkout@v4
3436
- uses: ./.github/actions/setup-project
37+
with:
38+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3539
- run: npm run type-check
3640

3741
lint:
@@ -41,6 +45,8 @@ jobs:
4145
steps:
4246
- uses: actions/checkout@v4
4347
- uses: ./.github/actions/setup-project
48+
with:
49+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4450
- run: npm run lint
4551

4652
test:
@@ -51,12 +57,14 @@ jobs:
5157
steps:
5258
- uses: actions/checkout@v4
5359
- uses: ./.github/actions/setup-project
60+
with:
61+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5462
- name: Export variables
5563
shell: bash
5664
env:
5765
VARS_CONTEXT: ${{ toJson(vars) }}
5866
run: |
5967
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
60-
to_envs() { jq -r "to_entries[] | select(.key|startswith(\"PUBLIC_VAR\")) | \"\(.key)<<$EOF\n\(.value)\n$EOF\n\""; }
68+
to_envs() { jq -r "to_entries[] | select(.key|startswith(\"PUBLIC_VAR_\")) | \"\(.key)<<$EOF\n\(.value)\n$EOF\n\""; }
6169
echo "$VARS_CONTEXT" | to_envs >> $GITHUB_ENV
6270
- run: npm test

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ npm-debug.log*
66
node_modules
77
dist
88
*.local
9+
10+
.env
11+
12+
.qodo

envVarsSchema.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import * as z from 'zod';
2+
3+
export default z.object({
4+
PUBLIC_VAR_REOWN_PROJECT_ID: z.string(),
5+
});

eslint.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import eslintPluginStorybook from 'eslint-plugin-storybook';
1212
import tseslint from 'typescript-eslint';
1313

1414
export default tseslint.config(
15+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-argument
1516
includeIgnoreFile(path.resolve(path.dirname(fileURLToPath(import.meta.url)), '.gitignore')),
1617
eslint.configs.recommended,
1718
tseslint.configs.strictTypeChecked,
@@ -36,6 +37,7 @@ export default tseslint.config(
3637
'.storybook/*',
3738
],
3839
},
40+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
3941
tsconfigRootDir: import.meta.dirname,
4042
},
4143

@@ -138,7 +140,7 @@ export default tseslint.config(
138140
},
139141
],
140142
patterns: [{
141-
regex: 'src/(?!(domains/.*/(components|utils|assets|types|consts)/.*))',
143+
regex: 'src/(?!(domains/.*/(components|utils|assets|types|consts|stores)/.*))',
142144
message: 'Organize modules in predefined groups under domains.',
143145
}, {
144146
/*

0 commit comments

Comments
 (0)