Skip to content

Commit

Permalink
Merge branch 'next' into featuer/play-intent
Browse files Browse the repository at this point in the history
  • Loading branch information
jlacivita committed Oct 26, 2023
2 parents 7d298a0 + e75f449 commit 11b43b4
Show file tree
Hide file tree
Showing 40 changed files with 2,620 additions and 69 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/release-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
- 'main'
- 'next'
- 'next-major'
- 'proposed'
pull_request:
types: [opened, synchronize]
branches:
- 'next'
- 'proposed'
env:
HUSKY: 0
jobs:
Expand Down Expand Up @@ -44,25 +50,33 @@ jobs:
run: |
echo "Setting RELEASE_CHANNEL to '$(node ./src/js/version.mjs channel $NPM_DIST_TAG)' using branch name '$NPM_DIST_TAG'"
echo "RELEASE_CHANNEL=$(node ./src/js/version.mjs channel $NPM_DIST_TAG)" >> $GITHUB_ENV
- name: Override release channel for PRs
if: github.event_name == 'pull_request'
run: |
echo "Setting RELEASE_CHANNEL to 'pr${{ github.event.number }}'"
echo "RELEASE_CHANNEL=pr${{ github.event.number }}" >> $GITHUB_ENV
- name: Release mono-artifact to GitHub
if: github.ref_name != 'main' || github.event_name == 'workflow_dispatch'
if: (github.ref_name != 'main' && github.event_name != 'pull_request') || github.event_name == 'workflow_dispatch'
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_PAT }} # <-- Allows semantic-release-bot to push changes to protected branches
npm_config_tag: ${{ env.NPM_DIST_TAG }} # <-- For main, this is `latest.` Otherwise, `next`, `next-major`, etc. See ./.releaserc for release branch config.
run: npx semantic-release
- name: Dry-run mono-artifact
if: github.ref_name == 'main' && github.event_name != 'workflow_dispatch'
if: (github.ref_name == 'main' && github.event_name != 'workflow_dispatch') || github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_PAT }} # <-- Allows semantic-release-bot to push changes to protected branches
npm_config_tag: ${{ env.NPM_DIST_TAG }} # <-- For main, this is `latest.` Otherwise, `next`, `next-major`, etc. See ./.releaserc for release branch config.
run: npx semantic-release --dry-run
- name: Build artifacts for PRs
if: github.event_name == 'pull_request'
run: npm run dist
- name: Check if semantic-release created a build
id: check_build
uses: andstor/file-existence-action@v2
with:
files: "./src/sdks/core/dist/lib/firebolt.mjs"
- name: Release Firebolt SDKs to NPM
if: steps.check_build.outputs.files_exists == 'true' && (github.ref_name != 'main' || github.event_name == 'workflow_dispatch')
if: steps.check_build.outputs.files_exists == 'true' && github.event_name != 'pull_request' && (github.ref_name != 'main' || github.event_name == 'workflow_dispatch')
env:
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} # <-- Allows semantic-release to publish to npm without 2 factor auth.
npm_config_tag: ${{ env.NPM_DIST_TAG }} # <-- For main, this is `latest.` Otherwise, `next`, `next-major`, etc. See ./.releaserc for release branch config.
Expand All @@ -87,10 +101,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_PAT }} # <-- Allows semantic-release-bot to push changes to protected branches
npm_config_tag: ${{ env.NPM_DIST_TAG }} # <-- For main, this is `latest.` Otherwise, `next`, `next-major`, etc. See ./.releaserc for release branch config.
run: |
npm run publish:docs /tmp/firebolt-docs
npm run publish:docs /tmp/firebolt-docs $RELEASE_CHANNEL
cd /tmp/firebolt-docs
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git add --all
git commit -m "chore: Publish $RELEASE_CHANNEL"
git diff-index --quiet HEAD || git commit -m "chore: Publish $RELEASE_CHANNEL"
git push
17 changes: 16 additions & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"name": "next-major",
"channel": "next-major",
"prerelease": true
},
{
"name": "proposed",
"channel": "proposed",
"prerelease": true
}
],
"dryRun": false,
Expand Down Expand Up @@ -48,6 +53,16 @@
{
"assets": "./*.tgz"
}
]
],
[
"@saithodev/semantic-release-backmerge",
{
"backmergeStrategy": "merge",
"mergeMode": "theirs",
"backmergeBranches": [
{ "from": "main", "to": "next" }
]
}
]
]
}
239 changes: 238 additions & 1 deletion CHANGELOG.md

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebolt-js/sdks",
"version": "0.16.0-test.1",
"version": "0.18.0-next.4",
"description": "The Firebolt JS SDK",
"type": "module",
"bin": {
Expand All @@ -15,7 +15,7 @@
"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",
"compile": "npx firebolt-openrpc openrpc --input src --template src/template/openrpc/template.json --output ./dist/firebolt-open-rpc.json --schemas node_modules/@firebolt-js/schemas/src/schemas --schemas src/schemas",
"slice": "npm run slice --workspaces",
"sdks": "npm run sdk --workspaces",
"docs": "npm run docs --workspaces",
Expand Down Expand Up @@ -44,20 +44,21 @@
"devDependencies": {
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@firebolt-js/openrpc": "2.0.2",
"@firebolt-js/schemas": "0.11.0",
"@firebolt-js/openrpc": "2.1.0",
"@firebolt-js/schemas": "1.0.0-next.0",
"@saithodev/semantic-release-backmerge": "^3.2.0",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@semantic-release/npm": "^9.0.1",
"@semantic-release/release-notes-generator": "^10.0.1",
"ajv": "^6.12.6",
"production-changelog": "./src/js/production-changelog/",
"husky": "^8.0.0",
"jest": "^28.1.0",
"jest-environment-jsdom": "^28.1.3",
"mkdirp": "^2.1.6",
"nopt": "^7.1.0",
"semantic-release": "^19.0.5",
"production-changelog": "./src/js/production-changelog/",
"semantic-release": "^21.1.1",
"typescript": "^4.6.4"
},
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions src/js/github.io/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const parsedArgs = Object.assign(defaultOpts, nopt(knownOpts, shortHands, proces
const signOff = () => console.log('\nThis has been a presentation of \x1b[38;5;202mFirebolt\x1b[0m \u{1F525} \u{1F529}\n')

const packageJson = await readJson(process.env.npm_package_json)
const version = channel(packageJson.version)
const version = parsedArgs.argv.remain && parsedArgs.argv.remain[0] || channel(packageJson.version)
const requirements = await readFiles(await readDir(path.join('.', 'requirements'), { recursive: true }), path.join('.', 'requirements'))

const processFiles = (docs, base, dir, subdir, category, setType) => {
Expand Down Expand Up @@ -120,7 +120,7 @@ const capabilities = () => {

const linkify = (method) => `[${method}](./${corerpc.methods.find(m => m.name === method) ? 'core' : 'manage'}/${method.split('.').shift()}/#${method.match(/\.on[A-Z]/) ? method.split('.').pop().charAt(2).toLowerCase() + method.split('.').pop().substring(3).toLowerCase() : method.split('.').pop().toLowerCase()})`
Object.keys(capabilities).sort().forEach(c => {
manifest += `## \`${c}\`\n`
manifest += `### \`${c}\`\n`

if (capabilities[c].uses.length) {
manifest += '\n| Uses |\n'
Expand Down
2 changes: 1 addition & 1 deletion src/js/version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ else if (task === 'channel') {
.then(JSON.parse)

// default to 'test' channel if branch is unknown
const config = releaserc.branches.find(b => b.name === branch) || { channel: 'test' }
const config = releaserc.branches.find(b => b.name === branch) || { channel: branch.split('/').pop() }
const channel = config.channel || (!config.prerelease ? 'latest' : config.name)

// return the configured channel name for the branch, otherwise return the branch name, unless it's the main branch, then return 'latest'
Expand Down
6 changes: 6 additions & 0 deletions src/json/firebolt-specification.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@
},
"xrn:firebolt:capability:privacy:advertising": {
"level": "could"
},
"xrn:firebolt:capability:metrics:distributor": {
"level": "could"
},
"xrn:firebolt:capability:storage:secure": {
"level": "could"
}
},
"apis": {}
Expand Down
75 changes: 67 additions & 8 deletions src/openrpc/accessibility.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"value": {
"enabled": true,
"styles": {
"fontFamily": "Monospace sans-serif",
"fontFamily": "monospaced_sanserif",
"fontSize": 1,
"fontColor": "#ffffff",
"fontEdge": "none",
Expand All @@ -48,8 +48,14 @@
"backgroundColor": "#000000",
"backgroundOpacity": 100,
"textAlign": "center",
"textAlignVertical": "middle"
}
"textAlignVertical": "middle",
"windowColor": "white",
"windowOpacity": 50
},
"preferredLanguages": [
"eng",
"spa"
]
}
}
}
Expand Down Expand Up @@ -86,7 +92,7 @@
"value": {
"enabled": true,
"styles": {
"fontFamily": "Monospace sans-serif",
"fontFamily": "monospaced_sanserif",
"fontSize": 1,
"fontColor": "#ffffff",
"fontEdge": "none",
Expand All @@ -95,8 +101,14 @@
"backgroundColor": "#000000",
"backgroundOpacity": 100,
"textAlign": "center",
"textAlignVertical": "middle"
}
"textAlignVertical": "middle",
"windowColor": "white",
"windowOpacity": 50
},
"preferredLanguages": [
"eng",
"spa"
]
}
}
}
Expand Down Expand Up @@ -175,9 +187,56 @@
}
}
]
}
},
{
"name": "audioDescriptionSettings",
"summary": "Get the user's preferred audio description settings",
"params": [],
"tags": [
{
"name": "property:readonly"
},
{
"name": "capabilities",
"x-uses": [
"xrn:firebolt:capability:accessibility:audiodescriptions"
]
}
],
"result": {
"name": "settings",
"summary": "the audio description settings",
"schema": {
"$ref": "#/components/schemas/AudioDescriptionSettings"
}
},
"examples": [
{
"name": "Getting the audio description settings",
"params": [],
"result": {
"name": "Default Result",
"value": {
"enabled": true
}
}
}
]
}
],
"components": {
"schemas": {}
"schemas": {
"AudioDescriptionSettings": {
"title": "AudioDescriptionSettings",
"type": "object",
"required": ["enabled"],
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether or not audio descriptions should be enabled by default"
}
}
}
}
}
}
2 changes: 2 additions & 0 deletions src/openrpc/account.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@
"params": [
{
"name": "token",
"required": true,
"schema": {
"$ref": "#/components/schemas/Token"
}
},
{
"name": "expiresIn",
"required": true,
"schema": {
"$ref": "#/components/schemas/Expiry"
}
Expand Down
Loading

0 comments on commit 11b43b4

Please sign in to comment.