@acpfx/audio-player 0.3.3 → 0.3.4

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -12
  2. package/package.json +3 -4
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ var __export = (target, all) => {
8
8
  // src/index.ts
9
9
  import { readFileSync as readFileSync2, existsSync } from "node:fs";
10
10
  import { join as join2, dirname as dirname2 } from "node:path";
11
- import { fileURLToPath } from "node:url";
11
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
12
12
 
13
13
  // ../node-sdk/src/index.ts
14
14
  import { createInterface } from "node:readline";
@@ -19,6 +19,7 @@ import { parse as parseYaml } from "yaml";
19
19
  // ../core/src/manifest.ts
20
20
  import { readFileSync } from "node:fs";
21
21
  import { join, dirname } from "node:path";
22
+ import { fileURLToPath } from "node:url";
22
23
 
23
24
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
24
25
  var external_exports = {};
@@ -13854,16 +13855,8 @@ function handleManifestFlag(manifestPath) {
13854
13855
  }
13855
13856
  function printManifest(manifestPath) {
13856
13857
  if (!manifestPath) {
13857
- const script = process.argv[1];
13858
- const scriptDir = dirname(script);
13859
- const scriptBase = script.replace(/\.[^.]+$/, "");
13860
- const colocated = `${scriptBase}.manifest.json`;
13861
- try {
13862
- readFileSync(colocated);
13863
- manifestPath = colocated;
13864
- } catch {
13865
- manifestPath = join(scriptDir, "manifest.json");
13866
- }
13858
+ const bundleDir = dirname(fileURLToPath(import.meta.url));
13859
+ manifestPath = join(bundleDir, "manifest.json");
13867
13860
  }
13868
13861
  try {
13869
13862
  const content = readFileSync(manifestPath, "utf8");
@@ -13902,7 +13895,7 @@ function onEvent(handler) {
13902
13895
  }
13903
13896
 
13904
13897
  // src/index.ts
13905
- var __dirname = dirname2(fileURLToPath(import.meta.url));
13898
+ var __dirname = dirname2(fileURLToPath2(import.meta.url));
13906
13899
  handleManifestFlag();
13907
13900
  var settings = JSON.parse(process.env.ACPFX_SETTINGS || "{}");
13908
13901
  var SPEECH_SOURCE = settings.speechSource ?? "tts";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acpfx/audio-player",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "acpfx-audio-player": "./dist/index.js"
@@ -12,10 +12,9 @@
12
12
  "sounds"
13
13
  ],
14
14
  "dependencies": {
15
- "speaker": "^0.5.5",
16
15
  "yaml": "^2.8.3",
17
- "@acpfx/core": "0.4.0",
18
- "@acpfx/node-sdk": "0.3.0"
16
+ "@acpfx/core": "0.4.1",
17
+ "@acpfx/node-sdk": "0.3.1"
19
18
  },
20
19
  "scripts": {
21
20
  "build": "esbuild src/index.ts --bundle --external:yaml --banner:js=\"#!/usr/bin/env node\" --platform=node --format=esm --outfile=dist/index.js && node ../../scripts/copy-manifest.js"