@bagelink/blox 1.12.16 → 1.12.18

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/bridge.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { SchemaDefinition } from '../../vue/src/index.ts';
1
+ import { SchemaDefinition } from '@bagelink/vue';
2
2
  import { Block, PageResolveRead } from './api/types';
3
3
  export interface BlockSchemaInfo {
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { SchemaDefinition } from '../../vue/src/index.ts';
1
+ import { SchemaDefinition } from '@bagelink/vue';
2
2
  export interface BlockMeta {
3
3
  /** Block type key — must be unique across the app. Used as the export name by the Vite plugin. */
4
4
  name: string;
@@ -23,6 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
23
  ));
24
24
  const fs = require("node:fs/promises");
25
25
  const path = require("node:path");
26
+ const process = require("node:process");
26
27
  const node_url = require("node:url");
27
28
  async function fetchCmsPrerenderPaths(apiBase, websiteName) {
28
29
  const sitesRes = await fetch(`${apiBase}/cms/websites`);
@@ -65,7 +66,7 @@ async function fetchCmsPrerenderPaths(apiBase, websiteName) {
65
66
  return [...new Set(routes)];
66
67
  }
67
68
  async function polyfillBloxSsgGlobals(options) {
68
- const { env } = await Promise.resolve().then(() => __viteBrowserExternal);
69
+ const { env } = await import("node:process");
69
70
  const pageUrl = (options == null ? void 0 : options.pageUrl) ?? env.BAGELINK_API_URL ?? "https://example.com/";
70
71
  const { Window: HappyWindow } = await import("happy-dom");
71
72
  const _win = new HappyWindow({ url: pageUrl });
@@ -108,11 +109,6 @@ async function polyfillBloxSsgGlobals(options) {
108
109
  g.window.location = _win.location;
109
110
  g.window.document = _win.document;
110
111
  }
111
- const process = {};
112
- const __viteBrowserExternal = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
113
- __proto__: null,
114
- default: process
115
- }, Symbol.toStringTag, { value: "Module" }));
116
112
  async function prerender({
117
113
  root = process.cwd(),
118
114
  clientOutDir = "dist/client",
@@ -305,4 +301,3 @@ function discoverInternalLinks(html) {
305
301
  exports.fetchCmsPrerenderPaths = fetchCmsPrerenderPaths;
306
302
  exports.polyfillBloxSsgGlobals = polyfillBloxSsgGlobals;
307
303
  exports.prerender = prerender;
308
- exports.process = process;
@@ -1,5 +1,6 @@
1
1
  import fs from "node:fs/promises";
2
2
  import path from "node:path";
3
+ import process from "node:process";
3
4
  import { pathToFileURL } from "node:url";
4
5
  async function fetchCmsPrerenderPaths(apiBase, websiteName) {
5
6
  const sitesRes = await fetch(`${apiBase}/cms/websites`);
@@ -42,7 +43,7 @@ async function fetchCmsPrerenderPaths(apiBase, websiteName) {
42
43
  return [...new Set(routes)];
43
44
  }
44
45
  async function polyfillBloxSsgGlobals(options) {
45
- const { env } = await Promise.resolve().then(() => __viteBrowserExternal);
46
+ const { env } = await import("node:process");
46
47
  const pageUrl = (options == null ? void 0 : options.pageUrl) ?? env.BAGELINK_API_URL ?? "https://example.com/";
47
48
  const { Window: HappyWindow } = await import("happy-dom");
48
49
  const _win = new HappyWindow({ url: pageUrl });
@@ -85,11 +86,6 @@ async function polyfillBloxSsgGlobals(options) {
85
86
  g.window.location = _win.location;
86
87
  g.window.document = _win.document;
87
88
  }
88
- const process = {};
89
- const __viteBrowserExternal = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
90
- __proto__: null,
91
- default: process
92
- }, Symbol.toStringTag, { value: "Module" }));
93
89
  async function prerender({
94
90
  root = process.cwd(),
95
91
  clientOutDir = "dist/client",
@@ -281,7 +277,6 @@ function discoverInternalLinks(html) {
281
277
  }
282
278
  export {
283
279
  prerender as a,
284
- process as b,
285
280
  fetchCmsPrerenderPaths as f,
286
281
  polyfillBloxSsgGlobals as p
287
282
  };
package/dist/schema.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { SchemaDefinition } from '../../vue/src/index.ts';
1
+ import { SchemaDefinition } from '@bagelink/vue';
2
2
  import { Component } from 'vue';
3
3
  import { BlockMeta } from './defineBlock';
4
4
  export interface BlockSchema {
package/dist/ssg/cli.cjs CHANGED
@@ -1,15 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
- const prerender = require("../prerender-mMYLIIC8.cjs");
3
+ const process = require("node:process");
4
+ const prerender = require("../prerender-6jE_obPj.cjs");
4
5
  async function resolveApiBase(mode) {
5
- if (prerender.process.env.BAGELINK_API_URL != null && prerender.process.env.BAGELINK_API_URL !== "") {
6
- return { apiBase: prerender.process.env.BAGELINK_API_URL };
6
+ if (process.env.BAGELINK_API_URL != null && process.env.BAGELINK_API_URL !== "") {
7
+ return { apiBase: process.env.BAGELINK_API_URL };
7
8
  }
8
9
  const configPaths = [
9
- `${prerender.process.cwd()}/bgl.config.ts`,
10
- `${prerender.process.cwd()}/bgl.config.js`,
11
- `${prerender.process.cwd()}/../bgl.config.ts`,
12
- `${prerender.process.cwd()}/../bgl.config.js`
10
+ `${process.cwd()}/bgl.config.ts`,
11
+ `${process.cwd()}/bgl.config.js`,
12
+ `${process.cwd()}/../bgl.config.ts`,
13
+ `${process.cwd()}/../bgl.config.js`
13
14
  ];
14
15
  for (const configPath of configPaths) {
15
16
  try {
@@ -29,7 +30,7 @@ async function resolveApiBase(mode) {
29
30
  return { apiBase: "https://localhost:8000" };
30
31
  }
31
32
  async function main() {
32
- const argv = prerender.process.argv.slice(2);
33
+ const argv = process.argv.slice(2);
33
34
  const extraPaths = [];
34
35
  let crawl = false;
35
36
  let mode = "production";
@@ -57,7 +58,7 @@ Environment:
57
58
  BAGELINK_API_URL Override API base URL
58
59
  WEBSITE_NAME Override CMS website name
59
60
  `);
60
- prerender.process.exit(0);
61
+ process.exit(0);
61
62
  } else if (a.startsWith("--mode=")) {
62
63
  mode = a.slice("--mode=".length);
63
64
  } else if (a.startsWith("--exclude=")) {
@@ -68,7 +69,7 @@ Environment:
68
69
  }
69
70
  const { apiBase, websiteName: configWebsiteName } = await resolveApiBase(mode);
70
71
  await prerender.polyfillBloxSsgGlobals({ pageUrl: apiBase });
71
- const websiteName = prerender.process.env.WEBSITE_NAME ?? configWebsiteName ?? "default";
72
+ const websiteName = process.env.WEBSITE_NAME ?? configWebsiteName ?? "default";
72
73
  console.log(`Fetching routes from ${apiBase} (mode: ${mode}, site: ${websiteName})…`);
73
74
  let paths = [];
74
75
  try {
@@ -84,7 +85,7 @@ Environment:
84
85
  const startTime = Date.now();
85
86
  try {
86
87
  const result = await prerender.prerender({
87
- root: prerender.process.cwd(),
88
+ root: process.cwd(),
88
89
  clientOutDir: "dist",
89
90
  serverEntry: "dist/server/main.server.js",
90
91
  paths,
@@ -114,11 +115,11 @@ ${"=".repeat(60)}`);
114
115
  if (result.failures.length > 10) {
115
116
  console.log(` ... and ${result.failures.length - 10} more`);
116
117
  }
117
- prerender.process.exitCode = 1;
118
+ process.exitCode = 1;
118
119
  }
119
120
  } catch (err) {
120
121
  console.error("Fatal error:", err);
121
- prerender.process.exitCode = 1;
122
+ process.exitCode = 1;
122
123
  }
123
124
  }
124
125
  main();
package/dist/ssg/cli.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { b as process, p as polyfillBloxSsgGlobals, f as fetchCmsPrerenderPaths, a as prerender } from "../prerender-BwmtiKjz.js";
2
+ import process from "node:process";
3
+ import { p as polyfillBloxSsgGlobals, f as fetchCmsPrerenderPaths, a as prerender } from "../prerender-DYmDaqcz.js";
3
4
  async function resolveApiBase(mode) {
4
5
  if (process.env.BAGELINK_API_URL != null && process.env.BAGELINK_API_URL !== "") {
5
6
  return { apiBase: process.env.BAGELINK_API_URL };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const prerender = require("../prerender-mMYLIIC8.cjs");
3
+ const prerender = require("../prerender-6jE_obPj.cjs");
4
4
  const ssg_client = require("./client.cjs");
5
5
  async function renderBloxSsgPage(options) {
6
6
  const {
@@ -1,4 +1,4 @@
1
- import { f, p, a } from "../prerender-BwmtiKjz.js";
1
+ import { f, p, a } from "../prerender-DYmDaqcz.js";
2
2
  import { BLOX_STATE_WINDOW_KEY } from "./client.mjs";
3
3
  import { installBloxStateCache } from "./client.mjs";
4
4
  async function renderBloxSsgPage(options) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/blox",
3
3
  "type": "module",
4
- "version": "1.12.16",
4
+ "version": "1.12.18",
5
5
  "description": "Blox page builder library for drag-and-drop page building and static data management",
6
6
  "author": {
7
7
  "name": "Bagel Studio",