@kernelius/forge-cli 0.3.0 → 0.3.2
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/index.js +21 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.1] - 2026-02-01
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Organization Repository Creation**: Fixed `--org` parameter in `forge repos create` command
|
|
12
|
+
- Now correctly calls `POST /api/orgs/{slug}/repos` for organization repositories
|
|
13
|
+
- Previously was calling the user repository endpoint for all repos
|
|
14
|
+
- Repositories are now properly created under the specified organization
|
|
15
|
+
|
|
16
|
+
### Examples
|
|
17
|
+
```bash
|
|
18
|
+
# Create repository in organization (now works correctly)
|
|
19
|
+
forge repos create --name patient-records \
|
|
20
|
+
--org acme-hospital \
|
|
21
|
+
--template patient-record \
|
|
22
|
+
--visibility private
|
|
23
|
+
```
|
|
24
|
+
|
|
8
25
|
## [0.3.0] - 2026-02-01
|
|
9
26
|
|
|
10
27
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -492,7 +492,8 @@ var REPO_TEMPLATES = {
|
|
|
492
492
|
generic: COMPANY_TEMPLATES
|
|
493
493
|
};
|
|
494
494
|
function getAllTemplates() {
|
|
495
|
-
|
|
495
|
+
const { generic, ...orgTypes } = REPO_TEMPLATES;
|
|
496
|
+
return Object.values(orgTypes).flat();
|
|
496
497
|
}
|
|
497
498
|
function getTemplatesForOrgType(orgType) {
|
|
498
499
|
return REPO_TEMPLATES[orgType || "generic"] || COMPANY_TEMPLATES;
|
|
@@ -648,7 +649,7 @@ function createReposCommand() {
|
|
|
648
649
|
const repo = await apiGet(
|
|
649
650
|
`/api/repositories/${ownerIdentifier}/${name}`
|
|
650
651
|
);
|
|
651
|
-
console.log(chalk3.bold(`${repo.ownerIdentifier}/${repo.name}`));
|
|
652
|
+
console.log(chalk3.bold(`${repo.owner?.identifier || repo.ownerIdentifier}/${repo.name}`));
|
|
652
653
|
if (repo.description) {
|
|
653
654
|
console.log(chalk3.dim(repo.description));
|
|
654
655
|
}
|
|
@@ -709,15 +710,24 @@ function createReposCommand() {
|
|
|
709
710
|
process.exit(1);
|
|
710
711
|
}
|
|
711
712
|
}
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
}
|
|
713
|
+
let repo;
|
|
714
|
+
if (org) {
|
|
715
|
+
repo = await apiPost(`/api/orgs/${org}/repos`, {
|
|
716
|
+
name,
|
|
717
|
+
description,
|
|
718
|
+
visibility,
|
|
719
|
+
templateId: template
|
|
720
|
+
});
|
|
721
|
+
} else {
|
|
722
|
+
const user = await apiGet("/api/users/me");
|
|
723
|
+
repo = await apiPost("/api/repositories", {
|
|
724
|
+
name,
|
|
725
|
+
description,
|
|
726
|
+
visibility,
|
|
727
|
+
orgIdentifier: user.username,
|
|
728
|
+
templateId: template
|
|
729
|
+
});
|
|
730
|
+
}
|
|
721
731
|
console.log(chalk3.green("\u2713 Repository created successfully"));
|
|
722
732
|
console.log(chalk3.dim(` @${repo.ownerIdentifier}/${repo.name}`));
|
|
723
733
|
if (template) {
|