working rss feed to nostr publish
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resolveChecksumRuntimeConfig = exports.getChecksumConfiguration = exports.AlgorithmId = void 0;
|
||||
const types_1 = require("@smithy/types");
|
||||
Object.defineProperty(exports, "AlgorithmId", { enumerable: true, get: function () { return types_1.AlgorithmId; } });
|
||||
const getChecksumConfiguration = (runtimeConfig) => {
|
||||
const checksumAlgorithms = [];
|
||||
for (const id in types_1.AlgorithmId) {
|
||||
const algorithmId = types_1.AlgorithmId[id];
|
||||
if (runtimeConfig[algorithmId] === undefined) {
|
||||
continue;
|
||||
}
|
||||
checksumAlgorithms.push({
|
||||
algorithmId: () => algorithmId,
|
||||
checksumConstructor: () => runtimeConfig[algorithmId],
|
||||
});
|
||||
}
|
||||
return {
|
||||
_checksumAlgorithms: checksumAlgorithms,
|
||||
addChecksumAlgorithm(algo) {
|
||||
this._checksumAlgorithms.push(algo);
|
||||
},
|
||||
checksumAlgorithms() {
|
||||
return this._checksumAlgorithms;
|
||||
},
|
||||
};
|
||||
};
|
||||
exports.getChecksumConfiguration = getChecksumConfiguration;
|
||||
const resolveChecksumRuntimeConfig = (clientConfig) => {
|
||||
const runtimeConfig = {};
|
||||
clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
|
||||
runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();
|
||||
});
|
||||
return runtimeConfig;
|
||||
};
|
||||
exports.resolveChecksumRuntimeConfig = resolveChecksumRuntimeConfig;
|
||||
Generated
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resolveDefaultRuntimeConfig = exports.getDefaultClientConfiguration = exports.getDefaultExtensionConfiguration = void 0;
|
||||
const checksum_1 = require("./checksum");
|
||||
const retry_1 = require("./retry");
|
||||
const getDefaultExtensionConfiguration = (runtimeConfig) => {
|
||||
return {
|
||||
...(0, checksum_1.getChecksumConfiguration)(runtimeConfig),
|
||||
...(0, retry_1.getRetryConfiguration)(runtimeConfig),
|
||||
};
|
||||
};
|
||||
exports.getDefaultExtensionConfiguration = getDefaultExtensionConfiguration;
|
||||
exports.getDefaultClientConfiguration = exports.getDefaultExtensionConfiguration;
|
||||
const resolveDefaultRuntimeConfig = (config) => {
|
||||
return {
|
||||
...(0, checksum_1.resolveChecksumRuntimeConfig)(config),
|
||||
...(0, retry_1.resolveRetryRuntimeConfig)(config),
|
||||
};
|
||||
};
|
||||
exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./defaultExtensionConfiguration"), exports);
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resolveRetryRuntimeConfig = exports.getRetryConfiguration = void 0;
|
||||
const getRetryConfiguration = (runtimeConfig) => {
|
||||
let _retryStrategy = runtimeConfig.retryStrategy;
|
||||
return {
|
||||
setRetryStrategy(retryStrategy) {
|
||||
_retryStrategy = retryStrategy;
|
||||
},
|
||||
retryStrategy() {
|
||||
return _retryStrategy;
|
||||
},
|
||||
};
|
||||
};
|
||||
exports.getRetryConfiguration = getRetryConfiguration;
|
||||
const resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {
|
||||
const runtimeConfig = {};
|
||||
runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();
|
||||
return runtimeConfig;
|
||||
};
|
||||
exports.resolveRetryRuntimeConfig = resolveRetryRuntimeConfig;
|
||||
Reference in New Issue
Block a user