@daffodil/driver 0.92.3 → 0.93.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/fesm2022/daffodil-driver-hubspot-testing.mjs +3 -3
- package/fesm2022/daffodil-driver-hubspot-testing.mjs.map +1 -1
- package/fesm2022/daffodil-driver-in-memory.mjs +7 -7
- package/fesm2022/daffodil-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-driver-magento-testing.mjs +9 -9
- package/fesm2022/daffodil-driver-magento-testing.mjs.map +1 -1
- package/fesm2022/daffodil-driver-magento.mjs +34 -39
- package/fesm2022/daffodil-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-driver-shopify-testing.mjs +21 -21
- package/fesm2022/daffodil-driver-shopify-testing.mjs.map +1 -1
- package/fesm2022/daffodil-driver-shopify.mjs +14 -16
- package/fesm2022/daffodil-driver-shopify.mjs.map +1 -1
- package/fesm2022/daffodil-driver.mjs +3 -3
- package/fesm2022/daffodil-driver.mjs.map +1 -1
- package/package.json +1 -1
- package/{magento/index.d.ts → types/daffodil-driver-magento.d.ts} +10 -9
- /package/{hubspot/testing/index.d.ts → types/daffodil-driver-hubspot-testing.d.ts} +0 -0
- /package/{hubspot/index.d.ts → types/daffodil-driver-hubspot.d.ts} +0 -0
- /package/{in-memory/index.d.ts → types/daffodil-driver-in-memory.d.ts} +0 -0
- /package/{magento/testing/index.d.ts → types/daffodil-driver-magento-testing.d.ts} +0 -0
- /package/{shopify/testing/index.d.ts → types/daffodil-driver-shopify-testing.d.ts} +0 -0
- /package/{shopify/index.d.ts → types/daffodil-driver-shopify.d.ts} +0 -0
- /package/{index.d.ts → types/daffodil-driver.d.ts} +0 -0
|
@@ -33,10 +33,10 @@ class DaffDriverNetworkError extends DaffInheritableError {
|
|
|
33
33
|
*/
|
|
34
34
|
class DaffDriverHttpClientCacheNoopService {
|
|
35
35
|
reset() { }
|
|
36
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
37
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffDriverHttpClientCacheNoopService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
37
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffDriverHttpClientCacheNoopService, providedIn: 'root' }); }
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffDriverHttpClientCacheNoopService, decorators: [{
|
|
40
40
|
type: Injectable,
|
|
41
41
|
args: [{
|
|
42
42
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-driver.mjs","sources":["../../../libs/driver/src/errors/codes.ts","../../../libs/driver/src/errors/bad-input.ts","../../../libs/driver/src/errors/network-error.class.ts","../../../libs/driver/src/http-client-cache/noop.service.ts","../../../libs/driver/src/http-client-cache/service.token.ts","../../../libs/driver/src/daffodil-driver.ts"],"sourcesContent":["export enum DaffDriverErrorCodes {\n BAD_INPUT = 'DAFF_BAD_INPUT'\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffDriverErrorCodes } from './codes';\n\nexport class DaffBadInputError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffDriverErrorCodes.BAD_INPUT;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_DRIVER_NETWORK_ERROR_CODE = 'DAFF_DRIVER_NETWORK_ERROR';\n\n/**\n * An error thrown when the a driver encounters a problem with network connectivity.\n */\nexport class DaffDriverNetworkError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_DRIVER_NETWORK_ERROR_CODE;\n\n constructor(message?: string) {\n super(message);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffDriverHttpClientCacheServiceInterface } from './service.type';\n\n/**\n * A noop service. Always does nothing for every single method.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffDriverHttpClientCacheNoopService implements DaffDriverHttpClientCacheServiceInterface {\n reset(): void {}\n}\n","import { inject } from '@angular/core';\n\nimport { createSingletonInjectionToken } from '@daffodil/core';\n\nimport { DaffDriverHttpClientCacheNoopService } from './noop.service';\nimport { DaffDriverHttpClientCacheServiceInterface } from './service.type';\n\nexport const {\n token: DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE,\n /**\n * Provider function for {@link DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE}.\n */\n provider: provideDaffDriverHttpClientCacheService,\n} = createSingletonInjectionToken<DaffDriverHttpClientCacheServiceInterface>(\n 'DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE',\n { factory: () => inject(DaffDriverHttpClientCacheNoopService) },\n);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;IAAY;AAAZ,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,WAAA,CAAA,GAAA,gBAA4B;AAC9B,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,GAAA,EAAA,CAAA,CAAA;;ACO1B,MAAO,iBAAkB,SAAQ,oBAAoB,CAAA;AAGzD,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC;QADG,IAAA,CAAA,OAAO,GAAP,OAAO;AAFV,QAAA,IAAA,CAAA,IAAI,GAAW,oBAAoB,CAAC,SAAS;IAI7D;AACD;;ACRM,MAAM,8BAA8B,GAAG;AAE9C;;AAEG;AACG,MAAO,sBAAuB,SAAQ,oBAAoB,CAAA;AAG9D,IAAA,WAAA,CAAY,OAAgB,EAAA;QAC1B,KAAK,CAAC,OAAO,CAAC;QAHA,IAAA,CAAA,IAAI,GAAW,8BAA8B;IAI7D;AACD;;ACZD;;;;AAIG;MAIU,oCAAoC,CAAA;AAC/C,IAAA,KAAK,KAAU
|
|
1
|
+
{"version":3,"file":"daffodil-driver.mjs","sources":["../../../libs/driver/src/errors/codes.ts","../../../libs/driver/src/errors/bad-input.ts","../../../libs/driver/src/errors/network-error.class.ts","../../../libs/driver/src/http-client-cache/noop.service.ts","../../../libs/driver/src/http-client-cache/service.token.ts","../../../libs/driver/src/daffodil-driver.ts"],"sourcesContent":["export enum DaffDriverErrorCodes {\n BAD_INPUT = 'DAFF_BAD_INPUT'\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nimport { DaffDriverErrorCodes } from './codes';\n\nexport class DaffBadInputError extends DaffInheritableError implements DaffError {\n public readonly code: string = DaffDriverErrorCodes.BAD_INPUT;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_DRIVER_NETWORK_ERROR_CODE = 'DAFF_DRIVER_NETWORK_ERROR';\n\n/**\n * An error thrown when the a driver encounters a problem with network connectivity.\n */\nexport class DaffDriverNetworkError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_DRIVER_NETWORK_ERROR_CODE;\n\n constructor(message?: string) {\n super(message);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffDriverHttpClientCacheServiceInterface } from './service.type';\n\n/**\n * A noop service. Always does nothing for every single method.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffDriverHttpClientCacheNoopService implements DaffDriverHttpClientCacheServiceInterface {\n reset(): void {}\n}\n","import { inject } from '@angular/core';\n\nimport { createSingletonInjectionToken } from '@daffodil/core';\n\nimport { DaffDriverHttpClientCacheNoopService } from './noop.service';\nimport { DaffDriverHttpClientCacheServiceInterface } from './service.type';\n\nexport const {\n token: DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE,\n /**\n * Provider function for {@link DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE}.\n */\n provider: provideDaffDriverHttpClientCacheService,\n} = createSingletonInjectionToken<DaffDriverHttpClientCacheServiceInterface>(\n 'DAFF_DRIVER_HTTP_CLIENT_CACHE_SERVICE',\n { factory: () => inject(DaffDriverHttpClientCacheNoopService) },\n);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;IAAY;AAAZ,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,WAAA,CAAA,GAAA,gBAA4B;AAC9B,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,GAAA,EAAA,CAAA,CAAA;;ACO1B,MAAO,iBAAkB,SAAQ,oBAAoB,CAAA;AAGzD,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC;QADG,IAAA,CAAA,OAAO,GAAP,OAAO;AAFV,QAAA,IAAA,CAAA,IAAI,GAAW,oBAAoB,CAAC,SAAS;IAI7D;AACD;;ACRM,MAAM,8BAA8B,GAAG;AAE9C;;AAEG;AACG,MAAO,sBAAuB,SAAQ,oBAAoB,CAAA;AAG9D,IAAA,WAAA,CAAY,OAAgB,EAAA;QAC1B,KAAK,CAAC,OAAO,CAAC;QAHA,IAAA,CAAA,IAAI,GAAW,8BAA8B;IAI7D;AACD;;ACZD;;;;AAIG;MAIU,oCAAoC,CAAA;AAC/C,IAAA,KAAK,KAAU;8GADJ,oCAAoC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oCAAoC,cAFnC,MAAM,EAAA,CAAA,CAAA;;2FAEP,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAHhD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACJM,MAAM,EACX,KAAK,EAAE,qCAAqC;AAC5C;;AAEG;AACH,QAAQ,EAAE,uCAAuC,GAClD,GAAG,6BAA6B,CAC/B,uCAAuC,EACvC,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC,oCAAoC,CAAC,EAAE;;ACfjE;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@daffodil/driver","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/driver"]}}},"version":"0.
|
|
1
|
+
{"name":"@daffodil/driver","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/driver"]}}},"version":"0.93.0","description":"Base driver interfaces and utilities for connecting Daffodil to ecommerce platforms. Part of the Daffodil ecommerce framework.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","optionalDependencies":{"angular-in-memory-web-api":"^0.21.0"},"peerDependencies":{"@angular/common":"^21","@angular/core":"^21","rxjs":"^7.0.0"},"module":"fesm2022/daffodil-driver.mjs","typings":"types/daffodil-driver.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./types/daffodil-driver.d.ts","default":"./fesm2022/daffodil-driver.mjs"},"./hubspot":{"types":"./types/daffodil-driver-hubspot.d.ts","default":"./fesm2022/daffodil-driver-hubspot.mjs"},"./hubspot/testing":{"types":"./types/daffodil-driver-hubspot-testing.d.ts","default":"./fesm2022/daffodil-driver-hubspot-testing.mjs"},"./in-memory":{"types":"./types/daffodil-driver-in-memory.d.ts","default":"./fesm2022/daffodil-driver-in-memory.mjs"},"./magento":{"types":"./types/daffodil-driver-magento.d.ts","default":"./fesm2022/daffodil-driver-magento.mjs"},"./magento/testing":{"types":"./types/daffodil-driver-magento-testing.d.ts","default":"./fesm2022/daffodil-driver-magento-testing.mjs"},"./shopify":{"types":"./types/daffodil-driver-shopify.d.ts","default":"./fesm2022/daffodil-driver-shopify.mjs"},"./shopify/testing":{"types":"./types/daffodil-driver-shopify-testing.d.ts","default":"./fesm2022/daffodil-driver-shopify-testing.mjs"}},"sideEffects":false,"type":"module","dependencies":{"tslib":"^2.6.2"}}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Provider, EnvironmentProviders, StateKey, InjectionToken } from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { PossibleTypesMap, TypePolicies } from '@apollo/client/core';
|
|
4
|
+
import { HttpLink } from 'apollo-angular/http';
|
|
5
|
+
import { ApolloClient, ApolloLink, TypePolicies as TypePolicies$1 } from '@apollo/client';
|
|
6
|
+
import { ErrorLink } from '@apollo/client/link/error';
|
|
6
7
|
import { DaffErrorCodeMap, DaffError, DaffInheritableError, DaffCollectionMetadata, DaffSortDirectionEnum } from '@daffodil/core';
|
|
7
8
|
import { GraphQLFormattedError } from 'graphql';
|
|
8
9
|
import { DaffApolloLinkGenerator } from '@daffodil/core/graphql';
|
|
@@ -61,7 +62,7 @@ interface MagentoDriverFeature {
|
|
|
61
62
|
/**
|
|
62
63
|
* Apollo client options except link and cache, creation of which is done by {@link provideMagentoDriver}.
|
|
63
64
|
*/
|
|
64
|
-
type DaffDriverMagentoExtraApolloOptions = Omit<
|
|
65
|
+
type DaffDriverMagentoExtraApolloOptions = Omit<ApolloClient.Options, 'link' | 'cache'>;
|
|
65
66
|
declare const DAFF_DRIVER_MAGENTO_EXTRA_APOLLO_OPTIONS: _angular_core.InjectionToken<DaffDriverMagentoExtraApolloOptions>;
|
|
66
67
|
declare const provideDaffDriverMagentoExtraApolloOptions: <R extends DaffDriverMagentoExtraApolloOptions = DaffDriverMagentoExtraApolloOptions>(value: R) => _angular_core.ValueProvider;
|
|
67
68
|
declare const provideDaffDriverMagentoExtraApolloOptionsFactory: <R extends DaffDriverMagentoExtraApolloOptions = DaffDriverMagentoExtraApolloOptions>(factory: () => R) => _angular_core.FactoryProvider;
|
|
@@ -75,12 +76,12 @@ declare const withDaffDriverMagentoExtraApolloOptions: (options: DaffDriverMagen
|
|
|
75
76
|
*/
|
|
76
77
|
declare const withOperationCache: (...extraOperations: Array<string>) => MagentoDriverFeature;
|
|
77
78
|
|
|
78
|
-
declare const DAFF_DRIVER_MAGENTO_ERROR_HANDLER: _angular_core.InjectionToken<ErrorHandler>;
|
|
79
|
-
declare const provideDaffDriverMagentoErrorHandler: <R extends ErrorHandler = ErrorHandler>(value: R) => _angular_core.ValueProvider;
|
|
79
|
+
declare const DAFF_DRIVER_MAGENTO_ERROR_HANDLER: _angular_core.InjectionToken<ErrorLink.ErrorHandler>;
|
|
80
|
+
declare const provideDaffDriverMagentoErrorHandler: <R extends ErrorLink.ErrorHandler = ErrorLink.ErrorHandler>(value: R) => _angular_core.ValueProvider;
|
|
80
81
|
/**
|
|
81
82
|
* A {@link provideMagentoDriver} feature that specifies the error handler.
|
|
82
83
|
*/
|
|
83
|
-
declare const withDaffDriverMagentoErrorHandler: (handler: ErrorHandler) => MagentoDriverFeature;
|
|
84
|
+
declare const withDaffDriverMagentoErrorHandler: (handler: ErrorLink.ErrorHandler) => MagentoDriverFeature;
|
|
84
85
|
|
|
85
86
|
/**
|
|
86
87
|
* Creates a magento driver feature for {@link provideMagentoDriver}.
|
|
@@ -102,7 +103,7 @@ declare const withDaffDriverMagentoTransferState: <T extends StateKey<any> = Sta
|
|
|
102
103
|
*/
|
|
103
104
|
declare const provideDaffDriverMagentoTransferState: () => EnvironmentProviders;
|
|
104
105
|
|
|
105
|
-
interface DaffMagentoDriverConfig extends Options {
|
|
106
|
+
interface DaffMagentoDriverConfig extends HttpLink.Options {
|
|
106
107
|
possibleTypes?: PossibleTypesMap;
|
|
107
108
|
typePolicies?: TypePolicies;
|
|
108
109
|
}
|
|
@@ -201,7 +202,7 @@ declare function provideDaffMagentoCacheableOperation(operationName: string): {
|
|
|
201
202
|
* https://www.apollographql.com/docs/react/caching/cache-configuration/#typepolicy-fields
|
|
202
203
|
* https://www.apollographql.com/docs/react/caching/cache-field-behavior/
|
|
203
204
|
*/
|
|
204
|
-
declare const DAFF_MAGENTO_2_4_3_TYPE_POLICIES: TypePolicies;
|
|
205
|
+
declare const DAFF_MAGENTO_2_4_3_TYPE_POLICIES: TypePolicies$1;
|
|
205
206
|
|
|
206
207
|
/**
|
|
207
208
|
* Interacts with the Apollo client.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|