@daffodil/driver 0.39.11 → 0.40.1
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/daffodil-driver.d.ts +1 -0
- package/{esm2015/daffodil-driver.js → esm2020/daffodil-driver.mjs} +0 -0
- package/{esm2015/errors/bad-input.js → esm2020/errors/bad-input.mjs} +0 -0
- package/{esm2015/errors/public_api.js → esm2020/errors/public_api.mjs} +0 -0
- package/{esm2015/hubspot/daffodil-driver-hubspot.js → esm2020/hubspot/daffodil-driver-hubspot.mjs} +0 -0
- package/{esm2015/hubspot/hubspot-forms.provider.js → esm2020/hubspot/hubspot-forms.provider.mjs} +0 -0
- package/{esm2015/hubspot/hubspot-forms.service.js → esm2020/hubspot/hubspot-forms.service.mjs} +0 -0
- package/{esm2015/hubspot/index.js → esm2020/hubspot/index.mjs} +0 -0
- package/{esm2015/hubspot/models/config.js → esm2020/hubspot/models/config.mjs} +0 -0
- package/{esm2015/hubspot/models/hubspot-request.js → esm2020/hubspot/models/hubspot-request.mjs} +0 -0
- package/{esm2015/hubspot/models/hubspot-response.js → esm2020/hubspot/models/hubspot-response.mjs} +0 -0
- package/{esm2015/hubspot/transformers/json-builder.js → esm2020/hubspot/transformers/json-builder.mjs} +0 -0
- package/{esm2015/index.js → esm2020/index.mjs} +2 -2
- package/{esm2015/magento/daffodil-driver-magento.js → esm2020/magento/daffodil-driver-magento.mjs} +0 -0
- package/esm2020/magento/errors/error.class.mjs +12 -0
- package/esm2020/magento/errors/public_api.mjs +4 -0
- package/esm2020/magento/errors/transform-graphql.mjs +7 -0
- package/esm2020/magento/errors/transform.mjs +21 -0
- package/esm2020/magento/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.mjs +34 -0
- package/{esm2015/magento/graphql/cacheable-operations/cacheable-operations-token.js → esm2020/magento/graphql/cacheable-operations/cacheable-operations-token.mjs} +0 -0
- package/{esm2015/magento/graphql/public_api.js → esm2020/magento/graphql/public_api.mjs} +0 -0
- package/{esm2015/magento/index.js → esm2020/magento/index.mjs} +0 -0
- package/{esm2015/magento/models/public_api.js → esm2020/magento/models/public_api.mjs} +0 -0
- package/{esm2015/magento/models/responses/discount.js → esm2020/magento/models/responses/discount.mjs} +0 -0
- package/{esm2015/magento/models/responses/money.js → esm2020/magento/models/responses/money.mjs} +0 -0
- package/{esm2015/magento/models/responses/public_api.js → esm2020/magento/models/responses/public_api.mjs} +0 -0
- package/{esm2015 → esm2020}/magento/schema/introspection.json +0 -0
- package/{esm2015/magento/schema/schema.js → esm2020/magento/schema/schema.mjs} +0 -0
- package/{esm2015/magento/testing/daffodil-driver-magento-testing.js → esm2020/magento/testing/daffodil-driver-magento-testing.mjs} +0 -0
- package/esm2020/magento/testing/factories/discount.factory.mjs +30 -0
- package/esm2020/magento/testing/factories/money.factory.mjs +26 -0
- package/{esm2015/magento/testing/factories/public_api.js → esm2020/magento/testing/factories/public_api.mjs} +0 -0
- package/{esm2015/magento/testing/index.js → esm2020/magento/testing/index.mjs} +0 -0
- package/esm2020/models/public_api.mjs +2 -0
- package/esm2020/models/response.interface.mjs +2 -0
- package/esm2020/public_api.mjs +3 -0
- package/fesm2015/{daffodil-driver-hubspot.js → daffodil-driver-hubspot.mjs} +1 -1
- package/fesm2015/daffodil-driver-hubspot.mjs.map +1 -0
- package/fesm2015/daffodil-driver-magento-testing.mjs +58 -0
- package/fesm2015/daffodil-driver-magento-testing.mjs.map +1 -0
- package/fesm2015/daffodil-driver-magento.mjs +200 -0
- package/fesm2015/daffodil-driver-magento.mjs.map +1 -0
- package/fesm2015/{daffodil-driver.js → daffodil-driver.mjs} +1 -1
- package/fesm2015/daffodil-driver.mjs.map +1 -0
- package/fesm2020/daffodil-driver-hubspot.mjs +56 -0
- package/fesm2020/daffodil-driver-hubspot.mjs.map +1 -0
- package/fesm2020/daffodil-driver-magento-testing.mjs +58 -0
- package/fesm2020/daffodil-driver-magento-testing.mjs.map +1 -0
- package/{fesm2015/daffodil-driver-magento.js → fesm2020/daffodil-driver-magento.mjs} +36 -19
- package/fesm2020/daffodil-driver-magento.mjs.map +1 -0
- package/fesm2020/daffodil-driver.mjs +16 -0
- package/fesm2020/daffodil-driver.mjs.map +1 -0
- package/hubspot/daffodil-driver-hubspot.d.ts +1 -0
- package/hubspot/package.json +5 -6
- package/index.d.ts +1 -1
- package/magento/daffodil-driver-magento.d.ts +1 -0
- package/magento/errors/error.class.d.ts +9 -0
- package/magento/errors/public_api.d.ts +2 -0
- package/magento/errors/transform-graphql.d.ts +3 -0
- package/magento/errors/transform.d.ts +2 -2
- package/magento/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.d.ts +3 -0
- package/magento/package.json +5 -6
- package/magento/testing/daffodil-driver-magento-testing.d.ts +1 -0
- package/magento/testing/factories/discount.factory.d.ts +3 -0
- package/magento/testing/factories/money.factory.d.ts +3 -0
- package/magento/testing/package.json +5 -6
- package/models/public_api.d.ts +1 -0
- package/models/response.interface.d.ts +15 -0
- package/package.json +46 -10
- package/public_api.d.ts +2 -0
- package/bundles/daffodil-driver-hubspot.umd.js +0 -384
- package/bundles/daffodil-driver-hubspot.umd.js.map +0 -1
- package/bundles/daffodil-driver-hubspot.umd.min.js +0 -16
- package/bundles/daffodil-driver-hubspot.umd.min.js.map +0 -1
- package/bundles/daffodil-driver-magento-testing.umd.js +0 -386
- package/bundles/daffodil-driver-magento-testing.umd.js.map +0 -1
- package/bundles/daffodil-driver-magento-testing.umd.min.js +0 -16
- package/bundles/daffodil-driver-magento-testing.umd.min.js.map +0 -1
- package/bundles/daffodil-driver-magento.umd.js +0 -199
- package/bundles/daffodil-driver-magento.umd.js.map +0 -1
- package/bundles/daffodil-driver-magento.umd.min.js +0 -2
- package/bundles/daffodil-driver-magento.umd.min.js.map +0 -1
- package/bundles/daffodil-driver.umd.js +0 -345
- package/bundles/daffodil-driver.umd.js.map +0 -1
- package/bundles/daffodil-driver.umd.min.js +0 -16
- package/bundles/daffodil-driver.umd.min.js.map +0 -1
- package/daffodil-driver.metadata.json +0 -1
- package/esm2015/magento/errors/public_api.js +0 -2
- package/esm2015/magento/errors/transform.js +0 -22
- package/esm2015/magento/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.js +0 -33
- package/esm2015/magento/testing/factories/discount.factory.js +0 -29
- package/esm2015/magento/testing/factories/money.factory.js +0 -25
- package/fesm2015/daffodil-driver-hubspot.js.map +0 -1
- package/fesm2015/daffodil-driver-magento-testing.js +0 -55
- package/fesm2015/daffodil-driver-magento-testing.js.map +0 -1
- package/fesm2015/daffodil-driver-magento.js.map +0 -1
- package/fesm2015/daffodil-driver.js.map +0 -1
- package/hubspot/daffodil-driver-hubspot.metadata.json +0 -1
- package/magento/daffodil-driver-magento.metadata.json +0 -1
- package/magento/testing/daffodil-driver-magento-testing.metadata.json +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daffodil-driver-hubspot.mjs","sources":["../../../libs/driver/hubspot/src/transformers/json-builder.ts","../../../libs/driver/hubspot/src/hubspot-forms.service.ts","../../../libs/driver/hubspot/src/hubspot-forms.provider.ts","../../../libs/driver/hubspot/src/daffodil-driver-hubspot.ts"],"sourcesContent":["import { FieldValue } from '../models/hubspot-request';\n\n\nexport const jsonBuilder = (payload: Record<string, any>): FieldValue[] => Object.keys(payload).map((key) => ({ name: key, value: payload[key] }));\n","import { HttpClient } from '@angular/common/http';\nimport { Title } from '@angular/platform-browser';\nimport { Router } from '@angular/router';\nimport { Observable } from 'rxjs';\n\nimport { DaffHubspotConfig } from './models/config';\nimport { DaffHubspotRequest } from './models/hubspot-request';\nimport { HubspotResponse } from './models/hubspot-response';\nimport { jsonBuilder } from './transformers/json-builder';\n\nexport class DaffHubspotFormsService {\n\n constructor(\n private http: HttpClient,\n private document: Document,\n private route: Router,\n private title: Title,\n private config: DaffHubspotConfig) { }\n\n\n submit(payload: Record<string, any>): Observable<HubspotResponse> {\n return this.http.post<HubspotResponse>(\n this.generateUrl(this.config.portalId, this.config.guid, this.config.version),\n this.makeRequest(payload),\n );\n }\n\n private makeRequest(payload): DaffHubspotRequest {\n return {\n fields: [\n ...jsonBuilder(payload),\n ],\n context: {\n hutk: this.getCookie(),\n pageUri: this.getPageURI(),\n pageName: this.title.getTitle(),\n },\n };\n }\n\n private generateUrl(portalId: string, guid: string, version: string): string {\n if (version === undefined) {\n version = 'v3';\n }\n return 'https://api.hsforms.com/submissions/' + version + '/integration/submit/'\n + portalId + '/' + guid;\n }\n private getCookie() {\n if (!this.document) {\n return null;\n }\n const name = 'hubspotutk';\n const v = this.document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');\n return v ? v[2] : null;\n }\n private getPageURI() {\n if (!this.route) {\n return null;\n }\n return this.route.url;\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Title } from '@angular/platform-browser';\nimport { Router } from '@angular/router';\n\nimport { DaffHubspotFormsService } from './hubspot-forms.service';\nimport { DaffHubspotConfig } from './models/config';\n\n\nexport const daffHubspotFormsServiceFactory = (\n http: HttpClient,\n document: Document,\n router: Router,\n title: Title,\n config: DaffHubspotConfig,\n) => new DaffHubspotFormsService(http, document, router, title, config);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAGO,MAAM,WAAW,GAAG,CAAC,OAA4B,KAAmB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;;MCOrI,uBAAuB,CAAA;IAElC,WACU,CAAA,IAAgB,EAChB,QAAkB,EAClB,KAAa,EACb,KAAY,EACZ,MAAyB,EAAA;QAJzB,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAChB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QAClB,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;QACb,IAAK,CAAA,KAAA,GAAL,KAAK,CAAO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AAC,GAAG,IAAI,CAAC;KACxB;IACO,UAAU,GAAA;AAChB,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACf,YAAA,OAAO,IAAI,CAAC;AACb,SAAA;AACD,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;KACvB;AACF;;ACrDM,MAAM,8BAA8B,GAAG,CAC5C,IAAgB,EAChB,QAAkB,EAClB,MAAc,EACd,KAAY,EACZ,MAAyB,KACtB,IAAI,uBAAuB,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;ACdtE;;AAEG;;;;"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import * as faker from '@faker-js/faker/locale/en_US';
|
|
4
|
+
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
5
|
+
|
|
6
|
+
class MockMagentoMoney {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.__typename = 'Money';
|
|
9
|
+
this.value = faker.datatype.number({ min: 1, max: 10000 });
|
|
10
|
+
this.currency = faker.random.word();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
;
|
|
14
|
+
class MagentoMoneyFactory extends DaffModelFactory {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(MockMagentoMoney);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
MagentoMoneyFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoMoneyFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
20
|
+
MagentoMoneyFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoMoneyFactory, providedIn: 'root' });
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoMoneyFactory, decorators: [{
|
|
22
|
+
type: Injectable,
|
|
23
|
+
args: [{
|
|
24
|
+
providedIn: 'root',
|
|
25
|
+
}]
|
|
26
|
+
}], ctorParameters: function () { return []; } });
|
|
27
|
+
|
|
28
|
+
class MockMagentoDiscount {
|
|
29
|
+
constructor() {
|
|
30
|
+
this.__typename = 'Discount';
|
|
31
|
+
this.amount = this.money();
|
|
32
|
+
this.label = faker.random.word();
|
|
33
|
+
}
|
|
34
|
+
money() {
|
|
35
|
+
return (new MagentoMoneyFactory()).create();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
;
|
|
39
|
+
class MagentoDiscountFactory extends DaffModelFactory {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(MockMagentoDiscount);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
MagentoDiscountFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoDiscountFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
45
|
+
MagentoDiscountFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoDiscountFactory, providedIn: 'root' });
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MagentoDiscountFactory, decorators: [{
|
|
47
|
+
type: Injectable,
|
|
48
|
+
args: [{
|
|
49
|
+
providedIn: 'root',
|
|
50
|
+
}]
|
|
51
|
+
}], ctorParameters: function () { return []; } });
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Generated bundle index. Do not edit.
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
export { MagentoDiscountFactory, MagentoMoneyFactory };
|
|
58
|
+
//# sourceMappingURL=daffodil-driver-magento-testing.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daffodil-driver-magento-testing.mjs","sources":["../../../libs/driver/magento/testing/src/factories/money.factory.ts","../../../libs/driver/magento/testing/src/factories/discount.factory.ts","../../../libs/driver/magento/testing/src/daffodil-driver-magento-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { MagentoMoney } from '@daffodil/driver/magento';\n\nexport class MockMagentoMoney implements MagentoMoney {\n\t__typename = 'Money';\n value = faker.datatype.number({ min: 1, max: 10000 });\n currency = faker.random.word();\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoMoneyFactory extends DaffModelFactory<MagentoMoney> {\n constructor() {\n super(MockMagentoMoney);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport {\n MagentoDiscount,\n MagentoMoney,\n} from '@daffodil/driver/magento';\n\nimport { MagentoMoneyFactory } from './money.factory';\n\nexport class MockMagentoDiscount implements MagentoDiscount {\n\t__typename = 'Discount';\n amount = this.money();\n label = faker.random.word();\n\n private money(): MagentoMoney {\n return (new MagentoMoneyFactory()).create();\n }\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoDiscountFactory extends DaffModelFactory<MagentoDiscount> {\n constructor() {\n super(MockMagentoDiscount);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAMa,gBAAgB,CAAA;AAA7B,IAAA,WAAA,GAAA;QACC,IAAU,CAAA,UAAA,GAAG,OAAO,CAAC;AACpB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;AACtD,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KAChC;AAAA,CAAA;AAAA,CAAC;AA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A,EAAA,IAAA,EAAA,sBAAsB,cAFrB,MAAM,EAAA,CAAA,CAAA;2FAEP,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DaffInheritableError, daffIsError } from '@daffodil/core';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { InjectionToken, Injectable, Inject } from '@angular/core';
|
|
2
4
|
import { ApolloLink } from '@apollo/client/core';
|
|
3
5
|
|
|
4
6
|
var possibleTypes = {
|
|
@@ -95,25 +97,38 @@ var introspectionQueryResultData = {
|
|
|
95
97
|
|
|
96
98
|
const schema = introspectionQueryResultData;
|
|
97
99
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
const DAFF_DRIVER_MAGENTO_ERROR_CODE = 'DAFF_DRIVER_MAGENTO_ERROR';
|
|
101
|
+
/**
|
|
102
|
+
* A very general error thrown when a more specific error type cannot be determined.
|
|
103
|
+
*/
|
|
104
|
+
class DaffDriverMagentoError extends DaffInheritableError {
|
|
105
|
+
constructor(message) {
|
|
106
|
+
super(message);
|
|
107
|
+
this.code = DAFF_DRIVER_MAGENTO_ERROR_CODE;
|
|
101
108
|
}
|
|
102
|
-
|
|
103
|
-
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function daffMagentoTransformGraphQlError(error, map) {
|
|
112
|
+
const ErrorClass = map[error.extensions.category] || DaffDriverMagentoError;
|
|
113
|
+
return new ErrorClass(error.message);
|
|
104
114
|
}
|
|
105
115
|
;
|
|
116
|
+
|
|
106
117
|
/**
|
|
107
118
|
* Transforms the passed error according to the lookup in the passed map.
|
|
108
119
|
*/
|
|
120
|
+
// TODO: return array of errors
|
|
109
121
|
function daffTransformMagentoError(error, map) {
|
|
110
122
|
// TODO: handle network errors
|
|
111
123
|
if (error.graphQLErrors) {
|
|
112
|
-
return
|
|
124
|
+
return error.graphQLErrors.map(err => daffMagentoTransformGraphQlError(err, map))[0];
|
|
113
125
|
}
|
|
114
|
-
else {
|
|
126
|
+
else if (daffIsError(error)) {
|
|
115
127
|
return error;
|
|
116
128
|
}
|
|
129
|
+
else {
|
|
130
|
+
return new DaffDriverMagentoError(error.message);
|
|
131
|
+
}
|
|
117
132
|
}
|
|
118
133
|
;
|
|
119
134
|
|
|
@@ -163,19 +178,21 @@ class DaffMagentoApolloCacheableOperationsLinkGenerator {
|
|
|
163
178
|
});
|
|
164
179
|
}
|
|
165
180
|
}
|
|
166
|
-
DaffMagentoApolloCacheableOperationsLinkGenerator.ɵ
|
|
167
|
-
DaffMagentoApolloCacheableOperationsLinkGenerator
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
181
|
+
DaffMagentoApolloCacheableOperationsLinkGenerator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, deps: [{ token: DAFF_MAGENTO_CACHEABLE_OPERATIONS }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
182
|
+
DaffMagentoApolloCacheableOperationsLinkGenerator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, providedIn: 'root' });
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMagentoApolloCacheableOperationsLinkGenerator, decorators: [{
|
|
184
|
+
type: Injectable,
|
|
185
|
+
args: [{
|
|
186
|
+
providedIn: 'root',
|
|
187
|
+
}]
|
|
188
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
189
|
+
type: Inject,
|
|
190
|
+
args: [DAFF_MAGENTO_CACHEABLE_OPERATIONS]
|
|
191
|
+
}] }]; } });
|
|
175
192
|
|
|
176
193
|
/**
|
|
177
194
|
* Generated bundle index. Do not edit.
|
|
178
195
|
*/
|
|
179
196
|
|
|
180
|
-
export { DAFF_MAGENTO_CACHEABLE_OPERATIONS, DaffMagentoApolloCacheableOperationsLinkGenerator, daffTransformMagentoError, provideDaffMagentoCacheableOperation, provideManyDaffMagentoCacheableOperations, schema };
|
|
181
|
-
//# sourceMappingURL=daffodil-driver-magento.
|
|
197
|
+
export { DAFF_DRIVER_MAGENTO_ERROR_CODE, DAFF_MAGENTO_CACHEABLE_OPERATIONS, DaffDriverMagentoError, DaffMagentoApolloCacheableOperationsLinkGenerator, daffMagentoTransformGraphQlError, daffTransformMagentoError, provideDaffMagentoCacheableOperation, provideManyDaffMagentoCacheableOperations, schema };
|
|
198
|
+
//# sourceMappingURL=daffodil-driver-magento.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daffodil-driver-magento.mjs","sources":["../../../libs/driver/magento/src/schema/schema.ts","../../../libs/driver/magento/src/errors/error.class.ts","../../../libs/driver/magento/src/errors/transform-graphql.ts","../../../libs/driver/magento/src/errors/transform.ts","../../../libs/driver/magento/src/graphql/cacheable-operations/cacheable-operations-token.ts","../../../libs/driver/magento/src/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.ts","../../../libs/driver/magento/src/daffodil-driver-magento.ts"],"sourcesContent":["import introspectionQueryResultData from './introspection.json';\n\nexport const schema = introspectionQueryResultData;\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_DRIVER_MAGENTO_ERROR_CODE = 'DAFF_DRIVER_MAGENTO_ERROR';\n\n/**\n * A very general error thrown when a more specific error type cannot be determined.\n */\nexport class DaffDriverMagentoError extends DaffInheritableError implements DaffError {\n\tpublic readonly code: string = DAFF_DRIVER_MAGENTO_ERROR_CODE;\n\n\tconstructor(message?: string) {\n\t super(message);\n\t}\n}\n","import { GraphQLError } from 'graphql';\n\nimport {\n DaffError,\n DaffErrorCodeMap,\n} from '@daffodil/core';\n\nimport { DaffDriverMagentoError } from './error.class';\n\nexport function daffMagentoTransformGraphQlError<T extends DaffErrorCodeMap>(\n error: GraphQLError,\n map: T,\n): DaffError {\n const ErrorClass = map[error.extensions.category] || DaffDriverMagentoError;\n\n return new ErrorClass(error.message) ;\n};\n","import {\n DaffError,\n DaffErrorCodeMap,\n daffIsError,\n} from '@daffodil/core';\n\nimport { DaffDriverMagentoError } from './error.class';\nimport { daffMagentoTransformGraphQlError } from './transform-graphql';\n\n/**\n * Transforms the passed error according to the lookup in the passed map.\n */\n// TODO: return array of errors\nexport function daffTransformMagentoError<T extends DaffErrorCodeMap>(error: any, map: T): DaffError {\n // TODO: handle network errors\n if (error.graphQLErrors) {\n return error.graphQLErrors.map(err => daffMagentoTransformGraphQlError<T>(err, map))[0];\n } else if (daffIsError(error)) {\n return error;\n } else {\n return new DaffDriverMagentoError(error.message);\n }\n};\n","import { InjectionToken } from '@angular/core';\n\n/**\n * A multi-provider injection token of the operation names of magento queries that should\n * be cached. This is needed because queries need to be converted into GET queries in order for Magento\n * to cache them. This token should be used by daffodil driver platform modules to register operation names that are cacheable, and is\n * intended for internal daffodil use only.\n */\nexport const DAFF_MAGENTO_CACHEABLE_OPERATIONS = new InjectionToken<string[]>('DAFF_MAGENTO_CACHEABLE_OPERATIONS', { factory: () => []});\n\n/**\n * Adds an operation name to the list of cacheable Magento operations. Use only with Angular 9+.\n */\nexport function provideDaffMagentoCacheableOperation(operationName: string) {\n return {\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: operationName,\n multi: true,\n };\n}\n\n/**\n * Adds many operation names to the list of cacheable Magento operations. Use only with Angular 9+.\n */\nexport function provideManyDaffMagentoCacheableOperations(...operationNames: string[]) {\n return operationNames.map(name => ({\n provide: DAFF_MAGENTO_CACHEABLE_OPERATIONS,\n useValue: name,\n multi: true,\n }));\n}\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { ApolloLink } from '@apollo/client/core';\n\nimport { DaffApolloCacheableOperationLinkGenerator } from '@daffodil/core/graphql';\n\nimport { DAFF_MAGENTO_CACHEABLE_OPERATIONS } from './cacheable-operations-token';\n\n/**\n * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoApolloCacheableOperationsLinkGenerator implements DaffApolloCacheableOperationLinkGenerator {\n constructor(\n\t\t@Inject(DAFF_MAGENTO_CACHEABLE_OPERATIONS) private apolloGetRequests: string[],\n ) {}\n\n getLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n if(this.apolloGetRequests.indexOf(operation.operationName) > -1) {\n operation.setContext({ method: 'GET' });\n }\n return forward(operation);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,MAAM,GAAG;;ACGf,MAAM,8BAA8B,GAAG,4BAA4B;AAE1E;;AAEG;AACG,MAAO,sBAAuB,SAAQ,oBAAoB,CAAA;AAG/D,IAAA,WAAA,CAAY,OAAgB,EAAA;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHD,IAAI,CAAA,IAAA,GAAW,8BAA8B,CAAC;KAI7D;AACD;;ACPe,SAAA,gCAAgC,CAC9C,KAAmB,EACnB,GAAM,EAAA;AAEN,IAAA,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,sBAAsB,CAAC;AAE5E,IAAA,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAE;AACxC,CAAC;AAAA;;ACPD;;AAEG;AACH;AACgB,SA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,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE;gBAC/D,SAAS,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AACzC,aAAA;AACD,YAAA,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC;AAC5B,SAAC,CAAC,CAAC;KACJ;;AAZU,iDAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iDAAiD,kBAEpD,iCAAiC,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAF9B,iDAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iDAAiD,cAFhD,MAAM,EAAA,CAAA,CAAA;2FAEP,iDAAiD,EAAA,UAAA,EAAA,CAAA;kBAH7D,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;0BAGE,MAAM;2BAAC,iCAAiC,CAAA;;;ACpB3C;;AAEG;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DaffInheritableError } from '@daffodil/core';
|
|
2
|
+
|
|
3
|
+
class DaffBadInputError extends DaffInheritableError {
|
|
4
|
+
constructor(message) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.message = message;
|
|
7
|
+
this.code = 'DAFF_BAD_INPUT';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Generated bundle index. Do not edit.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
export { DaffBadInputError };
|
|
16
|
+
//# sourceMappingURL=daffodil-driver.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daffodil-driver.mjs","sources":["../../../libs/driver/src/errors/bad-input.ts","../../../libs/driver/src/daffodil-driver.ts"],"sourcesContent":["import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport class DaffBadInputError extends DaffInheritableError implements DaffError {\n public readonly code: string = 'DAFF_BAD_INPUT';\n\n constructor(public message: string) {\n super(message);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAKM,MAAO,iBAAkB,SAAQ,oBAAoB,CAAA;AAGzD,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;QAFlB,IAAI,CAAA,IAAA,GAAW,gBAAgB,CAAC;KAI/C;AACF;;ACXD;;AAEG;;;;"}
|
package/hubspot/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daffodil/driver/hubspot",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"fesm2015": "../fesm2015/daffodil-driver-hubspot.
|
|
3
|
+
"module": "../fesm2015/daffodil-driver-hubspot.mjs",
|
|
4
|
+
"es2020": "../fesm2020/daffodil-driver-hubspot.mjs",
|
|
5
|
+
"esm2020": "../esm2020/hubspot/daffodil-driver-hubspot.mjs",
|
|
6
|
+
"fesm2020": "../fesm2020/daffodil-driver-hubspot.mjs",
|
|
7
|
+
"fesm2015": "../fesm2015/daffodil-driver-hubspot.mjs",
|
|
8
8
|
"typings": "daffodil-driver-hubspot.d.ts",
|
|
9
|
-
"metadata": "daffodil-driver-hubspot.metadata.json",
|
|
10
9
|
"sideEffects": false
|
|
11
10
|
}
|
package/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './public_api';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
+
export declare const DAFF_DRIVER_MAGENTO_ERROR_CODE = "DAFF_DRIVER_MAGENTO_ERROR";
|
|
3
|
+
/**
|
|
4
|
+
* A very general error thrown when a more specific error type cannot be determined.
|
|
5
|
+
*/
|
|
6
|
+
export declare class DaffDriverMagentoError extends DaffInheritableError implements DaffError {
|
|
7
|
+
readonly code: string;
|
|
8
|
+
constructor(message?: string);
|
|
9
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DaffErrorCodeMap } from '@daffodil/core';
|
|
1
|
+
import { DaffError, DaffErrorCodeMap } from '@daffodil/core';
|
|
2
2
|
/**
|
|
3
3
|
* Transforms the passed error according to the lookup in the passed map.
|
|
4
4
|
*/
|
|
5
|
-
export declare function daffTransformMagentoError<T extends DaffErrorCodeMap>(error: any, map: T):
|
|
5
|
+
export declare function daffTransformMagentoError<T extends DaffErrorCodeMap>(error: any, map: T): DaffError;
|
package/magento/graphql/cacheable-operations/apollo-cacheable-operations-link-generator.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ApolloLink } from '@apollo/client/core';
|
|
2
2
|
import { DaffApolloCacheableOperationLinkGenerator } from '@daffodil/core/graphql';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.
|
|
5
6
|
*
|
|
@@ -9,4 +10,6 @@ export declare class DaffMagentoApolloCacheableOperationsLinkGenerator implement
|
|
|
9
10
|
private apolloGetRequests;
|
|
10
11
|
constructor(apolloGetRequests: string[]);
|
|
11
12
|
getLink(): ApolloLink;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMagentoApolloCacheableOperationsLinkGenerator, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoApolloCacheableOperationsLinkGenerator>;
|
|
12
15
|
}
|
package/magento/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daffodil/driver/magento",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"fesm2015": "../fesm2015/daffodil-driver-magento.
|
|
3
|
+
"module": "../fesm2015/daffodil-driver-magento.mjs",
|
|
4
|
+
"es2020": "../fesm2020/daffodil-driver-magento.mjs",
|
|
5
|
+
"esm2020": "../esm2020/magento/daffodil-driver-magento.mjs",
|
|
6
|
+
"fesm2020": "../fesm2020/daffodil-driver-magento.mjs",
|
|
7
|
+
"fesm2015": "../fesm2015/daffodil-driver-magento.mjs",
|
|
8
8
|
"typings": "daffodil-driver-magento.d.ts",
|
|
9
|
-
"metadata": "daffodil-driver-magento.metadata.json",
|
|
10
9
|
"sideEffects": false
|
|
11
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
2
2
|
import { MagentoDiscount, MagentoMoney } from '@daffodil/driver/magento';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class MockMagentoDiscount implements MagentoDiscount {
|
|
4
5
|
__typename: string;
|
|
5
6
|
amount: MagentoMoney;
|
|
@@ -8,4 +9,6 @@ export declare class MockMagentoDiscount implements MagentoDiscount {
|
|
|
8
9
|
}
|
|
9
10
|
export declare class MagentoDiscountFactory extends DaffModelFactory<MagentoDiscount> {
|
|
10
11
|
constructor();
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoDiscountFactory, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoDiscountFactory>;
|
|
11
14
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
2
2
|
import { MagentoMoney } from '@daffodil/driver/magento';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class MockMagentoMoney implements MagentoMoney {
|
|
4
5
|
__typename: string;
|
|
5
6
|
value: any;
|
|
@@ -7,4 +8,6 @@ export declare class MockMagentoMoney implements MagentoMoney {
|
|
|
7
8
|
}
|
|
8
9
|
export declare class MagentoMoneyFactory extends DaffModelFactory<MagentoMoney> {
|
|
9
10
|
constructor();
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MagentoMoneyFactory, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MagentoMoneyFactory>;
|
|
10
13
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daffodil/driver/magento/testing",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"fesm2015": "../../fesm2015/daffodil-driver-magento-testing.
|
|
3
|
+
"module": "../../fesm2015/daffodil-driver-magento-testing.mjs",
|
|
4
|
+
"es2020": "../../fesm2020/daffodil-driver-magento-testing.mjs",
|
|
5
|
+
"esm2020": "../../esm2020/magento/testing/daffodil-driver-magento-testing.mjs",
|
|
6
|
+
"fesm2020": "../../fesm2020/daffodil-driver-magento-testing.mjs",
|
|
7
|
+
"fesm2015": "../../fesm2015/daffodil-driver-magento-testing.mjs",
|
|
8
8
|
"typings": "daffodil-driver-magento-testing.d.ts",
|
|
9
|
-
"metadata": "daffodil-driver-magento-testing.metadata.json",
|
|
10
9
|
"sideEffects": false
|
|
11
10
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DaffDriverResponse } from './response.interface';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DaffError } from '@daffodil/core';
|
|
2
|
+
/**
|
|
3
|
+
* A driver response.
|
|
4
|
+
* Can contain a response, errors, or both.
|
|
5
|
+
*/
|
|
6
|
+
export interface DaffDriverResponse<T> {
|
|
7
|
+
/**
|
|
8
|
+
* The body of the response.
|
|
9
|
+
*/
|
|
10
|
+
response?: T;
|
|
11
|
+
/**
|
|
12
|
+
* A list of errors that occured during the driver call.
|
|
13
|
+
*/
|
|
14
|
+
errors: DaffError[];
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daffodil/driver",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.1",
|
|
4
4
|
"description": "A consistent, sane api driver that works with different ecommerce systems.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,19 +13,55 @@
|
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://github.com/graycoreio/daffodil",
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@angular/common": "^
|
|
17
|
-
"@angular/core": "^
|
|
16
|
+
"@angular/common": "^13.0.0",
|
|
17
|
+
"@angular/core": "^13.0.0",
|
|
18
18
|
"rxjs": "6.6.3"
|
|
19
19
|
},
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"fesm2015": "fesm2015/daffodil-driver.
|
|
20
|
+
"module": "fesm2015/daffodil-driver.mjs",
|
|
21
|
+
"es2020": "fesm2020/daffodil-driver.mjs",
|
|
22
|
+
"esm2020": "esm2020/daffodil-driver.mjs",
|
|
23
|
+
"fesm2020": "fesm2020/daffodil-driver.mjs",
|
|
24
|
+
"fesm2015": "fesm2015/daffodil-driver.mjs",
|
|
25
25
|
"typings": "daffodil-driver.d.ts",
|
|
26
|
-
"
|
|
26
|
+
"exports": {
|
|
27
|
+
"./package.json": {
|
|
28
|
+
"default": "./package.json"
|
|
29
|
+
},
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./daffodil-driver.d.ts",
|
|
32
|
+
"esm2020": "./esm2020/daffodil-driver.mjs",
|
|
33
|
+
"es2020": "./fesm2020/daffodil-driver.mjs",
|
|
34
|
+
"es2015": "./fesm2015/daffodil-driver.mjs",
|
|
35
|
+
"node": "./fesm2015/daffodil-driver.mjs",
|
|
36
|
+
"default": "./fesm2020/daffodil-driver.mjs"
|
|
37
|
+
},
|
|
38
|
+
"./hubspot": {
|
|
39
|
+
"types": "./hubspot/daffodil-driver-hubspot.d.ts",
|
|
40
|
+
"esm2020": "./esm2020/hubspot/daffodil-driver-hubspot.mjs",
|
|
41
|
+
"es2020": "./fesm2020/daffodil-driver-hubspot.mjs",
|
|
42
|
+
"es2015": "./fesm2015/daffodil-driver-hubspot.mjs",
|
|
43
|
+
"node": "./fesm2015/daffodil-driver-hubspot.mjs",
|
|
44
|
+
"default": "./fesm2020/daffodil-driver-hubspot.mjs"
|
|
45
|
+
},
|
|
46
|
+
"./magento": {
|
|
47
|
+
"types": "./magento/daffodil-driver-magento.d.ts",
|
|
48
|
+
"esm2020": "./esm2020/magento/daffodil-driver-magento.mjs",
|
|
49
|
+
"es2020": "./fesm2020/daffodil-driver-magento.mjs",
|
|
50
|
+
"es2015": "./fesm2015/daffodil-driver-magento.mjs",
|
|
51
|
+
"node": "./fesm2015/daffodil-driver-magento.mjs",
|
|
52
|
+
"default": "./fesm2020/daffodil-driver-magento.mjs"
|
|
53
|
+
},
|
|
54
|
+
"./magento/testing": {
|
|
55
|
+
"types": "./magento/testing/daffodil-driver-magento-testing.d.ts",
|
|
56
|
+
"esm2020": "./esm2020/magento/testing/daffodil-driver-magento-testing.mjs",
|
|
57
|
+
"es2020": "./fesm2020/daffodil-driver-magento-testing.mjs",
|
|
58
|
+
"es2015": "./fesm2015/daffodil-driver-magento-testing.mjs",
|
|
59
|
+
"node": "./fesm2015/daffodil-driver-magento-testing.mjs",
|
|
60
|
+
"default": "./fesm2020/daffodil-driver-magento-testing.mjs"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
27
63
|
"sideEffects": false,
|
|
28
64
|
"dependencies": {
|
|
29
|
-
"tslib": "^2.
|
|
65
|
+
"tslib": "^2.3.0"
|
|
30
66
|
}
|
|
31
67
|
}
|
package/public_api.d.ts
ADDED