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

@based/type-gen

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@based/type-gen - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

dist/index.d.ts

@@ -12,3 +12,3 @@ import { BasedFunctionConfig } from '@based/functions';

basedPath?: string;
}) => Promise<boolean>;
}) => Promise<string | void>;
//# sourceMappingURL=index.d.ts.map

@@ -7,3 +7,4 @@ "use strict";

// check if client is correct version
const basedClientPath = opts.basedPath || require.resolve('@based/client');
const basedClientPath = opts.basedPath ||
require.resolve('@based/client', { paths: [process.cwd()] });
if (!basedClientPath) {

@@ -78,7 +79,6 @@ throw new Error('Cannot find basedClient');

await (0, fs_extra_1.writeFile)(decPath, x);
return true;
return decPath;
}
return false;
};
exports.updateTypes = updateTypes;
//# sourceMappingURL=index.js.map
{
"name": "@based/type-gen",
"version": "0.0.1",
"version": "0.0.2",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -13,6 +13,8 @@ import { BasedFunctionConfig } from '@based/functions'

} = {}
): Promise<boolean> => {
): Promise<string | void> => {
// check if client is correct version
const basedClientPath = opts.basedPath || require.resolve('@based/client')
const basedClientPath =
opts.basedPath ||
require.resolve('@based/client', { paths: [process.cwd()] })

@@ -104,6 +106,4 @@ if (!basedClientPath) {

await writeFile(decPath, x)
return true
return decPath
}
return false
}
import test from 'ava'
import { updateTypes } from '../src'
import { join } from 'path'
import based from '@based/client'
import { readFile } from 'fs-extra'
test.serial('Generare types file from examples', async (t) => {
test.serial('Generate types file from examples', async (t) => {
const result = await updateTypes([

@@ -43,3 +42,3 @@ {

t.true(result)
t.is(result, join(__dirname, '../../client/dist/index.d.ts'))
t.true(file.includes('counter'))

@@ -46,0 +45,0 @@ t.true(file.includes('db:schema'))

Sorry, the diff of this file is not supported yet

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