diff --git a/package-lock.json b/package-lock.json index 62e34b5615..b26c9d9f47 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,8 +13,8 @@ "@balena/env-parsing": "^1.1.10", "@balena/es-version": "^1.0.3", "@balena/node-metrics-gatherer": "^6.0.3", - "@balena/pinejs": "^16.0.0", - "@balena/pinejs-webresource-cloudfront": "^0.1.0", + "@balena/pinejs": "17.0.0-build-wip-large-file-uploads-0c8ef752deac19fa0d6a7dfa9f7173813cab7867-1", + "@balena/pinejs-webresource-cloudfront": "0.1.1-build-test-large-file-uploads-752fc7f5e9dcbf2c4150d2438caf70fcc7ebbb53-1", "@sentry/node": "^7.99.0", "@types/basic-auth": "^1.1.8", "@types/bluebird": "^3.5.42", @@ -1335,9 +1335,9 @@ } }, "node_modules/@balena/pinejs": { - "version": "16.1.2", - "resolved": "https://registry.npmjs.org/@balena/pinejs/-/pinejs-16.1.2.tgz", - "integrity": "sha512-vgFoFl0gp7QBxqwyOLzt3EvusX0UL+EPkW5T+WXVzOGtWOj4FCy9SML83V2Mlan0dgg7SVghrU9rmZ8NwEd3ig==", + "version": "17.0.0-build-wip-large-file-uploads-0c8ef752deac19fa0d6a7dfa9f7173813cab7867-1", + "resolved": "https://registry.npmjs.org/@balena/pinejs/-/pinejs-17.0.0-build-wip-large-file-uploads-0c8ef752deac19fa0d6a7dfa9f7173813cab7867-1.tgz", + "integrity": "sha512-eJ3lA7Pbcyp7LHLEywRIx8brk+lyIWVNPE+YQeUpicOLGEskkmd5+pyR9X5p5NkvzIyGcOwnbq7jLWy+Er4g1Q==", "dependencies": { "@balena/abstract-sql-compiler": "^9.1.0", "@balena/abstract-sql-to-typescript": "^2.1.3", @@ -1382,7 +1382,7 @@ "sbvr-compiler": "bin/sbvr-compiler.js" }, "engines": { - "node": ">=16.13.0", + "node": ">=18.0.0", "npm": ">=8.0.0" }, "optionalDependencies": { @@ -1404,12 +1404,12 @@ } }, "node_modules/@balena/pinejs-webresource-cloudfront": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@balena/pinejs-webresource-cloudfront/-/pinejs-webresource-cloudfront-0.1.0.tgz", - "integrity": "sha512-cRvEkvYfyeMSe1a5djXy6tqQU7tVqi+TyLbKdBr5/On8G15fO2PkAM2M26RvtqOPCBfC3Z8UfO5fxxu0q2ghAA==", + "version": "0.1.1-build-test-large-file-uploads-752fc7f5e9dcbf2c4150d2438caf70fcc7ebbb53-1", + "resolved": "https://registry.npmjs.org/@balena/pinejs-webresource-cloudfront/-/pinejs-webresource-cloudfront-0.1.1-build-test-large-file-uploads-752fc7f5e9dcbf2c4150d2438caf70fcc7ebbb53-1.tgz", + "integrity": "sha512-bo+vur4lZsp9PZ6QxBlzswHgiFFtKhapZ+vPWtGQjmOz7IdH+VM1Iu/ZlfsA1hYoHLUKiQuyFfhxa9KwyX2rWg==", "dependencies": { "@aws-sdk/cloudfront-signer": "^3.541.0", - "@balena/pinejs": "^16.0.2", + "@balena/pinejs": "17.0.0-build-wip-large-file-uploads-0c8ef752deac19fa0d6a7dfa9f7173813cab7867-1", "memoizee": "^0.4.15" } }, diff --git a/package.json b/package.json index 1a3a19789c..9055655ed9 100644 --- a/package.json +++ b/package.json @@ -47,8 +47,8 @@ "@balena/env-parsing": "^1.1.10", "@balena/es-version": "^1.0.3", "@balena/node-metrics-gatherer": "^6.0.3", - "@balena/pinejs": "^16.0.0", - "@balena/pinejs-webresource-cloudfront": "^0.1.0", + "@balena/pinejs": "17.0.0-build-wip-large-file-uploads-0c8ef752deac19fa0d6a7dfa9f7173813cab7867-1", + "@balena/pinejs-webresource-cloudfront": "0.1.1-build-test-large-file-uploads-752fc7f5e9dcbf2c4150d2438caf70fcc7ebbb53-1", "@sentry/node": "^7.99.0", "@types/basic-auth": "^1.1.8", "@types/bluebird": "^3.5.42", diff --git a/src/balena-model.ts b/src/balena-model.ts index 88c7cb84fa..c196e94d6f 100644 --- a/src/balena-model.ts +++ b/src/balena-model.ts @@ -588,7 +588,7 @@ export interface ReleaseAsset { release: { __id: number } | [Release]; asset_key: string; id: number; - asset: WebResource; + asset: WebResource | null; } export interface MyApplication { diff --git a/src/balena.sbvr b/src/balena.sbvr index 9508c52715..c4d06a9631 100644 --- a/src/balena.sbvr +++ b/src/balena.sbvr @@ -716,7 +716,7 @@ Fact type: release has asset key -- release asset Fact type: release asset has asset - Necessity: each release asset has exactly one asset. + Necessity: each release asset has at most one asset. -- service environment variable diff --git a/src/migrations/00086-nullable-release-assets-asset.sql b/src/migrations/00086-nullable-release-assets-asset.sql new file mode 100644 index 0000000000..caa737b367 --- /dev/null +++ b/src/migrations/00086-nullable-release-assets-asset.sql @@ -0,0 +1,2 @@ +ALTER TABLE "release asset" +ALTER COLUMN "asset" DROP NOT NULL;