zod-config
Version:
Load configuration variables from multiple sources with flexible adapters, ensuring type safety with Zod.
287 lines (276 loc) • 25.8 kB
JavaScript
var N=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)};var d=(e,n,t)=>(N(e,n,"read from private field"),t?t.call(e):n.get(e)),S=(e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)},h=(e,n,t,i)=>(N(e,n,"write to private field"),i?i.call(e,t):n.set(e,t),t);var Z=(e,n)=>{if(e==null)return{};if(!R(e))throw new TypeError(`Cannot filter ${e} by prefix key as it is not a record-like object`);return Object.keys(e).filter(t=>t.startsWith(n)).reduce((t,i)=>(t[i]=e[i],t),{})},z=(e,n)=>{if(e==null)return{};if(!R(e))throw new TypeError(`Cannot filter ${e} by regex as it is not a record-like object`);return Object.keys(e).filter(t=>n.test(t)).reduce((t,i)=>(t[i]=e[i],t),{})};function R(e){return!e||typeof e!="object"?!1:Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null}function j(e,n){let{regex:t,prefixKey:i}=n;return t?z(e,t):i?Z(e,i):e}import{readFile as H}from"fs/promises";function B(e,n){let t=e.slice(0,n).split(/\r\n|\n|\r/g);return[t.length,t.pop().length+1]}function F(e,n,t){let i=e.split(/\r\n|\n|\r/g),l="",r=(Math.log10(n+1)|0)+1;for(let o=n-1;o<=n+1;o++){let f=i[o-1];f&&(l+=o.toString().padEnd(r," "),l+=": ",l+=f,l+=`
`,o===n&&(l+=" ".repeat(r+t+2),l+=`^
`))}return l}var a=class extends Error{line;column;codeblock;constructor(n,t){let[i,l]=B(t.toml,t.ptr),r=F(t.toml,i,l);super(`Invalid TOML document: ${n}
${r}`,t),this.line=i,this.column=l,this.codeblock=r}};function y(e,n=0,t=e.length){let i=e.indexOf(`
`,n);return e[i-1]==="\r"&&i--,i<=t?i:-1}function T(e,n){for(let t=n;t<e.length;t++){let i=e[t];if(i===`
`)return t;if(i==="\r"&&e[t+1]===`
`)return t+1;if(i<" "&&i!==" "||i==="\x7F")throw new a("control characters are not allowed in comments",{toml:e,ptr:n})}return e.length}function w(e,n,t,i){let l;for(;(l=e[n])===" "||l===" "||!t&&(l===`
`||l==="\r"&&e[n+1]===`
`);)n++;return i||l!=="#"?n:w(e,T(e,n),t)}function $(e,n,t,i,l=!1){if(!i)return n=y(e,n),n<0?e.length:n;for(let r=n;r<e.length;r++){let o=e[r];if(o==="#")r=y(e,r);else{if(o===t)return r+1;if(o===i)return r;if(l&&(o===`
`||o==="\r"&&e[r+1]===`
`))return r}}throw new a("cannot find end of structure",{toml:e,ptr:n})}function P(e,n){let t=e[n],i=t===e[n+1]&&e[n+1]===e[n+2]?e.slice(n,n+3):t;n+=i.length-1;do n=e.indexOf(i,++n);while(n>-1&&t!=="'"&&e[n-1]==="\\"&&e[n-2]!=="\\");return n>-1&&(n+=i.length,i.length>1&&(e[n]===t&&n++,e[n]===t&&n++)),n}var G=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i,g,p,m,b=class extends Date{constructor(t){let i=!0,l=!0,r="Z";if(typeof t=="string"){let o=t.match(G);o?(o[1]||(i=!1,t=`0000-01-01T${t}`),l=!!o[2],o[2]&&+o[2]>23?t="":(r=o[3]||null,t=t.toUpperCase(),!r&&l&&(t+="Z"))):t=""}super(t);S(this,g,!1);S(this,p,!1);S(this,m,null);isNaN(this.getTime())||(h(this,g,i),h(this,p,l),h(this,m,r))}isDateTime(){return d(this,g)&&d(this,p)}isLocal(){return!d(this,g)||!d(this,p)||!d(this,m)}isDate(){return d(this,g)&&!d(this,p)}isTime(){return d(this,p)&&!d(this,g)}isValid(){return d(this,g)||d(this,p)}toISOString(){let t=super.toISOString();if(this.isDate())return t.slice(0,10);if(this.isTime())return t.slice(11,23);if(d(this,m)===null)return t.slice(0,-1);if(d(this,m)==="Z")return t;let i=+d(this,m).slice(1,3)*60+ +d(this,m).slice(4,6);return i=d(this,m)[0]==="-"?i:-i,new Date(this.getTime()-i*6e4).toISOString().slice(0,-1)+d(this,m)}static wrapAsOffsetDateTime(t,i="Z"){let l=new b(t);return h(l,m,i),l}static wrapAsLocalDateTime(t){let i=new b(t);return h(i,m,null),i}static wrapAsLocalDate(t){let i=new b(t);return h(i,p,!1),h(i,m,null),i}static wrapAsLocalTime(t){let i=new b(t);return h(i,g,!1),h(i,m,null),i}},O=b;g=new WeakMap,p=new WeakMap,m=new WeakMap;var U=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,X=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,Y=/^[+-]?0[0-9_]/,q=/^[0-9a-f]{4,8}$/i,C={b:"\b",t:" ",n:`
`,f:"\f",r:"\r",'"':'"',"\\":"\\"};function D(e,n=0,t=e.length){let i=e[n]==="'",l=e[n++]===e[n]&&e[n]===e[n+1];l&&(t-=2,e[n+=2]==="\r"&&n++,e[n]===`
`&&n++);let r=0,o,f="",u=n;for(;n<t-1;){let c=e[n++];if(c===`
`||c==="\r"&&e[n]===`
`){if(!l)throw new a("newlines are not allowed in strings",{toml:e,ptr:n-1})}else if(c<" "&&c!==" "||c==="\x7F")throw new a("control characters are not allowed in strings",{toml:e,ptr:n-1});if(o){if(o=!1,c==="u"||c==="U"){let s=e.slice(n,n+=c==="u"?4:8);if(!q.test(s))throw new a("invalid unicode escape",{toml:e,ptr:r});try{f+=String.fromCodePoint(parseInt(s,16))}catch{throw new a("invalid unicode escape",{toml:e,ptr:r})}}else if(l&&(c===`
`||c===" "||c===" "||c==="\r")){if(n=w(e,n-1,!0),e[n]!==`
`&&e[n]!=="\r")throw new a("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:r});n=w(e,n)}else if(c in C)f+=C[c];else throw new a("unrecognized escape sequence",{toml:e,ptr:r});u=n}else!i&&c==="\\"&&(r=n-1,o=!0,f+=e.slice(u,r))}return f+e.slice(u,t-1)}function V(e,n,t){if(e==="true")return!0;if(e==="false")return!1;if(e==="-inf")return-1/0;if(e==="inf"||e==="+inf")return 1/0;if(e==="nan"||e==="+nan"||e==="-nan")return NaN;if(e==="-0")return 0;let i;if((i=U.test(e))||X.test(e)){if(Y.test(e))throw new a("leading zeroes are not allowed",{toml:n,ptr:t});let r=+e.replace(/_/g,"");if(isNaN(r))throw new a("invalid number",{toml:n,ptr:t});if(i&&!Number.isSafeInteger(r))throw new a("integer value cannot be represented losslessly",{toml:n,ptr:t});return r}let l=new O(e);if(!l.isValid())throw new a("invalid value",{toml:n,ptr:t});return l}function J(e,n,t,i){let l=e.slice(n,t),r=l.indexOf("#");r>-1&&(T(e,r),l=l.slice(0,r));let o=l.trimEnd();if(!i){let f=l.indexOf(`
`,o.length);if(f>-1)throw new a("newlines are not allowed in inline tables",{toml:e,ptr:n+f})}return[o,r]}function A(e,n,t,i){if(i===0)throw new a("document contains excessively nested structures. aborting.",{toml:e,ptr:n});let l=e[n];if(l==="["||l==="{"){let[f,u]=l==="["?v(e,n,i):L(e,n,i),c=$(e,u,",",t);if(t==="}"){let s=y(e,u,c);if(s>-1)throw new a("newlines are not allowed in inline tables",{toml:e,ptr:s})}return[f,c]}let r;if(l==='"'||l==="'"){r=P(e,n);let f=D(e,n,r);if(t){if(r=w(e,r,t!=="]"),e[r]&&e[r]!==","&&e[r]!==t&&e[r]!==`
`&&e[r]!=="\r")throw new a("unexpected character encountered",{toml:e,ptr:r});r+=+(e[r]===",")}return[f,r]}r=$(e,n,",",t);let o=J(e,n,r-+(e[r-1]===","),t==="]");if(!o[0])throw new a("incomplete key-value declaration: no value specified",{toml:e,ptr:n});return t&&o[1]>-1&&(r=w(e,n+o[1]),r+=+(e[r]===",")),[V(o[0],e,n),r]}var W=/^[a-zA-Z0-9-_]+[ \t]*$/;function _(e,n,t="="){let i=n-1,l=[],r=e.indexOf(t,n);if(r<0)throw new a("incomplete key-value: cannot find end of key",{toml:e,ptr:n});do{let o=e[n=++i];if(o!==" "&&o!==" ")if(o==='"'||o==="'"){if(o===e[n+1]&&o===e[n+2])throw new a("multiline strings are not allowed in keys",{toml:e,ptr:n});let f=P(e,n);if(f<0)throw new a("unfinished string encountered",{toml:e,ptr:n});i=e.indexOf(".",f);let u=e.slice(f,i<0||i>r?r:i),c=y(u);if(c>-1)throw new a("newlines are not allowed in keys",{toml:e,ptr:n+i+c});if(u.trimStart())throw new a("found extra tokens after the string part",{toml:e,ptr:f});if(r<f&&(r=e.indexOf(t,f),r<0))throw new a("incomplete key-value: cannot find end of key",{toml:e,ptr:n});l.push(D(e,n,f))}else{i=e.indexOf(".",n);let f=e.slice(n,i<0||i>r?r:i);if(!W.test(f))throw new a("only letter, numbers, dashes and underscores are allowed in keys",{toml:e,ptr:n});l.push(f.trimEnd())}}while(i+1&&i<r);return[l,w(e,r+1,!0,!0)]}function L(e,n,t){let i={},l=new Set,r,o=0;for(n++;(r=e[n++])!=="}"&&r;){if(r===`
`)throw new a("newlines are not allowed in inline tables",{toml:e,ptr:n-1});if(r==="#")throw new a("inline tables cannot contain comments",{toml:e,ptr:n-1});if(r===",")throw new a("expected key-value, found comma",{toml:e,ptr:n-1});if(r!==" "&&r!==" "){let f,u=i,c=!1,[s,x]=_(e,n-1);for(let k=0;k<s.length;k++){if(k&&(u=c?u[f]:u[f]={}),f=s[k],(c=Object.hasOwn(u,f))&&(typeof u[f]!="object"||l.has(u[f])))throw new a("trying to redefine an already defined value",{toml:e,ptr:n});!c&&f==="__proto__"&&Object.defineProperty(u,f,{enumerable:!0,configurable:!0,writable:!0})}if(c)throw new a("trying to redefine an already defined value",{toml:e,ptr:n});let[E,K]=A(e,x,"}",t-1);l.add(E),u[f]=E,n=K,o=e[n-1]===","?n-1:0}}if(o)throw new a("trailing commas are not allowed in inline tables",{toml:e,ptr:o});if(!r)throw new a("unfinished table encountered",{toml:e,ptr:n});return[i,n]}function v(e,n,t){let i=[],l;for(n++;(l=e[n++])!=="]"&&l;){if(l===",")throw new a("expected value, found comma",{toml:e,ptr:n-1});if(l==="#")n=T(e,n);else if(l!==" "&&l!==" "&&l!==`
`&&l!=="\r"){let r=A(e,n-1,"]",t-1);i.push(r[0]),n=r[1]}}if(!l)throw new a("unfinished array encountered",{toml:e,ptr:n});return[i,n]}function M(e,n,t,i){var c,s;let l=n,r=t,o,f=!1,u;for(let x=0;x<e.length;x++){if(x){if(l=f?l[o]:l[o]={},r=(u=r[o]).c,i===0&&(u.t===1||u.t===2))return null;if(u.t===2){let E=l.length-1;l=l[E],r=r[E].c}}if(o=e[x],(f=Object.hasOwn(l,o))&&((c=r[o])==null?void 0:c.t)===0&&((s=r[o])!=null&&s.d))return null;f||(o==="__proto__"&&(Object.defineProperty(l,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(r,o,{enumerable:!0,configurable:!0,writable:!0})),r[o]={t:x<e.length-1&&i===2?3:i,d:!1,i:0,c:{}})}if(u=r[o],u.t!==i&&!(i===1&&u.t===3)||(i===2&&(u.d||(u.d=!0,l[o]=[]),l[o].push(l={}),u.c[u.i++]=u={t:1,d:!1,i:0,c:{}}),u.d))return null;if(u.d=!0,i===1)l=f?l[o]:l[o]={};else if(i===0&&f)return null;return[o,l,u.c]}function I(e,n){let t=(n==null?void 0:n.maxDepth)??1e3,i={},l={},r=i,o=l;for(let f=w(e,0);f<e.length;){if(e[f]==="["){let u=e[++f]==="[",c=_(e,f+=+u,"]");if(u){if(e[c[1]-1]!=="]")throw new a("expected end of table declaration",{toml:e,ptr:c[1]-1});c[1]++}let s=M(c[0],i,l,u?2:1);if(!s)throw new a("trying to redefine an already defined table or value",{toml:e,ptr:f});o=s[2],r=s[1],f=c[1]}else{let u=_(e,f),c=M(u[0],r,o,0);if(!c)throw new a("trying to redefine an already defined table or value",{toml:e,ptr:f});let s=A(e,u[1],void 0,t);c[1][c[0]]=s[0],f=s[1]}if(f=w(e,f,!0),e[f]&&e[f]!==`
`&&e[f]!=="\r")throw new a("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:f});f=w(e,f)}return i}var Q="toml adapter",Ve=({path:e,prefixKey:n,regex:t,silent:i})=>({name:Q,read:async()=>{try{let l=await H(e,"utf-8"),r=I(l)||{};return j(r,{prefixKey:n,regex:t})}catch(l){throw new Error(`Failed to parse / read TOML file at ${e}: ${l instanceof Error?l.message:l}`)}},silent:i});export{Ve as tomlAdapter};
/*! Bundled license information:
smol-toml/dist/error.js:
(*!
* Copyright (c) Squirrel Chat et al., All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*)
smol-toml/dist/util.js:
(*!
* Copyright (c) Squirrel Chat et al., All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*)
smol-toml/dist/date.js:
(*!
* Copyright (c) Squirrel Chat et al., All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*)
smol-toml/dist/primitive.js:
(*!
* Copyright (c) Squirrel Chat et al., All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*)
smol-toml/dist/extract.js:
(*!
* Copyright (c) Squirrel Chat et al., All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*)
smol-toml/dist/struct.js:
(*!
* Copyright (c) Squirrel Chat et al., All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*)
smol-toml/dist/parse.js:
(*!
* Copyright (c) Squirrel Chat et al., All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*)
smol-toml/dist/stringify.js:
(*!
* Copyright (c) Squirrel Chat et al., All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*)
smol-toml/dist/index.js:
(*!
* Copyright (c) Squirrel Chat et al., All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*)
*/