@gaganref/confect-core 10.3.1-fork.71 → 10.3.1-fork.72
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.
|
@@ -35,11 +35,13 @@ export interface Generate {
|
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* What codegen hands a section's `summarize`: the `confect/` files its
|
|
38
|
-
* `generate` matched,
|
|
38
|
+
* `generate` matched, each function's description by path, and the spec file
|
|
39
|
+
* declaring each function by path, relative to `confect/`.
|
|
39
40
|
*/
|
|
40
41
|
export interface SummarizeInput<Value = unknown> {
|
|
41
42
|
readonly modules: GenerateInput["modules"];
|
|
42
43
|
readonly functions: Readonly<Record<string, Value>>;
|
|
44
|
+
readonly sources: Readonly<Record<string, string>>;
|
|
43
45
|
}
|
|
44
46
|
export interface ManifestSection<Value = unknown, Data_ extends {
|
|
45
47
|
readonly format: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManifestSection.d.ts","sourceRoot":"","sources":["../src/ManifestSection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,YAAY,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,KAAK,cAAc,MAAM,qBAAqB,CAAC;AAE3D,MAAM,WAAW,IAAI,CAAC,KAAK,GAAG,OAAO;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;CACrD;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;QAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KACrD,CAAC,CAAC;IACH,QAAQ,CAAC,SAAS,EAAE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AK,EAAE;QACd,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC,YAAY,CAAC;QACzC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;KACtE,GAAG,KAAK,CAAC;IACV,SAAS,CAAC,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IAChD,KAAK,CAAC,CACJ,IAAI,EAAE,KAAK,EACX,QAAQ,EAAE,OAAO,GAChB;QACD,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;QACvC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;KACvC,CAAC;IACF,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CAC9B;AAED,MAAM,MAAM,GAAG,GAAG,eAAe,CAAC,OAAO,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAExE,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManifestSection.js","names":[],"sources":["../src/ManifestSection.ts"],"sourcesContent":["import type * as FunctionSpec from \"./FunctionSpec.js\";\nimport type * as MiddlewareSpec from \"./MiddlewareSpec.js\";\n\nexport interface Data<Value = unknown> {\n readonly format: number;\n readonly functions: Readonly<Record<string, Value>>;\n}\n\n/**\n * What codegen hands a section's `render`: the exports of each `confect/` file\n * it matched, every registered function with the spec file declaring it, each\n * mounted component with the specifier of its definition, and every file\n * `match` was offered.\n */\nexport interface GenerateInput {\n readonly modules: ReadonlyArray<{\n readonly relativePath: string;\n readonly exports: Readonly<Record<string, unknown>>;\n }>;\n readonly functions: ReadonlyArray<{\n readonly path: string;\n readonly source: string;\n }>;\n readonly mounts: ReadonlyArray<{\n readonly name: string;\n readonly definition: string;\n }>;\n readonly files: ReadonlyArray<string>;\n}\n\nexport interface Generate {\n readonly file: string;\n match(relativePath: string): boolean;\n render(input: GenerateInput): {\n readonly contents: string;\n readonly errors: ReadonlyArray<string>;\n };\n}\n\n/**\n * What codegen hands a section's `summarize`: the `confect/` files its\n * `generate` matched,
|
|
1
|
+
{"version":3,"file":"ManifestSection.js","names":[],"sources":["../src/ManifestSection.ts"],"sourcesContent":["import type * as FunctionSpec from \"./FunctionSpec.js\";\nimport type * as MiddlewareSpec from \"./MiddlewareSpec.js\";\n\nexport interface Data<Value = unknown> {\n readonly format: number;\n readonly functions: Readonly<Record<string, Value>>;\n}\n\n/**\n * What codegen hands a section's `render`: the exports of each `confect/` file\n * it matched, every registered function with the spec file declaring it, each\n * mounted component with the specifier of its definition, and every file\n * `match` was offered.\n */\nexport interface GenerateInput {\n readonly modules: ReadonlyArray<{\n readonly relativePath: string;\n readonly exports: Readonly<Record<string, unknown>>;\n }>;\n readonly functions: ReadonlyArray<{\n readonly path: string;\n readonly source: string;\n }>;\n readonly mounts: ReadonlyArray<{\n readonly name: string;\n readonly definition: string;\n }>;\n readonly files: ReadonlyArray<string>;\n}\n\nexport interface Generate {\n readonly file: string;\n match(relativePath: string): boolean;\n render(input: GenerateInput): {\n readonly contents: string;\n readonly errors: ReadonlyArray<string>;\n };\n}\n\n/**\n * What codegen hands a section's `summarize`: the `confect/` files its\n * `generate` matched, each function's description by path, and the spec file\n * declaring each function by path, relative to `confect/`.\n */\nexport interface SummarizeInput<Value = unknown> {\n readonly modules: GenerateInput[\"modules\"];\n readonly functions: Readonly<Record<string, Value>>;\n readonly sources: Readonly<Record<string, string>>;\n}\n\nexport interface ManifestSection<\n Value = unknown,\n Data_ extends { readonly format: number } = Data<Value>,\n> {\n readonly owner: string;\n readonly format: number;\n describe(input: {\n readonly path: string;\n readonly spec: FunctionSpec.AnyWithProps;\n readonly middleware: ReadonlyArray<MiddlewareSpec.AnyMiddlewareSpec>;\n }): Value;\n summarize?(input: SummarizeInput<Value>): Data_;\n check?(\n next: Data_,\n previous: unknown,\n ): {\n readonly errors: ReadonlyArray<string>;\n readonly notes: ReadonlyArray<string>;\n };\n readonly generate?: Generate;\n}\n\nexport type Any = ManifestSection<unknown, { readonly format: number }>;\n\nexport interface Entry {\n readonly key: string;\n readonly section: Any;\n}\n"],"mappings":""}
|
package/package.json
CHANGED
package/src/ManifestSection.ts
CHANGED
|
@@ -39,11 +39,13 @@ export interface Generate {
|
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* What codegen hands a section's `summarize`: the `confect/` files its
|
|
42
|
-
* `generate` matched,
|
|
42
|
+
* `generate` matched, each function's description by path, and the spec file
|
|
43
|
+
* declaring each function by path, relative to `confect/`.
|
|
43
44
|
*/
|
|
44
45
|
export interface SummarizeInput<Value = unknown> {
|
|
45
46
|
readonly modules: GenerateInput["modules"];
|
|
46
47
|
readonly functions: Readonly<Record<string, Value>>;
|
|
48
|
+
readonly sources: Readonly<Record<string, string>>;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
export interface ManifestSection<
|