Browse Source

feat(core): Update to TypeScript v4.9.5

Michael Bromley 2 years ago
parent
commit
99da585125
43 changed files with 5092 additions and 5578 deletions
  1. 2 2
      package.json
  2. 1 1
      packages/admin-ui-plugin/package.json
  3. 13 2
      packages/admin-ui/angular.json
  4. 2 2
      packages/admin-ui/package.json
  5. 1 1
      packages/admin-ui/scripts/compile-styles.js
  6. 1 1
      packages/admin-ui/src/lib/catalog/src/components/facet-list/facet-list.component.ts
  7. 311 231
      packages/admin-ui/src/lib/core/src/common/introspection-result.ts
  8. 1 1
      packages/admin-ui/src/lib/customer/src/components/customer-list/customer-list.component.ts
  9. 508 530
      packages/asset-server-plugin/e2e/graphql/generated-e2e-asset-server-plugin-types.ts
  10. 1 1
      packages/asset-server-plugin/package.json
  11. 1 1
      packages/common/package.json
  12. 628 649
      packages/common/src/generated-shop-types.ts
  13. 0 4
      packages/common/src/generated-types.ts
  14. 508 530
      packages/core/e2e/graphql/generated-e2e-admin-types.ts
  15. 599 620
      packages/core/e2e/graphql/generated-e2e-shop-types.ts
  16. 1 1
      packages/core/package.json
  17. 10 7
      packages/core/src/api/common/id-codec.ts
  18. 9 0
      packages/core/src/api/config/money-scalar.ts
  19. 1 141
      packages/core/src/common/error/generated-graphql-admin-errors.ts
  20. 1 91
      packages/core/src/common/error/generated-graphql-shop-errors.ts
  21. 7 4
      packages/core/src/connection/transactional-connection.ts
  22. 2 2
      packages/create/package.json
  23. 2 2
      packages/create/src/constants.ts
  24. 1 1
      packages/dev-server/package.json
  25. 508 530
      packages/elasticsearch-plugin/e2e/graphql/generated-e2e-elasticsearch-plugin-types.ts
  26. 1 1
      packages/elasticsearch-plugin/package.json
  27. 1 1
      packages/email-plugin/package.json
  28. 1 1
      packages/email-plugin/src/mock-events.ts
  29. 1 1
      packages/job-queue-plugin/package.json
  30. 4 4
      packages/job-queue-plugin/src/bullmq/bullmq-job-queue-strategy.ts
  31. 10 5
      packages/job-queue-plugin/src/bullmq/redis-job-buffer-storage-strategy.ts
  32. 2 2
      packages/job-queue-plugin/src/bullmq/types.ts
  33. 508 530
      packages/payments-plugin/e2e/graphql/generated-admin-types.ts
  34. 599 620
      packages/payments-plugin/e2e/graphql/generated-shop-types.ts
  35. 1 1
      packages/payments-plugin/package.json
  36. 632 649
      packages/payments-plugin/src/mollie/graphql/generated-shop-types.ts
  37. 1 1
      packages/payments-plugin/src/stripe/stripe.handler.ts
  38. 1 1
      packages/testing/package.json
  39. 0 1
      packages/testing/src/index.ts
  40. 6 3
      packages/testing/src/simple-graphql-client.ts
  41. 1 1
      packages/ui-devkit/package.json
  42. 13 2
      packages/ui-devkit/scaffold/angular.json
  43. 191 399
      yarn.lock

+ 2 - 2
package.json

@@ -52,9 +52,9 @@
     "lint-staged": "^10.5.4",
     "prettier": "^2.2.1",
     "ts-jest": "^27.0.4",
-    "ts-node": "^10.2.1",
+    "ts-node": "^10.9.1",
     "tslint": "^6.1.3",
