@k03mad/dice 10.1.0 → 11.0.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/.editorconfig +1 -4
- package/.github/dependabot.yml +2 -2
- package/.oxfmtrc.json +18 -0
- package/.oxlintrc.json +7 -0
- package/.vscode/settings.json +1 -4
- package/app/run.js +2 -2
- package/app/utils/config.js +7 -5
- package/app/utils/helpers.js +1 -3
- package/package.json +14 -13
- package/eslint.config.js +0 -1
package/.editorconfig
CHANGED
package/.github/dependabot.yml
CHANGED
package/.oxfmtrc.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
|
3
|
+
"ignorePatterns": ["node_modules/**"],
|
|
4
|
+
"singleQuote": true,
|
|
5
|
+
"arrowParens": "avoid",
|
|
6
|
+
"bracketSpacing": false,
|
|
7
|
+
"quoteProps": "consistent",
|
|
8
|
+
"experimentalSortImports": {
|
|
9
|
+
"groups": [
|
|
10
|
+
["builtin"],
|
|
11
|
+
["external", "type-external"],
|
|
12
|
+
["internal", "type-internal"],
|
|
13
|
+
["parent", "type-parent"],
|
|
14
|
+
["sibling", "type-sibling"],
|
|
15
|
+
["index", "type-index"]
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
package/.oxlintrc.json
ADDED
package/.vscode/settings.json
CHANGED
package/app/run.js
CHANGED
|
@@ -22,8 +22,8 @@ console.log(config.messages.welcome);
|
|
|
22
22
|
|
|
23
23
|
process.stdin.on('keypress', async (char, key) => {
|
|
24
24
|
if (
|
|
25
|
-
(key.ctrl === true && key.name === config.exit.ctrlKeyModifier)
|
|
26
|
-
|
|
25
|
+
(key.ctrl === true && key.name === config.exit.ctrlKeyModifier) ||
|
|
26
|
+
char === config.exit.extraKey
|
|
27
27
|
) {
|
|
28
28
|
process.exit();
|
|
29
29
|
} else {
|
package/app/utils/config.js
CHANGED
|
@@ -18,10 +18,12 @@ export default {
|
|
|
18
18
|
},
|
|
19
19
|
|
|
20
20
|
messages: {
|
|
21
|
-
welcome: green(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
welcome: green(
|
|
22
|
+
[
|
|
23
|
+
'— type any digit to generate that number of dice',
|
|
24
|
+
'— press any key to reroll dice',
|
|
25
|
+
`— press ${bold('CTRL+C')} or type '${bold(EXIT_EXTRA_KEY)}' to exit`,
|
|
26
|
+
].join('\n'),
|
|
27
|
+
),
|
|
26
28
|
},
|
|
27
29
|
};
|
package/app/utils/helpers.js
CHANGED
package/package.json
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k03mad/dice",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.1",
|
|
4
4
|
"description": "Dice",
|
|
5
|
+
"license": "MIT",
|
|
5
6
|
"maintainers": [
|
|
6
7
|
"Kirill Molchanov <k03.mad@gmail.com"
|
|
7
8
|
],
|
|
8
|
-
"bin": {
|
|
9
|
-
"dice": "app/run.js"
|
|
10
|
-
},
|
|
11
9
|
"repository": {
|
|
12
10
|
"type": "git",
|
|
13
11
|
"url": "git+https://github.com/k03mad/dice.git"
|
|
14
12
|
},
|
|
15
|
-
"
|
|
13
|
+
"bin": {
|
|
14
|
+
"dice": "app/run.js"
|
|
15
|
+
},
|
|
16
16
|
"type": "module",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
17
|
+
"scripts": {
|
|
18
|
+
"lint": "oxlint --report-unused-disable-directives && oxfmt --check",
|
|
19
|
+
"prepare": "husky || true"
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {
|
|
21
22
|
"chalk": "5.6.2",
|
|
22
23
|
"terminal-image": "4.2.0"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
|
-
"@k03mad/
|
|
26
|
-
"
|
|
27
|
-
"
|
|
26
|
+
"@k03mad/oxlint-config": "0.1.0",
|
|
27
|
+
"husky": "9.1.7",
|
|
28
|
+
"oxfmt": "0.35.0",
|
|
29
|
+
"oxlint": "1.50.0"
|
|
28
30
|
},
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"prepare": "husky || true"
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=24"
|
|
32
33
|
}
|
|
33
34
|
}
|
package/eslint.config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {default} from '@k03mad/eslint-config';
|