@promptbook/markdown-utils 0.83.0 → 0.84.0-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/README.md CHANGED
@@ -23,6 +23,10 @@
23
23
 
24
24
 
25
25
 
26
+ <blockquote style="color: #ff8811">
27
+ <b>⚠ Warning:</b> This is a pre-release version of the library. It is not yet ready for production use. Please look at <a href="https://www.npmjs.com/package/@promptbook/core?activeTab=versions">latest stable release</a>.
28
+ </blockquote>
29
+
26
30
  ## 📦 Package `@promptbook/markdown-utils`
27
31
 
28
32
  - Promptbooks are [divided into several](#-packages) packages, all are published from [single monorepo](https://github.com/webgptorg/promptbook).
package/esm/index.es.js CHANGED
@@ -22,7 +22,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
22
22
  * @generated
23
23
  * @see https://github.com/webgptorg/promptbook
24
24
  */
25
- var PROMPTBOOK_ENGINE_VERSION = '0.82.0';
25
+ var PROMPTBOOK_ENGINE_VERSION = '0.83.0';
26
26
  /**
27
27
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
28
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -36,8 +36,11 @@ import type { ActionCommand } from '../commands/X_ACTION/ActionCommand';
36
36
  import { actionCommandParser } from '../commands/X_ACTION/actionCommandParser';
37
37
  import type { InstrumentCommand } from '../commands/X_INSTRUMENT/InstrumentCommand';
38
38
  import { instrumentCommandParser } from '../commands/X_INSTRUMENT/instrumentCommandParser';
39
+ import { addPipelineCommand } from '../utils/editable/edit-pipeline-string/addPipelineCommand';
40
+ import { deflatePipeline } from '../utils/editable/edit-pipeline-string/deflatePipeline';
41
+ import { removePipelineCommand } from '../utils/editable/edit-pipeline-string/removePipelineCommand';
39
42
  import type { PipelineEditableSerialized } from '../utils/editable/types/PipelineEditableSerialized';
40
- import { removePipelineCommand } from '../utils/editable/utils/removePipelineCommand';
43
+ import { isFlatPipeline } from '../utils/editable/utils/isFlatPipeline';
41
44
  import { renamePipelineParameter } from '../utils/editable/utils/renamePipelineParameter';
42
45
  import { stringifyPipelineJson } from '../utils/editable/utils/stringifyPipelineJson';
43
46
  export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
@@ -78,7 +81,10 @@ export type { ActionCommand };
78
81
  export { actionCommandParser };
79
82
  export type { InstrumentCommand };
80
83
  export { instrumentCommandParser };
81
- export type { PipelineEditableSerialized };
84
+ export { addPipelineCommand };
85
+ export { deflatePipeline };
82
86
  export { removePipelineCommand };
87
+ export type { PipelineEditableSerialized };
88
+ export { isFlatPipeline };
83
89
  export { renamePipelineParameter };
84
90
  export { stringifyPipelineJson };
@@ -0,0 +1,17 @@
1
+ import type { PipelineString } from '../../../pipeline/PipelineString';
2
+ import type { string_markdown_text } from '../../../types/typeAliases';
3
+ type AddPipelineCommandOptions = {
4
+ commandString: string_markdown_text;
5
+ pipelineString: PipelineString;
6
+ };
7
+ /**
8
+ * @@@
9
+ *
10
+ * @public exported from `@promptbook/editable`
11
+ */
12
+ export declare function addPipelineCommand(options: AddPipelineCommandOptions): PipelineString;
13
+ export {};
14
+ /**
15
+ * TODO: [🧠] What is the better solution - `- xxx`, - `- xxx` or preserve (see also next TODO)
16
+ * TODO: When existing commands 1) as 2) number 3) list, add 4) new command as next number
17
+ */
@@ -0,0 +1,10 @@
1
+ import type { PipelineString } from '../../../pipeline/PipelineString';
2
+ /**
3
+ * @@@
4
+ *
5
+ * @public exported from `@promptbook/editable`
6
+ */
7
+ export declare function deflatePipeline(pipelineString: PipelineString): PipelineString;
8
+ /**
9
+ * TODO: Unit test
10
+ */
@@ -11,7 +11,7 @@ type RemovePipelineCommandOptions = {
11
11
  /**
12
12
  * Pipeline you want to remove command from
13
13
  */
14
- pipeline: PipelineString;
14
+ pipelineString: PipelineString;
15
15
  };
16
16
  /**
17
17
  * Function `removePipelineCommand` will remove one command from pipeline string
@@ -0,0 +1,7 @@
1
+ import type { PipelineString } from '../../../pipeline/PipelineString';
2
+ /**
3
+ * @@@
4
+ *
5
+ * @public exported from `@promptbook/editable`
6
+ */
7
+ export declare function isFlatPipeline(pipelineString: PipelineString): boolean;
@@ -24,3 +24,6 @@ type RenameParameterOptions = {
24
24
  */
25
25
  export declare function renamePipelineParameter(options: RenameParameterOptions): PipelineJson;
26
26
  export {};
27
+ /**
28
+ * TODO: Also variant for `edit-pipeline-string`
29
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/markdown-utils",
3
- "version": "0.83.0",
3
+ "version": "0.84.0-0",
4
4
  "description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
5
5
  "--note-0": " <- [🐊]",
6
6
  "private": false,
package/umd/index.umd.js CHANGED
@@ -24,7 +24,7 @@
24
24
  * @generated
25
25
  * @see https://github.com/webgptorg/promptbook
26
26
  */
27
- var PROMPTBOOK_ENGINE_VERSION = '0.82.0';
27
+ var PROMPTBOOK_ENGINE_VERSION = '0.83.0';
28
28
  /**
29
29
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
30
30
  * Note: [💞] Ignore a discrepancy between file name and entity name