aeria-sdk 0.0.83 → 0.0.84
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/dist/mirror.js +4 -6
- package/dist/mirror.mjs +4 -6
- package/package.json +1 -1
package/dist/mirror.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.mirrorRemotely = exports.writeMirrorFiles = exports.runtimeEsm = exports
|
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const common_1 = require("@aeriajs/common");
|
|
6
6
|
const promises_1 = require("fs/promises");
|
|
7
|
+
const module_1 = require("module");
|
|
7
8
|
const topLevel_js_1 = require("./topLevel.js");
|
|
8
9
|
const utils_js_1 = require("./utils.js");
|
|
9
10
|
const mirrorDts = (mirrorObj, config) => {
|
|
@@ -109,15 +110,12 @@ exports.runtimeEsm = runtimeEsm;
|
|
|
109
110
|
const writeMirrorFiles = async (mirror, config, filesPath = path.join(process.cwd(), '.aeria')) => {
|
|
110
111
|
const resolvedPath = (() => {
|
|
111
112
|
try {
|
|
112
|
-
return require.resolve('aeria
|
|
113
|
+
return require.resolve('aeria-sdk');
|
|
113
114
|
}
|
|
114
115
|
catch (err) {
|
|
115
116
|
}
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
return fileURLToPath(import.meta.resolve('aeria-sdk'))
|
|
119
|
-
})()`);
|
|
120
|
-
return fn();
|
|
117
|
+
const syntheticRequire = (0, module_1.createRequire)(process.cwd());
|
|
118
|
+
return syntheticRequire.resolve('aeria-sdk');
|
|
121
119
|
})();
|
|
122
120
|
const runtimeBase = path.dirname(resolvedPath);
|
|
123
121
|
await (0, promises_1.mkdir)(runtimeBase, {
|
package/dist/mirror.mjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import * as path from "path";
|
|
3
3
|
import { deserialize } from "@aeriajs/common";
|
|
4
4
|
import { writeFile, mkdir } from "fs/promises";
|
|
5
|
+
import { createRequire } from "module";
|
|
5
6
|
import { topLevel } from "./topLevel.mjs";
|
|
6
7
|
import { publicUrl } from "./utils.mjs";
|
|
7
8
|
const mirrorDts = (mirrorObj, config) => {
|
|
@@ -109,14 +110,11 @@ export default aeria
|
|
|
109
110
|
export const writeMirrorFiles = async (mirror, config, filesPath = path.join(process.cwd(), ".aeria")) => {
|
|
110
111
|
const resolvedPath = (() => {
|
|
111
112
|
try {
|
|
112
|
-
return require.resolve("aeria
|
|
113
|
+
return require.resolve("aeria-sdk");
|
|
113
114
|
} catch (err) {
|
|
114
115
|
}
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
return fileURLToPath(import.meta.resolve('aeria-sdk'))
|
|
118
|
-
})()`);
|
|
119
|
-
return fn();
|
|
116
|
+
const syntheticRequire = createRequire(process.cwd());
|
|
117
|
+
return syntheticRequire.resolve("aeria-sdk");
|
|
120
118
|
})();
|
|
121
119
|
const runtimeBase = path.dirname(resolvedPath);
|
|
122
120
|
await mkdir(runtimeBase, {
|