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

@devlander/rawstack-axios-module

Package Overview
Dependencies
Maintainers
1
Versions
219
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@devlander/rawstack-axios-module

A module used for the raw outdoors with endpoints and types

latest
Source
npmnpm
Version
1.4.4
Version published
Maintainers
1
Created
Source

@devlander/rawstack-axios-module

npm version

🚨 STOP! READ THIS FIRST! 🚨

πŸ“‹ QUICK SUMMARY (READ THIS!)

What You WantWhat to InstallWhat NOT to Install
React/Next.js App@devlander/rawstack-axios-react❌ @devlander/rawstack-axios-module
React Native App@devlander/rawstack-axios-react-native❌ @devlander/rawstack-axios-module
Node.js App@devlander/rawstack-axios-node❌ @devlander/rawstack-axios-module

🚨 CRITICAL: MULTI-PACKAGE MONOREPO 🚨

This repository contains SEPARATE npm packages for different platforms.

❌ NEVER DO THIS:

npm install @devlander/rawstack-axios-module  # WRONG!

βœ… ALWAYS DO THIS:

# For React/Next.js apps
npm install @devlander/rawstack-axios-react

# For React Native apps  
npm install @devlander/rawstack-axios-react-native

# For Node.js apps
npm install @devlander/rawstack-axios-node

πŸ”„ HOW CHANGES FLOW (VISUAL GUIDE)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    THIS REPOSITORY                         β”‚
β”‚              (rawstack-axios-module)                       β”‚
β”‚                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”‚
β”‚  β”‚   REACT     β”‚ β”‚ REACT NATIVEβ”‚ β”‚    NODE     β”‚          β”‚
β”‚  β”‚  PACKAGE    β”‚ β”‚   PACKAGE   β”‚ β”‚   PACKAGE   β”‚          β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
                      β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚     npm     β”‚
              β”‚   REGISTRY  β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                      β”‚
                      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                DEPENDENT PROJECTS                          β”‚
β”‚                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”‚
β”‚  β”‚rawoutdoors- β”‚ β”‚rawoutdoors- β”‚ β”‚rawoutdoors- β”‚          β”‚
β”‚  β”‚   nextjs    β”‚ β”‚ mobile-app  β”‚ β”‚nodejs-api   β”‚          β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🚨 CRITICAL RULE:

Changes ONLY flow DOWNWARD: This Repo β†’ npm β†’ Dependent Projects NEVER upward: Dependent Projects β†’ This Repo

🚨 CRITICAL: Repository Isolation

This repository is ISOLATED and serves as the single source of truth for all API client functionality.

❌ NEVER DO THIS:

  • Import files from other repositories
  • Export functionality to other repositories
  • Have circular dependencies with dependent projects
  • Try to share code directly with consuming applications

βœ… ALWAYS DO THIS:

All changes must flow FROM this repository β†’ npm β†’ dependent projects, NEVER the other way around.

πŸ”’ Why Isolation?

  • Prevents circular dependencies that break builds
  • Maintains single source of truth for all API logic
  • Ensures consistent behavior across all platforms
  • Simplifies debugging and maintenance

πŸ†˜ Support & Community

🚨 NPM Support & Premium Features

The only way to get npm support for this package or create tickets for the original developers to help is to:

Premium members get:

  • βœ… Direct access to the original developers
  • βœ… Priority npm support and bug fixes
  • βœ… Custom feature requests
  • βœ… Early access to new features
  • βœ… Exclusive documentation and examples

Join the Discord Community β†’

πŸ“‹ Support Channel: @devlander/rawstack-axios-module Support

πŸ“š Documentation

πŸ“¦ Available Packages

This monorepo provides separate packages for different platforms:

React & Next.js Applications

npm install @devlander/rawstack-axios-react
  • Use for: Web applications, Next.js, React with React Native Web
  • Contains: React hooks, context providers, browser storage

React Native Applications

npm install @devlander/rawstack-axios-react-native
  • Use for: Mobile applications, React Native
  • Contains: React Native hooks, AsyncStorage integration

Node.js Applications

npm install @devlander/rawstack-axios-node
  • Use for: Express APIs, CLI tools, server-side applications
  • Contains: Node.js implementations, file system storage

