| @ -0,0 +1,23 @@ | |||||
| import * as riot from 'riot'; | |||||
| import TinyConsent from './src/TinyConsent.riot'; | |||||
| riot.register('tiny-consent', TinyConsent); | |||||
| const consent = { | |||||
| cookies: [{ | |||||
| id: 'wordpress', | |||||
| name: 'wordpress_*', | |||||
| content: 'Wordpress und WooCommerce nutzen Session, diese werden zum einen für den Login genutzt, aber auch für den Warenkorb.', | |||||
| essential: true | |||||
| },{ | |||||
| name: 'matamo', | |||||
| content: 'test', | |||||
| handleAgree: function() { | |||||
| console.log('agree'); | |||||
| }, | |||||
| handleReject: function() { | |||||
| console.log('reject'); | |||||
| } | |||||
| }] | |||||
| }; | |||||
| riot.mount('tiny-consent', consent); | |||||
| @ -0,0 +1,23 @@ | |||||
| <!DOCTYPE html> | |||||
| <html> | |||||
| <head lang="en"> | |||||
| <meta charset="utf-8"> | |||||
| <title>Tiny Consent | Demo</title> | |||||
| <link rel="shortcut icon" href="#" /> | |||||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
| <link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" type="text/css" rel="stylesheet" /> | |||||
| <link href="https://cdn.jsdelivr.net/npm/reflex-grid@2.0.4/css/reflex.min.css" type="text/css" rel="stylesheet" /> | |||||
| <link href="css/demo.css" type="text/css" rel="stylesheet" /> | |||||
| </head> | |||||
| <body> | |||||
| <tiny-consent></tiny-consent> | |||||
| <footer> | |||||
| <a target="_blank" href="https://github.com/HerrHase/tiny-consent"> | |||||
| <i class="icon icon-github"></i> | |||||
| </a> | |||||
| </footer> | |||||
| <script src="js/demo.js"></script> | |||||
| </body> | |||||
| </html> | |||||
| @ -0,0 +1,3 @@ | |||||
| { | |||||
| "/dist/js/demo.js": "/dist/js/demo.js" | |||||
| } | |||||
| @ -0,0 +1 @@ | |||||
| ../acorn/bin/acorn | |||||
| @ -0,0 +1 @@ | |||||
| ../ansi-html/bin/ansi-html | |||||
| @ -0,0 +1 @@ | |||||
| ../atob/bin/atob.js | |||||
| @ -0,0 +1 @@ | |||||
| ../autoprefixer/bin/autoprefixer | |||||
| @ -0,0 +1 @@ | |||||
| ../browserslist/cli.js | |||||
| @ -0,0 +1 @@ | |||||
| ../cross-env/dist/bin/cross-env.js | |||||
| @ -0,0 +1 @@ | |||||
| ../cross-env/dist/bin/cross-env-shell.js | |||||
| @ -0,0 +1 @@ | |||||
| ../cssesc/bin/cssesc | |||||
| @ -0,0 +1 @@ | |||||
| ../errno/cli.js | |||||
| @ -0,0 +1 @@ | |||||
| ../esprima/bin/esparse.js | |||||
| @ -0,0 +1 @@ | |||||
| ../esprima/bin/esvalidate.js | |||||
| @ -0,0 +1 @@ | |||||
| ../he/bin/he | |||||
| @ -0,0 +1 @@ | |||||
| ../html-minifier/cli.js | |||||
| @ -0,0 +1 @@ | |||||
| ../import-local/fixtures/cli.js | |||||
| @ -0,0 +1 @@ | |||||
| ../js-yaml/bin/js-yaml.js | |||||
| @ -0,0 +1 @@ | |||||
| ../jsesc/bin/jsesc | |||||
| @ -0,0 +1 @@ | |||||
| ../json5/lib/cli.js | |||||
| @ -0,0 +1 @@ | |||||
| ../loose-envify/cli.js | |||||
| @ -0,0 +1 @@ | |||||
| ../miller-rabin/bin/miller-rabin | |||||
| @ -0,0 +1 @@ | |||||
| ../mime/cli.js | |||||
| @ -0,0 +1 @@ | |||||
| ../mkdirp/bin/cmd.js | |||||
| @ -0,0 +1 @@ | |||||
| ../multicast-dns/cli.js | |||||
| @ -0,0 +1 @@ | |||||
| ../@babel/parser/bin/babel-parser.js | |||||
| @ -0,0 +1 @@ | |||||
| ../prettier/bin-prettier.js | |||||
| @ -0,0 +1 @@ | |||||
| ../regjsparser/bin/parser | |||||
| @ -0,0 +1 @@ | |||||
| ../rimraf/bin.js | |||||
| @ -0,0 +1 @@ | |||||
| ../sass/sass.js | |||||
| @ -0,0 +1 @@ | |||||
| ../semver/bin/semver | |||||
| @ -0,0 +1 @@ | |||||
| ../sha.js/bin.js | |||||
| @ -0,0 +1 @@ | |||||
| ../svgo/bin/svgo | |||||
| @ -0,0 +1 @@ | |||||
| ../terser/bin/uglifyjs | |||||
| @ -0,0 +1 @@ | |||||
| ../uglify-js/bin/uglifyjs | |||||
| @ -0,0 +1 @@ | |||||
| ../uuid/bin/uuid | |||||
| @ -0,0 +1 @@ | |||||
| ../webpack/bin/webpack.js | |||||
| @ -0,0 +1 @@ | |||||
| ../webpack-cli/bin/cli.js | |||||
| @ -0,0 +1 @@ | |||||
| ../webpack-dev-server/bin/webpack-dev-server.js | |||||
| @ -0,0 +1 @@ | |||||
| ../which/bin/which | |||||
| @ -0,0 +1,2 @@ | |||||
| 280c71ac69fac0abf5640b8862a04c4cad8e729f {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"da0b4d61c6394ce766e844f9ec36f0d5\"}","integrity":"sha512-yyNHQYsHRWG8Z+5eaQ9qn7ONhkga6EzE497O7T1uE6FN9O4cQADQyBABudomZHa1mlBeDLxuwPYQaPbyMlN2Zw==","time":1578664478094,"size":54091} | |||||
| @ -0,0 +1,2 @@ | |||||
| a16c53de3b6e4877e1a3a3470759af44e82dcebe {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"6f6d9ca9f9fb8bcf0a9df4f8500bcefc\"}","integrity":"sha512-OAPkj6q/Yx9LxFcuHQbr9Z3kopASQUrAkeTKHAUe3YkGC5leZVdsqX72TfkvazYh7sdTOdhs+7lgBgKiSXzzEQ==","time":1578664318163,"size":53795} | |||||
| @ -0,0 +1,2 @@ | |||||
| 05c993d5b97af7eeefa10a08c7bbb5e2e275ee9d {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"dc0d163932c3d68c23d530ff63103ba1\"}","integrity":"sha512-l5rxHlridyYCKAHFZo6wBDUjRXV96YoyXYTt1inqIsvNw242KBNpdS7uguAmZmR+Wlzx62YEjhXf3TQ9usKaBg==","time":1578668489277,"size":61753} | |||||
| @ -0,0 +1,2 @@ | |||||
| 36ce042627813dfad6ca70b56a851323d3ce48aa {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"34a25921a05b0a610921cefeb12bb832\"}","integrity":"sha512-4FGWQm/avJ2hsrXE12/YuVhdopAEH9VJW1AvjQRq2SbiYONwLfWrtB33ZXNfIkLpZM6z/EX8Hw8IblxHzhyuew==","time":1578663980862,"size":53732} | |||||
| @ -0,0 +1,2 @@ | |||||
| c66d73e63d00b90f037d9faade8cce5e8d445918 {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"f0a48a086a54d30e70bab80df301011a\"}","integrity":"sha512-ektfjyAQMqN3s8mM2X8aoyWQ+a0L/LQ5uwlIY9TRLmKS1LHIvoBd9iEU8lL3bnQjNvEvr/6ArM6wZZweC9dAvQ==","time":1578666581489,"size":58951} | |||||
| @ -0,0 +1,2 @@ | |||||
| 49bc17f7b48ea257880d13891f534022512cffda {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"c01d57e2829797e71506cdebecaf7993\"}","integrity":"sha512-EjCxj0/bR/4cDWtWGB57Jp/3rJUt+BbmbN1CNox1vxWa2KB7ZEHBgp5gsnhmfqdEHDloyvr9LQkMOUGh6/3RHQ==","time":1578664442545,"size":54083} | |||||
| @ -0,0 +1,2 @@ | |||||
| 1ccaa6d5e535e1d8742f59a7034be98311cdeda3 {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"8f9f03c395c2183799236ecef195db52\"}","integrity":"sha512-30RqKj7Wn8+e3qZjukwHr0/mx2eAcHQiONhEuWf65nCAdCbfgowLtP2O6hyFt7oro/0ofDIvsKl143da41glJw==","time":1578669253449,"size":62142} | |||||
| @ -0,0 +1,2 @@ | |||||
| 51ccb19c9787a3d462532046cbdf8aec520d57b4 {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"4ef8f2851966692a861c3ebc06d9fd19\"}","integrity":"sha512-2pCIXKRq/nxuxW8hgP5yyONxw1VyDtE5RJltklm7gLoneEo0WAS7CshT6JEOv7KGWb/J9fMiMuH3MZpiw3yE8g==","time":1578663962252,"size":52675} | |||||
| @ -0,0 +1,2 @@ | |||||
| d35198850d78dff6e82cc5b5a1e1d6dcf6bbbf9e {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"be176bec3cee98dd4feee4bae073dc75\"}","integrity":"sha512-DMXE/R77XqQUhVnxhysgFk4w+0muSlB4rCk7OOkFX2GT9x86UQtzVd5uUqbtvgiWU8DPHbkv46e0u+jMQu0xXg==","time":1578666601282,"size":59044} | |||||
| @ -0,0 +1,2 @@ | |||||
| 579fd59082aaf54f91605a3cf995fcfed622c7b3 {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"27833e4ca3cde3f15110ad1361a32fcc\"}","integrity":"sha512-032H8NGM8HMQzXI5DORgOy0xwiMhxhs8sCVohv1gfWor087lHYLky6CpMgIl1DWFreHpSBOlpLn6kZFsAB6n0A==","time":1578666029044,"size":54231} | |||||
| @ -0,0 +1,2 @@ | |||||
| c253b7ed6e7d61740f333d95ad72b00e068bb14f {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"0a7c72186708f0fc5f9e55c47eb9c549\"}","integrity":"sha512-iQWFlF1RMLmzghjgbgJEgcxHOL54Q4+sLuHruS1yc3JjxYPjGKTCe7pari8cHawoCszsOP+0yQJInjlRefLUfw==","time":1578668594186,"size":61852} | |||||
| @ -0,0 +1,2 @@ | |||||
| 7f63b7aa1cb683ed9d25814c5f70ae88593c86e0 {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"95030c1d654b5a52508ece5269eac823\"}","integrity":"sha512-t9lu0+Tj2QIP+/ykKaJLmfLAzGnd0Gn+pTbQe27jiPleF3dKy/wJsSjD6b72bkDgU4Kh626AfU7MyodPywbzhw==","time":1578664422337,"size":54071} | |||||
| @ -0,0 +1,2 @@ | |||||
| 9d73f6661f04439d7f1945da1ac8117e4d6f1eec {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"70acdcf9d5da6d9d1da800c071ca997a\"}","integrity":"sha512-PlHnfynxmOqqCKOgt5MbXCRSf8EoUv3KH4G6l3vMHakrCTh7cQRsryPq6j4wZlD8qV+gWIjx9Bd43d7vKu+YmA==","time":1578669227609,"size":62115} | |||||
| @ -0,0 +1,2 @@ | |||||
| 0d1543eda8dc5f37d0c766348850bb668eeba85e {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"71230ce24baf47e612eaa5460f5854e4\"}","integrity":"sha512-CMfcxEX4ddhPI8xOEIXbbKnsk9NxWSudYV7HLWnjzjrld0ryrmqgqUUcNRoDV3tHb8T8ysXFD/FbXU5DlD0i6w==","time":1578667606990,"size":61720} | |||||
| @ -0,0 +1,2 @@ | |||||
| 45190e37f983291166c5e7ffd7022ba5da9504ae {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"5c87b4f6d16e4548339ada7d5bb63ea4\"}","integrity":"sha512-OzWyObzmFJ9NG7J5m7jAXXFyR03vgmmiijz40wSvCc8buGOghI8YUM27W4B1Gh2KNL+/71n3dX0HYaC87uxxhQ==","time":1578667639204,"size":61710} | |||||
| @ -0,0 +1,2 @@ | |||||
| d9ff2701f0b61bd862be034374eb591256f257ed {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"e057e9ef7eac8e050bf8a0bfc9b82264\"}","integrity":"sha512-A6lknE23oOrlaqZatG0l+lcgR5MA44A+j86qqtwk+XEGSY2ZuGqaQ6Ug3FdTRllaBj/n/papJ5HriQq1ip69xw==","time":1578666065423,"size":58266} | |||||
| @ -0,0 +1,2 @@ | |||||
| a55ca953010205d4e1505f821e1eb2a3ba35bbca {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"67a060710249db15cc2d5dc15f393d25\"}","integrity":"sha512-necWSbSDGA5mKzLpqz/f3bkpYaVUiU8Y98ZZZjGHIOH6hnuRfsOysScQOsCeHFn8ohy0TMtctvUZU4Vh3Dx94Q==","time":1578664364921,"size":54032} | |||||
| @ -0,0 +1,2 @@ | |||||
| 7b01b57c91a37064026d5e48b15c2901d27b3671 {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"29a9d2e39cad732550e7437cd51b0325\"}","integrity":"sha512-5mVHFZOaoxCXI+8h8xHKxmxQZgCMqGvk0pR1V8LZyWHKXrh0xkV+uImoSZMQ+l4g1d/1FYmZFgeXhI4QuPczYw==","time":1578664325951,"size":54019} | |||||
| @ -0,0 +1,2 @@ | |||||
| c776243eef26f27905bbd9a461d18b8f43bd36a5 {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"2500b3494acd12ce20d613d8ed178884\"}","integrity":"sha512-CVQcxNMsx2EmJvDmQ6xrEehDxK7skCcDSF1HAIPXMRmspPT8W8n3ugKVd0onkQJootFSwHWVWj0fEgOydao9og==","time":1578669184267,"size":62139} | |||||
| @ -0,0 +1,2 @@ | |||||
| 6b9aae398db1c136aaa19dba6344bdbaebcd444a {"key":"{\"terser\":\"4.6.2\",\"node_version\":\"v12.14.0\",\"terser-webpack-plugin\":\"1.4.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":false,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"output\":{\"comments\":false},\"compress\":{\"warnings\":false}}},\"hash\":\"f36ed7809872a1b92e9a3f4618c3dfe9\"}","integrity":"sha512-8S6UamvdQlhrtIIfzb0NxWIz5MTb2Hu+H+G+ySXAUPFQRKLs6LhJKYc3a4ZvxzP98VkrVFurCtDVK3lMhoYU4Q==","time":1578663913431,"size":54711} | |||||
| @ -0,0 +1,22 @@ | |||||
| MIT License | |||||
| Copyright (c) 2014-present Sebastian McKenzie and other contributors | |||||
| Permission is hereby granted, free of charge, to any person obtaining | |||||
| a copy of this software and associated documentation files (the | |||||
| "Software"), to deal in the Software without restriction, including | |||||
| without limitation the rights to use, copy, modify, merge, publish, | |||||
| distribute, sublicense, and/or sell copies of the Software, and to | |||||
| permit persons to whom the Software is furnished to do so, subject to | |||||
| the following conditions: | |||||
| The above copyright notice and this permission notice shall be | |||||
| included in all copies or substantial portions of the Software. | |||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |||||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |||||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |||||
| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |||||
| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |||||
| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |||||
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||||
| @ -0,0 +1,19 @@ | |||||
| # @babel/code-frame | |||||
| > Generate errors that contain a code frame that point to source locations. | |||||
| See our website [@babel/code-frame](https://babeljs.io/docs/en/next/babel-code-frame.html) for more information. | |||||
| ## Install | |||||
| Using npm: | |||||
| ```sh | |||||
| npm install --save-dev @babel/code-frame | |||||
| ``` | |||||
| or using yarn: | |||||
| ```sh | |||||
| yarn add @babel/code-frame --dev | |||||
| ``` | |||||
| @ -0,0 +1,173 @@ | |||||
| "use strict"; | |||||
| Object.defineProperty(exports, "__esModule", { | |||||
| value: true | |||||
| }); | |||||
| exports.codeFrameColumns = codeFrameColumns; | |||||
| exports.default = _default; | |||||
| function _highlight() { | |||||
| const data = _interopRequireWildcard(require("@babel/highlight")); | |||||
| _highlight = function () { | |||||
| return data; | |||||
| }; | |||||
| return data; | |||||
| } | |||||
| function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } | |||||
| let deprecationWarningShown = false; | |||||
| function getDefs(chalk) { | |||||
| return { | |||||
| gutter: chalk.grey, | |||||
| marker: chalk.red.bold, | |||||
| message: chalk.red.bold | |||||
| }; | |||||
| } | |||||
| const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; | |||||
| function getMarkerLines(loc, source, opts) { | |||||
| const startLoc = Object.assign({ | |||||
| column: 0, | |||||
| line: -1 | |||||
| }, loc.start); | |||||
| const endLoc = Object.assign({}, startLoc, loc.end); | |||||
| const { | |||||
| linesAbove = 2, | |||||
| linesBelow = 3 | |||||
| } = opts || {}; | |||||
| const startLine = startLoc.line; | |||||
| const startColumn = startLoc.column; | |||||
| const endLine = endLoc.line; | |||||
| const endColumn = endLoc.column; | |||||
| let start = Math.max(startLine - (linesAbove + 1), 0); | |||||
| let end = Math.min(source.length, endLine + linesBelow); | |||||
| if (startLine === -1) { | |||||
| start = 0; | |||||
| } | |||||
| if (endLine === -1) { | |||||
| end = source.length; | |||||
| } | |||||
| const lineDiff = endLine - startLine; | |||||
| const markerLines = {}; | |||||
| if (lineDiff) { | |||||
| for (let i = 0; i <= lineDiff; i++) { | |||||
| const lineNumber = i + startLine; | |||||
| if (!startColumn) { | |||||
| markerLines[lineNumber] = true; | |||||
| } else if (i === 0) { | |||||
| const sourceLength = source[lineNumber - 1].length; | |||||
| markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; | |||||
| } else if (i === lineDiff) { | |||||
| markerLines[lineNumber] = [0, endColumn]; | |||||
| } else { | |||||
| const sourceLength = source[lineNumber - i].length; | |||||
| markerLines[lineNumber] = [0, sourceLength]; | |||||
| } | |||||
| } | |||||
| } else { | |||||
| if (startColumn === endColumn) { | |||||
| if (startColumn) { | |||||
| markerLines[startLine] = [startColumn, 0]; | |||||
| } else { | |||||
| markerLines[startLine] = true; | |||||
| } | |||||
| } else { | |||||
| markerLines[startLine] = [startColumn, endColumn - startColumn]; | |||||
| } | |||||
| } | |||||
| return { | |||||
| start, | |||||
| end, | |||||
| markerLines | |||||
| }; | |||||
| } | |||||
| function codeFrameColumns(rawLines, loc, opts = {}) { | |||||
| const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight().shouldHighlight)(opts); | |||||
| const chalk = (0, _highlight().getChalk)(opts); | |||||
| const defs = getDefs(chalk); | |||||
| const maybeHighlight = (chalkFn, string) => { | |||||
| return highlighted ? chalkFn(string) : string; | |||||
| }; | |||||
| const lines = rawLines.split(NEWLINE); | |||||
| const { | |||||
| start, | |||||
| end, | |||||
| markerLines | |||||
| } = getMarkerLines(loc, lines, opts); | |||||
| const hasColumns = loc.start && typeof loc.start.column === "number"; | |||||
| const numberMaxWidth = String(end).length; | |||||
| const highlightedLines = highlighted ? (0, _highlight().default)(rawLines, opts) : rawLines; | |||||
| let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => { | |||||
| const number = start + 1 + index; | |||||
| const paddedNumber = ` ${number}`.slice(-numberMaxWidth); | |||||
| const gutter = ` ${paddedNumber} | `; | |||||
| const hasMarker = markerLines[number]; | |||||
| const lastMarkerLine = !markerLines[number + 1]; | |||||
| if (hasMarker) { | |||||
| let markerLine = ""; | |||||
| if (Array.isArray(hasMarker)) { | |||||
| const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); | |||||
| const numberOfMarkers = hasMarker[1] || 1; | |||||
| markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); | |||||
| if (lastMarkerLine && opts.message) { | |||||
| markerLine += " " + maybeHighlight(defs.message, opts.message); | |||||
| } | |||||
| } | |||||
| return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); | |||||
| } else { | |||||
| return ` ${maybeHighlight(defs.gutter, gutter)}${line}`; | |||||
| } | |||||
| }).join("\n"); | |||||
| if (opts.message && !hasColumns) { | |||||
| frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`; | |||||
| } | |||||
| if (highlighted) { | |||||
| return chalk.reset(frame); | |||||
| } else { | |||||
| return frame; | |||||
| } | |||||
| } | |||||
| function _default(rawLines, lineNumber, colNumber, opts = {}) { | |||||
| if (!deprecationWarningShown) { | |||||
| deprecationWarningShown = true; | |||||
| const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; | |||||
| if (process.emitWarning) { | |||||
| process.emitWarning(message, "DeprecationWarning"); | |||||
| } else { | |||||
| const deprecationError = new Error(message); | |||||
| deprecationError.name = "DeprecationWarning"; | |||||
| console.warn(new Error(message)); | |||||
| } | |||||
| } | |||||
| colNumber = Math.max(colNumber, 0); | |||||
| const location = { | |||||
| start: { | |||||
| column: colNumber, | |||||
| line: lineNumber | |||||
| } | |||||
| }; | |||||
| return codeFrameColumns(rawLines, location, opts); | |||||
| } | |||||
| @ -0,0 +1,101 @@ | |||||
| { | |||||
| "_args": [ | |||||
| [ | |||||
| "@babel/code-frame@^7.5.5", | |||||
| "/home/herrhase/Workspace/tentakelfabrik/tiny-components/tiny-consent/node_modules/@babel/core" | |||||
| ] | |||||
| ], | |||||
| "_from": "@babel/code-frame@>=7.5.5 <8.0.0", | |||||
| "_hasShrinkwrap": false, | |||||
| "_id": "@babel/code-frame@7.5.5", | |||||
| "_inCache": true, | |||||
| "_installable": true, | |||||
| "_location": "/@babel/code-frame", | |||||
| "_nodeVersion": "11.14.0", | |||||
| "_npmOperationalInternal": { | |||||
| "host": "s3://npm-registry-packages", | |||||
| "tmp": "tmp/code-frame_7.5.5_1563398486466_0.4030239254922583" | |||||
| }, | |||||
| "_npmUser": { | |||||
| "email": "nicolo.ribaudo@gmail.com", | |||||
| "name": "nicolo-ribaudo" | |||||
| }, | |||||
| "_npmVersion": "lerna/3.15.0/node@v11.14.0+x64 (linux)", | |||||
| "_phantomChildren": {}, | |||||
| "_requested": { | |||||
| "name": "@babel/code-frame", | |||||
| "raw": "@babel/code-frame@^7.5.5", | |||||
| "rawSpec": "^7.5.5", | |||||
| "scope": "@babel", | |||||
| "spec": ">=7.5.5 <8.0.0", | |||||
| "type": "range" | |||||
| }, | |||||
| "_requiredBy": [ | |||||
| "/@babel/core", | |||||
| "/@babel/template", | |||||
| "/@babel/traverse" | |||||
| ], | |||||
| "_resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", | |||||
| "_shasum": "bc0782f6d69f7b7d49531219699b988f669a8f9d", | |||||
| "_shrinkwrap": null, | |||||
| "_spec": "@babel/code-frame@^7.5.5", | |||||
| "_where": "/home/herrhase/Workspace/tentakelfabrik/tiny-components/tiny-consent/node_modules/@babel/core", | |||||
| "author": { | |||||
| "email": "sebmck@gmail.com", | |||||
| "name": "Sebastian McKenzie" | |||||
| }, | |||||
| "dependencies": { | |||||
| "@babel/highlight": "^7.0.0" | |||||
| }, | |||||
| "description": "Generate errors that contain a code frame that point to source locations.", | |||||
| "devDependencies": { | |||||
| "chalk": "^2.0.0", | |||||
| "strip-ansi": "^4.0.0" | |||||
| }, | |||||
| "directories": {}, | |||||
| "dist": { | |||||
| "fileCount": 4, | |||||
| "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", | |||||
| "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdL5FXCRA9TVsSAnZWagAAF7wP/RXhso8+0gUvcJZhZ6vt\nSrXimIBf82u7nbBEU6DhWqhVDcSGUext1Jy+U2g1eVEiCbJTb2VGcPNa5gKm\nagXXrbRJiTCZaUEQaIURGHA7+Z78UkJ2G0EA2WqSlO7ttX4pMpNYNKDZsrNz\n47kROLsb40fLtpeolfEJe82XxfmCvDej1Y4xVQ+vKaadDZ4JRnGLry4pPDkS\nWTW1StiOksrggTDiZo90LwbA5jOWm+FBgT7vohSDUhlf7aOaIirQ3EljOOYM\nr7RT7HDkVhpKAEtigJYwYZnOl4eJjWjTiFQ12w90itRC5xR6rFSpxVkQhowu\nZmu9Z2vWJiDv9gPpsrUtfMMnv96C/pWKlj+tZDXGqr44QPP+VPA+iuq1BR1V\n4DLN9jKrAEJkig6R1xqtWxyN6tkUARrk/0jZA2Ep26oy+DDa0ybTfWt5wMcq\nU6wGq8qJZe0buZbiGQokRufxkybMCgrg7F7dR79Hmq7PFpqbJyneGJ+26qna\nZI2G/aYNDudT2eJNcUTkAjUsBz+howa4C01tFsukNfM9DKH6DPfrYLe4VKnn\n30qBEvM1/8Gj9b4LaP+f6rLP1rSogivq+IH8ALQpzOfg41PHxczqik8veMl4\nB8MeIfrErTluUSJxMiTaPj34fvfaOyGgmSoHrGTURIYF7+Yw6lGpkWrKaHsN\n4o/B\r\n=BBzr\r\n-----END PGP SIGNATURE-----\r\n", | |||||
| "shasum": "bc0782f6d69f7b7d49531219699b988f669a8f9d", | |||||
| "tarball": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", | |||||
| "unpackedSize": 7312 | |||||
| }, | |||||
| "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", | |||||
| "homepage": "https://babeljs.io/", | |||||
| "license": "MIT", | |||||
| "main": "lib/index.js", | |||||
| "maintainers": [ | |||||
| { | |||||
| "name": "danez", | |||||
| "email": "daniel@tschinder.de" | |||||
| }, | |||||
| { | |||||
| "name": "existentialism", | |||||
| "email": "bng412@gmail.com" | |||||
| }, | |||||
| { | |||||
| "name": "hzoo", | |||||
| "email": "hi@henryzoo.com" | |||||
| }, | |||||
| { | |||||
| "name": "loganfsmyth", | |||||
| "email": "loganfsmyth@gmail.com" | |||||
| }, | |||||
| { | |||||
| "name": "nicolo-ribaudo", | |||||
| "email": "nicolo.ribaudo@gmail.com" | |||||
| } | |||||
| ], | |||||
| "name": "@babel/code-frame", | |||||
| "optionalDependencies": {}, | |||||
| "publishConfig": { | |||||
| "access": "public" | |||||
| }, | |||||
| "readme": "ERROR: No README data found!", | |||||
| "repository": { | |||||
| "type": "git", | |||||
| "url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame" | |||||
| }, | |||||
| "version": "7.5.5" | |||||
| } | |||||
| @ -0,0 +1,22 @@ | |||||
| MIT License | |||||
| Copyright (c) 2014-present Sebastian McKenzie and other contributors | |||||
| Permission is hereby granted, free of charge, to any person obtaining | |||||
| a copy of this software and associated documentation files (the | |||||
| "Software"), to deal in the Software without restriction, including | |||||
| without limitation the rights to use, copy, modify, merge, publish, | |||||
| distribute, sublicense, and/or sell copies of the Software, and to | |||||
| permit persons to whom the Software is furnished to do so, subject to | |||||
| the following conditions: | |||||
| The above copyright notice and this permission notice shall be | |||||
| included in all copies or substantial portions of the Software. | |||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |||||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |||||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |||||
| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |||||
| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |||||
| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |||||
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||||
| @ -0,0 +1,19 @@ | |||||
| # @babel/core | |||||
| > Babel compiler core. | |||||
| See our website [@babel/core](https://babeljs.io/docs/en/next/babel-core.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen) associated with this package. | |||||
| ## Install | |||||
| Using npm: | |||||
| ```sh | |||||
| npm install --save-dev @babel/core | |||||
| ``` | |||||
| or using yarn: | |||||
| ```sh | |||||
| yarn add @babel/core --dev | |||||
| ``` | |||||
| @ -0,0 +1,198 @@ | |||||
| "use strict"; | |||||
| Object.defineProperty(exports, "__esModule", { | |||||
| value: true | |||||
| }); | |||||
| exports.makeStrongCache = makeStrongCache; | |||||
| exports.makeWeakCache = makeWeakCache; | |||||
| exports.assertSimpleType = assertSimpleType; | |||||
| function makeStrongCache(handler) { | |||||
| return makeCachedFunction(new Map(), handler); | |||||
| } | |||||
| function makeWeakCache(handler) { | |||||
| return makeCachedFunction(new WeakMap(), handler); | |||||
| } | |||||
| function makeCachedFunction(callCache, handler) { | |||||
| return function cachedFunction(arg, data) { | |||||
| let cachedValue = callCache.get(arg); | |||||
| if (cachedValue) { | |||||
| for (const { | |||||
| value, | |||||
| valid | |||||
| } of cachedValue) { | |||||
| if (valid(data)) return value; | |||||
| } | |||||
| } | |||||
| const cache = new CacheConfigurator(data); | |||||
| const value = handler(arg, cache); | |||||
| if (!cache.configured()) cache.forever(); | |||||
| cache.deactivate(); | |||||
| switch (cache.mode()) { | |||||
| case "forever": | |||||
| cachedValue = [{ | |||||
| value, | |||||
| valid: () => true | |||||
| }]; | |||||
| callCache.set(arg, cachedValue); | |||||
| break; | |||||
| case "invalidate": | |||||
| cachedValue = [{ | |||||
| value, | |||||
| valid: cache.validator() | |||||
| }]; | |||||
| callCache.set(arg, cachedValue); | |||||
| break; | |||||
| case "valid": | |||||
| if (cachedValue) { | |||||
| cachedValue.push({ | |||||
| value, | |||||
| valid: cache.validator() | |||||
| }); | |||||
| } else { | |||||
| cachedValue = [{ | |||||
| value, | |||||
| valid: cache.validator() | |||||
| }]; | |||||
| callCache.set(arg, cachedValue); | |||||
| } | |||||
| } | |||||
| return value; | |||||
| }; | |||||
| } | |||||
| class CacheConfigurator { | |||||
| constructor(data) { | |||||
| this._active = true; | |||||
| this._never = false; | |||||
| this._forever = false; | |||||
| this._invalidate = false; | |||||
| this._configured = false; | |||||
| this._pairs = []; | |||||
| this._data = data; | |||||
| } | |||||
| simple() { | |||||
| return makeSimpleConfigurator(this); | |||||
| } | |||||
| mode() { | |||||
| if (this._never) return "never"; | |||||
| if (this._forever) return "forever"; | |||||
| if (this._invalidate) return "invalidate"; | |||||
| return "valid"; | |||||
| } | |||||
| forever() { | |||||
| if (!this._active) { | |||||
| throw new Error("Cannot change caching after evaluation has completed."); | |||||
| } | |||||
| if (this._never) { | |||||
| throw new Error("Caching has already been configured with .never()"); | |||||
| } | |||||
| this._forever = true; | |||||
| this._configured = true; | |||||
| } | |||||
| never() { | |||||
| if (!this._active) { | |||||
| throw new Error("Cannot change caching after evaluation has completed."); | |||||
| } | |||||
| if (this._forever) { | |||||
| throw new Error("Caching has already been configured with .forever()"); | |||||
| } | |||||
| this._never = true; | |||||
| this._configured = true; | |||||
| } | |||||
| using(handler) { | |||||
| if (!this._active) { | |||||
| throw new Error("Cannot change caching after evaluation has completed."); | |||||
| } | |||||
| if (this._never || this._forever) { | |||||
| throw new Error("Caching has already been configured with .never or .forever()"); | |||||
| } | |||||
| this._configured = true; | |||||
| const key = handler(this._data); | |||||
| this._pairs.push([key, handler]); | |||||
| return key; | |||||
| } | |||||
| invalidate(handler) { | |||||
| if (!this._active) { | |||||
| throw new Error("Cannot change caching after evaluation has completed."); | |||||
| } | |||||
| if (this._never || this._forever) { | |||||
| throw new Error("Caching has already been configured with .never or .forever()"); | |||||
| } | |||||
| this._invalidate = true; | |||||
| this._configured = true; | |||||
| const key = handler(this._data); | |||||
| this._pairs.push([key, handler]); | |||||
| return key; | |||||
| } | |||||
| validator() { | |||||
| const pairs = this._pairs; | |||||
| return data => pairs.every(([key, fn]) => key === fn(data)); | |||||
| } | |||||
| deactivate() { | |||||
| this._active = false; | |||||
| } | |||||
| configured() { | |||||
| return this._configured; | |||||
| } | |||||
| } | |||||
| function makeSimpleConfigurator(cache) { | |||||
| function cacheFn(val) { | |||||
| if (typeof val === "boolean") { | |||||
| if (val) cache.forever();else cache.never(); | |||||
| return; | |||||
| } | |||||
| return cache.using(() => assertSimpleType(val())); | |||||
| } | |||||
| cacheFn.forever = () => cache.forever(); | |||||
| cacheFn.never = () => cache.never(); | |||||
| cacheFn.using = cb => cache.using(() => assertSimpleType(cb())); | |||||
| cacheFn.invalidate = cb => cache.invalidate(() => assertSimpleType(cb())); | |||||
| return cacheFn; | |||||
| } | |||||
| function assertSimpleType(value) { | |||||
| if (value != null && typeof value !== "string" && typeof value !== "boolean" && typeof value !== "number") { | |||||
| throw new Error("Cache keys must be either string, boolean, number, null, or undefined."); | |||||
| } | |||||
| return value; | |||||
| } | |||||