beanbagdb 0.5.46 → 0.5.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,38 @@
1
+ name: Generate and Deploy JSDoc
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - release
7
+ permissions:
8
+ contents: read
9
+ pages: write
10
+ id-token: write
11
+ jobs:
12
+ # Single deploy job since we're just deploying
13
+ deploy:
14
+ environment:
15
+ name: github-pages
16
+ url: ${{ steps.deployment.outputs.page_url }}
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@v4
21
+ - name: Set up Node.js
22
+ uses: actions/setup-node@v3
23
+ with:
24
+ node-version: '18'
25
+ - name: Install dependencies
26
+ run: npm install
27
+ - name: Generate JSDoc
28
+ run: npx jsdoc -c jsdoc.json
29
+ - name: Setup Pages
30
+ uses: actions/configure-pages@v5
31
+ - name: Upload artifact
32
+ uses: actions/upload-pages-artifact@v3
33
+ with:
34
+ # Upload entire repository
35
+ path: './docs-static'
36
+ - name: Deploy to GitHub Pages
37
+ id: deployment
38
+ uses: actions/deploy-pages@v4
@@ -4,7 +4,7 @@ name: Release npm Package
4
4
  on:
5
5
  push:
6
6
  branches:
7
- - main
7
+ - release
8
8
 
9
9
  jobs:
10
10
  build:
@@ -30,8 +30,8 @@ jobs:
30
30
  run: npm install
31
31
 
32
32
  # Step 4: Run tests
33
- # - name: Run tests
34
- # run: npm test
33
+ - name: Run tests
34
+ run: npm test
35
35
 
36
36
  # Step 5: Publish to npm if tests pass
37
37
  - name: Publish to npm
@@ -0,0 +1,36 @@
1
+ name: Test code on master
2
+
3
+ # Trigger the workflow on push to the "main" branch
4
+ on:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: read
14
+ id-token: write
15
+ steps:
16
+ # Step 1: Check out the code from the repository
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+
20
+ # Step 2: Set up Node.js environment
21
+ - name: Setup Node.js
22
+ uses: actions/setup-node@v4
23
+ with:
24
+ node-version: '20.17.0'
25
+ cache: 'npm'
26
+ registry-url: 'https://registry.npmjs.org'
27
+
28
+ # Step 3: Install dependencies
29
+ - name: Install dependencies
30
+ run: npm install
31
+
32
+ # Step 4: Run tests
33
+ - name: Run tests
34
+ run: npm test
35
+
36
+
package/index.md ADDED
@@ -0,0 +1 @@
1
+ This is where i write the documentation
package/jsdoc.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "source": {
3
+ "include": ["src"],
4
+ "includePattern": ".+\\.js(doc|x)?$",
5
+ "excludePattern": "(^|\\/|\\\\)_"
6
+ },
7
+ "opts": {
8
+ "destination": "./docs-static",
9
+ "recurse": true,
10
+ "readme":"./index.md",
11
+ "tutorials": "./docs"
12
+ },
13
+ "plugins": [
14
+ "plugins/markdown"
15
+ ],
16
+ "templates": {
17
+ "default": {
18
+ "outputSourceFiles": false
19
+ }
20
+ }
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beanbagdb",
3
- "version": "0.5.46",
3
+ "version": "0.5.51",
4
4
  "description": "A JS library to introduce a schema layer to a No-SQL local database",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -29,9 +29,13 @@
29
29
  "ajv": "^8.17.1",
30
30
  "chai": "^5.1.1",
31
31
  "dotenv": "^16.4.5",
32
+ "jsdoc": "^4.0.3",
32
33
  "mocha": "^10.7.3",
33
34
  "nano": "^10.1.4",
34
35
  "pouchdb": "^9.0.0",
35
36
  "pouchdb-find": "^9.0.0"
37
+ },
38
+ "mocha": {
39
+ "spec": "test/**/*.test.js"
36
40
  }
37
41
  }