create-feltdb 0.6.12 → 0.6.14

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.js CHANGED
@@ -11,6 +11,7 @@ import { spawn, spawnSync } from 'child_process';
11
11
  import { createProject } from './create.js';
12
12
  import { FELTDB_PACKAGE_VERSION } from './package-versions.js';
13
13
  import { configureManagedAccount } from './managed-account.js';
14
+ import { localFeltdbExecutable } from './development-handoff.js';
14
15
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
15
16
  function parseArgs(args) {
16
17
  const options = {
@@ -235,7 +236,7 @@ Options:
235
236
  --no-webllm Do not install WebLLM or generate the AI builder
236
237
  --capabilities <list> Choose capabilities: search, vector, or search,vector
237
238
  --no-install Skip npm install
238
- --no-start Skip npm run dev
239
+ --no-start Skip automatic feltdb dev startup
239
240
  -y, --yes Use all defaults (non-interactive mode)
240
241
  -h, --help Show this help message
241
242
  --version Show version number
@@ -314,6 +315,7 @@ Learn more: https://github.com/rkendel1/feltdb`);
314
315
  agents: options.agents,
315
316
  webllm: options.webllm,
316
317
  capabilities: options.capabilities,
318
+ showNextSteps: false,
317
319
  });
318
320
  projectCreated = true;
319
321
  if (options.runtime === 'managed') {
@@ -335,18 +337,18 @@ Learn more: https://github.com/rkendel1/feltdb`);
335
337
  }
336
338
  if (shouldStart) {
337
339
  if (!shouldInstall) {
338
- console.log(`Start after installing dependencies:\n cd ${projectName}\n npm install\n npm run dev\n`);
340
+ console.log(`Start after installing dependencies:\n cd ${projectName}\n npm install\n npm run feltdb:dev\n`);
339
341
  }
340
342
  else {
341
343
  if (options.runtime === 'self-hosted' && spawnSync('docker', ['version'], { stdio: 'ignore' }).status !== 0) {
342
344
  console.log('\nāœ… Project and Docker image definition are ready.');
343
345
  console.log('Docker is not currently running, so startup was skipped.');
344
- console.log(`Start Docker Desktop, then run:\n cd ${projectName}\n npm run dev`);
346
+ console.log(`Start Docker Desktop, then run:\n cd ${projectName}\n npm run feltdb:dev`);
345
347
  console.log('Build the production application image with: docker compose build app');
346
348
  }
347
349
  else {
348
- console.log('\nšŸš€ Starting the application...\n');
349
- await run(npm, ['run', 'dev'], projectDir);
350
+ console.log('\nšŸš€ Starting your FeltDB development session...\n');
351
+ await run(localFeltdbExecutable(projectDir), ['dev'], projectDir);
350
352
  }
351
353
  }
352
354
  }
package/dist/create.js CHANGED
@@ -87,7 +87,7 @@ export async function createProject(options) {
87
87
  application: {
88
88
  lifecycle: 'managed',
89
89
  },
90
- applicationUrl: 'http://127.0.0.1:5173',
90
+ applicationUrl: 'http://localhost:5173/',
91
91
  capabilities: {},
92
92
  };
93
93
  if (capabilities.includes('search')) {
@@ -1657,7 +1657,7 @@ Configuration is in \`feltdb.config.json\`:
1657
1657
  "application": {
1658
1658
  "lifecycle": "managed"
1659
1659
  },
1660
- "applicationUrl": "http://127.0.0.1:5173",
1660
+ "applicationUrl": "http://localhost:5173/",
1661
1661
  "capabilities": ["${capabilities}"]
1662
1662
  }
1663
1663
  \`\`\`
@@ -1810,9 +1810,11 @@ MIT
1810
1810
  console.log(`\nāœ“ Development Workspace initialized`);
1811
1811
  console.log(` Workspace ID: ${workspaceDiscovery.workspaceId}`);
1812
1812
  console.log(` Location: ${path.join(projectName, '.feltdb/workspace.json')}`);
1813
- console.log(`\nNext steps:`);
1814
- console.log(` cd ${projectName}`);
1815
- console.log(` npm install`);
1816
- console.log(` npm run dev`);
1817
- console.log(`\nYour Development Workspace is ready for use!`);
1813
+ if (options.showNextSteps !== false) {
1814
+ console.log(`\nNext steps:`);
1815
+ console.log(` cd ${projectName}`);
1816
+ console.log(` npm install`);
1817
+ console.log(` npm run feltdb:dev`);
1818
+ console.log(`\nYour Development Workspace is ready for use!`);
1819
+ }
1818
1820
  }
@@ -0,0 +1,4 @@
1
+ import path from 'path';
2
+ export function localFeltdbExecutable(projectDir, platform = process.platform) {
3
+ return path.join(projectDir, 'node_modules', '.bin', platform === 'win32' ? 'feltdb.cmd' : 'feltdb');
4
+ }
@@ -38,9 +38,9 @@ export function generateDockerCompose(config) {
38
38
  - --data
39
39
  - /data/feltdb.log
40
40
  - --allow-origin
41
- - http://127.0.0.1:\${APP_PORT:-5173}
41
+ - http://localhost:\${APP_PORT:-5173}
42
42
  - --allow-origin
43
- - http://127.0.0.1:\${STUDIO_PORT:-${config.studioPort}}
43
+ - http://localhost:\${STUDIO_PORT:-${config.studioPort}}
44
44
  volumes:
45
45
  - feltdb_data:/data
46
46
  - ./feltdb.flow:/app/feltdb.flow:ro
@@ -97,7 +97,7 @@ export function generateDockerCompose(config) {
97
97
  container_name: \${COMPOSE_PROJECT_NAME}-studio
98
98
  environment:
99
99
  FELTDB_API_URL: \${FELTDB_PUBLIC_URL:-http://127.0.0.1:${config.port}}
100
- APP_URL: \${APP_PUBLIC_URL:-http://127.0.0.1:5173}
100
+ APP_URL: \${APP_PUBLIC_URL:-http://localhost:5173/}
101
101
  FELTDB_NAMESPACE: \${FELTDB_APP_ID:-${config.appId}}
102
102
  ports:
103
103
  - "\${STUDIO_PORT:-${config.studioPort}}:8000"
@@ -140,7 +140,7 @@ USER feltdb
140
140
  EXPOSE 7700
141
141
  HEALTHCHECK --interval=10s --timeout=5s --start-period=30s --retries=3 CMD curl -fsS http://127.0.0.1:7700/health || exit 1
142
142
  ENTRYPOINT ["/sbin/tini", "--"]
143
- CMD ["feltdb-server", "--host", "0.0.0.0", "--port", "7700", "--namespace", "${config.appId}", "--data", "/data/feltdb.log", "--allow-origin", "http://127.0.0.1:5173", "--allow-origin", "http://127.0.0.1:${config.studioPort}"]
143
+ CMD ["feltdb-server", "--host", "0.0.0.0", "--port", "7700", "--namespace", "${config.appId}", "--data", "/data/feltdb.log", "--allow-origin", "http://localhost:5173", "--allow-origin", "http://localhost:${config.studioPort}"]
144
144
  `;
145
145
  }
146
146
  export function generateStudioDockerfile(config) {
@@ -1,4 +1,4 @@
1
1
  // One release train keeps generated applications installable. The repository
2
2
  // validation script checks these values against every workspace manifest.
3
- export const FELTDB_PACKAGE_VERSION = '0.6.12';
3
+ export const FELTDB_PACKAGE_VERSION = '0.6.14';
4
4
  export const feltdbPackageRange = `^${FELTDB_PACKAGE_VERSION}`;