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

@sewing-kit/plugins

Package Overview
Dependencies
Maintainers
3
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.1.4 to 0.1.5

build/ts/tests/utilities/plugins.d.ts

56

build/cjs/index.js

@@ -30,74 +30,80 @@ "use strict";

});
Object.defineProperty(exports, "Task", {
Object.defineProperty(exports, "ProjectKind", {
enumerable: true,
get: function () {
return _tasks.Task;
return _core.ProjectKind;
}
});
Object.defineProperty(exports, "Env", {
Object.defineProperty(exports, "Project", {
enumerable: true,
get: function () {
return _tasks.Env;
return _core.Project;
}
});
Object.defineProperty(exports, "SeriesHook", {
Object.defineProperty(exports, "Package", {
enumerable: true,
get: function () {
return _hooks.SeriesHook;
return _core.Package;
}
});
Object.defineProperty(exports, "WaterfallHook", {
Object.defineProperty(exports, "PackageBinary", {
enumerable: true,
get: function () {
return _hooks.WaterfallHook;
return _core.PackageBinary;
}
});
Object.defineProperty(exports, "Project", {
Object.defineProperty(exports, "PackageEntry", {
enumerable: true,
get: function () {
return _model.Project;
return _core.PackageEntry;
}
});
Object.defineProperty(exports, "Package", {
Object.defineProperty(exports, "Service", {
enumerable: true,
get: function () {
return _model.Package;
return _core.Service;
}
});
Object.defineProperty(exports, "PackageBinary", {
Object.defineProperty(exports, "WebApp", {
enumerable: true,
get: function () {
return _model.PackageBinary;
return _core.WebApp;
}
});
Object.defineProperty(exports, "PackageEntry", {
Object.defineProperty(exports, "Workspace", {
enumerable: true,
get: function () {
return _model.PackageEntry;
return _core.Workspace;
}
});
Object.defineProperty(exports, "Service", {
Object.defineProperty(exports, "Runtime", {
enumerable: true,
get: function () {
return _model.Service;
return _core.Runtime;
}
});
Object.defineProperty(exports, "WebApp", {
Object.defineProperty(exports, "Task", {
enumerable: true,
get: function () {
return _model.WebApp;
return _tasks.Task;
}
});
Object.defineProperty(exports, "Workspace", {
Object.defineProperty(exports, "Env", {
enumerable: true,
get: function () {
return _model.Workspace;
return _tasks.Env;
}
});
Object.defineProperty(exports, "Runtime", {
Object.defineProperty(exports, "SeriesHook", {
enumerable: true,
get: function () {
return _model.Runtime;
return _hooks.SeriesHook;
}
});
Object.defineProperty(exports, "WaterfallHook", {
enumerable: true,
get: function () {
return _hooks.WaterfallHook;
}
});
Object.defineProperty(exports, "PLUGIN_MARKER", {

@@ -230,4 +236,2 @@ enumerable: true,

var _model = require("@sewing-kit/model");
var _plugins = require("./plugins");

@@ -234,0 +238,0 @@

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

var _model = require("@sewing-kit/model");
var _core = require("@sewing-kit/core");

@@ -22,7 +22,7 @@ function projectTypeSwitch(project, {

}) {
if (project instanceof _model.Package) {
if (project instanceof _core.Package) {
return typeof pkg === 'function' ? pkg(project) : pkg;
} else if (project instanceof _model.WebApp) {
} else if (project instanceof _core.WebApp) {
return typeof webApp === 'function' ? webApp(project) : webApp;
} else if (project instanceof _model.Service) {
} else if (project instanceof _core.Service) {
return typeof service === 'function' ? service(project) : service;

@@ -29,0 +29,0 @@ }

@@ -6,3 +6,3 @@ export { DiagnosticError, LogLevel, TargetBuilder, TargetRuntime, } from '@sewing-kit/core';

export { SeriesHook, WaterfallHook } from '@sewing-kit/hooks';
export { Project, Package, PackageBinary, PackageEntry, Service, WebApp, Workspace, Runtime, } from '@sewing-kit/model';
export { ProjectKind, Project, Package, PackageBinary, PackageEntry, Service, WebApp, Workspace, Runtime, } from '@sewing-kit/core';
export type { PluginApi } from './api';

@@ -9,0 +9,0 @@ export { PLUGIN_MARKER, PluginTarget, createComposedProjectPlugin, createComposedWorkspacePlugin, createProjectBuildPlugin, createProjectDevPlugin, createProjectPlugin, createProjectTestPlugin, createWorkspaceBuildPlugin, createWorkspaceDevPlugin, createWorkspaceLintPlugin, createWorkspacePlugin, createWorkspaceTestPlugin, createWorkspaceTypeCheckPlugin, } from './plugins';

@@ -14,10 +14,11 @@ "use strict";

Object.defineProperty(exports, "WaterfallHook", { enumerable: true, get: function () { return hooks_1.WaterfallHook; } });
var model_1 = require("@sewing-kit/model");
Object.defineProperty(exports, "Package", { enumerable: true, get: function () { return model_1.Package; } });
Object.defineProperty(exports, "PackageBinary", { enumerable: true, get: function () { return model_1.PackageBinary; } });
Object.defineProperty(exports, "PackageEntry", { enumerable: true, get: function () { return model_1.PackageEntry; } });
Object.defineProperty(exports, "Service", { enumerable: true, get: function () { return model_1.Service; } });
Object.defineProperty(exports, "WebApp", { enumerable: true, get: function () { return model_1.WebApp; } });
Object.defineProperty(exports, "Workspace", { enumerable: true, get: function () { return model_1.Workspace; } });
Object.defineProperty(exports, "Runtime", { enumerable: true, get: function () { return model_1.Runtime; } });
var core_2 = require("@sewing-kit/core");
Object.defineProperty(exports, "ProjectKind", { enumerable: true, get: function () { return core_2.ProjectKind; } });
Object.defineProperty(exports, "Package", { enumerable: true, get: function () { return core_2.Package; } });
Object.defineProperty(exports, "PackageBinary", { enumerable: true, get: function () { return core_2.PackageBinary; } });
Object.defineProperty(exports, "PackageEntry", { enumerable: true, get: function () { return core_2.PackageEntry; } });
Object.defineProperty(exports, "Service", { enumerable: true, get: function () { return core_2.Service; } });
Object.defineProperty(exports, "WebApp", { enumerable: true, get: function () { return core_2.WebApp; } });
Object.defineProperty(exports, "Workspace", { enumerable: true, get: function () { return core_2.Workspace; } });
Object.defineProperty(exports, "Runtime", { enumerable: true, get: function () { return core_2.Runtime; } });
var plugins_1 = require("./plugins");

@@ -24,0 +25,0 @@ Object.defineProperty(exports, "PLUGIN_MARKER", { enumerable: true, get: function () { return plugins_1.PLUGIN_MARKER; } });

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

import { Project, WebApp, Package, Service, Workspace } from '@sewing-kit/model';
import { Project, WebApp, Package, Service, Workspace } from '@sewing-kit/core';
import { ProjectTasks, WorkspaceTasks, DevProjectTask, DevWorkspaceTask, TestProjectTask, TestWorkspaceTask, BuildProjectTask, BuildWorkspaceTask, LintWorkspaceTask, TypeCheckWorkspaceTask } from '@sewing-kit/tasks';

@@ -43,5 +43,5 @@ import { PluginApi } from './api';

export declare function createProjectPlugin<Type extends Project = WebApp | Service | Package>(id: BasePlugin['id'], run: NonNullable<ProjectPlugin<Type>['run']>): ProjectPlugin<Type>;
export declare const createProjectBuildPlugin: <Type extends Project = Project>(id: BasePlugin['id'], run: (context: Pick<ProjectPluginContext<Type>, "api" | "project" | "workspace"> & BuildProjectTask<Type>) => void | Promise<void>) => ProjectPlugin<Type>;
export declare const createProjectDevPlugin: <Type extends Project = Project>(id: BasePlugin['id'], run: (context: Pick<ProjectPluginContext<Type>, "api" | "project" | "workspace"> & DevProjectTask<Type>) => void | Promise<void>) => ProjectPlugin<Type>;
export declare const createProjectTestPlugin: <Type extends Project = Project>(id: BasePlugin['id'], run: (context: Pick<ProjectPluginContext<Type>, "api" | "project" | "workspace"> & TestProjectTask<Type>) => void | Promise<void>) => ProjectPlugin<Type>;
export declare const createProjectBuildPlugin: <Type extends Package | WebApp | Service = Package | WebApp | Service>(id: BasePlugin['id'], run: (context: Pick<ProjectPluginContext<Type>, "project" | "api" | "workspace"> & BuildProjectTask<Type>) => void | Promise<void>) => ProjectPlugin<Type>;
export declare const createProjectDevPlugin: <Type extends Package | WebApp | Service = Package | WebApp | Service>(id: BasePlugin['id'], run: (context: Pick<ProjectPluginContext<Type>, "project" | "api" | "workspace"> & DevProjectTask<Type>) => void | Promise<void>) => ProjectPlugin<Type>;
export declare const createProjectTestPlugin: <Type extends Package | WebApp | Service = Package | WebApp | Service>(id: BasePlugin['id'], run: (context: Pick<ProjectPluginContext<Type>, "project" | "api" | "workspace"> & TestProjectTask<Type>) => void | Promise<void>) => ProjectPlugin<Type>;
export declare function createComposedProjectPlugin<Type extends Project = WebApp | Service | Package>(id: BasePlugin['id'], pluginsOrCompose: readonly (ProjectPlugin<Type> | false | null | undefined)[] | NonNullable<ProjectPlugin<Type>['compose']>): ProjectPlugin<Type>;

@@ -48,0 +48,0 @@ export declare function createWorkspacePlugin(id: BasePlugin['id'], run: NonNullable<WorkspacePlugin['run']>): WorkspacePlugin;

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

import { Project, Package, WebApp, Service } from '@sewing-kit/model';
import { Project, Package, WebApp, Service } from '@sewing-kit/core';
declare type TypeOrCreator<Type, ProjectType> = Type | ((project: ProjectType) => Type);

@@ -3,0 +3,0 @@ export declare function projectTypeSwitch<PackageReturn = undefined, WebAppReturn = undefined, ServiceReturn = undefined>(project: Project, { package: pkg, webApp, service, }: {

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

const change_case_1 = require("change-case");
const model_1 = require("@sewing-kit/model");
const core_1 = require("@sewing-kit/core");
function projectTypeSwitch(project, { package: pkg, webApp, service, }) {
if (project instanceof model_1.Package) {
if (project instanceof core_1.Package) {
return typeof pkg === 'function' ? pkg(project) : pkg;
}
else if (project instanceof model_1.WebApp) {
else if (project instanceof core_1.WebApp) {
return typeof webApp === 'function' ? webApp(project) : webApp;
}
else if (project instanceof model_1.Service) {
else if (project instanceof core_1.Service) {
return typeof service === 'function' ? service(project) : service;

@@ -16,0 +16,0 @@ }

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

@@ -11,9 +11,8 @@ "publishConfig": {

"dependencies": {
"@sewing-kit/core": "^0.1.2",
"@sewing-kit/hooks": "^0.1.4",
"@sewing-kit/model": "^0.1.1",
"@sewing-kit/tasks": "^0.1.4",
"@sewing-kit/core": "^0.1.3",
"@sewing-kit/hooks": "^0.1.5",
"@sewing-kit/tasks": "^0.1.5",
"change-case": "^4.1.0"
},
"gitHead": "57ec1c03c770a3afa17cd7e3885e862cd8aba22a"
"gitHead": "62309865ebbd7dd9e752a7cce8c0bc48d7898a2d"
}

@@ -18,2 +18,3 @@ export {

export {
ProjectKind,
Project,

@@ -27,3 +28,3 @@ Package,

Runtime,
} from '@sewing-kit/model';
} from '@sewing-kit/core';

@@ -30,0 +31,0 @@ export type {PluginApi} from './api';

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

import {Project, WebApp, Package, Service, Workspace} from '@sewing-kit/model';
import {Project, WebApp, Package, Service, Workspace} from '@sewing-kit/core';
import {

@@ -3,0 +3,0 @@ ProjectTasks,

import {paramCase} from 'change-case';
import {Project, Package, WebApp, Service} from '@sewing-kit/model';
import {Project, Package, WebApp, Service} from '@sewing-kit/core';

@@ -4,0 +4,0 @@ type TypeOrCreator<Type, ProjectType> = Type | ((project: ProjectType) => Type);

@@ -9,7 +9,4 @@ {

"include": ["src/**/*.ts"],
"references": [
{"path": "../tasks"},
{"path": "../model"},
{"path": "../core"}
]
"exclude": ["src/**/*.test.ts"],
"references": [{"path": "../tasks"}, {"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

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