From fb1516e500161897580af31b6c123546ca1c449e Mon Sep 17 00:00:00 2001 From: Alexey Filippov Date: Sat, 7 Sep 2024 22:19:20 +0300 Subject: [PATCH] Initial commit --- .commitlintrc.json | 36 + .editorconfig | 19 + .eslintrc | 29 + .gitattributes | 3 + .github/CODEOWNERS | 1 + .github/CODE_OF_CONDUCT.md | 74 + .github/COMMIT_CONVENTION.md | 59 + .github/FUNDING.yml | 3 + .github/PULL_REQUEST_TEMPLATE.md | 12 + .github/SECURITY.md | 5 + .github/dependabot.yml | 14 + .github/husky/.gitignore | 1 + .github/husky/commit-msg | 4 + .github/husky/pre-commit | 4 + .github/labels.yml | 46 + .github/workflows/auto-deprecate.yml | 27 + .github/workflows/codeql.yml | 76 + .github/workflows/continuous-integration.yml | 31 + .../dependabot-approve-and-auto-merge.yml | 36 + .github/workflows/label-sync.yml | 22 + .github/workflows/lock.yml | 32 + .github/workflows/publish-dev.yml | 44 + .gitignore | 37 + .npmignore | 15 + .prettierrc | 8 + .release-it.json | 8 + LICENSE | 21 + README.md | 31 + jest.config.json | 13 + package.json | 70 + src/index.ts | 4 + src/library-options.interface.ts | 1 + src/library.module-definition.ts | 8 + src/library.module.ts | 19 + src/library.service.ts | 5 + test/.keep | 0 tsconfig.build.json | 23 + tsconfig.json | 7 + yarn.lock | 5783 +++++++++++++++++ 39 files changed, 6631 insertions(+) create mode 100644 .commitlintrc.json create mode 100644 .editorconfig create mode 100644 .eslintrc create mode 100644 .gitattributes create mode 100644 .github/CODEOWNERS create mode 100644 .github/CODE_OF_CONDUCT.md create mode 100644 .github/COMMIT_CONVENTION.md create mode 100644 .github/FUNDING.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/SECURITY.md create mode 100644 .github/dependabot.yml create mode 100644 .github/husky/.gitignore create mode 100644 .github/husky/commit-msg create mode 100644 .github/husky/pre-commit create mode 100644 .github/labels.yml create mode 100644 .github/workflows/auto-deprecate.yml create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/continuous-integration.yml create mode 100644 .github/workflows/dependabot-approve-and-auto-merge.yml create mode 100644 .github/workflows/label-sync.yml create mode 100644 .github/workflows/lock.yml create mode 100644 .github/workflows/publish-dev.yml create mode 100644 .gitignore create mode 100644 .npmignore create mode 100644 .prettierrc create mode 100644 .release-it.json create mode 100644 LICENSE create mode 100644 README.md create mode 100644 jest.config.json create mode 100644 package.json create mode 100644 src/index.ts create mode 100644 src/library-options.interface.ts create mode 100644 src/library.module-definition.ts create mode 100644 src/library.module.ts create mode 100644 src/library.service.ts create mode 100644 test/.keep create mode 100644 tsconfig.build.json create mode 100644 tsconfig.json create mode 100644 yarn.lock diff --git a/.commitlintrc.json b/.commitlintrc.json new file mode 100644 index 0000000..6309193 --- /dev/null +++ b/.commitlintrc.json @@ -0,0 +1,36 @@ +{ + "extends": [ + "@commitlint/config-angular" + ], + "rules": { + "subject-case": [ + 2, + "always", + [ + "sentence-case", + "start-case", + "pascal-case", + "upper-case", + "lower-case" + ] + ], + "type-enum": [ + 2, + "always", + [ + "build", + "chore", + "ci", + "docs", + "feat", + "fix", + "perf", + "refactor", + "revert", + "style", + "test", + "sample" + ] + ] + } +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ea6cdde --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ +# editorconfig.org +root = true + +[*] +end_of_line = lf +indent_style = tab +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_size = 4 +max_line_length = 140 + +[*.{yaml, yml}] +indent_style = space +indent_size = 2 + +[*.md] +indent_style = space +trim_trailing_whitespace = false diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..7997aaf --- /dev/null +++ b/.eslintrc @@ -0,0 +1,29 @@ +{ + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": "tsconfig.json", + "sourceType": "module" + }, + "plugins": [ + "@typescript-eslint/eslint-plugin" + ], + "extends": [ + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "prettier" + ], + "root": true, + "env": { + "node": true + }, + "rules": { + "@typescript-eslint/interface-name-prefix": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/no-empty-interface": "off" + } +} + diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..65be180 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +yarn.lock -diff -merge +yarn.lock linguist-generated=true +* text eol=lf diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..381288b --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @SocketSomeone diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..f8cfa5a --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at socket.someone@gmail.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/.github/COMMIT_CONVENTION.md b/.github/COMMIT_CONVENTION.md new file mode 100644 index 0000000..11ef92f --- /dev/null +++ b/.github/COMMIT_CONVENTION.md @@ -0,0 +1,59 @@ +## Git Commit Message Convention + +> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular). + +#### TL;DR: + +Messages must be matched by the following regex: + +```js +/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|types|wip)(\(.+\))?: .{1,72}/; +``` + +### Full Message Format + +A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: + +``` +(): + + + +