Skip to content

Commit

Permalink
BREAKING CHANGE: First pass at Lifecycle 2.0 API schemas & tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jlacivita committed Jun 11, 2024
1 parent 84c9d65 commit 32a1d0f
Show file tree
Hide file tree
Showing 62 changed files with 15,468 additions and 11,982 deletions.
2,366 changes: 1,213 additions & 1,153 deletions package-lock.json

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@
"src/sdks/manage"
],
"scripts": {
"fs:setup": "npm run clean && mkdir -p dist",
"validate:each": "npx firebolt-openrpc validate --input src/openrpc --schemas node_modules/@firebolt-js/schemas/src/schemas --schemas src/schemas --transformations",
"validate:compiled": "npx firebolt-openrpc validate --input dist/firebolt-open-rpc.json && npm run validate --workspaces",
"validate": "npm run validate:each && npm run validate:compiled ",
"compile": "npx firebolt-openrpc openrpc --input src --template src/template/openrpc/template.json --output ./dist/firebolt-open-rpc.json --schemas src/schemas --schemas node_modules/@firebolt-js/schemas/src/schemas",
"fs:setup": "npm run clean ; mkdir -p dist",
"validate:each": "npx firebolt-openrpc validate --input src/openrpc --schemas src/schemas --transformations --bidirectional",
"validate:compiled": "npx firebolt-openrpc validate --server dist/firebolt-open-rpc.json --client dist/firebolt-app-open-rpc.json ; npm run validate --workspaces",
"validate": "npm run validate:each ; npm run validate:compiled ",
"compile": "npx firebolt-openrpc openrpc --input src --template src/template/openrpc/template.json --server ./dist/firebolt-open-rpc.json --client ./dist/firebolt-app-open-rpc.json --schemas src/schemas",
"update": "npx firebolt-openrpc update --input src --schemas src/schemas",
"slice": "npm run slice --workspaces",
"sdks": "npm run sdk --workspaces",
"sdk": "npm run sdk --workspaces",
"docs": "npm run docs --workspaces",
"wiki": "npm run wiki --workspaces",
"test:setup": "npm run test:setup --workspaces",
"test": "npm run test:setup && NODE_OPTIONS=--experimental-vm-modules npx --config=jest.config.json --detectOpenHandles jest",
"clean": "rm -rf dist && npm run clean --workspaces",
"dist": "npm run fs:setup && npm run compile && npm run specification && npm run version && npm run dist:notest --workspaces && npm run test",
"test:setup": "rm -rf test/transpiled-suite ; npx tsc --target es6 --moduleResolution node --outDir test/transpiled-suite ; npm run test:setup --workspaces",
"test": "npm run test:setup ; NODE_OPTIONS=--experimental-vm-modules npx --config=jest.config.json --detectOpenHandles jest",
"clean": "rm -rf dist ; npm run clean --workspaces",
"dist": "npm run fs:setup ; npm run validate:each ; npm run compile ; npm run specification ; npm run version ; npm run dist:notest --workspaces ; npm run test",
"specification": "node ./src/js/version-specification/index.mjs --source ./src/json/firebolt-specification.json",
"specification:report": "node ./src/js/version-specification/index.mjs --source ./dist/firebolt-specification.json --report",
"version": "node ./src/js/version.mjs sync",
Expand All @@ -44,7 +45,7 @@
"devDependencies": {
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@firebolt-js/openrpc": "2.0.4",
"@firebolt-js/openrpc": "../firebolt-openrpc",
"@firebolt-js/schemas": "1.0.0-next.0",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
Expand Down
161 changes: 81 additions & 80 deletions src/openrpc/_internal.json
Original file line number Diff line number Diff line change
@@ -1,82 +1,83 @@
{
"openrpc": "1.2.4",
"info": {
"title": "Internal",
"description": "Internal methods for SDK / FEE integration",
"version": "0.0.0"
},
"methods": [
{
"name": "initialize",
"tags": [
{
"name": "rpc-only"
},
{
"name": "capabilities",
"x-uses": [
"xrn:firebolt:capability:lifecycle:initialize"
]
}
],
"summary": "Initialize the SDK / FEE session.",
"description": "A single version of the Firebolt SDK is compiled into each app. When an app starts up, the SDK **MUST** call this method as soon as possible and **before** any other JSON-RPC methods are sent.",
"params": [
{
"name": "version",
"required": true,
"schema": {
"$ref": "https://meta.comcast.com/firebolt/types#/definitions/SemanticVersion"
},
"summary": "The semantic version of the SDK."
}
],
"result": {
"name": "session",
"summary": "Info about the SDK/FEE session",
"schema": {
"type": "object",
"required": ["version"],
"properties": {
"version": {
"$ref": "https://meta.comcast.com/firebolt/types#/definitions/SemanticVersion",
"description": "The semantic version of the FEE."
}
},
"additionalProperties": false
}
},
"examples": [
{
"name": "Default Example",
"params": [
{
"name": "version",
"value": {
"major": 1,
"minor": 0,
"patch": 0,
"readable": "Firebolt SDK 1.0.0"
}
}
],
"result": {
"name": "Default Result",
"value": {
"version": {
"major": 1,
"minor": 0,
"patch": 0,
"readable": "Firebolt FEE 1.0.0"
}
}
}
}
]
}
],
"components": {
"schemas": {
}
}
"openrpc": "1.2.4",
"info": {
"title": "Internal",
"description": "Internal methods for SDK / FEE integration",
"version": "0.0.0"
},
"methods": [
{
"name": "initialize",
"tags": [
{
"name": "rpc-only"
},
{
"name": "capabilities",
"x-uses": [
"xrn:firebolt:capability:lifecycle:initialize"
]
}
],
"summary": "Initialize the SDK / FEE session.",
"description": "A single version of the Firebolt SDK is compiled into each app. When an app starts up, the SDK **MUST** call this method as soon as possible and **before** any other JSON-RPC methods are sent.",
"params": [
{
"name": "version",
"required": true,
"schema": {
"$ref": "https://meta.rdkcentral.com/firebolt/schemas/types#/definitions/SemanticVersion"
},
"summary": "The semantic version of the SDK."
}
],
"result": {
"name": "session",
"summary": "Info about the SDK/FEE session",
"schema": {
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"$ref": "https://meta.rdkcentral.com/firebolt/schemas/types#/definitions/SemanticVersion",
"description": "The semantic version of the FEE."
}
},
"additionalProperties": false
}
},
"examples": [
{
"name": "Default Example",
"params": [
{
"name": "version",
"value": {
"major": 1,
"minor": 0,
"patch": 0,
"readable": "Firebolt SDK 1.0.0"
}
}
],
"result": {
"name": "Default Result",
"value": {
"version": {
"major": 1,
"minor": 0,
"patch": 0,
"readable": "Firebolt FEE 1.0.0"
}
}
}
}
]
}
],
"components": {
"schemas": {}
}
}
Loading

0 comments on commit 32a1d0f

Please sign in to comment.