@typeberry/convert 0.8.2 → 0.8.3-59ae34d
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.
- package/{121.index.js → 742.index.js} +8 -6
- package/742.index.js.map +1 -0
- package/index.js +23 -36
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/121.index.js.map +0 -1
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
export const id =
|
|
2
|
-
export const ids = [
|
|
1
|
+
export const id = 742;
|
|
2
|
+
export const ids = [742];
|
|
3
3
|
export const modules = {
|
|
4
4
|
|
|
5
|
-
/***/
|
|
5
|
+
/***/ 742:
|
|
6
6
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
7
7
|
|
|
8
8
|
__webpack_require__.r(__webpack_exports__);
|
|
9
9
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
10
|
/* harmony export */ loadNativeBinding: () => (/* binding */ loadNativeBinding)
|
|
11
11
|
/* harmony export */ });
|
|
12
|
+
/* harmony import */ var module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(339);
|
|
13
|
+
|
|
14
|
+
|
|
12
15
|
//#region bandersnatch/src/native.ts
|
|
13
16
|
async function loadNativeBinding() {
|
|
14
|
-
const
|
|
15
|
-
const require = createRequire(import.meta.url);
|
|
17
|
+
const require = (0,module__WEBPACK_IMPORTED_MODULE_0__.createRequire)(import.meta.url);
|
|
16
18
|
const platform = process?.platform;
|
|
17
19
|
const arch = process?.arch;
|
|
18
20
|
let nativeBinding = null;
|
|
@@ -38,4 +40,4 @@ async function loadNativeBinding() {
|
|
|
38
40
|
|
|
39
41
|
};
|
|
40
42
|
|
|
41
|
-
//# sourceMappingURL=
|
|
43
|
+
//# sourceMappingURL=742.index.js.map
|
package/742.index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"742.index.js","mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":[".././node_modules/@typeberry/native/native-BRZYJzAh.js"],"sourcesContent":["import { createRequire } from \"module\";\n\n//#region bandersnatch/src/native.ts\nasync function loadNativeBinding() {\n\tconst require = createRequire(import.meta.url);\n\tconst platform = process?.platform;\n\tconst arch = process?.arch;\n\tlet nativeBinding = null;\n\tlet loadError = null;\n\tconst platformArch = platform && arch ? {\n\t\tdarwin: { arm64: \"@typeberry/bandersnatch-native-darwin-arm64\" },\n\t\tlinux: { x64: \"@typeberry/bandersnatch-native-linux-x64-gnu\" }\n\t}[platform]?.[arch] : void 0;\n\tif (platformArch) try {\n\t\tnativeBinding = require(platformArch);\n\t} catch (e) {\n\t\tloadError = e;\n\t}\n\telse loadError = /* @__PURE__ */ new Error(`Unsupported platform: ${platform}-${arch}`);\n\tif (!nativeBinding) throw loadError || /* @__PURE__ */ new Error(\"Failed to load native binding\");\n\treturn nativeBinding;\n}\n\n//#endregion\nexport { loadNativeBinding };"],"names":[],"sourceRoot":""}
|
package/index.js
CHANGED
|
@@ -3854,36 +3854,6 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("module");
|
|
|
3854
3854
|
/******/ };
|
|
3855
3855
|
/******/ })();
|
|
3856
3856
|
/******/
|
|
3857
|
-
/******/ /* webpack/runtime/create fake namespace object */
|
|
3858
|
-
/******/ (() => {
|
|
3859
|
-
/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
|
|
3860
|
-
/******/ var leafPrototypes;
|
|
3861
|
-
/******/ // create a fake namespace object
|
|
3862
|
-
/******/ // mode & 1: value is a module id, require it
|
|
3863
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
3864
|
-
/******/ // mode & 4: return value when already ns object
|
|
3865
|
-
/******/ // mode & 16: return value when it's Promise-like
|
|
3866
|
-
/******/ // mode & 8|1: behave like require
|
|
3867
|
-
/******/ __nccwpck_require__.t = function(value, mode) {
|
|
3868
|
-
/******/ if(mode & 1) value = this(value);
|
|
3869
|
-
/******/ if(mode & 8) return value;
|
|
3870
|
-
/******/ if(typeof value === 'object' && value) {
|
|
3871
|
-
/******/ if((mode & 4) && value.__esModule) return value;
|
|
3872
|
-
/******/ if((mode & 16) && typeof value.then === 'function') return value;
|
|
3873
|
-
/******/ }
|
|
3874
|
-
/******/ var ns = Object.create(null);
|
|
3875
|
-
/******/ __nccwpck_require__.r(ns);
|
|
3876
|
-
/******/ var def = {};
|
|
3877
|
-
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
|
|
3878
|
-
/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
|
3879
|
-
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
|
|
3880
|
-
/******/ }
|
|
3881
|
-
/******/ def['default'] = () => (value);
|
|
3882
|
-
/******/ __nccwpck_require__.d(ns, def);
|
|
3883
|
-
/******/ return ns;
|
|
3884
|
-
/******/ };
|
|
3885
|
-
/******/ })();
|
|
3886
|
-
/******/
|
|
3887
3857
|
/******/ /* webpack/runtime/define property getters */
|
|
3888
3858
|
/******/ (() => {
|
|
3889
3859
|
/******/ // define getter functions for harmony exports
|
|
@@ -4583,14 +4553,31 @@ function inspectInternal(val, seen) {
|
|
|
4583
4553
|
v += oneLine ? "}" : "\n}";
|
|
4584
4554
|
return v;
|
|
4585
4555
|
}
|
|
4586
|
-
/**
|
|
4556
|
+
/**
|
|
4557
|
+
* Utility function to measure time taken for some operation [ms].
|
|
4558
|
+
*
|
|
4559
|
+
* To reduce allocations, each timer can only track one entry.
|
|
4560
|
+
*
|
|
4561
|
+
*/
|
|
4587
4562
|
function measure(id) {
|
|
4588
|
-
const
|
|
4589
|
-
|
|
4563
|
+
const response = {
|
|
4564
|
+
id,
|
|
4565
|
+
start: 0,
|
|
4566
|
+
duration() {
|
|
4567
|
+
return now() - this.start;
|
|
4568
|
+
},
|
|
4569
|
+
toString() {
|
|
4570
|
+
return `${this.id} took ${(this.duration()).toFixed(2)}ms`;
|
|
4571
|
+
},
|
|
4572
|
+
};
|
|
4573
|
+
return () => {
|
|
4574
|
+
response.start = now();
|
|
4575
|
+
return response;
|
|
4576
|
+
};
|
|
4590
4577
|
}
|
|
4591
4578
|
const BYTES_IN_MB = (/* unused pure expression or super */ null && (1024 * 1024));
|
|
4592
4579
|
const toMb = (bytes) => (bytes / BYTES_IN_MB).toFixed(1);
|
|
4593
|
-
const signedMb = (bytes) => `${bytes >= 0 ? "+" : "
|
|
4580
|
+
const signedMb = (bytes) => `${bytes >= 0 ? "+" : ""}${toMb(bytes)}`;
|
|
4594
4581
|
/** Raw process memory usage, or `null` in environments without `process` (e.g. browser). */
|
|
4595
4582
|
function rawMemoryUsage() {
|
|
4596
4583
|
if (isBrowser() || typeof process.memoryUsage !== "function") {
|
|
@@ -4696,7 +4683,7 @@ function seeThrough(v) {
|
|
|
4696
4683
|
}
|
|
4697
4684
|
|
|
4698
4685
|
;// CONCATENATED MODULE: ./packages/core/utils/package.json
|
|
4699
|
-
const package_namespaceObject = {"rE":"0.8.
|
|
4686
|
+
const package_namespaceObject = /*#__PURE__*/JSON.parse('{"rE":"0.8.3-59ae34d"}');
|
|
4700
4687
|
;// CONCATENATED MODULE: ./packages/core/utils/result.ts
|
|
4701
4688
|
|
|
4702
4689
|
/**
|
|
@@ -7072,7 +7059,7 @@ async function loadNativeBinding() {
|
|
|
7072
7059
|
return null;
|
|
7073
7060
|
}
|
|
7074
7061
|
try {
|
|
7075
|
-
return (await __nccwpck_require__.e(/* import() */
|
|
7062
|
+
return (await __nccwpck_require__.e(/* import() */ 742).then(__nccwpck_require__.bind(__nccwpck_require__, 742))).loadNativeBinding();
|
|
7076
7063
|
} catch (e) {
|
|
7077
7064
|
nativeBindingError = `${e}`;
|
|
7078
7065
|
return null;
|