arri 0.32.1 → 0.33.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.
package/dist/cli.cjs CHANGED
@@ -11,7 +11,7 @@ const esbuild = require('esbuild');
11
11
  const esbuildPluginReplace = require('esbuild-plugin-replace');
12
12
  const path = require('pathe');
13
13
  const prettier = require('prettier');
14
- const config = require('./shared/arri.7b5179bf.cjs');
14
+ const config = require('./shared/arri.0dce1db1.cjs');
15
15
  const consola = require('consola');
16
16
  const globby = require('globby');
17
17
  const scule = require('scule');
package/dist/cli.mjs CHANGED
@@ -10,7 +10,7 @@ import { build as build$1 } from 'esbuild';
10
10
  import { replace } from 'esbuild-plugin-replace';
11
11
  import path from 'pathe';
12
12
  import prettier from 'prettier';
13
- import { o as defaultConfig, m as isArriConfig, n as isResolvedArriConfig, a as DEV_DEFINITION_ENDPOINT } from './shared/arri.bbe2aa44.mjs';
13
+ import { o as defaultConfig, m as isArriConfig, n as isResolvedArriConfig, a as DEV_DEFINITION_ENDPOINT } from './shared/arri.1b62504f.mjs';
14
14
  import { createConsola } from 'consola';
15
15
  import { globby } from 'globby';
16
16
  import { camelCase, kebabCase } from 'scule';
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const config = require('./shared/arri.7b5179bf.cjs');
3
+ const config = require('./shared/arri.0dce1db1.cjs');
4
4
  const h3 = require('h3');
5
5
  require('arri-codegen-utils');
6
6
  require('arri-validate');
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ArriApp, q as ArriRouter, a as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ErrorResponse, y as EventStreamConnection, c as createAppDefinition, e as createHttpRpcDefinition, o as defaultConfig, p as defineConfig, j as defineError, w as defineEventStreamRpc, s as defineRoute, d as defineRpc, k as errorResponseFromValidationErrors, f as getRpcParamName, g as getRpcPath, h as getRpcResponseName, l as handleH3Error, u as handleRoute, m as isArriConfig, x as isEventStreamRpc, n as isResolvedArriConfig, b as isRpc, i as isRpcParamSchema, z as registerEventStreamRpc, t as registerRoute, r as registerRpc, v as validateRpcRequestInput } from './shared/arri.bbe2aa44.mjs';
1
+ export { A as ArriApp, q as ArriRouter, a as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ErrorResponse, y as EventStreamConnection, c as createAppDefinition, e as createHttpRpcDefinition, o as defaultConfig, p as defineConfig, j as defineError, w as defineEventStreamRpc, s as defineRoute, d as defineRpc, k as errorResponseFromValidationErrors, f as getRpcParamName, g as getRpcPath, h as getRpcResponseName, l as handleH3Error, u as handleRoute, m as isArriConfig, x as isEventStreamRpc, n as isResolvedArriConfig, b as isRpc, i as isRpcParamSchema, z as registerEventStreamRpc, t as registerRoute, r as registerRpc, v as validateRpcRequestInput } from './shared/arri.1b62504f.mjs';
2
2
  export * from 'h3';
3
3
  import 'arri-codegen-utils';
4
4
  import 'arri-validate';
@@ -955,15 +955,17 @@ function isArriConfig(input) {
955
955
  return false;
956
956
  }