-    "typescript": "4.5.5"
+    "typescript": "4.9.5"
   },
   "resolutions": {
     "npm-packlist": "1.1.12"

+ 1 - 1
packages/admin-ui-plugin/package.json

@@ -25,7 +25,7 @@
     "@vendure/core": "^2.0.0-next.28",
     "express": "^4.17.1",
     "rimraf": "^3.0.2",
-    "typescript": "4.5.5"
+    "typescript": "4.9.5"
   },
   "dependencies": {
     "fs-extra": "^10.0.0"

+ 13 - 2
packages/admin-ui/angular.json

@@ -15,7 +15,7 @@
       },
       "architect": {
         "build": {
-          "builder": "@angular-devkit/build-angular:browser",
+          "builder": "@angular-devkit/build-angular:browser-esbuild",
           "options": {
             "baseHref": "/admin/",
             "outputPath": "dist",
@@ -38,8 +38,19 @@
               "graphql-tag",
               "zen-observable",
               "lodash",
+              "dayjs",
               "apollo-upload-client",
-              "@vendure/common/lib/simple-deep-clone"
+              "@clr/icons",
+              "@clr/icons/shapes/all-shapes",
+              "@vendure/common/lib/generated-types",
+              "@vendure/common/lib/simple-deep-clone",
+              "@vendure/common/lib/shared-constants",
+              "@vendure/common/lib/shared-utils",
+              "@vendure/common/lib/normalize-string",
+              "@vendure/common/lib/unique",
+              "@vendure/common/lib/omit",
+              "@vendure/common/lib/pick",
+              "@messageformat/core"
             ],
             "vendorChunk": true,
             "extractLicenses": false,

+ 2 - 2
packages/admin-ui/package.json

@@ -5,7 +5,7 @@
   "scripts": {
     "ng": "ng",
     "start": "node scripts/set-version.js && ng serve",
-    "build:app": "yarn ng build --configuration production",
+    "build:app": "yarn ng build vendure-admin --configuration production",
     "build": "node scripts/copy-package-json.js && node scripts/set-version.js && node scripts/build-public-api.js && yarn ng build vendure-admin-lib --configuration production && node scripts/compile-styles.js",
     "watch": "ng build --watch=true",
     "test": "ng test --watch=false --browsers=ChromeHeadlessCI --progress=false",
@@ -91,6 +91,6 @@
     "puppeteer": "^8.0.0",
     "rimraf": "^3.0.2",
     "tslint": "~6.1.3",
-    "typescript": "4.8.4"
+    "typescript": "4.9.5"
   }
 }

+ 1 - 1
packages/admin-ui/scripts/compile-styles.js

@@ -8,7 +8,7 @@ const outFile = path.join(__dirname, '../package/static/theme.min.css');
 const result = sass.renderSync({
     file: path.join(__dirname, '../src/lib/static/styles/ui-extension-theme.scss'),
     importer,
-    includePaths: [path.join(__dirname, '../src/lib/static/styles')],
+    includePaths: [path.join(__dirname, '../src/lib/static/styles'), path.join(__dirname, '../node_modules')],
     outputStyle: 'compressed',
     outFile,
 });

+ 1 - 1
packages/admin-ui/src/lib/catalog/src/components/facet-list/facet-list.component.ts

@@ -14,7 +14,7 @@ import {
     SelectionManager,
     ServerConfigService,
 } from '@vendure/admin-ui/core';
-import { SortOrder } from '@vendure/common/lib/generated-shop-types';
+import { SortOrder } from '@vendure/common/lib/generated-types';
 import { EMPTY, Observable } from 'rxjs';
 import { debounceTime, filter, map, switchMap, takeUntil, tap } from 'rxjs/operators';
 

+ 311 - 231
packages/admin-ui/src/lib/core/src/common/introspection-result.ts

@@ -1,234 +1,314 @@
 // tslint:disable
 
-export interface PossibleTypesResultData {
-    possibleTypes: {
-        [key: string]: string[];
-    };
-}
-const result: PossibleTypesResultData = {
-    possibleTypes: {
-        AddFulfillmentToOrderResult: [
-            'CreateFulfillmentError',
-            'EmptyOrderLineSelectionError',
-            'Fulfillment',
-            'FulfillmentStateTransitionError',
-            'InsufficientStockOnHandError',
-            'InvalidFulfillmentHandlerError',
-            'ItemsAlreadyFulfilledError',
-        ],
-        AddManualPaymentToOrderResult: ['ManualPaymentStateError', 'Order'],
-        ApplyCouponCodeResult: [
-            'CouponCodeExpiredError',
-            'CouponCodeInvalidError',
-            'CouponCodeLimitError',
-            'Order',
-        ],
-        AuthenticationResult: ['CurrentUser', 'InvalidCredentialsError'],
-        CancelOrderResult: [
-            'CancelActiveOrderError',
-            'EmptyOrderLineSelectionError',
-            'MultipleOrderError',
-            'Order',
-            'OrderStateTransitionError',
-            'QuantityTooGreatError',
-        ],
-        CancelPaymentResult: ['CancelPaymentError', 'Payment', 'PaymentStateTransitionError'],
-        CreateAssetResult: ['Asset', 'MimeTypeError'],
-        CreateChannelResult: ['Channel', 'LanguageNotAvailableError'],
-        CreateCustomerResult: ['Customer', 'EmailAddressConflictError'],
-        CreatePromotionResult: ['MissingConditionsError', 'Promotion'],
-        CustomField: [
-            'BooleanCustomFieldConfig',
-            'DateTimeCustomFieldConfig',
-            'FloatCustomFieldConfig',
-            'IntCustomFieldConfig',
-            'LocaleStringCustomFieldConfig',
-            'LocaleTextCustomFieldConfig',
-            'RelationCustomFieldConfig',
-            'StringCustomFieldConfig',
-            'TextCustomFieldConfig',
-        ],
-        CustomFieldConfig: [
-            'BooleanCustomFieldConfig',
-            'DateTimeCustomFieldConfig',
-            'FloatCustomFieldConfig',
-            'IntCustomFieldConfig',
-            'LocaleStringCustomFieldConfig',
-            'LocaleTextCustomFieldConfig',
-            'RelationCustomFieldConfig',
-            'StringCustomFieldConfig',
-            'TextCustomFieldConfig',
-        ],
-        ErrorResult: [
-            'AlreadyRefundedError',
-            'CancelActiveOrderError',
-            'CancelPaymentError',
-            'ChannelDefaultLanguageError',
-            'CouponCodeExpiredError',
-            'CouponCodeInvalidError',
-            'CouponCodeLimitError',
-            'CreateFulfillmentError',
-            'EmailAddressConflictError',
-            'EmptyOrderLineSelectionError',
-            'FacetInUseError',
-            'FulfillmentStateTransitionError',
-            'IneligibleShippingMethodError',
-            'InsufficientStockError',
-            'InsufficientStockOnHandError',
-            'InvalidCredentialsError',
-            'InvalidFulfillmentHandlerError',
-            'ItemsAlreadyFulfilledError',
-            'LanguageNotAvailableError',
-            'ManualPaymentStateError',
-            'MimeTypeError',
-            'MissingConditionsError',
-            'MultipleOrderError',
-            'NativeAuthStrategyError',
-            'NegativeQuantityError',
-            'NoActiveOrderError',
-            'NoChangesSpecifiedError',
-            'NothingToRefundError',
-            'OrderLimitError',
-            'OrderModificationError',
-            'OrderModificationStateError',
-            'OrderStateTransitionError',
-            'PaymentMethodMissingError',
-            'PaymentOrderMismatchError',
-            'PaymentStateTransitionError',
-            'ProductOptionInUseError',
-            'QuantityTooGreatError',
-            'RefundOrderStateError',
-            'RefundPaymentIdMissingError',
-            'RefundStateTransitionError',
-            'SettlePaymentError',
-        ],
-        ModifyOrderResult: [
-            'CouponCodeExpiredError',
-            'CouponCodeInvalidError',
-            'CouponCodeLimitError',
-            'InsufficientStockError',
-            'NegativeQuantityError',
-            'NoChangesSpecifiedError',
-            'Order',
-            'OrderLimitError',
-            'OrderModificationStateError',
-            'PaymentMethodMissingError',
-            'RefundPaymentIdMissingError',
-        ],
-        NativeAuthenticationResult: ['CurrentUser', 'InvalidCredentialsError', 'NativeAuthStrategyError'],
-        Node: [
-            'Address',
-            'Administrator',
-            'Allocation',
-            'Asset',
-            'AuthenticationMethod',
-            'Cancellation',
-            'Channel',
-            'Collection',
-            'Country',
-            'Customer',
-            'CustomerGroup',
-            'Facet',
-            'FacetValue',
-            'Fulfillment',
-            'HistoryEntry',
-            'Job',
-            'Order',
-            'OrderItem',
-            'OrderLine',
-            'OrderModification',
-            'Payment',
-            'PaymentMethod',
-            'Product',
-            'ProductOption',
-            'ProductOptionGroup',
-            'ProductVariant',
-            'Promotion',
-            'Refund',
-            'Release',
-            'Return',
-            'Role',
-            'Sale',
-            'Seller',
-            'ShippingMethod',
-            'StockAdjustment',
-            'StockLevel',
-            'StockLocation',
-            'Surcharge',
-            'Tag',
-            'TaxCategory',
-            'TaxRate',
-            'User',
-            'Zone',
-        ],
-        PaginatedList: [
-            'AdministratorList',
-            'AssetList',
-            'CollectionList',
-            'CountryList',
-            'CustomerGroupList',
-            'CustomerList',
-            'FacetList',
-            'FacetValueList',
-            'HistoryEntryList',
-            'JobList',
-            'OrderList',
-            'PaymentMethodList',
-            'ProductList',
-            'ProductVariantList',
-            'PromotionList',
-            'RoleList',
-            'SellerList',
-            'ShippingMethodList',
-            'StockLocationList',
-            'TagList',
-            'TaxRateList',
-        ],
-        RefundOrderResult: [
-            'AlreadyRefundedError',
-            'MultipleOrderError',
-            'NothingToRefundError',
-            'OrderStateTransitionError',
-            'PaymentOrderMismatchError',
-            'QuantityTooGreatError',
-            'Refund',
-            'RefundOrderStateError',
-            'RefundStateTransitionError',
-        ],
-        RemoveFacetFromChannelResult: ['Facet', 'FacetInUseError'],
-        RemoveOptionGroupFromProductResult: ['Product', 'ProductOptionInUseError'],
-        RemoveOrderItemsResult: ['Order', 'OrderModificationError'],
-        SearchResultPrice: ['PriceRange', 'SinglePrice'],
-        SetCustomerForDraftOrderResult: ['EmailAddressConflictError', 'Order'],
-        SetOrderShippingMethodResult: [
-            'IneligibleShippingMethodError',
-            'NoActiveOrderError',
-            'Order',
-            'OrderModificationError',
-        ],
-        SettlePaymentResult: [
-            'OrderStateTransitionError',
-            'Payment',
-            'PaymentStateTransitionError',
-            'SettlePaymentError',
-        ],
-        SettleRefundResult: ['Refund', 'RefundStateTransitionError'],
-        StockMovement: ['Allocation', 'Cancellation', 'Release', 'Return', 'Sale', 'StockAdjustment'],
-        StockMovementItem: ['Allocation', 'Cancellation', 'Release', 'Return', 'Sale', 'StockAdjustment'],
-        TransitionFulfillmentToStateResult: ['Fulfillment', 'FulfillmentStateTransitionError'],
-        TransitionOrderToStateResult: ['Order', 'OrderStateTransitionError'],
-        TransitionPaymentToStateResult: ['Payment', 'PaymentStateTransitionError'],
-        UpdateChannelResult: ['Channel', 'LanguageNotAvailableError'],
-        UpdateCustomerResult: ['Customer', 'EmailAddressConflictError'],
-        UpdateGlobalSettingsResult: ['ChannelDefaultLanguageError', 'GlobalSettings'],
-        UpdateOrderItemsResult: [
-            'InsufficientStockError',
-            'NegativeQuantityError',
-            'Order',
-            'OrderLimitError',
-            'OrderModificationError',
-        ],
-        UpdatePromotionResult: ['MissingConditionsError', 'Promotion'],
-    },
+      export interface PossibleTypesResultData {
+        possibleTypes: {
+          [key: string]: string[]
+        }
+      }
+      const result: PossibleTypesResultData = {
+  "possibleTypes": {
+    "AddFulfillmentToOrderResult": [
+      "CreateFulfillmentError",
+      "EmptyOrderLineSelectionError",
+      "Fulfillment",
+      "FulfillmentStateTransitionError",
+      "InsufficientStockOnHandError",
+      "InvalidFulfillmentHandlerError",
+      "ItemsAlreadyFulfilledError"
+    ],
+    "AddManualPaymentToOrderResult": [
+      "ManualPaymentStateError",
+      "Order"
+    ],
+    "ApplyCouponCodeResult": [
+      "CouponCodeExpiredError",
+      "CouponCodeInvalidError",
+      "CouponCodeLimitError",
+      "Order"
+    ],
+    "AuthenticationResult": [
+      "CurrentUser",
+      "InvalidCredentialsError"
+    ],
+    "CancelOrderResult": [
+      "CancelActiveOrderError",
+      "EmptyOrderLineSelectionError",
+      "MultipleOrderError",
+      "Order",
+      "OrderStateTransitionError",
+      "QuantityTooGreatError"
+    ],
+    "CancelPaymentResult": [
+      "CancelPaymentError",
+      "Payment",
+      "PaymentStateTransitionError"
+    ],
+    "CreateAssetResult": [
+      "Asset",
+      "MimeTypeError"
+    ],
+    "CreateChannelResult": [
+      "Channel",
+      "LanguageNotAvailableError"
+    ],
+    "CreateCustomerResult": [
+      "Customer",
+      "EmailAddressConflictError"
+    ],
+    "CreatePromotionResult": [
+      "MissingConditionsError",
+      "Promotion"
+    ],
+    "CustomField": [
+      "BooleanCustomFieldConfig",
+      "DateTimeCustomFieldConfig",
+      "FloatCustomFieldConfig",
+      "IntCustomFieldConfig",
+      "LocaleStringCustomFieldConfig",
+      "LocaleTextCustomFieldConfig",
+      "RelationCustomFieldConfig",
+      "StringCustomFieldConfig",
+      "TextCustomFieldConfig"
+    ],
+    "CustomFieldConfig": [
+      "BooleanCustomFieldConfig",
+      "DateTimeCustomFieldConfig",
+      "FloatCustomFieldConfig",
+      "IntCustomFieldConfig",
+      "LocaleStringCustomFieldConfig",
+      "LocaleTextCustomFieldConfig",
+      "RelationCustomFieldConfig",
+      "StringCustomFieldConfig",
+      "TextCustomFieldConfig"
+    ],
+    "ErrorResult": [
+      "AlreadyRefundedError",
+      "CancelActiveOrderError",
+      "CancelPaymentError",
+      "ChannelDefaultLanguageError",
+      "CouponCodeExpiredError",
+      "CouponCodeInvalidError",
+      "CouponCodeLimitError",
+      "CreateFulfillmentError",
+      "EmailAddressConflictError",
+      "EmptyOrderLineSelectionError",
+      "FacetInUseError",
+      "FulfillmentStateTransitionError",
+      "IneligibleShippingMethodError",
+      "InsufficientStockError",
+      "InsufficientStockOnHandError",
+      "InvalidCredentialsError",
+      "InvalidFulfillmentHandlerError",
+      "ItemsAlreadyFulfilledError",
+      "LanguageNotAvailableError",
+      "ManualPaymentStateError",
+      "MimeTypeError",
+      "MissingConditionsError",
+      "MultipleOrderError",
+      "NativeAuthStrategyError",
+      "NegativeQuantityError",
+      "NoActiveOrderError",
+      "NoChangesSpecifiedError",
+      "NothingToRefundError",
+      "OrderLimitError",
+      "OrderModificationError",
+      "OrderModificationStateError",
+      "OrderStateTransitionError",
+      "PaymentMethodMissingError",
+      "PaymentOrderMismatchError",
+      "PaymentStateTransitionError",
+      "ProductOptionInUseError",
+      "QuantityTooGreatError",
+      "RefundOrderStateError",
+      "RefundPaymentIdMissingError",
+      "RefundStateTransitionError",
+      "SettlePaymentError"
+    ],
+    "ModifyOrderResult": [
+      "CouponCodeExpiredError",
+      "CouponCodeInvalidError",
+      "CouponCodeLimitError",
+      "InsufficientStockError",
+      "NegativeQuantityError",
+      "NoChangesSpecifiedError",
+      "Order",
+      "OrderLimitError",
+      "OrderModificationStateError",
+      "PaymentMethodMissingError",
+      "RefundPaymentIdMissingError"
+    ],
+    "NativeAuthenticationResult": [
+      "CurrentUser",
+      "InvalidCredentialsError",
+      "NativeAuthStrategyError"
+    ],
+    "Node": [
+      "Address",
+      "Administrator",
+      "Allocation",
+      "Asset",
+      "AuthenticationMethod",
+      "Cancellation",
+      "Channel",
+      "Collection",
+      "Country",
+      "Customer",
+      "CustomerGroup",
+      "Facet",
+      "FacetValue",
+      "Fulfillment",
+      "HistoryEntry",
+      "Job",
+      "Order",
+      "OrderItem",
+      "OrderLine",
+      "OrderModification",
+      "Payment",
+      "PaymentMethod",
+      "Product",
+      "ProductOption",
+      "ProductOptionGroup",
+      "ProductVariant",
+      "Promotion",
+      "Refund",
+      "Release",
+      "Return",
+      "Role",
+      "Sale",
+      "Seller",
+      "ShippingMethod",
+      "StockAdjustment",
+      "StockLevel",
+      "StockLocation",
+      "Surcharge",
+      "Tag",
+      "TaxCategory",
+      "TaxRate",
+      "User",
+      "Zone"
+    ],
+    "PaginatedList": [
+      "AdministratorList",
+      "AssetList",
+      "CollectionList",
+      "CountryList",
+      "CustomerGroupList",
+      "CustomerList",
+      "FacetList",
+      "FacetValueList",
+      "HistoryEntryList",
+      "JobList",
+      "OrderList",
+      "PaymentMethodList",
+      "ProductList",
+      "ProductVariantList",
+      "PromotionList",
+      "RoleList",
+      "SellerList",
+      "ShippingMethodList",
+      "StockLocationList",
+      "TagList",
+      "TaxRateList"
+    ],
+    "RefundOrderResult": [
+      "AlreadyRefundedError",
+      "MultipleOrderError",
+      "NothingToRefundError",
+      "OrderStateTransitionError",
+      "PaymentOrderMismatchError",
+      "QuantityTooGreatError",
+      "Refund",
+      "RefundOrderStateError",
+      "RefundStateTransitionError"
+    ],
+    "RemoveFacetFromChannelResult": [
+      "Facet",
+      "FacetInUseError"
+    ],
+    "RemoveOptionGroupFromProductResult": [
+      "Product",
+      "ProductOptionInUseError"
+    ],
+    "RemoveOrderItemsResult": [
+      "Order",
+      "OrderModificationError"
+    ],
+    "SearchResultPrice": [
+      "PriceRange",
+      "SinglePrice"
+    ],
+    "SetCustomerForDraftOrderResult": [
+      "EmailAddressConflictError",
+      "Order"
+    ],
+    "SetOrderShippingMethodResult": [
+      "IneligibleShippingMethodError",
+      "NoActiveOrderError",
+      "Order",
+      "OrderModificationError"
+    ],
+    "SettlePaymentResult": [
+      "OrderStateTransitionError",
+      "Payment",
+      "PaymentStateTransitionError",
+      "SettlePaymentError"
+    ],
+    "SettleRefundResult": [
+      "Refund",
+      "RefundStateTransitionError"
+    ],
+    "StockMovement": [
+      "Allocation",
+      "Cancellation",
+      "Release",
+      "Return",
+      "Sale",
+      "StockAdjustment"
+    ],
+    "StockMovementItem": [
+      "Allocation",
+      "Cancellation",
+      "Release",
+      "Return",
+      "Sale",
+      "StockAdjustment"
+    ],
+    "TransitionFulfillmentToStateResult": [
+      "Fulfillment",
+      "FulfillmentStateTransitionError"
+    ],
+    "TransitionOrderToStateResult": [
+      "Order",
+      "OrderStateTransitionError"
+    ],
+    "TransitionPaymentToStateResult": [
+      "Payment",
+      "PaymentStateTransitionError"
+    ],
+    "UpdateChannelResult": [
+      "Channel",
+      "LanguageNotAvailableError"
+    ],
+    "UpdateCustomerResult": [
+      "Customer",
+      "EmailAddressConflictError"
+    ],
+    "UpdateGlobalSettingsResult": [
+      "ChannelDefaultLanguageError",
+      "GlobalSettings"
+    ],
+    "UpdateOrderItemsResult": [
+      "InsufficientStockError",
+      "NegativeQuantityError",
+      "Order",
+      "OrderLimitError",
+      "OrderModificationError"
+    ],
+    "UpdatePromotionResult": [
+      "MissingConditionsError",
+      "Promotion"
+    ]
+  }
 };
-export default result;
+      export default result;
+    

+ 1 - 1
packages/admin-ui/src/lib/customer/src/components/customer-list/customer-list.component.ts

@@ -11,7 +11,7 @@ import {
     ModalService,
     NotificationService,
 } from '@vendure/admin-ui/core';
-import { SortOrder } from '@vendure/common/lib/generated-shop-types';
+import { SortOrder } from '@vendure/common/lib/generated-types';
 import { EMPTY } from 'rxjs';
 import { debounceTime, filter, switchMap, takeUntil } from 'rxjs/operators';
 

File diff suppressed because it is too large
+ 508 - 530
packages/asset-server-plugin/e2e/graphql/generated-e2e-asset-server-plugin-types.ts


+ 1 - 1
packages/asset-server-plugin/package.json

@@ -30,7 +30,7 @@
     "express": "^4.17.1",
     "node-fetch": "^2.6.7",
     "rimraf": "^3.0.2",
-    "typescript": "4.5.5"
+    "typescript": "4.9.5"
   },
   "dependencies": {
     "file-type": "^16.5.3",

+ 1 - 1
packages/common/package.json

@@ -20,6 +20,6 @@
   ],
   "devDependencies": {
     "rimraf": "^3.0.2",
-    "typescript": "4.5.5"
+    "typescript": "4.9.5"
   }
 }

