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

@oluko/oluko-services

v2.18.29

Published

Oluko Services Package

Downloads

21

Readme

oluko-services

npm package module for Oluko general services

Publish package

  1. Upgrade version in package.json

  2. npm run publish-pkg

or if you want to run all by hand:

    • npm run build
    • cd pkg
    • npm publish

Link locally

To link this package in a target project locally:

  • npm run link

or if you want to run all by hand:

  • npm run build
  • cd pkg
  • npm link

in target project:

  • npm link @olukomaster/oluko-services

you need to run npm link @olukomaster/oluko-services in the target project every time you change something in the package if you have an issue with this package, you should first do npm i in the target project and then npm link @olukomaster/oluko-services remove @olukomaster/oluko-services from the package.json in the target project since link will use the local version

CLI use

$ oluko-services <command>

Command:
    seed-create [description] [cant]              create seed file history in /history, for start data
    seed-generate [seed-file.ts]                  generate the seeds in /history to documents in firebase

Examples

    $ oluko-services seed-create user 2
    create file /history/seed_yyyy_mm_dd_hhMMms_user.ts  with two docs for add in firebase.

    $ oluko-services seed-generate
    Load files in /history/ to push in firebase if not pushed before.

    $ oluko-services seed-generate seed_yyyy_mm_dd_hhMMms_user.ts
    Load files in /history/seed_yyyy_mm_dd_hhMMms_user.ts to update in firebase.

IMAGES

  1. they are being resized in: storage-resized-images/index.ts, every time an image is uploaded it kicks that process in firebase.

CLI command create

  1. implement the command Class in /cli/factory/command-example.command.ts and extends CLIFactory.BaseFactoryCommand or implements CLIFactory.IFactoryCommand
  2. add the command is in /cli/factory/commands.ts config
  3. add command --help to /cli/factory/commands.ts helpDescription

stripe:

to create products,plans and prices in stripe:

// await this.copyProducts(); // await this.copyPrices(); //await this.copyCoupons(); //https://stripe.com/docs/billing/subscriptions/coupons

update solution webhooks to listen for stripe changes: go to https://dashboard.stripe.com/webhooks click in connect search in the search bar for webhooks click on +add endpoint http://us-central-peppermint-development.cloudfunctions.net/payment/hookSubscriptions customer.subscription.created customer.subscription.deleted customer.subscription.updated

before saving this endpoint and the events remember to save as connected account. repeat previous steps with this other data https://us-central-peppermint-development.cloudfunctions.net/payment/hookPlans plan.created plan.updated price.updated product.updated

Create user plans: create the plan in stripe and then just hit payment controller: /create-plan-firebase/:id with id= productId, this should be automatic but if webhook does not work run this method

how we should handle subscription payment is failing: https://benfoster.io/blog/stripe-failed-payments-how-to/

emulate strip cli windows to use webhooks or whatever:

instructions for install https://github.com/stripe/stripe-cli

CLI DOCS:
https://stripe.com/docs/cli

if you want to listen localhost events in the cli installed u'll need to do this: https://dashboard.stripe.com/webhooks/create?endpoint_location=local

steps windows:
open powershell:
> Set-ExecutionPolicy RemoteSigned -Scope CurrentUser # Optional: Needed to run a remote script the first time
> irm get.scoop.sh | iex
close open new powershell
> scoop bucket add stripe https://github.com/stripe/scoop-stripe-cli.git
> scoop install stripe

close open new powershell
stripe login  -> will ask you to copy a url and paste it in the browser to log in
stripe listen --forward-to localhost:3001/payment/hookSubscriptions will hear any event in that endpoint in the port you are running the project
with that running in a powershell instance you'll see in https://dashboard.stripe.com/test/webhooks a local listener with status listen
open a new powershell to send an event: for example: stripe trigger invoice.payment_action_required