framer-code-link 0.21.0-alpha.5 → 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.
Files changed (2) hide show
  1. package/dist/index.mjs +6 -4
  2. 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framer-code-link",
3
- "version": "0.21.0-alpha.5",
3
+ "version": "0.21.0-alpha.7",
4
4
  "description": "CLI tool for syncing Framer code components - controller-centric architecture",
5
5
  "main": "dist/index.mjs",
6
6
  "type": "module",