Packages · @purista/cli

@purista/cli

Signature

@purista/cli.ts typescript
@purista/cli

Classes

3 entries

PuristaCliError

Classes

Source
PuristaCliError.ts typescript
class PuristaCliError

Base error type thrown by the programmatic CLI API.

PuristaCliPromptError

Classes

Source
PuristaCliPromptError.ts typescript
class PuristaCliPromptError

Error thrown by prompt adapters when interactive input cannot be collected.

PuristaCliValidationError

Classes

Source
PuristaCliValidationError.ts typescript
class PuristaCliValidationError

Error thrown when command input or project state cannot be resolved.

Interfaces

2 entries

Options

Interfaces

Source
Options.ts typescript
interface Options

Options used for converting strings to any case.

PascalCaseOptions

Interfaces

Source
PascalCaseOptions.ts typescript
interface PascalCaseOptions

Options used for converting strings to pascal/camel case.

Type Aliases

42 entries

AddPuristaQueueInput

Types

Source
AddPuristaQueueInput.ts typescript
type AddPuristaQueueInput = void

Input for generating a queue, its primary worker, and optional producer command.

AddPuristaQueueWorkerInput

Types

Source
AddPuristaQueueWorkerInput.ts typescript
type AddPuristaQueueWorkerInput = void

Input for generating an additional worker for an existing queue.

BasePromptRequest

Types

Source
BasePromptRequest.ts typescript
type BasePromptRequest = void

Shared fields used by prompt requests.

BlueprintId

Types

Source
BlueprintId.ts typescript
type BlueprintId = typeof blueprintIds[number]

Built-in project blueprint identifiers understood by the generator.

ConfirmPromptRequest

Types

Source
ConfirmPromptRequest.ts typescript
type ConfirmPromptRequest = BasePromptRequest<TKey> & { defaultValue: boolean; type: "confirm" }

Boolean confirmation prompt request.

CreateProjectInput

Types

Source
CreateProjectInput.ts typescript
type CreateProjectInput = void

Normalized input used to plan and materialize a new PURISTA project.

EnqueueOption

Types

Source
EnqueueOption.ts typescript
type EnqueueOption = void

Queue import metadata used when generating a command with `.canEnqueue(...)`.

ExampleServiceGeneratorStep

Types

Source
ExampleServiceGeneratorStep.ts typescript
type ExampleServiceGeneratorStep = void

Deferred generator action that creates the example service after base files exist.

InputPromptRequest

Types

Source
InputPromptRequest.ts typescript
type InputPromptRequest = BasePromptRequest<TKey> & { type: "input"; validate: (value: string) => true | string }

Text input prompt request.

Locale

Types

Source
Locale.ts typescript
type Locale = string[] | string | false | undefined

Supported locale values. Use `false` to ignore locale. Defaults to `undefined`, which uses the host environment.

OutputAdapter

Types

Source
OutputAdapter.ts typescript
type OutputAdapter = void

Adapter for rendering CLI results and errors in custom hosts.

PackageManager

Types

Source
PackageManager.ts typescript
type PackageManager = "npm" | "bun" | "pnpm" | "yarn"

Package managers supported by the project generator.

PKG

Types

Source
PKG.ts typescript
type PKG = PackageJson & { trustedDependencies: string[] }

Package.json shape used by the CLI project blueprint merger.

ProjectBlueprint

Types

Source
ProjectBlueprint.ts typescript
type ProjectBlueprint = void

A reusable project generator unit.

ProjectBlueprintContext

Types

Source
ProjectBlueprintContext.ts typescript
type ProjectBlueprintContext = CreateProjectInput & { targetDirectoryPath: string }

Input visible to a blueprint while it decides and creates contributions.

ProjectBlueprintContribution

Types

Source
ProjectBlueprintContribution.ts typescript
type ProjectBlueprintContribution = ProjectConfigPatch & { files: ProjectFileContribution[]; generatorSteps: ProjectGeneratorStep[]; warnings: string[] }

