@remogram/cli 0.1.0-beta.2 → 0.1.0-beta.3
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/index.js +34 -1
- package/package.json +7 -7
package/index.js
CHANGED
|
@@ -19,6 +19,8 @@ import {
|
|
|
19
19
|
getEffectiveIngestMaxBytes,
|
|
20
20
|
FORGE_INGEST_MAX_BYTES_ENV,
|
|
21
21
|
throwIfStaleHeadByNumber,
|
|
22
|
+
FACT_INVENTORY_PACKET_TYPES,
|
|
23
|
+
forgeFactInventoryPacket,
|
|
22
24
|
} from '@remogram/core';
|
|
23
25
|
import { provider as giteaApi } from '@remogram/provider-gitea-api';
|
|
24
26
|
import { provider as githubApi } from '@remogram/provider-github-api';
|
|
@@ -336,6 +338,37 @@ export async function runCli(argv, options = {}) {
|
|
|
336
338
|
ctx,
|
|
337
339
|
await provider.refsCompare(ctx, flags.base, flags.head),
|
|
338
340
|
);
|
|
341
|
+
} else if (group === 'refs' && sub === 'inventory') {
|
|
342
|
+
if (typeof provider.refsInventory !== 'function') {
|
|
343
|
+
throw Object.assign(new Error('refs inventory not implemented for provider'), {
|
|
344
|
+
forgeError: forgeError(
|
|
345
|
+
ERROR_CODES.PROVIDER_UNSUPPORTED,
|
|
346
|
+
'refs inventory not implemented for provider',
|
|
347
|
+
),
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
packet = forgeFactInventoryPacket(
|
|
351
|
+
FACT_INVENTORY_PACKET_TYPES.REF_INVENTORY,
|
|
352
|
+
ctx,
|
|
353
|
+
await provider.refsInventory(ctx),
|
|
354
|
+
);
|
|
355
|
+
} else if (group === 'cr' && sub === 'inventory') {
|
|
356
|
+
if (typeof provider.crInventory !== 'function') {
|
|
357
|
+
throw Object.assign(new Error('cr inventory not implemented for provider'), {
|
|
358
|
+
forgeError: forgeError(
|
|
359
|
+
ERROR_CODES.PROVIDER_UNSUPPORTED,
|
|
360
|
+
'cr inventory not implemented for provider',
|
|
361
|
+
),
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
packet = forgeFactInventoryPacket(
|
|
365
|
+
FACT_INVENTORY_PACKET_TYPES.CR_INVENTORY_SLICE,
|
|
366
|
+
ctx,
|
|
367
|
+
await provider.crInventory(ctx, {
|
|
368
|
+
slice_ref: flags.slice_ref,
|
|
369
|
+
limit: parsePositiveInt(flags.limit, '--limit'),
|
|
370
|
+
}),
|
|
371
|
+
);
|
|
339
372
|
} else if (group === 'pr' && sub === 'view') {
|
|
340
373
|
const number = parsePositiveInt(flags.number, '--number');
|
|
341
374
|
if (number == null) {
|
|
@@ -395,7 +428,7 @@ export async function runCli(argv, options = {}) {
|
|
|
395
428
|
throw Object.assign(new Error(`Unknown command: ${positional.join(' ')}`), {
|
|
396
429
|
forgeError: forgeError(
|
|
397
430
|
ERROR_CODES.INVALID_ARGS,
|
|
398
|
-
'Unknown command. Try: provider capabilities, repo status, refs compare, pr view, pr checks, merge plan, sync plan',
|
|
431
|
+
'Unknown command. Try: provider capabilities, repo status, refs compare, refs inventory, cr inventory, pr view, pr checks, merge plan, sync plan',
|
|
399
432
|
),
|
|
400
433
|
});
|
|
401
434
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remogram/cli",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.3",
|
|
4
4
|
"description": "Remogram forge boundary CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"node": ">=20"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@remogram/core": "0.1.0-beta.
|
|
31
|
-
"@remogram/provider-gitea-api": "0.1.0-beta.
|
|
32
|
-
"@remogram/provider-github-api": "0.1.0-beta.
|
|
33
|
-
"@remogram/provider-gitlab-api": "0.1.0-beta.
|
|
34
|
-
"@remogram/provider-gitea-tea": "0.1.0-beta.
|
|
35
|
-
"@remogram/provider-github-gh": "0.1.0-beta.
|
|
30
|
+
"@remogram/core": "0.1.0-beta.3",
|
|
31
|
+
"@remogram/provider-gitea-api": "0.1.0-beta.3",
|
|
32
|
+
"@remogram/provider-github-api": "0.1.0-beta.3",
|
|
33
|
+
"@remogram/provider-gitlab-api": "0.1.0-beta.3",
|
|
34
|
+
"@remogram/provider-gitea-tea": "0.1.0-beta.3",
|
|
35
|
+
"@remogram/provider-github-gh": "0.1.0-beta.3"
|
|
36
36
|
}
|
|
37
37
|
}
|