@lark-apaas/db-schema-sync 0.1.3 → 0.1.4-alpha.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.
Files changed (2) hide show
  1. package/dist/bin.js +8 -3
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -413,8 +413,10 @@ function parseArgs(argv) {
413
413
  const idx = args.indexOf(name);
414
414
  return idx !== -1 && args[idx + 1] ? args[idx + 1] : void 0;
415
415
  };
416
+ const hasFlag = (name) => args.includes(name);
416
417
  return {
417
- output: getArg("--output")
418
+ output: getArg("--output"),
419
+ exportCustomTypes: hasFlag("--export-custom-types")
418
420
  };
419
421
  }
420
422
  async function main() {
@@ -428,8 +430,11 @@ async function main() {
428
430
  try {
429
431
  const options = resolveEnvOptions();
430
432
  console.log("[db-schema-sync] Starting...");
431
- console.log(`[db-schema-sync] app_id=${options.appId}, dbBranch=${options.dbBranch}`);
432
- const schema = await generateSchema(options);
433
+ console.log(`[db-schema-sync] app_id=${options.appId}, dbBranch=${options.dbBranch}, exportCustomTypes=${cliArgs.exportCustomTypes}`);
434
+ const schema = await generateSchema({
435
+ ...options,
436
+ exportCustomTypes: cliArgs.exportCustomTypes
437
+ });
433
438
  if (!schema.includes("pgTable") && !schema.includes("pgView")) {
434
439
  console.warn("[db-schema-sync] \u26A0 Warning: No tables or views found in database. The generated schema will be empty.");
435
440
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/db-schema-sync",
3
- "version": "0.1.3",
3
+ "version": "0.1.4-alpha.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",