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:
parent
49480e694c
commit
7638506ffa
3 changed files with 41 additions and 32 deletions
65
README.md
65
README.md
|
|
@ -18,7 +18,7 @@ A vector database that runs in a browser or Node.js and utilizes Origin Private
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install brainy
|
npm install @soulcraft/brainy
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
@ -26,7 +26,7 @@ npm install brainy
|
||||||
### Basic Example
|
### Basic Example
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import {BrainyData} from 'brainy';
|
import {BrainyData} from '@soulcraft/brainy';
|
||||||
|
|
||||||
// Create a new vector database
|
// Create a new vector database
|
||||||
const db = new BrainyData();
|
const db = new BrainyData();
|
||||||
|
|
@ -77,7 +77,7 @@ import {
|
||||||
euclideanDistance,
|
euclideanDistance,
|
||||||
UniversalSentenceEncoder,
|
UniversalSentenceEncoder,
|
||||||
createEmbeddingFunction
|
createEmbeddingFunction
|
||||||
} from 'brainy';
|
} from '@soulcraft/brainy';
|
||||||
|
|
||||||
// Configure the vector database
|
// Configure the vector database
|
||||||
const db = new BrainyData({
|
const db = new BrainyData({
|
||||||
|
|
@ -109,50 +109,55 @@ const db = new BrainyData({
|
||||||
// storageAdapter: myCustomStorageAdapter
|
// storageAdapter: myCustomStorageAdapter
|
||||||
|
|
||||||
// You can also explicitly use the FileSystemStorage with a custom directory:
|
// 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')
|
// 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
|
1. Ensure you have the appropriate npm credentials and access to the @soulcraft organization
|
||||||
2. Create a feature branch
|
2. Update the version in package.json
|
||||||
3. Make your changes
|
3. Build the package:
|
||||||
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:
|
|
||||||
```bash
|
```bash
|
||||||
npm run build
|
npm run build
|
||||||
```
|
```
|
||||||
3. Publish the package:
|
4. Publish the package:
|
||||||
```bash
|
```bash
|
||||||
npm publish
|
npm publish
|
||||||
```
|
```
|
||||||
|
|
||||||
### Installing the Package
|
Note that the package has the following configuration in package.json:
|
||||||
|
```json
|
||||||
To install the package in your project:
|
"private": true,
|
||||||
|
"publishConfig": {
|
||||||
```bash
|
"access": "restricted"
|
||||||
npm install brainy
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
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
|
### Requirements
|
||||||
|
|
||||||
- Node.js >= 18.0.0
|
- Node.js >= 18.0.0
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a
|
<a
|
||||||
class="nav-link"
|
class="nav-link"
|
||||||
href="https://github.com/yourusername/soulcraft-brainy"
|
href="https://github.com/sodal-project/brainy"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>GitHub</a
|
>GitHub</a
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "brainy",
|
"name": "@soulcraft/brainy",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "A vector database using HNSW indexing with Origin Private File System storage",
|
"description": "A vector database using HNSW indexing with Origin Private File System storage",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|
@ -30,6 +30,10 @@
|
||||||
],
|
],
|
||||||
"author": "David Snelling (david@soulcraft.com)",
|
"author": "David Snelling (david@soulcraft.com)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"private": true,
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "restricted"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.3",
|
"@types/jest": "^29.5.3",
|
||||||
"@types/node": "^20.4.5",
|
"@types/node": "^20.4.5",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue