@executor-js/plugin-file-secrets 0.0.1-beta.5 → 0.0.1

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/README.md CHANGED
@@ -40,10 +40,10 @@ Secrets written through `executor.secrets.set(...)` become available to every ot
40
40
 
41
41
  ## Using with Effect
42
42
 
43
- If you're building on `@executor/sdk/core` (the raw Effect entry), import this plugin from its `/core` subpath instead:
43
+ If you're building on `@executor/sdk` (the raw Effect entry), import this plugin from its `/core` subpath instead:
44
44
 
45
45
  ```ts
46
- import { fileSecretsPlugin } from "@executor/plugin-file-secrets/core";
46
+ import { fileSecretsPlugin } from "@executor/plugin-file-secrets";
47
47
  ```
48
48
 
49
49
  ## Security note
@@ -1,16 +1,16 @@
1
1
  // src/index.ts
2
2
  import { Effect, Schema } from "effect";
3
- import {
4
- definePlugin
5
- } from "@executor-js/sdk/core";
3
+ import { definePlugin } from "@executor-js/sdk";
6
4
  import * as fs from "fs";
7
5
  import * as path from "path";
8
6
  var APP_NAME = "executor";
9
- var xdgDataHome = () => process.env.XDG_DATA_HOME?.trim() || path.join(
10
- process.env.HOME || process.env.USERPROFILE || "~",
11
- ".local",
12
- "share"
13
- );
7
+ var xdgDataHome = () => {
8
+ if (process.env.XDG_DATA_HOME?.trim()) return process.env.XDG_DATA_HOME.trim();
9
+ if (process.platform === "win32") {
10
+ return process.env.LOCALAPPDATA || process.env.APPDATA || path.join(process.env.USERPROFILE || "~", "AppData", "Local");
11
+ }
12
+ return path.join(process.env.HOME || "~", ".local", "share");
13
+ };
14
14
  var authDir = (overrideDir) => overrideDir ?? path.join(xdgDataHome(), APP_NAME);
15
15
  var authFilePath = (overrideDir) => path.join(authDir(overrideDir), "auth.json");
