@vantageos/convex-doc-forge 0.1.2 → 0.1.3
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/CHANGELOG.md +17 -0
- package/README.md +22 -4
- package/dist/actions.d.ts +4 -0
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +6 -4
- package/dist/mutations.d.ts +2 -2
- package/dist/mutations.d.ts.map +1 -1
- package/dist/mutations.js +1 -1
- package/dist/queries.js +2 -2
- package/dist/schema.d.ts +3 -3
- package/dist/schema.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this package follow [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) + [SemVer](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
+
## [0.1.3] - 2026-06-19
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **GAP 1 (data)** `input_schema` changed from `v.any()` to `v.string()` in `schema.ts`, `mutations.ts` (arg + handler type), and `queries.ts` (returns validators for both `list_templates` and `get_template`). JSON Schemas containing `$schema`/`$ref`/`$defs` keys (which start with `$`, reserved by Convex) now round-trip correctly — callers `JSON.stringify()` before upsert, `JSON.parse()` after retrieval. No handler logic change; store-as-is.
|
|
10
|
+
- **GAP 2 (BLOCKER)** `render_now` no longer reads `process.env.CONVEX_DOC_FORGE_RENDERER_URL` / `CONVEX_DOC_FORGE_RENDERER_KEY`. Convex components cannot access the host deployment's env vars (`convex env set` has no `--component` flag). Config is now passed as args: `renderer_url: v.string()` + `renderer_key: v.string()`. The host app reads its own env and threads these values when calling `ctx.runAction(components.docForge.actions.render_now, { ..., renderer_url, renderer_key })`.
|
|
11
|
+
|
|
12
|
+
### Tests
|
|
13
|
+
|
|
14
|
+
- `actions.test.ts`: removed `process.env.*RENDERER*` setup/teardown; all `renderNowHandler` calls now pass `renderer_url`/`renderer_key` as args; guard tests updated accordingly; added `$schema` round-trip test.
|
|
15
|
+
- `mutations.test.ts`: `baseArgs.input_schema` changed to `JSON.stringify(...)` throughout; added `$schema`/`$ref`/`$defs` round-trip test.
|
|
16
|
+
|
|
17
|
+
### Notes
|
|
18
|
+
|
|
19
|
+
- tsc: 0 errors. V8-pure: zero `"use node"` or `node:*` in src/. `peerDependencies.convex` unchanged (`>=1.17.0`).
|
|
20
|
+
- Breaking change for callers of `render_now`: must now pass `renderer_url` + `renderer_key` as args. See README + `scripts/smoke-render.md` for updated call pattern.
|
|
21
|
+
|
|
5
22
|
## [0.1.2] - 2026-06-19
|
|
6
23
|
|
|
7
24
|
### Added
|
package/README.md
CHANGED
|
@@ -44,7 +44,19 @@ export default app;
|
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
47
|
-
##
|
|
47
|
+
## Renderer config (passed as args by the host app)
|
|
48
|
+
|
|
49
|
+
`render_now` does **not** read env vars from the Convex dashboard — Convex components cannot access the host deployment's env vars (`convex env set` has no `--component` flag). The host app reads its own env and passes config as args on every call:
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
const result = await ctx.runAction(components.docForge.actions.render_now, {
|
|
53
|
+
// ...
|
|
54
|
+
renderer_url: process.env.CONVEX_DOC_FORGE_RENDERER_URL!,
|
|
55
|
+
renderer_key: process.env.CONVEX_DOC_FORGE_RENDERER_KEY!,
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Set these in the **host** deployment's Convex dashboard (not inside the component):
|
|
48
60
|
|
|
49
61
|
| Variable | Description |
|
|
50
62
|
|---|---|
|
|
@@ -64,7 +76,7 @@ export default app;
|
|
|
64
76
|
| `tenant_id` | string | Clerk org ID |
|
|
65
77
|
| `template_type` | `"doc-binary"` | Always `doc-binary` (V1) |
|
|
66
78
|
| `renderer_kind` | `"docxtpl" \| "python-pptx" \| "jinja2-html"` | Which renderer to use |
|
|
67
|
-
| `input_schema` |
|
|
79
|
+
| `input_schema` | string | JSON Schema serialized as a JSON string (`JSON.stringify(schema)`) — avoids Convex `$`-key rejection |
|
|
68
80
|
| `asset_storage_id` | Id<"_storage"> | Convex file storage reference to the .docx/.pptx asset |
|
|
69
81
|
| `output_formats` | string[] | e.g. `["docx", "pdf"]` |
|
|
70
82
|
| `version` | string | SemVer |
|
|
@@ -115,7 +127,9 @@ docForge.mutations.queue_render({ template_id, context, output_format, createdBy
|
|
|
115
127
|
docForge.actions.render_now({
|
|
116
128
|
template_id, context, output_format,
|
|
117
129
|
actor, // Clerk subject
|
|
118
|
-
source
|
|
130
|
+
source?, // "manual" | "workflow" | "agent" (default "manual")
|
|
131
|
+
renderer_url, // host app reads from its own env (e.g. process.env.CONVEX_DOC_FORGE_RENDERER_URL)
|
|
132
|
+
renderer_key, // host app reads from its own env (e.g. process.env.CONVEX_DOC_FORGE_RENDERER_KEY)
|
|
119
133
|
})
|
|
120
134
|
// → { output_url, render_job_id, duration_ms, pages? }
|
|
121
135
|
```
|
|
@@ -159,7 +173,8 @@ const templateId = await ctx.runMutation(
|
|
|
159
173
|
team: "iris-rh",
|
|
160
174
|
tenant_id: "org_clerk_abc",
|
|
161
175
|
renderer_kind: "docxtpl",
|
|
162
|
-
input_schema
|
|
176
|
+
// input_schema must be a JSON-stringified string — Convex rejects $-prefixed keys (e.g. $schema, $ref)
|
|
177
|
+
input_schema: JSON.stringify({ type: "object", properties: { client_name: { type: "string" } } }),
|
|
163
178
|
asset_storage_id: storageId, // from step 2
|
|
164
179
|
output_formats: ["pdf", "docx"],
|
|
165
180
|
version: "1.0.0",
|
|
@@ -168,12 +183,15 @@ const templateId = await ctx.runMutation(
|
|
|
168
183
|
);
|
|
169
184
|
|
|
170
185
|
// Now render_now works end-to-end:
|
|
186
|
+
// renderer_url + renderer_key are read from the host app's env and passed as args
|
|
171
187
|
const result = await ctx.runAction(components.docForge.actions.render_now, {
|
|
172
188
|
template_id: templateId,
|
|
173
189
|
context: { client_name: "Iris RH" },
|
|
174
190
|
output_format: "pdf",
|
|
175
191
|
actor: "clerk_user_id",
|
|
176
192
|
source: "manual",
|
|
193
|
+
renderer_url: process.env.CONVEX_DOC_FORGE_RENDERER_URL!,
|
|
194
|
+
renderer_key: process.env.CONVEX_DOC_FORGE_RENDERER_KEY!,
|
|
177
195
|
});
|
|
178
196
|
// → { output_url, render_job_id, duration_ms }
|
|
179
197
|
```
|
package/dist/actions.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export declare function renderNowHandler(ctx: any, args: {
|
|
|
4
4
|
output_format: string;
|
|
5
5
|
actor: string;
|
|
6
6
|
source?: "manual" | "workflow" | "agent";
|
|
7
|
+
renderer_url: string;
|
|
8
|
+
renderer_key: string;
|
|
7
9
|
}): Promise<{
|
|
8
10
|
output_url: string;
|
|
9
11
|
render_job_id: string;
|
|
@@ -16,5 +18,7 @@ export declare const render_now: import("convex/server").RegisteredAction<"publi
|
|
|
16
18
|
context: any;
|
|
17
19
|
output_format: string;
|
|
18
20
|
actor: string;
|
|
21
|
+
renderer_url: string;
|
|
22
|
+
renderer_key: string;
|
|
19
23
|
}, any>;
|
|
20
24
|
//# sourceMappingURL=actions.d.ts.map
|
package/dist/actions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAiCA,wBAAsB,gBAAgB,CAEpC,GAAG,EAAE,GAAG,EACR,IAAI,EAAE;IACJ,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAiCA,wBAAsB,gBAAgB,CAEpC,GAAG,EAAE,GAAG,EACR,IAAI,EAAE;IACJ,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB,GACA,OAAO,CAAC;IACT,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAoID;AAMD,eAAO,MAAM,UAAU;;;;;;;;OAwBrB,CAAC"}
|
package/dist/actions.js
CHANGED
|
@@ -18,12 +18,12 @@ const SIGNED_URL_TTL_MS = 7 * 24 * 60 * 60 * 1000;
|
|
|
18
18
|
export async function renderNowHandler(
|
|
19
19
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
20
|
ctx, args) {
|
|
21
|
-
const rendererUrl =
|
|
22
|
-
const rendererKey =
|
|
21
|
+
const rendererUrl = args.renderer_url;
|
|
22
|
+
const rendererKey = args.renderer_key;
|
|
23
23
|
if (!rendererUrl)
|
|
24
|
-
throw new Error("
|
|
24
|
+
throw new Error("renderer_url arg is required");
|
|
25
25
|
if (!rendererKey)
|
|
26
|
-
throw new Error("
|
|
26
|
+
throw new Error("renderer_key arg is required");
|
|
27
27
|
// 1. Load template
|
|
28
28
|
const template = await ctx.runQuery(internal.queries.get_template, {
|
|
29
29
|
template_id: args.template_id,
|
|
@@ -149,6 +149,8 @@ export const render_now = action({
|
|
|
149
149
|
output_format: v.string(),
|
|
150
150
|
actor: v.string(),
|
|
151
151
|
source: v.optional(v.union(v.literal("manual"), v.literal("workflow"), v.literal("agent"))),
|
|
152
|
+
renderer_url: v.string(),
|
|
153
|
+
renderer_key: v.string(),
|
|
152
154
|
},
|
|
153
155
|
returns: v.object({
|
|
154
156
|
output_url: v.string(),
|
package/dist/mutations.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare function upsertTemplateHandler(ctx: AnyCtx, args: {
|
|
|
5
5
|
team: string;
|
|
6
6
|
tenant_id: string;
|
|
7
7
|
renderer_kind: "docxtpl" | "python-pptx" | "jinja2-html";
|
|
8
|
-
input_schema:
|
|
8
|
+
input_schema: string;
|
|
9
9
|
asset_storage_id: Id<"_storage">;
|
|
10
10
|
output_formats: string[];
|
|
11
11
|
metadata?: Record<string, string>;
|
|
@@ -47,7 +47,7 @@ export declare const upsert_template: import("convex/server").RegisteredMutation
|
|
|
47
47
|
team: string;
|
|
48
48
|
tenant_id: string;
|
|
49
49
|
renderer_kind: "docxtpl" | "python-pptx" | "jinja2-html";
|
|
50
|
-
input_schema:
|
|
50
|
+
input_schema: string;
|
|
51
51
|
asset_storage_id: Id<"_storage">;
|
|
52
52
|
output_formats: string[];
|
|
53
53
|
metadata?: Record<string, string>;
|
package/dist/mutations.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../src/mutations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAIjD,KAAK,MAAM,GAAG,GAAG,CAAC;AAMlB,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IACJ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,SAAS,GAAG,aAAa,GAAG,aAAa,CAAC;IACzD,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../src/mutations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAIjD,KAAK,MAAM,GAAG,GAAG,CAAC;AAMlB,wBAAsB,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AAC;WAAS,MAAM;iBAoGhD,CAAC;AAEH,eAAO,MAAM,YAAY;mBAnFN,EAAE,CAAC,aAAa,CAAC;eACrB,MAAM;iBACJ,EAAE,CAAC,WAAW,CAAC;sBACV,MAAM;kBACV,MAAM;uBACD,MAAM;gBACb,MAAM;WACX,MAAM;YACL,QAAQ,GAAG,UAAU,GAAG,OAAO;+BA6FzC,CAAC"}
|
package/dist/mutations.js
CHANGED
|
@@ -116,7 +116,7 @@ export const upsert_template = mutation({
|
|
|
116
116
|
team: v.string(),
|
|
117
117
|
tenant_id: v.string(),
|
|
118
118
|
renderer_kind: v.union(v.literal("docxtpl"), v.literal("python-pptx"), v.literal("jinja2-html")),
|
|
119
|
-
input_schema: v.
|
|
119
|
+
input_schema: v.string(),
|
|
120
120
|
asset_storage_id: v.id("_storage"),
|
|
121
121
|
output_formats: v.array(v.string()),
|
|
122
122
|
metadata: v.optional(v.record(v.string(), v.string())),
|
package/dist/queries.js
CHANGED
|
@@ -63,7 +63,7 @@ export const list_templates = query({
|
|
|
63
63
|
tenant_id: v.string(),
|
|
64
64
|
template_type: v.literal("doc-binary"),
|
|
65
65
|
renderer_kind: v.union(v.literal("docxtpl"), v.literal("python-pptx"), v.literal("jinja2-html")),
|
|
66
|
-
input_schema: v.
|
|
66
|
+
input_schema: v.string(),
|
|
67
67
|
asset_storage_id: v.id("_storage"),
|
|
68
68
|
output_formats: v.array(v.string()),
|
|
69
69
|
metadata: v.optional(v.record(v.string(), v.string())),
|
|
@@ -83,7 +83,7 @@ export const get_template = query({
|
|
|
83
83
|
tenant_id: v.string(),
|
|
84
84
|
template_type: v.literal("doc-binary"),
|
|
85
85
|
renderer_kind: v.union(v.literal("docxtpl"), v.literal("python-pptx"), v.literal("jinja2-html")),
|
|
86
|
-
input_schema: v.
|
|
86
|
+
input_schema: v.string(),
|
|
87
87
|
asset_storage_id: v.id("_storage"),
|
|
88
88
|
output_formats: v.array(v.string()),
|
|
89
89
|
metadata: v.optional(v.record(v.string(), v.string())),
|
package/dist/schema.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
14
14
|
tenant_id: string;
|
|
15
15
|
template_type: "doc-binary";
|
|
16
16
|
renderer_kind: "docxtpl" | "python-pptx" | "jinja2-html";
|
|
17
|
-
input_schema:
|
|
17
|
+
input_schema: string;
|
|
18
18
|
asset_storage_id: import("convex/values").GenericId<"_storage">;
|
|
19
19
|
output_formats: string[];
|
|
20
20
|
version: string;
|
|
@@ -26,14 +26,14 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
26
26
|
tenant_id: import("convex/values").VString<string, "required">;
|
|
27
27
|
template_type: import("convex/values").VLiteral<"doc-binary", "required">;
|
|
28
28
|
renderer_kind: import("convex/values").VUnion<"docxtpl" | "python-pptx" | "jinja2-html", [import("convex/values").VLiteral<"docxtpl", "required">, import("convex/values").VLiteral<"python-pptx", "required">, import("convex/values").VLiteral<"jinja2-html", "required">], "required", never>;
|
|
29
|
-
input_schema: import("convex/values").
|
|
29
|
+
input_schema: import("convex/values").VString<string, "required">;
|
|
30
30
|
asset_storage_id: import("convex/values").VId<import("convex/values").GenericId<"_storage">, "required">;
|
|
31
31
|
output_formats: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
32
32
|
metadata: import("convex/values").VRecord<Record<string, string> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "optional", string>;
|
|
33
33
|
version: import("convex/values").VString<string, "required">;
|
|
34
34
|
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
35
35
|
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
36
|
-
}, "required", "name" | "team" | "tenant_id" | "template_type" | "renderer_kind" | "input_schema" | "asset_storage_id" | "output_formats" | "metadata" | "version" | "createdAt" | "updatedAt" | `
|
|
36
|
+
}, "required", "name" | "team" | "tenant_id" | "template_type" | "renderer_kind" | "input_schema" | "asset_storage_id" | "output_formats" | "metadata" | "version" | "createdAt" | "updatedAt" | `metadata.${string}`>, {
|
|
37
37
|
by_tenant: ["tenant_id", "_creationTime"];
|
|
38
38
|
by_tenant_team: ["tenant_id", "team", "_creationTime"];
|
|
39
39
|
by_tenant_type: ["tenant_id", "template_type", "_creationTime"];
|
package/dist/schema.js
CHANGED
|
@@ -15,7 +15,7 @@ export default defineSchema({
|
|
|
15
15
|
tenant_id: v.string(), // Clerk org ID
|
|
16
16
|
template_type: v.literal("doc-binary"),
|
|
17
17
|
renderer_kind: v.union(v.literal("docxtpl"), v.literal("python-pptx"), v.literal("jinja2-html")),
|
|
18
|
-
input_schema: v.
|
|
18
|
+
input_schema: v.string(), // JSON Schema serialized as a JSON string (avoids $-key rejection)
|
|
19
19
|
asset_storage_id: v.id("_storage"),
|
|
20
20
|
output_formats: v.array(v.string()),
|
|
21
21
|
metadata: v.optional(v.record(v.string(), v.string())),
|