Git Product home page Git Product logo

klingon's Introduction

Angular Klingon

The perfect @angular/cli companion.



Package Version Description
klingon-app Klingon App the electron shell host for the companion application.
klingon-ui Klingon UI the core application: the companion app. This app is built using the @angular/cli.
klingon-server Klingon Server the server (agent) application that serves a backend for the companion application. Its role is to spin up PTY instances and allow the companion app to communicate with those PTY instances via WebSocket.
klingon-website Klingon Website the source code for angular.run.

How to run locally (wip)

  1. Clone repo and install dependencies.
  2. Run the server npm run start:server
  3. Run the ui npm run start:ui
  4. Run the application within the electron shell npm run start:app or go to http://localhost:4200

How to package the application

  • For OSX npm run package:app:osx
  • For Windows npm run package:app:win (not tested yet)
  • For Linux npm run package:app:linux (not tested yet)

Contributions contributions welcome

You are welcome to contribute to this project. This project is still in its early stage, no feature is frozen yet. All suggestions/fixes/help are more than welcome. Add your feedback to this todo list for feature requests.

Please contact me (@manekinekko) if you need some help getting started with the setup.

Want to file a bug, contribute some code, or improve documentation? Excellent ! Read up on our guidelines for contributing.

klingon's People

Contributors

alejandrocoding avatar beeman avatar itswisdomagain avatar monkeywithacupcake avatar renovate[bot] avatar rudyweber avatar sumitparakh avatar tagazok avatar tinesoft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

klingon's Issues

Cannot run with node 10.9.0, electron packager requires node 4.0 or above.

Getting this bug while trying to package klingon electron app in windows 10.

To Reproduce : Run npm run package:app:win
Expected behavior : It should create release build of klingon app

But it throws error :--
Cannot run with node 10.9.0, electron packager requires node 4.0 or above.

Screenshots
image

ng serve breaks : project contains old/deprecated ng serve flags.

Describe the bug
When you serve angular application, it throws many errors because it is still using some old flags which are removed in angular 6..
We get following bugs:-

  • Cannot determine project or target for Architect command
  • Unknown option --app
  • Unknown option --environment
  • Unknown option: '--extractCss'
  • Unknown option: '--outputHashing'
  • Unknown option: '--sourcemap'

To Reproduce
Serve any angular application from serve tab.

Expected behavior
It should serve the app successfully.

Revamp angular klingon design for better user experience

Is your feature request related to a problem? Please describe.
Currently it feels very inconvenient as a user that i have to import or create new project every time i open the project. Although the empty space around different tabs can be utilized in better ways. Hence this issue will cover and track those improvements which will improve/overhaul overall user experience of angular developer.

Bug: Local workspace file ('angular.json') could not be found

Describe the bug
Getting Location workspace file ('angular.json') could not be found while trying to serve application

Screenshots
angularjsonnotfound

Additional context
Problem is, everytime it is trying to serve application from home directory where app doesn't exist. Hence command fails.

Proposed Solution
There should be an option to specify root dir in serve tab and make application field mandatory. Once user enter root dir and application name, we can pass it as current working directory to the cli command. Note msg.dir here:-
https://github.com/angular-klingon/klingon/blob/master/packages/klingon-server/terminal.js#L60

Related to #6

Server: NPM install fails due node-pty problem during lerna bootstrap execution

When you run npm install to fetch all the packages, there is a postscript after installation (postinstall) to bootstrap by lerna that it fails in version 10 of node.

Current versions:

  • npm: 6.2.0
  • node: 10.7.0

The problem actually resides in a dependency version of node-pty.
There is a fix in the release log of node-pty. This was merged in version 0.7.5.

More info:
issue: microsoft/node-pty#192
commit: microsoft/node-pty@79b5b0c

feat: set shell path based on saved project root directory

If project root directory is specified then on next startup, shell should be in the specified project root directory, instead of home directory.

It will improve user's expirience because generally, developers like to work in their own workspace, so if they are already in their workspace directory in klingon,they will be able to write shell commands from klingon shell itself instead of doing it from their own terminal.

@manekinekko

Bug: new line(\n) doesn't work in windows

Describe the bug
Line feed character(\n) doesn't send Enter signal to terminal in Windows.

To Reproduce
Steps to reproduce the behavior:

  1. Change project root directory
  2. Dry run new project
  3. Reload

Expected behavior
After reloading, new project root directory which gets saved in localstorage, should be set as current directory in terminal.

Screenshots
localhost_4200_

Desktop (please complete the following information):

  • OS: windows 10

depends on #83

Add prettier in recommended vscode extension file

Is your feature request related to a problem? Please describe.
Faced some merge conflict issues due to inconsistent formatting.

