Skip to content

Commit

Permalink
Merge branch 'master' into bucket-preferences-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
fiskus authored Dec 27, 2024
2 parents 9a33ed8 + aa14ad8 commit 046edad
Show file tree
Hide file tree
Showing 21 changed files with 297 additions and 421 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/js-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
run: npm run bundlewatch
- uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/py-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
- name: Run Pytest
run: |
pytest --cov=api/python api/python
- uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
OS: ${{ matrix.os }}
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
- name: Pytest
run: |
pytest --cov=lambdas lambdas/${{ matrix.path }}
- uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
LAMBDA: ${{ matrix.path }}
Expand Down
2 changes: 1 addition & 1 deletion catalog/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module.exports = {
'max-classes-per-file': 0,
'no-console': 2,
'no-nested-ternary': 1,
'no-restricted-globals': [2, "event", "location", "stop"],
'no-restricted-globals': [2, 'event', 'location', 'stop'],
'no-underscore-dangle': [2, { allow: ['_', '__', '__typename', '_tag'] }],
'prefer-arrow-callback': [2, { allowNamedFunctions: true }],
'prefer-template': 2,
Expand Down
1 change: 1 addition & 0 deletions catalog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- markdownlint-disable line-length -->

# Changelog

Changes are listed in reverse chronological order (newer entries at the top).
Expand Down
6 changes: 3 additions & 3 deletions catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ $ npm start
### Fetch

- An accurate check for a successful fetch() would include checking that
the promise resolved, then checking that the Response.ok property has
a value of true. The code would look something like this:
[msdn fetch doc](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch)
the promise resolved, then checking that the Response.ok property has
a value of true. The code would look something like this:
[msdn fetch doc](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch)

## Deployment (for Quilt internal usage)

Expand Down
4 changes: 2 additions & 2 deletions catalog/app/containers/Admin/Status/Reports.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,14 @@ export default function Reports({
invariant(queryResult.data?.status?.__typename !== 'Unavailable', 'Status unavailable')

const rows = (
pause ? firstPage : queryResult.data?.status?.reports.page ?? fallbacks.rows
pause ? firstPage : (queryResult.data?.status?.reports.page ?? fallbacks.rows)
) as StatusReport[]
if (rows !== fallbacks.rows) fallbacks.rows = rows

const isFiltered = !R.equals(defaults.filter, variables.filter)

const rowCount = isFiltered
? queryResult.data?.status?.reports.total ?? fallbacks.rowCount
? (queryResult.data?.status?.reports.total ?? fallbacks.rowCount)
: total
if (rowCount !== fallbacks.rowCount) fallbacks.rowCount = rowCount

Expand Down
12 changes: 6 additions & 6 deletions catalog/app/containers/Admin/UsersAndRoles/SsoConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,12 @@ function Data({ children, close }: DataProps) {
formApi: !deleting
? formApi
: deleting === true
? { ...formApi, submitting: true }
: {
...formApi,
submitError: deleting[FF.FORM_ERROR] || formApi.submitError,
submitFailed: true,
},
? { ...formApi, submitting: true }
: {
...formApi,
submitError: deleting[FF.FORM_ERROR] || formApi.submitError,
submitFailed: true,
},
close,
ssoConfig: data.admin?.ssoConfig,
})
Expand Down
4 changes: 2 additions & 2 deletions catalog/app/containers/Bucket/PackageCopyDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ function DialogForm({
workflow.slug === workflows.notAvailable
? null
: workflow.slug === workflows.notSelected
? ''
: workflow.slug,
? ''
: workflow.slug,
},
src: {
bucket,
Expand Down
16 changes: 8 additions & 8 deletions catalog/app/containers/Bucket/PackageDialog/FilesInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ const computeEntries = ({
state = !a.hash.ready
? ('hashing' as const)
: R.equals(a.hash.value, hash)
? ('unchanged' as const)
: ('modified' as const)
? ('unchanged' as const)
: ('modified' as const)
}
return { state, type, path, size: a.size, meta }
}
Expand All @@ -214,8 +214,8 @@ const computeEntries = ({
f === EMPTY_DIR_MARKER
? ('hidden' as const)
: S3FilePicker.isS3File(f)
? ('s3' as const)
: ('local' as const)
? ('s3' as const)
: ('local' as const)
return acc.concat({ state: 'added', type, path, size: f.size, meta: f.meta })
}, [] as IntermediateEntry[])
const entries: IntermediateEntry[] = [...existingEntries, ...addedEntries]
Expand Down Expand Up @@ -1618,10 +1618,10 @@ export function FilesInput({
disabled // eslint-disable-line no-nested-ternary
? 'disabled'
: error // eslint-disable-line no-nested-ternary
? 'error'
: warn.upload || warn.s3 || warn.count
? 'warn'
: undefined
? 'error'
: warn.upload || warn.s3 || warn.count
? 'warn'
: undefined
}
>
{title}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,8 @@ function PackageCreationForm({
workflow.slug === workflows.notAvailable
? null
: workflow.slug === workflows.notSelected
? ''
: workflow.slug,
? ''
: workflow.slug,
},
src: {
entries: allEntries,
Expand Down
4 changes: 2 additions & 2 deletions catalog/app/containers/Bucket/PackageTree/PackageTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ function DirDisplay({
const downloadLabel = !slt.isEmpty // eslint-disable-line no-nested-ternary
? 'Download selected'
: path
? 'Download sub-package'
: 'Download package'
? 'Download sub-package'
: 'Download package'
const downloadPath =
path && slt.isEmpty
? `package/${bucket}/${name}/${hash}/${path}`
Expand Down
4 changes: 2 additions & 2 deletions catalog/app/containers/Bucket/Upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ export function LocalFolderInput({
disabledInternal // eslint-disable-line no-nested-ternary
? 'disabled'
: error // eslint-disable-line no-nested-ternary
? 'error'
: undefined
? 'error'
: undefined
}
>
{title}
Expand Down
26 changes: 10 additions & 16 deletions catalog/app/containers/Search/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export type PackagesFilterState = FilterState<typeof PackagesSearchFilterIO>
export type FilterStateForResultType<T extends ResultType> = T extends ResultType.S3Object
? ObjectsFilterState
: T extends ResultType.QuiltPackage
? PackagesFilterState
: never
? PackagesFilterState
: never

export type ObjectsSearchFilter = Model.GQLTypes.ObjectsSearchFilter
export type PackagesSearchFilter = Model.GQLTypes.PackagesSearchFilter
Expand Down Expand Up @@ -106,13 +106,8 @@ interface PredicateIO<Tag extends string, State, GQLType> {
export type PredicateState<PIO extends PredicateIO<any, any, any>> =
PIO extends PredicateIO<infer Tag, infer State, any> ? Tagged<Tag, State> : never

type PredicateGQLType<PIO extends PredicateIO<any, any, any>> = PIO extends PredicateIO<
any,
any,
infer G
>
? G
: never
type PredicateGQLType<PIO extends PredicateIO<any, any, any>> =
PIO extends PredicateIO<any, any, infer G> ? G : never

function Predicate<Tag extends string, State, GQLType>(input: {
tag: Tag
Expand Down Expand Up @@ -235,10 +230,10 @@ export type Extents =
export type ExtentsForPredicate<P> = P extends Predicates['Datetime']
? Model.GQLTypes.DatetimeExtents
: P extends Predicates['Number']
? Model.GQLTypes.NumberExtents
: P extends Predicates['KeywordEnum']
? Model.GQLTypes.KeywordExtents
: never
? Model.GQLTypes.NumberExtents
: P extends Predicates['KeywordEnum']
? Model.GQLTypes.KeywordExtents
: never

export type KnownPredicate = Predicates[keyof Predicates]

Expand Down Expand Up @@ -383,9 +378,8 @@ function Filter<PM extends PredicateMap>(children: PM): FilterIO<PM> {
}
}

type FilterState<FIO extends FilterIO<any>> = FIO extends FilterIO<infer PM>
? OrderedCombinedState<PM>
: never
type FilterState<FIO extends FilterIO<any>> =
FIO extends FilterIO<infer PM> ? OrderedCombinedState<PM> : never

export const ObjectsSearchFilterIO = Filter({
modified: Predicates.Datetime,
Expand Down
9 changes: 4 additions & 5 deletions catalog/app/utils/taggedV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,15 @@ interface Meta<TypeTag, VMap, CMap> {
export type InstanceOf<T> = T extends { meta: Meta<infer TypeTag, infer VMap, any> }
? Instance<TypeTag, keyof VMap, VMap[keyof VMap]>
: T extends InstanceConstructor<infer TypeTag, infer VariantTag, any, infer Value>
? Instance<TypeTag, VariantTag, Value>
: never
? Instance<TypeTag, VariantTag, Value>
: never

export type ConstructorOf<T> = T extends { meta: Meta<any, any, infer CMap> }
? CMap[keyof CMap]
: never

export type ValueOf<T> = T extends InstanceConstructor<any, any, any, infer Value>
? Value
: never
export type ValueOf<T> =
T extends InstanceConstructor<any, any, any, infer Value> ? Value : never

const mkCons =
<TypeTag>(typeTag: TypeTag) =>
Expand Down
5 changes: 1 addition & 4 deletions catalog/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
"destination": "/index.html"
}
],
"ignore": [
"**/.*",
"robots.txt"
],
"ignore": ["**/.*", "robots.txt"],
"headers": [
{
"source": "**/*.@(jpg|jpeg|gif|png)",
Expand Down
Loading

0 comments on commit 046edad

Please sign in to comment.