Skip to content

Commit 81a2681

Browse files
committed
feat: migrate printAddressInfos to printUrls
1 parent 56eaa66 commit 81a2681

File tree

10 files changed

+12
-14
lines changed

10 files changed

+12
-14
lines changed

integration/__fixtures__/server-express/express.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ app.use((_req, res, next) => {
1515

1616
app.use(gracile.nodeAdapter(handler));
1717

18-
const server = app.listen(9874, () =>
19-
gracile.printAddressInfos(server.address()),
20-
);
18+
const server = app.listen(9874, () => gracile.printUrls(server.address()));
2119

2220
export { server };

integration/__fixtures__/server-express/hono.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ app.use((c, next) => {
1919
app.use(gracile.honoAdapter(handler));
2020

2121
serve({ fetch: app.fetch, port: 9874, hostname: 'localhost' }, (address) =>
22-
gracile.printAddressInfos(address),
22+
gracile.printUrls(address),
2323
);

integration/src/exports.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ function checkEnv(input: typeof serverEnv) {
3838

3939
describe('gracile package should do its exports correctly', () => {
4040
test('node adapter', () => {
41-
assert.equal(typeof node.printAddressInfos, 'function');
41+
assert.equal(typeof node.printUrls, 'function');
4242
assert.equal(typeof node.getClientDistPath, 'function');
4343
assert.equal(typeof node.nodeAdapter, 'function');
4444
checkEnv(node);
4545
});
4646

4747
test('hono adapter', () => {
48-
assert.equal(typeof hono.printAddressInfos, 'function');
48+
assert.equal(typeof hono.printUrls, 'function');
4949
assert.equal(typeof hono.getClientDistPath, 'function');
5050
assert.equal(typeof hono.honoAdapter, 'function');
5151

packages/engine/src/server/adapters/hono.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ export function getClientDistPath(root: string) {
7171
);
7272
}
7373

74-
export { printAddressInfos } from '../utils.js';
74+
export { printUrls } from '../utils.js';

packages/engine/src/server/adapters/node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ export function getClientDistPath(root: string) {
123123
return fileURLToPath(new URL(server.CLIENT_DIST_DIR, root));
124124
}
125125

126-
export { printAddressInfos } from '../utils.js';
126+
export { printUrls } from '../utils.js';

packages/engine/src/server/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ import { server as serverConstants } from './constants.js';
2727
*
2828
* serve(
2929
* { fetch: app.fetch, port: 3030, hostname: 'localhost' },
30-
* (address) => gracile.printAddressInfos(address),
30+
* (address) => gracile.printUrls(address),
3131
* );
3232
* ```
3333
*/
34-
export function printAddressInfos(server: string | AddressInfo | null) {
34+
export function printUrls(server: string | AddressInfo | null) {
3535
let address: null | string = null;
3636
if (!server) throw new Error('Incorrect address infos');
3737
if (typeof server === 'string') {

packages/gracile/src/_typedoc-entrypoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export {
1010
// getClientDistPath,
1111
type GracileNodeHandler,
1212
nodeAdapter,
13-
printAddressInfos,
13+
printUrls,
1414
} from './node.js';
1515

1616
// export * from './hydration.js';

packages/gracile/src/hono.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export {
22
getClientDistPath,
33
type GracileHonoHandler,
44
honoAdapter,
5-
printAddressInfos,
5+
printUrls,
66
} from '@gracile/engine/server/adapters/hono';
77
export { server } from '@gracile/engine/server/constants';
88
export { env } from '@gracile/internal-utils/env';

packages/gracile/src/node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export {
22
getClientDistPath,
33
type GracileNodeHandler,
44
nodeAdapter,
5-
printAddressInfos,
5+
printUrls,
66
} from '@gracile/engine/server/adapters/node';
77
export { server } from '@gracile/engine/server/constants';
88
export { env } from '@gracile/internal-utils/env';

packages/server/src/document.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { html as LitHtml, LitElement } from 'lit';
1515
* import { pageAssetsCustomLocation } from '@gracile/gracile/document';
1616
* import { html } from '@gracile/gracile/server-html';
1717
*
18-
* export const document = (options: { url: URL; title?: string | null }) => html`
18+
* export const document = (_props) => html`
1919
* <!doctype html>
2020
* <html lang="en">
2121
* <head>

0 commit comments

Comments
 (0)