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.
- package/bin/index.js +15 -4
- package/package.json +1 -1
- package/profiles/client/Dockerfile +3 -3
- package/profiles/client/dev.ts +1 -1
- package/profiles/client/package.json +3 -3
- package/profiles/client/packages/client/config.ts +1 -1
- package/profiles/client/tsconfig.json +1 -1
- package/profiles/full/Dockerfile +3 -3
- package/profiles/full/dev.ts +1 -1
- package/profiles/full/package.json +3 -3
- package/profiles/full/packages/client/config.ts +1 -1
- package/profiles/full/tsconfig.json +1 -1
- package/profiles/server/Dockerfile +3 -3
- package/profiles/server/dev.ts +1 -1
- package/profiles/server/package.json +3 -3
- package/profiles/server/tsconfig.json +1 -1
- /package/profiles/client/packages/{flow.os → core}/dom.ts +0 -0
- /package/profiles/client/packages/{flow.os → core}/for.ts +0 -0
- /package/profiles/client/packages/{flow.os → core}/index.ts +0 -0
- /package/profiles/client/packages/{flow.os → core}/lifecycle.ts +0 -0
- /package/profiles/client/packages/{flow.os → core}/package.json +0 -0
- /package/profiles/client/packages/{flow.os → core}/show-switch.ts +0 -0
- /package/profiles/client/packages/{flow.os → core}/state.ts +0 -0
- /package/profiles/full/packages/{flow.os → core}/dom.ts +0 -0
- /package/profiles/full/packages/{flow.os → core}/for.ts +0 -0
- /package/profiles/full/packages/{flow.os → core}/index.ts +0 -0
- /package/profiles/full/packages/{flow.os → core}/lifecycle.ts +0 -0
- /package/profiles/full/packages/{flow.os → core}/package.json +0 -0
- /package/profiles/full/packages/{flow.os → core}/show-switch.ts +0 -0
- /package/profiles/full/packages/{flow.os → core}/state.ts +0 -0
- /package/profiles/server/packages/{flow.os → core}/dom.ts +0 -0
- /package/profiles/server/packages/{flow.os → core}/for.ts +0 -0
- /package/profiles/server/packages/{flow.os → core}/index.ts +0 -0
- /package/profiles/server/packages/{flow.os → core}/lifecycle.ts +0 -0
- /package/profiles/server/packages/{flow.os → core}/package.json +0 -0
- /package/profiles/server/packages/{flow.os → core}/show-switch.ts +0 -0
- /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
|
-
` +
|
|
926
|
-
` +
|
|
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,10 +1,10 @@
|
|
|
1
|
-
# DEV: packages/
|
|
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/
|
|
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/
|
|
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; \
|
package/profiles/client/dev.ts
CHANGED
|
@@ -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, '
|
|
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
|
|
9
|
-
"preview": "bun
|
|
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/
|
|
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
|
-
|
|
46
|
+
alias[`@flow.os/${name}`] = abs;
|
|
47
47
|
}
|
|
48
48
|
return alias;
|
|
49
49
|
}
|
package/profiles/full/Dockerfile
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# DEV: packages/
|
|
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/
|
|
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/
|
|
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; \
|
package/profiles/full/dev.ts
CHANGED
|
@@ -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, '
|
|
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
|
|
9
|
-
"preview": "bun
|
|
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/
|
|
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
|
-
|
|
46
|
+
alias[`@flow.os/${name}`] = abs;
|
|
47
47
|
}
|
|
48
48
|
return alias;
|
|
49
49
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# DEV: packages/
|
|
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/
|
|
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/
|
|
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; \
|
package/profiles/server/dev.ts
CHANGED
|
@@ -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, '
|
|
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
|
|
9
|
-
"preview": "bun
|
|
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/
|
|
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
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|