You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
@pipelex/sdk on npm
Added
resources on the routes that load a bundle sent as content: execute, start and startAndWaitForResult (its blocking fallback included), pipeIo, resolve, codegen and prepareInputs with inline files take resources, and validate and validateFiles take it in their options (the new ValidateOptions for validate), the files a bundle's steps read, such as a PipeDocGen step's template_file, keyed by the path the step names, each as its bytes (Uint8Array, ArrayBuffer or Blob, typed BundleResources), and send them base64-encoded, so a bundle that fills a Word, Excel, PowerPoint or HTML template validates and runs without a local pipelex. A key that cannot name a file inside the bundle, two keys naming one file, a value that is not bytes, a resources that is not a plain object (a Map included), resources beside a method_ref, or on a run with no source for them to accompany, is a RequestArgumentError before any request, resources beside a method_ref or a method_id in prepareInputs an InputPreparationError, and resources is now a reserved key of extra. A crate route or prepareInputs call carrying them gets the 20-minute execute ceiling start and validate give them, since their upload can outlast the 30-second default (docs/bundle-resources.md).
The template check's locators on a validation item: ValidationErrorItem declares template_file and template_location, which a template_check_warning item in the validate verdict's warnings carries to name the template file a PipeDocGen step fills and the place in it the warning concerns, each null when unknown.
The .mthds check hook sends a bundle's template files: the hook built by npm run build:hook sends, with the .mthds files it validates, the template files their PipeDocGen steps name, each read beside the file whose step names it, so a bundle that fills a template is no longer blocked for a template file the API was never sent, and its template is checked by the dry run (docs/hook-bundle.md).
inputFormFault: returns the first fault of one pipe's input-form entry, as { path, problem, message } with path in the descriptor's own terms (fields[3].item), or undefined when prepareInputs can walk it, for a caller that reads an entry itself to render a form or a template (docs/input-preparation.md).
Changed
InvalidInputValueError names the input (Breaking): the error carries inputName and inputPath, as UploadNotAllowedError does, and its constructor takes them as a details argument, new InvalidInputValueError(message, { inputName, inputPath }, options?). Its message names the position and describes the value by its kind (Input "dossier.attachments[1]" holds a number, which no file input takes: …), a malformed data: URL's message no longer quotes the URL, and under allowUploads: false the message offers only the two forms that pass, an http(s) URL or a pipelex-storage:// reference.
Fixed
prepareInputs refuses a malformed input-form descriptor: a pipe I/O answer whose descriptor for the selected pipe is malformed where preparation reads it (an entry that is not an object, a fields that is not a list, a field with no string name, a node with no string kind, an object node with no list of fields, a list node whose item is not a node) or names a kind outside the standard's vocabulary is an InputPreparationError with a runtime verdict, not retryable, naming the pipe and where in the descriptor the fault sits, checked whole before anything is uploaded, as the Python twin refuses it. It threw a bare TypeError, or, for a field with no name or an unknown kind, passed the caller's value through untouched, a local path at a file position included. The vocabulary is the walk's own, so a newer mthds installed beside the SDK cannot widen it.
pipelex-sdk run --inputs-template and pipelex-sdk script refuse a malformed input form: a pipe I/O answer whose input form for the selected pipe is malformed where input preparation or the template reads it, or names a kind the SDK does not know, prints Error: the API's pipe I/O answer describes the pipe it selected with a malformed input form. and exits 1, the Python command's sentence. --inputs-template failed with an unexpected TypeError, or, for a field with no name, printed a template under a made-up key and exited 0, and script wrote the script.
pipelex-sdk on PyPI
Changed
InvalidInputValueError names the input (Breaking): the error carries input_name and input_path, as UploadNotAllowedError does, and its constructor takes them as required keyword arguments, InvalidInputValueError(message, input_name=…, input_path=…). Its message names the position and describes the value by its kind (Input "dossier.attachments[1]" holds a number, which no file input takes: …), a malformed data: URL's message no longer quotes the URL, and under allow_uploads=False the message offers only the two forms that pass, an http(s) URL or a pipelex-storage:// reference.
Fixed
pipelex-sdk run --inputs-template and pipelex-sdk script name a malformed input form: a pipe I/O answer with an input-form entry the client refuses prints Error: the API's pipe I/O answer describes the pipe it selected with a malformed input form., and one that names no pipe or carries no input form prints Error: the API's pipe I/O answer does not describe the pipe it selected., as @pipelex/sdk's command does, where both printed that the answer said neither that the method loads nor why it does not.