true-pg 0.2.2 → 0.2.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.
- package/lib/bin.js +1 -2
- package/lib/zod/index.js +1 -1
- package/package.json +1 -1
package/lib/bin.js
CHANGED
@@ -17,8 +17,7 @@ const opts = mri(args, {
|
|
17
17
|
import { cosmiconfig } from "cosmiconfig";
|
18
18
|
const explorer = cosmiconfig("truepg");
|
19
19
|
const result = opts.config ? await explorer.load(opts.config) : await explorer.search();
|
20
|
-
const config = result?.config;
|
21
|
-
console.log(config);
|
20
|
+
const config = result?.config ?? {};
|
22
21
|
const help = opts.help || (!config && !opts.uri);
|
23
22
|
if (help) {
|
24
23
|
// if help is triggered unintentionally, it's a user error
|
package/lib/zod/index.js
CHANGED
@@ -244,7 +244,7 @@ export const Zod = createGenerator(opts => {
|
|
244
244
|
}));
|
245
245
|
return `\t/* -- ${schema.name} --*/\n\n` + schema_validators || "\t-- no validators\n\n";
|
246
246
|
}));
|
247
|
-
out += "\n}
|
247
|
+
out += "\n};\n\n";
|
248
248
|
out += schemas.map(s => `export type { ${this.formatSchema(s.name)} };`).join("\n");
|
249
249
|
return out;
|
250
250
|
},
|