@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.
Files changed (142) hide show
  1. package/dist/{commands/arrange.mjs → lib/arrange/adapters/primary/cli/arrange.command.mjs} +32 -33
  2. package/dist/lib/arrange/adapters/primary/cli/arrange.presentation.module.mjs +14 -0
  3. package/dist/lib/arrange/adapters/primary/cli/presentation.tokens.mjs +5 -0
  4. package/dist/lib/arrange/{infra → adapters/secondary}/domain-source-parser.adapter.mjs +5 -8
  5. package/dist/lib/arrange/{infra → adapters/secondary}/file-walker.adapter.mjs +11 -9
  6. package/dist/lib/arrange/adapters/secondary/workspace-resolver.adapter.mjs +233 -0
  7. package/dist/lib/arrange/application/services/arrange-file-processor.service.mjs +37 -12
  8. package/dist/lib/arrange/application/services/arrange-target-path-resolver.service.mjs +21 -0
  9. package/dist/lib/arrange/application/services/arrange-target-scanner.service.mjs +10 -4
  10. package/dist/lib/arrange/application/use-cases/analyze-directory.use-case.mjs +7 -10
  11. package/dist/lib/arrange/{presentation/prepare-arrange.orchestrator.mjs → application/use-cases/prepare-arrange-workspace.use-case.mjs} +25 -20
  12. package/dist/lib/arrange/application/use-cases/run-arrange-sync.use-case.mjs +10 -19
  13. package/dist/lib/arrange/application/use-cases/suggest-cn-groups.use-case.mjs +9 -5
  14. package/dist/lib/arrange/arrange.module.mjs +17 -13
  15. package/dist/lib/arrange/contracts/tokens.mjs +6 -5
  16. package/dist/lib/arrange/domain/arrange-analyze.service.mjs +1 -1
  17. package/dist/lib/arrange/domain/ast/ast-helpers.helper.mjs +1 -1
  18. package/dist/lib/arrange/domain/ast/ast-node.model.mjs +1 -21
  19. package/dist/lib/arrange/domain/ast/collectors-tv.collector.mjs +2 -2
  20. package/dist/lib/arrange/domain/ast/targets.model.mjs +6 -6
  21. package/dist/lib/arrange/domain/grouping.domain.mjs +3 -2
  22. package/dist/lib/arrange/domain/imports.domain.mjs +1 -1
  23. package/dist/lib/arrange/domain/source-text-formatters.formatter.mjs +19 -2
  24. package/dist/lib/{tag/presentation/create-tag-progress-listener.presenter.mjs → arrange/domain/tailwind-grouping.service.mjs} +10 -7
  25. package/dist/lib/arrange/domain/{tokenizer.util.mjs → tailwind-token-classifier.domain-service.mjs} +3 -29
  26. package/dist/lib/arrange/domain/tailwind-token.value-object.mjs +31 -0
  27. package/dist/lib/arrange/{infra/ts-ast-translator.adapter.mjs → infrastructure/typescript-ast-translator.adapter.mjs} +2 -2
  28. package/dist/lib/arrange/presentation/arrange-analyze.presenter.mjs +259 -0
  29. package/dist/lib/arrange/presentation/arrange-cli.schema.mjs +18 -0
  30. package/dist/lib/arrange/presentation/arrange-sync.presenter.mjs +23 -2
  31. package/dist/lib/arrange/presentation/group-file-preview.presenter.mjs +10 -14
  32. package/dist/lib/bootstrap/composition-root.mjs +33 -0
  33. package/dist/lib/config/application/services/load-config.service.mjs +17 -0
  34. package/dist/lib/config/contracts/tokens.mjs +2 -1
  35. package/dist/lib/config/infrastructure/config-loader.adapter.mjs +306 -0
  36. package/dist/lib/config/{infra → infrastructure}/config-schema.adapter.mjs +2 -2
  37. package/dist/lib/{arrange/presentation/present-analyze-report.presenter.mjs → config/infrastructure/config-warning-reporter.adapter.mjs} +9 -8
  38. package/dist/lib/core/{presentation/try-load-codefast-config.presenter.mjs → application/load-codefast-config.use-case.mjs} +22 -22
  39. package/dist/lib/core/{presentation/global-cli-options.presenter.mjs → application/services/global-cli-options-parser.service.mjs} +3 -3
  40. package/dist/lib/core/application/services/schema-validator.service.mjs +17 -0
  41. package/dist/lib/core/contracts/tokens.mjs +7 -2
  42. package/dist/lib/core/core.module.mjs +3 -3
  43. package/dist/lib/core/{application/utils/caught-unknown-message.util.mjs → domain/caught-unknown-message.value-object.mjs} +1 -1
  44. package/dist/lib/core/domain/errors.domain.mjs +13 -12
  45. package/dist/lib/core/domain/result.model.mjs +1 -7
  46. package/dist/lib/core/infrastructure/infrastructure.module.mjs +30 -0
  47. package/dist/lib/core/infrastructure/path.adapter.mjs +246 -0
  48. package/dist/lib/core/{infra/logging-decorator.adapter.mjs → infrastructure/port-telemetry.decorator.mjs} +1 -1
  49. package/dist/lib/core/infrastructure/repo-root-resolver.adapter.mjs +233 -0
  50. package/dist/lib/core/{application/utils/verbose-diagnostics.util.mjs → infrastructure/verbose-diagnostics.policy.mjs} +1 -1
  51. package/dist/lib/core/presentation/cli-executor.presenter.mjs +3 -18
  52. package/dist/lib/core/presentation/cli-schema.parser.mjs +7 -0
  53. package/dist/lib/core/presentation/presentation.module.mjs +1 -7
  54. package/dist/lib/{infra → infrastructure}/node-io.adapter.mjs +22 -3
  55. package/dist/lib/{infra/workspace/repo-root.adapter.mjs → infrastructure/workspace/repo-root-resolver.service.mjs} +1 -1
  56. package/dist/lib/kernel/contracts/tokens.mjs +5 -0
  57. package/dist/{commands/mirror.mjs → lib/mirror/adapters/primary/cli/mirror.command.mjs} +17 -12
  58. package/dist/lib/mirror/{infra → adapters/secondary}/file-system-service.adapter.mjs +14 -9
  59. package/dist/lib/mirror/{infra → adapters/secondary}/mirror-sync-reporter.adapter.mjs +12 -5
  60. package/dist/lib/mirror/{infra → adapters/secondary}/package-repository.adapter.mjs +12 -6
  61. package/dist/lib/mirror/{application/services/sync-workspace-package.service.mjs → adapters/secondary/sync-workspace-package.adapter.mjs} +29 -29
  62. package/dist/lib/mirror/{infra → adapters/secondary}/workspace-service.adapter.mjs +12 -7
  63. package/dist/lib/mirror/application/{use-cases/generate-mirror-exports.use-case.mjs → services/generate-mirror-exports.service.mjs} +7 -7
  64. package/dist/lib/mirror/{presentation/resolve-mirror-package-arg.presenter.mjs → application/services/mirror-package-arg-resolver.service.mjs} +4 -4
  65. package/dist/lib/mirror/{presentation/prepare-mirror.orchestrator.mjs → application/use-cases/prepare-mirror-sync.use-case.mjs} +23 -22
  66. package/dist/lib/mirror/application/use-cases/run-mirror-sync.use-case.mjs +12 -12
  67. package/dist/lib/mirror/contracts/tokens.mjs +3 -3
  68. package/dist/lib/mirror/domain/package-display-name.policy.mjs +9 -0
  69. package/dist/lib/mirror/{infra/path-normalizer.adapter.mjs → domain/path-normalizer.value-object.mjs} +1 -1
  70. package/dist/lib/mirror/{infra/dirent-list.adapter.mjs → infrastructure/dirent-list.guard.mjs} +1 -1
  71. package/dist/lib/mirror/infrastructure/mirror-console-reporter.presenter.mjs +99 -0
  72. package/dist/lib/mirror/{infra/package-filter.adapter.mjs → infrastructure/package-filter-resolver.service.mjs} +2 -2
  73. package/dist/lib/mirror/{infra/update-pkg.adapter.mjs → infrastructure/package-json-exports.repository.mjs} +4 -19
  74. package/dist/lib/mirror/{infra/workspace-packages.adapter.mjs → infrastructure/workspace-packages.service.mjs} +4 -4
  75. package/dist/lib/mirror/mirror.module.mjs +17 -15
  76. package/dist/lib/mirror/presentation/{mirror-cli-schema.presenter.mjs → mirror-cli.schema.mjs} +1 -1
  77. package/dist/lib/shared/source-code/domain/text-edit.model.mjs +32 -5
  78. package/dist/lib/shared/source-code/{infra/tsx-file-walk.adapter.mjs → infrastructure/typescript-source-file-walker.service.mjs} +2 -2
  79. package/dist/lib/tag/adapters/primary/cli/presentation.tokens.mjs +6 -0
  80. package/dist/{commands/tag.mjs → lib/tag/adapters/primary/cli/tag.command.mjs} +23 -21
  81. package/dist/lib/tag/adapters/primary/cli/tag.presentation.module.mjs +13 -0
  82. package/dist/lib/tag/{infra → adapters/secondary}/tag-since-writer.adapter.mjs +12 -7
  83. package/dist/lib/tag/{infra → adapters/secondary}/tag-target-resolver.adapter.mjs +12 -5
  84. package/dist/lib/tag/{infra → adapters/secondary}/tag-version-resolver.adapter.mjs +10 -8
  85. package/dist/lib/tag/{infra → adapters/secondary}/typescript-tree-walk.adapter.mjs +12 -5
  86. package/dist/lib/tag/{presentation/resolve-tag-cli-target.presenter.mjs → application/services/tag-cli-target-path-resolver.service.mjs} +1 -1
  87. package/dist/lib/tag/application/services/tag-target-runner.service.mjs +21 -0
  88. package/dist/lib/tag/{presentation/prepare-tag.orchestrator.mjs → application/use-cases/prepare-tag-sync.use-case.mjs} +23 -23
  89. package/dist/lib/tag/application/use-cases/run-tag-sync.use-case.mjs +14 -31
  90. package/dist/lib/tag/contracts/tokens.mjs +2 -4
  91. package/dist/lib/tag/{infra → infrastructure}/tag-target-candidates.adapter.mjs +4 -4
  92. package/dist/lib/tag/presentation/present-tag-sync-result.presenter.mjs +1 -1
  93. package/dist/lib/tag/presentation/{tag-cli-schema.presenter.mjs → tag-cli.schema.mjs} +1 -1
  94. package/dist/lib/tag/presentation/tag-sync-progress-listener.presenter.mjs +243 -0
  95. package/dist/lib/tag/presentation/tag-sync.presenter.mjs +6 -23
  96. package/dist/lib/tag/tag.module.mjs +15 -13
  97. package/dist/program.mjs +2 -2
  98. package/package.json +16 -9
  99. package/dist/lib/arrange/application/arrange-analyze-json.format.mjs +0 -10
  100. package/dist/lib/arrange/application/arrange-group-json.format.mjs +0 -11
  101. package/dist/lib/arrange/application/arrange-sync-cli-result.mjs +0 -7
  102. package/dist/lib/arrange/application/arrange-sync-json.format.mjs +0 -12
  103. package/dist/lib/arrange/application/use-cases/group-file.use-case.mjs +0 -35
  104. package/dist/lib/arrange/arrange.feature.module.mjs +0 -19
  105. package/dist/lib/arrange/arrange.presentation.module.mjs +0 -13
  106. package/dist/lib/arrange/domain/errors.domain.mjs +0 -18
  107. package/dist/lib/arrange/infra/ensure-cn-import.adapter.mjs +0 -10
  108. package/dist/lib/arrange/infra/merge-cn-literal-pool-for-test.test-helper.mjs +0 -18
  109. package/dist/lib/arrange/presentation/arrange-cli-schema.presenter.mjs +0 -29
  110. package/dist/lib/arrange/presentation/formatters.presenter.mjs +0 -2
  111. package/dist/lib/arrange/presentation/present-analyze-cli.presenter.mjs +0 -7
  112. package/dist/lib/arrange/presentation/report.presenter.mjs +0 -24
  113. package/dist/lib/arrange/presentation/resolve-arrange-cli-target.presenter.mjs +0 -21
  114. package/dist/lib/config/application/use-cases/load-config.use-case.mjs +0 -17
  115. package/dist/lib/config/infra/loader.adapter.mjs +0 -84
  116. package/dist/lib/core/application/schema-parse.util.mjs +0 -17
  117. package/dist/lib/core/infra/composition-root.mjs +0 -21
  118. package/dist/lib/core/infra/infra.module.mjs +0 -23
  119. package/dist/lib/core/infra/path.adapter.mjs +0 -13
  120. package/dist/lib/core/operational/contracts/tokens.mjs +0 -7
  121. package/dist/lib/core/presentation/load-codefast-config.presenter.mjs +0 -18
  122. package/dist/lib/core/presentation/parse-cli-schema.presenter.mjs +0 -7
  123. package/dist/lib/infra/config-reporter.adapter.mjs +0 -11
  124. package/dist/lib/kernel/di/command.token.mjs +0 -5
  125. package/dist/lib/mirror/contracts/use-cases.contract.mjs +0 -1
  126. package/dist/lib/mirror/infra/mirror-sync-cli-options.adapter.mjs +0 -1
  127. package/dist/lib/mirror/mirror.feature.module.mjs +0 -19
  128. package/dist/lib/mirror/mirror.presentation.module.mjs +0 -11
  129. package/dist/lib/mirror/presentation/reporter.presenter.mjs +0 -111
  130. package/dist/lib/tag/contracts/presentation.contract.mjs +0 -1
  131. package/dist/lib/tag/contracts/use-cases.contract.mjs +0 -1
  132. package/dist/lib/tag/infra/tag-sync-cli-options.adapter.mjs +0 -1
  133. package/dist/lib/tag/presentation/resolve-tag-workspace-root.presenter.mjs +0 -12
  134. package/dist/lib/tag/tag.feature.module.mjs +0 -19
  135. package/dist/lib/tag/tag.presentation.module.mjs +0 -15
  136. /package/dist/lib/arrange/{contracts/presentation.contract.mjs → application/ports/workspace-resolver.port.mjs} +0 -0
  137. /package/dist/lib/arrange/contracts/{use-cases.contract.mjs → analyze-report-presenter.contract.mjs} +0 -0
  138. /package/dist/lib/{arrange/infra/arrange-sync-cli-options.adapter.mjs → config/application/ports/config-warning-reporter.port.mjs} +0 -0
  139. /package/dist/lib/core/{contracts/presentation.contract.mjs → application/ports/repo-root-resolver.port.mjs} +0 -0
  140. /package/dist/lib/core/{presentation/command.interface.mjs → application/ports/runtime.port.mjs} +0 -0
  141. /package/dist/lib/{infra/fs-contract.port.mjs → kernel/contracts/cli-command.contract.mjs} +0 -0
  142. /package/dist/lib/{mirror/contracts/presentation.contract.mjs → tag/contracts/tag-sync-result-presenter.contract.mjs} +0 -0
