Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoenig134 committed Aug 19, 2024
0 parents commit 5ce8d0e
Show file tree
Hide file tree
Showing 32 changed files with 10,298 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .ci/runChecks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set -e

npm ci
npm run build:node
npm run lint:eslint
npm run lint:prettier
npx license-check
npx better-npm-audit audit
28 changes: 28 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"extends": ["@js-soft/ts", "@js-soft/ts/jest"],
"parserOptions": {
"project": ["./tsconfig.json", "./test/tsconfig.json"]
},
"ignorePatterns": ["jest.config.js", "Schemas.ts", "dist", "node_modules", "lib-web", "*.gen.js", "demo"],
"rules": {
"jest/expect-expect": [
"error",
{
"assertFunctionNames": [
"expect",
"verify",
"expectValid*",
"*.expectThrows*",
"expectValid*",
"*.expectThrows*",
"Then.*",
"*.expectPublishedEvents",
"*.executeTests",
"expectThrows*"
]
}
],
"jest/max-nested-describe": ["error", { "max": 4 }],
"jest/no-conditional-in-test": "warn"
}
}
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Enmeshed Issue Tracker
url: https://github.com/nmshd/feedback/issues
about: Open bug reports and feature requests.
- name: Enmeshed Discussions
url: https://github.com/nmshd/feedback/discussions
about: Share your feedback with the Enmeshed team.
30 changes: 30 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
update-github-actions-dependencies:
patterns:
- "*"
reviewers:
- "jkoenig134"
labels:
- "dependencies"

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
groups:
update-npm-dependencies:
patterns:
- "*"
reviewers:
- "jkoenig134"
- "slavistan"
- "sebbi08"
- "Milena-Czierlinski"
labels:
- "dependencies"
6 changes: 6 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pull_request_rules:
- name: update pull request
conditions:
- label!=wip
actions:
update:
39 changes: 39 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "CodeQL"

on:
push:
branches: ["main", "release/**"]
pull_request:
branches: ["main", "release/**"]
schedule:
- cron: "38 11 * * 5"

jobs:
analyze:
name: Analyze
runs-on: "ubuntu-latest"
timeout-minutes: 360
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["javascript-typescript"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
13 changes: 13 additions & 0 deletions .github/workflows/new_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Notify about new issue or discussion

on:
pull_request_target:
types: [opened]

jobs:
send_notification:
runs-on: ubuntu-latest
steps:
- uses: nmshd/github-notify-action@v1
with:
webhook_url: ${{ secrets.MS_TEAMS_WEBHOOK_CONTRIBUTION }}
33 changes: 33 additions & 0 deletions .github/workflows/publish-prereleases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Prereleases

on:
push:
branches: [release/**]

jobs:
run-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: bash .ci/runChecks.sh

publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: current
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build:ci
env:
BUILD_NUMBER: ${{ github.run_number }}
COMMIT_HASH: ${{ github.sha }}
- run: npx enhanced-publish --if-possible --use-preid-as-tag --only-prerelease
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
needs: ["run-checks"]
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish

on:
push:
branches: [main]

jobs:
run-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: bash .ci/runChecks.sh

publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: current
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build:ci
env:
BUILD_NUMBER: ${{ github.run_number }}
COMMIT_HASH: ${{ github.sha }}
- run: npx enhanced-publish --if-possible --use-preid-as-tag
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
needs: ["run-checks"]
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

on:
pull_request:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
run-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: bash .ci/runChecks.sh

test-iql:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: current
- run: npm ci
- run: npm run build:node
env:
BUILD_NUMBER: ${{ github.run_number }}
COMMIT_HASH: ${{ github.sha }}
- run: npm run test:ci
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
env:
fail_ci_if_error: true
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
generated
demo/_bundle.js
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
dist
node_modules
package-lock.json
lib-web
dist-test
Schemas.ts
generated
*.gen.js
16 changes: 16 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"endOfLine": "lf",
"printWidth": 180,
"tabWidth": 4,
"trailingComma": "none",
"semi": true,
"arrowParens": "always",
"overrides": [
{
"files": ["*.yaml", "*.yml"],
"options": {
"tabWidth": 2
}
}
]
}
56 changes: 56 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"files.autoSave": "off",
"html.format.wrapAttributes": "preserve-aligned",
"todo-tree.highlights.defaultHighlight": {
"fontWeight": "bold",
"foreground": "#ff9900",
"background": "#a8c023",
"type": "text-and-comment",
"opacity": 30
},
"todo-tree.highlights.customHighlight": {
"TODO:": {
"iconColour": "green"
}
},
"todo-tree.filtering.excludeGlobs": [
"**/vendor/**",
"**/node_modules/**",
"**/bower_components/**",
"**/build/**",
"**/.vscode/**",
"**/.github/**",
"**/_output/**",
"**/*.min.*",
"**/*.map"
],
"todo-tree.highlights.highlightDelay": 0,
"todo-tree.general.tags": ["TODO:"],
"xmlTools.splitAttributesOnFormat": true,
"xmlTools.enforcePrettySelfClosingTagOnFormat": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "always"
},
"files.eol": "\n",
"typescript.tsdk": "node_modules/typescript/lib"
}
27 changes: 27 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Compile",
"command": "npm run build:watch",
"type": "shell",
"isBackground": true,
"presentation": {
"reveal": "never",
"focus": false
},
"runOptions": {
"runOn": "folderOpen"
}
},
{
"label": "Clear",
"command": "npm run test:teardown",
"type": "shell",
"isBackground": true,
"presentation": {
"reveal": "always"
}
}
]
}
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2023 j&s-soft GmbH

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.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# IQL - The Enmeshed Identity Query Language

[![GitHub Actions CI](https://github.com/nmshd/iql/workflows/Publish/badge.svg)](https://github.com/nmshd/iql/actions?query=workflow%3APublish)
[![npm version](https://badge.fury.io/js/@nmshd%2Fiql.svg)](https://www.npmjs.com/package/@nmshd/iql)

IQL is a domain-specific language to filter and query Enmeshed attributes.

## Documentation

You can find the documentation for Enmeshed on [enmeshed.eu](https://enmeshed.eu).

To get started developing in this repository, see the [developer's guide](README_dev.md).

## Feedback

Please file any bugs or feature requests by creating an [issue](https://github.com/nmshd/feedback/issues).

Share your feedback with the Enmeshed team by contributing to the [discussions](https://github.com/nmshd/feedback/discussions).

## Contribute

Contribution to this project is highly apprecicated. Head over to our [contribution guide](https://github.com/nmshd/.github/blob/main/CONTRIBUTING.md) to learn more.

## License

[MIT](LICENSE)
Loading

0 comments on commit 5ce8d0e

Please sign in to comment.