File diff suppressed because it is too large
+ 628 - 649
packages/common/src/generated-shop-types.ts


+ 0 - 4
packages/common/src/generated-types.ts

@@ -11,13 +11,9 @@ export type Scalars = {
   Boolean: boolean;
   Int: number;
   Float: number;
-  /** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */
   DateTime: any;
-  /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
   JSON: any;
-  /** The `Money` scalar type represents monetary values and supports signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). */
   Money: any;
-  /** The `Upload` scalar type represents a file upload. */
   Upload: any;
 };
 

File diff suppressed because it is too large
+ 508 - 530
packages/core/e2e/graphql/generated-e2e-admin-types.ts


File diff suppressed because it is too large
+ 599 - 620
packages/core/e2e/graphql/generated-e2e-shop-types.ts


+ 1 - 1
packages/core/package.json

@@ -99,6 +99,6 @@
     "rimraf": "^3.0.2",
     "sql.js": "1.3.2",
     "sqlite3": "^5.0.0",
-    "typescript": "4.5.5"
+    "typescript": "4.9.5"
   }
 }

+ 10 - 7
packages/core/src/api/common/id-codec.ts

@@ -1,4 +1,5 @@
 import { ID } from '@vendure/common/lib/shared-types';
+import { isObject } from '@vendure/common/lib/shared-utils';
 
 import { EntityIdStrategy } from '../../config/entity/entity-id-strategy';
 import { VendureEntity } from '../../entity/base/base.entity';