Files, config patches, warnings, and deferred steps emitted by a blueprint.

ProjectConfigPatch

Types

Source
ProjectConfigPatch.ts typescript
type ProjectConfigPatch = void

Partial project-level configuration merged from a blueprint.

ProjectFileContribution

Types

Source
ProjectFileContribution.ts typescript
type ProjectFileContribution = void

A file that a blueprint contributes to a project generation plan.

ProjectGenerationPlan

Types

Source
ProjectGenerationPlan.ts typescript
type ProjectGenerationPlan = void

Complete dry-run project generation plan.

ProjectGeneratorStep

Types

Source
ProjectGeneratorStep.ts typescript
type ProjectGeneratorStep = ExampleServiceGeneratorStep

Union of deferred generator steps executed while materializing a project.

ProjectSnapshot

Types

Source
ProjectSnapshot.ts typescript
type ProjectSnapshot = void

Full project snapshot used by CLI generators to append new definitions safely.

PromptAdapter

Types

Source
PromptAdapter.ts typescript
type PromptAdapter = void

Adapter used by the engine when it must collect missing input.

PromptAnswerMap

Types

Source
PromptAnswerMap.ts typescript
type PromptAnswerMap = Record<string, string | boolean>

Programmatic answer map keyed by prompt `key`.

PromptChoice

Types

Source
PromptChoice.ts typescript
type PromptChoice = void

One selectable prompt option.

PromptRequest

Types

Source
PromptRequest.ts typescript
type PromptRequest = InputPromptRequest<TKey> | ConfirmPromptRequest<TKey> | SelectPromptRequest<TKey>

Union of prompt requests emitted by CLI command resolution.

PuristaCliEngineOptions

Types

Source
PuristaCliEngineOptions.ts typescript
type PuristaCliEngineOptions = void

Options for creating a reusable programmatic PURISTA CLI engine.

PuristaCommandContext

Types

Source
PuristaCommandContext.ts typescript
type PuristaCommandContext = void

Runtime context passed to CLI command resolvers and executors.

PuristaCommandId

Types

Source
PuristaCommandId.ts typescript
type PuristaCommandId = typeof puristaCommandIds[number]

Command identifiers accepted by the programmatic CLI engine.

PuristaCommandIssue

Types

Source
PuristaCommandIssue.ts typescript
type PuristaCommandIssue = void

A validation or execution issue reported by a CLI command.

PuristaCommandMode

Types

Source
PuristaCommandMode.ts typescript
type PuristaCommandMode = "interactive" | "non-interactive" | "programmatic"

Controls how unresolved command input is completed before execution.

PuristaCommandResolution

Types

Source
PuristaCommandResolution.ts typescript
type PuristaCommandResolution = void

Output of command input resolution before execution.

PuristaCommandResult

Types

Source
PuristaCommandResult.ts typescript
type PuristaCommandResult = void

Result returned after a CLI command has executed.

PuristaConfig

Types

Source
PuristaConfig.ts typescript
type PuristaConfig = z.infer<typeof puristaConfigSchema>

Parsed `purista.json` configuration with defaults applied.

PuristaExecutableCommand

Types

Source
PuristaExecutableCommand.ts typescript
type PuristaExecutableCommand = void

Definition contract implemented by commands registered in the CLI engine.

PuristaFileMutation

Types

Source
PuristaFileMutation.ts typescript
type PuristaFileMutation = void

Describes one file path changed by a CLI command.

PuristaProjectInfo

Types

Source
PuristaProjectInfo.ts typescript
type PuristaProjectInfo = void

Public project information required by scaffolding helpers.

PuristaProjectServices

Types

Source
PuristaProjectServices.ts typescript
type PuristaProjectServices = Record<string, Record<string, Omit<ServiceVersionSnapshot, "queues" | "queueWorkers">>>

Public service scan result used by legacy generator helpers.

QueueProducerOptions

Types

Source
QueueProducerOptions.ts typescript
type QueueProducerOptions = void

