Skip to content

Commit 592c181

Browse files
committed
feat: update to node-pty latest (1.2 beta) which has pre-compiled binaries and does not rely on post install scripts (node-gyp)
1 parent 070a1d1 commit 592c181

18 files changed

Lines changed: 48 additions & 132 deletions

‎README.md‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
> ⚠️ **This package has been migrated and re-purposed.** The original package by [Andrew Stone](https://www.npmjs.com/~andrewjstone)
2-
> for transforming integers to base36 strings. To continue to use that functionality, please pin to version 0.3.0 or below.
3-
41
# Codify - Your Development Environment as Code
52

63
**Stop manually setting up your development environment. Define it once, replicate it everywhere.**

‎package-lock.json‎

Lines changed: 18 additions & 105 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
"dependencies": {
77
"@codifycli/ink-form": "0.0.12",
88
"@codifycli/schemas": "1.2.0",
9-
"@homebridge/node-pty-prebuilt-multiarch": "npm:@lydell/node-pty@1.2.0-beta.15",
10-
"@lydell/node-pty": "1.2.0-beta.15",
9+
"@homebridge/node-pty-prebuilt-multiarch": "npm:node-pty@1.2.0-beta.15",
1110
"@mischnic/json-sourcemap": "^0.1.1",
1211
"@oclif/core": "^4.0.8",
1312
"@oclif/plugin-autocomplete": "^3.2.24",
@@ -37,6 +36,7 @@
3736
"kill-port": "^2.0.1",
3837
"latest-semver": "^4.0.0",
3938
"nanoid": "^5.0.9",
39+
"node-pty": "1.2.0-beta.15",
4040
"open": "^10.1.2",
4141
"parse-json": "^8.1.0",
4242
"react": "^18.3.1",
@@ -150,7 +150,7 @@
150150
"prepublishOnly": "npm run build && npm run build:npm",
151151
"postpublish": "npm run restore-npm"
152152
},
153-
"version": "1.2.2",
153+
"version": "1.2.3-beta.1",
154154
"bugs": "https://github.com/codifycli/codify/issues",
155155
"keywords": [
156156
"oclif",

‎scripts/codesign.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
APPLE_DEVELOPER_APPLICATION_PROFILE=$(cat package.json | jq -r '.oclif.macos."application-certificate"')
44

5-
# @lydell/node-pty ships its native binaries in per-platform packages (e.g. @lydell/node-pty-darwin-arm64/prebuilds/darwin-arm64)
6-
for dir in node_modules/@lydell/node-pty-darwin-*/prebuilds/darwin-*; do
5+
# node-pty ships its native binaries for every platform in prebuilds/<platform>-<arch>. Sign the copy installed under the
6+
# @homebridge alias too, since plugins built before the node-pty switch load that one.
7+
for dir in node_modules/node-pty/prebuilds/darwin-* node_modules/@homebridge/node-pty-prebuilt-multiarch/prebuilds/darwin-*; do
78
codesign --verbose=4 --timestamp --strict --options runtime -s "$APPLE_DEVELOPER_APPLICATION_PROFILE" "$dir/spawn-helper" --force
89
codesign --verbose=4 --timestamp --strict --options runtime -s "$APPLE_DEVELOPER_APPLICATION_PROFILE" "$dir/pty.node" --force
910
done

‎scripts/pkg.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ console.log(chalk.magenta(`Generated help files for: ${commands.join(', ')}`))
6262
console.log(chalk.magenta('Install production dependencies'))
6363
execSync('npm install --production', { cwd: './.build', shell: 'zsh' })
6464

65+
console.log(chalk.magenta('Removing Windows node-pty prebuilds'))
66+
execSync(
67+
'rm -rf node_modules/node-pty/prebuilds/win32-* node_modules/@homebridge/node-pty-prebuilt-multiarch/prebuilds/win32-*',
68+
{ cwd: './.build', shell: 'zsh' }
69+
)
70+
6571
console.log(chalk.magenta('Running oclif pkg macos'))
6672
execSync('oclif pack macos -r .', { cwd: './.build', shell: 'zsh' });
6773

‎src/connect/http-routes/create-command.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { IPty, spawn } from '@lydell/node-pty';
1+
import { IPty, spawn } from 'node-pty';
22
import chalk from 'chalk';
33
import { Router } from 'express';
44
import WebSocket from 'ws';

‎src/connect/http-routes/handlers/apply-handler.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { spawn } from '@lydell/node-pty';
1+
import { spawn } from 'node-pty';
22
import { ConfigFileSchema } from '@codifycli/schemas';
33
import * as fs from 'node:fs/promises';
44
import os from 'node:os';

‎src/connect/http-routes/handlers/destroy-handler.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { spawn } from '@lydell/node-pty';
1+
import { spawn } from 'node-pty';
22
import { ConfigFileSchema } from '@codifycli/schemas';
33
import * as fs from 'node:fs/promises';
44
import os from 'node:os';

‎src/connect/http-routes/handlers/import-handler.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { spawn } from '@lydell/node-pty';
1+
import { spawn } from 'node-pty';
22
import { ConfigFileSchema } from '@codifycli/schemas';
33
import { diffChars } from 'diff';
44
import * as fs from 'node:fs/promises';

‎src/connect/http-routes/handlers/init-handler.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { spawn } from '@lydell/node-pty';
1+
import { spawn } from 'node-pty';
22
import { diffChars } from 'diff';
33
import * as fs from 'node:fs/promises';
44
import os from 'node:os';

0 commit comments

Comments
 (0)