Core Package (Internal)

  • Purpose: Base functionality shared across all platforms
  • Usage: Not directly installed (used internally by platform packages)

πŸ”— Peer Dependencies

Each platform package has different peer dependencies:

React Package (@devlander/rawstack-axios-react)

npm install @tanstack/react-query axios react react-dom

React Native Package (@devlander/rawstack-axios-react-native)

npm install @tanstack/react-query axios react-native

Node.js Package (@devlander/rawstack-axios-node)

npm install axios

πŸš€ Quick Start

Choose Your Platform Package First

React/Next.js:

import { ApiClientFactory } from '@devlander/rawstack-axios-react';

React Native:

import { ApiClientFactory } from '@devlander/rawstack-axios-react-native';

Node.js:

import { ApiClientFactory } from '@devlander/rawstack-axios-node';

1. Initialize the API Client (TypeScript-Safe Singleton)

// Initialize once at app startup - this is a singleton ApiClientFactory.initialize({ baseUrl: 'https://api.therawoutdoors.com', keyIdentifier: 'your-key-identifier', tokenKey: 'your-token-key', debug: false, // Set to true for development // Storage functions for token management saveToStorage: (key, value, identifier) => { localStorage.setItem(${identifier}_${key}, value); }, getFromStorage: (key, identifier) => { return localStorage.getItem(${identifier}_${key}); }, removeFromStorage: (key, identifier) => { localStorage.removeItem(${identifier}_${key}); } });

// βœ… All hooks and services now use the same base URL and configuration // βœ… TypeScript-safe: Can't be initialized twice // βœ… Runtime-safe: Throws error if not initialized before using hooks


### 2. Set up React Query Provider