Optional command generated together with a queue to enqueue work.

QueueWorkerOptions

Types

Source
QueueWorkerOptions.ts typescript
type QueueWorkerOptions = void

Queue worker generated together with a queue.

ResolvedProjectBlueprints

Types

Source
ResolvedProjectBlueprints.ts typescript
type ResolvedProjectBlueprints = void

Result of selecting project blueprints for a concrete init input.

SelectPromptRequest

Types

Source
SelectPromptRequest.ts typescript
type SelectPromptRequest = BasePromptRequest<TKey> & { choices: ReadonlyArray<PromptChoice<TValue>>; defaultValue: TValue; type: "select" }

Single-choice prompt request.

ServiceVersionSnapshot

Types

Source
ServiceVersionSnapshot.ts typescript
type ServiceVersionSnapshot = void

Discovered files and artifact directories for one service version.

Variables

4 entries

blueprintIds

Variables

Source
blueprintIds.ts typescript
const blueprintIds: typeOperator

Ordered list of built-in project blueprint identifiers.

projectBlueprintRegistry

Variables

Source
projectBlueprintRegistry.ts typescript
const projectBlueprintRegistry: Record<string, ProjectBlueprint>

Registry of built-in project blueprints used by `planProjectGeneration`.

puristaCommandIds

Variables

Source
puristaCommandIds.ts typescript
const puristaCommandIds: typeOperator

Ordered list of command identifiers supported by the programmatic CLI engine.

puristaConfigSchema

Variables

Source
puristaConfigSchema.ts typescript
const puristaConfigSchema: ZodObject<{ $schema: ZodDefault<ZodOptional<ZodString>>; agentPath: ZodDefault<ZodOptional<ZodString>>; eventBridge: ZodDefault<ZodEnum<{ amqp: unknown; dapr: unknown; default: unknown; mqtt: unknown; nats: unknown }>>; eventConvention: ZodDefault<ZodEnum<{ camel: unknown; constantCase: unknown; dotCase: unknown; kebab: unknown; pascal: unknown; pascalSnake: unknown; ... }>>; fileConvention: ZodDefault<ZodEnum<{ camel: unknown; kebab: unknown; pascal: unknown; pascalSnake: unknown; snake: unknown }>>; formatter: ZodDefault<ZodEnum<{ biome: unknown; none: unknown; prettier: unknown }>>; ... }, $strip>

Zod schema for the `purista.json` configuration file consumed by the CLI.

Functions

70 entries

addPuristaAgent

Functions

Source
addPuristaAgent.ts typescript
addPuristaAgent(input: { agentDescription: string; agentName: string; codeWriterOptions: Partial<Options>; projectRootPath: string; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; puristaProject: PuristaProjectInfo; ... }): Promise<void>

addPuristaCommand

Functions

Source
addPuristaCommand.ts typescript
addPuristaCommand(input: { codeWriterOptions: Partial<Options>; commandDescription: string; commandName: string; enqueues: { parameterSchemaExportName: string; payloadSchemaExportName: string; queueName: string; schemaFilePath: string }[]; eventToSubscribe: string; projectRootPath: string; ... }): Promise<void>

addPuristaQueue

Functions

Source
addPuristaQueue.ts typescript
addPuristaQueue(input: AddPuristaQueueInput): Promise<void>

addPuristaQueueWorker

Functions

Source
addPuristaQueueWorker.ts typescript
addPuristaQueueWorker(input: AddPuristaQueueWorkerInput): Promise<void>

addPuristaService

Functions

Source
addPuristaService.ts typescript
addPuristaService(input: { codeWriterOptions: Partial<Options>; projectRootPath: string; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; puristaProject: PuristaProjectInfo; serviceDescription: string; serviceName: string; ... }): Promise<void>

addPuristaStream

Functions

Source
addPuristaStream.ts typescript
addPuristaStream(input: { codeWriterOptions: Partial<Options>; projectRootPath: string; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; puristaProject: PuristaProjectInfo; responseEventName: string; serviceName: string; ... }): Promise<void>

