MCPcopy Create free account
hub / github.com/dfinity/orbit / getAppRegistryEntry

Function getAppRegistryEntry

cli/src/registry/publish.ts:46–103  ·  view source on GitHub ↗
(
  app: Application,
  network: string,
  shouldBuildArtifacts: boolean,
)

Source from the content-addressed store, hash-verified

44}
45
46const 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};

Callers 1

publish.tsFile · 0.85

Calls 3

cargoProjectVersionFunction · 0.90
readFileIntoUint8ArrayFunction · 0.90
logMethod · 0.80

Tested by

no test coverage detected