@cookielab.io/oopst 0.6.0 → 0.6.1
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/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -266,7 +266,10 @@ import { fileURLToPath } from "url";
|
|
|
266
266
|
import { NodeFileSystem, NodeServices } from "@effect/platform-node";
|
|
267
267
|
import { Context, Effect as Effect2, FileSystem as FileSystem2, Layer, Stream } from "effect";
|
|
268
268
|
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
|
|
269
|
-
var
|
|
269
|
+
var PACKAGE_JSON_PATHS = [
|
|
270
|
+
fileURLToPath(new URL("../package.json", import.meta.url)),
|
|
271
|
+
fileURLToPath(new URL("../../package.json", import.meta.url))
|
|
272
|
+
];
|
|
270
273
|
var CliConsole = class extends Context.Service()("@oopst/cli/CliConsole") {
|
|
271
274
|
};
|
|
272
275
|
var CliProcess = class extends Context.Service()("@oopst/cli/CliProcess") {
|
|
@@ -306,7 +309,7 @@ function parsePackageMetadata(raw) {
|
|
|
306
309
|
}
|
|
307
310
|
var readPackageMetadata = Effect2.fn("CliPackageMetadata.readPackageMetadata")(function* () {
|
|
308
311
|
const fs = yield* FileSystem2.FileSystem;
|
|
309
|
-
const raw = yield* fs.readFileString(
|
|
312
|
+
const raw = yield* Effect2.firstSuccessOf(PACKAGE_JSON_PATHS.map((path) => fs.readFileString(path, "utf8")));
|
|
310
313
|
return parsePackageMetadata(raw);
|
|
311
314
|
});
|
|
312
315
|
function makeCliConsole(options) {
|