feat(regime)

This commit is contained in:
Dan Finch 2026-04-29 00:55:53 +02:00
commit 2be7ec6836
62 changed files with 1817 additions and 0 deletions

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,5 @@
{
"devDependencies": {
"@types/bun": "^1.3.13"
}
}

View file

@ -0,0 +1,13 @@
{
"extends": "./tsconfig.base.json",
"references": [
{ "path": "./tsconfig.src.json" }
],
"compilerOptions": {
"composite": true,
"types": ["bun"]
},
"include": [
"src/bun"
]
}

View file

@ -0,0 +1,5 @@
{
"references": [
{ "path": "./tsconfig.bun.json" }
]
}

View file

@ -0,0 +1,5 @@
{
"exclude": [
"src/bun"
]
}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,5 @@
{
"devDependencies": {
"@cloudflare/workers-types": "^4.20250425.0"
}
}

View file

@ -0,0 +1,13 @@
{
"extends": "./tsconfig.base.json",
"references": [
{ "path": "./tsconfig.src.json" }
],
"compilerOptions": {
"composite": true,
"types": ["@cloudflare/workers-types"]
},
"include": [
"src/cloudflare"
]
}

View file

@ -0,0 +1,5 @@
{
"references": [
{ "path": "./tsconfig.cloudflare.json" }
]
}

View file

@ -0,0 +1,5 @@
{
"exclude": [
"src/cloudflare"
]
}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,7 @@
Copyright © 2026 Sigitex
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -0,0 +1,7 @@
{
"inherits": [
"shared/repo",
"shared/library",
"tool/oxc"
]
}

View file

@ -0,0 +1,5 @@
{
"inherits": [
"shared/library"
]
}

View file

@ -0,0 +1,9 @@
{
"inherits": [
"shared/repo",
"shared/package",
"tool/oxc",
"tool/commitlint",
"tool/husky"
]
}

View file

@ -0,0 +1,11 @@
{
"workspaces": {
"catalog": {
"@types/bun": "1.3.12"
}
},
"scripts": {
"test": "bun run --workspaces --parallel --no-exit-on-error test",
"check": "bun run --workspaces --parallel --no-exit-on-error check"
}
}

View file

@ -0,0 +1,5 @@
{
"patterns": {
"*.code-workspace": "merge jsonc"
}
}

View file

@ -0,0 +1,27 @@
{
"folders": [
{
"name": "<<repo>>",
"path": "."
}
],
"settings": {
"oxc.path.oxfmt": "./node_modules/.bin/oxfmt",
"oxc.path.oxlint": "./node_modules/.bin/oxlint",
"files.exclude": {
"**/.git": true,
"**/node_modules": true,
"**/.temp": true,
"**/dist": true,
"**/*.tsbuildinfo": true,
},
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"tsconfig.json": "tsconfig.*.json",
"package.json": "bun.lock, biome.json*, *.bun.plugin.ts, ox*.config.ts, .gitignore, .mirrorignore, regime.config.json, commitlint.config.*, release.config.*js",
"vite.config.ts": "*.vite.plugin.ts",
"README.md": "LICENSE, LICENSE.md"
},
"git.ignoreLimitWarning": true,
}
}

View file

@ -0,0 +1,5 @@
{
"inherits": [
"shared/package"
]
}

View file

@ -0,0 +1,13 @@
{
"devDependencies": {
"@typescript/native-preview": "beta",
"@types/bun": "^1.3.13"
},
"scripts": {
"check": "tsgo --build",
"test": "bun test --pass-with-no-tests --tsconfig-override tsconfig.test.json"
},
"files": [
"src"
]
}

View file

@ -0,0 +1,14 @@
{
"compilerOptions": {
"module": "esnext",
"target": "esnext",
"lib": ["esnext"],
"types": [],
"moduleResolution": "bundler",
"esModuleInterop": true,
"skipDefaultLibCheck": true,
"skipLibCheck": true,
"strict": true,
"outDir": "dist"
}
}

View file

@ -0,0 +1,12 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"composite": true,
"types": ["bun"]
},
"include": [
"*.config.ts",
"*.config.cjs"
],
"files": []
}

View file

@ -0,0 +1,8 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.src.json" },
{ "path": "./tsconfig.test.json" },
{ "path": "./tsconfig.config.json" }
]
}

View file

@ -0,0 +1,9 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"composite": true
},
"include": [
"src"
]
}

View file

@ -0,0 +1,14 @@
{
"extends": "./tsconfig.base.json",
"references": [
{ "path": "./tsconfig.src.json" }
],
"compilerOptions": {
"composite": true,
"types": ["bun"]
},
"include": [
"tests"
],
"files": []
}

View file

@ -0,0 +1,7 @@
{
"patterns": {
"package.json": "merge json",
"tsconfig.json": "merge json",
"tsconfig.*.json": "merge json"
}
}

View file

@ -0,0 +1,11 @@
{
"license": "MIT",
"author": {
"name": "Sigitex",
"url": "http://github.com/sigitex"
},
"repository": {
"type": "git",
"url": "https://github.com/sigitex/<<repo>>.git"
}
}

View file

@ -0,0 +1,3 @@
{
"inherits": ["include/license"]
}

View file

@ -0,0 +1 @@
bunx --no-install -- commitlint --edit $1

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,3 @@
export default {
extends: ["@commitlint/config-conventional"]
}

View file