@@ -89,13 +90,15 @@ export class IdCodec {
             }
         } else {
             target = this.transform(target, transformFn, transformKeys);
-            for (const key of Object.keys(target)) {
-                if (this.isObject(target[key as keyof T])) {
-                    target[key as keyof T] = this.transformRecursive(
-                        target[key as keyof T],
-                        transformFn,
-                        transformKeys,
-                    );
+            if (isObject(target)) {
+                for (const key of Object.keys(target)) {
+                    if (this.isObject(target[key as keyof T])) {
+                        target[key as keyof T] = this.transformRecursive(
+                            target[key as keyof T],
+                            transformFn,
+                            transformKeys,
+                        );
+                    }
                 }
             }
         }

+ 9 - 0
packages/core/src/api/config/money-scalar.ts

@@ -65,4 +65,13 @@ export const GraphQLMoney = new GraphQLScalarType<number>({
         }
         return parseFloat(valueNode.value);
     },
+    extensions: {
+        codegenScalarType: 'number',
+        jsonSchema: {
+            title: 'Money',
+            type: 'number',
+            minimum: Number.MIN_SAFE_INTEGER,
+            maximum: Number.MAX_SAFE_INTEGER,
+        },
+    },
 });

+ 1 - 141
packages/core/src/common/error/generated-graphql-admin-errors.ts

