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

df-cheatcodes

v0.5.7

Published

``` tl:dr; So easy it'll make you feel like you're cheating at dialogflow ```

Downloads

129

Readme

tl:dr; So easy it'll make you feel like you're cheating at dialogflow

df-cheats


Note: For the very impatient, go here: quickstart.md


Overview

df-cheatcodes is a library exposing useful aliases, shortcuts, functionality/sugar that can help teams quickly produce a rich browser-based conversational experience that they can put in front of real users for feedback & improvement. See below features.

Ex. Rich components the fast & easy way (notice no imports)

richcomponents

Ex. "$hortcut Cheats" to quickly jump around your conversational interface & expose rich functionality. (Think of these as similiar to deep links but here it's deep linking to functionality of your intelligent agent)

shortcut

Plus a bunch of other stuff (helpers for working with API, frontend, external templates, random responses, retrieve/set data, etc)

Where to start?

Other Components

df-starter-kit

Fully-loaded DialogFlow "starter" project with an agent, fulfillment template, and a frontend that renders rich components. Also has various ergonomic features to speed development like live-reload, types, tunneling, easy deploy/bundling to a web server or optimized for cloud functions

df-frontend-vue

A fun "retro" DialogFlow frontend interface that can render rich components with many conversational design & debugging tools. A "bundled" version is included with starter kit, this one you can edit or skin however you need

df-cheatcodes-base

Most helpful for "frontend" tasks and transacating with DialogFlow APIs. Makes it easy to send plaintext, events, and requestdata

Functionality

aogCheat

Collection of helpers to augment the actions-on-google library and make working with rich components, contexts, data, 3rd-party APIs, and other tasks faster & easier

apiCheat

Helpful items for transacting with the API, can optionally transform gRPC <> JSON for event, request data as required

shortcutCheat

A trick to expose 'shareable' (copy/paste, links) points of your conversation-- useful for debugging and for users who aren't interested in a 'chat'

requestCheat

Various helpers to help simplify building requests

endpointCheat

Add this so your server routes can handle DialogFlow requests (events, text, requestdata, etc) from a frontend or other services

Ex. Easy server (could certainly be repurposed into a Cloud Function)

import express from "express";
import bodyParser from "body-parser";
import { endPointCheat } from "df-cheatcodes";

// Initialize simple server
const app = express();
app.use(bodyParser.json());

// Prep credentials + config
import { project_id, client_email, private_key } from "./service-account.json";
const credentials = { project_id, client_email, private_key };

// all optional
const config = {
  transformgrpc: false, // convert JSON to protostruct for requestData, event parameters, protostruct to JSON for responses
  optimizeResponse: false, // combine webhookPayload + fulfillmentMessages
};

app.post("/chat", endpointCheat(credentials, config));

Libraries

df-cheatcodes provides cheats using actions-on-google ^2.12.0 & dialogflow ^1.2.0 as peerDependencies.

License

This repo uses types & concepts from actions-on-google which itself is under apache license. At time of writing, it seemed that clearest/simplest thing to do is match that license in a notice-- accordingly, this repo conforms to the Apache 2.0 license