-
Notifications
You must be signed in to change notification settings - Fork 384
Fix .env creating an invalid array of endpoints #2997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes fix an issue with Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/cli/src/controller/init-controller.ts (1)
322-324: Simplify endpoint formatting for non-array values.The array handling is correct, but using
JSON.stringifyfor non-array endpoints adds unnecessary quotes that dotenv will strip during parsing. This creates inconsistency with the array case and adds an indirect layer. Use the endpoint value directly:- const endpointStr = Array.isArray(project.endpoint) ? project.endpoint.join(',') : JSON.stringify(project.endpoint); + const endpointStr = Array.isArray(project.endpoint) ? project.endpoint.join(',') : project.endpoint;This ensures consistent .env formatting and aligns with how the value is read back on line 243:
process.env.ENDPOINT!?.split(',').
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/cli/CHANGELOG.md(1 hunks)packages/cli/src/controller/init-controller.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Use TypeScript throughout with strict configuration in the monorepo
Use Ethers.js for Ethereum integration
Files:
packages/cli/src/controller/init-controller.ts
packages/**/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Run ESLint with TypeScript support, Prettier, and various plugins across all TypeScript files using configured husky pre-commit hooks and lint-staged
Files:
packages/cli/src/controller/init-controller.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Coverage report
🔇 Additional comments (2)
packages/cli/CHANGELOG.md (1)
8-9: LGTM!The changelog entry correctly documents the fix for the .env file endpoints array issue, following the established format.
packages/cli/src/controller/init-controller.ts (1)
328-328: LGTM!Good catch adding the missing
envDevelopLocalPathwrite. This completes the set of environment files that should be initialized.
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🟢 | Statements | 87.52% (+17.41% 🔼) |
70947/81068 |
| 🟢 | Branches | 80.62% (+2.33% 🔼) |
3353/4159 |
| 🟡 | Functions | 66.58% (+4.08% 🔼) |
1271/1909 |
| 🟢 | Lines | 87.52% (+17.41% 🔼) |
70947/81068 |
⚠️ Details were not displayed: the report size has exceeded the limit.
Test suite run failed
Failed tests: 6/714. Failed suites: 3/116.
● Promise Utils › utils.promise delay()
expect(received).toBeGreaterThanOrEqual(expected)
Expected: >= 1000
Received: 999
9 | await delay(1);
10 | const millsecDiff = new Date().getTime() - start.getTime();
> 11 | expect(millsecDiff).toBeGreaterThanOrEqual(1000);
| ^
12 | expect(millsecDiff).toBeLessThan(1050);
13 | });
14 |
at Object.<anonymous> (packages/node-core/src/utils/promise.spec.ts:11:25)
● Cli publish › should upload appropriate project to IPFS
Publish project to default IPFS failed
160 | try {
161 | const results = await ipfsWrite.addAll(contents, {pin: true, cidVersion: 0, wrapWithDirectory: isMultichain});
> 162 | for (const result of results) {
| ^
163 | fileCidMap.set(result.path, result.cid);
164 |
165 | await ipfsWrite.pinRemoteAdd(result.cid, {service: PIN_SERVICE}).catch((e) => {
at packages/cli/src/controller/publish-controller.ts:162:15
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async Object.<anonymous> (packages/cli/src/controller/publish-controller.spec.ts:34:21)
Cause:
Failed to upload files to IPFS
87 | if (options) {
88 | url.searchParams.append('pin', options.pin?.toString() ?? 'true');
> 89 | url.searchParams.append('cid-version', options.cidVersion?.toString() ?? '0');
| ^
90 | url.searchParams.append('wrap-with-directory', options.wrapWithDirectory?.toString() ?? 'false');
91 | }
92 |
at IPFSHTTPClientLite.addAll (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:89:19)
at async IPFSHTTPClientLite.add (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:34:25)
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async Object.<anonymous> (packages/cli/src/controller/publish-controller.spec.ts:34:21)
Cause:
AxiosError: Request failed with status code 413
66 | url.toString(),
67 | {},
> 68 | {
| ^
69 | headers: {
70 | ...this.option.headers,
71 | },
at settle (node_modules/axios/lib/core/settle.js:19:12)
at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:792:11)
at Axios.request (node_modules/axios/lib/core/Axios.js:45:41)
at async IPFSHTTPClientLite.addAll (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:68:30)
at async IPFSHTTPClientLite.add (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:34:25)
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async Object.<anonymous> (packages/cli/src/controller/publish-controller.spec.ts:34:21)
● Cli publish › Get directory CID from multi-chain project
Publish project to default IPFS failed
160 | try {
161 | const results = await ipfsWrite.addAll(contents, {pin: true, cidVersion: 0, wrapWithDirectory: isMultichain});
> 162 | for (const result of results) {
| ^
163 | fileCidMap.set(result.path, result.cid);
164 |
165 | await ipfsWrite.pinRemoteAdd(result.cid, {service: PIN_SERVICE}).catch((e) => {
at packages/cli/src/controller/publish-controller.ts:162:15
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async Object.<anonymous> (packages/cli/src/controller/publish-controller.spec.ts:62:24)
Cause:
Failed to upload files to IPFS
87 | if (options) {
88 | url.searchParams.append('pin', options.pin?.toString() ?? 'true');
> 89 | url.searchParams.append('cid-version', options.cidVersion?.toString() ?? '0');
| ^
90 | url.searchParams.append('wrap-with-directory', options.wrapWithDirectory?.toString() ?? 'false');
91 | }
92 |
at IPFSHTTPClientLite.addAll (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:89:19)
at async IPFSHTTPClientLite.add (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:34:25)
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async Object.<anonymous> (packages/cli/src/controller/publish-controller.spec.ts:62:24)
Cause:
AxiosError: Request failed with status code 413
66 | url.toString(),
67 | {},
> 68 | {
| ^
69 | headers: {
70 | ...this.option.headers,
71 | },
at settle (node_modules/axios/lib/core/settle.js:19:12)
at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:792:11)
at Axios.request (node_modules/axios/lib/core/Axios.js:45:41)
at async IPFSHTTPClientLite.addAll (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:68:30)
at async IPFSHTTPClientLite.add (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:34:25)
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async Object.<anonymous> (packages/cli/src/controller/publish-controller.spec.ts:62:24)
● Integration test - Publish › overwrites any existing CID files
Publish project to default IPFS failed
160 | try {
161 | const results = await ipfsWrite.addAll(contents, {pin: true, cidVersion: 0, wrapWithDirectory: isMultichain});
> 162 | for (const result of results) {
| ^
163 | fileCidMap.set(result.path, result.cid);
164 |
165 | await ipfsWrite.pinRemoteAdd(result.cid, {service: PIN_SERVICE}).catch((e) => {
at packages/cli/src/controller/publish-controller.ts:162:15
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async publishAdapter (packages/cli/src/commands/publish.ts:44:26)
at async Publish.run (packages/cli/src/commands/publish.ts:66:24)
at async Publish._run (node_modules/@oclif/core/lib/command.js:182:22)
at async Object.<anonymous> (packages/cli/src/commands/publish.test.ts:33:9)
Cause:
Failed to upload files to IPFS
87 | if (options) {
88 | url.searchParams.append('pin', options.pin?.toString() ?? 'true');
> 89 | url.searchParams.append('cid-version', options.cidVersion?.toString() ?? '0');
| ^
90 | url.searchParams.append('wrap-with-directory', options.wrapWithDirectory?.toString() ?? 'false');
91 | }
92 |
at IPFSHTTPClientLite.addAll (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:89:19)
at async IPFSHTTPClientLite.add (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:34:25)
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async publishAdapter (packages/cli/src/commands/publish.ts:44:26)
at async Publish.run (packages/cli/src/commands/publish.ts:66:24)
at async Publish._run (node_modules/@oclif/core/lib/command.js:182:22)
at async Object.<anonymous> (packages/cli/src/commands/publish.test.ts:33:9)
Cause:
AxiosError: Request failed with status code 413
66 | url.toString(),
67 | {},
> 68 | {
| ^
69 | headers: {
70 | ...this.option.headers,
71 | },
at settle (node_modules/axios/lib/core/settle.js:19:12)
at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:792:11)
at Axios.request (node_modules/axios/lib/core/Axios.js:45:41)
at async IPFSHTTPClientLite.addAll (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:68:30)
at async IPFSHTTPClientLite.add (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:34:25)
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async publishAdapter (packages/cli/src/commands/publish.ts:44:26)
at async Publish.run (packages/cli/src/commands/publish.ts:66:24)
at async Publish._run (node_modules/@oclif/core/lib/command.js:182:22)
at async Object.<anonymous> (packages/cli/src/commands/publish.test.ts:33:9)
● Integration test - Publish › create ipfsCID file stored in local with dictiory path
Publish project to default IPFS failed
160 | try {
161 | const results = await ipfsWrite.addAll(contents, {pin: true, cidVersion: 0, wrapWithDirectory: isMultichain});
> 162 | for (const result of results) {
| ^
163 | fileCidMap.set(result.path, result.cid);
164 |
165 | await ipfsWrite.pinRemoteAdd(result.cid, {service: PIN_SERVICE}).catch((e) => {
at packages/cli/src/controller/publish-controller.ts:162:15
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async publishAdapter (packages/cli/src/commands/publish.ts:44:26)
at async Publish.run (packages/cli/src/commands/publish.ts:66:24)
at async Publish._run (node_modules/@oclif/core/lib/command.js:182:22)
at async Object.<anonymous> (packages/cli/src/commands/publish.test.ts:33:9)
Cause:
Failed to upload files to IPFS
87 | if (options) {
88 | url.searchParams.append('pin', options.pin?.toString() ?? 'true');
> 89 | url.searchParams.append('cid-version', options.cidVersion?.toString() ?? '0');
| ^
90 | url.searchParams.append('wrap-with-directory', options.wrapWithDirectory?.toString() ?? 'false');
91 | }
92 |
at IPFSHTTPClientLite.addAll (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:89:19)
at async IPFSHTTPClientLite.add (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:34:25)
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async publishAdapter (packages/cli/src/commands/publish.ts:44:26)
at async Publish.run (packages/cli/src/commands/publish.ts:66:24)
at async Publish._run (node_modules/@oclif/core/lib/command.js:182:22)
at async Object.<anonymous> (packages/cli/src/commands/publish.test.ts:33:9)
Cause:
AxiosError: Request failed with status code 413
66 | url.toString(),
67 | {},
> 68 | {
| ^
69 | headers: {
70 | ...this.option.headers,
71 | },
at settle (node_modules/axios/lib/core/settle.js:19:12)
at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:792:11)
at Axios.request (node_modules/axios/lib/core/Axios.js:45:41)
at async IPFSHTTPClientLite.addAll (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:68:30)
at async IPFSHTTPClientLite.add (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:34:25)
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async publishAdapter (packages/cli/src/commands/publish.ts:44:26)
at async Publish.run (packages/cli/src/commands/publish.ts:66:24)
at async Publish._run (node_modules/@oclif/core/lib/command.js:182:22)
at async Object.<anonymous> (packages/cli/src/commands/publish.test.ts:33:9)
● Integration test - Publish › file name consistent with manifest file name, if -f <manifest path> is used
Publish project to default IPFS failed
160 | try {
161 | const results = await ipfsWrite.addAll(contents, {pin: true, cidVersion: 0, wrapWithDirectory: isMultichain});
> 162 | for (const result of results) {
| ^
163 | fileCidMap.set(result.path, result.cid);
164 |
165 | await ipfsWrite.pinRemoteAdd(result.cid, {service: PIN_SERVICE}).catch((e) => {
at packages/cli/src/controller/publish-controller.ts:162:15
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async publishAdapter (packages/cli/src/commands/publish.ts:44:26)
at async Publish.run (packages/cli/src/commands/publish.ts:66:24)
at async Publish._run (node_modules/@oclif/core/lib/command.js:182:22)
at async Object.<anonymous> (packages/cli/src/commands/publish.test.ts:33:9)
Cause:
Failed to upload files to IPFS
87 | if (options) {
88 | url.searchParams.append('pin', options.pin?.toString() ?? 'true');
> 89 | url.searchParams.append('cid-version', options.cidVersion?.toString() ?? '0');
| ^
90 | url.searchParams.append('wrap-with-directory', options.wrapWithDirectory?.toString() ?? 'false');
91 | }
92 |
at IPFSHTTPClientLite.addAll (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:89:19)
at async IPFSHTTPClientLite.add (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:34:25)
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async publishAdapter (packages/cli/src/commands/publish.ts:44:26)
at async Publish.run (packages/cli/src/commands/publish.ts:66:24)
at async Publish._run (node_modules/@oclif/core/lib/command.js:182:22)
at async Object.<anonymous> (packages/cli/src/commands/publish.test.ts:33:9)
Cause:
AxiosError: Request failed with status code 413
66 | url.toString(),
67 | {},
> 68 | {
| ^
69 | headers: {
70 | ...this.option.headers,
71 | },
at settle (node_modules/axios/lib/core/settle.js:19:12)
at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:792:11)
at Axios.request (node_modules/axios/lib/core/Axios.js:45:41)
at async IPFSHTTPClientLite.addAll (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:68:30)
at async IPFSHTTPClientLite.add (packages/common/src/project/IpfsHttpClientLite/IPFSHTTPClientLite.ts:34:25)
at async Promise.all (index 0)
at async uploadFile (packages/cli/src/controller/publish-controller.ts:165:30)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:88:26)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 3)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async Promise.all (index 0)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:79:17)
at async /home/runner/work/subql/subql/packages/cli/src/controller/publish-controller.ts:93:26
at async Promise.all (index 5)
at async replaceFileReferences (packages/cli/src/controller/publish-controller.ts:91:9)
at async uploadToIpfs (packages/cli/src/controller/publish-controller.ts:59:28)
at async publishAdapter (packages/cli/src/commands/publish.ts:44:26)
at async Publish.run (packages/cli/src/commands/publish.ts:66:24)
at async Publish._run (node_modules/@oclif/core/lib/command.js:182:22)
at async Object.<anonymous> (packages/cli/src/commands/publish.test.ts:33:9)
Report generated by 🧪jest coverage report action from 876b2cc
Description
Fixes initializing new projects with an invalid .env file that has an array of endpoints that cannot be parsed
Type of change
Please delete options that are not relevant.
Checklist
Summary by CodeRabbit
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.