generated from ubiquity/ts-template
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from ubiquity-os-marketplace/development
Merge development into main
- Loading branch information
Showing
42 changed files
with
450 additions
and
9,941 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Formatting Check | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
format-check: | ||
name: Check for formatting errors | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v2 | ||
|
||
- name: Install toolchain | ||
run: bun install --frozen-lockfile | ||
|
||
- name: Eslint | ||
run: bun run eslint --fix-dry-run | ||
|
||
- name: Cspell | ||
run: bun run format:cspell | ||
|
||
- name: Prettier | ||
run: bun run prettier --check . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,21 @@ | ||
name: "Update Configuration" | ||
name: Update Manifest and Commit Changes | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
|
||
jobs: | ||
update: | ||
name: "Update Configuration in manifest.json" | ||
update-manifest: | ||
name: "Update Manifest and Commit Changes" | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.10.0" | ||
|
||
- name: Enable corepack | ||
run: corepack enable | ||
|
||
- name: Install deps and run configuration update | ||
run: | | ||
yarn install | ||
yarn tsc --noCheck --project tsconfig.json | ||
- name: Update manifest configuration using GitHub Script | ||
uses: actions/github-script@v7 | ||
- name: Update Manifest and Commit Changes | ||
uses: ubiquity-os/action-deploy-plugin@main | ||
with: | ||
script: | | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const { pluginSettingsSchema } = require('./src/types/plugin-input'); | ||
const manifestPath = path.resolve("${{ github.workspace }}", './manifest.json'); | ||
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8')); | ||
const configuration = JSON.stringify(pluginSettingsSchema); | ||
manifest["configuration"] = JSON.parse(configuration); | ||
const updatedManifest = JSON.stringify(manifest, null, 2); | ||
console.log('Updated manifest:', updatedManifest); | ||
fs.writeFileSync(manifestPath, updatedManifest); | ||
- name: Commit and Push generated types | ||
run: | | ||
git config --global user.name 'ubiquity-os[bot]' | ||
git config --global user.email 'ubiquity-os[bot]@users.noreply.github.com' | ||
git add ./manifest.json | ||
if [ -n "$(git diff-index --cached --name-only HEAD)" ]; then | ||
git commit -m "chore: updated generated configuration" || echo "Lint-staged check failed" | ||
git push origin HEAD:${{ github.ref_name }} | ||
else | ||
echo "No changes to commit" | ||
fi | ||
treatAsEsm: false | ||
sourcemap: false | ||
pluginEntry: ${{ github.workspace }}/src/index.ts | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn commitlint --edit "$1" | ||
bun commitlint --edit "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn lint-staged | ||
bun lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist/ | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { Config } from "jest"; | ||
|
||
const cfg: Config = { | ||
transform: { | ||
"^.+\\.tsx?$": [ | ||
"ts-jest", | ||
{ | ||
useESM: true, | ||
}, | ||
], | ||
}, | ||
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], | ||
coveragePathIgnorePatterns: ["node_modules", "mocks"], | ||
collectCoverage: true, | ||
coverageReporters: ["json", "lcov", "text", "clover", "json-summary"], | ||
reporters: ["default", "jest-junit", "jest-md-dashboard"], | ||
coverageDirectory: "coverage", | ||
testTimeout: 20000, | ||
roots: ["<rootDir>", "tests"], | ||
extensionsToTreatAsEsm: [".ts"], | ||
moduleNameMapper: { | ||
"^(\\.{1,2}/.*)\\.js$": "$1", | ||
}, | ||
setupFilesAfterEnv: ["dotenv/config"], | ||
}; | ||
|
||
export default cfg; |
Oops, something went wrong.