@bagelink/blox 1.16.2 → 1.17.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Bagel Studio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -2,7 +2,7 @@ import { spawn } from "node:child_process";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
4
  import process from "node:process";
5
- import { f as fetchCmsSiteData, g as generateSitemapArtifacts } from "./validate-output-YSSzQSKE.js";
5
+ import { f as fetchCmsSiteData, g as generateSitemapArtifacts } from "./validate-output-D2bGF0xH.js";
6
6
  const AUTO_SHARD_CAP = Number(process.env.BLOX_SSG_SHARD_CAP) || 6;
7
7
  const PREFETCH_BUDGET = Number(process.env.BLOX_SSG_PREFETCH_BUDGET) || 24;
8
8
  const SEQUENTIAL_SHARDS = process.env.BLOX_SSG_SEQUENTIAL === "1";
@@ -142,7 +142,7 @@ async function runSharded(opts) {
142
142
  }
143
143
  if (process.env.BLOX_SSG_LLM !== "0") {
144
144
  try {
145
- const { mergeLlmParts } = await import("./validate-output-YSSzQSKE.js").then((n) => n.C);
145
+ const { mergeLlmParts } = await import("./validate-output-D2bGF0xH.js").then((n) => n.C);
146
146
  const mergeWebsite = website;
147
147
  const partFiles = Array.from({ length: total }, (_, i) => path.join(llmPartsDir, `part.${i}.json`));
148
148
  const { pages } = await mergeLlmParts({
@@ -26,7 +26,7 @@ const node_child_process = require("node:child_process");
26
26
  const os = require("node:os");
27
27
  const path = require("node:path");
28
28
  const process = require("node:process");
29
- const llmArtifacts = require("./validate-output-B7bEilEz.cjs");
29
+ const llmArtifacts = require("./validate-output-C-EqAsnA.cjs");
30
30
  const AUTO_SHARD_CAP = Number(process.env.BLOX_SSG_SHARD_CAP) || 6;
31
31
  const PREFETCH_BUDGET = Number(process.env.BLOX_SSG_PREFETCH_BUDGET) || 24;
32
32
  const SEQUENTIAL_SHARDS = process.env.BLOX_SSG_SEQUENTIAL === "1";
@@ -166,7 +166,7 @@ async function runSharded(opts) {
166
166
  }
167
167
  if (process.env.BLOX_SSG_LLM !== "0") {
168
168
  try {
169
- const { mergeLlmParts } = await Promise.resolve().then(() => require("./validate-output-B7bEilEz.cjs")).then((n) => n.llmArtifacts);
169
+ const { mergeLlmParts } = await Promise.resolve().then(() => require("./validate-output-C-EqAsnA.cjs")).then((n) => n.llmArtifacts);
170
170
  const mergeWebsite = website;
171
171
  const partFiles = Array.from({ length: total }, (_, i) => path.join(llmPartsDir, `part.${i}.json`));
172
172
  const { pages } = await mergeLlmParts({
package/dist/ssg/cli.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  const process = require("node:process");
4
4
  const fs = require("node:fs/promises");
5
5
  const ssg_buildGrant = require("./build-grant.cjs");
6
- const llmArtifacts = require("../validate-output-B7bEilEz.cjs");
6
+ const llmArtifacts = require("../validate-output-C-EqAsnA.cjs");
7
7
  function installFetchTimeout() {
8
8
  const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
9
9
  const original = globalThis.fetch;
@@ -147,7 +147,7 @@ Environment:
147
147
  if (shardsOpt !== null || routesCmd) {
148
148
  const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
149
149
  const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
150
- const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-QTidVrmr.cjs"));
150
+ const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-DyS4jIdb.cjs"));
151
151
  const code = await runSharded({
152
152
  shards: shardsOpt ?? "auto",
153
153
  mode,
package/dist/ssg/cli.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  import process from "node:process";
3
3
  import fs from "node:fs/promises";
4
4
  import { resolveBloxBuildGrant } from "./build-grant.mjs";
5
- import { v as validateSsgOutput, u as uploadBloxManifest, p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, b as buildCollectionResolver, a as prerender, c as validateInternalLinks } from "../validate-output-YSSzQSKE.js";
5
+ import { v as validateSsgOutput, u as uploadBloxManifest, p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, b as buildCollectionResolver, a as prerender, c as validateInternalLinks } from "../validate-output-D2bGF0xH.js";
6
6
  function installFetchTimeout() {
7
7
  const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
8
8
  const original = globalThis.fetch;
@@ -146,7 +146,7 @@ Environment:
146
146
  if (shardsOpt !== null || routesCmd) {
147
147
  const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
148
148
  const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
149
- const { runSharded } = await import("../shard-runner-_hyxmrYk.js");
149
+ const { runSharded } = await import("../shard-runner-CdmoIS63.js");
150
150
  const code = await runSharded({
151
151
  shards: shardsOpt ?? "auto",
152
152
  mode,
@@ -22,7 +22,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
22
  mod
23
23
  ));
24
24
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
25
- const llmArtifacts = require("../validate-output-B7bEilEz.cjs");
25
+ const llmArtifacts = require("../validate-output-C-EqAsnA.cjs");
26
26
  const ssg_buildGrant = require("./build-grant.cjs");
27
27
  const ssg_client = require("../client-AoDTJJXJ.cjs");
28
28
  const vue = require("vue");
@@ -1,5 +1,5 @@
1
- import { d as buildPageHead, e as primaryContextEntry, h as buildJsonLd, i as extractPageText, B as BloxBuildResponseError, j as bloxBuildJson } from "../validate-output-YSSzQSKE.js";
2
- import { k, l, f, m, n, o, q, g, r, s, t, w, x, y, p, a, z, A, u, c, v } from "../validate-output-YSSzQSKE.js";
1
+ import { d as buildPageHead, e as primaryContextEntry, h as buildJsonLd, i as extractPageText, B as BloxBuildResponseError, j as bloxBuildJson } from "../validate-output-D2bGF0xH.js";
2
+ import { k, l, f, m, n, o, q, g, r, s, t, w, x, y, p, a, z, A, u, c, v } from "../validate-output-D2bGF0xH.js";
3
3
  import { parseBloxBuildGrantBody, resolveBloxBuildGrant } from "./build-grant.mjs";
4
4
  import { a as BLOX_HYDRATION_WINDOW_KEY } from "../client-Ce9fRCGH.js";
5
5
  import { createSSRApp, h, Suspense } from "vue";
@@ -1 +1 @@
1
- {"version":3,"file":"validate-output.d.ts","sourceRoot":"","sources":["../../src/ssg/validate-output.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBzE;AAED,MAAM,WAAW,wBAAwB;IACxC,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC5B;AAqBD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmExF"}
1
+ {"version":3,"file":"validate-output.d.ts","sourceRoot":"","sources":["../../src/ssg/validate-output.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBzE;AAED,MAAM,WAAW,wBAAwB;IACxC,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC5B;AA4BD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiExF"}
@@ -1515,10 +1515,15 @@ const ABSOLUTE_OR_SPECIAL = /^(?:[a-z][a-z0-9+.-]*:|\/\/|\/|#|\?|$)/i;
1515
1515
  async function readSiteNoindex(outDir) {
1516
1516
  try {
1517
1517
  const robots = await fs.readFile(path.join(outDir, "robots.txt"), "utf8");
1518
- return /^\s*Disallow:\s*\/\s*$/im.test(robots);
1518
+ if (/^\s*Disallow:\s*\/\s*$/im.test(robots)) return true;
1519
1519
  } catch {
1520
- return false;
1521
1520
  }
1521
+ try {
1522
+ const headers = await fs.readFile(path.join(outDir, "_headers"), "utf8");
1523
+ return /^\s*X-Robots-Tag:\s*[^\r\n]*\bnoindex\b/im.test(headers);
1524
+ } catch {
1525
+ }
1526
+ return false;
1522
1527
  }
1523
1528
  async function validateSsgOutput(options) {
1524
1529
  const outDir = path.resolve(options.outDir);
@@ -1492,10 +1492,15 @@ const ABSOLUTE_OR_SPECIAL = /^(?:[a-z][a-z0-9+.-]*:|\/\/|\/|#|\?|$)/i;
1492
1492
  async function readSiteNoindex(outDir) {
1493
1493
  try {
1494
1494
  const robots = await fs.readFile(path.join(outDir, "robots.txt"), "utf8");
1495
- return /^\s*Disallow:\s*\/\s*$/im.test(robots);
1495
+ if (/^\s*Disallow:\s*\/\s*$/im.test(robots)) return true;
1496
1496
  } catch {
1497
- return false;
1498
1497
  }
1498
+ try {
1499
+ const headers = await fs.readFile(path.join(outDir, "_headers"), "utf8");
1500
+ return /^\s*X-Robots-Tag:\s*[^\r\n]*\bnoindex\b/im.test(headers);
1501
+ } catch {
1502
+ }
1503
+ return false;
1499
1504
  }
1500
1505
  async function validateSsgOutput(options) {
1501
1506
  const outDir = path.resolve(options.outDir);
package/package.json CHANGED
@@ -1,126 +1,125 @@
1
1
  {
2
- "name": "@bagelink/blox",
3
- "type": "module",
4
- "version": "1.16.2",
5
- "description": "Blox page builder library for drag-and-drop page building and static data management",
6
- "author": {
7
- "name": "Bagel Studio",
8
- "email": "info@bagelstudio.co.il",
9
- "url": "https://bagelstudio.co.il"
10
- },
11
- "license": "MIT",
12
- "homepage": "https://github.com/bageldb/bagelink/tree/master/packages/blox#readme",
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/bageldb/bagelink.git",
16
- "directory": "packages/blox"
17
- },
18
- "bugs": "https://github.com/bageldb/bagelink/issues",
19
- "keywords": [
20
- "blox",
21
- "page-builder",
22
- "preview",
23
- "external-preview",
24
- "cms",
25
- "vue",
26
- "component-library",
27
- "drag-and-drop",
28
- "static-pages"
29
- ],
30
- "bin": {
31
- "blox-ssg": "dist/ssg/cli.mjs"
32
- },
33
- "sideEffects": [
34
- "**/*.css",
35
- "**/*.vue"
36
- ],
37
- "exports": {
38
- "./package.json": "./package.json",
39
- "./vite": {
40
- "types": "./dist/vite-plugin.d.ts",
41
- "import": "./dist/vite-plugin.mjs"
42
- },
43
- ".": {
44
- "types": "./dist/index.d.ts",
45
- "require": "./dist/index.cjs",
46
- "import": "./dist/index.mjs"
47
- },
48
- "./ssg": {
49
- "types": "./dist/ssg/index.d.ts",
50
- "import": "./dist/ssg/index.mjs"
51
- },
52
- "./ssg/client": {
53
- "types": "./dist/ssg/client.d.ts",
54
- "import": "./dist/ssg/client.mjs"
55
- },
56
- "./ssg/build-grant": {
57
- "types": "./dist/ssg/build-grant.d.ts",
58
- "import": "./dist/ssg/build-grant.mjs"
59
- },
60
- "./style.css": "./dist/style.css",
61
- "./dist/style.css": "./dist/style.css"
62
- },
63
- "main": "./dist/index.cjs",
64
- "module": "./dist/index.mjs",
65
- "types": "./dist/index.d.ts",
66
- "typesVersions": {
67
- "*": {
68
- "*": [
69
- "./dist/*",
70
- "./dist/index.d.ts"
71
- ]
72
- }
73
- },
74
- "files": [
75
- "dist",
76
- "core",
77
- "components",
78
- "config",
79
- "ssg",
80
- "utils",
81
- "views",
82
- "setup.ts",
83
- "index.ts",
84
- "README.md"
85
- ],
86
- "scripts": {
87
- "prepublishOnly": "pnpm build",
88
- "dev": "vite build --watch",
89
- "build": "vite build",
90
- "typecheck": "vue-tsc --noEmit"
91
- },
92
- "publishConfig": {
93
- "access": "public"
94
- },
95
- "peerDependencies": {
96
- "@bagelink/vue": "*",
97
- "happy-dom": ">=14.0.0",
98
- "vite": ">=5.0.0",
99
- "vue": "^3.3.0",
100
- "vue-router": "^4.0.0"
101
- },
102
- "peerDependenciesMeta": {
103
- "happy-dom": {
104
- "optional": true
105
- },
106
- "vite": {
107
- "optional": true
108
- }
109
- },
110
- "devDependencies": {
111
- "@vitejs/plugin-vue": "^5.2.4",
112
- "@vue/tsconfig": "^0.7.0",
113
- "typescript": "^5.9.3",
114
- "vite": "^5.4.21",
115
- "vite-plugin-dts": "^4.5.4",
116
- "vite-tsconfig-paths": "^5.1.4",
117
- "vitest": "^3.2.7",
118
- "vue": "^3.5.43",
119
- "vue-router": "^4.6.4",
120
- "vue-tsc": "^2.2.12"
121
- },
122
- "dependencies": {
123
- "magic-string": "^0.30.21",
124
- "pinia": "^3.0.4"
125
- }
126
- }
2
+ "name": "@bagelink/blox",
3
+ "type": "module",
4
+ "version": "1.17.3",
5
+ "description": "Blox page builder library for drag-and-drop page building and static data management",
6
+ "author": {
7
+ "name": "Bagel Studio",
8
+ "email": "info@bagelstudio.co.il",
9
+ "url": "https://bagelstudio.co.il"
10
+ },
11
+ "license": "MIT",
12
+ "homepage": "https://github.com/bageldb/bagelink/tree/master/packages/blox#readme",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/bageldb/bagelink.git",
16
+ "directory": "packages/blox"
17
+ },
18
+ "bugs": "https://github.com/bageldb/bagelink/issues",
19
+ "keywords": [
20
+ "blox",
21
+ "page-builder",
22
+ "preview",
23
+ "external-preview",
24
+ "cms",
25
+ "vue",
26
+ "component-library",
27
+ "drag-and-drop",
28
+ "static-pages"
29
+ ],
30
+ "bin": {
31
+ "blox-ssg": "dist/ssg/cli.mjs"
32
+ },
33
+ "sideEffects": [
34
+ "**/*.css",
35
+ "**/*.vue"
36
+ ],
37
+ "exports": {
38
+ "./package.json": "./package.json",
39
+ "./vite": {
40
+ "types": "./dist/vite-plugin.d.ts",
41
+ "import": "./dist/vite-plugin.mjs"
42
+ },
43
+ ".": {
44
+ "types": "./dist/index.d.ts",
45
+ "require": "./dist/index.cjs",
46
+ "import": "./dist/index.mjs"
47
+ },
48
+ "./ssg": {
49
+ "types": "./dist/ssg/index.d.ts",
50
+ "import": "./dist/ssg/index.mjs"
51
+ },
52
+ "./ssg/client": {
53
+ "types": "./dist/ssg/client.d.ts",
54
+ "import": "./dist/ssg/client.mjs"
55
+ },
56
+ "./ssg/build-grant": {
57
+ "types": "./dist/ssg/build-grant.d.ts",
58
+ "import": "./dist/ssg/build-grant.mjs"
59
+ },
60
+ "./style.css": "./dist/style.css",
61
+ "./dist/style.css": "./dist/style.css"
62
+ },
63
+ "main": "./dist/index.cjs",
64
+ "module": "./dist/index.mjs",
65
+ "types": "./dist/index.d.ts",
66
+ "typesVersions": {
67
+ "*": {
68
+ "*": [
69
+ "./dist/*",
70
+ "./dist/index.d.ts"
71
+ ]
72
+ }
73
+ },
74
+ "files": [
75
+ "dist",
76
+ "core",
77
+ "components",
78
+ "config",
79
+ "ssg",
80
+ "utils",
81
+ "views",
82
+ "setup.ts",
83
+ "index.ts",
84
+ "README.md"
85
+ ],
86
+ "publishConfig": {
87
+ "access": "public"
88
+ },
89
+ "peerDependencies": {
90
+ "@bagelink/vue": "*",
91
+ "happy-dom": ">=14.0.0",
92
+ "vite": ">=5.0.0",
93
+ "vue": "^3.3.0",
94
+ "vue-router": "^4.0.0"
95
+ },
96
+ "peerDependenciesMeta": {
97
+ "happy-dom": {
98
+ "optional": true
99
+ },
100
+ "vite": {
101
+ "optional": true
102
+ }
103
+ },
104
+ "devDependencies": {
105
+ "@vitejs/plugin-vue": "^5.2.4",
106
+ "@vue/tsconfig": "^0.7.0",
107
+ "typescript": "^5.9.3",
108
+ "vite": "^5.4.21",
109
+ "vite-plugin-dts": "^4.5.4",
110
+ "vite-tsconfig-paths": "^5.1.4",
111
+ "vitest": "^3.2.7",
112
+ "vue": "^3.5.43",
113
+ "vue-router": "^4.6.4",
114
+ "vue-tsc": "^2.2.12"
115
+ },
116
+ "dependencies": {
117
+ "magic-string": "^0.30.21",
118
+ "pinia": "^3.0.4"
119
+ },
120
+ "scripts": {
121
+ "dev": "vite build --watch",
122
+ "build": "vite build",
123
+ "typecheck": "vue-tsc --noEmit"
124
+ }
125
+ }