diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 739b090..ffbc527 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -34,5 +34,8 @@ jobs: - name: Test env: OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} - run: npm test + run: | + npm test + npm run commonjs-example + npm run esm-example diff --git a/examples/index.cjs b/examples/index.cjs index 75efa5a..8991f06 100644 --- a/examples/index.cjs +++ b/examples/index.cjs @@ -9,7 +9,8 @@ async function fetchSecret() { }); // Fetches a secret. - return await client.secrets.resolve("op://vault/item/field"); + // See syntax here: https://developer.1password.com/docs/cli/secrets-reference-syntax/ + return await client.secrets.resolve("op://SDKs Test/Test Login/username"); } fetchSecret().then(console.log) diff --git a/examples/index.mjs b/examples/index.mjs index 7733434..34176fc 100644 --- a/examples/index.mjs +++ b/examples/index.mjs @@ -8,5 +8,6 @@ const client = await createClient({ }); // Fetches a secret. -const secret = await client.secrets.resolve("op://vault/item/field"); +// See syntax here: https://developer.1password.com/docs/cli/secrets-reference-syntax/ +const secret = await client.secrets.resolve("op://SDKs Test/Test Login/username"); console.log(secret)