@gaganref/confect-core 10.3.1-fork.70 → 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.
@@ -6,8 +6,9 @@ export interface Data<Value = unknown> {
6
6
  }
7
7
  /**
8
8
  * What codegen hands a section's `render`: the exports of each `confect/` file
9
- * it matched, every registered function with the spec file declaring it, and
10
- * each mounted component with the specifier of its definition.
9
+ * it matched, every registered function with the spec file declaring it, each
10
+ * mounted component with the specifier of its definition, and every file
11
+ * `match` was offered.
11
12
  */
12
13
  export interface GenerateInput {
13
14
  readonly modules: ReadonlyArray<{
@@ -22,6 +23,7 @@ export interface GenerateInput {
22
23
  readonly name: string;
23
24
  readonly definition: string;
24
25
  }>;
26
+ readonly files: ReadonlyArray<string>;
25
27
  }
26
28
  export interface Generate {
27
29
  readonly file: string;
@@ -33,11 +35,13 @@ export interface Generate {
33
35
  }
34
36
  /**
35
37
  * What codegen hands a section's `summarize`: the `confect/` files its
36
- * `generate` matched, and each function's description by path.
38
+ * `generate` matched, each function's description by path, and the spec file
39
+ * declaring each function by path, relative to `confect/`.
37
40
  */
38
41
  export interface SummarizeInput<Value = unknown> {
39
42
  readonly modules: GenerateInput["modules"];
40
43
  readonly functions: Readonly<Record<string, Value>>;
44
+ readonly sources: Readonly<Record<string, string>>;
41
45
  }
42
46
  export interface ManifestSection<Value = unknown, Data_ extends {
43
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,CAA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AAC;CACpD;AAED,MAAM,WAAW,eAAe,CAC9B,KAAK,GAAG,OAAO,EACf,KAAK,SAAS;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,KAAK,CAAC;IAEvD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,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, and\n * each mounted component with the specifier of its definition.\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}\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, and each function's description by path.\n */\nexport interface SummarizeInput<Value = unknown> {\n readonly modules: GenerateInput[\"modules\"];\n readonly functions: Readonly<Record<string, Value>>;\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":""}
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gaganref/confect-core",
3
- "version": "10.3.1-fork.70",
3
+ "version": "10.3.1-fork.72",
4
4
  "peerDependencies": {
5
5
  "convex": "^1.49.0",
6
6
  "effect": ">=4.0.0 <4.1.0"
@@ -8,8 +8,9 @@ export interface Data<Value = unknown> {
8
8
 
9
9
  /**
10
10
  * What codegen hands a section's `render`: the exports of each `confect/` file
11
- * it matched, every registered function with the spec file declaring it, and
12
- * each mounted component with the specifier of its definition.
11
+ * it matched, every registered function with the spec file declaring it, each
12
+ * mounted component with the specifier of its definition, and every file
13
+ * `match` was offered.
13
14
  */
14
15
  export interface GenerateInput {
15
16
  readonly modules: ReadonlyArray<{
@@ -24,6 +25,7 @@ export interface GenerateInput {
24
25
  readonly name: string;
25
26
  readonly definition: string;
26
27
  }>;
28
+ readonly files: ReadonlyArray<string>;
27
29
  }
28
30
 
29
31
  export interface Generate {
@@ -37,11 +39,13 @@ export interface Generate {
37
39
 
38
40
  /**
39
41
  * What codegen hands a section's `summarize`: the `confect/` files its
40
- * `generate` matched, and each function's description by path.
42
+ * `generate` matched, each function's description by path, and the spec file
43
+ * declaring each function by path, relative to `confect/`.
41
44
  */
42
45
  export interface SummarizeInput<Value = unknown> {
43
46
  readonly modules: GenerateInput["modules"];
44
47
  readonly functions: Readonly<Record<string, Value>>;
48
+ readonly sources: Readonly<Record<string, string>>;
45
49
  }
46
50
 
47
51
  export interface ManifestSection<