1 line
11 KiB
JSON
1 line
11 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.load = exports.currentTarget = void 0;\nconst path = __importStar(require(\"path\"));\nconst fs = __importStar(require(\"fs\"));\nfunction currentTarget() {\n let os = null;\n switch (process.platform) {\n case 'android':\n switch (process.arch) {\n case 'arm':\n return 'android-arm-eabi';\n case 'arm64':\n return 'android-arm64';\n }\n os = 'Android';\n break;\n case 'win32':\n switch (process.arch) {\n case 'x64':\n return 'win32-x64-msvc';\n case 'arm64':\n return 'win32-arm64-msvc';\n case 'ia32':\n return 'win32-ia32-msvc';\n }\n os = 'Windows';\n break;\n case 'darwin':\n switch (process.arch) {\n case 'x64':\n return 'darwin-x64';\n case 'arm64':\n return 'darwin-arm64';\n }\n os = 'macOS';\n break;\n case 'linux':\n switch (process.arch) {\n case 'x64':\n case 'arm64':\n return isGlibc() ? `linux-${process.arch}-gnu` : `linux-${process.arch}-musl`;\n case 'arm':\n return 'linux-arm-gnueabihf';\n }\n os = 'Linux';\n break;\n case 'freebsd':\n if (process.arch === 'x64') {\n return 'freebsd-x64';\n }\n os = 'FreeBSD';\n break;\n }\n if (os) {\n throw new Error(`Neon: unsupported ${os} architecture: ${process.arch}`);\n }\n throw new Error(`Neon: unsupported system: ${process.platform}`);\n}\nexports.currentTarget = currentTarget;\nfunction isGlibc() {\n // Cast to unknown to work around a bug in the type definition:\n // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/40140\n const report = process.report?.getReport();\n if (typeof report !== 'object' || !report || !('header' in report)) {\n return false;\n }\n const header = report.header;\n return typeof header === 'object' && !!header && 'glibcVersionRuntime' in header;\n}\nfunction load(dirname) {\n const m = path.join(dirname, \"index.node\");\n return fs.existsSync(m) ? require(m) : null;\n}\nexports.load = load;","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","load","currentTarget","path","require","fs","os","process","platform","arch","isGlibc","Error","report","getReport","header","dirname","join","existsSync"],"sources":["/Users/shoofle/Projects/the-forest/node_modules/@neon-rs/load/dist/index.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.load = exports.currentTarget = void 0;\nconst path = __importStar(require(\"path\"));\nconst fs = __importStar(require(\"fs\"));\nfunction currentTarget() {\n let os = null;\n switch (process.platform) {\n case 'android':\n switch (process.arch) {\n case 'arm':\n return 'android-arm-eabi';\n case 'arm64':\n return 'android-arm64';\n }\n os = 'Android';\n break;\n case 'win32':\n switch (process.arch) {\n case 'x64':\n return 'win32-x64-msvc';\n case 'arm64':\n return 'win32-arm64-msvc';\n case 'ia32':\n return 'win32-ia32-msvc';\n }\n os = 'Windows';\n break;\n case 'darwin':\n switch (process.arch) {\n case 'x64':\n return 'darwin-x64';\n case 'arm64':\n return 'darwin-arm64';\n }\n os = 'macOS';\n break;\n case 'linux':\n switch (process.arch) {\n case 'x64':\n case 'arm64':\n return isGlibc()\n ? `linux-${process.arch}-gnu`\n : `linux-${process.arch}-musl`;\n case 'arm':\n return 'linux-arm-gnueabihf';\n }\n os = 'Linux';\n break;\n case 'freebsd':\n if (process.arch === 'x64') {\n return 'freebsd-x64';\n }\n os = 'FreeBSD';\n break;\n }\n if (os) {\n throw new Error(`Neon: unsupported ${os} architecture: ${process.arch}`);\n }\n throw new Error(`Neon: unsupported system: ${process.platform}`);\n}\nexports.currentTarget = currentTarget;\nfunction isGlibc() {\n // Cast to unknown to work around a bug in the type definition:\n // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/40140\n const report = process.report?.getReport();\n if ((typeof report !== 'object') || !report || (!('header' in report))) {\n return false;\n }\n const header = report.header;\n return (typeof header === 'object') &&\n !!header &&\n ('glibcVersionRuntime' in header);\n}\nfunction load(dirname) {\n const m = path.join(dirname, \"index.node\");\n return fs.existsSync(m) ? require(m) : null;\n}\nexports.load = load;\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,eAAe,GAAI,IAAI,IAAI,IAAI,CAACA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