Skip to content

Commit

Permalink
Sdk update 20230124 094859 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
reggeenr authored Jan 24, 2023
1 parent c4c6f4b commit ee5c00d
Show file tree
Hide file tree
Showing 34 changed files with 31,022 additions and 9,348 deletions.
6 changes: 6 additions & 0 deletions .cra/.cveignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"cve": "CVE-2021-3807",
"alwaysOmit": true
}
]
9 changes: 7 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ doc/
coverage/
dist/
node_modules/
examples/**/node_modules/
!examples/**/*.js
example/*.js
examples/*.js
example/**/node_modules/
example/
scripts/*.js

test/resources/auth.js
# ignore emitted js
**/*v*.js
!test/**/*.js
!examples/**/*.js
lib/*.js
scripts/typedoc/
scripts/typedoc/
72 changes: 51 additions & 21 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,54 @@
module.exports = {
"env": {
"node": true
},
"plugins": [
"node",
"prettier",
'root': true,
'overrides': [
{
'env': {
'node': true,
},
'files': ['**/*.js', '**/*.jsx'],
'plugins': ['node', 'jest', 'prettier'],
'extends': ['airbnb-base', 'plugin:jest/recommended', 'plugin:jest/style', 'prettier'],
'rules': {
'camelcase': 'off',
'import/extensions': 'off',
'no-template-curly-in-string': 'off',
'no-underscore-dangle': 'off',
'prefer-const': 'error',
'prettier/prettier': 'error',
},
},
{
'files': ['*.test.js', '*.test.jsx'],
'rules': {
'jest/expect-expect': 'off',
'jest/no-conditional-expect': 'off',
'jest/no-done-callback': 'off',
'jest/no-standalone-expect': 'off',
'jest/no-try-expect': 'off',
'no-unused-vars': 'off',
},
},
{
'files': ['**/*.ts', '**/*.tsx'],
'env': {
'node': true,
},
'extends': ['airbnb-typescript/base', 'prettier'],
'parser': '@typescript-eslint/parser',
'parserOptions': {
'project': 'tsconfig.json',
'sourceType': 'module',
},
'plugins': ['eslint-plugin-jsdoc', 'eslint-plugin-import', '@typescript-eslint', 'prettier'],
'rules': {
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'max-len': 'off',
'no-param-reassign': 'off',
'no-underscore-dangle': 'off',
'prettier/prettier': 'error',
'spaced-comment': ['error', 'always', { 'exceptions': ['*'] }],
},
},
],
"extends": [
"eslint:recommended",
"google",
"plugin:node/recommended",
"prettier",
],
"rules": {
"prettier/prettier": ["error", {"singleQuote": true, "printWidth": 100}],
"prefer-const": "error",
"prefer-rest-params": "off", // https://github.com/mysticatea/eslint-plugin-node/issues/63
// The rest of these override rules that are enabled by one of the configs we extend but not compatible with current codebase
// todo: fix issues and then remove overrides here
"valid-jsdoc": "off", // too many issues; drowns out everything else
"camelcase": "off", // todo: determine if we should keep this off globally, or disable it on a per-line basis
}
};
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*.enc binary
*.enc binary
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## PR summary
<!-- please include a brief summary of the changes in this PR -->

**Fixes:** <! -- link to issue -->

## PR Checklist
Please make sure that your PR fulfills the following requirements:
Expand Down
14 changes: 9 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# development guide ignores
swagger.json
openapi-sdkgen

### Specific to this repository ###
# tsc outputs
lib/*.js
auth/*.js
**/*.d.ts
**/*.js.map

# service-specific tsc outputs (js files)
ibm-cloud-code-engine/*.js
example-service/*.js
# IGNORE YOUR SERVICE FILES HERE

# file holding service credentials
test/resources/auth.js
Expand Down Expand Up @@ -86,3 +84,9 @@ secrets.tar

# SDK generator
.openapi-generator*

.npmrc

# ignore the generated integration test files, as they cannot be used without manual editing
test/integration/code-engine.v1.test.js
test/integration/code-engine.v2.test.js
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ tslint.json
.github
*.ts
!*.d.ts
example/
1 change: 1 addition & 0 deletions .npmrc_public
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.com/
3 changes: 2 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
trailingComma: "es5",
semi: true,
trailingComma: 'es5',
singleQuote: true,
printWidth: 100,
quoteProps: 'preserve',
Expand Down
13 changes: 0 additions & 13 deletions .releaserc

This file was deleted.

47 changes: 15 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,21 @@
os: linux
dist: focal

language: node_js
sudo: false
node_js:
- 18
cache: npm

# Only run on main (still tests PRs)
branches:
only:
- main

node_js:
- 12
- 14

# before_install:
# - 'openssl aes-256-cbc -K $my_key -iv $my_iv -in myservice.env.enc -out myservice.env -d || true'

install:
- npm install
- npm run build

script:
# - npm run lint
- npm run test-travis || travis_terminate 1
- npm run check-packages
- ./test-integration.sh
# - sh scripts/typedoc/generate_typedoc.sh currently in progress

after_success:
- npm run report-coverage

# To enable semantic-release, uncomment this section.
deploy:
- provider: script
skip_cleanup: true
script: npx semantic-release
on:
node: 12
branch: main
jobs:
include:
- stage: verify
install:
- npm install
script:
- npm run build
- npm run test-unit-travis || travis_terminate 1
- npm run lint
- npm run check-packages
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at phil_adams@us.ibm.com. All
reported by contacting the project team at devxsdk@us.ibm.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ please ask a question at

# Issues
If you encounter an issue with the SDK, you are welcome to submit
a [bug report](https://github.com/IBM/code-engine-node-sdk/issues).
a [bug report](<github-repo-url>/issues).
Before that, please search for similar issues. It's possible someone has
already encountered this issue.

# General Information
For general guidance on contributing to this project, please see
[this link](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/CONTRIBUTING_nodejs.md)
[this link](https://github.com/IBM/ibm-cloud-sdk-common/blob/main/CONTRIBUTING_nodejs.md)
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
# NodeJS SDK for IBM Cloud Code Engine
Node.js client library to interact with the [Code Engine API](https://cloud.ibm.com/apidocs/codeengine).

Disclaimer: this SDK is being released initially as a **pre-release** version.
Changes might occur which impact applications that use this SDK.

## Table of Contents

<!--
Expand Down Expand Up @@ -44,18 +41,20 @@ The IBM Cloud Code Engine Node.js SDK allows developers to programmatically inte

Service Name | Import Path
--- | ---
[Code Engine](https://cloud.ibm.com/apidocs/codeengine) | ibm-code-engine-sdk/ibm-cloud-code-engine/v1
[Code Engine](https://cloud.ibm.com/apidocs/codeengine) |
[Code Engine](https://cloud.ibm.com/apidocs/codeengine/codeengine-v2.0.0) | @ibm-cloud/ibm-code-engine-sdk/code-engine/v2
[Code Engine](https://cloud.ibm.com/apidocs/codeengine/codeengine-v1.0.0) | ibm-code-engine-sdk/ibm-cloud-code-engine/v1

## Prerequisites
* You need an [IBM Cloud][ibm-cloud-onboarding] account.
* **Node.js >=10**: This SDK is tested with Node.js versions 10 and up. It may work on previous versions but this is not officially supported.
* **Node.js >=14**: This SDK is tested with Node.js versions 14 and up. It may work on previous versions but this is not officially supported.

[ibm-cloud-onboarding]: http://cloud.ibm.com/registration

## Installation

```sh
npm install ibm-code-engine-sdk
npm install @ibm-cloud/ibm-code-engine-sdk
```

## Using the SDK
Expand Down
Loading

0 comments on commit ee5c00d

Please sign in to comment.