@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 +20 -0
- package/README.md +2 -0
- package/build/dev-setup.js +4 -4
- package/dev-setup/{Dockerfile.txt → Dockerfile} +2 -1
- package/dev-setup/docker-compose.yml +2 -0
- package/dev-setup/{sshd_config.txt → sshd_config} +1 -0
- package/libs/dev-setup.ts +5 -5
- package/package.json +2 -2
- package/pnpm-lock.yaml +0 -3804
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
package/build/dev-setup.js
CHANGED
|
@@ -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
|
|
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
|
|
51
|
+
console.log('SSH public key has been configured in Dockerfile');
|
|
52
52
|
}
|
|
53
53
|
else {
|
|
54
|
-
throw new Error(`Dockerfile
|
|
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
|
|
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');
|
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
|
|
61
|
-
const dockerfilePath = path.join(targetPath, 'Dockerfile
|
|
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
|
|
66
|
+
console.log('SSH public key has been configured in Dockerfile')
|
|
67
67
|
} else {
|
|
68
|
-
throw new Error(`Dockerfile
|
|
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
|
|
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.
|
|
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",
|