1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-01 00:08:27 +01:00
unleash.unleash/src/lib
Thomas Heartman bda5eda224
chore: select enabled environments on project creation (#6869)
This PR adds functionality to the `createProject` function to choose
which environments should be enabled when you create a new project. The
new `environments` property is optional and omitting it will make it
work exactly as it does today.

The current implementation is fairly strict. We have some potential
ideas to make it easier to work with, but we haven't agreed on any yet.
Making it this strict means that we can always relax the rules later.

The rules are (codified in tests):
- If `environments` is not provided, all non-deprecated environments are
enabled
- If `environments` is provided, only the environments listed are
enabled, regardless of whether they're deprecated or not
- If `environments` is provided and is an empty array, the service
throws an error. The API should dilsallow that via the schema anyway,
but this catches it in case it sneaks in some other way.
- If `environments` is provided and contains one or more environments
that don't exist, the service throws an error. While we could ignore
them, that would lead to more complexity because we'd have to also check
that the at least one of the environments is valid. It also leads to
silent ignoring of errors, which may or may not be good for the user
experience.

The API endpoint for this sits in enterprise, so no customer-facing
changes are part of this.
2024-04-18 13:48:40 +02:00
..
__snapshots__ feat: optimize applications overview query (#6883) 2024-04-18 09:02:33 +03:00
addons feat(integrations): ability to add stringified event (#6642) 2024-03-26 09:25:16 +01:00
db feat: optimize applications overview query (#6883) 2024-04-18 09:02:33 +03:00
domain/project-health fix(import): making all imports relative and removing baseUrl (#5847) 2024-01-17 15:33:03 +02:00
error chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
features chore: select enabled environments on project creation (#6869) 2024-04-18 13:48:40 +02:00
middleware feat: added IAuditUser to request with middleware (#6857) 2024-04-18 10:13:40 +02:00
openapi chore: SCIM guard for groups (#6845) 2024-04-12 10:01:57 +01:00
routes feat: added IAuditUser to request with middleware (#6857) 2024-04-18 10:13:40 +02:00
schema feat: implement createdByUserId for all features (#5725) 2023-12-22 14:33:16 +01:00
services chore: SCIM guard for groups (#6845) 2024-04-12 10:01:57 +01:00
types chore: select enabled environments on project creation (#6869) 2024-04-18 13:48:40 +02:00
users chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
util feat: added IAuditUser to request with middleware (#6857) 2024-04-18 10:13:40 +02:00
app.test.ts feat: Make compression middleware optional (#5306) 2023-12-16 08:06:26 +01:00
app.ts feat: added IAuditUser to request with middleware (#6857) 2024-04-18 10:13:40 +02:00
create-config.test.ts
create-config.ts Feat/configure scheduled created by migration (#6821) 2024-04-10 14:12:58 +02:00
default-custom-auth-deny-all.ts chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
internals.ts refactor: rename proxy to frontend api (#6502) 2024-03-11 17:30:46 +01:00
logger.test.ts
logger.ts
metric-events.ts feat: start monitoring total time to update cache (#6517) 2024-03-12 14:27:04 +02:00
metrics.test.ts chore: Establish a baseline for the number of envs disabled per project (#6807) 2024-04-10 08:49:15 +02:00
metrics.ts feat: allow schedulers to run in a single node (#6794) 2024-04-10 11:47:22 +02:00
server-impl.test.ts
server-impl.ts feat: added IAuditUser to request with middleware (#6857) 2024-04-18 10:13:40 +02:00