Skip to content

Commit

Permalink
Merge pull request #210 from nulib/deploy/staging
Browse files Browse the repository at this point in the history
Merge into main
  • Loading branch information
adamjarling authored May 16, 2024
2 parents 4d7560f + e7a517a commit a6c3938
Show file tree
Hide file tree
Showing 9 changed files with 345 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/production-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
workflow_dispatch:
jobs:
Push-To-Types-Repo-Production:
if: github.event.pull_request.merged == true
if: (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
id-token: write
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
id: package-version
uses: martinbeentjes/npm-get-version-action@main
with:
path: "${{ env.TMP_SRCDIR }}"
path: "${{ env.TMP_SRCDIR }}/node"
- name: Generate Typescript file
working-directory: "${{ env.TMP_SRCDIR }}/node"
run: |
Expand Down
4 changes: 0 additions & 4 deletions docs/docs/spec/data-types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,6 @@ components:
embedding_model:
type: string
description: The name of the inference model used to generate the `embedding` from the resource's content.
download_url:
type: string
nullable: true
file_sets:
type: array
description: File sets associated with the resource.
Expand Down Expand Up @@ -766,7 +763,6 @@ components:
- description
- embedding
- embedding_model
- download_url
- file_sets
- folder_name
- folder_number
Expand Down
2 changes: 1 addition & 1 deletion lambdas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lambdas",
"version": "2.3.0",
"version": "2.3.1",
"description": "Non-API handler lambdas",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
2 changes: 1 addition & 1 deletion layers/api_dependencies/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dc-api-dependencies",
"version": "2.3.0",
"version": "2.3.1",
"description": "NUL Digital Collections API Dependencies",
"repository": "https://github.com/nulib/dc-api-v2",
"author": "nulib",
Expand Down
2 changes: 1 addition & 1 deletion node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dc-api-build",
"version": "2.3.0",
"version": "2.3.1",
"description": "NUL Digital Collections API Build Environment",
"repository": "https://github.com/nulib/dc-api-v2",
"author": "nulib",
Expand Down
23 changes: 13 additions & 10 deletions node/src/api/response/iiif/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,20 @@ function transform(response) {
for (let i = 0; i < jsonManifest.items.length; i++) {
if (jsonManifest.items[i]?.items[0]?.items[0]?.body.type === "Image") {
const { id, thumbnail } = jsonManifest.items[i];
const placeholderFileSet = source.file_sets.find(
(fileSet) =>
fileSet.representative_image_url === thumbnail[0].service[0]["@id"]
);

// only add the placeholderCanvas property if the fileSet has width and height
if (placeholderFileSet.width && placeholderFileSet.height) {
jsonManifest.items[i].placeholderCanvas = buildPlaceholderCanvas(
id,
placeholderFileSet
if (thumbnail) {
const placeholderFileSet = source.file_sets.find(
(fileSet) =>
fileSet.representative_image_url ===
thumbnail[0].service[0]["@id"]
);

// only add the placeholderCanvas property if the fileSet has width and height
if (placeholderFileSet.width && placeholderFileSet.height) {
jsonManifest.items[i].placeholderCanvas = buildPlaceholderCanvas(
id,
placeholderFileSet
);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion node/src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dc-api",
"version": "2.3.0",
"version": "2.3.1",
"description": "NUL Digital Collections API",
"repository": "https://github.com/nulib/dc-api-v2",
"author": "nulib",
Expand Down
Loading

0 comments on commit a6c3938

Please sign in to comment.