Skip to content
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

chore: 🤖 SGX Deploy support with SDK RC v3 further support #24

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -346,4 +346,4 @@
"invalidWasmCode": "The {path} is a not valid wasm file",
"expectedNotFoundGeneric": "We had trouble locating the {name}. Please try again, and contact us if the issue persists.",
"unexpectedFileFormat": "We weren't expecting the format {format}. Please report the issue to our team and provide details for a quick fix."
}
}
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"lodash-es": "^4.17.21",
"multiformats": "^9.9.0",
"nanoid": "^3.3.4",
"node-fetch": "2",
"ora": "^3.4.0",
"press-any-key": "^0.1.1",
"prompts": "^2.4.2",
Expand All @@ -66,14 +65,14 @@
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@changesets/cli": "^2.27.6",
"@fleek-platform/errors": "^2.2.4-stg.14",
"@fleek-platform/sdk": "^2.3.0-stg.10",
"@fleek-platform/errors": "workspace:*",
"@fleek-platform/sdk": "workspace:*",
"@fleek-platform/tester": "^2.3.0",
"@fleek-platform/utils-gateways": "^0.1.2",
"@fleek-platform/utils-github": "^0.0.2",
"@fleek-platform/utils-ipfs": "^0.4.2",
"@fleek-platform/utils-ipns": "^0.1.2",
"@fleek-platform/utils-validation": "^2.2.1-stg.13",
"@fleek-platform/utils-validation": "workspace:*",
"@tsconfig/node16": "^16.1.3",
"@types/ansi-escapes": "3.0.1",
"@types/cli-progress": "^3.11.5",
Expand All @@ -83,7 +82,6 @@
"@types/glob": "^8.0.1",
"@types/lodash": "^4.14.191",
"@types/lodash-es": "^4.17.12",
"@types/node-fetch": "^2.6.11",
"@types/prompts": "^2.4.2",
"@types/semver": "^7.3.13",
"@types/update-notifier": "^6.0.8",
Expand All @@ -97,4 +95,4 @@
"engines": {
"node": ">=18.18.2"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApplicationNameInvalidError } from '@fleek-platform/errors';
import type { Application } from '@fleek-platform/sdk';
import type { Application } from '@fleek-platform/sdk/node';

import { textPrompt } from '../../../prompts/textPrompt';
import { t } from '../../../utils/translation';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApplicationsNotFoundError } from '@fleek-platform/errors';
import type { FleekSdk } from '@fleek-platform/sdk';
import type { FleekSdk } from '@fleek-platform/sdk/node';

import { selectPrompt } from '../../../prompts/selectPrompt';
import { t } from '../../../utils/translation';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/applications/utils/parser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {
ApplicationWhiteLabelDomain,
ApplicationWhitelistDomain,
} from '@fleek-platform/sdk';
} from '@fleek-platform/sdk/node';

type WhitelistDomain = Omit<
ApplicationWhitelistDomain,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/auth/login.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createClient } from '@fleek-platform/sdk';
import { createClient } from '@fleek-platform/sdk/node';
import { describe, expect, it, vi } from 'vitest';

import { output } from '../../cli';
Expand Down Expand Up @@ -39,7 +39,7 @@ vi.mock('../../config', () => ({
}));

