create-flow-os 0.0.55 → 0.0.56
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/lib.ts +1 -1
- package/src/init/scaffold.ts +3 -3
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-flow-os",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.56",
|
|
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.56"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
10
10
|
"create-flow-os": "./src/index.ts"
|
package/src/init/lib.ts
CHANGED
|
@@ -51,7 +51,7 @@ export function libsWithConfig(cliRoot: string, flowOsRepoRoot?: string | null):
|
|
|
51
51
|
/** In prod (fuori repo): scarica lista pacchetti @flow-os/* da npm. Mappa automaticamente anche i nuovi. */
|
|
52
52
|
export async function fetchFlowOsPackagesFromNpm(): Promise<string[]> {
|
|
53
53
|
try {
|
|
54
|
-
const res = await fetch(NPM_ORG_API, { headers: { "Cache-Control": "no-cache", Accept: "application/json" } });
|
|
54
|
+
const res = await fetch(NPM_ORG_API, { headers: { "Cache-Control": "no-cache", "Pragma": "no-cache", Accept: "application/json" } });
|
|
55
55
|
if (!res.ok) return [];
|
|
56
56
|
const data = (await res.json()) as Record<string, unknown>;
|
|
57
57
|
return Object.keys(data).filter((k) => k.startsWith(FLOW_PREFIX));
|
package/src/init/scaffold.ts
CHANGED
|
@@ -98,12 +98,12 @@ export function shouldUseWorkspace(cwd: string): boolean {
|
|
|
98
98
|
return !!findFlowOsRepoRoot(cwd);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
/** Recupera versione
|
|
101
|
+
/** Recupera versione dal registry npm (sempre real-time, no cache) */
|
|
102
102
|
async function fetchFlowPackageVersion(pkgName: string): Promise<string | undefined> {
|
|
103
103
|
const tag = isCreateFlowOsDev() ? "dev" : "latest";
|
|
104
104
|
try {
|
|
105
105
|
const res = await fetch(`${NPM_REGISTRY}/${pkgName}`, {
|
|
106
|
-
headers: { "Cache-Control": "no-cache", Accept: "application/json" },
|
|
106
|
+
headers: { "Cache-Control": "no-cache", "Pragma": "no-cache", Accept: "application/json" },
|
|
107
107
|
});
|
|
108
108
|
if (!res.ok) return undefined;
|
|
109
109
|
const data = (await res.json()) as { "dist-tags"?: Record<string, string> };
|
|
@@ -140,7 +140,7 @@ async function fetchConfigFromNpm(
|
|
|
140
140
|
const { tmpdir } = await import("os");
|
|
141
141
|
const url = `${NPM_REGISTRY}/${pkgName}/-/${shortName}-${version}.tgz`;
|
|
142
142
|
try {
|
|
143
|
-
const res = await fetch(url, { headers: { "Cache-Control": "no-cache" } });
|
|
143
|
+
const res = await fetch(url, { headers: { "Cache-Control": "no-cache", "Pragma": "no-cache" } });
|
|
144
144
|
if (!res.ok) return null;
|
|
145
145
|
const archive = new Bun.Archive(await res.blob());
|
|
146
146
|
const tmpDir = join(tmpdir(), `flow-os-${shortName}-${version}-${Date.now()}`);
|