fraim 2.0.349 → 2.0.350
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.
|
@@ -7,6 +7,7 @@ exports.WORKSPACE_SYNCED_CONTENT_DIRS = exports.WORKSPACE_FRAIM_DIRNAME = void 0
|
|
|
7
7
|
exports.getWorkspaceFraimDir = getWorkspaceFraimDir;
|
|
8
8
|
exports.workspaceFraimExists = workspaceFraimExists;
|
|
9
9
|
exports.getWorkspaceConfigPath = getWorkspaceConfigPath;
|
|
10
|
+
exports.workspaceOnboardingReady = workspaceOnboardingReady;
|
|
10
11
|
exports.getWorkspaceFraimPath = getWorkspaceFraimPath;
|
|
11
12
|
exports.assertWorkspaceFraimRoot = assertWorkspaceFraimRoot;
|
|
12
13
|
exports.assertWorkspaceFraimPath = assertWorkspaceFraimPath;
|
|
@@ -75,6 +76,19 @@ function workspaceFraimExists(projectRoot = process.cwd()) {
|
|
|
75
76
|
function getWorkspaceConfigPath(projectRoot = process.cwd()) {
|
|
76
77
|
return (0, path_1.join)(getWorkspaceFraimDir(projectRoot), 'config.json');
|
|
77
78
|
}
|
|
79
|
+
/** Config presence is readiness; unreadable filesystem state is not absence. */
|
|
80
|
+
function workspaceOnboardingReady(projectRoot) {
|
|
81
|
+
if (!projectRoot)
|
|
82
|
+
return false;
|
|
83
|
+
try {
|
|
84
|
+
(0, fs_1.statSync)(getWorkspaceConfigPath(projectRoot));
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
const code = error.code;
|
|
89
|
+
return code === 'ENOENT' || code === 'ENOTDIR' ? false : null;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
78
92
|
function getWorkspaceFraimPath(projectRoot = process.cwd(), ...parts) {
|
|
79
93
|
return (0, path_1.join)(getWorkspaceFraimDir(projectRoot), ...parts);
|
|
80
94
|
}
|