Skip to content

Commit

Permalink
add shortcuts generator
Browse files Browse the repository at this point in the history
  • Loading branch information
lukesthl committed Jan 2, 2024
1 parent 515318d commit 5c998c3
Show file tree
Hide file tree
Showing 9 changed files with 337 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"fix": "manypkg fix",
"lint": "pnpm run --filter \"{apps/*}\" --stream --parallel lint",
"format": "pnpm run --filter \"{apps/*}\" --stream --parallel format",
"build": "pnpm run --filter \"{apps/*}\" --stream --parallel build",
"build": "pnpm run --filter \"{packages/*}\" --stream --parallel build",
"start:prod": "node dist/main",
"upgrade:tamagui": "pnpm up '*tamagui*'@latest '@tamagui/*'@latest react-native-web-lite@latest",
"check-deps": "check-dependency-version-consistency ."
Expand Down
1 change: 1 addition & 0 deletions packages/shortcuts-generator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
19 changes: 19 additions & 0 deletions packages/shortcuts-generator/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@acme/shortcuts-generator",
"version": "1.0.0",
"description": "Generates shortcuts",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"scripts": {
"build": "rm -rf build && tsc",
"clean": "rm -rf .turbo node_modules",
"format": "prettier --check \"**/*.{mjs,ts,md,json}\"",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@acme/prettier-config": "^0.1.0",
"@acme/tsconfig": "^0.1.0",
"typescript": "^5.3.3"
},
"prettier": "@acme/prettier-config"
}
4 changes: 4 additions & 0 deletions packages/shortcuts-generator/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import apps from "../../../public/apps.json";

export { apps };
// generate the shortcuts for the apps
20 changes: 20 additions & 0 deletions packages/shortcuts-generator/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"exclude": ["lib/**/*.spec.tsx", "lib/**/*.stories.tsx", "lib/**/*.styles.tsx", "build/**/*"],
"compilerOptions": {
"skipLibCheck": true,
"target": "es6",
"module": "es6",
"lib": ["es6", "dom"],
"jsx": "react",
"resolveJsonModule": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"outDir": "build",
"rootDirs": ["src"],
"strict": true,
"moduleResolution": "node",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
}
}
2 changes: 1 addition & 1 deletion packages/target-plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
./build
build
15 changes: 15 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

