@xuda.io/xuda-dbs-plugin-xuda 1.0.153 → 1.0.154

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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/server.js +6 -2
  3. package/studio.mjs +5 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-dbs-plugin-xuda",
3
- "version": "1.0.153",
3
+ "version": "1.0.154",
4
4
  "description": "Xuda Database Socket for Xuda's proprietary structure powered by CouchDB",
5
5
  "scripts": {
6
6
  "pub": "npm version patch --force && npm publish --access public"
package/server.js CHANGED
@@ -957,13 +957,17 @@ exports.create = async (params, setup_doc, resolve, reject) => {
957
957
  return doc;
958
958
  };
959
959
 
960
+ const get_uuid = function () {
961
+ return "dbs_" + crypto.randomUUID();
962
+ };
963
+
960
964
  const batch = async function () {
961
965
  var docs = [];
962
966
  try {
963
967
  for await (var val of e.table_data) {
964
968
  var doc = {
969
+ _id: get_uuid(),
965
970
  docType: "database",
966
-
967
971
  user: e.uid,
968
972
  stat: 3,
969
973
  udfData: {
@@ -997,8 +1001,8 @@ exports.create = async (params, setup_doc, resolve, reject) => {
997
1001
  };
998
1002
  const single = async function () {
999
1003
  var doc = {
1004
+ _id: get_uuid(),
1000
1005
  docType: "database",
1001
-
1002
1006
  user: e.uid,
1003
1007
  stat: 3,
1004
1008
  udfData: {
package/studio.mjs CHANGED
@@ -1004,13 +1004,15 @@ export const create = async (params, resolve, reject) => {
1004
1004
 
1005
1005
  return doc;
1006
1006
  };
1007
-
1007
+ const get_uuid = function () {
1008
+ return "dbs_" + crypto.randomUUID();
1009
+ };
1008
1010
  const batch = async function () {
1009
1011
  var docs = [];
1010
1012
  try {
1011
1013
  for await (var val of e.table_data) {
1012
1014
  var doc = {
1013
- _id: crypto.randomUUID(),
1015
+ _id: get_uuid(),
1014
1016
  docType: "database",
1015
1017
  user: e.uid,
1016
1018
  stat: 3,
@@ -1045,7 +1047,7 @@ export const create = async (params, resolve, reject) => {
1045
1047
  };
1046
1048
  const single = async function () {
1047
1049
  var doc = {
1048
- _id: crypto.randomUUID(),
1050
+ _id: get_uuid(),
1049
1051
  docType: "database",
1050
1052
  user: e.uid,
1051
1053
  stat: 3,