@anrmk/str-package
v0.2.15
Published
Shared providers, types, and utils for STR services
Readme
@anrmk/str-package
Shared npm package for STR projects.
This library contains reusable Bybit providers, shared TypeScript types, and utility helpers used by str and str-worker.
What Is Included
Providers
@anrmk/str-package/providers/bybit
Types
@anrmk/str-package/types@anrmk/str-package/types/bybit@anrmk/str-package/types/challenge
Utilities
@anrmk/str-package/utils/bybitHelper@anrmk/str-package/utils/helper
Install
npm install @anrmk/str-packageUsage
import { getApiKeyInfo } from "@anrmk/str-package/providers/bybit";
import type { TChallengeItem } from "@anrmk/str-package/types/challenge";Use In A Project
- Install dependency:
npm install @anrmk/str-package- Import from package subpaths in your app code:
import { applyDemoMoney } from "@anrmk/str-package/providers/bybit";
import type { IBybitApiResponse } from "@anrmk/str-package/types/bybit";Development
npm install
npm run buildPublish Updates (Push)
When you change the package code and want consumers to receive updates, you need to ensure that the new code is compatible with the existing system.
Bump package version:
npm version patch- Make sure your account is valid and you have an access
Fix npm cache ownership (one time)
sudo chown -R 501:20 /Users/anrmk/.npmRe-authenticate as your npm account
npm logout
npm login
npm whoamiUse minor or major when needed.
- Build and publish:
npm run build
npm publish --access public- Push git commit and tags:
git push origin main --tagsNote: npm does not allow publishing the same version twice.
Get Updates In Consumers (Pull)
In str or str-worker, fetch latest package version:
npm install @anrmk/str-package@latestor
npm update @anrmk/str-packageVerify installed version:
npm list @anrmk/str-packageRecommended Release Flow
- Update code in this repo.
- Run tests/build.
- Bump version.
- Publish to npm.
- Update package in consumer repos.
- Validate and deploy.
