@editframe/api 0.15.0-beta.1 → 0.15.0-beta.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.
@@ -1,15 +1,14 @@
1
1
  import path from "node:path";
2
2
  import { PassThrough } from "node:stream";
3
3
  import react from "@vitejs/plugin-react";
4
+ import * as tar from "tar";
4
5
  import { build } from "vite";
5
6
  import { viteSingleFile } from "vite-plugin-singlefile";
6
- import tsconfigPaths from "vite-tsconfig-paths";
7
- import * as tar from "tar";
7
+ import tsconfigPathsPlugin from "vite-tsconfig-paths";
8
8
  import { randomUUID } from "node:crypto";
9
9
  import { createReadableStreamFromReadable } from "../utils/createReadableStreamFromReadable.js";
10
10
  const bundleRender = async (options) => {
11
11
  const outDir = path.join(process.cwd(), "renders", randomUUID());
12
- console.log("outDir", outDir);
13
12
  await build({
14
13
  root: options.root,
15
14
  define: {
@@ -22,7 +21,7 @@ const bundleRender = async (options) => {
22
21
  }
23
22
  },
24
23
  plugins: [
25
- tsconfigPaths(),
24
+ tsconfigPathsPlugin(),
26
25
  react({
27
26
  include: "**/*.{jsx,js,tsx,ts}",
28
27
  jsxRuntime: "automatic"
@@ -37,7 +36,6 @@ const bundleRender = async (options) => {
37
36
  },
38
37
  ["."]
39
38
  );
40
- console.log("outDir", outDir);
41
39
  const passthrough = new PassThrough();
42
40
  tarStream.pipe(passthrough);
43
41
  const tarReadStream = createReadableStreamFromReadable(passthrough);
@@ -14,7 +14,7 @@ const CreateRenderPayload = z.object({
14
14
  const createRender = async (client, payload) => {
15
15
  log("Creating render", payload);
16
16
  payload.strategy ??= "v1";
17
- payload.work_slice_ms ??= 4e3;
17
+ payload.work_slice_ms ??= 2e3;
18
18
  const response = await client.authenticatedFetch("/api/v1/renders", {
19
19
  method: "POST",
20
20
  body: JSON.stringify(payload)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@editframe/api",
3
- "version": "0.15.0-beta.1",
3
+ "version": "0.15.0-beta.3",
4
4
  "description": "API functions for EditFrame",
5
5
  "exports": {
6
6
  ".": {
@@ -39,7 +39,7 @@
39
39
  "vite-plugin-dts": "^4.0.3"
40
40
  },
41
41
  "dependencies": {
42
- "@editframe/assets": "0.15.0-beta.1",
42
+ "@editframe/assets": "0.15.0-beta.3",
43
43
  "@vitejs/plugin-react": "^4.3.4",
44
44
  "vite-tsconfig-paths": "^4.3.2",
45
45
  "vite": "^5.4.11",
@@ -2,11 +2,10 @@ import path from "node:path";
2
2
  import { PassThrough } from "node:stream";
3
3
 
4
4
  import react from "@vitejs/plugin-react";
5
+ import * as tar from "tar";
5
6
  import { build } from "vite";
6
7
  import { viteSingleFile } from "vite-plugin-singlefile";
7
- import tsconfigPaths from "vite-tsconfig-paths";
8
-
9
- import * as tar from "tar";
8
+ import tsconfigPathsPlugin from "vite-tsconfig-paths";
10
9
 
11
10
  import { randomUUID } from "node:crypto";
12
11
  import { createReadableStreamFromReadable } from "../utils/createReadableStreamFromReadable.ts";
@@ -19,8 +18,6 @@ interface BundlerOptions {
19
18
  export const bundleRender = async (options: BundlerOptions) => {
20
19
  const outDir = path.join(process.cwd(), "renders", randomUUID());
21
20
 
22
- console.log("outDir", outDir);
23
-
24
21
  await build({
25
22
  root: options.root,
26
23
  define: {
@@ -33,7 +30,7 @@ export const bundleRender = async (options: BundlerOptions) => {
33
30
  },
34
31
  },
35
32
  plugins: [
36
- tsconfigPaths(),
33
+ tsconfigPathsPlugin(),
37
34
  react({
38
35
  include: "**/*.{jsx,js,tsx,ts}",
39
36
  jsxRuntime: "automatic",
@@ -50,8 +47,6 @@ export const bundleRender = async (options: BundlerOptions) => {
50
47
  ["."],
51
48
  );
52
49
 
53
- console.log("outDir", outDir);
54
-
55
50
  const passthrough = new PassThrough();
56
51
  tarStream.pipe(passthrough);
57
52
  const tarReadStream = createReadableStreamFromReadable(passthrough);
@@ -58,7 +58,7 @@ export const createRender = async (
58
58
  // And if we set the default last, the type is not inferred correctly
59
59
  // Manually applying defaults here is a hack
60
60
  payload.strategy ??= "v1";
61
- payload.work_slice_ms ??= 4_000;
61
+ payload.work_slice_ms ??= 2_000;
62
62
  const response = await client.authenticatedFetch("/api/v1/renders", {
63
63
  method: "POST",
64
64
  body: JSON.stringify(payload),