( app: Application, network: string, shouldBuildArtifacts: boolean, )
| 44 | } |
| 45 | |
| 46 | const getAppRegistryEntry = async ( |
| 47 | app: Application, |
| 48 | network: string, |
| 49 | shouldBuildArtifacts: boolean, |
| 50 | ): Promise<Package> => { |
| 51 | const upgraderVersion = cargoProjectVersion(Application.Upgrader); |
| 52 | |
| 53 | switch (app) { |
| 54 | case Application.Station: { |
| 55 | const stationVersion = cargoProjectVersion(Application.Station); |
| 56 | |
| 57 | if (shouldBuildArtifacts) { |
| 58 | console.log(`Creating release artifacts for project: station...`); |
| 59 | execSync(`BUILD_MODE='${network}' npx nx run station:create-artifacts`); |
| 60 | } |
| 61 | |
| 62 | return { |
| 63 | name: applicationToRegistryEntryMap.station, |
| 64 | description: |
| 65 | 'A secure and multichain asset management platform for teams and institutions.', |
| 66 | tags: ['latest'], |
| 67 | categories: ['finance', 'iam', 'multichain', 'asset-management'], |
| 68 | dependencies: [ |
| 69 | { |
| 70 | name: applicationToRegistryEntryMap.upgrader, |
| 71 | version: upgraderVersion, |
| 72 | }, |
| 73 | ], |
| 74 | module: await readFileIntoUint8Array(join(artifactsRootPath, 'station/station.wasm.gz')), |
| 75 | version: stationVersion, |
| 76 | metadata: { |
| 77 | url: 'https://github.com/dfinity/orbit', |
| 78 | }, |
| 79 | }; |
| 80 | } |
| 81 | case Application.Upgrader: { |
| 82 | if (shouldBuildArtifacts) { |
| 83 | console.log(`Creating release artifacts for project: upgrader...`); |
| 84 | execSync(`BUILD_MODE='${network}' npx nx run upgrader:create-artifacts`); |
| 85 | } |
| 86 | |
| 87 | return { |
| 88 | name: applicationToRegistryEntryMap.upgrader, |
| 89 | description: 'Securely handles upgrades and disaster recovery for the Orbit Station.', |
| 90 | tags: ['latest'], |
| 91 | categories: ['finance', 'iam', 'multichain', 'asset-management'], |
| 92 | dependencies: [], |
| 93 | module: await readFileIntoUint8Array(join(artifactsRootPath, 'upgrader/upgrader.wasm.gz')), |
| 94 | version: upgraderVersion, |
| 95 | metadata: { |
| 96 | url: 'https://github.com/dfinity/orbit', |
| 97 | }, |
| 98 | }; |
| 99 | } |
| 100 | default: |
| 101 | throw new Error(`Unsupported application: ${app}`); |
| 102 | } |
| 103 | }; |
no test coverage detected