Skip to content

Commit

Permalink
style: format source
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Aug 12, 2024
1 parent f9664e7 commit 93540b5
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion cdk/TestStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { App } from 'aws-cdk-lib'
import { CfnOutput, Duration, aws_lambda as Lambda, Stack } from 'aws-cdk-lib'
import { LambdaSource } from '../src/cdk.js'
import type { PackedLayer } from '../src/layer.js'
import type { TestLambdas } from './packTestLambdas.js'
import { PackedLambdaFn } from '../src/PackedLambdaFn.js'
import type { TestLambdas } from './packTestLambdas.js'

export class TestStack extends Stack {
public constructor(
Expand Down
2 changes: 1 addition & 1 deletion cdk/baseLayer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { packLayer, type PackedLayer } from '../src/layer.js'
import type pJson from '../package.json'
import { packLayer, type PackedLayer } from '../src/layer.js'

const dependencies: Array<
keyof (typeof pJson)['devDependencies'] | keyof (typeof pJson)['dependencies']
Expand Down
2 changes: 1 addition & 1 deletion cdk/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fromEnv } from '@bifravst/from-env'
import { TestApp } from './TestApp.js'
import { pack as packBaseLayer } from './baseLayer.js'
import { packTestLambdas } from './packTestLambdas.js'
import { fromEnv } from '@bifravst/from-env'
const { stackName } = fromEnv({
stackName: 'STACK_NAME',
})(process.env)
Expand Down
8 changes: 4 additions & 4 deletions e2e.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { describe, it } from 'node:test'
import assert from 'node:assert/strict'
import { stackOutput } from '@bifravst/cloudformation-helpers'
import { CloudFormationClient } from '@aws-sdk/client-cloudformation'
import type { StackOutputs } from './cdk/TestStack.js'
import { stackOutput } from '@bifravst/cloudformation-helpers'
import { fromEnv } from '@bifravst/from-env'
import assert from 'node:assert/strict'
import { describe, it } from 'node:test'
import type { StackOutputs } from './cdk/TestStack.js'

void describe('end-to-end tests', () => {
void it('should return an ULID', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/LambdaLogGroup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Construct } from 'constructs'
import { aws_logs as Logs, Names, RemovalPolicy, Stack } from 'aws-cdk-lib'
import { Construct } from 'constructs'

export class LambdaLogGroup extends Construct {
public readonly logGroup: Logs.LogGroup
Expand Down
6 changes: 3 additions & 3 deletions src/PackedLambdaFn.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { Permissions as SettingsPermissions } from '@bifravst/aws-ssm-settings-helpers/cdk'
import {
aws_lambda as Lambda,
Duration,
aws_lambda as Lambda,
Stack,
type aws_logs as Logs,
} from 'aws-cdk-lib'
import { Construct } from 'constructs'
import { LambdaLogGroup } from './LambdaLogGroup.js'
import { Permissions as SettingsPermissions } from '@bifravst/aws-ssm-settings-helpers/cdk'
import type { PackedLambda } from './packLambda.js'
import { LambdaSource } from './LambdaSource.js'
import type { PackedLambda } from './packLambda.js'

/**
* Creates a Lambda function with useful defaults:
Expand Down
4 changes: 2 additions & 2 deletions src/cdk.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './LambdaSource.js'
export * from './LambdaLogGroup.js'
export * from './IoTActionRole.js'
export * from './LambdaLogGroup.js'
export * from './LambdaSource.js'
export * from './PackedLambdaFn.js'
2 changes: 1 addition & 1 deletion src/checkSumOfFiles.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, it } from 'node:test'
import assert from 'node:assert/strict'
import path from 'node:path'
import { describe, it } from 'node:test'
import { checkSumOfFiles } from './checksumOfFiles.js'

void describe('checkSumOfFiles()', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/commonParent.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, it } from 'node:test'
import assert from 'node:assert/strict'
import { describe, it } from 'node:test'
import { commonParent } from './commonParent.js'

void describe('commonParent()', () => {
Expand Down
8 changes: 4 additions & 4 deletions src/module-folder-named-like-handler-bug.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import assert from 'node:assert/strict'
import { it, describe } from 'node:test'
import { ImportFromFolderNameError, packLambda } from './packLambda.js'
import path, { dirname } from 'node:path'
import { fileURLToPath } from 'node:url'
import fs from 'node:fs/promises'
import os from 'node:os'
import path, { dirname } from 'node:path'
import { describe, it } from 'node:test'
import { fileURLToPath } from 'node:url'
import { ImportFromFolderNameError, packLambda } from './packLambda.js'

const tmpDir = os.tmpdir()

Expand Down
4 changes: 2 additions & 2 deletions src/packLambda.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import swc from '@swc/core'
import { createWriteStream } from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { parse } from 'path'
import yazl from 'yazl'
import { checkSumOfFiles } from './checksumOfFiles.js'
import { commonParent } from './commonParent.js'
import { findDependencies } from './findDependencies.js'
import { fileURLToPath } from 'node:url'
import path from 'node:path'

export type PackedLambda = {
id: string
Expand Down
2 changes: 1 addition & 1 deletion src/packLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { spawn } from 'child_process'
import { createWriteStream } from 'fs'
import { copyFile, mkdir, readFile, rm, stat, writeFile } from 'fs/promises'
import { glob } from 'glob'
import { fileURLToPath } from 'node:url'
import path from 'path'
import { ZipFile } from 'yazl'
import { checkSumOfFiles, checkSumOfStrings } from './checksumOfFiles.js'
import { fileURLToPath } from 'node:url'

export type PackedLayer = { layerZipFile: string; hash: string }

Expand Down

0 comments on commit 93540b5

Please sign in to comment.