@@ -549,150 +549,10 @@ export class SettlePaymentError extends ErrorResult {
 }
 
 
-const errorTypeNames = new Set(['AlreadyRefundedError', 'CancelActiveOrderError', 'CancelPaymentError', 'ChannelDefaultLanguageError', 'CouponCodeExpiredError', 'CouponCodeInvalidError', 'CouponCodeLimitError', 'CreateFulfillmentError', 'EmailAddressConflictError', 'EmptyOrderLineSelectionError', 'FacetInUseError', 'FulfillmentStateTransitionError', 'IneligibleShippingMethodError', 'InsufficientStockError', 'InsufficientStockOnHandError', 'InvalidCredentialsError', 'InvalidFulfillmentHandlerError', 'ItemsAlreadyFulfilledError', 'LanguageNotAvailableError', 'ManualPaymentStateError', 'MimeTypeError', 'MissingConditionsError', 'MultipleOrderError', 'NativeAuthStrategyError', 'NegativeQuantityError', 'NoActiveOrderError', 'NoChangesSpecifiedError', 'NothingToRefundError', 'OrderLimitError', 'OrderModificationError', 'OrderModificationStateError', 'OrderStateTransitionError', 'PaymentMethodMissingError', 'PaymentOrderMismatchError', 'PaymentStateTransitionError', 'ProductOptionInUseError', 'QuantityTooGreatError', 'RefundOrderStateError', 'RefundPaymentIdMissingError', 'RefundStateTransitionError', 'SettlePaymentError']);
+const errorTypeNames = new Set([]);
 function isGraphQLError(input: any): input is import('@vendure/common/lib/generated-types').ErrorResult {
   return input instanceof ErrorResult || errorTypeNames.has(input.__typename);
 }
 
 export const adminErrorOperationTypeResolvers = {
-  AddFulfillmentToOrderResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Fulfillment';
-    },
-  },
-  UpdateOrderItemsResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  AddManualPaymentToOrderResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  ApplyCouponCodeResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  AuthenticationResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'CurrentUser';
-    },
-  },
-  CancelOrderResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  CancelPaymentResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Payment';
-    },
-  },
-  CreateAssetResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Asset';
-    },
-  },
-  CreateChannelResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Channel';
-    },
-  },
-  CreateCustomerResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Customer';
-    },
-  },
-  CreatePromotionResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Promotion';
-    },
-  },
-  NativeAuthenticationResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'CurrentUser';
-    },
-  },
-  ModifyOrderResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  RefundOrderResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Refund';
-    },
-  },
-  RemoveOrderItemsResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  RemoveFacetFromChannelResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Facet';
-    },
-  },
-  RemoveOptionGroupFromProductResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Product';
-    },
-  },
-  SetCustomerForDraftOrderResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  SetOrderShippingMethodResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  SettlePaymentResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Payment';
-    },
-  },
-  SettleRefundResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Refund';
-    },
-  },
-  TransitionFulfillmentToStateResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Fulfillment';
-    },
-  },
-  TransitionOrderToStateResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  TransitionPaymentToStateResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Payment';
-    },
-  },
-  UpdateChannelResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Channel';
-    },
-  },
-  UpdateCustomerResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Customer';
-    },
-  },
-  UpdateGlobalSettingsResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'GlobalSettings';
-    },
-  },
-  UpdatePromotionResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Promotion';
-    },
-  },
 };

