Skip to content

Commit

Permalink
Bump switcher4deno@1.0.7 (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
petruki committed Mar 3, 2024
1 parent 5082277 commit edd7096
Show file tree
Hide file tree
Showing 14 changed files with 73 additions and 110 deletions.
2 changes: 1 addition & 1 deletion .env.test → .env
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LOG_LEVEL=INFO # DEBUG, INFO, ERROR
SWITCHER_URL=https://api.switcherapi.com
SWITCHER_API_KEY=
SWITCHER_ENVIRONMENT=test
SWITCHER_OFFLINE=true
SWITCHER_LOCAL=true
SWITCHER_REGEX_SAFE=false
SWITCHER_SNAPSHOT_LOCATION=./snapshot/
SWITCHER_SNAPSHOT_LOAD=false
Expand Down
16 changes: 0 additions & 16 deletions .env.dev

This file was deleted.

17 changes: 17 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
APP_PORT=4000
APP_RATE_LIMIT=Rate limit
APP_RATE_LIMIT_WINDOW=Time window in milliseconds

LOG_LEVEL=Log level (DEBUG, INFO, ERROR)
# SSL_CERT=TLS certificate file (crt)
# SSL_KEY=TLS key file (key)

# Switcher API
# SWITCHER_URL=Switcher-API URL
# SWITCHER_API_KEY=Switcher-API Key
# SWITCHER_ENVIRONMENT=Switcher Environment
# SWITCHER_LOCAL=Local/Remote Switcher
# SWITCHER_SNAPSHOT_LOAD=Load Switcher Snapshot
# SWITCHER_SNAPSHOT_UPDATE_INTERVAL=Switcher Snapshot Update Interval
# SWITCHER_REGEX_SAFE=Enable/Disable Safe Regex
# SWITCHER_SNAPSHOT_LOCATION=Folder location to store the snapshot
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
coverage
dist
.scannerwork
.env
.env.prod
7 changes: 3 additions & 4 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
"version": "1.0.1",
"description": "Feature Flag Service for Switcher Management",
"tasks": {
"run": "deno run --unstable --allow-net --allow-env --allow-read --allow-write src/index.ts",
"run:dev": "ENV_PATH=.env.dev deno task run",
"run:prod": "ENV_PATH=.env deno task run",
"run": "deno run --allow-net --allow-env --allow-read --allow-write src/index.ts",
"run:prod": "ENV_PATH=.env.prod deno task run",
"cache-reload": "deno cache --reload --lock=deno.lock --lock-write src/index.ts",
"fmt": "deno fmt src/ --options-single-quote --options-line-width=120 --check",
"fmt:fix": "deno fmt test/ src/ --options-single-quote --options-line-width=120",
"test": "ENV_PATH=.env.test deno test --unstable --allow-read --allow-net --allow-env --allow-write --coverage=coverage",
"test": "deno test --allow-read --allow-net --allow-env --allow-write --coverage=coverage",
"lcov": "deno coverage coverage --lcov --output=coverage/report.lcov",
"clean": "rm -rf ./npm ./coverage",
"cover": "deno task clean && deno task test && deno task lcov && genhtml -o coverage/html coverage/report.lcov"
Expand Down
104 changes: 35 additions & 69 deletions deno.lock
Original file line number Diff line number Diff line change
@@ -1,57 +1,6 @@
{
"version": "3",
"remote": {
"https://deno.land/std@0.199.0/_util/os.ts": "d932f56d41e4f6a6093d56044e29ce637f8dcc43c5a90af43504a889cf1775e3",
"https://deno.land/std@0.199.0/assert/assert.ts": "9a97dad6d98c238938e7540736b826440ad8c1c1e54430ca4c4e623e585607ee",
"https://deno.land/std@0.199.0/assert/assertion_error.ts": "4d0bde9b374dfbcbe8ac23f54f567b77024fb67dbb1906a852d67fe050d42f56",
"https://deno.land/std@0.199.0/fs/_util.ts": "fbf57dcdc9f7bc8128d60301eece608246971a7836a3bb1e78da75314f08b978",
"https://deno.land/std@0.199.0/fs/copy.ts": "66edc2baea085afbe98d60b16ae93f4eef84fbf774b6d671e6ff2cfd52d4c860",
"https://deno.land/std@0.199.0/fs/empty_dir.ts": "2e52cd4674d18e2e007175c80449fc3d263786a1361e858d9dfa9360a6581b47",
"https://deno.land/std@0.199.0/fs/ensure_dir.ts": "dc64c4c75c64721d4e3fb681f1382f803ff3d2868f08563ff923fdd20d071c40",
"https://deno.land/std@0.199.0/fs/ensure_file.ts": "39ac83cc283a20ec2735e956adf5de3e8a3334e0b6820547b5772f71c49ae083",
"https://deno.land/std@0.199.0/fs/ensure_link.ts": "c15e69c48556d78aae31b83e0c0ece04b7b8bc0951412f5b759aceb6fde7f0ac",
"https://deno.land/std@0.199.0/fs/ensure_symlink.ts": "ef9137af718292a41480dcbe9d800b5d0f96515b52ce0f87ffe49abeaa75f1a4",
"https://deno.land/std@0.199.0/fs/eol.ts": "f1f2eb348a750c34500741987b21d65607f352cf7205f48f4319d417fff42842",
"https://deno.land/std@0.199.0/fs/exists.ts": "29c26bca8584a22876be7cb8844f1b6c8fc35e9af514576b78f5c6884d7ed02d",
"https://deno.land/std@0.199.0/fs/expand_glob.ts": "164680cd242416fd60fc879ff359f9cd1992e4674f362c67dbe27d32d7e3b83d",
"https://deno.land/std@0.199.0/fs/mod.ts": "bc3d0acd488cc7b42627044caf47d72019846d459279544e1934418955ba4898",
"https://deno.land/std@0.199.0/fs/move.ts": "b4f8f46730b40c32ea3c0bc8eb0fd0e8139249a698883c7b3756424cf19785c9",
"https://deno.land/std@0.199.0/fs/walk.ts": "b93f21694711ac5bed9297a7c5a90ed7669c52c4aab1bf6166dd8fe9655bb158",
"https://deno.land/std@0.199.0/path/_basename.ts": "057d420c9049821f983f784fd87fa73ac471901fb628920b67972b0f44319343",
"https://deno.land/std@0.199.0/path/_constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0",
"https://deno.land/std@0.199.0/path/_dirname.ts": "355e297236b2218600aee7a5301b937204c62e12da9db4b0b044993d9e658395",
"https://deno.land/std@0.199.0/path/_extname.ts": "eaaa5aae1acf1f03254d681bd6a8ce42a9cb5b7ff2213a9d4740e8ab31283664",
"https://deno.land/std@0.199.0/path/_format.ts": "4a99270d6810f082e614309164fad75d6f1a483b68eed97c830a506cc589f8b4",
"https://deno.land/std@0.199.0/path/_from_file_url.ts": "7e4e5626089785adddb061f1b9f4932d6b21c7df778e7449531a11e32048245c",
"https://deno.land/std@0.199.0/path/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b",
"https://deno.land/std@0.199.0/path/_is_absolute.ts": "05dac10b5e93c63198b92e3687baa2be178df5321c527dc555266c0f4f51558c",
"https://deno.land/std@0.199.0/path/_join.ts": "fd78555bc34d5f188918fc7018dfe8fe2df5bbad94a3b30a433666c03934d77f",
"https://deno.land/std@0.199.0/path/_normalize.ts": "a19ec8706b2707f9dd974662a5cd89fad438e62ab1857e08b314a8eb49a34d81",
"https://deno.land/std@0.199.0/path/_parse.ts": "0f9b0ff43682dd9964eb1c4398610c4e165d8db9d3ac9d594220217adf480cfa",
"https://deno.land/std@0.199.0/path/_relative.ts": "27bdeffb5311a47d85be26d37ad1969979359f7636c5cd9fcf05dcd0d5099dc5",
"https://deno.land/std@0.199.0/path/_resolve.ts": "7a3616f1093735ed327e758313b79c3c04ea921808ca5f19ddf240cb68d0adf6",
"https://deno.land/std@0.199.0/path/_to_file_url.ts": "739bfda583598790b2e77ce227f2bb618f6ebdb939788cea47555b43970ec58c",
"https://deno.land/std@0.199.0/path/_to_namespaced_path.ts": "0d5f4caa2ed98ef7a8786286df6af804b50e38859ae897b5b5b4c8c5930a75c8",
"https://deno.land/std@0.199.0/path/_util.ts": "4e191b1bac6b3bf0c31aab42e5ca2e01a86ab5a0d2e08b75acf8585047a86221",
"https://deno.land/std@0.199.0/path/basename.ts": "6f08fbb90dbfcf320765b3abb01f995b1723f75e2534acfd5380e202c802a3aa",
"https://deno.land/std@0.199.0/path/common.ts": "ee7505ab01fd22de3963b64e46cff31f40de34f9f8de1fff6a1bd2fe79380000",
"https://deno.land/std@0.199.0/path/dirname.ts": "098996822a31b4c46e1eb52a19540d3c6f9f54b772fc8a197939eeabc29fca2f",
"https://deno.land/std@0.199.0/path/extname.ts": "9b83c62fd16505739541f7a3ab447d8972da39dbf668d47af2f93206c2480893",
"https://deno.land/std@0.199.0/path/format.ts": "cb22f95cc7853d590b87708cc9441785e760d711188facff3d225305a8213aca",
"https://deno.land/std@0.199.0/path/from_file_url.ts": "a6221cfc928928ec4d9786d767dfac98fa2ab746af0786446c9834a07b98817e",
"https://deno.land/std@0.199.0/path/glob.ts": "d479e0a695621c94d3fd7fe7abd4f9499caf32a8de13f25073451c6ef420a4e1",
"https://deno.land/std@0.199.0/path/is_absolute.ts": "6b3d36352eb7fa29edb53f9e7b09b1aeb022a3c5465764f6cc5b8c41f9736197",
"https://deno.land/std@0.199.0/path/join.ts": "4a2867ff2f3c81ffc9eb3d56dade16db6f8bd3854f269306d23dad4115089c84",
"https://deno.land/std@0.199.0/path/mod.ts": "7765507696cb321994cdacfc19ee3ba61e8e3ebf4bd98fa75a276cf5dc18ce2a",
"https://deno.land/std@0.199.0/path/normalize.ts": "7d992cd262b2deefa842d93a8ba2ed51f3949ba595b1d07f627ac2cddbc74808",
"https://deno.land/std@0.199.0/path/parse.ts": "031fe488b3497fb8312fc1dc3c3d6c2d80707edd9c661e18ee9fd20f95edf322",
"https://deno.land/std@0.199.0/path/posix.ts": "0a1c1952d132323a88736d03e92bd236f3ed5f9f079e5823fae07c8d978ee61b",
"https://deno.land/std@0.199.0/path/relative.ts": "7db80c5035016174267da16321a742d76e875215c317859a383b12f413c6f5d6",
"https://deno.land/std@0.199.0/path/resolve.ts": "103b62207726a27f28177f397008545804ecb20aaf00623af1f622b18cd80b9f",
"https://deno.land/std@0.199.0/path/separator.ts": "0fb679739d0d1d7bf45b68dacfb4ec7563597a902edbaf3c59b50d5bcadd93b1",
"https://deno.land/std@0.199.0/path/to_file_url.ts": "dd32f7a01bbf3b15b5df46796659984b372973d9b2d7d59bcf0eb990763a0cb5",
"https://deno.land/std@0.199.0/path/to_namespaced_path.ts": "4e643ab729bf49ccdc166ad48d2de262ff462938fcf2a44a4425588f4a0bd690",
"https://deno.land/std@0.199.0/path/win32.ts": "8b3f80ef7a462511d5e8020ff490edcaa0a0d118f1b1e9da50e2916bdd73f9dd",
"https://deno.land/std@0.215.0/assert/assert.ts": "bec068b2fccdd434c138a555b19a2c2393b71dfaada02b7d568a01541e67cdc5",
"https://deno.land/std@0.215.0/assert/assertion_error.ts": "9f689a101ee586c4ce92f52fa7ddd362e86434ffdf1f848e45987dc7689976b8",
"https://deno.land/std@0.215.0/encoding/_util.ts": "beacef316c1255da9bc8e95afb1fa56ed69baef919c88dc06ae6cb7a6103d376",
Expand All @@ -73,6 +22,23 @@
"https://deno.land/std@0.218.2/encoding/base64.ts": "b0fe5f1c55571dc9f091abc7d4830482f2f67ab4308c9c1b57071e770b7dcc74",
"https://deno.land/std@0.218.2/encoding/base64url.ts": "9cc46cf510436be63ac00ebf97a7de1993e603ca58e1853b344bf90d80ea9945",
"https://deno.land/std@0.218.2/fmt/colors.ts": "d239d84620b921ea520125d778947881f62c50e78deef2657073840b8af9559a",
"https://deno.land/std@0.218.2/fs/_create_walk_entry.ts": "5d9d2aaec05bcf09a06748b1684224d33eba7a4de24cf4cf5599991ca6b5b412",
"https://deno.land/std@0.218.2/fs/_get_file_info_type.ts": "da7bec18a7661dba360a1db475b826b18977582ce6fc9b25f3d4ee0403fe8cbd",
"https://deno.land/std@0.218.2/fs/_is_same_path.ts": "709c95868345fea051c58b9e96af95cff94e6ae98dfcff2b66dee0c212c4221f",
"https://deno.land/std@0.218.2/fs/_is_subdir.ts": "c68b309d46cc8568ed83c000f608a61bbdba0943b7524e7a30f9e450cf67eecd",
"https://deno.land/std@0.218.2/fs/_to_path_string.ts": "29bfc9c6c112254961d75cbf6ba814d6de5349767818eb93090cecfa9665591e",
"https://deno.land/std@0.218.2/fs/copy.ts": "dc0f68c4b6c3b090bfdb909387e309f6169b746bd713927c9507c9ef545d71f6",
"https://deno.land/std@0.218.2/fs/empty_dir.ts": "4f01e6d56e2aa8d90ad60f20bc25601f516b00f6c3044cdf6863a058791d91aa",
"https://deno.land/std@0.218.2/fs/ensure_dir.ts": "dffff68de0d10799b5aa9e39dec4e327e12bbd29e762292193684542648c4aeb",
"https://deno.land/std@0.218.2/fs/ensure_file.ts": "ac5cfde94786b0284d2c8e9f7f9425269bea1b2140612b4aea1f20b508870f59",
"https://deno.land/std@0.218.2/fs/ensure_link.ts": "d42af2edefeaa9817873ec6e46dc5d209ac4d744f8c69c5ecc2dffade78465b6",
"https://deno.land/std@0.218.2/fs/ensure_symlink.ts": "1f64d7bdd191f7d9b71264e191902fcae5cec86305d54659897944caea70f814",
"https://deno.land/std@0.218.2/fs/eol.ts": "c9807291f78361d49fd986a9be04654610c615c5e2ec63d748976197d30ff206",
"https://deno.land/std@0.218.2/fs/exists.ts": "d2757ef764eaf5c6c5af7228e8447db2de42ab084a2dae540097f905723d83f5",
"https://deno.land/std@0.218.2/fs/expand_glob.ts": "a1ce02b05ed7b96985b0665067c9f1018f3f2ade7ee0fb0d629231050260b158",
"https://deno.land/std@0.218.2/fs/mod.ts": "107f5afa4424c2d3ce2f7e9266173198da30302c69af662c720115fe504dc5ee",
"https://deno.land/std@0.218.2/fs/move.ts": "39e0d7ccb88a566d20b949712020e766b15ef1ec19159573d11f949bd677909c",
"https://deno.land/std@0.218.2/fs/walk.ts": "78e1d01a9f75715614bf8d6e58bd77d9fafb1222c41194e607cd3849d7a0e771",
"https://deno.land/std@0.218.2/http/_negotiation/common.ts": "051a9f6edd1ed69507df89bbc16fc1b13b7654b9b8fd38072ec33ae4c185fc13",
"https://deno.land/std@0.218.2/http/_negotiation/encoding.ts": "fdedea1145c1dea3b3de2d5217e8eb927e764083eebc8c52d09a1ed3d9bb7a93",
"https://deno.land/std@0.218.2/http/_negotiation/language.ts": "300a5c586f844c97f246ab72c948e9fde9a8f45e92ec08e1cc9a9df80259e2a3",
Expand Down Expand Up @@ -205,23 +171,23 @@
"https://deno.land/x/oak_commons@0.6.1/server_sent_event.ts": "ed56b35c7c81e54ce778811c12b7797dbceafc2f841395a382b8d509d50d3d59",
"https://deno.land/x/oak_commons@0.6.1/status.ts": "f13e0e61c2aaf5e254ca528569b03896aee89d96ebc256fa740ea7305a68f53f",
"https://deno.land/x/path_to_regexp@v6.2.1/index.ts": "894060567837bae8fc9c5cbd4d0a05e9024672083d5883b525c031eea940e556",
"https://deno.land/x/switcher4deno@v1.0.6/mod.ts": "c4297abe83774a68f92e0f1bfa752bb2475104b073f103752a933b964c407a20",
"https://deno.land/x/switcher4deno@v1.0.6/src/deps.ts": "18c612e798689f65e192c825845c185b14cae82b02544d396705ef0eecccf54f",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/bypasser/index.ts": "fb0a84827f9adcd94521f91b49fe50e51ce122ddcff9508b418816c0dc516aaa",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/bypasser/key.ts": "2aa2b159a51b7b930ca117efe378eaf94e67a517428d29d48c36b8fe87c33d2b",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/constants.ts": "035ad1b81ee5a350833a7519ab2a550d175862a563c661743f257a85da4a8fef",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/exceptions/index.ts": "d2f75247e61d67bc8dab0041633fcd8313098f0a2111ffc6962cfb80af5d5abd",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/middlewares/check.ts": "dea2e20e0fa876f3f36d118aed13310f58eb31e3a1eb85574ae8d2baff5c83db",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/remote.ts": "9c274d1bf1f127ce9ec464383f00ddea669732c01320584cb50a4545f63fd16d",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/resolver.ts": "d7ed8eb01c4866db3f1218d3a0d27be07532fa1eb917bb4c860142e0d4b1b41b",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/snapshot.ts": "d5967519a772dd4014e81a45b88a08d6536536ba9da8ddbe12bca9f1ced69e9f",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/utils/datemoment.ts": "e458179ae85eee1fa3e9bc0b247d7b8526067ed1c8580654b0250cc0df7f5718",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/utils/executionLogger.ts": "98a30f37d074d5dc2b827aa7782beb5c211f122319568709f12f8f79c4174aba",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/utils/ipcidr.ts": "cc4b3b5001da1a8fe4d08cc05467c4c87e60a7595a89f5b9c9660bc47a82031b",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/utils/payloadReader.ts": "f1be307839a404f7909170a46729034847310dc3bb1b399b400b5c7d850d778c",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/utils/snapshotAutoUpdater.ts": "18cad986131b1c28ca9790645f68d034d1b9a7333182b2139ab8e8da4b1a08b7",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/utils/timed-match/index.ts": "4632a2e6c3f369625e0e081d7b54b7ad44be90b30d1d89ef5ddc551d77437d80",
"https://deno.land/x/switcher4deno@v1.0.6/src/lib/utils/timed-match/match.ts": "1f89939535887864c8ac1f73a070c8e783672a09374ec368c6cb6891494bea90",
"https://deno.land/x/switcher4deno@v1.0.6/src/switcher-client.ts": "c54979727daeb2b9d8e156b550e7ee94f086253d3f5e380ee94f773bd9dfcd69"
"https://deno.land/x/switcher4deno@v1.0.7/mod.ts": "c4297abe83774a68f92e0f1bfa752bb2475104b073f103752a933b964c407a20",
"https://deno.land/x/switcher4deno@v1.0.7/src/deps.ts": "04f678b9e251ecb410a69730ccc9f144e7608845198bd0c141700f8394d48094",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/bypasser/index.ts": "fb0a84827f9adcd94521f91b49fe50e51ce122ddcff9508b418816c0dc516aaa",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/bypasser/key.ts": "2aa2b159a51b7b930ca117efe378eaf94e67a517428d29d48c36b8fe87c33d2b",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/constants.ts": "089d725fb47d8fcc868ddf0fc36c5c49387feaa663839d851f251232752e93c6",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/exceptions/index.ts": "d2f75247e61d67bc8dab0041633fcd8313098f0a2111ffc6962cfb80af5d5abd",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/middlewares/check.ts": "dea2e20e0fa876f3f36d118aed13310f58eb31e3a1eb85574ae8d2baff5c83db",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/remote.ts": "770f0ba03af26a111646d977a8a4e76d562314f4a36a1c9760330e6e5ae42696",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/resolver.ts": "08d4a73bfa2af64021f251b06a99ee07659e806b7f5e0ee109af0dbaf2bf4103",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/snapshot.ts": "d1f2dfc9124cd2fd1d74a80af35165ca2b073c17a1cd96a1dfbea957b57bfa19",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/utils/datemoment.ts": "e458179ae85eee1fa3e9bc0b247d7b8526067ed1c8580654b0250cc0df7f5718",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/utils/executionLogger.ts": "8408cd896331fa85e388084972002a5f70d0f96a5ab5ae63a2a7fd2847cf89d9",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/utils/ipcidr.ts": "cc4b3b5001da1a8fe4d08cc05467c4c87e60a7595a89f5b9c9660bc47a82031b",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/utils/payloadReader.ts": "f1be307839a404f7909170a46729034847310dc3bb1b399b400b5c7d850d778c",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/utils/snapshotAutoUpdater.ts": "87e434b79355379a81c6bd2cad60c55f800a07e8fd57297c020bae9035737680",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/utils/timed-match/index.ts": "4632a2e6c3f369625e0e081d7b54b7ad44be90b30d1d89ef5ddc551d77437d80",
"https://deno.land/x/switcher4deno@v1.0.7/src/lib/utils/timed-match/match.ts": "1f89939535887864c8ac1f73a070c8e783672a09374ec368c6cb6891494bea90",
"https://deno.land/x/switcher4deno@v1.0.7/src/switcher-client.ts": "c006e074b153c949df326d507c4ea5bb74955171203ffca99c83f4c1cdf3ee8f"
}
}
4 changes: 2 additions & 2 deletions src/api-docs/paths/path-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export default {
type: 'string',
description: 'Switcher environment.',
},
offline: {
local: {
type: 'string',
description: 'Switcher offline.',
description: 'Switcher local.',
},
snapshotAutoLoad: {
type: 'string',
Expand Down
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Application, load } from './deps.ts';
import { responseTime, responseTimeLog } from './middleware/index.ts';

await load({ export: true, envPath: getEnv('ENV_PATH', '.env') });
await load({ export: true, envPath: getEnv('ENV_PATH', '.env'), allowEmptyValues: true });

import Helmet from './middleware/helmet.ts';
import { getEnv } from './utils.ts';
Expand Down
6 changes: 3 additions & 3 deletions src/config/switcher-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class SwitcherClient {
const apiKey = getEnv('SWITCHER_API_KEY', '');
const url = getEnv('SWITCHER_URL', 'Not set');
const environment = getEnv('SWITCHER_ENVIRONMENT', 'default');
const offline = getEnv('SWITCHER_OFFLINE', true);
const local = getEnv('SWITCHER_LOCAL', true);
const regexSafe = getEnv('SWITCHER_REGEX_SAFE', false);
const snapshotLocation = getEnv('SWITCHER_SNAPSHOT_LOCATION', '');
const updateInterval = getEnv('SWITCHER_SNAPSHOT_UPDATE_INTERVAL', '');
Expand All @@ -24,7 +24,7 @@ export default class SwitcherClient {
apiKey: apiKey?.length ? '********' : 'Not set',
url,
environment,
offline,
local,
regexSafe,
snapshotLocation,
updateInterval,
Expand All @@ -33,7 +33,7 @@ export default class SwitcherClient {
});

Switcher.buildContext({ url, apiKey, domain, component, environment }, {
offline,
local,
snapshotLocation,
regexSafe,
certPath,
Expand Down
2 changes: 1 addition & 1 deletion src/deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ export { Application, Router } from 'https://deno.land/x/oak@v14.1.1/mod.ts';
export type { Middleware, Next } from 'https://deno.land/x/oak@v14.1.1/mod.ts';
export { Context } from 'https://deno.land/x/oak@v14.1.1/context.ts';
export { load } from 'https://deno.land/std@0.218.2/dotenv/mod.ts';
export { checkValue, Switcher } from 'https://deno.land/x/switcher4deno@v1.0.6/mod.ts';
export { checkValue, Switcher } from 'https://deno.land/x/switcher4deno@v1.0.7/mod.ts';
export { bold, cyan, green } from 'https://deno.land/std@0.218.2/fmt/colors.ts';
Loading

0 comments on commit edd7096

Please sign in to comment.