Describe the solution you'd like
Set a recommended formatting extension and default formatting setting for angular klingon so that user always know which formatter to use to avoid formatting based merge conflicts.

Bug: the server crashes if the root directory doesn't exist

Describe the bug
The server crashes if the provided root directory doesn't exist.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the New tab
  2. Fill in the 'Project root directory' with an invalid directory
  3. Click on Create or Dry-run
  4. See the error on the server
  5. Plus, the UI does not detect the error.

Expected behavior

  1. The UI should detect that the server has crashed.
  2. If the provided root directory is not present, it should be created

Screenshots
image

Upgrade to latest stable angular release

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

feat: change shell/console path to newly created angular project path

Is your feature request related to a problem? Please describe.
This feature is related to the ng generate issue #5 .

Reason to include this feature
Point behind this feature is that, when a user creates new project, he will most likely work on it. So instead of leaving shell at home directory, we should change it to working directory path. i.e., the path of newly created angular project..

Current Case:-
localhost_4200_

Should be:-
localhost_4200_ 1
(Documents is project root directory and nggen is app directory name)

It will help in generating new components just after creating new project. User won't need to rely on project root directory field if he is alreay in that path.

@manekinekko

Crash on new project creation

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

'@klingon/core': '0.1.0',
npm: '6.0.1',
ares: '1.10.1-DEV',
cldr: '31.0.1',
http_parser: '2.7.0',
icu: '59.1',
modules: '57',
nghttp2: '1.25.0',
node: '8.9.4',
openssl: '1.0.2n',
tz: '2017b',
unicode: '9.0',
uv: '1.15.0',
v8: '6.1.534.50',
zlib: '1.2.11'

Repro steps.

Create new project:
Set name
change prefixe
select in advance options :

  • Adds more details to output logging
  • Should create a minimal app
  • Generate a routing module
    Click create

The log given by the failure.

