@clouden-cdk/aws-lambda-typescript
Advanced tools
Comparing version 0.9.4 to 0.9.5
@@ -44,5 +44,12 @@ "use strict"; | ||
typeScriptAlreadyBuilt.push(this.typeScriptSourcePath); | ||
// Run the TypeScript compiler | ||
const tscChild = child_process.spawnSync('npx', ['tsc', '--outDir', this.path], { | ||
cwd: this.typeScriptSourcePath, | ||
// Ensure the deploy path exists | ||
try { | ||
fs.mkdirSync(this.path); | ||
} | ||
catch (err) { | ||
// ignore errors | ||
} | ||
// Run the TypeScript compiler in our own module path, so that our own dependency is used | ||
const tscChild = child_process.spawnSync('npx', ['tsc', '--project', this.typeScriptSourcePath, '--outDir', this.path], { | ||
cwd: __dirname, | ||
stdio: 'inherit', | ||
@@ -68,9 +75,2 @@ }); | ||
// Run NPM package install so that the Lambda function gets all dependencies - unless we've already run it | ||
// Ensure the deploy path exists | ||
try { | ||
fs.mkdirSync(this.path); | ||
} | ||
catch (err) { | ||
// ignore errors | ||
} | ||
// New versions in source path | ||
@@ -77,0 +77,0 @@ const newPackageLockData = readFileSyncOrNull(pathModule.join(this.typeScriptSourcePath, 'package-lock.json'), 'utf8'); |
{ | ||
"name": "@clouden-cdk/aws-lambda-typescript", | ||
"version": "0.9.4", | ||
"version": "0.9.5", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "TypeScript Build Step for AWS CDK Lambda Functions", |
@@ -43,5 +43,12 @@ import { Construct } from '@aws-cdk/core' | ||
// Run the TypeScript compiler | ||
const tscChild = child_process.spawnSync('npx', ['tsc', '--outDir', this.path], { | ||
cwd: this.typeScriptSourcePath, | ||
// Ensure the deploy path exists | ||
try { | ||
fs.mkdirSync(this.path) | ||
} catch (err) { | ||
// ignore errors | ||
} | ||
// Run the TypeScript compiler in our own module path, so that our own dependency is used | ||
const tscChild = child_process.spawnSync('npx', ['tsc', '--project', this.typeScriptSourcePath, '--outDir', this.path], { | ||
cwd: __dirname, | ||
stdio: 'inherit', | ||
@@ -67,9 +74,2 @@ }) | ||
// Ensure the deploy path exists | ||
try { | ||
fs.mkdirSync(this.path) | ||
} catch (err) { | ||
// ignore errors | ||
} | ||
// New versions in source path | ||
@@ -76,0 +76,0 @@ const newPackageLockData = readFileSyncOrNull(pathModule.join(this.typeScriptSourcePath, 'package-lock.json'), 'utf8') |
12953