// Assumes user goes ahead with the flow and logs in
vi.mock('@fleek-platform/sdk', () => {
vi.mock('@fleek-platform/sdk/node', () => {
const MockClient = vi.fn();
MockClient.prototype.mutation = vi.fn().mockResolvedValue({
createPersonalAccessTokenFromVerificationSession: 'mockPat',
Expand Down
2 changes: 1 addition & 1 deletion src/commands/auth/login.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createClient } from '@fleek-platform/sdk';
import { createClient } from '@fleek-platform/sdk/node';

import { output } from '../../cli';
import { config } from '../../config';
Expand Down
4 changes: 2 additions & 2 deletions src/commands/domains/create.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk';
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk/node';
import { type Mock, beforeEach, describe, expect, it, vi } from 'vitest';

import { output as fakeOutput } from '../../cli';
Expand Down Expand Up @@ -58,7 +58,7 @@ vi.mock('../../utils/pressAnyKey', () => {
};
});

vi.mock('@fleek-platform/sdk', () => {
vi.mock('@fleek-platform/sdk/node', () => {
const FleekSdkMock = vi.fn();

const domains = {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/domains/delete.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DomainNotFoundError } from '@fleek-platform/errors';
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk';
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk/node';
import { type Mock, describe, expect, it, vi } from 'vitest';

import { output as fakeOutput } from '../../cli';
Expand Down Expand Up @@ -37,7 +37,7 @@ vi.mock('../../cli', () => {
return { output };
});

vi.mock('@fleek-platform/sdk', () => {
vi.mock('@fleek-platform/sdk/node', () => {
const FleekSdkMock = vi.fn();

const domains = {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/domains/detail.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FleekSdk } from '@fleek-platform/sdk';
import type { FleekSdk } from '@fleek-platform/sdk/node';
import { describe, expect, it, vi } from 'vitest';

import { output as fakeOutput } from '../../cli';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/domains/detail.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DomainStatus } from '@fleek-platform/sdk';
import type { DomainStatus } from '@fleek-platform/sdk/node';

import { output } from '../../cli';
import type { SdkGuardedFunction } from '../../guards/types';
Expand Down
4 changes: 2 additions & 2 deletions src/commands/domains/list.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk';
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk/node';
import { type Mock, describe, expect, it, vi } from 'vitest';

import { output as fakeOutput } from '../../cli';
Expand All @@ -16,7 +16,7 @@ vi.mock('../../cli', () => {
return { output };
});

vi.mock('@fleek-platform/sdk', () => {
vi.mock('@fleek-platform/sdk/node', () => {
const FleekSdkMock = vi.fn();

const domains = {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/domains/prompts/getDomainOrPrompt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
type Domain,
FleekSdk,
PersonalAccessTokenService,
} from '@fleek-platform/sdk';
} from '@fleek-platform/sdk/node';
import { type Mock, describe, expect, it, vi } from 'vitest';

import { selectPrompt } from '../../../prompts/selectPrompt';
Expand All @@ -13,7 +13,7 @@ vi.mock('../../../prompts/selectPrompt', () => ({
selectPrompt: vi.fn().mockResolvedValue('secondDomainId'),
}));

vi.mock('@fleek-platform/sdk', () => {
vi.mock('@fleek-platform/sdk/node', () => {
const FleekSdkMock = vi.fn();

const domains = {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/domains/prompts/getDomainOrPrompt.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DomainsNotFoundError } from '@fleek-platform/errors';
import type { Domain, FleekSdk } from '@fleek-platform/sdk';
import type { Domain, FleekSdk } from '@fleek-platform/sdk/node';

import { selectPrompt } from '../../../prompts/selectPrompt';
import { t } from '../../../utils/translation';
Expand Down
4 changes: 2 additions & 2 deletions src/commands/domains/prompts/getSiteOrPrivateGateway.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk';
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk/node';
import { type Mock, beforeEach, describe, expect, it, vi } from 'vitest';

import { selectPrompt } from '../../../prompts/selectPrompt';
Expand Down Expand Up @@ -50,7 +50,7 @@ vi.mock('../../sites/prompts/getSiteOrPrompt', () => ({
}),
}));

vi.mock('@fleek-platform/sdk', () => ({
vi.mock('@fleek-platform/sdk/node', () => ({
FleekSdk: vi.fn(),
PersonalAccessTokenService: vi.fn(),
}));
Expand Down
2 changes: 1 addition & 1 deletion src/commands/domains/prompts/getSiteOrPrivateGateway.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FleekSdk, PrivateGateway, Site } from '@fleek-platform/sdk';
import type { FleekSdk, PrivateGateway, Site } from '@fleek-platform/sdk/node';

import { selectPrompt } from '../../../prompts/selectPrompt';
import { t } from '../../../utils/translation';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/domains/utils/getSiteDomains.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Domain, FleekSdk } from '@fleek-platform/sdk';
import type { Domain, FleekSdk } from '@fleek-platform/sdk/node';

type GetSiteDomainsArgs = {
sdk: FleekSdk;
Expand Down
7 changes: 6 additions & 1 deletion src/commands/domains/utils/getZoneForSiteOrPrivateGateway.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import type { FleekSdk, PrivateGateway, Site, Zone } from '@fleek-platform/sdk';
import type {
FleekSdk,
PrivateGateway,
Site,
Zone,
} from '@fleek-platform/sdk/node';

import { waitForZoneCreationResult } from '../wait/waitForZoneCreationResult';

Expand Down
4 changes: 2 additions & 2 deletions src/commands/domains/verify.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk';
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk/node';
import { type Mock, describe, expect, it, vi } from 'vitest';

import { output } from '../../cli';
Expand Down Expand Up @@ -42,7 +42,7 @@ vi.mock('../../cli', () => {
return { output };
});

vi.mock('@fleek-platform/sdk', () => {
vi.mock('@fleek-platform/sdk/node', () => {
const FleekSdkMock = vi.fn();

const domains = {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/domains/verify.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Domain } from '@fleek-platform/sdk';
import type { Domain } from '@fleek-platform/sdk/node';

import { output } from '../../cli';
import type { SdkGuardedFunction } from '../../guards/types';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/domains/wait/waitForDomainCreationResult.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FleekSdk } from '@fleek-platform/sdk';
import type { FleekSdk } from '@fleek-platform/sdk/node';

import { checkPeriodicallyUntil } from '../../../utils/checkPeriodicallyUntil';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Domain, FleekSdk } from '@fleek-platform/sdk';
import type { Domain, FleekSdk } from '@fleek-platform/sdk/node';

import { checkPeriodicallyUntil } from '../../../utils/checkPeriodicallyUntil';

Expand Down
2 changes: 1 addition & 1 deletion src/commands/domains/wait/waitForZoneCreationResult.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FleekSdk, Zone } from '@fleek-platform/sdk';
import type { FleekSdk, Zone } from '@fleek-platform/sdk/node';

import { checkPeriodicallyUntil } from '../../../utils/checkPeriodicallyUntil';

Expand Down
2 changes: 1 addition & 1 deletion src/commands/domains/wait/waitUntilDomainDeleted.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Domain, FleekSdk } from '@fleek-platform/sdk';
import type { Domain, FleekSdk } from '@fleek-platform/sdk/node';

import { checkPeriodicallyUntil } from '../../../utils/checkPeriodicallyUntil';

Expand Down
2 changes: 1 addition & 1 deletion src/commands/domains/wait/waitUntilZoneDeleted.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FleekSdk, Zone } from '@fleek-platform/sdk';
import type { FleekSdk, Zone } from '@fleek-platform/sdk/node';

import { checkPeriodicallyUntil } from '../../../utils/checkPeriodicallyUntil';

Expand Down
4 changes: 2 additions & 2 deletions src/commands/ens/create.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk';
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk/node';
import { type Mock, describe, expect, it, vi } from 'vitest';

import { output as fakeOutput } from '../../cli';
Expand Down Expand Up @@ -60,7 +60,7 @@ vi.mock('../../utils/pressAnyKey', () => {
};
});

vi.mock('@fleek-platform/sdk', () => {
vi.mock('@fleek-platform/sdk/node', () => {
const FleekSdkMock = vi.fn();

const ipns = {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/ens/delete.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EnsRecordNotFoundError } from '@fleek-platform/errors';
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk';
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk/node';
import { type Mock, describe, expect, it, vi } from 'vitest';

import { output as fakeOutput } from '../../cli';
Expand Down Expand Up @@ -38,7 +38,7 @@ vi.mock('../../cli', () => {
return { output };
});

vi.mock('@fleek-platform/sdk', () => {
vi.mock('@fleek-platform/sdk/node', () => {
const FleekSdkMock = vi.fn();

const ens = {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/ens/detail.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FleekSdk } from '@fleek-platform/sdk';
import type { FleekSdk } from '@fleek-platform/sdk/node';
import { describe, expect, it, vi } from 'vitest';

import { output as fakeOutput } from '../../cli';
Expand Down
4 changes: 2 additions & 2 deletions src/commands/ens/list.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk';
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk/node';
import { type Mock, describe, expect, it, vi } from 'vitest';

import { output as fakeOutput } from '../../cli';
Expand All @@ -15,7 +15,7 @@ vi.mock('../../cli', () => {
return { output };
});

vi.mock('@fleek-platform/sdk', () => {
vi.mock('@fleek-platform/sdk/node', () => {
const FleekSdkMock = vi.fn();

const ens = {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/ens/prompts/getEnsRecordOrPrompt.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EnsRecordNotFoundError } from '@fleek-platform/errors';
import type { EnsRecord, FleekSdk } from '@fleek-platform/sdk';
import type { EnsRecord, FleekSdk } from '@fleek-platform/sdk/node';

import { selectPrompt } from '../../../prompts/selectPrompt';
import { t } from '../../../utils/translation';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/ens/prompts/getIpnsRecordOrPrompt.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FleekSdk, IpnsRecord } from '@fleek-platform/sdk';
import type { FleekSdk, IpnsRecord } from '@fleek-platform/sdk/node';

import { output } from '../../../cli';
import { selectPrompt } from '../../../prompts/selectPrompt';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/ens/utils/getSiteEnsRecords.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { EnsRecord, FleekSdk, Site } from '@fleek-platform/sdk';
import type { EnsRecord, FleekSdk, Site } from '@fleek-platform/sdk/node';

type GetSiteEnsRecordsArgs = {
sdk: FleekSdk;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/ens/verify.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk';
import { FleekSdk, PersonalAccessTokenService } from '@fleek-platform/sdk/node';
import { type Mock, describe, expect, it, vi } from 'vitest';

import { output } from '../../cli';
Expand Down Expand Up @@ -43,7 +43,7 @@ vi.mock('../../cli', () => {
return { output };
});

vi.mock('@fleek-platform/sdk', () => {
vi.mock('@fleek-platform/sdk/node', () => {
const FleekSdkMock = vi.fn();

const ens = {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/ens/verify.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { EnsRecord } from '@fleek-platform/sdk';
import type { EnsRecord } from '@fleek-platform/sdk/node';

import { output } from '../../cli';
import type { SdkGuardedFunction } from '../../guards/types';
Expand Down
2 changes: 1 addition & 1 deletion src/commands/ens/wait/waitForEnsRecordCreationResult.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FleekSdk } from '@fleek-platform/sdk';
import type { FleekSdk } from '@fleek-platform/sdk/node';

import { checkPeriodicallyUntil } from '../../../utils/checkPeriodicallyUntil';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FleekSdk } from '@fleek-platform/sdk';
import type { FleekSdk } from '@fleek-platform/sdk/node';

import { checkPeriodicallyUntil } from '../../../utils/checkPeriodicallyUntil';

Expand Down
2 changes: 1 addition & 1 deletion src/commands/ens/wait/waitUntilEnsRecordDeleted.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { EnsRecord, FleekSdk } from '@fleek-platform/sdk';
import type { EnsRecord, FleekSdk } from '@fleek-platform/sdk/node';

import { checkPeriodicallyUntil } from '../../../utils/checkPeriodicallyUntil';

Expand Down
Loading
Loading