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

@sketch-hq/sketch-assistant-types

Package Overview
Dependencies
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 5.0.0-next.18 to 5.0.0-next.19

10

CHANGELOG.md
# @sketch-hq/sketch-assistant-types
## 5.0.0-next.19
### Minor Changes
- c802b6b: Support an ignore config in the Assistants workspace.
### Patch Changes
- a004097: Update to latest file format and remove some @ts-ignore directives.
## 5.0.0-next.18

@@ -4,0 +14,0 @@

61

dist/types.d.ts

@@ -75,4 +75,8 @@ import { FileFormat3 } from '@sketch-hq/sketch-file-format-ts';

*/
export declare type PointerMap = WeakMap<SketchFileObject, JsonPointer>;
export declare type PointerMap = Map<SketchFileObject, JsonPointer>;
/**
* A record of all object ids found in the file.
*/
export declare type ObjectIdSet = Set<string>;
/**
* A cache of Sketch file objects. Each key is a `_class` value from the file

@@ -114,2 +118,6 @@ * format, and the corresponding value is an array of file objects with matching

/**
* A set of all object ids found in the file.
*/
objectIds: ObjectIdSet;
/**
* The SketchFile that was processed.

@@ -133,2 +141,32 @@ */

/**
* The expected shape of the Sketch file workspace used with Assistants. This is
* where Sketch persists a file's Assistants configuration. First and foremost
* it's a valid package.json, with the dependencies specifying the active
* Assistants - every dependency is expected to be a package exporting a valid
* Assistant on its default export. It additionally persists what's being
* ignored during the Assistant runs.
*/
export declare type Workspace = PackageJson & {
ignore?: IgnoreConfig;
};
/**
* Information about what to ignore during an Assistant run. Pages can be
* ignored entirely, whereas Assistant rules can either be ignored entirely too,
* or only ignored for certain file objects.
*/
export declare type IgnoreConfig = {
pages: string[];
assistants: {
[assistantName: string]: {
rules: {
[ruleName: string]: {
allObjects: true;
} | {
objects: string[];
};
};
};
};
};
/**
* Contains a flag indicating whether the run operation has been cancelled by

@@ -145,3 +183,5 @@ * the outer environment. All long running processes happening during a run

/**
* A map of Assistant packages, keyed by name.
* A map of Assistant packages, keyed by Assistant package name. Since the
* package map is often supplied externally, by an outer layer (e.g. by Sketch
* to the Assistant runner) we type the packages as unknown.
*/

@@ -161,2 +201,6 @@ export declare type AssistantPackageMap = {

/**
* What to ignore during the run.
*/
ignore: IgnoreConfig;
/**
* Processed Sketch file to run the Assistants against.

@@ -188,2 +232,8 @@ */

/**
* Ignore directives are pruned during the run to remove orphaned data
* (non-existant pages, assistants, rules and objects), and returned in the
* output.
*/
ignore: IgnoreConfig;
/**
* Results per Assistant.

@@ -340,2 +390,9 @@ * "error": The Assistant run failed entirely.

/**
* Determine if a given Sketch file object has been ignored in the run's IgnoreConfig. Ignored
* objects are automatically filtered out while iterating objects, however if you use a different
* mechanism to traverse the Sketch file you should manually determine whether an object is ignored
* before reporting it in a violation.
*/
isObjectIgnoredForRule: (object: SketchFileObject) => boolean;
/**
* Get a rule option value by name. Should throw if the rule hasn’t been configured properly in

@@ -342,0 +399,0 @@ * the current assistant context, since it’s essential that every rule activated in an assistant is

4

package.json
{
"name": "@sketch-hq/sketch-assistant-types",
"version": "5.0.0-next.18",
"version": "5.0.0-next.19",
"main": "dist/types",

@@ -23,5 +23,5 @@ "types": "dist/types",

"@schemastore/package": "0.0.5",
"@sketch-hq/sketch-file-format-ts": "5.0.0",
"@sketch-hq/sketch-file-format-ts": "5.1.1",
"@types/json-schema": "7.0.4"
}
}

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