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

@sewing-kit/plugins

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sewing-kit/plugins - npm Package Compare versions

Comparing version 0.0.14 to 0.0.17

32

build/cjs/api.js

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

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createStep = createStep;
const defaultSkip = () => false;
function createStep(runOrStep, run) {
return typeof runOrStep === 'function' ? {
run: runOrStep,
skip: defaultSkip
} : {
run: run,
...normalizeOptions(runOrStep)
};
}
function normalizeOptions({
skip,
...rest
}) {
return { ...rest,
skip: skip ? normalizeSkip(skip) : defaultSkip
};
}
function normalizeSkip(skipper) {
return typeof skipper === 'function' ? skipper : skipped => skipped.some(skip => skipper.test(skip));
}
"use strict";

4

build/cjs/errors.js

@@ -8,5 +8,5 @@ "use strict";

var _ui = require("@sewing-kit/ui");
var _core = require("@sewing-kit/core");
class MissingPluginError extends _ui.DiagnosticError {
class MissingPluginError extends _core.DiagnosticError {
constructor(plugin) {

@@ -13,0 +13,0 @@ super({

@@ -28,3 +28,3 @@ "use strict";

get: function () {
return _ui.DiagnosticError;
return _core.DiagnosticError;
}

@@ -35,3 +35,3 @@ });

get: function () {
return _ui.LogLevel;
return _core.LogLevel;
}

@@ -42,3 +42,3 @@ });

get: function () {
return _ui.Loggable;
return _core.Loggable;
}

@@ -131,3 +131,3 @@ });

var _ui = require("@sewing-kit/ui");
var _core = require("@sewing-kit/core");

@@ -134,0 +134,0 @@ var _tasks = require("@sewing-kit/tasks");

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

declare type Step = import('@sewing-kit/ui').Step;
declare type Step = import('@sewing-kit/core').Step;
export interface PluginApi {

@@ -9,10 +9,5 @@ read(path: string): Promise<string>;

tmpPath(...parts: string[]): string;
createStep: typeof createStep;
createStep(options: Omit<Step, 'run' | 'source'>, run: Step['run']): Step;
}
declare type Skipper = ((skipped: readonly string[]) => boolean) | RegExp;
export declare function createStep(run: Step['run']): Step;
export declare function createStep(options: Omit<Step, 'run' | 'skip'> & {
skip?: Skipper;
}, run: Step['run']): Step;
export {};
//# sourceMappingURL=api.d.ts.map
"use strict";
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
const defaultSkip = () => false;
function createStep(runOrStep, run) {
return typeof runOrStep === 'function'
? { run: runOrStep, skip: defaultSkip }
: Object.assign({ run: run }, normalizeOptions(runOrStep));
}
exports.createStep = createStep;
function normalizeOptions(_a) {
var { skip } = _a, rest = __rest(_a, ["skip"]);
return Object.assign(Object.assign({}, rest), { skip: skip ? normalizeSkip(skip) : defaultSkip });
}
function normalizeSkip(skipper) {
return typeof skipper === 'function'
? skipper
: (skipped) => skipped.some((skip) => skipper.test(skip));
}

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

