@micro-lc/preview 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ var ErrorCodes = /* @__PURE__ */ ((ErrorCodes2) => {
2
+ ErrorCodes2["DynamicImportError"] = "0";
3
+ ErrorCodes2["InvalidJSONError"] = "20";
4
+ ErrorCodes2["DigestError"] = "40";
5
+ ErrorCodes2["LexerAnalysisEndedInNormalMode"] = "41";
6
+ ErrorCodes2["InterpolationContextError"] = "42";
7
+ ErrorCodes2["InterpolationJSONError"] = "43";
8
+ return ErrorCodes2;
9
+ })(ErrorCodes || {});
10
+ const COMPOSER = `[micro-lc][composer]`;
11
+ const errorMap = {
12
+ 0: (name, err) => `${COMPOSER}: Dynamic import error while importing ${name} - ${err}`,
13
+ 20: (file) => `${COMPOSER}: Provided JSON is invalid / Wrong 'Content-Type' was provided - ${file}`,
14
+ 40: (content, err) => `${COMPOSER}: Something went wrong while hashing content ${content} - ${err}`,
15
+ 41: (content, index) => `${COMPOSER}: Lexer could not parse content ${content} due to unexpected char "}" at position ${index}`,
16
+ 42: (input) => `${COMPOSER}: Invalid interpolation sequence of keys on input ${input}`,
17
+ 43: (err) => `${COMPOSER}: Invalid interpolation sequence while parsing a JSON input - ${err}`
18
+ };
19
+ var errors_default = errorMap;
20
+ export {
21
+ ErrorCodes,
22
+ errors_default as default
23
+ };