Skip to content

Commit

Permalink
patch: checking
Browse files Browse the repository at this point in the history
Signed-off-by: Vipul Gupta (@vipulgupta2048) <[email protected]>
  • Loading branch information
vipulgupta2048 committed Dec 17, 2024
1 parent bdcf6fd commit 26b3990
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
45 changes: 45 additions & 0 deletions src/models/device-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,51 @@ const getDeviceTypeModel = function (deps: InjectedDependenciesParam) {
$select: 'contract',
},
));
if (contract.slug === 'jetson-orin-nano-devkit-nvme') {

Check failure on line 455 in src/models/device-type.ts

View workflow job for this annotation

GitHub Actions / Flowzone / Test custom (windows-latest)

'contract' is possibly 'null'.

Check failure on line 455 in src/models/device-type.ts

View workflow job for this annotation

GitHub Actions / Flowzone / Test custom (ubuntu-latest)

'contract' is possibly 'null'.

Check failure on line 455 in src/models/device-type.ts

View workflow job for this annotation

GitHub Actions / Flowzone / Test custom (macos-latest)

'contract' is possibly 'null'.

Check failure on line 455 in src/models/device-type.ts

View workflow job for this annotation

GitHub Actions / Flowzone / Test npm (18.x)

'contract' is possibly 'null'.

Check failure on line 455 in src/models/device-type.ts

View workflow job for this annotation

GitHub Actions / Flowzone / Test npm (20.x)

'contract' is possibly 'null'.

Check failure on line 455 in src/models/device-type.ts

View workflow job for this annotation

GitHub Actions / Flowzone / Test npm (22.x)

'contract' is possibly 'null'.
contract = `

Check failure on line 456 in src/models/device-type.ts

View workflow job for this annotation

GitHub Actions / Flowzone / Test custom (windows-latest)

Type 'string' is not assignable to type 'Contract'.

Check failure on line 456 in src/models/device-type.ts

View workflow job for this annotation

GitHub Actions / Flowzone / Test custom (ubuntu-latest)

Type 'string' is not assignable to type 'Contract'.

Check failure on line 456 in src/models/device-type.ts

View workflow job for this annotation

GitHub Actions / Flowzone / Test custom (macos-latest)

Type 'string' is not assignable to type 'Contract'.

Check failure on line 456 in src/models/device-type.ts

View workflow job for this annotation

GitHub Actions / Flowzone / Test npm (18.x)

Type 'string' is not assignable to type 'Contract'.

Check failure on line 456 in src/models/device-type.ts

View workflow job for this annotation

GitHub Actions / Flowzone / Test npm (20.x)

Type 'string' is not assignable to type 'Contract'.

Check failure on line 456 in src/models/device-type.ts

View workflow job for this annotation

GitHub Actions / Flowzone / Test npm (22.x)

Type 'string' is not assignable to type 'Contract'.
{
"slug": "jetson-orin-nano-devkit-nvme",
"version": "1",
"type": "hw.device-type",
"aliases": [],
"name": "Nvidia Jetson Orin Nano 8GB (SD) Devkit NVME",
"assets": {
"logo": {
"url": "./jetson-orin-nano-devkit-nvme.svg",
"name": "logo"
}
},
"data": {
"arch": "aarch64",
"hdmi": true,
"led": false,
"connectivity": {
"bluetooth": true,
"wifi": true
},
"storage": {
"internal": true
},
"media": {
"defaultBoot": "internal",
"altBoot": ["usb_mass_storage"]
},
"is_private": false
},
"partials": {
"instructions": [
"For balenaOS versions v6.1.16 and newer, please ensure your device is running UEFI firmware version 36.3. Check and update the <a href=\"https://docs.balena.io/learn/develop/hardware/jetson-orin#provisioning-jetson-orin\">firmware version</a> before proceeding.",
"For balenaOS versions older than v6.1.16, please refer to the <a href=\"https://github.com/balena-os/jetson-flash?tab=readme-ov-file\">{{name}} legacy flashing</a> guide."
],
"bootDeviceExternal": [
"Insert a NVME drive in the Devkit and power up the {{name}}."
],
"flashIndicator": ["power LED is off"],
"bootDevice": ["Power up the {{name}}. If you have a display or a debug UART cable connected to the device, a progress bar will show up while the UEFI firmware is updated. Please do not interrupt this process by turning off power or rebooting the device."]
}
}
`
}
if (!contract?.partials) {
throw new Error(
`Instruction partials not defined for ${deviceTypeSlugOrContract}`,
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/models/device-type.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ describe('Device Type model', function () {
],
],
[
'jetson-nano',
'jetson-orin-nano-devkit-nvme',
[
'To provision Nvidia Jetson Nano SD-CARD, follow the instructions using our <a href="https://github.com/balena-os/jetson-flash/blob/master/docs/jetson-nano.md">Jetson Flash tool</a> to make the process more streamlined.',
],
Expand Down

0 comments on commit 26b3990

Please sign in to comment.