@eide/foir-cli 0.1.29 → 0.1.30

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.
@@ -1 +1 @@
1
- {"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/commands/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAetD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAiPN"}
1
+ {"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/commands/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAetD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CA6NN"}
@@ -2,7 +2,8 @@ import { withErrorHandler } from '../lib/errors.js';
2
2
  import { createClient } from '../lib/client.js';
3
3
  import { formatOutput, formatList, success } from '../lib/output.js';
4
4
  import { parseInputData, isUUID } from '../lib/input.js';
5
- import { ListExtensionsDocument, GetExtensionDocument, GetExtensionByKeyDocument, RegisterExtensionDocument, TriggerExtensionSyncDocument, InstallExtensionDocument, UnregisterExtensionDocument, } from '../graphql/generated.js';
5
+ import { ListExtensionsDocument, GetExtensionDocument, GetExtensionByKeyDocument, RegisterExtensionDocument, TriggerExtensionSyncDocument, InstallExtensionDocument, UnregisterExtensionDocument, // Still used by uninstall command
6
+ } from '../graphql/generated.js';
6
7
  export function registerExtensionsCommands(program, globalOpts) {
7
8
  const extensions = program
8
9
  .command('extensions')
@@ -95,29 +96,9 @@ Examples:
95
96
  if (cmdOpts.key) {
96
97
  input.key = cmdOpts.key;
97
98
  }
98
- const extensionKey = input.key;
99
- // Handle --force: uninstall first if extension exists
99
+ // Add force flag to input if --force is specified
100
100
  if (cmdOpts.force) {
101
- try {
102
- const existing = await client.request(GetExtensionByKeyDocument, {
103
- key: extensionKey,
104
- });
105
- if (existing.extensionByKey) {
106
- if (!(opts.json || opts.jsonl || opts.quiet)) {
107
- console.log(`🗑️ Uninstalling existing extension "${extensionKey}"...`);
108
- }
109
- await client.request(UnregisterExtensionDocument, {
110
- id: existing.extensionByKey.id,
111
- });
112
- if (!(opts.json || opts.jsonl || opts.quiet)) {
113
- success(`Uninstalled extension "${extensionKey}"`);
114
- console.log('');
115
- }
116
- }
117
- }
118
- catch (err) {
119
- // Extension doesn't exist - that's fine, continue with install
120
- }
101
+ input.force = true;
121
102
  }
122
103
  const data = await client.request(InstallExtensionDocument, { input });
123
104
  const result = data.installExtension;
@@ -1859,6 +1859,8 @@ export type InstallExtensionInput = {
1859
1859
  description?: InputMaybe<Scalars['String']['input']>;
1860
1860
  direction?: InputMaybe<Scalars['String']['input']>;
1861
1861
  extensionType?: InputMaybe<Scalars['String']['input']>;
1862
+ /** If true, delete existing extension before installing (force reinstall) */
1863
+ force?: InputMaybe<Scalars['Boolean']['input']>;
1862
1864
  key: Scalars['String']['input'];
1863
1865
  models?: InputMaybe<Array<InstallExtensionModelInput>>;
1864
1866
  name: Scalars['String']['input'];