create-relkit 0.7.2 → 0.7.6
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 +34 -0
- package/dist/create-capabilities.d.ts.map +1 -0
- package/dist/create-capabilities.js +137 -0
- package/dist/create-capabilities.js.map +1 -0
- package/dist/create-capabilities.types.d.ts +55 -0
- package/dist/create-capabilities.types.d.ts.map +1 -0
- package/dist/create-capabilities.types.js +2 -0
- package/dist/create-capabilities.types.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/domain-artifact.d.ts.map +1 -1
- package/dist/domain-artifact.js +11 -3
- package/dist/domain-artifact.js.map +1 -1
- package/dist/domain-planning.d.ts +5 -0
- package/dist/domain-planning.d.ts.map +1 -1
- package/dist/domain-planning.js +25 -16
- package/dist/domain-planning.js.map +1 -1
- package/dist/generate-deployment-manifest.d.ts +10 -0
- package/dist/generate-deployment-manifest.d.ts.map +1 -0
- package/dist/generate-deployment-manifest.js +56 -0
- package/dist/generate-deployment-manifest.js.map +1 -0
- package/dist/generate-deployment.d.ts +2 -3
- package/dist/generate-deployment.d.ts.map +1 -1
- package/dist/generate-deployment.js +6 -47
- package/dist/generate-deployment.js.map +1 -1
- package/dist/generate-examples.d.ts +11 -0
- package/dist/generate-examples.d.ts.map +1 -0
- package/dist/generate-examples.js +28 -0
- package/dist/generate-examples.js.map +1 -0
- package/dist/generate-files-utilities.d.ts +1 -8
- package/dist/generate-files-utilities.d.ts.map +1 -1
- package/dist/generate-files-utilities.js +5 -19
- package/dist/generate-files-utilities.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/project-discovery-artifacts.d.ts +15 -0
- package/dist/project-discovery-artifacts.d.ts.map +1 -0
- package/dist/project-discovery-artifacts.js +107 -0
- package/dist/project-discovery-artifacts.js.map +1 -0
- package/dist/project-discovery-artifacts.types.d.ts +22 -0
- package/dist/project-discovery-artifacts.types.d.ts.map +1 -0
- package/dist/project-discovery-artifacts.types.js +2 -0
- package/dist/project-discovery-artifacts.types.js.map +1 -0
- package/dist/project-discovery-facts.d.ts +8 -9
- package/dist/project-discovery-facts.d.ts.map +1 -1
- package/dist/project-discovery-facts.js +29 -135
- package/dist/project-discovery-facts.js.map +1 -1
- package/dist/project-discovery-members.d.ts +16 -0
- package/dist/project-discovery-members.d.ts.map +1 -0
- package/dist/project-discovery-members.js +57 -0
- package/dist/project-discovery-members.js.map +1 -0
- package/dist/project-discovery-types.d.ts +8 -0
- package/dist/project-discovery-types.d.ts.map +1 -1
- package/dist/render-auth-database.d.ts +33 -0
- package/dist/render-auth-database.d.ts.map +1 -0
- package/dist/render-auth-database.js +69 -0
- package/dist/render-auth-database.js.map +1 -0
- package/dist/render-auth-sources.d.ts +8 -2
- package/dist/render-auth-sources.d.ts.map +1 -1
- package/dist/render-auth-sources.js +9 -3
- package/dist/render-auth-sources.js.map +1 -1
- package/dist/render-auth.d.ts +14 -11
- package/dist/render-auth.d.ts.map +1 -1
- package/dist/render-auth.js +41 -108
- package/dist/render-auth.js.map +1 -1
- package/dist/render-database-sources.d.ts +7 -1
- package/dist/render-database-sources.d.ts.map +1 -1
- package/dist/render-database-sources.js +3 -2
- package/dist/render-database-sources.js.map +1 -1
- package/dist/render-database.d.ts +7 -10
- package/dist/render-database.d.ts.map +1 -1
- package/dist/render-database.js +12 -4
- package/dist/render-database.js.map +1 -1
- package/dist/render-database.types.d.ts +15 -0
- package/dist/render-database.types.d.ts.map +1 -0
- package/dist/render-database.types.js +2 -0
- package/dist/render-database.types.js.map +1 -0
- package/dist/render-route-sources.d.ts +3 -1
- package/dist/render-route-sources.d.ts.map +1 -1
- package/dist/render-route-sources.js +4 -2
- package/dist/render-route-sources.js.map +1 -1
- package/dist/render-routes.d.ts +1 -0
- package/dist/render-routes.d.ts.map +1 -1
- package/dist/render-routes.js +2 -1
- package/dist/render-routes.js.map +1 -1
- package/dist/render-service-members.d.ts +32 -0
- package/dist/render-service-members.d.ts.map +1 -0
- package/dist/render-service-members.js +61 -0
- package/dist/render-service-members.js.map +1 -0
- package/dist/render-service-requests.d.ts +35 -0
- package/dist/render-service-requests.d.ts.map +1 -0
- package/dist/render-service-requests.js +62 -0
- package/dist/render-service-requests.js.map +1 -0
- package/dist/render-service-support.d.ts +37 -0
- package/dist/render-service-support.d.ts.map +1 -0
- package/dist/render-service-support.js +74 -0
- package/dist/render-service-support.js.map +1 -0
- package/dist/render-service.d.ts +16 -13
- package/dist/render-service.d.ts.map +1 -1
- package/dist/render-service.js +33 -149
- package/dist/render-service.js.map +1 -1
- package/dist/render-service.types.d.ts +13 -0
- package/dist/render-service.types.d.ts.map +1 -0
- package/dist/render-service.types.js +2 -0
- package/dist/render-service.types.js.map +1 -0
- package/dist/scaffold-layout.d.ts +10 -0
- package/dist/scaffold-layout.d.ts.map +1 -0
- package/dist/scaffold-layout.js +29 -0
- package/dist/scaffold-layout.js.map +1 -0
- package/dist/templates/default/README.md +1 -1
- package/dist/templates/default/v1/agent/.agents/skills/relkit/SKILL.md +48 -0
- package/dist/templates/default/v1/agent/.agents/skills/relkit/references/agent-apis.md +59 -0
- package/dist/templates/default/v1/agent/.agents/skills/relkit/references/cli.md +63 -0
- package/dist/templates/default/v1/agent/.agents/skills/relkit/references/config-environments.md +96 -0
- package/dist/templates/default/v1/agent/.agents/skills/relkit/references/data-apis.md +74 -0
- package/dist/templates/default/v1/agent/.agents/skills/relkit/references/domain-apis.md +92 -0
- package/dist/templates/default/v1/agent/.agents/skills/relkit/references/http-apis.md +70 -0
- package/dist/templates/default/v1/agent/.agents/skills/relkit/references/jobs-apis.md +49 -0
- package/dist/templates/default/v1/agent/.agents/skills/relkit/references/layout-migration.md +35 -0
- package/dist/templates/default/v1/agent/.agents/skills/relkit/references/observability-apis.md +53 -0
- package/dist/templates/default/v1/agent/.agents/skills/relkit/references/realtime-apis.md +98 -0
- package/dist/templates/default/v1/agent/.agents/skills/relkit/references/streaming-apis.md +75 -0
- package/dist/templates/default/v1/agent/.agents/skills/relkit/references/testing-apis.md +71 -0
- package/dist/templates/default/v1/agent/README.md +9 -0
- package/dist/templates/default/v1/agent/package.json +5 -4
- package/dist/templates/default/v1/agent/src/routes/hello/route.ts +2 -1
- package/dist/templates/default/v1/agent/src/{hello → services/hello}/agents/assistant.agent.ts +3 -2
- package/dist/templates/default/v1/agent/src/{hello → services/hello}/agents/review.agent.ts +1 -0
- package/dist/templates/default/v1/agent/src/{hello → services/hello}/functions/hello.function.ts +7 -0
- package/dist/templates/default/v1/agent/src/services/hello/service.ts +5 -0
- package/dist/templates/default/v1/agent/src/{hello → services/hello}/tools/lookup.tool.ts +2 -1
- package/dist/templates/default/v1/agent/tests/fixtures/lookup.tool.ts +2 -1
- package/dist/templates/default/v1/agent/tests/fixtures/mcp-options.ts +2 -1
- package/dist/templates/default/v1/agent/tests/unit/assistant.agent.test.ts +3 -2
- package/dist/templates/default/v1/agent/tests/unit/hello.function.test.ts +2 -1
- package/dist/templates/default/v1/agent/tests/unit/lookup.tool.test.ts +2 -1
- package/dist/templates/default/v1/agent/tests/unit/review.agent.test.ts +2 -1
- package/dist/templates/default/v1/agent/tsconfig.json +1 -0
- package/dist/templates/default/v1/api/.agents/skills/relkit/SKILL.md +48 -0
- package/dist/templates/default/v1/api/.agents/skills/relkit/references/agent-apis.md +59 -0
- package/dist/templates/default/v1/api/.agents/skills/relkit/references/cli.md +63 -0
- package/dist/templates/default/v1/api/.agents/skills/relkit/references/config-environments.md +96 -0
- package/dist/templates/default/v1/api/.agents/skills/relkit/references/data-apis.md +74 -0
- package/dist/templates/default/v1/api/.agents/skills/relkit/references/domain-apis.md +92 -0
- package/dist/templates/default/v1/api/.agents/skills/relkit/references/http-apis.md +70 -0
- package/dist/templates/default/v1/api/.agents/skills/relkit/references/jobs-apis.md +49 -0
- package/dist/templates/default/v1/api/.agents/skills/relkit/references/layout-migration.md +35 -0
- package/dist/templates/default/v1/api/.agents/skills/relkit/references/observability-apis.md +53 -0
- package/dist/templates/default/v1/api/.agents/skills/relkit/references/realtime-apis.md +98 -0
- package/dist/templates/default/v1/api/.agents/skills/relkit/references/streaming-apis.md +75 -0
- package/dist/templates/default/v1/api/.agents/skills/relkit/references/testing-apis.md +71 -0
- package/dist/templates/default/v1/api/README.md +10 -0
- package/dist/templates/default/v1/api/package.json +4 -3
- package/dist/templates/default/v1/api/src/routes/echo/route.ts +2 -1
- package/dist/templates/default/v1/api/src/routes/hello/route.ts +2 -1
- package/dist/templates/default/v1/api/src/routes/orders/route.ts +2 -1
- package/dist/templates/default/v1/api/src/{echo → services/echo}/functions/echo.function.ts +1 -0
- package/dist/templates/default/v1/api/src/services/echo/service.ts +5 -0
- package/dist/templates/default/v1/api/src/{hello → services/hello}/functions/hello.function.ts +7 -0
- package/dist/templates/default/v1/api/src/services/hello/service.ts +5 -0
- package/dist/templates/default/v1/api/src/{orders → services/orders}/functions/create-order.function.ts +2 -1
- package/dist/templates/default/v1/api/src/{orders → services/orders}/functions/price-order.function.ts +1 -0
- package/dist/templates/default/v1/api/src/services/orders/service.ts +8 -0
- package/dist/templates/default/v1/api/tests/unit/echo.function.test.ts +2 -1
- package/dist/templates/default/v1/api/tests/unit/hello.function.test.ts +2 -1
- package/dist/templates/default/v1/api/tests/unit/orders.function.test.ts +2 -1
- package/dist/templates/default/v1/api/tsconfig.json +1 -0
- package/dist/templates/default/v1/fullstack/.agents/skills/relkit/SKILL.md +48 -0
- package/dist/templates/default/v1/fullstack/.agents/skills/relkit/references/agent-apis.md +59 -0
- package/dist/templates/default/v1/fullstack/.agents/skills/relkit/references/cli.md +63 -0
- package/dist/templates/default/v1/fullstack/.agents/skills/relkit/references/config-environments.md +96 -0
- package/dist/templates/default/v1/fullstack/.agents/skills/relkit/references/data-apis.md +74 -0
- package/dist/templates/default/v1/fullstack/.agents/skills/relkit/references/domain-apis.md +92 -0
- package/dist/templates/default/v1/fullstack/.agents/skills/relkit/references/http-apis.md +70 -0
- package/dist/templates/default/v1/fullstack/.agents/skills/relkit/references/jobs-apis.md +49 -0
- package/dist/templates/default/v1/fullstack/.agents/skills/relkit/references/layout-migration.md +35 -0
- package/dist/templates/default/v1/fullstack/.agents/skills/relkit/references/observability-apis.md +53 -0
- package/dist/templates/default/v1/fullstack/.agents/skills/relkit/references/realtime-apis.md +98 -0
- package/dist/templates/default/v1/fullstack/.agents/skills/relkit/references/streaming-apis.md +75 -0
- package/dist/templates/default/v1/fullstack/.agents/skills/relkit/references/testing-apis.md +71 -0
- package/dist/templates/default/v1/fullstack/README.md +16 -0
- package/dist/templates/default/v1/fullstack/package.json +7 -6
- package/dist/templates/default/v1/fullstack/src/routes/hello/route.ts +2 -1
- package/dist/templates/default/v1/fullstack/src/{hello → services/hello}/agents/assistant.agent.ts +3 -2
- package/dist/templates/default/v1/fullstack/src/{hello → services/hello}/agents/review.agent.ts +1 -0
- package/dist/templates/default/v1/fullstack/src/{hello → services/hello}/functions/hello.function.ts +1 -0
- package/dist/templates/default/v1/fullstack/src/services/hello/service.ts +5 -0
- package/dist/templates/default/v1/fullstack/src/{hello → services/hello}/tools/lookup.tool.ts +2 -1
- package/dist/templates/default/v1/fullstack/tests/unit/assistant.agent.test.ts +3 -2
- package/dist/templates/default/v1/fullstack/tests/unit/hello.function.test.ts +2 -1
- package/dist/templates/default/v1/fullstack/tests/unit/review.agent.test.ts +2 -1
- package/dist/templates/default/v1/fullstack/tsconfig.json +1 -0
- package/dist/templates/default/v1/minimal/.agents/skills/relkit/SKILL.md +48 -0
- package/dist/templates/default/v1/minimal/.agents/skills/relkit/references/agent-apis.md +59 -0
- package/dist/templates/default/v1/minimal/.agents/skills/relkit/references/cli.md +63 -0
- package/dist/templates/default/v1/minimal/.agents/skills/relkit/references/config-environments.md +96 -0
- package/dist/templates/default/v1/minimal/.agents/skills/relkit/references/data-apis.md +74 -0
- package/dist/templates/default/v1/minimal/.agents/skills/relkit/references/domain-apis.md +92 -0
- package/dist/templates/default/v1/minimal/.agents/skills/relkit/references/http-apis.md +70 -0
- package/dist/templates/default/v1/minimal/.agents/skills/relkit/references/jobs-apis.md +49 -0
- package/dist/templates/default/v1/minimal/.agents/skills/relkit/references/layout-migration.md +35 -0
- package/dist/templates/default/v1/minimal/.agents/skills/relkit/references/observability-apis.md +53 -0
- package/dist/templates/default/v1/minimal/.agents/skills/relkit/references/realtime-apis.md +98 -0
- package/dist/templates/default/v1/minimal/.agents/skills/relkit/references/streaming-apis.md +75 -0
- package/dist/templates/default/v1/minimal/.agents/skills/relkit/references/testing-apis.md +71 -0
- package/dist/templates/default/v1/minimal/README.md +10 -0
- package/dist/templates/default/v1/minimal/package.json +4 -3
- package/dist/templates/default/v1/minimal/src/routes/hello/route.ts +2 -1
- package/dist/templates/default/v1/minimal/src/{hello → services/hello}/functions/hello.function.ts +7 -0
- package/dist/templates/default/v1/minimal/src/services/hello/service.ts +5 -0
- package/dist/templates/default/v1/minimal/tests/unit/hello.function.test.ts +2 -1
- package/dist/templates/default/v1/minimal/tsconfig.json +1 -0
- package/dist/templates/default/v1/tasks/.agents/skills/relkit/SKILL.md +48 -0
- package/dist/templates/default/v1/tasks/.agents/skills/relkit/references/agent-apis.md +59 -0
- package/dist/templates/default/v1/tasks/.agents/skills/relkit/references/cli.md +63 -0
- package/dist/templates/default/v1/tasks/.agents/skills/relkit/references/config-environments.md +96 -0
- package/dist/templates/default/v1/tasks/.agents/skills/relkit/references/data-apis.md +74 -0
- package/dist/templates/default/v1/tasks/.agents/skills/relkit/references/domain-apis.md +92 -0
- package/dist/templates/default/v1/tasks/.agents/skills/relkit/references/http-apis.md +70 -0
- package/dist/templates/default/v1/tasks/.agents/skills/relkit/references/jobs-apis.md +49 -0
- package/dist/templates/default/v1/tasks/.agents/skills/relkit/references/layout-migration.md +35 -0
- package/dist/templates/default/v1/tasks/.agents/skills/relkit/references/observability-apis.md +53 -0
- package/dist/templates/default/v1/tasks/.agents/skills/relkit/references/realtime-apis.md +98 -0
- package/dist/templates/default/v1/tasks/.agents/skills/relkit/references/streaming-apis.md +75 -0
- package/dist/templates/default/v1/tasks/.agents/skills/relkit/references/testing-apis.md +71 -0
- package/dist/templates/default/v1/tasks/README.md +8 -1
- package/dist/templates/default/v1/tasks/package.json +4 -3
- package/dist/templates/default/v1/tasks/src/routes/health/route.ts +2 -1
- package/dist/templates/default/v1/tasks/src/{orders → services/orders}/functions/health.function.ts +1 -0
- package/dist/templates/default/v1/tasks/src/{orders → services/orders}/jobs/export-orders.job.ts +2 -1
- package/dist/templates/default/v1/tasks/src/services/orders/service.ts +11 -0
- package/dist/templates/default/v1/tasks/src/{orders → services/orders}/tasks/export-orders.task.ts +1 -0
- package/dist/templates/default/v1/tasks/tests/unit/export-orders.task.test.ts +2 -1
- package/dist/templates/default/v1/tasks/tsconfig.json +2 -0
- package/package.json +3 -3
- package/dist/templates/default/v1/agent/src/hello/service.ts +0 -4
- package/dist/templates/default/v1/api/src/echo/service.ts +0 -4
- package/dist/templates/default/v1/api/src/hello/service.ts +0 -4
- package/dist/templates/default/v1/api/src/orders/service.ts +0 -7
- package/dist/templates/default/v1/fullstack/src/hello/service.ts +0 -4
- package/dist/templates/default/v1/minimal/src/hello/service.ts +0 -4
- package/dist/templates/default/v1/tasks/src/orders/service.ts +0 -10
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
|
-
import { GeneratorFileSystem } from "./generator-filesystem.js";
|
|
3
2
|
import type { CreateOptions } from "./options.js";
|
|
4
3
|
/**
|
|
5
4
|
* Applies only explicit deployment and jobs flags, retaining concrete template dependency versions.
|
|
@@ -7,12 +6,12 @@ import type { CreateOptions } from "./options.js";
|
|
|
7
6
|
* @param options - Explicit options retaining existing defaults.
|
|
8
7
|
* @returns Completion after generated deployment/provider source and manifest fields match explicit flags.
|
|
9
8
|
*/
|
|
10
|
-
export declare const customizeDeploymentEffect: (root: string, options: CreateOptions) => Effect.Effect<
|
|
9
|
+
export declare const customizeDeploymentEffect: (root: string, options: CreateOptions) => Effect.Effect<void, import("./generator-errors.js").GeneratorIoError | import("./generator-errors.js").GeneratorDomainError, import("./generator-filesystem.js").GeneratorFileSystem>;
|
|
11
10
|
/**
|
|
12
11
|
* Adjusts the tasks fixture to the selected supported jobs adapter.
|
|
13
12
|
* @param root - Absolute project or owned resource root.
|
|
14
13
|
* @param options - Explicit options retaining existing defaults.
|
|
15
14
|
* @returns Completion after task/job examples match the selected provider's supported operations.
|
|
16
15
|
*/
|
|
17
|
-
export declare const customizeTaskFixtureEffect: (root: string, options: CreateOptions) => Effect.Effect<void, import("./generator-errors.js").GeneratorIoError | import("./generator-errors.js").GeneratorDomainError, GeneratorFileSystem>;
|
|
16
|
+
export declare const customizeTaskFixtureEffect: (root: string, options: CreateOptions) => Effect.Effect<void, import("./generator-errors.js").GeneratorIoError | import("./generator-errors.js").GeneratorDomainError, import("./generator-filesystem.js").GeneratorFileSystem>;
|
|
18
17
|
//# sourceMappingURL=generate-deployment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-deployment.d.ts","sourceRoot":"","sources":["../src/generate-deployment.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-deployment.d.ts","sourceRoot":"","sources":["../src/generate-deployment.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,iOAkCrC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,iOA8BtC,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
+
/** Composes explicit deployment/provider source and grouped task-fixture patches through captured generator services; public creation certification stays unchanged. */
|
|
1
2
|
import { join } from "node:path";
|
|
2
|
-
import { Effect
|
|
3
|
+
import { Effect } from "effect";
|
|
3
4
|
import { observeExecution } from "@relkit/contracts/operation";
|
|
4
|
-
import {
|
|
5
|
-
import { GenerateProjectError } from "./generate-types.js";
|
|
6
|
-
import { domainError, domainTry } from "./generator-errors.js";
|
|
7
|
-
import { TemplateManifest, JsonObject } from "./project-manifest.schemas.js";
|
|
5
|
+
import { customizeDeploymentManifestEffect } from "./generate-deployment-manifest.js";
|
|
8
6
|
import { replaceOnceEffect } from "./generate-files-utilities.js";
|
|
9
7
|
/**
|
|
10
8
|
* Applies only explicit deployment and jobs flags, retaining concrete template dependency versions.
|
|
@@ -37,38 +35,7 @@ export const customizeDeploymentEffect = Effect.fn("ProjectFiles.customizeDeploy
|
|
|
37
35
|
.filter(Boolean)
|
|
38
36
|
.join("\n"));
|
|
39
37
|
yield* customizeTaskFixtureEffect(root, options);
|
|
40
|
-
|
|
41
|
-
const source = yield* (yield* GeneratorFileSystem).readText(manifestPath);
|
|
42
|
-
const fs = yield* GeneratorFileSystem;
|
|
43
|
-
const parsed = yield* domainTry(() => JSON.parse(source));
|
|
44
|
-
const decoded = yield* Schema.decodeUnknownEffect(TemplateManifest)(parsed).pipe(Effect.mapError(domainError));
|
|
45
|
-
const original = yield* Schema.decodeUnknownEffect(JsonObject)(parsed).pipe(Effect.mapError(domainError));
|
|
46
|
-
const manifest = {
|
|
47
|
-
...original,
|
|
48
|
-
...decoded,
|
|
49
|
-
dependencies: { ...decoded.dependencies },
|
|
50
|
-
scripts: { ...decoded.scripts },
|
|
51
|
-
};
|
|
52
|
-
const version = manifest.dependencies["@relkit/app"];
|
|
53
|
-
if (version === undefined)
|
|
54
|
-
return yield* Effect.fail(domainError(new GenerateProjectError("RELKIT_CREATE_TEMPLATE_INVALID", "Template has no @relkit/app dependency.")));
|
|
55
|
-
if (options.cloud === "aws")
|
|
56
|
-
manifest.dependencies["@relkit/aws"] = version;
|
|
57
|
-
if (options.deploy === "pulumi")
|
|
58
|
-
manifest.dependencies["@relkit/pulumi"] = version;
|
|
59
|
-
if (options.jobs !== undefined) {
|
|
60
|
-
manifest.dependencies["@relkit/docker"] = version;
|
|
61
|
-
manifest.dependencies["@relkit/local"] = version;
|
|
62
|
-
manifest.dependencies[`@relkit/${options.jobs.replace(/-docker$/u, "")}`] = version;
|
|
63
|
-
}
|
|
64
|
-
if (options.cloud === "aws" && options.deploy === "pulumi") {
|
|
65
|
-
manifest.scripts["deploy:preview"] = "relkit deploy preview";
|
|
66
|
-
manifest.scripts.deploy = "relkit deploy up";
|
|
67
|
-
}
|
|
68
|
-
manifest.scripts = sorted(manifest.scripts);
|
|
69
|
-
manifest.dependencies = sorted(manifest.dependencies);
|
|
70
|
-
yield* fs.write(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`);
|
|
71
|
-
yield* fs.chmod(manifestPath, 0o644);
|
|
38
|
+
yield* customizeDeploymentManifestEffect(root, options);
|
|
72
39
|
}, (effect) => observeExecution("generator", "generation.deployment", effect));
|
|
73
40
|
/**
|
|
74
41
|
* Adjusts the tasks fixture to the selected supported jobs adapter.
|
|
@@ -79,8 +46,8 @@ export const customizeDeploymentEffect = Effect.fn("ProjectFiles.customizeDeploy
|
|
|
79
46
|
export const customizeTaskFixtureEffect = Effect.fn("ProjectFiles.customizeTasks")(function* (root, options) {
|
|
80
47
|
if (options.jobs === undefined || options.jobs === "inngest-docker")
|
|
81
48
|
return;
|
|
82
|
-
const taskPath = join(root, "src/orders/tasks/export-orders.task.ts");
|
|
83
|
-
const jobPath = join(root, "src/orders/jobs/export-orders.job.ts");
|
|
49
|
+
const taskPath = join(root, "src/services/orders/tasks/export-orders.task.ts");
|
|
50
|
+
const jobPath = join(root, "src/services/orders/jobs/export-orders.job.ts");
|
|
84
51
|
if (options.jobs === "effect-mq-docker")
|
|
85
52
|
yield* replaceOnceEffect(taskPath, 'execution: "durable"', 'execution: "retryable"');
|
|
86
53
|
yield* replaceOnceEffect(taskPath, " progress: z.object({ completed: z.number().int().nonnegative() }),\n", "");
|
|
@@ -89,12 +56,4 @@ export const customizeTaskFixtureEffect = Effect.fn("ProjectFiles.customizeTasks
|
|
|
89
56
|
yield* replaceOnceEffect(jobPath, ' operations: ["trigger", "get", "list", "watch"],', ' operations: ["trigger"],');
|
|
90
57
|
yield* replaceOnceEffect(jobPath, ' fields: ["status", "progress", "output"],', ' fields: ["status", "output"],');
|
|
91
58
|
}, (effect) => observeExecution("generator", "generation.customizeTasks", effect));
|
|
92
|
-
/**
|
|
93
|
-
* Sorts owned manifest fields deterministically.
|
|
94
|
-
* @param values - Ordered declarations or argument values.
|
|
95
|
-
* @returns A new manifest string record sorted by key.
|
|
96
|
-
*/
|
|
97
|
-
function sorted(values) {
|
|
98
|
-
return Object.fromEntries(Object.entries(values).sort(([left], [right]) => left.localeCompare(right)));
|
|
99
|
-
}
|
|
100
59
|
//# sourceMappingURL=generate-deployment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-deployment.js","sourceRoot":"","sources":["../src/generate-deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"generate-deployment.js","sourceRoot":"","sources":["../src/generate-deployment.ts"],"names":[],"mappings":"AAAA,wKAAwK;AACxK,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGlE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,EAAE,CAAC,kCAAkC,CAAC,CACpF,QAAQ,CAAC,EAAE,IAAY,EAAE,OAAsB;IAC7C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG;QACd,GAAG,CAAC,OAAO,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7D,GAAG,CAAC,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACpE,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,0CAA0C,CAAC,CAAC;QACnF,GAAG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ystem.js";
|
|
3
|
+
/** Canonical example-only paths removed by the existing --no-examples flag. */
|
|
4
|
+
export declare const EXAMPLE_PATH_PREFIXES: readonly ["src/routes", "src/orders", "src/services/orders", "src/echo", "src/services/echo", "src/hello/tools", "src/services/hello/tools", "src/hello/agents", "src/services/hello/agents", "tests"];
|
|
5
|
+
/**
|
|
6
|
+
* Removes only the established template examples, with ordered physical settlement.
|
|
7
|
+
* @param root - Absolute project or owned resource root.
|
|
8
|
+
* @returns Completion after the known example source directories are removed from the staged project.
|
|
9
|
+
*/
|
|
10
|
+
export declare const removeExamplesEffect: (root: string) => Effect.Effect<void, import("./generator-errors.js").GeneratorIoError, GeneratorFileSystem>;
|
|
11
|
+
//# sourceMappingURL=generate-examples.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-examples.d.ts","sourceRoot":"","sources":["../src/generate-examples.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB,wMAWxB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,8GAQhC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Removes only established flat/grouped example paths from an owned staged template while preserving the useful hello service and function. */
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { Effect } from "effect";
|
|
4
|
+
import { observeExecution } from "@relkit/contracts/operation";
|
|
5
|
+
import { GeneratorFileSystem } from "./generator-filesystem.js";
|
|
6
|
+
/** Canonical example-only paths removed by the existing --no-examples flag. */
|
|
7
|
+
export const EXAMPLE_PATH_PREFIXES = [
|
|
8
|
+
"src/routes",
|
|
9
|
+
"src/orders",
|
|
10
|
+
"src/services/orders",
|
|
11
|
+
"src/echo",
|
|
12
|
+
"src/services/echo",
|
|
13
|
+
"src/hello/tools",
|
|
14
|
+
"src/services/hello/tools",
|
|
15
|
+
"src/hello/agents",
|
|
16
|
+
"src/services/hello/agents",
|
|
17
|
+
"tests",
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* Removes only the established template examples, with ordered physical settlement.
|
|
21
|
+
* @param root - Absolute project or owned resource root.
|
|
22
|
+
* @returns Completion after the known example source directories are removed from the staged project.
|
|
23
|
+
*/
|
|
24
|
+
export const removeExamplesEffect = Effect.fn("ProjectFiles.removeExamples")(function* (root) {
|
|
25
|
+
const fs = yield* GeneratorFileSystem;
|
|
26
|
+
yield* Effect.forEach(EXAMPLE_PATH_PREFIXES, (directory) => fs.remove(join(root, directory), { recursive: true, force: true }));
|
|
27
|
+
}, (effect) => observeExecution("generator", "generation.removeExamples", effect));
|
|
28
|
+
//# sourceMappingURL=generate-examples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-examples.js","sourceRoot":"","sources":["../src/generate-examples.ts"],"names":[],"mappings":"AAAA,gJAAgJ;AAChJ,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,+EAA+E;AAC/E,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,YAAY;IACZ,YAAY;IACZ,qBAAqB;IACrB,UAAU;IACV,mBAAmB;IACnB,iBAAiB;IACjB,0BAA0B;IAC1B,kBAAkB;IAClB,2BAA2B;IAC3B,OAAO;CACC,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,EAAE,CAAC,6BAA6B,CAAC,CAC1E,QAAQ,CAAC,EAAE,IAAY;IACrB,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,mBAAmB,CAAC;IACtC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,SAAS,EAAE,EAAE,CACzD,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CACnE,CAAC;AACJ,CAAC,EACD,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,2BAA2B,EAAE,MAAM,CAAC,CAC/E,CAAC"}
|
|
@@ -2,8 +2,7 @@ import { Effect } from "effect";
|
|
|
2
2
|
import { GeneratorFileSystem } from "./generator-filesystem.js";
|
|
3
3
|
import type { GeneratorDomainError, GeneratorIoError } from "./generator-errors.js";
|
|
4
4
|
export type { StageCleanupResult } from "./generate-files-utilities.types.js";
|
|
5
|
-
|
|
6
|
-
export declare const EXAMPLE_PATH_PREFIXES: readonly ["src/routes", "src/orders", "src/echo", "src/hello/tools", "src/hello/agents", "tests"];
|
|
5
|
+
export { EXAMPLE_PATH_PREFIXES, removeExamplesEffect } from "./generate-examples.js";
|
|
7
6
|
/**
|
|
8
7
|
* Cleans only a verified sibling staging directory owned by this generation invocation.
|
|
9
8
|
* @param stage - Owned sibling staging directory, or undefined before acquisition.
|
|
@@ -37,12 +36,6 @@ export declare const requireFilesEffect: (root: string, paths: readonly string[]
|
|
|
37
36
|
* @returns Completion after exactly one template marker is replaced and its file mode is restored.
|
|
38
37
|
*/
|
|
39
38
|
export declare const replaceOnceEffect: (path: string, before: string, after: string) => Effect.Effect<undefined, GeneratorIoError | GeneratorDomainError, GeneratorFileSystem>;
|
|
40
|
-
/**
|
|
41
|
-
* Removes only the established template examples, with ordered physical settlement.
|
|
42
|
-
* @param root - Absolute project or owned resource root.
|
|
43
|
-
* @returns Completion after the known example source directories are removed from the staged project.
|
|
44
|
-
*/
|
|
45
|
-
export declare const removeExamplesEffect: (root: string) => Effect.Effect<void, GeneratorIoError, GeneratorFileSystem>;
|
|
46
39
|
/**
|
|
47
40
|
* Lists generated source files in deterministic order, excluding generated and installed state.
|
|
48
41
|
* @param root - Absolute project or owned resource root.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-files-utilities.d.ts","sourceRoot":"","sources":["../src/generate-files-utilities.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAQ,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"generate-files-utilities.d.ts","sourceRoot":"","sources":["../src/generate-files-utilities.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAQ,MAAM,QAAQ,CAAC;AAGtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGpF,YAAY,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAErF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B;;;;;8BA2BtC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,uFAyBjC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,4GAmB9B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,yIAkB7B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,wHAiBlC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM9C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAGpF;AAED,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,cAAc,EACd,gBAAgB,GACjB,MAAM,4BAA4B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Validates and mutates only owned staged generator files; captured filesystem/error authorities retain native failure and cleanup disposition. */
|
|
1
2
|
import { basename, dirname, join, relative, resolve } from "node:path";
|
|
2
3
|
import { Effect, Exit } from "effect";
|
|
3
4
|
import { observeExecution } from "@relkit/contracts/operation";
|
|
@@ -5,15 +6,7 @@ import { GenerateProjectError } from "./generate-types.js";
|
|
|
5
6
|
import { GeneratorFileSystem } from "./generator-filesystem.js";
|
|
6
7
|
import { domainError } from "./generator-errors.js";
|
|
7
8
|
import { recordCleanupFailure } from "./generator-cleanup.js";
|
|
8
|
-
|
|
9
|
-
export const EXAMPLE_PATH_PREFIXES = [
|
|
10
|
-
"src/routes",
|
|
11
|
-
"src/orders",
|
|
12
|
-
"src/echo",
|
|
13
|
-
"src/hello/tools",
|
|
14
|
-
"src/hello/agents",
|
|
15
|
-
"tests",
|
|
16
|
-
];
|
|
9
|
+
export { EXAMPLE_PATH_PREFIXES, removeExamplesEffect } from "./generate-examples.js";
|
|
17
10
|
/**
|
|
18
11
|
* Cleans only a verified sibling staging directory owned by this generation invocation.
|
|
19
12
|
* @param stage - Owned sibling staging directory, or undefined before acquisition.
|
|
@@ -84,15 +77,6 @@ export const replaceOnceEffect = Effect.fn("ProjectFiles.replaceOnce")(function*
|
|
|
84
77
|
yield* fs.write(path, content.slice(0, first) + after + content.slice(first + before.length));
|
|
85
78
|
yield* fs.chmod(path, 0o644);
|
|
86
79
|
}, (effect) => observeExecution("generator", "generation.replaceOnce", effect));
|
|
87
|
-
/**
|
|
88
|
-
* Removes only the established template examples, with ordered physical settlement.
|
|
89
|
-
* @param root - Absolute project or owned resource root.
|
|
90
|
-
* @returns Completion after the known example source directories are removed from the staged project.
|
|
91
|
-
*/
|
|
92
|
-
export const removeExamplesEffect = Effect.fn("ProjectFiles.removeExamples")(function* (root) {
|
|
93
|
-
const fs = yield* GeneratorFileSystem;
|
|
94
|
-
yield* Effect.forEach(EXAMPLE_PATH_PREFIXES, (directory) => fs.remove(join(root, directory), { recursive: true, force: true }));
|
|
95
|
-
}, (effect) => observeExecution("generator", "generation.removeExamples", effect));
|
|
96
80
|
/**
|
|
97
81
|
* Lists generated source files in deterministic order, excluding generated and installed state.
|
|
98
82
|
* @param root - Absolute project or owned resource root.
|
|
@@ -132,7 +116,9 @@ export function projectId(name) {
|
|
|
132
116
|
* @returns Negative, zero or positive ordering using a deterministic string comparison.
|
|
133
117
|
*/
|
|
134
118
|
export function compareNames(left, right) {
|
|
135
|
-
|
|
119
|
+
if (left.name === right.name)
|
|
120
|
+
return 0;
|
|
121
|
+
return left.name < right.name ? -1 : 1;
|
|
136
122
|
}
|
|
137
123
|
export { cleanupStagedProject, requireTemplate, requireFiles, replaceOnce, removeExamples, listProjectFiles, } from "./generate-files-compat.js";
|
|
138
124
|
//# sourceMappingURL=generate-files-utilities.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-files-utilities.js","sourceRoot":"","sources":["../src/generate-files-utilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"generate-files-utilities.js","sourceRoot":"","sources":["../src/generate-files-utilities.ts"],"names":[],"mappings":"AAAA,oJAAoJ;AACpJ,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2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AAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;IAC1F,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,EACD,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,iBAAiB,EAAE,MAAM,CAAC,CACrE,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,MAAM,KAAK,GAAG,IAAI;SACf,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;SACjB,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;SACjB,OAAO,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;IACrC,OAAO,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC;AAChF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,IAAsB,EAAE,KAAuB;IAC1E,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI;QAAE,OAAO,CAAC,CAAC;IACvC,OAAO,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC;AAED,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,cAAc,EACd,gBAAgB,GACjB,MAAM,4BAA4B,CAAC"}
|
|
@@ -9,10 +9,11 @@ import type { CreateOptions } from "./options.js";
|
|
|
9
9
|
export declare function createGenerateNextSteps(options: Pick<CreateOptions, "examples" | "install">, destination: string, cwd?: string): GenerateNextSteps;
|
|
10
10
|
/**
|
|
11
11
|
* Formats a recognizable generation result for terminal display.
|
|
12
|
+
* @typeParam T - Native presentation input narrowed by the generated-result schema.
|
|
12
13
|
* @param value - Generation result or an unrecognized output value.
|
|
13
14
|
* @returns Success details, commands, endpoints and warnings; other values use JSON serialization.
|
|
14
15
|
*/
|
|
15
|
-
export declare function formatGenerateResult(value:
|
|
16
|
+
export declare function formatGenerateResult<T>(value: T): string;
|
|
16
17
|
import type { GenerateNextSteps } from "./generate-output.types.js";
|
|
17
18
|
export type { GenerateNextSteps } from "./generate-output.types.js";
|
|
18
19
|
//# sourceMappingURL=generate-output.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-output.d.ts","sourceRoot":"","sources":["../src/generate-output.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-output.d.ts","sourceRoot":"","sources":["../src/generate-output.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,SAAS,CAAC,EACpD,WAAW,EAAE,MAAM,EACnB,GAAG,SAAgB,GAClB,iBAAiB,CAuBnB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CA0BxD;AAYD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/generate-output.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renders local onboarding from the generated project's actual installation state.
|
|
3
|
+
* Pure command construction exposes finite preparation after skipped installation;
|
|
4
|
+
* schema guards recognize presentation values without promoting arbitrary output
|
|
5
|
+
* into the generated-result contract. Formatting performs no runtime acquisition.
|
|
6
|
+
*/
|
|
1
7
|
import { basename, relative, resolve } from "node:path";
|
|
8
|
+
import { Schema } from "effect";
|
|
9
|
+
import { GeneratePresentation } from "./generate-output.schemas.js";
|
|
2
10
|
/**
|
|
3
11
|
* Builds local commands and endpoints for a generated project.
|
|
4
12
|
* @param options - Installation and examples flags.
|
|
@@ -10,7 +18,12 @@ export function createGenerateNextSteps(options, destination, cwd = process.cwd(
|
|
|
10
18
|
const directory = relative(resolve(cwd), resolve(destination)) || basename(destination);
|
|
11
19
|
const commands = Object.freeze({
|
|
12
20
|
cd: `cd ${shellWord(directory)}`,
|
|
13
|
-
...(options.install
|
|
21
|
+
...(options.install
|
|
22
|
+
? {}
|
|
23
|
+
: {
|
|
24
|
+
install: "bun install",
|
|
25
|
+
prepare: "bunx --no-install relkit dev --prepare",
|
|
26
|
+
}),
|
|
14
27
|
dev: "bun run dev",
|
|
15
28
|
test: "bun run test",
|
|
16
29
|
check: "bun run check",
|
|
@@ -27,17 +40,16 @@ export function createGenerateNextSteps(options, destination, cwd = process.cwd(
|
|
|
27
40
|
}
|
|
28
41
|
/**
|
|
29
42
|
* Formats a recognizable generation result for terminal display.
|
|
43
|
+
* @typeParam T - Native presentation input narrowed by the generated-result schema.
|
|
30
44
|
* @param value - Generation result or an unrecognized output value.
|
|
31
45
|
* @returns Success details, commands, endpoints and warnings; other values use JSON serialization.
|
|
32
46
|
*/
|
|
33
47
|
export function formatGenerateResult(value) {
|
|
34
|
-
if (!
|
|
48
|
+
if (!Schema.is(GeneratePresentation)(value))
|
|
35
49
|
return JSON.stringify(value);
|
|
36
50
|
const { commands, endpoints } = value.nextSteps;
|
|
37
|
-
const additions =
|
|
38
|
-
const warnings =
|
|
39
|
-
? value.warnings.flatMap((warning) => isRecord(warning) && typeof warning.message === "string" ? [warning.message] : [])
|
|
40
|
-
: [];
|
|
51
|
+
const additions = value.additions?.length ?? 0;
|
|
52
|
+
const warnings = value.warnings?.map((warning) => warning.message) ?? [];
|
|
41
53
|
return [
|
|
42
54
|
...(typeof value.name === "string" && typeof value.destination === "string"
|
|
43
55
|
? [`Success! Created ${value.name} at ${value.destination}.`, ""]
|
|
@@ -45,6 +57,7 @@ export function formatGenerateResult(value) {
|
|
|
45
57
|
...(additions ? [`additions: ${additions}`, ""] : []),
|
|
46
58
|
commands.cd,
|
|
47
59
|
...(commands.install ? [commands.install] : []),
|
|
60
|
+
...(commands.prepare ? [commands.prepare] : []),
|
|
48
61
|
commands.dev,
|
|
49
62
|
"",
|
|
50
63
|
`backend: ${endpoints.backend}`,
|
|
@@ -69,35 +82,4 @@ function shellWord(value) {
|
|
|
69
82
|
return value.startsWith("-") ? `./${value}` : value;
|
|
70
83
|
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
71
84
|
}
|
|
72
|
-
/**
|
|
73
|
-
* Checks that an unknown result contains the supported commands and endpoints.
|
|
74
|
-
* @param value - Unknown nextSteps field.
|
|
75
|
-
* @returns Whether the value matches the generated next-steps contract.
|
|
76
|
-
*/
|
|
77
|
-
function isNextSteps(value) {
|
|
78
|
-
if (!isRecord(value) || !isRecord(value.commands) || !isRecord(value.endpoints))
|
|
79
|
-
return false;
|
|
80
|
-
const commands = value.commands;
|
|
81
|
-
const endpoints = value.endpoints;
|
|
82
|
-
return (typeof commands.cd === "string" &&
|
|
83
|
-
(commands.install === undefined || commands.install === "bun install") &&
|
|
84
|
-
commands.dev === "bun run dev" &&
|
|
85
|
-
commands.test === "bun run test" &&
|
|
86
|
-
commands.check === "bun run check" &&
|
|
87
|
-
commands.build === "bun run build" &&
|
|
88
|
-
endpoints.backend === "http://localhost:3000" &&
|
|
89
|
-
endpoints.inspector === "http://localhost:3210" &&
|
|
90
|
-
endpoints.openapi === "http://localhost:3000/_relkit/v1/openapi.json" &&
|
|
91
|
-
endpoints.apiReference === "http://localhost:3000/_relkit/v1/api-reference" &&
|
|
92
|
-
(endpoints.route === undefined ||
|
|
93
|
-
endpoints.route === "GET http://localhost:3000/hello?name=RelKit"));
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Narrows an unknown value to a non-null object excluding arrays.
|
|
97
|
-
* @param value - Unknown value at the object boundary.
|
|
98
|
-
* @returns Whether the value is a non-null, non-array object.
|
|
99
|
-
*/
|
|
100
|
-
function isRecord(value) {
|
|
101
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
102
|
-
}
|
|
103
85
|
//# sourceMappingURL=generate-output.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-output.js","sourceRoot":"","sources":["../src/generate-output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"generate-output.js","sourceRoot":"","sources":["../src/generate-output.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAIpE;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAAoD,EACpD,WAAmB,EACnB,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE;IAEnB,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,QAAQ,CAAC,WAAW,CAAC,CAAC;IACxF,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC;QAC7B,EAAE,EAAE,MAAM,SAAS,CAAC,SAAS,CAAC,EAAE;QAChC,GAAG,CAAC,OAAO,CAAC,OAAO;YACjB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC;gBACE,OAAO,EAAE,aAAsB;gBAC/B,OAAO,EAAE,wCAAiD;aAC3D,CAAC;QACN,GAAG,EAAE,aAAsB;QAC3B,IAAI,EAAE,cAAuB;QAC7B,KAAK,EAAE,eAAwB;QAC/B,KAAK,EAAE,eAAwB;KAChC,CAAC,CAAC;IACH,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
* Recognizes generated onboarding values at the terminal formatting boundary.
|
|
3
|
+
* Literal commands and endpoints stay aligned with the published result type;
|
|
4
|
+
* arbitrary results fall back to JSON presentation and gain no command authority.
|
|
5
|
+
*/
|
|
6
|
+
import { Schema } from "effect";
|
|
7
|
+
/** Checked presentation subset; unrelated metadata is not used by rendering. */
|
|
8
|
+
export declare const GeneratePresentation: Schema.Struct<{
|
|
9
|
+
readonly name: Schema.optionalKey<Schema.String>;
|
|
10
|
+
readonly destination: Schema.optionalKey<Schema.String>;
|
|
11
|
+
readonly nextSteps: Schema.Struct<{
|
|
12
|
+
readonly commands: Schema.Struct<{
|
|
13
|
+
readonly cd: Schema.String;
|
|
14
|
+
readonly install: Schema.optionalKey<Schema.Literal<"bun install">>;
|
|
15
|
+
readonly prepare: Schema.optionalKey<Schema.Literal<"bunx --no-install relkit dev --prepare">>;
|
|
16
|
+
readonly dev: Schema.Literal<"bun run dev">;
|
|
17
|
+
readonly test: Schema.Literal<"bun run test">;
|
|
18
|
+
readonly check: Schema.Literal<"bun run check">;
|
|
19
|
+
readonly build: Schema.Literal<"bun run build">;
|
|
20
|
+
}>;
|
|
21
|
+
readonly endpoints: Schema.Struct<{
|
|
22
|
+
readonly backend: Schema.Literal<"http://localhost:3000">;
|
|
23
|
+
readonly inspector: Schema.Literal<"http://localhost:3210">;
|
|
24
|
+
readonly openapi: Schema.Literal<"http://localhost:3000/_relkit/v1/openapi.json">;
|
|
25
|
+
readonly apiReference: Schema.Literal<"http://localhost:3000/_relkit/v1/api-reference">;
|
|
26
|
+
readonly route: Schema.optionalKey<Schema.Literal<"GET http://localhost:3000/hello?name=RelKit">>;
|
|
27
|
+
}>;
|
|
28
|
+
}>;
|
|
29
|
+
readonly additions: Schema.optionalKey<Schema.$Array<Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
30
|
+
readonly warnings: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
31
|
+
readonly message: Schema.String;
|
|
32
|
+
}>>>;
|
|
33
|
+
}>;
|
|
34
|
+
//# sourceMappingURL=generate-output.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-output.schemas.d.ts","sourceRoot":"","sources":["../src/generate-output.schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAsBhC,gFAAgF;AAChF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;EAM/B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recognizes generated onboarding values at the terminal formatting boundary.
|
|
3
|
+
* Literal commands and endpoints stay aligned with the published result type;
|
|
4
|
+
* arbitrary results fall back to JSON presentation and gain no command authority.
|
|
5
|
+
*/
|
|
6
|
+
import { Schema } from "effect";
|
|
7
|
+
/** Local commands reflect whether installation and preparation already ran. */
|
|
8
|
+
const Commands = Schema.Struct({
|
|
9
|
+
cd: Schema.String,
|
|
10
|
+
install: Schema.optionalKey(Schema.Literal("bun install")),
|
|
11
|
+
prepare: Schema.optionalKey(Schema.Literal("bunx --no-install relkit dev --prepare")),
|
|
12
|
+
dev: Schema.Literal("bun run dev"),
|
|
13
|
+
test: Schema.Literal("bun run test"),
|
|
14
|
+
check: Schema.Literal("bun run check"),
|
|
15
|
+
build: Schema.Literal("bun run build"),
|
|
16
|
+
});
|
|
17
|
+
/** Only an example-bearing project advertises the generated hello route. */
|
|
18
|
+
const Endpoints = Schema.Struct({
|
|
19
|
+
backend: Schema.Literal("http://localhost:3000"),
|
|
20
|
+
inspector: Schema.Literal("http://localhost:3210"),
|
|
21
|
+
openapi: Schema.Literal("http://localhost:3000/_relkit/v1/openapi.json"),
|
|
22
|
+
apiReference: Schema.Literal("http://localhost:3000/_relkit/v1/api-reference"),
|
|
23
|
+
route: Schema.optionalKey(Schema.Literal("GET http://localhost:3000/hello?name=RelKit")),
|
|
24
|
+
});
|
|
25
|
+
/** Checked presentation subset; unrelated metadata is not used by rendering. */
|
|
26
|
+
export const GeneratePresentation = Schema.Struct({
|
|
27
|
+
name: Schema.optionalKey(Schema.String),
|
|
28
|
+
destination: Schema.optionalKey(Schema.String),
|
|
29
|
+
nextSteps: Schema.Struct({ commands: Commands, endpoints: Endpoints }),
|
|
30
|
+
additions: Schema.optionalKey(Schema.Array(Schema.Json)),
|
|
31
|
+
warnings: Schema.optionalKey(Schema.Array(Schema.Struct({ message: Schema.String }))),
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=generate-output.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-output.schemas.js","sourceRoot":"","sources":["../src/generate-output.schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,+EAA+E;AAC/E,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC,MAAM;IACjB,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAC1D,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,wCAAwC,CAAC,CAAC;IACrF,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC;CACvC,CAAC,CAAC;AAEH,4EAA4E;AAC5E,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC;IAChD,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC;IAClD,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,+CAA+C,CAAC;IACxE,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,gDAAgD,CAAC;IAC9E,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,6CAA6C,CAAC,CAAC;CACzF,CAAC,CAAC;AAEH,gFAAgF;AAChF,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC;IACvC,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;IACtE,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACxD,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;CACtF,CAAC,CAAC"}
|
|
@@ -5,6 +5,8 @@ export interface GenerateNextSteps {
|
|
|
5
5
|
readonly commands: Readonly<{
|
|
6
6
|
readonly cd: string;
|
|
7
7
|
readonly install?: "bun install";
|
|
8
|
+
/** Finite validation/preparation required after a skipped dependency installation. */
|
|
9
|
+
readonly prepare?: "bunx --no-install relkit dev --prepare";
|
|
8
10
|
readonly dev: "bun run dev";
|
|
9
11
|
readonly test: "bun run test";
|
|
10
12
|
readonly check: "bun run check";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-output.types.d.ts","sourceRoot":"","sources":["../src/generate-output.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ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AuB,CAAC;QAC1C,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;QAC5C,QAAQ,CAAC,OAAO,EAAE,+CAA+C,CAAC;QAClE,QAAQ,CAAC,YAAY,EAAE,gDAAgD,CAAC;QACxE,QAAQ,CAAC,KAAK,CAAC,EAAE,6CAA6C,CAAC;KAChE,CAAC,CAAC;CACJ"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import type { CreateOptions } from "./options.js";
|
|
3
|
+
import type { GenerateProjectContext } from "./generate-types.js";
|
|
4
|
+
import { GeneratorProcess } from "./generator-process.js";
|
|
5
|
+
/** Copies and customizes the template before installation.
|
|
6
|
+
* @param stage - Scope-owned sibling directory.
|
|
7
|
+
* @param options - Normalized creation selection.
|
|
8
|
+
* @param context - Template and deterministic failure authority.
|
|
9
|
+
* @returns Lazy materialization; failures abort before publication.
|
|
10
|
+
*/
|
|
11
|
+
export declare const materializeGenerationStage: (stage: string, options: CreateOptions, context: GenerateProjectContext) => Effect.Effect<void, import("./generator-errors.js").GeneratorIoError | import("./generator-errors.js").GeneratorDomainError, import("./generator-filesystem.js").GeneratorFileSystem | import("./generator-paths.js").GeneratorPaths>;
|
|
12
|
+
/** Installs dependencies and optional Git metadata inside the private stage.
|
|
13
|
+
* @param stage - Scope-owned sibling directory.
|
|
14
|
+
* @param options - Install/Git creation choices.
|
|
15
|
+
* @param context - Native executable, progress and cancellation authority.
|
|
16
|
+
* @returns Whether Git was initialized; owned subprocesses settle before returning.
|
|
17
|
+
*/
|
|
18
|
+
export declare const installGenerationStage: (stage: string, options: CreateOptions, context: GenerateProjectContext) => Effect.Effect<boolean, import("./generator-errors.js").GeneratorProcessError | import("./generator-errors.js").GeneratorDomainError, GeneratorProcess>;
|
|
19
|
+
/** Checks prerequisites and prepares a snapshot from one source validation.
|
|
20
|
+
* @param stage - Installed private project root.
|
|
21
|
+
* @param options - Cloud/deployment options controlling existing doctor checks.
|
|
22
|
+
* @param context - Native executable, progress and cancellation authority.
|
|
23
|
+
* @returns Finite preparation completion; failure leaves the destination unpublished.
|
|
24
|
+
*/
|
|
25
|
+
export declare const verifyGenerationStage: (stage: string, options: CreateOptions, context: GenerateProjectContext) => Effect.Effect<void, import("./generator-errors.js").GeneratorProcessError | import("./generator-errors.js").GeneratorDomainError, import("./generator-filesystem.js").GeneratorFileSystem | GeneratorProcess>;
|
|
26
|
+
//# sourceMappingURL=generate-preparation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-preparation.d.ts","sourceRoot":"","sources":["../src/generate-preparation.ts"],"names":[],"mappings":"AAOA,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;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAgB1D;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,mTAmBtC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,oOAuBlC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,2RA+BjC,CAAC"}
|