@@ -5,8 +5,6 @@ const TypeScriptTreeWalkPortToken = token("TypeScriptTreeWalkPort");
5
5
  const TagSinceWriterPortToken = token("TagSinceWriterPort");
6
6
  const TagVersionResolverPortToken = token("TagVersionResolverPort");
7
7
  const RunTagSyncUseCaseToken = token("RunTagSyncUseCase");
8
- const PrepareTagOrchestratorToken = token("PrepareTagOrchestrator");
9
- const PresentTagSyncResultPresenterToken = token("PresentTagSyncResultPresenter");
10
- const CreateTagProgressListenerPresenterToken = token("CreateTagProgressListenerPresenter");
8
+ const PrepareTagSyncUseCaseToken = token("PrepareTagSyncUseCase");
11
9
  //#endregion
12
- export { CreateTagProgressListenerPresenterToken, PrepareTagOrchestratorToken, PresentTagSyncResultPresenterToken, RunTagSyncUseCaseToken, TagSinceWriterPortToken, TagTargetResolverPortToken, TagVersionResolverPortToken, TypeScriptTreeWalkPortToken };
10
+ export { PrepareTagSyncUseCaseToken, RunTagSyncUseCaseToken, TagSinceWriterPortToken, TagTargetResolverPortToken, TagVersionResolverPortToken, TypeScriptTreeWalkPortToken };
@@ -1,15 +1,15 @@
1
- import { messageFromCaughtUnknown } from "../../core/application/utils/caught-unknown-message.util.mjs";
1
+ import { messageFromCaughtUnknown } from "../../core/domain/caught-unknown-message.value-object.mjs";
2
2
  import { globSync } from "node:fs";
