create-flow-os 0.0.58 → 0.0.59

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/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "create-flow-os",
3
- "version": "0.0.58",
3
+ "version": "0.0.59",
4
4
  "license": "PolyForm-Shield-1.0.0",
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "@flow-os/client": "^0.0.58"
7
+ "@flow-os/client": "^0.0.59"
8
8
  },
9
9
  "bin": {
10
10
  "create-flow-os": "./src/index.ts"
@@ -98,13 +98,17 @@ export function shouldUseWorkspace(cwd: string): boolean {
98
98
  return !!findFlowOsRepoRoot(cwd);
99
99
  }
100
100
 
101
- /** Recupera versione: in prod per @flow-os/client usa quella già risolta da Bun (create-flow-os la ha in node_modules) */
101
+ /** Recupera versione: in prod per @flow-os/client usa quella in create-flow-os package.json (pubblicata, già propagata) */
102
102
  async function fetchFlowPackageVersion(pkgName: string): Promise<string | undefined> {
103
- if (!isCreateFlowOsDev()) {
103
+ if (!isCreateFlowOsDev() && pkgName === "@flow-os/client") {
104
104
  try {
105
- const root = pkgRoot(pkgName);
106
- const pkg = JSON.parse(readFileSync(join(root, "package.json"), "utf-8")) as { version?: string };
107
- if (pkg?.version) return pkg.version;
105
+ const cliRoot = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
106
+ const pkg = JSON.parse(readFileSync(join(cliRoot, "package.json"), "utf-8")) as { dependencies?: Record<string, string> };
107
+ const spec = pkg.dependencies?.["@flow-os/client"];
108
+ if (spec) {
109
+ const m = spec.match(/(\d+\.\d+\.\d+)/);
110
+ if (m) return m[1];
111
+ }
108
112
  } catch {}
109
113
  }
110
114
  const tag = isCreateFlowOsDev() ? "dev" : "latest";