create-feltdb 0.6.6 → 0.6.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.
package/dist/create.js CHANGED
@@ -1506,8 +1506,7 @@ build/
1506
1506
  .env.*.local
1507
1507
  *.log
1508
1508
  .DS_Store
1509
- .feltdb/keys.json
1510
- .feltdb/connection.json
1509
+ .feltdb/
1511
1510
  `;
1512
1511
  fs.writeFileSync(path.join(projectDir, '.gitignore'), gitignore);
1513
1512
  // Create README
@@ -190,8 +190,7 @@ build
190
190
  .env.*.local
191
191
  .DS_Store
192
192
  *.log
193
- .feltdb/keys.json
194
- .feltdb/connection.json
193
+ .feltdb
195
194
  .nextc
196
195
  .next
197
196
  coverage
@@ -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.6';
3
+ export const FELTDB_PACKAGE_VERSION = '0.6.7';
4
4
  export const feltdbPackageRange = `^${FELTDB_PACKAGE_VERSION}`;
@@ -20,7 +20,7 @@ export function generateWorkspaceId(projectId) {
20
20
  * Initialize development workspace for a new project
21
21
  *
22
22
  * Creates .feltdb/workspace.json with the workspace discovery information.
23
- * This file is committed to the repository and used by all development tools
23
+ * This file remains local and is used by all development tools
24
24
  * (CLI, IDE, agents, browser extensions) to discover and connect to the
25
25
  * same workspace.
26
26
  */
@@ -43,25 +43,18 @@ export function initializeWorkspace(projectDir, projectId) {
43
43
  return discovery;
44
44
  }
45
45
  /**
46
- * Create .gitignore entry for workspace runtime files
47
- *
48
- * The .feltdb/workspace.json is committed (pairing identity).
49
- * But runtime files like pairing tokens should not be committed.
46
+ * Reserve the entire FeltDB runtime directory in .gitignore.
50
47
  */
51
48
  export function appendWorkspaceGitignore(projectDir) {
52
49
  const gitignorePath = path.join(projectDir, '.gitignore');
53
- const workspaceGitignoreEntries = [
54
- '',
55
- '# FeltDB Development Workspace',
56
- '.feltdb/pairing.json',
57
- '.feltdb/state.json',
58
- '.feltdb/*.log',
59
- '',
60
- ].join('\n');
50
+ const entryExists = (contents) => contents.split(/\r?\n/)
51
+ .some(line => /^\/?\.feltdb\/?$/.test(line.trim()));
61
52
  if (fs.existsSync(gitignorePath)) {
62
53
  const existing = fs.readFileSync(gitignorePath, 'utf-8');
63
- if (!existing.includes('.feltdb/pairing.json')) {
64
- fs.appendFileSync(gitignorePath, workspaceGitignoreEntries);
54
+ if (!entryExists(existing)) {
55
+ const newline = existing.includes('\r\n') ? '\r\n' : '\n';
56
+ const separator = existing.length && !existing.endsWith('\n') && !existing.endsWith('\r') ? newline : '';
57
+ fs.appendFileSync(gitignorePath, `${separator}.feltdb/${newline}`);
65
58
  }
66
59
  }
67
60
  else {
@@ -70,7 +63,8 @@ export function appendWorkspaceGitignore(projectDir) {
70
63
  'dist/',
71
64
  'build/',
72
65
  '.env.local',
73
- workspaceGitignoreEntries,
66
+ '.feltdb/',
67
+ '',
74
68
  ].join('\n');
75
69
  fs.writeFileSync(gitignorePath, content);
76
70
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "create-feltdb",
3
3
  "private": false,
4
4
  "description": "Create a new FeltDB application with one command",
5
- "version": "0.6.6",
5
+ "version": "0.6.7",
6
6
  "license": "MIT",
7
7
  "bin": {
8
8
  "create-feltdb": "bin/create-feltdb.js"