fluncle 0.94.0 → 0.95.0
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/bin/fluncle.mjs +47 -25
- package/package.json +1 -1
package/bin/fluncle.mjs
CHANGED
|
@@ -556,7 +556,7 @@ function parseVersion(version) {
|
|
|
556
556
|
var currentVersion;
|
|
557
557
|
var init_version = __esm(() => {
|
|
558
558
|
init_output();
|
|
559
|
-
currentVersion = "0.
|
|
559
|
+
currentVersion = "0.95.0".trim() ? "0.95.0".trim() : "0.1.0";
|
|
560
560
|
});
|
|
561
561
|
|
|
562
562
|
// src/update-notifier.ts
|
|
@@ -2186,7 +2186,7 @@ function parseVersion2(version) {
|
|
|
2186
2186
|
var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
|
|
2187
2187
|
var init_version2 = __esm(() => {
|
|
2188
2188
|
init_output();
|
|
2189
|
-
currentVersion2 = "0.
|
|
2189
|
+
currentVersion2 = "0.95.0".trim() ? "0.95.0".trim() : "0.1.0";
|
|
2190
2190
|
});
|
|
2191
2191
|
|
|
2192
2192
|
// ../../packages/registry/src/index.ts
|
|
@@ -3153,7 +3153,7 @@ __export(exports_helm, {
|
|
|
3153
3153
|
helmInstallCommand: () => helmInstallCommand,
|
|
3154
3154
|
buildLaunchAgentPlist: () => buildLaunchAgentPlist
|
|
3155
3155
|
});
|
|
3156
|
-
import { existsSync, mkdirSync as mkdirSync2, openSync, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
3156
|
+
import { existsSync, mkdirSync as mkdirSync2, openSync, rmSync as rmSync2, writeFileSync as writeFileSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
3157
3157
|
import { homedir as homedir4 } from "node:os";
|
|
3158
3158
|
import { dirname as dirname3, join as join4, resolve } from "node:path";
|
|
3159
3159
|
function launchAgentPlistPath() {
|
|
@@ -3162,15 +3162,8 @@ function launchAgentPlistPath() {
|
|
|
3162
3162
|
function helmLogPath() {
|
|
3163
3163
|
return join4(homedir4(), "Library/Logs/fluncle-helm.log");
|
|
3164
3164
|
}
|
|
3165
|
-
function
|
|
3166
|
-
|
|
3167
|
-
if (fromEnv) {
|
|
3168
|
-
if (!existsSync(join4(fromEnv, "src/server.ts"))) {
|
|
3169
|
-
throw new CliError2("helm_not_found", `FLUNCLE_HELM_DIR points at ${fromEnv}, but there's no helm there (src/server.ts missing).`);
|
|
3170
|
-
}
|
|
3171
|
-
return resolve(fromEnv);
|
|
3172
|
-
}
|
|
3173
|
-
let dir = import.meta.dir;
|
|
3165
|
+
function walkUpForHelm(start) {
|
|
3166
|
+
let dir = start;
|
|
3174
3167
|
for (let depth = 0;depth < 8; depth++) {
|
|
3175
3168
|
const candidate = join4(dir, "apps/helm");
|
|
3176
3169
|
if (existsSync(join4(candidate, "src/server.ts"))) {
|
|
@@ -3182,7 +3175,35 @@ function resolveHelmDir() {
|
|
|
3182
3175
|
}
|
|
3183
3176
|
dir = parent;
|
|
3184
3177
|
}
|
|
3185
|
-
|
|
3178
|
+
return null;
|
|
3179
|
+
}
|
|
3180
|
+
function persistHelmDir(dir) {
|
|
3181
|
+
try {
|
|
3182
|
+
mkdirSync2(dirname3(HELM_DIR_FILE), { recursive: true });
|
|
3183
|
+
writeFileSync2(HELM_DIR_FILE, `${dir}
|
|
3184
|
+
`, { mode: 384 });
|
|
3185
|
+
} catch {}
|
|
3186
|
+
}
|
|
3187
|
+
function resolveHelmDir() {
|
|
3188
|
+
const fromEnv = process.env.FLUNCLE_HELM_DIR;
|
|
3189
|
+
if (fromEnv) {
|
|
3190
|
+
if (!existsSync(join4(fromEnv, "src/server.ts"))) {
|
|
3191
|
+
throw new CliError2("helm_not_found", `FLUNCLE_HELM_DIR points at ${fromEnv}, but there's no helm there (src/server.ts missing).`);
|
|
3192
|
+
}
|
|
3193
|
+
return resolve(fromEnv);
|
|
3194
|
+
}
|
|
3195
|
+
const found = walkUpForHelm(process.cwd()) ?? walkUpForHelm(import.meta.dir);
|
|
3196
|
+
if (found) {
|
|
3197
|
+
persistHelmDir(found);
|
|
3198
|
+
return found;
|
|
3199
|
+
}
|
|
3200
|
+
try {
|
|
3201
|
+
const remembered = readFileSync2(HELM_DIR_FILE, "utf8").trim();
|
|
3202
|
+
if (remembered && existsSync(join4(remembered, "src/server.ts"))) {
|
|
3203
|
+
return remembered;
|
|
3204
|
+
}
|
|
3205
|
+
} catch {}
|
|
3206
|
+
throw new CliError2("helm_not_found", "No helm aboard. Run this once from the fluncle repo (the helm remembers the way after that), or set FLUNCLE_HELM_DIR.");
|
|
3186
3207
|
}
|
|
3187
3208
|
function resolveBun() {
|
|
3188
3209
|
const bun = Bun.which("bun");
|
|
@@ -3355,11 +3376,12 @@ async function helmUninstallCommand() {
|
|
|
3355
3376
|
}
|
|
3356
3377
|
console.log("No LaunchAgent on file. Nothing stood down.");
|
|
3357
3378
|
}
|
|
3358
|
-
var HELM_PORT = 4190, HELM_URL, LAUNCH_AGENT_LABEL = "com.fluncle.helm";
|
|
3379
|
+
var HELM_PORT = 4190, HELM_URL, LAUNCH_AGENT_LABEL = "com.fluncle.helm", HELM_DIR_FILE;
|
|
3359
3380
|
var init_helm = __esm(() => {
|
|
3360
3381
|
init_open_external();
|
|
3361
3382
|
init_output();
|
|
3362
3383
|
HELM_URL = `http://127.0.0.1:${HELM_PORT}`;
|
|
3384
|
+
HELM_DIR_FILE = join4(homedir4(), ".config/fluncle/helm-dir");
|
|
3363
3385
|
});
|
|
3364
3386
|
|
|
3365
3387
|
// src/commands/add.ts
|
|
@@ -4081,7 +4103,7 @@ __export(exports_recordings, {
|
|
|
4081
4103
|
recordingDeleteCommand: () => recordingDeleteCommand,
|
|
4082
4104
|
recordingCreateCommand: () => recordingCreateCommand
|
|
4083
4105
|
});
|
|
4084
|
-
import { existsSync as existsSync3, readFileSync as
|
|
4106
|
+
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "node:fs";
|
|
4085
4107
|
async function recordingGet(id) {
|
|
4086
4108
|
const response = await adminApiGet(`/api/admin/recordings/${encodeURIComponent(id)}`);
|
|
4087
4109
|
return response.recording;
|
|
@@ -4190,7 +4212,7 @@ async function recordingUpdateCommand(id, options = {}) {
|
|
|
4190
4212
|
throw new CliError2("file_not_found", `Tracklist file not found: ${options.tracklistFile}`);
|
|
4191
4213
|
}
|
|
4192
4214
|
try {
|
|
4193
|
-
body.tracklistJson = JSON.parse(
|
|
4215
|
+
body.tracklistJson = JSON.parse(readFileSync3(options.tracklistFile, "utf8"));
|
|
4194
4216
|
} catch {
|
|
4195
4217
|
throw new CliError2("invalid_tracklist", `Tracklist file is not valid JSON: ${options.tracklistFile}`);
|
|
4196
4218
|
}
|
|
@@ -4240,7 +4262,7 @@ async function recordingReplaceCuesCommand(id, options = {}) {
|
|
|
4240
4262
|
}
|
|
4241
4263
|
let cues;
|
|
4242
4264
|
try {
|
|
4243
|
-
cues = JSON.parse(
|
|
4265
|
+
cues = JSON.parse(readFileSync3(options.cuesFile, "utf8"));
|
|
4244
4266
|
} catch {
|
|
4245
4267
|
throw new CliError2("invalid_cues", `Cues file is not valid JSON: ${options.cuesFile}`);
|
|
4246
4268
|
}
|
|
@@ -4444,7 +4466,7 @@ __export(exports_recordings2, {
|
|
|
4444
4466
|
recordingDeleteCommand: () => recordingDeleteCommand2,
|
|
4445
4467
|
recordingCreateCommand: () => recordingCreateCommand2
|
|
4446
4468
|
});
|
|
4447
|
-
import { existsSync as existsSync4, readFileSync as
|
|
4469
|
+
import { existsSync as existsSync4, readFileSync as readFileSync4 } from "node:fs";
|
|
4448
4470
|
async function recordingGet2(id) {
|
|
4449
4471
|
const response = await adminApiGet(`/api/admin/recordings/${encodeURIComponent(id)}`);
|
|
4450
4472
|
return response.recording;
|
|
@@ -4553,7 +4575,7 @@ async function recordingUpdateCommand2(id, options = {}) {
|
|
|
4553
4575
|
throw new CliError2("file_not_found", `Tracklist file not found: ${options.tracklistFile}`);
|
|
4554
4576
|
}
|
|
4555
4577
|
try {
|
|
4556
|
-
body.tracklistJson = JSON.parse(
|
|
4578
|
+
body.tracklistJson = JSON.parse(readFileSync4(options.tracklistFile, "utf8"));
|
|
4557
4579
|
} catch {
|
|
4558
4580
|
throw new CliError2("invalid_tracklist", `Tracklist file is not valid JSON: ${options.tracklistFile}`);
|
|
4559
4581
|
}
|
|
@@ -4603,7 +4625,7 @@ async function recordingReplaceCuesCommand2(id, options = {}) {
|
|
|
4603
4625
|
}
|
|
4604
4626
|
let cues;
|
|
4605
4627
|
try {
|
|
4606
|
-
cues = JSON.parse(
|
|
4628
|
+
cues = JSON.parse(readFileSync4(options.cuesFile, "utf8"));
|
|
4607
4629
|
} catch {
|
|
4608
4630
|
throw new CliError2("invalid_cues", `Cues file is not valid JSON: ${options.cuesFile}`);
|
|
4609
4631
|
}
|
|
@@ -4629,7 +4651,7 @@ __export(exports_newsletter, {
|
|
|
4629
4651
|
newsletterDraftCommand: () => newsletterDraftCommand,
|
|
4630
4652
|
newsletterDeleteCommand: () => newsletterDeleteCommand
|
|
4631
4653
|
});
|
|
4632
|
-
import { existsSync as existsSync5, readFileSync as
|
|
4654
|
+
import { existsSync as existsSync5, readFileSync as readFileSync5 } from "node:fs";
|
|
4633
4655
|
function buildBody2(options, { requireContent }) {
|
|
4634
4656
|
const body = {};
|
|
4635
4657
|
if (options.contentFile !== undefined) {
|
|
@@ -4652,7 +4674,7 @@ function readContentFile(filePath) {
|
|
|
4652
4674
|
if (!existsSync5(filePath)) {
|
|
4653
4675
|
throw new CliError2("file_not_found", `Content file not found: ${filePath}`);
|
|
4654
4676
|
}
|
|
4655
|
-
const text =
|
|
4677
|
+
const text = readFileSync5(filePath, "utf-8");
|
|
4656
4678
|
try {
|
|
4657
4679
|
return JSON.parse(text);
|
|
4658
4680
|
} catch (error) {
|
|
@@ -5287,7 +5309,7 @@ var init_format2 = __esm(() => {
|
|
|
5287
5309
|
});
|
|
5288
5310
|
|
|
5289
5311
|
// src/cli.ts
|
|
5290
|
-
import { existsSync as existsSync6, readFileSync as
|
|
5312
|
+
import { existsSync as existsSync6, readFileSync as readFileSync6 } from "fs";
|
|
5291
5313
|
import path2 from "path";
|
|
5292
5314
|
|
|
5293
5315
|
// ../../node_modules/commander/lib/error.js
|
|
@@ -7824,7 +7846,7 @@ async function runTrackPreviewArchive(idOrLogId, options, previewArchiveUploadCo
|
|
|
7824
7846
|
console.log(` mime: ${result.mime}`);
|
|
7825
7847
|
}
|
|
7826
7848
|
async function runTrackObserve(idOrLogId, options, trackObserveCommand2) {
|
|
7827
|
-
const script = options.scriptFile ?
|
|
7849
|
+
const script = options.scriptFile ? readFileSync6(options.scriptFile, "utf8") : options.script;
|
|
7828
7850
|
if (!idOrLogId || !script || !script.trim()) {
|
|
7829
7851
|
throw new Error("Usage: fluncle admin tracks observe <track_id|log_id> (--script <text> | --script-file <file>) [--voice-id <id>] [--duration-ms <ms>] [--context-note <text>] [--json]");
|
|
7830
7852
|
}
|
|
@@ -7880,7 +7902,7 @@ async function runTrackContext(idOrLogId, options, trackContextCommand2) {
|
|
|
7880
7902
|
}
|
|
7881
7903
|
}
|
|
7882
7904
|
async function runTrackNote(idOrLogId, options, trackNoteCommand2) {
|
|
7883
|
-
const note = options.scriptFile ?
|
|
7905
|
+
const note = options.scriptFile ? readFileSync6(options.scriptFile, "utf8") : options.script;
|
|
7884
7906
|
if (!idOrLogId || !note || !note.trim()) {
|
|
7885
7907
|
throw new Error("Usage: fluncle admin tracks note <track_id|log_id> (--script <text> | --script-file <file>) [--json]");
|
|
7886
7908
|
}
|
package/package.json
CHANGED