Skip to content

Commit

Permalink
Add sitemap builder
Browse files Browse the repository at this point in the history
  • Loading branch information
samchon committed Sep 4, 2024
1 parent de6c07f commit 73a755c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 18 deletions.
43 changes: 27 additions & 16 deletions src/components/Invoke.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
/**
* Message structure for RFC (Remote Function Call).
* Message structure for RPC (Remote Procedure Call).
*
* @author Jeongho Nam - https://github.com/samchon
*/
export type Invoke = Invoke.IFunction | Invoke.IReturn;

export namespace Invoke {
/**
* Message for Requesting RFC.
* Message for Requesting RPC.
*/
export interface IFunction extends IBase {
export interface IFunction {
/**
* Unique identifier.
*/
uid: number;

/**
* Target function (sometimes calsuled in objects) to call.
*/
Expand All @@ -20,34 +25,40 @@ export namespace Invoke {
*/
parameters: IParameter[];
}

export interface IParameter {
type: string;
value: any;
}

/**
* Message for Returning RFC.
* Parameter for the function call.
*/
export interface IReturn extends IBase {
export interface IParameter {
/**
* `true` -> return, `false` -> exception.
* Type of the {@link value}.
*
* Actually, it stores result of the `typeof` statement.
*/
success: boolean;
type: string;

/**
* Returned value or thrown exception.
* Value of the parameter.
*/
value: any;
}

/**
* @hiden
* Message for Returning RPC.
*/
interface IBase {
export interface IReturn {
/**
* Unique identifier.
*/
uid: number;

/**
* `true` -> return, `false` -> exception.
*/
success: boolean;

/**
* Returned value or thrown exception.
*/
value: any;
}
}
11 changes: 11 additions & 0 deletions website/build/deploy.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
const cp = require("child_process");
const fs = require("fs");
const deploy = require("gh-pages");

cp.execSync("npm run build", { stdio: "inherit" });

for (const file of fs.readdirSync(`${__dirname}/../public`))
if (
file === "robots.txt" ||
(file.startsWith("sitemap") && file.endsWith(".xml"))
)
fs.copyFileSync(
`${__dirname}/../public/${file}`,
`${__dirname}/../out/${file}`,
);

deploy.publish(
"out",
{
Expand Down
4 changes: 2 additions & 2 deletions website/pages/docs/features/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ Header value delivered after the connection.
Server can get the `Header` value through acceptor's `header` property.

- [`WebSocketAcceptor.header`](/api/classes/WebSocketAcceptor-1.html#header-1)
- [`WorkerServer.getHeader()`](http://127.0.0.1:3000/api/classes/WorkerServer-1.html#getHeader)
- [`SharedWorkerSever.header`](http://127.0.0.1:3000/api/classes/SharedWorkerAcceptor-1.html#header-1)
- [`SharedWorkerAcceptor.header`](/api/classes/SharedWorkerAcceptor-1.html#header-1)
- [`WorkerServer.getHeader()`](/api/classes/WorkerServer-1.html#getHeader)



Expand Down

0 comments on commit 73a755c

Please sign in to comment.