addPuristaSubscription

Functions

Source
addPuristaSubscription.ts typescript
addPuristaSubscription(input: { codeWriterOptions: Partial<Options>; eventToSubscribe: string; projectRootPath: string; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; puristaProject: PuristaProjectInfo; responseEventName: string; ... }): Promise<void>

camelCase

Functions

Source
camelCase.ts typescript
camelCase(input: string, options?: PascalCaseOptions): string

capitalCase

Functions

Source
capitalCase.ts typescript
capitalCase(input: string, options?: Options): string

constantCase

Functions

Source
constantCase.ts typescript
constantCase(input: string, options?: Options): string

convertToProjectFileCasing

Functions

Source
convertToProjectFileCasing.ts typescript
convertToProjectFileCasing(input: string, puristaProjectConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }): string

createAmqpConfigFile

Functions

Source
createAmqpConfigFile.ts typescript
createAmqpConfigFile(): string

createBiomeConfigFile

Functions

Source
createBiomeConfigFile.ts typescript
createBiomeConfigFile(): string

createDaprConfigFile

Functions

Source
createDaprConfigFile.ts typescript
createDaprConfigFile(): string

createDefinitionsFile

Functions

Source
createDefinitionsFile.ts typescript
createDefinitionsFile(input: CreateProjectInput): string

createEntrypointFile

Functions

Source
createEntrypointFile.ts typescript
createEntrypointFile(input: CreateProjectInput, puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }): string

createEslintModuleConfigFile

Functions

Source
createEslintModuleConfigFile.ts typescript
createEslintModuleConfigFile(): string

createEventBridgeFile

Functions

Source
createEventBridgeFile.ts typescript
createEventBridgeFile(input: CreateProjectInput): string

createExportDefinitionsFile

Functions

Source
createExportDefinitionsFile.ts typescript
createExportDefinitionsFile(): string

createGitIgnoreFile

Functions

Source
createGitIgnoreFile.ts typescript
createGitIgnoreFile(): string

createHttpConfigFile

Functions

Source
createHttpConfigFile.ts typescript
createHttpConfigFile(): string

createHttpFile

Functions

Source
createHttpFile.ts typescript
createHttpFile(runtime: "node" | "bun"): "import type { EventBridge, Logger, Service } from '@purista/core'\nimport { honoV1Service } from '@purista/hono-http-server'\nimport { apiReference } from '@scalar/hono-api-reference'\nimport { serveStatic } from 'hono/bun'\nimport httpConfig from './config/http.js'\n\nexport const getHttpServer = async (input: { eventBridge: EventBridge; logger: Logger; services: Service[] }) => {\n\tconst honoService = await honoV1Service.getInstance(input.eventBridge, {\n\t\tlogger: input.logger,\n\t\tserviceConfig: { ...httpConfig.serviceConfig, services: input.services },\n\t})\n\n\thonoService.app.get(\n\t\thttpConfig.serviceConfig.apiMountPath,\n\t\tapiReference({\n\t\t\tpageTitle: httpConfig.serviceConfig.openApi.info.title,\n\t\t\tspec: {\n\t\t\t\turl: `${httpConfig.serviceConfig.apiMountPath}/openapi.json`,\n\t\t\t},\n\t\t}),\n\t)\n\n\thonoService.app.get('*', serveStatic({ root: httpConfig.root }))\n\thonoService.openApi.addServer({\n\t\turl: `http://localhost:${httpConfig.port}`,\n\t\tdescription: 'the local server',\n\t})\n\n\tawait honoService.start()\n\n\tconst serverInstance = Bun.serve({\n\t\tfetch: honoService.app.fetch,\n\t\tport: httpConfig.port,\n\t})\n\n\treturn { honoService, serverInstance }\n}\n" | "import { serve } from '@hono/node-server'\nimport { serveStatic } from '@hono/node-server/serve-static'\nimport type { EventBridge, Logger, Service } from '@purista/core'\nimport { honoV1Service } from '@purista/hono-http-server'\nimport { apiReference } from '@scalar/hono-api-reference'\nimport httpConfig from './config/http.js'\n\nexport const getHttpServer = async (input: { eventBridge: EventBridge; logger: Logger; services: Service[] }) => {\n\tconst honoService = await honoV1Service.getInstance(input.eventBridge, {\n\t\tlogger: input.logger,\n\t\tserviceConfig: { ...httpConfig.serviceConfig, services: input.services },\n\t})\n\n\thonoService.app.get(\n\t\thttpConfig.serviceConfig.apiMountPath,\n\t\tapiReference({\n\t\t\tpageTitle: httpConfig.serviceConfig.openApi.info.title,\n\t\t\tspec: {\n\t\t\t\turl: `${httpConfig.serviceConfig.apiMountPath}/openapi.json`,\n\t\t\t},\n\t\t}),\n\t)\n\n\thonoService.app.get('*', serveStatic({ root: httpConfig.root }))\n\thonoService.openApi.addServer({ url: `http://localhost:${httpConfig.port}`, description: 'the local server' })\n\n\tawait honoService.start()\n\n\tconst serverInstance = serve({\n\t\tfetch: honoService.app.fetch,\n\t\tport: httpConfig.port,\n\t})\n\n\treturn { honoService, serverInstance }\n}\n"

