Skip to content

feat(all): 多数据源场景,默认拆分api-lock.json到每个数据源目录下#263

Merged
wilsoncook merged 1 commit intomasterfrom
feat1/mx/master
Jan 13, 2022
Merged

feat(all): 多数据源场景,默认拆分api-lock.json到每个数据源目录下#263
wilsoncook merged 1 commit intomasterfrom
feat1/mx/master

Conversation

@z979054461
Copy link
Copy Markdown
Collaborator

@z979054461 z979054461 commented Dec 31, 2021

What kind of change does this PR introduce(这个 PR 引入了什么样的变化)?

  • Bugfix(修正错误)
  • Feature(新功能)
  • Refactor(重构)
  • Build-related changes(与构建相关的更改)
  • Other, please describe(其他,请描述):

Does this PR introduce a breaking change(这次 PR 引入了一个重大变化吗)?

  • Yes(是)
  • No(否)

If yes, please describe the impact and migration path for existing applications(如果是,请描述现有应用程序的影响和迁移路径):
多数据源的场景,打开vscode检测api-lock.json之后会将其备份为api-lock.json.bak,然后在数据源子目录下重新生成独立的api-lock.json

The PR fulfills these requirements(PR 符合以下要求)

  • All tests are passing(所有测试都通过)

Other information(其他信息)

1、有一个破坏性变更,用户如果覆盖了pontTemplate.ts文件中的以下函数,需要适应性调整:
getOriginFileStructuresgetMultipleOriginsFileStructuresgetLockContent
2、不再兼容api.lock(实际上部分代码也没有做兼容),全部以api-lock.json这个文件为准

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

lockFile = path.join(this.currConfig.outDir, 'api.lock');
}

async readLockFile(): Promise<Array<StandardDataSource>> {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readLockFile既返回Promise,又返回原始非Promise,类型要明确下

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里返回值就是Promise,会resolve一个StandardDataSource类型的数组

@wilsoncook wilsoncook merged commit 16f3446 into master Jan 13, 2022
@wilsoncook wilsoncook deleted the feat1/mx/master branch January 13, 2022 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants