Skip to content

Commit

Permalink
Replaced all ./utils paths with an alias
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofVDB1 committed Jan 18, 2024
1 parent dff5958 commit 67e54c2
Show file tree
Hide file tree
Showing 25 changed files with 65 additions and 46 deletions.
8 changes: 5 additions & 3 deletions packages/oslo-converter-stakeholders/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import 'reflect-metadata';
export * from './lib/config/StakeholdersConversionServiceConfiguration';
export * from './lib/StakeholdersConversionService';
export * from './lib/StakeholdersConversionServiceRunner';
import 'module-alias/register';

export * from '@oslo-converter-stakeholders/config/StakeholdersConversionServiceConfiguration';
export * from '@oslo-converter-stakeholders/StakeholdersConversionService';
export * from '@oslo-converter-stakeholders/StakeholdersConversionServiceRunner';
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { fetchFileOrUrl, Logger, ServiceIdentifier } from '@oslo-flanders/core';
import { parse } from 'csv-parse';
import { inject, injectable } from 'inversify';
import { StakeholdersConversionServiceConfiguration } from './config/StakeholdersConversionServiceConfiguration';
import { context } from './utils/JsonLdContext';
import { ToJsonLdTransformer } from './utils/ToJsonLdTransformer';
import { ContributorType } from '@oslo-converter-stakeholders/enums/ContributorType';
import { context } from '@oslo-converter-stakeholders/utils/JsonLdContext';
import { ToJsonLdTransformer } from '@oslo-converter-stakeholders/utils/ToJsonLdTransformer';

@injectable()
export class StakeholdersConversionService implements IService {
Expand Down
2 changes: 2 additions & 0 deletions packages/oslo-converter-uml-ea/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import 'reflect-metadata';
import 'module-alias/register';

export * from '@oslo-converter-uml-ea/ConverterHandlerService';
export * from '@oslo-converter-uml-ea/EaUmlConversionService';
export * from '@oslo-converter-uml-ea/EaUmlConversionServiceRunner';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
} from '@oslo-flanders/ea-uml-extractor';
import { inject, injectable } from 'inversify';
import { EaUmlConverterServiceIdentifier } from '../config/EaUmlConverterServiceIdentifier';
import { getTagValue, toCamelCase, toPascalCase } from '../utils/utils';
import { TagNames } from '@oslo-converter-uml-ea/enums/TagNames';
import type { IConnectorNormalisationCase } from '@oslo-converter-uml-ea/interfaces/IConnectorNormalisationCase';
import { getTagValue, toCamelCase, toPascalCase } from '@oslo-converter-uml-ea/utils/utils';

@injectable()
export class AssociationWithAssociationClassConnectorCase implements IConnectorNormalisationCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
} from '@oslo-flanders/ea-uml-extractor';
import { inject, injectable } from 'inversify';
import { EaUmlConverterServiceIdentifier } from '../config/EaUmlConverterServiceIdentifier';
import { getTagValue, toCamelCase, updateNameTag } from '../utils/utils';
import { TagNames } from '@oslo-converter-uml-ea/enums/TagNames';
import type { IConnectorNormalisationCase } from '@oslo-converter-uml-ea/interfaces/IConnectorNormalisationCase';
import { getTagValue, toCamelCase, updateNameTag } from '@oslo-converter-uml-ea/utils/utils';

@injectable()
export class AssociationWithDestinationRoleConnectorCase implements IConnectorNormalisationCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {
} from '@oslo-flanders/ea-uml-extractor';
import { inject, injectable } from 'inversify';
import { EaUmlConverterServiceIdentifier } from '../config/EaUmlConverterServiceIdentifier';
import { getTagValue, toCamelCase, toPascalCase, updateNameTag } from '../utils/utils';
import { TagNames } from '@oslo-converter-uml-ea/enums/TagNames';
import type { IConnectorNormalisationCase } from '@oslo-converter-uml-ea/interfaces/IConnectorNormalisationCase';
import { getTagValue, toCamelCase, toPascalCase, updateNameTag } from '@oslo-converter-uml-ea/utils/utils';

