@codefast/cli 0.3.14-canary.1 → 0.3.14
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/{commands/arrange.mjs → lib/arrange/adapters/primary/cli/arrange.command.mjs} +32 -33
- package/dist/lib/arrange/adapters/primary/cli/arrange.presentation.module.mjs +14 -0
- package/dist/lib/arrange/adapters/primary/cli/presentation.tokens.mjs +5 -0
- package/dist/lib/arrange/{infra → adapters/secondary}/domain-source-parser.adapter.mjs +5 -8
- package/dist/lib/arrange/{infra → adapters/secondary}/file-walker.adapter.mjs +11 -9
- package/dist/lib/arrange/adapters/secondary/workspace-resolver.adapter.mjs +233 -0
- package/dist/lib/arrange/application/services/arrange-file-processor.service.mjs +37 -12
- package/dist/lib/arrange/application/services/arrange-target-path-resolver.service.mjs +21 -0
- package/dist/lib/arrange/application/services/arrange-target-scanner.service.mjs +10 -4
- package/dist/lib/arrange/application/use-cases/analyze-directory.use-case.mjs +7 -10
- package/dist/lib/arrange/{presentation/prepare-arrange.orchestrator.mjs → application/use-cases/prepare-arrange-workspace.use-case.mjs} +25 -20
- package/dist/lib/arrange/application/use-cases/run-arrange-sync.use-case.mjs +10 -19
- package/dist/lib/arrange/application/use-cases/suggest-cn-groups.use-case.mjs +9 -5
- package/dist/lib/arrange/arrange.module.mjs +17 -13
- package/dist/lib/arrange/contracts/tokens.mjs +6 -5
- package/dist/lib/arrange/domain/arrange-analyze.service.mjs +1 -1
- package/dist/lib/arrange/domain/ast/ast-helpers.helper.mjs +1 -1
- package/dist/lib/arrange/domain/ast/ast-node.model.mjs +1 -21
- package/dist/lib/arrange/domain/ast/collectors-tv.collector.mjs +2 -2
- package/dist/lib/arrange/domain/ast/targets.model.mjs +6 -6
- package/dist/lib/arrange/domain/grouping.domain.mjs +3 -2
- package/dist/lib/arrange/domain/imports.domain.mjs +1 -1
- package/dist/lib/arrange/domain/source-text-formatters.formatter.mjs +19 -2
- package/dist/lib/{tag/presentation/create-tag-progress-listener.presenter.mjs → arrange/domain/tailwind-grouping.service.mjs} +10 -7
- package/dist/lib/arrange/domain/{tokenizer.util.mjs → tailwind-token-classifier.domain-service.mjs} +3 -29
- package/dist/lib/arrange/domain/tailwind-token.value-object.mjs +31 -0
- package/dist/lib/arrange/{infra/ts-ast-translator.adapter.mjs → infrastructure/typescript-ast-translator.adapter.mjs} +2 -2
- package/dist/lib/arrange/presentation/arrange-analyze.presenter.mjs +259 -0
- package/dist/lib/arrange/presentation/arrange-cli.schema.mjs +18 -0
- package/dist/lib/arrange/presentation/arrange-sync.presenter.mjs +23 -2
- package/dist/lib/arrange/presentation/group-file-preview.presenter.mjs +10 -14
- package/dist/lib/bootstrap/composition-root.mjs +33 -0
- package/dist/lib/config/application/services/load-config.service.mjs +17 -0
- package/dist/lib/config/contracts/tokens.mjs +2 -1
- package/dist/lib/config/infrastructure/config-loader.adapter.mjs +306 -0
- package/dist/lib/config/{infra → infrastructure}/config-schema.adapter.mjs +2 -2
- package/dist/lib/{arrange/presentation/present-analyze-report.presenter.mjs → config/infrastructure/config-warning-reporter.adapter.mjs} +9 -8
- package/dist/lib/core/{presentation/try-load-codefast-config.presenter.mjs → application/load-codefast-config.use-case.mjs} +22 -22
- package/dist/lib/core/{presentation/global-cli-options.presenter.mjs → application/services/global-cli-options-parser.service.mjs} +3 -3
- package/dist/lib/core/application/services/schema-validator.service.mjs +17 -0
- package/dist/lib/core/contracts/tokens.mjs +7 -2
- package/dist/lib/core/core.module.mjs +3 -3
- package/dist/lib/core/{application/utils/caught-unknown-message.util.mjs → domain/caught-unknown-message.value-object.mjs} +1 -1
- package/dist/lib/core/domain/errors.domain.mjs +13 -12
- package/dist/lib/core/domain/result.model.mjs +1 -7
- package/dist/lib/core/infrastructure/infrastructure.module.mjs +30 -0
- package/dist/lib/core/infrastructure/path.adapter.mjs +246 -0
- package/dist/lib/core/{infra/logging-decorator.adapter.mjs → infrastructure/port-telemetry.decorator.mjs} +1 -1
- package/dist/lib/core/infrastructure/repo-root-resolver.adapter.mjs +233 -0
- package/dist/lib/core/{application/utils/verbose-diagnostics.util.mjs → infrastructure/verbose-diagnostics.policy.mjs} +1 -1
- package/dist/lib/core/presentation/cli-executor.presenter.mjs +3 -18
- package/dist/lib/core/presentation/cli-schema.parser.mjs +7 -0
- package/dist/lib/core/presentation/presentation.module.mjs +1 -7
- package/dist/lib/{infra → infrastructure}/node-io.adapter.mjs +22 -3
- package/dist/lib/{infra/workspace/repo-root.adapter.mjs → infrastructure/workspace/repo-root-resolver.service.mjs} +1 -1
- package/dist/lib/kernel/contracts/tokens.mjs +5 -0
- package/dist/{commands/mirror.mjs → lib/mirror/adapters/primary/cli/mirror.command.mjs} +17 -12
- package/dist/lib/mirror/{infra → adapters/secondary}/file-system-service.adapter.mjs +14 -9
- package/dist/lib/mirror/{infra → adapters/secondary}/mirror-sync-reporter.adapter.mjs +12 -5
- package/dist/lib/mirror/{infra → adapters/secondary}/package-repository.adapter.mjs +12 -6
- package/dist/lib/mirror/{application/services/sync-workspace-package.service.mjs → adapters/secondary/sync-workspace-package.adapter.mjs} +29 -29
- package/dist/lib/mirror/{infra → adapters/secondary}/workspace-service.adapter.mjs +12 -7
- package/dist/lib/mirror/application/{use-cases/generate-mirror-exports.use-case.mjs → services/generate-mirror-exports.service.mjs} +7 -7
- package/dist/lib/mirror/{presentation/resolve-mirror-package-arg.presenter.mjs → application/services/mirror-package-arg-resolver.service.mjs} +4 -4
- package/dist/lib/mirror/{presentation/prepare-mirror.orchestrator.mjs → application/use-cases/prepare-mirror-sync.use-case.mjs} +23 -22
- package/dist/lib/mirror/application/use-cases/run-mirror-sync.use-case.mjs +12 -12
- package/dist/lib/mirror/contracts/tokens.mjs +3 -3
- package/dist/lib/mirror/domain/package-display-name.policy.mjs +9 -0
- package/dist/lib/mirror/{infra/path-normalizer.adapter.mjs → domain/path-normalizer.value-object.mjs} +1 -1
- package/dist/lib/mirror/{infra/dirent-list.adapter.mjs → infrastructure/dirent-list.guard.mjs} +1 -1
- package/dist/lib/mirror/infrastructure/mirror-console-reporter.presenter.mjs +99 -0
- package/dist/lib/mirror/{infra/package-filter.adapter.mjs → infrastructure/package-filter-resolver.service.mjs} +2 -2
- package/dist/lib/mirror/{infra/update-pkg.adapter.mjs → infrastructure/package-json-exports.repository.mjs} +4 -19
- package/dist/lib/mirror/{infra/workspace-packages.adapter.mjs → infrastructure/workspace-packages.service.mjs} +4 -4
- package/dist/lib/mirror/mirror.module.mjs +17 -15
- package/dist/lib/mirror/presentation/{mirror-cli-schema.presenter.mjs → mirror-cli.schema.mjs} +1 -1
- package/dist/lib/shared/source-code/domain/text-edit.model.mjs +32 -5
- package/dist/lib/shared/source-code/{infra/tsx-file-walk.adapter.mjs → infrastructure/typescript-source-file-walker.service.mjs} +2 -2
- package/dist/lib/tag/adapters/primary/cli/presentation.tokens.mjs +6 -0
- package/dist/{commands/tag.mjs → lib/tag/adapters/primary/cli/tag.command.mjs} +23 -21
- package/dist/lib/tag/adapters/primary/cli/tag.presentation.module.mjs +13 -0
- package/dist/lib/tag/{infra → adapters/secondary}/tag-since-writer.adapter.mjs +12 -7
- package/dist/lib/tag/{infra → adapters/secondary}/tag-target-resolver.adapter.mjs +12 -5
- package/dist/lib/tag/{infra → adapters/secondary}/tag-version-resolver.adapter.mjs +10 -8
- package/dist/lib/tag/{infra → adapters/secondary}/typescript-tree-walk.adapter.mjs +12 -5
- package/dist/lib/tag/{presentation/resolve-tag-cli-target.presenter.mjs → application/services/tag-cli-target-path-resolver.service.mjs} +1 -1
- package/dist/lib/tag/application/services/tag-target-runner.service.mjs +21 -0
- package/dist/lib/tag/{presentation/prepare-tag.orchestrator.mjs → application/use-cases/prepare-tag-sync.use-case.mjs} +23 -23
- package/dist/lib/tag/application/use-cases/run-tag-sync.use-case.mjs +14 -31
- package/dist/lib/tag/contracts/tokens.mjs +2 -4
- package/dist/lib/tag/{infra → infrastructure}/tag-target-candidates.adapter.mjs +4 -4
- package/dist/lib/tag/presentation/present-tag-sync-result.presenter.mjs +1 -1
- package/dist/lib/tag/presentation/{tag-cli-schema.presenter.mjs → tag-cli.schema.mjs} +1 -1
- package/dist/lib/tag/presentation/tag-sync-progress-listener.presenter.mjs +243 -0
- package/dist/lib/tag/presentation/tag-sync.presenter.mjs +6 -23
- package/dist/lib/tag/tag.module.mjs +15 -13
- package/dist/program.mjs +2 -2
- package/package.json +16 -9
- package/dist/lib/arrange/application/arrange-analyze-json.format.mjs +0 -10
- package/dist/lib/arrange/application/arrange-group-json.format.mjs +0 -11
- package/dist/lib/arrange/application/arrange-sync-cli-result.mjs +0 -7
- package/dist/lib/arrange/application/arrange-sync-json.format.mjs +0 -12
- package/dist/lib/arrange/application/use-cases/group-file.use-case.mjs +0 -35
- package/dist/lib/arrange/arrange.feature.module.mjs +0 -19
- package/dist/lib/arrange/arrange.presentation.module.mjs +0 -13
- package/dist/lib/arrange/domain/errors.domain.mjs +0 -18
- package/dist/lib/arrange/infra/ensure-cn-import.adapter.mjs +0 -10
- package/dist/lib/arrange/infra/merge-cn-literal-pool-for-test.test-helper.mjs +0 -18
- package/dist/lib/arrange/presentation/arrange-cli-schema.presenter.mjs +0 -29
- package/dist/lib/arrange/presentation/formatters.presenter.mjs +0 -2
- package/dist/lib/arrange/presentation/present-analyze-cli.presenter.mjs +0 -7
- package/dist/lib/arrange/presentation/report.presenter.mjs +0 -24
- package/dist/lib/arrange/presentation/resolve-arrange-cli-target.presenter.mjs +0 -21
- package/dist/lib/config/application/use-cases/load-config.use-case.mjs +0 -17
- package/dist/lib/config/infra/loader.adapter.mjs +0 -84
- package/dist/lib/core/application/schema-parse.util.mjs +0 -17
- package/dist/lib/core/infra/composition-root.mjs +0 -21
- package/dist/lib/core/infra/infra.module.mjs +0 -23
- package/dist/lib/core/infra/path.adapter.mjs +0 -13
- package/dist/lib/core/operational/contracts/tokens.mjs +0 -7
- package/dist/lib/core/presentation/load-codefast-config.presenter.mjs +0 -18
- package/dist/lib/core/presentation/parse-cli-schema.presenter.mjs +0 -7
- package/dist/lib/infra/config-reporter.adapter.mjs +0 -11
- package/dist/lib/kernel/di/command.token.mjs +0 -5
- package/dist/lib/mirror/contracts/use-cases.contract.mjs +0 -1
- package/dist/lib/mirror/infra/mirror-sync-cli-options.adapter.mjs +0 -1
- package/dist/lib/mirror/mirror.feature.module.mjs +0 -19
- package/dist/lib/mirror/mirror.presentation.module.mjs +0 -11
- package/dist/lib/mirror/presentation/reporter.presenter.mjs +0 -111
- package/dist/lib/tag/contracts/presentation.contract.mjs +0 -1
- package/dist/lib/tag/contracts/use-cases.contract.mjs +0 -1
- package/dist/lib/tag/infra/tag-sync-cli-options.adapter.mjs +0 -1
- package/dist/lib/tag/presentation/resolve-tag-workspace-root.presenter.mjs +0 -12
- package/dist/lib/tag/tag.feature.module.mjs +0 -19
- package/dist/lib/tag/tag.presentation.module.mjs +0 -15
- /package/dist/lib/arrange/{contracts/presentation.contract.mjs → application/ports/workspace-resolver.port.mjs} +0 -0
- /package/dist/lib/arrange/contracts/{use-cases.contract.mjs → analyze-report-presenter.contract.mjs} +0 -0
- /package/dist/lib/{arrange/infra/arrange-sync-cli-options.adapter.mjs → config/application/ports/config-warning-reporter.port.mjs} +0 -0
- /package/dist/lib/core/{contracts/presentation.contract.mjs → application/ports/repo-root-resolver.port.mjs} +0 -0
- /package/dist/lib/core/{presentation/command.interface.mjs → application/ports/runtime.port.mjs} +0 -0
- /package/dist/lib/{infra/fs-contract.port.mjs → kernel/contracts/cli-command.contract.mjs} +0 -0
- /package/dist/lib/{mirror/contracts/presentation.contract.mjs → tag/contracts/tag-sync-result-presenter.contract.mjs} +0 -0
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import "../domain/constants.domain.mjs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
//#region src/lib/arrange/presentation/report.presenter.ts
|
|
4
|
-
function printAnalyzeReport(analyzeRootDirectoryPath, analyzeReport, logger) {
|
|
5
|
-
const { out } = logger;
|
|
6
|
-
out(`Path: ${path.resolve(analyzeRootDirectoryPath)}`);
|
|
7
|
-
out(`.ts/.tsx files: ${analyzeReport.files}`);
|
|
8
|
-
out(`cn(...) call sites: ${analyzeReport.cnCallExpressions}`);
|
|
9
|
-
out(`tv(...) call sites: ${analyzeReport.tvCallExpressions}`);
|
|
10
|
-
out(`\nLong cn(...) string literals (≥18 tokens — consider splitting arguments): ${analyzeReport.longCnStringLiterals.length}`);
|
|
11
|
-
for (const findingEntry of analyzeReport.longCnStringLiterals.slice(0, 40)) out(` ${findingEntry.file}:${findingEntry.line} (${findingEntry.tokenCount} tokens) ${findingEntry.preview}`);
|
|
12
|
-
if (analyzeReport.longCnStringLiterals.length > 40) out(` … and ${analyzeReport.longCnStringLiterals.length - 40} more`);
|
|
13
|
-
out(`\nLong tv({...}) string literals in base/variants/… (≥18 tokens): ${analyzeReport.longTvStringLiterals.length}`);
|
|
14
|
-
for (const findingEntry of analyzeReport.longTvStringLiterals.slice(0, 40)) out(` ${findingEntry.file}:${findingEntry.line} (${findingEntry.tokenCount} tokens) ${findingEntry.preview}`);
|
|
15
|
-
if (analyzeReport.longTvStringLiterals.length > 40) out(` … and ${analyzeReport.longTvStringLiterals.length - 40} more`);
|
|
16
|
-
out(`\nJSX className="..." or className={'...'} (static strings, ≥18 tokens): ${analyzeReport.longJsxClassNameLiterals.length}`);
|
|
17
|
-
for (const findingEntry of analyzeReport.longJsxClassNameLiterals.slice(0, 40)) out(` ${findingEntry.file}:${findingEntry.line} (${findingEntry.tokenCount} tokens) ${findingEntry.preview}`);
|
|
18
|
-
if (analyzeReport.longJsxClassNameLiterals.length > 40) out(` … and ${analyzeReport.longJsxClassNameLiterals.length - 40} more`);
|
|
19
|
-
out(`\ncn(...) nested inside tv({...}) (prefer a string or array — preview/apply can rewrite): ${analyzeReport.cnInsideTvCalls.length}`);
|
|
20
|
-
for (const findingEntry of analyzeReport.cnInsideTvCalls.slice(0, 40)) out(` ${findingEntry.file}:${findingEntry.line} (${findingEntry.argCount} args) ${findingEntry.preview}`);
|
|
21
|
-
if (analyzeReport.cnInsideTvCalls.length > 40) out(` … and ${analyzeReport.cnInsideTvCalls.length - 40} more`);
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
export { printAnalyzeReport };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
//#region src/lib/arrange/presentation/resolve-arrange-cli-target.presenter.ts
|
|
3
|
-
const PACKAGE_JSON_FILE = "package.json";
|
|
4
|
-
function findNearestPackageDirectory(currentWorkingDirectory, fs) {
|
|
5
|
-
let currentDir = path.resolve(currentWorkingDirectory);
|
|
6
|
-
while (true) {
|
|
7
|
-
const packageJsonPath = path.join(currentDir, PACKAGE_JSON_FILE);
|
|
8
|
-
if (fs.existsSync(packageJsonPath)) return currentDir;
|
|
9
|
-
const parentDirectory = path.dirname(currentDir);
|
|
10
|
-
if (parentDirectory === currentDir) return;
|
|
11
|
-
currentDir = parentDirectory;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
function resolveArrangeCliTargetPath(input) {
|
|
15
|
-
const explicitTargetPath = input.rawTarget ? path.isAbsolute(input.rawTarget) ? path.resolve(input.rawTarget) : path.resolve(input.currentWorkingDirectory, input.rawTarget) : void 0;
|
|
16
|
-
if (explicitTargetPath) return input.fs.canonicalPathSync(explicitTargetPath);
|
|
17
|
-
const resolvedDefaultTarget = findNearestPackageDirectory(input.currentWorkingDirectory, input.fs) ?? input.currentWorkingDirectory;
|
|
18
|
-
return input.fs.canonicalPathSync(resolvedDefaultTarget);
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
export { resolveArrangeCliTargetPath };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { appError } from "../../../core/domain/errors.domain.mjs";
|
|
2
|
-
import { err, ok } from "../../../core/domain/result.model.mjs";
|
|
3
|
-
import { messageFromCaughtUnknown } from "../../../core/application/utils/caught-unknown-message.util.mjs";
|
|
4
|
-
//#region src/lib/config/application/use-cases/load-config.use-case.ts
|
|
5
|
-
async function loadCodefastConfig(configLoader, fs, rootDir) {
|
|
6
|
-
try {
|
|
7
|
-
const { config, warnings } = await configLoader.loadConfig(fs, rootDir);
|
|
8
|
-
return ok({
|
|
9
|
-
config,
|
|
10
|
-
warnings
|
|
11
|
-
});
|
|
12
|
-
} catch (caughtError) {
|
|
13
|
-
return err(appError("INFRA_FAILURE", messageFromCaughtUnknown(caughtError), caughtError));
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { loadCodefastConfig };
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { codefastConfigSchema } from "./config-schema.adapter.mjs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { ZodError } from "zod";
|
|
4
|
-
import jiti from "jiti";
|
|
5
|
-
//#region src/lib/config/infra/loader.adapter.ts
|
|
6
|
-
const CONFIG_JS_PRIORITY = [
|
|
7
|
-
"codefast.config.mjs",
|
|
8
|
-
"codefast.config.js",
|
|
9
|
-
"codefast.config.cjs"
|
|
10
|
-
];
|
|
11
|
-
const CONFIG_JSON = "codefast.config.json";
|
|
12
|
-
const cachedLoads = /* @__PURE__ */ new Map();
|
|
13
|
-
function formatZodError(error, filePath) {
|
|
14
|
-
const formatted = error.issues.map((issue) => {
|
|
15
|
-
return ` - ${issue.path.length > 0 ? issue.path.join(".") : "<root>"}: ${issue.message}`;
|
|
16
|
-
}).join("\n");
|
|
17
|
-
return `Invalid config schema in ${path.basename(filePath)}:\n${formatted}`;
|
|
18
|
-
}
|
|
19
|
-
function parseLoadedConfig(raw, filePath) {
|
|
20
|
-
try {
|
|
21
|
-
return codefastConfigSchema.parse(raw);
|
|
22
|
-
} catch (caughtError) {
|
|
23
|
-
if (caughtError instanceof ZodError) throw new Error(formatZodError(caughtError, filePath));
|
|
24
|
-
throw caughtError;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function listConfigCandidates(startDir, fs) {
|
|
28
|
-
const candidates = [];
|
|
29
|
-
let current = path.resolve(startDir);
|
|
30
|
-
while (true) {
|
|
31
|
-
for (const name of CONFIG_JS_PRIORITY) {
|
|
32
|
-
const candidate = path.join(current, name);
|
|
33
|
-
if (fs.existsSync(candidate)) candidates.push(candidate);
|
|
34
|
-
}
|
|
35
|
-
const jsonCandidate = path.join(current, CONFIG_JSON);
|
|
36
|
-
if (fs.existsSync(jsonCandidate)) candidates.push(jsonCandidate);
|
|
37
|
-
const parent = path.dirname(current);
|
|
38
|
-
if (parent === current) break;
|
|
39
|
-
current = parent;
|
|
40
|
-
}
|
|
41
|
-
return candidates;
|
|
42
|
-
}
|
|
43
|
-
async function readConfigFromPath(filePath, fs, jitiBaseDir) {
|
|
44
|
-
if (path.extname(filePath) === ".json") {
|
|
45
|
-
const content = await fs.readFile(filePath, "utf8");
|
|
46
|
-
return parseLoadedConfig(JSON.parse(content), filePath);
|
|
47
|
-
}
|
|
48
|
-
const moduleConfig = jiti(jitiBaseDir, {
|
|
49
|
-
interopDefault: true,
|
|
50
|
-
moduleCache: false
|
|
51
|
-
})(filePath);
|
|
52
|
-
return parseLoadedConfig(typeof moduleConfig === "object" && moduleConfig !== null && "default" in moduleConfig ? moduleConfig.default : moduleConfig, filePath);
|
|
53
|
-
}
|
|
54
|
-
async function loadOnce(fs, startDir) {
|
|
55
|
-
const warnings = [];
|
|
56
|
-
const configPaths = listConfigCandidates(startDir, fs);
|
|
57
|
-
if (configPaths.length === 0) return {
|
|
58
|
-
config: {},
|
|
59
|
-
warnings
|
|
60
|
-
};
|
|
61
|
-
const configPath = configPaths[0];
|
|
62
|
-
if (configPath === void 0) return {
|
|
63
|
-
config: {},
|
|
64
|
-
warnings
|
|
65
|
-
};
|
|
66
|
-
return {
|
|
67
|
-
config: await readConfigFromPath(configPath, fs, startDir),
|
|
68
|
-
warnings,
|
|
69
|
-
configPath
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
async function loadConfig(fs, startDir) {
|
|
73
|
-
const cacheKey = path.resolve(startDir);
|
|
74
|
-
if (!cachedLoads.has(cacheKey)) cachedLoads.set(cacheKey, loadOnce(fs, cacheKey));
|
|
75
|
-
const cached = cachedLoads.get(cacheKey);
|
|
76
|
-
if (cached === void 0) throw new Error("config loader cache invariant violated");
|
|
77
|
-
return cached;
|
|
78
|
-
}
|
|
79
|
-
function resetConfigLoaderCacheForTests() {
|
|
80
|
-
cachedLoads.clear();
|
|
81
|
-
}
|
|
82
|
-
const configLoaderAdapter = { loadConfig };
|
|
83
|
-
//#endregion
|
|
84
|
-
export { configLoaderAdapter, loadConfig, resetConfigLoaderCacheForTests };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { appError } from "../domain/errors.domain.mjs";
|
|
2
|
-
import { err, ok } from "../domain/result.model.mjs";
|
|
3
|
-
//#region src/lib/core/application/schema-parse.util.ts
|
|
4
|
-
function formatSchemaIssues(issues) {
|
|
5
|
-
return issues.map((issue) => {
|
|
6
|
-
return `${issue.path.length > 0 ? `${issue.path.join(".")}: ` : ""}${issue.message}`;
|
|
7
|
-
}).join("; ");
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Validates `input` with `schema`, returning {@link AppError} with code `VALIDATION_ERROR` on failure.
|
|
11
|
-
*/ function parseWithSchema(schema, input) {
|
|
12
|
-
const parsed = schema.safeParse(input);
|
|
13
|
-
if (!parsed.success) return err(appError("VALIDATION_ERROR", formatSchemaIssues(parsed.error.issues)));
|
|
14
|
-
return ok(parsed.data);
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { parseWithSchema };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { registerArrangeFeature, resolveArrangeCommand } from "../../arrange/arrange.feature.module.mjs";
|
|
2
|
-
import { registerMirrorFeature, resolveMirrorCommand } from "../../mirror/mirror.feature.module.mjs";
|
|
3
|
-
import { registerTagFeature, resolveTagCommand } from "../../tag/tag.feature.module.mjs";
|
|
4
|
-
import { Container } from "@codefast/di";
|
|
5
|
-
//#region src/lib/core/infra/composition-root.ts
|
|
6
|
-
function createCliRuntimeContainer() {
|
|
7
|
-
const runtimeContainer = Container.create();
|
|
8
|
-
registerArrangeFeature(runtimeContainer);
|
|
9
|
-
registerMirrorFeature(runtimeContainer);
|
|
10
|
-
registerTagFeature(runtimeContainer);
|
|
11
|
-
return runtimeContainer;
|
|
12
|
-
}
|
|
13
|
-
function resolveCliCommands(runtimeContainer) {
|
|
14
|
-
return [
|
|
15
|
-
resolveArrangeCommand(runtimeContainer),
|
|
16
|
-
resolveMirrorCommand(runtimeContainer),
|
|
17
|
-
resolveTagCommand(runtimeContainer)
|
|
18
|
-
];
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
export { createCliRuntimeContainer, resolveCliCommands };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { CliFsToken, CliLoggerToken } from "../operational/contracts/tokens.mjs";
|
|
2
|
-
import { ConfigLoaderPortToken } from "../../config/contracts/tokens.mjs";
|
|
3
|
-
import { configLoaderAdapter } from "../../config/infra/loader.adapter.mjs";
|
|
4
|
-
import { CoreModule } from "../core.module.mjs";
|
|
5
|
-
import { isCliTelemetryEnabled, withCliPortTelemetry } from "./logging-decorator.adapter.mjs";
|
|
6
|
-
import { NodeCliFsAdapter as _NodeCliFsAdapter, NodeCliLoggerAdapter as _NodeCliLoggerAdapter } from "../../infra/node-io.adapter.mjs";
|
|
7
|
-
import { Module } from "@codefast/di";
|
|
8
|
-
//#region src/lib/core/infra/infra.module.ts
|
|
9
|
-
const InfraModule = Module.create("cli-infra", (moduleBuilder) => {
|
|
10
|
-
moduleBuilder.import(CoreModule);
|
|
11
|
-
moduleBuilder.bind(CliLoggerToken).to(_NodeCliLoggerAdapter).singleton();
|
|
12
|
-
moduleBuilder.bind(CliFsToken).to(_NodeCliFsAdapter).onActivation((ctx, rawFs) => {
|
|
13
|
-
if (!isCliTelemetryEnabled()) return rawFs;
|
|
14
|
-
return withCliPortTelemetry({
|
|
15
|
-
portName: "CliFs",
|
|
16
|
-
implementation: rawFs,
|
|
17
|
-
logger: ctx.resolve(CliLoggerToken)
|
|
18
|
-
});
|
|
19
|
-
}).singleton();
|
|
20
|
-
moduleBuilder.bind(ConfigLoaderPortToken).toConstantValue(configLoaderAdapter);
|
|
21
|
-
});
|
|
22
|
-
//#endregion
|
|
23
|
-
export { InfraModule };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
//#region src/lib/core/infra/path.adapter.ts
|
|
3
|
-
const nodeCliPath = {
|
|
4
|
-
resolve: (...paths) => path.resolve(...paths),
|
|
5
|
-
join: (...paths) => path.join(...paths),
|
|
6
|
-
relative: (from, to) => path.relative(from, to),
|
|
7
|
-
dirname: (pathValue) => path.dirname(pathValue),
|
|
8
|
-
basename: (pathValue) => path.basename(pathValue),
|
|
9
|
-
extname: (pathValue) => path.extname(pathValue),
|
|
10
|
-
separator: path.sep
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { nodeCliPath };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { token } from "@codefast/di";
|
|
2
|
-
//#region src/lib/core/operational/contracts/tokens.ts
|
|
3
|
-
const CliFsToken = token("CliFs");
|
|
4
|
-
const CliLoggerToken = token("CliLogger");
|
|
5
|
-
const CliPathToken = token("CliPath");
|
|
6
|
-
//#endregion
|
|
7
|
-
export { CliFsToken, CliLoggerToken, CliPathToken };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { appError } from "../domain/errors.domain.mjs";
|
|
2
|
-
import { err, ok } from "../domain/result.model.mjs";
|
|
3
|
-
import { messageFromCaughtUnknown } from "../application/utils/caught-unknown-message.util.mjs";
|
|
4
|
-
import { loadCodefastConfig } from "../../config/application/use-cases/load-config.use-case.mjs";
|
|
5
|
-
import { printConfigSchemaWarnings } from "../../infra/config-reporter.adapter.mjs";
|
|
6
|
-
//#region src/lib/core/presentation/load-codefast-config.presenter.ts
|
|
7
|
-
async function tryLoadCodefastConfig(cli, configLoader, rootDir) {
|
|
8
|
-
try {
|
|
9
|
-
const loadedConfig = await loadCodefastConfig(configLoader, cli.fs, rootDir);
|
|
10
|
-
if (!loadedConfig.ok) return loadedConfig;
|
|
11
|
-
printConfigSchemaWarnings(cli.logger, loadedConfig.value.warnings);
|
|
12
|
-
return ok({ config: loadedConfig.value.config });
|
|
13
|
-
} catch (caughtError) {
|
|
14
|
-
return err(appError("INFRA_FAILURE", messageFromCaughtUnknown(caughtError), caughtError));
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { tryLoadCodefastConfig };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { parseWithSchema } from "../application/schema-parse.util.mjs";
|
|
2
|
-
//#region src/lib/core/presentation/parse-cli-schema.presenter.ts
|
|
3
|
-
function parseWithCliSchema(schema, raw) {
|
|
4
|
-
return parseWithSchema(schema, raw);
|
|
5
|
-
}
|
|
6
|
-
//#endregion
|
|
7
|
-
export { parseWithCliSchema };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region src/lib/infra/config-reporter.adapter.ts
|
|
2
|
-
const YELLOW = "\x1B[33m";
|
|
3
|
-
const RESET = "\x1B[0m";
|
|
4
|
-
/**
|
|
5
|
-
* User-visible lines for non-fatal issues returned with a successfully parsed config.
|
|
6
|
-
*/ function printConfigSchemaWarnings(logger, warnings) {
|
|
7
|
-
const { out } = logger;
|
|
8
|
-
for (const warningMessage of warnings) out(`${YELLOW}\u26A0\uFE0F ${warningMessage}${RESET}`);
|
|
9
|
-
}
|
|
10
|
-
//#endregion
|
|
11
|
-
export { printConfigSchemaWarnings };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { COMMAND_TOKEN } from "../kernel/di/command.token.mjs";
|
|
2
|
-
import { MirrorCommand as _MirrorCommand } from "../../commands/mirror.mjs";
|
|
3
|
-
import { MirrorModule } from "./mirror.module.mjs";
|
|
4
|
-
import { MirrorPresentationModule } from "./mirror.presentation.module.mjs";
|
|
5
|
-
import { Module } from "@codefast/di";
|
|
6
|
-
//#region src/lib/mirror/mirror.feature.module.ts
|
|
7
|
-
const MirrorFeatureModule = Module.create("cli-mirror-feature", (moduleBuilder) => {
|
|
8
|
-
moduleBuilder.import(MirrorPresentationModule, MirrorModule);
|
|
9
|
-
moduleBuilder.bind(_MirrorCommand).to(_MirrorCommand).singleton();
|
|
10
|
-
});
|
|
11
|
-
function registerMirrorFeature(runtimeContainer) {
|
|
12
|
-
runtimeContainer.load(MirrorFeatureModule);
|
|
13
|
-
runtimeContainer.bind(COMMAND_TOKEN).to(_MirrorCommand).singleton().whenNamed("mirror");
|
|
14
|
-
}
|
|
15
|
-
function resolveMirrorCommand(runtimeContainer) {
|
|
16
|
-
return runtimeContainer.resolve(_MirrorCommand);
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { MirrorFeatureModule, registerMirrorFeature, resolveMirrorCommand };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PresentationModule } from "../core/presentation/presentation.module.mjs";
|
|
2
|
-
import { PrepareMirrorOrchestratorToken } from "./contracts/tokens.mjs";
|
|
3
|
-
import { PrepareMirrorOrchestrator as _PrepareMirrorOrchestrator } from "./presentation/prepare-mirror.orchestrator.mjs";
|
|
4
|
-
import { Module } from "@codefast/di";
|
|
5
|
-
//#region src/lib/mirror/mirror.presentation.module.ts
|
|
6
|
-
const MirrorPresentationModule = Module.create("cli-mirror-presentation", (moduleBuilder) => {
|
|
7
|
-
moduleBuilder.import(PresentationModule);
|
|
8
|
-
moduleBuilder.bind(PrepareMirrorOrchestratorToken).to(_PrepareMirrorOrchestrator).singleton();
|
|
9
|
-
});
|
|
10
|
-
//#endregion
|
|
11
|
-
export { MirrorPresentationModule };
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { messageFromCaughtUnknown } from "../../core/application/utils/caught-unknown-message.util.mjs";
|
|
2
|
-
import { printConfigSchemaWarnings } from "../../infra/config-reporter.adapter.mjs";
|
|
3
|
-
import process from "node:process";
|
|
4
|
-
//#region src/lib/mirror/presentation/reporter.presenter.ts
|
|
5
|
-
const Colors = {
|
|
6
|
-
RESET: "\x1B[0m",
|
|
7
|
-
BOLD: "\x1B[1m",
|
|
8
|
-
DIM: "\x1B[2m",
|
|
9
|
-
GREEN: "\x1B[32m",
|
|
10
|
-
YELLOW: "\x1B[33m",
|
|
11
|
-
CYAN: "\x1B[36m",
|
|
12
|
-
GRAY: "\x1B[90m",
|
|
13
|
-
MAGENTA: "\x1B[35m",
|
|
14
|
-
BRIGHT_GREEN: "\x1B[92m",
|
|
15
|
-
BRIGHT_YELLOW: "\x1B[93m",
|
|
16
|
-
BRIGHT_CYAN: "\x1B[96m",
|
|
17
|
-
disable() {
|
|
18
|
-
for (const key of Object.keys(this)) if (typeof this[key] === "string") this[key] = "";
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
function configureMirrorColors(noColor) {
|
|
22
|
-
if (!process.stdout.isTTY || noColor) Colors.disable();
|
|
23
|
-
}
|
|
24
|
-
function printMirrorConfigWarnings(logger, warnings) {
|
|
25
|
-
printConfigSchemaWarnings(logger, warnings);
|
|
26
|
-
}
|
|
27
|
-
function mirrorGlobWarning(logger, message) {
|
|
28
|
-
const { out } = logger;
|
|
29
|
-
out(`${Colors.YELLOW}⚠ ${message}${Colors.RESET}`);
|
|
30
|
-
}
|
|
31
|
-
function logSkippedWorkspacePackage(logger, index, total, displayName, reason) {
|
|
32
|
-
const { out } = logger;
|
|
33
|
-
out(`${`${Colors.DIM}[${index}/${total}]${Colors.RESET}`} ${Colors.GRAY}○${Colors.RESET} ${Colors.DIM}${displayName}${Colors.RESET}`);
|
|
34
|
-
out(` ${Colors.DIM}└─${Colors.RESET} ${Colors.GRAY}Skipped: ${reason}${Colors.RESET}`);
|
|
35
|
-
out("");
|
|
36
|
-
}
|
|
37
|
-
function mirrorBanner(logger) {
|
|
38
|
-
const { out } = logger;
|
|
39
|
-
out(`\n${Colors.BOLD}${Colors.CYAN}📦 Mirror — package exports${Colors.RESET}`);
|
|
40
|
-
out(`${Colors.DIM}${"═".repeat(60)}${Colors.RESET}\n`);
|
|
41
|
-
}
|
|
42
|
-
function mirrorProcessingMode(logger, mode) {
|
|
43
|
-
const { out } = logger;
|
|
44
|
-
if (mode.kind === "single") {
|
|
45
|
-
out(`${Colors.DIM}Processing single package...${Colors.RESET}\n`);
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
switch (mode.source) {
|
|
49
|
-
case "default-patterns":
|
|
50
|
-
out(`${Colors.DIM}Discovering workspace packages using default patterns (packages/*)…${Colors.RESET}\n`);
|
|
51
|
-
break;
|
|
52
|
-
case "pnpm-workspace-yaml":
|
|
53
|
-
out(`${Colors.DIM}Discovering workspace packages from pnpm-workspace.yaml…${Colors.RESET}\n`);
|
|
54
|
-
break;
|
|
55
|
-
case "declared-empty":
|
|
56
|
-
out(`${Colors.DIM}pnpm-workspace.yaml declares an empty workspace package list.${Colors.RESET}\n`);
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function mirrorNoPackages(logger) {
|
|
61
|
-
logger.out(`${Colors.YELLOW}⚠ No packages found${Colors.RESET}`);
|
|
62
|
-
}
|
|
63
|
-
function logPackageSuccess(logger, index, total, pkgStats, generatedDistAssetCounts, verbose) {
|
|
64
|
-
const { out } = logger;
|
|
65
|
-
out(`${`${Colors.DIM}[${index}/${total}]${Colors.RESET}`} ${Colors.BRIGHT_GREEN}✓${Colors.RESET} ${Colors.BOLD}${pkgStats.name}${Colors.RESET}`);
|
|
66
|
-
if (verbose) {
|
|
67
|
-
out(` ${Colors.DIM}├─${Colors.RESET} Path: ${pkgStats.path}`);
|
|
68
|
-
if (pkgStats.hasTransform) out(` ${Colors.DIM}├─${Colors.RESET} ${Colors.CYAN}Custom path transformation${Colors.RESET}`);
|
|
69
|
-
if (pkgStats.cssConfigStatus) out(` ${Colors.DIM}├─${Colors.RESET} ${Colors.CYAN}${pkgStats.cssConfigStatus === "disabled" ? "CSS disabled" : "CSS configured"}${Colors.RESET}`);
|
|
70
|
-
}
|
|
71
|
-
const breakdown = [];
|
|
72
|
-
if (generatedDistAssetCounts.jsCount > 0) breakdown.push(`${Colors.GREEN}${generatedDistAssetCounts.jsCount} modules${Colors.RESET}`);
|
|
73
|
-
if (generatedDistAssetCounts.cssCount > 0) breakdown.push(`${Colors.MAGENTA}${generatedDistAssetCounts.cssCount} CSS${Colors.RESET}`);
|
|
74
|
-
if (pkgStats.customExports > 0) breakdown.push(`${Colors.YELLOW}${pkgStats.customExports} custom${Colors.RESET}`);
|
|
75
|
-
if (breakdown.length > 0) out(` ${Colors.DIM}└─${Colors.RESET} ${breakdown.join(" + ")} = ${Colors.BRIGHT_CYAN}${pkgStats.totalExports} exports${Colors.RESET}`);
|
|
76
|
-
else out(` ${Colors.DIM}└─${Colors.RESET} ${Colors.BRIGHT_CYAN}${pkgStats.totalExports} exports${Colors.RESET}`);
|
|
77
|
-
out("");
|
|
78
|
-
}
|
|
79
|
-
function logPrunedStaleExport(logger, exportSpecifier) {
|
|
80
|
-
logger.out(` ${Colors.DIM}└─${Colors.RESET} ${Colors.GRAY}Pruned stale export: ${exportSpecifier}${Colors.RESET}`);
|
|
81
|
-
}
|
|
82
|
-
function logPackageError(logger, index, total, displayName, errValue, verbose) {
|
|
83
|
-
const { out, err: errLine } = logger;
|
|
84
|
-
out(`${Colors.DIM}[${index}/${total}]${Colors.RESET} ${Colors.YELLOW}✗${Colors.RESET} ${Colors.BOLD}${displayName}${Colors.RESET}`);
|
|
85
|
-
out(` ${Colors.DIM}└─${Colors.RESET} ${Colors.YELLOW}Error: ${messageFromCaughtUnknown(errValue)}${Colors.RESET}\n`);
|
|
86
|
-
if (verbose) errLine(errValue instanceof Error && errValue.stack ? errValue.stack : messageFromCaughtUnknown(errValue));
|
|
87
|
-
}
|
|
88
|
-
function mirrorSummarySeparator(logger) {
|
|
89
|
-
logger.out(`${Colors.DIM}${"═".repeat(60)}${Colors.RESET}`);
|
|
90
|
-
}
|
|
91
|
-
function mirrorSummary(logger, stats, elapsedSeconds) {
|
|
92
|
-
const { out } = logger;
|
|
93
|
-
out(`${Colors.BOLD}📊 Summary${Colors.RESET} ${Colors.DIM}(completed in ${elapsedSeconds.toFixed(2)}s)${Colors.RESET}\n`);
|
|
94
|
-
out(` ${Colors.BOLD}Packages:${Colors.RESET}`);
|
|
95
|
-
out(` ${Colors.DIM}├─${Colors.RESET} Processed: ${Colors.GREEN}${stats.packagesProcessed}${Colors.RESET}`);
|
|
96
|
-
if (stats.packagesSkipped > 0) out(` ${Colors.DIM}├─${Colors.RESET} Skipped: ${Colors.GRAY}${stats.packagesSkipped}${Colors.RESET}`);
|
|
97
|
-
if (stats.packagesErrored > 0) out(` ${Colors.DIM}├─${Colors.RESET} Errors: ${Colors.YELLOW}${stats.packagesErrored}${Colors.RESET}`);
|
|
98
|
-
out(` ${Colors.DIM}└─${Colors.RESET} Total found: ${stats.packagesFound}\n`);
|
|
99
|
-
out(` ${Colors.BOLD}Exports:${Colors.RESET}`);
|
|
100
|
-
out(` ${Colors.DIM}├─${Colors.RESET} JS Modules: ${Colors.CYAN}${stats.totalJsModules}${Colors.RESET}`);
|
|
101
|
-
out(` ${Colors.DIM}├─${Colors.RESET} CSS Files: ${Colors.MAGENTA}${stats.totalCssExports}${Colors.RESET}`);
|
|
102
|
-
out(` ${Colors.DIM}└─${Colors.RESET} Total: ${Colors.BRIGHT_CYAN}${stats.totalExports}${Colors.RESET}\n`);
|
|
103
|
-
out(`${Colors.DIM}${"═".repeat(60)}${Colors.RESET}\n`);
|
|
104
|
-
}
|
|
105
|
-
function mirrorFatalError(logger, caughtError) {
|
|
106
|
-
const { out, err: errLine } = logger;
|
|
107
|
-
out(`${Colors.YELLOW}Fatal error: ${messageFromCaughtUnknown(caughtError)}${Colors.RESET}`);
|
|
108
|
-
errLine(caughtError instanceof Error && caughtError.stack ? caughtError.stack : messageFromCaughtUnknown(caughtError));
|
|
109
|
-
}
|
|
110
|
-
//#endregion
|
|
111
|
-
export { configureMirrorColors, logPackageError, logPackageSuccess, logPrunedStaleExport, logSkippedWorkspacePackage, mirrorBanner, mirrorFatalError, mirrorGlobWarning, mirrorNoPackages, mirrorProcessingMode, mirrorSummary, mirrorSummarySeparator, printMirrorConfigWarnings };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { messageFromCaughtUnknown } from "../../core/application/utils/caught-unknown-message.util.mjs";
|
|
2
|
-
//#region src/lib/tag/presentation/resolve-tag-workspace-root.presenter.ts
|
|
3
|
-
function resolveTagWorkspaceRootPath(input) {
|
|
4
|
-
try {
|
|
5
|
-
return input.resolveStrictRepoRoot();
|
|
6
|
-
} catch (caughtRepoRootError) {
|
|
7
|
-
input.logger.out(`[tag] workspace root auto-detection failed (${messageFromCaughtUnknown(caughtRepoRootError)}), using cwd=${input.currentWorkingDirectory}`);
|
|
8
|
-
return input.currentWorkingDirectory;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
export { resolveTagWorkspaceRootPath };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { COMMAND_TOKEN } from "../kernel/di/command.token.mjs";
|
|
2
|
-
import { TagCommand as _TagCommand } from "../../commands/tag.mjs";
|
|
3
|
-
import { TagModule } from "./tag.module.mjs";
|
|
4
|
-
import { TagPresentationModule } from "./tag.presentation.module.mjs";
|
|
5
|
-
import { Module } from "@codefast/di";
|
|
6
|
-
//#region src/lib/tag/tag.feature.module.ts
|
|
7
|
-
const TagFeatureModule = Module.create("cli-tag-feature", (moduleBuilder) => {
|
|
8
|
-
moduleBuilder.import(TagPresentationModule, TagModule);
|
|
9
|
-
moduleBuilder.bind(_TagCommand).to(_TagCommand).singleton();
|
|
10
|
-
});
|
|
11
|
-
function registerTagFeature(runtimeContainer) {
|
|
12
|
-
runtimeContainer.load(TagFeatureModule);
|
|
13
|
-
runtimeContainer.bind(COMMAND_TOKEN).to(_TagCommand).singleton().whenNamed("tag");
|
|
14
|
-
}
|
|
15
|
-
function resolveTagCommand(runtimeContainer) {
|
|
16
|
-
return runtimeContainer.resolve(_TagCommand);
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { TagFeatureModule, registerTagFeature, resolveTagCommand };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PresentationModule } from "../core/presentation/presentation.module.mjs";
|
|
2
|
-
import { CreateTagProgressListenerPresenterToken, PrepareTagOrchestratorToken, PresentTagSyncResultPresenterToken } from "./contracts/tokens.mjs";
|
|
3
|
-
import { CreateTagProgressListenerPresenterImpl as _CreateTagProgressListenerPresenterImpl } from "./presentation/create-tag-progress-listener.presenter.mjs";
|
|
4
|
-
import { PrepareTagOrchestrator as _PrepareTagOrchestrator } from "./presentation/prepare-tag.orchestrator.mjs";
|
|
5
|
-
import { PresentTagSyncResultPresenterImpl as _PresentTagSyncResultPresenterImpl } from "./presentation/present-tag-sync-result.presenter.mjs";
|
|
6
|
-
import { Module } from "@codefast/di";
|
|
7
|
-
//#region src/lib/tag/tag.presentation.module.ts
|
|
8
|
-
const TagPresentationModule = Module.create("cli-tag-presentation", (moduleBuilder) => {
|
|
9
|
-
moduleBuilder.import(PresentationModule);
|
|
10
|
-
moduleBuilder.bind(PrepareTagOrchestratorToken).to(_PrepareTagOrchestrator).singleton();
|
|
11
|
-
moduleBuilder.bind(PresentTagSyncResultPresenterToken).to(_PresentTagSyncResultPresenterImpl).singleton();
|
|
12
|
-
moduleBuilder.bind(CreateTagProgressListenerPresenterToken).to(_CreateTagProgressListenerPresenterImpl).singleton();
|
|
13
|
-
});
|
|
14
|
-
//#endregion
|
|
15
|
-
export { TagPresentationModule };
|
|
File without changes
|
/package/dist/lib/arrange/contracts/{use-cases.contract.mjs → analyze-report-presenter.contract.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/lib/core/{presentation/command.interface.mjs → application/ports/runtime.port.mjs}
RENAMED
|
File without changes
|
|
File without changes
|