```typescript
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

const queryClient = new QueryClient();

function App() {
  return (
    <QueryClientProvider client={queryClient}>
      {/* Your app components */}
    </QueryClientProvider>
  );
}

3. Use the Hooks (All Use Same Configuration)

All hooks automatically use the same base URL and configuration:

// Import from your platform package
import { useGetCurrentUser, useLoginUser, useGetVideosWithLimit } from '@devlander/rawstack-axios-react';
// or
import { useGetCurrentUser, useLoginUser, useGetVideosWithLimit } from '@devlander/rawstack-axios-react-native';
// or  
import { useGetCurrentUser, useLoginUser, useGetVideosWithLimit } from '@devlander/rawstack-axios-node';

function MyComponent() {
  // βœ… All these hooks use the same base URL and configuration
  const { data: user } = useGetCurrentUser();
  const { data: videos } = useGetVideosWithLimit(10);
  const loginMutation = useLoginUser();
  
  // βœ… TypeScript-safe: Will throw error if not initialized
  // βœ… All requests go to the same base URL
  // βœ… All use the same authentication and storage configuration
  
  return (
    <div>
      <h1>Welcome, {user?.data?.name}!</h1>
      <p>Videos: {videos?.data?.videos?.length}</p>
    </div>
  );
}

TypeScript-Safe Singleton Benefits

βœ… Single Configuration Source

// Initialize once
ApiClientFactory.initialize(config);

// All hooks use the same config automatically
const user = useGetCurrentUser(); // Uses same baseUrl
const videos = useGetVideosWithLimit(10); // Uses same baseUrl
const search = useSearchBarQuery('query', 10); // Uses same baseUrl

βœ… Runtime Safety

// ❌ This will throw a clear error if not initialized
const user = useGetCurrentUser(); 
// Error: "API client not initialized. Call ApiClientFactory.initialize() first."

// βœ… Check if ready before using
if (ApiClientFactory.isReady()) {
  const user = useGetCurrentUser();
}

βœ… Configuration Validation

// ❌ Missing required fields will throw at initialization
ApiClientFactory.initialize({
  baseUrl: 'https://api.example.com'
  // Error: "keyIdentifier is required"
  // Error: "tokenKey is required"
});

// βœ… All required fields validated at startup
ApiClientFactory.initialize({
  baseUrl: 'https://api.example.com',
  keyIdentifier: 'my-app',
  tokenKey: 'auth-token'
});

βœ… Dynamic Base URL Updates

// Update base URL for all services at runtime
ApiClientFactory.updateBaseUrl('https://staging-api.example.com');

// All subsequent requests use the new base URL
const user = useGetCurrentUser(); // Uses new baseUrl
const videos = useGetVideosWithLimit(10); // Uses new baseUrl

Available Hooks

User Management

  • useGetCurrentUser() - Get current user
  • useGetUserByID(id) - Get user by ID
  • useLoginUser() - Login mutation
  • useRegisterUser() - Registration mutation
  • useLogoutUser() - Logout mutation

Video Management

  • useGetVideoByID(id) - Get video by ID
  • useGetVideosWithLimit(limit) - Get videos with limit
  • usePostCreateVideo() - Create video mutation
  • useSearchBarQuery(query, limit) - Search across all content
  • useSearchVideoQuery(query, limit) - Search videos only
  • useSearchUsersQuery(query, limit) - Search users only

Watchlist

  • useGetWatchlist(profileId, params) - Get user's watchlist
  • useAddToWatchlist() - Add to watchlist mutation
  • useRemoveFromWatchlist() - Remove from watchlist mutation
  • useGetFeaturedVideos() - Get all featured videos
  • useGetFeaturedProducers() - Get all featured producers
  • useGetFeaturedByType(contentType, page?, limit?) - Get featured by type
  • useGetFeaturedById(id) - Get featured by ID
  • useCreateFeatured() - Create new featured mutation
  • useUpdateFeatured() - Update featured mutation
  • useDeleteFeatured() - Delete featured mutation

Avatar

  • useGetAvailableAvatars() - Get all available avatars
  • useGetAvatarById(id) - Get avatar by ID

Show Preferences

  • useCheckShowPreferenceStatus(profileId, contentId, contentType) - Check preference status
  • useCreateShowPreference() - Create preference mutation
  • useRemoveShowPreference() - Remove preference mutation

Gear

  • useGetGearByID(id) - Get gear by ID
  • useGetGearByLimit(limit) - Get gear with limit
  • usePostCreateGear() - Create gear mutation

Producer

  • useGetProducerById(id) - Get producer by ID
  • useGetProducersWithStart(start) - Get producers with pagination
  • usePostCreateProducer() - Create producer mutation

Mail

  • useSendResetPasswordLink(email) - Send password reset email

Configuration Options

Required Parameters

  • baseUrl: The base URL for your API (used by ALL hooks and services)
  • keyIdentifier: Unique identifier for your application
  • tokenKey: Key used for storing authentication tokens

Optional Parameters

  • debug: Enable debug mode (default: false)
  • saveToStorage: Function to save data to storage
  • getFromStorage: Function to retrieve data from storage
  • removeFromStorage: Function to remove data from storage
  • errorLogger: Custom error logging function

Storage Functions

The package requires storage functions for token management. Here are examples for different platforms:

Web (localStorage)

{
  saveToStorage: (key, value, identifier) => {
    localStorage.setItem(`${identifier}_${key}`, value);
  },
  getFromStorage: (key, identifier) => {
    return localStorage.getItem(`${identifier}_${key}`);
  },
  removeFromStorage: (key, identifier) => {
    localStorage.removeItem(`${identifier}_${key}`);
  }
}

React Native (AsyncStorage)

import AsyncStorage from '@react-native-async-storage/async-storage';

{
  saveToStorage: async (key, value, identifier) => {
    await AsyncStorage.setItem(`${identifier}_${key}`, value);
  },
  getFromStorage: async (key, identifier) => {
    return await AsyncStorage.getItem(`${identifier}_${key}`);
  },
  removeFromStorage: async (key, identifier) => {
    await AsyncStorage.removeItem(`${identifier}_${key}`);
  }
}

Error Handling

All hooks include built-in error handling. Errors are logged to the console by default, but you can provide a custom error logger:

ApiClientFactory.initialize({
  // ... other config
  errorLogger: (error, context) => {
    // Your custom error logging
    console.error(`[${context}]`, error);
    // Send to your error tracking service
    // Sentry.captureException(error);
  }
});

TypeScript Support

The package includes full TypeScript support with comprehensive type definitions for all endpoints, responses, and hooks.

πŸ”„ Development Workflow

🚨 HOW TO EDIT THINGS (READ CAREFULLY!)

When you need to change API client functionality, you MUST follow this exact process:

Step 1: Make Changes HERE (This Repository)

# 1. Clone this repository
git clone https://github.com/Devlander-Software/rawstack-axios-module.git

# 2. Make your changes to the source files
# 3. Test your changes
npm test

# 4. Build all packages
npm run build

Step 2: Publish to npm

# 5. Publish updated packages to npm registry
npm run publish:all
# OR publish individual packages:
npm run publish:react
npm run publish:react-native  
npm run publish:node

Step 3: Update Dependent Projects

# 6. In EACH dependent project, update the package:
cd rawoutdoors-nextjs
npm update @devlander/rawstack-axios-react

cd rawoutdoors-mobile-app
npm update @devlander/rawstack-axios-react-native

cd rawoutdoors-nodejs-express-api
npm update @devlander/rawstack-axios-node

❌ NEVER DO THIS:

  • Try to edit files in dependent projects directly
  • Import code from dependent projects into this repository
  • Share code between repositories without going through npm

Why This Architecture?

  • Single Source of Truth: All API client logic lives in one place
  • Version Control: Changes are tracked and versioned centrally
  • Consistency: All projects use the same underlying API client logic
  • Maintainability: Bug fixes and features are deployed once, used everywhere
  • Isolation: Prevents circular dependencies and code coupling issues

πŸ“š Contributing

Please refer to the project's contribution guidelines for information on how to contribute to this package.

Remember: This repository is isolated. Never import from or export to other repositories.

πŸ—οΈ Dependent Projects

This repository serves the following projects in the Raw Outdoors ecosystem:

rawoutdoors-nextjs (Next.js Web Application)

  • Technology: React + React Native Web components
  • Required Package: @devlander/rawstack-axios-react
  • Install Command: npm install @devlander/rawstack-axios-react
  • Location: Separate repository (NOT this one)

rawoutdoors-mobile-app (React Native Mobile Application)

  • Technology: React Native
  • Required Package: @devlander/rawstack-axios-react-native
  • Install Command: npm install @devlander/rawstack-axios-react-native
  • Location: Separate repository (NOT this one)

rawoutdoors-nodejs-express-api (Express.js API Server)

  • Technology: Node.js + Express
  • Required Package: @devlander/rawstack-axios-node
  • Install Command: npm install @devlander/rawstack-axios-node
  • Location: Separate repository (NOT this one)

🚨 CRITICAL REMINDER

All changes to API client functionality MUST be made in THIS repository, then published to npm, then updated in the dependent projects.

❌ NEVER edit files in dependent projects directly

βœ… ALWAYS edit files in THIS repository, then publish to npm

🚨 COMMON MISTAKES & TROUBLESHOOTING

❌ MISTAKE: Trying to install the wrong package

# WRONG - This will break your app!
npm install @devlander/rawstack-axios-module

# RIGHT - Use the platform-specific package
npm install @devlander/rawstack-axios-react        # For React/Next.js
npm install @devlander/rawstack-axios-react-native # For React Native
npm install @devlander/rawstack-axios-node         # For Node.js

❌ MISTAKE: Editing files in dependent projects

# WRONG - Don't edit these files directly!
cd rawoutdoors-nextjs
# Editing files here won't help - they get overwritten on npm install

# RIGHT - Edit files in THIS repository, then publish to npm
cd rawstack-axios-module
# Make changes here, then publish, then update dependent projects

❌ MISTAKE: Trying to import from dependent projects

// WRONG - This creates circular dependencies!
import { something } from '../rawoutdoors-nextjs/src/components'

// RIGHT - All imports should be from npm packages or this repository
import { useApiClient } from '@devlander/rawstack-axios-react'

βœ… CORRECT WORKFLOW (Remember This!)

  • Make changes in THIS repository
  • Test and build packages
  • Publish to npm
  • Update packages in dependent projects

License

ISC

Keywords

devlander

FAQs

Package last updated on 25 Aug 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