feat: add Z12/Z13 bind APIs, stock import, and sync docs
Enable auto default sync channels on agent activate, bind-code/phone confirm flows, publish ALTER, and align admin/yuheng docs with the production bind path.
This commit is contained in:
@@ -10,6 +10,7 @@ type MergeResult struct {
|
||||
AddedPages []string
|
||||
AddedEntities []string
|
||||
AddedResources []string
|
||||
AddedFields []string // entity.field
|
||||
UpdatedPages []string
|
||||
UpdatedResources []string
|
||||
}
|
||||
@@ -34,7 +35,13 @@ func MergeInto(base, incoming *Blueprint) (*MergeResult, error) {
|
||||
}
|
||||
for _, e := range incoming.Entities {
|
||||
if idx, ok := entityByName[e.Name]; ok {
|
||||
before := len(base.Entities[idx].Fields)
|
||||
base.Entities[idx] = mergeEntity(base.Entities[idx], e)
|
||||
if len(base.Entities[idx].Fields) > before {
|
||||
for _, f := range base.Entities[idx].Fields[before:] {
|
||||
res.AddedFields = append(res.AddedFields, e.Name+"."+f.Name)
|
||||
}
|
||||
}
|
||||
continue
|
||||
}
|
||||
base.Entities = append(base.Entities, e)
|
||||
@@ -105,6 +112,7 @@ func MergeInto(base, incoming *Blueprint) (*MergeResult, error) {
|
||||
if len(res.AddedPages) == 0 &&
|
||||
len(res.AddedEntities) == 0 &&
|
||||
len(res.AddedResources) == 0 &&
|
||||
len(res.AddedFields) == 0 &&
|
||||
len(res.UpdatedPages) == 0 &&
|
||||
len(res.UpdatedResources) == 0 {
|
||||
return nil, fmt.Errorf("nothing new to publish: provide newly generated pages (and entities/apis if needed) for an existing app")
|
||||
|
||||
Reference in New Issue
Block a user