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 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 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/" 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. diff --git a/Sources/SQLiteKit/Exports.swift b/Sources/SQLiteKit/Exports.swift index 2c73d7e..01c72cc 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 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 {