3
3
  import path from "node:path";
4
4
  import { z } from "zod";
5
5
  import picomatch from "picomatch";
6
6
  import { parse } from "yaml";
7
- //#region src/lib/tag/infra/tag-target-candidates.adapter.ts
7
+ //#region src/lib/tag/infrastructure/tag-target-candidates.adapter.ts
8
8
  const PNPM_WORKSPACE_FILE = "pnpm-workspace.yaml";
9
9
  const PACKAGE_JSON_FILE = "package.json";
10
10
  const DEFAULT_WORKSPACE_PACKAGE_PATTERNS = ["packages/*"];
11
- const pnpmWorkspaceSchema = z.object({ packages: z.array(z.string()).optional() }).passthrough();
12
- const packageNameSchema = z.object({ name: z.string().min(1).optional() }).passthrough();
11
+ const pnpmWorkspaceSchema = z.looseObject({ packages: z.array(z.string()).optional() });
12
+ const packageNameSchema = z.looseObject({ name: z.string().min(1).optional() });
13
13
  function toPosix(filePath) {
14
14
  return filePath.split(path.sep).join("/");
15
15
  }
@@ -1,4 +1,4 @@
1
- import { CliLoggerToken } from "../../core/operational/contracts/tokens.mjs";
1
+ import { CliLoggerToken } from "../../core/contracts/tokens.mjs";
2
2
  import { presentTagSyncCliResult } from "./tag-sync.presenter.mjs";
3
3
  import { inject, injectable } from "@codefast/di";
