@cardano-sdk/cardano-services 0.9.0-nightly.2 → 0.10.0-nightly.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/dist/cjs/Asset/AssetHttpService.js +2 -2
- package/dist/cjs/Asset/AssetHttpService.js.map +1 -1
- package/dist/cjs/ChainHistory/ChainHistoryHttpService.js +2 -2
- package/dist/cjs/ChainHistory/ChainHistoryHttpService.js.map +1 -1
- package/dist/cjs/NetworkInfo/NetworkInfoHttpService.js +2 -2
- package/dist/cjs/NetworkInfo/NetworkInfoHttpService.js.map +1 -1
- package/dist/cjs/Program/errors/MissingCardanoNodeOption.d.ts +2 -2
- package/dist/cjs/Program/errors/MissingCardanoNodeOption.d.ts.map +1 -1
- package/dist/cjs/Program/errors/MissingCardanoNodeOption.js +1 -1
- package/dist/cjs/Program/errors/MissingCardanoNodeOption.js.map +1 -1
- package/dist/cjs/Program/errors/MissingProgramOption.d.ts +2 -4
- package/dist/cjs/Program/errors/MissingProgramOption.d.ts.map +1 -1
- package/dist/cjs/Program/errors/MissingProgramOption.js +1 -1
- package/dist/cjs/Program/errors/MissingProgramOption.js.map +1 -1
- package/dist/cjs/Program/errors/MissingServiceDependency.d.ts +1 -2
- package/dist/cjs/Program/errors/MissingServiceDependency.d.ts.map +1 -1
- package/dist/cjs/Program/errors/MissingServiceDependency.js.map +1 -1
- package/dist/cjs/Program/errors/UnknownServiceName.d.ts +2 -2
- package/dist/cjs/Program/errors/UnknownServiceName.d.ts.map +1 -1
- package/dist/cjs/Program/errors/UnknownServiceName.js +2 -3
- package/dist/cjs/Program/errors/UnknownServiceName.js.map +1 -1
- package/dist/cjs/Program/index.d.ts +1 -6
- package/dist/cjs/Program/index.d.ts.map +1 -1
- package/dist/cjs/Program/index.js +1 -6
- package/dist/cjs/Program/index.js.map +1 -1
- package/dist/cjs/Program/options/common.d.ts +26 -0
- package/dist/cjs/Program/options/common.d.ts.map +1 -0
- package/dist/cjs/Program/options/common.js +51 -0
- package/dist/cjs/Program/options/common.js.map +1 -0
- package/dist/cjs/Program/options/index.d.ts +5 -0
- package/dist/cjs/Program/options/index.d.ts.map +1 -0
- package/dist/cjs/Program/options/index.js +21 -0
- package/dist/cjs/Program/options/index.js.map +1 -0
- package/dist/cjs/Program/options/ogmios.d.ts +13 -0
- package/dist/cjs/Program/options/ogmios.d.ts.map +1 -0
- package/dist/cjs/Program/options/ogmios.js +24 -0
- package/dist/cjs/Program/options/ogmios.js.map +1 -0
- package/dist/cjs/Program/options/postgres.d.ts +30 -0
- package/dist/cjs/Program/options/postgres.d.ts.map +1 -0
- package/dist/cjs/Program/options/postgres.js +59 -0
- package/dist/cjs/Program/options/postgres.js.map +1 -0
- package/dist/cjs/Program/options/rabbitMq.d.ts +13 -0
- package/dist/cjs/Program/options/rabbitMq.d.ts.map +1 -0
- package/dist/cjs/Program/options/rabbitMq.js +20 -0
- package/dist/cjs/Program/options/rabbitMq.js.map +1 -0
- package/dist/cjs/Program/programs/httpServer.d.ts +45 -0
- package/dist/cjs/Program/programs/httpServer.d.ts.map +1 -0
- package/dist/cjs/Program/programs/httpServer.js +173 -0
- package/dist/cjs/Program/programs/httpServer.js.map +1 -0
- package/dist/cjs/Program/{programs.d.ts → programs/index.d.ts} +3 -1
- package/dist/cjs/Program/programs/index.d.ts.map +1 -0
- package/dist/cjs/Program/programs/index.js +25 -0
- package/dist/cjs/Program/programs/index.js.map +1 -0
- package/dist/cjs/Program/programs/txWorker.d.ts +15 -0
- package/dist/cjs/Program/programs/txWorker.d.ts.map +1 -0
- package/dist/cjs/Program/programs/txWorker.js +29 -0
- package/dist/cjs/Program/programs/txWorker.js.map +1 -0
- package/dist/cjs/Program/services/ogmios.d.ts +3 -3
- package/dist/cjs/Program/services/ogmios.d.ts.map +1 -1
- package/dist/cjs/Program/services/ogmios.js +3 -9
- package/dist/cjs/Program/services/ogmios.js.map +1 -1
- package/dist/cjs/Program/services/postgres.d.ts +4 -2
- package/dist/cjs/Program/services/postgres.d.ts.map +1 -1
- package/dist/cjs/Program/services/postgres.js +17 -1
- package/dist/cjs/Program/services/postgres.js.map +1 -1
- package/dist/cjs/Program/services/rabbitmq.d.ts +7 -5
- package/dist/cjs/Program/services/rabbitmq.d.ts.map +1 -1
- package/dist/cjs/Program/services/rabbitmq.js +21 -20
- package/dist/cjs/Program/services/rabbitmq.js.map +1 -1
- package/dist/cjs/Program/utils.d.ts +4 -6
- package/dist/cjs/Program/utils.d.ts.map +1 -1
- package/dist/cjs/Program/utils.js +12 -15
- package/dist/cjs/Program/utils.js.map +1 -1
- package/dist/cjs/Rewards/RewardsHttpService.js +2 -2
- package/dist/cjs/Rewards/RewardsHttpService.js.map +1 -1
- package/dist/cjs/StakePool/DbSyncStakePoolProvider/DbSyncStakePoolProvider.d.ts.map +1 -1
- package/dist/cjs/StakePool/DbSyncStakePoolProvider/DbSyncStakePoolProvider.js +1 -1
- package/dist/cjs/StakePool/DbSyncStakePoolProvider/DbSyncStakePoolProvider.js.map +1 -1
- package/dist/cjs/StakePool/DbSyncStakePoolProvider/util.d.ts +1 -0
- package/dist/cjs/StakePool/DbSyncStakePoolProvider/util.d.ts.map +1 -1
- package/dist/cjs/StakePool/DbSyncStakePoolProvider/util.js +2 -1
- package/dist/cjs/StakePool/DbSyncStakePoolProvider/util.js.map +1 -1
- package/dist/cjs/StakePool/StakePoolHttpService.js +2 -2
- package/dist/cjs/StakePool/StakePoolHttpService.js.map +1 -1
- package/dist/cjs/StakePool/openApi.json +75 -1
- package/dist/cjs/TxSubmit/TxSubmitHttpService.js +2 -2
- package/dist/cjs/TxSubmit/TxSubmitHttpService.js.map +1 -1
- package/dist/cjs/Utxo/UtxoHttpService.js +2 -2
- package/dist/cjs/Utxo/UtxoHttpService.js.map +1 -1
- package/dist/cjs/cli.js +25 -121
- package/dist/cjs/cli.js.map +1 -1
- package/dist/cjs/original-package.json +8 -10
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/cjs/util/validators.js +1 -1
- package/dist/cjs/util/validators.js.map +1 -1
- package/package.json +8 -10
- package/dist/cjs/Program/Options.d.ts +0 -84
- package/dist/cjs/Program/Options.d.ts.map +0 -1
- package/dist/cjs/Program/Options.js +0 -51
- package/dist/cjs/Program/Options.js.map +0 -1
- package/dist/cjs/Program/ServiceNames.d.ts +0 -10
- package/dist/cjs/Program/ServiceNames.d.ts.map +0 -1
- package/dist/cjs/Program/ServiceNames.js +0 -14
- package/dist/cjs/Program/ServiceNames.js.map +0 -1
- package/dist/cjs/Program/defaults.d.ts +0 -10
- package/dist/cjs/Program/defaults.d.ts.map +0 -1
- package/dist/cjs/Program/defaults.js +0 -17
- package/dist/cjs/Program/defaults.js.map +0 -1
- package/dist/cjs/Program/loadHttpServer.d.ts +0 -40
- package/dist/cjs/Program/loadHttpServer.d.ts.map +0 -1
- package/dist/cjs/Program/loadHttpServer.js +0 -145
- package/dist/cjs/Program/loadHttpServer.js.map +0 -1
- package/dist/cjs/Program/loadTxWorker.d.ts +0 -9
- package/dist/cjs/Program/loadTxWorker.d.ts.map +0 -1
- package/dist/cjs/Program/loadTxWorker.js +0 -19
- package/dist/cjs/Program/loadTxWorker.js.map +0 -1
- package/dist/cjs/Program/programs.d.ts.map +0 -1
- package/dist/cjs/Program/programs.js +0 -9
- package/dist/cjs/Program/programs.js.map +0 -1
|
@@ -29,13 +29,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.AssetHttpService = void 0;
|
|
30
30
|
const OpenApiValidator = __importStar(require("express-openapi-validator"));
|
|
31
31
|
const Http_1 = require("../Http");
|
|
32
|
-
const
|
|
32
|
+
const Program_1 = require("../Program");
|
|
33
33
|
const util_1 = require("../util");
|
|
34
34
|
const express_1 = __importDefault(require("express"));
|
|
35
35
|
const path_1 = __importDefault(require("path"));
|
|
36
36
|
class AssetHttpService extends Http_1.HttpService {
|
|
37
37
|
constructor({ assetProvider, logger }, router = express_1.default.Router()) {
|
|
38
|
-
super(
|
|
38
|
+
super(Program_1.ServiceNames.Asset, assetProvider, router, logger);
|
|
39
39
|
const apiSpec = path_1.default.join(__dirname, 'openApi.json');
|
|
40
40
|
router.use(OpenApiValidator.middleware({
|
|
41
41
|
apiSpec,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetHttpService.js","sourceRoot":"","sources":["../../../src/Asset/AssetHttpService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4EAA8D;AAE9D,kCAAsC;AAEtC,
|
|
1
|
+
{"version":3,"file":"AssetHttpService.js","sourceRoot":"","sources":["../../../src/Asset/AssetHttpService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4EAA8D;AAE9D,kCAAsC;AAEtC,wCAA0C;AAC1C,kCAA0C;AAC1C,sDAA8B;AAC9B,gDAAwB;AAoBxB,MAAa,gBAAiB,SAAQ,kBAAW;IAC/C,YAAY,EAAE,aAAa,EAAE,MAAM,EAAgC,EAAE,SAAyB,iBAAO,CAAC,MAAM,EAAE;QAC5G,KAAK,CAAC,sBAAY,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAEzD,MAAM,OAAO,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QACrD,MAAM,CAAC,GAAG,CACR,gBAAgB,CAAC,UAAU,CAAC;YAC1B,OAAO;YACP,kBAAkB,EAAE,IAAI;YACxB,gBAAgB,EAAE,IAAI;YACtB,iBAAiB,EAAE,IAAI;SACxB,CAAC,CACH,CAAC;QACF,MAAM,CAAC,IAAI,CACT,YAAY,EACZ,IAAA,sBAAe,EAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,kBAAW,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CACtG,CAAC;IACJ,CAAC;CACF;AAlBD,4CAkBC"}
|
|
@@ -29,13 +29,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.ChainHistoryHttpService = void 0;
|
|
30
30
|
const OpenApiValidator = __importStar(require("express-openapi-validator"));
|
|
31
31
|
const Http_1 = require("../Http");
|
|
32
|
-
const
|
|
32
|
+
const Program_1 = require("../Program");
|
|
33
33
|
const util_1 = require("../util");
|
|
34
34
|
const express_1 = __importDefault(require("express"));
|
|
35
35
|
const path_1 = __importDefault(require("path"));
|
|
36
36
|
class ChainHistoryHttpService extends Http_1.HttpService {
|
|
37
37
|
constructor({ logger, chainHistoryProvider }, router = express_1.default.Router()) {
|
|
38
|
-
super(
|
|
38
|
+
super(Program_1.ServiceNames.ChainHistory, chainHistoryProvider, router, logger);
|
|
39
39
|
const apiSpec = path_1.default.join(__dirname, 'openApi.json');
|
|
40
40
|
router.use(OpenApiValidator.middleware({
|
|
41
41
|
apiSpec,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainHistoryHttpService.js","sourceRoot":"","sources":["../../../src/ChainHistory/ChainHistoryHttpService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4EAA8D;AAE9D,kCAAsC;AAEtC,
|
|
1
|
+
{"version":3,"file":"ChainHistoryHttpService.js","sourceRoot":"","sources":["../../../src/ChainHistory/ChainHistoryHttpService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4EAA8D;AAE9D,kCAAsC;AAEtC,wCAA0C;AAC1C,kCAA0C;AAC1C,sDAA8B;AAC9B,gDAAwB;AAOxB,MAAa,uBAAwB,SAAQ,kBAAW;IACtD,YACE,EAAE,MAAM,EAAE,oBAAoB,EAAuC,EACrE,SAAyB,iBAAO,CAAC,MAAM,EAAE;QAEzC,KAAK,CAAC,sBAAY,CAAC,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAEvE,MAAM,OAAO,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QACrD,MAAM,CAAC,GAAG,CACR,gBAAgB,CAAC,UAAU,CAAC;YAC1B,OAAO;YACP,kBAAkB,EAAE,IAAI;YACxB,gBAAgB,EAAE,IAAI;YACtB,iBAAiB,EAAE,IAAI;SACxB,CAAC,CACH,CAAC;QAEF,MAAM,CAAC,IAAI,CACT,mBAAmB,EACnB,IAAA,sBAAe,EAAC,oBAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAC7E,kBAAW,CAAC,YAAY,CAAC,MAAM,CAAC,EAChC,MAAM,CACP,CACF,CAAC;QACF,MAAM,CAAC,IAAI,CACT,gBAAgB,EAChB,IAAA,sBAAe,EAAC,oBAAoB,CAAC,oBAAoB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CACnF,kBAAW,CAAC,YAAY,CAAC,MAAM,CAAC,EAChC,MAAM,CACP,CACF,CAAC;QACF,MAAM,CAAC,IAAI,CACT,mBAAmB,EACnB,IAAA,sBAAe,EAAC,oBAAoB,CAAC,uBAAuB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CACtF,kBAAW,CAAC,YAAY,CAAC,MAAM,CAAC,EAChC,MAAM,CACP,CACF,CAAC;IACJ,CAAC;CACF;AAvCD,0DAuCC"}
|
|
@@ -29,13 +29,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.NetworkInfoHttpService = void 0;
|
|
30
30
|
const OpenApiValidator = __importStar(require("express-openapi-validator"));
|
|
31
31
|
const Http_1 = require("../Http");
|
|
32
|
-
const
|
|
32
|
+
const Program_1 = require("../Program");
|
|
33
33
|
const util_1 = require("../util");
|
|
34
34
|
const express_1 = __importDefault(require("express"));
|
|
35
35
|
const path_1 = __importDefault(require("path"));
|
|
36
36
|
class NetworkInfoHttpService extends Http_1.HttpService {
|
|
37
37
|
constructor({ networkInfoProvider, logger }, router = express_1.default.Router()) {
|
|
38
|
-
super(
|
|
38
|
+
super(Program_1.ServiceNames.NetworkInfo, networkInfoProvider, router, logger);
|
|
39
39
|
const apiSpec = path_1.default.join(__dirname, 'openApi.json');
|
|
40
40
|
router.use(OpenApiValidator.middleware({
|
|
41
41
|
apiSpec,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkInfoHttpService.js","sourceRoot":"","sources":["../../../src/NetworkInfo/NetworkInfoHttpService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4EAA8D;AAC9D,kCAAsC;AAGtC,
|
|
1
|
+
{"version":3,"file":"NetworkInfoHttpService.js","sourceRoot":"","sources":["../../../src/NetworkInfo/NetworkInfoHttpService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4EAA8D;AAC9D,kCAAsC;AAGtC,wCAA0C;AAC1C,kCAA0C;AAC1C,sDAA8B;AAC9B,gDAAwB;AAOxB,MAAa,sBAAuB,SAAQ,kBAAW;IACrD,YACE,EAAE,mBAAmB,EAAE,MAAM,EAAkC,EAC/D,SAAyB,iBAAO,CAAC,MAAM,EAAE;QAEzC,KAAK,CAAC,sBAAY,CAAC,WAAW,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAErE,MAAM,OAAO,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QACrD,MAAM,CAAC,GAAG,CACR,gBAAgB,CAAC,UAAU,CAAC;YAC1B,OAAO;YACP,kBAAkB,EAAE,IAAI;YACxB,gBAAgB,EAAE,IAAI;YACtB,iBAAiB,EAAE,IAAI;SACxB,CAAC,CACH,CAAC;QAEF,MAAM,CAAC,IAAI,CACT,QAAQ,EACR,IAAA,sBAAe,EAAC,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,kBAAW,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAC/G,CAAC;QACF,MAAM,CAAC,IAAI,CACT,kBAAkB,EAClB,IAAA,sBAAe,EAAC,mBAAmB,CAAC,cAAc,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAC3E,kBAAW,CAAC,YAAY,CAAC,MAAM,CAAC,EAChC,MAAM,CACP,CACF,CAAC;QACF,MAAM,CAAC,IAAI,CACT,gBAAgB,EAChB,IAAA,sBAAe,EAAC,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CACzE,kBAAW,CAAC,YAAY,CAAC,MAAM,CAAC,EAChC,MAAM,CACP,CACF,CAAC;QACF,MAAM,CAAC,IAAI,CACT,aAAa,EACb,IAAA,sBAAe,EAAC,mBAAmB,CAAC,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,kBAAW,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CACnH,CAAC;QACF,MAAM,CAAC,IAAI,CACT,sBAAsB,EACtB,IAAA,sBAAe,EAAC,mBAAmB,CAAC,kBAAkB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAC/E,kBAAW,CAAC,YAAY,CAAC,MAAM,CAAC,EAChC,MAAM,CACP,CACF,CAAC;QACF,MAAM,CAAC,IAAI,CACT,qCAAqC,EACrC,IAAA,sBAAe,EAAC,mBAAmB,CAAC,kBAAkB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAC/E,kBAAW,CAAC,YAAY,CAAC,MAAM,CAAC,EAChC,MAAM,CACP,CACF,CAAC;QACF,MAAM,CAAC,IAAI,CACT,qBAAqB,EACrB,IAAA,sBAAe,EAAC,mBAAmB,CAAC,iBAAiB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAC9E,kBAAW,CAAC,YAAY,CAAC,MAAM,CAAC,EAChC,MAAM,CACP,CACF,CAAC;IACJ,CAAC;CACF;AA7DD,wDA6DC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CustomError } from 'ts-custom-error';
|
|
2
|
-
import {
|
|
2
|
+
import { OgmiosOptionDescriptions } from '../options';
|
|
3
3
|
export declare class MissingCardanoNodeOption extends CustomError {
|
|
4
|
-
constructor(option:
|
|
4
|
+
constructor(option: OgmiosOptionDescriptions | OgmiosOptionDescriptions[]);
|
|
5
5
|
}
|
|
6
6
|
//# sourceMappingURL=MissingCardanoNodeOption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MissingCardanoNodeOption.d.ts","sourceRoot":"","sources":["../../../../src/Program/errors/MissingCardanoNodeOption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"MissingCardanoNodeOption.d.ts","sourceRoot":"","sources":["../../../../src/Program/errors/MissingCardanoNodeOption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAEtD,qBAAa,wBAAyB,SAAQ,WAAW;gBACpC,MAAM,EAAE,wBAAwB,GAAG,wBAAwB,EAAE;CAMjF"}
|
|
@@ -5,7 +5,7 @@ const ts_custom_error_1 = require("ts-custom-error");
|
|
|
5
5
|
class MissingCardanoNodeOption extends ts_custom_error_1.CustomError {
|
|
6
6
|
constructor(option) {
|
|
7
7
|
super();
|
|
8
|
-
this.message = `Cardano Node Ogmios requires the ${
|
|
8
|
+
this.message = `Cardano Node Ogmios requires the ${Array.isArray(option) ? option.join(' or ') : option} program option.`;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
exports.MissingCardanoNodeOption = MissingCardanoNodeOption;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MissingCardanoNodeOption.js","sourceRoot":"","sources":["../../../../src/Program/errors/MissingCardanoNodeOption.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;AAG9C,MAAa,wBAAyB,SAAQ,6BAAW;IACvD,YAAmB,
|
|
1
|
+
{"version":3,"file":"MissingCardanoNodeOption.js","sourceRoot":"","sources":["../../../../src/Program/errors/MissingCardanoNodeOption.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;AAG9C,MAAa,wBAAyB,SAAQ,6BAAW;IACvD,YAAmB,MAA6D;QAC9E,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,oCACb,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAChD,kBAAkB,CAAC;IACrB,CAAC;CACF;AAPD,4DAOC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { CustomError } from 'ts-custom-error';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare class MissingProgramOption extends CustomError {
|
|
5
|
-
constructor(service: ServiceNames, option: ProgramOptionDescriptions | ProgramOptionDescriptions[]);
|
|
2
|
+
export declare class MissingProgramOption<ServiceNames, OptionsType> extends CustomError {
|
|
3
|
+
constructor(service: ServiceNames, option: OptionsType | OptionsType[]);
|
|
6
4
|
}
|
|
7
5
|
//# sourceMappingURL=MissingProgramOption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MissingProgramOption.d.ts","sourceRoot":"","sources":["../../../../src/Program/errors/MissingProgramOption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"MissingProgramOption.d.ts","sourceRoot":"","sources":["../../../../src/Program/errors/MissingProgramOption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,qBAAa,oBAAoB,CAAC,YAAY,EAAE,WAAW,CAAE,SAAQ,WAAW;gBAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,GAAG,WAAW,EAAE;CAI9E"}
|
|
@@ -5,7 +5,7 @@ const ts_custom_error_1 = require("ts-custom-error");
|
|
|
5
5
|
class MissingProgramOption extends ts_custom_error_1.CustomError {
|
|
6
6
|
constructor(service, option) {
|
|
7
7
|
super();
|
|
8
|
-
this.message = `${service} requires the ${
|
|
8
|
+
this.message = `${service} requires the ${Array.isArray(option) ? option.join(' or ') : option} program option.`;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
exports.MissingProgramOption = MissingProgramOption;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MissingProgramOption.js","sourceRoot":"","sources":["../../../../src/Program/errors/MissingProgramOption.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;
|
|
1
|
+
{"version":3,"file":"MissingProgramOption.js","sourceRoot":"","sources":["../../../../src/Program/errors/MissingProgramOption.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;AAE9C,MAAa,oBAAgD,SAAQ,6BAAW;IAC9E,YAAmB,OAAqB,EAAE,MAAmC;QAC3E,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,GAAG,OAAO,iBAAiB,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,kBAAkB,CAAC;IACnH,CAAC;CACF;AALD,oDAKC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { CustomError } from 'ts-custom-error';
|
|
2
|
-
import { ServiceNames } from '../ServiceNames';
|
|
3
2
|
export declare enum RunnableDependencies {
|
|
4
3
|
CardanoNode = "Ogmios Cardano Node"
|
|
5
4
|
}
|
|
6
|
-
export declare class MissingServiceDependency extends CustomError {
|
|
5
|
+
export declare class MissingServiceDependency<ServiceNames> extends CustomError {
|
|
7
6
|
constructor(serviceName: ServiceNames, dependencyName: string);
|
|
8
7
|
}
|
|
9
8
|
//# sourceMappingURL=MissingServiceDependency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MissingServiceDependency.d.ts","sourceRoot":"","sources":["../../../../src/Program/errors/MissingServiceDependency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"MissingServiceDependency.d.ts","sourceRoot":"","sources":["../../../../src/Program/errors/MissingServiceDependency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,oBAAY,oBAAoB;IAC9B,WAAW,wBAAwB;CACpC;AAED,qBAAa,wBAAwB,CAAC,YAAY,CAAE,SAAQ,WAAW;gBAClD,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM;CAIrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MissingServiceDependency.js","sourceRoot":"","sources":["../../../../src/Program/errors/MissingServiceDependency.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;
|
|
1
|
+
{"version":3,"file":"MissingServiceDependency.js","sourceRoot":"","sources":["../../../../src/Program/errors/MissingServiceDependency.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;AAE9C,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,2DAAmC,CAAA;AACrC,CAAC,EAFW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAE/B;AAED,MAAa,wBAAuC,SAAQ,6BAAW;IACrE,YAAmB,WAAyB,EAAE,cAAsB;QAClE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,WAAW,WAAW,8BAA8B,cAAc,EAAE,CAAC;IACtF,CAAC;CACF;AALD,4DAKC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CustomError } from 'ts-custom-error';
|
|
2
|
-
export declare class UnknownServiceName extends CustomError {
|
|
3
|
-
constructor(input: string);
|
|
2
|
+
export declare class UnknownServiceName<ServiceNames> extends CustomError {
|
|
3
|
+
constructor(input: string, serviceNames: ServiceNames);
|
|
4
4
|
}
|
|
5
5
|
//# sourceMappingURL=UnknownServiceName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnknownServiceName.d.ts","sourceRoot":"","sources":["../../../../src/Program/errors/UnknownServiceName.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"UnknownServiceName.d.ts","sourceRoot":"","sources":["../../../../src/Program/errors/UnknownServiceName.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,qBAAa,kBAAkB,CAAC,YAAY,CAAE,SAAQ,WAAW;gBAC5C,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY;CAI7D"}
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UnknownServiceName = void 0;
|
|
4
4
|
const ts_custom_error_1 = require("ts-custom-error");
|
|
5
|
-
const ServiceNames_1 = require("../ServiceNames");
|
|
6
5
|
class UnknownServiceName extends ts_custom_error_1.CustomError {
|
|
7
|
-
constructor(input) {
|
|
6
|
+
constructor(input, serviceNames) {
|
|
8
7
|
super();
|
|
9
|
-
this.message = `${input} is an unknown service. Try ${
|
|
8
|
+
this.message = `${input} is an unknown service. Try ${serviceNames}`;
|
|
10
9
|
}
|
|
11
10
|
}
|
|
12
11
|
exports.UnknownServiceName = UnknownServiceName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnknownServiceName.js","sourceRoot":"","sources":["../../../../src/Program/errors/UnknownServiceName.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;
|
|
1
|
+
{"version":3,"file":"UnknownServiceName.js","sourceRoot":"","sources":["../../../../src/Program/errors/UnknownServiceName.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;AAE9C,MAAa,kBAAiC,SAAQ,6BAAW;IAC/D,YAAmB,KAAa,EAAE,YAA0B;QAC1D,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,GAAG,KAAK,+BAA+B,YAAY,EAAE,CAAC;IACvE,CAAC;CACF;AALD,gDAKC"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
export * from './defaults';
|
|
2
1
|
export * from './errors';
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './loadTxWorker';
|
|
5
|
-
export * from './Options';
|
|
6
|
-
export * from './programs';
|
|
7
|
-
export * from './ServiceNames';
|
|
2
|
+
export * from './programs/';
|
|
8
3
|
export * from './utils';
|
|
9
4
|
export * from './services';
|
|
10
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Program/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Program/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
|
|
@@ -14,13 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./defaults"), exports);
|
|
18
17
|
__exportStar(require("./errors"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./loadTxWorker"), exports);
|
|
21
|
-
__exportStar(require("./Options"), exports);
|
|
22
|
-
__exportStar(require("./programs"), exports);
|
|
23
|
-
__exportStar(require("./ServiceNames"), exports);
|
|
18
|
+
__exportStar(require("./programs/"), exports);
|
|
24
19
|
__exportStar(require("./utils"), exports);
|
|
25
20
|
__exportStar(require("./services"), exports);
|
|
26
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Program/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Program/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,6CAA2B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import { LogLevel } from 'bunyan';
|
|
4
|
+
import { BuildInfo as ServiceBuildInfo } from '../../Http';
|
|
5
|
+
import { URL } from 'url';
|
|
6
|
+
export declare const ENABLE_METRICS_DEFAULT = false;
|
|
7
|
+
export declare enum CommonOptionDescriptions {
|
|
8
|
+
ApiUrl = "API URL",
|
|
9
|
+
BuildInfo = "Service build info",
|
|
10
|
+
LoggerMinSeverity = "Log level",
|
|
11
|
+
EnableMetrics = "Enable Prometheus Metrics",
|
|
12
|
+
ServiceDiscoveryBackoffFactor = "Exponential backoff factor for service discovery",
|
|
13
|
+
ServiceDiscoveryTimeout = "Timeout for service discovery attempts"
|
|
14
|
+
}
|
|
15
|
+
export interface CommonProgramOptions {
|
|
16
|
+
apiUrl: URL;
|
|
17
|
+
buildInfo?: ServiceBuildInfo;
|
|
18
|
+
enableMetrics?: boolean;
|
|
19
|
+
loggerMinSeverity?: LogLevel;
|
|
20
|
+
serviceDiscoveryBackoffFactor?: number;
|
|
21
|
+
serviceDiscoveryTimeout?: number;
|
|
22
|
+
}
|
|
23
|
+
export declare const withCommonOptions: (command: Command, defaults: {
|
|
24
|
+
apiUrl: URL;
|
|
25
|
+
}) => Command;
|
|
26
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/Program/options/common.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAOlC,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAI1B,eAAO,MAAM,sBAAsB,QAAQ,CAAC;AAE5C,oBAAY,wBAAwB;IAClC,MAAM,YAAY;IAClB,SAAS,uBAAuB;IAChC,iBAAiB,cAAc;IAC/B,aAAa,8BAA8B;IAC3C,6BAA6B,qDAAqD;IAClF,uBAAuB,2CAA2C;CACnE;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,GAAG,CAAC;IACZ,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,QAAQ,CAAC;IAC7B,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,eAAO,MAAM,iBAAiB,YAAa,OAAO,YAAY;IAAE,MAAM,EAAE,GAAG,CAAA;CAAE,YAiDxE,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withCommonOptions = exports.CommonOptionDescriptions = exports.ENABLE_METRICS_DEFAULT = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const errors_1 = require("../../errors");
|
|
6
|
+
const programs_1 = require("../programs");
|
|
7
|
+
const utils_1 = require("../utils");
|
|
8
|
+
const url_1 = require("url");
|
|
9
|
+
const validators_1 = require("../../util/validators");
|
|
10
|
+
const util_1 = require("@cardano-sdk/util");
|
|
11
|
+
exports.ENABLE_METRICS_DEFAULT = false;
|
|
12
|
+
var CommonOptionDescriptions;
|
|
13
|
+
(function (CommonOptionDescriptions) {
|
|
14
|
+
CommonOptionDescriptions["ApiUrl"] = "API URL";
|
|
15
|
+
CommonOptionDescriptions["BuildInfo"] = "Service build info";
|
|
16
|
+
CommonOptionDescriptions["LoggerMinSeverity"] = "Log level";
|
|
17
|
+
CommonOptionDescriptions["EnableMetrics"] = "Enable Prometheus Metrics";
|
|
18
|
+
CommonOptionDescriptions["ServiceDiscoveryBackoffFactor"] = "Exponential backoff factor for service discovery";
|
|
19
|
+
CommonOptionDescriptions["ServiceDiscoveryTimeout"] = "Timeout for service discovery attempts";
|
|
20
|
+
})(CommonOptionDescriptions = exports.CommonOptionDescriptions || (exports.CommonOptionDescriptions = {}));
|
|
21
|
+
const withCommonOptions = (command, defaults) => command
|
|
22
|
+
.addOption(new commander_1.Option('--api-url <apiUrl>', CommonOptionDescriptions.ApiUrl)
|
|
23
|
+
.env('API_URL')
|
|
24
|
+
.default(defaults.apiUrl)
|
|
25
|
+
.argParser((url) => new url_1.URL(url)))
|
|
26
|
+
.addOption(new commander_1.Option('--build-info <buildInfo>', CommonOptionDescriptions.BuildInfo)
|
|
27
|
+
.env('BUILD_INFO')
|
|
28
|
+
.argParser(validators_1.buildInfoValidator))
|
|
29
|
+
.addOption(new commander_1.Option('--enable-metrics <true/false>', CommonOptionDescriptions.EnableMetrics)
|
|
30
|
+
.env('ENABLE_METRICS')
|
|
31
|
+
.default(exports.ENABLE_METRICS_DEFAULT)
|
|
32
|
+
.argParser((enableMetrics) => (0, utils_1.stringOptionToBoolean)(enableMetrics, programs_1.Programs.HttpServer, CommonOptionDescriptions.EnableMetrics)))
|
|
33
|
+
.addOption(new commander_1.Option('--logger-min-severity <level>', CommonOptionDescriptions.LoggerMinSeverity)
|
|
34
|
+
.env('LOGGER_MIN_SEVERITY')
|
|
35
|
+
.default('info')
|
|
36
|
+
.argParser((level) => {
|
|
37
|
+
if (!util_1.loggerMethodNames.includes(level)) {
|
|
38
|
+
throw new errors_1.InvalidLoggerLevel(level);
|
|
39
|
+
}
|
|
40
|
+
return level;
|
|
41
|
+
}))
|
|
42
|
+
.addOption(new commander_1.Option('--service-discovery-backoff-factor <serviceDiscoveryBackoffFactor>', CommonOptionDescriptions.ServiceDiscoveryBackoffFactor)
|
|
43
|
+
.env('SERVICE_DISCOVERY_BACKOFF_FACTOR')
|
|
44
|
+
.default(utils_1.SERVICE_DISCOVERY_BACKOFF_FACTOR_DEFAULT)
|
|
45
|
+
.argParser((factor) => Number.parseFloat(factor)))
|
|
46
|
+
.addOption(new commander_1.Option('--service-discovery-timeout <serviceDiscoveryTimeout>', CommonOptionDescriptions.ServiceDiscoveryTimeout)
|
|
47
|
+
.env('SERVICE_DISCOVERY_TIMEOUT')
|
|
48
|
+
.default(utils_1.SERVICE_DISCOVERY_TIMEOUT_DEFAULT)
|
|
49
|
+
.argParser((interval) => Number.parseInt(interval, 10)));
|
|
50
|
+
exports.withCommonOptions = withCommonOptions;
|
|
51
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/Program/options/common.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAC5C,yCAAkD;AAElD,0CAAuC;AACvC,oCAIkB;AAElB,6BAA0B;AAC1B,sDAA2D;AAC3D,4CAAsD;AAEzC,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAE5C,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAClC,8CAAkB,CAAA;IAClB,4DAAgC,CAAA;IAChC,2DAA+B,CAAA;IAC/B,uEAA2C,CAAA;IAC3C,8GAAkF,CAAA;IAClF,8FAAkE,CAAA;AACpE,CAAC,EAPW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAOnC;AAWM,MAAM,iBAAiB,GAAG,CAAC,OAAgB,EAAE,QAAyB,EAAE,EAAE,CAC/E,OAAO;KACJ,SAAS,CACR,IAAI,kBAAM,CAAC,oBAAoB,EAAE,wBAAwB,CAAC,MAAM,CAAC;KAC9D,GAAG,CAAC,SAAS,CAAC;KACd,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;KACxB,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,SAAG,CAAC,GAAG,CAAC,CAAC,CACpC;KACA,SAAS,CACR,IAAI,kBAAM,CAAC,0BAA0B,EAAE,wBAAwB,CAAC,SAAS,CAAC;KACvE,GAAG,CAAC,YAAY,CAAC;KACjB,SAAS,CAAC,+BAAkB,CAAC,CACjC;KACA,SAAS,CACR,IAAI,kBAAM,CAAC,+BAA+B,EAAE,wBAAwB,CAAC,aAAa,CAAC;KAChF,GAAG,CAAC,gBAAgB,CAAC;KACrB,OAAO,CAAC,8BAAsB,CAAC;KAC/B,SAAS,CAAC,CAAC,aAAa,EAAE,EAAE,CAC3B,IAAA,6BAAqB,EAAC,aAAa,EAAE,mBAAQ,CAAC,UAAU,EAAE,wBAAwB,CAAC,aAAa,CAAC,CAClG,CACJ;KACA,SAAS,CACR,IAAI,kBAAM,CAAC,+BAA+B,EAAE,wBAAwB,CAAC,iBAAiB,CAAC;KACpF,GAAG,CAAC,qBAAqB,CAAC;KAC1B,OAAO,CAAC,MAAM,CAAC;KACf,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;IACnB,IAAI,CAAC,wBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QACtC,MAAM,IAAI,2BAAkB,CAAC,KAAK,CAAC,CAAC;KACrC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC,CACL;KACA,SAAS,CACR,IAAI,kBAAM,CACR,oEAAoE,EACpE,wBAAwB,CAAC,6BAA6B,CACvD;KACE,GAAG,CAAC,kCAAkC,CAAC;KACvC,OAAO,CAAC,gDAAwC,CAAC;KACjD,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CACpD;KACA,SAAS,CACR,IAAI,kBAAM,CACR,uDAAuD,EACvD,wBAAwB,CAAC,uBAAuB,CACjD;KACE,GAAG,CAAC,2BAA2B,CAAC;KAChC,OAAO,CAAC,yCAAiC,CAAC;KAC1C,SAAS,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAC1D,CAAC;AAjDO,QAAA,iBAAiB,qBAiDxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Program/options/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./common"), exports);
|
|
18
|
+
__exportStar(require("./ogmios"), exports);
|
|
19
|
+
__exportStar(require("./postgres"), exports);
|
|
20
|
+
__exportStar(require("./rabbitMq"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Program/options/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B;AAC3B,6CAA2B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import { URL } from 'url';
|
|
4
|
+
export declare enum OgmiosOptionDescriptions {
|
|
5
|
+
SrvServiceName = "Ogmios SRV service name",
|
|
6
|
+
Url = "Ogmios URL"
|
|
7
|
+
}
|
|
8
|
+
export interface OgmiosProgramOptions {
|
|
9
|
+
ogmiosUrl?: URL;
|
|
10
|
+
ogmiosSrvServiceName?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const withOgmiosOptions: (command: Command) => Command;
|
|
13
|
+
//# sourceMappingURL=ogmios.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ogmios.d.ts","sourceRoot":"","sources":["../../../../src/Program/options/ogmios.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAO1B,oBAAY,wBAAwB;IAClC,cAAc,4BAA4B;IAC1C,GAAG,eAAe;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,iBAAiB,YAAa,OAAO,YAa7C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withOgmiosOptions = exports.OgmiosOptionDescriptions = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const ogmios_1 = require("@cardano-sdk/ogmios");
|
|
6
|
+
const url_1 = require("url");
|
|
7
|
+
const OGMIOS_URL_DEFAULT = (() => {
|
|
8
|
+
const connection = ogmios_1.Ogmios.createConnectionObject();
|
|
9
|
+
return connection.address.webSocket;
|
|
10
|
+
})();
|
|
11
|
+
var OgmiosOptionDescriptions;
|
|
12
|
+
(function (OgmiosOptionDescriptions) {
|
|
13
|
+
OgmiosOptionDescriptions["SrvServiceName"] = "Ogmios SRV service name";
|
|
14
|
+
OgmiosOptionDescriptions["Url"] = "Ogmios URL";
|
|
15
|
+
})(OgmiosOptionDescriptions = exports.OgmiosOptionDescriptions || (exports.OgmiosOptionDescriptions = {}));
|
|
16
|
+
const withOgmiosOptions = (command) => command
|
|
17
|
+
.addOption(new commander_1.Option('--ogmios-srv-service-name <ogmiosSrvServiceName>', OgmiosOptionDescriptions.SrvServiceName).env('OGMIOS_SRV_SERVICE_NAME'))
|
|
18
|
+
.addOption(new commander_1.Option('--ogmios-url <ogmiosUrl>', OgmiosOptionDescriptions.Url)
|
|
19
|
+
.env('OGMIOS_URL')
|
|
20
|
+
.default(new url_1.URL(OGMIOS_URL_DEFAULT))
|
|
21
|
+
.conflicts('ogmiosSrvServiceName')
|
|
22
|
+
.argParser((url) => new url_1.URL(url)));
|
|
23
|
+
exports.withOgmiosOptions = withOgmiosOptions;
|
|
24
|
+
//# sourceMappingURL=ogmios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ogmios.js","sourceRoot":"","sources":["../../../../src/Program/options/ogmios.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAC5C,gDAA6C;AAC7C,6BAA0B;AAE1B,MAAM,kBAAkB,GAAG,CAAC,GAAG,EAAE;IAC/B,MAAM,UAAU,GAAG,eAAM,CAAC,sBAAsB,EAAE,CAAC;IACnD,OAAO,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC;AACtC,CAAC,CAAC,EAAE,CAAC;AAEL,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,sEAA0C,CAAA;IAC1C,8CAAkB,CAAA;AACpB,CAAC,EAHW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAGnC;AAOM,MAAM,iBAAiB,GAAG,CAAC,OAAgB,EAAE,EAAE,CACpD,OAAO;KACJ,SAAS,CACR,IAAI,kBAAM,CAAC,kDAAkD,EAAE,wBAAwB,CAAC,cAAc,CAAC,CAAC,GAAG,CACzG,yBAAyB,CAC1B,CACF;KACA,SAAS,CACR,IAAI,kBAAM,CAAC,0BAA0B,EAAE,wBAAwB,CAAC,GAAG,CAAC;KACjE,GAAG,CAAC,YAAY,CAAC;KACjB,OAAO,CAAC,IAAI,SAAG,CAAC,kBAAkB,CAAC,CAAC;KACpC,SAAS,CAAC,sBAAsB,CAAC;KACjC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,SAAG,CAAC,GAAG,CAAC,CAAC,CACpC,CAAC;AAbO,QAAA,iBAAiB,qBAaxB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
export declare enum PostgresOptionDescriptions {
|
|
3
|
+
ConnectionString = "PostgreSQL Connection string",
|
|
4
|
+
SrvServiceName = "PostgreSQL SRV service name when using service discovery",
|
|
5
|
+
Db = "PostgreSQL database name",
|
|
6
|
+
DbFile = "PostgreSQL database name file path",
|
|
7
|
+
User = "PostgreSQL user",
|
|
8
|
+
UserFile = "PostgreSQL user file path",
|
|
9
|
+
Password = "PostgreSQL password",
|
|
10
|
+
PasswordFile = "PostgreSQL password file path",
|
|
11
|
+
SslCaFile = "PostgreSQL SSL CA file path",
|
|
12
|
+
Host = "PostgreSQL host",
|
|
13
|
+
Port = "PostgreSQL port",
|
|
14
|
+
ServiceDiscoveryArgs = "Postgres SRV service name, db, user and password"
|
|
15
|
+
}
|
|
16
|
+
export interface PosgresProgramOptions {
|
|
17
|
+
postgresConnectionString?: string;
|
|
18
|
+
postgresSrvServiceName?: string;
|
|
19
|
+
postgresDb?: string;
|
|
20
|
+
postgresDbFile?: string;
|
|
21
|
+
postgresUser?: string;
|
|
22
|
+
postgresUserFile?: string;
|
|
23
|
+
postgresPassword?: string;
|
|
24
|
+
postgresPasswordFile?: string;
|
|
25
|
+
postgresHost?: string;
|
|
26
|
+
postgresPort?: string;
|
|
27
|
+
postgresSslCaFile?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const withPostgresOptions: (command: Command) => Command;
|
|
30
|
+
//# sourceMappingURL=postgres.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../../../src/Program/options/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAG5C,oBAAY,0BAA0B;IACpC,gBAAgB,iCAAiC;IACjD,cAAc,6DAA6D;IAC3E,EAAE,6BAA6B;IAC/B,MAAM,uCAAuC;IAC7C,IAAI,oBAAoB;IACxB,QAAQ,8BAA8B;IACtC,QAAQ,wBAAwB;IAChC,YAAY,kCAAkC;IAC9C,SAAS,gCAAgC;IACzC,IAAI,oBAAoB;IACxB,IAAI,oBAAoB;IACxB,oBAAoB,qDAAqD;CAC1E;AAED,MAAM,WAAW,qBAAqB;IACpC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,mBAAmB,YAAa,OAAO,YAyD/C,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withPostgresOptions = exports.PostgresOptionDescriptions = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const validators_1 = require("../../util/validators");
|
|
6
|
+
var PostgresOptionDescriptions;
|
|
7
|
+
(function (PostgresOptionDescriptions) {
|
|
8
|
+
PostgresOptionDescriptions["ConnectionString"] = "PostgreSQL Connection string";
|
|
9
|
+
PostgresOptionDescriptions["SrvServiceName"] = "PostgreSQL SRV service name when using service discovery";
|
|
10
|
+
PostgresOptionDescriptions["Db"] = "PostgreSQL database name";
|
|
11
|
+
PostgresOptionDescriptions["DbFile"] = "PostgreSQL database name file path";
|
|
12
|
+
PostgresOptionDescriptions["User"] = "PostgreSQL user";
|
|
13
|
+
PostgresOptionDescriptions["UserFile"] = "PostgreSQL user file path";
|
|
14
|
+
PostgresOptionDescriptions["Password"] = "PostgreSQL password";
|
|
15
|
+
PostgresOptionDescriptions["PasswordFile"] = "PostgreSQL password file path";
|
|
16
|
+
PostgresOptionDescriptions["SslCaFile"] = "PostgreSQL SSL CA file path";
|
|
17
|
+
PostgresOptionDescriptions["Host"] = "PostgreSQL host";
|
|
18
|
+
PostgresOptionDescriptions["Port"] = "PostgreSQL port";
|
|
19
|
+
PostgresOptionDescriptions["ServiceDiscoveryArgs"] = "Postgres SRV service name, db, user and password";
|
|
20
|
+
})(PostgresOptionDescriptions = exports.PostgresOptionDescriptions || (exports.PostgresOptionDescriptions = {}));
|
|
21
|
+
const withPostgresOptions = (command) => command
|
|
22
|
+
.addOption(new commander_1.Option('--postgres-connection-string <postgresConnectionString>', PostgresOptionDescriptions.ConnectionString)
|
|
23
|
+
.env('POSTGRES_CONNECTION_STRING')
|
|
24
|
+
.conflicts('postgresSrvServiceName')
|
|
25
|
+
.conflicts('postgresDb')
|
|
26
|
+
.conflicts('postgresDbFile')
|
|
27
|
+
.conflicts('postgresUser')
|
|
28
|
+
.conflicts('postgresUserFile')
|
|
29
|
+
.conflicts('postgresPassword')
|
|
30
|
+
.conflicts('postgresPasswordFile')
|
|
31
|
+
.conflicts('postgresHost')
|
|
32
|
+
.conflicts('postgresPort'))
|
|
33
|
+
.addOption(new commander_1.Option('--postgres-srv-service-name <postgresSrvServiceName>', PostgresOptionDescriptions.SrvServiceName)
|
|
34
|
+
.env('POSTGRES_SRV_SERVICE_NAME')
|
|
35
|
+
.conflicts('postgresHost')
|
|
36
|
+
.conflicts('postgresPort'))
|
|
37
|
+
.addOption(new commander_1.Option('--postgres-db <postgresDb>', PostgresOptionDescriptions.Db)
|
|
38
|
+
.env('POSTGRES_DB')
|
|
39
|
+
.conflicts('postgresDbFile'))
|
|
40
|
+
.addOption(new commander_1.Option('--postgres-db-file <postgresDbFile>', PostgresOptionDescriptions.DbFile)
|
|
41
|
+
.env('POSTGRES_DB_FILE')
|
|
42
|
+
.argParser(validators_1.existingFileValidator))
|
|
43
|
+
.addOption(new commander_1.Option('--postgres-user <postgresUser>', PostgresOptionDescriptions.User)
|
|
44
|
+
.env('POSTGRES_USER')
|
|
45
|
+
.conflicts('postgresUserFile'))
|
|
46
|
+
.addOption(new commander_1.Option('--postgres-user-file <postgresUserFile>', PostgresOptionDescriptions.UserFile)
|
|
47
|
+
.env('POSTGRES_USER_FILE')
|
|
48
|
+
.argParser(validators_1.existingFileValidator))
|
|
49
|
+
.addOption(new commander_1.Option('--postgres-password <postgresPassword>', PostgresOptionDescriptions.Password)
|
|
50
|
+
.env('POSTGRES_PASSWORD')
|
|
51
|
+
.conflicts('postgresPasswordFile'))
|
|
52
|
+
.addOption(new commander_1.Option('--postgres-password-file <postgresPasswordFile>', PostgresOptionDescriptions.PasswordFile)
|
|
53
|
+
.env('POSTGRES_PASSWORD_FILE')
|
|
54
|
+
.argParser(validators_1.existingFileValidator))
|
|
55
|
+
.addOption(new commander_1.Option('--postgres-host <postgresHost>', PostgresOptionDescriptions.Host).env('POSTGRES_HOST'))
|
|
56
|
+
.addOption(new commander_1.Option('--postgres-port <postgresPort>', PostgresOptionDescriptions.Port).env('POSTGRES_PORT'))
|
|
57
|
+
.addOption(new commander_1.Option('--postgres-ssl-ca-file <postgresSslCaFile>', PostgresOptionDescriptions.SslCaFile).env('POSTGRES_SSL_CA_FILE'));
|
|
58
|
+
exports.withPostgresOptions = withPostgresOptions;
|
|
59
|
+
//# sourceMappingURL=postgres.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres.js","sourceRoot":"","sources":["../../../../src/Program/options/postgres.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAC5C,sDAA8D;AAE9D,IAAY,0BAaX;AAbD,WAAY,0BAA0B;IACpC,+EAAiD,CAAA;IACjD,yGAA2E,CAAA;IAC3E,6DAA+B,CAAA;IAC/B,2EAA6C,CAAA;IAC7C,sDAAwB,CAAA;IACxB,oEAAsC,CAAA;IACtC,8DAAgC,CAAA;IAChC,4EAA8C,CAAA;IAC9C,uEAAyC,CAAA;IACzC,sDAAwB,CAAA;IACxB,sDAAwB,CAAA;IACxB,uGAAyE,CAAA;AAC3E,CAAC,EAbW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAarC;AAgBM,MAAM,mBAAmB,GAAG,CAAC,OAAgB,EAAE,EAAE,CACtD,OAAO;KACJ,SAAS,CACR,IAAI,kBAAM,CAAC,yDAAyD,EAAE,0BAA0B,CAAC,gBAAgB,CAAC;KAC/G,GAAG,CAAC,4BAA4B,CAAC;KACjC,SAAS,CAAC,wBAAwB,CAAC;KACnC,SAAS,CAAC,YAAY,CAAC;KACvB,SAAS,CAAC,gBAAgB,CAAC;KAC3B,SAAS,CAAC,cAAc,CAAC;KACzB,SAAS,CAAC,kBAAkB,CAAC;KAC7B,SAAS,CAAC,kBAAkB,CAAC;KAC7B,SAAS,CAAC,sBAAsB,CAAC;KACjC,SAAS,CAAC,cAAc,CAAC;KACzB,SAAS,CAAC,cAAc,CAAC,CAC7B;KACA,SAAS,CACR,IAAI,kBAAM,CAAC,sDAAsD,EAAE,0BAA0B,CAAC,cAAc,CAAC;KAC1G,GAAG,CAAC,2BAA2B,CAAC;KAChC,SAAS,CAAC,cAAc,CAAC;KACzB,SAAS,CAAC,cAAc,CAAC,CAC7B;KACA,SAAS,CACR,IAAI,kBAAM,CAAC,4BAA4B,EAAE,0BAA0B,CAAC,EAAE,CAAC;KACpE,GAAG,CAAC,aAAa,CAAC;KAClB,SAAS,CAAC,gBAAgB,CAAC,CAC/B;KACA,SAAS,CACR,IAAI,kBAAM,CAAC,qCAAqC,EAAE,0BAA0B,CAAC,MAAM,CAAC;KACjF,GAAG,CAAC,kBAAkB,CAAC;KACvB,SAAS,CAAC,kCAAqB,CAAC,CACpC;KACA,SAAS,CACR,IAAI,kBAAM,CAAC,gCAAgC,EAAE,0BAA0B,CAAC,IAAI,CAAC;KAC1E,GAAG,CAAC,eAAe,CAAC;KACpB,SAAS,CAAC,kBAAkB,CAAC,CACjC;KACA,SAAS,CACR,IAAI,kBAAM,CAAC,yCAAyC,EAAE,0BAA0B,CAAC,QAAQ,CAAC;KACvF,GAAG,CAAC,oBAAoB,CAAC;KACzB,SAAS,CAAC,kCAAqB,CAAC,CACpC;KACA,SAAS,CACR,IAAI,kBAAM,CAAC,wCAAwC,EAAE,0BAA0B,CAAC,QAAQ,CAAC;KACtF,GAAG,CAAC,mBAAmB,CAAC;KACxB,SAAS,CAAC,sBAAsB,CAAC,CACrC;KACA,SAAS,CACR,IAAI,kBAAM,CAAC,iDAAiD,EAAE,0BAA0B,CAAC,YAAY,CAAC;KACnG,GAAG,CAAC,wBAAwB,CAAC;KAC7B,SAAS,CAAC,kCAAqB,CAAC,CACpC;KACA,SAAS,CAAC,IAAI,kBAAM,CAAC,gCAAgC,EAAE,0BAA0B,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;KAC7G,SAAS,CAAC,IAAI,kBAAM,CAAC,gCAAgC,EAAE,0BAA0B,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;KAC7G,SAAS,CACR,IAAI,kBAAM,CAAC,4CAA4C,EAAE,0BAA0B,CAAC,SAAS,CAAC,CAAC,GAAG,CAChG,sBAAsB,CACvB,CACF,CAAC;AAzDO,QAAA,mBAAmB,uBAyD1B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import { URL } from 'url';
|
|
4
|
+
export declare enum RabbitMqOptionDescriptions {
|
|
5
|
+
SrvServiceName = "RabbitMQ SRV service name",
|
|
6
|
+
Url = "RabbitMQ URL"
|
|
7
|
+
}
|
|
8
|
+
export interface RabbitMqProgramOptions {
|
|
9
|
+
rabbitmqUrl?: URL;
|
|
10
|
+
rabbitmqSrvServiceName?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const withRabbitMqOptions: (command: Command) => Command;
|
|
13
|
+
//# sourceMappingURL=rabbitMq.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rabbitMq.d.ts","sourceRoot":"","sources":["../../../../src/Program/options/rabbitMq.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAI1B,oBAAY,0BAA0B;IACpC,cAAc,8BAA8B;IAC5C,GAAG,iBAAiB;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,eAAO,MAAM,mBAAmB,YAAa,OAAO,YAa/C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withRabbitMqOptions = exports.RabbitMqOptionDescriptions = void 0;
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const url_1 = require("url");
|
|
6
|
+
const RABBITMQ_URL_DEFAULT = 'amqp://localhost:5672';
|
|
7
|
+
var RabbitMqOptionDescriptions;
|
|
8
|
+
(function (RabbitMqOptionDescriptions) {
|
|
9
|
+
RabbitMqOptionDescriptions["SrvServiceName"] = "RabbitMQ SRV service name";
|
|
10
|
+
RabbitMqOptionDescriptions["Url"] = "RabbitMQ URL";
|
|
11
|
+
})(RabbitMqOptionDescriptions = exports.RabbitMqOptionDescriptions || (exports.RabbitMqOptionDescriptions = {}));
|
|
12
|
+
const withRabbitMqOptions = (command) => command
|
|
13
|
+
.addOption(new commander_1.Option('--rabbitmq-srv-service-name <rabbitmqSrvServiceName>', RabbitMqOptionDescriptions.SrvServiceName).env('RABBITMQ_SRV_SERVICE_NAME'))
|
|
14
|
+
.addOption(new commander_1.Option('--rabbitmq-url <rabbitmqUrl>', RabbitMqOptionDescriptions.Url)
|
|
15
|
+
.env('RABBITMQ_URL')
|
|
16
|
+
.default(new url_1.URL(RABBITMQ_URL_DEFAULT))
|
|
17
|
+
.conflicts('rabbitmqSrvServiceName')
|
|
18
|
+
.argParser((url) => new url_1.URL(url)));
|
|
19
|
+
exports.withRabbitMqOptions = withRabbitMqOptions;
|
|
20
|
+
//# sourceMappingURL=rabbitMq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rabbitMq.js","sourceRoot":"","sources":["../../../../src/Program/options/rabbitMq.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAC5C,6BAA0B;AAE1B,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAErD,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IACpC,0EAA4C,CAAA;IAC5C,kDAAoB,CAAA;AACtB,CAAC,EAHW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAGrC;AAOM,MAAM,mBAAmB,GAAG,CAAC,OAAgB,EAAE,EAAE,CACtD,OAAO;KACJ,SAAS,CACR,IAAI,kBAAM,CAAC,sDAAsD,EAAE,0BAA0B,CAAC,cAAc,CAAC,CAAC,GAAG,CAC/G,2BAA2B,CAC5B,CACF;KACA,SAAS,CACR,IAAI,kBAAM,CAAC,8BAA8B,EAAE,0BAA0B,CAAC,GAAG,CAAC;KACvE,GAAG,CAAC,cAAc,CAAC;KACnB,OAAO,CAAC,IAAI,SAAG,CAAC,oBAAoB,CAAC,CAAC;KACtC,SAAS,CAAC,wBAAwB,CAAC;KACnC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,SAAG,CAAC,GAAG,CAAC,CAAC,CACpC,CAAC;AAbO,QAAA,mBAAmB,uBAa1B"}
|