122 changes: 122 additions & 0 deletions public/apps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
[
{
"key": "instagram",
"name": "Instagram",
"scheme": "instagram://"
},
{
"key": "facebook",
"name": "Facebook",
"scheme": "fb://"
},
{
"key": "twitter",
"name": "Twitter",
"scheme": "twitter://"
},
{
"key": "snapchat",
"name": "Snapchat",
"scheme": "snapchat://"
},
{
"key": "linkedin",
"name": "LinkedIn",
"scheme": "linkedin://"
},
{
"key": "pinterest",
"name": "Pinterest",
"scheme": "pinterest://"
},
{
"key": "youtube",
"name": "YouTube",
"scheme": "youtube://"
},
{
"key": "whatsapp",
"name": "WhatsApp",
"scheme": "whatsapp://"
},
{
"key": "tiktok",
"name": "TikTok",
"scheme": "tiktok://"
},
{
"key": "spotify",
"name": "Spotify",
"scheme": "spotify://"
},
{
"key": "twitch",
"name": "Twitch",
"scheme": "twitch://"
},
{
"key": "reddit",
"name": "Reddit",
"scheme": "reddit://"
},
{
"key": "telegram",
"name": "Telegram",
"scheme": "telegram://"
},
{
"key": "discord",
"name": "Discord",
"scheme": "discord://"
},
{
"key": "safari",
"name": "Safari",
"scheme": "https://google.com"
},
{
"key": "breal",
"name": "Breal",
"scheme": "breal://"
},
{
"key": "clashroyale",
"name": "Clash Royale",
"scheme": "clashroyale://"
},
{
"key": "clashofclans",
"name": "Clash of Clans",
"scheme": "clashofclans://"
},
{
"key": "netflix",
"name": "Netflix",
"scheme": "netflix://"
},
{
"key": "tinder",
"name": "Tinder",
"scheme": "tinder://"
},
{
"key": "candycrushsaga",
"name": "Candy Crush Saga",
"scheme": "candycrushsaga://"
},
{
"key": "disney+",
"name": "Disney+",
"scheme": "disney+://"
},
{
"key": "outlook",
"name": "Outlook",
"scheme": "ms-outlook://"
},
{
"key": "mastodon",
"name": "Mastodon",
"scheme": "mastodon://"
}
]
154 changes: 154 additions & 0 deletions public/shortcut.template.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>WFQuickActionSurfaces</key>
<array/>
<key>WFWorkflowActions</key>
<array>
<dict>
<key>WFWorkflowActionIdentifier</key>
<string>com.lukesthl.digitalbreak.DigitalBreak</string>
<key>WFWorkflowActionParameters</key>
<dict>
<key>AppIntentDescriptor</key>
<dict>
<key>AppIntentIdentifier</key>
<string>DigitalBreak</string>
<key>BundleIdentifier</key>
<string>com.lukesthl.digitalbreak</string>
<key>Name</key>
<string>digitalbreak</string>
<key>TeamIdentifier</key>
<string>3X5J8LXMDM</string>
</dict>
<key>OpenWhenRun</key>
<false/>
<key>UUID</key>
<string>63E357CB-003D-4D34-B5A8-2C4EC6D73D81</string>
<key>appPrompt</key>
<string>Instagram</string>
</dict>
</dict>
<dict>
<key>WFWorkflowActionIdentifier</key>
<string>is.workflow.actions.conditional</string>
<key>WFWorkflowActionParameters</key>
<dict>
<key>GroupingIdentifier</key>
<string>4F582243-164B-4BBE-8DF0-AA8CF6C7B5B5</string>
<key>WFCondition</key>
<integer>4</integer>
<key>WFControlFlowMode</key>
<integer>0</integer>
<key>WFInput</key>
<dict>
<key>Type</key>
<string>Variable</string>
<key>Variable</key>
<dict>
<key>Value</key>
<dict>
<key>OutputName</key>
<string>Activate Digital Break when an app opens</string>
<key>OutputUUID</key>
<string>63E357CB-003D-4D34-B5A8-2C4EC6D73D81</string>
<key>Type</key>
<string>ActionOutput</string>
</dict>
<key>WFSerializationType</key>
<string>WFTextTokenAttachment</string>
</dict>
</dict>
</dict>
</dict>
<dict>
<key>WFWorkflowActionIdentifier</key>
<string>com.lukesthl.digitalbreak.OpenAppIntent</string>
<key>WFWorkflowActionParameters</key>
<dict>
<key>AppIntentDescriptor</key>
<dict>
<key>AppIntentIdentifier</key>
<string>OpenAppIntent</string>
<key>BundleIdentifier</key>
<string>com.lukesthl.digitalbreak</string>
<key>Name</key>
<string>digitalbreak</string>
<key>TeamIdentifier</key>
<string>3X5J8LXMDM</string>
</dict>
<key>UUID</key>
<string>C2634DF8-0CFC-400F-B39E-47AFB2A7EB59</string>
</dict>
</dict>
<dict>
<key>WFWorkflowActionIdentifier</key>
<string>is.workflow.actions.conditional</string>
<key>WFWorkflowActionParameters</key>
<dict>
<key>GroupingIdentifier</key>
<string>4F582243-164B-4BBE-8DF0-AA8CF6C7B5B5</string>
<key>WFControlFlowMode</key>
<integer>1</integer>
</dict>
</dict>
<dict>
<key>WFWorkflowActionIdentifier</key>
<string>is.workflow.actions.conditional</string>
<key>WFWorkflowActionParameters</key>
<dict>
<key>GroupingIdentifier</key>
<string>4F582243-164B-4BBE-8DF0-AA8CF6C7B5B5</string>
<key>WFControlFlowMode</key>
<integer>2</integer>
</dict>
</dict>
</array>
<key>WFWorkflowClientVersion</key>
<string>2106.0.3</string>
<key>WFWorkflowHasOutputFallback</key>
<false/>
<key>WFWorkflowHasShortcutInputVariables</key>
<false/>
<key>WFWorkflowIcon</key>
<dict>
<key>WFWorkflowIconGlyphNumber</key>
<integer>61456</integer>
<key>WFWorkflowIconStartColor</key>
<integer>946986751</integer>
</dict>
<key>WFWorkflowImportQuestions</key>
<array/>
<key>WFWorkflowInputContentItemClasses</key>
<array>
<string>WFAppContentItem</string>
<string>WFAppStoreAppContentItem</string>
<string>WFArticleContentItem</string>
<string>WFContactContentItem</string>
<string>WFDateContentItem</string>
<string>WFEmailAddressContentItem</string>
<string>WFFolderContentItem</string>
<string>WFGenericFileContentItem</string>
<string>WFImageContentItem</string>
<string>WFiTunesProductContentItem</string>
<string>WFLocationContentItem</string>
<string>WFDCMapsLinkContentItem</string>
<string>WFAVAssetContentItem</string>
<string>WFPDFContentItem</string>
<string>WFPhoneNumberContentItem</string>
<string>WFRichTextContentItem</string>
<string>WFSafariWebPageContentItem</string>
<string>WFStringContentItem</string>
<string>WFURLContentItem</string>
</array>
<key>WFWorkflowMinimumClientVersion</key>
<integer>900</integer>
<key>WFWorkflowMinimumClientVersionString</key>
<string>900</string>
<key>WFWorkflowOutputContentItemClasses</key>
<array/>
<key>WFWorkflowTypes</key>
<array/>
</dict>
</plist>

0 comments on commit 5c998c3

Please sign in to comment.