Update package scope to @soulcraft and configure as private

Changed package name and imports to use the @soulcraft scope. Updated `README.md` to reflect the use of a private npm package and added publishing/installing instructions. Configured `package.json` with `private: true` and restricted access for publishing. Updated demo link to the correct GitHub repository.
This commit is contained in:
David Snelling 2025-05-23 11:08:02 -07:00
parent 49480e694c
commit 7638506ffa
3 changed files with 41 additions and 32 deletions

View file

@ -18,7 +18,7 @@ A vector database that runs in a browser or Node.js and utilizes Origin Private
## Installation
```bash
npm install brainy
npm install @soulcraft/brainy
```
## Usage
@ -26,7 +26,7 @@ npm install brainy
### Basic Example
```typescript
import {BrainyData} from 'brainy';
import {BrainyData} from '@soulcraft/brainy';
// Create a new vector database
const db = new BrainyData();
@ -77,7 +77,7 @@ import {
euclideanDistance,
UniversalSentenceEncoder,
createEmbeddingFunction
} from 'brainy';
} from '@soulcraft/brainy';
// Configure the vector database
const db = new BrainyData({
@ -109,50 +109,55 @@ const db = new BrainyData({
// storageAdapter: myCustomStorageAdapter
// You can also explicitly use the FileSystemStorage with a custom directory:
// import { FileSystemStorage } from 'brainy/storage/fileSystemStorage';
// import { FileSystemStorage } from '@soulcraft/brainy/storage/fileSystemStorage';
// storageAdapter: new FileSystemStorage('/custom/path')
});
```
## Contributing and Publishing
## Publishing and Using as a Private NPM Package
Soulcraft Brainy is an open source project released under the MIT license. Contributions are welcome!
Soulcraft Brainy is configured as a private NPM package with restricted access. This section provides information on how to publish and use it within your organization.
### Contributing to the Project
### Publishing the Package
To contribute to the project:
To publish updates to the package:
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run tests to ensure everything works:
```bash
npm test
```
5. Submit a pull request
### Publishing a New Version
To publish a new version to npm:
1. Update the version in package.json following semantic versioning
2. Build the package:
1. Ensure you have the appropriate npm credentials and access to the @soulcraft organization
2. Update the version in package.json
3. Build the package:
```bash
npm run build
```
3. Publish the package:
4. Publish the package:
```bash
npm publish
```
### Installing the Package
To install the package in your project:
```bash
npm install brainy
Note that the package has the following configuration in package.json:
```json
"private": true,
"publishConfig": {
"access": "restricted"
}
```
This ensures that the package is only accessible to users with appropriate permissions within the @soulcraft organization.
### Installing the Private Package
To install the package in another project:
1. Ensure you have access to the @soulcraft organization on npm
2. Add the package to your project:
```bash
npm install @soulcraft/brainy
```
3. If you're using a private npm registry, you may need to configure npm to use your organization's registry:
```bash
npm config set @soulcraft:registry https://your-private-registry.com/
```
### Requirements
- Node.js >= 18.0.0

View file

@ -84,7 +84,7 @@
<li class="nav-item">
<a
class="nav-link"
href="https://github.com/yourusername/soulcraft-brainy"
href="https://github.com/sodal-project/brainy"
target="_blank"
>GitHub</a
>

View file

@ -1,5 +1,5 @@
{
"name": "brainy",
"name": "@soulcraft/brainy",
"version": "0.1.0",
"description": "A vector database using HNSW indexing with Origin Private File System storage",
"main": "dist/index.js",
@ -30,6 +30,10 @@
],
"author": "David Snelling (david@soulcraft.com)",
"license": "MIT",
"private": true,
"publishConfig": {
"access": "restricted"
},
"devDependencies": {
"@types/jest": "^29.5.3",
"@types/node": "^20.4.5",