functional-examples 0.0.0-alpha.2 → 0.0.0-alpha.5
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/cli/commands/scan.d.ts +1 -1
- package/dist/cli/index.d.ts +2 -2
- package/dist/schema/merger.d.ts.map +1 -1
- package/dist/schema/merger.js +32 -15
- package/dist/schema/merger.js.map +1 -1
- package/package.json +2 -2
- package/dist/config/index.spec.d.ts +0 -5
- package/dist/extractors/loader.d.ts +0 -19
- package/dist/extractors/meta-yml-fn.d.ts +0 -19
- package/dist/extractors/meta-yml.d.ts +0 -24
- package/dist/extractors/registry.d.ts +0 -58
- package/dist/extractors/registry.spec.d.ts +0 -2
- package/dist/extractors/yaml-frontmatter-fn.d.ts +0 -18
- package/dist/extractors/yaml-frontmatter.d.ts +0 -22
- package/dist/extractors/yaml-frontmatter.spec.d.ts +0 -2
- package/dist/regions/parser.spec.d.ts +0 -2
- package/dist/scanner/scanner.spec.d.ts +0 -2
package/dist/cli/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ declare const app: import("cli-forge").CLI<{
|
|
|
17
17
|
} & {} & {
|
|
18
18
|
config?: string;
|
|
19
19
|
} & {} & {
|
|
20
|
-
format?: "
|
|
20
|
+
format?: "yaml" | "json" | "table";
|
|
21
21
|
} & {} & {
|
|
22
22
|
output?: string;
|
|
23
23
|
} & {} & {
|
|
@@ -53,7 +53,7 @@ declare const app: import("cli-forge").CLI<{
|
|
|
53
53
|
unmatched: string[];
|
|
54
54
|
'--'?: string[];
|
|
55
55
|
} & {
|
|
56
|
-
format?: "
|
|
56
|
+
format?: "ts" | "json";
|
|
57
57
|
} & {} & {
|
|
58
58
|
output?: string;
|
|
59
59
|
} & {} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merger.d.ts","sourceRoot":"","sources":["../../src/schema/merger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,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UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,wBAAwB;IACvC,aAAa,EAAE,iBAAiB,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,2BAA2B;IAC1C,gEAAgE;IAChE,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,8BAA8B;IAC9B,aAAa,EAAE,iBAAiB,EAAE,CAAC;CACpC;AA6DD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,UAAU,CAkE/E;AA2ED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,2BAA2B,GACnC,UAAU,CA6BZ"}
|
package/dist/schema/merger.js
CHANGED
|
@@ -63,6 +63,11 @@ export function mergeConfigSchema(options) {
|
|
|
63
63
|
const schema = createBaseConfigSchema();
|
|
64
64
|
const pluginRefs = [];
|
|
65
65
|
for (const { pluginName, options: optionsSchema } of pluginSchemas) {
|
|
66
|
+
// Always add string format for every known plugin
|
|
67
|
+
pluginRefs.push({
|
|
68
|
+
const: pluginName,
|
|
69
|
+
description: `Use the default options for ${pluginName}`,
|
|
70
|
+
});
|
|
66
71
|
if (!optionsSchema)
|
|
67
72
|
continue;
|
|
68
73
|
const defName = `${pluginName.replace(/[^a-zA-Z0-9]/g, '')}Options`;
|
|
@@ -74,12 +79,15 @@ export function mergeConfigSchema(options) {
|
|
|
74
79
|
description: `Options for ${pluginName} plugin`,
|
|
75
80
|
};
|
|
76
81
|
schema.$defs = defs;
|
|
82
|
+
// Tuple format for plugins with options
|
|
77
83
|
pluginRefs.push({
|
|
78
|
-
type: '
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
type: 'array',
|
|
85
|
+
prefixItems: [
|
|
86
|
+
{ const: pluginName },
|
|
87
|
+
{ $ref: `#/$defs/${defName}` },
|
|
88
|
+
],
|
|
89
|
+
minItems: 2,
|
|
90
|
+
maxItems: 2,
|
|
83
91
|
});
|
|
84
92
|
}
|
|
85
93
|
catch {
|
|
@@ -87,16 +95,25 @@ export function mergeConfigSchema(options) {
|
|
|
87
95
|
console.warn(`Invalid options schema for plugin ${pluginName}`);
|
|
88
96
|
}
|
|
89
97
|
}
|
|
90
|
-
//
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
// Add generic fallbacks for unknown plugins
|
|
99
|
+
pluginRefs.push({ type: 'string', description: 'Unknown plugin package name' }, {
|
|
100
|
+
type: 'array',
|
|
101
|
+
description: 'Unknown plugin with options',
|
|
102
|
+
prefixItems: [
|
|
103
|
+
{ type: 'string' },
|
|
104
|
+
{ type: 'object' },
|
|
105
|
+
],
|
|
106
|
+
minItems: 1,
|
|
107
|
+
maxItems: 2,
|
|
108
|
+
});
|
|
109
|
+
// Update plugins array to use anyOf
|
|
110
|
+
const properties = schema.properties ?? {};
|
|
111
|
+
properties.plugins = {
|
|
112
|
+
type: 'array',
|
|
113
|
+
description: 'Plugins to use for scanning and parsing',
|
|
114
|
+
items: { anyOf: pluginRefs },
|
|
115
|
+
};
|
|
116
|
+
schema.properties = properties;
|
|
100
117
|
return schema;
|
|
101
118
|
}
|
|
102
119
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merger.js","sourceRoot":"","sources":["../../src/schema/merger.ts"],"names":[],"mappings":"AA6BA;;GAEG;AACH,SAAS,sBAAsB;IAC7B,OAAO;QACL,OAAO,EAAE,8CAA8C;QACvD,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,yCAAyC;gBACtD,KA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,CAAC;QACjE,CAAC;aAAM,CAAC;YACN,wCAAwC;YACxC,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACtB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAoC;IAEpC,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAEhD,8DAA8D;IAC9D,MAAM,IAAI,GAAG,wBAAwB,EAAE,CAAC;IAExC,+DAA+D;IAC/D,IAAI,MAAM,GAAe,YAAY;QACnC,CAAC,CAAC,gBAAgB,CAAC,IAAI,EAAE,YAAY,CAAC;QACtC,CAAC,CAAC,IAAI,CAAC;IAET,yEAAyE;IACzE,KAAK,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,aAAa,EAAE,CAAC;QACrD,IAAI,CAAC,QAAQ;YAAE,SAAS;QAExB,IAAI,CAAC;YACH,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAe,CAAC;YACxD,wEAAwE;YACxE,MAAM,UAAU,GAAG,gBAAgB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YAC1D,wDAAwD;YACxD,MAAM,GAAG,YAAY;gBACnB,CAAC,CAAC,gBAAgB,CAAC,UAAU,EAAE,YAAY,CAAC;gBAC5C,CAAC,CAAC,UAAU,CAAC;QACjB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,CAAC,IAAI,CAAC,sCAAsC,UAAU,EAAE,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "functional-examples",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.5",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Craigory Coppola",
|
|
6
6
|
"url": "https://craigory.dev"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"jiti": "^2.4.2",
|
|
37
37
|
"minimatch": "^10.0.0",
|
|
38
38
|
"tinyglobby": "^0.2.15",
|
|
39
|
-
"@functional-examples/devkit": "0.0.0-alpha.
|
|
39
|
+
"@functional-examples/devkit": "0.0.0-alpha.5"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "22.19.8",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lazy extractor module loading with caching
|
|
3
|
-
*/
|
|
4
|
-
import type { BaseMetadata } from '../types/index.js';
|
|
5
|
-
import type { MetadataExtractorFunction } from './types.js';
|
|
6
|
-
/**
|
|
7
|
-
* Resolve a module reference to a loaded extractor
|
|
8
|
-
* @param ref - Package name, local path, or ExtractorConfig
|
|
9
|
-
* @param basePath - Base directory for resolving local paths
|
|
10
|
-
* @returns Loaded extractor or throws if module cannot be loaded
|
|
11
|
-
*/
|
|
12
|
-
export declare function loadExtractor(ref: string | {
|
|
13
|
-
module: string;
|
|
14
|
-
}, basePath?: string): Promise<MetadataExtractorFunction<BaseMetadata>>;
|
|
15
|
-
/**
|
|
16
|
-
* Clear the module cache (useful for testing or config reload)
|
|
17
|
-
*/
|
|
18
|
-
export declare function clearCache(): void;
|
|
19
|
-
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* meta.yml extractor for directory-based examples (function-based).
|
|
3
|
-
*
|
|
4
|
-
* Expected structure:
|
|
5
|
-
* ```
|
|
6
|
-
* examples/
|
|
7
|
-
* my-example/
|
|
8
|
-
* meta.yml
|
|
9
|
-
* main.ts
|
|
10
|
-
* helper.ts
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
import type { MetadataExtractorFunction } from './types.js';
|
|
14
|
-
import type { BaseMetadata } from '../types/index.js';
|
|
15
|
-
/**
|
|
16
|
-
* Extractor for directory-based examples with meta.yml.
|
|
17
|
-
*/
|
|
18
|
-
export declare function createMetaYmlExtractor<TMetadata extends BaseMetadata = BaseMetadata>(): MetadataExtractorFunction<TMetadata>;
|
|
19
|
-
//# sourceMappingURL=meta-yml-fn.d.ts.map
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* meta.yml extractor for directory-based examples.
|
|
3
|
-
*
|
|
4
|
-
* Expected structure:
|
|
5
|
-
* ```
|
|
6
|
-
* examples/
|
|
7
|
-
* my-example/
|
|
8
|
-
* meta.yml
|
|
9
|
-
* main.ts
|
|
10
|
-
* helper.ts
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
import type { MetadataExtractor, ExtractionContext, ExtractedMetadata } from './types.js';
|
|
14
|
-
/**
|
|
15
|
-
* Extractor for directory-based examples with meta.yml.
|
|
16
|
-
* Used by isolated-workers pattern.
|
|
17
|
-
*/
|
|
18
|
-
export declare class MetaYmlExtractor implements MetadataExtractor {
|
|
19
|
-
readonly name = "meta-yml";
|
|
20
|
-
canExtract(context: ExtractionContext): boolean;
|
|
21
|
-
extract(context: ExtractionContext): Promise<ExtractedMetadata>;
|
|
22
|
-
private collectFiles;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=meta-yml.d.ts.map
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Registry for metadata extractors (function-based with lazy loading)
|
|
3
|
-
*/
|
|
4
|
-
import type { BaseMetadata } from '../types/index.js';
|
|
5
|
-
import type { ExtractionContext, ExtractedMetadata, MetadataExtractorFunction } from './types.js';
|
|
6
|
-
/**
|
|
7
|
-
* Registry that holds metadata extractors and dispatches extraction requests.
|
|
8
|
-
* Extractors are tried in registration order; first match wins.
|
|
9
|
-
*/
|
|
10
|
-
export declare class ExtractorRegistry<TMetadata extends BaseMetadata = BaseMetadata> {
|
|
11
|
-
private entries;
|
|
12
|
-
private loadedExtractors;
|
|
13
|
-
/**
|
|
14
|
-
* Register a new extractor (immediate loading)
|
|
15
|
-
*/
|
|
16
|
-
register(extractor: MetadataExtractorFunction<TMetadata>): this;
|
|
17
|
-
/**
|
|
18
|
-
* Register a lazy extractor reference (loaded on first use)
|
|
19
|
-
*/
|
|
20
|
-
registerLazy(ref: string | {
|
|
21
|
-
module: string;
|
|
22
|
-
}, basePath?: string): this;
|
|
23
|
-
/**
|
|
24
|
-
* Get all registered extractors (immediate only)
|
|
25
|
-
*/
|
|
26
|
-
getExtractors(): readonly MetadataExtractorFunction<TMetadata>[];
|
|
27
|
-
/**
|
|
28
|
-
* Find first extractor that can handle given context
|
|
29
|
-
*/
|
|
30
|
-
findExtractor(context: ExtractionContext): Promise<MetadataExtractorFunction<TMetadata> | undefined>;
|
|
31
|
-
/**
|
|
32
|
-
* Extract metadata using first matching extractor
|
|
33
|
-
*/
|
|
34
|
-
extract(context: ExtractionContext): Promise<ExtractedMetadata<TMetadata>>;
|
|
35
|
-
/**
|
|
36
|
-
* Clear module cache (for testing or config reload)
|
|
37
|
-
*/
|
|
38
|
-
clearCache(): void;
|
|
39
|
-
/**
|
|
40
|
-
* Get extractor from entry, loading lazily if needed
|
|
41
|
-
*/
|
|
42
|
-
private getExtractorForEntry;
|
|
43
|
-
/**
|
|
44
|
-
* Check if extractor can handle context
|
|
45
|
-
*/
|
|
46
|
-
private checkCanExtract;
|
|
47
|
-
/**
|
|
48
|
-
* Perform extraction using extractor
|
|
49
|
-
*/
|
|
50
|
-
private performExtract;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Create a registry with default extractors:
|
|
54
|
-
* - MetaYmlExtractor (for directory-based examples with meta.yml)
|
|
55
|
-
* - YamlFrontmatterExtractor (for single-file examples with YAML frontmatter)
|
|
56
|
-
*/
|
|
57
|
-
export declare function createDefaultRegistry(): ExtractorRegistry;
|
|
58
|
-
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* YAML frontmatter extractor for single-file examples (function-based).
|
|
3
|
-
*
|
|
4
|
-
* Supports frontmatter in comment blocks:
|
|
5
|
-
* ```typescript
|
|
6
|
-
* // ---
|
|
7
|
-
* // title: Example Title
|
|
8
|
-
* // description: What this demonstrates
|
|
9
|
-
* // ---
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
import type { MetadataExtractorFunction } from './types.js';
|
|
13
|
-
import type { BaseMetadata } from '../types/index.js';
|
|
14
|
-
/**
|
|
15
|
-
* Extractor for YAML frontmatter in single-file examples.
|
|
16
|
-
*/
|
|
17
|
-
export declare function createYamlFrontmatterExtractor<TMetadata extends BaseMetadata = BaseMetadata>(): MetadataExtractorFunction<TMetadata>;
|
|
18
|
-
//# sourceMappingURL=yaml-frontmatter-fn.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* YAML frontmatter extractor for single-file examples.
|
|
3
|
-
*
|
|
4
|
-
* Supports frontmatter in comment blocks:
|
|
5
|
-
* ```typescript
|
|
6
|
-
* // ---
|
|
7
|
-
* // title: Example Title
|
|
8
|
-
* // description: What this demonstrates
|
|
9
|
-
* // ---
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
import type { MetadataExtractor, ExtractionContext, ExtractedMetadata } from './types.js';
|
|
13
|
-
/**
|
|
14
|
-
* Extractor for YAML frontmatter in single-file examples.
|
|
15
|
-
* Used by cli-forge and flexibench patterns.
|
|
16
|
-
*/
|
|
17
|
-
export declare class YamlFrontmatterExtractor implements MetadataExtractor {
|
|
18
|
-
readonly name = "yaml-frontmatter";
|
|
19
|
-
canExtract(context: ExtractionContext): boolean;
|
|
20
|
-
extract(context: ExtractionContext): Promise<ExtractedMetadata>;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=yaml-frontmatter.d.ts.map
|