Skip to content

Commit

Permalink
chore: replace rollup.js with tsc with project references
Browse files Browse the repository at this point in the history
  • Loading branch information
dlenroc authored Oct 22, 2023
1 parent 175662f commit 9490e8f
Show file tree
Hide file tree
Showing 122 changed files with 431 additions and 433 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/nodejs.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ jobs:
- uses: actions/setup-node@v3
if: ${{ steps.release.outputs.releases_created }}
with:
node-version: 18
node-version: 20.x
registry-url: https://registry.npmjs.org
- run: npm install
if: ${{ steps.release.outputs.releases_created }}
- run: npm run build --if-present -w packages/${{ matrix.package }}/
if: ${{ steps.release.outputs.releases_created }}
- run: npm publish packages/${{ matrix.package }}/ --access public
if: ${{ steps.release.outputs.releases_created }}
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ package-lock.json

### Project ###
dist/
tsconfig.build.tsbuildinfo
22 changes: 8 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
{
"private": true,
"workspaces": [
"./packages/*"
],
"scripts": {
"clean": "rimraf {node_modules,package-lock.json} packages/*/{dist,node_modules,package-lock.json} && npm i",
"build": "npm run build -ws"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.5",
"@types/node": "^20.8.5",
"@types/node-fetch": "^2.6.6",
"@types/sinon": "^10.0.19",
"rimraf": "^5.0.5",
"rollup": "^4.0.2",
"sinon": "^16.1.0",
"@tsconfig/node20": "^20.1.2",
"@types/node": "^20.8.7",
"@types/sinon": "^10.0.20",
"sinon": "^17.0.0",
"ts-node": "^10.9.1",
"tslib": "^2.6.2",
"typescript": "^5.2.2"
},
"workspaces": [
"./packages/*"
]
}
}
23 changes: 11 additions & 12 deletions packages/debug-server/package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
{
"name": "@dlenroc/roku-debug-server",
"version": "1.0.2",
"version": "2.0.0",
"description": "Client for host utilities provided via telnet on port 8080",
"author": "Corneliu Duplachi",
"license": "MIT",
"repository": "dlenroc/node-roku",
"keywords": [
"roku",
"debug-server"
],
"repository": "dlenroc/node-roku",
"license": "MIT",
"author": "Corneliu Duplachi",
"type": "module",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "src/index.ts",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"prepare": "npm run build",
"build": "rimraf dist && rollup --bundleConfigAsCjs -c ../../rollup.config.js",
"test": "node --require ts-node/register --test-reporter spec --test ./test/**/*.test.ts"
},
"engines": {
"node": ">=12"
"build": "tsc --build --force tsconfig.build.json",
"test": "node --no-warnings --loader ts-node/esm --test-reporter spec --test ./test/**/*.test.ts"
}
}
2 changes: 1 addition & 1 deletion packages/debug-server/src/DebugServerParsingError.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DebugServerError } from './DebugServerError.ts';
import { DebugServerError } from './DebugServerError.js';

export class DebugServerParsingError extends DebugServerError {
public readonly cmd: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/debug-server/src/commands/clearLaunchCaches.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { execute } from '../internal/execute.js';

const pattern = /Done/;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.js';

const pattern = /^\s*$/;

Expand Down
4 changes: 2 additions & 2 deletions packages/debug-server/src/commands/createDeveloperKey.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { DeveloperKey } from '../types/DeveloperKey.ts';
import { execute } from '../internal/execute.js';
import type { DeveloperKey } from '../types/DeveloperKey.ts';

const idPattern = /DevID: (.*)/;
const passwordPattern = /Password: (.*)/;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { execute } from '../internal/execute.js';

const pattern = /rendezvous logging is off/;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { execute } from '../internal/execute.js';

const pattern = /rendezvous logging is on/;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { ChannelStats } from '../types/ChannelStats.ts';
import { execute } from '../internal/execute.js';
import type { ChannelStats } from '../types/ChannelStats.ts';

const pattern = /mem=(?<mem>\d+)KiB{anon=(?<anon>\d+),file=(?<file>\d+),shared=(?<shared>\d+),swap=(?<swap>\d+)},%cpu=(?<cpu>\d+){user=(?<user>\d+),sys=(?<sys>\d+)}/;

Expand Down
2 changes: 1 addition & 1 deletion packages/debug-server/src/commands/getDeveloperKey.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { execute } from '../internal/execute.js';

const pattern = /Dev ID: (.+)/;

Expand Down
4 changes: 2 additions & 2 deletions packages/debug-server/src/commands/getLoadedTextures.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { LoadedTextures } from '../types/LoadedTextures.ts';
import { execute } from '../internal/execute.js';
import type { LoadedTextures } from '../types/LoadedTextures.ts';

const pattern = /\* .+ Textures +\*/;

Expand Down
2 changes: 1 addition & 1 deletion packages/debug-server/src/commands/getMaxWarningCount.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { execute } from '../internal/execute.js';

const pattern = /brightscript warning limit: (\d+)/;

Expand Down
4 changes: 2 additions & 2 deletions packages/debug-server/src/commands/getMemoryStats.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { MemoryStats } from '../types/MemoryStats.ts';
import { execute } from '../internal/execute.js';
import type { MemoryStats } from '../types/MemoryStats.ts';

const memoryPattern = /Mem:\s*(?<total>\d+)\s*(?<used>\d+)\s*(?<free>\d+)\s*(?<shared>\d+)\s*(?<cache>\d+)\s*(?<available>\d+)/;
const swapPattern = /Swap:\s*(?<total>\d+)\s*(?<used>\d+)\s*(?<free>\d+)/;
Expand Down
4 changes: 2 additions & 2 deletions packages/debug-server/src/commands/getPlugins.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { Plugin } from '../types/Plugin.ts';
import { execute } from '../internal/execute.js';
import type { Plugin } from '../types/Plugin.ts';

const pattern = /(?<id>\S+)\s+\[usg\s+(?<usg>\d+)\]\s+\[ref\s+(?<ref>\d+)\]\s+(?<cmpl>cmpl)?(?<run>\*)?\s+(?<name>.+),\s+(?<version>\d+\.\d+\.\d+)/gm;

Expand Down
6 changes: 3 additions & 3 deletions packages/debug-server/src/commands/getProfilingStatus.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { ProfilingStatus } from '../types/ProfilingStatus.ts';
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.js';
import type { ProfilingStatus } from '../types/ProfilingStatus.ts';

const pattern = /status: (\w+),?(.*),data_dest=(\w+)/;

Expand Down
4 changes: 2 additions & 2 deletions packages/debug-server/src/commands/getR2D2Bitmaps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { R2D2Bitmap } from '../types/R2D2Bitmap.ts';
import { execute } from '../internal/execute.js';
import type { R2D2Bitmap } from '../types/R2D2Bitmap.ts';

const pattern = /(?<address>0x\w+)\s+(?<width>\d+)\s+(?<height>\d+)\s+(?<bpp>\d+)\s+(?<size>\d+)\s+(?<bufSz>\d+)\s+(?<tex>\d+)\s+(?<fbo>\d+)\s+(?<name>.*)/g;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { RendezvousLoggingStatus } from '../types/RendezvousLoggingStatus.ts';
import { execute } from '../internal/execute.js';
import type { RendezvousLoggingStatus } from '../types/RendezvousLoggingStatus.ts';

const pattern = /rendezvous logging is (on|off)/;

Expand Down
2 changes: 1 addition & 1 deletion packages/debug-server/src/commands/getSceneGraphNodes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { execute } from '../internal/execute.js';

const pattern = /<[\s\S]+>/;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { SceneGraphPerformance } from '../types/SceneGraphPerformance.ts';
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.js';
import type { SceneGraphPerformance } from '../types/SceneGraphPerformance.ts';

const pattern = /thread node calls: .+(?<calls>\d+)\s+\+\s+op\s+(?<op>\d+)\s+@\s+(?<rendezvous>\d+\.\d+)%/g;

Expand Down
4 changes: 2 additions & 2 deletions packages/debug-server/src/commands/hideFPS.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.js';

const pattern = /^\s*$/;

Expand Down
4 changes: 2 additions & 2 deletions packages/debug-server/src/commands/pauseProfiling.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.js';

const pattern = /bsprof paused/;

Expand Down
2 changes: 1 addition & 1 deletion packages/debug-server/src/commands/press.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { execute } from '../internal/execute.js';

const pattern = /^\s*$/;

Expand Down
4 changes: 2 additions & 2 deletions packages/debug-server/src/commands/removePlugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.js';

const pattern = /Removed sideloaded plugin id/;

Expand Down
4 changes: 2 additions & 2 deletions packages/debug-server/src/commands/resumeProfiling.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.js';

const pattern = /bsprof resumed/;

Expand Down
2 changes: 1 addition & 1 deletion packages/debug-server/src/commands/scheduleChannelStats.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { execute } from '../internal/execute.js';

const pattern = /^channel: .+?(\nrepeat (\d+)s \(on dev console\).*)?$/;

Expand Down
2 changes: 1 addition & 1 deletion packages/debug-server/src/commands/setMaxWarningCount.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { execute } from '../internal/execute.js';

const pattern = /updated brightscript warning limit to (\d+)/;

Expand Down
4 changes: 2 additions & 2 deletions packages/debug-server/src/commands/showFPS.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.js';

const pattern = /^\s*$/;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.js';

const pattern = /^\s*$/;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.js';

const pattern = /^\s*$/;

Expand Down
4 changes: 2 additions & 2 deletions packages/debug-server/src/commands/toggleFPS.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.js';

const pattern = /^\s*$/;

Expand Down
2 changes: 1 addition & 1 deletion packages/debug-server/src/commands/type.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Executor } from '../executors/Executor.ts';
import { execute } from '../internal/execute.ts';
import { execute } from '../internal/execute.js';

const pattern = /^\s*$/;

Expand Down
6 changes: 3 additions & 3 deletions packages/debug-server/src/executors/TelnetExecutor.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { createConnection } from 'node:net';
import { DebugServerError } from '../DebugServerError.ts';
import { Executor } from './Executor.ts';
import { DebugServerError } from '../DebugServerError.js';
import type { Executor } from './Executor.ts';

class TelnetExecutor implements Executor {
export class TelnetExecutor implements Executor {
#hostname: string;
#port: number;
#signal?: AbortSignal;
Expand Down
Loading

0 comments on commit 9490e8f

Please sign in to comment.