diff --git a/src/cli/shared.ts b/src/cli/shared.ts index ef6fae1..3600d13 100644 --- a/src/cli/shared.ts +++ b/src/cli/shared.ts @@ -143,7 +143,7 @@ export class EdmInfo { new ImportDirectiveInfo( relative(dirname(filePath), getEndpointsPath(configuration)) .replace(/\\/g, '/') - .replace('.ts', ''), + .replace(/\.ts$/, '.js'), ['Endpoints'] ), ]; diff --git a/tests/data/double-quote/expected/entities/Company/Service.ts b/tests/data/double-quote/expected/entities/Company/Service.ts index ebd2f14..6557d70 100644 --- a/tests/data/double-quote/expected/entities/Company/Service.ts +++ b/tests/data/double-quote/expected/entities/Company/Service.ts @@ -10,7 +10,7 @@ import { } from "@netatwork/odata-edm-generator"; import { Endpoints, -} from "../../Endpoints"; +} from "../../Endpoints.js"; export class Bar { diff --git a/tests/data/indentsize-2/expected/entities/Company/Service.ts b/tests/data/indentsize-2/expected/entities/Company/Service.ts index 8d6e529..dfea835 100644 --- a/tests/data/indentsize-2/expected/entities/Company/Service.ts +++ b/tests/data/indentsize-2/expected/entities/Company/Service.ts @@ -10,7 +10,7 @@ import { } from '@netatwork/odata-edm-generator'; import { Endpoints, -} from '../../Endpoints'; +} from '../../Endpoints.js'; export class Bar { diff --git a/tests/data/indentsize-3-double-quote/expected/entities/Company/Service.ts b/tests/data/indentsize-3-double-quote/expected/entities/Company/Service.ts index 453ffb6..0868afe 100644 --- a/tests/data/indentsize-3-double-quote/expected/entities/Company/Service.ts +++ b/tests/data/indentsize-3-double-quote/expected/entities/Company/Service.ts @@ -10,7 +10,7 @@ import { } from "@netatwork/odata-edm-generator"; import { Endpoints, -} from "../../Endpoints"; +} from "../../Endpoints.js"; export class Bar { diff --git a/tests/data/longer-namespace/expected/entities/Company/Service/SubService/SubSubService.ts b/tests/data/longer-namespace/expected/entities/Company/Service/SubService/SubSubService.ts index 570bcfd..e43bb5c 100644 --- a/tests/data/longer-namespace/expected/entities/Company/Service/SubService/SubSubService.ts +++ b/tests/data/longer-namespace/expected/entities/Company/Service/SubService/SubSubService.ts @@ -10,7 +10,7 @@ import { } from '@netatwork/odata-edm-generator'; import { Endpoints, -} from '../../../../Endpoints'; +} from '../../../../Endpoints.js'; export class Bar { diff --git a/tests/data/metadata-with-endpoints/expected/entities/Company/Service.ts b/tests/data/metadata-with-endpoints/expected/entities/Company/Service.ts index 71d5844..062e7b0 100644 --- a/tests/data/metadata-with-endpoints/expected/entities/Company/Service.ts +++ b/tests/data/metadata-with-endpoints/expected/entities/Company/Service.ts @@ -10,7 +10,7 @@ import { } from '@netatwork/odata-edm-generator'; import { Endpoints, -} from '../../Endpoints'; +} from '../../Endpoints.js'; export class Bar { diff --git a/tests/data/multiple-endpoints/expected/bar/entities/Company/BarService.ts b/tests/data/multiple-endpoints/expected/bar/entities/Company/BarService.ts index 6331ef3..af7fd48 100644 --- a/tests/data/multiple-endpoints/expected/bar/entities/Company/BarService.ts +++ b/tests/data/multiple-endpoints/expected/bar/entities/Company/BarService.ts @@ -10,7 +10,7 @@ import { } from '@netatwork/odata-edm-generator'; import { Endpoints, -} from '../../Endpoints'; +} from '../../Endpoints.js'; @odataEndpoint(Endpoints.Bars) export class Bar { diff --git a/tests/data/multiple-endpoints/expected/foo/entities/Company/FooService.ts b/tests/data/multiple-endpoints/expected/foo/entities/Company/FooService.ts index e26c6bc..e9be405 100644 --- a/tests/data/multiple-endpoints/expected/foo/entities/Company/FooService.ts +++ b/tests/data/multiple-endpoints/expected/foo/entities/Company/FooService.ts @@ -10,7 +10,7 @@ import { } from '@netatwork/odata-edm-generator'; import { Endpoints, -} from '../../Endpoints'; +} from '../../Endpoints.js'; export class Base { diff --git a/tests/data/simple-single-class/expected/entities/Company/Service.ts b/tests/data/simple-single-class/expected/entities/Company/Service.ts index 7c79287..1c861c1 100644 --- a/tests/data/simple-single-class/expected/entities/Company/Service.ts +++ b/tests/data/simple-single-class/expected/entities/Company/Service.ts @@ -10,7 +10,7 @@ import { } from '@netatwork/odata-edm-generator'; import { Endpoints, -} from '../../Endpoints'; +} from '../../Endpoints.js'; export class Foo { diff --git a/tests/templates.spec.ts b/tests/templates.spec.ts index 8c749f8..6035cd6 100644 --- a/tests/templates.spec.ts +++ b/tests/templates.spec.ts @@ -151,7 +151,7 @@ import { } from '@netatwork/odata-edm-generator'; import { Endpoints, -} from '../../Endpoints'; +} from '../../Endpoints.js'; @odataEndpoint(Endpoints.foos) export class Foo {