From 80365afad63faf3a67a8f679047c3fc618aaa413 Mon Sep 17 00:00:00 2001 From: Jeremy LaCivita Date: Mon, 17 Apr 2023 13:24:32 -0400 Subject: [PATCH] fix(READMEs): Add various READMEs, remove Discovery SDK --- src/sdks/core/CHANGELOG.md | 1 + src/sdks/core/CONTRIBUTING.md | 1 + src/sdks/core/LICENSE | 1 + src/sdks/core/NOTICE | 1 + src/sdks/core/README.md | 26 +++++++++++ src/sdks/discovery/.npmignore | 6 --- src/sdks/discovery/jest.config.json | 8 ---- src/sdks/discovery/package.json | 49 --------------------- src/sdks/discovery/sdk.config.json | 23 ---------- src/sdks/discovery/sdk/index.mjs | 30 ------------- src/sdks/discovery/src/js/sdk/index.mjs | 30 ------------- src/sdks/discovery/test/suite/basic.test.ts | 27 ------------ src/sdks/discovery/tsconfig.json | 5 --- src/sdks/manage/CHANGELOG.md | 1 + src/sdks/manage/CONTRIBUTING.md | 1 + src/sdks/manage/LICENSE | 1 + src/sdks/manage/NOTICE | 1 + src/sdks/manage/README.md | 26 +++++++++++ 18 files changed, 60 insertions(+), 178 deletions(-) create mode 120000 src/sdks/core/CHANGELOG.md create mode 120000 src/sdks/core/CONTRIBUTING.md create mode 120000 src/sdks/core/LICENSE create mode 120000 src/sdks/core/NOTICE create mode 100644 src/sdks/core/README.md delete mode 100644 src/sdks/discovery/.npmignore delete mode 100644 src/sdks/discovery/jest.config.json delete mode 100644 src/sdks/discovery/package.json delete mode 100644 src/sdks/discovery/sdk.config.json delete mode 100644 src/sdks/discovery/sdk/index.mjs delete mode 100644 src/sdks/discovery/src/js/sdk/index.mjs delete mode 100644 src/sdks/discovery/test/suite/basic.test.ts delete mode 100644 src/sdks/discovery/tsconfig.json create mode 120000 src/sdks/manage/CHANGELOG.md create mode 120000 src/sdks/manage/CONTRIBUTING.md create mode 120000 src/sdks/manage/LICENSE create mode 120000 src/sdks/manage/NOTICE create mode 100644 src/sdks/manage/README.md diff --git a/src/sdks/core/CHANGELOG.md b/src/sdks/core/CHANGELOG.md new file mode 120000 index 000000000..79b747aee --- /dev/null +++ b/src/sdks/core/CHANGELOG.md @@ -0,0 +1 @@ +../../../CHANGELOG.md \ No newline at end of file diff --git a/src/sdks/core/CONTRIBUTING.md b/src/sdks/core/CONTRIBUTING.md new file mode 120000 index 000000000..c97564d93 --- /dev/null +++ b/src/sdks/core/CONTRIBUTING.md @@ -0,0 +1 @@ +../../../CONTRIBUTING.md \ No newline at end of file diff --git a/src/sdks/core/LICENSE b/src/sdks/core/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/src/sdks/core/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/src/sdks/core/NOTICE b/src/sdks/core/NOTICE new file mode 120000 index 000000000..295f6bdb3 --- /dev/null +++ b/src/sdks/core/NOTICE @@ -0,0 +1 @@ +../../../NOTICE \ No newline at end of file diff --git a/src/sdks/core/README.md b/src/sdks/core/README.md new file mode 100644 index 000000000..50d2c0373 --- /dev/null +++ b/src/sdks/core/README.md @@ -0,0 +1,26 @@ +--- +title: Firebolt SDKs +--- + +[![semantic-release: conventional](https://img.shields.io/badge/semantic--release-conventional-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) + +# Firebolt JS SDK +For building Firebolt compliant apps. + +## Usage +To install, run: + +``` +npm install @firebolt-js/sdk +``` + +To use the package, import one of it's modules, e.g.: + +```js +import { Lifecycle } from '@firebolt-js/sdk' +``` + +## Contributing +The Firebolt Core SDK is built using the Firebolt OpenRPC toolset: + +See [Firebolt OpenRPC](https://www.github.com/rdkcentral/firebolt-openrpc/), for more info. diff --git a/src/sdks/discovery/.npmignore b/src/sdks/discovery/.npmignore deleted file mode 100644 index 0e2ba4d22..000000000 --- a/src/sdks/discovery/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -build/* -src/* -test/* -.DS_Store -jest.config.* -tsconfig.* \ No newline at end of file diff --git a/src/sdks/discovery/jest.config.json b/src/sdks/discovery/jest.config.json deleted file mode 100644 index 745370cfa..000000000 --- a/src/sdks/discovery/jest.config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|js?)$", - "transform": {}, - "testPathIgnorePatterns": ["/node_modules/", "/../../../test"], - "moduleFileExtensions": ["js", "jsx", "mjs"], - "verbose": true, - "testEnvironment": "jest-environment-jsdom" - } \ No newline at end of file diff --git a/src/sdks/discovery/package.json b/src/sdks/discovery/package.json deleted file mode 100644 index 7c664cc37..000000000 --- a/src/sdks/discovery/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "@firebolt-js/discovery-sdk", - "version": "0.11.0-one-repository.1", - "description": "The Firebolt Discovery JS SDK", - "main": "./dist/lib/firebolt-discovery.mjs", - "types": "./dist/lib/firebolt-discovery.d.ts", - "exports": { - ".": "./dist/lib/firebolt-discovery.mjs" - }, - "type": "module", - "scripts": { - "validate": "npx firebolt-openrpc validate --input ./dist/firebolt-discovery-open-rpc.json", - "sdk": "npx firebolt-openrpc sdk --input ./dist/firebolt-discovery-open-rpc.json --template ./src/js --output ./build/javascript/src", - "compile": "cd ../../.. && npm run compile", - "slice": "npx firebolt-openrpc slice -i ../../../dist/firebolt-open-rpc.json --sdk ./sdk.config.json -o ./dist/firebolt-discovery-open-rpc.json", - "docs": "npx firebolt-openrpc docs --input ./dist/firebolt-discovery-open-rpc.json --output build/docs/markdown --as-path", - "wiki": "npx firebolt-openrpc docs --input ./dist/firebolt-discovery-open-rpc.json --output build/docs/markdown", - "dist:notest": "npm run clean && npm run slice && npm run validate && npm run sdk && npm run docs && npm run dist:copy && echo 'Firebolt Discovery SDK /dist/ is ready.\n'", - "dist:copy": "npm run dist:copy:sdk && npm run dist:copy:docs", - "dist:copy:sdk": "mkdirp ./dist && cp -R build/javascript/src dist/lib && cp -r ./dist ../../../dist/discovery && mv ../../../dist/discovery/firebolt-discovery-open-rpc.json ../../../dist/firebolt-discovery-open-rpc.json", - "dist:copy:docs": "mkdirp ./dist && cp -R build/docs/markdown dist/docs", - "dist": "npm run dist:notest && npm run test", - "clean": "rm -rf ./build && rm -rf ./dist", - "test:setup": "rm -rf test/transpiled-suite && npx tsc --target es6 --moduleResolution node --outDir test/transpiled-suite", - "test": "npm run test:setup && NODE_OPTIONS=--experimental-vm-modules npx --config=jest.config.json --detectOpenHandles jest", - "prepack": "node ../../js/version.mjs validate" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/rdkcentral/firebolt-core-sdk", - "directory": "src/sdks/discovery" - }, - "author": "", - "bugs": { - "url": "https://github.com/rdkcentral/firebolt-core-sdk/issues" - }, - "homepage": "https://github.com/rdkcentral/firebolt-core-sdk#readme", - "devDependencies": { - "jest": "^28.1.0", - "jest-environment-jsdom": "^28.1.3", - "typescript": "^4.6.4" - }, - "keywords": [ - "firebolt", - "apps", - "sdk" - ], - "license": "Apache-2.0" -} \ No newline at end of file diff --git a/src/sdks/discovery/sdk.config.json b/src/sdks/discovery/sdk.config.json deleted file mode 100644 index 3bf54400e..000000000 --- a/src/sdks/discovery/sdk.config.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "info": { - "title": "Firebolt Discovery SDK" - }, - "methods": [ - { - "module": "Content", - "use": [ - "xrn:firebolt:capability:discovery:providers", - "xrn:firebolt:capability:discovery:purchased-content", - "xrn:firebolt:capability:discovery:entity-info", - "xrn:firebolt:capability:discovery:search" - ] - }, - { - "module": "AppCatalog", - "use": [ - "xrn:firebolt:capability:app-catalog:apps", - "xrn:firebolt:capability:app-catalog:metadata" - ] - } - ] -} \ No newline at end of file diff --git a/src/sdks/discovery/sdk/index.mjs b/src/sdks/discovery/sdk/index.mjs deleted file mode 100644 index a9f2f5ca6..000000000 --- a/src/sdks/discovery/sdk/index.mjs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2021 Comcast Cable Communications Management, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -import { setMockResponses } from './Transport/MockTransport.mjs' - -/* ${MOCK_IMPORTS} */ - -setMockResponses({ - /* ${MOCK_OBJECTS} */ -}) - -/* ${EXPORTS} */ -export { default as Log } from './Log/index.mjs' -export { default as Events } from './Events/index.mjs' -export { default as Settings } from './Settings/index.mjs' diff --git a/src/sdks/discovery/src/js/sdk/index.mjs b/src/sdks/discovery/src/js/sdk/index.mjs deleted file mode 100644 index a9f2f5ca6..000000000 --- a/src/sdks/discovery/src/js/sdk/index.mjs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2021 Comcast Cable Communications Management, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -import { setMockResponses } from './Transport/MockTransport.mjs' - -/* ${MOCK_IMPORTS} */ - -setMockResponses({ - /* ${MOCK_OBJECTS} */ -}) - -/* ${EXPORTS} */ -export { default as Log } from './Log/index.mjs' -export { default as Events } from './Events/index.mjs' -export { default as Settings } from './Settings/index.mjs' diff --git a/src/sdks/discovery/test/suite/basic.test.ts b/src/sdks/discovery/test/suite/basic.test.ts deleted file mode 100644 index b5fa351e3..000000000 --- a/src/sdks/discovery/test/suite/basic.test.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2021 Comcast Cable Communications Management, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -import { test, expect } from '@jest/globals'; -import { Content } from '../../build/javascript/src/firebolt-discovery'; - - -test('Basic', () => { - return Content.providers().then(providers => { - expect(Array.isArray(providers)).toBe(true) - }) -}); diff --git a/src/sdks/discovery/tsconfig.json b/src/sdks/discovery/tsconfig.json deleted file mode 100644 index 56ff58bc8..000000000 --- a/src/sdks/discovery/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "include": [ - "test/suite/*" - ] -} \ No newline at end of file diff --git a/src/sdks/manage/CHANGELOG.md b/src/sdks/manage/CHANGELOG.md new file mode 120000 index 000000000..79b747aee --- /dev/null +++ b/src/sdks/manage/CHANGELOG.md @@ -0,0 +1 @@ +../../../CHANGELOG.md \ No newline at end of file diff --git a/src/sdks/manage/CONTRIBUTING.md b/src/sdks/manage/CONTRIBUTING.md new file mode 120000 index 000000000..c97564d93 --- /dev/null +++ b/src/sdks/manage/CONTRIBUTING.md @@ -0,0 +1 @@ +../../../CONTRIBUTING.md \ No newline at end of file diff --git a/src/sdks/manage/LICENSE b/src/sdks/manage/LICENSE new file mode 120000 index 000000000..5853aaea5 --- /dev/null +++ b/src/sdks/manage/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/src/sdks/manage/NOTICE b/src/sdks/manage/NOTICE new file mode 120000 index 000000000..295f6bdb3 --- /dev/null +++ b/src/sdks/manage/NOTICE @@ -0,0 +1 @@ +../../../NOTICE \ No newline at end of file diff --git a/src/sdks/manage/README.md b/src/sdks/manage/README.md new file mode 100644 index 000000000..50d2c0373 --- /dev/null +++ b/src/sdks/manage/README.md @@ -0,0 +1,26 @@ +--- +title: Firebolt SDKs +--- + +[![semantic-release: conventional](https://img.shields.io/badge/semantic--release-conventional-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) + +# Firebolt JS SDK +For building Firebolt compliant apps. + +## Usage +To install, run: + +``` +npm install @firebolt-js/sdk +``` + +To use the package, import one of it's modules, e.g.: + +```js +import { Lifecycle } from '@firebolt-js/sdk' +``` + +## Contributing +The Firebolt Core SDK is built using the Firebolt OpenRPC toolset: + +See [Firebolt OpenRPC](https://www.github.com/rdkcentral/firebolt-openrpc/), for more info.