createLazy: wrap nested service groups and accept partial (subset) schemas
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- api
Direzione di ricerca
Start with AsyncDataService.createLazy and synthesizeService in @adobe/data-rpc, which already projects nested services recursively. The issue says an implementation exists on local branch knye/create-lazy-nested (commit c3aa3f1c) but is unpushed, so confirm with maintainers before duplicating it. Done means nested object members are wrapped at any depth, partial: true checks subset schemas, and vitest --project node passes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
AsyncDataService.createLazy only wraps top-level observe / function members. A nested organizational group (an object member with its own properties, e.g. an ECS database's actions / computed) is rejected at compile time and memberKind throws on it at runtime, even though @adobe/data-rpc's synthesizeService already projects nested services recursively from the same kind of schema.
It also requires the schema to describe the loaded service completely. There is no way to lazily expose a curated subset of a larger service without hand-writing a copy of it.
Firefly Studio needs both: each App exposes its main service to runtime agents as a schema-described createLazy instance, so the schema is introspectable immediately while the app's real service (and its lazily-loaded chunk) loads only on an agent's first use. Those main services are nested (ECS actions / computed), and an app exposes less than its full main service.
Proposed change
- Nested groups. Wrap
type: 'object'members recursively at any depth. Resolve every depth from the one root load in a single step, so calls queued before load on members at different depths still run in the order they were made. partial?: boolean(defaultfalse). Whentrue, the gate checks that the loaded service satisfies the schema (every described member exists with an assignable type; a wrong type or unknown member is a compile error). The instance carries only the described members and is typed as the schema (plusserviceName/schema) rather than as the whole service. Withoutpartial, the existing complete-schema gate and the instance type are unchanged, so existing callers' declaration emit is unaffected.
Status
Implemented with tests on branch knye/create-lazy-nested (local, not yet pushed): commit c3aa3f1c, bumping to 0.10.32. tsc -b clean; vitest --project node 148 files / 1808 tests pass. Verified in Firefly Platform via a local store swap: all existing createLazy consumers pass.
- Lingua principale
- TypeScript
- Stelle
- 12
- Fork
- 8
- Merge medio
- 11h 2m
- PR unite (30g)
- 23
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di adobe/data
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
ecs: let kernels issue commands through helpers (component lists, symbol-keyed values, void helpers)Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
I maintainer di solito rispondono entro 1 giorno
-
ecs: an architecture standard (layout, naming, exports, checker, diagrams) for the new ECS samples, and how to distribute itForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
needs-area-label
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 2 giorni
-
Website: the hero tip's video play() has no catch, so a refused play is an unhandled rejectionAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
liberation-data/drivine#615 ·
I maintainer di solito rispondono entro 1 giorno
-
backend bug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
geolens-io/geolens#3639 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
radius-project/ai-extensions#1196 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100