Skip to content

Commit e87a550

Browse files
authored
feat: upgrading all dependencies (#37)
* feat: upgrading all dependencies * fix: upgrading again, replacing glob with tiny-glob * fix: handle errors when no functions exist
1 parent 12b75b4 commit e87a550

File tree

7 files changed

+3488
-3238
lines changed

7 files changed

+3488
-3238
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
],
88
"scripts": {},
99
"devDependencies": {
10-
"lerna": "^3.22.1"
10+
"lerna": "^4.0.0"
1111
}
1212
}

packages/cli/package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,25 @@
4444
"dependencies": {
4545
"@serverlessui/domain-app": "^0.9.0",
4646
"@serverlessui/serverless-app": "^0.9.0",
47-
"aws-cdk": "1.95.1",
47+
"aws-cdk": "1.100.0",
4848
"cosmiconfig": "^7.0.0",
49-
"esbuild": "^0.8.57",
50-
"glob": "^7.1.6",
51-
"gluegun": "^4.6.1"
49+
"esbuild": "^0.11.15",
50+
"gluegun": "^4.6.1",
51+
"tiny-glob": "^0.2.8"
5252
},
5353
"devDependencies": {
54-
"@rollup/plugin-typescript": "^8.1.1",
55-
"@types/jest": "^24.0.18",
56-
"@types/node": "^12.7.11",
57-
"jest": "^24.1.0",
58-
"prettier": "^1.12.1",
59-
"rollup": "^2.38.5",
60-
"ts-jest": "^24.1.0",
61-
"ts-node": "^8.4.1",
62-
"tslint": "^5.12.0",
54+
"@rollup/plugin-typescript": "^8.2.1",
55+
"@types/jest": "^26.0.23",
56+
"@types/node": "^14.14.42",
57+
"jest": "^26.3.3",
58+
"prettier": "^2.2.1",
59+
"rollup": "^2.45.2",
60+
"ts-jest": "^26.5.5",
61+
"ts-node": "^9.1.1",
62+
"tslint": "^6.1.3",
6363
"tslint-config-prettier": "^1.17.0",
64-
"tslint-config-standard": "^8.0.1",
65-
"typescript": "^4.1.3"
64+
"tslint-config-standard": "^9.0.0",
65+
"typescript": "^4.2.4"
6666
},
6767
"jest": {
6868
"preset": "ts-jest",

packages/cli/src/commands/deploy.ts

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
11
import { GluegunCommand } from 'gluegun'
2-
import * as glob from 'glob'
2+
import glob from 'tiny-glob'
33
import * as child_process from 'child_process'
44
import { cosmiconfigSync } from 'cosmiconfig'
55
const serverlessApplicationPath = require.resolve(
66
'@serverlessui/serverless-app'
77
)
88

9+
const readFunctionFiles = async (functionsDir: string): Promise<string> => {
10+
try {
11+
const files = await glob(`${functionsDir}/**/*.{js,ts}`)
12+
return files.join(',')
13+
} catch (e) {
14+
return ''
15+
}
16+
}
17+
918
export const command: GluegunCommand = {
1019
name: 'deploy',
1120
alias: 'd',
1221
description: 'Deploy your website and serverless functions',
13-
run: async toolbox => {
22+
run: async (toolbox) => {
1423
const { parameters } = toolbox
1524

1625
const { options } = parameters
1726

1827
const { functions = './functions', dir = './dist', prod = false } = options
1928

20-
const files = glob.sync(`${functions}/**/*.{js,ts}`)
21-
29+
const apiFiles = await readFunctionFiles(functions)
2230
const explorerSync = cosmiconfigSync('serverlessui')
2331
const configResult = explorerSync.search()
2432

25-
const apiFiles = files.join(',')
2633
const prodCli = prod ? '-c prod=true' : ''
2734

2835
if (apiFiles.length === 0) {
@@ -59,7 +66,7 @@ export const command: GluegunCommand = {
5966
child_process.execSync(
6067
`npx cdk bootstrap ${prodCli} ${domainConfigCli} -c apiEntries="${apiFiles}" -c uiEntry="${dir}" -a "node ${serverlessApplicationPath}"`,
6168
{
62-
stdio: 'inherit'
69+
stdio: 'inherit',
6370
}
6471
)
6572

@@ -69,7 +76,7 @@ export const command: GluegunCommand = {
6976
child_process.execSync(
7077
`npx cdk synth ${prodCli} ${domainConfigCli} -c apiEntries="${apiFiles}" -c uiEntry="${dir}" -a "node ${serverlessApplicationPath}" --quiet`,
7178
{
72-
stdio: 'inherit'
79+
stdio: 'inherit',
7380
}
7481
)
7582

@@ -80,8 +87,8 @@ export const command: GluegunCommand = {
8087
child_process.execSync(
8188
`npx cdk deploy ${prodCli} ${domainConfigCli} -c apiEntries="${apiFiles}" -c uiEntry=${dir} -a "node ${serverlessApplicationPath}" --require-approval never --outputs-file cdk.out/outputs.json`,
8289
{
83-
stdio: 'inherit'
90+
stdio: 'inherit',
8491
}
8592
)
86-
}
93+
},
8794
}

packages/construct/package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@
2828
"prepack": "yarn rimraf && yarn build"
2929
},
3030
"dependencies": {
31-
"@aws-cdk/aws-apigatewayv2": "1.95.1",
32-
"@aws-cdk/aws-apigatewayv2-integrations": "1.95.1",
33-
"@aws-cdk/aws-certificatemanager": "1.95.1",
34-
"@aws-cdk/aws-cloudfront": "1.95.1",
35-
"@aws-cdk/aws-cloudfront-origins": "1.95.1",
36-
"@aws-cdk/aws-lambda-nodejs": "1.95.1",
37-
"@aws-cdk/aws-route53": "1.95.1",
38-
"@aws-cdk/aws-route53-targets": "1.95.1",
39-
"@aws-cdk/aws-s3": "1.95.1",
40-
"@aws-cdk/aws-s3-deployment": "1.95.1",
41-
"@aws-cdk/core": "1.95.1",
31+
"@aws-cdk/aws-apigatewayv2": "1.100.0",
32+
"@aws-cdk/aws-apigatewayv2-integrations": "1.100.0",
33+
"@aws-cdk/aws-certificatemanager": "1.100.0",
34+
"@aws-cdk/aws-cloudfront": "1.100.0",
35+
"@aws-cdk/aws-cloudfront-origins": "1.100.0",
36+
"@aws-cdk/aws-lambda-nodejs": "1.100.0",
37+
"@aws-cdk/aws-route53": "1.100.0",
38+
"@aws-cdk/aws-route53-targets": "1.100.0",
39+
"@aws-cdk/aws-s3": "1.100.0",
40+
"@aws-cdk/aws-s3-deployment": "1.100.0",
41+
"@aws-cdk/core": "1.100.0",
4242
"deepmerge": "^4.2.2"
4343
},
4444
"files": [
@@ -48,10 +48,10 @@
4848
"readme.md"
4949
],
5050
"devDependencies": {
51-
"@rollup/plugin-typescript": "^8.1.1",
51+
"@rollup/plugin-typescript": "^8.2.1",
5252
"@tsconfig/node10": "^1.0.7",
53-
"rollup": "^2.38.5",
54-
"typescript": "^4.1.3"
53+
"rollup": "^2.45.2",
54+
"typescript": "^4.2.4"
5555
},
5656
"gitHead": "4a136cf3777ae864939139dcaee277e9213fe925"
5757
}

packages/domain-application/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
"prepack": "yarn rimraf && yarn build"
2929
},
3030
"dependencies": {
31-
"@aws-cdk/core": "1.95.1",
31+
"@aws-cdk/core": "1.100.0",
3232
"@serverlessui/construct": "^0.9.0"
3333
},
3434
"devDependencies": {
35-
"@rollup/plugin-typescript": "^8.1.1",
35+
"@rollup/plugin-typescript": "^8.2.1",
3636
"@tsconfig/node10": "^1.0.7",
37-
"rollup": "^2.38.5",
38-
"typescript": "^4.1.3"
37+
"rollup": "^2.45.2",
38+
"typescript": "^4.2.4"
3939
},
4040
"files": [
4141
"tsconfig.json",

packages/serverless-application/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@
2828
"prepack": "yarn rimraf && yarn build"
2929
},
3030
"dependencies": {
31-
"@aws-cdk/aws-certificatemanager": "1.95.1",
32-
"@aws-cdk/aws-route53": "1.95.1",
33-
"@aws-cdk/aws-s3-deployment": "1.95.1",
34-
"@aws-cdk/core": "1.95.1",
31+
"@aws-cdk/aws-certificatemanager": "1.100.0",
32+
"@aws-cdk/aws-route53": "1.100.0",
33+
"@aws-cdk/aws-s3-deployment": "1.100.0",
34+
"@aws-cdk/core": "1.100.0",
3535
"@serverlessui/construct": "^0.9.0",
36-
"nanoid": "^3.1.20"
36+
"nanoid": "^3.1.22"
3737
},
3838
"devDependencies": {
39-
"@rollup/plugin-typescript": "^8.1.1",
39+
"@rollup/plugin-typescript": "^8.2.1",
4040
"@tsconfig/node10": "^1.0.7",
41-
"rollup": "^2.38.5",
42-
"typescript": "^4.1.3"
41+
"rollup": "^2.45.2",
42+
"typescript": "^4.2.4"
4343
},
4444
"files": [
4545
"tsconfig.json",

0 commit comments

Comments
 (0)