create-flow-os 0.0.58 → 0.0.60
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 +2 -2
- package/src/init/scaffold.ts +9 -5
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-flow-os",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.60",
|
|
4
4
|
"license": "PolyForm-Shield-1.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@flow-os/client": "^0.0.
|
|
7
|
+
"@flow-os/client": "^0.0.32"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
10
10
|
"create-flow-os": "./src/index.ts"
|
package/src/init/scaffold.ts
CHANGED
|
@@ -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
|
|
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
|
|
106
|
-
const pkg = JSON.parse(readFileSync(join(
|
|
107
|
-
|
|
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";
|