Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@workflowai/code-generator

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@workflowai/code-generator - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

1

dist/cjs/playground.d.ts

@@ -29,2 +29,3 @@ import { JsonSchemaObject } from '@workflowai/schema';

fileDataProvider?: FileDataProvider;
descriptionAsComments?: boolean;
};

@@ -31,0 +32,0 @@ type GetPlaygroundSnippetsResult = {

8

dist/cjs/playground.js

@@ -23,7 +23,7 @@ "use strict";

};
const cleanZodDescribe = (code) => {
const cleanZodDescribe = (code, asComments) => {
const lines = code.split('\n');
const cleanLines = lines.map((line) => {
return line.replace(/^(\s*)(("[^"]+": z\.)?.*)\.describe\("([^"]+)"\)/, (_match, indents, pre, prop, description) => {
if (prop) {
if (prop && asComments) {
return `${indents}/**\n${indents} * ${description}\n${indents} */\n${indents}${pre}`;

@@ -52,3 +52,3 @@ }

const getPlaygroundSnippets = async (config) => {
const { taskId, taskName, schema, groupId, example, api, fileDataProvider = FileDataProvider.FILE_SYSTEM, } = {
const { taskId, taskName, schema, groupId, example, api, fileDataProvider = FileDataProvider.FILE_SYSTEM, descriptionAsComments, } = {
...config,

@@ -106,3 +106,3 @@ };

},
})`))}
})`), !!descriptionAsComments)}
`.trim(),

@@ -109,0 +109,0 @@ },

@@ -20,7 +20,7 @@ import { inputSchemaToZod, outputSchemaToZod, } from '@workflowai/schema';

};
const cleanZodDescribe = (code) => {
const cleanZodDescribe = (code, asComments) => {
const lines = code.split('\n');
const cleanLines = lines.map((line) => {
return line.replace(/^(\s*)(("[^"]+": z\.)?.*)\.describe\("([^"]+)"\)/, (_match, indents, pre, prop, description) => {
if (prop) {
if (prop && asComments) {
return `${indents}/**\n${indents} * ${description}\n${indents} */\n${indents}${pre}`;

@@ -49,3 +49,3 @@ }

export const getPlaygroundSnippets = async (config) => {
const { taskId, taskName, schema, groupId, example, api, fileDataProvider = FileDataProvider.FILE_SYSTEM, } = {
const { taskId, taskName, schema, groupId, example, api, fileDataProvider = FileDataProvider.FILE_SYSTEM, descriptionAsComments, } = {
...config,

@@ -103,3 +103,3 @@ };

},
})`))}
})`), !!descriptionAsComments)}
`.trim(),

@@ -106,0 +106,0 @@ },

@@ -29,2 +29,3 @@ import { JsonSchemaObject } from '@workflowai/schema';

fileDataProvider?: FileDataProvider;
descriptionAsComments?: boolean;
};

@@ -31,0 +32,0 @@ type GetPlaygroundSnippetsResult = {

{
"name": "@workflowai/code-generator",
"version": "1.1.1",
"version": "1.1.2",
"description": "workflowAI code-generator",

@@ -5,0 +5,0 @@ "author": "workflowAI",

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