@nocobase/plugin-flow-engine 2.0.0-alpha.42 → 2.0.0-alpha.44

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.
@@ -8,14 +8,14 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.0.0-alpha.42",
11
+ "@nocobase/client": "2.0.0-alpha.44",
12
12
  "lodash": "4.17.21",
13
- "@nocobase/database": "2.0.0-alpha.42",
14
- "@nocobase/data-source-manager": "2.0.0-alpha.42",
15
- "@nocobase/resourcer": "2.0.0-alpha.42",
16
- "@nocobase/server": "2.0.0-alpha.42",
17
- "@nocobase/utils": "2.0.0-alpha.42",
18
- "@nocobase/cache": "2.0.0-alpha.42",
19
- "@nocobase/plugin-localization": "2.0.0-alpha.42",
20
- "@nocobase/actions": "2.0.0-alpha.42"
13
+ "@nocobase/database": "2.0.0-alpha.44",
14
+ "@nocobase/data-source-manager": "2.0.0-alpha.44",
15
+ "@nocobase/resourcer": "2.0.0-alpha.44",
16
+ "@nocobase/server": "2.0.0-alpha.44",
17
+ "@nocobase/utils": "2.0.0-alpha.44",
18
+ "@nocobase/cache": "2.0.0-alpha.44",
19
+ "@nocobase/plugin-localization": "2.0.0-alpha.44",
20
+ "@nocobase/actions": "2.0.0-alpha.44"
21
21
  };
