@gengjiawen/os-init 1.5.0 → 1.6.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.6.0](https://github.com/gengjiawen/os-init/compare/v1.5.1...v1.6.0) (2025-10-25)
4
+
5
+
6
+ ### Features
7
+
8
+ * update Docker configuration to expose additional ports for development ([c1f0be1](https://github.com/gengjiawen/os-init/commit/c1f0be1f5f7559a32cbb2e5f1a829fd79f85d910))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * set-dev build issues ([728c0e9](https://github.com/gengjiawen/os-init/commit/728c0e9964d19cdd7624a7e9c5f2e68efaf4858f))
14
+
15
+ ## [1.5.1](https://github.com/gengjiawen/os-init/compare/v1.5.0...v1.5.1) (2025-10-25)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * add 'ip' dependency to package.json ([195b0d0](https://github.com/gengjiawen/os-init/commit/195b0d06b158962d57060336629e0666b726b9d9))
21
+ * add repository information to package.json ([441f752](https://github.com/gengjiawen/os-init/commit/441f7525a44af7a96b0f2916e2228439e89bb1d7))
22
+
3
23
  ## [1.5.0](https://github.com/gengjiawen/os-init/compare/v1.4.0...v1.5.0) (2025-10-25)
4
24
 
5
25
 
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ## os-init CLI
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/%40gengjiawen%2Fos-init)](https://www.npmjs.com/package/@gengjiawen/os-init)
4
+
3
5
  A CLI tool to quickly configure AI development tools and environments.
4
6
 
5
7
  ## Usage
@@ -43,15 +43,15 @@ async function setupDevEnvironment(sshPublicKey, targetDir) {
43
43
  }
44
44
  console.log(`Copying dev-setup to: ${targetPath}`);
45
45
  copyDirSync(sourceDir, targetPath);
46
- const dockerfilePath = path.join(targetPath, 'Dockerfile.txt');
46
+ const dockerfilePath = path.join(targetPath, 'Dockerfile');
47
47
  if (fs.existsSync(dockerfilePath)) {
48
48
  let content = fs.readFileSync(dockerfilePath, 'utf-8');
49
49
  content = content.replace('ssh-public-key-placeholder', sshPublicKey);
50
50
  fs.writeFileSync(dockerfilePath, content);
51
- console.log('SSH public key has been configured in Dockerfile.txt');
51
+ console.log('SSH public key has been configured in Dockerfile');
52
52
  }
53
53
  else {
54
- throw new Error(`Dockerfile.txt not found in ${targetPath}`);
54
+ throw new Error(`Dockerfile not found in ${targetPath}`);
55
55
  }
56
56
  const hasDockerCompose = await commandExists('docker-compose');
57
57
  if (hasDockerCompose) {
@@ -84,7 +84,7 @@ async function setupDevEnvironment(sshPublicKey, targetDir) {
84
84
  console.log(' docker-compose build && docker-compose up -d');
85
85
  }
86
86
  const localIp = ip.address();
87
- console.log('\n📡 SSH Connection:');
87
+ console.log('\n SSH Connection:');
88
88
  console.log(` ssh gitpod@${localIp} -p 2222`);
89
89
  console.log('\nOr use localhost if connecting from the same machine:');
90
90
  console.log(' ssh gitpod@localhost -p 2222');
@@ -15,5 +15,6 @@ RUN set -eux; \
15
15
 
16
16
  # Run sshd in foreground
17
17
  USER root
18
- EXPOSE 22
18
+ EXPOSE 22 3000 5173
19
19
  CMD ["/usr/sbin/sshd", "-D", "-e"]
20
+
@@ -8,6 +8,8 @@ services:
8
8
  tty: true
9
9
  ports:
10
10
  - '2222:22'
11
+ - '3000:3000'
12
+ - '5173:5173'
11
13
  cap_add:
12
14
  - SYS_PTRACE
13
15
  volumes:
@@ -29,3 +29,4 @@ AcceptEnv LANG LC_*
29
29
 
30
30
  # SFTP Subsystem
31
31
  Subsystem sftp /usr/lib/openssh/sftp-server
32
+
package/libs/dev-setup.ts CHANGED
@@ -57,15 +57,15 @@ export async function setupDevEnvironment(
57
57
  console.log(`Copying dev-setup to: ${targetPath}`)
58
58
  copyDirSync(sourceDir, targetPath)
59
59
 
60
- // Replace SSH_PUBLIC_KEY placeholder in Dockerfile.txt
61
- const dockerfilePath = path.join(targetPath, 'Dockerfile.txt')
60
+ // Replace SSH_PUBLIC_KEY placeholder in Dockerfile
61
+ const dockerfilePath = path.join(targetPath, 'Dockerfile')
62
62
  if (fs.existsSync(dockerfilePath)) {
63
63
  let content = fs.readFileSync(dockerfilePath, 'utf-8')
64
64
  content = content.replace('ssh-public-key-placeholder', sshPublicKey)
65
65
  fs.writeFileSync(dockerfilePath, content)
66
- console.log('SSH public key has been configured in Dockerfile.txt')
66
+ console.log('SSH public key has been configured in Dockerfile')
67
67
  } else {
68
- throw new Error(`Dockerfile.txt not found in ${targetPath}`)
68
+ throw new Error(`Dockerfile not found in ${targetPath}`)
69
69
  }
70
70
 
71
71
  // Check if docker-compose is available
@@ -109,7 +109,7 @@ export async function setupDevEnvironment(
109
109
 
110
110
  // Display SSH connection instructions
111
111
  const localIp = ip.address()
112
- console.log('\n📡 SSH Connection:')
112
+ console.log('\n SSH Connection:')
113
113
  console.log(` ssh gitpod@${localIp} -p 2222`)
114
114
  console.log('\nOr use localhost if connecting from the same machine:')
115
115
  console.log(' ssh gitpod@localhost -p 2222')
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gengjiawen/os-init",
3
3
  "private": false,
4
- "version": "1.5.0",
4
+ "version": "1.6.0",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "bin": {
@@ -20,6 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "commander": "^12.1.0",
23
+ "ip": "^2.0.1",
23
24
  "execa": "^8.0.1"
24
25
  },
25
26
  "publishConfig": {
@@ -38,7 +39,6 @@
38
39
  "@types/node": "24.1.0",
39
40
  "cpy-cli": "^4.2.0",
40
41
  "husky": "9.1.6",
41
- "ip": "^2.0.1",
42
42
  "jest": "29.7.0",
43
43
  "lint-staged": "^15.2.2",
44
44
  "nodemon": "3.1.4",