@injectable()
export class AssociationWithNameConnectorCase implements IConnectorNormalisationCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
} from '@oslo-flanders/ea-uml-extractor';
import { inject, injectable } from 'inversify';
import { EaUmlConverterServiceIdentifier } from '../config/EaUmlConverterServiceIdentifier';
import { getTagValue, toCamelCase, updateNameTag } from '../utils/utils';
import { TagNames } from '@oslo-converter-uml-ea/enums/TagNames';
import type { IConnectorNormalisationCase } from '@oslo-converter-uml-ea/interfaces/IConnectorNormalisationCase';
import { getTagValue, toCamelCase, updateNameTag } from '@oslo-converter-uml-ea/utils/utils';

@injectable()
export class AssocationWithSourceRoleConnectorCase implements IConnectorNormalisationCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {
} from '@oslo-flanders/ea-uml-extractor';
import { inject, injectable } from 'inversify';
import { EaUmlConverterServiceIdentifier } from '../config/EaUmlConverterServiceIdentifier';
import { getTagValue, toCamelCase, toPascalCase } from '../utils/utils';
import { TagNames } from '@oslo-converter-uml-ea/enums/TagNames';
import type { IConnectorNormalisationCase } from '@oslo-converter-uml-ea/interfaces/IConnectorNormalisationCase';
import { getTagValue, toCamelCase, toPascalCase } from '@oslo-converter-uml-ea/utils/utils';

@injectable()
export class SelfAssociationWithAssociationClassConnectorCase implements IConnectorNormalisationCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import {
} from '@oslo-flanders/ea-uml-extractor';
import { inject, injectable } from 'inversify';
import { EaUmlConverterServiceIdentifier } from '../config/EaUmlConverterServiceIdentifier';
import { TagNames } from '@oslo-converter-uml-ea/enums/TagNames';
import type { IConnectorNormalisationCase } from '@oslo-converter-uml-ea/interfaces/IConnectorNormalisationCase';
import {
getTagValue,
toCamelCase,
toPascalCase,
updateNameTag,
} from '../utils/utils';
import { TagNames } from '@oslo-converter-uml-ea/enums/TagNames';
import type { IConnectorNormalisationCase } from '@oslo-converter-uml-ea/interfaces/IConnectorNormalisationCase';
} from '@oslo-converter-uml-ea/utils/utils';

@injectable()
export class SelfAssociationWithNameConnectorCase implements IConnectorNormalisationCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import { inject, injectable } from 'inversify';
import { EaUmlConverterConfiguration } from '../config/EaUmlConverterConfiguration';
import { EaUmlConverterServiceIdentifier } from '../config/EaUmlConverterServiceIdentifier';
import type { UriRegistry } from '../UriRegistry';
import { getTagValue, ignore, toCamelCase } from '../utils/utils';
import { DataTypes, datatypeIdentifierToHash } from '@oslo-converter-uml-ea/enums/DataTypes';
import { TagNames } from '@oslo-converter-uml-ea/enums/TagNames';
import { ConverterHandler } from '@oslo-converter-uml-ea/interfaces/ConverterHandler';
import { getTagValue, ignore, toCamelCase } from '@oslo-converter-uml-ea/utils/utils';

@injectable()
export class AttributeConverterHandler extends ConverterHandler<EaAttribute> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import { inject, injectable } from 'inversify';
import { EaUmlConverterServiceIdentifier } from '../config/EaUmlConverterServiceIdentifier';
import { ConnectorNormalisationService } from '../ConnectorNormalisationService';
import type { UriRegistry } from '../UriRegistry';
import { getTagValue, ignore } from '../utils/utils';
import { TagNames } from '@oslo-converter-uml-ea/enums/TagNames';
import { ConverterHandler } from '@oslo-converter-uml-ea/interfaces/ConverterHandler';
import { getTagValue, ignore } from '@oslo-converter-uml-ea/utils/utils';

@injectable()
export class ConnectorConverterHandler extends ConverterHandler<NormalizedConnector> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { ConnectorType, ElementType } from '@oslo-flanders/ea-uml-extractor';
import type * as RDF from '@rdfjs/types';
import { injectable } from 'inversify';
import type { UriRegistry } from '../UriRegistry';
import { getTagValue, ignore, toPascalCase } from '../utils/utils';
import { TagNames } from '@oslo-converter-uml-ea/enums/TagNames';
import { ConverterHandler } from '@oslo-converter-uml-ea/interfaces/ConverterHandler';
import { getTagValue, ignore, toPascalCase } from '@oslo-converter-uml-ea/utils/utils';

