New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details β†’ β†’
Socket
Book a DemoSign in
Socket

@basaldev/blocks-order-service

Package Overview
Dependencies
Maintainers
7
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@basaldev/blocks-order-service

blocks-order-service πŸ›οΈ

latest
Source
npmnpm
Version
2.4.2
Version published
Maintainers
7
Created
Source

blocks-order-service

blocks-order-service

πŸ›οΈ

Overview

Order service, wrap the business logic of manage orders. Interact with the following Microservices:

  • blocks-user-service
  • blocks-organization-service
  • blocks-catalog-service

Getting started

  • Make sure global yarn is installed (nvm use && npm install -g yarn)

  • Open project folder use VSCode

  • Disable prettier if it cause some error (you can watch in right bottom of your VSCode if any reds, image below). You can use Shift + Command + X and search for it and disable

  • Open ./.vscode/blocks-order-service.code-workspace file, click the Open workspace button in the right bottom place (also see image below)

  • Open project files and you should be able to see all errors resolved

  • Some common used commands:

    • yarn build
    • yarn typecheck
    • yarn test
    • yarn spell-check

πŸ— Project Structure

.
β”œβ”€β”€ .github                
β”œβ”€β”€ .husky                 # husky settings - @basaldev/lint-staged-config
β”œβ”€β”€ .vscode                # vscode settings
β”œβ”€β”€ .yarn                  # yarn binary, config and project dependencies
β”œβ”€β”€ coverage *             # jest coverage report
β”œβ”€β”€ dist *
β”œβ”€β”€ docs
β”‚   β”œβ”€β”€ assets             # documentation related assets
β”‚   └── reference          # api docs
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ adapter
β”‚   β”œβ”€β”€ test
β”‚   └── index.ts
β”œβ”€β”€ .eslintignore
β”œβ”€β”€ .eslintrc.js            # @basaldev/eslint-config
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .nvmrc
β”œβ”€β”€ .pnp.cjs                # yarn config
β”œβ”€β”€ .pnp.loader.mjs         # yarn config
β”œβ”€β”€ .prettierignore
β”œβ”€β”€ .prettierrc.json        # @basaldev/prettier-config
β”œβ”€β”€ .yarnrc.yml             # yarn config
β”œβ”€β”€ cspell.config.js        # @basaldev/cspell-config
β”œβ”€β”€ .yarnrc.yml             # yarn config
β”œβ”€β”€ jest.config.js          # @basaldev/jest-preset
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
β”œβ”€β”€ tsconfig.json           # @basaldev/tsconfig
└── yarn.lock

* Not tracked by git

πŸ”° Setup

Create a Github Personal Auth Token

  • Go toΒ Github Developer Settings > Personal TokensΒ > Generate new token
  • Click 'Generate Token'
  • Input a name for your token.
  • Select repo checkbox
  • Select write:packages
  • Add to your local environment - .zshrc .bashrc etc
export BASALDEV_AUTH_TOKEN=__INSERT_YOUR_TOKEN_HERE__

Install NVM

Install Yarn (Global)

Yarn must be installed globally for the project's NodeJS version. This should be done so using the command below.

nvm use && npm install -g yarn

Install Husky 🐺

yarn husky install

⚠️ IMPORTANT: Only use the yarn command install or run scripts. Do not use npm run xxx

πŸͺ„ Usage

Run typescript compiler

yarn start

Run debug server on default port: 9339.

  • Requires yarn start to be running in a separate session
  • Port should be updated to avoid conflicts with other projects package.json > scripts > debug
yarn debug

Run unit tests

docker compose up
yarn test

Installing packages

yarn add <package> | yarn add <package> -D

⚑️ Special Notes for VSCode Users

πŸ“ Required Extensions

Please ensure the following extensions are installed:

  • arcanis.vscode-zipfs
  • dbaeumer.vscode-eslint
  • seatonjiang.gitmoji-vscode
  • henrynguyen5-vsc.vsc-nvm (optional)

πŸ›  Workspaces

The kit uses vscode workspaces for vscode project settings:

  • All common vscode project settings should be specified in the .vscode/${project_name}-workspace file.
  • Personal user settings should be added to .vscode/settings.json (gitignored)
  • ⚠️ You must open this project as a workspace in vscode This can be done by clicking the workspace file while in vscode, or by using File > Open workspace from file.

πŸͺ› TypeScript

When prompted asking which typescript VSCode should use, it's very important that you choose the local project version located at .yarn/sdks/typescript/...

πŸ’… Prettier

If you have the prettier extension installed, please disable it for this project. ts-kit uses eslint to execute prettier, so having prettier enabled in vscode will cause conflicts and strange behavior.

πŸ€– Format on Save (optional)

Add the following code to your .vscode/settings.json will automatically fix all eslint errors whenever you save a file.

  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }

πŸš€ Package Deployment

This library uses github registry to publish private npm package. For detailed instructions see here

πŸ’‘ Note: that npm is used for version & publish commands

1. Bump version

npm version ${VERSION}

2. Build Package

yarn build

3. Publish Package

npm publish --tag=latest | experimental

Then go to github https://github.com/basaldev/backend-sdk/packages to check published packages.

FAQs

Package last updated on 07 May 2025

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