@mservices-tech/scripts 3.2.2

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +153 -0
  2. package/LICENSE +7 -0
  3. package/README.md +56 -0
  4. package/add_sandbox_upstream/add_sandbox_upstream.sh +32 -0
  5. package/buildUsingEsbuild/buildUsingEsbuild.js +54 -0
  6. package/bump_version/.versionrc.js +20 -0
  7. package/bump_version/bump_version.sh +93 -0
  8. package/clean/clean.sh +61 -0
  9. package/copy_package_build_to_project/copy_package_build_to_project.sh +46 -0
  10. package/delete_and_fetch_git_tags/delete_and_fetch_git_tags.sh +35 -0
  11. package/docker/docker.sh +68 -0
  12. package/docker/docker_utils.sh +143 -0
  13. package/download_design_system_package/download_design_system_package.sh +41 -0
  14. package/enrich_changelog_with_dependency_changes/enrich_changelog_with_dependency_changes.sh +289 -0
  15. package/find_all_javascript_files/find_all_javascript_files.sh +76 -0
  16. package/find_and_parse_environmental_variable_files/find_and_parse_environmental_variable_files.sh +180 -0
  17. package/find_references/find_references.sh +50 -0
  18. package/generateIndexFilesFromTemplate/generateIndexFilesFromTemplate.js +419 -0
  19. package/get_package_info/get_package_info.sh +103 -0
  20. package/git_user_stats/git_user_stats.sh +95 -0
  21. package/index.js +1 -0
  22. package/is_branch_rebased/is_branch_rebased.sh +44 -0
  23. package/last_release_commits/last_release_commits.sh +101 -0
  24. package/list_all_installed_dependencies/list_all_installed_dependencies.sh +40 -0
  25. package/package.json +14 -0
  26. package/prepare_obligatory_package_files/prepare_obligatory_package_files.sh +61 -0
  27. package/publish/publish.sh +89 -0
  28. package/removeGitHashesFromMarkdownFile/removeGitHashesFromMarkdownFile.js +50 -0
  29. package/remove_all_node_modules/remove_all_node_modules.sh +26 -0
  30. package/remove_all_scripts_in_single_workspace/remove_all_scripts_in_single_workspace.sh +62 -0
  31. package/reverse_proxy/README.md +102 -0
  32. package/reverse_proxy/clean.sh +8 -0
  33. package/reverse_proxy/configuration.sh +5 -0
  34. package/reverse_proxy/generate_certificates.sh +140 -0
  35. package/reverse_proxy/localhost.ext.template +12 -0
  36. package/reverse_proxy/nginx_domain_ssl_reverse_proxy.conf.template +89 -0
  37. package/reverse_proxy/openssl.conf +21 -0
  38. package/reverse_proxy/reverse_proxy.sh +48 -0
  39. package/runShellScript/runShellScript.js +49 -0
  40. package/source_environment_variables/source_environment_variables.sh +38 -0
  41. package/sync_sandbox_with_upstream/sync_sandbox_with_upstream.sh +53 -0
  42. package/testIncorrectValues/testIncorrectValues.js +51 -0
  43. package/typescript_usage_statistics/typescript_usage_statistics.sh +35 -0
  44. package/utils.sh +337 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,153 @@
