Migrate dagger.#Secret and dagger.#Stream to new format
- Refactored to keep every transformation of built-in types (e.g. FS, Secret, etc) to/from CUE in the same place (plancontext) - dagger.#Service and dagger.#Secret are now following the new FS-like format (e.g. `_service: id: string`) - Backward compatibility - dagger.#Stream is now an alias for dagger.#Service Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
@@ -68,13 +68,10 @@ func (c importTask) Run(ctx context.Context, pctx *plancontext.Context, s solver
|
||||
return nil, err
|
||||
}
|
||||
|
||||
id := pctx.FS.Register(&plancontext.FS{
|
||||
Result: result,
|
||||
})
|
||||
|
||||
return compiler.NewValueWithContent(id,
|
||||
cue.Str("fs"),
|
||||
cue.Hid("_fs", "alpha.dagger.io/dagger"),
|
||||
cue.Str("id"),
|
||||
)
|
||||
fs := pctx.FS.New(result)
|
||||
out := compiler.NewValue()
|
||||
if err := out.FillPath(cue.ParsePath("fs"), fs.Value()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user