@gaganref/confect-core 10.3.1-fork.50 → 10.3.1-fork.51

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.
@@ -4,6 +4,33 @@ export interface Data<Value = unknown> {
4
4
  readonly format: number;
5
5
  readonly functions: Readonly<Record<string, Value>>;
6
6
  }
7
+ /**
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.
11
+ */
12
+ export interface GenerateInput {
13
+ readonly modules: ReadonlyArray<{
14
+ readonly relativePath: string;
15
+ readonly exports: Readonly<Record<string, unknown>>;
16
+ }>;
17
+ readonly functions: ReadonlyArray<{
18
+ readonly path: string;
19
+ readonly source: string;
20
+ }>;
21
+ readonly mounts: ReadonlyArray<{
22
+ readonly name: string;
23
+ readonly definition: string;
24
+ }>;
25
+ }
26
+ export interface Generate {
27
+ readonly file: string;
28
+ match(relativePath: string): boolean;
29
+ render(input: GenerateInput): {
30
+ readonly contents: string;
31
+ readonly errors: ReadonlyArray<string>;
32
+ };
33
+ }
7
34
  export interface ManifestSection<Value = unknown> {
8
35
  readonly owner: string;
9
36
  readonly format: number;
@@ -16,6 +43,7 @@ export interface ManifestSection<Value = unknown> {
16
43
  readonly errors: ReadonlyArray<string>;
17
44
  readonly notes: ReadonlyArray<string>;
18
45
  };
46
+ readonly generate?: Generate;
19
47
  }
20
48
  export interface Entry {
21
49
  readonly key: string;
@@ -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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E,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,WAAW,KAAK;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;CACnC"}
@@ -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\nexport interface ManifestSection<Value = unknown> {\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 check?(\n next: Data<Value>,\n previous: unknown,\n ): {\n readonly errors: ReadonlyArray<string>;\n readonly notes: ReadonlyArray<string>;\n };\n}\n\nexport interface Entry {\n readonly key: string;\n readonly section: ManifestSection;\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, 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\nexport interface ManifestSection<Value = unknown> {\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 check?(\n next: Data<Value>,\n previous: unknown,\n ): {\n readonly errors: ReadonlyArray<string>;\n readonly notes: ReadonlyArray<string>;\n };\n readonly generate?: Generate;\n}\n\nexport interface Entry {\n readonly key: string;\n readonly section: ManifestSection;\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.50",
3
+ "version": "10.3.1-fork.51",
4
4
  "peerDependencies": {
5
5
  "convex": "^1.48.0",
6
6
  "effect": ">=4.0.0 <4.1.0"
@@ -6,6 +6,35 @@ export interface Data<Value = unknown> {
6
6
  readonly functions: Readonly<Record<string, Value>>;
7
7
  }
8
8
 
9
+ /**
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.
13
+ */
14
+ export interface GenerateInput {
15
+ readonly modules: ReadonlyArray<{
16
+ readonly relativePath: string;
17
+ readonly exports: Readonly<Record<string, unknown>>;
18
+ }>;
19
+ readonly functions: ReadonlyArray<{
20
+ readonly path: string;
21
+ readonly source: string;
22
+ }>;
23
+ readonly mounts: ReadonlyArray<{
24
+ readonly name: string;
25
+ readonly definition: string;
26
+ }>;
27
+ }
28
+
29
+ export interface Generate {
30
+ readonly file: string;
31
+ match(relativePath: string): boolean;
32
+ render(input: GenerateInput): {
33
+ readonly contents: string;
34
+ readonly errors: ReadonlyArray<string>;
35
+ };
36
+ }
37
+
9
38
  export interface ManifestSection<Value = unknown> {
10
39
  readonly owner: string;
11
40
  readonly format: number;
@@ -21,6 +50,7 @@ export interface ManifestSection<Value = unknown> {
21
50
  readonly errors: ReadonlyArray<string>;
22
51
  readonly notes: ReadonlyArray<string>;
23
52
  };
53
+ readonly generate?: Generate;
24
54
  }
25
55
 
26
56
  export interface Entry {