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

@sewing-kit/config

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sewing-kit/config - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

build/ts/service.d.ts

2

build/ts/index.d.ts
export { Runtime } from '@sewing-kit/types';
export * from './package';
export * from './service';
export * from './web-app';
export * from './workspace';
//# sourceMappingURL=index.d.ts.map

@@ -9,2 +9,4 @@ "use strict";

__export(require("./package"));
__export(require("./service"));
__export(require("./web-app"));
__export(require("./workspace"));

6

build/ts/load.js

@@ -14,2 +14,3 @@ "use strict";

if (await fs_extra_1.pathExists(path_1.join(root, 'sewing-kit.config.ts'))) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('@babel/register')({

@@ -27,5 +28,6 @@ extensions: ['.mjs', '.js', '.ts', '.tsx'],

async function loadConfigFile(file, { allowRootPlugins = false }) {
// eslint-disable-next-line typescript/no-var-requires
var _a;
// eslint-disable-next-line @typescript-eslint/no-var-requires
const exports = require(file);
const normalized = (exports && exports.default) || exports;
const normalized = (_a = exports) === null || _a === void 0 ? void 0 : _a.default;
if (normalized == null) {

@@ -32,0 +34,0 @@ throw new ui_1.DiagnosticError({

import { Runtime, Plugin, PackageCreateOptions, PackageEntryCreateOptions, PackageBinaryCreateOptions } from '@sewing-kit/types';
import { OptionBuilder } from './types';
declare class PackageCreator {
private readonly builder;
constructor(builder: Partial<PackageCreateOptions>);
constructor(builder: OptionBuilder<PackageCreateOptions>);
runtime(defaultRuntime: Runtime): void;

@@ -10,4 +11,4 @@ entry(entry: PackageEntryCreateOptions): void;

}
export declare function createPackage(create: (pkg: PackageCreator) => void | Promise<void>): () => Promise<Partial<PackageCreateOptions>>;
export declare function createPackage(create: (pkg: PackageCreator) => void | Promise<void>): () => Promise<OptionBuilder<PackageCreateOptions>>;
export {};
//# sourceMappingURL=package.d.ts.map

@@ -11,11 +11,16 @@ "use strict";

entry(entry) {
this.builder.entries = this.builder.entries || [];
this.builder.entries.push(Object.assign({ runtime: this.builder.runtime }, entry));
var _a;
this.builder.entries = (_a = this.builder.entries, (_a !== null && _a !== void 0 ? _a : []));
this.builder.entries.push(Object.assign(Object.assign({ runtime: this.builder.runtime }, entry), { root: typeof entry.root === 'string' && entry.root.startsWith('/')
? entry.root.slice(1)
: entry.root }));
}
binary(binary) {
this.builder.binaries = this.builder.binaries || [];
var _a;
this.builder.binaries = (_a = this.builder.binaries, (_a !== null && _a !== void 0 ? _a : []));
this.builder.binaries.push(binary);
}
plugin(...plugins) {
this.builder.plugins = this.builder.plugins || [];
var _a;
this.builder.plugins = (_a = this.builder.plugins, (_a !== null && _a !== void 0 ? _a : []));
this.builder.plugins.push(...plugins);

@@ -22,0 +27,0 @@ }

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

import { Plugin, PluginTarget } from '@sewing-kit/types';
import { Plugin } from '@sewing-kit/types';
interface WorkspaceCreateOptions {

@@ -8,5 +8,3 @@ plugins: Plugin[];

constructor(builder: Partial<WorkspaceCreateOptions>);
plugin(...plugins: (Plugin & {
target: PluginTarget.Root;
})[]): void;
plugin(...plugins: Plugin[]): void;
}

@@ -13,0 +11,0 @@ export declare function createWorkspace(create: (pkg: WorkspaceCreator) => void | Promise<void>): () => Promise<Partial<WorkspaceCreateOptions>>;

@@ -10,2 +10,3 @@ "use strict";

plugin(...plugins) {
var _a;
const nonRootPlugins = plugins.filter((plugin) => plugin.target !== types_1.PluginTarget.Root);

@@ -19,3 +20,3 @@ if (nonRootPlugins.length > 0) {

}
this.builder.plugins = this.builder.plugins || [];
this.builder.plugins = (_a = this.builder.plugins, (_a !== null && _a !== void 0 ? _a : []));
this.builder.plugins.push(...plugins);

@@ -22,0 +23,0 @@ }

@@ -1,1 +0,1 @@

module.exports = require("./build/cjs/index");
module.exports = require("./src/index");

@@ -1,1 +0,1 @@

module.exports = require("./build/cjs/load");
module.exports = require("./src/load");
{
"name": "@sewing-kit/config",
"version": "0.0.4",
"version": "0.0.5",
"sideEffects": false,

@@ -10,7 +10,8 @@ "publishConfig": {

"dependencies": {
"@sewing-kit/types": "^0.0.1",
"@sewing-kit/ui": "^0.0.5",
"@babel/register": "^7.7.4",
"@sewing-kit/types": "^0.0.2",
"@sewing-kit/ui": "^0.0.6",
"fs-extra": "^8.1.0"
},
"gitHead": "4ddaab39cb6342ab22a21d46997be82e626d48ac"
"gitHead": "1fc44608f952bd67cfe6f98006e1e510ec2ce82b"
}
export {Runtime} from '@sewing-kit/types';
export * from './package';
export * from './service';
export * from './web-app';
export * from './workspace';
import {join} from 'path';
import {pathExists} from 'fs-extra';

@@ -17,2 +18,3 @@ import {Plugin, PluginTarget, PLUGIN} from '@sewing-kit/types';

if (await pathExists(join(root, 'sewing-kit.config.ts'))) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('@babel/register')({

@@ -32,5 +34,5 @@ extensions: ['.mjs', '.js', '.ts', '.tsx'],

async function loadConfigFile(file: string, {allowRootPlugins = false}) {
// eslint-disable-next-line typescript/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-var-requires
const exports = require(file);
const normalized = (exports && exports.default) || exports;
const normalized = exports?.default;

@@ -37,0 +39,0 @@ if (normalized == null) {

@@ -9,4 +9,6 @@ import {

import {OptionBuilder} from './types';
class PackageCreator {
constructor(private readonly builder: Partial<PackageCreateOptions>) {}
constructor(private readonly builder: OptionBuilder<PackageCreateOptions>) {}

@@ -18,6 +20,10 @@ runtime(defaultRuntime: Runtime) {

entry(entry: PackageEntryCreateOptions) {
this.builder.entries = this.builder.entries || [];
this.builder.entries = this.builder.entries ?? [];
this.builder.entries.push({
runtime: this.builder.runtime,
...entry,
root:
typeof entry.root === 'string' && entry.root.startsWith('/')
? entry.root.slice(1)
: entry.root,
});

@@ -27,3 +33,3 @@ }

binary(binary: PackageBinaryCreateOptions) {
this.builder.binaries = this.builder.binaries || [];
this.builder.binaries = this.builder.binaries ?? [];
this.builder.binaries.push(binary);

@@ -33,4 +39,4 @@ }

plugin(...plugins: Plugin[]) {
this.builder.plugins = this.builder.plugins || [];
(this.builder.plugins as any).push(...plugins);
this.builder.plugins = this.builder.plugins ?? [];
this.builder.plugins.push(...plugins);
}

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

return async () => {
const options: Partial<PackageCreateOptions> = {};
const options: OptionBuilder<PackageCreateOptions> = {};
const creator = new PackageCreator(options);

@@ -46,0 +52,0 @@ await create(creator);

@@ -11,3 +11,3 @@ import {Plugin, PluginTarget} from '@sewing-kit/types';

plugin(...plugins: (Plugin & {target: PluginTarget.Root})[]) {
plugin(...plugins: Plugin[]) {
const nonRootPlugins = plugins.filter(

@@ -27,3 +27,3 @@ (plugin) => plugin.target !== PluginTarget.Root,

this.builder.plugins = this.builder.plugins || [];
this.builder.plugins = this.builder.plugins ?? [];
this.builder.plugins.push(...plugins);

@@ -30,0 +30,0 @@ }

@@ -6,8 +6,3 @@ {

"baseUrl": "src",
"rootDir": "src",
"typeRoots": [
"./config/typescript/typings",
"./node_modules/@types",
"../../node_modules/@types"
]
"rootDir": "src"
},

@@ -14,0 +9,0 @@ "include": ["src/**/*.ts"],

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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