create-skybridge 0.16.0 → 0.16.2
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/LICENSE +21 -0
- package/dist/index.js +18 -18
- package/package.json +9 -10
- package/template/node_modules/.bin/mcp-inspector +0 -0
- package/template/node_modules/.bin/nodemon +0 -0
- package/template/node_modules/.bin/shx +0 -0
- package/template/node_modules/.bin/tsc +0 -0
- package/template/node_modules/.bin/tsserver +0 -0
- package/template/node_modules/.bin/tsx +0 -0
- package/template/node_modules/.bin/vite +0 -0
- package/template/package.json +2 -2
- package/template/server/src/server.ts +0 -5
- package/template/web/src/index.css +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Alpic
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import path from "node:path";
|
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import * as prompts from "@clack/prompts";
|
|
6
6
|
import mri from "mri";
|
|
7
|
-
const minimumPnpmVersion = 10;
|
|
8
7
|
const defaultProjectName = "skybridge-project";
|
|
9
8
|
// prettier-ignore
|
|
10
9
|
const helpMessage = `\
|
|
@@ -125,12 +124,14 @@ export async function init(args = process.argv.slice(2)) {
|
|
|
125
124
|
console.error(error);
|
|
126
125
|
process.exit(1);
|
|
127
126
|
}
|
|
127
|
+
const userAgent = process.env.npm_config_user_agent;
|
|
128
|
+
const pkgManager = userAgent?.split(" ")[0]?.split("/")[0] || "npm";
|
|
128
129
|
// 4. Ask about immediate installation
|
|
129
130
|
let immediate = argImmediate;
|
|
130
131
|
if (immediate === undefined) {
|
|
131
132
|
if (interactive) {
|
|
132
133
|
const immediateResult = await prompts.confirm({
|
|
133
|
-
message: `Install with
|
|
134
|
+
message: `Install with ${pkgManager} and start now?`,
|
|
134
135
|
});
|
|
135
136
|
if (prompts.isCancel(immediateResult)) {
|
|
136
137
|
return cancel();
|
|
@@ -141,8 +142,20 @@ export async function init(args = process.argv.slice(2)) {
|
|
|
141
142
|
immediate = false;
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
|
-
const installCmd = [
|
|
145
|
-
const runCmd = [
|
|
145
|
+
const installCmd = [pkgManager, "install"];
|
|
146
|
+
const runCmd = [pkgManager];
|
|
147
|
+
switch (pkgManager) {
|
|
148
|
+
case "yarn":
|
|
149
|
+
case "pnpm":
|
|
150
|
+
case "bun":
|
|
151
|
+
break;
|
|
152
|
+
case "deno":
|
|
153
|
+
runCmd.push("task");
|
|
154
|
+
break;
|
|
155
|
+
default:
|
|
156
|
+
runCmd.push("run");
|
|
157
|
+
}
|
|
158
|
+
runCmd.push("dev");
|
|
146
159
|
if (!immediate) {
|
|
147
160
|
prompts.outro(`Done! Next steps:
|
|
148
161
|
cd ${targetDir}
|
|
@@ -151,20 +164,7 @@ export async function init(args = process.argv.slice(2)) {
|
|
|
151
164
|
`);
|
|
152
165
|
return;
|
|
153
166
|
}
|
|
154
|
-
|
|
155
|
-
const result = spawnSync("pnpm", ["--version"], { encoding: "utf-8" });
|
|
156
|
-
if (result.error || result.status !== 0) {
|
|
157
|
-
console.error("Error: pnpm is not installed. Please install pnpm first.");
|
|
158
|
-
process.exit(1);
|
|
159
|
-
}
|
|
160
|
-
// check if pnpm major is greater or equal to the one set in package.json packageManager, which should do the trick
|
|
161
|
-
const version = result.stdout.trim();
|
|
162
|
-
const major = Number(version.split(".")[0]);
|
|
163
|
-
if (Number.isNaN(major) || major < minimumPnpmVersion) {
|
|
164
|
-
console.error(`Error: pnpm version ${version} is too old. Minimum required version is ${minimumPnpmVersion}.`);
|
|
165
|
-
process.exit(1);
|
|
166
|
-
}
|
|
167
|
-
prompts.log.step(`Installing dependencies with pnpm...`);
|
|
167
|
+
prompts.log.step(`Installing dependencies with ${pkgManager}...`);
|
|
168
168
|
run(installCmd, {
|
|
169
169
|
stdio: "inherit",
|
|
170
170
|
cwd: root,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-skybridge",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Alpic",
|
|
@@ -16,14 +16,6 @@
|
|
|
16
16
|
"dist",
|
|
17
17
|
"template"
|
|
18
18
|
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "tsc",
|
|
21
|
-
"test": "pnpm run test:unit && pnpm run test:type && pnpm run test:format",
|
|
22
|
-
"test:unit": "vitest run",
|
|
23
|
-
"test:type": "tsc --noEmit",
|
|
24
|
-
"test:format": "biome ci",
|
|
25
|
-
"prepublishOnly": "pnpm run build"
|
|
26
|
-
},
|
|
27
19
|
"dependencies": {
|
|
28
20
|
"@clack/prompts": "^0.11.0",
|
|
29
21
|
"mri": "^1.2.0"
|
|
@@ -32,5 +24,12 @@
|
|
|
32
24
|
"@types/node": "^25.0.3",
|
|
33
25
|
"typescript": "^5.9.3",
|
|
34
26
|
"vitest": "^2.1.9"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "tsc",
|
|
30
|
+
"test": "pnpm run test:unit && pnpm run test:type && pnpm run test:format",
|
|
31
|
+
"test:unit": "vitest run",
|
|
32
|
+
"test:type": "tsc --noEmit",
|
|
33
|
+
"test:format": "biome ci"
|
|
35
34
|
}
|
|
36
|
-
}
|
|
35
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/template/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"express": "^5.1.0",
|
|
20
20
|
"react": "^19.1.1",
|
|
21
21
|
"react-dom": "^19.1.1",
|
|
22
|
-
"skybridge": "
|
|
22
|
+
"skybridge": ">=0.16.0 <1.0.0",
|
|
23
23
|
"vite": "^7.1.11",
|
|
24
24
|
"zod": "^4.1.13"
|
|
25
25
|
},
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@types/node": "^22.15.30",
|
|
30
30
|
"@types/react": "^19.1.16",
|
|
31
31
|
"@types/react-dom": "^19.1.9",
|
|
32
|
-
"@vitejs/plugin-react": "^5.
|
|
32
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
33
33
|
"nodemon": "^3.1.10",
|
|
34
34
|
"shx": "^0.3.4",
|
|
35
35
|
"tsx": "^4.19.4",
|
|
@@ -3,10 +3,6 @@ import { z } from "zod";
|
|
|
3
3
|
|
|
4
4
|
const Answers = [
|
|
5
5
|
"As I see it, yes",
|
|
6
|
-
"Ask again later",
|
|
7
|
-
"Better not tell you now",
|
|
8
|
-
"Cannot predict now",
|
|
9
|
-
"Concentrate and ask again",
|
|
10
6
|
"Don't count on it",
|
|
11
7
|
"It is certain",
|
|
12
8
|
"It is decidedly so",
|
|
@@ -15,7 +11,6 @@ const Answers = [
|
|
|
15
11
|
"My sources say no",
|
|
16
12
|
"Outlook good",
|
|
17
13
|
"Outlook not so good",
|
|
18
|
-
"Reply hazy, try again",
|
|
19
14
|
"Signs point to yes",
|
|
20
15
|
"Very doubtful",
|
|
21
16
|
"Without a doubt",
|