@stonyx/logs 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.cjs ADDED
@@ -0,0 +1,118 @@
1
+ module.exports = {
2
+ root: true,
3
+ parserOptions: {
4
+ ecmaVersion: 2018,
5
+ sourceType: 'module',
6
+ },
7
+ extends: [
8
+ 'eslint:recommended',
9
+ ],
10
+ globals: {
11
+ Promise: 'readonly',
12
+ require: 'readonly',
13
+ module: 'readonly',
14
+ },
15
+ env: { browser: true },
16
+ rules: {
17
+ indent: ['error', 2],
18
+ 'brace-style': ['error', '1tbs', { allowSingleLine: true }],
19
+ 'eol-last': ['error', 'always'],
20
+ 'comma-dangle': ['error', 'always-multiline'],
21
+ 'no-alert': 'error',
22
+ 'key-spacing': ['error', {
23
+ beforeColon: false,
24
+ afterColon: true,
25
+ }],
26
+ 'keyword-spacing': 'error',
27
+ 'linebreak-style': ['error', 'unix'],
28
+ 'lines-around-comment': ['error', {
29
+ beforeBlockComment: true,
30
+ afterBlockComment: false,
31
+ beforeLineComment: true,
32
+ afterLineComment: false,
33
+ allowBlockStart: true,
34
+ allowClassStart: true,
35
+ allowObjectStart: true,
36
+ allowArrayStart: true,
37
+ }],
38
+ 'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
39
+ 'multiline-comment-style': ['error', 'starred-block'],
40
+ 'no-lonely-if': 'error',
41
+ 'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
42
+ 'no-multiple-empty-lines': ['error', {
43
+ max: 2,
44
+ maxEOF: 1,
45
+ }],
46
+ 'no-trailing-spaces': 'error',
47
+ 'no-unneeded-ternary': ['error', { defaultAssignment: false }],
48
+ 'no-whitespace-before-property': 'error',
49
+ 'nonblock-statement-body-position': ['error', 'beside', { overrides: { while: 'below' }}],
50
+ 'object-curly-newline': ['error', { multiline: true }],
51
+ 'object-curly-spacing': ['error', 'always', {
52
+ objectsInObjects: false,
53
+ arraysInObjects: false,
54
+ }],
55
+ 'object-property-newline': 'error',
56
+ 'operator-assignment': ['error', 'always'],
57
+ 'padding-line-between-statements': ['error', {
58
+ blankLine: 'always',
59
+ prev: '*',
60
+ next: 'return',
61
+ }],
62
+ 'quote-props': ['error', 'as-needed'],
63
+ quotes: ['error', 'single', {
64
+ avoidEscape: true,
65
+ allowTemplateLiterals: true,
66
+ }],
67
+ semi: ['error', 'always'],
68
+ 'semi-spacing': 'error',
69
+ 'semi-style': ['error', 'last'],
70
+ 'space-before-blocks': ['error', 'always'],
71
+ 'space-before-function-paren': ['error', 'never'],
72
+ 'space-in-parens': ['error', 'never'],
73
+ 'space-infix-ops': 'error',
74
+ 'space-unary-ops': ['error', {
75
+ words: true,
76
+ nonwords: false,
77
+ }],
78
+ 'spaced-comment': ['error', 'always'],
79
+ 'switch-colon-spacing': 'error',
80
+ 'template-tag-spacing': ['error', 'always'],
81
+ 'wrap-regex': 'error',
82
+ 'arrow-parens': ['error', 'as-needed'],
83
+ 'arrow-spacing': 'error',
84
+ 'generator-star-spacing': ['error', {
85
+ before: true,
86
+ after: false,
87
+ }],
88
+ 'no-console': ['error', { allow: ['warn', 'error']}],
89
+ 'no-case-declarations': 'off',
90
+ 'no-useless-computed-key': 'error',
91
+ 'no-useless-rename': 'error',
92
+ 'no-var': 'error',
93
+ 'object-shorthand': 'error',
94
+ 'prefer-arrow-callback': 'error',
95
+ 'prefer-const': 'error',
96
+ 'prefer-numeric-literals': 'error',
97
+ 'prefer-template': 'error',
98
+ 'template-curly-spacing': 'error',
99
+ 'yield-star-spacing': 'error',
100
+ },
101
+ overrides: [
102
+ {
103
+ files: [
104
+ '.eslintrc.js',
105
+ ],
106
+ parserOptions: {
107
+ sourceType: 'script',
108
+ ecmaVersion: 2018,
109
+ },
110
+ env: {
111
+ browser: false,
112
+ node: true,
113
+ },
114
+ plugins: ['node'],
115
+ rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { 'node/no-unpublished-require': 'off' }),
116
+ },
117
+ ],
118
+ };
@@ -0,0 +1 @@
1
+ github: abofs
@@ -0,0 +1,16 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [dev, main]
6
+
7
+ concurrency:
8
+ group: ci-${{ github.head_ref || github.ref }}
9
+ cancel-in-progress: true
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ test:
16
+ uses: abofs/stonyx-workflows/.github/workflows/ci.yml@main
@@ -0,0 +1,51 @@
1
+ name: Publish to NPM
2
+
3
+ on:
4
+ repository_dispatch:
5
+ types: [cascade-publish]
6
+ workflow_dispatch:
7
+ inputs:
8
+ version-type:
9
+ description: 'Version type'
10
+ required: true
11
+ type: choice
12
+ options:
13
+ - patch
14
+ - minor
15
+ - major
16
+ custom-version:
17
+ description: 'Custom version (optional, overrides version-type)'
18
+ required: false
19
+ type: string
20
+ pull_request:
21
+ types: [opened, synchronize, reopened]
22
+ branches: [main]
23
+ push:
24
+ branches: [main]
25
+
26
+ concurrency:
27
+ group: ${{ github.event_name == 'repository_dispatch' && 'cascade-update' || format('publish-{0}', github.ref) }}
28
+ cancel-in-progress: false
29
+
30
+ permissions:
31
+ contents: write
32
+ id-token: write
33
+ pull-requests: write
34
+
35
+ jobs:
36
+ publish:
37
+ if: "!contains(github.event.head_commit.message, '[skip ci]')"
38
+ uses: abofs/stonyx-workflows/.github/workflows/npm-publish.yml@main
39
+ with:
40
+ version-type: ${{ github.event.inputs.version-type }}
41
+ custom-version: ${{ github.event.inputs.custom-version }}
42
+ cascade-source: ${{ github.event.client_payload.source_package || '' }}
43
+ secrets: inherit
44
+
45
+ cascade:
46
+ needs: publish
47
+ uses: abofs/stonyx-workflows/.github/workflows/cascade.yml@main
48
+ with:
49
+ package-name: ${{ needs.publish.outputs.package-name }}
50
+ published-version: ${{ needs.publish.outputs.published-version }}
51
+ secrets: inherit