@taujs/server 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/build.d.ts CHANGED
@@ -5,8 +5,8 @@ type Config = {
5
5
  entryPoint: string;
6
6
  plugins?: PluginOption[];
7
7
  };
8
- declare function taujsBuild({ config, projectRoot, clientBaseDir, isSSRBuild, }: {
9
- config: Config[];
8
+ declare function taujsBuild({ configs, projectRoot, clientBaseDir, isSSRBuild, }: {
9
+ configs: Config[];
10
10
  projectRoot: string;
11
11
  clientBaseDir: string;
12
12
  isSSRBuild?: boolean;
package/dist/build.js CHANGED
@@ -589,7 +589,7 @@ var SSRServer = (0, import_fastify_plugin.default)(
589
589
 
590
590
  // src/build.ts
591
591
  async function taujsBuild({
592
- config,
592
+ configs,
593
593
  projectRoot,
594
594
  clientBaseDir,
595
595
  isSSRBuild = process.env.BUILD_MODE === "ssr"
@@ -603,10 +603,10 @@ async function taujsBuild({
603
603
  console.error("Error deleting dist directory:", err);
604
604
  }
605
605
  };
606
- const processedConfigs = processConfigs(config, clientBaseDir, TEMPLATE);
606
+ const processedConfigs = processConfigs(configs, clientBaseDir, TEMPLATE);
607
607
  if (!isSSRBuild) await deleteDist();
608
- for (const config2 of processedConfigs) {
609
- const { appId, entryPoint, clientRoot, entryClient, entryServer, htmlTemplate, plugins = [] } = config2;
608
+ for (const config of processedConfigs) {
609
+ const { appId, entryPoint, clientRoot, entryClient, entryServer, htmlTemplate, plugins = [] } = config;
610
610
  const outDir = path3.resolve(projectRoot, `dist/client/${entryPoint}`);
611
611
  const root = entryPoint ? path3.resolve(clientBaseDir, entryPoint) : clientBaseDir;
612
612
  const server = path3.resolve(clientRoot, `${entryServer}.tsx`);
@@ -632,7 +632,7 @@ async function taujsBuild({
632
632
  scss: { api: "modern-compiler" }
633
633
  }
634
634
  },
635
- plugins: [...config2.plugins ?? [], nodePolyfills({ include: ["fs", "stream"] })],
635
+ plugins: [...config.plugins ?? [], nodePolyfills({ include: ["fs", "stream"] })],
636
636
  publicDir: "public",
637
637
  resolve: {
638
638
  alias: {
package/dist/index.d.ts CHANGED
@@ -47,11 +47,9 @@ type SSRServerOptions = {
47
47
  serviceRegistry: ServiceRegistry;
48
48
  isDebug?: boolean;
49
49
  };
50
- type ServiceRegistry = {
51
- [serviceName: string]: {
52
- [methodName: string]: (params: Record<string, unknown>) => Promise<Record<string, unknown>>;
53
- };
54
- };
50
+ type ServiceMethod = (params: Record<string, unknown>) => Promise<Record<string, unknown>>;
51
+ type NamedService = Record<string, ServiceMethod>;
52
+ type ServiceRegistry = Record<string, NamedService>;
55
53
  type RenderCallbacks = {
56
54
  onHead: (headContent: string) => void;
57
55
  onFinish: (initialDataResolved: unknown) => void;
@@ -112,4 +110,4 @@ interface InitialRouteParams extends Record<string, unknown> {
112
110
  type RouteParams = InitialRouteParams & Record<string, unknown>;
113
111
  type RoutePathsAndAttributes<Params = {}> = Omit<Route<Params>, 'element'>;
114
112
 
115
- export { type Config, type FetchConfig, type InitialRouteParams, type Manifest, type ManifestEntry, type ProcessedConfig, type RenderCallbacks, type RenderModule, type RenderSSR, type RenderStream, type Route, type RouteAttributes, type RouteParams, type RoutePathsAndAttributes, type SSRManifest, SSRServer, type SSRServerOptions, type ServiceRegistry, TEMPLATE, createMaps, processConfigs };
113
+ export { type Config, type FetchConfig, type InitialRouteParams, type Manifest, type ManifestEntry, type NamedService, type ProcessedConfig, type RenderCallbacks, type RenderModule, type RenderSSR, type RenderStream, type Route, type RouteAttributes, type RouteParams, type RoutePathsAndAttributes, type SSRManifest, SSRServer, type SSRServerOptions, type ServiceMethod, type ServiceRegistry, TEMPLATE, createMaps, processConfigs };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taujs/server",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "taujs | τjs",
5
5
  "author": "Aoede <taujs@aoede.uk.net> (https://www.aoede.uk.net)",
6
6
  "license": "MIT",