-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 93abb2d
Showing
23 changed files
with
4,623 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM docker.io/node:22.5.1 | ||
|
||
USER node |
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,16 @@ | ||
{ | ||
"build": { | ||
"context": ".", | ||
"dockerfile": "./Dockerfile" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} | ||
}, | ||
"name": "Node.js 22" | ||
} |
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,63 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
publish-npm: | ||
runs-on: ubuntu-latest | ||
env: | ||
ANCA_CI: true | ||
name: "Publish package to npm registry" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: "Checkout repo" | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.5.1 | ||
registry-url: https://registry.npmjs.org/ | ||
name: "Install Node.js" | ||
- run: npm ci | ||
name: "Install dependencies" | ||
- run: npm test | ||
name: "Run tests" | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | ||
name: "Build distribution bundle and publish to registry" | ||
build-executables: | ||
permissions: write-all | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
env: | ||
ANCA_CI: true | ||
name: Build executables on ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Checkout repo | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.5.1 | ||
name: Install Node.js | ||
- run: npm ci | ||
name: Install dependencies | ||
- run: npm run build:sea | ||
name: Build executables | ||
- run: | | ||
EXT="" | ||
if [ "${{ matrix.os }}" == "windows-latest" ]; then | ||
EXT=".exe" | ||
fi | ||
mv build/sea/app${EXT} build/sea/${{ github.event.repository.name }}-${{ github.ref_name }}-${{ runner.arch }}${EXT} | ||
shell: bash | ||
name: Rename executable | ||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
build/sea/${{ github.event.repository.name }}-${{ github.ref_name }}-${{ runner.arch }}${{ matrix.os == 'windows-latest' && '.exe' || '' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
name: Attach executables to release |
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,25 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: ["**"] | ||
|
||
jobs: | ||
test-commit: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [18.20.4, 20.16.0, 22.5.1] | ||
name: Test repo on Node.js ${{ matrix.node }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: "Checkout repo" | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
registry-url: https://registry.npmjs.org/ | ||
name: "Install Node.js" | ||
- run: npm ci | ||
name: "Install dependencies" | ||
- run: npm test | ||
name: "Run tests" |
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,56 @@ | ||
# Editor directories and files | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
.vscode | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
*.lock | ||
|
||
# Temp folder | ||
tmp | ||
|
||
# Built sources | ||
/dist | ||
/build | ||
*.spec | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
.yarn-integrity | ||
|
||
# Local settings | ||
.env | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.local | ||
|
||
# Node.js logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Output of 'npm pack' | ||
*.tgz |
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 @@ | ||
# General | ||
**/.git | ||
**/.svn | ||
**/.hg | ||
|
||
# Binaries | ||
/bin | ||
|
||
# Devcontainer | ||
.devcontainer | ||
|
||
# Node.js | ||
**/node_modules | ||
package-lock.json | ||
|
||
# Distributions | ||
/build | ||
/dist | ||
|
||
# Cinnabar Meta | ||
**/cinnabar.js | ||
**/cinnabar.ts | ||
cinnabar.json | ||
CHANGELOG.md | ||
|
||
# Anca | ||
anca.json |
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 @@ | ||
{} |
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,22 @@ | ||
# Contributing | ||
|
||
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request. | ||
|
||
## Installation | ||
|
||
We support [Devcontainers](https://containers.dev/). You can use the provided development container to work on this project. The development container includes all the necessary tools and dependencies to work on this project. | ||
|
||
Otherwise, download, install and configure [Node.js](https://nodejs.org/en/download/). | ||
|
||
Then, run the following commands to install the dependencies and run the tests: | ||
|
||
```bash | ||
npm ci | ||
npm test | ||
``` | ||
|
||
## Authors | ||
|
||
### Maintainers | ||
|
||
- Timur Moziev ([@TimurRin](https://github.com/TimurRin)) |
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,29 @@ | ||
# triggram | ||
|
||
> **DISCLAIMER**: This project is not production ready. All versions below 1.0.0 should be considered unstable | ||
KZ.GOV UZOGA parser | ||
|
||
## Installation | ||
|
||
### npm | ||
|
||
```bash | ||
npm install -g triggram | ||
``` | ||
|
||
## Contributing | ||
|
||
Visit [`CONTRIBUTING.md`](CONTRIBUTING.md). | ||
|
||
Current maintainers: | ||
|
||
- Timur Moziev ([@TimurRin](https://github.com/TimurRin)) | ||
|
||
## License | ||
|
||
Visit [`LICENSE`](LICENSE). | ||
|
||
## Anca | ||
|
||
This repository is a part of [Anca](https://github.com/cinnabar-forge/anca) standardization project. Parts of the files and code are generated by Anca. |
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,46 @@ | ||
{ | ||
"authors": [ | ||
{ | ||
"name": "Timur Moziev", | ||
"github": "TimurRin", | ||
"email": "[email protected]", | ||
"type": "maintainer", | ||
"url": "https://timurrin.github.io/" | ||
} | ||
], | ||
"cinnabarMeta": { | ||
"dataVersion": 0, | ||
"version": { | ||
"latest": "0.1.0", | ||
"latestNext": "0.1.0+next.20240803_193600", | ||
"timestamp": 1722713760 | ||
}, | ||
"files": [ | ||
{ | ||
"path": "./package.json", | ||
"type": "nodejs-package-json" | ||
}, | ||
{ | ||
"path": "./package-lock.json", | ||
"type": "nodejs-package-lock-json" | ||
}, | ||
{ | ||
"path": "./src/cinnabar.ts", | ||
"type": "typescript", | ||
"updateBuild": true | ||
} | ||
], | ||
"repo": { | ||
"type": "github", | ||
"value": "cinnabar-forge/triggram" | ||
}, | ||
"updateChangelog": true | ||
}, | ||
"development": { | ||
"nodejsSeaModules": { | ||
"sqlite3": true | ||
} | ||
}, | ||
"type": "app", | ||
"stack": "nodejs" | ||
} |
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,35 @@ | ||
import { build } from "esbuild"; | ||
import fs from "fs"; | ||
import path from "path"; | ||
|
||
const getNodeModules = () => { | ||
const nodeModulesPath = path.resolve(import.meta.dirname, "node_modules"); | ||
if (!fs.existsSync(nodeModulesPath)) { | ||
return []; | ||
} | ||
|
||
return fs.readdirSync(nodeModulesPath).filter((module) => { | ||
return !module.startsWith("."); | ||
}); | ||
}; | ||
|
||
const ESBUILD_NAME = "NPM Bundle"; | ||
const OUT_FILE = "dist/index.js"; | ||
|
||
const nodeModules = getNodeModules(); | ||
|
||
build({ | ||
bundle: true, | ||
entryPoints: ["src/index.ts"], | ||
external: nodeModules, | ||
format: "esm", | ||
outfile: OUT_FILE, | ||
platform: "node", | ||
}) | ||
.then((r) => { | ||
console.log(`${ESBUILD_NAME} has been built to ${OUT_FILE}`); | ||
}) | ||
.catch((e) => { | ||
console.log(`Error building ${ESBUILD_NAME}: ${e.message}`); | ||
process.exit(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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import cinnabarPlugin from "@cinnabar-forge/eslint-plugin"; | ||
|
||
// [ANCA-ANCHOR-CUSTOM-CONTENT-START] | ||
|
||
const files = ["src/**/*.ts"]; | ||
const ignores = ["bin/**/*", "build/**/*", "dist/**/*"]; | ||
const rules = { | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"jsdoc/require-param-description": "off", | ||
"jsdoc/require-param-type": "off", | ||
"jsdoc/require-returns": "off", | ||
"jsdoc/require-returns-type": "off", | ||
"security/detect-non-literal-fs-filename": "off", | ||
"security/detect-object-injection": "off", | ||
}; | ||
|
||
// [ANCA-ANCHOR-CUSTOM-CONTENT-END] | ||
|
||
export default [ | ||
...cinnabarPlugin.default.map((config) => ({ | ||
...config, | ||
files, | ||
})), | ||
{ | ||
files, | ||
rules, | ||
}, | ||
{ | ||
ignores, | ||
}, | ||
]; |
Oops, something went wrong.