hyouji 0.0.13 → 0.0.15
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/dist/index.js +6 -13
- package/package.json +3 -4
package/dist/index.js
CHANGED
|
@@ -8,8 +8,7 @@ import * as path from "path";
|
|
|
8
8
|
import { join, dirname } from "path";
|
|
9
9
|
import { createHash, randomBytes, createCipheriv, createDecipheriv } from "crypto";
|
|
10
10
|
import prompts from "prompts";
|
|
11
|
-
import
|
|
12
|
-
import yaml__default from "js-yaml";
|
|
11
|
+
import YAML from "yaml";
|
|
13
12
|
import { Octokit } from "@octokit/core";
|
|
14
13
|
import { exec } from "child_process";
|
|
15
14
|
import { promisify } from "util";
|
|
@@ -1027,16 +1026,10 @@ const log$2 = console.log;
|
|
|
1027
1026
|
const generateSampleYaml = async () => {
|
|
1028
1027
|
try {
|
|
1029
1028
|
const outputPath = "./hyouji.yaml";
|
|
1030
|
-
const yamlContent =
|
|
1029
|
+
const yamlContent = YAML.stringify(sampleData, {
|
|
1031
1030
|
indent: 2,
|
|
1032
|
-
|
|
1033
|
-
// Disable line wrapping
|
|
1034
|
-
noRefs: true,
|
|
1035
|
-
// Disable references
|
|
1036
|
-
quotingType: '"',
|
|
1031
|
+
singleQuote: false
|
|
1037
1032
|
// Use double quotes for strings
|
|
1038
|
-
forceQuotes: false
|
|
1039
|
-
// Only quote when necessary
|
|
1040
1033
|
});
|
|
1041
1034
|
log$2(chalk.blue("Generating sample YAML file..."));
|
|
1042
1035
|
fs.writeFileSync(outputPath, yamlContent, "utf8");
|
|
@@ -1095,10 +1088,10 @@ const parseJsonContent = (content) => {
|
|
|
1095
1088
|
};
|
|
1096
1089
|
const parseYamlContent = (content) => {
|
|
1097
1090
|
try {
|
|
1098
|
-
return
|
|
1091
|
+
return YAML.parse(content);
|
|
1099
1092
|
} catch (error) {
|
|
1100
|
-
if (error instanceof
|
|
1101
|
-
throw new Error(`
|
|
1093
|
+
if (error instanceof Error) {
|
|
1094
|
+
throw new Error(`YAML Error: ${error.message}`);
|
|
1102
1095
|
}
|
|
1103
1096
|
throw error;
|
|
1104
1097
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hyouji",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "Hyouji (表示) — A command-line tool for organizing and displaying GitHub labels with clarity and harmony.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "koji <baxin1919@gmail.com>",
|
|
@@ -58,13 +58,12 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@octokit/core": "^7.0.6",
|
|
60
60
|
"chalk": "^5.6.2",
|
|
61
|
-
"js-yaml": "^4.1.0",
|
|
62
61
|
"oh-my-logo": "^0.3.2",
|
|
63
|
-
"prompts": "^2.4.2"
|
|
62
|
+
"prompts": "^2.4.2",
|
|
63
|
+
"yaml": "^2.8.1"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@biomejs/biome": "2.3.4",
|
|
67
|
-
"@types/js-yaml": "^4.0.9",
|
|
68
67
|
"@types/node": "^24.10.0",
|
|
69
68
|
"@vitest/coverage-v8": "^4.0.8",
|
|
70
69
|
"@vitest/ui": "^4.0.8",
|