shortcutkit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ export type PlistValue = string | number | boolean | PlistValue[] | {
2
+ [key: string]: PlistValue;
3
+ };
4
+ export declare function toXmlPlist(root: PlistValue): string;
@@ -0,0 +1,21 @@
1
+ export interface Provenance {
2
+ extractedAt: string;
3
+ macOS: {
4
+ version: string;
5
+ build: string;
6
+ arch: string;
7
+ };
8
+ shortcutsApp: {
9
+ version: string;
10
+ build: string;
11
+ };
12
+ workflowKit: string;
13
+ counts: {
14
+ builtinActions: number;
15
+ identifierStrings: number;
16
+ appProvidedActions: number;
17
+ };
18
+ note?: string;
19
+ }
20
+ /** Provenance of the bundled action data. */
21
+ export declare const provenance: Provenance;
@@ -0,0 +1,59 @@
1
+ import type { PlistValue } from "./plist.js";
2
+ export type Attachment = {
3
+ WFSerializationType: "WFTextTokenAttachment";
4
+ Value: Record<string, PlistValue>;
5
+ };
6
+ export type TokenString = {
7
+ WFSerializationType: "WFTextTokenString";
8
+ Value: {
9
+ string: string;
10
+ attachmentsByRange: Record<string, Record<string, PlistValue>>;
11
+ };
12
+ };
13
+ export type Picker = {
14
+ Type: "Variable";
15
+ Variable: Attachment;
16
+ };
17
+ export type DictionaryValue = {
18
+ WFSerializationType: "WFDictionaryFieldValue";
19
+ Value: {
20
+ WFDictionaryFieldValueItems: Array<{
21
+ WFItemType: number;
22
+ WFKey: TokenString;
23
+ WFValue: TokenString | DictionaryValue;
24
+ }>;
25
+ };
26
+ };
27
+ export type QuantityValue = {
28
+ WFSerializationType: "WFQuantityFieldValue";
29
+ Value: {
30
+ Unit: string;
31
+ Magnitude?: number | TokenString;
32
+ };
33
+ };
34
+ export type FilterTemplateValue = {
35
+ WFSerializationType: "WFContentPredicateTableTemplate";
36
+ Value: {
37
+ WFActionParameterFilterPrefix: 0 | 1;
38
+ WFContentPredicateBoundedDate?: boolean;
39
+ WFActionParameterFilterTemplates: Array<{
40
+ Property: string;
41
+ Operator: number;
42
+ Removable?: boolean;
43
+ Bounded?: boolean;
44
+ Values: Record<string, PlistValue | TokenString>;
45
+ }>;
46
+ };
47
+ };
48
+ export type Value = PlistValue | Attachment | TokenString | Picker | DictionaryValue | QuantityValue | FilterTemplateValue;
49
+ /** Keeps literal suggestions in editors while still accepting any string. */
50
+ export type Loose<T extends string> = T | (string & {});
51
+ export type BoolValue = boolean | Attachment;
52
+ export type NumberValue = number | Attachment;
53
+ export type StringValue = string | Attachment;
54
+ export type EnumValue<T extends string> = Loose<T> | Attachment;
55
+ export type TextValue = string | TokenString | Attachment;
56
+ export type PickerValue = Picker | Attachment;
57
+ export type PlainString = string;
58
+ export type PlainNumber = number;
59
+ export type AnyValue = Value;
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "shortcutkit",
3
+ "version": "0.1.0",
4
+ "description": "Build, validate and sign Apple Shortcuts files. Every built-in action typed, straight from the Shortcuts engine.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "README.md",
17
+ "LICENSE"
18
+ ],
19
+ "scripts": {
20
+ "build": "bun build src/index.ts --outdir dist --target node --format esm && tsc -p tsconfig.build.json",
21
+ "prepare": "bun run build",
22
+ "test": "bun test",
23
+ "typecheck": "tsc --noEmit -p .",
24
+ "demo": "bun run src/cli.ts demo",
25
+ "extract": "./tools/extract-builtin-actions.sh",
26
+ "diff-data": "python3 tools/diff-data.py",
27
+ "changelog": "python3 tools/diff-data.py --changelog"
28
+ },
29
+ "devDependencies": {
30
+ "@types/bun": "^1.4",
31
+ "typescript": "^5"
32
+ },
33
+ "license": "MIT",
34
+ "author": "frontboat",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "https://github.com/frontboat/shortcutkit"
38
+ },
39
+ "homepage": "https://github.com/frontboat/shortcutkit#readme",
40
+ "keywords": [
41
+ "apple",
42
+ "shortcuts",
43
+ "workflow",
44
+ "automation",
45
+ "macos",
46
+ "ios",
47
+ "plist"
48
+ ],
49
+ "engines": {
50
+ "node": ">=20"
51
+ }
52
+ }