import { DiagnosticError } from '@sewing-kit/ui';
import { DiagnosticError } from '@sewing-kit/core';
export declare class MissingPluginError extends DiagnosticError {

@@ -3,0 +3,0 @@ constructor(plugin: string);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ui_1 = require("@sewing-kit/ui");
class MissingPluginError extends ui_1.DiagnosticError {
const core_1 = require("@sewing-kit/core");
class MissingPluginError extends core_1.DiagnosticError {
constructor(plugin) {

@@ -6,0 +6,0 @@ super({

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

export { DiagnosticError, LogLevel, Loggable } from '@sewing-kit/ui';
export { DiagnosticError, LogLevel, Loggable } from '@sewing-kit/core';
export { Task, Env, WorkspaceTasks, ProjectTasks } from '@sewing-kit/tasks';

@@ -3,0 +3,0 @@ export { SeriesHook, WaterfallHook } from '@sewing-kit/hooks';

@@ -6,5 +6,5 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var ui_1 = require("@sewing-kit/ui");
exports.DiagnosticError = ui_1.DiagnosticError;
exports.LogLevel = ui_1.LogLevel;
var core_1 = require("@sewing-kit/core");
exports.DiagnosticError = core_1.DiagnosticError;
exports.LogLevel = core_1.LogLevel;
var tasks_1 = require("@sewing-kit/tasks");

@@ -24,5 +24,4 @@ exports.Task = tasks_1.Task;

exports.Runtime = model_1.Runtime;
__export(require("./api"));
__export(require("./plugins"));
__export(require("./utilities"));
__export(require("./errors"));

@@ -13,2 +13,3 @@ import { Project, WebApp, Package, Service, Workspace } from '@sewing-kit/model';

readonly [PLUGIN_MARKER]: true;
readonly parent?: BasePlugin;
}

@@ -26,2 +27,3 @@ export interface PluginComposer<Plugin extends BasePlugin> {

readonly target: PluginTarget.Project;
readonly parent?: ProjectPlugin<Project>;
run?(context: ProjectPluginContext<Type>): any;

@@ -37,2 +39,3 @@ compose?(composer: PluginComposer<ProjectPlugin<Type>>): any;

readonly target: PluginTarget.Workspace;
readonly parent?: WorkspacePlugin;
run?(context: WorkspacePluginContext): any;

@@ -39,0 +42,0 @@ compose?(composer: PluginComposer<WorkspacePlugin>): any;

{
"name": "@sewing-kit/plugins",
"license": "MIT",
"version": "0.0.14",
"version": "0.0.17",
"sideEffects": false,

@@ -11,10 +11,10 @@ "publishConfig": {

"dependencies": {
"@sewing-kit/hooks": "^0.0.16",
"@sewing-kit/model": "^0.0.8",
"@sewing-kit/tasks": "^0.0.12",
"@sewing-kit/ui": "^0.0.17",
"@sewing-kit/core": "^0.0.36",
"@sewing-kit/hooks": "^0.0.19",
"@sewing-kit/model": "^0.0.10",
"@sewing-kit/tasks": "^0.0.15",
"change-case": "^4.1.0",
"tapable": "^1.1.3"
},
"gitHead": "5331c444a48f26365e68363b96871cb88b60734b"
"gitHead": "0136728eb88b6ab0a69292fab288b9700516a0d9"
}

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

type Step = import('@sewing-kit/ui').Step;
type Step = import('@sewing-kit/core').Step;

@@ -10,35 +10,4 @@ export interface PluginApi {

tmpPath(...parts: string[]): string;
createStep: typeof createStep;
}
type Skipper = ((skipped: readonly string[]) => boolean) | RegExp;
const defaultSkip = () => false;
export function createStep(run: Step['run']): Step;
export function createStep(
options: Omit<Step, 'run' | 'skip'> & {skip?: Skipper},
run: Step['run'],
): Step;
export function createStep(
runOrStep: Step['run'] | (Omit<Step, 'run' | 'skip'> & {skip?: Skipper}),
run?: Step['run'],
): Step {
return typeof runOrStep === 'function'
? {run: runOrStep, skip: defaultSkip}
: {run: run!, ...normalizeOptions(runOrStep!)};
createStep(options: Omit<Step, 'run' | 'source'>, run: Step['run']): Step;
}
function normalizeOptions({
skip,
...rest
}: Omit<Step, 'run' | 'skip'> & {skip?: Skipper}): Omit<Step, 'run'> {
return {...rest, skip: skip ? normalizeSkip(skip) : defaultSkip};
}
function normalizeSkip(skipper: Skipper) {
return typeof skipper === 'function'
? skipper
: (skipped: readonly string[]) =>
skipped.some((skip) => skipper.test(skip));
}

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

import {DiagnosticError} from '@sewing-kit/ui';
import {DiagnosticError} from '@sewing-kit/core';

@@ -3,0 +3,0 @@ export class MissingPluginError extends DiagnosticError {

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

export {DiagnosticError, LogLevel, Loggable} from '@sewing-kit/ui';
export {DiagnosticError, LogLevel, Loggable} from '@sewing-kit/core';
export {Task, Env, WorkspaceTasks, ProjectTasks} from '@sewing-kit/tasks';

@@ -3,0 +3,0 @@ export {SeriesHook, WaterfallHook} from '@sewing-kit/hooks';

@@ -28,2 +28,3 @@ import {Project, WebApp, Package, Service, Workspace} from '@sewing-kit/model';

readonly [PLUGIN_MARKER]: true;
readonly parent?: BasePlugin;
}

@@ -45,2 +46,3 @@

readonly target: PluginTarget.Project;
readonly parent?: ProjectPlugin<Project>;
run?(context: ProjectPluginContext<Type>): any;

@@ -58,2 +60,3 @@ compose?(composer: PluginComposer<ProjectPlugin<Type>>): any;

readonly target: PluginTarget.Workspace;
readonly parent?: WorkspacePlugin;
run?(context: WorkspacePluginContext): any;

@@ -60,0 +63,0 @@ compose?(composer: PluginComposer<WorkspacePlugin>): any;

@@ -9,3 +9,7 @@ {

"include": ["src/**/*.ts"],
"references": [{"path": "../ui"}, {"path": "../tasks"}, {"path": "../model"}]
"references": [
{"path": "../tasks"},
{"path": "../model"},
{"path": "../core"}
]
}

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