@sapphire/cli 1.9.0-next.f9fa2a3.0 → 1.9.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/CHANGELOG.md +17 -0
- package/dist/functions/fetchConfig.js +17 -0
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
# [1.9.0](https://github.com/sapphiredev/cli/compare/v1.9.0...v1.9.0) - (2023-12-03)
|
|
6
|
+
|
|
7
|
+
## 🐛 Bug Fixes
|
|
8
|
+
|
|
9
|
+
- Specify schema for both template schema files ([30a80bb](https://github.com/sapphiredev/cli/commit/30a80bb561f61b8fba78c8cfc4157ca579e73f7c))
|
|
10
|
+
- **json schema:** Specify enum for projectLanguage ([2f1ba0d](https://github.com/sapphiredev/cli/commit/2f1ba0d7fb4597c82581601ee60391898a3b100f))
|
|
11
|
+
- **json schema:** Fixed base schema url ([bd37a6c](https://github.com/sapphiredev/cli/commit/bd37a6c5b590de90c2a1efa7cb19f16f38403273))
|
|
12
|
+
- Install yarn v4, not v3 ([938ca99](https://github.com/sapphiredev/cli/commit/938ca99fe6dedea04978ca1ac38ac9a4505f0651))
|
|
13
|
+
|
|
14
|
+
## 📝 Documentation
|
|
15
|
+
|
|
16
|
+
- **readme:** Update readme to mention virtual components ([23aa8c5](https://github.com/sapphiredev/cli/commit/23aa8c5e6b0f07e4b8028c21ecb243e81d845e03))
|
|
17
|
+
|
|
18
|
+
## 🚀 Features
|
|
19
|
+
|
|
20
|
+
- Add generator for virtual piece loader (#274) ([f9fa2a3](https://github.com/sapphiredev/cli/commit/f9fa2a359c9a1bdb3b512a7484e0da12e20f6c8b))
|
|
21
|
+
|
|
5
22
|
# [1.8.0](https://github.com/sapphiredev/cli/compare/v1.8.0...v1.8.0) - (2023-11-16)
|
|
6
23
|
|
|
7
24
|
## 🚀 Features
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sapphire/cli",
|
|
3
|
-
"version": "1.9.0
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "CLI for Sapphire Framework",
|
|
5
5
|
"author": "@sapphire",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"tslib": "^2.6.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@commitlint/cli": "^18.4.
|
|
49
|
-
"@commitlint/config-conventional": "^18.4.
|
|
48
|
+
"@commitlint/cli": "^18.4.3",
|
|
49
|
+
"@commitlint/config-conventional": "^18.4.3",
|
|
50
50
|
"@favware/cliff-jumper": "^2.2.3",
|
|
51
51
|
"@favware/npm-deprecate": "^1.0.7",
|
|
52
52
|
"@sapphire/decorators": "*",
|
|
@@ -56,20 +56,20 @@
|
|
|
56
56
|
"@sapphire/prettier-config": "^2.0.0",
|
|
57
57
|
"@sapphire/ts-config": "^5.0.0",
|
|
58
58
|
"@types/js-yaml": "^4.0.9",
|
|
59
|
-
"@types/node": "^20.
|
|
60
|
-
"@types/prompts": "^2.4.
|
|
61
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
62
|
-
"@typescript-eslint/parser": "^6.
|
|
59
|
+
"@types/node": "^20.10.2",
|
|
60
|
+
"@types/prompts": "^2.4.9",
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "^6.13.1",
|
|
62
|
+
"@typescript-eslint/parser": "^6.13.1",
|
|
63
63
|
"cz-conventional-changelog": "^3.3.0",
|
|
64
64
|
"discord.js": "*",
|
|
65
|
-
"eslint": "^8.
|
|
66
|
-
"eslint-config-prettier": "^9.
|
|
65
|
+
"eslint": "^8.55.0",
|
|
66
|
+
"eslint-config-prettier": "^9.1.0",
|
|
67
67
|
"eslint-plugin-prettier": "^5.0.1",
|
|
68
68
|
"globby": "^14.0.0",
|
|
69
69
|
"lint-staged": "^15.1.0",
|
|
70
70
|
"prettier": "^3.1.0",
|
|
71
71
|
"ts-node": "^10.9.1",
|
|
72
|
-
"typescript": "^5.
|
|
72
|
+
"typescript": "^5.3.2"
|
|
73
73
|
},
|
|
74
74
|
"resolutions": {
|
|
75
75
|
"ansi-regex": "^5.0.1",
|