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.10 to 0.2.0-alpha.1

13

build/cjs/errors.js

@@ -1,11 +0,8 @@

"use strict";
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.MissingPluginError = void 0;
Object.defineProperty(exports, '__esModule', { value: true });
var _core = require("@sewing-kit/core");
var core = require('@sewing-kit/core');
class MissingPluginError extends _core.DiagnosticError {
class MissingPluginError extends core.DiagnosticError {
constructor(plugin) {

@@ -20,2 +17,2 @@ super({

exports.MissingPluginError = MissingPluginError;
exports.MissingPluginError = MissingPluginError;

@@ -1,239 +0,134 @@

"use strict";
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DiagnosticError", {
Object.defineProperty(exports, '__esModule', { value: true });
var core = require('@sewing-kit/core');
var tasks = require('@sewing-kit/tasks');
var hooks = require('@sewing-kit/hooks');
var plugins = require('./plugins.js');
var utilities = require('./utilities.js');
var errors = require('./errors.js');
Object.defineProperty(exports, 'DiagnosticError', {
enumerable: true,
get: function () {
return _core.DiagnosticError;
return core.DiagnosticError;
}
});
Object.defineProperty(exports, "LogLevel", {
Object.defineProperty(exports, 'LogLevel', {
enumerable: true,
get: function () {
return _core.LogLevel;
return core.LogLevel;
}
});
Object.defineProperty(exports, "TargetBuilder", {
Object.defineProperty(exports, 'Package', {
enumerable: true,
get: function () {
return _core.TargetBuilder;
return core.Package;
}
});
Object.defineProperty(exports, "TargetRuntime", {
Object.defineProperty(exports, 'PackageBinary', {
enumerable: true,
get: function () {
return _core.TargetRuntime;
return core.PackageBinary;
}
});
Object.defineProperty(exports, "ProjectKind", {
Object.defineProperty(exports, 'PackageEntry', {
enumerable: true,
get: function () {
return _core.ProjectKind;
return core.PackageEntry;
}
});
Object.defineProperty(exports, "Project", {
Object.defineProperty(exports, 'ProjectKind', {
enumerable: true,
get: function () {
return _core.Project;
return core.ProjectKind;
}
});
Object.defineProperty(exports, "Package", {
Object.defineProperty(exports, 'Runtime', {
enumerable: true,
get: function () {
return _core.Package;
return core.Runtime;
}
});
Object.defineProperty(exports, "PackageBinary", {
Object.defineProperty(exports, 'Service', {
enumerable: true,
get: function () {
return _core.PackageBinary;
return core.Service;
}
});
Object.defineProperty(exports, "PackageEntry", {
Object.defineProperty(exports, 'TargetBuilder', {
enumerable: true,
get: function () {
return _core.PackageEntry;
return core.TargetBuilder;
}
});
Object.defineProperty(exports, "Service", {
Object.defineProperty(exports, 'TargetRuntime', {
enumerable: true,
get: function () {
return _core.Service;
return core.TargetRuntime;
}
});
Object.defineProperty(exports, "WebApp", {
Object.defineProperty(exports, 'WebApp', {
enumerable: true,
get: function () {
return _core.WebApp;
return core.WebApp;
}
});
Object.defineProperty(exports, "Workspace", {
Object.defineProperty(exports, 'Workspace', {
enumerable: true,
get: function () {
return _core.Workspace;
return core.Workspace;
}
});
Object.defineProperty(exports, "Runtime", {
Object.defineProperty(exports, 'Env', {
enumerable: true,
get: function () {
return _core.Runtime;
return tasks.Env;
}
});
Object.defineProperty(exports, "Task", {
Object.defineProperty(exports, 'Task', {
enumerable: true,
get: function () {
return _tasks.Task;
return tasks.Task;
}
});
Object.defineProperty(exports, "Env", {
Object.defineProperty(exports, 'SeriesHook', {
enumerable: true,
get: function () {
return _tasks.Env;
return hooks.SeriesHook;
}
});
Object.defineProperty(exports, "SeriesHook", {
Object.defineProperty(exports, 'WaterfallHook', {
enumerable: true,
get: function () {
return _hooks.SeriesHook;
return hooks.WaterfallHook;
}
});
Object.defineProperty(exports, "WaterfallHook", {
exports.PLUGIN_MARKER = plugins.PLUGIN_MARKER;
Object.defineProperty(exports, 'PluginTarget', {
enumerable: true,
get: function () {
return _hooks.WaterfallHook;
return plugins.PluginTarget;
}
});
Object.defineProperty(exports, "PLUGIN_MARKER", {
enumerable: true,
get: function () {
return _plugins.PLUGIN_MARKER;
}
});
Object.defineProperty(exports, "PluginTarget", {
enumerable: true,
get: function () {
return _plugins.PluginTarget;
}
});
Object.defineProperty(exports, "createComposedProjectPlugin", {
enumerable: true,
get: function () {
return _plugins.createComposedProjectPlugin;
}
});
Object.defineProperty(exports, "createComposedWorkspacePlugin", {
enumerable: true,
get: function () {
return _plugins.createComposedWorkspacePlugin;
}
});
Object.defineProperty(exports, "createProjectBuildPlugin", {
enumerable: true,
get: function () {
return _plugins.createProjectBuildPlugin;
}
});
Object.defineProperty(exports, "createProjectDevPlugin", {
enumerable: true,
get: function () {
return _plugins.createProjectDevPlugin;
}
});
Object.defineProperty(exports, "createProjectPlugin", {
enumerable: true,
get: function () {
return _plugins.createProjectPlugin;
}
});
Object.defineProperty(exports, "createProjectTestPlugin", {
enumerable: true,
get: function () {
return _plugins.createProjectTestPlugin;
}
});
Object.defineProperty(exports, "createWorkspaceBuildPlugin", {
enumerable: true,
get: function () {
return _plugins.createWorkspaceBuildPlugin;
}
});
Object.defineProperty(exports, "createWorkspaceDevPlugin", {
enumerable: true,
get: function () {
return _plugins.createWorkspaceDevPlugin;
}
});
Object.defineProperty(exports, "createWorkspaceLintPlugin", {
enumerable: true,
get: function () {
return _plugins.createWorkspaceLintPlugin;
}
});
Object.defineProperty(exports, "createWorkspacePlugin", {
enumerable: true,
get: function () {
return _plugins.createWorkspacePlugin;
}
});
Object.defineProperty(exports, "createWorkspaceTestPlugin", {
enumerable: true,
get: function () {
return _plugins.createWorkspaceTestPlugin;
}
});
Object.defineProperty(exports, "createWorkspaceTypeCheckPlugin", {
enumerable: true,
get: function () {
return _plugins.createWorkspaceTypeCheckPlugin;
}
});
Object.defineProperty(exports, "toArgs", {
enumerable: true,
get: function () {
return _utilities.toArgs;
}
});
Object.defineProperty(exports, "addHooks", {
enumerable: true,
get: function () {
return _utilities.addHooks;
}
});
Object.defineProperty(exports, "projectTypeSwitch", {
enumerable: true,
get: function () {
return _utilities.projectTypeSwitch;
}
});
Object.defineProperty(exports, "unwrapPossibleGetter", {
enumerable: true,
get: function () {
return _utilities.unwrapPossibleGetter;
}
});
Object.defineProperty(exports, "unwrapPossibleArrayGetter", {
enumerable: true,
get: function () {
return _utilities.unwrapPossibleArrayGetter;
}
});
Object.defineProperty(exports, "MissingPluginError", {
enumerable: true,
get: function () {
return _errors.MissingPluginError;
}
});
var _core = require("@sewing-kit/core");
var _tasks = require("@sewing-kit/tasks");
var _hooks = require("@sewing-kit/hooks");
var _plugins = require("./plugins.js");
var _utilities = require("./utilities.js");
var _errors = require("./errors.js");
exports.createComposedProjectPlugin = plugins.createComposedProjectPlugin;
exports.createComposedWorkspacePlugin = plugins.createComposedWorkspacePlugin;
exports.createProjectBuildPlugin = plugins.createProjectBuildPlugin;
exports.createProjectDevPlugin = plugins.createProjectDevPlugin;
exports.createProjectPlugin = plugins.createProjectPlugin;
exports.createProjectTestPlugin = plugins.createProjectTestPlugin;
exports.createWorkspaceBuildPlugin = plugins.createWorkspaceBuildPlugin;
exports.createWorkspaceDevPlugin = plugins.createWorkspaceDevPlugin;
exports.createWorkspaceLintPlugin = plugins.createWorkspaceLintPlugin;
exports.createWorkspacePlugin = plugins.createWorkspacePlugin;
exports.createWorkspaceTestPlugin = plugins.createWorkspaceTestPlugin;
exports.createWorkspaceTypeCheckPlugin = plugins.createWorkspaceTypeCheckPlugin;
exports.addHooks = utilities.addHooks;
exports.projectTypeSwitch = utilities.projectTypeSwitch;
exports.toArgs = utilities.toArgs;
exports.unwrapPossibleArrayGetter = utilities.unwrapPossibleArrayGetter;
exports.unwrapPossibleGetter = utilities.unwrapPossibleGetter;
exports.MissingPluginError = errors.MissingPluginError;

@@ -1,15 +0,7 @@

"use strict";
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createProjectPlugin = createProjectPlugin;
exports.createComposedProjectPlugin = createComposedProjectPlugin;
exports.createWorkspacePlugin = createWorkspacePlugin;
exports.createComposedWorkspacePlugin = createComposedWorkspacePlugin;
exports.createWorkspaceLintPlugin = exports.createWorkspaceTypeCheckPlugin = exports.createWorkspaceTestPlugin = exports.createWorkspaceDevPlugin = exports.createWorkspaceBuildPlugin = exports.createProjectTestPlugin = exports.createProjectDevPlugin = exports.createProjectBuildPlugin = exports.PluginTarget = exports.PLUGIN_MARKER = void 0;
Object.defineProperty(exports, '__esModule', { value: true });
const PLUGIN_MARKER = Symbol('SewingKit.Plugin');
exports.PLUGIN_MARKER = PLUGIN_MARKER;
let PluginTarget;
exports.PluginTarget = PluginTarget;
exports.PluginTarget = void 0;

@@ -19,3 +11,3 @@ (function (PluginTarget) {

PluginTarget[PluginTarget["Workspace"] = 1] = "Workspace";
})(PluginTarget || (exports.PluginTarget = PluginTarget = {}));
})(exports.PluginTarget || (exports.PluginTarget = {}));

@@ -26,7 +18,6 @@ function createProjectPlugin(id, run) {

run,
target: PluginTarget.Project,
target: exports.PluginTarget.Project,
[PLUGIN_MARKER]: true
};
}
const createProjectBuildPlugin = (id, run) => createProjectPlugin(id, ({

@@ -40,5 +31,2 @@ tasks,

});
exports.createProjectBuildPlugin = createProjectBuildPlugin;
const createProjectDevPlugin = (id, run) => createProjectPlugin(id, ({

@@ -52,5 +40,2 @@ tasks,

});
exports.createProjectDevPlugin = createProjectDevPlugin;
const createProjectTestPlugin = (id, run) => createProjectPlugin(id, ({

@@ -64,5 +49,2 @@ tasks,

});
exports.createProjectTestPlugin = createProjectTestPlugin;
function createComposedProjectPlugin(id, pluginsOrCompose) {

@@ -77,7 +59,6 @@ const compose = typeof pluginsOrCompose === 'function' ? pluginsOrCompose : composer => {

compose,
target: PluginTarget.Project,
target: exports.PluginTarget.Project,
[PLUGIN_MARKER]: true
};
}
function createWorkspacePlugin(id, run) {

@@ -87,7 +68,6 @@ return {

run,
target: PluginTarget.Workspace,
target: exports.PluginTarget.Workspace,
[PLUGIN_MARKER]: true
};
}
const createWorkspaceBuildPlugin = (id, run) => createWorkspacePlugin(id, ({

@@ -101,5 +81,2 @@ tasks,

});
exports.createWorkspaceBuildPlugin = createWorkspaceBuildPlugin;
const createWorkspaceDevPlugin = (id, run) => createWorkspacePlugin(id, ({

@@ -113,5 +90,2 @@ tasks,

});
exports.createWorkspaceDevPlugin = createWorkspaceDevPlugin;
const createWorkspaceTestPlugin = (id, run) => createWorkspacePlugin(id, ({

@@ -125,5 +99,2 @@ tasks,

});
exports.createWorkspaceTestPlugin = createWorkspaceTestPlugin;
const createWorkspaceTypeCheckPlugin = (id, run) => createWorkspacePlugin(id, ({

@@ -137,5 +108,2 @@ tasks,

});
exports.createWorkspaceTypeCheckPlugin = createWorkspaceTypeCheckPlugin;
const createWorkspaceLintPlugin = (id, run) => createWorkspacePlugin(id, ({

@@ -149,5 +117,2 @@ tasks,

});
exports.createWorkspaceLintPlugin = createWorkspaceLintPlugin;
function createComposedWorkspacePlugin(id, pluginsOrCompose) {

@@ -162,5 +127,19 @@ const compose = typeof pluginsOrCompose === 'function' ? pluginsOrCompose : composer => {

compose,
target: PluginTarget.Workspace,
target: exports.PluginTarget.Workspace,
[PLUGIN_MARKER]: true
};
}
}
exports.PLUGIN_MARKER = PLUGIN_MARKER;
exports.createComposedProjectPlugin = createComposedProjectPlugin;
exports.createComposedWorkspacePlugin = createComposedWorkspacePlugin;
exports.createProjectBuildPlugin = createProjectBuildPlugin;
exports.createProjectDevPlugin = createProjectDevPlugin;
exports.createProjectPlugin = createProjectPlugin;
exports.createProjectTestPlugin = createProjectTestPlugin;
exports.createWorkspaceBuildPlugin = createWorkspaceBuildPlugin;
exports.createWorkspaceDevPlugin = createWorkspaceDevPlugin;
exports.createWorkspaceLintPlugin = createWorkspaceLintPlugin;
exports.createWorkspacePlugin = createWorkspacePlugin;
exports.createWorkspaceTestPlugin = createWorkspaceTestPlugin;
exports.createWorkspaceTypeCheckPlugin = createWorkspaceTypeCheckPlugin;

@@ -1,16 +0,8 @@

"use strict";
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.projectTypeSwitch = projectTypeSwitch;
exports.toArgs = toArgs;
exports.addHooks = addHooks;
exports.unwrapPossibleGetter = unwrapPossibleGetter;
exports.unwrapPossibleArrayGetter = unwrapPossibleArrayGetter;
Object.defineProperty(exports, '__esModule', { value: true });
var _changeCase = require("change-case");
var changeCase = require('change-case');
var core = require('@sewing-kit/core');
var _core = require("@sewing-kit/core");
function projectTypeSwitch(project, {

@@ -21,11 +13,10 @@ package: pkg,

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

@@ -37,3 +28,3 @@ dasherize = false,

const newArgs = [];
const normalizedKey = dasherize ? (0, _changeCase.paramCase)(key) : key;
const normalizedKey = dasherize ? changeCase.paramCase(key) : key;

@@ -57,3 +48,2 @@ if (typeof value === 'boolean') {

}
function addHooks(adder) {

@@ -64,10 +54,14 @@ return hooks => ({ ...hooks,

}
function unwrapPossibleGetter(maybeGetter, ...args) {
return typeof maybeGetter === 'function' ? maybeGetter(...args) : maybeGetter;
}
async function unwrapPossibleArrayGetter(maybeGetter, ...args) {
const result = await unwrapPossibleGetter(maybeGetter, ...args);
return Array.isArray(result) ? result : [result];
}
}
exports.addHooks = addHooks;
exports.projectTypeSwitch = projectTypeSwitch;
exports.toArgs = toArgs;
exports.unwrapPossibleArrayGetter = unwrapPossibleArrayGetter;
exports.unwrapPossibleGetter = unwrapPossibleGetter;

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

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

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

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

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 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 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 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;

"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 });

@@ -14,0 +3,0 @@ exports.createComposedWorkspacePlugin = exports.createWorkspaceLintPlugin = exports.createWorkspaceTypeCheckPlugin = exports.createWorkspaceTestPlugin = exports.createWorkspaceDevPlugin = exports.createWorkspaceBuildPlugin = exports.createWorkspacePlugin = exports.createComposedProjectPlugin = exports.createProjectTestPlugin = exports.createProjectDevPlugin = exports.createProjectBuildPlugin = exports.createProjectPlugin = exports.PluginTarget = exports.PLUGIN_MARKER = void 0;

MIT License
Copyright (c) 2019 Chris Sauve
Copyright (c) 2019-present Shopify

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

{
"name": "@sewing-kit/plugins",
"license": "MIT",
"version": "0.1.10",
"version": "0.2.0-alpha.1",
"sideEffects": false,

@@ -10,2 +10,5 @@ "publishConfig": {

},
"engines": {
"node": "^12.22.0 || >=14.17.0"
},
"scripts": {

@@ -15,8 +18,8 @@ "build": "tsc --p tsconfig.json"

"dependencies": {
"@sewing-kit/core": "^0.3.0",
"@sewing-kit/hooks": "^0.1.10",
"@sewing-kit/tasks": "^0.1.10",
"@sewing-kit/core": "^0.4.0-alpha.1",
"@sewing-kit/hooks": "^0.2.0-alpha.1",
"@sewing-kit/tasks": "^0.2.0-alpha.1",
"change-case": "^4.1.0"
},
"gitHead": "96bbda25e7461b4a484cfafdd79abde2e39dc12e"
"gitHead": "aabbbc30e295acfdb823e2e37c4b862e5c44b68e"
}

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

ProjectKind,
Project,
Package,

@@ -29,2 +28,3 @@ PackageBinary,

} from '@sewing-kit/core';
export type {Project} from '@sewing-kit/core';

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

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