@agilecustoms/envctl 0.1.2 → 0.2.0
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.
- package/Makefile +0 -7
- package/README.md +8 -0
- package/dist/index.js +4 -2
- package/package.json +4 -2
- package/src/index.ts +6 -2
package/Makefile
CHANGED
|
@@ -19,10 +19,3 @@ app2-test:
|
|
|
19
19
|
|
|
20
20
|
app3-build:
|
|
21
21
|
@npm run build
|
|
22
|
-
|
|
23
|
-
# npm cache clean --force
|
|
24
|
-
# cd ~/.npm; open .
|
|
25
|
-
app4-dry-run:
|
|
26
|
-
@set -e; \
|
|
27
|
-
echo "cd in other directory, otherwise npx picks up local package :("; cd ..; \
|
|
28
|
-
npx -y --force @agilecustoms/envctl --version
|
package/README.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
- npm [@agilecustoms/envctl](https://www.npmjs.com/package/@agilecustoms/envctl)
|
|
3
3
|
- npm [agilecustoms/packages](https://www.npmjs.com/settings/agilecustoms/packages) (admin view)
|
|
4
4
|
|
|
5
|
+
## setup/update
|
|
6
|
+
```shell
|
|
7
|
+
npm install -g @agilecustoms/envctl # same command for update
|
|
8
|
+
envctl --version
|
|
9
|
+
npm outdated -g
|
|
10
|
+
npm view @agilecustoms/envctl version # show latest version available (without installing)
|
|
11
|
+
```
|
|
12
|
+
|
|
5
13
|
## npmjs setup
|
|
6
14
|
1. Login in npmjs.com
|
|
7
15
|
2. Create organization `agilecustoms` this will create scope `@agilecustoms` (one org => exactly one scope, also scope can be created w/o org)
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
3
|
import { Command } from 'commander';
|
|
4
|
+
import updateNotifier from 'update-notifier';
|
|
4
5
|
import { deleteIt, ephemeral, register } from './commands/index.js';
|
|
5
6
|
const require = createRequire(import.meta.url);
|
|
6
|
-
const
|
|
7
|
+
const pkg = require('../package.json');
|
|
8
|
+
updateNotifier({ pkg }).notify();
|
|
7
9
|
const program = new Command();
|
|
8
10
|
program
|
|
9
11
|
.name('envctl')
|
|
10
12
|
.description('CLI to manage environments')
|
|
11
|
-
.version(version);
|
|
13
|
+
.version(pkg.version);
|
|
12
14
|
register(program);
|
|
13
15
|
ephemeral(program);
|
|
14
16
|
deleteIt(program);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agilecustoms/envctl",
|
|
3
3
|
"description": "node.js CLI client for manage environments",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"author": "Alex Chekulaev",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -29,12 +29,14 @@
|
|
|
29
29
|
"@aws-sdk/client-sts": "^3.716.0",
|
|
30
30
|
"@aws-sdk/credential-providers": "^3.716.0",
|
|
31
31
|
"aws4": "^1.13.2",
|
|
32
|
-
"commander": "^13.0.0"
|
|
32
|
+
"commander": "^13.0.0",
|
|
33
|
+
"update-notifier": "^7.3.1"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@stylistic/eslint-plugin": "^4.2.0",
|
|
36
37
|
"@types/aws4": "^1.11.6",
|
|
37
38
|
"@types/node": "^22.10.2",
|
|
39
|
+
"@types/update-notifier": "^6.0.8",
|
|
38
40
|
"@vitest/coverage-v8": "^3.0.2",
|
|
39
41
|
"eslint": "^9.22.0",
|
|
40
42
|
"eslint-plugin-import": "^2.31.0",
|
package/src/index.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module'
|
|
3
3
|
import { Command } from 'commander'
|
|
4
|
+
import updateNotifier from 'update-notifier'
|
|
4
5
|
import { deleteIt, ephemeral, register } from './commands/index.js'
|
|
5
6
|
|
|
6
7
|
// it is possible to use 'import' to load JSON files, but package.json is level higher, so such trick copies 'src' in /dist :(
|
|
7
8
|
const require = createRequire(import.meta.url) // custom 'require' relative to current module’s file URL
|
|
8
|
-
const
|
|
9
|
+
const pkg = require('../package.json')
|
|
10
|
+
|
|
11
|
+
// Check for updates
|
|
12
|
+
updateNotifier({ pkg }).notify()
|
|
9
13
|
|
|
10
14
|
const program = new Command()
|
|
11
15
|
program
|
|
12
16
|
.name('envctl') // shown when running --help: Usage: envctl [options] [command]
|
|
13
17
|
.description('CLI to manage environments')
|
|
14
|
-
.version(version)
|
|
18
|
+
.version(pkg.version)
|
|
15
19
|
register(program)
|
|
16
20
|
ephemeral(program)
|
|
17
21
|
deleteIt(program)
|