@dextinity/cli 10.9.0 → 10.9.1-canary-20261008123720

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.
@@ -109,6 +109,7 @@ var child_process_1 = require("child_process");
109
109
  var commander_1 = require("commander");
110
110
  var crypto_1 = require("crypto");
111
111
  var fs_1 = __importDefault(require("fs"));
112
+ var os_1 = __importDefault(require("os"));
112
113
  var path_1 = require("path");
113
114
  exports.injectSiteConfigsCommand = new commander_1.Command("inject-site-configs")
114
115
  .description("Inject site-configs into a file")
@@ -249,13 +250,21 @@ exports.resolveOpReferences = resolveOpReferences;
249
250
  // 1Password rate limits only once. The random separator keeps multi-line secrets apart.
250
251
  var readSecrets = function (opRefs) {
251
252
  var separator = "\n".concat((0, crypto_1.randomUUID)(), "\n");
253
+ // `op inject` rejects stdin passed via `execSync`'s `input` ("expected data on stdin but none found"),
254
+ // because Node connects a socket instead of a pipe, so the references go through a file.
255
+ var referencesDirectory = fs_1.default.mkdtempSync((0, path_1.join)(os_1.default.tmpdir(), "inject-site-configs-"));
256
+ var referencesFile = (0, path_1.join)(referencesDirectory, "references");
252
257
  var output;
253
258
  try {
254
- output = (0, child_process_1.execSync)("op inject", { input: opRefs.join(separator), encoding: "utf-8" });
259
+ fs_1.default.writeFileSync(referencesFile, opRefs.join(separator));
260
+ output = (0, child_process_1.execFileSync)("op", ["inject", "--in-file", referencesFile], { encoding: "utf-8" });
255
261
  }
256
262
  catch (e) {
257
263
  throw new Error("inject-site-configs: Failed to resolve 1Password references: ".concat(e));
258
264
  }
265
+ finally {
266
+ fs_1.default.rmSync(referencesDirectory, { recursive: true, force: true });
267
+ }
259
268
  var secrets = output.split(separator);
260
269
  if (secrets.length !== opRefs.length) {
261
270
  throw new Error("inject-site-configs: Failed to resolve 1Password references: expected ".concat(opRefs.length, " secrets, got ").concat(secrets.length));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dextinity/cli",
3
- "version": "10.9.0",
3
+ "version": "10.9.1-canary-20261008123720",
4
4
  "description": "A collection of CLI tools for Dextinity projects",
5
5
  "repository": {
6
6
  "directory": "packages/cli",
@@ -26,7 +26,7 @@
26
26
  "ts-node": "^10.9.2"
27
27
  },
28
28
  "devDependencies": {
29
- "@dextinity/eslint-config": "10.9.0",
29
+ "@dextinity/eslint-config": "10.9.1-canary-20261008123720",
30
30
  "@types/js-yaml": "^4.0.9",
31
31
  "@types/node": "^24.19.1",
32
32
  "eslint": "^9.39.5",