createMqttConfigFile

Functions

Source
createMqttConfigFile.ts typescript
createMqttConfigFile(): string

createNatsConfigFile

Functions

Source
createNatsConfigFile.ts typescript
createNatsConfigFile(): string

createProjectSnapshot

Functions

Source
createProjectSnapshot.ts typescript
createProjectSnapshot(puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }, projectRootPath?: string): Promise<ProjectSnapshot>

createPublicIndexHtml

Functions

Source
createPublicIndexHtml.ts typescript
createPublicIndexHtml(input: CreateProjectInput): string

createPuristaCliEngine

Functions

Source
createPuristaCliEngine.ts typescript
createPuristaCliEngine(options: PuristaCliEngineOptions): { resolvePuristaCommand: (commandId: "add-service" | "add-command" | "add-subscription" | "add-stream" | "add-queue" | "add-queue-worker" | "add-agent" | "export-asyncapi" | "export-runtime-capabilities" | "export-schedule-manifest" | "export-kubernetes-cronjob" | "export-cloudevents-schema" | "init-project", input: TInput) => Promise<PuristaCommandResolution<TInput, unknown>>; runPuristaCommand: (commandId: "add-service" | "add-command" | "add-subscription" | "add-stream" | "add-queue" | "add-queue-worker" | "add-agent" | "export-asyncapi" | "export-runtime-capabilities" | "export-schedule-manifest" | "export-kubernetes-cronjob" | "export-cloudevents-schema" | "init-project", input: TInput) => Promise<PuristaCommandResult> }

createReadmeFile

Functions

Source
createReadmeFile.ts typescript
createReadmeFile(input: CreateProjectInput): string

createServiceEventEnumFile

Functions

Source
createServiceEventEnumFile.ts typescript
createServiceEventEnumFile(input: CreateProjectInput): string

dotCase

Functions

Source
dotCase.ts typescript
dotCase(input: string, options?: Options): string

getCommandBuilderFileContent

Functions

Source
getCommandBuilderFileContent.ts typescript
getCommandBuilderFileContent(input: { codeWriterOptions: Partial<Options>; commandDescription: string; commandName: string; enqueueOptions: EnqueueOption[]; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; puristaProject: PuristaProjectInfo; ... }): string

getCommandSchemaFileContent

Functions

Source
getCommandSchemaFileContent.ts typescript
getCommandSchemaFileContent(input: { codeWriterOptions: Partial<Options>; commandName: string; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; serviceName: string; serviceVersion: string }): string

getCommandTestFileContent

Functions

