Skip to content
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 .github/workflows/deploy-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm lerna publish -y --create-release github
- run: pnpm lerna publish -y --bump major --create-release github
env:
HUSKY: 0
GH_TOKEN: ${{ secrets.GH_TOKEN }}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ If there is a match, thumbs up the issue with a 👍 and leave a comment if you
When reporting an issue, include the following:

- The version of `scaleway-sdk-js` you are using (e.g. v1.0.0-beta1, v2.0.0, master, ...)
- The environment and its version (e.g. NodeJS v16.10)
- The environment and its version (e.g. NodeJS v18.10)

## Suggesting a feature

Expand Down
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

This SDK enables you to interact with Scaleway APIs.

**⚠️  Notes:**
* The project is in beta, but should be fairly stable.
* SDK only works from a node.js runtime, browser calls aren't supported yet.
> **Warning**
> SDK only works from a node.js runtime, browser calls aren't supported yet.

**🔗  Important links:**
* [Reference documentation](https://scaleway.github.io/scaleway-sdk-js)
Expand All @@ -13,7 +12,7 @@ This SDK enables you to interact with Scaleway APIs.

## Getting Started

You'll need a pair of access and secret keys to connect to Scaleway API. Please check the [documentation](https://www.scaleway.com/docs/console/my-project/how-to/generate-api-key) on how to retrieve them.
You'll need a pair of access and secret keys to connect to Scaleway API. Please check the [documentation](https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/) on how to retrieve them.

**A minimal setup** would look like this:

Expand Down Expand Up @@ -75,13 +74,11 @@ The project is coded with Typescript, so don't hesitate to take advantage of it.

2. We export **errors** in the namespace `Errors`, allowing you to differentiate the cases (e.g. `Errors.PermissionsDeniedError`).

## Notes

### Contributing Guidelines
## Contributing Guidelines

This repository is at its early stage and is still in active development.
If you are looking for a way to contribute please read [CONTRIBUTING.md](./CONTRIBUTING.md).

### Reach us
## Reach us

We love feedback. Feel free to reach us on [Scaleway Slack community](https://slack.scaleway.com/), we are waiting for you on [#opensource](https://scaleway-community.slack.com/app_redirect?channel=opensource).
1 change: 1 addition & 0 deletions examples/serverless-function-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"devDependencies": {
"serverless-scaleway-functions": "^0.4.5",
"@types/node": "^18.11.18",
"typescript": "^4.9.5"
},
"description": "Minimal Typescript template to run Scaleway SDK-JS in a Function."
Expand Down
1 change: 0 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"version": "independent",
"command": {
"publish": {
"conventionalPrerelease": true,
"conventionalCommits": true,
"changelogPreset": "conventionalcommits"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/clients/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This SDK enables you to interact with Scaleway APIs.

## Getting Started

You'll need a pair of access and secret keys to connect to Scaleway API. Please check the [documentation](https://www.scaleway.com/docs/console/my-project/how-to/generate-api-key) on how to retrieve them.
You'll need a pair of access and secret keys to connect to Scaleway API. Please check the [documentation](https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/) on how to retrieve them.

**A minimal setup** would look like this:

Expand Down
6 changes: 3 additions & 3 deletions packages/clients/src/scw/__tests__/client-ini-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('assertValidAuthenticationSecrets', () => {
assertValidAuthenticationSecrets(value)
}).toThrow(
new Error(
`Invalid secrets, accessKey & secretKey must be defined. See https://www.scaleway.com/docs/console/my-project/how-to/generate-api-key`,
`Invalid secrets, accessKey & secretKey must be defined. See https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/`,
),
)
})
Expand All @@ -59,7 +59,7 @@ describe('assertValidAuthenticationSecrets', () => {
})
}).toThrow(
new Error(
`Invalid access key format 'SCW0123', expected SCWXXXXXXXXXXXXXXXXX format. See https://www.scaleway.com/docs/console/my-project/how-to/generate-api-key`,
`Invalid access key format 'SCW0123', expected SCWXXXXXXXXXXXXXXXXX format. See https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/`,
),
)
})
Expand All @@ -72,7 +72,7 @@ describe('assertValidAuthenticationSecrets', () => {
})
}).toThrow(
new Error(
`Invalid secret key format 'e4b83996-4c60-449a-98d2', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. See https://www.scaleway.com/docs/console/my-project/how-to/generate-api-key`,
`Invalid secret key format 'e4b83996-4c60-449a-98d2', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. See https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/`,
),
)
})
Expand Down
6 changes: 3 additions & 3 deletions packages/clients/src/scw/client-ini-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,17 @@ export function assertValidAuthenticationSecrets(
): asserts obj is AuthenticationSecrets {
if (!(obj.accessKey && obj.secretKey)) {
throw new Error(
`Invalid secrets, accessKey & secretKey must be defined. See https://www.scaleway.com/docs/console/my-project/how-to/generate-api-key`,
`Invalid secrets, accessKey & secretKey must be defined. See https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/`,
)
}
if (!isAccessKey(obj.accessKey)) {
throw new Error(
`Invalid access key format '${obj.accessKey}', expected SCWXXXXXXXXXXXXXXXXX format. See https://www.scaleway.com/docs/console/my-project/how-to/generate-api-key`,
`Invalid access key format '${obj.accessKey}', expected SCWXXXXXXXXXXXXXXXXX format. See https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/`,
)
}
if (!isSecretKey(obj.secretKey)) {
throw new Error(
`Invalid secret key format '${obj.secretKey}', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. See https://www.scaleway.com/docs/console/my-project/how-to/generate-api-key`,
`Invalid secret key format '${obj.secretKey}', expected a UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. See https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/`,
)
}
}
4 changes: 2 additions & 2 deletions packages/clients/src/scw/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const createAdvancedClient = (...configs: ClientConfig[]): Client => {
* Creates a Scaleway client with a profile.
*
* @example
* Creates a client with credentials & default values (see https://www.scaleway.com/docs/console/my-project/how-to/generate-api-key):
* Creates a client with credentials & default values (see https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/):
* ```
* import { createClient } from '@scaleway/sdk'
*
Expand All @@ -82,7 +82,7 @@ export const createAdvancedClient = (...configs: ClientConfig[]): Client => {
*
* @example
* Creates a client by loading values from the environment (see https://www.scaleway.com/en/docs/console/my-project/how-to/generate-api-key/#how-to-use-your-api-key)
* or the config file created by CLI `scw init` (see https://www.scaleway.com/cli):
* or the config file created by CLI `scw init` (see https://www.scaleway.com/en/cli/):
* ```
* import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader'
* import { createClient } from '@scaleway/sdk'
Expand Down
4 changes: 2 additions & 2 deletions packages/configuration-loader/src/yml-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const DETECT_SECTION_REGEX = /^\s*([^]+):\s*$/
const DETECT_ITEM_REGEX = /^\s*(.+?)\s*:\s*(.+?)\s*$/

/**
* Converts Yaml to configuration map.
* Converts YAML to configuration map.
*
* @param input - Yaml string
* @param input - YAML string
* @returns The configuration map
*
* @internal
Expand Down