@sapphire/cli 1.9.3 → 1.9.4-next.0adad4e
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/package.json +22 -22
- package/dist/functions/fetchConfig.js +0 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sapphire/cli",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.4-next.0adad4e",
|
|
4
4
|
"description": "CLI for Sapphire Framework",
|
|
5
5
|
"author": "@sapphire",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,41 +35,41 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@favware/colorette-spinner": "^1.0.1",
|
|
37
37
|
"@sapphire/node-utilities": "^1.0.2",
|
|
38
|
-
"@sapphire/result": "^2.
|
|
38
|
+
"@sapphire/result": "^2.7.2",
|
|
39
39
|
"colorette": "^2.0.20",
|
|
40
|
-
"commander": "^
|
|
41
|
-
"execa": "^
|
|
40
|
+
"commander": "^13.1.0",
|
|
41
|
+
"execa": "^9.5.2",
|
|
42
42
|
"find-up": "^5.0.0",
|
|
43
43
|
"js-yaml": "^4.1.0",
|
|
44
44
|
"prompts": "^2.4.2",
|
|
45
|
-
"tslib": "^2.
|
|
45
|
+
"tslib": "^2.8.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@commitlint/cli": "^
|
|
49
|
-
"@commitlint/config-conventional": "^
|
|
50
|
-
"@favware/cliff-jumper": "^
|
|
51
|
-
"@favware/npm-deprecate": "^
|
|
48
|
+
"@commitlint/cli": "^19.6.1",
|
|
49
|
+
"@commitlint/config-conventional": "^19.6.0",
|
|
50
|
+
"@favware/cliff-jumper": "^6.0.0",
|
|
51
|
+
"@favware/npm-deprecate": "^2.0.0",
|
|
52
52
|
"@sapphire/decorators": "*",
|
|
53
|
-
"@sapphire/eslint-config": "^5.0.
|
|
53
|
+
"@sapphire/eslint-config": "^5.0.5",
|
|
54
54
|
"@sapphire/framework": "*",
|
|
55
55
|
"@sapphire/plugin-api": "*",
|
|
56
56
|
"@sapphire/prettier-config": "^2.0.0",
|
|
57
|
-
"@sapphire/ts-config": "^5.0.
|
|
57
|
+
"@sapphire/ts-config": "^5.0.1",
|
|
58
58
|
"@types/js-yaml": "^4.0.9",
|
|
59
|
-
"@types/node": "^
|
|
59
|
+
"@types/node": "^22.10.10",
|
|
60
60
|
"@types/prompts": "^2.4.9",
|
|
61
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
62
|
-
"@typescript-eslint/parser": "^
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "^7.13.0",
|
|
62
|
+
"@typescript-eslint/parser": "^7.13.0",
|
|
63
63
|
"cz-conventional-changelog": "^3.3.0",
|
|
64
64
|
"discord.js": "*",
|
|
65
|
-
"eslint": "^8.
|
|
66
|
-
"eslint-config-prettier": "^
|
|
67
|
-
"eslint-plugin-prettier": "^5.
|
|
68
|
-
"globby": "^14.0.
|
|
69
|
-
"lint-staged": "^15.2
|
|
70
|
-
"prettier": "^3.2
|
|
65
|
+
"eslint": "^8.57.1",
|
|
66
|
+
"eslint-config-prettier": "^10.0.1",
|
|
67
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
68
|
+
"globby": "^14.0.2",
|
|
69
|
+
"lint-staged": "^15.4.2",
|
|
70
|
+
"prettier": "^3.4.2",
|
|
71
71
|
"ts-node": "^10.9.2",
|
|
72
|
-
"typescript": "
|
|
72
|
+
"typescript": "~5.4.5"
|
|
73
73
|
},
|
|
74
74
|
"resolutions": {
|
|
75
75
|
"ansi-regex": "^5.0.1",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"access": "public"
|
|
115
115
|
},
|
|
116
116
|
"prettier": "@sapphire/prettier-config",
|
|
117
|
-
"packageManager": "yarn@4.0
|
|
117
|
+
"packageManager": "yarn@4.6.0"
|
|
118
118
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import findUp from 'find-up';
|
|
2
|
-
import { setTimeout as sleep } from 'node:timers/promises';
|
|
3
|
-
/**
|
|
4
|
-
* Fetches the configuration file asynchronously.
|
|
5
|
-
* It first tries to find the '.sapphirerc.json' file in the current working directory.
|
|
6
|
-
* If not found, it then tries to find the '.sapphirerc.yml' file.
|
|
7
|
-
* Returns a Promise that resolves to the configuration file as JSON if found, otherwise resolves to null.
|
|
8
|
-
* @returns A Promise that resolves to the configuration file as JSON if found, otherwise resolves to null.
|
|
9
|
-
*/
|
|
10
|
-
export async function fetchConfig() {
|
|
11
|
-
const configFileAsJson = await Promise.race([findUp('.sapphirerc.json', { cwd: '.' }), sleep(5000)]);
|
|
12
|
-
if (configFileAsJson) {
|
|
13
|
-
return configFileAsJson;
|
|
14
|
-
}
|
|
15
|
-
return Promise.race([findUp('.sapphirerc.yml', { cwd: '.' }), sleep(5000)]);
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=fetchConfig.js.map
|