Error: Unable to start terminal process: CreateProcess failed
at new WindowsPtyAgent (C:\Workspace\PERSO\OSS\klingon\packages\klingon-server\node_modules\node-pty\lib\windowsPtyAgent.js:25:24)
at new WindowsTerminal (C:\Workspace\PERSO\OSS\klingon\packages\klingon-server\node_modules\node-pty\lib\windowsTerminal.js:45:23)
at Object.spawn (C:\Workspace\PERSO\OSS\klingon\packages\klingon-server\node_modules\node-pty\lib\index.js:27:12)
at app.post (C:\Workspace\PERSO\OSS\klingon\packages\klingon-server\terminal.js:23:22)
at Layer.handle [as handle_request] (C:\Workspace\PERSO\OSS\klingon\packages\klingon-server\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Workspace\PERSO\OSS\klingon\packages\klingon-server\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (C:\Workspace\PERSO\OSS\klingon\packages\klingon-server\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (C:\Workspace\PERSO\OSS\klingon\packages\klingon-server\node_modules\express\lib\router\layer.js:95:5)
at C:\Workspace\PERSO\OSS\klingon\packages\klingon-server\node_modules\express\lib\router\index.js:281:22
at Function.process_params (C:\Workspace\PERSO\OSS\klingon\packages\klingon-server\node_modules\express\lib\router\index.js:335:12)
<<< [ 'new',
'Klingon',
'Test',
'--prefix=kli',
'--source-dir=src',
'--style=css',
'--verbose=true',
'--inline-style=false',
'--inline-template=false',
'--dry-run=false',
'--minimal=true',
'--routing=true',
'--skip-commit=false',
'--skip-git=false',
'--skip-install=false',
'--skip-tests=false',
'' ]
events.js:183
throw er; // Unhandled 'error' event
^

Error: spawn ng ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @klingon/[email protected] start: node terminal.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @klingon/[email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\parsy.v\AppData\Roaming\npm-cache_logs\2018-08-30T11_42_41_489Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @klingon/[email protected] start:server: cd packages/klingon-server/ && npm start
npm ERR! Exit status 1

Mention any other details that might be useful.

OS : windows 10

TODOs for v1

We will use this issue to track todos for v1: (this is a living issue โ€” updated frequently)

Note to contributors

If you'd like to contribute to any of the TODOs below, please create a separate issue so we can track and discuss each task separately.

Repo

  • add CONTRIBUTING.md
  • add LICENSE
  • add a decent README
  • add .github/SAVED_REPLIES.md
  • add .github/ISSUE_TEMPLATE.md
  • add NPM dependencies badges
  • add github labels
  • integrate klingon with stackblitz.com
  • <what else?>

@klingon/ui

  • require cli flags dynamically (#11)
  • move to @angular/devkit (#9)
  • move to @angular-devkit/schematics (read about schematics) (#10)
  • add missing tests
  • add a klingon.json that will hold upcoming configurations (#68)
  • implement the UI for ng new (#4)
  • implement the UI for ng generate (#5)
  • implement the UI for ng serve (#6)
  • implement the UI for ng build (#7)
  • implement the UI for ng test (#8)
  • feature: should be able to save a command (with selected flags) for later use
  • move to mat-expansion-panel (#45)
  • <what else?>

@klingon/server

  • <what else?>

@klingon/app

  • integrate the UI with the electron shell (initial setup done via #17)
  • should be able to dev the UI inside the electron shell
  • prepare builds for MS, MacOS and Linux (done in #17)
  • feature: drag and drop an angular app folder will set the Klingon UI accordingly (restore mode)
  • <what else?>

@klingon/website

  • make it a PWA (#37)
  • <what else?>

avoid changing shell console path when running a dry command

Describe the bug
When we run the "ng new" command in a DRY mode, the app tries to change shell directory to that new folder app. But with a DRY command, no forlder gets created!

To Reproduce
Steps to reproduce the behavior:

  1. create a new app
  2. execute using "Dry Run"

Expected behavior
Don't change the current directory in dry mode.

Screenshots
image

remove hardcoded socket connection url in klingon ui

I've just switched from windows 10 to linux (kali) and when i ran the project. I found that there was another service(Apache Test) which was using 3000 port. So klingon server threw "port in use" error.

So i've changed server port from 3000 to 3001 and it worked.
But then, klingon-ui threw 404 error because localhost:3000 was hardcoded in it.. So i had to update the port at 4-5 locations in klingon-ui. It is a bit time taking.

I think we should define scheme, host and port values in environment file so that it is reused across klingon-ui and reduce hardcoding.

Bug: Signals not supported on windows.

Describe the bug
Terminal kill signal throws error - Signals not supported on windows.

To Reproduce
Run any unauthorized klingon shell command and shell will try to terminate it using a kill signal 'SIGINT'. It works in Linux based systems but not in Windows.

Expected behavior
It should cancel current command and jump to the new line as happens in linux systems.

Desktop (please complete the following information):

  • Windows 10 Pro

lerna bootstrap fail due package-lock.json files

When cloning the project and running npm install, packages are installed as expected, but as the postintall script run lerna bootstrap, this fails due some packages conflicts during the installtion of the packages versions in each project.

The fix is to remove package-lock files and run npm install to generate new lock files. After this, you can run npm install and start without errors.

require cli flags dynamically

there is a new feature coming in the @angular/cli which is part of @angular-devkit it will allow getting a list of flags for a certain command. Klingon will use that in order to avoid hardcoding these flags.

Migrate express to nestjs

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Bug: service worker script breaks in electron in production mode, klingon logo url broken

Describe the bug
When we run electron in prod. env. Service worker script and klingon logo image breaks.

To Reproduce
Steps to reproduce the behavior:

  1. Run electron in prod. env (If you alreay have service worker installed in electron then unregister it and then run it again)
  2. Check console and you will see few errors related to service worker script, unsupported file protocol etc.

Expected behavior
It should load service worker script.

Screenshots
errors

Desktop (please complete the following information):

  • Ubuntu

klingon(ui): new project creation fails

When trying to create a new project, it fails. The output error is:

Data path "" should NOT have additional properties(sourceDir).

This is due the flags, old flags are being used.

The fix is change the UI to configure only the up to date available flags.

Project directory doesn't change in windows

Describe the bug
While importing any angular project from different drive, or creating a new one with project root from different drive, klingon doesn't change path to the resultant directory after successful project creation or import

To Reproduce
Steps to reproduce the behavior:

  1. Import any angular project from other drive. Or create a new project with project root path from different drive.
  2. Click Create

After npm install , you will notice that klingon tries to change current shell location(which is home directory by default) to the newly created project root directory. But it doesn't.

Expected behavior
It should change directory to the different drive location

Screenshots
localhost_4200_ 1

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome

Build a statistical dashboard page

Is your feature request related to a problem? Please describe.
This will be the home page for any new project or imported or opened an existing project. It will provide statistics of all angular utilities such as components, services, pipes etc and will provide a deep linking within them.

switch to angular/master#HEAD

Let's use angular#master^HEAD as our main version.

NOTE: this is forcing us to stay up to date but also, this may introduce some breaking changes, so we should be reactive and fix bugs as they arise ^^

Upgrade to angular 11

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Feat: Open Contributing guideline link page from contribute menu

Describe the bug
Currently, Contribute option does nothing when you click on it.

To Reproduce
Steps to reproduce the behavior:

  1. Click on Option menu in the top-right side of klingon-ui.
  2. Click Contribute menu.

Expected behavior
It should open Contributing guideline page

Screenshots
127 0 0 1_4200_

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.