4
4
  //#region src/lib/tag/presentation/present-tag-sync-result.presenter.ts
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- //#region src/lib/tag/presentation/tag-cli-schema.presenter.ts
2
+ //#region src/lib/tag/presentation/tag-cli.schema.ts
3
3
  const tagSyncRunRequestSchema = z.object({
4
4
  rootDir: z.string().min(1),
5
5
  write: z.boolean(),
@@ -0,0 +1,243 @@
1
+ import { CliLoggerToken } from "../../core/contracts/tokens.mjs";
2
+ import { formatProgress } from "./tag-sync.presenter.mjs";
3
+ import { inject, injectable } from "@codefast/di";
4
+ //#region src/lib/tag/presentation/tag-sync-progress-listener.presenter.ts
5
+ function toPrimitive(input, hint) {
6
+ if (typeof input !== "object" || input === null) return input;
7
+ var prim = input[Symbol.toPrimitive];
8
+ if (prim !== void 0) {
9
+ var res = prim.call(input, hint || "default");
10
+ if (typeof res !== "object") return res;
11
+ throw new TypeError("@@toPrimitive must return a primitive value.");
12
+ }
13
+ return (hint === "string" ? String : Number)(input);
14
+ }
15
+ function toPropertyKey(arg) {
16
+ var key = toPrimitive(arg, "string");
17
+ return typeof key === "symbol" ? key : String(key);
18
+ }
19
+ function checkInRHS(value) {
20
+ if (Object(value) !== value) throw TypeError("right-hand side of 'in' should be an object, got " + (value !== null ? typeof value : "null"));
21
+ return value;
22
+ }
23
+ function setFunctionName(fn, name, prefix) {
24
+ if (typeof name === "symbol") {
25
+ name = name.description;
26
+ name = name ? "[" + name + "]" : "";
27
+ }
28
+ try {
29
+ Object.defineProperty(fn, "name", {
30
+ configurable: true,
31
+ value: prefix ? prefix + " " + name : name
32
+ });
33
+ } catch (_) {}
34
+ return fn;
35
+ }
36
+ function _apply_decs_2311(targetClass, classDecs, memberDecs, classDecsHaveThis, instanceBrand, parentClass) {
37
+ var symbolMetadata = Symbol.metadata || Symbol.for("Symbol.metadata");
38
+ var defineProperty = Object.defineProperty;
39
+ var create = Object.create;
40
+ var metadata;
41
+ var existingNonFields = [create(null), create(null)];
42
+ var hasClassDecs = classDecs.length;
43
+ var _;
44
+ function createRunInitializers(initializers, useStaticThis, hasValue) {
45
+ return function(thisArg, value) {
46
+ if (useStaticThis) {
47
+ value = thisArg;
48
+ thisArg = targetClass;
49
+ }
50
+ for (var i = 0; i < initializers.length; i++) value = initializers[i].apply(thisArg, hasValue ? [value] : []);
51
+ return hasValue ? value : thisArg;
52
+ };
53
+ }
54
+ function assertCallable(fn, hint1, hint2, throwUndefined) {
55
+ if (typeof fn !== "function") {
56
+ if (throwUndefined || fn !== void 0) throw new TypeError(hint1 + " must " + (hint2 || "be") + " a function" + (throwUndefined ? "" : " or undefined"));
57
+ }
58
+ return fn;
59
+ }
60
+ function applyDec(Class, decInfo, decoratorsHaveThis, name, kind, initializers, ret, isStatic, isPrivate, isField, hasPrivateBrand) {
61
+ function assertInstanceIfPrivate(target) {
62
+ if (!hasPrivateBrand(target)) throw new TypeError("Attempted to access private element on non-instance");
63
+ }
64
+ var decs = [].concat(decInfo[0]);
65
+ var decVal = decInfo[3];
66
+ var isClass = !ret;
67
+ var isAccessor = kind === 1;
68
+ var isGetter = kind === 3;
69
+ var isSetter = kind === 4;
70
+ var isMethod = kind === 2;
71
+ function bindPropCall(name, useStaticThis, before) {
72
+ return function(_this, value) {
73
+ if (useStaticThis) {
74
+ value = _this;
75
+ _this = Class;
76
+ }
77
+ if (before) before(_this);
78
+ return desc[name].call(_this, value);
79
+ };
80
+ }
81
+ var desc1 = {};
82
+ var init = [];
83
+ var key = isGetter ? "get" : isSetter || isAccessor ? "set" : "value";
84
+ if (!isClass) {
85
+ if (isPrivate) {
86
+ if (isField || isAccessor) desc1 = {
87
+ get: setFunctionName(function() {
88
+ return decVal(this);
89
+ }, name, "get"),
90
+ set: function(value) {
91
+ decInfo[4](this, value);
92
+ }
93
+ };
94
+ else desc1[key] = decVal;
95
+ if (!isField) setFunctionName(desc1[key], name, isMethod ? "" : key);
96
+ } else if (!isField) desc1 = Object.getOwnPropertyDescriptor(Class, name);
97
+ if (!isField && !isPrivate) {
98
+ _ = existingNonFields[+isStatic][name];
99
+ if (_ && (_ ^ kind) !== 7) throw new Error("Decorating two elements with the same name (" + desc1[key].name + ") is not supported yet");
100
+ existingNonFields[+isStatic][name] = kind < 3 ? 1 : kind;
101
+ }
102
+ }
103
+ var newValue = Class;
104
+ for (var i = decs.length - 1; i >= 0; i -= decoratorsHaveThis ? 2 : 1) {
105
+ var dec = assertCallable(decs[i], "A decorator", "be", true);
106
+ var decThis = decoratorsHaveThis ? decs[i - 1] : void 0;
107
+ var decoratorFinishedRef = {};
108
+ var ctx = {
109
+ kind: [
110
+ "field",
111
+ "accessor",
112
+ "method",
113
+ "getter",
114
+ "setter",
115
+ "class"
116
+ ][kind],
117
+ name,
118
+ metadata,
119
+ addInitializer: (function(decoratorFinishedRef, initializer) {
120
+ if (decoratorFinishedRef.v) throw new TypeError("attempted to call addInitializer after decoration was finished");
121
+ assertCallable(initializer, "An initializer", "be", true);
122
+ initializers.push(initializer);
123
+ }).bind(null, decoratorFinishedRef)
124
+ };
125
+ if (isClass) {
126
+ _ = dec.call(decThis, newValue, ctx);
127
+ decoratorFinishedRef.v = 1;
128
+ if (assertCallable(_, "class decorators", "return")) newValue = _;
129
+ continue;
130
+ }
131
+ ctx.static = isStatic;
132
+ ctx.private = isPrivate;
133
+ _ = ctx.access = { has: isPrivate ? hasPrivateBrand.bind() : function(target) {
134
+ return name in target;
135
+ } };
136
+ if (!isSetter) _.get = isPrivate ? isMethod ? function(_this) {
137
+ assertInstanceIfPrivate(_this);
138
+ return desc1.value;
139
+ } : bindPropCall("get", 0, assertInstanceIfPrivate) : function(target) {
140
+ return target[name];
141
+ };
142
+ if (!isMethod && !isGetter) _.set = isPrivate ? bindPropCall("set", 0, assertInstanceIfPrivate) : function(target, value) {
143
+ target[name] = value;
144
+ };
145
+ newValue = dec.call(decThis, isAccessor ? {
146
+ get: desc1.get,
147
+ set: desc1.set
148
+ } : desc1[key], ctx);
149
+ decoratorFinishedRef.v = 1;
150
+ if (isAccessor) {
151
+ if (typeof newValue === "object" && newValue) {
152
+ if (_ = assertCallable(newValue.get, "accessor.get")) desc1.get = _;
153
+ if (_ = assertCallable(newValue.set, "accessor.set")) desc1.set = _;
154
+ if (_ = assertCallable(newValue.init, "accessor.init")) init.unshift(_);
155
+ } else if (newValue !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined");
156
+ } else if (assertCallable(newValue, (isField ? "field" : "method") + " decorators", "return")) if (isField) init.unshift(newValue);
157
+ else desc1[key] = newValue;
158
+ }
159
+ if (kind < 2) ret.push(createRunInitializers(init, isStatic, 1), createRunInitializers(initializers, isStatic, 0));
160
+ if (!isField && !isClass) if (isPrivate) if (isAccessor) ret.splice(-1, 0, bindPropCall("get", isStatic), bindPropCall("set", isStatic));
161
+ else ret.push(isMethod ? desc1[key] : assertCallable.call.bind(desc1[key]));
162
+ else defineProperty(Class, name, desc1);
163
+ return newValue;
164
+ }
165
+ function applyMemberDecs() {
166
+ var ret = [];
167
+ var protoInitializers;
168
+ var staticInitializers;
169
+ var pushInitializers = function(initializers) {
170
+ if (initializers) ret.push(createRunInitializers(initializers));
171
+ };
172
+ var applyMemberDecsOfKind = function(isStatic, isField) {
173
+ for (var i = 0; i < memberDecs.length; i++) {
174
+ var decInfo = memberDecs[i];
175
+ var kind = decInfo[1];
176
+ var kindOnly = kind & 7;
177
+ if ((kind & 8) == isStatic && !kindOnly == isField) {
178
+ var name = decInfo[2];
179
+ var isPrivate = !!decInfo[3];
180
+ var decoratorsHaveThis = kind & 16;
181
+ applyDec(isStatic ? targetClass : targetClass.prototype, decInfo, decoratorsHaveThis, isPrivate ? "#" + name : toPropertyKey(name), kindOnly, kindOnly < 2 ? [] : isStatic ? staticInitializers = staticInitializers || [] : protoInitializers = protoInitializers || [], ret, !!isStatic, isPrivate, isField, isStatic && isPrivate ? function(_) {
182
+ return checkInRHS(_) === targetClass;
183
+ } : instanceBrand);
184
+ }
185
+ }
186
+ };
187
+ applyMemberDecsOfKind(8, 0);
188
+ applyMemberDecsOfKind(0, 0);
189
+ applyMemberDecsOfKind(8, 1);
190
+ applyMemberDecsOfKind(0, 1);
191
+ pushInitializers(protoInitializers);
192
+ pushInitializers(staticInitializers);
193
+ return ret;
194
+ }
195
+ function defineMetadata(Class) {
196
+ return defineProperty(Class, symbolMetadata, {
197
+ configurable: true,
198
+ enumerable: true,
199
+ value: metadata
200
+ });
201
+ }
202
+ if (parentClass !== void 0) metadata = parentClass[symbolMetadata];
203
+ metadata = create(metadata == null ? null : metadata);
204
+ _ = applyMemberDecs();
205
+ if (!hasClassDecs) defineMetadata(targetClass);
206
+ return {
207
+ e: _,
208
+ get c() {
209
+ var initializers = [];
210
+ return hasClassDecs && [defineMetadata(targetClass = applyDec(targetClass, [classDecs], classDecsHaveThis, targetClass.name, 5, initializers)), createRunInitializers(initializers, 1)];
211
+ }
212
+ };
213
+ }
214
+ let _dec, _initClass;
215
+ _dec = injectable([inject(CliLoggerToken)]);
216
+ let _TagSyncProgressListener;
217
+ (class {
218
+ logger;
219
+ static {
220
+ ({c: [_TagSyncProgressListener, _initClass]} = _apply_decs_2311(this, [_dec], []));
221
+ }
222
+ constructor(logger) {
223
+ this.logger = logger;
224
+ }
225
+ onTargetStarted(target) {
226
+ this.logger.out(formatProgress({
227
+ type: "target-started",
228
+ target
229
+ }));
230
+ }
231
+ onTargetCompleted(target, result) {
232
+ this.logger.out(formatProgress({
233
+ type: "target-completed",
234
+ target,
235
+ result
236
+ }));
237
+ }
238
+ static {
239
+ _initClass();
240
+ }
241
+ });
242
+ //#endregion
243
+ export { _TagSyncProgressListener as TagSyncProgressListener };
@@ -5,17 +5,17 @@ import { TAG_COLORS, withTagColor } from "./colors.presenter.mjs";
5
5
  function targetDisplayName(target) {
6
6
  return target.packageName ?? target.rootRelativeTargetPath;
7
7
  }
8
+ function formatProgress(event) {
9
+ if (event.type === "target-started") return `[tag] Processing ${targetDisplayName(event.target)}...`;
10
+ const changedFiles = event.result.result?.filesChanged ?? 0;
11
+ return `[tag] Done ${targetDisplayName(event.target)} (${changedFiles} changes)`;
12
+ }
8
13
  function warningsAndErrorsFromResult(result) {
9
14
  const entries = [];
10
15
  for (const targetResult of result.targetResults) if (targetResult.runError) entries.push(targetResult.runError);
11
16
  if (result.hookError) entries.push(result.hookError);
12
17
  return entries;
13
18
  }
14
- function formatProgress(event) {
15
- if (event.type === "target-started") return `[tag] Processing ${targetDisplayName(event.target)}...`;
16
- const changedFiles = event.result.result?.filesChanged ?? 0;
17
- return `[tag] Done ${targetDisplayName(event.target)} (${changedFiles} changes)`;
18
- }
19
19
  function formatTargetTable(targets, rootDir) {
20
20
  const packageColumnWidth = Math.max(7, ...targets.map((target) => (target.packageName ?? "-").length));
21
21
  const pathColumnWidth = Math.max(4, ...targets.map((target) => target.rootRelativeTargetPath.length));
@@ -57,22 +57,5 @@ function formatSummary(result) {
57
57
  logger.out(formatSummary(tagResult));
58
58
  return exitCodeForTagSyncResult(tagResult);
59
59
  }
60
- function createTagProgressListener(onProgressLine) {
61
- return {
62
- onTargetStarted: (target) => {
63
- onProgressLine(formatProgress({
64
- type: "target-started",
65
- target
66
- }));
67
- },
68
- onTargetCompleted: (target, result) => {
69
- onProgressLine(formatProgress({
70
- type: "target-completed",
71
- target,
72
- result
73
- }));
74
- }
75
- };
76
- }
77
60
  //#endregion
78
- export { createTagProgressListener, formatProgress, formatSummary, formatTargetTable, formatWarningsAndErrors, presentTagSyncCliResult };
61
+ export { formatProgress, presentTagSyncCliResult };
@@ -1,20 +1,22 @@
1
- import { CliLoggerToken } from "../core/operational/contracts/tokens.mjs";
2
- import { withOptionalPortTelemetry } from "../core/infra/logging-decorator.adapter.mjs";
3
- import { InfraModule } from "../core/infra/infra.module.mjs";
4
- import { RunTagSyncUseCaseToken, TagSinceWriterPortToken, TagTargetResolverPortToken, TagVersionResolverPortToken, TypeScriptTreeWalkPortToken } from "./contracts/tokens.mjs";
1
+ import { CliLoggerToken } from "../core/contracts/tokens.mjs";
2
+ import { withOptionalPortTelemetry } from "../core/infrastructure/port-telemetry.decorator.mjs";
3
+ import { InfrastructureModule } from "../core/infrastructure/infrastructure.module.mjs";
4
+ import { PrepareTagSyncUseCaseToken, RunTagSyncUseCaseToken, TagSinceWriterPortToken, TagTargetResolverPortToken, TagVersionResolverPortToken, TypeScriptTreeWalkPortToken } from "./contracts/tokens.mjs";
5
+ import { TagSinceWriterAdapter as _TagSinceWriterAdapter } from "./adapters/secondary/tag-since-writer.adapter.mjs";
6
+ import { TagTargetResolverAdapter as _TagTargetResolverAdapter } from "./adapters/secondary/tag-target-resolver.adapter.mjs";
7
+ import { TagVersionResolverAdapter as _TagVersionResolverAdapter } from "./adapters/secondary/tag-version-resolver.adapter.mjs";
8
+ import { TypeScriptTreeWalkAdapter as _TypeScriptTreeWalkAdapter } from "./adapters/secondary/typescript-tree-walk.adapter.mjs";
5
9
  import { RunTagSyncUseCaseImpl as _RunTagSyncUseCaseImpl } from "./application/use-cases/run-tag-sync.use-case.mjs";
6
- import { TagSinceWriterAdapter as _TagSinceWriterAdapter } from "./infra/tag-since-writer.adapter.mjs";
7
- import { TagTargetResolverAdapter as _TagTargetResolverAdapter } from "./infra/tag-target-resolver.adapter.mjs";
8
- import { TypeScriptTreeWalkAdapter as _TypeScriptTreeWalkAdapter } from "./infra/typescript-tree-walk.adapter.mjs";
9
- import { TagVersionResolverAdapter as _TagVersionResolverAdapter } from "./infra/tag-version-resolver.adapter.mjs";
10
+ import { PrepareTagSyncUseCaseImpl as _PrepareTagSyncUseCaseImpl } from "./application/use-cases/prepare-tag-sync.use-case.mjs";
10
11
  import { Module } from "@codefast/di";
11
12
  //#region src/lib/tag/tag.module.ts
12
13
  const TagModule = Module.create("cli-tag", (moduleBuilder) => {
13
- moduleBuilder.import(InfraModule);
14
- moduleBuilder.bind(TagTargetResolverPortToken).to(_TagTargetResolverAdapter).onActivation((ctx, implementation) => withOptionalPortTelemetry("TagTargetResolverPort", implementation, ctx.resolve(CliLoggerToken))).singleton();
15
- moduleBuilder.bind(TypeScriptTreeWalkPortToken).to(_TypeScriptTreeWalkAdapter).onActivation((ctx, implementation) => withOptionalPortTelemetry("TypeScriptTreeWalkPort", implementation, ctx.resolve(CliLoggerToken))).singleton();
16
- moduleBuilder.bind(TagSinceWriterPortToken).to(_TagSinceWriterAdapter).onActivation((ctx, implementation) => withOptionalPortTelemetry("TagSinceWriterPort", implementation, ctx.resolve(CliLoggerToken))).singleton();
17
- moduleBuilder.bind(TagVersionResolverPortToken).to(_TagVersionResolverAdapter).onActivation((ctx, implementation) => withOptionalPortTelemetry("TagVersionResolverPort", implementation, ctx.resolve(CliLoggerToken))).singleton();
14
+ moduleBuilder.import(InfrastructureModule);
15
+ moduleBuilder.bind(TagTargetResolverPortToken).to(_TagTargetResolverAdapter).singleton().onActivation((ctx, implementation) => withOptionalPortTelemetry("TagTargetResolverPort", implementation, ctx.resolve(CliLoggerToken)));
16
+ moduleBuilder.bind(TypeScriptTreeWalkPortToken).to(_TypeScriptTreeWalkAdapter).singleton().onActivation((ctx, implementation) => withOptionalPortTelemetry("TypeScriptTreeWalkPort", implementation, ctx.resolve(CliLoggerToken)));
17
+ moduleBuilder.bind(TagSinceWriterPortToken).to(_TagSinceWriterAdapter).singleton().onActivation((ctx, implementation) => withOptionalPortTelemetry("TagSinceWriterPort", implementation, ctx.resolve(CliLoggerToken)));
18
+ moduleBuilder.bind(TagVersionResolverPortToken).to(_TagVersionResolverAdapter).singleton().onActivation((ctx, implementation) => withOptionalPortTelemetry("TagVersionResolverPort", implementation, ctx.resolve(CliLoggerToken)));
19
+ moduleBuilder.bind(PrepareTagSyncUseCaseToken).to(_PrepareTagSyncUseCaseImpl).singleton();
18
20
  moduleBuilder.bind(RunTagSyncUseCaseToken).to(_RunTagSyncUseCaseImpl).singleton();
19
21
  });
20
22
  //#endregion
package/dist/program.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { createCliRuntimeContainer, resolveCliCommands } from "./lib/core/infra/composition-root.mjs";
1
+ import { createCliRuntimeContainer, resolveCliCommands } from "./lib/bootstrap/composition-root.mjs";
2
2
  import process from "node:process";
3
3
  import { readFileSync } from "node:fs";
4
4
  import path from "node:path";
@@ -36,4 +36,4 @@ async function runCli(argv) {
36
36
  }
37
37
  }
38
38
  //#endregion
39
- export { createProgram, runCli };
39
+ export { runCli };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefast/cli",
3
- "version": "0.3.14-canary.1",
3
+ "version": "0.3.14",
4
4
  "description": "Developer CLI for the Codefast monorepo (arrange, mirror, tag)",
5
5
  "keywords": [
6
6
  "cli",
@@ -32,6 +32,13 @@
32
32
  ],
33
33
  "type": "module",
34
34
  "imports": {
35
+ "#/tests/*": [
36
+ "./tests/*",
37
+ "./tests/*.ts",
38
+ "./tests/*.tsx",
39
+ "./tests/*/index.ts",
40
+ "./tests/*/index.tsx"
41
+ ],
35
42
  "#/*": [
36
43
  "./src/*",
37
44
  "./src/*.ts",
@@ -47,21 +54,21 @@
47
54
  "commander": "^14.0.3",
48
55
  "jiti": "^2.6.1",
49
56
  "picomatch": "^4.0.4",
50
- "typescript": "^6.0.2",
57
+ "typescript": "^6.0.3",
51
58
  "yaml": "^2.8.3",
52
59
  "zod": "^4.3.6",
53
- "@codefast/di": "0.3.14-canary.1"
60
+ "@codefast/di": "0.3.14"
54
61
  },
55
62
  "devDependencies": {
56
63
  "@types/node": "^25.6.0",
57
64
  "@types/picomatch": "^4.0.3",
58
- "@typescript/native-preview": "7.0.0-dev.20260411.1",
59
- "@vitest/coverage-v8": "^4.1.4",
60
- "esbuild": "^0.27.7",
65
+ "@typescript/native-preview": "7.0.0-dev.20260422.1",
66
+ "@vitest/coverage-v8": "^4.1.5",
67
+ "esbuild": "^0.28.0",
61
68
  "unplugin-swc": "^1.5.9",
62
- "vite": "^8.0.8",
63
- "vitest": "^4.1.4",
64
- "@codefast/typescript-config": "0.3.14-canary.1"
69
+ "vite": "^8.0.9",
70
+ "vitest": "^4.1.5",
71
+ "@codefast/typescript-config": "0.3.14"
65
72
  },
66
73
  "engines": {
67
74
  "node": ">=22.0.0"
@@ -1,10 +0,0 @@
1
- //#region src/lib/arrange/application/arrange-analyze-json.format.ts
2
- function formatArrangeAnalyzeJsonOutput(analyzeRootPath, report) {
3
- return JSON.stringify({
4
- schemaVersion: 1,
5
- analyzeRootPath,
6
- report
7
- });
8
- }
9
- //#endregion
10
- export { formatArrangeAnalyzeJsonOutput };
@@ -1,11 +0,0 @@
1
- //#region src/lib/arrange/application/arrange-group-json.format.ts
2
- function formatArrangeGroupJsonOutput(output) {
3
- const payload = {
4
- schemaVersion: 1,
5
- primaryLine: output.primaryLine,
6
- bucketsCommentLine: output.bucketsCommentLine
7
- };
8
- return JSON.stringify(payload);
9
- }
10
- //#endregion
11
- export { formatArrangeGroupJsonOutput };
@@ -1,7 +0,0 @@
1
- import "../../core/domain/cli-exit-codes.domain.mjs";
2
- //#region src/lib/arrange/application/arrange-sync-cli-result.ts
3
- function exitCodeForArrangeSyncResult(result) {
4
- return result.hookError !== null ? 1 : 0;
5
- }
6
- //#endregion
7
- export { exitCodeForArrangeSyncResult };
@@ -1,12 +0,0 @@
1
- //#region src/lib/arrange/application/arrange-sync-json.format.ts
2
- function formatArrangeSyncJsonOutput(result, write) {
3
- const payload = {
4
- schemaVersion: 1,
5
- ok: result.hookError === null,
6
- write,
7
- result
8
- };
9
- return JSON.stringify(payload);
10
- }
11
- //#endregion
12
- export { formatArrangeSyncJsonOutput };
@@ -1,35 +0,0 @@
1
- import { buildGroupFileUnwrapState, countPersistedGroupFileEdits, groupFileDryRunNoEdits, groupFileEditsTouchJsxCn, groupFilePreviewTotals, groupFileWorkHasNothingToReport, mergeGroupFileBodyText, tryBuildGroupFileWorkPlan } from "../../domain/arrange-grouping.service.mjs";
2
- import { ensureCnImport } from "../../domain/imports.domain.mjs";
3
- //#region src/lib/arrange/application/use-cases/group-file.use-case.ts
4
- function groupFile(filePath, options, fs, domainSourceParser, groupFilePreview) {
5
- const sourceText = fs.readFileSync(filePath, "utf8");
6
- const domainSfInitial = domainSourceParser.parseDomainSourceFile(filePath, sourceText);
7
- const unwrap = buildGroupFileUnwrapState(domainSfInitial, sourceText);
8
- const work = tryBuildGroupFileWorkPlan({
9
- filePath,
10
- sourceText,
11
- domainSfInitial,
12
- domainSfGrouped: domainSourceParser.parseDomainSourceFile(filePath, unwrap.textAfterUnwrap),
13
- withClassName: options.withClassName,
14
- unwrap
15
- });
16
- if (work === null) return groupFileDryRunNoEdits(filePath);
17
- if (!options.write) {
18
- if (groupFileWorkHasNothingToReport(work)) return groupFileDryRunNoEdits(filePath);
19
- groupFilePreview.printGroupFilePreviewFromWork(work);
20
- return groupFilePreviewTotals(work);
21
- }
22
- const persistedEditCount = countPersistedGroupFileEdits(work);
23
- let newText = mergeGroupFileBodyText(work);
24
- if (persistedEditCount > 0) {
25
- if (groupFileEditsTouchJsxCn(work)) newText = ensureCnImport(domainSourceParser.parseDomainSourceFile(filePath, newText), options.cnImport);
26
- fs.writeFileSync(filePath, newText, "utf8");
27
- }
28
- return {
29
- filePath,
30
- totalFound: persistedEditCount + work.cnInTvNoReplacement,
31
- changed: persistedEditCount
32
- };
33
- }
34
- //#endregion
35
- export { groupFile };
@@ -1,19 +0,0 @@
1
- import { ArrangeCommand as _ArrangeCommand } from "../../commands/arrange.mjs";
2
- import { ArrangeModule } from "./arrange.module.mjs";
3
- import { ArrangePresentationModule } from "./arrange.presentation.module.mjs";
4
- import { COMMAND_TOKEN } from "../kernel/di/command.token.mjs";
5
- import { Module } from "@codefast/di";
6
- //#region src/lib/arrange/arrange.feature.module.ts
7
- const ArrangeFeatureModule = Module.create("cli-arrange-feature", (moduleBuilder) => {
8
- moduleBuilder.import(ArrangePresentationModule, ArrangeModule);
9
- moduleBuilder.bind(_ArrangeCommand).to(_ArrangeCommand).singleton();
10
- });
11
- function registerArrangeFeature(runtimeContainer) {
12
- runtimeContainer.load(ArrangeFeatureModule);
13
- runtimeContainer.bind(COMMAND_TOKEN).to(_ArrangeCommand).singleton().whenNamed("arrange");
14
- }
15
- function resolveArrangeCommand(runtimeContainer) {
16
- return runtimeContainer.resolve(_ArrangeCommand);
17
- }
18
- //#endregion
19
- export { ArrangeFeatureModule, registerArrangeFeature, resolveArrangeCommand };
@@ -1,13 +0,0 @@
1
- import { PrepareArrangeOrchestratorToken, PresentAnalyzeReportPresenterToken } from "./contracts/tokens.mjs";
2
- import { PrepareArrangeOrchestrator as _PrepareArrangeOrchestrator } from "./presentation/prepare-arrange.orchestrator.mjs";
3
- import { PresentAnalyzeReportPresenterImpl as _PresentAnalyzeReportPresenterImpl } from "./presentation/present-analyze-report.presenter.mjs";
4
- import { PresentationModule } from "../core/presentation/presentation.module.mjs";
5
- import { Module } from "@codefast/di";
6
- //#region src/lib/arrange/arrange.presentation.module.ts
7
- const ArrangePresentationModule = Module.create("cli-arrange-presentation", (moduleBuilder) => {
8
- moduleBuilder.import(PresentationModule);
9
- moduleBuilder.bind(PrepareArrangeOrchestratorToken).to(_PrepareArrangeOrchestrator).singleton();
10
- moduleBuilder.bind(PresentAnalyzeReportPresenterToken).to(_PresentAnalyzeReportPresenterImpl).singleton();
11
- });
12
- //#endregion
13
- export { ArrangePresentationModule };
@@ -1,18 +0,0 @@
1
- //#region src/lib/arrange/domain/errors.domain.ts
2
- /**
3
- * Structured errors for the arrange CLI library (throw from lib; handle exit in commands).
4
- */ const ArrangeErrorCode = {
5
- TARGET_NOT_FOUND: "TARGET_NOT_FOUND",
6
- INVALID_INPUT: "INVALID_INPUT",
7
- INTERNAL: "INTERNAL"
8
- };
9
- var ArrangeError = class extends Error {
10
- code;
11
- constructor(code, message, options) {
12
- super(message, options);
13
- this.name = "ArrangeError";
14
- this.code = code;
15
- }
16
- };
17
- //#endregion
18
- export { ArrangeError, ArrangeErrorCode };
@@ -1,10 +0,0 @@
1
- import { ensureCnImport as ensureCnImport$1 } from "../domain/imports.domain.mjs";
2
- import { parseDomainSourceFile } from "./ts-ast-translator.adapter.mjs";
3
- //#region src/lib/arrange/infra/ensure-cn-import.adapter.ts
4
- /**
5
- * Parses source then applies domain cn import injection rules (public CLI-style entry).
6
- */ function ensureCnImport(sourceText, filePath, cnImportOverride) {
7
- return ensureCnImport$1(parseDomainSourceFile(filePath, sourceText), cnImportOverride);
8
- }
9
- //#endregion
10
- export { ensureCnImport };
@@ -1,18 +0,0 @@
1
- import { isDomainCallExpression, isDomainExpressionStatement, isDomainIdentifier } from "../domain/ast/ast-node.model.mjs";
2
- import { collectUnconditionalTailwindLiteralsFromCnArguments } from "../domain/ast/collectors-cn.collector.mjs";
3
- import { parseDomainSourceFile } from "./ts-ast-translator.adapter.mjs";
4
- //#region src/lib/arrange/infra/merge-cn-literal-pool-for-test.test-helper.ts
5
- /**
6
- * Test / REPL helper: parse `callee(<snippet>)` and return merged unconditional literal text.
7
- * Lives in infra because parsing uses the TypeScript-backed translator.
8
- */ function mergeCnUnconditionalLiteralPoolForTest(argsSnippet, options) {
9
- const callee = options?.callee ?? "cn";
10
- const stmt = parseDomainSourceFile("mergeCnUnconditionalLiteralPoolForTest.ts", `${callee}(${argsSnippet});`).statements[0];
11
- if (stmt === void 0) throw new Error("expected one statement");
12
- if (!isDomainExpressionStatement(stmt)) throw new Error("expected expression statement");
13
- const call = stmt.expression;
14
- if (!isDomainCallExpression(call) || !isDomainIdentifier(call.expression) || call.expression.text !== callee) throw new Error(`expected ${callee}(...) call`);
15
- return collectUnconditionalTailwindLiteralsFromCnArguments(call.arguments).map((literal) => literal.text).join(" ");
16
- }
17
- //#endregion
18
- export { mergeCnUnconditionalLiteralPoolForTest };
@@ -1,29 +0,0 @@
1
- import { z } from "zod";
2
- //#region src/lib/arrange/presentation/arrange-cli-schema.presenter.ts
3
- const arrangeAnalyzeDirectoryRequestSchema = z.object({
4
- analyzeRootPath: z.string().min(1, "analyzeRootPath is required"),
5
- json: z.boolean().optional()
6
- });
7
- const arrangeSyncRunRequestSchema = z.object({
8
- rootDir: z.string().min(1),
9
- targetPath: z.string().min(1),
10
- write: z.boolean(),
11
- json: z.boolean().optional(),
12
- withClassName: z.boolean().optional(),
13
- cnImport: z.string().optional(),
14
- config: z.unknown().optional()
15
- });
16
- const arrangeRunTargetRequestSchema = z.object({
17
- targetPath: z.string().min(1),
18
- write: z.boolean(),
19
- withClassName: z.boolean().optional(),
20
- cnImport: z.string().optional()
21
- });
22
- const arrangeSuggestGroupsRequestSchema = z.object({
23
- inlineClasses: z.string().min(1, "Pass a class string. Example: codefast arrange group \"flex gap-2 text-sm rounded-md\""),
24
- emitTvStyleArray: z.boolean(),
25
- trailingClassName: z.boolean(),
26
- json: z.boolean().optional()
27
- });
28
- //#endregion
29
- export { arrangeAnalyzeDirectoryRequestSchema, arrangeRunTargetRequestSchema, arrangeSuggestGroupsRequestSchema, arrangeSyncRunRequestSchema };
@@ -1,2 +0,0 @@
1
- import { escapeTsStringLiteralContent, formatArray, formatCnArguments, formatCnCall, formatJsxCnAttributeValue } from "../domain/source-text-formatters.formatter.mjs";
2
- export { escapeTsStringLiteralContent, formatArray, formatCnArguments, formatCnCall, formatJsxCnAttributeValue };
@@ -1,7 +0,0 @@
1
- import { printAnalyzeReport } from "./report.presenter.mjs";
2
- //#region src/lib/arrange/presentation/present-analyze-cli.presenter.ts
3
- function presentAnalyzeCliReport(logger, resolvedTargetPath, report) {
4
- printAnalyzeReport(resolvedTargetPath, report, logger);
5
- }
6
- //#endregion
7
- export { presentAnalyzeCliReport };