+ 1 - 91
packages/core/src/common/error/generated-graphql-shop-errors.ts

@@ -358,100 +358,10 @@ export class VerificationTokenInvalidError extends ErrorResult {
 }
 
 
-const errorTypeNames = new Set(['AlreadyLoggedInError', 'CouponCodeExpiredError', 'CouponCodeInvalidError', 'CouponCodeLimitError', 'EmailAddressConflictError', 'IdentifierChangeTokenExpiredError', 'IdentifierChangeTokenInvalidError', 'IneligiblePaymentMethodError', 'IneligibleShippingMethodError', 'InsufficientStockError', 'InvalidCredentialsError', 'MissingPasswordError', 'NativeAuthStrategyError', 'NegativeQuantityError', 'NoActiveOrderError', 'NotVerifiedError', 'OrderLimitError', 'OrderModificationError', 'OrderPaymentStateError', 'OrderStateTransitionError', 'PasswordAlreadySetError', 'PasswordResetTokenExpiredError', 'PasswordResetTokenInvalidError', 'PasswordValidationError', 'PaymentDeclinedError', 'PaymentFailedError', 'VerificationTokenExpiredError', 'VerificationTokenInvalidError']);
+const errorTypeNames = new Set([]);
 function isGraphQLError(input: any): input is import('@vendure/common/lib/generated-types').ErrorResult {
   return input instanceof ErrorResult || errorTypeNames.has(input.__typename);
 }
 
 export const shopErrorOperationTypeResolvers = {
-  UpdateOrderItemsResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  AddPaymentToOrderResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  ApplyCouponCodeResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  AuthenticationResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'CurrentUser';
-    },
-  },
-  NativeAuthenticationResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'CurrentUser';
-    },
-  },
-  RefreshCustomerVerificationResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Success';
-    },
-  },
-  RegisterCustomerAccountResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Success';
-    },
-  },
-  RemoveOrderItemsResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  RequestPasswordResetResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Success';
-    },
-  },
-  RequestUpdateCustomerEmailAddressResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Success';
-    },
-  },
-  ResetPasswordResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'CurrentUser';
-    },
-  },
-  SetCustomerForOrderResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  ActiveOrderResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  SetOrderShippingMethodResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  TransitionOrderToStateResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Order';
-    },
-  },
-  UpdateCustomerEmailAddressResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Success';
-    },
-  },
-  UpdateCustomerPasswordResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'Success';
-    },
-  },
-  VerifyCustomerAccountResult: {
-    __resolveType(value: any) {
-      return isGraphQLError(value) ? (value as any).__typename : 'CurrentUser';
-    },
-  },
 };

+ 7 - 4
packages/core/src/connection/transactional-connection.ts

@@ -7,6 +7,7 @@ import {
     EntitySchema,
     FindOneOptions,
     FindOptionsUtils,
+    ObjectLiteral,
     ObjectType,
     Repository,
 } from 'typeorm';
