[PR #305] [MERGED] Official 1Password Template Function #226

Closed
opened 2025-12-29 07:19:57 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/305
Author: @gschier
Created: 11/22/2025
Status: Merged
Merged: 11/22/2025
Merged by: @gschier

Base: mainHead: 1password


📝 Commits (2)

  • 7797325 Add 1password template function plugin and a ton of surrounding improvements
  • 218b434 Fix validation of hidden fields

📊 Changes

20 files changed (+1441 additions, -143 deletions)

View changed files

📝 package-lock.json (+1023 -3)
📝 package.json (+1 -0)
📝 packages/plugin-runtime/src/PluginInstance.ts (+18 -7)
📝 packages/plugin-runtime/src/common.ts (+28 -1)
plugins/template-function-1password/package.json (+20 -0)
plugins/template-function-1password/src/index.ts (+123 -0)
plugins/template-function-1password/tsconfig.json (+3 -0)
📝 plugins/template-function-request/src/index.ts (+16 -0)
📝 plugins/template-function-response/src/index.ts (+17 -1)
📝 scripts/vendor-plugins.cjs (+1 -1)
📝 src-tauri/yaak-templates/src/parser.rs (+1 -1)
📝 src-web/components/TemplateFunctionDialog.tsx (+57 -47)
📝 src-web/components/core/Editor/Editor.tsx (+4 -30)
📝 src-web/components/core/Editor/genericCompletion.ts (+7 -1)
📝 src-web/components/core/Editor/twig/completion.ts (+49 -23)
📝 src-web/components/core/Editor/twig/templateTags.ts (+17 -5)
src-web/components/core/Editor/twig/util.ts (+37 -0)
📝 src-web/components/core/Select.tsx (+3 -1)
📝 src-web/hooks/useTemplateFunctionConfig.ts (+4 -1)
📝 src-web/hooks/useTemplateFunctions.ts (+12 -21)

📄 Description

This PR adds a bundled plugin to provide a 1password.item(...) template function, built on github.com/1Password/onepassword-sdk-js.

This does not depend on the 1Password CLI, but only to Create a Service Account and reference the generated token.

CleanShot 2025-11-21 at 15 13 40@2x

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/305 **Author:** [@gschier](https://github.com/gschier) **Created:** 11/22/2025 **Status:** ✅ Merged **Merged:** 11/22/2025 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `main` ← **Head:** `1password` --- ### 📝 Commits (2) - [`7797325`](https://github.com/mountain-loop/yaak/commit/7797325503c1584f960e9d8d9a4726f760f688ff) Add 1password template function plugin and a ton of surrounding improvements - [`218b434`](https://github.com/mountain-loop/yaak/commit/218b434d817c74170656325da7233ab929ee1211) Fix validation of hidden fields ### 📊 Changes **20 files changed** (+1441 additions, -143 deletions) <details> <summary>View changed files</summary> 📝 `package-lock.json` (+1023 -3) 📝 `package.json` (+1 -0) 📝 `packages/plugin-runtime/src/PluginInstance.ts` (+18 -7) 📝 `packages/plugin-runtime/src/common.ts` (+28 -1) ➕ `plugins/template-function-1password/package.json` (+20 -0) ➕ `plugins/template-function-1password/src/index.ts` (+123 -0) ➕ `plugins/template-function-1password/tsconfig.json` (+3 -0) 📝 `plugins/template-function-request/src/index.ts` (+16 -0) 📝 `plugins/template-function-response/src/index.ts` (+17 -1) 📝 `scripts/vendor-plugins.cjs` (+1 -1) 📝 `src-tauri/yaak-templates/src/parser.rs` (+1 -1) 📝 `src-web/components/TemplateFunctionDialog.tsx` (+57 -47) 📝 `src-web/components/core/Editor/Editor.tsx` (+4 -30) 📝 `src-web/components/core/Editor/genericCompletion.ts` (+7 -1) 📝 `src-web/components/core/Editor/twig/completion.ts` (+49 -23) 📝 `src-web/components/core/Editor/twig/templateTags.ts` (+17 -5) ➕ `src-web/components/core/Editor/twig/util.ts` (+37 -0) 📝 `src-web/components/core/Select.tsx` (+3 -1) 📝 `src-web/hooks/useTemplateFunctionConfig.ts` (+4 -1) 📝 `src-web/hooks/useTemplateFunctions.ts` (+12 -21) </details> ### 📄 Description This PR adds a bundled plugin to provide a `1password.item(...)` template function, built on [github.com/1Password/onepassword-sdk-js](https://github.com/1Password/onepassword-sdk-js). This does not depend on the 1Password CLI, but only to [Create a Service Account](https://my.1password.com/developer-tools/infrastructure-secrets/serviceaccount) and reference the generated token. <img width="2158" height="1288" alt="CleanShot 2025-11-21 at 15 13 40@2x" src="https://github.com/user-attachments/assets/7c8cca6f-cc09-479e-80e0-d3f3cb6e7e41" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 07:19:57 +01:00
adam closed this issue 2025-12-29 07:19:57 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/yaak#226