Source
getCommandTestFileContent.ts typescript
getCommandTestFileContent(input: { codeWriterOptions: Partial<Options>; commandName: string; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; serviceName: string; serviceVersion: string }): string

getCommandTypeFileContent

Functions

Source
getCommandTypeFileContent.ts typescript
getCommandTypeFileContent(input: { codeWriterOptions: Partial<Options>; commandName: string; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; serviceName: string; serviceVersion: string }): string

getGeneralServiceConfigFileContent

Functions

Source
getGeneralServiceConfigFileContent.ts typescript
getGeneralServiceConfigFileContent(input: { codeWriterOptions: Partial<Options>; serviceDescription: string; serviceName: string }): string

getQueueBuilderFileContent

Functions

Source
getQueueBuilderFileContent.ts typescript
getQueueBuilderFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; queueDescription: string; queueName: string; serviceName: string; serviceVersion: string }): string

getQueueSchemaFileContent

Functions

Source
getQueueSchemaFileContent.ts typescript
getQueueSchemaFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; queueName: string; serviceName: string; serviceVersion: string }): string

getQueueTestFileContent

Functions

Source
getQueueTestFileContent.ts typescript
getQueueTestFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; queueName: string; serviceName: string; serviceVersion: string }): string

getQueueTypeFileContent

Functions

Source
getQueueTypeFileContent.ts typescript
getQueueTypeFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; queueName: string; serviceName: string; serviceVersion: string }): string

getQueueWorkerBuilderFileContent

Functions

Source
getQueueWorkerBuilderFileContent.ts typescript
getQueueWorkerBuilderFileContent(input: { codeWriterOptions: Partial<Options>; intervalMs: number; maxParallelHandlers: number; mode: "continuous" | "interval" | "sequential"; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; queueName: string; ... }): string

getQueueWorkerTestFileContent

Functions

Source
getQueueWorkerTestFileContent.ts typescript
getQueueWorkerTestFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; queueName: string; serviceName: string; serviceVersion: string; workerName: string }): string

getServiceBuilderFileContent

Functions

Source
getServiceBuilderFileContent.ts typescript
getServiceBuilderFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; serviceName: string; serviceVersion: string }): string

getServiceConfigFileContent

Functions

Source
getServiceConfigFileContent.ts typescript
getServiceConfigFileContent(input: { codeWriterOptions: Partial<Options>; serviceName: string; serviceVersion: string }): string

getServiceFileContent

Functions

Source
getServiceFileContent.ts typescript
getServiceFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; serviceName: string; serviceVersion: string }): string

getServiceTestFileContent

Functions

Source
getServiceTestFileContent.ts typescript
getServiceTestFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; serviceName: string; serviceVersion: string }): string

getStreamBuilderFileContent

Functions

Source
getStreamBuilderFileContent.ts typescript
getStreamBuilderFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; puristaProject: PuristaProjectInfo; responseEventName: string; serviceName: string; serviceVersion: string; ... }): string

getStreamSchemaFileContent

Functions

Source
getStreamSchemaFileContent.ts typescript
getStreamSchemaFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; serviceName: string; serviceVersion: string; streamName: string }): string

getStreamTestFileContent

Functions

Source
getStreamTestFileContent.ts typescript
getStreamTestFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; serviceName: string; serviceVersion: string; streamName: string }): string

getStreamTypeFileContent

Functions

Source
getStreamTypeFileContent.ts typescript
getStreamTypeFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; serviceName: string; serviceVersion: string; streamName: string }): string

getSubscriptionBuilderFileContent

Functions

Source
getSubscriptionBuilderFileContent.ts typescript
getSubscriptionBuilderFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; puristaProject: PuristaProjectInfo; responseEventName: string; serviceName: string; serviceVersion: string; ... }): string

getSubscriptionSchemaFileContent

Functions

Source
getSubscriptionSchemaFileContent.ts typescript
getSubscriptionSchemaFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; responseEventName: string; serviceName: string; serviceVersion: string; subscriptionName: string }): string

getSubscriptionTestFileContent

