@adobe-commerce/aio-toolkit 1.0.11 → 1.0.12
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/CHANGELOG.md +34 -0
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +6 -19
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,40 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.12] - 2026-01-06
|
|
9
|
+
|
|
10
|
+
### ✨ Features
|
|
11
|
+
|
|
12
|
+
- **feat(openwhisk):** Add configurable blocking parameter to execute method
|
|
13
|
+
- Created `OpenwhiskConfig` interface with optional `blocking` parameter
|
|
14
|
+
- Updated `Openwhisk.execute()` to accept optional config parameter
|
|
15
|
+
- Default `blocking` value is `true` for backward compatibility
|
|
16
|
+
- Allows non-blocking action execution when `blocking: false` is specified
|
|
17
|
+
- Enhanced JSDoc documentation with parameter descriptions
|
|
18
|
+
- Exported `OpenwhiskConfig` type from framework module for TypeScript users
|
|
19
|
+
|
|
20
|
+
### 🐛 Bug Fixes
|
|
21
|
+
|
|
22
|
+
- **fix(postinstall):** Simplified postinstall script to use Node.js built-in module resolution
|
|
23
|
+
- Replaced complex relative path logic with `require.resolve()` for automatic absolute path resolution
|
|
24
|
+
- Reduced script complexity from 20+ lines of path logic to 6 lines using Node's module resolution
|
|
25
|
+
- More reliable package detection that works in all Node.js environments
|
|
26
|
+
- Fixes issue where postinstall script couldn't find telemetry package in client projects
|
|
27
|
+
- Script now uses `require.resolve('@adobe/aio-lib-telemetry/package.json')` for automatic path handling
|
|
28
|
+
- Eliminated fragile relative path calculations (`../../../`) that depended on specific directory structures
|
|
29
|
+
- Works seamlessly across npm, yarn, pnpm, and different installation scenarios
|
|
30
|
+
|
|
31
|
+
### 📝 Technical Details
|
|
32
|
+
|
|
33
|
+
- Created `src/framework/openwhisk/types.ts` with `OpenwhiskConfig` interface
|
|
34
|
+
- Updated `Openwhisk.execute()` method signature to support configuration options
|
|
35
|
+
- Simplified `scripts/postinstall.js` from 108 lines to 93 lines
|
|
36
|
+
- Replaced manual path construction with Node's native module resolution algorithm
|
|
37
|
+
- More maintainable and robust solution that leverages Node.js built-in capabilities
|
|
38
|
+
- Script now works correctly whether telemetry is installed as direct dependency or peer dependency
|
|
39
|
+
- Automatic handling of hoisted vs nested node_modules structures
|
|
40
|
+
- All validations passed: type-check, linting, tests (1679+), and build
|
|
41
|
+
|
|
8
42
|
## [1.0.11] - 2026-01-04
|
|
9
43
|
|
|
10
44
|
### 🐛 Bug Fixes
|
package/dist/index.d.mts
CHANGED
|
@@ -107,10 +107,14 @@ declare class GraphQlAction {
|
|
|
107
107
|
}) => Promise<RuntimeActionResponseType>;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
interface OpenwhiskConfig {
|
|
111
|
+
blocking?: boolean;
|
|
112
|
+
}
|
|
113
|
+
|
|
110
114
|
declare class Openwhisk {
|
|
111
115
|
openwhiskClient: ReturnType<typeof openwhisk>;
|
|
112
116
|
constructor(host: string, apiKey: string);
|
|
113
|
-
execute(action: string, params: Dict): Promise<Activation<Dict>>;
|
|
117
|
+
execute(action: string, params: Dict, config?: OpenwhiskConfig): Promise<Activation<Dict>>;
|
|
114
118
|
}
|
|
115
119
|
|
|
116
120
|
declare class OpenwhiskAction {
|
|
@@ -955,4 +959,4 @@ declare class AdminUiSdk {
|
|
|
955
959
|
getRegistration(): AdminUiSdkRegistration;
|
|
956
960
|
}
|
|
957
961
|
|
|
958
|
-
export { AdminUiSdk, type AdminUiSdkRegistration, AdobeAuth, AdobeCommerceClient, type AdobeIMSConfig, type BaseTelemetry, type BaseTelemetryValidator, BasicAuthConnection, BearerToken, type BearerTokenInfo, type CommerceEvent, type CommerceEventConfig, type CommerceEventField, type Connection, type CreateEventResult, CreateEvents, type CreateProviderParams, type CreateProviderResult, type CreateRegistrationResult, CreateRegistrations, type ErrorResponse, EventConsumerAction, type EventData, type EventMetadata, type EventMetadataInputModel, type EventMetadataListResponse, EventMetadataManager, type ExtendedRequestError, type FileMetadata, type FileRecord, FileRepository, GenerateBasicAuthToken, type GetProviderQueryParams, type GetRegistrationQueryParams, GraphQlAction, type HALLink, type Headers, HttpMethod, HttpStatus, IOEventsApiError, type IOEventsError, ImsConnection, ImsToken, type ImsTokenResult, InfiniteLoopBreaker, type InfiniteLoopData, IoEventsGlobals, JsonMessageProcessor, type ListProvidersQueryParams, type ListRegistrationQueryParams, type MenuItem, Oauth1aConnection, OnboardCommerce, type OnboardCommerceConfig, type OnboardCommerceResult, OnboardEvents, type OnboardEventsInput, type OnboardEventsResponse, OnboardEvents as OnboardIOEvents, Openwhisk, OpenwhiskAction, type Page, Parameters, type Provider, type ProviderInputModel, ProviderManager, PublishEvent, type PublishEventResult, type Registration, type RegistrationCreateModel, type RegistrationListResponse, RegistrationManager, RestClient, RuntimeAction, RuntimeActionResponse, type RuntimeActionResponseType, RuntimeApiGatewayService, ShippingCarrier, type ShippingCarrierData, ShippingCarrierMethod, type ShippingCarrierMethodAdditionalData, type ShippingCarrierMethodData, ShippingCarrierResponse, SignatureVerification, SuccessChecker, type SuccessResponse, Telemetry, TelemetryInputError, type TokenResult, Validator, WebhookAction, type WebhookActionAddResponse, type WebhookActionExceptionResponse, WebhookActionOperation, type WebhookActionRemoveResponse, type WebhookActionReplaceResponse, WebhookActionResponse, type WebhookActionResponseType, type WebhookActionSuccessResponse, type WorkspaceConfig };
|
|
962
|
+
export { AdminUiSdk, type AdminUiSdkRegistration, AdobeAuth, AdobeCommerceClient, type AdobeIMSConfig, type BaseTelemetry, type BaseTelemetryValidator, BasicAuthConnection, BearerToken, type BearerTokenInfo, type CommerceEvent, type CommerceEventConfig, type CommerceEventField, type Connection, type CreateEventResult, CreateEvents, type CreateProviderParams, type CreateProviderResult, type CreateRegistrationResult, CreateRegistrations, type ErrorResponse, EventConsumerAction, type EventData, type EventMetadata, type EventMetadataInputModel, type EventMetadataListResponse, EventMetadataManager, type ExtendedRequestError, type FileMetadata, type FileRecord, FileRepository, GenerateBasicAuthToken, type GetProviderQueryParams, type GetRegistrationQueryParams, GraphQlAction, type HALLink, type Headers, HttpMethod, HttpStatus, IOEventsApiError, type IOEventsError, ImsConnection, ImsToken, type ImsTokenResult, InfiniteLoopBreaker, type InfiniteLoopData, IoEventsGlobals, JsonMessageProcessor, type ListProvidersQueryParams, type ListRegistrationQueryParams, type MenuItem, Oauth1aConnection, OnboardCommerce, type OnboardCommerceConfig, type OnboardCommerceResult, OnboardEvents, type OnboardEventsInput, type OnboardEventsResponse, OnboardEvents as OnboardIOEvents, Openwhisk, OpenwhiskAction, type OpenwhiskConfig, type Page, Parameters, type Provider, type ProviderInputModel, ProviderManager, PublishEvent, type PublishEventResult, type Registration, type RegistrationCreateModel, type RegistrationListResponse, RegistrationManager, RestClient, RuntimeAction, RuntimeActionResponse, type RuntimeActionResponseType, RuntimeApiGatewayService, ShippingCarrier, type ShippingCarrierData, ShippingCarrierMethod, type ShippingCarrierMethodAdditionalData, type ShippingCarrierMethodData, ShippingCarrierResponse, SignatureVerification, SuccessChecker, type SuccessResponse, Telemetry, TelemetryInputError, type TokenResult, Validator, WebhookAction, type WebhookActionAddResponse, type WebhookActionExceptionResponse, WebhookActionOperation, type WebhookActionRemoveResponse, type WebhookActionReplaceResponse, WebhookActionResponse, type WebhookActionResponseType, type WebhookActionSuccessResponse, type WorkspaceConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -107,10 +107,14 @@ declare class GraphQlAction {
|
|
|
107
107
|
}) => Promise<RuntimeActionResponseType>;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
interface OpenwhiskConfig {
|
|
111
|
+
blocking?: boolean;
|
|
112
|
+
}
|
|
113
|
+
|
|
110
114
|
declare class Openwhisk {
|
|
111
115
|
openwhiskClient: ReturnType<typeof openwhisk>;
|
|
112
116
|
constructor(host: string, apiKey: string);
|
|
113
|
-
execute(action: string, params: Dict): Promise<Activation<Dict>>;
|
|
117
|
+
execute(action: string, params: Dict, config?: OpenwhiskConfig): Promise<Activation<Dict>>;
|
|
114
118
|
}
|
|
115
119
|
|
|
116
120
|
declare class OpenwhiskAction {
|
|
@@ -955,4 +959,4 @@ declare class AdminUiSdk {
|
|
|
955
959
|
getRegistration(): AdminUiSdkRegistration;
|
|
956
960
|
}
|
|
957
961
|
|
|
958
|
-
export { AdminUiSdk, type AdminUiSdkRegistration, AdobeAuth, AdobeCommerceClient, type AdobeIMSConfig, type BaseTelemetry, type BaseTelemetryValidator, BasicAuthConnection, BearerToken, type BearerTokenInfo, type CommerceEvent, type CommerceEventConfig, type CommerceEventField, type Connection, type CreateEventResult, CreateEvents, type CreateProviderParams, type CreateProviderResult, type CreateRegistrationResult, CreateRegistrations, type ErrorResponse, EventConsumerAction, type EventData, type EventMetadata, type EventMetadataInputModel, type EventMetadataListResponse, EventMetadataManager, type ExtendedRequestError, type FileMetadata, type FileRecord, FileRepository, GenerateBasicAuthToken, type GetProviderQueryParams, type GetRegistrationQueryParams, GraphQlAction, type HALLink, type Headers, HttpMethod, HttpStatus, IOEventsApiError, type IOEventsError, ImsConnection, ImsToken, type ImsTokenResult, InfiniteLoopBreaker, type InfiniteLoopData, IoEventsGlobals, JsonMessageProcessor, type ListProvidersQueryParams, type ListRegistrationQueryParams, type MenuItem, Oauth1aConnection, OnboardCommerce, type OnboardCommerceConfig, type OnboardCommerceResult, OnboardEvents, type OnboardEventsInput, type OnboardEventsResponse, OnboardEvents as OnboardIOEvents, Openwhisk, OpenwhiskAction, type Page, Parameters, type Provider, type ProviderInputModel, ProviderManager, PublishEvent, type PublishEventResult, type Registration, type RegistrationCreateModel, type RegistrationListResponse, RegistrationManager, RestClient, RuntimeAction, RuntimeActionResponse, type RuntimeActionResponseType, RuntimeApiGatewayService, ShippingCarrier, type ShippingCarrierData, ShippingCarrierMethod, type ShippingCarrierMethodAdditionalData, type ShippingCarrierMethodData, ShippingCarrierResponse, SignatureVerification, SuccessChecker, type SuccessResponse, Telemetry, TelemetryInputError, type TokenResult, Validator, WebhookAction, type WebhookActionAddResponse, type WebhookActionExceptionResponse, WebhookActionOperation, type WebhookActionRemoveResponse, type WebhookActionReplaceResponse, WebhookActionResponse, type WebhookActionResponseType, type WebhookActionSuccessResponse, type WorkspaceConfig };
|
|
962
|
+
export { AdminUiSdk, type AdminUiSdkRegistration, AdobeAuth, AdobeCommerceClient, type AdobeIMSConfig, type BaseTelemetry, type BaseTelemetryValidator, BasicAuthConnection, BearerToken, type BearerTokenInfo, type CommerceEvent, type CommerceEventConfig, type CommerceEventField, type Connection, type CreateEventResult, CreateEvents, type CreateProviderParams, type CreateProviderResult, type CreateRegistrationResult, CreateRegistrations, type ErrorResponse, EventConsumerAction, type EventData, type EventMetadata, type EventMetadataInputModel, type EventMetadataListResponse, EventMetadataManager, type ExtendedRequestError, type FileMetadata, type FileRecord, FileRepository, GenerateBasicAuthToken, type GetProviderQueryParams, type GetRegistrationQueryParams, GraphQlAction, type HALLink, type Headers, HttpMethod, HttpStatus, IOEventsApiError, type IOEventsError, ImsConnection, ImsToken, type ImsTokenResult, InfiniteLoopBreaker, type InfiniteLoopData, IoEventsGlobals, JsonMessageProcessor, type ListProvidersQueryParams, type ListRegistrationQueryParams, type MenuItem, Oauth1aConnection, OnboardCommerce, type OnboardCommerceConfig, type OnboardCommerceResult, OnboardEvents, type OnboardEventsInput, type OnboardEventsResponse, OnboardEvents as OnboardIOEvents, Openwhisk, OpenwhiskAction, type OpenwhiskConfig, type Page, Parameters, type Provider, type ProviderInputModel, ProviderManager, PublishEvent, type PublishEventResult, type Registration, type RegistrationCreateModel, type RegistrationListResponse, RegistrationManager, RestClient, RuntimeAction, RuntimeActionResponse, type RuntimeActionResponseType, RuntimeApiGatewayService, ShippingCarrier, type ShippingCarrierData, ShippingCarrierMethod, type ShippingCarrierMethodAdditionalData, type ShippingCarrierMethodData, ShippingCarrierResponse, SignatureVerification, SuccessChecker, type SuccessResponse, Telemetry, TelemetryInputError, type TokenResult, Validator, WebhookAction, type WebhookActionAddResponse, type WebhookActionExceptionResponse, WebhookActionOperation, type WebhookActionRemoveResponse, type WebhookActionReplaceResponse, WebhookActionResponse, type WebhookActionResponseType, type WebhookActionSuccessResponse, type WorkspaceConfig };
|
package/dist/index.js
CHANGED
|
@@ -1922,14 +1922,19 @@ var _Openwhisk = class _Openwhisk {
|
|
|
1922
1922
|
this.openwhiskClient = (0, import_openwhisk.default)({ apihost: host, api_key: apiKey });
|
|
1923
1923
|
}
|
|
1924
1924
|
/**
|
|
1925
|
-
*
|
|
1926
|
-
*
|
|
1927
|
-
* @
|
|
1925
|
+
* Execute an OpenWhisk action
|
|
1926
|
+
*
|
|
1927
|
+
* @param action - Name of the action to execute
|
|
1928
|
+
* @param params - Parameters to pass to the action
|
|
1929
|
+
* @param config - Configuration options for execution
|
|
1930
|
+
* @param config.blocking - Whether to wait for action completion (default: true)
|
|
1931
|
+
* @returns {Promise<Activation<Dict>>} Action activation result
|
|
1928
1932
|
*/
|
|
1929
|
-
async execute(action, params) {
|
|
1933
|
+
async execute(action, params, config = {}) {
|
|
1934
|
+
const { blocking = true } = config;
|
|
1930
1935
|
return await this.openwhiskClient.actions.invoke({
|
|
1931
1936
|
name: action,
|
|
1932
|
-
blocking
|
|
1937
|
+
blocking,
|
|
1933
1938
|
params
|
|
1934
1939
|
});
|
|
1935
1940
|
}
|