From 62b48857125c8440844dc140594841c047b200ab Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Fri, 24 Feb 2023 17:07:17 +0000 Subject: [PATCH 1/6] Update SPI info --- .spi.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.spi.yml b/.spi.yml index 05c541c..04c7ade 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/fluentpostgresdriver/documentation/fluentpostgresdriver/" From 50692d767723efd6f49da36937d6b39335c2b3c1 Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Fri, 24 Feb 2023 17:07:57 +0000 Subject: [PATCH 2/6] 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..a7122a8 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: fluent-postgres-driver + modules: FluentPostgresDriver + pathsToInvalidate: /fluentpostgresdriver From 0b14e5a0be833e959602c5642421fa65ff775d01 Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Fri, 24 Feb 2023 17:08:59 +0000 Subject: [PATCH 3/6] 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 e3c508f..5fde29c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -160,3 +160,14 @@ jobs: uses: actions/checkout@v3 - name: Run all tests run: swift test + + 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 754f5436aa9ad3815d464b22fed9f783aefada44 Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Fri, 24 Feb 2023 17:10:35 +0000 Subject: [PATCH 4/6] Add DocC bundle --- Sources/FluentPostgresDriver/Docs.docc/index.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Sources/FluentPostgresDriver/Docs.docc/index.md diff --git a/Sources/FluentPostgresDriver/Docs.docc/index.md b/Sources/FluentPostgresDriver/Docs.docc/index.md new file mode 100644 index 0000000..e6f927d --- /dev/null +++ b/Sources/FluentPostgresDriver/Docs.docc/index.md @@ -0,0 +1,3 @@ +# ``FluentPostgresDriver`` + +FluentPostgresDriver is a package to integrate PostgresNIO and and PostrgresKit with FluentKit to make it easy to use and write database operations in Swift. \ No newline at end of file From 08c9034b120bf8a5ec6f379b048c614cd493486c Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Fri, 24 Feb 2023 17:11:45 +0000 Subject: [PATCH 5/6] Wrap exports --- Sources/FluentPostgresDriver/Exports.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/FluentPostgresDriver/Exports.swift b/Sources/FluentPostgresDriver/Exports.swift index 0febffa..189bd72 100644 --- a/Sources/FluentPostgresDriver/Exports.swift +++ b/Sources/FluentPostgresDriver/Exports.swift @@ -1,8 +1,12 @@ +#if !BUILDING_DOCC + @_exported import FluentKit @_exported import PostgresKit +#endif + extension DatabaseID { public static var psql: DatabaseID { return .init(string: "psql") } -} +} \ No newline at end of file From 68f3ea62cfcf717bfd0f27cc0340824496c25b03 Mon Sep 17 00:00:00 2001 From: Tim <0xtimc@gmail.com> Date: Fri, 24 Feb 2023 17:15:04 +0000 Subject: [PATCH 6/6] Fix imports --- Sources/FluentPostgresDriver/Exports.swift | 5 +++++ .../FluentPostgresDriver/FluentPostgresConfiguration.swift | 3 +++ Sources/FluentPostgresDriver/FluentPostgresDatabase.swift | 1 + Sources/FluentPostgresDriver/FluentPostgresDriver.swift | 2 ++ Sources/FluentPostgresDriver/PostgresError+Database.swift | 1 + Sources/FluentPostgresDriver/PostgresRow+Database.swift | 3 +++ 6 files changed, 15 insertions(+) diff --git a/Sources/FluentPostgresDriver/Exports.swift b/Sources/FluentPostgresDriver/Exports.swift index 189bd72..aa67deb 100644 --- a/Sources/FluentPostgresDriver/Exports.swift +++ b/Sources/FluentPostgresDriver/Exports.swift @@ -3,6 +3,11 @@ @_exported import FluentKit @_exported import PostgresKit +#else + +import FluentKit +import PostgresKit + #endif extension DatabaseID { diff --git a/Sources/FluentPostgresDriver/FluentPostgresConfiguration.swift b/Sources/FluentPostgresDriver/FluentPostgresConfiguration.swift index 7d04ff6..d23a3a3 100644 --- a/Sources/FluentPostgresDriver/FluentPostgresConfiguration.swift +++ b/Sources/FluentPostgresDriver/FluentPostgresConfiguration.swift @@ -1,4 +1,7 @@ import Logging +import FluentKit +import NIOCore +import PostgresKit extension DatabaseConfigurationFactory { public static func postgres( diff --git a/Sources/FluentPostgresDriver/FluentPostgresDatabase.swift b/Sources/FluentPostgresDriver/FluentPostgresDatabase.swift index e5c58ef..5614899 100644 --- a/Sources/FluentPostgresDriver/FluentPostgresDatabase.swift +++ b/Sources/FluentPostgresDriver/FluentPostgresDatabase.swift @@ -1,5 +1,6 @@ import FluentSQL import Logging +import PostgresKit struct _FluentPostgresDatabase { let database: PostgresDatabase diff --git a/Sources/FluentPostgresDriver/FluentPostgresDriver.swift b/Sources/FluentPostgresDriver/FluentPostgresDriver.swift index 197d7d1..424bda3 100644 --- a/Sources/FluentPostgresDriver/FluentPostgresDriver.swift +++ b/Sources/FluentPostgresDriver/FluentPostgresDriver.swift @@ -1,4 +1,6 @@ import Logging +import FluentKit +import PostgresKit enum FluentPostgresError: Error { case invalidURL(String) diff --git a/Sources/FluentPostgresDriver/PostgresError+Database.swift b/Sources/FluentPostgresDriver/PostgresError+Database.swift index 4df360e..5eebb88 100644 --- a/Sources/FluentPostgresDriver/PostgresError+Database.swift +++ b/Sources/FluentPostgresDriver/PostgresError+Database.swift @@ -1,4 +1,5 @@ import FluentSQL +import PostgresKit extension PostgresError: DatabaseError { public var isSyntaxError: Bool { diff --git a/Sources/FluentPostgresDriver/PostgresRow+Database.swift b/Sources/FluentPostgresDriver/PostgresRow+Database.swift index 53ec7c7..48e115f 100644 --- a/Sources/FluentPostgresDriver/PostgresRow+Database.swift +++ b/Sources/FluentPostgresDriver/PostgresRow+Database.swift @@ -1,3 +1,6 @@ +import PostgresKit +import FluentKit + extension PostgresRow { internal func databaseOutput(using decoder: PostgresDataDecoder) -> DatabaseOutput { _PostgresDatabaseOutput(