toilscript 0.1.49 → 0.1.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "imports": {
3
- "toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.49/dist/toilscript.js",
4
- "toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.49/dist/cli.js",
3
+ "toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.51/dist/toilscript.js",
4
+ "toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.51/dist/cli.js",
5
5
  "binaryen": "https://cdn.jsdelivr.net/npm/binaryen@130.0.0-nightly.20260609/index.js",
6
6
  "long": "https://cdn.jsdelivr.net/npm/long@5.3.2/index.js"
7
7
  }
@@ -3114,7 +3114,7 @@ declare module "types:toilscript/src/parser" {
3114
3114
  * `injectRestController`. Each method becomes an id-matched arm of a synthesized
3115
3115
  * `__rpcDispatch(__id, __body)`: decode the positional args from the body, call the method on a FRESH
3116
3116
  * instance (stateless, exactly like a `@rest` controller), encode the result. The id is FNV-1a of
3117
- * `"Class.method"` - the identical hash the generated client sends in the `toil-rpc` header, so the
3117
+ * `"Class.method"` - the identical hash the generated client sends in the `dacely-rpc` header, so the
3118
3118
  * wire matches without the two sides sharing state. `DataReader`/`DataWriter` are ambient (std).
3119
3119
  */
3120
3120
  private injectService;
@@ -4615,7 +4615,7 @@ declare module "types:toilscript/src/dbcatalog" {
4615
4615
  * u16 format_version = 1
4616
4616
  * u16 n_methods
4617
4617
  * per method:
4618
- * u32 method_id (FNV-1a of "ClassName.methodName" or "fnName", the `toil-rpc` header id)
4618
+ * u32 method_id (FNV-1a of "ClassName.methodName" or "fnName", the `dacely-rpc` header id)
4619
4619
  * u8 function_kind (1 = Action)
4620
4620
  */
4621
4621
  export function buildToilDbRpcKinds(program: Program): Uint8Array | null;
@@ -452,7 +452,7 @@ declare interface __Record`),n.push(e.id.toString()),n.push(`<TOmittable> {
452
452
  `}else a+=s+"return "+(l.length?"__r.read"+l+"()":e.returns.type+".decodeFrom(__r)")+`;
453
453
  `}return a+=r+`},
454
454
  `,a}function sR(r,i){if(r.services.length==0&&r.remotes.length==0)return"";let e="// Generated RPC client: `Server.<service>.<method>(args)` and free `Server.<remote>(args)`.\n";e+=`async function __toilRpcCall(__id: number, __body: Uint8Array): Promise<Uint8Array> {
455
- `,e+=` const __res = await fetch("/__toil_rpc", { method: "POST", headers: { "content-type": "application/octet-stream", "toil-rpc": String(__id) }, body: __body });
455
+ `,e+=` const __res = await fetch("/__toil_rpc", { method: "POST", headers: { "content-type": "application/octet-stream", "dacely-rpc": String(__id) }, body: __body });
456
456
  `,e+=" if (!__res.ok) throw new Error(`toiljs RPC ${__res.status}`);\n",e+=` const __ct = __res.headers.get("content-type") || "";
457
457
  `,e+=" if (!__ct.startsWith(\"application/octet-stream\")) throw new Error(`toiljs RPC: unexpected content-type '${__ct}' on a 200 (a proxy/HTML page, not an RPC result?)`);\n",e+=` return new Uint8Array(await __res.arrayBuffer());
458
458
  `,e+=`}