relayax-cli 0.4.31 → 0.4.33
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/commands/package.js +2 -1
- package/dist/commands/publish.js +13 -7
- package/package.json +1 -1
package/dist/commands/package.js
CHANGED
|
@@ -429,7 +429,8 @@ function registerPackage(program) {
|
|
|
429
429
|
// ─── 재패키징 (contents 매니페스트 기반 동기화) ───
|
|
430
430
|
const yamlContent = fs_1.default.readFileSync(relayYamlPath, 'utf-8');
|
|
431
431
|
const config = js_yaml_1.default.load(yamlContent);
|
|
432
|
-
const
|
|
432
|
+
const rawContents = config.contents;
|
|
433
|
+
const contents = Array.isArray(rawContents) ? rawContents : [];
|
|
433
434
|
// 기존 source 필드 → contents 마이그레이션 안내
|
|
434
435
|
if (!config.contents && config.source) {
|
|
435
436
|
const legacySource = config.source;
|
package/dist/commands/publish.js
CHANGED
|
@@ -681,6 +681,19 @@ function registerPublish(program) {
|
|
|
681
681
|
console.error(` → relay.yaml에 visibility: ${config.visibility} 저장됨 (${visLabelMap[config.visibility]})\n`);
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
+
// Generate setup command BEFORE detectCommands so it's included in metadata
|
|
685
|
+
{
|
|
686
|
+
const commandsDir = path_1.default.join(relayDir, 'commands');
|
|
687
|
+
if (!fs_1.default.existsSync(commandsDir)) {
|
|
688
|
+
fs_1.default.mkdirSync(commandsDir, { recursive: true });
|
|
689
|
+
}
|
|
690
|
+
const slugName = config.slug.split('/').pop() ?? config.name;
|
|
691
|
+
const setupContent = (0, setup_command_js_1.generateSetupCommand)(config.name, config.requires, slugName);
|
|
692
|
+
if (setupContent) {
|
|
693
|
+
const setupFileName = `setup-${slugName}.md`;
|
|
694
|
+
fs_1.default.writeFileSync(path_1.default.join(commandsDir, setupFileName), setupContent);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
684
697
|
const detectedCommands = detectCommands(relayDir);
|
|
685
698
|
const components = {
|
|
686
699
|
agents: countDir(relayDir, 'agents'),
|
|
@@ -727,13 +740,6 @@ function registerPublish(program) {
|
|
|
727
740
|
const entrySlug = config.slug.startsWith('@') ? config.slug.slice(1) : config.slug;
|
|
728
741
|
const entryFileName = entrySlug.replace('/', '-') + '.md';
|
|
729
742
|
fs_1.default.writeFileSync(path_1.default.join(commandsDir, entryFileName), entryContent);
|
|
730
|
-
// Generate setup command if requires exist
|
|
731
|
-
const mainCmd = detectedCommands.find((c) => !c.name.startsWith('setup-'));
|
|
732
|
-
const setupContent = (0, setup_command_js_1.generateSetupCommand)(config.name, config.requires, mainCmd?.name);
|
|
733
|
-
if (setupContent) {
|
|
734
|
-
const setupFileName = `setup-${config.name}.md`;
|
|
735
|
-
fs_1.default.writeFileSync(path_1.default.join(commandsDir, setupFileName), setupContent);
|
|
736
|
-
}
|
|
737
743
|
// Check git is available
|
|
738
744
|
try {
|
|
739
745
|
(0, git_operations_js_1.checkGitInstalled)();
|