1
+ ### 3.2.2 (2026-03-19)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **styleguide:** Update axios dependency
6
+
7
+ ### 3.2.1 (2025-09-23)
8
+
9
+ ### Bug Fixes
10
+
11
+ - **scripts:** Fix incremental prerelease versioning
12
+
13
+ ## 3.2.0 (2025-09-12)
14
+
15
+ ### Features
16
+
17
+ - **scripts:** Make prerelease version unique per branch and add dry run flag
18
+
19
+ ### Bug Fixes
20
+
21
+ - **scripts:** Disable scripts package to be published with additional namespace
22
+
23
+ ## 3.1.0 (2025-02-11)
24
+
25
+ ### Features
26
+
27
+ - **scripts:** Add dependency tracking to changelog generation
28
+
29
+ ### Bug Fixes
30
+
31
+ - **scripts:** Improve npm tag selection logic
32
+ - **scripts:** Resolve shell script interpretation error in .versionrc.js postchangelog command
33
+
34
+ ## 3.0.0 (2025-02-03)
35
+
36
+ ### ⚠ BREAKING CHANGES
37
+
38
+ - **utils:** Module export hierarchy has been simplified by consolidating nested submodule exports into their parent modules. Import paths referencing nested modules (such as '@mservicestech/utils/generic/unit-conversion') must be updated to use the parent module path (e.g., '@mservicestech/utils/generic'). This change improves package maintainability and reduces import path complexity.
39
+
40
+ ### Features
41
+
42
+ - **scripts:** Add release_type paramter to get_package_info.sh script
43
+ - **scripts:** Extend transpile function to support mjs
44
+ - **utils:** Implement dual module exports for CommonJS and ESM
45
+
46
+ ### 2.5.1 (2024-12-18)
47
+
48
+ ## 2.5.0 (2024-12-17)
49
+
50
+ ### Features
51
+
52
+ - **scripts:** Commit all staged files (not only CHANGELOG and package.json) during release
53
+ - **scripts:** Update buildUsingEsbuild function to better handle multi-file builds, add esbuild arguments parameter
54
+
55
+ ## 2.4.0 (2024-12-17)
56
+
57
+ ### Features
58
+
59
+ - **scripts:** Commit all staged files (not only CHANGELOG and package.json) during release
60
+
61
+ ## 2.3.0 (2024-12-13)
62
+
63
+ ### Features
64
+
65
+ - **scripts:** Add watch flag handling in buildUsingEsbuild function
66
+
67
+ ### Bug Fixes
68
+
69
+ - Clarify links labels in documentation
70
+
71
+ ## 2.2.0 (2024-10-11)
72
+
73
+ ### Features
74
+
75
+ - **scripts:** Add package_directory flag to last_release_commits.sh script
76
+
77
+ ### Bug Fixes
78
+
79
+ - Resolve issues with go module pulling
80
+
81
+ ### 2.1.1 (2024-07-17)
82
+
83
+ ### Bug Fixes
84
+
85
+ - Add licence
86
+
87
+ ## 2.1.0 (2024-07-16)
88
+
89
+ ### Features
90
+
91
+ - **scripts:** Implement index generator script
92
+
93
+ ### 2.0.2 (2024-06-04)
94
+
95
+ ### Bug Fixes
96
+
97
+ - **scripts:** Return correct next versionof published package
98
+
99
+ ### 2.0.1 (2024-06-04)
100
+
101
+ ### Bug Fixes
102
+
103
+ - **scripts:** Fix standard-version binary path resolution
104
+
105
+ ## 2.0.0 (2024-05-31)
106
+
107
+ ### ⚠ BREAKING CHANGES
108
+
109
+ - **scripts:** The 'get_package_info' script now returns a different output formatting.
110
+
111
+ ### Features
112
+
113
+ - **scripts:** Add next package version output to get_package_info script
114
+
115
+ ## 1.7.0 (2024-05-27)
116
+
117
+ ### Features
118
+
119
+ - **scripts:** Add copy_package_build_to_project script
120
+
121
+ ## 1.6.0 (2024-05-21)
122
+
123
+ ### Features
124
+
125
+ - **scripts:** Add '--init' flag to docker run invocation
126
+ - **scripts:** make update_prepare_obligatory_package_files script handle LICENSE file
127
+
128
+ ### 1.5.2 (2024-04-28)
129
+
130
+ ### 1.5.1 (2024-04-26)
131
+
132
+ ### Bug Fixes
133
+
134
+ - **scripts:** Enable to publish in public registry
135
+ - **scripts:** Fix utils.sh permissions
136
+
137
+ ## 1.5.0 (2024-04-12)
138
+
139
+ ### Features
140
+
141
+ - **scripts:** Do not login into Docker registry from docker_push function. Return on error from any 'docker build' invocation
142
+ - **scripts:** Remove GOOGLE_CLOUD_PROJECT_ID variable and all references to it
143
+ - **scripts:** Return on error from any 'docker push' invocation
144
+
145
+ ### Bug Fixes
146
+
147
+ - **scripts:** Move standard-version from devDependencies to dependencies
148
+
149
+ ## 1.4.0 (2024-03-22)
150
+
151
+ ### Bug Fixes
152
+
153
+ - Resolve macOS specific packages issues
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2024 mServices Sp. z o.o.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # @mservicestech/scripts
2
+
3
+ A collection of generic utility scripts. Useful for various development and maintenance tasks.
4
+
5
+ ## Installation
6
+
7
+ Add the following entry into `devDependencies` in target `package.json` via:
8
+
9
+ ```console
10
+ yarn add --dev @mservicestech/scripts
11
+ ```
12
+
13
+ ## Quick start
14
+
15
+ All the scripts provide individual documentation entries available via the `--help` flag:
16
+
17
+ ```console
18
+ ./node_modules/@mservicestech/scripts/example/example.sh --help
19
+ ```
20
+
21
+ ## Common utilities
22
+
23
+ The package provides common scripting utilities which help in writing customized workspace-specific tooling:
24
+
25
+ ```console
26
+ source ./node_modules/@mservicestech/scripts/utils.sh
27
+ ```
28
+
29
+ ## TypeScript utilities
30
+
31
+ If you want to add TypeScript util you need to create a new folder in `src/<typeScriptUtilName>` directory with script file. Then you need to add this script to `src/index.ts` file. After that you can use this util in your project.
32
+
33
+ ### Available utilities
34
+
35
+ | utility | description |
36
+ | --------------- | --------------------------------------------------------------- |
37
+ | clean_exit | exits a given script, killing the whole process tree |
38
+ | run_script | runs a CommonJS script using node |
39
+ | transpile | transpile a TypeScript file using either 'esbuild' or 'tsc' |
40
+ | token_set | sets a shell token in the current environment |
41
+ | parse_arguments | parse shell script arguments into an associative array |
42
+ | fix_exports | overrides getter class export in a file transpiled with esbuild |
43
+
44
+ ## Releasing
45
+
46
+ In order to release the package use the following script:
47
+
48
+ ```console
49
+ yarn release
50
+ ```
51
+
52
+ After the release succeeds, run the following to publish the package in GitHub registry:
53
+
54
+ ```console
55
+ yarn publish
56
+ ```
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env bash
2
+
3
+ source "$(dirname $0)/../utils.sh" || exit 1
4
+
5
+ usage() {
6
+ cat << END
7
+ Usage:
8
+ ${BASH_SOURCE[0]} [--help] <--target>
9
+ Where:
10
+ help - print usage information and exit
11
+ target - a source repository address (e.g. git@github.com:example/example.git)
12
+ Description:
13
+ Adds a sandbox repository to the list of Git remotes.
14
+ Access by specifying 'sandbox' remote.
15
+ END
16
+ }
17
+
18
+ function main() {
19
+ parse_arguments "$@"
20
+ if [ ${PROCESS_ARGUMENTS['--help']} ]; then
21
+ usage
22
+ exit 0
23
+ fi
24
+ if ! [ ${PROCESS_ARGUMENTS['--target']} ]; then
25
+ printf "No target repository provided. Run with '--help' for more information.\n"
26
+ exit 1
27
+ fi
28
+
29
+ git remote add sandbox ${PROCESS_ARGUMENTS['--target']}
30
+ }
31
+
32
+ main "$@"