Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean-up old and out-dated code in td-tools package #565

Merged
merged 3 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { HttpServer } from "@node-wot/binding-http";
// consuming protocols
import { CoapClientFactory } from "@node-wot/binding-coap";
import { FileClientFactory } from "@node-wot/binding-file";
import { TDRepository } from "@node-wot/td-tools";

let servient = new Servient();

Expand Down
37 changes: 0 additions & 37 deletions packages/td-tools/src/td-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,43 +23,6 @@

import ThingDescription from "./thing-description";

/**
* Find interaction by name
* @param td ThingDescription instance that keeps the interactions
* @param name of the interaction which is searched for
*/
/*
export function findInteractionByName(td: ThingDescription, name: string) {
let res = td.interaction.filter((ia) => ia.name === name)
return (res.length > 0) ? res[0] : null;
}
*/

/**
* Find interaction by name AND interaction type
* @param td ThingDescription instance that keeps the interactions
* @param name of the interaction which is searched for
*/
/*
export function findInteractionByNameType(td: ThingDescription, name: string, pattern: TD.InteractionPattern) {
let res = td.interaction.filter((ia) => ia.pattern === pattern && ia.name === name)
return (res.length > 0) ? res[0] : null;
}
*/

/**
* Find interaction by semantic characteristics / vocabularies
* @param td ThingDescription instance that keeps the interactions
* @param vocabularies list of vocabularies which has to be annotated the resource interacion
*/
/*
export function findInteractionBySemantics(td: ThingDescription, vocabularies: Array<string>) {
// let res = td.interactions.filter((ia) => ia.rdfType.filter((v)=> v.match(vocabularies)))
// TODO
return '';
}
*/

// need two tests
export function findProtocol(td: ThingDescription): string {
const base: string = td.base;
Expand Down
67 changes: 0 additions & 67 deletions packages/td-tools/src/td-repository.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/td-tools/src/td-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@
import Thing from "./thing-description";

export { default as Thing } from "./thing-description";
export { default as TDRepository } from "./td-repository";
export * from "./thing-description";
export * from "./td-parser";
export * from "./td-helpers";
export * from "./td-transformer";
type DeepPartial<T> = T extends Record<string, unknown>
? {
[P in keyof T]?: T[P] extends Array<infer I> ? Array<DeepPartial<I>> : DeepPartial<T[P]>;
Expand Down
247 changes: 0 additions & 247 deletions packages/td-tools/src/td-transformer.ts

This file was deleted.

Loading