New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@promptbook/utils

Package Overview
Dependencies
Maintainers
1
Versions
540
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@promptbook/utils - npm Package Compare versions

Comparing version 0.82.0 to 0.83.0

esm/typings/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.d.ts

74

esm/typings/src/_packages/editable.index.d.ts
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
import { getParserForCommand } from '../commands/_common/getParserForCommand';
import { parseCommand } from '../commands/_common/parseCommand';
import type { CommandParser } from '../commands/_common/types/CommandParser';
import type { PipelineBothCommandParser } from '../commands/_common/types/CommandParser';
import type { PipelineHeadCommandParser } from '../commands/_common/types/CommandParser';
import type { PipelineTaskCommandParser } from '../commands/_common/types/CommandParser';
import type { CommandUsagePlace } from '../commands/_common/types/CommandUsagePlaces';
import type { BookVersionCommand } from '../commands/BOOK_VERSION/BookVersionCommand';
import { bookVersionCommandParser } from '../commands/BOOK_VERSION/bookVersionCommandParser';
import { expectCommandParser } from '../commands/EXPECT/expectCommandParser';
import type { ForeachCommand } from '../commands/FOREACH/ForeachCommand';
import { foreachCommandParser } from '../commands/FOREACH/foreachCommandParser';
import { formatCommandParser } from '../commands/FORMAT/formatCommandParser';
import type { FormfactorCommand } from '../commands/FORMFACTOR/FormfactorCommand';
import { formfactorCommandParser } from '../commands/FORMFACTOR/formfactorCommandParser';
import { COMMANDS } from '../commands/index';
import type { JokerCommand } from '../commands/JOKER/JokerCommand';
import { jokerCommandParser } from '../commands/JOKER/jokerCommandParser';
import type { KnowledgeCommand } from '../commands/KNOWLEDGE/KnowledgeCommand';
import { knowledgeCommandParser } from '../commands/KNOWLEDGE/knowledgeCommandParser';
import { knowledgeSourceContentToName } from '../commands/KNOWLEDGE/utils/knowledgeSourceContentToName';
import type { ModelCommand } from '../commands/MODEL/ModelCommand';
import { modelCommandParser } from '../commands/MODEL/modelCommandParser';
import type { ParameterCommand } from '../commands/PARAMETER/ParameterCommand';
import { parameterCommandParser } from '../commands/PARAMETER/parameterCommandParser';
import type { PersonaCommand } from '../commands/PERSONA/PersonaCommand';
import { personaCommandParser } from '../commands/PERSONA/personaCommandParser';
import type { PostprocessCommand } from '../commands/POSTPROCESS/PostprocessCommand';
import { postprocessCommandParser } from '../commands/POSTPROCESS/postprocessCommandParser';
import type { SectionCommand } from '../commands/SECTION/SectionCommand';
import { sectionCommandParser } from '../commands/SECTION/sectionCommandParser';
import type { UrlCommand } from '../commands/URL/UrlCommand';
import { urlCommandParser } from '../commands/URL/urlCommandParser';
import type { ActionCommand } from '../commands/X_ACTION/ActionCommand';
import { actionCommandParser } from '../commands/X_ACTION/actionCommandParser';
import type { InstrumentCommand } from '../commands/X_INSTRUMENT/InstrumentCommand';
import { instrumentCommandParser } from '../commands/X_INSTRUMENT/instrumentCommandParser';
import type { PipelineEditableSerialized } from '../utils/editable/types/PipelineEditableSerialized';

@@ -7,2 +44,39 @@ import { removePipelineCommand } from '../utils/editable/utils/removePipelineCommand';

export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
export { getParserForCommand };
export { parseCommand };
export type { CommandParser };
export type { PipelineBothCommandParser };
export type { PipelineHeadCommandParser };
export type { PipelineTaskCommandParser };
export type { CommandUsagePlace };
export type { BookVersionCommand };
export { bookVersionCommandParser };
export { expectCommandParser };
export type { ForeachCommand };
export { foreachCommandParser };
export { formatCommandParser };
export type { FormfactorCommand };
export { formfactorCommandParser };
export { COMMANDS };
export type { JokerCommand };
export { jokerCommandParser };
export type { KnowledgeCommand };
export { knowledgeCommandParser };
export { knowledgeSourceContentToName };
export type { ModelCommand };
export { modelCommandParser };
export type { ParameterCommand };
export { parameterCommandParser };
export type { PersonaCommand };
export { personaCommandParser };
export type { PostprocessCommand };
export { postprocessCommandParser };
export type { SectionCommand };
export { sectionCommandParser };
export type { UrlCommand };
export { urlCommandParser };
export type { ActionCommand };
export { actionCommandParser };
export type { InstrumentCommand };
export { instrumentCommandParser };
export type { PipelineEditableSerialized };

