Skip to content

Commit

Permalink
fix: Added individual sdk openrpcs to the doc specification (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinshahfws authored Sep 12, 2024
1 parent 002c77d commit ace1d64
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions src/js/github.io/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ packageJson.workspaces.forEach(async workspace => {
const specification = await readJson(path.join('dist', 'firebolt-specification.json'))
const openrpc = await readJson(path.join('dist', 'firebolt-open-rpc.json'))
const corerpc = await readJson(path.join('dist', 'firebolt-core-open-rpc.json'))
const managerpc = await readJson(path.join('dist', 'firebolt-manage-open-rpc.json'))
const discoveryrpc = await readJson(path.join('dist', 'firebolt-discovery-open-rpc.json'))

const capabilities = () => {
const getOrCreateCapMethodList = (capabilities, c) => capabilities[c] = capabilities[c] || { uses: [], manages: [], provides: [] }
Expand Down Expand Up @@ -170,6 +172,24 @@ if (version === 'latest') {
writeJson(path.join(parsedArgs.output, 'requirements', packageJson.version, 'specifications', 'firebolt-open-rpc.json'), openrpc)
}

// this is the firebolt Core OpenRPC spec JSON
writeJson(path.join(parsedArgs.output, 'requirements', version, 'specifications', 'firebolt-core-open-rpc.json'), corerpc)
if (version === 'latest') {
writeJson(path.join(parsedArgs.output, 'requirements', packageJson.version, 'specifications', 'firebolt-core-open-rpc.json'), corerpc)
}

// this is the firebolt Manage OpenRPC spec JSON
writeJson(path.join(parsedArgs.output, 'requirements', version, 'specifications', 'firebolt-manage-open-rpc.json'), managerpc)
if (version === 'latest') {
writeJson(path.join(parsedArgs.output, 'requirements', packageJson.version, 'specifications', 'firebolt-manage-open-rpc.json'), managerpc)
}

// this is the firebolt Discovery OpenRPC spec JSON
writeJson(path.join(parsedArgs.output, 'requirements', version, 'specifications', 'firebolt-discovery-open-rpc.json'), discoveryrpc)
if (version === 'latest') {
writeJson(path.join(parsedArgs.output, 'requirements', packageJson.version, 'specifications', 'firebolt-discovery-open-rpc.json'), discoveryrpc)
}

function channel(version) {
const parts = version.split("-")

Expand Down

0 comments on commit ace1d64

Please sign in to comment.