Commit Graph

19040 Commits

Author SHA1 Message Date
Andre Wanlin 70b96a8d65 Merge branch 'backstage:master' into topic/add-entity-pull-requests 2021-11-12 13:25:26 -06:00
Patrik Oldsberg 1cf00cbe33 cli: added test for backendPlugin create factory
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 18:19:33 +01:00
Patrik Oldsberg 033f6abfce cli: add tests for frontendPlugin create factory + minor fixes
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 18:15:03 +01:00
Tim Jacomb 26eb174ce8 Skip empty file names during scaffolder
Signed-off-by: Tim Jacomb <tim.jacomb@hmcts.net>
2021-11-12 16:02:50 +00:00
Patrik Oldsberg 367e09e31f cli: refactor to simplify codeowners logic
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 16:47:22 +01:00
Patrik Oldsberg 0ebcf168d2 cli: common helper for executing plugin package templates
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 16:47:22 +01:00
Mike Lewis 06934f2f52 catalog-backend: ensure subqueries are isolated from one another
Ensures that independent calls to `parseFilter` are isolated from one
another, by always wrapping additional clauses to the query in
`andWhere`. I think that the bug in the previous incarnation is strictly
theoretical, as long as parseFilters is only called once for a given
filter (which today, it is). When authorization lands in catalog-backend
though, we'll need to call it multiple times - once to add the authz
filters, and once to add the filters requested by the caller, which
would expose this bug.

Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
2021-11-12 15:45:11 +00:00
Patrik Oldsberg 142cd41b7e cli: refactor create factories to use common prompts
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 16:24:41 +01:00
Patrik Oldsberg 1c0ac6291c cli: added create backend plugin factory
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 16:24:41 +01:00
Ben Lambert d0ea59bee8 Merge pull request #7998 from awanlin/topic/improve-azure-devops-date-handling
Improved Azure DevOps Date Handling
2021-11-12 16:02:49 +01:00
Patrik Oldsberg 7b8d432de5 cli: complete frontendPlugin create factory implementation
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 15:54:02 +01:00
Patrik Oldsberg 248c8eaa25 cli: allow empty create option values
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 15:33:45 +01:00
Patrik Oldsberg 602cf4d80d cli: run templating tasks in strict mode
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 15:24:08 +01:00
Patrik Oldsberg f8adebde77 cli: build out task lib a bit with command execution, adding deps
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 15:23:32 +01:00
Patrik Oldsberg e04cce9cdb cli: wrap create factories up in a bit more built-in logging
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 15:22:11 +01:00
Mike Lewis e84abaccaf authz: move permission-common to plugins
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
2021-11-12 14:18:10 +00:00
Mike Lewis f816f68bbe authz: add PermissionClient TODO for better type-safety
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
2021-11-12 14:18:10 +00:00
Mike Lewis f0124d29a9 authz: use zod to validate responses in PermissionClient
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
2021-11-12 14:18:10 +00:00
Mike Lewis 0c0cf0ddaf build(deps): add dependency on zod in permission-common
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
2021-11-12 14:18:06 +00:00
Mike Lewis 20d3ef45e2 authz: further relaxation of PermissionCriteria type
The PermissionCriteria type is actually intended to be the type used to
represent criteria for arbitrary queries, whether they are expressed as
PermissionConditions or plugin-specific query fragments. As such we
don't need to refer to the PermissionCondition type at all - we can
stick with the TQuery type parameter as the type for the unwrapped
query fragment.

Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
2021-11-12 14:17:16 +00:00
Mike Lewis ea77555fe3 authz: restrict type of PermissionCondition params
We need a guarantee that we'll be able to spread permission condition
params when applying the condition via the `apply` or `toQuery` methods
on the corresponding rule. As such, we need to enforce that the TParams
type parameter is an array.

This commit also supplies a default value of unknown[] for this type
param to make it a bit more convenient to use the type in situations
where the type of the params is not important.

Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
2021-11-12 14:17:16 +00:00
Mike Lewis 00448f02e6 authz: fix PermissionCondition type parameter
The type parameter for PermissionCondition refers to the type of the
condition params, not the type of the leaf entries in a
PermissionCriteria object.

