@camunda8/sdk 8.5.0-alpha.5 → 8.5.0
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 +34 -0
- package/README.md +3 -1
- 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,37 @@
|
|
|
1
|
+
# [8.5.0](https://github.com/camunda/camunda-8-js-sdk/compare/v8.4.1...v8.5.0) (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
|
+
* **repo:** add note on "supported" ([#107](https://github.com/camunda/camunda-8-js-sdk/issues/107)) ([fc45d61](https://github.com/camunda/camunda-8-js-sdk/commit/fc45d618bc459a06fbf76bd6907511d08e1f583b)), closes [#70](https://github.com/camunda/camunda-8-js-sdk/issues/70)
|
|
8
|
+
* **repo:** make fix type commits release a new package ([ded83cf](https://github.com/camunda/camunda-8-js-sdk/commit/ded83cfaf437a2f62a5ef134d7616538facda614))
|
|
9
|
+
* **repo:** only git commit on npm publish success ([9012764](https://github.com/camunda/camunda-8-js-sdk/commit/901276451845c5dbd926af0a6563d5564d3e87b9))
|
|
10
|
+
* **repo:** use ts-patch to transform module mapping in output ([#112](https://github.com/camunda/camunda-8-js-sdk/issues/112)) ([7efdcf3](https://github.com/camunda/camunda-8-js-sdk/commit/7efdcf3478a0d68b4f1cbc62c1526ba7275008b0)), closes [#110](https://github.com/camunda/camunda-8-js-sdk/issues/110)
|
|
11
|
+
|
|
12
|
+
## [8.4.1](https://github.com/camunda/camunda-8-js-sdk/compare/v8.4.0...v8.4.1) (2024-04-08)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **oauth:** support optional scope in OAuth request ([#25](https://github.com/camunda/camunda-8-js-sdk/issues/25)) ([0451b80](https://github.com/camunda/camunda-8-js-sdk/commit/0451b802594f76518830b9bdff515d67fc0231b9))
|
|
18
|
+
* **operate:** add multitenant support and lossless Json parsing ([#82](https://github.com/camunda/camunda-8-js-sdk/issues/82)) ([cf49a71](https://github.com/camunda/camunda-8-js-sdk/commit/cf49a717e2632af845529b3c1fde85ee1b0b347b)), closes [#78](https://github.com/camunda/camunda-8-js-sdk/issues/78) [#67](https://github.com/camunda/camunda-8-js-sdk/issues/67)
|
|
19
|
+
* **repo:** add enhanced debug output for http errors ([#88](https://github.com/camunda/camunda-8-js-sdk/issues/88)) ([881b039](https://github.com/camunda/camunda-8-js-sdk/commit/881b03965cc37431885a76291f7c0aa762f26227)), closes [#87](https://github.com/camunda/camunda-8-js-sdk/issues/87)
|
|
20
|
+
* **tasklist:** add multitenant support to tasklist ([#85](https://github.com/camunda/camunda-8-js-sdk/issues/85)) ([46bb564](https://github.com/camunda/camunda-8-js-sdk/commit/46bb564365afc3bc6758cd436490a459708128e6))
|
|
21
|
+
* **zeebe:** add MigrateProcessInstance ([#97](https://github.com/camunda/camunda-8-js-sdk/issues/97)) ([2a9a123](https://github.com/camunda/camunda-8-js-sdk/commit/2a9a1232b160962f86b9450edd9047a8a933068a)), closes [#49](https://github.com/camunda/camunda-8-js-sdk/issues/49)
|
|
22
|
+
* **zeebe:** implement deleteResource ([#73](https://github.com/camunda/camunda-8-js-sdk/issues/73)) ([0cd08b7](https://github.com/camunda/camunda-8-js-sdk/commit/0cd08b7b85d23ab44e42b36b2d9b48c1cfcb8c63))
|
|
23
|
+
* **zeebe:** implement lossless parsing of job payload ([#95](https://github.com/camunda/camunda-8-js-sdk/issues/95)) ([57f3ea8](https://github.com/camunda/camunda-8-js-sdk/commit/57f3ea85d4cf86256301f5f2a9bcead09c01a199)), closes [#81](https://github.com/camunda/camunda-8-js-sdk/issues/81)
|
|
24
|
+
* **zeebe:** normalise useragent, thread config ([#94](https://github.com/camunda/camunda-8-js-sdk/issues/94)) ([c1c4211](https://github.com/camunda/camunda-8-js-sdk/commit/c1c4211db11173c56d2410f489503ef9acf185f2))
|
|
25
|
+
* **zeebe:** remove deployProcess method ([#71](https://github.com/camunda/camunda-8-js-sdk/issues/71)) ([6cb98f0](https://github.com/camunda/camunda-8-js-sdk/commit/6cb98f0ff3baf643015bacfa690f4f119caf6083))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# [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)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* **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)
|
|
34
|
+
|
|
1
35
|
# [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
36
|
|
|
3
37
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@camunda8/sdk)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
6
|
+
|
|
7
|
+
This is the official Camunda 8 JavaScript SDK. It is written in TypeScript and runs on Node.js. See why [this does not run in a web browser](https://github.com/camunda/camunda-8-js-sdk/issues/79).
|
|
6
8
|
|
|
7
9
|
## What does "supported" mean?
|
|
8
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":";;;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;QAClE,8BAA8B;QAC9B,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,sBAAsB,EAAE,CAAC;YAChD,IAAI,CAAC,aAAa,GAAG,IAAI,qBAAa,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC,CAAA;QACvE,CAAC;IACF,CAAC;IAEM,mBAAmB;QACzB,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC5B,IAAI,CAAC,gBAAgB,GAAG,IAAI,0BAAgB,CAAC;gBAC5C,MAAM,EAAE,IAAI,CAAC,aAAa;gBAC1B,aAAa,EAAE,IAAI,CAAC,aAAa;aACjC,CAAC,CAAA;QACH,CAAC;QACD,OAAO,IAAI,CAAC,gBAAgB,CAAA;IAC7B,CAAC;IAEM,iBAAiB;QACvB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC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AAC,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
|
|
3
|
+
"version": "8.5.0",
|
|
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
|
+
)
|