@rsdk/cli.cmd.kafka 5.4.0-next.5 → 5.4.0-next.7
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/CHANGELOG.md +10 -0
- package/dist/extract/kafka-config.extractor.js +3 -3
- package/dist/extract/kafka-config.extractor.js.map +1 -1
- package/dist/sync/get-config.js +2 -2
- package/dist/sync/get-config.js.map +1 -1
- package/package.json +5 -5
- package/src/extract/kafka-config.extractor.ts +3 -3
- package/src/sync/get-config.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [5.4.0-next.7](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.6...v5.4.0-next.7) (2024-11-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rsdk/cli.cmd.kafka
|
|
9
|
+
|
|
10
|
+
## [5.4.0-next.6](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.5...v5.4.0-next.6) (2024-11-28)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* bump versions ([079d251](https://github.com/R-Vision/rsdk/commit/079d251965bdcb6d280f9162d898f776618f9e69))
|
|
15
|
+
|
|
6
16
|
## [5.4.0-next.5](https://github.com/R-Vision/rsdk/compare/v5.4.0-next.4...v5.4.0-next.5) (2024-11-28)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @rsdk/cli.cmd.kafka
|
|
@@ -5,18 +5,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.KafkaConfigExtractor = void 0;
|
|
7
7
|
const promises_1 = require("node:fs/promises");
|
|
8
|
-
const node_path_1 = require("node:path");
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
const yaml_1 = __importDefault(require("yaml"));
|
|
10
10
|
class KafkaConfigExtractor {
|
|
11
11
|
static async extractCommand(includeSchema) {
|
|
12
12
|
const resultKafkaConfig = await this.extract();
|
|
13
|
-
await (0, promises_1.writeFile)(
|
|
13
|
+
await (0, promises_1.writeFile)(node_path_1.default.resolve('kafka.yml'), yaml_1.default.stringify({
|
|
14
14
|
...(includeSchema && { $schema: includeSchema }),
|
|
15
15
|
...resultKafkaConfig,
|
|
16
16
|
}));
|
|
17
17
|
}
|
|
18
18
|
static async extract() {
|
|
19
|
-
const pathToRsdkJson =
|
|
19
|
+
const pathToRsdkJson = node_path_1.default.resolve('autodoc/rsdk.json');
|
|
20
20
|
const rsdkJson = JSON.parse(await (0, promises_1.readFile)(pathToRsdkJson, 'utf8'));
|
|
21
21
|
const kafkaMetadata = rsdkJson.rsdkMetadata
|
|
22
22
|
.filter(({ scope }) => scope === 'kafka-topic')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kafka-config.extractor.js","sourceRoot":"","sources":["../../src/extract/kafka-config.extractor.ts"],"names":[],"mappings":";;;;;;AACA,+CAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"kafka-config.extractor.js","sourceRoot":"","sources":["../../src/extract/kafka-config.extractor.ts"],"names":[],"mappings":";;;;;;AACA,+CAAuD;AACvD,0DAA6B;AAC7B,gDAAwB;AAMxB,MAAa,oBAAoB;IAC/B,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,aAAsB;QAChD,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QAE/C,MAAM,IAAA,oBAAS,EACb,mBAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EACzB,cAAI,CAAC,SAAS,CAAC;YACb,GAAG,CAAC,aAAa,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;YAChD,GAAG,iBAAiB;SACrB,CAAC,CACH,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,OAAO;QAClB,MAAM,cAAc,GAAG,mBAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QACzD,MAAM,QAAQ,GAAS,IAAI,CAAC,KAAK,CAAC,MAAM,IAAA,mBAAQ,EAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;QAE1E,MAAM,aAAa,GAAG,QAAQ,CAAC,YAAY;aACxC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,aAAa,CAAC;aAC9C,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;QAE7B,MAAM,MAAM,GACV,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YACzB,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;YACjC,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,4BAA4B,EAAE;oBAC5C,KAAK,EAAE,IAAI;iBACZ,CAAC,CAAC;YACL,CAAC;YACD,OAAO;gBACL,IAAI,EAAE,SAAS;aAChB,CAAC;QACJ,CAAC,CAAC,CAAC;QAEL,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;CACF;AApCD,oDAoCC"}
|
package/dist/sync/get-config.js
CHANGED
|
@@ -5,12 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.KafkaExpectedConfigProvider = void 0;
|
|
7
7
|
const promises_1 = require("node:fs/promises");
|
|
8
|
-
const node_path_1 = require("node:path");
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
const yaml_1 = __importDefault(require("yaml"));
|
|
10
10
|
const config_schema_1 = require("../config.schema");
|
|
11
11
|
class KafkaExpectedConfigProvider {
|
|
12
12
|
static async getConfig() {
|
|
13
|
-
const kafkaYml = await (0, promises_1.readFile)(
|
|
13
|
+
const kafkaYml = await (0, promises_1.readFile)(node_path_1.default.resolve('kafka.yml'), {
|
|
14
14
|
encoding: 'utf8',
|
|
15
15
|
});
|
|
16
16
|
const config = yaml_1.default.parse(kafkaYml);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-config.js","sourceRoot":"","sources":["../../src/sync/get-config.ts"],"names":[],"mappings":";;;;;;AACA,+CAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"get-config.js","sourceRoot":"","sources":["../../src/sync/get-config.ts"],"names":[],"mappings":";;;;;;AACA,+CAA4C;AAC5C,0DAA6B;AAC7B,gDAAwB;AAGxB,oDAA+D;AAE/D,MAAa,2BAA2B;IACtC,MAAM,CAAC,KAAK,CAAC,SAAS;QACpB,MAAM,QAAQ,GAAG,MAAM,IAAA,mBAAQ,EAAC,mBAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;YACzD,QAAQ,EAAE,MAAM;SACjB,CAAC,CAAC;QACH,MAAM,MAAM,GAAwC,cAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEzE,MAAM,OAAO,GAAG,2CAA2B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC1D,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,gBAAgB,EAAE;gBAChC,KAAK,EAAE,CAAC,GAAG,2CAA2B,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;aACvD,CAAC,CAAC;QACL,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAfD,kEAeC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/cli.cmd.kafka",
|
|
3
|
-
"version": "5.4.0-next.
|
|
3
|
+
"version": "5.4.0-next.7",
|
|
4
4
|
"description": "Start command for rsdk cli",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
],
|
|
16
16
|
"license": "Apache License 2.0",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@sinclair/typebox": "^0.
|
|
19
|
-
"commander": "^12.
|
|
18
|
+
"@sinclair/typebox": "^0.34.9",
|
|
19
|
+
"commander": "^12.1.0",
|
|
20
20
|
"dotenv": "^16.3.1",
|
|
21
21
|
"execa": "5",
|
|
22
22
|
"kafkajs": "^2.2.4",
|
|
23
23
|
"listr2": "^6.6.1",
|
|
24
|
-
"yaml": "^2.
|
|
24
|
+
"yaml": "^2.6.1"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@rsdk/cli.common": "*",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"@rsdk/logging": "*",
|
|
30
30
|
"reflect-metadata": "^0.1.12 || ^0.2.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "b3b1c058db7d8c78962d82adf2e5c4683122ef48"
|
|
33
33
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Static } from '@sinclair/typebox';
|
|
2
2
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
3
|
-
import
|
|
3
|
+
import path from 'node:path';
|
|
4
4
|
import yaml from 'yaml';
|
|
5
5
|
|
|
6
6
|
import type { CliKafkaConfigSchema } from '../config.schema';
|
|
@@ -12,7 +12,7 @@ export class KafkaConfigExtractor {
|
|
|
12
12
|
const resultKafkaConfig = await this.extract();
|
|
13
13
|
|
|
14
14
|
await writeFile(
|
|
15
|
-
resolve('kafka.yml'),
|
|
15
|
+
path.resolve('kafka.yml'),
|
|
16
16
|
yaml.stringify({
|
|
17
17
|
...(includeSchema && { $schema: includeSchema }),
|
|
18
18
|
...resultKafkaConfig,
|
|
@@ -21,7 +21,7 @@ export class KafkaConfigExtractor {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
static async extract(): Promise<Static<typeof CliKafkaConfigSchema>> {
|
|
24
|
-
const pathToRsdkJson = resolve('autodoc/rsdk.json');
|
|
24
|
+
const pathToRsdkJson = path.resolve('autodoc/rsdk.json');
|
|
25
25
|
const rsdkJson: Root = JSON.parse(await readFile(pathToRsdkJson, 'utf8'));
|
|
26
26
|
|
|
27
27
|
const kafkaMetadata = rsdkJson.rsdkMetadata
|
package/src/sync/get-config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Static } from '@sinclair/typebox';
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
|
-
import
|
|
3
|
+
import path from 'node:path';
|
|
4
4
|
import yaml from 'yaml';
|
|
5
5
|
|
|
6
6
|
import type { CliKafkaConfigSchema } from '../config.schema';
|
|
@@ -8,7 +8,7 @@ import { CliKafkaConfigSchemaChecker } from '../config.schema';
|
|
|
8
8
|
|
|
9
9
|
export class KafkaExpectedConfigProvider {
|
|
10
10
|
static async getConfig(): Promise<Static<typeof CliKafkaConfigSchema>> {
|
|
11
|
-
const kafkaYml = await readFile(resolve('kafka.yml'), {
|
|
11
|
+
const kafkaYml = await readFile(path.resolve('kafka.yml'), {
|
|
12
12
|
encoding: 'utf8',
|
|
13
13
|
});
|
|
14
14
|
const config: Static<typeof CliKafkaConfigSchema> = yaml.parse(kafkaYml);
|