create-flow-os 0.0.1-dev.1771779298 → 0.0.1-dev.1771779802

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/bin/index.js CHANGED
@@ -974,6 +974,13 @@ async function main() {
974
974
  ` + introLine(singleLine) + `
975
975
  ` + introBorder("b") + `
976
976
  `);
977
+ if (!useDevTag) {
978
+ try {
979
+ const cfPkg = await Bun.file(join2(DIR, "package.json")).json();
980
+ if (cfPkg.version && String(cfPkg.version).includes("-dev"))
981
+ useDevTag = true;
982
+ } catch {}
983
+ }
977
984
  const config = await Bun.file(join2(DIR, "config.json")).json();
978
985
  const hasDeps = Object.values(config.packages).every((e2) => Array.isArray(e2.deps));
979
986
  if (!hasDeps) {
@@ -1058,7 +1065,7 @@ async function main() {
1058
1065
  await rm(projectPathNew, { recursive: true, force: true });
1059
1066
  const createSpinner = _2();
1060
1067
  createSpinner.start(c2.cyan(ICON.rocket + " Creating project\u2026"));
1061
- await copyWithExclude(profileDir, projectPathNew, ["node_modules", ".git", "packages"]);
1068
+ await copyWithExclude(profileDir, projectPathNew, ["node_modules", ".git", "packages", "scripts", "LICENSE", "README.md"]);
1062
1069
  createSpinner.stop(c2.cyan(ICON.rocket + " Project created"));
1063
1070
  const extraDeps = {};
1064
1071
  for (const id of selected) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-flow-os",
3
- "version": "0.0.1-dev.1771779298",
3
+ "version": "0.0.1-dev.1771779802",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create-flow-os": "bin/index.js"
@@ -4,9 +4,9 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
7
- "dev": "bun scripts/dev.ts",
8
- "build": "tsc -b && bun scripts/build.ts",
9
- "preview": "bun scripts/preview.ts",
7
+ "dev": "flow-os-dev",
8
+ "build": "tsc -b && flow-os-build",
9
+ "preview": "flow-os-preview",
10
10
  "start": "bun node_modules/@flow.os/server/start.ts",
11
11
  "lint": "oxlint .",
12
12
  "fmt": "oxfmt",
@@ -4,9 +4,9 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
7
- "dev": "bun scripts/dev.ts",
8
- "build": "tsc -b && bun scripts/build.ts",
9
- "preview": "bun scripts/preview.ts",
7
+ "dev": "flow-os-dev",
8
+ "build": "tsc -b && flow-os-build",
9
+ "preview": "flow-os-preview",
10
10
  "start": "bun node_modules/@flow.os/server/start.ts",
11
11
  "lint": "oxlint .",
12
12
  "fmt": "oxfmt",
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env bun
2
- import { pathToFileURL } from 'node:url';
3
- import { join } from 'node:path';
4
- import { build } from 'vite';
5
-
6
- const cwd = process.cwd();
7
- const configPath = join(cwd, 'flow.config.ts');
8
- const mod = await import(pathToFileURL(configPath).href).catch((e: Error) => {
9
- console.error('Flow: could not load flow.config.ts:', e.message);
10
- process.exit(1);
11
- });
12
- const getConfig = mod.default;
13
- const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
14
- await build(config);
@@ -1,45 +0,0 @@
1
- #!/usr/bin/env bun
2
- /**
3
- * Flow OS dev server runner. Loads flow.config.ts and starts the dev server.
4
- * Trova una porta libera (3000, 3001, …) prima di avviare, così Vite non si blocca su "trying another one".
5
- */
6
-
7
- import { pathToFileURL } from 'node:url';
8
- import { join } from 'node:path';
9
- import { createServer } from 'vite';
10
- import net from 'node:net';
11
-
12
- const cwd = process.cwd();
13
- const configPath = join(cwd, 'flow.config.ts');
14
- const configUrl = pathToFileURL(configPath).href;
15
-
16
- function isPortFree(port: number): Promise<boolean> {
17
- return new Promise((resolve) => {
18
- const s = net.createServer();
19
- s.once('error', () => resolve(false));
20
- s.once('listening', () => {
21
- s.close(() => resolve(true));
22
- });
23
- s.listen(port, '127.0.0.1');
24
- });
25
- }
26
-
27
- async function findFreePort(from: number, to: number): Promise<number> {
28
- for (let p = from; p <= to; p++) {
29
- if (await isPortFree(p)) return p;
30
- }
31
- throw new Error(`Nessuna porta libera tra ${from} e ${to}`);
32
- }
33
-
34
- const port = await findFreePort(3000, 3020);
35
- process.env.FLOW_DEV_PORT = String(port);
36
-
37
- const mod = await import(configUrl).catch((e: Error) => {
38
- console.error('Flow: could not load flow.config.ts:', e.message);
39
- process.exit(1);
40
- });
41
- const getConfig = mod.default;
42
- const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
43
- const server = await createServer(config);
44
- await server.listen();
45
- server.watcher.on('change', () => {});
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env bun
2
- import { pathToFileURL } from 'node:url';
3
- import { join } from 'node:path';
4
- import { preview } from 'vite';
5
-
6
- const cwd = process.cwd();
7
- const configPath = join(cwd, 'flow.config.ts');
8
- const mod = await import(pathToFileURL(configPath).href).catch((e: Error) => {
9
- console.error('Flow: could not load flow.config.ts:', e.message);
10
- process.exit(1);
11
- });
12
- const getConfig = mod.default;
13
- const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
14
- await preview(config);
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env bun
2
- import { pathToFileURL } from 'node:url';
3
- import { join } from 'node:path';
4
- import { build } from 'vite';
5
-
6
- const cwd = process.cwd();
7
- const configPath = join(cwd, 'flow.config.ts');
8
- const mod = await import(pathToFileURL(configPath).href).catch((e: Error) => {
9
- console.error('Flow: could not load flow.config.ts:', e.message);
10
- process.exit(1);
11
- });
12
- const getConfig = mod.default;
13
- const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
14
- await build(config);
@@ -1,45 +0,0 @@
1
- #!/usr/bin/env bun
2
- /**
3
- * Flow OS dev server runner. Loads flow.config.ts and starts the dev server.
4
- * Trova una porta libera (3000, 3001, …) prima di avviare, così Vite non si blocca su "trying another one".
5
- */
6
-
7
- import { pathToFileURL } from 'node:url';
8
- import { join } from 'node:path';
9
- import { createServer } from 'vite';
10
- import net from 'node:net';
11
-
12
- const cwd = process.cwd();
13
- const configPath = join(cwd, 'flow.config.ts');
14
- const configUrl = pathToFileURL(configPath).href;
15
-
16
- function isPortFree(port: number): Promise<boolean> {
17
- return new Promise((resolve) => {
18
- const s = net.createServer();
19
- s.once('error', () => resolve(false));
20
- s.once('listening', () => {
21
- s.close(() => resolve(true));
22
- });
23
- s.listen(port, '127.0.0.1');
24
- });
25
- }
26
-
27
- async function findFreePort(from: number, to: number): Promise<number> {
28
- for (let p = from; p <= to; p++) {
29
- if (await isPortFree(p)) return p;
30
- }
31
- throw new Error(`Nessuna porta libera tra ${from} e ${to}`);
32
- }
33
-
34
- const port = await findFreePort(3000, 3020);
35
- process.env.FLOW_DEV_PORT = String(port);
36
-
37
- const mod = await import(configUrl).catch((e: Error) => {
38
- console.error('Flow: could not load flow.config.ts:', e.message);
39
- process.exit(1);
40
- });
41
- const getConfig = mod.default;
42
- const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
43
- const server = await createServer(config);
44
- await server.listen();
45
- server.watcher.on('change', () => {});
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env bun
2
- import { pathToFileURL } from 'node:url';
3
- import { join } from 'node:path';
4
- import { preview } from 'vite';
5
-
6
- const cwd = process.cwd();
7
- const configPath = join(cwd, 'flow.config.ts');
8
- const mod = await import(pathToFileURL(configPath).href).catch((e: Error) => {
9
- console.error('Flow: could not load flow.config.ts:', e.message);
10
- process.exit(1);
11
- });
12
- const getConfig = mod.default;
13
- const config = typeof getConfig === 'function' ? await getConfig() : getConfig;
14
- await preview(config);