@@ -9,0 +83,0 @@ export { removePipelineCommand };

@@ -10,5 +10,18 @@ import type { PipelineCollection } from '../collection/PipelineCollection';

import type { CommandUsagePlace } from '../commands/_common/types/CommandUsagePlaces';
import type { BookVersionCommand } from '../commands/BOOK_VERSION/BookVersionCommand';
import type { ExpectCommand } from '../commands/EXPECT/ExpectCommand';
import type { ForeachCommand } from '../commands/FOREACH/ForeachCommand';
import type { ForeachJson } from '../commands/FOREACH/ForeachJson';
import type { FormatCommand } from '../commands/FORMAT/FormatCommand';
import type { FormfactorCommand } from '../commands/FORMFACTOR/FormfactorCommand';
import type { JokerCommand } from '../commands/JOKER/JokerCommand';
import type { KnowledgeCommand } from '../commands/KNOWLEDGE/KnowledgeCommand';
import type { ModelCommand } from '../commands/MODEL/ModelCommand';
import type { ParameterCommand } from '../commands/PARAMETER/ParameterCommand';
import type { PersonaCommand } from '../commands/PERSONA/PersonaCommand';
import type { PostprocessCommand } from '../commands/POSTPROCESS/PostprocessCommand';
import type { SectionCommand } from '../commands/SECTION/SectionCommand';
import type { UrlCommand } from '../commands/URL/UrlCommand';
import type { ActionCommand } from '../commands/X_ACTION/ActionCommand';
import type { InstrumentCommand } from '../commands/X_INSTRUMENT/InstrumentCommand';
import type { PrettifyOptions } from '../conversion/prettify/PrettifyOptions';

@@ -272,5 +285,18 @@ import type { renderPipelineMermaidOptions } from '../conversion/prettify/renderPipelineMermaidOptions';

export type { CommandUsagePlace };
export type { BookVersionCommand };
export type { ExpectCommand };
export type { ForeachCommand };
export type { ForeachJson };
export type { FormatCommand };
export type { FormfactorCommand };
export type { JokerCommand };
export type { KnowledgeCommand };
export type { ModelCommand };
export type { ParameterCommand };
export type { PersonaCommand };
export type { PostprocessCommand };
export type { SectionCommand };
export type { UrlCommand };
export type { ActionCommand };
export type { InstrumentCommand };
export type { PrettifyOptions };

@@ -277,0 +303,0 @@ export type { renderPipelineMermaidOptions };

2

esm/typings/src/commands/_common/getParserForCommand.d.ts

@@ -9,4 +9,4 @@ import type { Command } from './types/Command';

*
* @private within the compilePipeline
* @public exported from `@promptbook/editable`
*/
export declare function getParserForCommand<TCommand extends Command>(command: TCommand): CommandParser<TCommand>;

@@ -10,4 +10,4 @@ import type { string_markdown_text } from '../../types/typeAliases';

*
* @private within the compilePipeline
* @public exported from `@promptbook/editable`
*/
export declare function parseCommand(raw: string_markdown_text, usagePlace: CommandUsagePlace): Command;

@@ -9,4 +9,5 @@ import type { string_markdown_text } from '../../types/typeAliases';

*
* @deprecated Option to convert JSON back to string is outdated and will be removed
* @private within the compilePipeline
*/
export declare function stringifyCommand(command: Command): string_markdown_text;

@@ -20,2 +20,4 @@ import type { SetOptional, WritableDeep } from 'type-fest';

* @@@
*
* @public exported from `@promptbook/editable`
*/

@@ -75,2 +77,4 @@ export type CommandParser<TCommand extends CommandBase> = PipelineHeadCommandParser<TCommand> | PipelineTaskCommandParser<TCommand> | PipelineBothCommandParser<TCommand>;

