Skip to content

Commit ee5c00d

Browse files
authored
Sdk update 20230124 094859 (#11)
1 parent c4c6f4b commit ee5c00d

34 files changed

+31022
-9348
lines changed

.cra/.cveignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{
3+
"cve": "CVE-2021-3807",
4+
"alwaysOmit": true
5+
}
6+
]

.eslintignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@ doc/
44
coverage/
55
dist/
66
node_modules/
7+
examples/**/node_modules/
8+
!examples/**/*.js
9+
example/*.js
10+
examples/*.js
711
example/**/node_modules/
8-
example/
12+
scripts/*.js
913

1014
test/resources/auth.js
1115
# ignore emitted js
1216
**/*v*.js
1317
!test/**/*.js
18+
!examples/**/*.js
1419
lib/*.js
15-
scripts/typedoc/
20+
scripts/typedoc/

.eslintrc.js

Lines changed: 51 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,54 @@
11
module.exports = {
2-
"env": {
3-
"node": true
4-
},
5-
"plugins": [
6-
"node",
7-
"prettier",
2+
'root': true,
3+
'overrides': [
4+
{
5+
'env': {
6+
'node': true,
7+
},
8+
'files': ['**/*.js', '**/*.jsx'],
9+
'plugins': ['node', 'jest', 'prettier'],
10+
'extends': ['airbnb-base', 'plugin:jest/recommended', 'plugin:jest/style', 'prettier'],
11+
'rules': {
12+
'camelcase': 'off',
13+
'import/extensions': 'off',
14+
'no-template-curly-in-string': 'off',
15+
'no-underscore-dangle': 'off',
16+
'prefer-const': 'error',
17+
'prettier/prettier': 'error',
18+
},
19+
},
20+
{
21+
'files': ['*.test.js', '*.test.jsx'],
22+
'rules': {
23+
'jest/expect-expect': 'off',
24+
'jest/no-conditional-expect': 'off',
25+
'jest/no-done-callback': 'off',
26+
'jest/no-standalone-expect': 'off',
27+
'jest/no-try-expect': 'off',
28+
'no-unused-vars': 'off',
29+
},
30+
},
31+
{
32+
'files': ['**/*.ts', '**/*.tsx'],
33+
'env': {
34+
'node': true,
35+
},
36+
'extends': ['airbnb-typescript/base', 'prettier'],
37+
'parser': '@typescript-eslint/parser',
38+
'parserOptions': {
39+
'project': 'tsconfig.json',
40+
'sourceType': 'module',
41+
},
42+
'plugins': ['eslint-plugin-jsdoc', 'eslint-plugin-import', '@typescript-eslint', 'prettier'],
43+
'rules': {
44+
'@typescript-eslint/naming-convention': 'off',
45+
'@typescript-eslint/no-unused-vars': 'off',
46+
'max-len': 'off',
47+
'no-param-reassign': 'off',
48+
'no-underscore-dangle': 'off',
49+
'prettier/prettier': 'error',
50+
'spaced-comment': ['error', 'always', { 'exceptions': ['*'] }],
51+
},
52+
},
853
],
9-
"extends": [
10-
"eslint:recommended",
11-
"google",
12-
"plugin:node/recommended",
13-
"prettier",
14-
],
15-
"rules": {
16-
"prettier/prettier": ["error", {"singleQuote": true, "printWidth": 100}],
17-
"prefer-const": "error",
18-
"prefer-rest-params": "off", // https://github.com/mysticatea/eslint-plugin-node/issues/63
19-
// The rest of these override rules that are enabled by one of the configs we extend but not compatible with current codebase
20-
// todo: fix issues and then remove overrides here
21-
"valid-jsdoc": "off", // too many issues; drowns out everything else
22-
"camelcase": "off", // todo: determine if we should keep this off globally, or disable it on a per-line basis
23-
}
2454
};

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
*.enc binary
1+
*.enc binary

.github/pull_request_template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
## PR summary
22
<!-- please include a brief summary of the changes in this PR -->
33

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

65
## PR Checklist
76
Please make sure that your PR fulfills the following requirements:

.gitignore

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
# development guide ignores
2-
swagger.json
3-
openapi-sdkgen
4-
1+
### Specific to this repository ###
52
# tsc outputs
63
lib/*.js
74
auth/*.js
85
**/*.d.ts
96
**/*.js.map
107

118
# service-specific tsc outputs (js files)
12-
ibm-cloud-code-engine/*.js
9+
example-service/*.js
10+
# IGNORE YOUR SERVICE FILES HERE
1311

1412
# file holding service credentials
1513
test/resources/auth.js
@@ -86,3 +84,9 @@ secrets.tar
8684

8785
# SDK generator
8886
.openapi-generator*
87+
88+
.npmrc
89+
90+
# ignore the generated integration test files, as they cannot be used without manual editing
91+
test/integration/code-engine.v1.test.js
92+
test/integration/code-engine.v2.test.js

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ tslint.json
99
.github
1010
*.ts
1111
!*.d.ts
12-
example/

.npmrc_public

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=https://registry.npmjs.com/

.prettierrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = {
2-
trailingComma: "es5",
2+
semi: true,
3+
trailingComma: 'es5',
34
singleQuote: true,
45
printWidth: 100,
56
quoteProps: 'preserve',

.releaserc

Lines changed: 0 additions & 13 deletions
This file was deleted.

.travis.yml

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,21 @@
1-
os: linux
1+
dist: focal
2+
23
language: node_js
3-
sudo: false
4+
node_js:
5+
- 18
6+
cache: npm
47

5-
# Only run on main (still tests PRs)
68
branches:
79
only:
810
- main
911

10-
node_js:
11-
- 12
12-
- 14
13-
14-
# before_install:
15-
# - 'openssl aes-256-cbc -K $my_key -iv $my_iv -in myservice.env.enc -out myservice.env -d || true'
16-
17-
install:
18-
- npm install
19-
- npm run build
20-
21-
script:
22-
# - npm run lint
23-
- npm run test-travis || travis_terminate 1
24-
- npm run check-packages
25-
- ./test-integration.sh
26-
# - sh scripts/typedoc/generate_typedoc.sh currently in progress
27-
28-
after_success:
29-
- npm run report-coverage
30-
31-
# To enable semantic-release, uncomment this section.
32-
deploy:
33-
- provider: script
34-
skip_cleanup: true
35-
script: npx semantic-release
36-
on:
37-
node: 12
38-
branch: main
12+
jobs:
13+
include:
14+
- stage: verify
15+
install:
16+
- npm install
17+
script:
18+
- npm run build
19+
- npm run test-unit-travis || travis_terminate 1
20+
- npm run lint
21+
- npm run check-packages

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at phil_adams@us.ibm.com. All
58+
reported by contacting the project team at devxsdk@us.ibm.com. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
6161
obligated to maintain confidentiality with regard to the reporter of an incident.

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ please ask a question at
55

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

1212
# General Information
1313
For general guidance on contributing to this project, please see
14-
[this link](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/CONTRIBUTING_nodejs.md)
14+
[this link](https://github.com/IBM/ibm-cloud-sdk-common/blob/main/CONTRIBUTING_nodejs.md)

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
# NodeJS SDK for IBM Cloud Code Engine
99
Node.js client library to interact with the [Code Engine API](https://cloud.ibm.com/apidocs/codeengine).
1010

11-
Disclaimer: this SDK is being released initially as a **pre-release** version.
12-
Changes might occur which impact applications that use this SDK.
13-
1411
## Table of Contents
1512

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

4542
Service Name | Import Path
4643
--- | ---
47-
[Code Engine](https://cloud.ibm.com/apidocs/codeengine) | ibm-code-engine-sdk/ibm-cloud-code-engine/v1
44+
[Code Engine](https://cloud.ibm.com/apidocs/codeengine) |
45+
[Code Engine](https://cloud.ibm.com/apidocs/codeengine/codeengine-v2.0.0) | @ibm-cloud/ibm-code-engine-sdk/code-engine/v2
46+
[Code Engine](https://cloud.ibm.com/apidocs/codeengine/codeengine-v1.0.0) | ibm-code-engine-sdk/ibm-cloud-code-engine/v1
4847

4948
## Prerequisites
5049
* You need an [IBM Cloud][ibm-cloud-onboarding] account.
51-
* **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.
50+
* **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.
5251

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

5554
## Installation
5655

5756
```sh
58-
npm install ibm-code-engine-sdk
57+
npm install @ibm-cloud/ibm-code-engine-sdk
5958
```
6059

6160
## Using the SDK

0 commit comments

Comments
 (0)