Functions

Source
getSubscriptionTestFileContent.ts typescript
getSubscriptionTestFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; serviceName: string; serviceVersion: string; subscriptionName: string }): string

getSubscriptionTypeFileContent

Functions

Source
getSubscriptionTypeFileContent.ts typescript
getSubscriptionTypeFileContent(input: { codeWriterOptions: Partial<Options>; puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }; responseEventName: string; serviceName: string; serviceVersion: string; subscriptionName: string }): string

kebabCase

Functions

Source
kebabCase.ts typescript
kebabCase(input: string, options?: Options): string

loadPuristaConfig

Functions

Source
loadPuristaConfig.ts typescript
loadPuristaConfig(projectRootPath?: string): Promise<{ $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }>

materializeProjectGeneration

Functions

Source
materializeProjectGeneration.ts typescript
materializeProjectGeneration(plan: ProjectGenerationPlan): Promise<{ files: string[]; targetDirectoryPath: string }>

noCase

Functions

Source
noCase.ts typescript
noCase(input: string, options?: Options): string

pascalCase

Functions

Source
pascalCase.ts typescript
pascalCase(input: string, options?: PascalCaseOptions): string

pascalSnakeCase

Functions

Source
pascalSnakeCase.ts typescript
pascalSnakeCase(input: string, options?: Options): string

pathCase

Functions

Source
pathCase.ts typescript
pathCase(input: string, options?: Options): string

planProjectGeneration

Functions

Source
planProjectGeneration.ts typescript
planProjectGeneration(input: CreateProjectInput, options: { cwd: string }): ProjectGenerationPlan

resolveProjectBlueprints

Functions

Source
resolveProjectBlueprints.ts typescript
resolveProjectBlueprints(input: CreateProjectInput, options: { cwd: string }): ResolvedProjectBlueprints

resolvePuristaCommand

Functions

Source
resolvePuristaCommand.ts typescript
resolvePuristaCommand<TInput>(commandId: "add-service" | "add-command" | "add-subscription" | "add-stream" | "add-queue" | "add-queue-worker" | "add-agent" | "export-asyncapi" | "export-runtime-capabilities" | "export-schedule-manifest" | "export-kubernetes-cronjob" | "export-cloudevents-schema" | "init-project", input: TInput, options?: PuristaCliEngineOptions): Promise<PuristaCommandResolution<TInput, unknown>>

runPuristaCommand

Functions

Source
runPuristaCommand.ts typescript
runPuristaCommand<TInput>(commandId: "add-service" | "add-command" | "add-subscription" | "add-stream" | "add-queue" | "add-queue-worker" | "add-agent" | "export-asyncapi" | "export-runtime-capabilities" | "export-schedule-manifest" | "export-kubernetes-cronjob" | "export-cloudevents-schema" | "init-project", input: TInput, options?: PuristaCliEngineOptions): Promise<PuristaCommandResult>

scanPuristaProject

Functions

Source
scanPuristaProject.ts typescript
scanPuristaProject(puristaConfig: { $schema: string; agentPath: string; eventBridge: "default" | "amqp" | "nats" | "mqtt" | "dapr"; eventConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake" | "constantCase" | "dotCase" | "pathCase" | "trainCase"; fileConvention: "camel" | "snake" | "kebab" | "pascal" | "pascalSnake"; formatter: "biome" | "prettier" | "none"; ... }, projectRootPath?: string): Promise<PuristaProjectInfo>

sentenceCase

Functions

Source
sentenceCase.ts typescript
sentenceCase(input: string, options?: Options): string

snakeCase

Functions

Source
snakeCase.ts typescript
snakeCase(input: string, options?: Options): string

split

Functions

Source
split.ts typescript
split(value: string): string[]

splitSeparateNumbers

Functions

Source
splitSeparateNumbers.ts typescript
splitSeparateNumbers(value: string): string[]

trainCase

Functions

Source
trainCase.ts typescript
trainCase(input: string, options?: Options): string