@@ -53,23 +54,25 @@ export class TransactionalConnection {
     /**
      * @description
      * Returns a TypeORM repository. Note that when no RequestContext is supplied, the repository will not
-     * be aware of any existing transaction. Therefore calling this method without supplying a RequestContext
+     * be aware of any existing transaction. Therefore, calling this method without supplying a RequestContext
      * is discouraged without a deliberate reason.
      *
      * @deprecated since 1.7.0: Use {@link TransactionalConnection.rawConnection rawConnection.getRepository()} function instead.
      */
-    getRepository<Entity>(target: ObjectType<Entity> | EntitySchema<Entity> | string): Repository<Entity>;
+    getRepository<Entity extends ObjectLiteral>(
+        target: ObjectType<Entity> | EntitySchema<Entity> | string,
+    ): Repository<Entity>;
     /**
      * @description
      * Returns a TypeORM repository which is bound to any existing transactions. It is recommended to _always_ pass
      * the RequestContext argument when possible, otherwise the queries will be executed outside of any
      * ongoing transactions which have been started by the {@link Transaction} decorator.
      */
-    getRepository<Entity>(
+    getRepository<Entity extends ObjectLiteral>(
         ctx: RequestContext | undefined,
         target: ObjectType<Entity> | EntitySchema<Entity> | string,
     ): Repository<Entity>;
-    getRepository<Entity>(
+    getRepository<Entity extends ObjectLiteral>(
         ctxOrTarget: RequestContext | ObjectType<Entity> | EntitySchema<Entity> | string | undefined,
         maybeTarget?: ObjectType<Entity> | EntitySchema<Entity> | string,
     ): Repository<Entity> {

+ 2 - 2
packages/create/package.json

@@ -30,8 +30,8 @@
     "@types/semver": "^6.2.2",
     "@vendure/core": "^2.0.0-next.28",
     "rimraf": "^3.0.2",
-    "ts-node": "^10.2.1",
-    "typescript": "4.5.5"
+    "ts-node": "^10.9.1",
+    "typescript": "4.9.5"
   },
   "dependencies": {
     "@vendure/common": "^2.0.0-next.28",

+ 2 - 2
packages/create/src/constants.ts

@@ -1,7 +1,7 @@
-export const REQUIRED_NODE_VERSION = '>=10.13.0';
+export const REQUIRED_NODE_VERSION = '>=14.0.0';
 export const SERVER_PORT = 3000;
 /**
  * The TypeScript version needs to pinned because minor versions often
  * introduce breaking changes.
  */
-export const TYPESCRIPT_VERSION = '4.3.5';
+export const TYPESCRIPT_VERSION = '4.9.5';

+ 1 - 1
packages/dev-server/package.json

@@ -20,7 +20,7 @@
     "@vendure/core": "^2.0.0-next.28",
     "@vendure/elasticsearch-plugin": "^2.0.0-next.28",
     "@vendure/email-plugin": "^2.0.0-next.28",
-    "typescript": "4.5.5"
+    "typescript": "4.9.5"
   },
   "devDependencies": {
     "@types/csv-stringify": "^3.1.0",

File diff suppressed because it is too large
+ 508 - 530
packages/elasticsearch-plugin/e2e/graphql/generated-e2e-elasticsearch-plugin-types.ts


+ 1 - 1
packages/elasticsearch-plugin/package.json

@@ -28,6 +28,6 @@
     "@vendure/common": "^2.0.0-next.28",
     "@vendure/core": "^2.0.0-next.28",
     "rimraf": "^3.0.2",
-    "typescript": "4.5.5"
+    "typescript": "4.9.5"
   }
 }

+ 1 - 1
packages/email-plugin/package.json

@@ -38,6 +38,6 @@
     "@vendure/common": "^2.0.0-next.28",
     "@vendure/core": "^2.0.0-next.28",
     "rimraf": "^3.0.2",
-    "typescript": "4.5.5"
+    "typescript": "4.9.5"
   }
 }

+ 1 - 1
packages/email-plugin/src/mock-events.ts

@@ -51,7 +51,7 @@ export const mockOrderStateTransitionEvent = new OrderStateTransitionEvent(
                     {
                         adjustmentSource: 'Promotion:1',
                         type: AdjustmentType.PROMOTION,
-                        amount: -1000,
+                        amount: -1000 as any,
                         description: '$10 off computer equipment',
                     },
                 ],

+ 1 - 1
packages/job-queue-plugin/package.json

@@ -28,6 +28,6 @@
     "@vendure/core": "^2.0.0-next.28",
     "bullmq": "^1.86.7",
     "rimraf": "^3.0.2",
-    "typescript": "4.5.5"
+    "typescript": "4.9.5"
   }
 }

+ 4 - 4
packages/job-queue-plugin/src/bullmq/bullmq-job-queue-strategy.ts

