envsec 0.1.1 → 0.1.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.
@@ -0,0 +1,12 @@
1
+ import { Command, Args } from "@effect/cli";
2
+ import { Effect } from "effect";
3
+ import { SecretStore } from "../services/SecretStore.js";
4
+ import { rootCommand } from "./root.js";
5
+ const key = Args.text({ name: "key" });
6
+ const handler = ({ key }) => Effect.gen(function* () {
7
+ const { env } = yield* rootCommand;
8
+ yield* SecretStore.remove(env, key);
9
+ yield* Effect.log(`Secret "${key}" removed from env "${env}"`);
10
+ });
11
+ export const deleteCommand = Command.make("delete", { key }, handler);
12
+ export const delCommand = Command.make("del", { key }, handler);
package/dist/cli/read.js CHANGED
@@ -3,7 +3,7 @@ import { Effect, Console } from "effect";
3
3
  import { SecretStore } from "../services/SecretStore.js";
4
4
  import { rootCommand } from "./root.js";
5
5
  const key = Args.text({ name: "key" });
6
- export const readCommand = Command.make("read", { key }, ({ key }) => Effect.gen(function* () {
6
+ export const getCommand = Command.make("get", { key }, ({ key }) => Effect.gen(function* () {
7
7
  const { env } = yield* rootCommand;
8
8
  const value = yield* SecretStore.get(env, key);
9
9
  yield* Console.log(String(value));
package/dist/main.js CHANGED
@@ -5,13 +5,14 @@ import { Effect } from "effect";
5
5
  import { createRequire } from "node:module";
6
6
  import { rootCommand } from "./cli/root.js";
7
7
  import { addCommand } from "./cli/add.js";
8
- import { readCommand } from "./cli/read.js";
8
+ import { getCommand } from "./cli/read.js";
9
+ import { deleteCommand, delCommand } from "./cli/delete.js";
9
10
  import { searchCommand } from "./cli/search.js";
10
11
  import { listCommand } from "./cli/list.js";
11
12
  import { SecretStore } from "./services/SecretStore.js";
12
13
  const require = createRequire(import.meta.url);
13
14
  const pkg = require("../package.json");
14
- const command = rootCommand.pipe(Command.withSubcommands([addCommand, readCommand, searchCommand, listCommand]));
15
+ const command = rootCommand.pipe(Command.withSubcommands([addCommand, getCommand, deleteCommand, delCommand, searchCommand, listCommand]));
15
16
  const cli = Command.run(command, {
16
17
  name: "secenv",
17
18
  version: pkg.version,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "envsec",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Secure environment secrets management using macOS Keychain",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,7 +31,7 @@
31
31
  "license": "MIT",
32
32
  "repository": {
33
33
  "type": "git",
34
- "url": "git+https://github.com/davidnussio/secenv.git"
34
+ "url": "git+https://github.com/davidnussio/envsec.git"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"