@lemonriver/core 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # @lemonriver/core
2
2
 
3
- ![LemonRiver — the agent-driven slide & deck platform](https://raw.githubusercontent.com/SegawaBeer/lemonriver/main/.github/assets/lemonriver-banner-en.png)
3
+ ![LemonRiver — the agent-driven slide & deck platform](https://raw.githubusercontent.com/SegawaBeer/lemonriver-slide/main/assets/lemonriver-banner-en.png)
4
4
 
5
- The runtime behind [LemonRiver](https://github.com/SegawaBeer/lemonriver) — the agent-driven slide & deck platform. Your own agent writes the deck; this package supplies everything around the slides themselves.
5
+ The runtime behind [LemonRiver](https://github.com/SegawaBeer/lemonriver-slide) — the agent-driven slide & deck platform. Your own agent writes the deck; this package supplies everything around the slides themselves.
6
6
 
7
7
  ## Install
8
8
 
@@ -1,5 +1,5 @@
1
1
  import { r as printHeader, t as createCliLogger } from "./cli/bin.js";
2
- import { t as createViteConfig } from "./config-BI3VRI2n.js";
2
+ import { t as createViteConfig } from "./config-DW1wSoxa.js";
3
3
  import path from "node:path";
4
4
  import { build as build$1, mergeConfig } from "vite";
5
5
  //#region src/cli/build.ts
package/dist/cli/bin.js CHANGED
@@ -449,17 +449,17 @@ async function run(argv) {
449
449
  program.command("dev").description("Start the dev server").addOption(new Option("-p, --port <port>", "port to listen on").argParser(parsePort)).addOption(new Option("--host [host]", "expose on the network (optional host)")).option("--open", "open the browser on start").option("--no-skills-check", "skip the built-in skills drift check").action(async (flags) => {
450
450
  if (flags.skillsCheck !== false) await runSkillsDriftCheck(resolveBuiltinSkillsDir());
451
451
  await assertViteResolvesToCore();
452
- const { dev } = await import("../dev-DpzBn_sf.js");
452
+ const { dev } = await import("../dev-_VDoRfAK.js");
453
453
  await dev(flags);
454
454
  });
455
455
  program.command("build").description("Build a static site").option("--out-dir <dir>", "output directory (defaults to `dist`)").action(async (flags) => {
456
456
  await assertViteResolvesToCore();
457
- const { build } = await import("../build-CiT4CNey.js");
457
+ const { build } = await import("../build-DYN-H65n.js");
458
458
  await build(flags);
459
459
  });
460
460
  program.command("preview").description("Preview the production build").addOption(new Option("-p, --port <port>", "port to listen on").argParser(parsePort)).addOption(new Option("--host [host]", "expose on the network (optional host)")).option("--open", "open the browser on start").action(async (flags) => {
461
461
  await assertViteResolvesToCore();
462
- const { preview } = await import("../preview-Dro8hl5_.js");
462
+ const { preview } = await import("../preview-CYIGh3Z8.js");
463
463
  await preview(flags);
464
464
  });
465
465
  program.command("mcp").description("Run the LemonRiver MCP server over stdio, for the agent working in this folder").action(async () => {
@@ -2953,7 +2953,7 @@ async function listBackups(dir, written) {
2953
2953
  * The how-to-restore page inside a backup zip. Same rules as the share guide:
2954
2954
  * standalone, no script, every string escaped.
2955
2955
  */
2956
- const RELEASES_URL = "https://github.com/SegawaBeer/lemonriver/releases";
2956
+ const RELEASES_URL = "https://github.com/SegawaBeer/lemonriver-slide/releases/latest";
2957
2957
  function restoreGuideFileName(locale) {
2958
2958
  if (locale === "zh-CN") return "怎么恢复.html";
2959
2959
  if (locale === "zh-TW") return "怎麼還原.html";
@@ -1,6 +1,6 @@
1
1
  import { V as PKG_NAMES } from "./update-b1dSg_FW.js";
2
2
  import { a as printUrls, c as startupDuration, i as printShortcutsHint, n as formatError, r as printHeader, s as shortcutsEnabled, t as createCliLogger } from "./cli/bin.js";
3
- import { n as DEV_SUPERVISED_ENV, t as createViteConfig } from "./config-BI3VRI2n.js";
3
+ import { n as DEV_SUPERVISED_ENV, t as createViteConfig } from "./config-DW1wSoxa.js";
4
4
  import path from "node:path";
5
5
  import { existsSync } from "node:fs";
6
6
  import { fork } from "node:child_process";
@@ -1,5 +1,5 @@
1
1
  import { a as printUrls, c as startupDuration, i as printShortcutsHint, r as printHeader, s as shortcutsEnabled, t as createCliLogger } from "./cli/bin.js";
2
- import { t as createViteConfig } from "./config-BI3VRI2n.js";
2
+ import { t as createViteConfig } from "./config-DW1wSoxa.js";
3
3
  import { mergeConfig, preview as preview$1 } from "vite";
4
4
  //#region src/cli/preview.ts
5
5
  async function preview(opts = {}) {
@@ -1,2 +1,2 @@
1
- import { t as createViteConfig } from "../config-BI3VRI2n.js";
1
+ import { t as createViteConfig } from "../config-DW1wSoxa.js";
2
2
  export { createViteConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemonriver/core",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "The LemonRiver runtime: deck viewer, story board, present mode, agent panel and export.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -59,8 +59,9 @@
59
59
  "directory": "packages/core"
60
60
  },
61
61
  "bugs": {
62
- "url": "https://github.com/SegawaBeer/lemonriver/issues"
62
+ "url": "https://github.com/SegawaBeer/lemonriver-slide/issues"
63
63
  },
64
+ "homepage": "https://github.com/SegawaBeer/lemonriver-slide",
64
65
  "publishConfig": {
65
66
  "access": "public",
66
67
  "registry": "https://registry.npmjs.org/"
@@ -15,7 +15,7 @@ describe('the restore guide inside a backup', () => {
15
15
  expect(zh).toContain('LemonRiver 备份 · 2026-11-01 21:30');
16
16
  expect(zh).toContain('3 份演示 · 620 MB · 用 LemonRiver 0.8.0 备份');
17
17
  expect(zh).toContain('从备份恢复');
18
- expect(zh).toContain('https://github.com/SegawaBeer/lemonriver/releases');
18
+ expect(zh).toContain('https://github.com/SegawaBeer/lemonriver-slide/releases/latest');
19
19
  expect(zh).not.toContain('<script');
20
20
 
21
21
  const en = buildRestoreGuide({
@@ -13,7 +13,7 @@ export type RestoreGuideInput = {
13
13
  locale: GuideLocale;
14
14
  };
15
15
 
16
- const RELEASES_URL = 'https://github.com/SegawaBeer/lemonriver/releases';
16
+ const RELEASES_URL = 'https://github.com/SegawaBeer/lemonriver-slide/releases/latest';
17
17
 
18
18
  export function restoreGuideFileName(locale: GuideLocale): string {
19
19
  if (locale === 'zh-CN') return '怎么恢复.html';
@@ -0,0 +1,32 @@
1
+ import { readdirSync, readFileSync, statSync } from 'node:fs';
2
+ import path from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import { describe, expect, it } from 'vitest';
5
+
6
+ const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../../..');
7
+
8
+ // The main repository is private now, so anything a user can open has to point
9
+ // at lemonriver-slide instead.
10
+ const PRIVATE_REPO = /(?:github\.com|raw\.githubusercontent\.com)\/SegawaBeer\/lemonriver\//;
11
+
12
+ function sourceFiles(dir: string): string[] {
13
+ return readdirSync(dir).flatMap((name) => {
14
+ const full = path.join(dir, name);
15
+ if (statSync(full).isDirectory()) return sourceFiles(full);
16
+ if (/\.test\.tsx?$/.test(name)) return [];
17
+ return /\.(?:ts|tsx|css|html|json)$/.test(name) ? [full] : [];
18
+ });
19
+ }
20
+
21
+ describe('public links', () => {
22
+ it('never point at the private repository', () => {
23
+ const files = [
24
+ ...sourceFiles(path.join(ROOT, 'packages/core/src')),
25
+ path.join(ROOT, 'packages/core/README.md'),
26
+ path.join(ROOT, 'packages/cli/README.md'),
27
+ ];
28
+ expect(files.length).toBeGreaterThan(0);
29
+ const offenders = files.filter((file) => PRIVATE_REPO.test(readFileSync(file, 'utf8')));
30
+ expect(offenders.map((file) => path.relative(ROOT, file))).toEqual([]);
31
+ });
32
+ });
@@ -41,10 +41,10 @@ describe('buildGuideHtml', () => {
41
41
  for (const locale of ['zh-CN', 'zh-TW', 'en'] as const) {
42
42
  const html = buildGuideHtml({ ...base, title: 'Deck', locale });
43
43
  expect(html.toLowerCase()).not.toContain('<script');
44
- expect(html).toContain('https://github.com/SegawaBeer/lemonriver/releases');
44
+ expect(html).toContain('https://github.com/SegawaBeer/lemonriver-slide/releases/latest');
45
45
  const hrefs = [...html.matchAll(/href="([^"]+)"/g)].map((match) => match[1]);
46
46
  for (const href of hrefs) {
47
- expect(href).toBe('https://github.com/SegawaBeer/lemonriver/releases');
47
+ expect(href).toBe('https://github.com/SegawaBeer/lemonriver-slide/releases/latest');
48
48
  }
49
49
  expect(html).toContain('LemonRiver-0.6.0-arm64.dmg');
50
50
  }
@@ -15,7 +15,7 @@ export type GuideInput = {
15
15
  hasPdf?: boolean;
16
16
  };
17
17
 
18
- const RELEASES_URL = 'https://github.com/SegawaBeer/lemonriver/releases';
18
+ const RELEASES_URL = 'https://github.com/SegawaBeer/lemonriver-slide/releases/latest';
19
19
 
20
20
  export function guideLocaleFor(id: string): GuideLocale {
21
21
  if (id === 'zh-CN') return 'zh-CN';
@@ -362,7 +362,7 @@ export const enHelp: LrText['help'] = {
362
362
  kind: 'steps',
363
363
  items: [
364
364
  {
365
- text: 'On the new computer, install LemonRiver first (download: https://github.com/SegawaBeer/lemonriver/releases ), make sure the cloud drive client is installed and signed in, and the backup file is downloaded to this computer.',
365
+ text: 'On the new computer, install LemonRiver first (download: https://github.com/SegawaBeer/lemonriver-slide/releases/latest ), make sure the cloud drive client is installed and signed in, and the backup file is downloaded to this computer.',
366
366
  },
367
367
  {
368
368
  text: 'Open “{settings} → {backupSection}”, choose “{restore}”, pick one from the list, or choose “{chooseOtherFile}” to find it.',
@@ -352,7 +352,7 @@ export const zhCN: LrText = {
352
352
  kind: 'steps',
353
353
  items: [
354
354
  {
355
- text: '新电脑先装好 LemonRiver(下载地址:https://github.com/SegawaBeer/lemonriver/releases ),确认云盘客户端也装好并登录了,备份文件已经下载到这台电脑。',
355
+ text: '新电脑先装好 LemonRiver(下载地址:https://github.com/SegawaBeer/lemonriver-slide/releases/latest ),确认云盘客户端也装好并登录了,备份文件已经下载到这台电脑。',
356
356
  },
357
357
  {
358
358
  text: '打开「{settings} → {backupSection}」,点「{restore}」,在列表里选一份,或者点「{chooseOtherFile}」找到它。',
@@ -352,7 +352,7 @@ export const zhTW: LrText = {
352
352
  kind: 'steps',
353
353
  items: [
354
354
  {
355
- text: '新電腦先裝好 LemonRiver(下載網址:https://github.com/SegawaBeer/lemonriver/releases ),確認雲端硬碟用戶端也裝好並登入了,備份檔案已經下載到這台電腦。',
355
+ text: '新電腦先裝好 LemonRiver(下載網址:https://github.com/SegawaBeer/lemonriver-slide/releases/latest ),確認雲端硬碟用戶端也裝好並登入了,備份檔案已經下載到這台電腦。',
356
356
  },
357
357
  {
358
358
  text: '打開「{settings} → {backupSection}」,點「{restore}」,在清單裡選一份,或者點「{chooseOtherFile}」找到它。',