🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@fluojs/cli

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluojs/cli - npm Package Compare versions

Comparing version
1.0.1
to
1.0.2
+24
dist/fixtures/inspect-app.module.d.ts
interface TypeScriptFixtureMetadata {
readonly source: 'typescript';
}
declare class TypeScriptSharedService {
readonly metadata: TypeScriptFixtureMetadata;
}
/**
* Represents a TypeScript-authored shared module fixture.
*/
export declare class TypeScriptSharedModule {
}
/**
* Represents the default TypeScript-authored app module fixture.
*/
export declare class AppModule {
}
/**
* Represents a named TypeScript-authored module fixture for --export coverage.
*/
export declare class AdminModule {
}
export declare const inspectFixtureServices: (typeof TypeScriptSharedService)[];
export {};
//# sourceMappingURL=inspect-app.module.d.ts.map
{"version":3,"file":"inspect-app.module.d.ts","sourceRoot":"","sources":["../../src/fixtures/inspect-app.module.ts"],"names":[],"mappings":"AAAA,UAAU,yBAAyB;IACjC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;CAC/B;AAED,cAAM,uBAAuB;IAC3B,QAAQ,CAAC,QAAQ,EAAE,yBAAyB,CAA4B;CACzE;AAED;;GAEG;AACH,qBAAa,sBAAsB;CAAG;AAEtC;;GAEG;AACH,qBAAa,SAAS;CAAG;AAEzB;;GAEG;AACH,qBAAa,WAAW;CAAG;AAE3B,eAAO,MAAM,sBAAsB,oCAA4B,CAAC"}
class TypeScriptSharedService {
metadata = {
source: 'typescript'
};
}
/**
* Represents a TypeScript-authored shared module fixture.
*/
export class TypeScriptSharedModule {}
/**
* Represents the default TypeScript-authored app module fixture.
*/
export class AppModule {}
/**
* Represents a named TypeScript-authored module fixture for --export coverage.
*/
export class AdminModule {}
export const inspectFixtureServices = [TypeScriptSharedService];
+1
-1

@@ -1,1 +0,1 @@

{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],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BAAiB,CAAC;IAC1B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,GAAG,4BAA4B,CAAC;CACpD;AA4ZD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,MAAM,CAC1B,IAAI,WAAwB,EAC5B,OAAO,GAAE,iBAAiB,GAAG,wBAAwB,GAAG,4BAAiC,GACxF,OAAO,CAAC,MAAM,CAAC,CAuNjB"}