* @@@
*
* @public exported from `@promptbook/editable`
*/

@@ -80,2 +84,4 @@ export type PipelineBothCommandParser<TCommand extends CommandBase> = ___and___ & Omit<PipelineHeadCommandParser<TCommand>, 'isUsedInPipelineTask'> & Omit<PipelineTaskCommandParser<TCommand>, 'isUsedInPipelineHead'>;

* @@@
*
* @public exported from `@promptbook/editable`
*/

@@ -107,2 +113,4 @@ export type PipelineHeadCommandParser<TCommand extends CommandBase> = CommonCommandParser<TCommand> & {

* @@@
*
* @public exported from `@promptbook/editable`
*/

@@ -109,0 +117,0 @@ export type PipelineTaskCommandParser<TCommand extends CommandBase> = CommonCommandParser<TCommand> & {

import type { TupleToUnion } from 'type-fest';
/**
* Where the command can be used
*
* @public exported from `@promptbook/editable`
*/

@@ -5,0 +7,0 @@ export type CommandUsagePlace = TupleToUnion<typeof CommandUsagePlaces>;

@@ -6,3 +6,3 @@ import type { string_semantic_version } from '../../types/typeAliases';

* @see ./bookVersionCommandParser.ts for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -9,0 +9,0 @@ export type BookVersionCommand = {

@@ -7,4 +7,4 @@ import type { PipelineHeadCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/
export declare const bookVersionCommandParser: PipelineHeadCommandParser<BookVersionCommand>;

@@ -7,4 +7,4 @@ import type { PipelineTaskCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/
export declare const expectCommandParser: PipelineTaskCommandParser<ExpectCommand>;

@@ -6,3 +6,3 @@ import type { ForeachJson } from './ForeachJson';

* @see ./foreachCommandParser.ts for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -9,0 +9,0 @@ export type ForeachCommand = {

@@ -9,3 +9,3 @@ import type { PipelineTaskCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -12,0 +12,0 @@ export declare const foreachCommandParser: PipelineTaskCommandParser<ForeachCommand>;

@@ -7,4 +7,4 @@ import type { PipelineTaskCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/
export declare const formatCommandParser: PipelineTaskCommandParser<FormatCommand>;

@@ -6,3 +6,3 @@ import type { string_formfactor_name } from '../../formfactors/_common/string_formfactor_name';

* @see ./formfactorCommandParser.ts for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -9,0 +9,0 @@ export type FormfactorCommand = {

@@ -9,4 +9,4 @@ import type { PipelineHeadCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/
export declare const formfactorCommandParser: PipelineHeadCommandParser<FormfactorCommand>;
/**
* All available command parsers
*
* @private internal index of `parseCommand`
* @public exported from `@promptbook/editable`
*/

@@ -6,0 +6,0 @@ export declare const COMMANDS: readonly [import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./SECTION/SectionCommand").SectionCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./EXPECT/ExpectCommand").ExpectCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./FORMAT/FormatCommand").FormatCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./JOKER/JokerCommand").JokerCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./MODEL/ModelCommand").ModelCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./PARAMETER/ParameterCommand").ParameterCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./POSTPROCESS/PostprocessCommand").PostprocessCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./BOOK_VERSION/BookVersionCommand").BookVersionCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./FORMFACTOR/FormfactorCommand").FormfactorCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./URL/UrlCommand").UrlCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./KNOWLEDGE/KnowledgeCommand").KnowledgeCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./X_ACTION/ActionCommand").ActionCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./X_INSTRUMENT/InstrumentCommand").InstrumentCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./PERSONA/PersonaCommand").PersonaCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./FOREACH/ForeachCommand").ForeachCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./_BOILERPLATE/BoilerplateCommand").BoilerplateCommand>];

@@ -6,3 +6,3 @@ import type { string_name } from '../../types/typeAliases';

* @see ./jokerCommandParser.ts for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -9,0 +9,0 @@ export type JokerCommand = {

@@ -7,4 +7,4 @@ import type { PipelineTaskCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/
export declare const jokerCommandParser: PipelineTaskCommandParser<JokerCommand>;

@@ -6,7 +6,7 @@ import type { string_knowledge_source_content } from '../../types/typeAliases';

* @see ./knowledgeCommandParser.ts for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/
export type KnowledgeCommand = {
readonly type: 'KNOWLEDGE';
readonly sourceContent: string_knowledge_source_content;
readonly knowledgeSourceContent: string_knowledge_source_content;
};

@@ -7,3 +7,3 @@ import type { PipelineHeadCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -10,0 +10,0 @@ export declare const knowledgeCommandParser: PipelineHeadCommandParser<KnowledgeCommand>;

@@ -7,3 +7,4 @@ import type { ModelRequirements } from '../../types/ModelRequirements';

* @see ./modelCommandParser.ts for more details
* @private within the commands folder
* @deprecated Option to manually set the model requirements is not recommended to use, use `PERSONA` instead
* @public exported from `@promptbook/editable`
*/

@@ -10,0 +11,0 @@ export type ModelCommand = {

@@ -7,4 +7,5 @@ import type { PipelineBothCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @deprecated Option to manually set the model requirements is not recommended to use, use `PERSONA` instead
* @public exported from `@promptbook/editable`
*/
export declare const modelCommandParser: PipelineBothCommandParser<ModelCommand>;

@@ -7,3 +7,3 @@ import type { string_markdown_text } from '../../types/typeAliases';

* @see ./parameterCommandParser.ts for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -10,0 +10,0 @@ export type ParameterCommand = {

@@ -7,4 +7,4 @@ import type { PipelineBothCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/
export declare const parameterCommandParser: PipelineBothCommandParser<ParameterCommand>;

@@ -7,3 +7,3 @@ import type { string_name } from '../../types/typeAliases';

* @see ./personaCommandParser.ts for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -10,0 +10,0 @@ export type PersonaCommand = {

@@ -7,4 +7,4 @@ import type { PipelineBothCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/
export declare const personaCommandParser: PipelineBothCommandParser<PersonaCommand>;

@@ -6,3 +6,3 @@ import type { string_name } from '../../types/typeAliases';

* @see ./postprocessCommandParser.ts for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -9,0 +9,0 @@ export type PostprocessCommand = {

@@ -7,4 +7,4 @@ import type { PipelineTaskCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/
export declare const postprocessCommandParser: PipelineTaskCommandParser<PostprocessCommand>;

@@ -6,3 +6,3 @@ import type { SectionType } from '../../types/SectionType';

* @see ./sectionCommandParser.ts for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -9,0 +9,0 @@ export type SectionCommand = {

@@ -7,3 +7,3 @@ import type { PipelineTaskCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -10,0 +10,0 @@ export declare const sectionCommandParser: PipelineTaskCommandParser<SectionCommand>;

@@ -5,3 +5,3 @@ /**

* @see ./urlCommandParser.ts for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -8,0 +8,0 @@ export type UrlCommand = {

@@ -7,4 +7,4 @@ import type { PipelineHeadCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/
export declare const urlCommandParser: PipelineHeadCommandParser<UrlCommand>;

@@ -5,3 +5,3 @@ /**

* @see ./actionCommandParser.ts for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -8,0 +8,0 @@ export type ActionCommand = {

@@ -7,3 +7,3 @@ import type { PipelineHeadCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -10,0 +10,0 @@ export declare const actionCommandParser: PipelineHeadCommandParser<ActionCommand>;

@@ -5,3 +5,3 @@ /**

* @see ./instrumentCommandParser.ts for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -8,0 +8,0 @@ export type InstrumentCommand = {

@@ -7,3 +7,3 @@ import type { PipelineHeadCommandParser } from '../_common/types/CommandParser';

* @see `documentationUrl` for more details
* @private within the commands folder
* @public exported from `@promptbook/editable`
*/

@@ -10,0 +10,0 @@ export declare const instrumentCommandParser: PipelineHeadCommandParser<InstrumentCommand>;

@@ -27,3 +27,3 @@ import type { number_id } from '../../types/typeAliases';

*/
readonly sourceContent: string_knowledge_source_content;
readonly knowledgeSourceContent: string_knowledge_source_content;
};

@@ -30,0 +30,0 @@ /**

{
"name": "@promptbook/utils",
"version": "0.82.0",
"version": "0.83.0",
"description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",

@@ -5,0 +5,0 @@ "--note-0": " <- [🐊]",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc