@nestjs-ssr/react 0.1.3 → 0.1.5
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/{index-C7qZ7BPg.d.mts → index-Bptct1Q3.d.mts} +0 -1
- package/dist/{index-C7qZ7BPg.d.ts → index-Bptct1Q3.d.ts} +0 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -16
- package/dist/index.mjs.map +1 -1
- package/dist/render/index.d.mts +1 -1
- package/dist/render/index.d.ts +1 -1
- package/dist/render/index.js +2 -10
- package/dist/render/index.js.map +1 -1
- package/dist/render/index.mjs +3 -11
- package/dist/render/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -367,7 +367,6 @@ declare class RenderService {
|
|
|
367
367
|
private serverManifest;
|
|
368
368
|
private isDevelopment;
|
|
369
369
|
private ssrMode;
|
|
370
|
-
private readonly entryServerPath;
|
|
371
370
|
constructor(templateParser: TemplateParserService, streamingErrorHandler: StreamingErrorHandler, ssrMode?: SSRMode, defaultHead?: HeadData | undefined);
|
|
372
371
|
setViteServer(vite: ViteDevServer): void;
|
|
373
372
|
/**
|
|
@@ -367,7 +367,6 @@ declare class RenderService {
|
|
|
367
367
|
private serverManifest;
|
|
368
368
|
private isDevelopment;
|
|
369
369
|
private ssrMode;
|
|
370
|
-
private readonly entryServerPath;
|
|
371
370
|
constructor(templateParser: TemplateParserService, streamingErrorHandler: StreamingErrorHandler, ssrMode?: SSRMode, defaultHead?: HeadData | undefined);
|
|
372
371
|
setViteServer(vite: ViteDevServer): void;
|
|
373
372
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HeadData } from './index-
|
|
2
|
-
export { E as ErrorPageDevelopment, f as ErrorPageProduction, c as RenderConfig, b as RenderInterceptor, R as RenderModule, e as RenderResponse, a as RenderService, d as SSRMode, S as StreamingErrorHandler, T as TemplateParserService } from './index-
|
|
1
|
+
import { H as HeadData } from './index-Bptct1Q3.mjs';
|
|
2
|
+
export { E as ErrorPageDevelopment, f as ErrorPageProduction, c as RenderConfig, b as RenderInterceptor, R as RenderModule, e as RenderResponse, a as RenderService, d as SSRMode, S as StreamingErrorHandler, T as TemplateParserService } from './index-Bptct1Q3.mjs';
|
|
3
3
|
import * as _nestjs_common from '@nestjs/common';
|
|
4
4
|
export { viewRegistryPlugin } from './vite/index.mjs';
|
|
5
5
|
import 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HeadData } from './index-
|
|
2
|
-
export { E as ErrorPageDevelopment, f as ErrorPageProduction, c as RenderConfig, b as RenderInterceptor, R as RenderModule, e as RenderResponse, a as RenderService, d as SSRMode, S as StreamingErrorHandler, T as TemplateParserService } from './index-
|
|
1
|
+
import { H as HeadData } from './index-Bptct1Q3.js';
|
|
2
|
+
export { E as ErrorPageDevelopment, f as ErrorPageProduction, c as RenderConfig, b as RenderInterceptor, R as RenderModule, e as RenderResponse, a as RenderService, d as SSRMode, S as StreamingErrorHandler, T as TemplateParserService } from './index-Bptct1Q3.js';
|
|
3
3
|
import * as _nestjs_common from '@nestjs/common';
|
|
4
4
|
export { viewRegistryPlugin } from './vite/index.js';
|
|
5
5
|
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -453,20 +453,12 @@ exports.RenderService = class _RenderService {
|
|
|
453
453
|
serverManifest = null;
|
|
454
454
|
isDevelopment;
|
|
455
455
|
ssrMode;
|
|
456
|
-
entryServerPath;
|
|
457
456
|
constructor(templateParser, streamingErrorHandler, ssrMode, defaultHead) {
|
|
458
457
|
this.templateParser = templateParser;
|
|
459
458
|
this.streamingErrorHandler = streamingErrorHandler;
|
|
460
459
|
this.defaultHead = defaultHead;
|
|
461
460
|
this.isDevelopment = process.env.NODE_ENV !== "production";
|
|
462
461
|
this.ssrMode = ssrMode || process.env.SSR_MODE || "string";
|
|
463
|
-
const absoluteTemplatePath = path2.join(__dirname, "../templates/entry-server.tsx");
|
|
464
|
-
const relativeToApp = path2.relative(process.cwd(), absoluteTemplatePath);
|
|
465
|
-
if (relativeToApp.startsWith("..")) {
|
|
466
|
-
this.entryServerPath = absoluteTemplatePath;
|
|
467
|
-
} else {
|
|
468
|
-
this.entryServerPath = "/" + relativeToApp.replace(/\\/g, "/");
|
|
469
|
-
}
|
|
470
462
|
let templatePath;
|
|
471
463
|
if (this.isDevelopment) {
|
|
472
464
|
const packageTemplatePaths = [
|
|
@@ -562,7 +554,7 @@ exports.RenderService = class _RenderService {
|
|
|
562
554
|
}
|
|
563
555
|
let renderModule;
|
|
564
556
|
if (this.vite) {
|
|
565
|
-
renderModule = await this.vite.ssrLoadModule(
|
|
557
|
+
renderModule = await this.vite.ssrLoadModule("/src/entry-server.tsx");
|
|
566
558
|
} else {
|
|
567
559
|
if (this.serverManifest) {
|
|
568
560
|
const manifestEntry = Object.entries(this.serverManifest).find(([key, value]) => value.isEntry && key.includes("entry-server"));
|
|
@@ -646,7 +638,7 @@ exports.RenderService = class _RenderService {
|
|
|
646
638
|
const templateParts = this.templateParser.parseTemplate(template);
|
|
647
639
|
let renderModule;
|
|
648
640
|
if (this.vite) {
|
|
649
|
-
renderModule = await this.vite.ssrLoadModule(
|
|
641
|
+
renderModule = await this.vite.ssrLoadModule("/src/entry-server.tsx");
|
|
650
642
|
} else {
|
|
651
643
|
if (this.serverManifest) {
|
|
652
644
|
const manifestEntry = Object.entries(this.serverManifest).find(([key, value]) => value.isEntry && key.includes("entry-server"));
|
|
@@ -7127,10 +7119,10 @@ var Ignore = class {
|
|
|
7127
7119
|
ignored(p) {
|
|
7128
7120
|
const fullpath = p.fullpath();
|
|
7129
7121
|
const fullpaths = `${fullpath}/`;
|
|
7130
|
-
const
|
|
7131
|
-
const relatives = `${
|
|
7122
|
+
const relative = p.relative() || ".";
|
|
7123
|
+
const relatives = `${relative}/`;
|
|
7132
7124
|
for (const m of this.relative) {
|
|
7133
|
-
if (m.match(
|
|
7125
|
+
if (m.match(relative) || m.match(relatives)) return true;
|
|
7134
7126
|
}
|
|
7135
7127
|
for (const m of this.absolute) {
|
|
7136
7128
|
if (m.match(fullpath) || m.match(fullpaths)) return true;
|
|
@@ -7139,9 +7131,9 @@ var Ignore = class {
|
|
|
7139
7131
|
}
|
|
7140
7132
|
childrenIgnored(p) {
|
|
7141
7133
|
const fullpath = p.fullpath() + "/";
|
|
7142
|
-
const
|
|
7134
|
+
const relative = (p.relative() || ".") + "/";
|
|
7143
7135
|
for (const m of this.relativeChildren) {
|
|
7144
|
-
if (m.match(
|
|
7136
|
+
if (m.match(relative)) return true;
|
|
7145
7137
|
}
|
|
7146
7138
|
for (const m of this.absoluteChildren) {
|
|
7147
7139
|
if (m.match(fullpath)) return true;
|