@platformatic/next 3.65.0 → 3.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +6 -1
  2. package/package.json +8 -7
  3. package/schema.json +1 -1
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { kMetadata } from '@platformatic/foundation'
2
- import { getBasePath, getConfig, getLogger, getNextVersion, getNotifyConfig } from '@platformatic/globals'
2
+ import { getBasePath, getConfig, getLogger, getNextVersion, getNotifyConfig, isBuilding } from '@platformatic/globals'
3
3
  import { resolve as resolvePath } from 'node:path'
4
4
  import { getCacheHandlerPath, NextCapability } from './lib/capability.js'
5
5
  import { loadConfiguration } from './lib/config.js'
@@ -82,6 +82,11 @@ export async function enhanceNextConfig (nextConfig, ...args) {
82
82
  modifications.push(['trailingSlash', 'enabled'])
83
83
  }
84
84
 
85
+ if (typeof nextConfig.deploymentId === 'undefined' && process.env.PLT_DEPLOYMENT_ID && isBuilding({ throwOnMissing: false }) === true) {
86
+ nextConfig.deploymentId = process.env.PLT_DEPLOYMENT_ID
87
+ modifications.push(['deploymentId', 'PLT_DEPLOYMENT_ID'])
88
+ }
89
+
85
90
  if (modifications.length > 0) {
86
91
  nextConfig.env ??= {}
87
92
  nextConfig.env.PLT_NEXT_MODIFICATIONS = JSON.stringify(Object.fromEntries(modifications))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/next",
3
- "version": "3.65.0",
3
+ "version": "3.66.0",
4
4
  "description": "Platformatic Next.js Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -25,9 +25,9 @@
25
25
  "light-my-request": "^6.0.0",
26
26
  "msgpackr": "^1.11.2",
27
27
  "semver": "^7.6.3",
28
- "@platformatic/basic": "3.65.0",
29
- "@platformatic/foundation": "3.65.0",
30
- "@platformatic/globals": "3.65.0"
28
+ "@platformatic/basic": "3.66.0",
29
+ "@platformatic/foundation": "3.66.0",
30
+ "@platformatic/globals": "3.66.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@fastify/reply-from": "^12.0.0",
@@ -44,8 +44,8 @@
44
44
  "next": "^16.1.0",
45
45
  "typescript": "^5.9.3",
46
46
  "ws": "^8.18.0",
47
- "@platformatic/gateway": "3.65.0",
48
- "@platformatic/service": "3.65.0"
47
+ "@platformatic/gateway": "3.66.0",
48
+ "@platformatic/service": "3.66.0"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=22.19.0"
@@ -60,6 +60,7 @@
60
60
  "gen-schema": "node lib/schema.js > schema.json",
61
61
  "gen-types": "json2ts > config.d.ts < schema.json",
62
62
  "build": "npm run gen-schema && npm run gen-types",
63
- "lint": "eslint"
63
+ "lint": "eslint",
64
+ "lint:fix": "eslint --fix"
64
65
  }
65
66
  }
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/next/3.65.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/next/3.66.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Next.js Config",
5
5
  "type": "object",