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

Commit

Permalink
fix: tsbuildinfo positoin and invoke othOptions (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
echosoar committed Feb 26, 2020
1 parent dadea69 commit 043b2b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/faas-util-ts-compile/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const tsCompile = async (baseDir: string, options: {
if (tsConfig.compilerOptions.incremental) {
let tsBuildInfoFile = '';
if (tsConfig.compilerOptions.outDir && existsSync(tsConfig.compilerOptions.outDir)) {
tsBuildInfoFile = resolve(tsConfig.compilerOptions.outDir, '.tsbuildinfo');
tsBuildInfoFile = resolve(baseDir, tsConfig.compilerOptions.outDir, '.tsbuildinfo');
} else {
const tmpDir = ['build', 'dist'].find(dirName => existsSync(resolve(baseDir, dirName)));
tsBuildInfoFile = resolve(tmpDir || baseDir, '.tsbuildinfo');
Expand Down
3 changes: 2 additions & 1 deletion packages/serverless-invoke/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Invoke } from './invoke';
import { InvokeOptions } from './interface';
import { fork } from 'child_process';
import { get, getWssUrl } from './utils';
export const getInvoke = (Invoke, debugPath) => {
export const getInvoke = (Invoke, debugPath, otherOptions?) => {
return async (options: InvokeOptions) => {
if (!options.data || !options.data.length) {
options.data = [{}];
Expand Down Expand Up @@ -70,6 +70,7 @@ export const getInvoke = (Invoke, debugPath) => {
sourceDir: options.sourceDir,
clean: options.clean,
incremental: options.incremental,
...otherOptions
});
return invokeFun.invoke([].concat(options.data));
};
Expand Down

0 comments on commit 043b2b3

Please sign in to comment.