From 8c0893321cf1bcb70266949bf1ffa1ef1a481243 Mon Sep 17 00:00:00 2001 From: Dan Farrelly Date: Sat, 28 Mar 2020 11:49:50 -0400 Subject: [PATCH 1/9] Update package name and specify executable name --- package-lock.json | 43 +++++++++++++++++++++++++++++++------------ package.json | 6 ++++-- scripts/kubesecret.js | 0 3 files changed, 35 insertions(+), 14 deletions(-) mode change 100644 => 100755 scripts/kubesecret.js diff --git a/package-lock.json b/package-lock.json index 146074a..76f9cac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "kubesecret", + "name": "@bufferapp/kubesecret", "version": "0.4.0", "lockfileVersion": 1, "requires": true, @@ -2067,7 +2067,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2088,12 +2089,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2108,17 +2111,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2235,7 +2241,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2247,6 +2254,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2261,6 +2269,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2268,12 +2277,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -2292,6 +2303,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2372,7 +2384,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2384,6 +2397,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2469,7 +2483,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2505,6 +2520,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2524,6 +2540,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2567,12 +2584,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, diff --git a/package.json b/package.json index 3c6f957..27eb6cf 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "kubesecret", + "name": "@bufferapp/kubesecret", "version": "0.4.0", "description": "A CLI utility to manage secrets in kubernetes", "main": "\"\"", @@ -24,7 +24,9 @@ "watchLinux": "while inotifywait -q -r -e modify ./lib ./tests; do npm run test; done;", "watchMac": "fswatch -r $(pwd) -e '\\.git/' -e 'node_modules/' -x | (while read; do npm run test; done)" }, - "bin": "scripts/kubesecret.js", + "bin": { + "kubesecret": "scripts/kubesecret.js" + }, "pkg": { "scripts": [ "./scripts/kubesecret*.js", diff --git a/scripts/kubesecret.js b/scripts/kubesecret.js old mode 100644 new mode 100755 From 09a77094f5fb69b2d6cb0ee5a0b5731073d406e6 Mon Sep 17 00:00:00 2001 From: Dan Farrelly Date: Sat, 28 Mar 2020 11:50:10 -0400 Subject: [PATCH 2/9] Ensure script starts w/ node executable --- scripts/kubesecret.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/kubesecret.js b/scripts/kubesecret.js index 60b6281..afa5f44 100755 --- a/scripts/kubesecret.js +++ b/scripts/kubesecret.js @@ -1,3 +1,4 @@ +#!/usr/bin/env node const program = require('commander'); process.env.NODE_PATH = `${__dirname}/../node_modules`; From a48f381560bca95704f27e5c3f94ff871cb89563 Mon Sep 17 00:00:00 2001 From: Dan Farrelly Date: Sat, 28 Mar 2020 12:00:22 -0400 Subject: [PATCH 3/9] Update README w/ npm instructions --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1e545b0..6934528 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,17 @@ We are making `kubesecret` to give team members a guided approach to performing **Please note that this tool runs ON TOP of `kubectl`. You need to have `kubectl` installed and running on your OS before using this tool** -* Go to the releases, and download the binary for the OS of your choice. +### npm + +``` +npm install -g @bufferapp/kubesecret +``` + +Now run `kubesecret help` to explore what you can do! + +### Download the binary + +* Go to the releases, and download the binary for the OS of your choice. * Place the binary somewhere on your `$PATH`. * Run it using `kubesecret help` to see what you can do with it. @@ -22,7 +32,7 @@ We are making `kubesecret` to give team members a guided approach to performing A note on windows support

-While Windows support is currently not supported, we'll be taking care to try and not introduce patterns that exclude windows. We make no guarantees and you are free to run `node_modules/pkg/lib-es5/bin.js -t node10-win-x64` to get yourself a Windows binary and test things out. +While Windows support is currently not supported, we'll be taking care to try and not introduce patterns that exclude windows. We make no guarantees and you are free to run `node_modules/pkg/lib-es5/bin.js -t node10-win-x64` to get yourself a Windows binary and test things out.

@@ -33,3 +43,4 @@ While Windows support is currently not supported, we'll be taking care to try an * Run `npm install`. The tool is being developed using node `v10.x.x` * Code away * To test changes without building the binary run `node scripts/kubesecret.js` +* Install it globally on your machine using `npm link` From 4fe69a8f973f1278d9eed29ecad381005e5c5b23 Mon Sep 17 00:00:00 2001 From: Dan Farrelly Date: Sat, 28 Mar 2020 12:11:07 -0400 Subject: [PATCH 4/9] Add npm publish instructions --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 6934528..210c681 100644 --- a/README.md +++ b/README.md @@ -44,3 +44,24 @@ While Windows support is currently not supported, we'll be taking care to try an * Code away * To test changes without building the binary run `node scripts/kubesecret.js` * Install it globally on your machine using `npm link` + +### Publish to npm + +Use `npm version` to update the version name, add a commit and tag that commit prior to publishing. +For example: + +``` +npm version 0.5.0 +npm publish +``` + +Or if you want to publish a beta version, manually update the `package.json` version +(e.g. `0.5.0-beta1`) and run this command: + +``` +npm publish --tag beta +``` + +## License + +MIT From d43e8d6dfad3f4c48f682c72f3655d70e7b2e039 Mon Sep 17 00:00:00 2001 From: Adnan Issadeen Date: Wed, 1 Apr 2020 11:52:41 +0000 Subject: [PATCH 5/9] Added instruction to update version in kubesecret.js --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 210c681..8fe6908 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,9 @@ While Windows support is currently not supported, we'll be taking care to try an ### Publish to npm -Use `npm version` to update the version name, add a commit and tag that commit prior to publishing. +Before updating the version in `package.json` ensure that the version showing in `scripts/kubesecret.js` has been updated to the desired version too. Failing to do this will cause `kubesecret -V` to not display the version correctly. + +Once `kubesecret.js` is updated, use `npm version` to update the version name, add a commit and tag that commit prior to publishing. For example: ``` From 67e7248b5b2aa281f2132316163e218b3d27b4ea Mon Sep 17 00:00:00 2001 From: Adnan Issadeen Date: Wed, 1 Apr 2020 11:56:30 +0000 Subject: [PATCH 6/9] Bumped program version --- scripts/kubesecret.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kubesecret.js b/scripts/kubesecret.js index afa5f44..c9d6bd7 100755 --- a/scripts/kubesecret.js +++ b/scripts/kubesecret.js @@ -3,7 +3,7 @@ const program = require('commander'); process.env.NODE_PATH = `${__dirname}/../node_modules`; -program.version('0.4.0'); +program.version('0.4.1'); program.name('kubesecret'); program.usage('\nGet started by running ./kubesecret get -n '); program.command('get', 'Starts the process of getting secret(s) and performing operations on it'); From 459a32fee46295d5e0408132d53adb852ba57561 Mon Sep 17 00:00:00 2001 From: Adnan Issadeen Date: Wed, 1 Apr 2020 11:56:32 +0000 Subject: [PATCH 7/9] 0.4.1 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index dc0d3ef..4429c6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@bufferapp/kubesecret", - "version": "0.4.0", + "version": "0.4.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 27eb6cf..f0c82c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bufferapp/kubesecret", - "version": "0.4.0", + "version": "0.4.1", "description": "A CLI utility to manage secrets in kubernetes", "main": "\"\"", "dependencies": { From c4cdbd113e40e7faf949cf894958b659bf5f01c8 Mon Sep 17 00:00:00 2001 From: Dan Farrelly Date: Wed, 1 Apr 2020 12:56:31 -0400 Subject: [PATCH 8/9] Use package.json version field instead of hard-coding version string This ensures the -V version flag always returns the correct version without requiring the developer to manually update this. --- README.md | 4 +--- scripts/kubesecret.js | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8fe6908..210c681 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,7 @@ While Windows support is currently not supported, we'll be taking care to try an ### Publish to npm -Before updating the version in `package.json` ensure that the version showing in `scripts/kubesecret.js` has been updated to the desired version too. Failing to do this will cause `kubesecret -V` to not display the version correctly. - -Once `kubesecret.js` is updated, use `npm version` to update the version name, add a commit and tag that commit prior to publishing. +Use `npm version` to update the version name, add a commit and tag that commit prior to publishing. For example: ``` diff --git a/scripts/kubesecret.js b/scripts/kubesecret.js index c9d6bd7..7b6f326 100755 --- a/scripts/kubesecret.js +++ b/scripts/kubesecret.js @@ -1,9 +1,10 @@ #!/usr/bin/env node const program = require('commander'); +const { version } = require('../package.json') process.env.NODE_PATH = `${__dirname}/../node_modules`; -program.version('0.4.1'); +program.version(version); program.name('kubesecret'); program.usage('\nGet started by running ./kubesecret get -n '); program.command('get', 'Starts the process of getting secret(s) and performing operations on it'); From 785f6c7f1ae009c79af898ae98665e9d96ab039c Mon Sep 17 00:00:00 2001 From: Dan Farrelly Date: Wed, 1 Apr 2020 13:01:04 -0400 Subject: [PATCH 9/9] Require minimum version of Node --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index f0c82c7..a0c7f93 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,9 @@ "./lib/*.js" ] }, + "engine": { + "node": ">= 10.0.0" + }, "repository": { "type": "git", "url": "git+https://github.com/bufferapp/kubesecret.git"