@ggdna/dna-scripts 0.1.0 → 0.2.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/dna/_generated.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"ecosystem": null,
|
|
16
16
|
"resolvedVersion": null,
|
|
17
17
|
"via": null,
|
|
18
|
-
"hash": "
|
|
18
|
+
"hash": "0x97a76de8c8e53fb0"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"claude": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"path": "scripts/functions/get-repo-urls.js",
|
|
57
|
-
"hash": "
|
|
57
|
+
"hash": "0xd101f8b49454b888"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
"path": "scripts/functions/get-version.js",
|
|
@@ -14,10 +14,11 @@ import { green, yellow } from './colors.js';
|
|
|
14
14
|
// Convert exec to return a Promise for async/await usage
|
|
15
15
|
const execAsync = promisify(exec);
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
export async function getRepoUrls(org) {
|
|
18
|
+
if (!org) {
|
|
19
|
+
throw Error('getRepoUrls: an organization or user name is required.');
|
|
20
|
+
}
|
|
19
21
|
|
|
20
|
-
export async function getRepoUrls() {
|
|
21
22
|
try {
|
|
22
23
|
// Use the GitHub CLI to list repositories in JSON format
|
|
23
24
|
const { stdout } = await execAsync(
|
|
@@ -30,7 +31,7 @@ export async function getRepoUrls() {
|
|
|
30
31
|
// Map to name + URL and print to console
|
|
31
32
|
return repos.map((repo) => repo.url);
|
|
32
33
|
} catch (error) {
|
|
33
|
-
if (error.message.
|
|
34
|
+
if (error.message.includes('gh auth login')) {
|
|
34
35
|
throw Error(
|
|
35
36
|
[yellow('Not yet logged in. Please run:'), green('gh auth login')].join(
|
|
36
37
|
'\n',
|