@xmov/avatar 2.0.0-beta.14 → 2.0.0-beta.15
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/agent/cdn-entry.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.modern.js +1 -1
- package/dist/index.module.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +6 -3
- package/src/agent/cdn-entry.ts +15 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmov/avatar",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.15",
|
|
4
4
|
"description": "魔珐数字人 JS-SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -26,8 +26,10 @@
|
|
|
26
26
|
"src/"
|
|
27
27
|
],
|
|
28
28
|
"scripts": {
|
|
29
|
-
"build": "
|
|
29
|
+
"build": "pnpm run build:core && pnpm run build:agent && pnpm run build:e2e:cdn && pnpm run test:e2e:cdn && node upload-sdk.js build",
|
|
30
|
+
"build:core": "microbundle --workers --define ENV=production,VERSION=$npm_package_version --external none --tsconfig tsconfig.json",
|
|
30
31
|
"build:agent": "microbundle --entry src/agent/index.ts --output dist/agent --format modern,esm,cjs,umd --external @xmov/avatar --alias ../index=@xmov/avatar --globals @xmov/avatar=XmovAvatar --name XingyunAvatarAgentModule --tsconfig tsconfig.agent.json && node scripts/build-agent-entry.mjs",
|
|
32
|
+
"build:e2e:cdn": "microbundle --entry src/agent/cdn-entry.ts --output cdn-dist/xmovAvatar_e2e.js --format iife --external none --workers --define ENV=production,VERSION=$npm_package_version --tsconfig tsconfig.agent.json --no-pkg-main --no-sourcemap",
|
|
31
33
|
"sdk": "pnpm --filter @xmov/avatar run --parallel --no-bail \"/^sdk:.+$/\"",
|
|
32
34
|
"sdk:core": "microbundle watch --workers --define ENV=development,VERSION=$npm_package_version --external none --tsconfig tsconfig.json",
|
|
33
35
|
"sdk:agent": "node scripts/build-agent-entry.mjs && microbundle watch --entry src/agent/index.ts --output dist/agent --format modern,esm,cjs,umd --external @xmov/avatar --alias ../index=@xmov/avatar --globals @xmov/avatar=XmovAvatar --name XingyunAvatarAgentModule --tsconfig tsconfig.agent.json",
|
|
@@ -36,7 +38,8 @@
|
|
|
36
38
|
"test:agent": "node scripts/run-agent-tests.mjs",
|
|
37
39
|
"test:agent:exports": "pnpm run build:agent && node scripts/test-agent-package-exports.mjs",
|
|
38
40
|
"test:agent:browser": "playwright test",
|
|
39
|
-
"
|
|
41
|
+
"test:e2e:cdn": "node scripts/test-e2e-cdn-build.mjs",
|
|
42
|
+
"lite": "node replaceString.js && pnpm run build:core && node upload-sdk.js lite",
|
|
40
43
|
"proto": "pbjs -t static-module -w closure -o src/proto/face_data_pb.js src/proto/face_data.proto",
|
|
41
44
|
"commitlint": "commitlint --edit",
|
|
42
45
|
"prepare": "husky"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import XingyunAvatarAgent, {
|
|
2
|
+
AgentE2EClient,
|
|
3
|
+
DEFAULT_AGENT_AUDIO,
|
|
4
|
+
MicrophoneController,
|
|
5
|
+
} from "./index";
|
|
6
|
+
|
|
7
|
+
Object.assign(XingyunAvatarAgent, {
|
|
8
|
+
AgentE2EClient,
|
|
9
|
+
DEFAULT_AGENT_AUDIO,
|
|
10
|
+
MicrophoneController,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
(globalThis as typeof globalThis & {
|
|
14
|
+
XingyunAvatarAgent: typeof XingyunAvatarAgent;
|
|
15
|
+
}).XingyunAvatarAgent = XingyunAvatarAgent;
|