@cocreate/mongodb 1.22.2 → 1.23.0
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.
- package/.github/workflows/automated.yml +25 -38
- package/CHANGELOG.md +23 -0
- package/package.json +3 -11
- package/release.config.js +12 -4
- package/src/index.js +15 -11
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
name: Automated Workflow
|
|
2
|
+
|
|
2
3
|
on:
|
|
3
4
|
push:
|
|
4
5
|
branches:
|
|
5
6
|
- master
|
|
7
|
+
|
|
6
8
|
jobs:
|
|
7
9
|
about:
|
|
8
10
|
runs-on: ubuntu-latest
|
|
@@ -18,52 +20,37 @@ jobs:
|
|
|
18
20
|
with:
|
|
19
21
|
direction: overwrite-github
|
|
20
22
|
githubToken: "${{ secrets.GITHUB }}"
|
|
23
|
+
|
|
21
24
|
release:
|
|
22
25
|
runs-on: ubuntu-latest
|
|
23
26
|
steps:
|
|
24
27
|
- name: Checkout
|
|
25
|
-
uses: actions/checkout@
|
|
26
|
-
- name: Setup Node.js
|
|
27
|
-
uses: actions/setup-node@v3
|
|
28
|
+
uses: actions/checkout@v4
|
|
28
29
|
with:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
fetch-depth: 0 # Required so semantic-release can trace git tags/history
|
|
31
|
+
|
|
32
|
+
- name: Setup Node.js
|
|
33
|
+
uses: actions/setup-node@v4
|
|
33
34
|
with:
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
node-version: 22
|
|
36
|
+
|
|
37
|
+
- name: Install Semantic Release & Plugins
|
|
38
|
+
# Installs semantic-release and its plugins on the runner
|
|
39
|
+
run: |
|
|
40
|
+
npm install -g semantic-release \
|
|
41
|
+
@semantic-release/changelog \
|
|
42
|
+
@semantic-release/npm \
|
|
43
|
+
@semantic-release/github \
|
|
36
44
|
@semantic-release/git
|
|
37
|
-
|
|
45
|
+
|
|
46
|
+
- name: Run Semantic Release (Native)
|
|
47
|
+
id: semantic
|
|
48
|
+
# This will automatically pick up your export default config file in the repository root
|
|
49
|
+
run: npx semantic-release
|
|
38
50
|
env:
|
|
39
|
-
GITHUB_TOKEN: "${{ secrets.
|
|
51
|
+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
40
52
|
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
|
|
53
|
+
|
|
41
54
|
outputs:
|
|
42
55
|
new_release_published: "${{ steps.semantic.outputs.new_release_published }}"
|
|
43
|
-
new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
|
|
44
|
-
upload:
|
|
45
|
-
runs-on: ubuntu-latest
|
|
46
|
-
needs: release
|
|
47
|
-
if: needs.release.outputs.new_release_published == 'true'
|
|
48
|
-
env:
|
|
49
|
-
VERSION: "${{ needs.release.outputs.new_release_version }}"
|
|
50
|
-
steps:
|
|
51
|
-
- name: Checkout
|
|
52
|
-
uses: actions/checkout@v3
|
|
53
|
-
- name: Setup Node.js
|
|
54
|
-
uses: actions/setup-node@v3
|
|
55
|
-
with:
|
|
56
|
-
node-version: 16
|
|
57
|
-
- name: Set npm registry auth
|
|
58
|
-
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
|
|
59
|
-
- name: Install dependencies
|
|
60
|
-
run: yarn install
|
|
61
|
-
|
|
62
|
-
- name: Set Environment Variables
|
|
63
|
-
run: |
|
|
64
|
-
echo "organization_id=${{ secrets.COCREATE_ORGANIZATION_ID }}" >> $GITHUB_ENV
|
|
65
|
-
echo "key=${{ secrets.COCREATE_KEY }}" >> $GITHUB_ENV
|
|
66
|
-
echo "host=${{ secrets.COCREATE_HOST }}" >> $GITHUB_ENV
|
|
67
|
-
- name: CoCreate Upload
|
|
68
|
-
run: coc upload
|
|
69
|
-
|
|
56
|
+
new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
# [1.23.0](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.22.4...v1.23.0) (2026-07-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* update automated workflow and release configuration for improved semantic release handling ([ebc23d7](https://github.com/CoCreate-app/CoCreate-mongodb/commit/ebc23d76040716584fab8880487259c37ad909cf))
|
|
7
|
+
|
|
8
|
+
## [1.22.4](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.22.3...v1.22.4) (2026-07-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* update module export to ES6 syntax in release.config.js ([2a751b5](https://github.com/CoCreate-app/CoCreate-mongodb/commit/2a751b5179445e278efdc1e836809acb4eefb6e0))
|
|
14
|
+
|
|
15
|
+
## [1.22.3](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.22.2...v1.22.3) (2026-07-11)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* removed post install ([8358dbc](https://github.com/CoCreate-app/CoCreate-mongodb/commit/8358dbc2f660b954288dbb54def5c0ea19acef8f))
|
|
21
|
+
* semantic version handling. Reorganize .gitignore for improved clarity and structure ([913b45a](https://github.com/CoCreate-app/CoCreate-mongodb/commit/913b45a0614c4f436ad31d66cee7fd0b510fb9ce))
|
|
22
|
+
* update variable naming for clarity in object method ([b7915ff](https://github.com/CoCreate-app/CoCreate-mongodb/commit/b7915ff8a1e06d8a73205caee74ab6acb5754524))
|
|
23
|
+
|
|
1
24
|
## [1.22.2](https://github.com/CoCreate-app/CoCreate-mongodb/compare/v1.22.1...v1.22.2) (2025-05-01)
|
|
2
25
|
|
|
3
26
|
|
package/package.json
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/mongodb",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.0",
|
|
4
4
|
"description": "A simple mongodb component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mongodb",
|
|
7
|
-
"cocreate",
|
|
8
|
-
"low-code-framework",
|
|
9
|
-
"no-code-framework",
|
|
10
|
-
"cocreatejs",
|
|
11
|
-
"cocreatejs-component",
|
|
12
|
-
"cocreate-framework",
|
|
13
|
-
"no-code",
|
|
14
7
|
"low-code",
|
|
15
|
-
"collaborative-framework",
|
|
16
8
|
"realtime",
|
|
17
9
|
"realtime-framework",
|
|
18
10
|
"collaboration",
|
|
@@ -26,8 +18,7 @@
|
|
|
26
18
|
"scripts": {
|
|
27
19
|
"start": "npx webpack --config webpack.config.js",
|
|
28
20
|
"build": "npx webpack --mode=production --config webpack.config.js",
|
|
29
|
-
"dev": "npx webpack --config webpack.config.js --watch"
|
|
30
|
-
"postinstall": "node -e \"const { execSync } = require('child_process'); try { execSync('coc --version', { stdio: 'ignore' }); } catch (error) { try { execSync('npm install -g @cocreate/cli', { stdio: 'inherit' }); console.log('Installed \"@cocreate/cli\" globally.'); } catch (error) { console.error('Failed to install \"@cocreate/cli\" globally:', error); } }\""
|
|
21
|
+
"dev": "npx webpack --config webpack.config.js --watch"
|
|
31
22
|
},
|
|
32
23
|
"repository": {
|
|
33
24
|
"type": "git",
|
|
@@ -43,6 +34,7 @@
|
|
|
43
34
|
"type": "GitHub Sponsors ❤",
|
|
44
35
|
"url": "https://github.com/sponsors/CoCreate-app"
|
|
45
36
|
},
|
|
37
|
+
"type": "module",
|
|
46
38
|
"main": "./src/index.js",
|
|
47
39
|
"dependencies": {
|
|
48
40
|
"@cocreate/utils": "^1.39.0",
|
package/release.config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export default {
|
|
2
2
|
dryRun: false,
|
|
3
3
|
branches: ["master"],
|
|
4
4
|
plugins: [
|
|
@@ -10,12 +10,20 @@ module.exports = {
|
|
|
10
10
|
changelogFile: "CHANGELOG.md",
|
|
11
11
|
},
|
|
12
12
|
],
|
|
13
|
-
"@semantic-release/npm",
|
|
14
|
-
"@semantic-release/github",
|
|
13
|
+
"@semantic-release/npm",
|
|
15
14
|
[
|
|
16
|
-
"@semantic-release/
|
|
15
|
+
"@semantic-release/github",
|
|
17
16
|
{
|
|
17
|
+
successComment: false,
|
|
18
|
+
failTitle: false,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"@semantic-release/git",
|
|
23
|
+
{
|
|
24
|
+
// Only stage and commit the changelog and package.json
|
|
18
25
|
assets: ["CHANGELOG.md", "package.json"],
|
|
26
|
+
message: "chore(release): ${nextRelease.version} [skip ci]",
|
|
19
27
|
},
|
|
20
28
|
],
|
|
21
29
|
],
|
package/src/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { MongoClient, ObjectId } from "mongodb";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
dotNotationToObject,
|
|
5
|
+
queryData,
|
|
6
|
+
searchData,
|
|
7
|
+
sortData,
|
|
8
|
+
isValidDate
|
|
9
|
+
} from "@cocreate/utils";
|
|
10
|
+
|
|
9
11
|
const clients = new Map();
|
|
10
12
|
const organizations = {};
|
|
11
13
|
|
|
@@ -371,19 +373,20 @@ function object(method, data) {
|
|
|
371
373
|
|
|
372
374
|
let projections = {},
|
|
373
375
|
projection = {},
|
|
374
|
-
|
|
376
|
+
globalUpdate = {},
|
|
375
377
|
options = {};
|
|
376
378
|
|
|
377
379
|
if (data.$filter && data.$filter.key)
|
|
378
380
|
projection = data.$filter.key;
|
|
379
381
|
|
|
380
382
|
if (method === "update")
|
|
381
|
-
createUpdate(
|
|
383
|
+
createUpdate(globalUpdate, options, data, true);
|
|
382
384
|
|
|
383
385
|
for (let i = 0; i < data[type].length; i++) {
|
|
384
386
|
let $storage = data[type][i].$storage || [];
|
|
385
387
|
let $database = data[type][i].$database || [];
|
|
386
388
|
let $array = data[type][i].$array || [];
|
|
389
|
+
let update = {...globalUpdate};
|
|
387
390
|
|
|
388
391
|
if (!Array.isArray($storage))
|
|
389
392
|
$storage = [data[type][i].$storage];
|
|
@@ -558,6 +561,7 @@ function object(method, data) {
|
|
|
558
561
|
);
|
|
559
562
|
delete update["$unset"];
|
|
560
563
|
}
|
|
564
|
+
|
|
561
565
|
result = await arrayObj.updateOne(
|
|
562
566
|
query,
|
|
563
567
|
update,
|
|
@@ -1198,4 +1202,4 @@ function errorHandler(data, error, database, array) {
|
|
|
1198
1202
|
}
|
|
1199
1203
|
}
|
|
1200
1204
|
|
|
1201
|
-
|
|
1205
|
+
export default { send };
|