-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ee9ddb
commit 984ea47
Showing
28 changed files
with
2,008 additions
and
5,755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,11 @@ | ||
{ | ||
"importOrder": ["^(node:)", "^(@.*)", "<THIRD_PARTY_MODULES>", "^[./]"], | ||
"experimentalTernaries": true, | ||
"importOrder": ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"], | ||
"importOrderGroupNamespaceSpecifiers": true, | ||
"importOrderSeparation": true, | ||
"importOrderSortSpecifiers": true, | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"*.config.mjs", | ||
"*.config.ts", | ||
"*.json", | ||
"*.yml", | ||
".markdownlintrc" | ||
], | ||
"options": { | ||
"tabWidth": 2 | ||
} | ||
}, | ||
{ | ||
"files": ["*.md"], | ||
"options": { | ||
"tabWidth": 2 | ||
} | ||
} | ||
], | ||
"plugins": ["@trivago/prettier-plugin-sort-imports"], | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 4, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"recommendations": [ | ||
"streetsidesoftware.code-spell-checker", | ||
"editorconfig.editorconfig", | ||
"dbaeumer.vscode-eslint", | ||
"github.vscode-github-actions", | ||
"davidanson.vscode-markdownlint", | ||
"esbenp.prettier-vscode", | ||
"orta.vscode-jest", | ||
"github.vscode-github-actions", | ||
"editorconfig.editorconfig" | ||
"vitest.explorer" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
{ | ||
"[yaml]": { | ||
"editor.defaultFormatter": "redhat.vscode-yaml" | ||
}, | ||
"cSpell.diagnosticLevel": "Hint", | ||
"cSpell.mergeCSpellSettings": false, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"eslint.experimental.useFlatConfig": true, | ||
"eslint.useFlatConfig": true, | ||
"explorer.fileNesting.enabled": true, | ||
"explorer.fileNesting.expand": false, | ||
"explorer.fileNesting.patterns": { | ||
"package.json": ".eslint*, .markdown*, .prettierrc*, .yarnrc*, cspell*, eslint*, jest*, webpack*, yarn.lock" | ||
"package.json": ".eslint*, .markdown*, .prettierrc*, .yarnrc*, cspell*, eslint*, jest*, rollup*, webpack*, yarn.lock" | ||
}, | ||
"jest.outputConfig": "test-results-based", | ||
"jest.runMode": "on-demand", | ||
"markdownlint.config": { | ||
"extends": "./.markdownlintrc" | ||
}, | ||
"material-icon-theme.files.associations": { | ||
".markdownlintrc": "Settings", | ||
"cspell.json": "Settings" | ||
".markdownlintrc": "settings", | ||
"cspell.json": "settings" | ||
}, | ||
"material-icon-theme.folders.associations": { | ||
"dicts": "Docs" | ||
} | ||
"dicts": "docs" | ||
}, | ||
"prettier.prettierPath": "./node_modules/prettier", | ||
"prettier.requireConfig": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
enableTelemetry: false | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// @ts-check | ||
|
||
/** @type {import('rollup').RollupOptions} */ | ||
const config = { | ||
input: './src/index.ts', | ||
output: { | ||
file: './build/bundle.js', | ||
format: 'commonjs', | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
interface Application { | ||
closeAccess: (path: string) => void; | ||
doShellScript: (script: string) => string; | ||
exists: (path: string) => boolean; | ||
includeStandardAdditions: boolean; | ||
openForAccess: (path: string) => any; | ||
read: (handle: any) => any; | ||
} | ||
|
||
interface NSArray<T = any> { | ||
count: number; | ||
objectAtIndex: (index: number) => T; | ||
} | ||
|
||
declare global { | ||
const $: { | ||
NSDictionary: { | ||
dictionaryWithContentsOfFile: (path: string) => any; | ||
}; | ||
|
||
NSProcessInfo: { | ||
processInfo: { | ||
arguments: NSArray; | ||
}; | ||
}; | ||
}; | ||
|
||
const Application: { | ||
currentApplication: () => Application; | ||
}; | ||
|
||
const ObjC: { | ||
deepUnwrap: (dict: object) => any; | ||
unwrap: (dict: object) => any; | ||
}; | ||
|
||
const Path: (path: string) => string; | ||
} | ||
|
||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
import '@jxa/global-type'; | ||
|
||
export function getArgs(): string[] { | ||
const args = $.NSProcessInfo.processInfo.arguments; | ||
// Build the normal argv/argc | ||
const argv = []; | ||
const argc = args.count; // -[NSArray count] | ||
for (let i = 0; i < argc; i++) { | ||
argv.push(ObjC.unwrap(args.objectAtIndex(i))); // -[NSArray objectAtIndex:] | ||
} | ||
return argv; | ||
const args = $.NSProcessInfo.processInfo.arguments; | ||
const argv = []; | ||
const argc = args.count; | ||
for (let i = 0; i < argc; i++) { | ||
argv.push(ObjC.unwrap(args.objectAtIndex(i))); | ||
} | ||
return argv; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export { getArgs } from './getter'; | ||
export { arg } from './parser'; | ||
export { parseArgs as arg } from './parser'; |
Oops, something went wrong.