Skip to content

Commit

Permalink
feat: first version
Browse files Browse the repository at this point in the history
  • Loading branch information
kribor committed Nov 13, 2021
0 parents commit eb960fd
Show file tree
Hide file tree
Showing 19,846 changed files with 2,764,380 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
63 changes: 63 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#
# # DO NOT MODIFY, WILL BE OVERWRITTEN BY @naturalcycles/dev-lib
#
version: 2

checks:
argument-count:
config:
threshold: 5
complex-logic:
config:
threshold: 4
file-lines:
config:
threshold: 800
method-complexity:
config:
threshold: 8
method-count:
config:
threshold: 50
method-lines:
config:
threshold: 100
nested-control-flow:
config:
threshold: 5
return-statements:
config:
threshold: 20
similar-code:
config:
threshold: 60
identical-code:
config:
threshold: 50

exclude_patterns:
- 'dist/'
- 'node_modules/'
- '**/*.test.*'
- '**/*.mock.*'
- '**/*.cnst.*'
- '**/*.config.*'
- '**/*.d.ts'
- 'build/'
- 'src/test/'
- 'src/environments/'
- 'src/env/'
- 'src/vendor/'
- 'scripts/'
- 'other/'
- 'patch/'
- 'cordova-hooks/'
- 'test/'
- 'resources/'
- 'static/'
- 'secret/'
- 'ex/'
- 'docs/'
- 'docker/'
- 'public/'
- '**/__exclude/'
48 changes: 48 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#
# DO NOT MODIFY, WILL BE OVERWRITTEN BY @naturalcycles/dev-lib
#
# http://editorconfig.org
#

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[**.md]
trim_trailing_whitespace = false
indent_size = 4

[**.html]
indent_size = 2

[**.{css,scss}]
indent_size = 2

[**.{js,ts}]
indent_size = 2

[**.json]
indent_size = 2

[**.xml]
indent_size = 2

[**.java]
indent_size = 4

[**.sql]
indent_size = 2

[.eslintrc]
indent_size = 2

[**.min.*]
indent_style = ignore
trim_trailing_whitespace = false
insert_final_newline = ignore
34 changes: 34 additions & 0 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: default

on: [push, workflow_dispatch]

jobs:
build-and-test-job:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
env:
NODE_OPTIONS: '--max-old-space-size=3200'
# CC_TEST_REPORTER_ID: 79976xxx set yours here
steps:
- { uses: actions/checkout@v2, with: { persist-credentials: false } }
- { uses: actions/setup-node@v2, with: { node-version: 14 } }
- uses: actions/cache@v2
with:
path: ./node_modules
key: deps-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- { name: yarn, run: yarn --frozen-lockfile }

- name: build
run: yarn build

- name: test
run: |
# curl -s -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter && chmod +x ./cc-test-reporter
# ./cc-test-reporter before-build
yarn test-ci
# ./cc-test-reporter after-build -t lcov

- uses: actions/upload-artifact@v2
with: { name: 'unit.xml', path: 'tmp/jest/unit.xml' }
- uses: actions/upload-artifact@v2
with: { name: 'coverage-unit', path: 'coverage/lcov-report' }
32 changes: 32 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: docs

on:
push:
# branches: [master, docs] # uncomment to enable on master
branches: [docs]

jobs:
docs-job:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
env: { NODE_OPTIONS: '--max-old-space-size=3200' }
steps:
- { uses: actions/checkout@v2, with: { persist-credentials: false } }
- { uses: actions/setup-node@v2, with: { node-version: 14 } }
- uses: actions/cache@v2
with:
path: ./node_modules
key: deps-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- { name: yarn, run: yarn --frozen-lockfile }

- name: docs-build
run: yarn docs-build

- name: publish docs to github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/.vuepress/dist
force_orphan: true
commit_message: 'deploy docs [skip ci]'
# publish_branch: gh-pages
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: release

on:
push:
branches: [master, next, act]

jobs:
release-job:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
env: { NODE_OPTIONS: '--max-old-space-size=3200' }
steps:
- { uses: actions/checkout@v2, with: { persist-credentials: true } }
- { uses: actions/setup-node@v2, with: { node-version: 14 } }

# Cache for npm/npx in ~/.npm
- uses: actions/cache@v2
with:
path: ~/.npm
key: npm-v1-${{ runner.os }}

# Normal cache for yarn in ./node_modules
- uses: actions/cache@v2
with:
path: ./node_modules
key: deps-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }}

- name: yarn
run: yarn --frozen-lockfile

- name: build
run: yarn build-prod

- name: release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx @naturalcycles/semantic-release
6 changes: 6 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
[ -n "$CI" ] && exit 0
. "$(dirname "$0")/_/husky.sh"

yarn commitlint-def $1
# exit 1 # uncomment to debug
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
[ -n "$CI" ] && exit 0
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged-def
20 changes: 20 additions & 0 deletions .yo-rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"@naturalcycles/generator-nodejs-lib": {
"promptValues": {
"npmName": "sunrise-timer-ha",
"githubOrg": "kribor",
"githubRepoName": "sunrise-timer-ha",
"moduleAuthor": "Kristofer Borgström",
"npmAccess": "public"
},
"answers": {
"npmName": "sunrise-timer-ha",
"githubOrg": "kribor",
"githubRepoName": "sunrise-timer-ha",
"moduleAuthor": "Kristofer Borgström",
"npmNameWithoutScope": "sunrise-timer-ha",
"githubFullName": "kribor/sunrise-timer-ha",
"npmAccess": "public"
}
}
}
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require('@naturalcycles/dev-lib/cfg/jest.config'),
}
1 change: 1 addition & 0 deletions node_modules/.bin/JSONStream

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/acorn

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/browserslist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/bt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/build

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/build-copy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/build-prod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/build-prod-esm-cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/commitlint

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/commitlint-def

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/conventional-commits-parser

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/cssesc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/del

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/escodegen

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/esgenerate

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/eslint

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/eslint-all

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/eslint-config-prettier

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/esparse

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/esvalidate

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/generate-build-info

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/git-raw-commits

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/husky

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/import-local-fixture

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/init-from-dev-lib

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/jest

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/js-yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/jsesc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/json2env

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/json5

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/kpy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/lint-all

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/lint-circleci

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/lint-staged

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/lint-staged-def

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/mkdirp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/nanoid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/parser

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/prettier

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/prettier-all

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/regexp-tree

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/rimraf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/secrets-decrypt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/secrets-encrypt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/secrets-gen-key

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/slack-this

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit eb960fd

Please sign in to comment.