( x: RemotelySavePluginSettings | null | undefined )
| 47 | * this should accept the result of original config |
| 48 | */ |
| 49 | export const normalConfigToMessy = ( |
| 50 | x: RemotelySavePluginSettings | null | undefined |
| 51 | ) => { |
| 52 | if (x === null || x === undefined) { |
| 53 | console.debug("the normal config is null or undefined, skip"); |
| 54 | return x; |
| 55 | } |
| 56 | const y = { |
| 57 | readme: DEFAULT_README, |
| 58 | d: reverseString( |
| 59 | base64url.stringify(Buffer.from(JSON.stringify(x), "utf-8"), { |
| 60 | pad: false, |
| 61 | }) |
| 62 | ), |
| 63 | }; |
| 64 | // console.debug("encoding, encoded config is:"); |
| 65 | // console.debug(y); |
| 66 | return y; |
| 67 | }; |
no test coverage detected