@effing/ffmpeg 0.11.0 → 0.11.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/dist/index.cjs ADDED
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key2 of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key2) && key2 !== except)
16
+ __defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ pathToFFmpeg: () => pathToFFmpeg
34
+ });
35
+ module.exports = __toCommonJS(index_exports);
36
+
37
+ // ../../node_modules/.pnpm/tsup@8.5.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js
38
+ var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
39
+ var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
40
+
41
+ // src/index.ts
42
+ var import_node_os = __toESM(require("os"), 1);
43
+ var import_node_path = __toESM(require("path"), 1);
44
+ var import_node_url = require("url");
45
+ var __dirname = import_node_path.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
46
+ var SUPPORTED = /* @__PURE__ */ new Set([
47
+ "darwin-x64",
48
+ "darwin-arm64",
49
+ "linux-x64",
50
+ "linux-ia32",
51
+ "linux-arm64",
52
+ "linux-arm",
53
+ "win32-x64",
54
+ "win32-ia32"
55
+ ]);
56
+ var platform = import_node_os.default.platform();
57
+ var arch = import_node_os.default.arch();
58
+ var key = `${platform}-${arch}`;
59
+ var binaryName = platform === "win32" ? "ffmpeg.exe" : "ffmpeg";
60
+ var ffmpegPath = SUPPORTED.has(key) ? import_node_path.default.join(__dirname, "..", binaryName) : null;
61
+ var pathToFFmpeg = ffmpegPath;
62
+ // Annotate the CommonJS export names for ESM import in node:
63
+ 0 && (module.exports = {
64
+ pathToFFmpeg
65
+ });
66
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../../../node_modules/.pnpm/tsup@8.5.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js"],"sourcesContent":["import os from \"node:os\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\nconst SUPPORTED = new Set([\n \"darwin-x64\",\n \"darwin-arm64\",\n \"linux-x64\",\n \"linux-ia32\",\n \"linux-arm64\",\n \"linux-arm\",\n \"win32-x64\",\n \"win32-ia32\",\n]);\n\nconst platform = os.platform();\nconst arch = os.arch();\nconst key = `${platform}-${arch}`;\n\nconst binaryName = platform === \"win32\" ? \"ffmpeg.exe\" : \"ffmpeg\";\n\nconst ffmpegPath: string | null = SUPPORTED.has(key)\n ? path.join(__dirname, \"..\", binaryName)\n : null;\n\nexport const pathToFFmpeg = ffmpegPath;\n","// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () => \n typeof document === \"undefined\" \n ? new URL(`file:${__filename}`).href \n : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') \n ? document.currentScript.src \n : new URL(\"main.js\", document.baseURI).href;\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKA,IAAM,mBAAmB,MACvB,OAAO,aAAa,cAChB,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,OAC7B,SAAS,iBAAiB,SAAS,cAAc,QAAQ,YAAY,MAAM,WAC1E,SAAS,cAAc,MACvB,IAAI,IAAI,WAAW,SAAS,OAAO,EAAE;AAEtC,IAAM,gBAAgC,iCAAiB;;;ADZ9D,qBAAe;AACf,uBAAiB;AACjB,sBAA8B;AAE9B,IAAM,YAAY,iBAAAA,QAAK,YAAQ,+BAAc,aAAe,CAAC;AAE7D,IAAM,YAAY,oBAAI,IAAI;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,IAAM,WAAW,eAAAC,QAAG,SAAS;AAC7B,IAAM,OAAO,eAAAA,QAAG,KAAK;AACrB,IAAM,MAAM,GAAG,QAAQ,IAAI,IAAI;AAE/B,IAAM,aAAa,aAAa,UAAU,eAAe;AAEzD,IAAM,aAA4B,UAAU,IAAI,GAAG,IAC/C,iBAAAD,QAAK,KAAK,WAAW,MAAM,UAAU,IACrC;AAEG,IAAM,eAAe;","names":["path","os"]}
@@ -0,0 +1,3 @@
1
+ declare const pathToFFmpeg: string | null;
2
+
3
+ export { pathToFFmpeg };
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@effing/ffmpeg",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "description": "FFmpeg binary downloader for Effing",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
8
8
  "types": "./dist/index.d.ts",
9
- "import": "./dist/index.js"
9
+ "import": "./dist/index.js",
10
+ "require": "./dist/index.cjs"
10
11
  }
11
12
  },
12
13
  "files": [