@adobe-commerce/aio-toolkit 1.0.9 → 1.0.10
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 +30 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +755 -1081
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +777 -1095
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,36 @@ 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.10] - 2026-01-01
|
|
9
|
+
|
|
10
|
+
### 🐛 Bug Fixes
|
|
11
|
+
|
|
12
|
+
- **Telemetry** - Fixed `ERR_PACKAGE_PATH_NOT_EXPORTED` error when requiring the package
|
|
13
|
+
- Root cause: `@adobe/aio-lib-telemetry@1.1.2` has broken CommonJS exports in its package.json
|
|
14
|
+
- Solution: Implemented lazy-loading proxy pattern for OpenTelemetry logger
|
|
15
|
+
- `getLogger` is now dynamically imported only when `ENABLE_TELEMETRY=true`
|
|
16
|
+
- Maintains synchronous API with immediate logger availability
|
|
17
|
+
- Graceful fallback to `Core.Logger` if telemetry loading fails
|
|
18
|
+
- **Impact:** Zero breaking changes - existing client code works without modification
|
|
19
|
+
- **Benefits:**
|
|
20
|
+
- Full OpenTelemetry integration preserved when telemetry is enabled
|
|
21
|
+
- Package size reduced by 92% (3.83 MB → 288 KB)
|
|
22
|
+
- No more import errors from broken dependency exports
|
|
23
|
+
|
|
24
|
+
### 🔧 Technical Changes
|
|
25
|
+
|
|
26
|
+
- **src/framework/telemetry/index.ts** - Implemented lazy-loading proxy pattern for `getLogger`
|
|
27
|
+
- **src/framework/telemetry/types.ts** - Added local `EntrypointInstrumentationConfig` type definition
|
|
28
|
+
- **src/commerce/adobe-auth/index.ts** - Changed to namespace import for ESM/CommonJS compatibility
|
|
29
|
+
- **tsconfig.json** - Added `"module": "ES2020"` to support dynamic imports
|
|
30
|
+
- **tsup.config.ts** - Configured to keep all dependencies external (not bundled)
|
|
31
|
+
|
|
32
|
+
### ✅ Quality Assurance
|
|
33
|
+
|
|
34
|
+
- Added 8 comprehensive test cases for lazy-loading telemetry behavior
|
|
35
|
+
- Maintained 100% test coverage (1902 tests passing)
|
|
36
|
+
- All validation checks passing (linting, formatting, type safety)
|
|
37
|
+
|
|
8
38
|
## [1.0.9] - 2025-12-23
|
|
9
39
|
|
|
10
40
|
### ⚠️ Deprecations
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import openwhisk, { Dict, Activation } from 'openwhisk';
|
|
2
|
-
import { EntrypointInstrumentationConfig } from '@adobe/aio-lib-telemetry';
|
|
3
2
|
import { LogRecordProcessor } from '@opentelemetry/sdk-logs';
|
|
4
3
|
import { SdkLogRecord } from '@adobe/aio-lib-telemetry/otel';
|
|
5
4
|
import { Response } from 'node-fetch';
|
|
@@ -277,6 +276,7 @@ declare class RuntimeApiGatewayService {
|
|
|
277
276
|
delete(endpoint: string, additionalHeaders?: Record<string, string>): Promise<any>;
|
|
278
277
|
}
|
|
279
278
|
|
|
279
|
+
type EntrypointInstrumentationConfig = any;
|
|
280
280
|
interface BaseTelemetryValidator {
|
|
281
281
|
isConfigured(params: Record<string, unknown>): boolean;
|
|
282
282
|
validateConfiguration(params: Record<string, unknown>): void;
|
|
@@ -289,6 +289,7 @@ interface BaseTelemetry {
|
|
|
289
289
|
|
|
290
290
|
declare class Telemetry {
|
|
291
291
|
static createLogger(name: string, params: Record<string, unknown>): any;
|
|
292
|
+
private static wrapLogger;
|
|
292
293
|
static formatError(error: unknown): Record<string, unknown>;
|
|
293
294
|
static initialize(action: (params: Record<string, unknown>) => any): (params: Record<string, unknown>) => any;
|
|
294
295
|
}
|
|
@@ -955,4 +956,4 @@ declare class AdminUiSdk {
|
|
|
955
956
|
getRegistration(): AdminUiSdkRegistration;
|
|
956
957
|
}
|
|
957
958
|
|
|
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 };
|
|
959
|
+
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 EntrypointInstrumentationConfig, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import openwhisk, { Dict, Activation } from 'openwhisk';
|
|
2
|
-
import { EntrypointInstrumentationConfig } from '@adobe/aio-lib-telemetry';
|
|
3
2
|
import { LogRecordProcessor } from '@opentelemetry/sdk-logs';
|
|
4
3
|
import { SdkLogRecord } from '@adobe/aio-lib-telemetry/otel';
|
|
5
4
|
import { Response } from 'node-fetch';
|
|
@@ -277,6 +276,7 @@ declare class RuntimeApiGatewayService {
|
|
|
277
276
|
delete(endpoint: string, additionalHeaders?: Record<string, string>): Promise<any>;
|
|
278
277
|
}
|
|
279
278
|
|
|
279
|
+
type EntrypointInstrumentationConfig = any;
|
|
280
280
|
interface BaseTelemetryValidator {
|
|
281
281
|
isConfigured(params: Record<string, unknown>): boolean;
|
|
282
282
|
validateConfiguration(params: Record<string, unknown>): void;
|
|
@@ -289,6 +289,7 @@ interface BaseTelemetry {
|
|
|
289
289
|
|
|
290
290
|
declare class Telemetry {
|
|
291
291
|
static createLogger(name: string, params: Record<string, unknown>): any;
|
|
292
|
+
private static wrapLogger;
|
|
292
293
|
static formatError(error: unknown): Record<string, unknown>;
|
|
293
294
|
static initialize(action: (params: Record<string, unknown>) => any): (params: Record<string, unknown>) => any;
|
|
294
295
|
}
|
|
@@ -955,4 +956,4 @@ declare class AdminUiSdk {
|
|
|
955
956
|
getRegistration(): AdminUiSdkRegistration;
|
|
956
957
|
}
|
|
957
958
|
|
|
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 };
|
|
959
|
+
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 EntrypointInstrumentationConfig, 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 };
|