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

@sketch-hq/sketch-assistant-utils

Package Overview
Dependencies
Maintainers
3
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sketch-hq/sketch-assistant-utils - npm Package Compare versions

Comparing version 5.0.0-next.4 to 5.0.0-next.5

6

CHANGELOG.md
# @sketch-hq/sketch-assistant-utils
## 5.0.0-next.5
### Patch Changes
- 9212903: Handle Assistants exported as ESM default exports
## 5.0.0-next.4

@@ -4,0 +10,0 @@

4

dist/cjs/assistant/index.d.ts

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

import { AssistantDefinition, Assistant, AssistantEnv, Maybe, RuleDefinition, ESModuleInterop } from '@sketch-hq/sketch-assistant-types';
import { AssistantDefinition, Assistant, AssistantEnv, Maybe, RuleDefinition } from '@sketch-hq/sketch-assistant-types';
/**

@@ -24,3 +24,3 @@ * Merge assistant definitions together to form a single assistant definition, with a syntax similar

*/
declare const prepare: (source: import("@sketch-hq/sketch-assistant-types").ValueOrArray<Assistant | ESModuleInterop<Assistant>>, env: AssistantEnv) => Promise<AssistantDefinition>;
declare const prepare: (pkgExport: import("@sketch-hq/sketch-assistant-types").MaybeESModule<import("@sketch-hq/sketch-assistant-types").ValueOrArray<import("@sketch-hq/sketch-assistant-types").MaybeESModule<Assistant>>>, env: AssistantEnv) => Promise<AssistantDefinition>;
/**

@@ -27,0 +27,0 @@ * Lookup a rule definition by rule name.

@@ -45,4 +45,5 @@ "use strict";

*/
const prepare = (source, env) => __awaiter(void 0, void 0, void 0, function* () {
const definitions = yield Promise.all((Array.isArray(source) ? source : [source])
const prepare = (pkgExport, env) => __awaiter(void 0, void 0, void 0, function* () {
const assistant = '__esModule' in pkgExport ? pkgExport.default : pkgExport;
const definitions = yield Promise.all((Array.isArray(assistant) ? assistant : [assistant])
.flat(Infinity)

@@ -49,0 +50,0 @@ .map((item) => {

@@ -44,4 +44,4 @@ import { FileFormat, Assistant, RuleOptionsCreator, RuleFunction, RuleDefinition, AssistantDefinition, AssistantConfig, ViolationSeverity, RuleConfigGroup, AssistantEnv, AssistantResult, RuleConfig } from '@sketch-hq/sketch-assistant-types';

};
export declare const testRule: (filepath: string, assistant: import("@sketch-hq/sketch-assistant-types").ValueOrArray<Assistant | import("@sketch-hq/sketch-assistant-types").ESModuleInterop<Assistant>>, ruleName: string, ruleConfig?: RuleConfig, env?: AssistantEnv) => Promise<AssistantResult>;
export declare const testRule: (filepath: string, assistant: import("@sketch-hq/sketch-assistant-types").MaybeESModule<import("@sketch-hq/sketch-assistant-types").ValueOrArray<import("@sketch-hq/sketch-assistant-types").MaybeESModule<Assistant>>>, ruleName: string, ruleConfig?: RuleConfig, env?: AssistantEnv) => Promise<AssistantResult>;
export { createRule, createDummyRectNode, createAssistantConfig, createAssistant, createAssistantDefinition, };
//# sourceMappingURL=index.d.ts.map

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

import { AssistantDefinition, Assistant, AssistantEnv, Maybe, RuleDefinition, ESModuleInterop } from '@sketch-hq/sketch-assistant-types';
import { AssistantDefinition, Assistant, AssistantEnv, Maybe, RuleDefinition } from '@sketch-hq/sketch-assistant-types';
/**

@@ -24,3 +24,3 @@ * Merge assistant definitions together to form a single assistant definition, with a syntax similar

*/
declare const prepare: (source: import("@sketch-hq/sketch-assistant-types").ValueOrArray<Assistant | ESModuleInterop<Assistant>>, env: AssistantEnv) => Promise<AssistantDefinition>;
declare const prepare: (pkgExport: import("@sketch-hq/sketch-assistant-types").MaybeESModule<import("@sketch-hq/sketch-assistant-types").ValueOrArray<import("@sketch-hq/sketch-assistant-types").MaybeESModule<Assistant>>>, env: AssistantEnv) => Promise<AssistantDefinition>;
/**

@@ -27,0 +27,0 @@ * Lookup a rule definition by rule name.

@@ -42,4 +42,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

*/
const prepare = (source, env) => __awaiter(void 0, void 0, void 0, function* () {
const definitions = yield Promise.all((Array.isArray(source) ? source : [source])
const prepare = (pkgExport, env) => __awaiter(void 0, void 0, void 0, function* () {
const assistant = '__esModule' in pkgExport ? pkgExport.default : pkgExport;
const definitions = yield Promise.all((Array.isArray(assistant) ? assistant : [assistant])
.flat(Infinity)

@@ -46,0 +47,0 @@ .map((item) => {

@@ -44,4 +44,4 @@ import { FileFormat, Assistant, RuleOptionsCreator, RuleFunction, RuleDefinition, AssistantDefinition, AssistantConfig, ViolationSeverity, RuleConfigGroup, AssistantEnv, AssistantResult, RuleConfig } from '@sketch-hq/sketch-assistant-types';

};
export declare const testRule: (filepath: string, assistant: import("@sketch-hq/sketch-assistant-types").ValueOrArray<Assistant | import("@sketch-hq/sketch-assistant-types").ESModuleInterop<Assistant>>, ruleName: string, ruleConfig?: RuleConfig, env?: AssistantEnv) => Promise<AssistantResult>;
export declare const testRule: (filepath: string, assistant: import("@sketch-hq/sketch-assistant-types").MaybeESModule<import("@sketch-hq/sketch-assistant-types").ValueOrArray<import("@sketch-hq/sketch-assistant-types").MaybeESModule<Assistant>>>, ruleName: string, ruleConfig?: RuleConfig, env?: AssistantEnv) => Promise<AssistantResult>;
export { createRule, createDummyRectNode, createAssistantConfig, createAssistant, createAssistantDefinition, };
//# sourceMappingURL=index.d.ts.map
{
"name": "@sketch-hq/sketch-assistant-utils",
"version": "5.0.0-next.4",
"version": "5.0.0-next.5",
"module": "dist/esm/index",

@@ -30,3 +30,3 @@ "main": "dist/cjs/index",

"@json-schema-spec/json-pointer": "0.1.2",
"@sketch-hq/sketch-assistant-types": "3.0.0-next.3",
"@sketch-hq/sketch-assistant-types": "3.0.0-next.4",
"ajv": "6.12.0",

@@ -33,0 +33,0 @@ "humps": "2.0.1",

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

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