@mkody/twitch-emoticons 2.6.2 → 2.7.1
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.json +143 -143
- package/.github/codeql/codeql-config.yml +4 -4
- package/.github/workflows/codeql.yml +50 -50
- package/.github/workflows/eslint.yml +50 -50
- package/.github/workflows/release.yml +22 -0
- package/.github/workflows/yarn-test.yml +17 -17
- package/.jsdoc.json +39 -39
- package/.nvmrc +1 -0
- package/LICENSE +22 -22
- package/README.md +13 -8
- package/docs/BTTVEmote.html +83 -5
- package/docs/Channel.html +1 -1
- package/docs/Collection.html +1 -1
- package/docs/Emote.html +3 -3
- package/docs/EmoteFetcher.html +271 -19
- package/docs/EmoteParser.html +1 -1
- package/docs/FFZEmote.html +162 -6
- package/docs/SevenTV.html +1190 -1190
- package/docs/SevenTVEmote.html +84 -6
- package/docs/TwitchEmote.html +83 -5
- package/docs/index.html +15 -10
- package/docs/struct_BTTVEmote.js.html +61 -55
- package/docs/struct_Channel.js.html +56 -56
- package/docs/struct_Emote.js.html +67 -66
- package/docs/struct_EmoteFetcher.js.html +324 -284
- package/docs/struct_EmoteParser.js.html +82 -81
- package/docs/struct_FFZEmote.js.html +75 -62
- package/docs/struct_SevenTVEmote.js.html +70 -64
- package/docs/struct_TwitchEmote.js.html +59 -53
- package/docs/util_Collection.js.html +79 -79
- package/package.json +57 -57
- package/src/index.js +12 -12
- package/src/struct/BTTVEmote.js +60 -54
- package/src/struct/Channel.js +55 -55
- package/src/struct/Emote.js +66 -65
- package/src/struct/EmoteFetcher.js +323 -283
- package/src/struct/EmoteParser.js +81 -80
- package/src/struct/FFZEmote.js +74 -61
- package/src/struct/SevenTVEmote.js +69 -63
- package/src/struct/TwitchEmote.js +58 -52
- package/src/util/Collection.js +78 -78
- package/src/util/Constants.js +31 -25
- package/test/index.js +174 -166
- package/typings/index.d.ts +98 -93
package/.eslintrc.json
CHANGED
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "eslint:recommended",
|
|
3
|
-
"parserOptions": {
|
|
4
|
-
"ecmaVersion": 2018
|
|
5
|
-
},
|
|
6
|
-
"env": {
|
|
7
|
-
"es6": true,
|
|
8
|
-
"node": true
|
|
9
|
-
},
|
|
10
|
-
"rules": {
|
|
11
|
-
"no-await-in-loop": "warn",
|
|
12
|
-
"no-extra-parens": ["warn", "all", {
|
|
13
|
-
"nestedBinaryExpressions": false
|
|
14
|
-
}],
|
|
15
|
-
"no-template-curly-in-string": "error",
|
|
16
|
-
"no-unsafe-negation": "error",
|
|
17
|
-
"valid-jsdoc": ["error", {
|
|
18
|
-
"requireReturn": false,
|
|
19
|
-
"requireReturnDescription": false,
|
|
20
|
-
"prefer": {
|
|
21
|
-
"return": "returns",
|
|
22
|
-
"arg": "param"
|
|
23
|
-
},
|
|
24
|
-
"preferType": {
|
|
25
|
-
"String": "string",
|
|
26
|
-
"Number": "number",
|
|
27
|
-
"Boolean": "boolean",
|
|
28
|
-
"object": "Object",
|
|
29
|
-
"function": "Function",
|
|
30
|
-
"array": "Array",
|
|
31
|
-
"date": "Date",
|
|
32
|
-
"error": "Error",
|
|
33
|
-
"null": "void"
|
|
34
|
-
}
|
|
35
|
-
}],
|
|
36
|
-
|
|
37
|
-
"accessor-pairs": "warn",
|
|
38
|
-
"array-callback-return": "error",
|
|
39
|
-
"complexity": "warn",
|
|
40
|
-
"consistent-return": "error",
|
|
41
|
-
"curly": ["error", "multi-line", "consistent"],
|
|
42
|
-
"dot-location": ["error", "property"],
|
|
43
|
-
"dot-notation": "error",
|
|
44
|
-
"eqeqeq": ["error", "smart"],
|
|
45
|
-
"no-console": "error",
|
|
46
|
-
"no-empty-function": "error",
|
|
47
|
-
"no-floating-decimal": "error",
|
|
48
|
-
"no-implied-eval": "error",
|
|
49
|
-
"no-invalid-this": "error",
|
|
50
|
-
"no-lone-blocks": "error",
|
|
51
|
-
"no-multi-spaces": "error",
|
|
52
|
-
"no-new-func": "error",
|
|
53
|
-
"no-new-wrappers": "error",
|
|
54
|
-
"no-new": "error",
|
|
55
|
-
"no-octal-escape": "error",
|
|
56
|
-
"no-return-assign": "error",
|
|
57
|
-
"no-return-await": "error",
|
|
58
|
-
"no-self-compare": "error",
|
|
59
|
-
"no-sequences": "error",
|
|
60
|
-
"no-throw-literal": "error",
|
|
61
|
-
"no-unmodified-loop-condition": "error",
|
|
62
|
-
"no-unused-expressions": "error",
|
|
63
|
-
"no-useless-call": "error",
|
|
64
|
-
"no-useless-concat": "error",
|
|
65
|
-
"no-useless-escape": "error",
|
|
66
|
-
"no-useless-return": "error",
|
|
67
|
-
"no-void": "error",
|
|
68
|
-
"no-warning-comments": "warn",
|
|
69
|
-
"require-await": "warn",
|
|
70
|
-
"wrap-iife": "error",
|
|
71
|
-
"yoda": "error",
|
|
72
|
-
|
|
73
|
-
"no-label-var": "error",
|
|
74
|
-
"no-shadow": "error",
|
|
75
|
-
"no-undef-init": "error",
|
|
76
|
-
|
|
77
|
-
"callback-return": "error",
|
|
78
|
-
"handle-callback-err": "error",
|
|
79
|
-
"no-mixed-requires": "error",
|
|
80
|
-
"no-new-require": "error",
|
|
81
|
-
"no-path-concat": "error",
|
|
82
|
-
|
|
83
|
-
"array-bracket-spacing": "error",
|
|
84
|
-
"block-spacing": "error",
|
|
85
|
-
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
|
|
86
|
-
"comma-dangle": ["error", "never"],
|
|
87
|
-
"comma-spacing": "error",
|
|
88
|
-
"comma-style": "error",
|
|
89
|
-
"computed-property-spacing": "error",
|
|
90
|
-
"consistent-this": ["error", "$this"],
|
|
91
|
-
"eol-last": "error",
|
|
92
|
-
"func-names": "error",
|
|
93
|
-
"func-name-matching": "error",
|
|
94
|
-
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
|
|
95
|
-
"indent": ["error", 4],
|
|
96
|
-
"key-spacing": "error",
|
|
97
|
-
"keyword-spacing": "error",
|
|
98
|
-
"max-depth": "error",
|
|
99
|
-
"max-nested-callbacks": ["error", { "max": 4 }],
|
|
100
|
-
"max-statements-per-line": ["error", { "max": 2 }],
|
|
101
|
-
"new-cap": "error",
|
|
102
|
-
"no-array-constructor": "error",
|
|
103
|
-
"no-inline-comments": "error",
|
|
104
|
-
"no-lonely-if": "error",
|
|
105
|
-
"no-mixed-operators": "error",
|
|
106
|
-
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
|
|
107
|
-
"no-new-object": "error",
|
|
108
|
-
"no-spaced-func": "error",
|
|
109
|
-
"no-trailing-spaces": "error",
|
|
110
|
-
"no-unneeded-ternary": "error",
|
|
111
|
-
"no-whitespace-before-property": "error",
|
|
112
|
-
"object-curly-spacing": ["error", "always"],
|
|
113
|
-
"operator-assignment": "error",
|
|
114
|
-
"operator-linebreak": ["error", "before"],
|
|
115
|
-
"padded-blocks": ["error", "never"],
|
|
116
|
-
"quote-props": ["error", "as-needed"],
|
|
117
|
-
"quotes": ["error", "single"],
|
|
118
|
-
"semi-spacing": "error",
|
|
119
|
-
"semi": "error",
|
|
120
|
-
"space-before-blocks": "error",
|
|
121
|
-
"space-before-function-paren": ["error", "never"],
|
|
122
|
-
"space-in-parens": "error",
|
|
123
|
-
"space-infix-ops": "error",
|
|
124
|
-
"space-unary-ops": "error",
|
|
125
|
-
"spaced-comment": "error",
|
|
126
|
-
"unicode-bom": "error",
|
|
127
|
-
|
|
128
|
-
"arrow-parens": ["error", "as-needed"],
|
|
129
|
-
"arrow-spacing": "error",
|
|
130
|
-
"no-duplicate-imports": "error",
|
|
131
|
-
"no-useless-computed-key": "error",
|
|
132
|
-
"no-useless-constructor": "error",
|
|
133
|
-
"prefer-const": "error",
|
|
134
|
-
"prefer-arrow-callback": "error",
|
|
135
|
-
"prefer-numeric-literals": "error",
|
|
136
|
-
"prefer-rest-params": "error",
|
|
137
|
-
"prefer-spread": "error",
|
|
138
|
-
"prefer-template": "error",
|
|
139
|
-
"rest-spread-spacing": "error",
|
|
140
|
-
"template-curly-spacing": "error",
|
|
141
|
-
"yield-star-spacing": "error"
|
|
142
|
-
}
|
|
143
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "eslint:recommended",
|
|
3
|
+
"parserOptions": {
|
|
4
|
+
"ecmaVersion": 2018
|
|
5
|
+
},
|
|
6
|
+
"env": {
|
|
7
|
+
"es6": true,
|
|
8
|
+
"node": true
|
|
9
|
+
},
|
|
10
|
+
"rules": {
|
|
11
|
+
"no-await-in-loop": "warn",
|
|
12
|
+
"no-extra-parens": ["warn", "all", {
|
|
13
|
+
"nestedBinaryExpressions": false
|
|
14
|
+
}],
|
|
15
|
+
"no-template-curly-in-string": "error",
|
|
16
|
+
"no-unsafe-negation": "error",
|
|
17
|
+
"valid-jsdoc": ["error", {
|
|
18
|
+
"requireReturn": false,
|
|
19
|
+
"requireReturnDescription": false,
|
|
20
|
+
"prefer": {
|
|
21
|
+
"return": "returns",
|
|
22
|
+
"arg": "param"
|
|
23
|
+
},
|
|
24
|
+
"preferType": {
|
|
25
|
+
"String": "string",
|
|
26
|
+
"Number": "number",
|
|
27
|
+
"Boolean": "boolean",
|
|
28
|
+
"object": "Object",
|
|
29
|
+
"function": "Function",
|
|
30
|
+
"array": "Array",
|
|
31
|
+
"date": "Date",
|
|
32
|
+
"error": "Error",
|
|
33
|
+
"null": "void"
|
|
34
|
+
}
|
|
35
|
+
}],
|
|
36
|
+
|
|
37
|
+
"accessor-pairs": "warn",
|
|
38
|
+
"array-callback-return": "error",
|
|
39
|
+
"complexity": "warn",
|
|
40
|
+
"consistent-return": "error",
|
|
41
|
+
"curly": ["error", "multi-line", "consistent"],
|
|
42
|
+
"dot-location": ["error", "property"],
|
|
43
|
+
"dot-notation": "error",
|
|
44
|
+
"eqeqeq": ["error", "smart"],
|
|
45
|
+
"no-console": "error",
|
|
46
|
+
"no-empty-function": "error",
|
|
47
|
+
"no-floating-decimal": "error",
|
|
48
|
+
"no-implied-eval": "error",
|
|
49
|
+
"no-invalid-this": "error",
|
|
50
|
+
"no-lone-blocks": "error",
|
|
51
|
+
"no-multi-spaces": "error",
|
|
52
|
+
"no-new-func": "error",
|
|
53
|
+
"no-new-wrappers": "error",
|
|
54
|
+
"no-new": "error",
|
|
55
|
+
"no-octal-escape": "error",
|
|
56
|
+
"no-return-assign": "error",
|
|
57
|
+
"no-return-await": "error",
|
|
58
|
+
"no-self-compare": "error",
|
|
59
|
+
"no-sequences": "error",
|
|
60
|
+
"no-throw-literal": "error",
|
|
61
|
+
"no-unmodified-loop-condition": "error",
|
|
62
|
+
"no-unused-expressions": "error",
|
|
63
|
+
"no-useless-call": "error",
|
|
64
|
+
"no-useless-concat": "error",
|
|
65
|
+
"no-useless-escape": "error",
|
|
66
|
+
"no-useless-return": "error",
|
|
67
|
+
"no-void": "error",
|
|
68
|
+
"no-warning-comments": "warn",
|
|
69
|
+
"require-await": "warn",
|
|
70
|
+
"wrap-iife": "error",
|
|
71
|
+
"yoda": "error",
|
|
72
|
+
|
|
73
|
+
"no-label-var": "error",
|
|
74
|
+
"no-shadow": "error",
|
|
75
|
+
"no-undef-init": "error",
|
|
76
|
+
|
|
77
|
+
"callback-return": "error",
|
|
78
|
+
"handle-callback-err": "error",
|
|
79
|
+
"no-mixed-requires": "error",
|
|
80
|
+
"no-new-require": "error",
|
|
81
|
+
"no-path-concat": "error",
|
|
82
|
+
|
|
83
|
+
"array-bracket-spacing": "error",
|
|
84
|
+
"block-spacing": "error",
|
|
85
|
+
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
|
|
86
|
+
"comma-dangle": ["error", "never"],
|
|
87
|
+
"comma-spacing": "error",
|
|
88
|
+
"comma-style": "error",
|
|
89
|
+
"computed-property-spacing": "error",
|
|
90
|
+
"consistent-this": ["error", "$this"],
|
|
91
|
+
"eol-last": "error",
|
|
92
|
+
"func-names": "error",
|
|
93
|
+
"func-name-matching": "error",
|
|
94
|
+
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
|
|
95
|
+
"indent": ["error", 4],
|
|
96
|
+
"key-spacing": "error",
|
|
97
|
+
"keyword-spacing": "error",
|
|
98
|
+
"max-depth": "error",
|
|
99
|
+
"max-nested-callbacks": ["error", { "max": 4 }],
|
|
100
|
+
"max-statements-per-line": ["error", { "max": 2 }],
|
|
101
|
+
"new-cap": "error",
|
|
102
|
+
"no-array-constructor": "error",
|
|
103
|
+
"no-inline-comments": "error",
|
|
104
|
+
"no-lonely-if": "error",
|
|
105
|
+
"no-mixed-operators": "error",
|
|
106
|
+
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
|
|
107
|
+
"no-new-object": "error",
|
|
108
|
+
"no-spaced-func": "error",
|
|
109
|
+
"no-trailing-spaces": "error",
|
|
110
|
+
"no-unneeded-ternary": "error",
|
|
111
|
+
"no-whitespace-before-property": "error",
|
|
112
|
+
"object-curly-spacing": ["error", "always"],
|
|
113
|
+
"operator-assignment": "error",
|
|
114
|
+
"operator-linebreak": ["error", "before"],
|
|
115
|
+
"padded-blocks": ["error", "never"],
|
|
116
|
+
"quote-props": ["error", "as-needed"],
|
|
117
|
+
"quotes": ["error", "single"],
|
|
118
|
+
"semi-spacing": "error",
|
|
119
|
+
"semi": "error",
|
|
120
|
+
"space-before-blocks": "error",
|
|
121
|
+
"space-before-function-paren": ["error", "never"],
|
|
122
|
+
"space-in-parens": "error",
|
|
123
|
+
"space-infix-ops": "error",
|
|
124
|
+
"space-unary-ops": "error",
|
|
125
|
+
"spaced-comment": "error",
|
|
126
|
+
"unicode-bom": "error",
|
|
127
|
+
|
|
128
|
+
"arrow-parens": ["error", "as-needed"],
|
|
129
|
+
"arrow-spacing": "error",
|
|
130
|
+
"no-duplicate-imports": "error",
|
|
131
|
+
"no-useless-computed-key": "error",
|
|
132
|
+
"no-useless-constructor": "error",
|
|
133
|
+
"prefer-const": "error",
|
|
134
|
+
"prefer-arrow-callback": "error",
|
|
135
|
+
"prefer-numeric-literals": "error",
|
|
136
|
+
"prefer-rest-params": "error",
|
|
137
|
+
"prefer-spread": "error",
|
|
138
|
+
"prefer-template": "error",
|
|
139
|
+
"rest-spread-spacing": "error",
|
|
140
|
+
"template-curly-spacing": "error",
|
|
141
|
+
"yield-star-spacing": "error"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
name: "CodeQL config"
|
|
2
|
-
|
|
3
|
-
paths-ignore:
|
|
4
|
-
- docs
|
|
1
|
+
name: "CodeQL config"
|
|
2
|
+
|
|
3
|
+
paths-ignore:
|
|
4
|
+
- docs
|
|
5
5
|
- test
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
name: "CodeQL"
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [ "master" ]
|
|
6
|
-
pull_request:
|
|
7
|
-
# The branches below must be a subset of the branches above
|
|
8
|
-
branches: [ "master" ]
|
|
9
|
-
schedule:
|
|
10
|
-
- cron: '23 11 * * 0'
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
analyze:
|
|
14
|
-
name: Analyze
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
permissions:
|
|
17
|
-
actions: read
|
|
18
|
-
contents: read
|
|
19
|
-
security-events: write
|
|
20
|
-
|
|
21
|
-
strategy:
|
|
22
|
-
fail-fast: false
|
|
23
|
-
matrix:
|
|
24
|
-
language: [ 'javascript' ]
|
|
25
|
-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
|
26
|
-
# Use only 'java' to analyze code written in Java, Kotlin or both
|
|
27
|
-
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
|
28
|
-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
|
29
|
-
|
|
30
|
-
steps:
|
|
31
|
-
- name: Checkout repository
|
|
32
|
-
uses: actions/checkout@v3
|
|
33
|
-
|
|
34
|
-
# Initializes the CodeQL tools for scanning.
|
|
35
|
-
- name: Initialize CodeQL
|
|
36
|
-
uses: github/codeql-action/init@v2
|
|
37
|
-
with:
|
|
38
|
-
languages: ${{ matrix.language }}
|
|
39
|
-
config-file: ./.github/codeql/codeql-config.yml
|
|
40
|
-
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
41
|
-
# By default, queries listed here will override any specified in a config file.
|
|
42
|
-
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
43
|
-
|
|
44
|
-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
|
45
|
-
# queries: security-extended,security-and-quality
|
|
46
|
-
|
|
47
|
-
- name: Perform CodeQL Analysis
|
|
48
|
-
uses: github/codeql-action/analyze@v2
|
|
49
|
-
with:
|
|
50
|
-
category: "/language:${{matrix.language}}"
|
|
1
|
+
name: "CodeQL"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "master" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
# The branches below must be a subset of the branches above
|
|
8
|
+
branches: [ "master" ]
|
|
9
|
+
schedule:
|
|
10
|
+
- cron: '23 11 * * 0'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
analyze:
|
|
14
|
+
name: Analyze
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
actions: read
|
|
18
|
+
contents: read
|
|
19
|
+
security-events: write
|
|
20
|
+
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: false
|
|
23
|
+
matrix:
|
|
24
|
+
language: [ 'javascript' ]
|
|
25
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
|
26
|
+
# Use only 'java' to analyze code written in Java, Kotlin or both
|
|
27
|
+
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
|
28
|
+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
|
29
|
+
|
|
30
|
+
steps:
|
|
31
|
+
- name: Checkout repository
|
|
32
|
+
uses: actions/checkout@v3
|
|
33
|
+
|
|
34
|
+
# Initializes the CodeQL tools for scanning.
|
|
35
|
+
- name: Initialize CodeQL
|
|
36
|
+
uses: github/codeql-action/init@v2
|
|
37
|
+
with:
|
|
38
|
+
languages: ${{ matrix.language }}
|
|
39
|
+
config-file: ./.github/codeql/codeql-config.yml
|
|
40
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
41
|
+
# By default, queries listed here will override any specified in a config file.
|
|
42
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
43
|
+
|
|
44
|
+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
|
45
|
+
# queries: security-extended,security-and-quality
|
|
46
|
+
|
|
47
|
+
- name: Perform CodeQL Analysis
|
|
48
|
+
uses: github/codeql-action/analyze@v2
|
|
49
|
+
with:
|
|
50
|
+
category: "/language:${{matrix.language}}"
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
-
# They are provided by a third-party and are governed by
|
|
3
|
-
# separate terms of service, privacy policy, and support
|
|
4
|
-
# documentation.
|
|
5
|
-
# ESLint is a tool for identifying and reporting on patterns
|
|
6
|
-
# found in ECMAScript/JavaScript code.
|
|
7
|
-
# More details at https://github.com/eslint/eslint
|
|
8
|
-
# and https://eslint.org
|
|
9
|
-
|
|
10
|
-
name: ESLint
|
|
11
|
-
|
|
12
|
-
on:
|
|
13
|
-
push:
|
|
14
|
-
branches: [ "master" ]
|
|
15
|
-
pull_request:
|
|
16
|
-
# The branches below must be a subset of the branches above
|
|
17
|
-
branches: [ "master" ]
|
|
18
|
-
schedule:
|
|
19
|
-
- cron: '26 14 * * 6'
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
eslint:
|
|
23
|
-
name: Run eslint scanning
|
|
24
|
-
runs-on: ubuntu-latest
|
|
25
|
-
permissions:
|
|
26
|
-
contents: read
|
|
27
|
-
security-events: write
|
|
28
|
-
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
|
29
|
-
steps:
|
|
30
|
-
- name: Checkout code
|
|
31
|
-
uses: actions/checkout@v3
|
|
32
|
-
|
|
33
|
-
- name: Install ESLint
|
|
34
|
-
run: |
|
|
35
|
-
npm install eslint@8.29.0
|
|
36
|
-
npm install @microsoft/eslint-formatter-sarif@3.0.0
|
|
37
|
-
|
|
38
|
-
- name: Run ESLint
|
|
39
|
-
run: npx eslint ./src ./test
|
|
40
|
-
--config .eslintrc.json
|
|
41
|
-
--ext .js,.jsx,.ts,.tsx
|
|
42
|
-
--format @microsoft/eslint-formatter-sarif
|
|
43
|
-
--output-file eslint-results.sarif
|
|
44
|
-
continue-on-error: true
|
|
45
|
-
|
|
46
|
-
- name: Upload analysis results to GitHub
|
|
47
|
-
uses: github/codeql-action/upload-sarif@v2
|
|
48
|
-
if: ${{ !env.ACT }}
|
|
49
|
-
with:
|
|
50
|
-
sarif_file: eslint-results.sarif
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
+
# They are provided by a third-party and are governed by
|
|
3
|
+
# separate terms of service, privacy policy, and support
|
|
4
|
+
# documentation.
|
|
5
|
+
# ESLint is a tool for identifying and reporting on patterns
|
|
6
|
+
# found in ECMAScript/JavaScript code.
|
|
7
|
+
# More details at https://github.com/eslint/eslint
|
|
8
|
+
# and https://eslint.org
|
|
9
|
+
|
|
10
|
+
name: ESLint
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
push:
|
|
14
|
+
branches: [ "master" ]
|
|
15
|
+
pull_request:
|
|
16
|
+
# The branches below must be a subset of the branches above
|
|
17
|
+
branches: [ "master" ]
|
|
18
|
+
schedule:
|
|
19
|
+
- cron: '26 14 * * 6'
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
eslint:
|
|
23
|
+
name: Run eslint scanning
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
permissions:
|
|
26
|
+
contents: read
|
|
27
|
+
security-events: write
|
|
28
|
+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
|
29
|
+
steps:
|
|
30
|
+
- name: Checkout code
|
|
31
|
+
uses: actions/checkout@v3
|
|
32
|
+
|
|
33
|
+
- name: Install ESLint
|
|
34
|
+
run: |
|
|
35
|
+
npm install eslint@8.29.0
|
|
36
|
+
npm install @microsoft/eslint-formatter-sarif@3.0.0
|
|
37
|
+
|
|
38
|
+
- name: Run ESLint
|
|
39
|
+
run: npx eslint ./src ./test
|
|
40
|
+
--config .eslintrc.json
|
|
41
|
+
--ext .js,.jsx,.ts,.tsx
|
|
42
|
+
--format @microsoft/eslint-formatter-sarif
|
|
43
|
+
--output-file eslint-results.sarif
|
|
44
|
+
continue-on-error: true
|
|
45
|
+
|
|
46
|
+
- name: Upload analysis results to GitHub
|
|
47
|
+
uses: github/codeql-action/upload-sarif@v2
|
|
48
|
+
if: ${{ !env.ACT }}
|
|
49
|
+
with:
|
|
50
|
+
sarif_file: eslint-results.sarif
|
|
51
51
|
wait-for-processing: true
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Publish Package to npmjs
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types: [ created ]
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
id-token: write
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v3
|
|
13
|
+
- uses: actions/setup-node@v3
|
|
14
|
+
with:
|
|
15
|
+
node-version-file: '.nvmrc'
|
|
16
|
+
registry-url: 'https://registry.npmjs.org'
|
|
17
|
+
- run: npm install -g npm
|
|
18
|
+
- run: yarn install --frozen-lockfile
|
|
19
|
+
- run: yarn test
|
|
20
|
+
- run: npm publish --provenance --access public
|
|
21
|
+
env:
|
|
22
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
name: Yarn Test
|
|
2
|
-
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
test:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
steps:
|
|
9
|
-
- uses: actions/checkout@
|
|
10
|
-
- uses: actions/setup-node@
|
|
11
|
-
with:
|
|
12
|
-
node-version:
|
|
13
|
-
- run: yarn
|
|
14
|
-
- run: yarn test
|
|
15
|
-
env:
|
|
16
|
-
TWITCH_ID: ${{ secrets.TWITCH_ID }}
|
|
17
|
-
TWITCH_SECRET: ${{ secrets.TWITCH_SECRET }}
|
|
1
|
+
name: Yarn Test
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
test:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v3
|
|
10
|
+
- uses: actions/setup-node@v3
|
|
11
|
+
with:
|
|
12
|
+
node-version-file: '.nvmrc'
|
|
13
|
+
- run: yarn install --frozen-lockfile
|
|
14
|
+
- run: yarn test
|
|
15
|
+
env:
|
|
16
|
+
TWITCH_ID: ${{ secrets.TWITCH_ID }}
|
|
17
|
+
TWITCH_SECRET: ${{ secrets.TWITCH_SECRET }}
|
package/.jsdoc.json
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"tags": {
|
|
3
|
-
"allowUnknownTags": true,
|
|
4
|
-
"dictionaries": ["jsdoc"]
|
|
5
|
-
},
|
|
6
|
-
"source": {
|
|
7
|
-
"include": ["README.md", "src/struct", "src/util", "package.json"],
|
|
8
|
-
"includePattern": ".js$",
|
|
9
|
-
"excludePattern": "(node_modules/|docs)"
|
|
10
|
-
},
|
|
11
|
-
"templates": {
|
|
12
|
-
"cleverLinks": false,
|
|
13
|
-
"monospaceLinks": true,
|
|
14
|
-
"useLongnameInNav": false,
|
|
15
|
-
"default": {
|
|
16
|
-
"includeDate": false
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"opts": {
|
|
20
|
-
"destination": "./docs",
|
|
21
|
-
"encoding": "utf8",
|
|
22
|
-
"private": true,
|
|
23
|
-
"recurse": true,
|
|
24
|
-
"template": "./node_modules/docdash",
|
|
25
|
-
"docdash": {
|
|
26
|
-
"static": false,
|
|
27
|
-
"sort": false
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"plugins": ["plugins/markdown"],
|
|
31
|
-
"markdown": {
|
|
32
|
-
"hardwrap": true
|
|
33
|
-
},
|
|
34
|
-
"docdash": {
|
|
35
|
-
"scopeInOutputPath": false,
|
|
36
|
-
"nameInOutputPath": false,
|
|
37
|
-
"versionInOutputPath": false
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"tags": {
|
|
3
|
+
"allowUnknownTags": true,
|
|
4
|
+
"dictionaries": ["jsdoc"]
|
|
5
|
+
},
|
|
6
|
+
"source": {
|
|
7
|
+
"include": ["README.md", "src/struct", "src/util", "package.json"],
|
|
8
|
+
"includePattern": ".js$",
|
|
9
|
+
"excludePattern": "(node_modules/|docs)"
|
|
10
|
+
},
|
|
11
|
+
"templates": {
|
|
12
|
+
"cleverLinks": false,
|
|
13
|
+
"monospaceLinks": true,
|
|
14
|
+
"useLongnameInNav": false,
|
|
15
|
+
"default": {
|
|
16
|
+
"includeDate": false
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"opts": {
|
|
20
|
+
"destination": "./docs",
|
|
21
|
+
"encoding": "utf8",
|
|
22
|
+
"private": true,
|
|
23
|
+
"recurse": true,
|
|
24
|
+
"template": "./node_modules/docdash",
|
|
25
|
+
"docdash": {
|
|
26
|
+
"static": false,
|
|
27
|
+
"sort": false
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"plugins": ["plugins/markdown"],
|
|
31
|
+
"markdown": {
|
|
32
|
+
"hardwrap": true
|
|
33
|
+
},
|
|
34
|
+
"docdash": {
|
|
35
|
+
"scopeInOutputPath": false,
|
|
36
|
+
"nameInOutputPath": false,
|
|
37
|
+
"versionInOutputPath": false
|
|
38
|
+
}
|
|
39
|
+
}
|
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v18
|