@typeberry/jam 0.1.1-135f62f → 0.1.1-4a6ffa9
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/block-generator/index.js +29 -0
- package/block-generator/index.js.map +1 -1
- package/importer/index.js +45 -0
- package/importer/index.js.map +1 -1
- package/index.js +48 -7
- package/index.js.map +1 -1
- package/jam-network/index.js +29 -0
- package/jam-network/index.js.map +1 -1
- package/package.json +4 -2
package/block-generator/index.js
CHANGED
|
@@ -3766,6 +3766,34 @@ class WithDebug {
|
|
|
3766
3766
|
}
|
|
3767
3767
|
}
|
|
3768
3768
|
|
|
3769
|
+
;// CONCATENATED MODULE: ./packages/core/utils/dev.ts
|
|
3770
|
+
const dev_env = typeof process === "undefined" ? {} : process.env;
|
|
3771
|
+
/**
|
|
3772
|
+
* The function will produce relative path resolver that is adjusted
|
|
3773
|
+
* for package location within the workspace.
|
|
3774
|
+
*
|
|
3775
|
+
* Example:
|
|
3776
|
+
* $ npm start -w @typeberry/jam
|
|
3777
|
+
*
|
|
3778
|
+
* The above command will run `./bin/jam/index.js`, however we would
|
|
3779
|
+
* still want relative paths to be resolved according to top-level workspace
|
|
3780
|
+
* directory.
|
|
3781
|
+
*
|
|
3782
|
+
* So the caller, passes the absolute workspace path as argument and get's
|
|
3783
|
+
* a function that can properly resolve relative paths.
|
|
3784
|
+
*
|
|
3785
|
+
* NOTE: the translation happens only for development build! When
|
|
3786
|
+
* we build a single library from our project, we no longer mangle the paths.
|
|
3787
|
+
*/
|
|
3788
|
+
const workspacePathFix = dev_env.NODE_ENV === "development"
|
|
3789
|
+
? (workspacePath) => (p) => {
|
|
3790
|
+
if (p.startsWith("/")) {
|
|
3791
|
+
return p;
|
|
3792
|
+
}
|
|
3793
|
+
return `${workspacePath}/${p}`;
|
|
3794
|
+
}
|
|
3795
|
+
: () => (p) => p;
|
|
3796
|
+
|
|
3769
3797
|
;// CONCATENATED MODULE: ./packages/core/utils/opaque.ts
|
|
3770
3798
|
/**
|
|
3771
3799
|
* @fileoverview `Opaque<Type, Token>` constructs a unique type which is a subset of Type with a
|
|
@@ -4109,6 +4137,7 @@ function isResult(x) {
|
|
|
4109
4137
|
|
|
4110
4138
|
|
|
4111
4139
|
|
|
4140
|
+
|
|
4112
4141
|
;// CONCATENATED MODULE: ./packages/core/bytes/bitvec.ts
|
|
4113
4142
|
|
|
4114
4143
|
/**
|