create-cellsweb-rpc-api 1.0.13 → 1.0.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/bin/create.js CHANGED
@@ -130,7 +130,7 @@ async function main() {
130
130
  "create:middleware": "tsx scripts/create-middleware.ts",
131
131
  },
132
132
  dependencies: {
133
- "@cellsweb/rpc-core": "^1.0.9",
133
+ "@cellsweb/rpc-core": "^1.0.10",
134
134
  "@aws-sdk/client-s3": "^3.700.0",
135
135
  "@paralleldrive/cuid2": "^2.2.2",
136
136
  "@sentry/node": "^8.40.0",
@@ -166,8 +166,8 @@ async function main() {
166
166
  compilerOptions: {
167
167
  outDir: "./dist",
168
168
  rootDir: "./src",
169
- module: "NodeNext",
170
- moduleResolution: "NodeNext",
169
+ module: "ESNext",
170
+ moduleResolution: "Bundler",
171
171
  target: "ES2023",
172
172
  lib: ["ES2023", "DOM"],
173
173
  strict: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cellsweb-rpc-api",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -261,17 +261,15 @@ function tplTest(ns: string, fn: string, isMultipart: boolean): string {
261
261
 
262
262
  import { describe, it, expect } from "vitest";
263
263
  import { run } from "./run";
264
- import { createUploadedFile } from "@/uploads/types";
264
+ import { createUploadedFile } from "@cellsweb/rpc-core";
265
265
 
266
266
  describe("${ns}.${fn}", () => {
267
267
  it("executes business logic with simulated upload", async () => {
268
268
  const mockFile = createUploadedFile({
269
- fieldName: "file",
269
+ path: "/tmp/mock.png",
270
270
  filename: "test.png",
271
- encoding: "7bit",
272
271
  mimeType: "image/png",
273
272
  byteLength: 1024,
274
- tempFilePath: "/tmp/mock.png",
275
273
  });
276
274
 
277
275
  const result = await run(
package/template/test.ts CHANGED
@@ -17,8 +17,14 @@ describe("CellsWeb RPC API Boilerplate Suite", () => {
17
17
  functionsDir = path.join(tempDir, "functions");
18
18
  middlewaresDir = path.join(tempDir, "middlewares");
19
19
 
20
- fs.mkdirSync(functionsDir, { recursive: true });
21
- fs.mkdirSync(middlewaresDir, { recursive: true });
20
+ fs.writeFileSync(path.join(tempDir, "package.json"), JSON.stringify({ type: "module" }));
21
+ try {
22
+ fs.symlinkSync(
23
+ path.resolve(process.cwd(), "node_modules"),
24
+ path.join(tempDir, "node_modules"),
25
+ "dir"
26
+ );
27
+ } catch {}
22
28
 
23
29
  // ── Create Central Middlewares ──
24
30
  const reqHeaderDir = path.join(middlewaresDir, "requireHeader");