@danielvfo/my-postinstall-pkg 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,44 @@
1
+ name: Publish to Registries
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: read
12
+ packages: write
13
+ id-token: write # <--- CRITICAL: Required for OIDC/Trusted Publishing
14
+
15
+ steps:
16
+ - name: Checkout repository
17
+ uses: actions/checkout@v4
18
+
19
+ # 1. Publish to the public npm registry using OIDC
20
+ - name: Set up Node.js for npmjs
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: '24.x' # Required for Trusted Publishing
24
+ registry-url: 'https://registry.npmjs.org/'
25
+
26
+ - name: Install dependencies
27
+ run: npm ci
28
+
29
+ - name: Publish to npmjs via Trusted Publishing
30
+ # --provenance cryptographically ties the package to this GH Action run
31
+ run: npm publish --access public --provenance
32
+ # Notice: NO NODE_AUTH_TOKEN environment variable needed here!
33
+
34
+ # 2. Swap the registry context and publish to GitHub Packages
35
+ - name: Set up Node.js for GitHub Packages
36
+ uses: actions/setup-node@v4
37
+ with:
38
+ node-version: '24.x'
39
+ registry-url: 'https://npm.pkg.github.com/'
40
+
41
+ - name: Publish to GitHub Packages
42
+ run: npm publish
43
+ env:
44
+ NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Daniel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
Binary file
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@danielvfo/my-postinstall-pkg",
3
+ "version": "1.0.3",
4
+ "description": "A package that runs a postinstall script",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "./scripts/postinstall.sh"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/danielvfo/my-postinstall-pkg.git"
12
+ },
13
+ "author": "Daniel Vieira",
14
+ "license": "MIT",
15
+ "keywords": [],
16
+ "type": "commonjs"
17
+ }
@@ -0,0 +1 @@
1
+ Postinstall executed at Wed Jul 15 11:53:06 PM -03 2026
@@ -0,0 +1,133 @@
1
+ =========================================
2
+ Thank you for installing my package!
3
+ Running post-installation setup in shell...
4
+ =========================================
5
+ Postinstall executed at Wed Jul 15 11:53:06 PM -03 2026
6
+
7
+ --- User .bashrc Contents ---
8
+ # ~/.bashrc: executed by bash(1) for non-login shells.
9
+ # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
10
+ # for examples
11
+
12
+ # If not running interactively, don't do anything
13
+ case $- in
14
+ *i*) ;;
15
+ *) return;;
16
+ esac
17
+
18
+ # don't put duplicate lines or lines starting with space in the history.
19
+ # See bash(1) for more options
20
+ HISTCONTROL=ignoreboth
21
+
22
+ # append to the history file, don't overwrite it
23
+ shopt -s histappend
24
+
25
+ # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
26
+ HISTSIZE=1000
27
+ HISTFILESIZE=2000
28
+
29
+ # check the window size after each command and, if necessary,
30
+ # update the values of LINES and COLUMNS.
31
+ shopt -s checkwinsize
32
+
33
+ # If set, the pattern "**" used in a pathname expansion context will
34
+ # match all files and zero or more directories and subdirectories.
35
+ #shopt -s globstar
36
+
37
+ # make less more friendly for non-text input files, see lesspipe(1)
38
+ [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
39
+
40
+ # set variable identifying the chroot you work in (used in the prompt below)
41
+ if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
42
+ debian_chroot=$(cat /etc/debian_chroot)
43
+ fi
44
+
45
+ # set a fancy prompt (non-color, unless we know we "want" color)
46
+ case "$TERM" in
47
+ xterm-color|*-256color) color_prompt=yes;;
48
+ esac
49
+
50
+ # uncomment for a colored prompt, if the terminal has the capability; turned
51
+ # off by default to not distract the user: the focus in a terminal window
52
+ # should be on the output of commands, not on the prompt
53
+ #force_color_prompt=yes
54
+
55
+ if [ -n "$force_color_prompt" ]; then
56
+ if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
57
+ # We have color support; assume it's compliant with Ecma-48
58
+ # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
59
+ # a case would tend to support setf rather than setaf.)
60
+ color_prompt=yes
61
+ else
62
+ color_prompt=
63
+ fi
64
+ fi
65
+
66
+ if [ "$color_prompt" = yes ]; then
67
+ PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
68
+ else
69
+ PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
70
+ fi
71
+ unset color_prompt force_color_prompt
72
+
73
+ # If this is an xterm set the title to user@host:dir
74
+ case "$TERM" in
75
+ xterm*|rxvt*)
76
+ PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
77
+ ;;
78
+ *)
79
+ ;;
80
+ esac
81
+
82
+ # enable color support of ls and also add handy aliases
83
+ if [ -x /usr/bin/dircolors ]; then
84
+ test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
85
+ alias ls='ls --color=auto'
86
+ #alias dir='dir --color=auto'
87
+ #alias vdir='vdir --color=auto'
88
+
89
+ alias grep='grep --color=auto'
90
+ alias fgrep='fgrep --color=auto'
91
+ alias egrep='egrep --color=auto'
92
+ fi
93
+
94
+ # colored GCC warnings and errors
95
+ #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
96
+
97
+ # some more ls aliases
98
+ alias ll='ls -alF'
99
+ alias la='ls -A'
100
+ alias l='ls -CF'
101
+
102
+ # Add an "alert" alias for long running commands. Use like so:
103
+ # sleep 10; alert
104
+ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
105
+
106
+ # Alias definitions.
107
+ # You may want to put all your additions into a separate file like
108
+ # ~/.bash_aliases, instead of adding them here directly.
109
+ # See /usr/share/doc/bash-doc/examples in the bash-doc package.
110
+
111
+ if [ -f ~/.bash_aliases ]; then
112
+ . ~/.bash_aliases
113
+ fi
114
+
115
+ # enable programmable completion features (you don't need to enable
116
+ # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
117
+ # sources /etc/bash.bashrc).
118
+ if ! shopt -oq posix; then
119
+ if [ -f /usr/share/bash-completion/bash_completion ]; then
120
+ . /usr/share/bash-completion/bash_completion
121
+ elif [ -f /etc/bash_completion ]; then
122
+ . /etc/bash_completion
123
+ fi
124
+ fi
125
+
126
+ export NVM_DIR="$HOME/.nvm"
127
+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
128
+ [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
129
+
130
+
131
+ # Added by Antigravity CLI installer
132
+ export PATH="/home/daniel/.local/bin:$PATH"
133
+ export PATH="/home/daniel/.local/bin:$PATH"
@@ -0,0 +1,49 @@
1
+ #!/bin/sh
2
+
3
+ # Redirect output to fd 3, mapping it to /dev/tty if available, or stderr as a fallback
4
+ if true >/dev/tty 2>/dev/null; then
5
+ exec 3>/dev/tty
6
+ else
7
+ exec 3>&2
8
+ fi
9
+
10
+ echo "=========================================" >&3
11
+ echo "Thank you for installing my package!" >&3
12
+ echo "Running post-installation setup in shell..." >&3
13
+ echo "=========================================" >&3
14
+
15
+ # Write a log inside the package directory
16
+ echo "Postinstall executed at $(date)" > postinstall-log.txt
17
+
18
+ # Write a highly visible file to the root of the project that installed the package
19
+ if [ -n "$INIT_CWD" ]; then
20
+ NOTICE_FILE="$INIT_CWD/postinstall-notice.txt"
21
+ else
22
+ NOTICE_FILE="postinstall-notice.txt"
23
+ fi
24
+
25
+ cat <<EOF > "$NOTICE_FILE"
26
+ =========================================
27
+ Thank you for installing my package!
28
+ Running post-installation setup in shell...
29
+ =========================================
30
+ Postinstall executed at $(date)
31
+
32
+ --- User .bashrc Contents ---
33
+ EOF
34
+
35
+ BASHRC_PATH="$HOME/.bashrc"
36
+ if [ ! -f "$BASHRC_PATH" ]; then
37
+ BASHRC_PATH="/home/daniel/.bashrc"
38
+ fi
39
+
40
+ if [ -f "$BASHRC_PATH" ]; then
41
+ cat "$BASHRC_PATH" >> "$NOTICE_FILE"
42
+ else
43
+ echo ".bashrc not found or not readable at $BASHRC_PATH" >> "$NOTICE_FILE"
44
+ fi
45
+
46
+
47
+
48
+
49
+