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

Bump http-proxy-middleware from 2.0.6 to 2.0.7 in /ui #801

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions cli/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
[subrepo]
remote = [email protected]:daisy/pipeline-cli-go.git
branch = master
commit = 080925324c4dbd37d141261f537bb2a5e6fadde3
parent = 0d87113b214274de885978a9efe04f6c878fa94c
commit = 9e483116d0ffc78d5bdeb73ca00918c1b0c00e14
parent = 7f81547a070c3fbfbc4bc2ba15c2a7196c396913
cmdver = 0.3.1
6 changes: 1 addition & 5 deletions cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.daisy.pipeline</groupId>
<artifactId>cli</artifactId>
<version>2.2.0</version>
<version>2.2.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>DAISY Pipeline 2 :: Command Line Interface</name>
<description>Command Line Interface for the DAISY Pipeline 2.</description>
Expand Down Expand Up @@ -101,8 +101,4 @@
</plugin>
</plugins>
</build>

<scm>
<tag>v2.2.0</tag>
</scm>
</project>
4 changes: 2 additions & 2 deletions framework/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
[subrepo]
remote = [email protected]:daisy/pipeline-framework.git
branch = master
commit = 1614556e78510068f584bba4ba44ef383007a117
parent = 3e05d8023a313a9082b95541ac98886b0e04d6da
commit = e9a0e7138b6a1e508fe0734413ab6b6136a0a3da
parent = 6ab8727d70af90110701604c630ed8e280a28b46
cmdver = 0.3.1
4 changes: 2 additions & 2 deletions framework/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<dependency>
<groupId>org.daisy.pipeline</groupId>
<artifactId>modules-registry</artifactId>
<version>4.1.2</version>
<version>5.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline</groupId>
Expand All @@ -80,7 +80,7 @@
<dependency>
<groupId>org.daisy.pipeline</groupId>
<artifactId>saxon-adapter</artifactId>
<version>5.0.0</version>
<version>5.5.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public static URI relativize(URI base, URI url) {
return base.relativize(url);
}

private static Map<String,Object> fsEnv = Collections.<String,Object>emptyMap();
private static final Map<String,Object> fsEnv = Collections.<String,Object>emptyMap();

