npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

directus-cms-extensions

v1.2.0

Published

* Open folder with extension in terminal * For plain extension run ```directus-extension build``` + ```directus-extension-builder.js``` \ for bundles run ```directus-extension build``` + ```directus-extension-bundles-builder.js```

Downloads

2

Readme

Building

  • Open folder with extension in terminal
  • For plain extension run directus-extension build + directus-extension-builder.js
    for bundles run directus-extension build + directus-extension-bundles-builder.js

Extensions:

You can find docs for operations in corresponding folders

Testing:

There is explained an approach how to create and maintain tests with Directus entities
like Flows and Operations.
Each test labeled with prefix [TEST | **].
We have 3 types ones: [TEST | START], [TEST | TESTS FLOWS], [TEST | FLOW].

  • [TEST | START] - Main launcher for all test cases.
    Schema: [Webhook: flow] -> [Trigger flow: operation] -> [Run script: operation] -> [Output: operation]

    • [Webhook: flow] - launcher for testing, for example webhook flow.
    • [Trigger flow: operation] - type: Trigger flow operation. Triggers [TEST | TEST FLOWS] and gets common result from there. Key: main_output.
    • [Run script: operation] - type: Run script operation. Gets common result and prepare a report.

    Prepare tests output code:

    module.exports = async function(data) {
      const defaultFields = {
        $trigger: '$trigger',
        $last: '$last',
        $accountability: '$accountability',
        $env: '$env'
      };
      
      const testsResult = { status: '', passed: {tests: []}, failed: {tests: []} };
    
    const checkedTests = Object.keys(data.main_output)
      .filter((key) => !defaultFields[key])
      .map((key) => data.main_output[key])
      .forEach((t) => {
      if (t.status === 'success') {
        testsResult.passed.tests.push(t);
      } else {
        testsResult.failed.tests.push(t);
      }
      
      delete t.status;
    });
    
      testsResult.passed.count = testsResult.passed.tests.length;
      testsResult.failed.count = testsResult.failed.tests.length;
      testsResult.status = testsResult.failed.count ? 'failed' : 'success';
    
      return testsResult;
    }
* [TEST | TEST FLOWS] - Collects data from chain of [TEST | FLOW] and returns to it's trigger in [TEST | START] \
  Schema: [Another flow: flow] -> [Trigger flow: operation] -> [Trigger flow: operation] ...
  * [Another flow: flow] - triggers chain of triggers flow operation, collects and returns data.
    data to own trigger. <ins>Response body - All data</ins>.
  * [Trigger flow: operation] - trigger for `[TEST | FLOW]`(test).
  

* [TEST | FLOW] - Triggers testing operation, testing and return response.
  Schema: [Another flow: flow] -> [Testing operations: operation] -> [Run script: operation]
  * [Another flow: flow] - triggers chain of tested operations, collects and returns data. <ins>Response body - Data of last operation</ins>
  * [Testing operations: operation] - tested operations.
  * [Run script: operation] - gets operations output, prepare and return response with next interface.
    Success: `{test: '<operation name>', status: 'success'}` \
    Failure: ` {test: '<operation name>', step: '<operation step>', status: 'error'}`

---
Tested operations:
* [TEST | FLOW] CRUD user flow - create_users/read_users/update_users/delete_users
* [TEST | FLOW] Create proxy - serp 
* [TEST | FLOW] Generate pin code - generate_pin_code 
* [TEST | FLOW] JWT flow - create_jwt/verify_jwt
* [TEST | FLOW] OpenAI - openai/openai_embeddings
* [TEST | FLOW] Translations - deepL
* [TEST | FLOW] Web-scraping - scrape_webpage/get_website_urls/get_website_dead_urls
* [TEST | FLOW] Communication - send_sms_by_gateway/send_emails_by_mailgun/send_fb_push_notifications
Test cases you can find in /directus-tests file