@nuucognition/flint-cli 0.5.0-alpha.0 → 0.5.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 +9 -2
- package/dist/{chunk-O7OVKLLV.js → chunk-C66KJDI7.js} +1 -1
- package/dist/{chunk-XCVQLFHY.js → chunk-CBGQBE6C.js} +0 -1
- package/dist/{chunk-PONDZIXS.js → chunk-M3NSYVYR.js} +1 -1
- package/dist/{chunk-ZP5A4PAH.js → chunk-VAJMJ47E.js} +16 -10
- package/dist/{chunk-HZD727IL.js → chunk-XWUP7WHQ.js} +425 -60
- package/dist/{dist-UIVVEOGP.js → dist-RGQKIZQW.js} +7 -5
- package/dist/{exports-E3262H6I-A4GXPTSR.js → exports-FO5IMLM7-EN6H3N2A.js} +2 -2
- package/dist/index.js +2951 -460
- package/dist/{mesh-config-BAIYF4KD-QNNQOBSL.js → mesh-config-BAIYF4KD-W2RGZQ2V.js} +1 -1
- package/dist/{metadata-SJT4H53O-EXBS6PS4.js → metadata-SJT4H53O-7W2752ZT.js} +2 -2
- package/dist/{registry-YN5W7EY7-2W767O74.js → registry-YN5W7EY7-SZNXPBV5.js} +1 -1
- package/package.json +15 -8
package/README.md
CHANGED
|
@@ -8,8 +8,15 @@ Flint extends Mesh with shards, git integration, and structured modules for AI-a
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
npm install -g @nuucognition/flint-cli
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Flint CLI is also installed automatically as a dependency of `@nuucognition/steel-cli` and `@nuucognition/tinderbox-cli`.
|
|
15
|
+
|
|
16
|
+
### Local Development
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# From the flint monorepo root:
|
|
13
20
|
pnpm install
|
|
14
21
|
pnpm --filter @nuucognition/flint-cli dev
|
|
15
22
|
```
|
|
@@ -182,7 +182,7 @@ async function cleanRegistryFile() {
|
|
|
182
182
|
return result;
|
|
183
183
|
}
|
|
184
184
|
async function registerFlintByPath(path, options) {
|
|
185
|
-
const { readFlintToml, hasFlintToml } = await import("./mesh-config-BAIYF4KD-
|
|
185
|
+
const { readFlintToml, hasFlintToml } = await import("./mesh-config-BAIYF4KD-W2RGZQ2V.js");
|
|
186
186
|
const isFlint = await hasFlintToml(path);
|
|
187
187
|
if (!isFlint) {
|
|
188
188
|
throw new Error(`Not a valid flint: ${path}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getMeshExportSources,
|
|
3
3
|
getSourceRepositories,
|
|
4
4
|
nameFormats
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CBGQBE6C.js";
|
|
6
6
|
|
|
7
7
|
// ../../packages/flint/dist/chunk-S7VC3H7U.js
|
|
8
8
|
import { readFile, writeFile, mkdir, stat, readdir, unlink } from "fs/promises";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readFlintToml
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CBGQBE6C.js";
|
|
4
4
|
|
|
5
|
-
// ../../packages/flint/dist/chunk-
|
|
5
|
+
// ../../packages/flint/dist/chunk-WMDJDFRK.js
|
|
6
6
|
import { readdir, readFile, mkdir, writeFile, rm, stat, copyFile } from "fs/promises";
|
|
7
7
|
import { join, basename, dirname, resolve, relative, sep, extname } from "path";
|
|
8
8
|
async function exists(path) {
|
|
@@ -186,12 +186,18 @@ async function resolveDocument(docRef, flintPath) {
|
|
|
186
186
|
const docName = basename(trimmedRef);
|
|
187
187
|
const fileName = docName.endsWith(".md") ? docName : `${docName}.md`;
|
|
188
188
|
const meshDir = join(flintPath, "Mesh");
|
|
189
|
-
const
|
|
190
|
-
if (
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
189
|
+
const meshMatches = await findFilesRecursively(meshDir, fileName);
|
|
190
|
+
if (meshMatches.length > 0) {
|
|
191
|
+
meshMatches.sort();
|
|
192
|
+
return meshMatches[0] ?? null;
|
|
193
|
+
}
|
|
194
|
+
const shardsDir = join(flintPath, "Shards");
|
|
195
|
+
const shardMatches = await findFilesRecursively(shardsDir, fileName);
|
|
196
|
+
if (shardMatches.length > 0) {
|
|
197
|
+
shardMatches.sort();
|
|
198
|
+
return shardMatches[0] ?? null;
|
|
199
|
+
}
|
|
200
|
+
return null;
|
|
195
201
|
}
|
|
196
202
|
async function resolveDocumentCached(docRef, flintPath, cache) {
|
|
197
203
|
const key = docRef.trim();
|
|
@@ -212,7 +218,7 @@ function getDisambiguatedExportName(flintPath, sourcePath, baseName) {
|
|
|
212
218
|
return `${baseName} (${dirLabel})`;
|
|
213
219
|
}
|
|
214
220
|
async function scanExports(flintPath) {
|
|
215
|
-
const { readFlintToml: readFlintToml2 } = await import("./mesh-config-BAIYF4KD-
|
|
221
|
+
const { readFlintToml: readFlintToml2 } = await import("./mesh-config-BAIYF4KD-W2RGZQ2V.js");
|
|
216
222
|
const config = await readFlintToml2(flintPath);
|
|
217
223
|
const declarations = config?.exports?.required;
|
|
218
224
|
if (!declarations || declarations.length === 0) {
|
|
@@ -239,7 +245,7 @@ async function scanExportsFromConfig(flintPath, declarations) {
|
|
|
239
245
|
async function scanExportEligible(flintPath) {
|
|
240
246
|
const meshDir = join(flintPath, "Mesh");
|
|
241
247
|
if (!await exists(meshDir)) return [];
|
|
242
|
-
const { readFlintToml: readFlintToml2 } = await import("./mesh-config-BAIYF4KD-
|
|
248
|
+
const { readFlintToml: readFlintToml2 } = await import("./mesh-config-BAIYF4KD-W2RGZQ2V.js");
|
|
243
249
|
const config = await readFlintToml2(flintPath);
|
|
244
250
|
const declared = new Set(
|
|
245
251
|
(config?.exports?.required || []).map((d) => d.file.replace(/\.md$/, "").toLowerCase())
|