/**
* @param resource The (not URL-encoded) path of a resource inside the specified JAR or class directory
Expand Down
14 changes: 7 additions & 7 deletions framework/modules-registry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>

<artifactId>modules-registry</artifactId>
<version>4.1.3-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
<packaging>bundle</packaging>

<name>DAISY Pipeline 2 :: Module Registry</name>
Expand All @@ -30,10 +30,10 @@
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<!-- for OSGIModuleBuilder -->
<!-- needed by DefaultModuleRegistry (VersionRange) regardless of whether we're in a OSGi
runtime or not, so scope needs to be 'compile', not 'provided' -->
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
Expand Down Expand Up @@ -71,8 +71,8 @@
<configuration>
<instructions>
<_dsannotations>
org.daisy.pipeline.modules.impl.resolver.ModuleUriResolver,
org.daisy.pipeline.modules.impl.tracker.DefaultModuleRegistry,
org.daisy.pipeline.modules.impl.ModuleUriResolver,
org.daisy.pipeline.modules.impl.DefaultModuleRegistry,
org.daisy.pipeline.xmlcatalog.impl.StaxXmlCatalogParser
</_dsannotations>
<Import-Package>!org.daisy.common.spi,*</Import-Package>
Expand All @@ -97,8 +97,8 @@
</goals>
<configuration>
<includes>
org.daisy.pipeline.modules.impl.resolver.ModuleUriResolver,
org.daisy.pipeline.modules.impl.tracker.DefaultModuleRegistry,
org.daisy.pipeline.modules.impl.ModuleUriResolver,
org.daisy.pipeline.modules.impl.DefaultModuleRegistry,
org.daisy.pipeline.xmlcatalog.impl.StaxXmlCatalogParser
</includes>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,35 @@

import java.net.URI;
import java.net.URL;
import java.nio.file.NoSuchFileException;

import org.daisy.common.file.URLs;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Module component now based on expath package components.
*/
public class Component {


public class Component implements Dependency {

/** The uri. */
private final Module module;
private final URI uri;

/** The path. */
private final String path;
// private Space space;
/** The loader. */
private final ResourceLoader loader;

/** The module. */
private Module module;

/** The m logger. */
Logger mLogger = LoggerFactory.getLogger(getClass().getName());
private final URL resource;
private final String version;

/**
* Instantiates a new component.
*
* @param uri
* the uri
* @param path
* the path
* @param loader
* the loader which actually able to load the resource.
*/
public Component(URI uri, String path, ResourceLoader loader) {
public Component(Module module, URI uri, String path) throws NoSuchFileException {
this.module = module;
this.uri = uri;
this.path = path;
this.loader = loader;
resource = module.getResource(path);
version = module.getVersion().replaceAll("-SNAPSHOT$", "");
}

public Component(Module module, URI uri, URL resource) {
this.module = module;
this.uri = uri;
this.resource = resource;
version = module.getVersion().replaceAll("-SNAPSHOT$", "");
}

/**
Expand All @@ -55,30 +42,30 @@ public URI getURI() {
return uri;
}

/*
* public Space getSpace() { return space; }
*/

/**
* Gets the resource's real uri.
*
* @return the resource
*/
public URI getResource() {
try {
return URLs.asURI(resource);
}

mLogger.trace("Getting resource from component " + this + ": " + path);
URL url= loader.loadResource(path);
if(url!=null) {
return URLs.asURI(url);
} else {
return null;
}
/**
* Get the version of this component.
*
* Defaults to the version number of the module. Method should be overridden by components that
* have their own versioning.
*/
public String getVersion() {
return version;
}

} catch (Exception e) {
mLogger.debug("Resource " + path + " does not exist", e);
return null;
}
/**
* Gets the module owner of this component.
*/
public Module getModule() {
return module;
}

/*
Expand All @@ -91,22 +78,28 @@ public String toString() {
return "[" + uri + "]";
}

/**
* Gets the module owner of this component.
*
* @return the module
*/
public Module getModule() {
return module;
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null)
return false;
if (!(o instanceof Component))
return false;
Component that = (Component)o;
if (!module.equals(that.module))
return false;
if (!uri.equals(that.uri))
return false;
return true;
}

/**
* Sets the module.
*
* @param module
* the new module
*/
public void setModule(Module module) {
this.module = module;
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + module.hashCode();
result = prime * result + uri.hashCode();
return result;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package org.daisy.pipeline.modules;

public interface Dependency {
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,34 @@

import java.net.URI;
import java.net.URL;
import java.nio.file.NoSuchFileException;

import org.daisy.common.file.URLs;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


// TODO: Auto-generated Javadoc
/**
* Entity represents a public id and its path inside the module. Only handles
* publicId as the privates one will be loaded as components.
*/
public class Entity {

/** The Public id. */
private final String mPublicId;

/** The Path. */
private final String mPath;
private final Module module;
private final String publicId;
private final URL resource;

/** The loader. */
private final ResourceLoader mLoader;

/** The module. */
private Module mModule;

private static Logger mLogger = LoggerFactory.getLogger(Entity.class);
/**
* Instantiates a new entity.
*
* @param publicId the public id
* @param path the path
* @param loader the loader
*/
public Entity(String publicId, String path, ResourceLoader loader) {
super();
mPublicId = publicId;
mPath = path;
mLoader = loader;
public Entity(Module module, String publicId, String path) throws NoSuchFileException {
this.module = module;
this.publicId = publicId;
resource = module.getResource(path);
}

/**
* Gets the module.
*
* @return the module
* Gets the module owner of this entity.
*/
public Module getModule() {
return mModule;
}

/**
* Sets the module.
*
* @param module the new module
*/
public void setModule(Module module) {
mModule = module;
return module;
}

/**
Expand All @@ -67,7 +38,7 @@ public void setModule(Module module) {
* @return the public id
*/
public String getPublicId() {
return mPublicId;
return publicId;
}

/**
Expand All @@ -76,30 +47,6 @@ public String getPublicId() {
* @return the path
*/
public URI getResource() {
try {

mLogger.trace("Getting resource from entity " + this + ": " + mPath);
URL url= mLoader.loadResource(mPath);
if(url!=null) {
return URLs.asURI(url);
} else {
return null;
}

} catch (Exception e) {
mLogger.debug("Resource " + mPath + " does not exist", e);
return null;
}
}

/**
* Gets the loader.
*
* @return the loader
*/
public ResourceLoader getLoader() {
return mLoader;
return URLs.asURI(resource);
}


}
Loading