svelte-reflector 1.1.6 → 1.1.7

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.
@@ -8,6 +8,7 @@ export class ModuleParamProcessor {
8
8
  }
9
9
  process(params) {
10
10
  const { cookies, headers, paths, querys } = params;
11
+ // console.log(querys);
11
12
  const buildedParamsTypes = [];
12
13
  const paramAttributes = new Set();
13
14
  const paramInit = new Set([]);
@@ -9,10 +9,15 @@ export class PrimitiveProp {
9
9
  emptyExample;
10
10
  constructor(params) {
11
11
  const { name, schemaObject, required, validator, isParam } = params;
12
- const { example: rawExample, type: rawType } = schemaObject;
12
+ const { type: rawType } = schemaObject;
13
13
  const type = rawType ?? "string";
14
14
  this.emptyExample = this.getEmptyExample({ type, schemaObject });
15
- const example = rawExample;
15
+ const example = schemaObject.example ?? schemaObject.default;
16
+ if (isParam) {
17
+ if (name === "limit") {
18
+ console.log(example);
19
+ }
20
+ }
16
21
  const buildedType = type;
17
22
  this.name = this.treatName(name);
18
23
  this.rawType = type ?? "any";
package/dist/reflector.js CHANGED
@@ -120,10 +120,10 @@ export class ReflectorFile {
120
120
  });
121
121
 
122
122
  if (!isValid) {
123
- toast.error(
124
- 'Erro ao fazer a requisição',
125
- 'Um ou mais campos preenchidos estão incorretos.'
126
- );
123
+ toast.error({
124
+ title: 'Erro ao fazer a requisição',
125
+ description: 'Um ou mais campos preenchidos estão incorretos.',
126
+ });
127
127
  }
128
128
 
129
129
  return isValid;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-reflector",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "Reflects zod types from openAPI schemas",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",