@dsmrt/axiom-cli 1.3.1 → 1.3.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,66 @@
1
1
  # @dsmrt/axiom-cli
2
2
 
3
+ ## 1.3.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 0459ce3: fix(ci): restore NPM_TOKEN auth — pnpm publish does not support npm Trusted Publishers OIDC
8
+ - Updated dependencies [0459ce3]
9
+ - @dsmrt/axiom-config@1.2.5
10
+ - @dsmrt/axiom-aws-sdk@1.0.3
11
+
12
+ ## 1.3.5
13
+
14
+ ### Patch Changes
15
+
16
+ - 762e5c6: chore: test npm Trusted Publisher OIDC publish flow
17
+ - Updated dependencies [762e5c6]
18
+ - @dsmrt/axiom-config@1.2.4
19
+ - @dsmrt/axiom-aws-sdk@1.0.2
20
+
21
+ ## 1.3.4
22
+
23
+ ### Patch Changes
24
+
25
+ - 31ae74a: fix(ci): move --provenance into changeset-publish script to avoid pnpm arg-passthrough bug
26
+ - Updated dependencies [31ae74a]
27
+ - @dsmrt/axiom-config@1.2.3
28
+ - @dsmrt/axiom-aws-sdk@1.0.1
29
+
30
+ ## 1.3.3
31
+
32
+ ### Patch Changes
33
+
34
+ - f64437b: fix(ci): add npm provenance via OIDC and fix NPM_TOKEN env for changesets/action
35
+
36
+ ## 1.3.2
37
+
38
+ ### Patch Changes
39
+
40
+ - 5549ab3: fix: upgrade release CI to Node 22 with frozen lockfile
41
+ - 6ac6d26: fix: support `ENV` environment variable for selecting config
42
+
43
+ `ENV=dev axiom params get` now loads `.axiom.dev.js` (equivalent to `--env dev`).
44
+
45
+ **`@dsmrt/axiom-config`**: `loadConfig` falls back to `process.env.ENV` when no `env` is passed, so library consumers also benefit.
46
+
47
+ **`@dsmrt/axiom-cli`**: middleware maps `ENV` → `argv.env` at parse time so all subcommands see the resolved value. Priority order: `--env` flag > `AXIOM_ENV` > `ENV`.
48
+
49
+ - e8a9421: fix(ci): upgrade pnpm to v9 to match lockfile version 9.0
50
+ - 6ac6d26: fix: `axiom params get` now respects the positional path argument
51
+
52
+ The `[path]` positional was documented but silently ignored — the command
53
+ always fetched from `baseParameterPath`. Now delegates to `buildPath()`:
54
+
55
+ - `axiom params get` → uses `baseParameterPath` from config
56
+ - `axiom params get /` → fetches from SSM root `/`
57
+ - `axiom params get /prod` → absolute path, bypasses config base
58
+ - `axiom params get myService` → relative, resolves to `<baseParameterPath>/myService`
59
+
60
+ - Updated dependencies [5549ab3]
61
+ - Updated dependencies [6ac6d26]
62
+ - @dsmrt/axiom-config@1.2.2
63
+
3
64
  ## 1.3.1
4
65
 
5
66
  ### Patch Changes
package/dist/bin/axiom.js CHANGED
@@ -431,6 +431,17 @@ var awsOptions = () => {
431
431
  };
432
432
  };
433
433
 
434
+ // src/commands/params/utils.ts
435
+ var buildPath = (config, path) => {
436
+ if (path === void 0) {
437
+ return config.aws?.baseParameterPath;
438
+ }
439
+ if (/^\//.test(path)) {
440
+ return path;
441
+ }
442
+ return `${config.aws?.baseParameterPath.replace(/\/$/, "")}/${path}`;
443
+ };
444
+
434
445
  // src/commands/params/get.ts
435
446
  var GetCommand = class {
436
447
  command = "get [path]";
@@ -457,7 +468,7 @@ Example:
457
468
  `Creating SSM client with region: ${config.aws.region}, profile: ${config.aws.profile}`
458
469
  );