@injectable()
export class ElementConverterHandler extends ConverterHandler<EaElement> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import type { DataRegistry, EaPackage } from '@oslo-flanders/ea-uml-extractor';
import type * as RDF from '@rdfjs/types';
import { injectable } from 'inversify';
import type { UriRegistry } from '../UriRegistry';
import { getTagValue, ignore } from '../utils/utils';
import { TagNames } from '@oslo-converter-uml-ea/enums/TagNames';
import { ConverterHandler } from '@oslo-converter-uml-ea/interfaces/ConverterHandler';
import { getTagValue, ignore } from '@oslo-converter-uml-ea/utils/utils';

@injectable()
export class PackageConverterHandler extends ConverterHandler<EaPackage> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { IOutputHandler, QuadStore } from '@oslo-flanders/core';
import { ns } from '@oslo-flanders/core';
import type * as RDF from '@rdfjs/types';
import { DataFactory } from 'rdf-data-factory';
import { getOsloContext } from '../utils/osloContext';
import { getOsloContext } from '@oslo-converter-uml-ea/utils/osloContext';

export class JsonLdOutputHandler implements IOutputHandler {
public async write(store: QuadStore, writeStream: any): Promise<void> {
Expand Down
4 changes: 2 additions & 2 deletions packages/oslo-core/lib/store/QuadStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type * as RDF from '@rdfjs/types';
import { injectable } from 'inversify';
import * as N3 from 'n3';
import rdfParser from 'rdf-parse';
import { fetchFileOrUrl } from '../utils/fetchFileOrUrl';
import { ns } from '../utils/namespaces';
import { fetchFileOrUrl } from '@oslo-core/utils/fetchFileOrUrl';
import { ns } from '@oslo-core/utils/namespaces';

@injectable()
export class QuadStore {
Expand Down
10 changes: 5 additions & 5 deletions packages/oslo-extractor-uml-ea/lib/DataRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import type { EaDiagram } from './types/EaDiagram';
import type { EaElement } from './types/EaElement';
import type { EaPackage } from './types/EaPackage';
import type { NormalizedConnector } from './types/NormalizedConnector';
import { loadAttributes } from './utils/loadAttributes';
import { loadDiagrams } from './utils/loadDiagrams';
import { loadElementConnectors } from './utils/loadElementConnectors';
import { loadElements } from './utils/loadElements';
import { loadPackages } from './utils/loadPackage';
import { loadAttributes } from '@oslo-extractor-uml-ea/utils/loadAttributes';
import { loadDiagrams } from '@oslo-extractor-uml-ea/utils/loadDiagrams';
import { loadElementConnectors } from '@oslo-extractor-uml-ea/utils/loadElementConnectors';
import { loadElements } from '@oslo-extractor-uml-ea/utils/loadElements';
import { loadPackages } from '@oslo-extractor-uml-ea/utils/loadPackage';

export class DataRegistry {
public readonly logger: Logger;
Expand Down
12 changes: 7 additions & 5 deletions packages/oslo-generator-jsonld-context/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'reflect-metadata';
export * from './lib/JsonldContextGenerationService';
export * from './lib/JsonldContextGenerationServiceRunner';
export * from './lib/config/DependencyInjectionConfig';
export * from './lib/config/JsonldContextGenerationServiceConfiguration';
export * from './lib/utils/utils';
import 'module-alias/register';

export * from '@oslo-generator-jsonld-context/JsonldContextGenerationService';
export * from '@oslo-generator-jsonld-context/JsonldContextGenerationServiceRunner';
export * from '@oslo-generator-jsonld-context/config/DependencyInjectionConfig';
export * from '@oslo-generator-jsonld-context/config/JsonldContextGenerationServiceConfiguration';
export * from '@oslo-generator-jsonld-context/utils/utils';
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Logger,
import type * as RDF from '@rdfjs/types';
import { inject, injectable } from 'inversify';
import { JsonldContextGenerationServiceConfiguration } from './config/JsonldContextGenerationServiceConfiguration';
import { alphabeticalSort, toCamelCase, toPascalCase } from './utils/utils';
import { alphabeticalSort, toCamelCase, toPascalCase } from '@oslo-generator-jsonld-context/utils/utils';

@injectable()
export class JsonldContextGenerationService implements IService {
Expand Down
3 changes: 3 additions & 0 deletions packages/oslo-generator-jsonld-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"homepage": "https://github.com/informatievlaanderen/OSLO-UML-Transformer/tree/main/packages/oslo-generator-jsonld-context#readme",
"license": "MIT",
"main": "index.js",
"_moduleAliases": {
"@oslo-generator-jsonld-context": "./lib"
},
"bin": {
"oslo-jsonld-context-generator": "./bin/runner.js"
},
Expand Down
10 changes: 6 additions & 4 deletions packages/oslo-generator-rdf-vocabulary/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'reflect-metadata';
export * from './lib/RdfVocabularyGenerationServiceRunner';
export * from './lib/RdfVocabularyGenerationService';
export * from './lib/config/DependencyInjectionConfig';
export * from './lib/config/RdfVocabularyGenerationServiceConfiguration';
import 'module-alias/register';

export * from '@oslo-generator-rdf-vocabulary/RdfVocabularyGenerationServiceRunner';
export * from '@oslo-generator-rdf-vocabulary/RdfVocabularyGenerationService';
export * from '@oslo-generator-rdf-vocabulary/config/DependencyInjectionConfig';
export * from '@oslo-generator-rdf-vocabulary/config/RdfVocabularyGenerationServiceConfiguration';
3 changes: 3 additions & 0 deletions packages/oslo-generator-rdf-vocabulary/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"homepage": "https://github.com/informatievlaanderen/OSLO-UML-Transformer/tree/main/packages/oslo-generator-rdf-vocabulary#readme",
"license": "MIT",
"main": "index.js",
"_moduleAliases": {
"@oslo-generator-rdf-vocabulary": "./lib"
},
"bin": {
"oslo-generator-rdf": "./bin/runner.js"
},
Expand Down
16 changes: 9 additions & 7 deletions packages/oslo-generator-respec-html/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
export * from './lib/HtmlRespecGenerationService';
export * from './lib/HtmlRespecGenerationServiceRunner';
export * from './lib/config/DependencyInjectionConfig';
export * from './lib/config/HtmlRespecGenerationServiceConfiguration';
export * from './lib/utils/scopeFilter';
export * from './lib/utils/alphabeticalSort';
export * from './lib/utils/specificationTypeEnum';
import 'module-alias/register';

export * from '@oslo-generator-respec-html/HtmlRespecGenerationService';
export * from '@oslo-generator-respec-html/HtmlRespecGenerationServiceRunner';
export * from '@oslo-generator-respec-html/config/DependencyInjectionConfig';
export * from '@oslo-generator-respec-html/config/HtmlRespecGenerationServiceConfiguration';
export * from '@oslo-generator-respec-html/utils/scopeFilter';
export * from '@oslo-generator-respec-html/utils/alphabeticalSort';
export * from '@oslo-generator-respec-html/utils/specificationTypeEnum';
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import type * as RDF from '@rdfjs/types';
import { inject, injectable } from 'inversify';
import * as nj from 'nunjucks';
import { HtmlRespecGenerationServiceConfiguration } from './config/HtmlRespecGenerationServiceConfiguration';
import { alphabeticalSort } from './utils/alphabeticalSort';
import { isInScope } from './utils/scopeFilter';
import { SpecificationType } from './utils/specificationTypeEnum';
import { alphabeticalSort } from '@oslo-generator-respec-html/utils/alphabeticalSort';
import { isInScope } from '@oslo-generator-respec-html/utils/scopeFilter';
import { SpecificationType } from '@oslo-generator-respec-html/utils/specificationTypeEnum';

@injectable()
export class HtmlRespecGenerationService implements IService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { IConfiguration, YargsParams } from '@oslo-flanders/core';
import { injectable } from 'inversify';
import { SpecificationType } from '../utils/specificationTypeEnum';
import { SpecificationType } from '@oslo-generator-respec-html/utils/specificationTypeEnum';

@injectable()
export class HtmlRespecGenerationServiceConfiguration implements IConfiguration {
Expand Down
3 changes: 3 additions & 0 deletions packages/oslo-generator-respec-html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"homepage": "https://github.com/informatievlaanderen/OSLO-UML-Transformer/tree/main/packages/oslo-generator-respec-html#readme",
"license": "MIT",
"main": "index.js",
"_moduleAliases": {
"@oslo-generator-respec-html": "./lib"
},
"bin": {
"oslo-generator-respec": "./bin/runner.js"
},
Expand Down

0 comments on commit 67e54c2

Please sign in to comment.