@agoric/internal 0.2.2-dev-263cf78.0 → 0.2.2-dev-e1ec5fc.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.
- package/package.json +2 -2
- package/src/createBundles.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/internal",
|
|
3
|
-
"version": "0.2.2-dev-
|
|
3
|
+
"version": "0.2.2-dev-e1ec5fc.0+e1ec5fc",
|
|
4
4
|
"description": "Externally unsupported utilities internal to agoric-sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "e1ec5fc9e28b88fe8a727ddb7287adbbec048ea9"
|
|
41
41
|
}
|
package/src/createBundles.js
CHANGED
|
@@ -3,10 +3,10 @@ import { spawnSync } from 'child_process';
|
|
|
3
3
|
import { createRequire } from 'module';
|
|
4
4
|
|
|
5
5
|
const BUNDLE_SOURCE_PROGRAM = 'bundle-source';
|
|
6
|
-
const
|
|
6
|
+
const req = createRequire(import.meta.url);
|
|
7
7
|
|
|
8
8
|
export const createBundlesFromAbsolute = async sourceBundles => {
|
|
9
|
-
const prog =
|
|
9
|
+
const prog = req.resolve(`.bin/${BUNDLE_SOURCE_PROGRAM}`);
|
|
10
10
|
|
|
11
11
|
const cacheToArgs = new Map();
|
|
12
12
|
for (const [srcPath, bundlePath] of sourceBundles) {
|
|
@@ -35,7 +35,7 @@ export const createBundlesFromAbsolute = async sourceBundles => {
|
|
|
35
35
|
|
|
36
36
|
export const createBundles = async (sourceBundles, dirname = '.') => {
|
|
37
37
|
const absBundleSources = sourceBundles.map(([srcPath, bundlePath]) => [
|
|
38
|
-
|
|
38
|
+
req.resolve(srcPath, { paths: [dirname] }),
|
|
39
39
|
path.resolve(dirname, bundlePath),
|
|
40
40
|
]);
|
|
41
41
|
return createBundlesFromAbsolute(absBundleSources);
|
|
@@ -54,7 +54,7 @@ export const extractProposalBundles = async (
|
|
|
54
54
|
const install = async (src, bundleName) => {
|
|
55
55
|
if (bundleName) {
|
|
56
56
|
const bundlePath = path.resolve(home, bundleName);
|
|
57
|
-
const srcPath =
|
|
57
|
+
const srcPath = req.resolve(src, { paths: [home] });
|
|
58
58
|
if (toBundle.has(bundlePath)) {
|
|
59
59
|
const oldSrc = toBundle.get(bundlePath);
|
|
60
60
|
assert.equal(
|