@promptbook/node 0.86.6 → 0.86.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/node",
3
- "version": "0.86.6",
3
+ "version": "0.86.8",
4
4
  "description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -47,7 +47,7 @@
47
47
  "module": "./esm/index.es.js",
48
48
  "typings": "./esm/typings/src/_packages/node.index.d.ts",
49
49
  "peerDependencies": {
50
- "@promptbook/core": "0.86.6"
50
+ "@promptbook/core": "0.86.8"
51
51
  },
52
52
  "dependencies": {
53
53
  "colors": "1.4.0",
package/umd/index.umd.js CHANGED
@@ -45,7 +45,7 @@
45
45
  * @generated
46
46
  * @see https://github.com/webgptorg/promptbook
47
47
  */
48
- var PROMPTBOOK_ENGINE_VERSION = '0.86.6';
48
+ var PROMPTBOOK_ENGINE_VERSION = '0.86.8';
49
49
  /**
50
50
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
51
51
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -11517,9 +11517,11 @@
11517
11517
  FileCacheStorage.prototype.getFilenameForKey = function (key) {
11518
11518
  // TODO: [👬] DRY
11519
11519
  var name = titleToName(key);
11520
+ var nameStart = name.split('-', 2)[0] || 'unnamed';
11520
11521
  var hash = sha256__default["default"](hexEncoder__default["default"].parse(name)).toString( /* hex */);
11521
11522
  // <- TODO: [🥬] Encapsulate sha256 to some private utility function
11522
- return path.join.apply(void 0, __spreadArray(__spreadArray([this.options.rootFolderPath], __read(nameToSubfolderPath(hash /* <- TODO: [🎎] Maybe add some SHA256 prefix */)), false), ["".concat(name.substring(0, MAX_FILENAME_LENGTH), ".json")], false));
11523
+ return path.join.apply(void 0, __spreadArray(__spreadArray([this.options.rootFolderPath,
11524
+ nameStart], __read(nameToSubfolderPath(hash /* <- TODO: [🎎] Maybe add some SHA256 prefix */)), false), ["".concat(name.substring(0, MAX_FILENAME_LENGTH), ".json")], false));
11523
11525
  };
11524
11526
  /**
11525
11527
  * @@@ Returns the current value associated with the given key, or null if the given key does not exist in the list associated with the object.