From 79e931c115c962b6607cea4561a360da9e6be75f Mon Sep 17 00:00:00 2001 From: Jonathan Remy Date: Wed, 24 Sep 2025 09:06:51 +0200 Subject: [PATCH 1/3] fix(docs): correct createClient import in documentation --- README.md | 3 ++- examples/README.md | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 997115bf4..2c13d2fad 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ You'll need a pair of access and secret keys to connect to Scaleway API. Please **A minimal setup** would look like this: ```ts -import { Registry, createClient } from '@scaleway/sdk' +import { Registry } from '@scaleway/sdk' +import { createClient } from '@scaleway/sdk-client' const client = createClient({ accessKey: 'SCWXXXXXXXXXXXXXXXXX', diff --git a/examples/README.md b/examples/README.md index 20f23ea64..72ec6bfe7 100644 --- a/examples/README.md +++ b/examples/README.md @@ -13,7 +13,8 @@ Please find below some examples on how to perform basic operations. ```ts import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader' -import { Instance, createClient } from '@scaleway/sdk' +import { Instance } from '@scaleway/sdk' +import { createClient } from '@scaleway/sdk-client' const profile = loadProfileFromConfigurationFile() const client = createClient(profile) @@ -45,7 +46,8 @@ console.log(`\tPowered ON (now ${server.state})`) ```ts import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader' -import { Instance, createClient } from '@scaleway/sdk' +import { Instance } from '@scaleway/sdk' +import { createClient } from '@scaleway/sdk-client' const profile = loadProfileFromConfigurationFile() const client = createClient(profile) From d803647a28a1a6353b55920b4bed8befe66e8c60 Mon Sep 17 00:00:00 2001 From: Jonathan Remy Date: Fri, 26 Sep 2025 07:15:49 +0200 Subject: [PATCH 2/3] feat(sdk): export createClient from @scaleway/sdk --- README.md | 3 +-- examples/README.md | 6 ++---- packages/sdk/package.json | 1 + packages/sdk/src/index.gen.ts | 3 +++ scripts/generateAlias.ts | 4 ++++ 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2c13d2fad..997115bf4 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,7 @@ You'll need a pair of access and secret keys to connect to Scaleway API. Please **A minimal setup** would look like this: ```ts -import { Registry } from '@scaleway/sdk' -import { createClient } from '@scaleway/sdk-client' +import { Registry, createClient } from '@scaleway/sdk' const client = createClient({ accessKey: 'SCWXXXXXXXXXXXXXXXXX', diff --git a/examples/README.md b/examples/README.md index 72ec6bfe7..20f23ea64 100644 --- a/examples/README.md +++ b/examples/README.md @@ -13,8 +13,7 @@ Please find below some examples on how to perform basic operations. ```ts import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader' -import { Instance } from '@scaleway/sdk' -import { createClient } from '@scaleway/sdk-client' +import { Instance, createClient } from '@scaleway/sdk' const profile = loadProfileFromConfigurationFile() const client = createClient(profile) @@ -46,8 +45,7 @@ console.log(`\tPowered ON (now ${server.state})`) ```ts import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader' -import { Instance } from '@scaleway/sdk' -import { createClient } from '@scaleway/sdk-client' +import { Instance, createClient } from '@scaleway/sdk' const profile = loadProfileFromConfigurationFile() const client = createClient(profile) diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 25b34f3d1..62dbae37a 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -31,6 +31,7 @@ "build:profile": "npx vite-bundle-visualizer -c vite.config.ts" }, "dependencies": { + "@scaleway/sdk-client": "workspace:^", "@scaleway/sdk-account": "workspace:*", "@scaleway/sdk-applesilicon": "workspace:*", "@scaleway/sdk-audit-trail": "workspace:*", diff --git a/packages/sdk/src/index.gen.ts b/packages/sdk/src/index.gen.ts index 34ce702ac..324bee238 100644 --- a/packages/sdk/src/index.gen.ts +++ b/packages/sdk/src/index.gen.ts @@ -44,6 +44,9 @@ import { Testv1 } from '@scaleway/sdk-test' import { Vpcv2 } from '@scaleway/sdk-vpc' import { Vpcgwv1, Vpcgwv2 } from '@scaleway/sdk-vpcgw' import { Webhostingv1 } from '@scaleway/sdk-webhosting' + +export { createAdvancedClient, createClient } from '@scaleway/sdk-client' + /** * @deprecated Direct version exports are deprecated. Use the 'Account' namespace instead (e.g., Account.v1). */ diff --git a/scripts/generateAlias.ts b/scripts/generateAlias.ts index e599fc06c..de0f55c3c 100644 --- a/scripts/generateAlias.ts +++ b/scripts/generateAlias.ts @@ -72,5 +72,9 @@ for (const service of services) { } } appendFileSync(OUTPUT_PATH, importsOutput) +appendFileSync( + OUTPUT_PATH, + "export { createClient, createAdvancedClient } from '@scaleway/sdk-client'\n\n", +) appendFileSync(OUTPUT_PATH, output) console.log(`✅ File generated: ${OUTPUT_PATH}`) From 03c852086b779a0724ae22774482110c75d90d04 Mon Sep 17 00:00:00 2001 From: Jonathan Remy Date: Fri, 26 Sep 2025 09:23:52 +0200 Subject: [PATCH 3/3] chore: update pnpm lockfile --- pnpm-lock.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6620645be..b7157b04b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -132,6 +132,9 @@ importers: '@scaleway/sdk-block': specifier: workspace:* version: link:../../packages_generated/block + '@scaleway/sdk-client': + specifier: workspace:^ + version: link:../client '@scaleway/sdk-cockpit': specifier: workspace:* version: link:../../packages_generated/cockpit @@ -240,10 +243,6 @@ importers: '@scaleway/sdk-webhosting': specifier: workspace:* version: link:../../packages_generated/webhosting - devDependencies: - '@scaleway/sdk-client': - specifier: workspace:^ - version: link:../client packages_generated/account: dependencies: