create-flow-os 0.0.1-dev.1771669629 → 0.0.1-dev.1771670224

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 (37) hide show
  1. package/bin/index.js +15 -4
  2. package/package.json +1 -1
  3. package/profiles/client/Dockerfile +3 -3
  4. package/profiles/client/dev.ts +1 -1
  5. package/profiles/client/package.json +3 -3
  6. package/profiles/client/packages/client/config.ts +1 -1
  7. package/profiles/client/tsconfig.json +1 -1
  8. package/profiles/full/Dockerfile +3 -3
  9. package/profiles/full/dev.ts +1 -1
  10. package/profiles/full/package.json +3 -3
  11. package/profiles/full/packages/client/config.ts +1 -1
  12. package/profiles/full/tsconfig.json +1 -1
  13. package/profiles/server/Dockerfile +3 -3
  14. package/profiles/server/dev.ts +1 -1
  15. package/profiles/server/package.json +3 -3
  16. package/profiles/server/tsconfig.json +1 -1
  17. /package/profiles/client/packages/{flow.os → core}/dom.ts +0 -0
  18. /package/profiles/client/packages/{flow.os → core}/for.ts +0 -0
  19. /package/profiles/client/packages/{flow.os → core}/index.ts +0 -0
  20. /package/profiles/client/packages/{flow.os → core}/lifecycle.ts +0 -0
  21. /package/profiles/client/packages/{flow.os → core}/package.json +0 -0
  22. /package/profiles/client/packages/{flow.os → core}/show-switch.ts +0 -0
  23. /package/profiles/client/packages/{flow.os → core}/state.ts +0 -0
  24. /package/profiles/full/packages/{flow.os → core}/dom.ts +0 -0
  25. /package/profiles/full/packages/{flow.os → core}/for.ts +0 -0
  26. /package/profiles/full/packages/{flow.os → core}/index.ts +0 -0
  27. /package/profiles/full/packages/{flow.os → core}/lifecycle.ts +0 -0
  28. /package/profiles/full/packages/{flow.os → core}/package.json +0 -0
  29. /package/profiles/full/packages/{flow.os → core}/show-switch.ts +0 -0
  30. /package/profiles/full/packages/{flow.os → core}/state.ts +0 -0
  31. /package/profiles/server/packages/{flow.os → core}/dom.ts +0 -0
  32. /package/profiles/server/packages/{flow.os → core}/for.ts +0 -0
  33. /package/profiles/server/packages/{flow.os → core}/index.ts +0 -0
  34. /package/profiles/server/packages/{flow.os → core}/lifecycle.ts +0 -0
  35. /package/profiles/server/packages/{flow.os → core}/package.json +0 -0
  36. /package/profiles/server/packages/{flow.os → core}/show-switch.ts +0 -0
  37. /package/profiles/server/packages/{flow.os → core}/state.ts +0 -0
package/bin/index.js CHANGED
@@ -794,10 +794,11 @@ function transformPackageJson(pkg, projectName, extraPackages = {}, useWorkspace
794
794
  const next = {};
795
795
  for (const [k3, v3] of Object.entries(deps)) {
796
796
  const isFlow = k3.startsWith("@flow.os/") || k3 === "@flow.os";
797
- if (v3 === "workspace:*")
797
+ if (v3 === "workspace:*" || isFlow && typeof v3 === "string" && (v3.startsWith("file:./packages/") || v3.startsWith("file:../"))) {
798
798
  next[k3] = useWorkspace && isFlow ? "workspace:*" : "^0.0.1";
799
- else
799
+ } else {
800
800
  next[k3] = v3;
801
+ }
801
802
  }
802
803
  for (const [k3, v3] of Object.entries(extraPackages)) {
803
804
  if (!(k3 in next))
@@ -921,9 +922,19 @@ function optsForProfile(config, profileId) {
921
922
  }
922
923
  async function main() {
923
924
  const devBadge = useDevTag ? c2.dim(" \xB7 dev") : "";
925
+ const CONTENT_W = 42;
926
+ const BORDER_W = 46;
927
+ const introLine = (content) => {
928
+ const plain = stripAnsi(content);
929
+ const pad = Math.max(0, CONTENT_W - plain.length);
930
+ return c2.dim(" \u2502 ") + content + " ".repeat(pad) + c2.dim(" \u2502");
931
+ };
932
+ const introBorder = (ch) => c2.dim(" " + (ch === "t" ? "\u256D" : "\u2570") + "\u2500".repeat(BORDER_W) + (ch === "t" ? "\u256E" : "\u256F"));
933
+ const singleLine = "Create " + c2.bold(c2.cyan("Flow OS")) + devBadge + " application";
924
934
  console.log(`
925
- ` + c2.bold("Flow OS") + devBadge + `
926
- ` + c2.dim("Create Flow OS application") + `
935
+ ` + introBorder("t") + `
936
+ ` + introLine(singleLine) + `
937
+ ` + introBorder("b") + `
927
938
  `);
928
939
  const config = await Bun.file(join2(DIR, "config.json")).json();
929
940
  const hasDeps = Object.values(config.packages).every((e2) => Array.isArray(e2.deps));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-flow-os",
3
- "version": "0.0.1-dev.1771669629",
3
+ "version": "0.0.1-dev.1771670224",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create-flow-os": "bin/index.js"
@@ -1,10 +1,10 @@
1
- # DEV: packages/flow.os → workaround Bun workspace (doppio install).
1
+ # DEV: packages/core → workaround Bun workspace (doppio install).
2
2
  # PROD: install → build → start (PORT da env)
3
3
 
4
4
  FROM oven/bun:1 AS builder
5
5
  WORKDIR /app
6
6
  COPY . .
7
- RUN if [ -d packages ] && [ -f packages/flow.os/package.json ]; then \
7
+ RUN if [ -d packages ] && [ -f packages/core/package.json ]; then \
8
8
  bun install || true && bun install; \
9
9
  else \
10
10
  bun install --frozen-lockfile; \
@@ -17,7 +17,7 @@ WORKDIR /app
17
17
  ENV NODE_ENV=production
18
18
  ENV PORT=3000
19
19
  COPY --from=builder /app/out/ ./
20
- RUN if [ -d packages ] && [ -f packages/flow.os/package.json ]; then \
20
+ RUN if [ -d packages ] && [ -f packages/core/package.json ]; then \
21
21
  bun install --frozen-lockfile --production || true && bun install --frozen-lockfile --production; \
22
22
  else \
23
23
  bun install --frozen-lockfile --production; \
@@ -2,4 +2,4 @@
2
2
  import { pathToFileURL } from 'node:url';
3
3
  import { join } from 'node:path';
4
4
 
5
- await import(pathToFileURL(join(import.meta.dir, 'packages/client/start-dev.ts')).href);
5
+ await import(pathToFileURL(join(import.meta.dir, 'node_modules/@flow.os/client/start-dev.ts')).href);
@@ -5,8 +5,8 @@
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "bun dev.ts",
8
- "build": "tsc -b && bun packages/client/build.ts",
9
- "preview": "bun packages/client/preview.ts",
8
+ "build": "tsc -b && bun node_modules/@flow.os/client/build.ts",
9
+ "preview": "bun node_modules/@flow.os/client/preview.ts",
10
10
  "start": "bun node_modules/@flow.os/server/start.ts",
11
11
  "lint": "oxlint .",
12
12
  "fmt": "oxfmt",
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "@flow.os/client": "file:./packages/client",
18
18
  "@flow.os/server": "^0.0.1",
19
- "@flow.os/core": "file:./packages/flow.os",
19
+ "@flow.os/core": "file:./packages/core",
20
20
  "@flow.os/router": "file:./packages/router",
21
21
  "@flow.os/style": "file:./packages/style"
22
22
  },
@@ -43,7 +43,7 @@ function resolveAlias(): Record<string, string> {
43
43
  const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8')) as { name?: string };
44
44
  if (pkg.name?.startsWith('@flow.os/') || pkg.name === '@flow.os') alias[pkg.name] = abs;
45
45
  } catch {}
46
- if (name !== 'flow.os') alias[`@flow.os/${name}`] = abs;
46
+ alias[`@flow.os/${name}`] = abs;
47
47
  }
48
48
  return alias;
49
49
  }
@@ -22,7 +22,7 @@
22
22
  "paths": {
23
23
  "~/*": ["client/*"],
24
24
  "~server/*": ["server/*"],
25
- "@flow.os/core": ["packages/flow.os/index.ts"],
25
+ "@flow.os/core": ["packages/core/index.ts"],
26
26
  "@flow.os/*": ["packages/*"]
27
27
  }
28
28
  },
@@ -1,10 +1,10 @@
1
- # DEV: packages/flow.os → workaround Bun workspace (doppio install).
1
+ # DEV: packages/core → workaround Bun workspace (doppio install).
2
2
  # PROD: install → build → start (PORT da env)
3
3
 
4
4
  FROM oven/bun:1 AS builder
5
5
  WORKDIR /app
6
6
  COPY . .
7
- RUN if [ -d packages ] && [ -f packages/flow.os/package.json ]; then \
7
+ RUN if [ -d packages ] && [ -f packages/core/package.json ]; then \
8
8
  bun install || true && bun install; \
9
9
  else \
10
10
  bun install --frozen-lockfile; \
@@ -17,7 +17,7 @@ WORKDIR /app
17
17
  ENV NODE_ENV=production
18
18
  ENV PORT=3000
19
19
  COPY --from=builder /app/out/ ./
20
- RUN if [ -d packages ] && [ -f packages/flow.os/package.json ]; then \
20
+ RUN if [ -d packages ] && [ -f packages/core/package.json ]; then \
21
21
  bun install --frozen-lockfile --production || true && bun install --frozen-lockfile --production; \
22
22
  else \
23
23
  bun install --frozen-lockfile --production; \
@@ -2,4 +2,4 @@
2
2
  import { pathToFileURL } from 'node:url';
3
3
  import { join } from 'node:path';
4
4
 
5
- await import(pathToFileURL(join(import.meta.dir, 'packages/client/start-dev.ts')).href);
5
+ await import(pathToFileURL(join(import.meta.dir, 'node_modules/@flow.os/client/start-dev.ts')).href);
@@ -5,8 +5,8 @@
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "bun dev.ts",
8
- "build": "tsc -b && bun packages/client/build.ts",
9
- "preview": "bun packages/client/preview.ts",
8
+ "build": "tsc -b && bun node_modules/@flow.os/client/build.ts",
9
+ "preview": "bun node_modules/@flow.os/client/preview.ts",
10
10
  "start": "bun node_modules/@flow.os/server/start.ts",
11
11
  "lint": "oxlint .",
12
12
  "fmt": "oxfmt",
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "@flow.os/client": "file:./packages/client",
18
18
  "@flow.os/server": "file:./packages/server",
19
- "@flow.os/core": "file:./packages/flow.os",
19
+ "@flow.os/core": "file:./packages/core",
20
20
  "@flow.os/router": "file:./packages/router",
21
21
  "@flow.os/style": "file:./packages/style"
22
22
  },
@@ -43,7 +43,7 @@ function resolveAlias(): Record<string, string> {
43
43
  const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8')) as { name?: string };
44
44
  if (pkg.name?.startsWith('@flow.os/') || pkg.name === '@flow.os') alias[pkg.name] = abs;
45
45
  } catch {}
46
- if (name !== 'flow.os') alias[`@flow.os/${name}`] = abs;
46
+ alias[`@flow.os/${name}`] = abs;
47
47
  }
48
48
  return alias;
49
49
  }
@@ -22,7 +22,7 @@
22
22
  "paths": {
23
23
  "~/*": ["client/*"],
24
24
  "~server/*": ["server/*"],
25
- "@flow.os/core": ["packages/flow.os/index.ts"],
25
+ "@flow.os/core": ["packages/core/index.ts"],
26
26
  "@flow.os/*": ["packages/*"]
27
27
  }
28
28
  },
@@ -1,10 +1,10 @@
1
- # DEV: packages/flow.os → workaround Bun workspace (doppio install).
1
+ # DEV: packages/core → workaround Bun workspace (doppio install).
2
2
  # PROD: install → build → start (PORT da env)
3
3
 
4
4
  FROM oven/bun:1 AS builder
5
5
  WORKDIR /app
6
6
  COPY . .
7
- RUN if [ -d packages ] && [ -f packages/flow.os/package.json ]; then \
7
+ RUN if [ -d packages ] && [ -f packages/core/package.json ]; then \
8
8
  bun install || true && bun install; \
9
9
  else \
10
10
  bun install --frozen-lockfile; \
@@ -17,7 +17,7 @@ WORKDIR /app
17
17
  ENV NODE_ENV=production
18
18
  ENV PORT=3000
19
19
  COPY --from=builder /app/out/ ./
20
- RUN if [ -d packages ] && [ -f packages/flow.os/package.json ]; then \
20
+ RUN if [ -d packages ] && [ -f packages/core/package.json ]; then \
21
21
  bun install --frozen-lockfile --production || true && bun install --frozen-lockfile --production; \
22
22
  else \
23
23
  bun install --frozen-lockfile --production; \
@@ -2,4 +2,4 @@
2
2
  import { pathToFileURL } from 'node:url';
3
3
  import { join } from 'node:path';
4
4
 
5
- await import(pathToFileURL(join(import.meta.dir, 'packages/client/start-dev.ts')).href);
5
+ await import(pathToFileURL(join(import.meta.dir, 'node_modules/@flow.os/client/start-dev.ts')).href);
@@ -5,8 +5,8 @@
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "bun dev.ts",
8
- "build": "tsc -b && bun packages/client/build.ts",
9
- "preview": "bun packages/client/preview.ts",
8
+ "build": "tsc -b && bun node_modules/@flow.os/client/build.ts",
9
+ "preview": "bun node_modules/@flow.os/client/preview.ts",
10
10
  "start": "bun node_modules/@flow.os/server/start.ts",
11
11
  "lint": "oxlint .",
12
12
  "fmt": "oxfmt",
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "@flow.os/client": "^0.0.1",
18
18
  "@flow.os/server": "file:./packages/server",
19
- "@flow.os/core": "file:./packages/flow.os",
19
+ "@flow.os/core": "file:./packages/core",
20
20
  "@flow.os/router": "file:./packages/router",
21
21
  "@flow.os/style": "file:./packages/style"
22
22
  },
@@ -22,7 +22,7 @@
22
22
  "paths": {
23
23
  "~/*": ["client/*"],
24
24
  "~server/*": ["server/*"],
25
- "@flow.os/core": ["packages/flow.os/index.ts"],
25
+ "@flow.os/core": ["packages/core/index.ts"],
26
26
  "@flow.os/*": ["packages/*"]
27
27
  }
28
28
  },
File without changes
File without changes