slicejs-web-framework 3.5.1 → 3.5.3

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.
@@ -150,7 +150,14 @@ export function createSliceServer(options = {}) {
150
150
 
151
151
  if (runMode === 'production') {
152
152
  app.get('/Slice/Slice.js', (req, res) => {
153
- const slicePath = path.join(projectRoot, 'node_modules', 'slicejs-web-framework', 'Slice', 'Slice.js');
153
+ // Prefer the self-contained copy emitted into dist by `slice build`: it is
154
+ // the only location guaranteed to ship inside a serverless function (Vercel
155
+ // bundles dist/** via includeFiles, but prunes node_modules that aren't
156
+ // statically imported — and under pnpm the package sits behind a symlink).
157
+ // Fall back to node_modules for non-serverless production (`slice start`).
158
+ const distSlice = path.join(projectRoot, folderDeployed, 'Slice', 'Slice.js');
159
+ const nodeModulesSlice = path.join(projectRoot, 'node_modules', 'slicejs-web-framework', 'Slice', 'Slice.js');
160
+ const slicePath = fs.existsSync(distSlice) ? distSlice : nodeModulesSlice;
154
161
  try {
155
162
  if (fs.existsSync(slicePath)) {
156
163
  res.setHeader('Content-Type', 'application/javascript; charset=utf-8');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slicejs-web-framework",
3
- "version": "3.5.1",
3
+ "version": "3.5.3",
4
4
  "description": "",
5
5
  "engines": {
6
6
  "node": ">=20"
@@ -9,6 +9,7 @@
9
9
  <meta name="author" content="vkneider.dev" />
10
10
  <link rel="canonical" href="https://slicejs.com" />
11
11
  <link rel="icon" type="image/x-icon" href="/images/favicon.ico" />
12
+ <link rel="apple-touch-icon" href="/images/og-image.png" />
12
13
  <link rel="manifest" href="/manifest.json" />
13
14
  <meta name="theme-color" content="#F8F4FF" />
14
15
  <meta name="color-scheme" content="light dark" />
@@ -33,9 +34,31 @@
33
34
  "@type": "Organization",
34
35
  "name": "VKneider",
35
36
  "url": "https://github.com/VKneider"
37
+ },
38
+ "potentialAction": {
39
+ "@type": "SearchAction",
40
+ "target": {
41
+ "@type": "EntryPoint",
42
+ "urlTemplate": "https://slicejs.com/?q={search_term_string}"
43
+ },
44
+ "query-input": "required name=search_term_string"
36
45
  }
37
46
  }
38
47
  </script>
48
+ <script type="application/ld+json">
49
+ {
50
+ "@context": "https://schema.org",
51
+ "@type": "BreadcrumbList",
52
+ "itemListElement": [
53
+ {
54
+ "@type": "ListItem",
55
+ "position": 1,
56
+ "name": "Home",
57
+ "item": "https://slicejs.com/"
58
+ }
59
+ ]
60
+ }
61
+ </script>
39
62
  </head>
40
63
 
41
64
  <body>