@lovo/matter-cli 0.4.0 → 0.5.0

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 (77) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +68 -4
  3. package/dist/add-T7IRU2NK.js +11 -0
  4. package/dist/{chunk-4XUN2PKU.js → chunk-53DI7V2J.js} +22 -21
  5. package/dist/chunk-53DI7V2J.js.map +1 -0
  6. package/dist/chunk-D4HDZEJT.js +37 -0
  7. package/dist/chunk-D4HDZEJT.js.map +1 -0
  8. package/dist/{chunk-OJWKSIZ5.js → chunk-FHRQIHCN.js} +32 -25
  9. package/dist/chunk-FHRQIHCN.js.map +1 -0
  10. package/dist/chunk-Q7CQW6AH.js +27 -0
  11. package/dist/chunk-Q7CQW6AH.js.map +1 -0
  12. package/dist/{chunk-M6S6HYHE.js → chunk-R7OX6KUP.js} +48 -44
  13. package/dist/chunk-R7OX6KUP.js.map +1 -0
  14. package/dist/chunk-RRL35RGP.js +104 -0
  15. package/dist/chunk-RRL35RGP.js.map +1 -0
  16. package/dist/chunk-TBB7CTPP.js +77 -0
  17. package/dist/chunk-TBB7CTPP.js.map +1 -0
  18. package/dist/chunk-YADIAD35.js +16322 -0
  19. package/dist/chunk-YADIAD35.js.map +1 -0
  20. package/dist/chunk-YAWX2IU3.js +46 -0
  21. package/dist/chunk-YAWX2IU3.js.map +1 -0
  22. package/dist/chunk-YSFTOGZX.js +119 -0
  23. package/dist/chunk-YSFTOGZX.js.map +1 -0
  24. package/dist/commands/poster.d.ts +19 -0
  25. package/dist/commands/poster.js +15 -0
  26. package/dist/commands/poster.js.map +1 -0
  27. package/dist/dist-I76TGDBX.js +547 -0
  28. package/dist/dist-I76TGDBX.js.map +1 -0
  29. package/dist/harness/frameReady.ts +35 -0
  30. package/dist/harness/index.html +20 -0
  31. package/dist/harness/index.tsx +40 -0
  32. package/dist/index.js +50 -21
  33. package/dist/index.js.map +1 -1
  34. package/dist/{init-W43YVGBI.js → init-NB5EOU5H.js} +3 -2
  35. package/dist/init-NB5EOU5H.js.map +1 -0
  36. package/dist/{list-S626E7NZ.js → list-L725RQM3.js} +6 -5
  37. package/dist/list-L725RQM3.js.map +1 -0
  38. package/dist/magic-string.es-DKS3S7WW.js +1310 -0
  39. package/dist/magic-string.es-DKS3S7WW.js.map +1 -0
  40. package/dist/poster/bundle.d.ts +12 -0
  41. package/dist/poster/bundle.js +9 -0
  42. package/dist/poster/bundle.js.map +1 -0
  43. package/dist/poster/bundle.test.d.ts +2 -0
  44. package/dist/poster/bundle.test.js +49 -0
  45. package/dist/poster/bundle.test.js.map +1 -0
  46. package/dist/poster/e2e.test.d.ts +2 -0
  47. package/dist/poster/e2e.test.js +103 -0
  48. package/dist/poster/e2e.test.js.map +1 -0
  49. package/dist/poster/playwright.d.ts +19 -0
  50. package/dist/poster/playwright.js +11 -0
  51. package/dist/poster/playwright.js.map +1 -0
  52. package/dist/poster/playwright.test.d.ts +2 -0
  53. package/dist/poster/playwright.test.js +28 -0
  54. package/dist/poster/playwright.test.js.map +1 -0
  55. package/dist/poster/projectRoot.d.ts +3 -0
  56. package/dist/poster/projectRoot.js +9 -0
  57. package/dist/poster/projectRoot.js.map +1 -0
  58. package/dist/poster/projectRoot.test.d.ts +2 -0
  59. package/dist/poster/projectRoot.test.js +47 -0
  60. package/dist/poster/projectRoot.test.js.map +1 -0
  61. package/dist/poster/server.d.ts +18 -0
  62. package/dist/poster/server.js +9 -0
  63. package/dist/poster/server.js.map +1 -0
  64. package/dist/poster/server.test.d.ts +2 -0
  65. package/dist/poster/server.test.js +54 -0
  66. package/dist/poster/server.test.js.map +1 -0
  67. package/dist/{update-3BHHOUCS.js → update-WK7CA42P.js} +26 -17
  68. package/dist/update-WK7CA42P.js.map +1 -0
  69. package/package.json +19 -3
  70. package/dist/add-ABC455QH.js +0 -10
  71. package/dist/chunk-4XUN2PKU.js.map +0 -1
  72. package/dist/chunk-M6S6HYHE.js.map +0 -1
  73. package/dist/chunk-OJWKSIZ5.js.map +0 -1
  74. package/dist/init-W43YVGBI.js.map +0 -1
  75. package/dist/list-S626E7NZ.js.map +0 -1
  76. package/dist/update-3BHHOUCS.js.map +0 -1
  77. /package/dist/{add-ABC455QH.js.map → add-T7IRU2NK.js.map} +0 -0
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/poster/server.ts
4
+ import { createServer } from "http";
5
+ async function createPosterServer(opts) {
6
+ const server = createServer((request, response) => {
7
+ const url2 = request.url ?? "/";
8
+ if (url2 === "/" || url2 === "/index.html") {
9
+ response.writeHead(200, { "content-type": "text/html; charset=utf-8" });
10
+ response.end(opts.bundle.html);
11
+ return;
12
+ }
13
+ if (url2 === "/harness.js") {
14
+ response.writeHead(200, { "content-type": "text/javascript; charset=utf-8" });
15
+ response.end(opts.bundle.js);
16
+ return;
17
+ }
18
+ if (url2 === "/config.json") {
19
+ response.writeHead(200, { "content-type": "application/json; charset=utf-8" });
20
+ response.end(JSON.stringify(opts.config));
21
+ return;
22
+ }
23
+ response.writeHead(404, { "content-type": "text/plain" });
24
+ response.end("not found");
25
+ });
26
+ await new Promise((resolve) => {
27
+ server.listen(0, "127.0.0.1", resolve);
28
+ });
29
+ const rawAddress = server.address();
30
+ if (rawAddress === null || typeof rawAddress === "string") {
31
+ throw new Error("matter poster: expected server to bind a TCP address");
32
+ }
33
+ const address = rawAddress;
34
+ const url = `http://127.0.0.1:${address.port}`;
35
+ return {
36
+ url,
37
+ close: () => new Promise((resolve, reject) => {
38
+ server.close((closeError) => closeError ? reject(closeError) : resolve());
39
+ })
40
+ };
41
+ }
42
+
43
+ export {
44
+ createPosterServer
45
+ };
46
+ //# sourceMappingURL=chunk-YAWX2IU3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/poster/server.ts"],"sourcesContent":["import { createServer, type Server } from 'node:http';\nimport type { AddressInfo } from 'node:net';\n\nexport interface PosterBundle {\n html: string;\n js: string;\n}\n\nexport interface PosterRenderConfig {\n width: number;\n height: number;\n}\n\nexport interface PosterServer {\n url: string;\n close: () => Promise<void>;\n}\n\nexport async function createPosterServer(opts: {\n bundle: PosterBundle;\n config: PosterRenderConfig;\n}): Promise<PosterServer> {\n const server: Server = createServer((request, response) => {\n const url = request.url ?? '/';\n\n if (url === '/' || url === '/index.html') {\n response.writeHead(200, { 'content-type': 'text/html; charset=utf-8' });\n response.end(opts.bundle.html);\n\n return;\n }\n if (url === '/harness.js') {\n response.writeHead(200, { 'content-type': 'text/javascript; charset=utf-8' });\n response.end(opts.bundle.js);\n\n return;\n }\n if (url === '/config.json') {\n response.writeHead(200, { 'content-type': 'application/json; charset=utf-8' });\n response.end(JSON.stringify(opts.config));\n\n return;\n }\n response.writeHead(404, { 'content-type': 'text/plain' });\n response.end('not found');\n });\n\n await new Promise<void>((resolve) => {\n server.listen(0, '127.0.0.1', resolve);\n });\n\n const rawAddress = server.address();\n\n if (rawAddress === null || typeof rawAddress === 'string') {\n throw new Error('matter poster: expected server to bind a TCP address');\n }\n const address: AddressInfo = rawAddress;\n const url = `http://127.0.0.1:${address.port}`;\n\n return {\n url,\n close: () =>\n new Promise<void>((resolve, reject) => {\n server.close((closeError) => (closeError ? reject(closeError) : resolve()));\n }),\n };\n}\n"],"mappings":";;;AAAA,SAAS,oBAAiC;AAkB1C,eAAsB,mBAAmB,MAGf;AACxB,QAAM,SAAiB,aAAa,CAAC,SAAS,aAAa;AACzD,UAAMA,OAAM,QAAQ,OAAO;AAE3B,QAAIA,SAAQ,OAAOA,SAAQ,eAAe;AACxC,eAAS,UAAU,KAAK,EAAE,gBAAgB,2BAA2B,CAAC;AACtE,eAAS,IAAI,KAAK,OAAO,IAAI;AAE7B;AAAA,IACF;AACA,QAAIA,SAAQ,eAAe;AACzB,eAAS,UAAU,KAAK,EAAE,gBAAgB,iCAAiC,CAAC;AAC5E,eAAS,IAAI,KAAK,OAAO,EAAE;AAE3B;AAAA,IACF;AACA,QAAIA,SAAQ,gBAAgB;AAC1B,eAAS,UAAU,KAAK,EAAE,gBAAgB,kCAAkC,CAAC;AAC7E,eAAS,IAAI,KAAK,UAAU,KAAK,MAAM,CAAC;AAExC;AAAA,IACF;AACA,aAAS,UAAU,KAAK,EAAE,gBAAgB,aAAa,CAAC;AACxD,aAAS,IAAI,WAAW;AAAA,EAC1B,CAAC;AAED,QAAM,IAAI,QAAc,CAAC,YAAY;AACnC,WAAO,OAAO,GAAG,aAAa,OAAO;AAAA,EACvC,CAAC;AAED,QAAM,aAAa,OAAO,QAAQ;AAElC,MAAI,eAAe,QAAQ,OAAO,eAAe,UAAU;AACzD,UAAM,IAAI,MAAM,sDAAsD;AAAA,EACxE;AACA,QAAM,UAAuB;AAC7B,QAAM,MAAM,oBAAoB,QAAQ,IAAI;AAE5C,SAAO;AAAA,IACL;AAAA,IACA,OAAO,MACL,IAAI,QAAc,CAAC,SAAS,WAAW;AACrC,aAAO,MAAM,CAAC,eAAgB,aAAa,OAAO,UAAU,IAAI,QAAQ,CAAE;AAAA,IAC5E,CAAC;AAAA,EACL;AACF;","names":["url"]}
@@ -0,0 +1,119 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ createPosterServer
4
+ } from "./chunk-YAWX2IU3.js";
5
+ import {
6
+ bundlePoster
7
+ } from "./chunk-TBB7CTPP.js";
8
+ import {
9
+ launchAndScreenshot
10
+ } from "./chunk-RRL35RGP.js";
11
+ import {
12
+ findProjectRoot
13
+ } from "./chunk-Q7CQW6AH.js";
14
+
15
+ // src/commands/poster.ts
16
+ import { mkdir, stat } from "fs/promises";
17
+ import { dirname, extname, resolve } from "path";
18
+ var READY_TIMEOUT_MS = 1e4;
19
+ var DEFAULT_JPEG_QUALITY = 80;
20
+ function normalizeType(rawType) {
21
+ const normalizedType = rawType?.toLowerCase();
22
+ if (normalizedType === void 0 || normalizedType === "jpg" || normalizedType === "jpeg")
23
+ return "jpeg";
24
+ if (normalizedType === "png") return "png";
25
+ throw new Error(`--type must be 'png' or 'jpg' (got ${String(rawType)})`);
26
+ }
27
+ function extensionFor(format) {
28
+ return format === "png" ? ".png" : ".jpg";
29
+ }
30
+ function resolveOutPath(out, format) {
31
+ const ext = extname(out).toLowerCase();
32
+ const expected = extensionFor(format);
33
+ if (ext === expected) return out;
34
+ if (format === "jpeg" && ext === ".jpeg") return out;
35
+ if (ext === ".png" || ext === ".jpg" || ext === ".jpeg") {
36
+ throw new Error(
37
+ `--out extension '${ext}' doesn't match --type '${format === "jpeg" ? "jpg" : "png"}'`
38
+ );
39
+ }
40
+ return `${out}${expected}`;
41
+ }
42
+ async function runPoster(opts, io = { cwd: process.cwd(), log: console.log }) {
43
+ if (!Number.isInteger(opts.width) || opts.width <= 0 || opts.width > 4096) {
44
+ throw new Error(`--width must be a positive integer \u2264 4096 (got ${opts.width})`);
45
+ }
46
+ if (!Number.isInteger(opts.height) || opts.height <= 0 || opts.height > 4096) {
47
+ throw new Error(`--height must be a positive integer \u2264 4096 (got ${opts.height})`);
48
+ }
49
+ if (!Number.isFinite(opts.timeSeconds) || opts.timeSeconds < 0) {
50
+ throw new Error(`--time must be \u2265 0 (got ${opts.timeSeconds})`);
51
+ }
52
+ if (opts.quality !== void 0) {
53
+ if (!Number.isInteger(opts.quality) || opts.quality < 1 || opts.quality > 100) {
54
+ throw new Error(`--quality must be an integer 1\u2013100 (got ${opts.quality})`);
55
+ }
56
+ }
57
+ const format = normalizeType(opts.type);
58
+ const resolvedOut = resolveOutPath(opts.out, format);
59
+ if (format === "png" && opts.quality !== void 0) {
60
+ io.log(`warn: --quality is ignored for PNG output (lossless)`);
61
+ }
62
+ const quality = format === "jpeg" ? opts.quality ?? DEFAULT_JPEG_QUALITY : void 0;
63
+ const fromAbs = resolve(io.cwd, opts.from);
64
+ const outAbs = resolve(io.cwd, resolvedOut);
65
+ try {
66
+ await stat(fromAbs);
67
+ } catch {
68
+ throw new Error(`--from ${opts.from}: file not found`);
69
+ }
70
+ const projectRoot = await findProjectRoot(fromAbs);
71
+ const bundle = await bundlePoster({
72
+ from: fromAbs,
73
+ exportName: opts.exportName,
74
+ projectRoot
75
+ });
76
+ const server = await createPosterServer({
77
+ bundle,
78
+ config: { width: opts.width, height: opts.height }
79
+ });
80
+ try {
81
+ await mkdir(dirname(outAbs), { recursive: true });
82
+ const { bytes } = await launchAndScreenshot({
83
+ url: server.url,
84
+ width: opts.width,
85
+ height: opts.height,
86
+ timeSeconds: opts.timeSeconds,
87
+ readyTimeoutMs: READY_TIMEOUT_MS,
88
+ outPath: outAbs,
89
+ projectRoot,
90
+ format,
91
+ quality
92
+ });
93
+ io.log(`Wrote poster: ${resolvedOut} (${opts.width}\xD7${opts.height}, ${formatBytes(bytes)})`);
94
+ io.log("");
95
+ io.log(`Wire it up inside ${opts.from}:`);
96
+ io.log(' <ShaderScene fallback={<img src="' + posterPublicSrc(resolvedOut) + '" alt="" />}>');
97
+ io.log(" ...");
98
+ io.log(" </ShaderScene>");
99
+ } finally {
100
+ await server.close();
101
+ }
102
+ }
103
+ function formatBytes(byteCount) {
104
+ if (byteCount < 1024) return `${byteCount} B`;
105
+ if (byteCount < 1024 * 1024) return `${(byteCount / 1024).toFixed(1)} KB`;
106
+ return `${(byteCount / 1024 / 1024).toFixed(2)} MB`;
107
+ }
108
+ function posterPublicSrc(outPath) {
109
+ const publicSegmentIndex = outPath.replace(/\\/g, "/").indexOf("/public/");
110
+ if (publicSegmentIndex >= 0)
111
+ return outPath.replace(/\\/g, "/").slice(publicSegmentIndex + "/public".length);
112
+ return outPath;
113
+ }
114
+
115
+ export {
116
+ resolveOutPath,
117
+ runPoster
118
+ };
119
+ //# sourceMappingURL=chunk-YSFTOGZX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/poster.ts"],"sourcesContent":["import { mkdir, stat } from 'node:fs/promises';\nimport { dirname, extname, resolve } from 'node:path';\n\nimport { bundlePoster } from '../poster/bundle.js';\nimport { launchAndScreenshot } from '../poster/playwright.js';\nimport { findProjectRoot } from '../poster/projectRoot.js';\nimport { createPosterServer } from '../poster/server.js';\n\nexport type PosterFormat = 'jpeg' | 'png';\n\nexport interface PosterOptions {\n from: string;\n out: string;\n exportName: string;\n timeSeconds: number;\n width: number;\n height: number;\n type?: string;\n quality?: number;\n}\n\nexport interface PosterIO {\n cwd: string;\n log: (line: string) => void;\n}\n\nconst READY_TIMEOUT_MS = 10_000;\nconst DEFAULT_JPEG_QUALITY = 80;\n\nfunction normalizeType(rawType: string | undefined): PosterFormat {\n const normalizedType = rawType?.toLowerCase();\n\n if (normalizedType === undefined || normalizedType === 'jpg' || normalizedType === 'jpeg')\n return 'jpeg';\n if (normalizedType === 'png') return 'png';\n\n throw new Error(`--type must be 'png' or 'jpg' (got ${String(rawType)})`);\n}\n\nfunction extensionFor(format: PosterFormat): string {\n return format === 'png' ? '.png' : '.jpg';\n}\n\nexport function resolveOutPath(out: string, format: PosterFormat): string {\n const ext = extname(out).toLowerCase();\n const expected = extensionFor(format);\n\n if (ext === expected) return out;\n if (format === 'jpeg' && ext === '.jpeg') return out;\n if (ext === '.png' || ext === '.jpg' || ext === '.jpeg') {\n throw new Error(\n `--out extension '${ext}' doesn't match --type '${format === 'jpeg' ? 'jpg' : 'png'}'`,\n );\n }\n\n return `${out}${expected}`;\n}\n\nexport async function runPoster(\n opts: PosterOptions,\n io: PosterIO = { cwd: process.cwd(), log: console.log },\n): Promise<void> {\n if (!Number.isInteger(opts.width) || opts.width <= 0 || opts.width > 4096) {\n throw new Error(`--width must be a positive integer ≤ 4096 (got ${opts.width})`);\n }\n if (!Number.isInteger(opts.height) || opts.height <= 0 || opts.height > 4096) {\n throw new Error(`--height must be a positive integer ≤ 4096 (got ${opts.height})`);\n }\n if (!Number.isFinite(opts.timeSeconds) || opts.timeSeconds < 0) {\n throw new Error(`--time must be ≥ 0 (got ${opts.timeSeconds})`);\n }\n if (opts.quality !== undefined) {\n if (!Number.isInteger(opts.quality) || opts.quality < 1 || opts.quality > 100) {\n throw new Error(`--quality must be an integer 1–100 (got ${opts.quality})`);\n }\n }\n\n const format = normalizeType(opts.type);\n const resolvedOut = resolveOutPath(opts.out, format);\n\n if (format === 'png' && opts.quality !== undefined) {\n io.log(`warn: --quality is ignored for PNG output (lossless)`);\n }\n\n const quality = format === 'jpeg' ? (opts.quality ?? DEFAULT_JPEG_QUALITY) : undefined;\n\n const fromAbs = resolve(io.cwd, opts.from);\n const outAbs = resolve(io.cwd, resolvedOut);\n\n try {\n await stat(fromAbs);\n } catch {\n throw new Error(`--from ${opts.from}: file not found`);\n }\n\n const projectRoot = await findProjectRoot(fromAbs);\n const bundle = await bundlePoster({\n from: fromAbs,\n exportName: opts.exportName,\n projectRoot,\n });\n\n const server = await createPosterServer({\n bundle,\n config: { width: opts.width, height: opts.height },\n });\n\n try {\n await mkdir(dirname(outAbs), { recursive: true });\n const { bytes } = await launchAndScreenshot({\n url: server.url,\n width: opts.width,\n height: opts.height,\n timeSeconds: opts.timeSeconds,\n readyTimeoutMs: READY_TIMEOUT_MS,\n outPath: outAbs,\n projectRoot,\n format,\n quality,\n });\n\n io.log(`Wrote poster: ${resolvedOut} (${opts.width}×${opts.height}, ${formatBytes(bytes)})`);\n io.log('');\n io.log(`Wire it up inside ${opts.from}:`);\n io.log(' <ShaderScene fallback={<img src=\"' + posterPublicSrc(resolvedOut) + '\" alt=\"\" />}>');\n io.log(' ...');\n io.log(' </ShaderScene>');\n } finally {\n await server.close();\n }\n}\n\nfunction formatBytes(byteCount: number): string {\n if (byteCount < 1024) return `${byteCount} B`;\n if (byteCount < 1024 * 1024) return `${(byteCount / 1024).toFixed(1)} KB`;\n\n return `${(byteCount / 1024 / 1024).toFixed(2)} MB`;\n}\n\nfunction posterPublicSrc(outPath: string): string {\n // Best-effort hint: if the path goes through `/public/`, suggest the served form.\n const publicSegmentIndex = outPath.replace(/\\\\/g, '/').indexOf('/public/');\n\n if (publicSegmentIndex >= 0)\n return outPath.replace(/\\\\/g, '/').slice(publicSegmentIndex + '/public'.length);\n\n return outPath;\n}\n"],"mappings":";;;;;;;;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iBAAiB,WAAW,KAAK,KAAK,KAAK,OAAI,KAAK,MAAM,KAAK,YAAY,KAAK,CAAC,GAAG;AAC3F,OAAG,IAAI,EAAE;AACT,OAAG,IAAI,qBAAqB,KAAK,IAAI,GAAG;AACxC,OAAG,IAAI,wCAAwC,gBAAgB,WAAW,IAAI,eAAe;AAC7F,OAAG,IAAI,SAAS;AAChB,OAAG,IAAI,kBAAkB;AAAA,EAC3B,UAAE;AACA,UAAM,OAAO,MAAM;AAAA,EACrB;AACF;AAEA,SAAS,YAAY,WAA2B;AAC9C,MAAI,YAAY,KAAM,QAAO,GAAG,SAAS;AACzC,MAAI,YAAY,OAAO,KAAM,QAAO,IAAI,YAAY,MAAM,QAAQ,CAAC,CAAC;AAEpE,SAAO,IAAI,YAAY,OAAO,MAAM,QAAQ,CAAC,CAAC;AAChD;AAEA,SAAS,gBAAgB,SAAyB;AAEhD,QAAM,qBAAqB,QAAQ,QAAQ,OAAO,GAAG,EAAE,QAAQ,UAAU;AAEzE,MAAI,sBAAsB;AACxB,WAAO,QAAQ,QAAQ,OAAO,GAAG,EAAE,MAAM,qBAAqB,UAAU,MAAM;AAEhF,SAAO;AACT;","names":[]}
@@ -0,0 +1,19 @@
1
+ type PosterFormat = 'jpeg' | 'png';
2
+ interface PosterOptions {
3
+ from: string;
4
+ out: string;
5
+ exportName: string;
6
+ timeSeconds: number;
7
+ width: number;
8
+ height: number;
9
+ type?: string;
10
+ quality?: number;
11
+ }
12
+ interface PosterIO {
13
+ cwd: string;
14
+ log: (line: string) => void;
15
+ }
16
+ declare function resolveOutPath(out: string, format: PosterFormat): string;
17
+ declare function runPoster(opts: PosterOptions, io?: PosterIO): Promise<void>;
18
+
19
+ export { type PosterFormat, type PosterIO, type PosterOptions, resolveOutPath, runPoster };
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ resolveOutPath,
4
+ runPoster
5
+ } from "../chunk-YSFTOGZX.js";
6
+ import "../chunk-YAWX2IU3.js";
7
+ import "../chunk-TBB7CTPP.js";
8
+ import "../chunk-RRL35RGP.js";
9
+ import "../chunk-Q7CQW6AH.js";
10
+ import "../chunk-D4HDZEJT.js";
11
+ export {
12
+ resolveOutPath,
13
+ runPoster
14
+ };
15
+ //# sourceMappingURL=poster.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}