fcis 0.2.0 → 0.2.1
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/README.md +205 -158
- package/dist/cli.js +4 -1
- package/dist/cli.js.map +1 -1
- package/docs/images/fc-is-submarine.webp +0 -0
- package/package.json +2 -1
- package/src/cli.ts +6 -1
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fcis",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Functional Core, Imperative Shell analyzer for TypeScript codebases",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"chalk": "^5.3.0",
|
|
24
24
|
"cleye": "^1.3.2",
|
|
25
|
+
"fcis": "0.2.1",
|
|
25
26
|
"jsonc-parser": "^3.3.1",
|
|
26
27
|
"ts-morph": "^24.0.0",
|
|
27
28
|
"ts-pattern": "^5.6.0",
|
package/src/cli.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* - 3: Analysis error (zero files could be analyzed)
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
import { createRequire } from 'node:module'
|
|
15
16
|
import { cli } from 'cleye'
|
|
16
17
|
import chalk from 'chalk'
|
|
17
18
|
import * as fs from 'node:fs'
|
|
@@ -39,6 +40,10 @@ const EXIT_THRESHOLD_FAILED = 1
|
|
|
39
40
|
const EXIT_CONFIG_ERROR = 2
|
|
40
41
|
const EXIT_ANALYSIS_ERROR = 3
|
|
41
42
|
|
|
43
|
+
// Read version from package.json to maintain single source of truth
|
|
44
|
+
const require = createRequire(import.meta.url)
|
|
45
|
+
const pkg = require('../package.json') as { version: string }
|
|
46
|
+
|
|
42
47
|
/**
|
|
43
48
|
* Handle analysis output based on flags (shell function - performs I/O)
|
|
44
49
|
*/
|
|
@@ -100,7 +105,7 @@ function ensureOutputDirectory(outputPath: string): ValidationResult {
|
|
|
100
105
|
|
|
101
106
|
const argv = cli({
|
|
102
107
|
name: 'fcis',
|
|
103
|
-
version:
|
|
108
|
+
version: pkg.version,
|
|
104
109
|
flags: {
|
|
105
110
|
json: {
|
|
106
111
|
type: Boolean,
|