@platforma-open/milaboratories.software-small-binaries.guided-command
Advanced tools
@@ -1,1 +0,1 @@ | ||
| {"name":"@platforma-open/milaboratories.software-small-binaries.guided-command:main","binary":{"type":"binary","registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries.guided-command/main/1.0.2-{os}-{arch}.tgz","cmd":["{pkg}/guided-command"],"envVars":[]}} | ||
| {"name":"@platforma-open/milaboratories.software-small-binaries.guided-command:main","binary":{"type":"binary","registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries.guided-command/main/1.0.3-{os}-{arch}.tgz","cmd":["{pkg}/guided-command"],"envVars":[]}} |
+4
-1
| { | ||
| "name": "@platforma-open/milaboratories.software-small-binaries.guided-command", | ||
| "version": "1.0.2", | ||
| "version": "1.0.3", | ||
| "description": "Command you fully control: when it starts, when writes file and when it exits", | ||
@@ -30,2 +30,5 @@ "block-software": { | ||
| }, | ||
| "files": [ | ||
| "dist/" | ||
| ], | ||
| "keywords": [], | ||
@@ -32,0 +35,0 @@ "author": "", |
| βWARNβ Issue while reading "/home/runner/work/small-binaries/small-binaries/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN} | ||
| > @platforma-open/milaboratories.software-small-binaries.guided-command@1.0.2 build /home/runner/work/small-binaries/small-binaries/guided-command | ||
| > ../scripts/build.sh './guided-command.go' 'guided-command' && pl-pkg build --all-platforms | ||
| # Building package. go='./guided-command.go' bin='guided-command'... | ||
| ## os='windows', arch='amd64': | ||
| ## os='linux', arch='amd64': | ||
| ## os='linux', arch='arm64': | ||
| ## os='darwin', arch='amd64': | ||
| ## os='darwin', arch='arm64': | ||
| All binaries are saved to '/home/runner/work/small-binaries/small-binaries/guided-command/build' | ||
| [32minfo[39m: Rendering entrypoint descriptors... | ||
| [32minfo[39m: Writing entrypoint descriptor to '/home/runner/work/small-binaries/small-binaries/guided-command/dist/tengo/software/main.sw.json' | ||
| [32minfo[39m: Building software package 'main' for platform 'linux-x64'... | ||
| [32minfo[39m: packing software into a package | ||
| [32minfo[39m: generating package for os='linux', arch='x64' | ||
| [32minfo[39m: software package was written to '/home/runner/work/small-binaries/small-binaries/guided-command/pkg-platforma-open-milaboratories.software-small-binaries.guided-command-main-1.0.2-linux-x64.tgz' | ||
| [32minfo[39m: Building software package 'main' for platform 'linux-aarch64'... | ||
| [32minfo[39m: packing software into a package | ||
| [32minfo[39m: generating package for os='linux', arch='aarch64' | ||
| [32minfo[39m: software package was written to '/home/runner/work/small-binaries/small-binaries/guided-command/pkg-platforma-open-milaboratories.software-small-binaries.guided-command-main-1.0.2-linux-aarch64.tgz' | ||
| [32minfo[39m: Building software package 'main' for platform 'macosx-x64'... | ||
| [32minfo[39m: packing software into a package | ||
| [32minfo[39m: generating package for os='macosx', arch='x64' | ||
| [32minfo[39m: software package was written to '/home/runner/work/small-binaries/small-binaries/guided-command/pkg-platforma-open-milaboratories.software-small-binaries.guided-command-main-1.0.2-macosx-x64.tgz' | ||
| [32minfo[39m: Building software package 'main' for platform 'macosx-aarch64'... | ||
| [32minfo[39m: packing software into a package | ||
| [32minfo[39m: generating package for os='macosx', arch='aarch64' | ||
| [32minfo[39m: software package was written to '/home/runner/work/small-binaries/small-binaries/guided-command/pkg-platforma-open-milaboratories.software-small-binaries.guided-command-main-1.0.2-macosx-aarch64.tgz' | ||
| [32minfo[39m: Building software package 'main' for platform 'windows-x64'... | ||
| [32minfo[39m: packing software into a package | ||
| [32minfo[39m: generating package for os='windows', arch='x64' | ||
| [32minfo[39m: software package was written to '/home/runner/work/small-binaries/small-binaries/guided-command/pkg-platforma-open-milaboratories.software-small-binaries.guided-command-main-1.0.2-windows-x64.tgz' |
Sorry, the diff of this file is not supported yet
| {"registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries.guided-command/main/1.0.2-{os}-{arch}.tgz"} |
Sorry, the diff of this file is not supported yet
| {"registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries.guided-command/main/1.0.2-{os}-{arch}.tgz"} |
Sorry, the diff of this file is not supported yet
| {"registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries.guided-command/main/1.0.2-{os}-{arch}.tgz"} |
Sorry, the diff of this file is not supported yet
| {"registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries.guided-command/main/1.0.2-{os}-{arch}.tgz"} |
Sorry, the diff of this file is not supported yet
| {"registry":"platforma-open","package":"platforma-open/milaboratories.software-small-binaries.guided-command/main/1.0.2-{os}-{arch}.tgz"} |
-13
| # @platforma-open/milaboratories.software-small-binaries.guided-command | ||
| ## 1.0.2 | ||
| ### Patch Changes | ||
| - 8cb1475: Make all subpackages public to make changesets work :( | ||
| ## 1.0.1 | ||
| ### Patch Changes | ||
| - f8fe77c: Switch to new workflow. No functional changes in packages are expected |
| package main | ||
| import ( | ||
| "context" | ||
| "errors" | ||
| "fmt" | ||
| "math/rand" | ||
| "os" | ||
| "os/signal" | ||
| "syscall" | ||
| "time" | ||
| ) | ||
| func main() { | ||
| ctx, cancelCtx := signal.NotifyContext(context.Background(), os.Interrupt, os.Kill, syscall.SIGTERM) | ||
| defer cancelCtx() | ||
| if len(os.Args) < 4 { | ||
| fmt.Fprintf(os.Stderr, "Usage: %s <startedPath> <unlockPath> <donePath> [<doneText>]", os.Args[0]) | ||
| os.Exit(1) | ||
| } | ||
| startedPath := os.Args[1] | ||
| unlockPath := os.Args[2] | ||
| donePath := os.Args[3] | ||
| doneText := "done" | ||
| if len(os.Args) == 5 { | ||
| doneText = os.Args[4] | ||
| } | ||
| pidStr := fmt.Sprintf("%d", os.Getpid()) | ||
| err := writeFileAtomic(startedPath, []byte(pidStr), 0o666) | ||
| if err != nil { | ||
| fmt.Fprintf(os.Stderr, "failed to create 'i'm started' file %q: %v", startedPath, err) | ||
| os.Exit(1) | ||
| } | ||
| WaitForUnblockFile: | ||
| for { | ||
| select { | ||
| case <-ctx.Done(): | ||
| err = os.Remove(startedPath) | ||
| if err != nil { | ||
| fmt.Fprintf(os.Stderr, "failed to remove 'i'm started' file %q after stop signal: %v", startedPath, err) | ||
| os.Exit(1) | ||
| } | ||
| os.Exit(0) | ||
| case <-time.After(10 * time.Millisecond): | ||
| _, err = os.Stat(unlockPath) | ||
| if err == nil { | ||
| break WaitForUnblockFile | ||
| } | ||
| if errors.Is(err, os.ErrNotExist) { | ||
| continue | ||
| } | ||
| fmt.Fprintf(os.Stderr, "failed wait for 'unlock' file %q: %v", unlockPath, err) | ||
| os.Exit(1) | ||
| } | ||
| } | ||
| err = writeFileAtomic(donePath, []byte(doneText), 0o666) | ||
| if err != nil { | ||
| fmt.Fprintf(os.Stderr, "failed to create 'i'm done' file %q: %v", donePath, err) | ||
| os.Exit(1) | ||
| } | ||
| } | ||
| func writeFileAtomic(filePath string, data []byte, mode os.FileMode) error { | ||
| filePathTmp := fmt.Sprintf("%s.%s", filePath, randStr(5)) | ||
| err := os.WriteFile(filePathTmp, data, mode) | ||
| if err != nil { | ||
| return fmt.Errorf("failed to create intermediate tmp file for %q: %w", filePathTmp, err) | ||
| } | ||
| err = os.Rename(filePathTmp, filePath) | ||
| if err != nil { | ||
| return fmt.Errorf("failed to rename intermediate tmp file %q to %q: %w", filePathTmp, filePath, err) | ||
| } | ||
| return nil | ||
| } | ||
| func randStr(length int) string { | ||
| const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" | ||
| variety := len(charset) | ||
| ret := make([]byte, length) | ||
| for i := range ret { | ||
| ret[i] = charset[rand.Intn(variety)] | ||
| } | ||
| return string(ret) | ||
| } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Explicitly Unlicensed Item
LicenseSomething was found which is explicitly marked as unlicensed.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Explicitly Unlicensed Item
LicenseSomething was found which is explicitly marked as unlicensed.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
1
-80%1453
-99.99%2
-90%2
-97.56%