@camunda8/sdk 8.5.0-alpha.5 → 8.5.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +3 -0
- package/CHANGELOG.md +7 -0
- package/dist/c8/index.d.ts +2 -2
- package/dist/c8/index.js +5 -2
- package/dist/c8/index.js.map +1 -1
- package/package.json +6 -1
- package/smoke-test/package-lock.json +29 -0
- package/smoke-test/package.json +15 -0
- package/smoke-test/smoke-test.js +45 -0
- package/test-d/index.test-d.ts +31 -0
package/.eslintrc.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [8.5.0-alpha.6](https://github.com/camunda/camunda-8-js-sdk/compare/v8.5.0-alpha.5...v8.5.0-alpha.6) (2024-04-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **issue118:** add smoke test and type surface tests ([fe0c709](https://github.com/camunda/camunda-8-js-sdk/commit/fe0c70925cf3df610b049e776eed5bffe56ef604)), closes [#118](https://github.com/camunda/camunda-8-js-sdk/issues/118)
|
|
7
|
+
|
|
1
8
|
# [8.5.0-alpha.5](https://github.com/camunda/camunda-8-js-sdk/compare/v8.5.0-alpha.4...v8.5.0-alpha.5) (2024-04-07)
|
|
2
9
|
|
|
3
10
|
|
package/dist/c8/index.d.ts
CHANGED
|
@@ -31,12 +31,12 @@ export declare class Camunda8 {
|
|
|
31
31
|
private tasklistApiClient?;
|
|
32
32
|
private zeebeGrpcClient?;
|
|
33
33
|
private configuration;
|
|
34
|
-
private oAuthProvider
|
|
34
|
+
private oAuthProvider?;
|
|
35
35
|
constructor(config?: DeepPartial<CamundaPlatform8Configuration>);
|
|
36
36
|
getOperateApiClient(): OperateApiClient;
|
|
37
37
|
getAdminApiClient(): AdminApiClient;
|
|
38
38
|
getModelerApiClient(): ModelerApiClient;
|
|
39
39
|
getOptimizeApiClient(): OptimizeApiClient;
|
|
40
40
|
getTasklistApiClient(): TasklistApiClient;
|
|
41
|
-
|
|
41
|
+
getZeebeGrpcApiClient(): ZeebeGrpcClient;
|
|
42
42
|
}
|
package/dist/c8/index.js
CHANGED
|
@@ -31,7 +31,10 @@ class Camunda8 {
|
|
|
31
31
|
constructor(config = {}) {
|
|
32
32
|
this.configuration =
|
|
33
33
|
lib_1.CamundaEnvironmentConfigurator.mergeConfigWithEnvironment(config);
|
|
34
|
-
|
|
34
|
+
// Respect Oauth disabled flag
|
|
35
|
+
if (!this.configuration.CAMUNDA_OAUTH_DISABLED) {
|
|
36
|
+
this.oAuthProvider = new oauth_1.OAuthProvider({ config: this.configuration });
|
|
37
|
+
}
|
|
35
38
|
}
|
|
36
39
|
getOperateApiClient() {
|
|
37
40
|
if (!this.operateApiClient) {
|
|
@@ -78,7 +81,7 @@ class Camunda8 {
|
|
|
78
81
|
}
|
|
79
82
|
return this.tasklistApiClient;
|
|
80
83
|
}
|
|
81
|
-
|
|
84
|
+
getZeebeGrpcApiClient() {
|
|
82
85
|
if (!this.zeebeGrpcClient) {
|
|
83
86
|
this.zeebeGrpcClient = new zeebe_1.ZeebeGrpcClient({
|
|
84
87
|
config: this.configuration,
|
package/dist/c8/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/c8/index.ts"],"names":[],"mappings":";;;AAAA,oCAAyC;AACzC,gCAIe;AACf,wCAA6C;AAC7C,oCAAwC;AACxC,wCAA6C;AAC7C,0CAA+C;AAC/C,0CAA+C;AAC/C,oCAA0C;AAE1C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,QAAQ;IAUpB,YAAY,SAAqD,EAAE;QAClE,IAAI,CAAC,aAAa;YACjB,oCAA8B,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/c8/index.ts"],"names":[],"mappings":";;;A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QACH,CAAC;QACD,OAAO,IAAI,CAAC,gBAAgB,CAAA;IAC7B,CAAC;IAEM,oBAAoB;QAC1B,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC7B,IAAI,CAAC,iBAAiB,GAAG,IAAI,4BAAiB,CAAC;gBAC9C,MAAM,EAAE,IAAI,CAAC,aAAa;gBAC1B,aAAa,EAAE,IAAI,CAAC,aAAa;aACjC,CAAC,CAAA;QACH,CAAC;QACD,OAAO,IAAI,CAAC,iBAAiB,CAAA;IAC9B,CAAC;IAEM,oBAAoB;QAC1B,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC7B,IAAI,CAAC,iBAAiB,GAAG,IAAI,4BAAiB,CAAC;gBAC9C,MAAM,EAAE,IAAI,CAAC,aAAa;gBAC1B,aAAa,EAAE,IAAI,CAAC,aAAa;aACjC,CAAC,CAAA;QACH,CAAC;QACD,OAAO,IAAI,CAAC,iBAAiB,CAAA;IAC9B,CAAC;IAEM,qBAAqB;QAC3B,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YAC3B,IAAI,CAAC,eAAe,GAAG,IAAI,uBAAe,CAAC;gBAC1C,MAAM,EAAE,IAAI,CAAC,aAAa;gBAC1B,aAAa,EAAE,IAAI,CAAC,aAAa;aACjC,CAAC,CAAA;QACH,CAAC;QACD,OAAO,IAAI,CAAC,eAAe,CAAA;IAC5B,CAAC;CACD;AA9ED,4BA8EC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda8/sdk",
|
|
3
|
-
"version": "8.5.0-alpha.
|
|
3
|
+
"version": "8.5.0-alpha.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"test:local-integration": "jest --runInBand --detectOpenHandles --verbose --testPathIgnorePatterns disconnection --testPathIgnorePatterns admin --testPathIgnorePatterns multitenancy --testPathIgnorePatterns __tests__/config -u",
|
|
16
16
|
"test:docker": "jest --runInBand --testPathIgnorePatterns disconnection --testPathIgnorePatterns __tests__/config local-integration --detectOpenHandles --verbose true",
|
|
17
17
|
"test:disconnect": "jest --runInBand --verbose true --detectOpenHandles --testPathIgnorePatterns __tests__/config disconnection",
|
|
18
|
+
"test:smoketest": "npm run build && node smoke-test/smoke-test.js && npx tsd --typings dist/",
|
|
18
19
|
"prepublishOnly": "npm run build && npm run test",
|
|
19
20
|
"commit": "cz",
|
|
20
21
|
"prepare": "husky install",
|
|
@@ -73,6 +74,9 @@
|
|
|
73
74
|
"prettier --write"
|
|
74
75
|
]
|
|
75
76
|
},
|
|
77
|
+
"tsd": {
|
|
78
|
+
"directory": "test-d"
|
|
79
|
+
},
|
|
76
80
|
"devDependencies": {
|
|
77
81
|
"@commitlint/cli": "^18.4.3",
|
|
78
82
|
"@commitlint/config-conventional": "^18.4.3",
|
|
@@ -102,6 +106,7 @@
|
|
|
102
106
|
"shx": "^0.3.4",
|
|
103
107
|
"ts-jest": "^29.1.1",
|
|
104
108
|
"tsconfig-paths": "^4.2.0",
|
|
109
|
+
"tsd": "^0.31.0",
|
|
105
110
|
"typedoc": "^0.25.9",
|
|
106
111
|
"typedoc-plugin-include-example": "^1.2.0",
|
|
107
112
|
"typedoc-plugin-missing-exports": "^2.2.0",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "smoke-test",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"lockfileVersion": 3,
|
|
5
|
+
"requires": true,
|
|
6
|
+
"packages": {
|
|
7
|
+
"": {
|
|
8
|
+
"name": "smoke-test",
|
|
9
|
+
"version": "1.0.0",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@types/node": "^20.12.5"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"node_modules/@types/node": {
|
|
16
|
+
"version": "20.12.5",
|
|
17
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.5.tgz",
|
|
18
|
+
"integrity": "sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw==",
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"undici-types": "~5.26.4"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"node_modules/undici-types": {
|
|
24
|
+
"version": "5.26.5",
|
|
25
|
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
|
26
|
+
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "smoke-test",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "smoke-test.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@types/node": "^20.12.5"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
+
const { Camunda8 } = require('..')
|
|
4
|
+
|
|
5
|
+
console.log('Running smoke test...')
|
|
6
|
+
|
|
7
|
+
const camunda = new Camunda8({
|
|
8
|
+
CAMUNDA_OAUTH_DISABLED: true,
|
|
9
|
+
ZEEBE_ADDRESS: 'localhost:26500',
|
|
10
|
+
ZEEBE_CLIENT_ID: 'zeebeClientId',
|
|
11
|
+
ZEEBE_CLIENT_SECRET: 'zeebeClientSecret',
|
|
12
|
+
CAMUNDA_CONSOLE_BASE_URL: 'http://localhost:8080',
|
|
13
|
+
CAMUNDA_MODELER_BASE_URL: 'http://localhost:8080',
|
|
14
|
+
CAMUNDA_TASKLIST_BASE_URL: 'http://localhost:8080',
|
|
15
|
+
CAMUNDA_OPERATE_BASE_URL: 'http://localhost:8080',
|
|
16
|
+
CAMUNDA_OPTIMIZE_BASE_URL: 'http://localhost:8080',
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
// console.log(camunda)
|
|
20
|
+
|
|
21
|
+
const zeebe = camunda.getZeebeGrpcApiClient()
|
|
22
|
+
|
|
23
|
+
// console.log(zeebe)
|
|
24
|
+
|
|
25
|
+
const tasklist = camunda.getTasklistApiClient()
|
|
26
|
+
|
|
27
|
+
// console.log(tasklist)
|
|
28
|
+
|
|
29
|
+
const modeler = camunda.getModelerApiClient()
|
|
30
|
+
|
|
31
|
+
// console.log(modeler)
|
|
32
|
+
|
|
33
|
+
const optimize = camunda.getOptimizeApiClient()
|
|
34
|
+
|
|
35
|
+
// console.log(optimize)
|
|
36
|
+
|
|
37
|
+
const admin = camunda.getAdminApiClient()
|
|
38
|
+
|
|
39
|
+
// console.log(admin)
|
|
40
|
+
|
|
41
|
+
const operate = camunda.getOperateApiClient()
|
|
42
|
+
|
|
43
|
+
// console.log(operate)
|
|
44
|
+
|
|
45
|
+
console.log('Smoke test passed!')
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { expectType } from 'tsd'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Admin,
|
|
5
|
+
Camunda8,
|
|
6
|
+
Modeler,
|
|
7
|
+
Operate,
|
|
8
|
+
Optimize,
|
|
9
|
+
Tasklist,
|
|
10
|
+
Zeebe,
|
|
11
|
+
} from '..'
|
|
12
|
+
|
|
13
|
+
expectType<Camunda8>(new Camunda8({ CAMUNDA_OAUTH_DISABLED: true }))
|
|
14
|
+
expectType<Operate.OperateApiClient>(
|
|
15
|
+
new Camunda8({ CAMUNDA_OAUTH_DISABLED: true }).getOperateApiClient()
|
|
16
|
+
)
|
|
17
|
+
expectType<Admin.AdminApiClient>(
|
|
18
|
+
new Camunda8({ CAMUNDA_OAUTH_DISABLED: true }).getAdminApiClient()
|
|
19
|
+
)
|
|
20
|
+
expectType<Modeler.ModelerApiClient>(
|
|
21
|
+
new Camunda8({ CAMUNDA_OAUTH_DISABLED: true }).getModelerApiClient()
|
|
22
|
+
)
|
|
23
|
+
expectType<Optimize.OptimizeApiClient>(
|
|
24
|
+
new Camunda8({ CAMUNDA_OAUTH_DISABLED: true }).getOptimizeApiClient()
|
|
25
|
+
)
|
|
26
|
+
expectType<Tasklist.TasklistApiClient>(
|
|
27
|
+
new Camunda8({ CAMUNDA_OAUTH_DISABLED: true }).getTasklistApiClient()
|
|
28
|
+
)
|
|
29
|
+
expectType<Zeebe.ZeebeGrpcClient>(
|
|
30
|
+
new Camunda8({ CAMUNDA_OAUTH_DISABLED: true }).getZeebeGrpcApiClient()
|
|
31
|
+
)
|