MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / captureOpInvocations

Function captureOpInvocations

scripts/web-env/shared.test.ts:60–88  ·  view source on GitHub ↗
(existing: boolean)

Source from the content-addressed store, hash-verified

58 ...passwordFields,
59 { id: 'notesPlain', label: 'notesPlain', type: 'STRING', purpose: 'NOTES', value: '' }
60 ],
61 sections: []
62 }));
63} else if (args[0] === 'item' && args[1] === 'create') {
64 // Mirrors 1Password's real server-side validation for the PASSWORD category:
65 // an item cannot be created unless one of its fields carries a populated
66 // \`purpose: 'PASSWORD'\` value.
67 let item = {};
68 try { item = JSON.parse(templateInput); } catch {}
69 const fields = Array.isArray(item.fields) ? item.fields : [];
70 const hasPasswordPurpose = fields.some(field => field && field.purpose === 'PASSWORD' && field.value);
71 if (item.category === 'PASSWORD' && !hasPasswordPurpose) {
72 process.stderr.write('[ItemValidator] has found 1 errors, 0 warnings: \\nErrors:{1. Password item requires ps value}\\n');
73 process.exitCode = 1;
74 } else {
75 process.stdout.write(templateInput || stdin);
76 }
77} else if (args[0] === 'item' && args[1] === 'edit') {
78 process.stdout.write(templateInput || stdin);
79} else {
80 process.exitCode = 1;
81}
82`;
83
84const FAKE_OP_AUTH_FAILURE = `#!/usr/bin/env node
85process.stderr.write('You are not currently signed in to a 1Password account.\\n');
86process.exitCode = 1;
87`;
88
89const FAKE_PNPM_REDEPLOY = `#!/usr/bin/env node
90const fs = require('node:fs');
91const args = process.argv.slice(2);

Callers 1

shared.test.tsFile · 0.85

Calls 2

setVaultValueFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected