@unchainedshop/platform 2.0.0-rc.3 → 2.0.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.
Files changed (136) hide show
  1. package/jest.config.js +3 -0
  2. package/lib/bulk-importer/createBulkImporter.d.ts +2 -2
  3. package/lib/bulk-importer/createBulkImporter.js +13 -4
  4. package/lib/bulk-importer/createBulkImporter.js.map +1 -1
  5. package/lib/bulk-importer/handlers/assortment/create.d.ts +1 -1
  6. package/lib/bulk-importer/handlers/assortment/create.js +6 -6
  7. package/lib/bulk-importer/handlers/assortment/create.js.map +1 -1
  8. package/lib/bulk-importer/handlers/assortment/index.d.ts +3 -3
  9. package/lib/bulk-importer/handlers/assortment/index.js +3 -3
  10. package/lib/bulk-importer/handlers/assortment/index.js.map +1 -1
  11. package/lib/bulk-importer/handlers/assortment/remove.d.ts +1 -1
  12. package/lib/bulk-importer/handlers/assortment/update.d.ts +1 -1
  13. package/lib/bulk-importer/handlers/assortment/update.js +6 -6
  14. package/lib/bulk-importer/handlers/assortment/update.js.map +1 -1
  15. package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.d.ts +1 -1
  16. package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.js +1 -1
  17. package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.js.map +1 -1
  18. package/lib/bulk-importer/handlers/assortment/upsertAssortmentContent.d.ts +1 -1
  19. package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.d.ts +1 -1
  20. package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.js +1 -1
  21. package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.js.map +1 -1
  22. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.d.ts +1 -1
  23. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js +1 -1
  24. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js.map +1 -1
  25. package/lib/bulk-importer/handlers/assortment/upsertMedia.d.ts +1 -1
  26. package/lib/bulk-importer/handlers/assortment/upsertMedia.js +1 -1
  27. package/lib/bulk-importer/handlers/assortment/upsertMedia.js.map +1 -1
  28. package/lib/bulk-importer/handlers/filter/create.d.ts +1 -1
  29. package/lib/bulk-importer/handlers/filter/create.js +2 -2
  30. package/lib/bulk-importer/handlers/filter/create.js.map +1 -1
  31. package/lib/bulk-importer/handlers/filter/index.d.ts +3 -3
  32. package/lib/bulk-importer/handlers/filter/index.js +3 -3
  33. package/lib/bulk-importer/handlers/filter/index.js.map +1 -1
  34. package/lib/bulk-importer/handlers/filter/remove.d.ts +1 -1
  35. package/lib/bulk-importer/handlers/filter/update.d.ts +1 -1
  36. package/lib/bulk-importer/handlers/filter/update.js +2 -2
  37. package/lib/bulk-importer/handlers/filter/update.js.map +1 -1
  38. package/lib/bulk-importer/handlers/filter/upsertFilterContent.d.ts +2 -2
  39. package/lib/bulk-importer/handlers/filter/upsertFilterOptionContent.d.ts +1 -1
  40. package/lib/bulk-importer/handlers/product/create.d.ts +1 -1
  41. package/lib/bulk-importer/handlers/product/create.js +4 -4
  42. package/lib/bulk-importer/handlers/product/create.js.map +1 -1
  43. package/lib/bulk-importer/handlers/product/index.d.ts +3 -3
  44. package/lib/bulk-importer/handlers/product/index.js +3 -3
  45. package/lib/bulk-importer/handlers/product/index.js.map +1 -1
  46. package/lib/bulk-importer/handlers/product/remove.d.ts +1 -1
  47. package/lib/bulk-importer/handlers/product/transformSpecificationToProductStructure.js +1 -1
  48. package/lib/bulk-importer/handlers/product/transformSpecificationToProductStructure.js.map +1 -1
  49. package/lib/bulk-importer/handlers/product/update.d.ts +1 -1
  50. package/lib/bulk-importer/handlers/product/update.js +4 -4
  51. package/lib/bulk-importer/handlers/product/update.js.map +1 -1
  52. package/lib/bulk-importer/handlers/product/upsertMedia.d.ts +1 -1
  53. package/lib/bulk-importer/handlers/product/upsertMedia.js +2 -2
  54. package/lib/bulk-importer/handlers/product/upsertMedia.js.map +1 -1
  55. package/lib/bulk-importer/handlers/product/upsertProductContent.d.ts +1 -1
  56. package/lib/bulk-importer/handlers/product/upsertVariations.d.ts +1 -1
  57. package/lib/bulk-importer/upsertAsset.d.ts +2 -2
  58. package/lib/context/index.d.ts +2 -2
  59. package/lib/context/index.js +2 -2
  60. package/lib/context/index.js.map +1 -1
  61. package/lib/context/setAccessToken.d.ts +1 -1
  62. package/lib/context/withAccessToken.d.ts +1 -1
  63. package/lib/migrations/createMigrationRunner.d.ts +1 -1
  64. package/lib/migrations/migrationRepository.d.ts +2 -2
  65. package/lib/migrations/runMigrations.d.ts +1 -1
  66. package/lib/migrations/runMigrations.js +1 -1
  67. package/lib/migrations/runMigrations.js.map +1 -1
  68. package/lib/platform-index.d.ts +2 -2
  69. package/lib/platform-index.js +2 -2
  70. package/lib/platform-index.js.map +1 -1
  71. package/lib/setup/setupAccounts.d.ts +1 -1
  72. package/lib/setup/setupCarts.d.ts +2 -2
  73. package/lib/setup/setupTemplates.js +7 -7
  74. package/lib/setup/setupTemplates.js.map +1 -1
  75. package/lib/setup/setupWorkqueue.d.ts +2 -2
  76. package/lib/startPlatform.d.ts +3 -3
  77. package/lib/startPlatform.js +10 -9
  78. package/lib/startPlatform.js.map +1 -1
  79. package/lib/templates/resolveAccountActionTemplate.d.ts +1 -1
  80. package/lib/templates/resolveEnrollmentStatusTemplate.d.ts +1 -1
  81. package/lib/templates/resolveForwardDeliveryTemplate.d.ts +1 -1
  82. package/lib/templates/resolveForwardDeliveryTemplate.js +2 -2
  83. package/lib/templates/resolveForwardDeliveryTemplate.js.map +1 -1
  84. package/lib/templates/resolveOrderConfirmationTemplate.d.ts +1 -1
  85. package/lib/templates/resolveOrderConfirmationTemplate.js +3 -3
  86. package/lib/templates/resolveOrderConfirmationTemplate.js.map +1 -1
  87. package/lib/templates/resolveOrderRejectionTemplate.d.ts +1 -1
  88. package/lib/templates/resolveQuotationStatusTemplate.d.ts +1 -1
  89. package/lib/templates/utils/getOrderAttachmentsData.d.ts +2 -2
  90. package/lib/templates/utils/getOrderPositionsData.d.ts +3 -3
  91. package/package.json +13 -13
  92. package/src/bulk-importer/createBulkImporter.ts +17 -6
  93. package/src/bulk-importer/handlers/assortment/create.ts +7 -7
  94. package/src/bulk-importer/handlers/assortment/index.ts +3 -3
  95. package/src/bulk-importer/handlers/assortment/remove.ts +1 -1
  96. package/src/bulk-importer/handlers/assortment/update.ts +7 -7
  97. package/src/bulk-importer/handlers/assortment/upsertAssortmentChildren.ts +3 -3
  98. package/src/bulk-importer/handlers/assortment/upsertAssortmentContent.ts +2 -2
  99. package/src/bulk-importer/handlers/assortment/upsertAssortmentFilters.ts +3 -3
  100. package/src/bulk-importer/handlers/assortment/upsertAssortmentProducts.ts +3 -3
  101. package/src/bulk-importer/handlers/assortment/upsertMedia.ts +3 -3
  102. package/src/bulk-importer/handlers/filter/create.ts +3 -3
  103. package/src/bulk-importer/handlers/filter/index.ts +3 -3
  104. package/src/bulk-importer/handlers/filter/remove.ts +1 -1
  105. package/src/bulk-importer/handlers/filter/update.ts +3 -3
  106. package/src/bulk-importer/handlers/filter/upsertFilterContent.ts +2 -2
  107. package/src/bulk-importer/handlers/filter/upsertFilterOptionContent.ts +2 -2
  108. package/src/bulk-importer/handlers/product/create.ts +5 -5
  109. package/src/bulk-importer/handlers/product/index.ts +3 -3
  110. package/src/bulk-importer/handlers/product/remove.ts +1 -1
  111. package/src/bulk-importer/handlers/product/transformSpecificationToProductStructure.ts +1 -1
  112. package/src/bulk-importer/handlers/product/update.ts +5 -5
  113. package/src/bulk-importer/handlers/product/upsertMedia.ts +4 -4
  114. package/src/bulk-importer/handlers/product/upsertProductContent.ts +2 -2
  115. package/src/bulk-importer/handlers/product/upsertVariations.ts +2 -2
  116. package/src/bulk-importer/upsertAsset.ts +2 -2
  117. package/src/context/index.ts +2 -2
  118. package/src/context/setAccessToken.ts +1 -1
  119. package/src/context/withAccessToken.ts +1 -1
  120. package/src/migrations/migrationRepository.ts +2 -2
  121. package/src/migrations/runMigrations.ts +2 -2
  122. package/src/platform-index.ts +2 -2
  123. package/src/setup/setupAccounts.ts +2 -2
  124. package/src/setup/setupCarts.ts +2 -2
  125. package/src/setup/setupTemplates.ts +7 -7
  126. package/src/setup/setupWorkqueue.ts +2 -2
  127. package/src/startPlatform.ts +11 -9
  128. package/src/templates/resolveAccountActionTemplate.ts +1 -1
  129. package/src/templates/resolveEnrollmentStatusTemplate.ts +1 -1
  130. package/src/templates/resolveForwardDeliveryTemplate.ts +3 -3
  131. package/src/templates/resolveOrderConfirmationTemplate.ts +4 -4
  132. package/src/templates/resolveOrderRejectionTemplate.ts +1 -1
  133. package/src/templates/resolveQuotationStatusTemplate.ts +1 -1
  134. package/src/templates/utils/getOrderAttachmentsData.ts +2 -2
  135. package/src/templates/utils/getOrderPositionsData.ts +3 -3
  136. package/tsconfig.json +4 -22