It should be safe to always set this type parameter to `unknown[]` in
this case. Each PermissionCondition is will have different parameters,
therefore we just need to enforce that the params is always an array of
unknown.

Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
2021-11-12 14:17:16 +00:00
Mike Lewis 59702b2bde authz: do not export AuthorizeResult as type
Since AuthorizeResult is an enum, exporting it via `export type` is
incorrect - it means we can refer to the AuthorizeResult type, but not
use it or its members as values.

Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
2021-11-12 14:17:16 +00:00
Tim Hansen dce7237d46 PermissionCriteria generic
Signed-off-by: Tim Hansen <timbonicus@gmail.com>
2021-11-12 14:17:15 +00:00
Tim Hansen c00b4d3829 Remove enum, package fixes
Signed-off-by: Tim Hansen <timbonicus@gmail.com>
2021-11-12 14:17:15 +00:00
Tim Hansen e6805978d8 Remove JSON types, add not criteria
Signed-off-by: Tim Hansen <timbonicus@gmail.com>
2021-11-12 14:17:15 +00:00
Tim Hansen 7bba7a8998 Add permission-common package
Signed-off-by: Tim Hansen <timbonicus@gmail.com>
2021-11-12 14:17:14 +00:00
Andre Wanlin 8b5bd7e0d5 Updated changeset to minor for common
Signed-off-by: Andre Wanlin <awanlin@rapidrtc.com>
2021-11-12 08:06:45 -06:00
Mike Lewis 6f8e995145 Merge pull request #8023 from backstage/bump-api-documenter
build(deps): bump @microsoft/api-documenter to v7.13.68
2021-11-12 14:04:11 +00:00
Andre Wanlin a06242e5cc Refactored route names
Signed-off-by: Andre Wanlin <awanlin@rapidrtc.com>
2021-11-12 08:03:19 -06:00
Ben Lambert 867ea81d15 Add changeset
Signed-off-by: Ben Lambert <blam@spotify.com>
2021-11-12 14:47:31 +01:00
Andre Wanlin f5a5657d9a Merge branch 'backstage:master' into topic/improve-azure-devops-date-handling 2021-11-12 07:38:59 -06:00
Andre Wanlin 7c3297c71a Merge branch 'backstage:master' into topic/add-entity-pull-requests 2021-11-12 07:38:47 -06:00
Fredrik Adelöw b46cd73035 Merge pull request #7612 from backstage/freben/recurring-tasks
Add support for distributed tasks
2021-11-12 14:32:30 +01:00
Ben Lambert 7f839ddbb6 Merge pull request #8021 from SDA-SE/feat/dev-switch-theme
Add theme switcher to sidebar of dev app
2021-11-12 14:29:45 +01:00
Mike Lewis f3bd8f4757 build(deps): bump @microsoft/api-documenter to v7.13.68
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
2021-11-12 12:18:22 +00:00
Patrik Oldsberg 14e8162d19 cli: added temp dir utility to create context
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 13:08:25 +01:00
Emma Indal c1017c8138 update changeset
Signed-off-by: Emma Indal <emmai@spotify.com>
2021-11-12 12:43:03 +01:00
Emma Indal 45f3a67c4c add focused prop to both SearchBar and SearchBarBase components + storybook example
Signed-off-by: Emma Indal <emmai@spotify.com>
2021-11-12 12:39:31 +01:00
Patrik Oldsberg 84936dbcbe cli: cmd options and discovery for additional creation context
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 12:03:23 +01:00
Camila Belo eec57229eb fix(techdocs-cli): remove quote from volume
Ref: https://github.com/backstage/techdocs-cli/pull/162
Co-authored-by: Emma Indal <emma.indahl@gmail.com>
Signed-off-by: Camila Belo <camilaibs@gmail.com>
2021-11-12 11:51:34 +01:00
Patrik Oldsberg 3ca0d3368e cli: display create prompt messages in blue and errors in red
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 11:31:53 +01:00
Patrik Oldsberg 55e58c5568 cli: moved bulk of create implementation over to lib
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 11:24:40 +01:00
Patrik Oldsberg 2ca3f5ff4c cli: added support for dynamically discovering create options
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 11:22:30 +01:00
Oliver Sand 58a4e67ded Add theme switcher to sidebar of dev app
Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
2021-11-12 11:16:19 +01:00
Patrik Oldsberg 0a66597793 Merge pull request #8000 from marleypowell/marley/7999-storybook-fix
fix: Fixed issue with running a subset of stories caused by incorrectly resolved paths.
2021-11-12 11:04:23 +01:00
Patrik Oldsberg e607456dbc cli: create command factory foundations
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 11:00:46 +01:00
Patrik Oldsberg 8acb23b29f cli: initial create command
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-11-12 11:00:45 +01:00
Johan Haals 96e9afce25 Merge pull request #8016 from backstage/dependabot/npm_and_yarn/types/nunjucks-3.2.0
build(deps-dev): bump @types/nunjucks from 3.1.5 to 3.2.0
2021-11-12 10:56:45 +01:00
Johan Haals f3bf71b925 Merge pull request #8015 from backstage/dependabot/npm_and_yarn/types/jquery-3.5.8
build(deps-dev): bump @types/jquery from 3.5.5 to 3.5.8
2021-11-12 10:56:21 +01:00