@@ -128,2 +128,5 @@ import { existsSync, readFileSync, readdirSync } from 'node:fs';

}
function isHelpInvocation(argv) {
return argv[0] === 'help' || argv.some(isHelpFlag);
}
function readCliVersion() {

@@ -391,16 +394,18 @@ const packageJsonPath = fileURLToPath(new URL('../package.json', import.meta.url));

}
const updateCheckOptions = runtime.updateCheck === false ? undefined : runtime.updateCheck;
const updateCheckResult = await runCliUpdateCheck(commandArgv, {
...updateCheckOptions,
ci: runtime.ci,
env,
bypassCache: isCreationCommand(commandArgv[0]),
interactive: runtime.interactive,
skip: updateFlagResult.skipUpdateCheck || runtime.updateCheck === false,
stderr,
stdin: runtime.stdin,
stdout
});
if (updateCheckResult.action === 'reran') {
return updateCheckResult.exitCode;
if (!isHelpInvocation(commandArgv)) {
const updateCheckOptions = runtime.updateCheck === false ? undefined : runtime.updateCheck;
const updateCheckResult = await runCliUpdateCheck(commandArgv, {
...updateCheckOptions,
ci: runtime.ci,
env,
bypassCache: isCreationCommand(commandArgv[0]),
interactive: runtime.interactive,
skip: updateFlagResult.skipUpdateCheck || runtime.updateCheck === false,
stderr,
stdin: runtime.stdin,
stdout
});
if (updateCheckResult.action === 'reran') {
return updateCheckResult.exitCode;
}
}

@@ -421,3 +426,3 @@ if (commandArgv.length === 0) {

if (topic === 'doctor' || topic === 'info') {
stdout.write(`${diagnosticsUsage('doctor')}\n`);
stdout.write(`${diagnosticsUsage(topic)}\n`);
return 0;

@@ -461,3 +466,3 @@ }

if ((commandArgv[0] === 'doctor' || commandArgv[0] === 'info') && commandArgv.slice(1).some(isHelpFlag)) {
stdout.write(`${diagnosticsUsage('doctor')}\n`);
stdout.write(`${diagnosticsUsage(commandArgv[0])}\n`);
return 0;

@@ -464,0 +469,0 @@ }

@@ -73,3 +73,3 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';

function resolveE2eRootModuleImport(domainDirectory, resolvedBase) {
return toImportSpecifier(relative(domainDirectory, join(resolvedBase, 'app.module')));
return toImportSpecifier(relative(domainDirectory, join(resolvedBase, 'app')));
}

@@ -76,0 +76,0 @@ function resolveDomainDirectory(kind, resolvedBase, kebab, options) {

@@ -1,1 +0,1 @@

{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/commands/inspect.ts"],"names":[],"mappings":"AAMA,OAAO,EAML,KAAK,qBAAqB,EAE3B,MAAM,iBAAiB,CAAC;AAKzB,KAAK,SAAS,GAAG;IACf,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,KAAK,CAAC,IAAI,IAAI,CAAC;IACf,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACnE,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,KAAK,qBAAqB,GAAG,CAAC,QAAQ,EAAE,qBAAqB,KAAK,MAAM,CAAC;AAEzE,KAAK,2BAA2B,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAAC;AAE/F;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,yEAAyE;IACzE,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,uDAAuD;IACvD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yEAAyE;IACzE,yBAA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CAAC,EAAE,OAAO,CAAC;IACtB,yEAAyE;IACzE,yBAAyB,CAAC,EAAE,2BAA2B,CAAC;IACxD,wFAAwF;IACxF,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,sCAAsC;IACtC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,yCAAyC;IACzC,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAmFD;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAarC;AA+PD;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,4BAAiC,GAAG,OAAO,CAAC,MAAM,CAAC,CAwDnH"}
import { mkdir, writeFile } from 'node:fs/promises';
import { createRequire } from 'node:module';
import { dirname, resolve } from 'node:path';
import { dirname, extname, resolve } from 'node:path';
import { pathToFileURL } from 'node:url';
import * as clack from '@clack/prompts';
import { FluoFactory, PLATFORM_SHELL } from '@fluojs/runtime';
import { tsImport } from 'tsx/esm/api';
import { renderAliasList, renderHelpTable } from '../help.js';

@@ -24,3 +25,3 @@ import { CliPromptCancelledError, isCliPromptCancelledError } from '../prompt-cancel.js';

aliases: [],
description: 'Bootstrap the application context and emit versioned timing diagnostics.',
description: 'Include bootstrap timing diagnostics next to JSON inspect output.',
option: '--timing'

@@ -45,2 +46,3 @@ }, {

const STUDIO_CONTRACT_ENTRYPOINT = '@fluojs/studio/contracts';
const TYPESCRIPT_MODULE_EXTENSIONS = new Set(['.ts', '.tsx', '.mts', '.cts']);
const STUDIO_MISSING_MESSAGE = ['Mermaid graph rendering is owned by @fluojs/studio, but @fluojs/studio is not resolvable from this project.', 'Install @fluojs/studio explicitly (for example: pnpm add -D @fluojs/studio) and rerun fluo inspect --mermaid.'].join('\n');

@@ -126,3 +128,3 @@ function isHelpFlag(value) {

}
if (!json && !mermaid && !timing && !report) {
if (!json && !mermaid && !report) {
json = true;

@@ -153,9 +155,8 @@ }

}
function stringifyTiming(timing) {
const value = timing ?? {
phases: [],
totalMs: 0,
version: 1
};
return JSON.stringify(value, null, 2);
async function importInspectModule(modulePath) {
const moduleUrl = pathToFileURL(modulePath).href;
if (TYPESCRIPT_MODULE_EXTENSIONS.has(extname(modulePath))) {
return tsImport(moduleUrl, import.meta.url);
}
return import(moduleUrl);
}

@@ -290,23 +291,4 @@ function stringifySnapshot(snapshot) {

const modulePath = resolve(cwd, parsed.modulePath);
const importedModule = await import(pathToFileURL(modulePath).href);
const importedModule = await importInspectModule(modulePath);
const rootModule = resolveRootModule(importedModule[parsed.exportName], parsed.exportName);
if (parsed.timing && !parsed.json && !parsed.report) {
const context = await FluoFactory.createApplicationContext(rootModule, {
diagnostics: {
timing: true
},
logger: {
debug() {},
error() {},
log() {},
warn() {}
}
});
try {
await emitInspectPayload(stringifyTiming(context.bootstrapTiming), parsed, cwd, stdout);
} finally {
await context.close();
}
return 0;
}
const context = await FluoFactory.createApplicationContext(rootModule, {

@@ -313,0 +295,0 @@ diagnostics: parsed.timing || parsed.report ? {

@@ -1,1 +0,1 @@

{"version":3,"file":"node-restart-runner.d.ts","sourceRoot":"","sources":["../../src/dev-runner/node-restart-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAA0D,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAIjG,KAAK,mBAAmB,GAAG;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC,CAAC;AAEF,KAAK,mBAAmB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,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MAAM,CAAC,CA4M7F"}

@@ -79,2 +79,24 @@ import { spawn } from 'node:child_process';

}
function collectWatchDirectories(directoryPath, projectDirectory, ignorePatterns, directories) {
if (shouldIgnorePath(directoryPath, projectDirectory, ignorePatterns)) {
return;
}
try {
const stats = statSync(directoryPath);
if (!stats.isDirectory()) {
return;
}
directories.add(directoryPath);
for (const entry of readdirSync(directoryPath)) {
collectWatchDirectories(join(directoryPath, entry), projectDirectory, ignorePatterns, directories);
}
} catch (_error) {
return;
}
}
function getFallbackWatchDirectories(directoryPath, projectDirectory, ignorePatterns) {
const directories = new Set();
collectWatchDirectories(directoryPath, projectDirectory, ignorePatterns, directories);
return [...directories];
}

@@ -201,3 +223,4 @@ /**

const childShutdownTimeoutMs = Number(env.FLUO_DEV_CHILD_SHUTDOWN_TIMEOUT_MS ?? DEFAULT_CHILD_SHUTDOWN_TIMEOUT_MS);
const gate = createContentChangeGate(projectDirectory, parseIgnorePatterns(env));
const ignorePatterns = parseIgnorePatterns(env);
const gate = createContentChangeGate(projectDirectory, ignorePatterns);
const watchTargets = getWatchTargets(projectDirectory);

@@ -323,2 +346,23 @@ let child;

startChild(resolveExitCode, cleanup);
const watchedFallbackDirectories = new Set();
const watchFallbackDirectory = directoryPath => {
if (watchedFallbackDirectories.has(directoryPath) || shouldIgnorePath(directoryPath, projectDirectory, ignorePatterns)) {
return;
}
watchedFallbackDirectories.add(directoryPath);
const listener = (_event, filename) => {
const fileName = filename ? String(filename) : basename(directoryPath);
const changedPath = filename ? join(directoryPath, fileName) : directoryPath;
scheduleRestart(changedPath, resolveExitCode, cleanup);
for (const nextDirectoryPath of getFallbackWatchDirectories(changedPath, projectDirectory, ignorePatterns)) {
watchFallbackDirectory(nextDirectoryPath);
}
};
try {
watchers.push(watchTarget(directoryPath, listener));
} catch (error) {
watchedFallbackDirectories.delete(directoryPath);
stderr.write(`[fluo] unable to watch ${directoryPath}: ${error instanceof Error ? error.message : String(error)}\n`);
}
};
for (const target of watchTargets) {

@@ -340,3 +384,5 @@ try {

}
watchers.push(watchTarget(target, listener));
for (const directoryPath of getFallbackWatchDirectories(target, projectDirectory, ignorePatterns)) {
watchFallbackDirectory(directoryPath);
}
}

@@ -343,0 +389,0 @@ } catch (error) {

@@ -13,3 +13,3 @@ import { renderTemplate } from './render.js';

const kebab = toKebabCase(name);
const rootModuleImport = options.e2eRootModuleImport ?? '../src/app.module';
const rootModuleImport = options.e2eRootModuleImport ?? '../src/app';
return [{

@@ -16,0 +16,0 @@ content: renderTemplate('e2e.test.ts.ejs', {

@@ -1,1 +0,1 @@

{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../src/new/scaffold.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAkB,MAAM,YAAY,CAAC;AAkrEnE;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,gBAAgB,EACzB,aAAa,SAAkB,GAC9B,OAAO,CAAC,IAAI,CAAC,CA6Bf;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,6BAAuB,CAAC"}
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../src/new/scaffold.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAkB,MAAM,YAAY,CAAC;AAqxEnE;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,gBAAgB,EACzB,aAAa,SAAkB,GAC9B,OAAO,CAAC,IAAI,CAAC,CA6Bf;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,6BAAuB,CAAC"}

@@ -12,3 +12,3 @@ {

],
"version": "1.0.1",
"version": "1.0.2",
"private": false,

@@ -15,0 +15,0 @@ "license": "MIT",

@@ -51,3 +51,3 @@ # @fluojs/cli

`fluo new`와 alias인 `fluo create`는 일반 update-check cache가 아직 fresh하더라도 스캐폴딩 전에 interactive 최신 버전 확인을 새로 시도합니다. 이를 통해 첫 프로젝트 생성 경로가 방금 배포된 starter 동작과 더 잘 맞춰지며, `fluo dev`, `fluo build`, `fluo generate`, `fluo inspect` 같은 일상 명령은 기존처럼 일반 TTL이 만료될 때까지 cached latest-version 결과를 재사용합니다.
`fluo new`와 alias인 `fluo create`는 일반 update-check cache가 아직 fresh하더라도 스캐폴딩 전에 interactive 최신 버전 확인을 새로 시도합니다. 이를 통해 첫 프로젝트 생성 경로가 방금 배포된 starter 동작과 더 잘 맞춰지며, `fluo dev`, `fluo build`, `fluo generate`, `fluo inspect` 같은 일상 명령은 기존처럼 일반 TTL이 만료될 때까지 cached latest-version 결과를 재사용합니다. 순수 help 및 version inspection 경로(`fluo help <command>`, `<command> --help`, `fluo version`, `fluo --version`, `fluo -v`)는 interactive update check를 실행하지 않고 즉시 출력합니다.

@@ -116,3 +116,3 @@ 업데이트 확인은 CI, non-TTY 출력, npm-script context, 업데이트 후 재실행 context, registry/network 실패, 명시적 opt-out 경로에서는 건너뜁니다. 한 번만 끄려면 `--no-update-check`(또는 compatibility alias `--no-update-notifier`)를 사용하고, 자동화에서 절대 prompt가 뜨면 안 되는 경우에는 `FLUO_NO_UPDATE_CHECK=1`을 설정하세요.

NATS/Kafka/RabbitMQ 스타터 계약은 외부 broker와 caller-owned client library 의존성을 숨기지 않고 명시적으로 유지합니다. 생성된 프로젝트는 `src/app.ts`에서 `nats` + `JSONCodec()`, `kafkajs` producer/consumer collaborator, `amqplib` publisher/consumer collaborator를 직접 연결하므로, 기본 fluo 패키지가 그 의존성을 감춘 것처럼 가장하지 않는 runnable starter 계약이 됩니다.
NATS/Kafka/RabbitMQ 스타터 계약은 외부 broker와 caller-owned client library 의존성을 숨기지 않고 명시적으로 유지합니다. 생성된 프로젝트는 `src/app.ts`에서 `nats` + `JSONCodec()`, `kafkajs` producer/consumer collaborator, `amqplib` publisher/consumer collaborator를 직접 연결하므로, 기본 fluo 패키지가 그 의존성을 감춘 것처럼 가장하지 않는 runnable starter 계약이 됩니다. 해당 broker client는 생성된 transport wrapper가 Fluo lifecycle에서 listen/send/emit을 시작할 때 lazy하게 생성합니다. 따라서 `fluo inspect`, 테스트, static tooling이 `src/app.ts`를 import하는 것만으로는 broker에 연결하거나 lifecycle이 teardown을 소유하기 전에 외부 리소스를 열지 않습니다.

@@ -160,3 +160,3 @@ starter 매트릭스에는 mixed single-package starter도 포함됩니다. 하나의 Fastify HTTP 앱과 attached TCP microservice를 같은 생성 프로젝트 안에 함께 배치합니다.

`fluo generate e2e <name>`는 generated starter와 같은 app-level test 영역에 request-pipeline test를 두도록 `createTestApp({ rootModule: AppModule })`을 사용하는 `test/<name>.e2e.test.ts`를 작성합니다. 생성된 unit test는 직접 class 동작 검증에, slice test는 DI wiring과 override 검증에, e2e test는 virtual app을 통과하는 route, guard, interceptor, DTO validation, response writing 검증에 사용하세요.
`fluo generate e2e <name>`는 generated starter와 같은 app-level test 영역에 request-pipeline test를 두도록 `createTestApp({ rootModule: AppModule })`을 사용하는 `test/<name>.e2e.test.ts`를 작성하고, 기본 starter root module인 `../src/app`에서 `AppModule`을 import합니다. 생성된 unit test는 직접 class 동작 검증에, slice test는 DI wiring과 override 검증에, e2e test는 virtual app을 통과하는 route, guard, interceptor, DTO validation, response writing 검증에 사용하세요.

@@ -256,3 +256,3 @@ Request DTO 생성은 feature 디렉터리와 DTO 클래스 이름을 분리해서 받습니다. 따라서 `CreateUser`, `UpdateUser` 같은 여러 입력 계약을 같은 `src/users/` 슬라이스 안에 둘 수 있습니다.

# 런타임이 생산한 snapshot 옆에 bootstrap timing 포함하기
fluo inspect ./src/app.module.ts --json --timing
fluo inspect ./src/app.module.ts --timing

@@ -266,3 +266,3 @@ # 요약, snapshot, diagnostics, timing을 포함한 support triage report 내보내기

런타임이 inspection snapshot을 생산합니다. `fluo inspect`는 output mode flag가 없을 때 기본적으로 그 snapshot을 JSON으로 직렬화하고, `fluo inspect --mermaid`는 snapshot-to-Mermaid 렌더링을 선택적 `@fluojs/studio` 계약에 위임합니다. `--export <name>`은 bootstrap할 module export를 선택하며 기본값은 `AppModule`입니다. `--timing`은 JSON 출력에 bootstrap timing diagnostics를 기록하고, `--report`는 CI/support triage를 위해 런타임이 생산한 snapshot을 안정적인 요약과 함께 감쌉니다. `--timing`은 Mermaid 출력과 함께 사용할 수 없습니다. `--output <path>`는 선택한 inspect payload를 stdout 대신 명시적 artifact 경로에 씁니다. 이 동작은 검사 대상 애플리케이션을 writable하게 만들지 않으며, 일반 bootstrap/close cycle 외에 module graph state를 바꾸지 않습니다. Mermaid 출력이 필요하면 명령을 실행하는 프로젝트에 Studio를 설치하세요:
런타임이 inspection snapshot을 생산합니다. `fluo inspect`는 `./src/app.ts` 또는 `./src/app.module.ts` 같은 생성된 TypeScript source module을 명시적 TypeScript loader boundary로 받아들이며, 기존 `.js`와 `.mjs` module path는 계속 Node.js native ESM으로 로드합니다. `fluo inspect`는 output mode flag가 없을 때 기본적으로 그 snapshot을 JSON으로 직렬화하고, `fluo inspect --mermaid`는 snapshot-to-Mermaid 렌더링을 선택적 `@fluojs/studio` 계약에 위임합니다. `--export <name>`은 bootstrap할 module export를 선택하며 기본값은 `AppModule`입니다. `--timing`은 명시적인 `--json` flag 없이 제공된 경우를 포함해 JSON snapshot 출력 옆에 bootstrap timing diagnostics를 기록하고, `--report`는 CI/support triage를 위해 런타임이 생산한 snapshot을 안정적인 요약과 함께 감쌉니다. `--timing`은 Mermaid 출력과 함께 사용할 수 없습니다. `--output <path>`는 선택한 inspect payload를 stdout 대신 명시적 artifact 경로에 씁니다. 이 동작은 검사 대상 애플리케이션을 writable하게 만들지 않으며, 일반 bootstrap/close cycle 외에 module graph state를 바꾸지 않습니다. Mermaid 출력이 필요하면 명령을 실행하는 프로젝트에 Studio를 설치하세요:

@@ -282,4 +282,6 @@ ```bash

| `runCli(argv?, options?)` | 모든 CLI 명령을 실행하는 메인 진입점입니다. |
| `CliRuntimeOptions` | stream, cwd, environment, registry metadata, update-check hook 같은 `runCli(...)` runtime override 타입입니다. |
| `newUsage()` | help surface와 test에서 사용하는 현재 `fluo new` usage text를 반환합니다. |
| `runNewCommand(argv, options?)` | 프로젝트 스캐폴딩 로직에 대한 프로그래밍적 접근을 제공합니다. |
| `NewCommandRuntimeOptions` | prompt, filesystem write, dependency install, git initialization 같은 `runNewCommand(...)` runtime override 타입입니다. |
| `CliPromptCancelledError` | 호출자가 제공한 prompt hook이 정상 취소를 알리기 위해 throw할 수 있는 안정적인 sentinel입니다. |

@@ -286,0 +288,0 @@ | `GenerateOptions` | 프로그래밍 방식 generator 옵션 타입입니다. |

@@ -51,3 +51,3 @@ # @fluojs/cli

`fluo new` and its `fluo create` alias attempt a fresh interactive latest-version check before scaffolding, even when the normal update-check cache is still fresh. This keeps first-run project creation aligned with newly published starter behavior, while day-to-day commands such as `fluo dev`, `fluo build`, `fluo generate`, and `fluo inspect` continue to reuse the cached latest-version result until the normal TTL expires.
`fluo new` and its `fluo create` alias attempt a fresh interactive latest-version check before scaffolding, even when the normal update-check cache is still fresh. This keeps first-run project creation aligned with newly published starter behavior, while day-to-day commands such as `fluo dev`, `fluo build`, `fluo generate`, and `fluo inspect` continue to reuse the cached latest-version result until the normal TTL expires. Pure help and version inspection paths (`fluo help <command>`, `<command> --help`, `fluo version`, `fluo --version`, and `fluo -v`) print immediately without running the interactive update check.

@@ -116,3 +116,3 @@ The update check is skipped in CI, non-TTY output, npm-script contexts, rerun-after-update contexts, registry/network failures, and explicit opt-out paths. Use `--no-update-check` (or the compatibility alias `--no-update-notifier`) for one invocation, or set `FLUO_NO_UPDATE_CHECK=1` when automation must never prompt.

The NATS/Kafka/RabbitMQ starter contracts stay explicit about external brokers and caller-owned client libraries. Generated projects wire `nats` + `JSONCodec()`, `kafkajs` producer/consumer collaborators, and `amqplib` publisher/consumer collaborators directly in `src/app.ts` so the starter contract is runnable without pretending the base fluo packages hide those dependencies.
The NATS/Kafka/RabbitMQ starter contracts stay explicit about external brokers and caller-owned client libraries. Generated projects wire `nats` + `JSONCodec()`, `kafkajs` producer/consumer collaborators, and `amqplib` publisher/consumer collaborators directly in `src/app.ts` so the starter contract is runnable without pretending the base fluo packages hide those dependencies. Those broker clients are created lazily by the generated transport wrapper when the Fluo lifecycle starts listening, sends, or emits; importing `src/app.ts` for `fluo inspect`, tests, or static tooling does not connect to a broker or open external resources before the application lifecycle owns teardown.

@@ -160,3 +160,3 @@ The starter matrix also includes a mixed single-package starter: one Fastify HTTP app with an attached TCP microservice in the same generated project.

`fluo generate e2e <name>` writes `test/<name>.e2e.test.ts` with `createTestApp({ rootModule: AppModule })` so request-pipeline tests live in the same app-level test area as generated starters. Use generated unit tests for direct class behavior, slice tests for DI wiring and overrides, and e2e tests for routes, guards, interceptors, DTO validation, and response writing through the virtual app.
`fluo generate e2e <name>` writes `test/<name>.e2e.test.ts` with `createTestApp({ rootModule: AppModule })` and imports `AppModule` from the default starter root module at `../src/app`, so request-pipeline tests live in the same app-level test area as generated starters. Use generated unit tests for direct class behavior, slice tests for DI wiring and overrides, and e2e tests for routes, guards, interceptors, DTO validation, and response writing through the virtual app.

@@ -256,3 +256,3 @@ Request DTO generation accepts the feature directory separately from the DTO class name, so multiple input contracts such as `CreateUser` and `UpdateUser` can live inside the same `src/users/` slice.

# Include bootstrap timing next to the runtime-produced snapshot
fluo inspect ./src/app.module.ts --json --timing
fluo inspect ./src/app.module.ts --timing

@@ -266,3 +266,3 @@ # Emit a support triage report with summary, snapshot, diagnostics, and timing

The runtime produces the inspection snapshot. `fluo inspect` serializes that snapshot as JSON by default when no output mode flag is provided, and `fluo inspect --mermaid` delegates snapshot-to-Mermaid rendering to the optional `@fluojs/studio` contract. `--export <name>` selects the module export to bootstrap and defaults to `AppModule`; `--timing` records bootstrap timing diagnostics for JSON output, and `--report` wraps the runtime-produced snapshot with a stable summary for CI/support triage. `--timing` cannot be combined with Mermaid output. `--output <path>` writes the selected inspect payload to an explicit artifact path instead of stdout; it does not make the inspected application writable or change module graph state beyond the normal bootstrap/close cycle. Install Studio in the project that runs the command when you need Mermaid output:
The runtime produces the inspection snapshot. `fluo inspect` accepts generated TypeScript source modules such as `./src/app.ts` or `./src/app.module.ts` through an explicit TypeScript loader boundary, while existing `.js` and `.mjs` module paths continue to load through native Node.js ESM. `fluo inspect` serializes the snapshot as JSON by default when no output mode flag is provided, and `fluo inspect --mermaid` delegates snapshot-to-Mermaid rendering to the optional `@fluojs/studio` contract. `--export <name>` selects the module export to bootstrap and defaults to `AppModule`; `--timing` records bootstrap timing diagnostics next to the JSON snapshot output, including when `--timing` is provided without an explicit `--json` flag, and `--report` wraps the runtime-produced snapshot with a stable summary for CI/support triage. `--timing` cannot be combined with Mermaid output. `--output <path>` writes the selected inspect payload to an explicit artifact path instead of stdout; it does not make the inspected application writable or change module graph state beyond the normal bootstrap/close cycle. Install Studio in the project that runs the command when you need Mermaid output:

@@ -282,4 +282,6 @@ ```bash

| `runCli(argv?, options?)` | Main entry point to execute any CLI command. |
| `CliRuntimeOptions` | Type for `runCli(...)` runtime overrides such as streams, cwd, environment, registry metadata, and update-check hooks. |
| `newUsage()` | Returns the current `fluo new` usage text for help surfaces and tests. |
| `runNewCommand(argv, options?)` | Programmatic access to the project scaffolding logic. |
| `NewCommandRuntimeOptions` | Type for `runNewCommand(...)` runtime overrides such as prompts, filesystem writes, dependency installation, and git initialization. |
| `CliPromptCancelledError` | Stable sentinel that caller-supplied prompt hooks can throw to report normal cancellation. |

@@ -286,0 +288,0 @@ | `GenerateOptions` | Type for programmatic generator options. |

Sorry, the diff of this file is too big to display