aboutsummaryrefslogtreecommitdiff
path: root/Makefile
AgeCommit message (Collapse)Author
2025-06-30make: run eslint from node_modules/.bin directory directlyShulhan
Using npx does not guarantee works on system installed nodejs.
2025-02-03all: replace external linters with internalShulhan
The fieldalignment and shadow is linter from golang.org/x/tools. This linters actually have an API that can be combined into a program, which provided by package "pakakeh.go/lib/goanalysis".
2025-02-03make: do not ignore errors from lintersShulhan
2025-02-03cmd/gorankusu: add flags to set HTTP address and development modeShulhan
The flag "dev" is boolean that when set will run service in development mode, watching the adoc and ts files. The flag "http" is string that set the HTTP listen address.
2024-10-07all: replace linter "revive" with "go vet"Shulhan
2024-09-04make: add task "build"Shulhan
This is so we can build again if its failed, after lint and test has passed.
2024-04-23all: add task to initialize the repository and toolsShulhan
The task "init" include initializing git submodule, installing third party tools for linters, and installing node packages.
2024-02-07all: rename the project to gorankusuShulhan
The original idea of "trunks" is because the core library that we use for load testing is named "vegeta" (from Dragon Ball) [1][2], and Vegeta has a son named Trunks. In English, trunks also have multiple meanings. In order to have a unique name, we rename the project to "gorankusu", which is a combination of "go" (the main programming language that built the application) and "torankusu" the Hepburn of "Trunks". [1]: https://github.com/tsenart/vegeta/ [2]: https://en.wikipedia.org/wiki/Vegeta Implements: https://todo.sr.ht/~shulhan/gorankusu/2
2024-02-04make: generate test coverageShulhan
2023-11-11Makefile: replace the Go linter and apply all their recommendationsShulhan
Previously, we use golangci-lint as linter. This linter does not provides any useful recommendation lately and the development is quite a mess, sometimes its break when using Go tip. In this changes we replace it with revive, fieldalignment, and shadow; and fix all of their recommendations.
2023-11-11_www: setup eslint for linting TypeScript filesShulhan
2022-08-21all: fix all linter warningsShulhan
Some linter, govet, warns about possible copied Mutex on HttpRequest. To fix this we implement method clone and Stringer on HttpRequest.
2022-03-14all: changes the license of trunks software to GPL 3.0 or laterShulhan
See https://kilabit.info/journal/2022/gpl for more information.
2022-02-05Makefile: run the test with CGO_ENABLED=1Shulhan
In case user set CGO_ENABLED=0, the task for "all" will fail. This commit fix this by setting CGO_ENABLED to 1 when running test with -race option.
2021-10-18all: rename internal/cmd/trunks-example to internal/cmd/trunksShulhan
The internal/cmd/trunks-example is not run and provide an example only now, its include the workers to build, recompile, re-embeded files.
2021-10-17all: merge all workers for related to development to internal/cmdShulhan
Previously, we have a workers to recompile TypeScript and regenerate HTML files from adoc inside the Trunks type. The workers will run if the environment variable TRUNKS_DEV set to non-zero. This changes move those workers to the internal/cmd/trunks-example, because those workers are related for development only not for running Trunks server.
2021-10-17all: move the main program for example to internal/cmd/trunks-exampleShulhan
The "cmd" directory on module should be reserved for installable program that can be executed outside of this repository. The trunks-example is development server should be run on root of this repository only, not installable to $GOBIN.
2021-10-11go.mod: update to latest share and ciigo moduleShulhan
Changes, * share: fix the HTTP caching using ETag on the server * share: rename the terminology to generate Go source code to "embed" * ciigo: check markup modification time before converting to HTML
2021-09-25all: simplify development on trunks-exampleShulhan
Previously to developer and test trunks on local we need to run "tsc -w" on directory _www to watch and recompile any changes to TypeScript files, and run "go run ./cmd/trunks-example" to view the Trunks web interface. Since we will have internal documentation inside _www/docs, we need to run another ciigo server that watch any changes to .adoc files and convert it to HTML. Three separate commands for development. This changes refactoring the development process by running two goroutines when TRUNKS_DEV environment variable is set to non-empty. One goroutine watch any changes to TypeScript, HTML, and tsconfig files inside the _www, and when there is an update it will execute "tsc -p" to recompile and "go run ./internal/generate-memfs" to embed them into Go source. Another goroutine watch any changes to .adoc files inside "_www/docs" directory and convert them into HTML files. This goroutine will running in the background while the HTTP server is running too.
2021-09-20Makefile: add task to re-compile the TypeScript filesShulhan
The "tsc" task run the tsc program using the tsconfig.json inside the directory _www, which will recompile all TypeScript before generating the embeded file.
2021-09-18www: refactoring using TypeScript and wui libraryShulhan
Previously, the web user interface is written in pure, single JavaScript file. The LOC is short but its become hard to maintenance, especially when there is a change in HTML layout or on the response format. This changes rewrite the interface to use TypeScript in order to easily maintenance. The generated JavaScript is loaded using module [1]. [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
2021-04-09all: add task to generate embedded files in _wwwShulhan
The content of _www directory is required to run the trunks as library.
2021-03-27cmd: rename the program trunks to trunks-exampleShulhan
The trunks directory on command is actually the main program for example package.
2021-03-21all: various changesShulhan
* Increase the DEBUG value to 3 to match with latest libhttp fix debug output of client request * _www: fix rendering HTTP headers, missing "target" parameter * Remove unused "IsRunning" from AttackResult * example: add an example endpoint for POST with x-www-form-urlencoded * Remove parameter Target on HttpRunHandler. The Target value can be retrieved from RunRequest.Target. * Target: change the field Vars type from map[string]string to KeyValue * Trunks: merge Target and HttpRequest from request to original Target and HttpTarget respectively before calling Run * Prefix the result file name with Target.ID * Move the package documentation to doc.go
2021-03-15trunks: a module for testing HTTP servicesShulhan
Trunks is a library and HTTP service that provide web user interface to test HTTP service, similar to Postman, and for load testing. For the load testing we use vegeta [1] as the backend. [1] https://github.com/tsenart/vegeta