@kitman-sh/sdk 0.10.54 → 0.10.55
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/build/index.js +5 -2
- package/package.json +1 -1
- package/types/packages/live/src/rpc/runner-group.d.ts +1467 -1467
package/dist/build/index.js
CHANGED
|
@@ -172,6 +172,7 @@ import * as Path from "effect/Path";
|
|
|
172
172
|
import * as Predicate2 from "effect/Predicate";
|
|
173
173
|
import * as Schema3 from "effect/Schema";
|
|
174
174
|
import * as Stream from "effect/Stream";
|
|
175
|
+
import * as SecureRandom from "effect/crypto/SecureRandom";
|
|
175
176
|
import { Base64 } from "effect/encoding";
|
|
176
177
|
import * as FetchHttpClient2 from "effect/http/FetchHttpClient";
|
|
177
178
|
import * as HttpClient2 from "effect/http/HttpClient";
|
|
@@ -514,7 +515,9 @@ var buildKit = (directory, options = {}) => Effect2.gen(function* () {
|
|
|
514
515
|
if (!installed.ok)
|
|
515
516
|
return yield* new DependencyInstallFailed({ reason: failure(installed) });
|
|
516
517
|
const packages = yield* kitModules(root);
|
|
517
|
-
const
|
|
518
|
+
const id = yield* SecureRandom.SecureRandom.pipe(Effect2.flatMap((random) => random.uuidV4()), Effect2.provide(SecureRandom.layerWebCrypto));
|
|
519
|
+
const entryName = `.kitman-build-entry-${id}.ts`;
|
|
520
|
+
const entry = path.join(root, entryName);
|
|
518
521
|
yield* Effect2.acquireRelease(fs.writeFileString(entry, buildEntry(identity, packages)), () => Effect2.ignore(fs.remove(entry)));
|
|
519
522
|
const out = yield* fs.makeTempDirectoryScoped({ prefix: "kitman-kit-" });
|
|
520
523
|
const bundleFile = path.join(out, "bundle.js");
|
|
@@ -580,7 +583,7 @@ var buildKit = (directory, options = {}) => Effect2.gen(function* () {
|
|
|
580
583
|
...own.schedules === undefined ? undefined : { schedules: own.schedules },
|
|
581
584
|
carried
|
|
582
585
|
}).pipe(Effect2.mapError((error) => new DeclarationsInvalid({ reason: error.message })));
|
|
583
|
-
const bundle = yield* fs.
|
|
586
|
+
const bundle = yield* fs.readFileString(bundleFile).pipe(Effect2.map((text) => new TextEncoder().encode(text.replaceAll(entryName, ".kitman-build-entry.ts"))), Effect2.mapError((error) => new BundleFailed({ reason: error.message })));
|
|
584
587
|
return {
|
|
585
588
|
...identity,
|
|
586
589
|
bundle,
|