framer-code-link 0.21.0-alpha.6 → 0.21.0-alpha.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/index.mjs +6 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1935,9 +1935,14 @@ async function getProjectHashFromCwd() {
|
|
|
1935
1935
|
}
|
|
1936
1936
|
async function findOrCreateProjectDirectory(options) {
|
|
1937
1937
|
const { projectHash, projectName, explicitDirectory, baseDirectory } = options;
|
|
1938
|
+
const codeLinkDefaults = {
|
|
1939
|
+
shortProjectHash: shortProjectHash(projectHash),
|
|
1940
|
+
framerProjectName: projectName
|
|
1941
|
+
};
|
|
1938
1942
|
if (explicitDirectory) {
|
|
1939
1943
|
const resolved = path.resolve(explicitDirectory);
|
|
1940
1944
|
await fs.mkdir(path.join(resolved, "files"), { recursive: true });
|
|
1945
|
+
await readAndMigratePackageJson(path.join(resolved, "package.json"), codeLinkDefaults);
|
|
1941
1946
|
return {
|
|
1942
1947
|
directory: resolved,
|
|
1943
1948
|
created: false
|
|
@@ -1946,10 +1951,7 @@ async function findOrCreateProjectDirectory(options) {
|
|
|
1946
1951
|
const cwd = baseDirectory ?? process.cwd();
|
|
1947
1952
|
const existing = await findExistingProjectDirectory(cwd, projectHash);
|
|
1948
1953
|
if (existing) {
|
|
1949
|
-
await readAndMigratePackageJson(path.join(existing, "package.json"),
|
|
1950
|
-
shortProjectHash: shortProjectHash(projectHash),
|
|
1951
|
-
framerProjectName: projectName
|
|
1952
|
-
});
|
|
1954
|
+
await readAndMigratePackageJson(path.join(existing, "package.json"), codeLinkDefaults);
|
|
1953
1955
|
return {
|
|
1954
1956
|
directory: existing,
|
|
1955
1957
|
created: false
|
package/package.json
CHANGED