@lark-apaas/fullstack-cli 1.1.40-alpha.11 → 1.1.40-alpha.13

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.
@@ -1,6 +1,6 @@
1
1
  // src/config/drizzle.config.ts
2
2
  import { defineConfig } from "drizzle-kit";
3
- var outputDir = process.env.__DRIZZLE_OUT_DIR__ || "./server/database/.introspect";
3
+ var outputDir = process.env.__DRIZZLE_OUT_DIR__ || "./tmp/.introspect";
4
4
  var schemaPath = process.env.__DRIZZLE_SCHEMA_PATH__ || "./server/database/schema.ts";
5
5
  var parsedUrl = new URL(process.env.SUDA_DATABASE_URL || "");
6
6
  var envSchemaFilter = process.env.DRIZZLE_SCHEMA_FILTER;
package/dist/index.js CHANGED
@@ -2152,24 +2152,6 @@ async function parseAndGenerateNestResourceTemplate(options) {
2152
2152
 
2153
2153
  // src/commands/db/schema.handler.ts
2154
2154
  var require2 = createRequire(import.meta.url);
2155
- var STALE_RUN_DIR_MAX_AGE_MS = 60 * 60 * 1e3;
2156
- function sweepStaleRunDirs(rootDir) {
2157
- try {
2158
- const now = Date.now();
2159
- for (const name of fs4.readdirSync(rootDir)) {
2160
- if (!name.startsWith("run-")) continue;
2161
- const full = path2.join(rootDir, name);
2162
- try {
2163
- const stat = fs4.statSync(full);
2164
- if (!stat.isDirectory()) continue;
2165
- if (now - stat.mtimeMs < STALE_RUN_DIR_MAX_AGE_MS) continue;
2166
- fs4.rmSync(full, { recursive: true, force: true });
2167
- } catch {
2168
- }
2169
- }
2170
- } catch {
2171
- }
2172
- }
2173
2155
  async function run(options = {}) {
2174
2156
  let exitCode = 0;
2175
2157
  const envPath2 = path2.resolve(process.cwd(), ".env");
@@ -2185,7 +2167,7 @@ async function run(options = {}) {
2185
2167
  process.exit(1);
2186
2168
  }
2187
2169
  const outputPath = options.output || process.env.DB_SCHEMA_OUTPUT || "server/database/schema.ts";
2188
- const INTROSPECT_ROOT = path2.resolve(process.cwd(), "server/database/.introspect");
2170
+ const INTROSPECT_ROOT = path2.resolve(process.cwd(), "tmp/.introspect");
2189
2171
  fs4.mkdirSync(INTROSPECT_ROOT, { recursive: true });
2190
2172
  const OUT_DIR = fs4.mkdtempSync(path2.join(INTROSPECT_ROOT, "run-"));
2191
2173
  const SCHEMA_FILE = path2.resolve(process.cwd(), outputPath);
@@ -2367,7 +2349,6 @@ async function run(options = {}) {
2367
2349
  if (fs4.existsSync(OUT_DIR)) {
2368
2350
  fs4.rmSync(OUT_DIR, { recursive: true, force: true });
2369
2351
  }
2370
- sweepStaleRunDirs(INTROSPECT_ROOT);
2371
2352
  process.exit(exitCode);
2372
2353
  }
2373
2354
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/fullstack-cli",
3
- "version": "1.1.40-alpha.11",
3
+ "version": "1.1.40-alpha.13",
4
4
  "description": "CLI tool for fullstack template management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,7 +1,7 @@
1
1
  import { defineConfig, Config } from 'drizzle-kit';
2
2
  require('dotenv').config();
3
3
 
4
- const outputDir = process.env.__DRIZZLE_OUT_DIR__ || './server/database/.introspect';
4
+ const outputDir = process.env.__DRIZZLE_OUT_DIR__ || './tmp/.introspect';
5
5
  const schemaPath = process.env.__DRIZZLE_SCHEMA_PATH__ || './server/database/schema.ts';
6
6
 
7
7
  const parsedUrl = new URL(process.env.SUDA_DATABASE_URL || '');