diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index a008789..8eb95c7 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -4,11 +4,11 @@ on: workflow_dispatch: inputs: version: - description: "The version number to tag and release" + description: 'The version number to tag and release' required: true type: string prerelease: - description: "Release as pre-release" + description: 'Release as pre-release' required: false type: boolean default: false @@ -38,12 +38,16 @@ jobs: version: latest - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Bump version and push commit + - name: Bump version + id: bump + run: | + new_version=$(pnpm version ${{ inputs.version }} --no-git-tag-version | tail -n 1) + echo "version=$new_version" >> $GITHUB_OUTPUT + - name: Commit version bump run: | - pnpm version ${{ inputs.version }} --no-git-tag-version git config --global user.name "${{ github.actor }}" git config --global user.email "${{ github.actor }}@users.noreply.github.com" - git commit -a -m "Bumped v${{ inputs.version }}" + git commit -a -m "Bumped ${{ steps.bump.outputs.version }}" git push origin HEAD:${{ github.ref }} - name: Publish new version run: | @@ -51,4 +55,4 @@ jobs: npm publish --access public --tag ${{ inputs.prerelease == true && 'next' || 'latest' }} - name: Create release notes run: | - npx @matteo.collina/release-notes -a ${{ secrets.GITHUB_TOKEN }} -t v${{ inputs.version }} -r ${{ github.repository }} ${{ github.event.inputs.prerelease == 'true' && '-p' || '' }} -c ${{ github.ref }} + npx @matteo.collina/release-notes -a ${{ secrets.GITHUB_TOKEN }} -t ${{ steps.bump.outputs.version }} -r ${{ github.repository }} ${{ github.event.inputs.prerelease == 'true' && '-p' || '' }} -c ${{ github.ref }} diff --git a/lib/index.js b/lib/index.js index a634405..50a3495 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,4 +1,5 @@ import { create as createService, platformaticService } from '@platformatic/service' +import fp from 'fastify-plugin' import { plugin } from './plugin.js' import { schema } from './schema.js' @@ -8,11 +9,7 @@ export async function php (app, capability) { } export async function create (configOrRoot, sourceOrConfig, context) { - return createService(configOrRoot, sourceOrConfig, { - schema, - applicationFactory: php, - ...context - }) + return createService(configOrRoot, sourceOrConfig, { schema, applicationFactory: fp(php), ...context }) } export { Generator } from './generator.js' diff --git a/package.json b/package.json index 4db02d3..b97ff61 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "dependencies": { "@fastify/static": "^8.2.0", "@platformatic/php-node": "^1.3.0", - "@platformatic/service": "^3.0.0", - "fastify-plugin": "^5.0.0" + "@platformatic/service": "^3.0.2", + "fastify-plugin": "^5.0.1" }, "devDependencies": { "cleaner-spec-reporter": "^0.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b188fa7..a65cb28 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,10 +15,10 @@ importers: specifier: ^1.3.0 version: 1.4.0 '@platformatic/service': - specifier: ^3.0.0 - version: 3.0.1(typescript@5.9.2) + specifier: ^3.0.2 + version: 3.0.2(typescript@5.9.2) fastify-plugin: - specifier: ^5.0.0 + specifier: ^5.0.1 version: 5.0.1 devDependencies: cleaner-spec-reporter: @@ -436,43 +436,43 @@ packages: resolution: {integrity: sha512-TtxJSRD8Ohxp6bKkhrm27JRHAxPczQA7idtcTOMYI+wQRRrfgqxHv1cFbCApcSnNjtXkmzFozn6jQtFrOmbjPQ==} engines: {node: '>=14'} - '@platformatic/basic@3.0.1': - resolution: {integrity: sha512-5etMpQNDZ/udPtKwXZC8/QtetzVzEH00g6POiuX643teUVA/UUyyq/nij9zvlaPMDlZpm9NIjDImX+zJU/mabA==} + '@platformatic/basic@3.0.2': + resolution: {integrity: sha512-EzsTHz0IH74XuNGvlNy/OAjzvuefDdgjTcO+LIy06Ms6uLlIaNDe/auc6oh941iynMv4c2ACAmgoUyqW+0ElVA==} engines: {node: '>=22.18.0'} - '@platformatic/foundation@3.0.1': - resolution: {integrity: sha512-Fx+4HPbtXZ4gGphrZ/WpGkNXSUrCAYkDzBrmK64r0E5wdpzwi6UzM9hirAANGp606xpJTzAWIp2dBbkiHox9qg==} + '@platformatic/foundation@3.0.2': + resolution: {integrity: sha512-74x8tKVFDJTsfWMukODCHaAT1O8RFSHeBJU+jB7B2cRUluALH/Mte7vU6lPB4DkZuQi1SJS27Q8P/orSblQgnA==} engines: {node: '>=22.18.0'} - '@platformatic/generators@3.0.1': - resolution: {integrity: sha512-bnA6iT8r7ARudfy2+56YEFZYrp4ewlYABhBQ0j1fBJS8zYw2c/0GVWMh+8pzX7yrd19HAoLDyzpuuHBjTNEmkA==} + '@platformatic/generators@3.0.2': + resolution: {integrity: sha512-KWvSX7GpLbEsz9jpFlXkbYrtw3JV368gkyFlWAhfEcqiGofyFmlKMoC+3v1fuQ6urr+GsvEx+vJdykw9ro1Rjg==} engines: {node: '>=22.18.0'} '@platformatic/http-metrics@0.2.1': resolution: {integrity: sha512-Gy3NHUQT250MrJMlwzcSniVc+71DmCN1BpsuJcBlxyDpNacsH9axNonNWSNJqcWg8WOrv7tS6miBql2cugVuAg==} - '@platformatic/itc@3.0.1': - resolution: {integrity: sha512-/zpnC3Zfxy9dvjOGxvyT3CD7LxKF5Orq4zr8VR/QAOfsclbd+yO3S8PJuJdNG2+StULR7r7XI0xcbYzzSmPogQ==} + '@platformatic/itc@3.0.2': + resolution: {integrity: sha512-CMiA3h5uDzSUDNDTCMGOxF+pQSN18dEp9QODn78ZkClAXggSPd6ZUyNmyjyhN4OyfF3rnc/1atC4iWpbX9Cp2Q==} engines: {node: '>=22.18.0'} - '@platformatic/metrics@3.0.1': - resolution: {integrity: sha512-nryCa6tqs1Q5eBTIgCuacwbVi4VuCQCHbXtI7oX66/oLAQY0Fytk7u/bt32HEMfSG/WsDRSq9N77AWHs5xNuaA==} + '@platformatic/metrics@3.0.2': + resolution: {integrity: sha512-EFLWD4pups+e+nuDsDUapHcSNrpQi+zbkSoN0YJFUPal4lI+uMbnUIRBRdezm/+8uEagQztTsPXuJcXsQ1RRqw==} engines: {node: '>=22.18.0'} '@platformatic/php-node@1.4.0': resolution: {integrity: sha512-OUSnHIVblCH6fxc/OUM12WdAAtW85g28FfX8DxiKAdJmXY+CKYNZjLa58kHH1HRe/MQ4ijbXwmFZFGtMLKls8g==} engines: {node: '>= 10'} - '@platformatic/scalar-theme@3.0.1': - resolution: {integrity: sha512-buJ+9oxZ3Ql5lXIK51fSawiFDhomdjU5f9IF/T/XnqzSlQCM3IXJZRIEYJKnlEb+32LSv/HYBbcCaHH8Y1pFdg==} + '@platformatic/scalar-theme@3.0.2': + resolution: {integrity: sha512-EOZDS24Am4FWBtdE7GXkqDRTuAunNBz0pwx72f4gPhfm3wFwYAkwbAsNTPSTAW78yey0RGQnOwmFOXroQMQUGw==} engines: {node: '>=22.18.0'} - '@platformatic/service@3.0.1': - resolution: {integrity: sha512-2Z7xFvvYzLryLrkcJk30zH4CfYUAexD1ZyBoaO9o3fkSaoH6Omx9T+RurVidnCuOirCw1qTsS7OXyvYH0t/85A==} + '@platformatic/service@3.0.2': + resolution: {integrity: sha512-2G8qOZgy0S0EBd40hYiJAg142K0JE5E+aO8qulxMAaajEUGveMGq9aPU2vq9NfaDgkh4Y810qOcm1Kubz92xFA==} engines: {node: '>=22.18.0'} - '@platformatic/telemetry@3.0.1': - resolution: {integrity: sha512-IqPk8b/mievm9iIJePa7Bcv/1OyWF6ykdEa7+zFo0UI2iNO5cBC1e72rXH22i+nDABzSNi1xiPlNCxPNTiT7EA==} + '@platformatic/telemetry@3.0.2': + resolution: {integrity: sha512-+coUENLljVm/kCOxl33yzWntq4TH2lvQpMJElxm19ZjDHwsl6VmfSqiX3qYL682rZqaYL3EjC3qmxzgzinQmdg==} engines: {node: '>=22.18.0'} '@protobufjs/aspromise@1.1.2': @@ -1313,8 +1313,8 @@ packages: fastify-plugin@5.0.1: resolution: {integrity: sha512-HCxs+YnRaWzCl+cWRYFnHmeRFyR5GVnJTAaCJQiYzQSDwK9MgJdyAsuL3nh0EWRCYMgQ5MeziymvmAhUHYHDUQ==} - fastify@5.5.0: - resolution: {integrity: sha512-ZWSWlzj3K/DcULCnCjEiC2zn2FBPdlZsSA/pnPa/dbUfLvxkD/Nqmb0XXMXLrWkeM4uQPUvjdJpwtXmTfriXqw==} + fastify@5.6.0: + resolution: {integrity: sha512-9j2r9TnwNsfGiCKGYT0Voqy244qwcoYM9qvNi/i+F8sNNWDnqUEVuGYNc9GyjldhXmMlJmVPS6gI1LdvjYGRJw==} fastparallel@2.4.1: resolution: {integrity: sha512-qUmhxPgNHmvRjZKBFUNI0oZuuH9OlSIOXmJ98lhKPxMZZ7zS/Fi0wRHOihDSz0R1YiIOjxzOY4bq65YTcdBi2Q==} @@ -3063,13 +3063,13 @@ snapshots: '@opentelemetry/semantic-conventions@1.36.0': {} - '@platformatic/basic@3.0.1': + '@platformatic/basic@3.0.2': dependencies: '@fastify/error': 4.2.0 - '@platformatic/foundation': 3.0.1 - '@platformatic/itc': 3.0.1 - '@platformatic/metrics': 3.0.1 - '@platformatic/telemetry': 3.0.1 + '@platformatic/foundation': 3.0.2 + '@platformatic/itc': 3.0.2 + '@platformatic/metrics': 3.0.2 + '@platformatic/telemetry': 3.0.2 execa: 9.6.0 fast-json-patch: 3.1.1 pino: 9.9.2 @@ -3083,7 +3083,7 @@ snapshots: - supports-color - utf-8-validate - '@platformatic/foundation@3.0.1': + '@platformatic/foundation@3.0.2': dependencies: '@fastify/deepmerge': 2.0.2 '@fastify/error': 4.2.0 @@ -3102,13 +3102,13 @@ snapshots: undici: 7.11.0 yaml: 2.8.1 - '@platformatic/generators@3.0.1': + '@platformatic/generators@3.0.2': dependencies: '@fastify/error': 4.2.0 - '@platformatic/foundation': 3.0.1 + '@platformatic/foundation': 3.0.2 change-case-all: 2.1.0 execa: 9.6.0 - fastify: 5.5.0 + fastify: 5.6.0 pino: 9.9.2 undici: 7.15.0 @@ -3116,12 +3116,12 @@ snapshots: dependencies: prom-client: 15.1.3 - '@platformatic/itc@3.0.1': + '@platformatic/itc@3.0.2': dependencies: '@fastify/error': 4.2.0 '@watchable/unpromise': 1.0.2 - '@platformatic/metrics@3.0.1': + '@platformatic/metrics@3.0.2': dependencies: '@platformatic/http-metrics': 0.2.1 prom-client: 15.1.3 @@ -3130,9 +3130,9 @@ snapshots: '@platformatic/php-node@1.4.0': {} - '@platformatic/scalar-theme@3.0.1': {} + '@platformatic/scalar-theme@3.0.2': {} - '@platformatic/service@3.0.1(typescript@5.9.2)': + '@platformatic/service@3.0.2(typescript@5.9.2)': dependencies: '@fastify/accepts': 5.0.2 '@fastify/autoload': 6.3.1 @@ -3142,12 +3142,12 @@ snapshots: '@fastify/static': 8.2.0 '@fastify/swagger': 9.5.1 '@fastify/under-pressure': 9.0.3 - '@platformatic/basic': 3.0.1 - '@platformatic/foundation': 3.0.1 - '@platformatic/generators': 3.0.1 - '@platformatic/metrics': 3.0.1 - '@platformatic/scalar-theme': 3.0.1 - '@platformatic/telemetry': 3.0.1 + '@platformatic/basic': 3.0.2 + '@platformatic/foundation': 3.0.2 + '@platformatic/generators': 3.0.2 + '@platformatic/metrics': 3.0.2 + '@platformatic/scalar-theme': 3.0.2 + '@platformatic/telemetry': 3.0.2 '@scalar/fastify-api-reference': 1.34.4(typescript@5.9.2) '@types/node': 22.18.1 '@types/ws': 8.18.1 @@ -3160,7 +3160,7 @@ snapshots: env-schema: 6.0.1 execa: 9.6.0 fast-json-patch: 3.1.1 - fastify: 5.5.0 + fastify: 5.6.0 fastify-plugin: 5.0.1 graphql: 16.11.0 help-me: 5.0.0 @@ -3179,7 +3179,7 @@ snapshots: - typescript - utf-8-validate - '@platformatic/telemetry@3.0.1': + '@platformatic/telemetry@3.0.2': dependencies: '@fastify/swagger': 9.5.1 '@opentelemetry/api': 1.9.0 @@ -3193,7 +3193,7 @@ snapshots: '@opentelemetry/sdk-node': 0.203.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 2.1.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.36.0 - '@platformatic/foundation': 3.0.1 + '@platformatic/foundation': 3.0.2 fast-uri: 3.1.0 fastify-plugin: 5.0.1 transitivePeerDependencies: @@ -4213,7 +4213,7 @@ snapshots: fastify-plugin@5.0.1: {} - fastify@5.5.0: + fastify@5.6.0: dependencies: '@fastify/ajv-compiler': 4.0.2 '@fastify/error': 4.2.0