@@ -1,8 +1,8 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import upsertVariations from './upsertVariations';
3
- import upsertMedia from './upsertMedia';
4
- import upsertProductContent from './upsertProductContent';
5
- import transformSpecificationToProductStructure from './transformSpecificationToProductStructure';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import upsertVariations from './upsertVariations.js';
3
+ import upsertMedia from './upsertMedia.js';
4
+ import upsertProductContent from './upsertProductContent.js';
5
+ import transformSpecificationToProductStructure from './transformSpecificationToProductStructure.js';
6
6
 
7
7
  export default async function createProduct(payload: any, { logger }, unchainedAPI: UnchainedCore) {
8
8
  const { modules } = unchainedAPI;
@@ -1,7 +1,7 @@
1
- import { ProductMedia, ProductMediaText } from '@unchainedshop/types/products.media';
2
- import { UnchainedCore } from '@unchainedshop/types/core';
3
- import convertTagsToLowerCase from '../utils/convertTagsToLowerCase';
4
- import upsertAsset from '../../upsertAsset';
1
+ import { ProductMedia, ProductMediaText } from '@unchainedshop/types/products.media.js';
2
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
3
+ import convertTagsToLowerCase from '../utils/convertTagsToLowerCase.js';
4
+ import upsertAsset from '../../upsertAsset.js';
5
5
 
6
6
  const upsertProductMedia = async (productMedia: ProductMedia, { modules }: UnchainedCore) => {
7
7
  try {
@@ -1,5 +1,5 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import { ProductText } from '@unchainedshop/types/products';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import { ProductText } from '@unchainedshop/types/products.js';
3
3
 
4
4
  export default async function upsertProductContent({ productId, content }, { modules }: UnchainedCore) {
5
5
  await Promise.all(
@@ -1,5 +1,5 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import { ProductVariation, ProductVariationText } from '@unchainedshop/types/products.variations';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import { ProductVariation, ProductVariationText } from '@unchainedshop/types/products.variations.js';
3
3
 
4
4
  const upsert = async (productVariation: ProductVariation, unchainedAPI: UnchainedCore) => {
5
5
  const { modules } = unchainedAPI;
@@ -1,5 +1,5 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import { File } from '@unchainedshop/types/files';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import { File } from '@unchainedshop/types/files.js';
3
3
 
4
4
  const upsertAsset = async (
5
5
  directoryName: string,
@@ -1,2 +1,2 @@
1
- export { default as withAccessToken } from './withAccessToken';
2
- export { default as setAccessToken } from './setAccessToken';
1
+ export { default as withAccessToken } from './withAccessToken.js';
2
+ export { default as setAccessToken } from './setAccessToken.js';
@@ -1,4 +1,4 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
2
 
3
3
  export default async (unchainedAPI: UnchainedCore, username: string, secret: string): Promise<void> => {
4
4
  await unchainedAPI.modules.users.updateUser(
@@ -1,5 +1,5 @@
1
1
  import { createLogger } from '@unchainedshop/logger';
2
- import { Context } from '@unchainedshop/types/api';
2
+ import { Context } from '@unchainedshop/types/api.js';
3
3
 
4
4
  const logger = createLogger('unchained:platform');
5
5
 
@@ -1,5 +1,5 @@
1
- import { Migration, MigrationRepository } from '@unchainedshop/types/core';
2
- import { Db } from '@unchainedshop/types/common';
1
+ import { Migration, MigrationRepository } from '@unchainedshop/types/core.js';
2
+ import { Db } from '@unchainedshop/types/common.js';
3
3
 
4
4
  export const createMigrationRepository = (db: Db): MigrationRepository<Migration> => {
5
5
  const migrations = new Map();
@@ -1,7 +1,7 @@
1
- import { Migration, UnchainedCore, MigrationRepository } from '@unchainedshop/types/core';
1
+ import { Migration, UnchainedCore, MigrationRepository } from '@unchainedshop/types/core.js';
2
2
  import { createLogger } from '@unchainedshop/logger';
3
3
  import { generateDbFilterById } from '@unchainedshop/utils';
4
- import { createMigrationRunner } from './createMigrationRunner';
4
+ import { createMigrationRunner } from './createMigrationRunner.js';
5
5
 
6
6
  export const runMigrations = async ({
7
7
  migrationRepository,
@@ -1,7 +1,7 @@
1
1
  import { express } from '@unchainedshop/api';
2
2
 
3
- export * from './startPlatform';
4
- export * from './context';
3
+ export * from './startPlatform.js';
4
+ export * from './context/index.js';
5
5
 
6
6
  const connectPlatformToExpress4 = express.connect;
7
7
 
@@ -1,8 +1,8 @@
1
- import { User } from '@unchainedshop/types/user';
1
+ import { User } from '@unchainedshop/types/user.js';
2
2
  import { randomValueHex } from '@unchainedshop/utils';
3
3
  import { accountsSettings } from '@unchainedshop/core-accountsjs';
4
4
  import moniker from 'moniker';
5
- import { UnchainedCore } from '@unchainedshop/types/core';
5
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
6
6
 
7
7
  export const setupAccounts = (unchainedAPI: UnchainedCore) => {
8
8
  const accountsServer = unchainedAPI.modules.accounts.getAccountsServer();
@@ -1,5 +1,5 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import { SetupCartsOptions } from '@unchainedshop/types/platform';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import { SetupCartsOptions } from '@unchainedshop/types/platform.js';
3
3
 
4
4
  const { UNCHAINED_DISABLE_PROVIDER_INVALIDATION, UNCHAINED_ASSIGN_CART_FOR_USERS } = process.env;
5
5
 
@@ -1,11 +1,11 @@
1
- import { MessageTypes } from '@unchainedshop/types/platform';
1
+ import { MessageTypes } from '@unchainedshop/types/platform.js';
2
2
  import { MessagingDirector } from '@unchainedshop/core-messaging';
3
- import { resolveOrderRejectionTemplate } from '../templates/resolveOrderRejectionTemplate';
4
- import { resolveAccountActionTemplate } from '../templates/resolveAccountActionTemplate';
5
- import { resolveForwardDeliveryTemplate } from '../templates/resolveForwardDeliveryTemplate';
6
- import { resolveOrderConfirmationTemplate } from '../templates/resolveOrderConfirmationTemplate';
7
- import { resolveQuotationStatusTemplate } from '../templates/resolveQuotationStatusTemplate';
8
- import { resolveEnrollmentStatusTemplate } from '../templates/resolveEnrollmentStatusTemplate';
3
+ import { resolveOrderRejectionTemplate } from '../templates/resolveOrderRejectionTemplate.js';
4
+ import { resolveAccountActionTemplate } from '../templates/resolveAccountActionTemplate.js';
5
+ import { resolveForwardDeliveryTemplate } from '../templates/resolveForwardDeliveryTemplate.js';
6
+ import { resolveOrderConfirmationTemplate } from '../templates/resolveOrderConfirmationTemplate.js';
7
+ import { resolveQuotationStatusTemplate } from '../templates/resolveQuotationStatusTemplate.js';
8
+ import { resolveEnrollmentStatusTemplate } from '../templates/resolveEnrollmentStatusTemplate.js';
9
9
 
10
10
  export const setupTemplates = () => {
11
11
  MessagingDirector.registerTemplate(MessageTypes.ACCOUNT_ACTION, resolveAccountActionTemplate);
@@ -1,6 +1,6 @@
1
- import { SetupWorkqueueOptions } from '@unchainedshop/types/platform';
1
+ import { SetupWorkqueueOptions } from '@unchainedshop/types/platform.js';
2
2
  import { EventListenerWorker, FailedRescheduler, IntervalWorker } from '@unchainedshop/core-worker';
3
- import { UnchainedCore } from '@unchainedshop/types/core';
3
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
4
4
 
5
5
  export const setupWorkqueue = (
6
6
  unchainedAPI: UnchainedCore,
@@ -1,18 +1,18 @@
1
- import { SetupWorkqueueOptions, PlatformOptions, MessageTypes } from '@unchainedshop/types/platform';
1
+ import { SetupWorkqueueOptions, PlatformOptions, MessageTypes } from '@unchainedshop/types/platform.js';
2
2
  import { startAPIServer, roles } from '@unchainedshop/api';
3
3
  import { initCore } from '@unchainedshop/core';
4
4
  import { initDb } from '@unchainedshop/mongodb';
5
5
  import { createLogger } from '@unchainedshop/logger';
6
- import { UnchainedCore } from '@unchainedshop/types/core';
6
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
7
7
  import { getRegisteredEvents } from '@unchainedshop/events';
8
8
  import { WorkerDirector } from '@unchainedshop/core-worker';
9
- import { createBulkImporterFactory } from './bulk-importer/createBulkImporter';
10
- import { runMigrations } from './migrations/runMigrations';
11
- import { setupAccounts } from './setup/setupAccounts';
12
- import { setupCarts } from './setup/setupCarts';
13
- import { setupTemplates } from './setup/setupTemplates';
14
- import { setupWorkqueue } from './setup/setupWorkqueue';
15
- import { createMigrationRepository } from './migrations/migrationRepository';
9
+ import { createBulkImporterFactory } from './bulk-importer/createBulkImporter.js';
10
+ import { runMigrations } from './migrations/runMigrations.js';
11
+ import { setupAccounts } from './setup/setupAccounts.js';
12
+ import { setupCarts } from './setup/setupCarts.js';
13
+ import { setupTemplates } from './setup/setupTemplates.js';
14
+ import { setupWorkqueue } from './setup/setupWorkqueue.js';
15
+ import { createMigrationRepository } from './migrations/migrationRepository.js';
16
16
 
17
17
  export { MessageTypes };
18
18
 
@@ -43,6 +43,7 @@ export const startPlatform = async ({
43
43
  typeDefs = [],
44
44
  resolvers = [],
45
45
  options = {},
46
+ adminUiConfig = {},
46
47
  rolesOptions = {},
47
48
  bulkImporter: bulkImporterOptions,
48
49
  schema,
@@ -109,6 +110,7 @@ export const startPlatform = async ({
109
110
  playground,
110
111
  tracing,
111
112
  cacheControl,
113
+ adminUiConfig,
112
114
  });
113
115
 
114
116
  // Setup work queues for scheduled work
@@ -1,4 +1,4 @@
1
- import { TemplateResolver } from '@unchainedshop/types/messaging';
1
+ import { TemplateResolver } from '@unchainedshop/types/messaging.js';
2
2
 
3
3
  const { EMAIL_FROM, EMAIL_WEBSITE_URL, EMAIL_WEBSITE_NAME } = process.env;
4
4
 
@@ -1,4 +1,4 @@
1
- import { TemplateResolver } from '@unchainedshop/types/messaging';
1
+ import { TemplateResolver } from '@unchainedshop/types/messaging.js';
2
2
 
3
3
  const { EMAIL_FROM, EMAIL_WEBSITE_NAME, EMAIL_WEBSITE_URL } = process.env;
4
4
 
@@ -1,7 +1,7 @@
1
- import { TemplateResolver } from '@unchainedshop/types/messaging';
1
+ import { TemplateResolver } from '@unchainedshop/types/messaging.js';
2
2
  import { systemLocale } from '@unchainedshop/utils';
3
- import { getOrderAttachmentsData } from './utils/getOrderAttachmentsData';
4
- import { getOrderPositionsData } from './utils/getOrderPositionsData';
3
+ import { getOrderAttachmentsData } from './utils/getOrderAttachmentsData.js';
4
+ import { getOrderPositionsData } from './utils/getOrderPositionsData.js';
5
5
 
6
6
  const { EMAIL_FROM, EMAIL_WEBSITE_NAME, ROOT_URL } = process.env;
7
7
 
@@ -1,7 +1,7 @@
1
- import { TemplateResolver } from '@unchainedshop/types/messaging';
2
- import { OrderPricingRowCategory } from '@unchainedshop/types/orders.pricing';
3
- import { getOrderAttachmentsData } from './utils/getOrderAttachmentsData';
4
- import { getOrderPositionsData } from './utils/getOrderPositionsData';
1
+ import { TemplateResolver } from '@unchainedshop/types/messaging.js';
2
+ import { OrderPricingRowCategory } from '@unchainedshop/types/orders.pricing.js';
3
+ import { getOrderAttachmentsData } from './utils/getOrderAttachmentsData.js';
4
+ import { getOrderPositionsData } from './utils/getOrderPositionsData.js';
5
5
 
6
6
  const { EMAIL_FROM, EMAIL_WEBSITE_NAME, EMAIL_WEBSITE_URL } = process.env;
7
7
 
@@ -1,4 +1,4 @@
1
- import { TemplateResolver } from '@unchainedshop/types/messaging';
1
+ import { TemplateResolver } from '@unchainedshop/types/messaging.js';
2
2
 
3
3
  const { EMAIL_FROM, EMAIL_WEBSITE_NAME, EMAIL_WEBSITE_URL } = process.env;
4
4
 
@@ -1,4 +1,4 @@
1
- import { TemplateResolver } from '@unchainedshop/types/messaging';
1
+ import { TemplateResolver } from '@unchainedshop/types/messaging.js';
2
2
 
3
3
  const { EMAIL_FROM, EMAIL_WEBSITE_NAME, EMAIL_WEBSITE_URL } = process.env;
4
4
 
@@ -1,5 +1,5 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import { Order } from '@unchainedshop/types/orders';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import { Order } from '@unchainedshop/types/orders.js';
3
3
 
4
4
  export const getOrderAttachmentsData = async (
5
5
  order: Order,
@@ -1,6 +1,6 @@
1
- import { Locale } from '@unchainedshop/types/common';
2
- import { UnchainedCore } from '@unchainedshop/types/core';
3
- import { Order } from '@unchainedshop/types/orders';
1
+ import { Locale } from '@unchainedshop/types/common.js';
2
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
3
+ import { Order } from '@unchainedshop/types/orders.js';
4
4
 
5
5
  export const getOrderPositionsData = async (
6
6
  order: Order,
package/tsconfig.json CHANGED
@@ -1,29 +1,11 @@
1
1
  {
2
+ "extends": "../shared/base.tsconfig.json",
2
3
  "compilerOptions": {
3
- "allowJs": true,
4
- "allowSyntheticDefaultImports": true,
5
- "declaration": true,
6
- "esModuleInterop": true,
7
- "experimentalDecorators": true,
8
- "forceConsistentCasingInFileNames": true,
9
- "lib": [
10
- "esnext"
11
- ],
12
- "module": "esnext",
13
- "moduleResolution": "node",
14
- "noImplicitReturns": true,
15
- "noUnusedLocals": false,
4
+ "rootDir": "src",
16
5
  "outDir": "lib",
17
- "preserveWatchOutput": true,
18
- "skipLibCheck": true,
19
- "sourceMap": true,
20
- "target": "esnext",
21
- "types": [
22
- "node",
23
- "jest"
24
- ]
25
6
  },
7
+ "exclude": ["**/*.test.ts", "**/*.test.js", "tests"],
26
8
  "include": [
27
- "src"
9
+ "./src"
28
10
  ]
29
11
  }