create-flow-os 0.0.1-dev.1771776083 → 0.0.1-dev.1771777269
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 -12
- package/package.json +2 -1
- package/profiles/client/README.md +2 -0
- package/profiles/client/package.json +1 -0
- package/profiles/client/packages/client/package.json +3 -2
- package/profiles/client/packages/core/package.json +3 -2
- package/profiles/client/packages/router/package.json +8 -3
- package/profiles/client/packages/style/package.json +3 -2
- package/profiles/full/README.md +2 -0
- package/profiles/full/package.json +1 -0
- package/profiles/full/packages/client/package.json +3 -2
- package/profiles/full/packages/core/package.json +3 -2
- package/profiles/full/packages/router/package.json +8 -3
- package/profiles/full/packages/server/package.json +6 -3
- package/profiles/full/packages/style/package.json +3 -2
- package/profiles/server/README.md +2 -0
- package/profiles/server/package.json +1 -0
- package/profiles/server/packages/core/package.json +3 -2
- package/profiles/server/packages/router/package.json +8 -3
- package/profiles/server/packages/server/package.json +6 -3
- package/profiles/server/packages/style/package.json +3 -2
package/bin/index.js
CHANGED
|
@@ -817,6 +817,17 @@ function transformPackageJson(pkg, projectName, extraPackages = {}, useWorkspace
|
|
|
817
817
|
}
|
|
818
818
|
return out;
|
|
819
819
|
}
|
|
820
|
+
function transformScriptsForCreatedProject(scripts) {
|
|
821
|
+
if (!scripts)
|
|
822
|
+
return scripts;
|
|
823
|
+
const out = {};
|
|
824
|
+
for (const [key, value] of Object.entries(scripts)) {
|
|
825
|
+
if (key === "release")
|
|
826
|
+
continue;
|
|
827
|
+
out[key] = value.replace(/packages\/([^/]+)\//g, "node_modules/@flow.os/$1/");
|
|
828
|
+
}
|
|
829
|
+
return Object.keys(out).length ? out : undefined;
|
|
830
|
+
}
|
|
820
831
|
async function copyWithExclude(srcDir, destDir, exclude) {
|
|
821
832
|
const set = new Set(exclude.map((e2) => e2.toLowerCase()));
|
|
822
833
|
async function w2(dir, rel) {
|
|
@@ -1043,13 +1054,7 @@ async function main() {
|
|
|
1043
1054
|
await rm(projectPathNew, { recursive: true, force: true });
|
|
1044
1055
|
const createSpinner = _2();
|
|
1045
1056
|
createSpinner.start(c2.cyan(ICON.rocket + " Creating project\u2026"));
|
|
1046
|
-
await copyWithExclude(profileDir, projectPathNew, ["node_modules", ".git"]);
|
|
1047
|
-
for (const id of selected) {
|
|
1048
|
-
const pkgDir = join2(DIR, "packages", id);
|
|
1049
|
-
try {
|
|
1050
|
-
await copyWithExclude(pkgDir, projectPathNew, []);
|
|
1051
|
-
} catch {}
|
|
1052
|
-
}
|
|
1057
|
+
await copyWithExclude(profileDir, projectPathNew, ["node_modules", ".git", "packages"]);
|
|
1053
1058
|
createSpinner.stop(c2.cyan(ICON.rocket + " Project created"));
|
|
1054
1059
|
const extraDeps = {};
|
|
1055
1060
|
for (const id of selected) {
|
|
@@ -1070,6 +1075,9 @@ async function main() {
|
|
|
1070
1075
|
}
|
|
1071
1076
|
const finalPkg = await Bun.file(pkgPath).json();
|
|
1072
1077
|
delete finalPkg.workspaces;
|
|
1078
|
+
const transformedScripts = transformScriptsForCreatedProject(finalPkg.scripts);
|
|
1079
|
+
if (transformedScripts)
|
|
1080
|
+
finalPkg.scripts = transformedScripts;
|
|
1073
1081
|
if (finalPkg.dependencies) {
|
|
1074
1082
|
const isDevFromRepo = await isDevFromRepoPromise;
|
|
1075
1083
|
const flowKeys = Object.keys(finalPkg.dependencies).filter((k3) => k3 === "@flow.os" || k3.startsWith("@flow.os/"));
|
|
@@ -1097,11 +1105,6 @@ async function main() {
|
|
|
1097
1105
|
finalPkg.dependencies = Object.fromEntries(Object.entries(finalPkg.dependencies).filter(([key]) => key !== "@flow.os"));
|
|
1098
1106
|
}
|
|
1099
1107
|
await Bun.write(pkgPath, JSON.stringify(finalPkg, null, 2));
|
|
1100
|
-
if (useDevTag) {
|
|
1101
|
-
try {
|
|
1102
|
-
await rm(join2(projectPathNew, "packages"), { recursive: true, force: true });
|
|
1103
|
-
} catch {}
|
|
1104
|
-
}
|
|
1105
1108
|
if (!noInstall) {
|
|
1106
1109
|
const s = _2();
|
|
1107
1110
|
s.start(c2.cyan(ICON.deps + " Installing dependencies\u2026"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-flow-os",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.1771777269",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-flow-os": "bin/index.js"
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"create": "bun index.ts",
|
|
20
20
|
"build": "bun build ./index.ts --outdir=bin --target=bun",
|
|
21
21
|
"publish:dev": "bun publish-dev.ts",
|
|
22
|
+
"version": "bun version.ts",
|
|
22
23
|
"release": "bun publish.ts"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flow.os/router",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"license": "PolyForm-Shield-1.0.0",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"main": "./index.ts",
|
|
6
7
|
"types": "./index.ts",
|
|
7
8
|
"exports": {
|
|
8
|
-
".": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./index.ts",
|
|
11
|
+
"import": "./index.ts",
|
|
12
|
+
"default": "./index.ts"
|
|
13
|
+
}
|
|
9
14
|
}
|
|
10
|
-
}
|
|
15
|
+
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flow.os/router",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"license": "PolyForm-Shield-1.0.0",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"main": "./index.ts",
|
|
6
7
|
"types": "./index.ts",
|
|
7
8
|
"exports": {
|
|
8
|
-
".": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./index.ts",
|
|
11
|
+
"import": "./index.ts",
|
|
12
|
+
"default": "./index.ts"
|
|
13
|
+
}
|
|
9
14
|
}
|
|
10
|
-
}
|
|
15
|
+
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flow.os/server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"license": "PolyForm-Shield-1.0.0",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"main": "./index.ts",
|
|
6
7
|
"types": "./index.ts",
|
|
7
|
-
"bin":
|
|
8
|
+
"bin": {
|
|
9
|
+
"server": "./start.ts"
|
|
10
|
+
},
|
|
8
11
|
"dependencies": {},
|
|
9
12
|
"peerDependencies": {
|
|
10
13
|
"vite": ">=5.0.0"
|
|
@@ -26,4 +29,4 @@
|
|
|
26
29
|
"default": "./production.ts"
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
|
-
}
|
|
32
|
+
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flow.os/router",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"license": "PolyForm-Shield-1.0.0",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"main": "./index.ts",
|
|
6
7
|
"types": "./index.ts",
|
|
7
8
|
"exports": {
|
|
8
|
-
".": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./index.ts",
|
|
11
|
+
"import": "./index.ts",
|
|
12
|
+
"default": "./index.ts"
|
|
13
|
+
}
|
|
9
14
|
}
|
|
10
|
-
}
|
|
15
|
+
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flow.os/server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"license": "PolyForm-Shield-1.0.0",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"main": "./index.ts",
|
|
6
7
|
"types": "./index.ts",
|
|
7
|
-
"bin":
|
|
8
|
+
"bin": {
|
|
9
|
+
"server": "./start.ts"
|
|
10
|
+
},
|
|
8
11
|
"dependencies": {},
|
|
9
12
|
"peerDependencies": {
|
|
10
13
|
"vite": ">=5.0.0"
|
|
@@ -26,4 +29,4 @@
|
|
|
26
29
|
"default": "./production.ts"
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
|
-
}
|
|
32
|
+
}
|