create-relkit 0.7.1 → 0.7.4
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/create-capabilities.d.ts +43 -0
- package/dist/create-capabilities.d.ts.map +1 -0
- package/dist/create-capabilities.js +94 -0
- package/dist/create-capabilities.js.map +1 -0
- package/dist/create-resolver.d.ts.map +1 -1
- package/dist/create-resolver.js +28 -6
- package/dist/create-resolver.js.map +1 -1
- package/dist/generate-output.d.ts +2 -1
- package/dist/generate-output.d.ts.map +1 -1
- package/dist/generate-output.js +19 -37
- package/dist/generate-output.js.map +1 -1
- package/dist/generate-output.schemas.d.ts +34 -0
- package/dist/generate-output.schemas.d.ts.map +1 -0
- package/dist/generate-output.schemas.js +33 -0
- package/dist/generate-output.schemas.js.map +1 -0
- package/dist/generate-output.types.d.ts +2 -0
- package/dist/generate-output.types.d.ts.map +1 -1
- package/dist/generate-preparation.d.ts +26 -0
- package/dist/generate-preparation.d.ts.map +1 -0
- package/dist/generate-preparation.js +83 -0
- package/dist/generate-preparation.js.map +1 -0
- package/dist/generate-result.d.ts +34 -0
- package/dist/generate-result.d.ts.map +1 -0
- package/dist/generate-result.js +41 -0
- package/dist/generate-result.js.map +1 -0
- package/dist/generate-stage.d.ts +21 -0
- package/dist/generate-stage.d.ts.map +1 -0
- package/dist/generate-stage.js +52 -0
- package/dist/generate-stage.js.map +1 -0
- package/dist/generate-stage.types.d.ts +11 -0
- package/dist/generate-stage.types.d.ts.map +1 -0
- package/dist/generate-stage.types.js +2 -0
- package/dist/generate-stage.types.js.map +1 -0
- package/dist/generate-workflow.d.ts +10 -7
- package/dist/generate-workflow.d.ts.map +1 -1
- package/dist/generate-workflow.js +22 -101
- package/dist/generate-workflow.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/templates/default/README.md +1 -1
- package/dist/templates/default/v1/agent/package.json +5 -4
- package/dist/templates/default/v1/agent/src/hello/agents/assistant.agent.ts +1 -1
- package/dist/templates/default/v1/api/package.json +4 -3
- package/dist/templates/default/v1/fullstack/README.md +7 -0
- package/dist/templates/default/v1/fullstack/package.json +7 -6
- package/dist/templates/default/v1/fullstack/src/hello/agents/assistant.agent.ts +1 -1
- package/dist/templates/default/v1/minimal/package.json +4 -3
- package/dist/templates/default/v1/tasks/package.json +4 -3
- package/package.json +3 -3
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds immutable creation output after atomic publication. The final directory
|
|
3
|
+
* is listed after rename; skipped installation reports the finite preparation
|
|
4
|
+
* workflow required before the first prepared development launch.
|
|
5
|
+
*/
|
|
6
|
+
import { Effect } from "effect";
|
|
7
|
+
import type { CreateOptions } from "./options.js";
|
|
8
|
+
import type { GenerateProjectContext } from "./generate-types.js";
|
|
9
|
+
/** Produces the published project's stable output contract.
|
|
10
|
+
* @param options - Normalized creation choices.
|
|
11
|
+
* @param destination - Atomically published final directory.
|
|
12
|
+
* @param gitInitialized - Existing optional Git step result.
|
|
13
|
+
* @param context - Working directory for printed local commands.
|
|
14
|
+
* @returns Frozen output; listing failures retain their original channel.
|
|
15
|
+
*/
|
|
16
|
+
export declare const generationResult: (options: CreateOptions, destination: string, gitInitialized: boolean, context: GenerateProjectContext) => Effect.Effect<Readonly<{
|
|
17
|
+
ok: true;
|
|
18
|
+
command: "create";
|
|
19
|
+
name: string;
|
|
20
|
+
template: "agent" | "minimal" | "api" | "fullstack";
|
|
21
|
+
cloud: "aws" | "none";
|
|
22
|
+
deploy: "none" | "pulumi";
|
|
23
|
+
destination: string;
|
|
24
|
+
files: readonly string[];
|
|
25
|
+
installed: boolean;
|
|
26
|
+
gitInitialized: boolean;
|
|
27
|
+
additions: readonly never[];
|
|
28
|
+
warnings: readonly {
|
|
29
|
+
code: string;
|
|
30
|
+
message: string;
|
|
31
|
+
}[];
|
|
32
|
+
nextSteps: import("./generate-output.types.js").GenerateNextSteps;
|
|
33
|
+
}>, import("./generator-errors.js").GeneratorIoError | import("./generator-errors.js").GeneratorDomainError, import("./generator-filesystem.js").GeneratorFileSystem>;
|
|
34
|
+
//# sourceMappingURL=generate-result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-result.d.ts","sourceRoot":"","sources":["../src/generate-result.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAIlE;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;qKAkC5B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds immutable creation output after atomic publication. The final directory
|
|
3
|
+
* is listed after rename; skipped installation reports the finite preparation
|
|
4
|
+
* workflow required before the first prepared development launch.
|
|
5
|
+
*/
|
|
6
|
+
import { Effect } from "effect";
|
|
7
|
+
import { observeExecution } from "@relkit/contracts/operation";
|
|
8
|
+
import { listProjectFilesEffect } from "./generate-files.js";
|
|
9
|
+
import { createGenerateNextSteps } from "./generate-output.js";
|
|
10
|
+
/** Produces the published project's stable output contract.
|
|
11
|
+
* @param options - Normalized creation choices.
|
|
12
|
+
* @param destination - Atomically published final directory.
|
|
13
|
+
* @param gitInitialized - Existing optional Git step result.
|
|
14
|
+
* @param context - Working directory for printed local commands.
|
|
15
|
+
* @returns Frozen output; listing failures retain their original channel.
|
|
16
|
+
*/
|
|
17
|
+
export const generationResult = Effect.fn("ProjectGeneration.result")(function* (options, destination, gitInitialized, context) {
|
|
18
|
+
return Object.freeze({
|
|
19
|
+
ok: true,
|
|
20
|
+
command: "create",
|
|
21
|
+
name: options.name,
|
|
22
|
+
template: options.template,
|
|
23
|
+
cloud: options.cloud,
|
|
24
|
+
deploy: options.deploy,
|
|
25
|
+
destination,
|
|
26
|
+
files: Object.freeze(yield* listProjectFilesEffect(destination)),
|
|
27
|
+
installed: options.install,
|
|
28
|
+
gitInitialized,
|
|
29
|
+
additions: Object.freeze([]),
|
|
30
|
+
warnings: Object.freeze(!options.install
|
|
31
|
+
? [
|
|
32
|
+
{
|
|
33
|
+
code: "validation-skipped",
|
|
34
|
+
message: "Install dependencies, then run bunx --no-install relkit dev --prepare before bun dev. Preparation includes the source check.",
|
|
35
|
+
},
|
|
36
|
+
]
|
|
37
|
+
: []),
|
|
38
|
+
nextSteps: createGenerateNextSteps(options, destination, context.cwd),
|
|
39
|
+
});
|
|
40
|
+
}, (effect) => observeExecution("generator", "generation.result", effect));
|
|
41
|
+
//# sourceMappingURL=generate-result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-result.js","sourceRoot":"","sources":["../src/generate-result.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,EAAE,CAAC,0BAA0B,CAAC,CACnE,QAAQ,CAAC,EACP,OAAsB,EACtB,WAAmB,EACnB,cAAuB,EACvB,OAA+B;IAE/B,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,EAAE,EAAE,IAAa;QACjB,OAAO,EAAE,QAAiB;QAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,WAAW;QACX,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC;QAChE,SAAS,EAAE,OAAO,CAAC,OAAO;QAC1B,cAAc;QACd,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5B,QAAQ,EAAE,MAAM,CAAC,MAAM,CACrB,CAAC,OAAO,CAAC,OAAO;YACd,CAAC,CAAC;gBACE;oBACE,IAAI,EAAE,oBAAoB;oBAC1B,OAAO,EACL,8HAA8H;iBACjI;aACF;YACH,CAAC,CAAC,EAAE,CACP;QACD,SAAS,EAAE,uBAAuB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC;KACtE,CAAC,CAAC;AACL,CAAC,EACD,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,mBAAmB,EAAE,MAAM,CAAC,CACvE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Effect, Ref } from "effect";
|
|
2
|
+
import { GeneratorFileSystem } from "./generator-filesystem.js";
|
|
3
|
+
import type { GenerateProjectContext } from "./generate-types.js";
|
|
4
|
+
import type { GenerationStage } from "./generate-stage.types.js";
|
|
5
|
+
/** Acquires one private sibling stage with rollback in the calling Scope.
|
|
6
|
+
* @param destination - Already validated final project directory.
|
|
7
|
+
* @param context - Creation cancellation authority.
|
|
8
|
+
* @returns Scoped ownership requiring GeneratorFileSystem; native failures remain typed.
|
|
9
|
+
*/
|
|
10
|
+
export declare const acquireGenerationStage: (destination: string, context: GenerateProjectContext) => Effect.Effect<{
|
|
11
|
+
stage: string;
|
|
12
|
+
published: Ref.Ref<boolean>;
|
|
13
|
+
}, import("./generator-errors.js").GeneratorIoError, GeneratorFileSystem | import("effect/Scope").Scope>;
|
|
14
|
+
/** Atomically transfers a complete installed/prepared stage to the destination.
|
|
15
|
+
* @param owned - Stage acquired in this creation Scope.
|
|
16
|
+
* @param destination - Validated final directory.
|
|
17
|
+
* @param context - Failure injection and cancellation authority.
|
|
18
|
+
* @returns Completion after native rename and ownership bookkeeping settle together.
|
|
19
|
+
*/
|
|
20
|
+
export declare const publishGenerationStage: (owned: GenerationStage, destination: string, context: GenerateProjectContext) => Effect.Effect<void, import("./generator-errors.js").GeneratorIoError | import("./generator-errors.js").GeneratorDomainError, GeneratorFileSystem>;
|
|
21
|
+
//# sourceMappingURL=generate-stage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-stage.d.ts","sourceRoot":"","sources":["../src/generate-stage.ts"],"names":[],"mappings":"AAOA,OAAO,EAAS,MAAM,EAAQ,GAAG,EAAE,MAAM,QAAQ,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAMhE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;wGAgClC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,qOAYlC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Acquires and publishes the sibling directory used by atomic project creation.
|
|
3
|
+
* A Scope removes only its unpublished stage and attaches cleanup disposition
|
|
4
|
+
* to the authoritative failure. Native rename settles before ownership transfers,
|
|
5
|
+
* preventing cancellation from exposing an incomplete destination.
|
|
6
|
+
*/
|
|
7
|
+
import { basename, dirname, join } from "node:path";
|
|
8
|
+
import { Cause, Effect, Exit, Ref } from "effect";
|
|
9
|
+
import { observeExecution } from "@relkit/contracts/operation";
|
|
10
|
+
import { GeneratorFileSystem } from "./generator-filesystem.js";
|
|
11
|
+
import { cleanupStagedProjectEffect } from "./generate-files.js";
|
|
12
|
+
import { recordCleanupFailure } from "./generator-cleanup.js";
|
|
13
|
+
import { recordStageCleanup } from "./generate-stage-cleanup.js";
|
|
14
|
+
import { domainTry } from "./generator-errors.js";
|
|
15
|
+
import { injectGenerateFailure, throwIfAborted } from "./generate-process.js";
|
|
16
|
+
/** Acquires one private sibling stage with rollback in the calling Scope.
|
|
17
|
+
* @param destination - Already validated final project directory.
|
|
18
|
+
* @param context - Creation cancellation authority.
|
|
19
|
+
* @returns Scoped ownership requiring GeneratorFileSystem; native failures remain typed.
|
|
20
|
+
*/
|
|
21
|
+
export const acquireGenerationStage = Effect.fn("ProjectGeneration.acquireStage")(function* (destination, context) {
|
|
22
|
+
const fs = yield* GeneratorFileSystem;
|
|
23
|
+
return yield* Effect.acquireRelease(Effect.gen(function* () {
|
|
24
|
+
yield* fs.mkdir(dirname(destination), { recursive: true, mode: 0o755 });
|
|
25
|
+
const stage = yield* fs.temporaryDirectory(join(dirname(destination), `.${basename(destination)}-relkit-`));
|
|
26
|
+
return { stage, published: yield* Ref.make(false) };
|
|
27
|
+
}), (owned, exit) => Effect.gen(function* () {
|
|
28
|
+
if (yield* Ref.get(owned.published))
|
|
29
|
+
return;
|
|
30
|
+
const cleanup = yield* cleanupStagedProjectEffect(owned.stage, destination).pipe(Effect.catchCause((cause) => Effect.gen(function* () {
|
|
31
|
+
const retained = { temporaryPath: owned.stage, removed: false };
|
|
32
|
+
yield* recordCleanupFailure(Exit.succeed(retained), "stage", Cause.squash(cause));
|
|
33
|
+
return retained;
|
|
34
|
+
})));
|
|
35
|
+
yield* recordStageCleanup(exit, cleanup, context.signal?.aborted ? context.signal : undefined);
|
|
36
|
+
}));
|
|
37
|
+
}, (effect) => observeExecution("generator", "generation.acquireStage", effect));
|
|
38
|
+
/** Atomically transfers a complete installed/prepared stage to the destination.
|
|
39
|
+
* @param owned - Stage acquired in this creation Scope.
|
|
40
|
+
* @param destination - Validated final directory.
|
|
41
|
+
* @param context - Failure injection and cancellation authority.
|
|
42
|
+
* @returns Completion after native rename and ownership bookkeeping settle together.
|
|
43
|
+
*/
|
|
44
|
+
export const publishGenerationStage = Effect.fn("ProjectGeneration.publishStage")(function* (owned, destination, context) {
|
|
45
|
+
yield* domainTry(() => {
|
|
46
|
+
throwIfAborted(context.signal);
|
|
47
|
+
injectGenerateFailure(context, "rename");
|
|
48
|
+
});
|
|
49
|
+
const fs = yield* GeneratorFileSystem;
|
|
50
|
+
yield* Effect.uninterruptible(fs.rename(owned.stage, destination).pipe(Effect.tap(() => Ref.set(owned.published, true))));
|
|
51
|
+
}, (effect) => observeExecution("generator", "generation.publishStage", effect));
|
|
52
|
+
//# sourceMappingURL=generate-stage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-stage.js","sourceRoot":"","sources":["../src/generate-stage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,EAAE,CAAC,gCAAgC,CAAC,CAC/E,QAAQ,CAAC,EAAE,WAAmB,EAAE,OAA+B;IAC7D,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,mBAAmB,CAAC;IACtC,OAA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IAAI,EACJ,OAAO,EACP,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CACrD,CAAC;IACJ,CAAC,CAAC,CACL,CAAC;AACJ,CAAC,EACD,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,yBAAyB,EAAE,MAAM,CAAC,CAC7E,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,EAAE,CAAC,gCAAgC,CAAC,CAC/E,QAAQ,CAAC,EAAE,KAAsB,EAAE,WAAmB,EAAE,OAA+B;IACrF,KAAK,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE;QACpB,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC/B,qBAAqB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IACH,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,mBAAmB,CAAC;IACtC,KAAK,CAAC,CAAC,MAAM,CAAC,eAAe,CAC3B,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAC3F,CAAC;AACJ,CAAC,EACD,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,yBAAyB,EAAE,MAAM,CAAC,CAC7E,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describes one creation transaction's private directory ownership. Publication
|
|
3
|
+
* transfers the directory atomically; before that point the Scope owns cleanup.
|
|
4
|
+
*/
|
|
5
|
+
import type { Ref } from "effect";
|
|
6
|
+
/** A private creation stage and its publication state. */
|
|
7
|
+
export interface GenerationStage {
|
|
8
|
+
readonly stage: string;
|
|
9
|
+
readonly published: Ref.Ref<boolean>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=generate-stage.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-stage.types.d.ts","sourceRoot":"","sources":["../src/generate-stage.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAElC,0DAA0D;AAC1D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;CACtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-stage.types.js","sourceRoot":"","sources":["../src/generate-stage.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Owns atomic creation from normalized options through installed preparation.
|
|
3
|
+
* The creation Scope keeps its private sibling stage until a successful finite
|
|
4
|
+
* check/snapshot operation; failure cleans that stage before the public adapter
|
|
5
|
+
* returns. Published directories transfer to the user.
|
|
6
|
+
*/
|
|
1
7
|
import { Effect } from "effect";
|
|
2
8
|
import type { CreateOptions } from "./options.js";
|
|
3
9
|
import { type GenerateProjectContext } from "./generate-types.js";
|
|
4
|
-
import { GeneratorFileSystem } from "./generator-filesystem.js";
|
|
5
|
-
import { GeneratorProcess } from "./generator-process.js";
|
|
6
10
|
import { GeneratorPrompt } from "./generator-prompt.js";
|
|
7
|
-
/**
|
|
8
|
-
* Validates, prepares, verifies and publishes while a Scope owns the disposable stage.
|
|
11
|
+
/** Validates, prepares and publishes while a Scope owns the disposable stage.
|
|
9
12
|
* @param options - Explicit options retaining existing defaults.
|
|
10
|
-
* @param context - Caller-owned
|
|
11
|
-
* @returns
|
|
13
|
+
* @param context - Caller-owned prompt, process, cancellation and progress settings.
|
|
14
|
+
* @returns Lazy scoped workflow preserving existing public failures and output.
|
|
12
15
|
*/
|
|
13
16
|
export declare const generateEffect: (options: CreateOptions, context: GenerateProjectContext) => Effect.Effect<Readonly<{
|
|
14
17
|
ok: true;
|
|
@@ -27,5 +30,5 @@ export declare const generateEffect: (options: CreateOptions, context: GenerateP
|
|
|
27
30
|
message: string;
|
|
28
31
|
}[];
|
|
29
32
|
nextSteps: import("./generate-output.types.js").GenerateNextSteps;
|
|
30
|
-
}>, import("./generator-errors.js").GeneratorIoError | import("./generator-errors.js").GeneratorProcessError | import("./generator-errors.js").GeneratorPromptError | import("./generator-errors.js").GeneratorDomainError, GeneratorFileSystem | GeneratorProcess | import("./generator-paths.js").GeneratorPaths | GeneratorPrompt>;
|
|
33
|
+
}>, import("./generator-errors.js").GeneratorIoError | import("./generator-errors.js").GeneratorProcessError | import("./generator-errors.js").GeneratorPromptError | import("./generator-errors.js").GeneratorDomainError, import("./generator-filesystem.js").GeneratorFileSystem | import("./generator-process.js").GeneratorProcess | import("./generator-paths.js").GeneratorPaths | GeneratorPrompt>;
|
|
31
34
|
//# sourceMappingURL=generate-workflow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-workflow.d.ts","sourceRoot":"","sources":["../src/generate-workflow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-workflow.d.ts","sourceRoot":"","sources":["../src/generate-workflow.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAAwB,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAUxD;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;0YA+B1B,CAAC"}
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Owns atomic creation from normalized options through installed preparation.
|
|
3
|
+
* The creation Scope keeps its private sibling stage until a successful finite
|
|
4
|
+
* check/snapshot operation; failure cleans that stage before the public adapter
|
|
5
|
+
* returns. Published directories transfer to the user.
|
|
6
|
+
*/
|
|
7
|
+
import { Effect } from "effect";
|
|
3
8
|
import { observeExecution } from "@relkit/contracts/operation";
|
|
4
9
|
import { validateCreateOptionsEffect } from "./validate.js";
|
|
5
|
-
import { injectGenerateFailure, resolveRelkitExecutableEffect, runProjectStepEffect, throwIfAborted, } from "./generate-process.js";
|
|
6
|
-
import { copyTemplateEffect, cleanupStagedProjectEffect, customizeProjectEffect, listProjectFilesEffect, requireFilesEffect, requireTemplateEffect, } from "./generate-files.js";
|
|
7
|
-
import { createGenerateNextSteps } from "./generate-output.js";
|
|
8
|
-
import { prepareProjectDependencyPatchEffect } from "./dependency-patches.js";
|
|
9
|
-
import { resolveTemplateRootEffect } from "./template-root.js";
|
|
10
10
|
import { GenerateProjectError } from "./generate-types.js";
|
|
11
|
-
import { GeneratorFileSystem } from "./generator-filesystem.js";
|
|
12
|
-
import { GeneratorProcess } from "./generator-process.js";
|
|
13
11
|
import { GeneratorPrompt } from "./generator-prompt.js";
|
|
14
|
-
import { domainError
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
import { domainError } from "./generator-errors.js";
|
|
13
|
+
import { acquireGenerationStage, publishGenerationStage } from "./generate-stage.js";
|
|
14
|
+
import { materializeGenerationStage, installGenerationStage, verifyGenerationStage, } from "./generate-preparation.js";
|
|
15
|
+
import { generationResult } from "./generate-result.js";
|
|
16
|
+
/** Validates, prepares and publishes while a Scope owns the disposable stage.
|
|
19
17
|
* @param options - Explicit options retaining existing defaults.
|
|
20
|
-
* @param context - Caller-owned
|
|
21
|
-
* @returns
|
|
18
|
+
* @param context - Caller-owned prompt, process, cancellation and progress settings.
|
|
19
|
+
* @returns Lazy scoped workflow preserving existing public failures and output.
|
|
22
20
|
*/
|
|
23
21
|
export const generateEffect = Effect.fn("ProjectGeneration.execute")((options, context) => Effect.scoped(Effect.gen(function* () {
|
|
24
22
|
const validated = yield* validateCreateOptionsEffect(options, context.cwd === undefined ? {} : { cwd: context.cwd });
|
|
@@ -26,92 +24,15 @@ export const generateEffect = Effect.fn("ProjectGeneration.execute")((options, c
|
|
|
26
24
|
!(yield* (yield* GeneratorPrompt).confirm({
|
|
27
25
|
message: "Create this project?",
|
|
28
26
|
initialValue: true,
|
|
29
|
-
})))
|
|
27
|
+
}))) {
|
|
30
28
|
return yield* Effect.fail(domainError(new GenerateProjectError("RELKIT_CREATE_CANCELLED", "Scaffolding was cancelled.")));
|
|
31
|
-
context.onProgress?.(`Creating a new RELKIT app in ${validated.destination}.`);
|
|
32
|
-
const fs = yield* GeneratorFileSystem;
|
|
33
|
-
const templateRoot = yield* resolveTemplateRootEffect(context);
|
|
34
|
-
const template = join(templateRoot, options.jobs === undefined ? options.template : "tasks");
|
|
35
|
-
yield* requireTemplateEffect(template);
|
|
36
|
-
const owned = yield* Effect.acquireRelease(Effect.gen(function* () {
|
|
37
|
-
yield* fs.mkdir(dirname(validated.destination), { recursive: true, mode: 0o755 });
|
|
38
|
-
const stage = yield* fs.temporaryDirectory(join(dirname(validated.destination), `.${basename(validated.destination)}-relkit-`));
|
|
39
|
-
return { stage, published: yield* Ref.make(false) };
|
|
40
|
-
}), (owned, exit) => Effect.gen(function* () {
|
|
41
|
-
if (yield* Ref.get(owned.published))
|
|
42
|
-
return;
|
|
43
|
-
const cleanup = yield* cleanupStagedProjectEffect(owned.stage, validated.destination).pipe(Effect.catchCause((cause) => Effect.gen(function* () {
|
|
44
|
-
const retained = { temporaryPath: owned.stage, removed: false };
|
|
45
|
-
yield* recordCleanupFailure(Exit.succeed(retained), "stage", Cause.squash(cause));
|
|
46
|
-
return retained;
|
|
47
|
-
})));
|
|
48
|
-
yield* recordStageCleanup(exit, cleanup, context.signal?.aborted ? context.signal : undefined);
|
|
49
|
-
}));
|
|
50
|
-
yield* domainTry(() => injectGenerateFailure(context, "copy"));
|
|
51
|
-
yield* copyTemplateEffect(template, owned.stage);
|
|
52
|
-
yield* domainTry(() => injectGenerateFailure(context, "substitute"));
|
|
53
|
-
yield* customizeProjectEffect(owned.stage, options);
|
|
54
|
-
yield* requireFilesEffect(owned.stage, [
|
|
55
|
-
"package.json",
|
|
56
|
-
"relkit.config.ts",
|
|
57
|
-
"src/platform/env.ts",
|
|
58
|
-
".env.example",
|
|
59
|
-
".gitignore",
|
|
60
|
-
]);
|
|
61
|
-
yield* prepareProjectDependencyPatchEffect(owned.stage);
|
|
62
|
-
if (options.install) {
|
|
63
|
-
context.onProgress?.("Installing dependencies...");
|
|
64
|
-
yield* runProjectStepEffect(context, [context.bunExecutable ?? globalThis.process.execPath, "install"], owned.stage, "install", "install");
|
|
65
29
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (options.install) {
|
|
74
|
-
const relkit = yield* resolveRelkitExecutableEffect(context, owned.stage);
|
|
75
|
-
context.onProgress?.("Checking generated project...");
|
|
76
|
-
yield* runProjectStepEffect(context, [
|
|
77
|
-
relkit,
|
|
78
|
-
"doctor",
|
|
79
|
-
"--project-root",
|
|
80
|
-
owned.stage,
|
|
81
|
-
"--no-ports",
|
|
82
|
-
...(options.cloud === "none" || options.deploy === "none" ? ["--no-pulumi"] : []),
|
|
83
|
-
], owned.stage, "doctor", "doctor");
|
|
84
|
-
yield* runProjectStepEffect(context, [relkit, "check", "--project-root", owned.stage], owned.stage, "check", "check");
|
|
85
|
-
}
|
|
86
|
-
yield* domainTry(() => {
|
|
87
|
-
throwIfAborted(context.signal);
|
|
88
|
-
injectGenerateFailure(context, "rename");
|
|
89
|
-
});
|
|
90
|
-
// Native rename and publication bookkeeping settle as one atomic ownership handoff.
|
|
91
|
-
yield* Effect.uninterruptible(fs
|
|
92
|
-
.rename(owned.stage, validated.destination)
|
|
93
|
-
.pipe(Effect.tap(() => Ref.set(owned.published, true))));
|
|
94
|
-
return Object.freeze({
|
|
95
|
-
ok: true,
|
|
96
|
-
command: "create",
|
|
97
|
-
name: options.name,
|
|
98
|
-
template: options.template,
|
|
99
|
-
cloud: options.cloud,
|
|
100
|
-
deploy: options.deploy,
|
|
101
|
-
destination: validated.destination,
|
|
102
|
-
files: Object.freeze(yield* listProjectFilesEffect(validated.destination)),
|
|
103
|
-
installed: options.install,
|
|
104
|
-
gitInitialized,
|
|
105
|
-
additions: Object.freeze([]),
|
|
106
|
-
warnings: Object.freeze(!options.install
|
|
107
|
-
? [
|
|
108
|
-
{
|
|
109
|
-
code: "validation-skipped",
|
|
110
|
-
message: "Install dependencies, then run bun run check.",
|
|
111
|
-
},
|
|
112
|
-
]
|
|
113
|
-
: []),
|
|
114
|
-
nextSteps: createGenerateNextSteps(options, validated.destination, context.cwd),
|
|
115
|
-
});
|
|
30
|
+
context.onProgress?.(`Creating a new RELKIT app in ${validated.destination}.`);
|
|
31
|
+
const owned = yield* acquireGenerationStage(validated.destination, context);
|
|
32
|
+
yield* materializeGenerationStage(owned.stage, options, context);
|
|
33
|
+
const gitInitialized = yield* installGenerationStage(owned.stage, options, context);
|
|
34
|
+
yield* verifyGenerationStage(owned.stage, options, context);
|
|
35
|
+
yield* publishGenerationStage(owned, validated.destination, context);
|
|
36
|
+
return yield* generationResult(options, validated.destination, gitInitialized, context);
|
|
116
37
|
})), (effect) => observeExecution("generator", "generation.execute", effect));
|
|
117
38
|
//# sourceMappingURL=generate-workflow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-workflow.js","sourceRoot":"","sources":["../src/generate-workflow.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"generate-workflow.js","sourceRoot":"","sources":["../src/generate-work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E,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AAErC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAq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CAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC"}
|
|
@@ -8,6 +8,6 @@ scaffolder:
|
|
|
8
8
|
- `agent` — the minimal example plus a read-only tool and agent descriptor.
|
|
9
9
|
|
|
10
10
|
Each variant is self-contained and can be copied as a project root. It uses
|
|
11
|
-
the current checked-in RelKit package version (`0.7.
|
|
11
|
+
the current checked-in RelKit package version (`0.7.4`), Bun `1.3.10`, and
|
|
12
12
|
TypeScript `5.9.3`. The generator owns project-name substitution and later
|
|
13
13
|
installation/Git behavior.
|
|
@@ -16,14 +16,15 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@langchain/langgraph": "1.4.14",
|
|
19
|
-
"@relkit/app": "0.7.
|
|
20
|
-
"@relkit/local": "0.7.
|
|
19
|
+
"@relkit/app": "0.7.4",
|
|
20
|
+
"@relkit/local": "0.7.4",
|
|
21
|
+
"effect": "4.0.1",
|
|
21
22
|
"langchain": "1.5.10"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"@types/bun": "1.3.10",
|
|
25
|
-
"@relkit/cli": "0.7.
|
|
26
|
-
"@relkit/testing": "0.7.
|
|
26
|
+
"@relkit/cli": "0.7.4",
|
|
27
|
+
"@relkit/testing": "0.7.4",
|
|
27
28
|
"typescript": "5.9.3"
|
|
28
29
|
}
|
|
29
30
|
}
|
|
@@ -3,7 +3,7 @@ import { z } from "@relkit/app/schema";
|
|
|
3
3
|
import { FakeToolCallingModel, todoListMiddleware, tool } from "langchain";
|
|
4
4
|
import lookup from "@app/hello/tools/lookup.tool.js";
|
|
5
5
|
|
|
6
|
-
export const uppercase = tool(async ({ text }) => text.toUpperCase(), {
|
|
6
|
+
export const uppercase = tool(async ({ text }: { readonly text: string }) => text.toUpperCase(), {
|
|
7
7
|
name: "uppercase",
|
|
8
8
|
description: "Uppercase text without leaving the process",
|
|
9
9
|
schema: z.object({ text: z.string() }),
|
|
@@ -15,12 +15,13 @@
|
|
|
15
15
|
"graph": "relkit graph print"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@relkit/app": "0.7.
|
|
18
|
+
"@relkit/app": "0.7.4",
|
|
19
|
+
"effect": "4.0.1"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
22
|
"@types/bun": "1.3.10",
|
|
22
|
-
"@relkit/cli": "0.7.
|
|
23
|
-
"@relkit/testing": "0.7.
|
|
23
|
+
"@relkit/cli": "0.7.4",
|
|
24
|
+
"@relkit/testing": "0.7.4",
|
|
24
25
|
"typescript": "5.9.3"
|
|
25
26
|
}
|
|
26
27
|
}
|
|
@@ -8,8 +8,15 @@ port 3001, and the Inspector on port 3210.
|
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
bun install
|
|
11
|
+
bunx --no-install relkit dev --prepare
|
|
11
12
|
bun run dev
|
|
12
13
|
bun run test
|
|
13
14
|
bun run typecheck
|
|
14
15
|
bun run build
|
|
15
16
|
```
|
|
17
|
+
|
|
18
|
+
Creation with installation prepares the backend automatically. If installation
|
|
19
|
+
was skipped, the finite preparation command above validates and prepares it after
|
|
20
|
+
`bun install`. The API and Next.js commands start independently; `bun run dev:api`
|
|
21
|
+
and `bun run dev:web` can also be used separately. Backend readiness does not
|
|
22
|
+
mean the Next.js page or Inspector has finished starting.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "module",
|
|
5
5
|
"packageManager": "bun@1.3.10",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"dev": "bun run
|
|
7
|
+
"dev": "bun run --parallel dev:api dev:web",
|
|
8
8
|
"dev:api": "RELKIT_ALLOWED_ORIGINS=http://127.0.0.1:3001 relkit dev",
|
|
9
9
|
"dev:web": "next dev web --hostname 127.0.0.1 --port 3001",
|
|
10
10
|
"check": "relkit check",
|
|
@@ -15,18 +15,19 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@langchain/langgraph": "1.4.14",
|
|
18
|
-
"@relkit/app": "0.7.
|
|
19
|
-
"@relkit/client": "0.7.
|
|
20
|
-
"@relkit/local": "0.7.
|
|
18
|
+
"@relkit/app": "0.7.4",
|
|
19
|
+
"@relkit/client": "0.7.4",
|
|
20
|
+
"@relkit/local": "0.7.4",
|
|
21
21
|
"@tanstack/react-query": "5.102.3",
|
|
22
|
+
"effect": "4.0.1",
|
|
22
23
|
"langchain": "1.5.10",
|
|
23
24
|
"next": "16.3.8",
|
|
24
25
|
"react": "19.2.8",
|
|
25
26
|
"react-dom": "19.2.8"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
|
-
"@relkit/cli": "0.7.
|
|
29
|
-
"@relkit/testing": "0.7.
|
|
29
|
+
"@relkit/cli": "0.7.4",
|
|
30
|
+
"@relkit/testing": "0.7.4",
|
|
30
31
|
"@types/bun": "1.3.10",
|
|
31
32
|
"@types/react": "19.2.18",
|
|
32
33
|
"@types/react-dom": "19.2.7",
|
|
@@ -3,7 +3,7 @@ import { z } from "@relkit/app/schema";
|
|
|
3
3
|
import { FakeToolCallingModel, todoListMiddleware, tool } from "langchain";
|
|
4
4
|
import lookup from "@app/hello/tools/lookup.tool.js";
|
|
5
5
|
|
|
6
|
-
const uppercase = tool(async ({ text }) => text.toUpperCase(), {
|
|
6
|
+
const uppercase = tool(async ({ text }: { readonly text: string }) => text.toUpperCase(), {
|
|
7
7
|
name: "uppercase",
|
|
8
8
|
description: "Uppercase text without leaving the process",
|
|
9
9
|
schema: z.object({ text: z.string() }),
|
|
@@ -15,12 +15,13 @@
|
|
|
15
15
|
"graph": "relkit graph print"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@relkit/app": "0.7.
|
|
18
|
+
"@relkit/app": "0.7.4",
|
|
19
|
+
"effect": "4.0.1"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
22
|
"@types/bun": "1.3.10",
|
|
22
|
-
"@relkit/cli": "0.7.
|
|
23
|
-
"@relkit/testing": "0.7.
|
|
23
|
+
"@relkit/cli": "0.7.4",
|
|
24
|
+
"@relkit/testing": "0.7.4",
|
|
24
25
|
"typescript": "5.9.3"
|
|
25
26
|
}
|
|
26
27
|
}
|
|
@@ -13,12 +13,13 @@
|
|
|
13
13
|
"jobs:trigger": "relkit jobs trigger --job exportOrders --input-file examples/export-orders.json --operation-id example-trigger"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@relkit/app": "0.7.
|
|
16
|
+
"@relkit/app": "0.7.4",
|
|
17
|
+
"effect": "4.0.1"
|
|
17
18
|
},
|
|
18
19
|
"devDependencies": {
|
|
19
20
|
"@types/bun": "1.3.10",
|
|
20
|
-
"@relkit/cli": "0.7.
|
|
21
|
-
"@relkit/testing": "0.7.
|
|
21
|
+
"@relkit/cli": "0.7.4",
|
|
22
|
+
"@relkit/testing": "0.7.4",
|
|
22
23
|
"typescript": "5.9.3"
|
|
23
24
|
}
|
|
24
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-relkit",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Create a RELKIT application from a supported project template.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@clack/prompts": "1.7.0",
|
|
47
|
-
"@relkit/compiler": "0.7.
|
|
47
|
+
"@relkit/compiler": "0.7.4",
|
|
48
48
|
"typescript": "5.9.3",
|
|
49
49
|
"effect": "4.0.1",
|
|
50
|
-
"@relkit/contracts": "0.7.
|
|
50
|
+
"@relkit/contracts": "0.7.4"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@effect/vitest": "4.0.1",
|