@meframe/core 0.3.2 → 0.3.3
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.
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('node:fs/promises');
|
|
4
|
+
const path = require('node:path');
|
|
5
|
+
|
|
6
|
+
module.exports.resolveWorkersDir = async function resolveWorkersDir() {
|
|
7
|
+
const workerDir = path.join(__dirname, '..', 'workers');
|
|
8
|
+
await fs.access(workerDir);
|
|
9
|
+
return workerDir;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/platform/node.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAKzD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
export async function resolveWorkersDir() {
|
|
6
|
+
const distDir = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const workerDir = path.join(distDir, '..', 'workers');
|
|
8
|
+
await fs.access(workerDir);
|
|
9
|
+
return workerDir;
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meframe/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Next generation media processing framework based on WebCodecs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,6 +30,11 @@
|
|
|
30
30
|
"./vite-plugin": {
|
|
31
31
|
"types": "./dist/vite-plugin.d.ts",
|
|
32
32
|
"import": "./dist/vite-plugin.js"
|
|
33
|
+
},
|
|
34
|
+
"./node": {
|
|
35
|
+
"types": "./dist/platform/node.d.ts",
|
|
36
|
+
"import": "./dist/platform/node.js",
|
|
37
|
+
"require": "./dist/platform/node.cjs"
|
|
33
38
|
}
|
|
34
39
|
},
|
|
35
40
|
"files": [
|
|
@@ -92,8 +97,9 @@
|
|
|
92
97
|
},
|
|
93
98
|
"scripts": {
|
|
94
99
|
"dev": "vite",
|
|
95
|
-
"build": "tsc && vite build && pnpm build:workers",
|
|
100
|
+
"build": "tsc && vite build && pnpm build:workers && pnpm build:node-cjs",
|
|
96
101
|
"build:workers": "vite build --config vite.worker.config.ts && node scripts/generate-worker-manifest.js",
|
|
102
|
+
"build:node-cjs": "node scripts/generate-node-cjs.js",
|
|
97
103
|
"preview": "vite preview",
|
|
98
104
|
"test": "vitest run",
|
|
99
105
|
"test:watch": "vitest",
|