957
957
  if ("generators" in input) {
958
- if (!Array.isArray(input)) {
958
+ if (!Array.isArray(input.generators)) {
959
959
  return false;
960
960
  }
961
961
  }
962
- if ("port" in input && typeof input.port !== "number") {
963
- return false;
964
- }
965
- if (Number.isNaN(input.port)) {
966
- return false;
962
+ if ("port" in input) {
963
+ if (typeof input.port !== "number") {
964
+ return false;
965
+ }
966
+ if (Number.isNaN(input.port)) {
967
+ return false;
968
+ }
967
969
  }
968
970
  if ("entry" in input && typeof input.entry !== "string") {
969
971
  return false;
@@ -974,7 +976,7 @@ function isResolvedArriConfig(input) {
974
976
  if (!isArriConfig(input)) {
975
977
  return false;
976
978
  }
977
- return typeof input.rootDir === "string" && typeof input.srcDir === "string" && (typeof input.procedureDir === "string" || typeof input.procedureDir === "boolean") && Array.isArray(input.procedureGlobPatterns) && Array.isArray(input.generators) && typeof input.buildDir === "string" && typeof input.esbuild === "object" && input.esbuild && !Array.isArray(input.esbuild);
979
+ return typeof input.rootDir === "string" && typeof input.srcDir === "string" && (typeof input.procedureDir === "string" || typeof input.procedureDir === "boolean") && Array.isArray(input.procedureGlobPatterns) && Array.isArray(input.generators);
978
980
  }
979
981
  const defaultConfig = {
980
982
  port: 3e3,
@@ -953,15 +953,17 @@ function isArriConfig(input) {
953
953
  return false;
954
954
  }
955
955
  if ("generators" in input) {
956
- if (!Array.isArray(input)) {
956
+ if (!Array.isArray(input.generators)) {
957
957
  return false;
958
958
  }
959
959
  }
960
- if ("port" in input && typeof input.port !== "number") {
961
- return false;
962
- }
963
- if (Number.isNaN(input.port)) {
964
- return false;
960
+ if ("port" in input) {
961
+ if (typeof input.port !== "number") {
962
+ return false;
963
+ }
964
+ if (Number.isNaN(input.port)) {
965
+ return false;
966
+ }
965
967
  }
966
968
  if ("entry" in input && typeof input.entry !== "string") {
967
969
  return false;
@@ -972,7 +974,7 @@ function isResolvedArriConfig(input) {
972
974
  if (!isArriConfig(input)) {
973
975
  return false;
974
976
  }
975
- return typeof input.rootDir === "string" && typeof input.srcDir === "string" && (typeof input.procedureDir === "string" || typeof input.procedureDir === "boolean") && Array.isArray(input.procedureGlobPatterns) && Array.isArray(input.generators) && typeof input.buildDir === "string" && typeof input.esbuild === "object" && input.esbuild && !Array.isArray(input.esbuild);
977
+ return typeof input.rootDir === "string" && typeof input.srcDir === "string" && (typeof input.procedureDir === "string" || typeof input.procedureDir === "boolean") && Array.isArray(input.procedureGlobPatterns) && Array.isArray(input.generators);
976
978
  }
977
979
  const defaultConfig = {
978
980
  port: 3e3,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arri",
3
- "version": "0.32.1",
3
+ "version": "0.33.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -25,31 +25,31 @@
25
25
  "arri": "./dist/cli.mjs"
26
26
  },
27
27
  "dependencies": {
28
- "@joshmossas/listhen": "1.6.0",
28
+ "@joshmossas/listhen": "1.8.0",
29
29
  "c12": "^1.10.0",
30
30
  "chokidar": "^3.6.0",
31
31
  "citty": "^0.1.6",
32
32
  "consola": "^3.2.3",
33
33
  "degit": "^2.8.4",
34
34
  "enquirer": "^2.4.1",
35
- "esbuild": "^0.20.1",
35
+ "esbuild": "^0.20.2",
36
36
  "esbuild-plugin-replace": "^1.4.0",
37
37
  "globby": "^14.0.1",
38
38
  "h3": "^1.11.1",
39
39
  "h3-sse": "^0.0.12",
40
40
  "jiti": "^1.21.0",
41
- "ofetch": "^1.3.3",
41
+ "ofetch": "^1.3.4",
42
42
  "pathe": "^1.1.2",
43
43
  "prettier": "^3.2.5",
44
44
  "scule": "^1.3.0",
45
45
  "uncrypto": "^0.1.3",
46
- "arri-codegen-dart": "0.32.1",
47
- "arri-validate": "0.32.1",
48
- "arri-codegen-ts": "0.32.1",
49
- "arri-codegen-utils": "0.32.1"
46
+ "arri-codegen-dart": "0.33.0",
47
+ "arri-codegen-ts": "0.33.0",
48
+ "arri-codegen-utils": "0.33.0",
49
+ "arri-validate": "0.33.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/degit": "^2.8.6",
53
- "bun-types": "^1.0.30"
53
+ "bun-types": "^1.0.33"
54
54
  }
55
55
  }