@@ -11,7 +11,7 @@ import {
     PaginatedList,
 } from '@vendure/core';
 import Bull, {
-    DataSourceOptions,
+    ConnectionOptions,
     JobType,
     Processor,
     Queue,
@@ -20,7 +20,7 @@ import Bull, {
     WorkerOptions,
 } from 'bullmq';
 import { EventEmitter } from 'events';
-import Redis, { RedisOptions } from 'ioredis';
+import { Cluster, Redis, RedisOptions } from 'ioredis';
 
 import { ALL_JOB_TYPES, BULLMQ_PLUGIN_OPTIONS, loggerCtx } from './constants';
 import { RedisHealthIndicator } from './redis-health-indicator';
@@ -37,8 +37,8 @@ const DEFAULT_CONCURRENCY = 3;
  * @docsCategory job-queue-plugin
  */
 export class BullMQJobQueueStrategy implements InspectableJobQueueStrategy {
-    private redisConnection: Redis.Redis | Redis.Cluster;
-    private connectionOptions: DataSourceOptions;
+    private redisConnection: Redis | Cluster;
+    private connectionOptions: ConnectionOptions;
     private queue: Queue;
     private worker: Worker;
     private scheduler: QueueScheduler;

+ 10 - 5
packages/job-queue-plugin/src/bullmq/redis-job-buffer-storage-strategy.ts

@@ -1,5 +1,5 @@
 import { Injector, Job, JobBufferStorageStrategy, JobConfig, Logger } from '@vendure/core';
-import Redis, { Cluster, RedisOptions } from 'ioredis';
+import { Cluster, Redis, RedisOptions } from 'ioredis';
 
 import { BULLMQ_PLUGIN_OPTIONS, loggerCtx } from './constants';
 import { BullMQPluginOptions } from './types';
@@ -7,7 +7,7 @@ import { BullMQPluginOptions } from './types';
 const BUFFER_LIST_PREFIX = 'vendure-job-buffer';
 
 export class RedisJobBufferStorageStrategy implements JobBufferStorageStrategy {
-    private redis: Redis.Redis | Redis.Cluster;
+    private redis: Redis | Cluster;
 
     init(injector: Injector) {
         const options = injector.get<BullMQPluginOptions>(BULLMQ_PLUGIN_OPTIONS);
@@ -72,9 +72,14 @@ export class RedisJobBufferStorageStrategy implements JobBufferStorageStrategy {
     }
 
     private async getAllBufferIds(): Promise<string[]> {
-        const stream = this.redis.scanStream({
-            match: `${BUFFER_LIST_PREFIX}:*`,
-        });
+        const stream =
+            this.redis instanceof Redis
+                ? this.redis.scanStream({
+                      match: `${BUFFER_LIST_PREFIX}:*`,
+                  })
+                : this.redis.nodes()[0].scanStream({
+                      match: `${BUFFER_LIST_PREFIX}:*`,
+                  });
         const keys = await new Promise<string[]>((resolve, reject) => {
             const allKeys: string[] = [];
             stream.on('data', _keys => allKeys.push(..._keys));

+ 2 - 2
packages/job-queue-plugin/src/bullmq/types.ts

@@ -1,5 +1,5 @@
 import { Job } from '@vendure/core';
-import { DataSourceOptions, QueueSchedulerOptions, WorkerOptions } from 'bullmq';
+import { ConnectionOptions, QueueSchedulerOptions, WorkerOptions } from 'bullmq';
 import { QueueOptions } from 'bullmq';
 
 /**
@@ -19,7 +19,7 @@ export interface BullMQPluginOptions {
      *
      * If omitted, it will attempt to connect to Redis at `127.0.0.1:6379`.
      */
-    connection?: DataSourceOptions;
+    connection?: ConnectionOptions;
     /**
      * @description
      * Additional options used when instantiating the BullMQ

File diff suppressed because it is too large
+ 508 - 530
packages/payments-plugin/e2e/graphql/generated-admin-types.ts


File diff suppressed because it is too large
+ 599 - 620
packages/payments-plugin/e2e/graphql/generated-shop-types.ts


+ 1 - 1
packages/payments-plugin/package.json

@@ -36,6 +36,6 @@
         "nock": "^13.1.4",
         "rimraf": "^3.0.2",
         "stripe": "^8.197.0",
-        "typescript": "4.5.5"
+        "typescript": "4.9.5"
     }
 }

File diff suppressed because it is too large
+ 632 - 649
packages/payments-plugin/src/mollie/graphql/generated-shop-types.ts


+ 1 - 1
packages/payments-plugin/src/stripe/stripe.handler.ts

@@ -52,7 +52,7 @@ export const stripePaymentMethodHandler = new PaymentMethodHandler({
     async createRefund(ctx, input, amount, order, payment, args): Promise<CreateRefundResult> {
         const result = await stripeService.createRefund(payment.transactionId, amount);
 
-        if (result instanceof StripeError) {
+        if (result instanceof Stripe.StripeError) {
             return {
                 state: 'Failed' as const,
                 transactionId: payment.transactionId,

+ 1 - 1
packages/testing/package.json

@@ -49,6 +49,6 @@
     "mysql": "^2.18.1",
     "pg": "^8.4.0",
     "rimraf": "^3.0.0",
-    "typescript": "4.5.5"
+    "typescript": "4.9.5"
   }
 }

+ 0 - 1
packages/testing/src/index.ts

@@ -12,4 +12,3 @@ export * from './initializers/postgres-initializer';
 export * from './initializers/sqljs-initializer';
 export * from './testing-logger';
 export * from './types';
-export * from './utils/get-default-channel-token';

+ 6 - 3
packages/testing/src/simple-graphql-client.ts

@@ -12,7 +12,7 @@ import { QueryParams } from './types';
 import { createUploadPostData } from './utils/create-upload-post-data';
 
 const LOGIN = gql`
-    mutation($username: String!, $password: String!) {
+    mutation ($username: String!, $password: String!) {
         login(username: $username, password: $password) {
             ... on CurrentUser {
                 id
@@ -75,7 +75,7 @@ export class SimpleGraphQLClient {
      * @description
      * Performs both query and mutation operations.
      */
-    async query<T = any, V = Record<string, any>>(
+    async query<T = any, V extends Record<string, any> = Record<string, any>>(
         query: DocumentNode,
         variables?: V,
         queryParams?: QueryParams,
@@ -118,7 +118,10 @@ export class SimpleGraphQLClient {
      * @description
      * Performs a query or mutation and returns the resulting status code.
      */
-    async queryStatus<T = any, V = Record<string, any>>(query: DocumentNode, variables?: V): Promise<number> {
+    async queryStatus<T = any, V extends Record<string, any> = Record<string, any>>(
+        query: DocumentNode,
+        variables?: V,
+    ): Promise<number> {
         const response = await this.makeGraphQlRequest(query, variables);
         return response.status;
     }

+ 1 - 1
packages/ui-devkit/package.json

@@ -58,6 +58,6 @@
     "rollup-plugin-terser": "^7.0.2",
     "rollup-plugin-typescript2": "^0.30.0",
     "tslib": "^2.1.0",
-    "typescript": "4.5.5"
+    "typescript": "4.9.5"
   }
 }

+ 13 - 2
packages/ui-devkit/scaffold/angular.json

@@ -15,7 +15,7 @@
       },
       "architect": {
         "build": {
-          "builder": "@angular-devkit/build-angular:browser",
+          "builder": "@angular-devkit/build-angular:browser-esbuild",
           "options": {
             "baseHref": "/",
             "outputPath": "dist",
@@ -57,8 +57,19 @@
               "graphql-tag",
               "zen-observable",
               "lodash",
+              "dayjs",
               "apollo-upload-client",
-              "@vendure/common/lib/simple-deep-clone"
+              "@clr/icons",
+              "@clr/icons/shapes/all-shapes",
+              "@vendure/common/lib/generated-types",
+              "@vendure/common/lib/simple-deep-clone",
+              "@vendure/common/lib/shared-constants",
+              "@vendure/common/lib/shared-utils",
+              "@vendure/common/lib/normalize-string",
+              "@vendure/common/lib/unique",
+              "@vendure/common/lib/omit",
+              "@vendure/common/lib/pick",
+              "@messageformat/core"
             ],
             "vendorChunk": true,
             "extractLicenses": false,

File diff suppressed because it is too large
+ 191 - 399
yarn.lock


Some files were not shown because too many files changed in this diff