@ubiquity-os/plugin-sdk 3.2.2 → 3.3.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/dist/index.d.mts CHANGED
@@ -127,6 +127,7 @@ interface Options$1 {
127
127
  * @deprecated This disables signature verification - only for local development
128
128
  */
129
129
  bypassSignatureVerification?: boolean;
130
+ returnDataToKernel?: boolean;
130
131
  }
131
132
 
132
133
  declare function createActionsPlugin<TConfig = unknown, TEnv = unknown, TCommand = unknown, TSupportedEvents extends EmitterWebhookEventName = EmitterWebhookEventName>(handler: (context: Context<TConfig, TEnv, TCommand, TSupportedEvents>) => HandlerReturn, options?: Options$1): Promise<void>;
package/dist/index.d.ts CHANGED
@@ -127,6 +127,7 @@ interface Options$1 {
127
127
  * @deprecated This disables signature verification - only for local development
128
128
  */
129
129
  bypassSignatureVerification?: boolean;
130
+ returnDataToKernel?: boolean;
130
131
  }
131
132
 
132
133
  declare function createActionsPlugin<TConfig = unknown, TEnv = unknown, TCommand = unknown, TSupportedEvents extends EmitterWebhookEventName = EmitterWebhookEventName>(handler: (context: Context<TConfig, TEnv, TCommand, TSupportedEvents>) => HandlerReturn, options?: Options$1): Promise<void>;
package/dist/index.js CHANGED
@@ -162,7 +162,8 @@ function getPluginOptions(options) {
162
162
  envSchema: options?.envSchema,
163
163
  commandSchema: options?.commandSchema,
164
164
  // eslint-disable-next-line sonarjs/deprecation
165
- bypassSignatureVerification: options?.bypassSignatureVerification || false
165
+ bypassSignatureVerification: options?.bypassSignatureVerification || false,
166
+ returnDataToKernel: options?.returnDataToKernel ?? true
166
167
  };
167
168
  }
168
169
 
@@ -528,7 +529,9 @@ async function createActionsPlugin(handler, options) {
528
529
  try {
529
530
  const result = await handler(context2);
530
531
  core.setOutput("result", result);
531
- await returnDataToKernel(pluginGithubToken, inputs.stateId, result);
532
+ if (pluginOptions?.returnDataToKernel) {
533
+ await returnDataToKernel(pluginGithubToken, inputs.stateId, result);
534
+ }
532
535
  } catch (error) {
533
536
  await handleError(context2, pluginOptions, error);
534
537
  }
package/dist/index.mjs CHANGED
@@ -123,7 +123,8 @@ function getPluginOptions(options) {
123
123
  envSchema: options?.envSchema,
124
124
  commandSchema: options?.commandSchema,
125
125
  // eslint-disable-next-line sonarjs/deprecation
126
- bypassSignatureVerification: options?.bypassSignatureVerification || false
126
+ bypassSignatureVerification: options?.bypassSignatureVerification || false,
127
+ returnDataToKernel: options?.returnDataToKernel ?? true
127
128
  };
128
129
  }
129
130
 
@@ -489,7 +490,9 @@ async function createActionsPlugin(handler, options) {
489
490
  try {
490
491
  const result = await handler(context2);
491
492
  core.setOutput("result", result);
492
- await returnDataToKernel(pluginGithubToken, inputs.stateId, result);
493
+ if (pluginOptions?.returnDataToKernel) {
494
+ await returnDataToKernel(pluginGithubToken, inputs.stateId, result);
495
+ }
493
496
  } catch (error) {
494
497
  await handleError(context2, pluginOptions, error);
495
498
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubiquity-os/plugin-sdk",
3
- "version": "3.2.2",
3
+ "version": "3.3.0",
4
4
  "description": "SDK for plugin support.",
5
5
  "author": "Ubiquity DAO",
6
6
  "license": "MIT",