Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@circle.so/types

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@circle.so/types

Create an API token here: `https://circle.example.com/settings/api/new`

  • 0.0.4
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

circle community API client

Create an API token here: https://circle.example.com/settings/api/new

Installation

$ npm install --save @circle.so/posts
$ npm install --save @circle.so/spaces
$ npm install --save-dev @circle.so/types

Using spaces

See spaces/spaces.test.ts, posts/posts.test.ts, and @circle.so/types for more options.

import { Spaces } from '@circle.so/spaces'
// Pass your API key to the constructor
const api = new Spaces({ api_key: process.env.CIRCLE_API_KEY })
const space = await api.add({ community_id: 1, name: "New space" })
console.log(space.name)
// "New space"

Current support

  • Spaces CRUD
  • Posts CRUD

@TODO

  • Invite members
  • Add members to spaces

Debug

  • Can't deliver email to Valorise.ai?

Contributing

Uses patterns for a typescript monorepo found here: https://blog.frankdejonge.nl/setting-up-a-typescript-mono-repo-for-scoped-packages/

Tests

$ npm install --dev
$ cp env.sample .env
# Update .env with a Circle API key.
$ source .env
$ npm run tests

Add a new package

Following this pattern: https://www.yieldcode.blog/post/npm-workspaces/ https://stackoverflow.com/questions/72055371/npm-workspaces-typescript-unable-to-find-local-modules

$ npm init --workspace packages/types --scope @circle.so -y
$ ls -la node_modules/@circle.so/

Require a new package

$ npm install @circle.so/types --workspace ./packages/spaces
$ cat packages/spaces/package.json | grep -C1 circle
$ npm ls

Publishing

$ npm run build -ws
$ npm version patch -ws --verbose
# git commit and push
$ npm publish --access public -ws --verbose

@TODO

  • npm run build creates artefacts in package/*/src files that prevent interim package builds to not run which causes confusion.
  • Types other than Spaces and Posts

Troubleshooting

  • If VSCode doesn't recognise the imports: reopen the project.
  • If VSCode or build complains about types build the types package first npm run build:types
  • If other packages aren't seeming to build while developing remove the additional artefacts in ./src and run the build script. We should fix this.
  • Until we overrode the paths and exclude in tsconfig.json at the root level we had all sorts of errors with resolving packages.

FAQs

Package last updated on 15 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc