fundgraph 0.0.0-stage → 0.1.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/LICENSE +22 -0
- package/README.md +87 -2
- package/dist/main.d.ts +5 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +202 -0
- package/dist/main.js.map +1 -0
- package/dist/options.d.ts +23 -0
- package/dist/options.d.ts.map +1 -0
- package/dist/options.js +66 -0
- package/dist/options.js.map +1 -0
- package/package.json +26 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FundGraph contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
CHANGED
|
@@ -1,3 +1,88 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center"><img src="assets/fundgraph-cli.svg" alt="FundGraph CLI: local dependency analysis from your terminal" width="100%"></p>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-56d6be?style=flat-square" alt="MIT license"></a>
|
|
5
|
+
<img src="https://img.shields.io/badge/Node.js-20%20%7C%2022-83a8ff?style=flat-square" alt="Node.js 20 and 22">
|
|
6
|
+
<img src="https://img.shields.io/badge/command-fundgraph-b6a9ff?style=flat-square" alt="fundgraph command">
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
# fundgraph-cli
|
|
10
|
+
|
|
11
|
+
The command-line interface for local dependency discovery and deterministic text or JSON reports. It uses
|
|
12
|
+
`@fundgraph/core` for models and analysis; it does not duplicate domain logic.
|
|
13
|
+
|
|
14
|
+
## Current scope
|
|
15
|
+
|
|
16
|
+
`fundgraph analyze` reads a supported project directory, a JSON model file, or JSON from stdin. Directory discovery
|
|
17
|
+
supports npm, PyPI, Cargo, and baseline Go `go.mod` requirements. The default directory mode is local-only. Add
|
|
18
|
+
`--network` to explicitly fetch public npm, PyPI, or crates.io metadata and produce the complete evidence-backed
|
|
19
|
+
funding report. Go remains discovery-only because Go metadata and funding providers are not implemented.
|
|
20
|
+
|
|
21
|
+
The CLI now orchestrates those stages for arbitrary npm, PyPI, and Cargo projects when `--network` is explicitly
|
|
22
|
+
supplied. Default directory analysis remains local-only; Go is discovery-only.
|
|
23
|
+
|
|
24
|
+
## Commands
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
fundgraph --help
|
|
28
|
+
fundgraph version
|
|
29
|
+
fundgraph analyze [PATH] [--format text|json] [--offline|--network] [--strict]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`PATH` defaults to the current directory. Use `-` or omit the path to read JSON from stdin. `--offline` makes the local
|
|
33
|
+
only behavior explicit. `--strict` treats invalid model input as an error.
|
|
34
|
+
|
|
35
|
+
| Exit code | Meaning |
|
|
36
|
+
|---:|---|
|
|
37
|
+
| `0` | Analysis completed without diagnostics |
|
|
38
|
+
| `1` | Partial analysis or model diagnostics |
|
|
39
|
+
| `2` | Usage or invalid input |
|
|
40
|
+
| `3` | Unexpected internal failure |
|
|
41
|
+
|
|
42
|
+
JSON output keeps the compatibility summary fields and includes the versioned core report under `report`. Text output
|
|
43
|
+
prints the summary and deterministic report. `--network` is opt-in and uses the core network policy.
|
|
44
|
+
|
|
45
|
+
## Try it from the workspace
|
|
46
|
+
|
|
47
|
+
The CLI package is not published yet. Run these commands from the `fundgraph-cli` repository directory:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
cd ../fundgraph-core
|
|
51
|
+
npm ci
|
|
52
|
+
npm run build
|
|
53
|
+
|
|
54
|
+
cd ../fundgraph-cli
|
|
55
|
+
npm install --ignore-scripts --no-save ../fundgraph-core
|
|
56
|
+
npm run build
|
|
57
|
+
node dist/main.js --help
|
|
58
|
+
node dist/main.js analyze ../fundgraph-core/test/fixtures/npm-workspace --format text --offline
|
|
59
|
+
node dist/main.js analyze ../fundgraph-core/test/fixtures/npm-workspace --format json --offline
|
|
60
|
+
node dist/main.js analyze ./my-project --format json --network
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
After compatible npm packages are published, install and run it with:
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
npm install -g fundgraph
|
|
67
|
+
fundgraph analyze ./my-project --format text --offline
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Ownership and safety
|
|
71
|
+
|
|
72
|
+
- This repository owns argument parsing, terminal output, CLI errors, and process exit codes.
|
|
73
|
+
- `fundgraph-core` owns dependency models, parsing, evidence, relationship logic, and opt-in project orchestration.
|
|
74
|
+
- Input files are bounded and treated as data; the CLI does not execute project code.
|
|
75
|
+
- The command does not identify maintainers, endorse funding destinations, manage wallets, or execute payments.
|
|
76
|
+
|
|
77
|
+
## Development
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
npm run lint
|
|
81
|
+
npm run typecheck
|
|
82
|
+
npm test
|
|
83
|
+
npm run build
|
|
84
|
+
npm pack --dry-run
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
CI defines Ubuntu, Windows, and macOS jobs on Node 20 and 22. See [`CONTRIBUTING.md`](CONTRIBUTING.md) and the
|
|
88
|
+
project-level `fundgraph` repository for the cross-repository roadmap and policies.
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,eAAe,UAAY,CAAC;AAoLzC,wBAAsB,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAoBlE"}
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync, statSync } from 'node:fs';
|
|
3
|
+
import { stderr, stdout } from 'node:process';
|
|
4
|
+
import { analyzeProject, createReport, discoverDependencies, renderReportText, validateModel } from '@fundgraph/core';
|
|
5
|
+
import { FundGraphCliError, parseArguments } from './options.js';
|
|
6
|
+
export const CLI_VERSION = '0.1.1';
|
|
7
|
+
export const MAX_INPUT_BYTES = 1_048_576;
|
|
8
|
+
const HELP = `FundGraph ${CLI_VERSION}
|
|
9
|
+
|
|
10
|
+
Analyze a JSON model document and explain its validated model inventory.
|
|
11
|
+
|
|
12
|
+
Usage:
|
|
13
|
+
fundgraph analyze [PATH] [--format text|json] [--offline|--network] [--strict]
|
|
14
|
+
fundgraph version
|
|
15
|
+
fundgraph --help
|
|
16
|
+
|
|
17
|
+
Input:
|
|
18
|
+
PATH may be a project directory (npm, PyPI, or Cargo), a JSON file
|
|
19
|
+
containing versioned FundGraph models, or -/omitted for stdin.
|
|
20
|
+
|
|
21
|
+
Options:
|
|
22
|
+
--format text|json Select output format (default: text)
|
|
23
|
+
--offline Use only local input and do not enable network access
|
|
24
|
+
--network Fetch public registry metadata and parse declared funding evidence
|
|
25
|
+
--strict Treat invalid models as an invalid-input failure
|
|
26
|
+
-h, --help Show this help
|
|
27
|
+
-v, --version Show the CLI version
|
|
28
|
+
`;
|
|
29
|
+
function readInput(inputPath) {
|
|
30
|
+
if (inputPath === '-')
|
|
31
|
+
return readFromStdin();
|
|
32
|
+
let stats;
|
|
33
|
+
try {
|
|
34
|
+
stats = statSync(inputPath);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
throw new FundGraphCliError('INVALID_INPUT', `Input path does not exist: ${inputPath}`);
|
|
38
|
+
}
|
|
39
|
+
if (!stats.isFile()) {
|
|
40
|
+
throw new FundGraphCliError('INVALID_INPUT', 'Input must be a JSON model file or a supported project directory.');
|
|
41
|
+
}
|
|
42
|
+
if (stats.size > MAX_INPUT_BYTES) {
|
|
43
|
+
throw new FundGraphCliError('INPUT_TOO_LARGE', `Input exceeds ${MAX_INPUT_BYTES} bytes`);
|
|
44
|
+
}
|
|
45
|
+
return readFileSync(inputPath, 'utf8');
|
|
46
|
+
}
|
|
47
|
+
function readFromStdin() {
|
|
48
|
+
const input = readFileSync(0);
|
|
49
|
+
if (input.byteLength > MAX_INPUT_BYTES)
|
|
50
|
+
throw new FundGraphCliError('INPUT_TOO_LARGE', `Input exceeds ${MAX_INPUT_BYTES} bytes`);
|
|
51
|
+
return input.toString('utf8');
|
|
52
|
+
}
|
|
53
|
+
function extractModels(parsed) {
|
|
54
|
+
if (Array.isArray(parsed))
|
|
55
|
+
return parsed;
|
|
56
|
+
if (typeof parsed === 'object' && parsed !== null && Array.isArray(parsed.models)) {
|
|
57
|
+
return parsed.models;
|
|
58
|
+
}
|
|
59
|
+
throw new FundGraphCliError('INVALID_INPUT', 'JSON input must be an array of models or an object containing a models array');
|
|
60
|
+
}
|
|
61
|
+
function reportForModels(models, diagnostics) {
|
|
62
|
+
const grouped = {
|
|
63
|
+
Project: [],
|
|
64
|
+
Dependency: [],
|
|
65
|
+
Package: [],
|
|
66
|
+
Registry: [],
|
|
67
|
+
Repository: [],
|
|
68
|
+
FundingSource: [],
|
|
69
|
+
Evidence: [],
|
|
70
|
+
Confidence: [],
|
|
71
|
+
Relationship: []
|
|
72
|
+
};
|
|
73
|
+
for (const model of models)
|
|
74
|
+
grouped[model.kind].push(model);
|
|
75
|
+
const project = grouped.Project[0];
|
|
76
|
+
return createReport({
|
|
77
|
+
...(project ? { project } : {}),
|
|
78
|
+
dependencies: grouped.Dependency,
|
|
79
|
+
packages: grouped.Package,
|
|
80
|
+
registries: grouped.Registry,
|
|
81
|
+
repositories: grouped.Repository,
|
|
82
|
+
fundingSources: grouped.FundingSource,
|
|
83
|
+
evidence: grouped.Evidence,
|
|
84
|
+
relationships: grouped.Relationship,
|
|
85
|
+
diagnostics,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
async function analyze(options) {
|
|
89
|
+
if (options.inputPath !== '-') {
|
|
90
|
+
try {
|
|
91
|
+
if (statSync(options.inputPath).isDirectory()) {
|
|
92
|
+
if (options.network) {
|
|
93
|
+
const analyzed = await analyzeProject(options.inputPath);
|
|
94
|
+
const diagnostics = analyzed.report.diagnostics;
|
|
95
|
+
return {
|
|
96
|
+
schemaVersion: '1.0', input: options.inputPath, offline: false, strict: options.strict,
|
|
97
|
+
network: true,
|
|
98
|
+
modelCount: analyzed.report.summary.dependencyCount, edgeCount: analyzed.discovery.graph.edges.length,
|
|
99
|
+
ecosystems: analyzed.discovery.ecosystems, counts: { Dependency: analyzed.report.summary.dependencyCount, Package: analyzed.report.summary.packageCount, FundingSource: analyzed.report.summary.fundingSourceCount, Relationship: analyzed.report.summary.relationshipCount },
|
|
100
|
+
diagnostics, report: analyzed.report,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
const discovered = discoverDependencies(options.inputPath);
|
|
104
|
+
const diagnostics = discovered.diagnostics.map((item) => ({ code: item.code, message: item.message, ...(item.sourcePath === undefined ? {} : { sourcePath: item.sourcePath }) }));
|
|
105
|
+
if (options.strict && diagnostics.length > 0)
|
|
106
|
+
throw new FundGraphCliError('INVALID_INPUT', `${diagnostics.length} discovery diagnostic(s) reported`);
|
|
107
|
+
const report = createReport({ project: discovered.project, dependencies: discovered.graph.nodes, diagnostics });
|
|
108
|
+
return {
|
|
109
|
+
schemaVersion: '1.0',
|
|
110
|
+
input: options.inputPath,
|
|
111
|
+
offline: options.offline,
|
|
112
|
+
strict: options.strict,
|
|
113
|
+
network: false,
|
|
114
|
+
modelCount: discovered.graph.nodes.length,
|
|
115
|
+
edgeCount: discovered.graph.edges.length,
|
|
116
|
+
ecosystems: discovered.ecosystems,
|
|
117
|
+
counts: { Dependency: discovered.graph.nodes.length },
|
|
118
|
+
diagnostics,
|
|
119
|
+
report,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
if (error instanceof FundGraphCliError)
|
|
125
|
+
throw error;
|
|
126
|
+
throw new FundGraphCliError('INVALID_INPUT', error instanceof Error ? error.message : 'Unable to inspect input path');
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const source = readInput(options.inputPath);
|
|
130
|
+
let parsed;
|
|
131
|
+
try {
|
|
132
|
+
parsed = JSON.parse(source);
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
throw new FundGraphCliError('INVALID_INPUT', 'Input is not valid JSON');
|
|
136
|
+
}
|
|
137
|
+
const models = extractModels(parsed);
|
|
138
|
+
const diagnostics = [];
|
|
139
|
+
const validModels = [];
|
|
140
|
+
models.forEach((model, index) => {
|
|
141
|
+
try {
|
|
142
|
+
validateModel(model);
|
|
143
|
+
validModels.push(model);
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
const code = error instanceof Error && 'code' in error ? String(error.code) : 'INVALID_MODEL';
|
|
147
|
+
const message = error instanceof Error ? error.message : 'Model validation failed';
|
|
148
|
+
diagnostics.push({ code, message, index });
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
if (options.strict && diagnostics.length > 0) {
|
|
152
|
+
throw new FundGraphCliError('INVALID_INPUT', `${diagnostics.length} model(s) failed validation`);
|
|
153
|
+
}
|
|
154
|
+
const counts = {};
|
|
155
|
+
for (const model of validModels)
|
|
156
|
+
counts[model.kind] = (counts[model.kind] ?? 0) + 1;
|
|
157
|
+
const report = reportForModels(validModels, diagnostics);
|
|
158
|
+
return { schemaVersion: '1.0', input: options.inputPath, offline: options.offline, strict: options.strict, network: false, modelCount: validModels.length, edgeCount: 0, ecosystems: [], counts, diagnostics, report };
|
|
159
|
+
}
|
|
160
|
+
function renderText(result) {
|
|
161
|
+
const lines = [
|
|
162
|
+
'FundGraph analysis',
|
|
163
|
+
`Input: ${result.input}`,
|
|
164
|
+
`Models: ${result.modelCount}`,
|
|
165
|
+
`Edges: ${result.edgeCount}`,
|
|
166
|
+
...(result.ecosystems.length > 0 ? [`Ecosystems: ${result.ecosystems.join(', ')}`] : []),
|
|
167
|
+
`Network: ${result.network ? 'enabled (public metadata only)' : 'disabled'}`,
|
|
168
|
+
];
|
|
169
|
+
for (const [kind, count] of Object.entries(result.counts).sort(([a], [b]) => a.localeCompare(b)))
|
|
170
|
+
lines.push(` ${kind}: ${count}`);
|
|
171
|
+
if (result.diagnostics.length > 0) {
|
|
172
|
+
lines.push(`Diagnostics: ${result.diagnostics.length}`);
|
|
173
|
+
for (const diagnostic of result.diagnostics)
|
|
174
|
+
lines.push(` [${diagnostic.code}] model ${diagnostic.index}: ${diagnostic.message}`);
|
|
175
|
+
}
|
|
176
|
+
return `${lines.join('\n')}\n\n${renderReportText(result.report)}`;
|
|
177
|
+
}
|
|
178
|
+
export async function run(argv) {
|
|
179
|
+
try {
|
|
180
|
+
const parsed = parseArguments(argv);
|
|
181
|
+
if (parsed.command === 'help') {
|
|
182
|
+
stdout.write(HELP);
|
|
183
|
+
return 0;
|
|
184
|
+
}
|
|
185
|
+
if (parsed.command === 'version') {
|
|
186
|
+
stdout.write(`${CLI_VERSION}\n`);
|
|
187
|
+
return 0;
|
|
188
|
+
}
|
|
189
|
+
const result = await analyze(parsed.options);
|
|
190
|
+
stdout.write(parsed.options.format === 'json' ? `${JSON.stringify(result, null, 2)}\n` : renderText(result));
|
|
191
|
+
return result.diagnostics.length > 0 ? 1 : 0;
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
const code = error instanceof FundGraphCliError ? error.code : 'INTERNAL_ERROR';
|
|
195
|
+
const message = error instanceof Error ? error.message : 'Unexpected error';
|
|
196
|
+
stderr.write(`fundgraph: [${code}] ${message}\n`);
|
|
197
|
+
return code === 'USAGE' || code === 'INVALID_INPUT' || code === 'INPUT_TOO_LARGE' ? 2 : 3;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if (process.argv[1])
|
|
201
|
+
run(process.argv.slice(2)).then((code) => { process.exitCode = code; });
|
|
202
|
+
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,aAAa,EAA4C,MAAM,iBAAiB,CAAC;AAChK,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAmB,MAAM,cAAc,CAAC;AAElF,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AACnC,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,CAAC;AAEzC,MAAM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K,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC;QAChF,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC;QAC5E,MAAM,CAAC,KAAK,CAAC,eAAe,IAAI,KAAK,OAAO,IAAI,CAAC,CAAC;QAClD,OAAO,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,eAAe,IAAI,IAAI,KAAK,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5F,CAAC;AACH,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAAE,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type OutputFormat = 'text' | 'json';
|
|
2
|
+
export interface CliOptions {
|
|
3
|
+
inputPath: string;
|
|
4
|
+
format: OutputFormat;
|
|
5
|
+
offline: boolean;
|
|
6
|
+
network: boolean;
|
|
7
|
+
strict: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type ParsedCommand = {
|
|
10
|
+
command: 'help';
|
|
11
|
+
} | {
|
|
12
|
+
command: 'version';
|
|
13
|
+
} | {
|
|
14
|
+
command: 'analyze';
|
|
15
|
+
options: CliOptions;
|
|
16
|
+
};
|
|
17
|
+
export type CliErrorCode = 'USAGE' | 'INVALID_INPUT' | 'INPUT_TOO_LARGE' | 'INTERNAL_ERROR';
|
|
18
|
+
export declare class FundGraphCliError extends Error {
|
|
19
|
+
readonly code: CliErrorCode;
|
|
20
|
+
constructor(code: CliErrorCode, message: string);
|
|
21
|
+
}
|
|
22
|
+
export declare function parseArguments(argv: readonly string[]): ParsedCommand;
|
|
23
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,MAAM,aAAa,GACrB;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GACnB;IAAE,OAAO,EAAE,SAAS,CAAA;CAAE,GACtB;IAAE,OAAO,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,UAAU,CAAA;CAAE,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;AAE5F,qBAAa,iBAAkB,SAAQ,KAAK;IAC9B,QAAQ,CAAC,IAAI,EAAE,YAAY;IAAvC,YAAqB,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAGvD;CACF;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,aAAa,CAgDrE"}
|
package/dist/options.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export class FundGraphCliError extends Error {
|
|
2
|
+
code;
|
|
3
|
+
constructor(code, message) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.code = code;
|
|
6
|
+
this.name = 'FundGraphCliError';
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export function parseArguments(argv) {
|
|
10
|
+
if (argv.length === 0 || argv[0] === '--help' || argv[0] === '-h')
|
|
11
|
+
return { command: 'help' };
|
|
12
|
+
if (argv[0] === 'version' || argv[0] === '--version' || argv[0] === '-v') {
|
|
13
|
+
if (argv.length > 1)
|
|
14
|
+
throw new FundGraphCliError('USAGE', 'version does not accept additional arguments');
|
|
15
|
+
return { command: 'version' };
|
|
16
|
+
}
|
|
17
|
+
if (argv[0] !== 'analyze')
|
|
18
|
+
throw new FundGraphCliError('USAGE', `Unknown command: ${argv[0]}`);
|
|
19
|
+
let inputPath = '-';
|
|
20
|
+
let format = 'text';
|
|
21
|
+
let offline = false;
|
|
22
|
+
let network = false;
|
|
23
|
+
let strict = false;
|
|
24
|
+
let pathSeen = false;
|
|
25
|
+
for (let index = 1; index < argv.length; index += 1) {
|
|
26
|
+
const argument = argv[index];
|
|
27
|
+
if (argument === '--help' || argument === '-h')
|
|
28
|
+
return { command: 'help' };
|
|
29
|
+
if (argument === '--offline') {
|
|
30
|
+
offline = true;
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (argument === '--network') {
|
|
34
|
+
network = true;
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
if (argument === '--strict') {
|
|
38
|
+
strict = true;
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
if (argument === '--format') {
|
|
42
|
+
const value = argv[++index];
|
|
43
|
+
if (value !== 'text' && value !== 'json')
|
|
44
|
+
throw new FundGraphCliError('USAGE', '--format requires text or json');
|
|
45
|
+
format = value;
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
if (argument?.startsWith('--format=')) {
|
|
49
|
+
const value = argument.slice('--format='.length);
|
|
50
|
+
if (value !== 'text' && value !== 'json')
|
|
51
|
+
throw new FundGraphCliError('USAGE', '--format requires text or json');
|
|
52
|
+
format = value;
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if (argument?.startsWith('-'))
|
|
56
|
+
throw new FundGraphCliError('USAGE', `Unknown option: ${argument}`);
|
|
57
|
+
if (pathSeen)
|
|
58
|
+
throw new FundGraphCliError('USAGE', 'analyze accepts only one input path');
|
|
59
|
+
inputPath = argument ?? '-';
|
|
60
|
+
pathSeen = true;
|
|
61
|
+
}
|
|
62
|
+
if (offline && network)
|
|
63
|
+
throw new FundGraphCliError('USAGE', '--offline and --network cannot be combined');
|
|
64
|
+
return { command: 'analyze', options: { inputPath, format, offline, network, strict } };
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAiBA,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACrB,IAAI;IAAzB,YAAqB,IAAkB,EAAE,OAAe;QACtD,KAAK,CAAC,OAAO,CAAC,CAAC;oBADI,IAAI;QAEvB,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED,MAAM,UAAU,cAAc,CAAC,IAAuB;IACpD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI;QAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAC9F,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QACzE,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;YAAE,MAAM,IAAI,iBAAiB,CAAC,OAAO,EAAE,8CAA8C,CAAC,CAAC;QAC1G,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAChC,CAAC;IACD,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS;QAAE,MAAM,IAAI,iBAAiB,CAAC,OAAO,EAAE,oBAAoB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAE/F,IAAI,SAAS,GAAG,GAAG,CAAC;IACpB,IAAI,MAAM,GAAiB,MAAM,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C,CAAC,CAAC;YACjH,MAAM,GAAG,KAAK,CAAC;YACf,SAAS;QACX,CAAC;QACD,IAAI,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC;YAAE,MAAM,IAAI,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,QAAQ,EAAE,CAAC,CAAC;QACnG,IAAI,QAAQ;YAAE,MAAM,IAAI,iBAAiB,CAAC,OAAO,EAAE,qCAAqC,CAAC,CAAC;QAC1F,SAAS,GAAG,QAAQ,IAAI,GAAG,CAAC;QAC5B,QAAQ,GAAG,IAAI,CAAC;IAClB,CAAC;IACD,IAAI,OAAO,IAAI,OAAO;QAAE,MAAM,IAAI,iBAAiB,CAAC,OAAO,EAAE,4CAA4C,CAAC,CAAC;IAC3G,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC;AAC1F,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "fundgraph",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "fundgraph",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "CLI for evidence-first dependency funding analysis",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"private": false,
|
|
8
|
+
"bin": "./dist/main.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@fundgraph/core": "0.1.0"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc -p tsconfig.json",
|
|
17
|
+
"lint": "node scripts/lint.mjs",
|
|
18
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
19
|
+
"test": "npm run build && node --test test/cli.test.js"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/node": "^26.6.4",
|
|
23
|
+
"typescript": "^7.0.2"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|