16
16
  var ScopedAuthFile = Schema.Record({
@@ -72,9 +72,7 @@ var fileSecretsPlugin = (config) => definePlugin({
72
72
  key: PLUGIN_KEY,
73
73
  init: (ctx) => Effect.gen(function* () {
74
74
  const filePath = authFilePath(config?.directory);
75
- yield* ctx.secrets.addProvider(
76
- makeScopedProvider(filePath, ctx.scope.id)
77
- );
75
+ yield* ctx.secrets.addProvider(makeScopedProvider(filePath, ctx.scope.id));
78
76
  return {
79
77
  extension: { filePath }
80
78
  };
@@ -82,6 +80,7 @@ var fileSecretsPlugin = (config) => definePlugin({
82
80
  });
83
81
 
84
82
  export {
83
+ xdgDataHome,
85
84
  fileSecretsPlugin
86
85
  };
87
- //# sourceMappingURL=chunk-QCGUSGBY.js.map
86
+ //# sourceMappingURL=chunk-PBFXEL43.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { Effect, Schema } from \"effect\";\nimport { definePlugin, type ExecutorPlugin, type SecretProvider } from \"@executor/sdk\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n\n// ---------------------------------------------------------------------------\n// XDG data dir resolution\n// ---------------------------------------------------------------------------\n\nconst APP_NAME = \"executor\";\n\nexport const xdgDataHome = (): string => {\n if (process.env.XDG_DATA_HOME?.trim()) return process.env.XDG_DATA_HOME.trim();\n if (process.platform === \"win32\") {\n return process.env.LOCALAPPDATA || process.env.APPDATA || path.join(process.env.USERPROFILE || \"~\", \"AppData\", \"Local\");\n }\n return path.join(process.env.HOME || \"~\", \".local\", \"share\");\n};\n\nconst authDir = (overrideDir?: string): string => overrideDir ?? path.join(xdgDataHome(), APP_NAME);\n\nconst authFilePath = (overrideDir?: string): string => path.join(authDir(overrideDir), \"auth.json\");\n\n// ---------------------------------------------------------------------------\n// Schema for the auth file\n//\n// Top-level keys are scope IDs, values are { secretId: secretValue } maps.\n// { \"web-a1b2c3d4\": { \"github-token\": \"ghp_xxx\" } }\n// ---------------------------------------------------------------------------\n\nconst ScopedAuthFile = Schema.Record({\n key: Schema.String,\n value: Schema.Record({ key: Schema.String, value: Schema.String }),\n});\nconst decodeScopedAuthFile = Schema.decodeUnknownSync(ScopedAuthFile);\n\n// ---------------------------------------------------------------------------\n// File I/O with restricted permissions\n// ---------------------------------------------------------------------------\n\nconst readFullFile = (filePath: string): Record<string, Record<string, string>> => {\n try {\n if (!fs.existsSync(filePath)) return {};\n const raw = fs.readFileSync(filePath, \"utf-8\");\n return decodeScopedAuthFile(JSON.parse(raw));\n } catch {\n return {};\n }\n};\n\nconst readScopeSecrets = (filePath: string, scopeId: string): Record<string, string> =>\n readFullFile(filePath)[scopeId] ?? {};\n\nconst writeScopeSecrets = (\n filePath: string,\n scopeId: string,\n secrets: Record<string, string>,\n): void => {\n const dir = path.dirname(filePath);\n if (!fs.existsSync(dir)) {\n fs.mkdirSync(dir, { recursive: true, mode: 0o700 });\n }\n const full = readFullFile(filePath);\n if (Object.keys(secrets).length === 0) {\n delete full[scopeId];\n } else {\n full[scopeId] = secrets;\n }\n const tmp = `${filePath}.tmp`;\n fs.writeFileSync(tmp, JSON.stringify(full, null, 2), { mode: 0o600 });\n fs.renameSync(tmp, filePath);\n};\n\n// ---------------------------------------------------------------------------\n// Plugin config\n// ---------------------------------------------------------------------------\n\nexport interface FileSecretsPluginConfig {\n /** Override the directory for auth.json (default: XDG data dir) */\n readonly directory?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Plugin extension — public API on executor.fileSecrets\n// ---------------------------------------------------------------------------\n\nexport interface FileSecretsExtension {\n /** Path to the auth file */\n readonly filePath: string;\n}\n\n// ---------------------------------------------------------------------------\n// Provider factory (internal)\n// ---------------------------------------------------------------------------\n\nconst makeScopedProvider = (filePath: string, scopeId: string): SecretProvider => ({\n key: \"file\",\n writable: true,\n\n get: (secretId) =>\n Effect.sync(() => {\n const data = readScopeSecrets(filePath, scopeId);\n return data[secretId] ?? null;\n }),\n\n set: (secretId, value) =>\n Effect.sync(() => {\n const data = readScopeSecrets(filePath, scopeId);\n data[secretId] = value;\n writeScopeSecrets(filePath, scopeId, data);\n }),\n\n delete: (secretId) =>\n Effect.sync(() => {\n const data = readScopeSecrets(filePath, scopeId);\n const had = secretId in data;\n delete data[secretId];\n if (had) writeScopeSecrets(filePath, scopeId, data);\n return had;\n }),\n\n list: () =>\n Effect.sync(() => {\n const data = readScopeSecrets(filePath, scopeId);\n return Object.keys(data).map((k) => ({ id: k, name: k }));\n }),\n});\n\n// ---------------------------------------------------------------------------\n// Plugin definition\n// ---------------------------------------------------------------------------\n\nconst PLUGIN_KEY = \"fileSecrets\";\n\nexport const fileSecretsPlugin = (\n config?: FileSecretsPluginConfig,\n): ExecutorPlugin<typeof PLUGIN_KEY, FileSecretsExtension> =>\n definePlugin({\n key: PLUGIN_KEY,\n init: (ctx) =>\n Effect.gen(function* () {\n const filePath = authFilePath(config?.directory);\n\n yield* ctx.secrets.addProvider(makeScopedProvider(filePath, ctx.scope.id));\n\n return {\n extension: { filePath },\n };\n }),\n });\n"],"mappings":";AAAA,SAAS,QAAQ,cAAc;AAC/B,SAAS,oBAA8D;AACvE,YAAY,QAAQ;AACpB,YAAY,UAAU;AAMtB,IAAM,WAAW;AAEV,IAAM,cAAc,MAAc;AACvC,MAAI,QAAQ,IAAI,eAAe,KAAK,EAAG,QAAO,QAAQ,IAAI,cAAc,KAAK;AAC7E,MAAI,QAAQ,aAAa,SAAS;AAChC,WAAO,QAAQ,IAAI,gBAAgB,QAAQ,IAAI,WAAgB,UAAK,QAAQ,IAAI,eAAe,KAAK,WAAW,OAAO;AAAA,EACxH;AACA,SAAY,UAAK,QAAQ,IAAI,QAAQ,KAAK,UAAU,OAAO;AAC7D;AAEA,IAAM,UAAU,CAAC,gBAAiC,eAAoB,UAAK,YAAY,GAAG,QAAQ;AAElG,IAAM,eAAe,CAAC,gBAAsC,UAAK,QAAQ,WAAW,GAAG,WAAW;AASlG,IAAM,iBAAiB,OAAO,OAAO;AAAA,EACnC,KAAK,OAAO;AAAA,EACZ,OAAO,OAAO,OAAO,EAAE,KAAK,OAAO,QAAQ,OAAO,OAAO,OAAO,CAAC;AACnE,CAAC;AACD,IAAM,uBAAuB,OAAO,kBAAkB,cAAc;AAMpE,IAAM,eAAe,CAAC,aAA6D;AACjF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AAC/C,UAAM,MAAM,YAAY;AACxB,WAAO,KAAK,QAAQ;AACpB,QAAI,IAAK,mBAAkB,UAAU,SAAS,IAAI;AAClD,WAAO;AAAA,EACT,CAAC;AAAA,EAEH,MAAM,MACJ,OAAO,KAAK,MAAM;AAChB,UAAM,OAAO,iBAAiB,UAAU,OAAO;AAC/C,WAAO,OAAO,KAAK,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,GAAG,MAAM,EAAE,EAAE;AAAA,EAC1D,CAAC;AACL;AAMA,IAAM,aAAa;AAEZ,IAAM,oBAAoB,CAC/B,WAEA,aAAa;AAAA,EACX,KAAK;AAAA,EACL,MAAM,CAAC,QACL,OAAO,IAAI,aAAa;AACtB,UAAM,WAAW,aAAa,QAAQ,SAAS;AAE/C,WAAO,IAAI,QAAQ,YAAY,mBAAmB,UAAU,IAAI,MAAM,EAAE,CAAC;AAEzE,WAAO;AAAA,MACL,WAAW,EAAE,SAAS;AAAA,IACxB;AAAA,EACF,CAAC;AACL,CAAC;","names":[]}
package/dist/core.js CHANGED
@@ -1,7 +1,9 @@
1
1
  import {
2
- fileSecretsPlugin
3
- } from "./chunk-QCGUSGBY.js";
2
+ fileSecretsPlugin,
3
+ xdgDataHome
4
+ } from "./chunk-PBFXEL43.js";
4
5
  export {
5
- fileSecretsPlugin
6
+ fileSecretsPlugin,
7
+ xdgDataHome
6
8
  };
7
9
  //# sourceMappingURL=core.js.map
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { type ExecutorPlugin } from "@executor-js/sdk/core";
1
+ import { type ExecutorPlugin } from "@executor-js/sdk";
2
+ export declare const xdgDataHome: () => string;
2
3
  export interface FileSecretsPluginConfig {
3
4
  /** Override the directory for auth.json (default: XDG data dir) */
4
5
  readonly directory?: string;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  fileSecretsPlugin
3
- } from "./chunk-QCGUSGBY.js";
3
+ } from "./chunk-PBFXEL43.js";
4
4
 
5
5
  // src/promise.ts
6
6
  var fileSecretsPlugin2 = (config) => fileSecretsPlugin(config);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/promise.ts"],"sourcesContent":["import { fileSecretsPlugin as fileSecretsPluginEffect } from \"./index\";\n\nexport type { FileSecretsPluginConfig } from \"./index\";\n\nexport const fileSecretsPlugin = (\n config?: { readonly directory?: string },\n) => fileSecretsPluginEffect(config);\n"],"mappings":";;;;;AAIO,IAAMA,qBAAoB,CAC/B,WACG,kBAAwB,MAAM;","names":["fileSecretsPlugin"]}
1
+ {"version":3,"sources":["../src/promise.ts"],"sourcesContent":["import { fileSecretsPlugin as fileSecretsPluginEffect } from \"./index\";\n\nexport type { FileSecretsPluginConfig } from \"./index\";\n\nexport const fileSecretsPlugin = (config?: { readonly directory?: string }) =>\n fileSecretsPluginEffect(config);\n"],"mappings":";;;;;AAIO,IAAMA,qBAAoB,CAAC,WAChC,kBAAwB,MAAM;","names":["fileSecretsPlugin"]}
package/dist/promise.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export type { FileSecretsPluginConfig } from "./index";
2
2
  export declare const fileSecretsPlugin: (config?: {
3
3
  readonly directory?: string;
4
- }) => import("@executor-js/sdk/core").ExecutorPlugin<"fileSecrets", import("./index").FileSecretsExtension>;
4
+ }) => import("@executor-js/sdk").ExecutorPlugin<"fileSecrets", import("./index").FileSecretsExtension>;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,17 +1,20 @@
1
1
  {
2
2
  "name": "@executor-js/plugin-file-secrets",
3
- "type": "module",
4
- "version": "0.0.1-beta.5",
3
+ "version": "0.0.1",
4
+ "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/file-secrets",
5
+ "bugs": {
6
+ "url": "https://github.com/RhysSullivan/executor/issues"
7
+ },
5
8
  "license": "MIT",
6
9
  "repository": {
7
10
  "type": "git",
8
11
  "url": "git+https://github.com/RhysSullivan/executor.git",
9
12
  "directory": "packages/plugins/file-secrets"
10
13
  },
11
- "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/file-secrets",
12
- "bugs": {
13
- "url": "https://github.com/RhysSullivan/executor/issues"
14
- },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "type": "module",
15
18
  "exports": {
16
19
  ".": {
17
20
  "import": {
@@ -26,26 +29,24 @@
26
29
  }
27
30
  }
28
31
  },
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
29
35
  "scripts": {
30
36
  "build": "tsup && (tsc --declaration --emitDeclarationOnly --outDir dist --rootDir src || true)",
31
- "typecheck": "bunx tsc --noEmit -p tsconfig.json",
37
+ "typecheck": "tsgo --noEmit",
32
38
  "test": "vitest run",
33
- "test:watch": "vitest"
39
+ "test:watch": "vitest",
40
+ "typecheck:slow": "bunx tsc --noEmit -p tsconfig.json"
34
41
  },
35
42
  "dependencies": {
36
- "@executor-js/sdk": "0.0.1-beta.5",
43
+ "@executor-js/sdk": "0.0.1",
37
44
  "effect": "^3.21.0"
38
45
  },
39
46
  "devDependencies": {
40
47
  "@types/node": "^24.3.1",
41
48
  "bun-types": "^1.2.22",
42
- "vitest": "^4.1.3",
43
- "tsup": "^8.5.0"
44
- },
45
- "publishConfig": {
46
- "access": "public"
47
- },
48
- "files": [
49
- "dist"
50
- ]
49
+ "tsup": "^8.5.0",
50
+ "vitest": "^4.1.3"
51
+ }
51
52
  }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { Effect, Schema } from \"effect\";\nimport {\n definePlugin,\n type ExecutorPlugin,\n type SecretProvider,\n} from \"@executor/sdk/core\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n\n// ---------------------------------------------------------------------------\n// XDG data dir resolution\n// ---------------------------------------------------------------------------\n\nconst APP_NAME = \"executor\";\n\nconst xdgDataHome = (): string =>\n process.env.XDG_DATA_HOME?.trim() ||\n path.join(\n process.env.HOME || process.env.USERPROFILE || \"~\",\n \".local\",\n \"share\",\n );\n\nconst authDir = (overrideDir?: string): string =>\n overrideDir ?? path.join(xdgDataHome(), APP_NAME);\n\nconst authFilePath = (overrideDir?: string): string =>\n path.join(authDir(overrideDir), \"auth.json\");\n\n// ---------------------------------------------------------------------------\n// Schema for the auth file\n//\n// Top-level keys are scope IDs, values are { secretId: secretValue } maps.\n// { \"web-a1b2c3d4\": { \"github-token\": \"ghp_xxx\" } }\n// ---------------------------------------------------------------------------\n\nconst ScopedAuthFile = Schema.Record({\n key: Schema.String,\n value: Schema.Record({ key: Schema.String, value: Schema.String }),\n});\nconst decodeScopedAuthFile = Schema.decodeUnknownSync(ScopedAuthFile);\n\n// ---------------------------------------------------------------------------\n// File I/O with restricted permissions\n// ---------------------------------------------------------------------------\n\nconst readFullFile = (\n filePath: string,\n): Record<string, Record<string, string>> => {\n try {\n if (!fs.existsSync(filePath)) return {};\n const raw = fs.readFileSync(filePath, \"utf-8\");\n return decodeScopedAuthFile(JSON.parse(raw));\n } catch {\n return {};\n }\n};\n\nconst readScopeSecrets = (\n filePath: string,\n scopeId: string,\n): Record<string, string> => readFullFile(filePath)[scopeId] ?? {};\n\nconst writeScopeSecrets = (\n filePath: string,\n scopeId: string,\n secrets: Record<string, string>,\n): void => {\n const dir = path.dirname(filePath);\n if (!fs.existsSync(dir)) {\n fs.mkdirSync(dir, { recursive: true, mode: 0o700 });\n }\n const full = readFullFile(filePath);\n if (Object.keys(secrets).length === 0) {\n delete full[scopeId];\n } else {\n full[scopeId] = secrets;\n }\n const tmp = `${filePath}.tmp`;\n fs.writeFileSync(tmp, JSON.stringify(full, null, 2), { mode: 0o600 });\n fs.renameSync(tmp, filePath);\n};\n\n// ---------------------------------------------------------------------------\n// Plugin config\n// ---------------------------------------------------------------------------\n\nexport interface FileSecretsPluginConfig {\n /** Override the directory for auth.json (default: XDG data dir) */\n readonly directory?: string;\n}\n\n// ---------------------------------------------------------------------------\n// Plugin extension — public API on executor.fileSecrets\n// ---------------------------------------------------------------------------\n\nexport interface FileSecretsExtension {\n /** Path to the auth file */\n readonly filePath: string;\n}\n\n// ---------------------------------------------------------------------------\n// Provider factory (internal)\n// ---------------------------------------------------------------------------\n\nconst makeScopedProvider = (\n filePath: string,\n scopeId: string,\n): SecretProvider => ({\n key: \"file\",\n writable: true,\n\n get: (secretId) =>\n Effect.sync(() => {\n const data = readScopeSecrets(filePath, scopeId);\n return data[secretId] ?? null;\n }),\n\n set: (secretId, value) =>\n Effect.sync(() => {\n const data = readScopeSecrets(filePath, scopeId);\n data[secretId] = value;\n writeScopeSecrets(filePath, scopeId, data);\n }),\n\n delete: (secretId) =>\n Effect.sync(() => {\n const data = readScopeSecrets(filePath, scopeId);\n const had = secretId in data;\n delete data[secretId];\n if (had) writeScopeSecrets(filePath, scopeId, data);\n return had;\n }),\n\n list: () =>\n Effect.sync(() => {\n const data = readScopeSecrets(filePath, scopeId);\n return Object.keys(data).map((k) => ({ id: k, name: k }));\n }),\n});\n\n// ---------------------------------------------------------------------------\n// Plugin definition\n// ---------------------------------------------------------------------------\n\nconst PLUGIN_KEY = \"fileSecrets\";\n\nexport const fileSecretsPlugin = (\n config?: FileSecretsPluginConfig,\n): ExecutorPlugin<typeof PLUGIN_KEY, FileSecretsExtension> =>\n definePlugin({\n key: PLUGIN_KEY,\n init: (ctx) =>\n Effect.gen(function* () {\n const filePath = authFilePath(config?.directory);\n\n yield* ctx.secrets.addProvider(\n makeScopedProvider(filePath, ctx.scope.id),\n );\n\n return {\n extension: { filePath },\n };\n }),\n });\n"],"mappings":";AAAA,SAAS,QAAQ,cAAc;AAC/B;AAAA,EACE;AAAA,OAGK;AACP,YAAY,QAAQ;AACpB,YAAY,UAAU;AAMtB,IAAM,WAAW;AAEjB,IAAM,cAAc,MAClB,QAAQ,IAAI,eAAe,KAAK,KAC3B;AAAA,EACH,QAAQ,IAAI,QAAQ,QAAQ,IAAI,eAAe;AAAA,EAC/C;AAAA,EACA;AACF;AAEF,IAAM,UAAU,CAAC,gBACf,eAAoB,UAAK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