@ -0,0 +1,6 @@
{
"devDependencies": {
"@commitlint/cli": "^20.5.3",
"@commitlint/config-conventional": "^20.5.3"
}
}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,8 @@
{
"devDependencies": {
"husky": "^9.1.7"
},
"scripts": {
"prepare": "husky"
}
}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,16 @@
import { defineConfig } from "oxfmt"
export default defineConfig({
useTabs: false,
tabWidth: 2,
printWidth: 80,
singleQuote: false,
jsxSingleQuote: false,
quoteProps: "as-needed",
trailingComma: "all",
semi: false,
arrowParens: "always",
bracketSameLine: false,
bracketSpacing: true,
ignorePatterns: ["**/*.gen.ts"],
});

View file

@ -0,0 +1,88 @@
import { defineConfig } from "oxlint"
export default defineConfig({
plugins: ["typescript", "unicorn", "oxc"],
ignorePatterns: ["**/*.gen.ts", "node_modules/**/*"],
categories: {
correctness: "error",
suspicious: "warn",
perf: "warn",
style: "warn",
restriction: "error",
},
rules: {
"capitalized-comments": "off",
"default-case": "off",
"filename-case": "off",
"func-style": ["error", "declaration", { allowArrowFunctions: true }],
"id-length": "off",
"init-declarations": "off",
"max-params": "off",
"max-statements": "off",
"new-cap": "off",
"no-array-for-each": "off",
"no-async-await": "off",
"no-await-expression-member": "off",
"no-await-in-loop": "off",
"no-bitwise": "off",
"no-console": "off",
"no-continue": "off",
"no-dynamic-delete": "off",
"no-empty-file": "off",
"no-empty-function": "off",
"no-implicit-coercion": "off",
"no-magic-numbers": "off",
"no-multi-assign": "off",
"no-nested-ternary": "off",
"unicorn/no-nested-ternary": "off",
"no-null": "off",
"no-optional-chaining": "off",
"no-plusplus": "off",
"no-rest-spread-properties": "off",
"no-shadow-restricted-names": "off",
"no-shadow": "off",
"no-ternary": "off",
"no-undefined": "off",
"no-underscore-dangle": "off",
"no-use-before-define": "off",
"unicorn/numeric-separators-style": "off",
"prefer-destructuring": "off",
"prefer-for-of": "off",
"prefer-template": "off",
"prefer-ternary": "off",
"require-module-specifiers": "off",
"sort-imports": "off",
"sort-keys": "off",
"switch-case-braces": "off",
"typescript/consistent-indexed-object-style": "off",
"typescript/consistent-type-definitions": ["error", "type"],
"typescript/explicit-function-return-type": "off",
"typescript/explicit-member-accessibility": "off",
"typescript/explicit-module-boundary-types": "off",
"typescript/no-empty-interface": "off",
"typescript/no-empty-object-type": "off",
"typescript/no-namespace": "off",
"typescript/no-non-null-assertion": "off",
"typescript/prefer-function-type": "off",
},
overrides: [
{
files: ["*.test.ts"],
rules: {
"typescript/no-explicit-any": "off",
"typescript/no-require-imports": "off",
"typescript/no-var-requires": "off",
"unicorn/prefer-module": "off",
"unicorn/consistent-function-scoping": "off",
},
},
{
files: ["*.d.ts"],
rules: {
"typescript/no-explicit-any": "off",
"unicorn/consistent-function-scoping": "off",
"typescript/consistent-type-definitions": "off",
},
},
],
})

View file

@ -0,0 +1,9 @@
{
"devDependencies": {
"oxfmt": "^0.47.0",
"oxlint": "^1.62.0"
},
"scripts": {
"lint": "oxlint"
}
}

View file

@ -0,0 +1,13 @@
name: Checks
on:
push:
branches: ["*"]
pull_request:
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: https://${{ secrets.FORGE_TOKEN }}@code.quickbasic.org/sigitex/regime/actions/checks@main

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,18 @@
name: Mirror to GitHub
on:
push:
branches:
- main
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: https://${{ secrets.FORGE_TOKEN }}@code.quickbasic.org/sigitex/regime/actions/mirror@main
with:
target: sigitex/<<repo>>
token: ${{ secrets.MIRROR_TOKEN }}

View file

@ -0,0 +1,3 @@
AGENTS.md
.forgejo
openspec

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,27 @@
name: Checks
on:
push:
branches: ["*"]
pull_request:
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: https://${{ secrets.FORGE_TOKEN }}@code.quickbasic.org/sigitex/regime/actions/checks@main
release:
runs-on: ubuntu-latest
needs: checks
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: https://${{ secrets.FORGE_TOKEN }}@code.quickbasic.org/sigitex/regime/actions/release@main
with:
gitea-token: ${{ secrets.FORGE_TOKEN }}
gitea-url: https://code.quickbasic.org
npm-token: ${{ secrets.NPM_TOKEN }}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,8 @@
{
"devDependencies": {
"semantic-release": "^25.0.3",
"multi-semantic-release": "^3.1.0",
"@markwylde/semantic-release-gitea": "^2.2.0",
"@semantic-release/exec": "^7.0.3"
}
}

View file

@ -0,0 +1,16 @@
/**
* @type {import('semantic-release').GlobalConfig}
*/
module.exports = {
repositoryUrl: "https://code.quickbasic.org/sigitex/<<repo>>.git",
branches: ["main"],
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/exec", {
prepareCmd: "npm pkg set version=${nextRelease.version}",
publishCmd: "npm publish --access public",
}],
"@markwylde/semantic-release-gitea",
],
};