@lwrjs/tools 0.15.0-alpha.11 → 0.15.0-alpha.13

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.
@@ -40,6 +40,11 @@ var import_build_server_plugin = __toModule(require("./plugins/build-server-plug
40
40
  var REQUEST_SCRIPT_NAME = "index.js";
41
41
  async function build(buildOptions, config) {
42
42
  const {outputDir, normalizedOutputDir, minify} = buildOptions;
43
+ const ssrMetaContent = {
44
+ minLwcVersion: import_config.MIN_LWC_VERSION,
45
+ minLwrVersion: import_config.MIN_LWR_VERSION
46
+ };
47
+ const ssrMetaJsonContent = JSON.stringify(ssrMetaContent);
43
48
  await import_esbuild.default.build({
44
49
  entryPoints: ["./lwr.entry.js"],
45
50
  bundle: true,
@@ -65,6 +70,7 @@ async function build(buildOptions, config) {
65
70
  outfile: import_path.default.join(normalizedOutputDir, "ssr.js")
66
71
  });
67
72
  await import_fs_extra.default.writeFile(import_path.default.join(normalizedOutputDir, REQUEST_SCRIPT_NAME), (0, import_request_script.getMainScriptContent)());
73
+ await import_fs_extra.default.writeFile(import_path.default.join(normalizedOutputDir, "ssr-meta.json"), ssrMetaJsonContent);
68
74
  }
69
75
  async function buildServer(configArg, options) {
70
76
  const startTime = import_perf_hooks.performance.now();
@@ -4,13 +4,18 @@ import esbuild from 'esbuild';
4
4
  import { performance } from 'perf_hooks';
5
5
  import { logger } from '@lwrjs/diagnostics';
6
6
  import { getFeatureFlags } from '@lwrjs/shared-utils';
7
- import { LWR_VERSION, LWC_VERSION, PWA_KIT_RUNTIME_VERSION } from '@lwrjs/config';
7
+ import { LWR_VERSION, LWC_VERSION, PWA_KIT_RUNTIME_VERSION, MIN_LWR_VERSION, MIN_LWC_VERSION, } from '@lwrjs/config';
8
8
  import { getMainScriptContent } from './util/request-script.js';
9
9
  import generateLwrEntry from './plugins/generate-entry-plugin.js';
10
10
  import buildLwrServer from './plugins/build-server-plugin.js';
11
11
  export const REQUEST_SCRIPT_NAME = 'index.js';
12
12
  async function build(buildOptions, config) {
13
13
  const { outputDir, normalizedOutputDir, minify } = buildOptions;
14
+ const ssrMetaContent = {
15
+ minLwcVersion: MIN_LWC_VERSION,
16
+ minLwrVersion: MIN_LWR_VERSION,
17
+ };
18
+ const ssrMetaJsonContent = JSON.stringify(ssrMetaContent);
14
19
  // building specifically for MRT/Lambda
15
20
  await esbuild.build({
16
21
  entryPoints: ['./lwr.entry.js'],
@@ -45,6 +50,7 @@ async function build(buildOptions, config) {
45
50
  });
46
51
  // Save the request script to the app folder
47
52
  await fs.writeFile(path.join(normalizedOutputDir, REQUEST_SCRIPT_NAME), getMainScriptContent());
53
+ await fs.writeFile(path.join(normalizedOutputDir, 'ssr-meta.json'), ssrMetaJsonContent);
48
54
  }
49
55
  /**
50
56
  * Resolve configurations, generate a server build module, and bundle
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.15.0-alpha.11",
7
+ "version": "0.15.0-alpha.13",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -34,16 +34,16 @@
34
34
  "package.cjs"
35
35
  ],
36
36
  "dependencies": {
37
- "@lwrjs/config": "0.15.0-alpha.11",
38
- "@lwrjs/core": "0.15.0-alpha.11",
39
- "@lwrjs/diagnostics": "0.15.0-alpha.11",
40
- "@lwrjs/shared-utils": "0.15.0-alpha.11",
41
- "@lwrjs/static": "0.15.0-alpha.11",
37
+ "@lwrjs/config": "0.15.0-alpha.13",
38
+ "@lwrjs/core": "0.15.0-alpha.13",
39
+ "@lwrjs/diagnostics": "0.15.0-alpha.13",
40
+ "@lwrjs/shared-utils": "0.15.0-alpha.13",
41
+ "@lwrjs/static": "0.15.0-alpha.13",
42
42
  "esbuild": "^0.17.4",
43
43
  "fs-extra": "^11.2.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@lwrjs/types": "0.15.0-alpha.11",
46
+ "@lwrjs/types": "0.15.0-alpha.13",
47
47
  "jest": "^26.6.3",
48
48
  "ts-jest": "^26.5.6"
49
49
  },
@@ -56,5 +56,5 @@
56
56
  "volta": {
57
57
  "extends": "../../../package.json"
58
58
  },
59
- "gitHead": "86f6f83ff30c750aab3b29448fa484d58918fb05"
59
+ "gitHead": "687327a328b33a1abc3ac45e1406d72ebe7d37b4"
60
60
  }