oracle / oci-typescript-sdk

Oracle Cloud Infrastructure SDK for TypeScript and JavaScript
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/typescriptsdk.htm
Other
71 stars 51 forks source link

Call OS functions in User-Agent Creation #230

Open ArkinSolomon opened 12 months ago

ArkinSolomon commented 12 months ago

When creating a user-agent, the SDK uses os.platform and os.release as strings, though technically, they are both functions. This typically is not an issue, since template strings will simply convert these to the proper value, which is intended behavior.

For instance:

typeof os.platform // => 'function'
os.platform() // => 'darwin'
`${os.platform}` // => 'darwin'

However, when using Bun, this causes an issue, and causes an error. Though the SDK by no means supports Bun officially yet, this simple fix helps support it.

oracle-contributor-agreement[bot] commented 12 months ago

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA). The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

oracle-contributor-agreement[bot] commented 11 months ago

Thank you for signing the OCA.