@theholocron/holocron-plugin-1password 5.0.0-alpha.417 → 5.0.0-alpha.419

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.
Files changed (2) hide show
  1. package/dist/index.mjs +4 -5
  2. package/package.json +6 -6
package/dist/index.mjs CHANGED
@@ -1,6 +1,5 @@
1
- import { ProviderApiError, connectionProbe, resolveEnvironmentId, stdoutKind } from "@theholocron/cli";
1
+ import { ProviderApiError, connectionProbe, ignoreAdvice, resolveCredentialsFile, resolveEnvironmentId, stdoutKind } from "@theholocron/cli";
2
2
  import { spawnSync } from "node:child_process";
3
- import { resolve } from "node:path";
4
3
  import { copyToClipboard, dotenvLine, finishCredentialsFile, isGitIgnored, shredFile, writeCredentialsFile } from "@theholocron/kyber/secrets";
5
4
  // src/auth.ts
6
5
  /**
@@ -292,7 +291,7 @@ function parseExportArgs(args) {
292
291
  };
293
292
  }
294
293
  // src/probes/export-environment.ts
295
- /** The file the lines go to, next to the config. */
294
+ /** The name of the file the lines go to (in `.holocron/.private/`), for the messages. */
296
295
  const FILE_NAME = ".credentials";
297
296
  /** Plain code-unit order: the same on every machine, whatever its locale. The names it sorts are all different. */
298
297
  const compare = (a, b) => a < b ? -1 : 1;
@@ -308,9 +307,9 @@ function chooseDestination(deps, copy) {
308
307
  }
309
308
  /** Writes the lines to the private file, waits for the import and deletes it. Registers the deletion for a failure or Ctrl-C. */
310
309
  async function writeToFile(probe, deps, text) {
311
- const path = resolve(deps.repoRoot, FILE_NAME);
310
+ const { path } = resolveCredentialsFile(deps.repoRoot, void 0, deps.makeDir);
312
311
  const git = deps.isIgnored(path);
313
- if (git === "tracked" || git === "unknown") throw new Error(git === "tracked" ? `refusing to write secrets to ${path}: git does not ignore it, so it could be committed. Add it to .gitignore` : `refusing to write secrets to ${path}: git could not say whether it ignores it. Add it to .gitignore`);
312
+ if (git === "tracked" || git === "unknown") throw new Error(`refusing to write secrets to ${path}: ${git === "tracked" ? "git does not ignore it, so it could be committed" : "git could not say whether it ignores it"}; ${ignoreAdvice(true, "")}`);
314
313
  let identity;
315
314
  try {
316
315
  identity = deps.writeFile(path, text, false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/holocron-plugin-1password",
3
- "version": "5.0.0-alpha.417",
3
+ "version": "5.0.0-alpha.419",
4
4
  "description": "Holocron plugin for 1Password. Implements the vault capability via shell-out to the `op` CLI (https://developer.1password.com/docs/cli).",
5
5
  "keywords": [
6
6
  "1password",
@@ -30,7 +30,7 @@
30
30
  "dist"
31
31
  ],
32
32
  "dependencies": {
33
- "@theholocron/kyber": "^5.0.0-alpha.417"
33
+ "@theholocron/kyber": "^5.0.0-alpha.419"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^26",
@@ -43,14 +43,14 @@
43
43
  "tsx": "4.23.15",
44
44
  "typescript": "^5.9.3",
45
45
  "vitest": "^5.1.0",
46
- "@theholocron/cli": "5.0.0-alpha.417",
47
46
  "@theholocron/eslint-config": "^8.9.0-alpha.16",
48
- "@theholocron/tsdown-config": "^8.9.0-alpha.16",
47
+ "@theholocron/vitest-config": "^8.9.0-alpha.16",
49
48
  "@theholocron/tsconfig": "^8.9.0-alpha.16",
50
- "@theholocron/vitest-config": "^8.9.0-alpha.16"
49
+ "@theholocron/tsdown-config": "^8.9.0-alpha.16",
50
+ "@theholocron/cli": "5.0.0-alpha.419"
51
51
  },
52
52
  "peerDependencies": {
53
- "@theholocron/cli": "5.0.0-alpha.417"
53
+ "@theholocron/cli": "5.0.0-alpha.419"
54
54
  },
55
55
  "engines": {
56
56
  "node": ">=22"