Updates
This commit is contained in:
parent
a1d14fa2b2
commit
e67d69abc0
@ -69,7 +69,7 @@ npm install @moduletrace/nsqlite
|
|||||||
|
|
||||||
### 1. Create the config file
|
### 1. Create the config file
|
||||||
|
|
||||||
Create `nsqlite.config.ts` at your project root:
|
Create `nsqlite.config.js` at your project root:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import type { NSQLiteConfig } from "@moduletrace/nsqlite";
|
import type { NSQLiteConfig } from "@moduletrace/nsqlite";
|
||||||
@ -147,7 +147,7 @@ await NSQLite.delete({ table: "users", targetId: 1 });
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
The config file must be named `nsqlite.config.ts` and placed at the root of your project.
|
The config file must be named `nsqlite.config.js` and placed at the root of your project.
|
||||||
|
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description |
|
||||||
| --------------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
|
| --------------------- | -------- | -------- | ------------------------------------------------------------------------------------------ |
|
||||||
@ -784,14 +784,14 @@ node-sqlite/
|
|||||||
│ └── trim-backups.ts # Prune oldest backups over max_backups
|
│ └── trim-backups.ts # Prune oldest backups over max_backups
|
||||||
└── test/
|
└── test/
|
||||||
├── test-01/ # Basic example project
|
├── test-01/ # Basic example project
|
||||||
│ ├── nsqlite.config.ts
|
│ ├── nsqlite.config.js
|
||||||
│ ├── db/
|
│ ├── db/
|
||||||
│ │ ├── nsqlite-schema.ts
|
│ │ ├── nsqlite-schema.ts
|
||||||
│ │ └── types/nsqlite.ts # Generated types
|
│ │ └── types/nsqlite.ts # Generated types
|
||||||
│ └── src/
|
│ └── src/
|
||||||
│ └── sql.ts
|
│ └── sql.ts
|
||||||
└── test-02/ # Full CRUD example project
|
└── test-02/ # Full CRUD example project
|
||||||
├── nsqlite.config.ts
|
├── nsqlite.config.js
|
||||||
├── index.ts
|
├── index.ts
|
||||||
└── src/crud/
|
└── src/crud/
|
||||||
├── insert.ts
|
├── insert.ts
|
||||||
|
|||||||
2
dist/data/app-data.d.ts
vendored
2
dist/data/app-data.d.ts
vendored
@ -1,5 +1,5 @@
|
|||||||
export declare const AppData: {
|
export declare const AppData: {
|
||||||
readonly ConfigFileName: "nsqlite.config.ts";
|
readonly ConfigFileName: "nsqlite.config.js";
|
||||||
readonly MaxBackups: 10;
|
readonly MaxBackups: 10;
|
||||||
readonly DefaultBackupDirName: ".backups";
|
readonly DefaultBackupDirName: ".backups";
|
||||||
};
|
};
|
||||||
|
|||||||
2
dist/data/app-data.js
vendored
2
dist/data/app-data.js
vendored
@ -2,7 +2,7 @@
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.AppData = void 0;
|
exports.AppData = void 0;
|
||||||
exports.AppData = {
|
exports.AppData = {
|
||||||
ConfigFileName: "nsqlite.config.ts",
|
ConfigFileName: "nsqlite.config.js",
|
||||||
MaxBackups: 10,
|
MaxBackups: 10,
|
||||||
DefaultBackupDirName: ".backups",
|
DefaultBackupDirName: ".backups",
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@moduletrace/nsqlite",
|
"name": "@moduletrace/nsqlite",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"description": "SQLite manager for Node JS",
|
"description": "SQLite manager for Node JS",
|
||||||
"author": "Benjamin Toby",
|
"author": "Benjamin Toby",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
export const AppData = {
|
export const AppData = {
|
||||||
ConfigFileName: "nsqlite.config.ts",
|
ConfigFileName: "nsqlite.config.js",
|
||||||
MaxBackups: 10,
|
MaxBackups: 10,
|
||||||
DefaultBackupDirName: ".backups",
|
DefaultBackupDirName: ".backups",
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user