create-feltdb 0.6.5 → 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
package/dist/package-versions.js
CHANGED
|
@@ -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.
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
|
64
|
-
|
|
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
|
-
|
|
66
|
+
'.feltdb/',
|
|
67
|
+
'',
|
|
74
68
|
].join('\n');
|
|
75
69
|
fs.writeFileSync(gitignorePath, content);
|
|
76
70
|
}
|