@nocode-factory/sanity-kit 2.2.0 → 2.2.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocode-factory/sanity-kit",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Outils Studio de NoCode Factory : Pages (liste + board), Composants, Historique",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -180,10 +180,16 @@ function resolveEnvironments(input: NcfKitConfig): NcfEnvironment[] {
180
180
 
181
181
  // La préproduction conventionnelle complète la liste, sauf si le projet en
182
182
  // a déjà déclaré une — sa déclaration explicite fait foi.
183
+ //
184
+ // On compare l'identifiant autant que l'URL : un projet dont le domaine ne
185
+ // suit pas exactement la convention déclare bien un `preprod`, à une autre
186
+ // adresse. En n'écartant que par l'URL, on en ajoutait un second portant le
187
+ // même identifiant, et la configuration devenait invalide.
183
188
  const conventional = conventionalPreprodUrl(preview)
184
189
  const hasPreprod =
185
- declared.some((environment) => environment.url === conventional) ||
186
- input.preprodUrl === false
190
+ declared.some(
191
+ (environment) => environment.url === conventional || environment.id === 'preprod',
192
+ ) || input.preprodUrl === false
187
193
 
188
194
  const preprod =
189
195
  conventional && !hasPreprod
package/src/version.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Version du kit, rapportée au service pour savoir quels projets tournent sur
3
3
  * quelle version. Tenue à jour avec `package.json`.
4
4
  */
5
- export const KIT_VERSION = '2.2.0'
5
+ export const KIT_VERSION = '2.2.1'