@@ -1 +1 @@
1
- {"name":"ses","version":"1.14.0","description":"Hardened JavaScript for Fearless Cooperation","keywords":["lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","ocaps","secure execution","third-party code","prototype pollution","supply-chain attack","plugin"],"author":"Agoric","license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme","repository":{"type":"git","url":"git+https://github.com/endojs/endo.git","directory":"packages/ses"},"bugs":{"url":"https://github.com/endojs/endo/issues"},"type":"module","main":"./dist/ses.cjs","module":"./index.js","unpkg":"./dist/ses.umd.js","types":"./types.d.ts","exports":{".":{"import":{"types":"./types.d.ts","xs":"./src-xs/index.js","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./lockdown":{"import":{"types":"./types.d.ts","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./hermes":{"require":{"types":"./dist/types.d.cts","default":"./dist/ses-hermes.cjs"}},"./tools.js":"./tools.js","./assert-shim.js":"./assert-shim.js","./lockdown-shim.js":{"xs":"./src-xs/lockdown-shim.js","default":"./lockdown-shim.js"},"./compartment-shim.js":{"xs":"./src-xs/compartment-shim.js","default":"./compartment-shim.js"},"./console-shim.js":"./console-shim.js","./package.json":"./package.json"},"scripts":{"build:vanilla":"node scripts/bundle.js","build:hermes":"node scripts/bundle.js hermes","build":"yarn build:vanilla && yarn build:hermes","clean":"rm -rf dist","cover":"c8 ava","demo":"python3 -m http.server","lint":"yarn lint:types && yarn lint:eslint","lint-fix":"eslint --fix .","lint:eslint":"eslint .","lint:types":"tsc","prepare":"npm run clean && npm run build","qt":"ava","test":"tsd && ava","test:hermes":"./scripts/hermes-test.sh","test:xs":"xst dist/ses.umd.js test/_lockdown-safe.js && node scripts/generate-test-xs.js && xst tmp/test-xs.js && rm -rf tmp","postpack":"git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\""},"dependencies":{"@endo/cache-map":"^1.1.0","@endo/env-options":"^1.1.11","@endo/immutable-arraybuffer":"^1.1.2"},"devDependencies":{"@babel/generator":"^7.26.3","@babel/parser":"~7.26.2","@babel/traverse":"~7.25.9","@babel/types":"~7.26.0","@endo/compartment-mapper":"^1.6.3","@endo/module-source":"^1.3.3","@endo/test262-runner":"^0.1.48","@types/babel__traverse":"^7.20.5","ava":"^6.1.3","babel-eslint":"^10.1.0","c8":"^7.14.0","core-js":"^3.31.0","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.31.0","hermes-engine-cli":"^0.12.0","prettier":"^3.5.3","terser":"^5.16.6","tsd":"^0.31.2","typescript":"~5.8.3"},"files":["./*.d.ts","./*.js","./*.map","LICENSE*","SECURITY*","dist","lib","src","tools"],"publishConfig":{"access":"public"},"eslintConfig":{"extends":["plugin:@endo/ses"]},"ava":{"files":["test/**/*.test.*"],"timeout":"2m"},"typeCoverage":{"atLeast":81.17},"gitHead":"9815aea9541f241389d2135c6097a7442bdffa17","_lastModified":"2025-11-19T05:47:38.236Z"}
1
+ {"name":"ses","version":"1.14.0","description":"Hardened JavaScript for Fearless Cooperation","keywords":["lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","ocaps","secure execution","third-party code","prototype pollution","supply-chain attack","plugin"],"author":"Agoric","license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme","repository":{"type":"git","url":"git+https://github.com/endojs/endo.git","directory":"packages/ses"},"bugs":{"url":"https://github.com/endojs/endo/issues"},"type":"module","main":"./dist/ses.cjs","module":"./index.js","unpkg":"./dist/ses.umd.js","types":"./types.d.ts","exports":{".":{"import":{"types":"./types.d.ts","xs":"./src-xs/index.js","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./lockdown":{"import":{"types":"./types.d.ts","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./hermes":{"require":{"types":"./dist/types.d.cts","default":"./dist/ses-hermes.cjs"}},"./tools.js":"./tools.js","./assert-shim.js":"./assert-shim.js","./lockdown-shim.js":{"xs":"./src-xs/lockdown-shim.js","default":"./lockdown-shim.js"},"./compartment-shim.js":{"xs":"./src-xs/compartment-shim.js","default":"./compartment-shim.js"},"./console-shim.js":"./console-shim.js","./package.json":"./package.json"},"scripts":{"build:vanilla":"node scripts/bundle.js","build:hermes":"node scripts/bundle.js hermes","build":"yarn build:vanilla && yarn build:hermes","clean":"rm -rf dist","cover":"c8 ava","demo":"python3 -m http.server","lint":"yarn lint:types && yarn lint:eslint","lint-fix":"eslint --fix .","lint:eslint":"eslint .","lint:types":"tsc","prepare":"npm run clean && npm run build","qt":"ava","test":"tsd && ava","test:hermes":"./scripts/hermes-test.sh","test:xs":"xst dist/ses.umd.js test/_lockdown-safe.js && node scripts/generate-test-xs.js && xst tmp/test-xs.js && rm -rf tmp","postpack":"git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\""},"dependencies":{"@endo/cache-map":"^1.1.0","@endo/env-options":"^1.1.11","@endo/immutable-arraybuffer":"^1.1.2"},"devDependencies":{"@babel/generator":"^7.26.3","@babel/parser":"~7.26.2","@babel/traverse":"~7.25.9","@babel/types":"~7.26.0","@endo/compartment-mapper":"^1.6.3","@endo/module-source":"^1.3.3","@endo/test262-runner":"^0.1.48","@types/babel__traverse":"^7.20.5","ava":"^6.1.3","babel-eslint":"^10.1.0","c8":"^7.14.0","core-js":"^3.31.0","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.31.0","hermes-engine-cli":"^0.12.0","prettier":"^3.5.3","terser":"^5.16.6","tsd":"^0.31.2","typescript":"~5.8.3"},"files":["./*.d.ts","./*.js","./*.map","LICENSE*","SECURITY*","dist","lib","src","tools"],"publishConfig":{"access":"public"},"eslintConfig":{"extends":["plugin:@endo/ses"]},"ava":{"files":["test/**/*.test.*"],"timeout":"2m"},"typeCoverage":{"atLeast":81.17},"gitHead":"9815aea9541f241389d2135c6097a7442bdffa17","_lastModified":"2025-11-21T01:36:13.962Z"}
@@ -151,12 +151,14 @@ async function fetchRecordWithRequestCache(koaCtx, dataSourceKey, collection, fi
151
151
  const pkAttr = modelInfo == null ? void 0 : modelInfo.primaryKeyAttribute;
152
152
  const pkIsValid = pkAttr && (modelInfo == null ? void 0 : modelInfo.rawAttributes) && Object.prototype.hasOwnProperty.call(modelInfo.rawAttributes, pkAttr);
153
153
  const fieldsWithPk = Array.isArray(fields) && fields.length > 0 && pkIsValid ? Array.from(/* @__PURE__ */ new Set([...fields, pkAttr])) : fields;
154
+ const cacheKeyFields = preferFullRecord && pkIsValid ? void 0 : Array.isArray(fieldsWithPk) ? [...fieldsWithPk].sort() : void 0;
155
+ const cacheKeyAppends = preferFullRecord ? void 0 : Array.isArray(appends) ? [...appends].sort() : void 0;
154
156
  const keyObj = {
155
157
  ds: dataSourceKey || "main",
156
158
  c: collection,
157
159
  tk: filterByTk,
158
- f: Array.isArray(fieldsWithPk) ? [...fieldsWithPk].sort() : void 0,
159
- a: Array.isArray(appends) ? [...appends].sort() : void 0,
160
+ f: cacheKeyFields,
161
+ a: cacheKeyAppends,
160
162
  full: preferFullRecord ? true : void 0
161
163
  };
162
164
  const key = JSON.stringify(keyObj);
@@ -164,8 +166,8 @@ async function fetchRecordWithRequestCache(koaCtx, dataSourceKey, collection, fi
164
166
  if (cache.has(key)) {
165
167
  return cache.get(key);
166
168
  }
167
- const needFields = Array.isArray(fieldsWithPk) ? [...new Set(fieldsWithPk)] : void 0;
168
- const needAppends = Array.isArray(appends) ? new Set(appends) : void 0;
169
+ const needFields = !preferFullRecord && Array.isArray(fieldsWithPk) ? [...new Set(fieldsWithPk)] : void 0;
170
+ const needAppends = !preferFullRecord && Array.isArray(appends) ? new Set(appends) : void 0;
169
171
  for (const [cacheKey, cacheVal] of cache.entries()) {
170
172
  const parsed = JSON.parse(cacheKey);
171
173
  if (!parsed || parsed.ds !== keyObj.ds || parsed.c !== keyObj.c || parsed.tk !== keyObj.tk) continue;
@@ -187,22 +189,16 @@ async function fetchRecordWithRequestCache(koaCtx, dataSourceKey, collection, fi
187
189
  }
188
190
  }
189
191
  }
190
- const rec = await repo.findOne({
191
- filterByTk,
192
- fields: fieldsWithPk,
193
- appends
194
- });
195
- let json = rec ? rec.toJSON() : void 0;
196
- if (preferFullRecord && json && typeof json === "object" && pkIsValid) {
197
- const keys = Object.keys(json);
198
- const pkOnly = keys.length === 1 && keys[0] === pkAttr;
199
- const rawAttrs = modelInfo == null ? void 0 : modelInfo.rawAttributes;
200
- const hasMoreAttrs = rawAttrs && Object.keys(rawAttrs).some((k) => k !== pkAttr);
201
- if (pkOnly && hasMoreAttrs) {
202
- const rec2 = await repo.findOne({ filterByTk });
203
- json = rec2 ? rec2.toJSON() : json;
192
+ const rec = await repo.findOne(
193
+ preferFullRecord ? {
194
+ filterByTk
195
+ } : {
196
+ filterByTk,
197
+ fields: fieldsWithPk,
198
+ appends
204
199
  }
205
- }
200
+ );
201
+ const json = rec ? rec.toJSON() : void 0;
206
202
  if (cache) cache.set(key, json);
207
203
  return json;
208
204
  } catch (e) {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "前端流引擎",
5
5
  "description": "",
6
6
  "description.zh-CN": "",
7
- "version": "2.0.0-alpha.42",
7
+ "version": "2.0.0-alpha.44",
8
8
  "main": "./dist/server/index.js",
9
9
  "license": "AGPL-3.0",
10
10
  "devDependencies": {
@@ -24,5 +24,5 @@
24
24
  "@nocobase/test": "2.x",
25
25
  "@nocobase/utils": "2.x"
26
26
  },
27
- "gitHead": "9e96dd78d0c1445c8da76863e30f046be5b48d90"
27
+ "gitHead": "075bd484c270740fe9b02f1989818da91139b6b9"
28
28
  }