UNPKG

n8n

Version:

n8n Workflow Automation Tool

27 lines 973 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.floorToSettings = floorToSettings; exports.settingsToFloor = settingsToFloor; const n8n_workflow_1 = require("n8n-workflow"); const utils_1 = require("../utils"); function floorToSettings(floor) { switch (floor) { case 'off': return { enforced: false, manual: false, production: false }; case 'production': return { enforced: true, manual: false, production: true }; case 'all': return { enforced: true, manual: true, production: true }; default: (0, utils_1.assertNever)(floor); throw new n8n_workflow_1.UnexpectedError(`Unknown redaction floor: ${String(floor)}`); } } function settingsToFloor(settings) { if (!settings.enforced) return 'off'; if (settings.manual) return 'all'; return 'production'; } //# sourceMappingURL=redaction-enforcement-mapper.js.map