From 8d3ba168884be2702ba63cc837c7b5d74eb4e33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= Date: Sun, 8 May 2022 16:41:07 +0000 Subject: [PATCH] renaming plugin and test files; plugins are now in individual subdirectories (ref. #50) --- .../plugins/{alt-fetch.test.js => alt-fetch/index.test.js} | 0 __tests__/plugins/{any-of.test.js => any-of/index.test.js} | 0 .../{basic-integrity.test.js => basic-integrity/index.test.js} | 0 __tests__/plugins/{cache.test.js => cache/index.test.js} | 0 __tests__/plugins/{fetch.test.js => fetch/index.test.js} | 0 __tests__/plugins/{gun-ipfs.test.js => gun-ipfs/index.test.js} | 0 .../{integrity-check.test.js => integrity-check/index.test.js} | 0 .../plugins/{ipns-ipfs.test.js => ipns-ipfs/index.test.js} | 0 __tests__/plugins/{redirect.test.js => redirect/index.test.js} | 0 .../index.test.js} | 0 plugins/{alt-fetch.js => alt-fetch/index.js} | 0 plugins/{any-of.js => any-of/index.js} | 0 plugins/{basic-integrity.js => basic-integrity/index.js} | 0 plugins/{cache.js => cache/index.js} | 0 plugins/{fetch.js => fetch/index.js} | 0 plugins/{gun-ipfs.js => gun-ipfs/index.js} | 0 plugins/{integrity-check.js => integrity-check/index.js} | 0 plugins/{ipns-ipfs.js => ipns-ipfs/index.js} | 0 plugins/{redirect.js => redirect/index.js} | 0 plugins/{signed-integrity.js => signed-integrity/index.js} | 0 service-worker.js | 2 +- 21 files changed, 1 insertion(+), 1 deletion(-) rename __tests__/plugins/{alt-fetch.test.js => alt-fetch/index.test.js} (100%) rename __tests__/plugins/{any-of.test.js => any-of/index.test.js} (100%) rename __tests__/plugins/{basic-integrity.test.js => basic-integrity/index.test.js} (100%) rename __tests__/plugins/{cache.test.js => cache/index.test.js} (100%) rename __tests__/plugins/{fetch.test.js => fetch/index.test.js} (100%) rename __tests__/plugins/{gun-ipfs.test.js => gun-ipfs/index.test.js} (100%) rename __tests__/plugins/{integrity-check.test.js => integrity-check/index.test.js} (100%) rename __tests__/plugins/{ipns-ipfs.test.js => ipns-ipfs/index.test.js} (100%) rename __tests__/plugins/{redirect.test.js => redirect/index.test.js} (100%) rename __tests__/plugins/{signed-integrity.test.js => signed-integrity/index.test.js} (100%) rename plugins/{alt-fetch.js => alt-fetch/index.js} (100%) rename plugins/{any-of.js => any-of/index.js} (100%) rename plugins/{basic-integrity.js => basic-integrity/index.js} (100%) rename plugins/{cache.js => cache/index.js} (100%) rename plugins/{fetch.js => fetch/index.js} (100%) rename plugins/{gun-ipfs.js => gun-ipfs/index.js} (100%) rename plugins/{integrity-check.js => integrity-check/index.js} (100%) rename plugins/{ipns-ipfs.js => ipns-ipfs/index.js} (100%) rename plugins/{redirect.js => redirect/index.js} (100%) rename plugins/{signed-integrity.js => signed-integrity/index.js} (100%) diff --git a/__tests__/plugins/alt-fetch.test.js b/__tests__/plugins/alt-fetch/index.test.js similarity index 100% rename from __tests__/plugins/alt-fetch.test.js rename to __tests__/plugins/alt-fetch/index.test.js diff --git a/__tests__/plugins/any-of.test.js b/__tests__/plugins/any-of/index.test.js similarity index 100% rename from __tests__/plugins/any-of.test.js rename to __tests__/plugins/any-of/index.test.js diff --git a/__tests__/plugins/basic-integrity.test.js b/__tests__/plugins/basic-integrity/index.test.js similarity index 100% rename from __tests__/plugins/basic-integrity.test.js rename to __tests__/plugins/basic-integrity/index.test.js diff --git a/__tests__/plugins/cache.test.js b/__tests__/plugins/cache/index.test.js similarity index 100% rename from __tests__/plugins/cache.test.js rename to __tests__/plugins/cache/index.test.js diff --git a/__tests__/plugins/fetch.test.js b/__tests__/plugins/fetch/index.test.js similarity index 100% rename from __tests__/plugins/fetch.test.js rename to __tests__/plugins/fetch/index.test.js diff --git a/__tests__/plugins/gun-ipfs.test.js b/__tests__/plugins/gun-ipfs/index.test.js similarity index 100% rename from __tests__/plugins/gun-ipfs.test.js rename to __tests__/plugins/gun-ipfs/index.test.js diff --git a/__tests__/plugins/integrity-check.test.js b/__tests__/plugins/integrity-check/index.test.js similarity index 100% rename from __tests__/plugins/integrity-check.test.js rename to __tests__/plugins/integrity-check/index.test.js diff --git a/__tests__/plugins/ipns-ipfs.test.js b/__tests__/plugins/ipns-ipfs/index.test.js similarity index 100% rename from __tests__/plugins/ipns-ipfs.test.js rename to __tests__/plugins/ipns-ipfs/index.test.js diff --git a/__tests__/plugins/redirect.test.js b/__tests__/plugins/redirect/index.test.js similarity index 100% rename from __tests__/plugins/redirect.test.js rename to __tests__/plugins/redirect/index.test.js diff --git a/__tests__/plugins/signed-integrity.test.js b/__tests__/plugins/signed-integrity/index.test.js similarity index 100% rename from __tests__/plugins/signed-integrity.test.js rename to __tests__/plugins/signed-integrity/index.test.js diff --git a/plugins/alt-fetch.js b/plugins/alt-fetch/index.js similarity index 100% rename from plugins/alt-fetch.js rename to plugins/alt-fetch/index.js diff --git a/plugins/any-of.js b/plugins/any-of/index.js similarity index 100% rename from plugins/any-of.js rename to plugins/any-of/index.js diff --git a/plugins/basic-integrity.js b/plugins/basic-integrity/index.js similarity index 100% rename from plugins/basic-integrity.js rename to plugins/basic-integrity/index.js diff --git a/plugins/cache.js b/plugins/cache/index.js similarity index 100% rename from plugins/cache.js rename to plugins/cache/index.js diff --git a/plugins/fetch.js b/plugins/fetch/index.js similarity index 100% rename from plugins/fetch.js rename to plugins/fetch/index.js diff --git a/plugins/gun-ipfs.js b/plugins/gun-ipfs/index.js similarity index 100% rename from plugins/gun-ipfs.js rename to plugins/gun-ipfs/index.js diff --git a/plugins/integrity-check.js b/plugins/integrity-check/index.js similarity index 100% rename from plugins/integrity-check.js rename to plugins/integrity-check/index.js diff --git a/plugins/ipns-ipfs.js b/plugins/ipns-ipfs/index.js similarity index 100% rename from plugins/ipns-ipfs.js rename to plugins/ipns-ipfs/index.js diff --git a/plugins/redirect.js b/plugins/redirect/index.js similarity index 100% rename from plugins/redirect.js rename to plugins/redirect/index.js diff --git a/plugins/signed-integrity.js b/plugins/signed-integrity/index.js similarity index 100% rename from plugins/signed-integrity.js rename to plugins/signed-integrity/index.js diff --git a/service-worker.js b/service-worker.js index f8dc154..5e93ec4 100644 --- a/service-worker.js +++ b/service-worker.js @@ -251,7 +251,7 @@ let initServiceWorker = async () => { // load the relevant plugin script (if not yet loaded) if (!LibResilientPluginConstructors.has(pluginConfig.name)) { self.log('service-worker', `${pluginConfig.name}: loading plugin's source`) - self.importScripts(`./plugins/${pluginConfig.name}.js`) + self.importScripts(`./plugins/${pluginConfig.name}/index.js`) } // do we have any dependencies we should handle first?