459
470
  const collection = new import_axiom_aws_sdk.ParameterCollection(
460
- config.aws?.baseParameterPath,
471
+ buildPath(config, args.path),
461
472
  new import_client_ssm.SSMClient({
462
473
  region: config.aws.region,
463
474
  credentials: await CachedCredentialProvider({
@@ -487,19 +498,6 @@ var import_client_ssm2 = require("@aws-sdk/client-ssm");
487
498
  var import_axiom_config3 = require("@dsmrt/axiom-config");
488
499
  var import_chalk2 = __toESM(require("chalk"));
489
500
  var import_inquirer3 = __toESM(require("inquirer"));
490
-
491
- // src/commands/params/utils.ts
492
- var buildPath = (config, path) => {
493
- if (path === void 0) {
494
- return config.aws?.baseParameterPath;
495
- }
496
- if (/^\//.test(path)) {
497
- return path;
498
- }
499
- return `${config.aws?.baseParameterPath.replace(/\/$/, "")}/${path}`;
500
- };
501
-
502
- // src/commands/params/set.ts
503
501
  var SetCommand = class {
504
502
  command = "set <path> <value>";
505
503
  describe = "Set all parameters under the base path";
@@ -672,6 +670,9 @@ Example: "/root/myParam" or "service/secret"`,
672
670
  if (argv.debug) {
673
671
  process.env.AXIOM_DEBUG = "true";
674
672
  }
673
+ if (argv.env === void 0 && process.env.ENV) {
674
+ argv.env = process.env.ENV;
675
+ }
675
676
  }).command(new Init()).command(new Config()).command(new ParamsCommand()).strict().usage(
676
677
  `
677
678
  Axiom - an AWS focused config cli
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import "../chunk-ZPJRBDWY.mjs";
2
+ import "../chunk-ASYTLJ3I.mjs";
@@ -35,8 +35,8 @@ var Config = class {
35
35
  };
36
36
 
37
37
  // src/commands/init.ts
38
- import { existsSync, mkdirSync, writeFileSync } from "fs";
39
- import { join } from "path";
38
+ import { existsSync, mkdirSync, writeFileSync } from "node:fs";
39
+ import { join } from "node:path";
40
40
  import inquirer from "inquirer";
41
41
  var Init = class {
42
42
  command = "init";
@@ -279,8 +279,8 @@ import {
279
279
  import inquirer2 from "inquirer";
280
280
 
281
281
  // src/cache.ts
282
- import fs from "fs";
283
- import os from "os";
282
+ import fs from "node:fs";
283
+ import os from "node:os";
284
284
  var DEFAULT_DIRECTORY = `${os.homedir()}/.axiom/cache`;
285
285
  var cache_default = class {
286
286
  constructor(cacheDir = DEFAULT_DIRECTORY) {
@@ -409,6 +409,17 @@ var awsOptions = () => {
409
409
  };
410
410
  };
411
411
 
412
+ // src/commands/params/utils.ts
413
+ var buildPath = (config, path) => {
414
+ if (path === void 0) {
415
+ return config.aws?.baseParameterPath;
416
+ }
417
+ if (/^\//.test(path)) {
418
+ return path;
419
+ }
420
+ return `${config.aws?.baseParameterPath.replace(/\/$/, "")}/${path}`;
421
+ };
422
+
412
423
  // src/commands/params/get.ts
413
424
  var GetCommand = class {
414
425
  command = "get [path]";
@@ -435,7 +446,7 @@ Example:
435
446
  `Creating SSM client with region: ${config.aws.region}, profile: ${config.aws.profile}`
436
447
  );
437
448
  const collection = new ParameterCollection(
438
- config.aws?.baseParameterPath,
449
+ buildPath(config, args.path),
439
450
  new SSMClient({
440
451
  region: config.aws.region,
441
452
  credentials: await CachedCredentialProvider({
@@ -469,19 +480,6 @@ import {
469
480
  import { loadConfig as loadConfig3 } from "@dsmrt/axiom-config";
470
481
  import chalk2 from "chalk";
471
482
  import inquirer3 from "inquirer";
472
-
473
- // src/commands/params/utils.ts
474
- var buildPath = (config, path) => {
475
- if (path === void 0) {
476
- return config.aws?.baseParameterPath;
477
- }
478
- if (/^\//.test(path)) {
479
- return path;
480
- }
481
- return `${config.aws?.baseParameterPath.replace(/\/$/, "")}/${path}`;
482
- };
483
-
484
- // src/commands/params/set.ts
485
483
  var SetCommand = class {
486
484
  command = "set <path> <value>";
487
485
  describe = "Set all parameters under the base path";
@@ -654,6 +652,9 @@ yargs(process.argv.slice(2)).env("AXIOM").scriptName("axiom").option("config", {
654
652
  if (argv.debug) {
655
653
  process.env.AXIOM_DEBUG = "true";
656
654
  }
655
+ if (argv.env === void 0 && process.env.ENV) {
656
+ argv.env = process.env.ENV;
657
+ }
657
658
  }).command(new Init()).command(new Config()).command(new ParamsCommand()).strict().usage(
658
659
  `
659
660
  Axiom - an AWS focused config cli
package/dist/index.js CHANGED
@@ -449,6 +449,17 @@ var awsOptions = () => {
449
449
  };
450
450
  };
451
451
 
452
+ // src/commands/params/utils.ts
453
+ var buildPath = (config, path) => {
454
+ if (path === void 0) {
455
+ return config.aws?.baseParameterPath;
456
+ }
457
+ if (/^\//.test(path)) {
458
+ return path;
459
+ }
460
+ return `${config.aws?.baseParameterPath.replace(/\/$/, "")}/${path}`;
461
+ };
462
+
452
463
  // src/commands/params/get.ts
453
464
  var GetCommand = class {
454
465
  command = "get [path]";
@@ -475,7 +486,7 @@ Example:
475
486
  `Creating SSM client with region: ${config.aws.region}, profile: ${config.aws.profile}`
476
487
  );
477
488
  const collection = new import_axiom_aws_sdk.ParameterCollection(
478
- config.aws?.baseParameterPath,
489
+ buildPath(config, args.path),
479
490
  new import_client_ssm.SSMClient({
480
491
  region: config.aws.region,
481
492
  credentials: await CachedCredentialProvider({
@@ -505,19 +516,6 @@ var import_client_ssm2 = require("@aws-sdk/client-ssm");
505
516
  var import_axiom_config3 = require("@dsmrt/axiom-config");
506
517
  var import_chalk2 = __toESM(require("chalk"));
507
518
  var import_inquirer3 = __toESM(require("inquirer"));
508
-
509
- // src/commands/params/utils.ts
510
- var buildPath = (config, path) => {
511
- if (path === void 0) {
512
- return config.aws?.baseParameterPath;
513
- }
514
- if (/^\//.test(path)) {
515
- return path;
516
- }
517
- return `${config.aws?.baseParameterPath.replace(/\/$/, "")}/${path}`;
518
- };
519
-
520
- // src/commands/params/set.ts
521
519
  var SetCommand = class {
522
520
  command = "set <path> <value>";
523
521
  describe = "Set all parameters under the base path";
@@ -690,6 +688,9 @@ Example: "/root/myParam" or "service/secret"`,
690
688
  if (argv.debug) {
691
689
  process.env.AXIOM_DEBUG = "true";
692
690
  }
691
+ if (argv.env === void 0 && process.env.ENV) {
692
+ argv.env = process.env.ENV;
693
+ }
693
694
  }).command(new Init()).command(new Config()).command(new ParamsCommand()).strict().usage(
694
695
  `
695
696
  Axiom - an AWS focused config cli
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  SetCommand,
8
8
  awsOptions,
9
9
  commonOptions
10
- } from "./chunk-ZPJRBDWY.mjs";
10
+ } from "./chunk-ASYTLJ3I.mjs";
11
11
  export {
12
12
  Config,
13
13
  DeleteCommand,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsmrt/axiom-cli",
3
- "version": "1.3.1",
3
+ "version": "1.3.6",
4
4
  "description": "axiom cli for managing configs including secrets",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -38,7 +38,7 @@
38
38
  "ts-node": "^10.9.2",
39
39
  "tsup": "^8.3.5",
40
40
  "typescript": "^5.7.2",
41
- "vitest": "^4.0.0"
41
+ "vitest": "^4.1.0"
42
42
  },
43
43
  "dependencies": {
44
44
  "@aws-sdk/client-ssm": "^3.716.0",
@@ -48,8 +48,8 @@
48
48
  "chalk": "^4.1.2",
49
49
  "inquirer": "^8.2.6",
50
50
  "yargs": "^17.7.2",
51
- "@dsmrt/axiom-aws-sdk": "^1.0.0",
52
- "@dsmrt/axiom-config": "^1.2.1"
51
+ "@dsmrt/axiom-aws-sdk": "^1.0.3",
52
+ "@dsmrt/axiom-config": "^1.2.5"
53
53
  },
54
54
  "scripts": {
55
55
  "lint": "biome lint",