@acpfx/mic-file 0.2.5 → 0.2.6

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 +3 -10
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -18,6 +18,7 @@ import { parse as parseYaml } from "yaml";
18
18
  // ../core/src/manifest.ts
19
19
  import { readFileSync } from "node:fs";
20
20
  import { join, dirname } from "node:path";
21
+ import { fileURLToPath } from "node:url";
21
22
 
22
23
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
23
24
  var external_exports = {};
@@ -13853,16 +13854,8 @@ function handleManifestFlag(manifestPath) {
13853
13854
  }
13854
13855
  function printManifest(manifestPath) {
13855
13856
  if (!manifestPath) {
13856
- const script = process.argv[1];
13857
- const scriptDir = dirname(script);
13858
- const scriptBase = script.replace(/\.[^.]+$/, "");
13859
- const colocated = `${scriptBase}.manifest.json`;
13860
- try {
13861
- readFileSync(colocated);
13862
- manifestPath = colocated;
13863
- } catch {
13864
- manifestPath = join(scriptDir, "manifest.json");
13865
- }
13857
+ const bundleDir = dirname(fileURLToPath(import.meta.url));
13858
+ manifestPath = join(bundleDir, "manifest.json");
13866
13859
  }
13867
13860
  try {
13868
13861
  const content = readFileSync(manifestPath, "utf8");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acpfx/mic-file",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "acpfx-mic-file": "./dist/index.js"
@@ -12,8 +12,8 @@
12
12
  ],
13
13
  "dependencies": {
14
14
  "yaml": "^2.8.3",
15
- "@acpfx/core": "0.4.0",
16
- "@acpfx/node-sdk": "0.3.0"
15
+ "@acpfx/core": "0.4.1",
16
+ "@acpfx/node-sdk": "0.3.1"
17
17
  },
18
18
  "scripts": {
19
19
  "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"