Skip to content

Commit

Permalink
Rename Hilla package and update deps (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
heruan authored Feb 21, 2024
1 parent a209536 commit 2f72bc5
Show file tree
Hide file tree
Showing 47 changed files with 10,797 additions and 3,627 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"npmClient": "npm",
"useWorkspaces": true,
"useNx": true,
"version": "2.2.1"
"version": "3.0.0"
}
2 changes: 1 addition & 1 deletion observability-kit-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dev.hilla</groupId>
<groupId>com.vaadin.hilla</groupId>
<artifactId>endpoint</artifactId>
<version>${hilla.version}</version>
<scope>provided</scope>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ private Stream<TypeInstrumentation> clientInstrumentation() {
}

private Stream<TypeInstrumentation> hillaInstrumentation() {
if (classExists("dev.hilla.Endpoint")) {
if (classExists("com.vaadin.hilla.Endpoint")) {
return Stream.of(new PushMessageHandlerInstrumentation(),
new EndpointInvokerInstrumentation(),
new EndpointRegistryInstrumentation());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import net.bytebuddy.matcher.ElementMatcher;

public class HillaClientInstrumentation implements TypeInstrumentation {
private static final String targetClassName = "dev.hilla.observability.ObservabilityEndpoint";
private static final String targetClassName = "com.vaadin.hilla.observability.ObservabilityEndpoint";

@Override
public ElementMatcher<ClassLoader> classLoaderOptimization() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
public class EndpointInvokerInstrumentation implements TypeInstrumentation {
@Override
public ElementMatcher<ClassLoader> classLoaderOptimization() {
return hasClassesNamed("dev.hilla.EndpointInvoker");
return hasClassesNamed("com.vaadin.hilla.EndpointInvoker");
}

@Override
public ElementMatcher<TypeDescription> typeMatcher() {
return named("dev.hilla.EndpointInvoker");
return named("com.vaadin.hilla.EndpointInvoker");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
public class EndpointRegistryInstrumentation implements TypeInstrumentation {
@Override
public ElementMatcher<ClassLoader> classLoaderOptimization() {
return hasClassesNamed("dev.hilla.EndpointRegistry");
return hasClassesNamed("com.vaadin.hilla.EndpointRegistry");
}

@Override
public ElementMatcher<TypeDescription> typeMatcher() {
return named("dev.hilla.EndpointRegistry");
return named("com.vaadin.hilla.EndpointRegistry");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
package com.vaadin.extension.instrumentation.hilla;

import dev.hilla.push.messages.fromclient.SubscribeMessage;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.context.Context;
import io.opentelemetry.context.Scope;
Expand All @@ -22,6 +21,7 @@
import com.vaadin.extension.InstrumentationHelper;
import com.vaadin.extension.conf.Configuration;
import com.vaadin.extension.conf.TraceLevel;
import com.vaadin.hilla.push.messages.fromclient.SubscribeMessage;

import static io.opentelemetry.javaagent.bootstrap.Java8BytecodeBridge.currentContext;
import static io.opentelemetry.javaagent.extension.matcher.AgentElementMatchers.hasClassesNamed;
Expand All @@ -30,12 +30,12 @@
public class PushMessageHandlerInstrumentation implements TypeInstrumentation {
@Override
public ElementMatcher<ClassLoader> classLoaderOptimization() {
return hasClassesNamed("dev.hilla.push.PushMessageHandler");
return hasClassesNamed("com.vaadin.hilla.push.PushMessageHandler");
}

@Override
public ElementMatcher<TypeDescription> typeMatcher() {
return named("dev.hilla.push.PushMessageHandler");
return named("com.vaadin.hilla.push.PushMessageHandler");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

public class HillaClientInstrumentationTest
extends AbstractTypeInstrumentationTest {
private static final String targetClassName = "dev.hilla.observability.ObservabilityEndpoint";
private static final String targetClassName = "com.vaadin.hilla.observability.ObservabilityEndpoint";
private HillaClientInstrumentation instrumentation;

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import static org.mockito.Mockito.verify;

public class EndpointInvokerInstrumentationTest extends AbstractTypeInstrumentationTest {
private static final String patchedClassName = "dev.hilla.EndpointInvoker";
private static final String patchedClassName = "com.vaadin.hilla.EndpointInvoker";
private static final String patchedMethodName = "invokeVaadinEndpointMethod";
private EndpointInvokerInstrumentation instrumentation;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import static org.mockito.Mockito.verify;

public class EndpointRegistryInstrumentationTest extends AbstractTypeInstrumentationTest {
private static final String patchedClassName = "dev.hilla.EndpointRegistry";
private static final String patchedClassName = "com.vaadin.hilla.EndpointRegistry";
private static final String patchedMethodName = "registerEndpoint";
private EndpointRegistryInstrumentation instrumentation;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import static org.mockito.Mockito.verify;

public class PushMethodHandlerInstrumentationTest extends AbstractTypeInstrumentationTest {
private static final String patchedClassName = "dev.hilla.push.PushMessageHandler";
private static final String patchedClassName = "com.vaadin.hilla.push.PushMessageHandler";
private static final String patchedMethodName = "handleBrowserSubscribe";
private PushMessageHandlerInstrumentation instrumentation;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { html, type TemplateResult } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import styles from './auth-button.css';
import { Layout } from 'Frontend/views/view.js';
import styles from './auth-button.css?inline';
import { Layout } from 'Frontend/views/view';

@customElement('auth-button')
export default class AuthButton extends Layout {
Expand Down
4 changes: 2 additions & 2 deletions observability-kit-demo-hilla/frontend/connect-client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type MiddlewareContext, type MiddlewareNext, ConnectClient } from '@hilla/frontend';
import { logout } from 'Frontend/stores/login-store.js';
import { type MiddlewareContext, type MiddlewareNext, ConnectClient } from '@vaadin/hilla-frontend';
import { logout } from 'Frontend/stores/login-store';

const client = new ConnectClient({
middlewares: [
Expand Down
8 changes: 4 additions & 4 deletions observability-kit-demo-hilla/frontend/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Router } from '@vaadin/router';
import { ObservabilityEndpoint } from 'Frontend/generated/endpoints.js';
import { routes } from './routes.js';
import { appName, location, setLocation } from './stores/location-store.js';
import { initTelemetry } from 'Frontend/utils/telemetry.js';
import { ObservabilityEndpoint } from 'Frontend/generated/endpoints';
import { routes } from './routes';
import { appName, location, setLocation } from './stores/location-store';
import { init as initTelemetry } from '@vaadin/observability-kit-client';

initTelemetry(ObservabilityEndpoint.export, {
serviceName: 'hilla',
Expand Down
10 changes: 5 additions & 5 deletions observability-kit-demo-hilla/frontend/routes.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Route, Router } from '@vaadin/router';
import './views/helloworld/hello-world-view.js';
import './views/main-layout.js';
import './views/login-view.ts';
import './views/image-list/image-list-view.js';
import { user, login, logout, doesUserHaveRole } from 'Frontend/stores/login-store.js';
import './views/helloworld/hello-world-view';
import './views/main-layout';
import './views/login-view';
import './views/image-list/image-list-view';
import { user, logout, doesUserHaveRole } from 'Frontend/stores/login-store';

export type ViewRoute = Route & {
children?: ViewRoute[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { signal } from '@preact/signals-core';
import type { RouterLocation } from '@vaadin/router';
import type { ViewRoute } from 'Frontend/routes.js';
import type { ViewRoute } from 'Frontend/routes';

export const appName = 'observability-kit-hilla-demo';

Expand Down
6 changes: 3 additions & 3 deletions observability-kit-demo-hilla/frontend/stores/login-store.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { login as serverLogin, logout as serverLogout } from '@hilla/frontend';
import { login as serverLogin, logout as serverLogout } from '@vaadin/hilla-frontend';
import { effect, signal } from '@preact/signals-core';
import { Router } from '@vaadin/router';
import { UserEndpoint } from 'Frontend/generated/endpoints.js';
import type UserDetails from 'Frontend/generated/org/springframework/security/core/userdetails/UserDetails.js';
import { UserEndpoint } from 'Frontend/generated/endpoints';
import type UserDetails from 'Frontend/generated/org/springframework/security/core/userdetails/UserDetails';

export const user = signal<UserDetails | undefined>(undefined);

Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 2f72bc5

Please sign in to comment.