Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

fix: invoke source map #52

Merged
merged 24 commits into from
Feb 21, 2020
Merged

fix: invoke source map #52

merged 24 commits into from
Feb 21, 2020

Conversation

echosoar
Copy link
Member

@echosoar echosoar commented Feb 19, 2020

  • 修复invoke时sourceMap的root路径问题
  • faas-cli 无命令时显示帮助
  • faas 有个边界问题
  • 在开发调试时,不生成 tsconfig

@codecov-io
Copy link

codecov-io commented Feb 19, 2020

Codecov Report

Merging #52 into master will decrease coverage by 1.55%.
The diff coverage is 38.7%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #52      +/-   ##
==========================================
- Coverage   70.87%   69.32%   -1.56%     
==========================================
  Files          69       69              
  Lines        1940     1946       +6     
  Branches      183      183              
==========================================
- Hits         1375     1349      -26     
- Misses        531      563      +32     
  Partials       34       34
Impacted Files Coverage Δ
packages/serverless-invoke/src/core.ts 73.13% <ø> (ø) ⬆️
packages/faas-cli-plugin-package/src/index.ts 57.44% <38.7%> (-8.49%) ⬇️
packages/faas-cli-plugin-package/src/utils.ts 21.42% <0%> (-50%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0bbeafb...fb79e75. Read the comment docs.

} else {
await tsCompile(this.servicePath, {
clean: true,
tsConfigName: 'tsconfig.json',
source: this.options.sourceDir || 'src',
source: resolve(this.servicePath, 'src'),
Copy link
Member

Choose a reason for hiding this comment

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

这里原来好像允许改的。。这样岂不是不能了么。。

await tsIntegrationProjectCompile(this.servicePath, {
sourceDir: this.options.sourceDir || 'src',
const tsConfig = await tsIntegrationProjectCompile(this.servicePath, {
sourceDir: resolve(this.servicePath, 'src'),
Copy link
Member

Choose a reason for hiding this comment

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

这里可能也是

tsConfig.compilerOptions.incremental = options.incremental;
}
if (tsConfig.compilerOptions.incremental) {
tsConfig.compilerOptions.tsBuildInfoFile = resolve(baseDir, '.tsbuildinfo');
Copy link
Member

Choose a reason for hiding this comment

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

这里我觉得有点问题。。。. tsbuildinfo 文件应该不能在根目录,得在build目录,不然不会被清理,一直被增量。

join(baseDir, 'tsconfig_integration_faas.json'),
join(this.buildDir, 'tsconfig.json'),
opts
);
} else {
// TODO 重构 midway-bin 不生成 tsconfig
Copy link
Member

Choose a reason for hiding this comment

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

这个TODO 可以去掉了。 。。

} else {
// TODO 重构 midway-bin 不生成 tsconfig
await tsCompile(baseDir, {
source: 'src',
source: resolve(baseDir, 'src'),
Copy link
Member

Choose a reason for hiding this comment

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

总觉得这里应该读传相对路径,要绝对路径也只在最底层处理

@czy88840616 czy88840616 merged commit 9149d2a into master Feb 21, 2020
@czy88840616 czy88840616 deleted the fix/invoke-sourceMap branch February 21, 2020 05:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants