Repository navigation
Expand file tree
/
Copy pathobsidian-e2e.config.mjs
More file actions
139 lines (137 loc) · 4.1 KB
/
Copy pathobsidian-e2e.config.mjs
File metadata and controls
139 lines (137 loc) · 4.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// Config for the obsidian-e2e instance runner, read from the worktree root.
// Schema: the runner's README ("Instance Runner (CLI)").
import os from "node:os";
import path from "node:path";
const appName =
process.env.PODNOTES_OBSIDIAN_APP ??
(process.platform === "linux"
? path.join(os.homedir(), ".local/share/obsidian-versions/obsidian-1.14.4/obsidian")
: undefined);
export default {
appName,
obsidianBin:
process.env.PODNOTES_OBSIDIAN_BIN ??
(process.platform === "linux" && appName
? path.join(path.dirname(appName), "obsidian-cli")
: undefined),
profileRoot:
process.platform === "linux"
? path.join(os.homedir(), ".cache", "podnotes-e2e")
: "/private/tmp/podnotes-obsidian-e2e",
pluginId: "podnotes",
// PodNotes injects its CSS into main.js (svelte compilerOptions css:
// "injected"), so there is no styles.css artifact - only the manifest and the
// compiled bundle are symlinked into the vault.
pluginArtifacts: ["manifest.json", "main.js"],
// `defaultData` seeds a freshly provisioned vault's data.json. It mirrors
// DEFAULT_SETTINGS in src/constants.ts (plus the `schemaVersion: 2` persistence
// marker PodNotes writes alongside its settings) so a new vault loads with clean
// PodNotes state and the current on-disk schema. `currentEpisode` is omitted:
// DEFAULT_SETTINGS sets it to `undefined`, which JSON cannot represent and
// PodNotes treats as absent. Keep this in sync with constants.ts -
// scripts/e2e-config.test.ts fails if it drifts from DEFAULT_SETTINGS.
defaultData: {
schemaVersion: 2,
savedFeeds: {},
podNotes: {},
defaultPlaybackRate: 1,
defaultVolume: 1,
hidePlayedEpisodes: false,
episodeListLimit: 10,
playedEpisodes: {},
favorites: {
icon: "lucide-star",
name: "Favorites",
shouldEpisodeRemoveAfterPlay: false,
shouldRepeat: false,
episodes: [],
},
queue: {
icon: "list-ordered",
name: "Queue",
shouldEpisodeRemoveAfterPlay: true,
shouldRepeat: false,
episodes: [],
},
autoQueue: true,
playlists: {},
skipBackwardLength: 15,
skipForwardLength: 15,
headsetPreviousTrack: "captureTimestamp",
headsetNextTrack: "skipForward",
timestamp: {
template: "- {{linktime}} ",
offset: 0,
},
note: {
path: "PodNotes/{{podcast}}/{{title}}.md",
template:
"---\n" +
"type: podcastEpisode\n" +
'podcast: "{{podcastlink}}"\n' +
"date: {{date:YYYY-MM-DD}}\n" +
"tags:\n" +
" - podcastEpisode\n" +
"status:\n" +
"rating:\n" +
"favorite: false\n" +
"---\n" +
"# {{title}}\n\n" +
"\n\n" +
"{{episodelink:Resume in PodNotes}}\n\n" +
"{{url}}\n\n" +
"{{description}}\n",
},
feedNote: {
path: "PodNotes/Podcasts/{{podcast}}.md",
template:
"---\n" +
"type: podcast\n" +
'podcast: "{{podcast}}"\n' +
'image: "{{artwork}}"\n' +
'url: "{{url}}"\n' +
'feedUrl: "{{feedurl}}"\n' +
"tags:\n" +
" - podcast\n" +
"---\n" +
"# {{title}}\n" +
"{{author}}\n\n" +
"\n\n" +
"{{description}}\n",
},
download: {
path: "PodNotes/{{podcast}}/{{title}}",
},
downloadedEpisodes: {},
localFiles: {
icon: "folder",
name: "Local Files",
shouldEpisodeRemoveAfterPlay: false,
shouldRepeat: false,
episodes: [],
},
openAISecretId: "",
deepgramSecretId: "",
transcript: {
path: "transcripts/{{podcast}}/{{title}}.md",
template: "# {{title}}\n\nPodcast: {{podcast}}\nDate: {{date}}\n\n{{transcript}}",
diarization: {
enabled: false,
provider: "openai",
speakerTemplate: "**{{speaker}}:** ",
},
},
},
buildCommand: "npm run build",
// Emit legacy PODNOTES_E2E_* env aliases alongside the canonical OBSIDIAN_E2E_*
// names while the harness and AGENTS.md playbooks migrate off them.
envPrefix: "PODNOTES",
// Confirm the PodNotes plugin instance is live in the target vault. The launcher
// waits for stdout to contain the match string; the code intentionally omits the
// literal "=> true" so an echoed command can't be mistaken for a positive result.
readyProbe: {
kind: "eval",
code: `Boolean(app.plugins.plugins["podnotes"])`,
match: "=> true",
},
};