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.0.1 to 1.0.2

13

dist/esm/beautify.js

@@ -1,10 +0,4 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.beautifyTypescript = void 0;
const simply_beautiful_1 = __importDefault(require("simply-beautiful"));
const beautifyTypescript = (uglyCode) => {
return simply_beautiful_1.default.js(uglyCode, {
import simplyBeautiful from 'simply-beautiful';
export const beautifyTypescript = (uglyCode) => {
return simplyBeautiful.js(uglyCode, {
indent_size: 2,

@@ -16,2 +10,1 @@ indent_char: ' ',

};
exports.beautifyTypescript = beautifyTypescript;

@@ -1,18 +0,2 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./beautify"), exports);
__exportStar(require("./playground"), exports);
export * from './beautify';
export * from './playground';

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPlaygroundSnippets = void 0;
const schema_1 = require("@workflowai/schema");
const beautify_1 = require("./beautify");
import { inputSchemaToZod, outputSchemaToZod, } from '@workflowai/schema';
import { beautifyTypescript } from './beautify';
/**

@@ -17,3 +14,3 @@ * Transform a string into a valid TS/JS var name

};
const getPlaygroundSnippets = async (config) => {
export const getPlaygroundSnippets = async (config) => {
const { taskId, taskName, schema, groupId, example } = config;

@@ -44,8 +41,8 @@ const taskFunctionName = validVarName(taskName || taskId);

${(0, beautify_1.beautifyTypescript)(`const ${taskFunctionName} = await workflowAI.compileTask({
${beautifyTypescript(`const ${taskFunctionName} = await workflowAI.compileTask({
taskId: "${taskId}",
schema: {
id: ${schema.id},
input: ${await (0, schema_1.inputSchemaToZod)(schema.input)},
output: ${await (0, schema_1.outputSchemaToZod)(schema.output)},
input: ${await inputSchemaToZod(schema.input)},
output: ${await outputSchemaToZod(schema.output)},
},

@@ -64,3 +61,3 @@ }, {

${`const input: TaskInput<typeof ${taskFunctionName}> = ${(0, beautify_1.beautifyTypescript)(JSON.stringify(example.input))}`}
${`const input: TaskInput<typeof ${taskFunctionName}> = ${beautifyTypescript(JSON.stringify(example.input))}`}

@@ -72,2 +69,1 @@ const output = await ${taskFunctionName}(input)

};
exports.getPlaygroundSnippets = getPlaygroundSnippets;
{
"name": "@workflowai/code-generator",
"version": "1.0.1",
"version": "1.0.2",
"description": "workflowAI code-generator",

@@ -16,9 +16,6 @@ "author": "workflowAI",

"exports": {
"import": {
".": {
"types": "./dist/types/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/types/index.d.ts",
"default": "./dist/cjs/index.js"
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
}

@@ -52,5 +49,5 @@ },

"dependencies": {
"@workflowai/schema": "^1.0.0",
"@workflowai/schema": "^1.0.1",
"simply-beautiful": "^0.2.14"
}
}
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