diff --git a/.changeset/empty-fishes-compare.md b/.changeset/empty-fishes-compare.md new file mode 100644 index 00000000..9993dc72 --- /dev/null +++ b/.changeset/empty-fishes-compare.md @@ -0,0 +1,5 @@ +--- +"@fleek-platform/cli": patch +--- + +change link in `ipfs add` command to w3s.link diff --git a/.changeset/strange-boxes-destroy.md b/.changeset/strange-boxes-destroy.md new file mode 100644 index 00000000..7bb13e9f --- /dev/null +++ b/.changeset/strange-boxes-destroy.md @@ -0,0 +1,5 @@ +--- +"@fleek-platform/cli": minor +--- + +Legacy site deployment upload was replaced by new SDK client diff --git a/package.json b/package.json index d45c4c70..3dee1e1a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fleek-platform/cli", - "version": "3.8.3", + "version": "3.9.4", "bin": { "fleek": "bin/index.js" }, @@ -69,11 +69,11 @@ "@biomejs/biome": "^1.8.3", "@changesets/cli": "^2.27.6", "@fleek-platform/errors": "^2.7.0", - "@fleek-platform/sdk": "^3.5.4", + "@fleek-platform/sdk": "^3.7.2", "@fleek-platform/tester": "^2.12.1", "@fleek-platform/utils-gateways": "^0.1.12", "@fleek-platform/utils-github": "^0.1.0", - "@fleek-platform/utils-ipfs": "^0.4.4", + "@fleek-platform/utils-ipfs": "^0.4.5", "@fleek-platform/utils-ipns": "^0.1.13", "@fleek-platform/utils-validation": "^2.4.0", "@tsconfig/node16": "^16.1.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 31328d69..0bcbcf30 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -112,8 +112,8 @@ importers: specifier: ^2.7.0 version: 2.7.0 '@fleek-platform/sdk': - specifier: ^3.5.4 - version: 3.5.4 + specifier: ^3.7.2 + version: 3.7.2 '@fleek-platform/tester': specifier: ^2.12.1 version: 2.12.1(graphql@15.9.0) @@ -124,8 +124,8 @@ importers: specifier: ^0.1.0 version: 0.1.0 '@fleek-platform/utils-ipfs': - specifier: ^0.4.4 - version: 0.4.4 + specifier: ^0.4.5 + version: 0.4.5 '@fleek-platform/utils-ipns': specifier: ^0.1.13 version: 0.1.13 @@ -755,8 +755,8 @@ packages: peerDependencies: esbuild: '>=0.21.0' - '@fleek-platform/sdk@3.5.4': - resolution: {integrity: sha512-cDTGIcrtjcXF5y+w1SfijjlZyVOeidKYrKeF7ZbqcK6nlUEtdqOunJ+kxicpBiHoulTHYnF6tvqnuxQXEQnO6g==} + '@fleek-platform/sdk@3.7.2': + resolution: {integrity: sha512-sWv0o5AfqtGsbbZp5GHsJp/dRqjxEAi2uqm1TXUc/SjpzPacxC+bKsJvoV7kcn2XX34cSYrZlfVi2bWMHLAqFg==} engines: {node: '>=18.18.2'} '@fleek-platform/tester@2.12.1': @@ -768,8 +768,8 @@ packages: '@fleek-platform/utils-github@0.1.0': resolution: {integrity: sha512-pumNPpD815ogT+HhbiYWWZtGV4PYbUFbHQNdTDRCcTVr+c0jt5izzKBsJ9X3vaUBjPcU2hs2SsOFcbfGlobaGw==} - '@fleek-platform/utils-ipfs@0.4.4': - resolution: {integrity: sha512-J7XNokjTETCdnqeea+zbCvHaZoZ/IEYdd6K3TZnKlDeou0b3HA9XrxBvB78DytZliVZA30NkGllYC3WQrulpOA==} + '@fleek-platform/utils-ipfs@0.4.5': + resolution: {integrity: sha512-AxwSaZIFkubs0KBM+AwOkTIbWZ6U3c3Ny/R9CQm5heajAOfgpzcw9a22lM+stb5VVDUfhoOQKJ+klQg1+U5WkQ==} '@fleek-platform/utils-ipns@0.1.13': resolution: {integrity: sha512-uAtoYLXla46jdKqOYpDJIWNIymHxsvkBwp7cwsZN3uFx215M0BGkZEUGfEe1qdfeu6eMtPam0RccrxnhnXuo9g==} @@ -4585,7 +4585,7 @@ snapshots: dependencies: esbuild: 0.21.5 - '@fleek-platform/sdk@3.5.4': + '@fleek-platform/sdk@3.7.2': dependencies: '@noble/hashes': 1.5.0 '@web-std/file': 3.0.3 @@ -4629,7 +4629,7 @@ snapshots: dependencies: yaml: 2.6.0 - '@fleek-platform/utils-ipfs@0.4.4': + '@fleek-platform/utils-ipfs@0.4.5': dependencies: aws4: 1.13.2 cids: 1.1.9 diff --git a/src/commands/ipfs/add.ts b/src/commands/ipfs/add.ts index 633c8d9b..658fe02a 100644 --- a/src/commands/ipfs/add.ts +++ b/src/commands/ipfs/add.ts @@ -1,8 +1,8 @@ import fs from 'node:fs'; import { - getFleekXyzIpfsGatewayUrl, getPrivateIpfsGatewayUrl, + getWeb3IpfsGatewayUrl, } from '@fleek-platform/utils-ipfs'; import { output } from '../../cli'; @@ -47,7 +47,7 @@ const addAction: SdkGuardedFunction = async ({ sdk, args }) => { if (privateGatewayDomains.length === 0) { output.hint(`${t('getFileFromPubAddr')}:`); - output.link(getFleekXyzIpfsGatewayUrl(hash)); + output.link(getWeb3IpfsGatewayUrl(hash)); return; } diff --git a/src/commands/sites/deploy.ts b/src/commands/sites/deploy.ts index 83903279..ca021d50 100644 --- a/src/commands/sites/deploy.ts +++ b/src/commands/sites/deploy.ts @@ -34,8 +34,7 @@ const deployAction: SdkGuardedFunction = async ({ const uploadResults = await sdk.ipfs().addSitesToIpfs(siteConfig.distDir, { wrapWithDirectory: true, - // We must pass plain object instead of URLSearchParams because of ipfs-http-client bug - searchParams: { site_id: site.id } as unknown as URLSearchParams, + siteId: site.id, }); const root = uploadResults.pop(); diff --git a/src/commands/storage/add.ts b/src/commands/storage/add.ts index 90900b67..29729d3e 100644 --- a/src/commands/storage/add.ts +++ b/src/commands/storage/add.ts @@ -2,8 +2,8 @@ import { promises as fs, existsSync } from 'node:fs'; import { basename } from 'node:path'; import { - getFleekXyzIpfsGatewayUrl, getPrivateIpfsGatewayUrl, + getWeb3IpfsGatewayUrl, } from '@fleek-platform/utils-ipfs'; import cliProgress from 'cli-progress'; import { filesFromPaths } from 'files-from-path'; @@ -73,7 +73,7 @@ export const addStorageAction: SdkGuardedFunction< if (privateGatewayDomains.length === 0) { output.log(t('visitViaGateway')); - output.link(getFleekXyzIpfsGatewayUrl(hash)); + output.link(getWeb3IpfsGatewayUrl(hash)); return; }