the-forest/client/node_modules/.cache/babel-loader/0973d06f7831aa3a5a6ce8f804b790b4742b3989ec3bd3f3b8a7ede73d815c0a.json
2024-09-17 20:35:18 -04:00

1 line
12 KiB
JSON

{"ast":null,"code":"\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = {\n enumerable: true,\n get: function () {\n return m[k];\n }\n };\n }\n Object.defineProperty(o, k2, desc);\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CursorRespBody = exports.PipelineRespBody = void 0;\nconst errors_js_1 = require(\"../errors.js\");\nconst d = __importStar(require(\"../encoding/json/decode.js\"));\nconst json_decode_js_1 = require(\"../shared/json_decode.js\");\nfunction PipelineRespBody(obj) {\n const baton = d.stringOpt(obj[\"baton\"]);\n const baseUrl = d.stringOpt(obj[\"base_url\"]);\n const results = d.arrayObjectsMap(obj[\"results\"], StreamResult);\n return {\n baton,\n baseUrl,\n results\n };\n}\nexports.PipelineRespBody = PipelineRespBody;\nfunction StreamResult(obj) {\n const type = d.string(obj[\"type\"]);\n if (type === \"ok\") {\n const response = StreamResponse(d.object(obj[\"response\"]));\n return {\n type: \"ok\",\n response\n };\n } else if (type === \"error\") {\n const error = (0, json_decode_js_1.Error)(d.object(obj[\"error\"]));\n return {\n type: \"error\",\n error\n };\n } else {\n throw new errors_js_1.ProtoError(\"Unexpected type of StreamResult\");\n }\n}\nfunction StreamResponse(obj) {\n const type = d.string(obj[\"type\"]);\n if (type === \"close\") {\n return {\n type: \"close\"\n };\n } else if (type === \"execute\") {\n const result = (0, json_decode_js_1.StmtResult)(d.object(obj[\"result\"]));\n return {\n type: \"execute\",\n result\n };\n } else if (type === \"batch\") {\n const result = (0, json_decode_js_1.BatchResult)(d.object(obj[\"result\"]));\n return {\n type: \"batch\",\n result\n };\n } else if (type === \"sequence\") {\n return {\n type: \"sequence\"\n };\n } else if (type === \"describe\") {\n const result = (0, json_decode_js_1.DescribeResult)(d.object(obj[\"result\"]));\n return {\n type: \"describe\",\n result\n };\n } else if (type === \"store_sql\") {\n return {\n type: \"store_sql\"\n };\n } else if (type === \"close_sql\") {\n return {\n type: \"close_sql\"\n };\n } else if (type === \"get_autocommit\") {\n const isAutocommit = d.boolean(obj[\"is_autocommit\"]);\n return {\n type: \"get_autocommit\",\n isAutocommit\n };\n } else {\n throw new errors_js_1.ProtoError(\"Unexpected type of StreamResponse\");\n }\n}\nfunction CursorRespBody(obj) {\n const baton = d.stringOpt(obj[\"baton\"]);\n const baseUrl = d.stringOpt(obj[\"base_url\"]);\n return {\n baton,\n baseUrl\n };\n}\nexports.CursorRespBody = CursorRespBody;","map":{"version":3,"names":["__createBinding","Object","create","o","m","k","k2","undefined","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__setModuleDefault","v","value","__importStar","mod","result","prototype","hasOwnProperty","call","exports","CursorRespBody","PipelineRespBody","errors_js_1","require","d","json_decode_js_1","obj","baton","stringOpt","baseUrl","results","arrayObjectsMap","StreamResult","type","string","response","StreamResponse","object","error","Error","ProtoError","StmtResult","BatchResult","DescribeResult","isAutocommit","boolean"],"sources":["/Users/shoofle/Projects/the-forest/node_modules/@libsql/hrana-client/lib-cjs/http/json_decode.js"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CursorRespBody = exports.PipelineRespBody = void 0;\nconst errors_js_1 = require(\"../errors.js\");\nconst d = __importStar(require(\"../encoding/json/decode.js\"));\nconst json_decode_js_1 = require(\"../shared/json_decode.js\");\nfunction PipelineRespBody(obj) {\n const baton = d.stringOpt(obj[\"baton\"]);\n const baseUrl = d.stringOpt(obj[\"base_url\"]);\n const results = d.arrayObjectsMap(obj[\"results\"], StreamResult);\n return { baton, baseUrl, results };\n}\nexports.PipelineRespBody = PipelineRespBody;\nfunction StreamResult(obj) {\n const type = d.string(obj[\"type\"]);\n if (type === \"ok\") {\n const response = StreamResponse(d.object(obj[\"response\"]));\n return { type: \"ok\", response };\n }\n else if (type === \"error\") {\n const error = (0, json_decode_js_1.Error)(d.object(obj[\"error\"]));\n return { type: \"error\", error };\n }\n else {\n throw new errors_js_1.ProtoError(\"Unexpected type of StreamResult\");\n }\n}\nfunction StreamResponse(obj) {\n const type = d.string(obj[\"type\"]);\n if (type === \"close\") {\n return { type: \"close\" };\n }\n else if (type === \"execute\") {\n const result = (0, json_decode_js_1.StmtResult)(d.object(obj[\"result\"]));\n return { type: \"execute\", result };\n }\n else if (type === \"batch\") {\n const result = (0, json_decode_js_1.BatchResult)(d.object(obj[\"result\"]));\n return { type: \"batch\", result };\n }\n else if (type === \"sequence\") {\n return { type: \"sequence\" };\n }\n else if (type === \"describe\") {\n const result = (0, json_decode_js_1.DescribeResult)(d.object(obj[\"result\"]));\n return { type: \"describe\", result };\n }\n else if (type === \"store_sql\") {\n return { type: \"store_sql\" };\n }\n else if (type === \"close_sql\") {\n return { type: \"close_sql\" };\n }\n else if (type === \"get_autocommit\") {\n const isAutocommit = d.boolean(obj[\"is_autocommit\"]);\n return { type: \"get_autocommit\", isAutocommit };\n }\n else {\n throw new errors_js_1.ProtoError(\"Unexpected type of StreamResponse\");\n }\n}\nfunction CursorRespBody(obj) {\n const baton = d.stringOpt(obj[\"baton\"]);\n const baseUrl = d.stringOpt(obj[\"base_url\"]);\n return { baton, baseUrl };\n}\nexports.CursorRespBody = CursorRespBody;\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,eAAe,GAAI,IAAI,IAAI,IAAI,CAACA,eAAe,KAAMC,MAAM,CAACC,MAAM,GAAI,UAASC,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAEC,EAAE,EAAE;EAC5F,IAAIA,EAAE,KAAKC,SAAS,EAAED,EAAE,GAAGD,CAAC;EAC5B,IAAIG,IAAI,GAAGP,MAAM,CAACQ,wBAAwB,CAACL,CAAC,EAAEC,CAAC,CAAC;EAChD,IAAI,CAACG,IAAI,KAAK,KAAK,IAAIA,IAAI,GAAG,CAACJ,CAAC,CAACM,UAAU,GAAGF,IAAI,CAACG,QAAQ,IAAIH,IAAI,CAACI,YAAY,CAAC,EAAE;IACjFJ,IAAI,GAAG;MAAEK,UAAU,EAAE,IAAI;MAAEC,GAAG,EAAE,SAAAA,CAAA,EAAW;QAAE,OAAOV,CAAC,CAACC,CAAC,CAAC;MAAE;IAAE,CAAC;EAC/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