Skip to content

0.5.0 migration notes

@archont561/qgis-sdk-ui 0.1.0 (decision-47 point 3). A new package rather than a change to this one; see Components. This package gains nothing for it except being its peer. qgis-sdk new --web opts in through one import (--ui-dependency pins it); release.py knows the ui scope and refuses a UI release whose bridge peer range excludes the workspace bridge. 0.1.0 adds the Python keyword spellings to the elements (.options on <qgis-choice> with .choices as the alias, required on every input, cancellable on <qgis-job-progress>, text on <qgis-run-button>, .of on <qgis-field-picker>); nothing existing changed meaning.

Processing from a page (decision-64). Four new host operations (algorithms.providers/list/describe/run) and two grants (algorithms.read, algorithms.run) move HOST_FINGERPRINT to sha256:16790dc8…; HOST_SCHEMA_VERSION and BRIDGE_PROTOCOL_VERSION stay at 1. ./host also exports the new shapes (AlgorithmInfo, AlgorithmSummary, ParameterInfo, OutputInfo, ProviderInfo, RunOutput, RunResult, their request types) and the root exports runAlgorithm, outputsByName and the Processing value aliases. A bare {"type": "object"} in a declaration now renders as Record<string, unknown> instead of an empty interface. qgis-sdk new --web writes web/src/processing.schema.ts, grants algorithms.run and extends the bindings script with qgis-sdk processing generate --check; an existing project adds the file with that command and the grant by hand.

Stores and two more adapters (decision-47). The root now exports the four stores; ./react is rewritten over them with the same exported names and types (react.test.ts passes unchanged) plus useStore, useForm and useHostQuery; ./vue and ./svelte are new subpaths behind optional peers. A ./react-only consumer’s bundle gains no Vue or Svelte code. The scaffold’s web templates render a form from the declaration and a layer picker over layers.list, so qgis-sdk new --web now writes grants = ["layers.read"] into [tool.qgis-sdk.web]; an existing project that adopts layersQuery adds that grant by hand or sees the store’s refused state.

Parameter kinds on the wire (decision-46 point 1). A declared input the Python side marked (LayerInput, FileInput(filters=), Range(min, max), …) carries "x-qgis-sdk": { kind, ...attributes } in its request schema. validateAgainstSchema reads past the keyword (any other x- keyword is still refused), a regenerated bridge.schema.ts documents each such field with /** @qgis-sdk-kind <kind> */ and its CONTRACT_FINGERPRINT moves - regenerate it with qgis-sdk bridge generate. FileRef.kind is now "file" | "directory" (HostAuthority.grant_directory mints the latter), so HOST_FINGERPRINT moved to sha256:af91deac…; HOST_SCHEMA_VERSION and BRIDGE_PROTOCOL_VERSION stay at 1. A page passes the FileRef it received from the host where an action declares FileInput(); the Python handler receives it as a FileRef.