From a14ad892da0fbf1ddd3c16a84742581da8f77007 Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Fri, 24 Feb 2023 00:44:56 +0000 Subject: [PATCH 1/7] Update SPI info --- .spi.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.spi.yml b/.spi.yml index 05c541c..60f5f85 100644 --- a/.spi.yml +++ b/.spi.yml @@ -1,3 +1,5 @@ version: 1 metadata: - authors: “Maintained by the Vapor Core Team with hundreds of contributions from the Vapor Community.” + authors: "Maintained by the Vapor Core Team with hundreds of contributions from the Vapor Community." +external_links: + documentation: "https://api.vapor.codes/sqlitekit/documentation/sqlitekit/" From cd63584ad3b8b92acacf2b2f3f09ef6307207a95 Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Fri, 24 Feb 2023 00:45:18 +0000 Subject: [PATCH 2/7] Update CI --- .github/workflows/test.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b0b24b0..fbcbd41 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -116,3 +116,14 @@ jobs: uses: actions/checkout@v3 - name: Run tests with Thread Sanitizer run: swift test --sanitize=thread + + test-exports: + name: Test exports + runs-on: ubuntu-latest + steps: + - name: Check out Vapor + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Build + run: swift build -Xswiftc -DBUILDING_DOCC From ff06f723bc93ec02afcf691d3cac0fd92616b570 Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Fri, 24 Feb 2023 00:45:45 +0000 Subject: [PATCH 3/7] Update API Docs workflow --- .github/workflows/api-docs.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index d521498..5e20dcc 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -1,18 +1,14 @@ name: deploy-api-docs on: - push: - branches: - - main + push: + branches: + - main jobs: - deploy: - name: api.vapor.codes - runs-on: ubuntu-latest - steps: - - name: Deploy api-docs - uses: appleboy/ssh-action@master - with: - host: vapor.codes - username: vapor - key: ${{ secrets.VAPOR_CODES_SSH_KEY }} - script: ./github-actions/deploy-api-docs.sh + build-and-deploy: + uses: vapor/api-docs/.github/workflows/build-and-deploy-docs-workflow.yml@main + secrets: inherit + with: + package_name: sqlite-kit + modules: SQLiteKit + pathsToInvalidate: /sqlitekit From 22f40764c8388e48b67ea3f0d5c044505525850a Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Fri, 24 Feb 2023 00:46:29 +0000 Subject: [PATCH 4/7] Add DocC bundle --- Sources/SQLiteKit/Docs.docc/index.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Sources/SQLiteKit/Docs.docc/index.md diff --git a/Sources/SQLiteKit/Docs.docc/index.md b/Sources/SQLiteKit/Docs.docc/index.md new file mode 100644 index 0000000..2510cad --- /dev/null +++ b/Sources/SQLiteKit/Docs.docc/index.md @@ -0,0 +1,3 @@ +# ``SQLiteKit`` + +SQLiteKit is a library to provide a simple Swift interface to SQLiteNIO using SQLKit. From d7448823ad916294b631af4eb49db0fd8c7e6939 Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Fri, 24 Feb 2023 00:47:01 +0000 Subject: [PATCH 5/7] Wrap exports --- Sources/SQLiteKit/Exports.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/SQLiteKit/Exports.swift b/Sources/SQLiteKit/Exports.swift index 2c73d7e..581d134 100644 --- a/Sources/SQLiteKit/Exports.swift +++ b/Sources/SQLiteKit/Exports.swift @@ -1,4 +1,8 @@ +#if !BUILDING_DOCC + @_exported import SQLKit @_exported import SQLiteNIO @_exported import AsyncKit @_exported import struct Logging.Logger + +#endif \ No newline at end of file From d5f19553d7760099981fdc6e37cad6c827c9d298 Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Fri, 24 Feb 2023 00:50:06 +0000 Subject: [PATCH 6/7] Fix imports --- Sources/SQLiteKit/SQLiteConnection+SQLKit.swift | 3 +++ Sources/SQLiteKit/SQLiteConnectionSource.swift | 4 ++++ Sources/SQLiteKit/SQLiteDataDecoder.swift | 1 + Sources/SQLiteKit/SQLiteDataEncoder.swift | 3 ++- Sources/SQLiteKit/SQLiteRow+SQLRow.swift | 3 +++ Tests/SQLiteKitTests/SQLiteKitTests.swift | 2 ++ 6 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Sources/SQLiteKit/SQLiteConnection+SQLKit.swift b/Sources/SQLiteKit/SQLiteConnection+SQLKit.swift index 501cfd7..08cc278 100644 --- a/Sources/SQLiteKit/SQLiteConnection+SQLKit.swift +++ b/Sources/SQLiteKit/SQLiteConnection+SQLKit.swift @@ -1,3 +1,6 @@ +import SQLKit +import SQLiteNIO + extension SQLiteDatabase { public func sql() -> SQLDatabase { _SQLiteSQLDatabase(database: self) diff --git a/Sources/SQLiteKit/SQLiteConnectionSource.swift b/Sources/SQLiteKit/SQLiteConnectionSource.swift index 1feb026..2af14bc 100644 --- a/Sources/SQLiteKit/SQLiteConnectionSource.swift +++ b/Sources/SQLiteKit/SQLiteConnectionSource.swift @@ -1,4 +1,8 @@ import Logging +import AsyncKit +import NIOPosix +import SQLiteNIO +import NIOCore public struct SQLiteConnectionSource: ConnectionPoolSource { private let configuration: SQLiteConfiguration diff --git a/Sources/SQLiteKit/SQLiteDataDecoder.swift b/Sources/SQLiteKit/SQLiteDataDecoder.swift index eb3ada9..1f8f32b 100644 --- a/Sources/SQLiteKit/SQLiteDataDecoder.swift +++ b/Sources/SQLiteKit/SQLiteDataDecoder.swift @@ -1,4 +1,5 @@ import Foundation +import SQLiteNIO public struct SQLiteDataDecoder { public init() {} diff --git a/Sources/SQLiteKit/SQLiteDataEncoder.swift b/Sources/SQLiteKit/SQLiteDataEncoder.swift index 348619f..7312438 100644 --- a/Sources/SQLiteKit/SQLiteDataEncoder.swift +++ b/Sources/SQLiteKit/SQLiteDataEncoder.swift @@ -1,5 +1,6 @@ -import NIO +import NIOCore import Foundation +import SQLiteNIO public struct SQLiteDataEncoder { public init() { } diff --git a/Sources/SQLiteKit/SQLiteRow+SQLRow.swift b/Sources/SQLiteKit/SQLiteRow+SQLRow.swift index ce41d8b..18e3069 100644 --- a/Sources/SQLiteKit/SQLiteRow+SQLRow.swift +++ b/Sources/SQLiteKit/SQLiteRow+SQLRow.swift @@ -1,3 +1,6 @@ +import SQLKit +import SQLiteNIO + extension SQLiteRow: SQLRow { public var allColumns: [String] { self.columns.map { $0.name } diff --git a/Tests/SQLiteKitTests/SQLiteKitTests.swift b/Tests/SQLiteKitTests/SQLiteKitTests.swift index 65b7c53..a6fba3f 100644 --- a/Tests/SQLiteKitTests/SQLiteKitTests.swift +++ b/Tests/SQLiteKitTests/SQLiteKitTests.swift @@ -2,6 +2,8 @@ import Logging import SQLiteKit import SQLKitBenchmark import XCTest +import SQLiteNIO +import SQLKit class SQLiteKitTests: XCTestCase { func testSQLKitBenchmark() throws { From db5b12a609309251f8aa2a150177f55a2653dce7 Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Fri, 24 Feb 2023 12:45:25 +0000 Subject: [PATCH 7/7] Add newline --- Sources/SQLiteKit/Exports.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SQLiteKit/Exports.swift b/Sources/SQLiteKit/Exports.swift index 581d134..01c72cc 100644 --- a/Sources/SQLiteKit/Exports.swift +++ b/Sources/SQLiteKit/Exports.swift @@ -5,4 +5,4 @@ @_exported import AsyncKit @_exported import struct Logging.Logger -#endif \ No newline at end of file +#endif