@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.
@@ -15,7 +15,7 @@
15
15
  "ecosystem": null,
16
16
  "resolvedVersion": null,
17
17
  "via": null,
18
- "hash": "0x9ee08ef13ab4c8d3"
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": "0x4c7b3897973acec3"
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
- // GitHub organization or user
18
- const org = 'rljson';
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.match('gh auth login').length == 1) {
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',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggdna/dna-scripts",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "DNA layer: deterministic node scripts and their shared functions",
5
5
  "keywords": [
6
6
  "dna",