diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..e26ed39 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +# EditorConfig is awesome: https://EditorConfig.org + +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 140 + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..af3ad12 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +/.yarn/** linguist-vendored +/.yarn/releases/* binary +/.yarn/plugins/**/* binary +/.pnp.* binary linguist-generated diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..17411f5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,44 @@ +# Specifies intentionally untracked files to ignore when using Git +# http://git-scm.com/docs/gitignore + +# OSX +.DS_STORE +.DS_Store +._* + +# Windows +Thumbs.db +Desktop.ini + +# Logs +*.log* + +# package managers +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions +#!.yarn/cache +.pnp.* +node_modules +package-lock.json + +# Build +dist +*.tsbuildinfo +*.map +*.d.ts + +# Output of 'npm pack' +*.tgz + +# dotenv environment variables file +.env + +.tmp + +.wireit + +.eslintcache diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..84ccf99 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,17 @@ +{ + "recommendations": [ + "cardinal90.multi-cursor-case-preserve", + "christian-kohler.path-intellisense", + "davidanson.vscode-markdownlint", + "editorconfig.editorconfig", + "esbenp.prettier-vscode", + "github.copilot-chat", + "github.vscode-github-actions", + "github.vscode-pull-request-github", + "streetsidesoftware.code-spell-checker-persian", + "streetsidesoftware.code-spell-checker", + "yzhang.markdown-all-in-one", + "gruntfuggly.todo-tree", + "arcanis.vscode-zipfs" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 85f4e50..46e9487 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,32 @@ { - "prettier.singleQuote": true, - "cSpell.words": [ - "wireit" + "cSpell.language": "en,fa,fa-IR", + "editor.codeActionsOnSave": { + "source.fixAll": "explicit" + }, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnPaste": false, + "editor.formatOnSave": false, + "editor.wordWrapColumn": 120, + "explorer.fileNesting.enabled": true, + "explorer.fileNesting.expand": false, + "git.autoStash": true, + "git.branchProtection": ["next"], + "githubPullRequests.ignoredPullRequestBranches": ["next"], + "npm.packageManager": "yarn", + "prettier.prettierPath": ".yarn/sdks/prettier/index.cjs", + "prettier.useEditorConfig": true, + "search.exclude": { + "**/.pnp.*": true, + "**/.yarn": true, + "**/*.lock": true + }, + "typescript.enablePromptUseWorkspaceTsdk": true, + "typescript.tsdk": ".yarn/sdks/typescript/lib", + "cSpell.words": ["nexim"], + "todo-tree.tree.scanMode": "workspace only", + "github.copilot.chat.codeGeneration.instructions": [ + { + "file": ".github/copilot-instruction.md" + } ] -} \ No newline at end of file +} diff --git a/.yarn/sdks/integrations.yml b/.yarn/sdks/integrations.yml new file mode 100644 index 0000000..aa9d0d0 --- /dev/null +++ b/.yarn/sdks/integrations.yml @@ -0,0 +1,5 @@ +# This file is automatically generated by @yarnpkg/sdks. +# Manual changes might be lost! + +integrations: + - vscode diff --git a/.yarn/sdks/prettier/bin/prettier.cjs b/.yarn/sdks/prettier/bin/prettier.cjs new file mode 100755 index 0000000..4cc9994 --- /dev/null +++ b/.yarn/sdks/prettier/bin/prettier.cjs @@ -0,0 +1,30 @@ +#!/usr/bin/env node + +const { existsSync } = require(`fs`); +const { createRequire, register } = require(`module`); +const { resolve } = require(`path`); +const { pathToFileURL } = require(`url`); + +const relPnpApiPath = '../../../../.pnp.cjs'; + +const absPnpApiPath = resolve(__dirname, relPnpApiPath); +const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`); +const absRequire = createRequire(absPnpApiPath); + +const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); +const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); + +if (existsSync(absPnpApiPath)) { + if (!process.versions.pnp) { + // Setup the environment to be able to require prettier/bin/prettier.cjs + require(absPnpApiPath).setup(); + if (isPnpLoaderEnabled && register) { + register(pathToFileURL(absPnpLoaderPath)); + } + } +} + +const wrapWithUserWrapper = existsSync(absUserWrapperPath) ? (exports) => absRequire(absUserWrapperPath)(exports) : (exports) => exports; + +// Defer to the real prettier/bin/prettier.cjs your application uses +module.exports = wrapWithUserWrapper(absRequire(`prettier/bin/prettier.cjs`)); diff --git a/.yarn/sdks/prettier/index.cjs b/.yarn/sdks/prettier/index.cjs new file mode 100644 index 0000000..846276a --- /dev/null +++ b/.yarn/sdks/prettier/index.cjs @@ -0,0 +1,30 @@ +#!/usr/bin/env node + +const { existsSync } = require(`fs`); +const { createRequire, register } = require(`module`); +const { resolve } = require(`path`); +const { pathToFileURL } = require(`url`); + +const relPnpApiPath = '../../../.pnp.cjs'; + +const absPnpApiPath = resolve(__dirname, relPnpApiPath); +const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`); +const absRequire = createRequire(absPnpApiPath); + +const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); +const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); + +if (existsSync(absPnpApiPath)) { + if (!process.versions.pnp) { + // Setup the environment to be able to require prettier + require(absPnpApiPath).setup(); + if (isPnpLoaderEnabled && register) { + register(pathToFileURL(absPnpLoaderPath)); + } + } +} + +const wrapWithUserWrapper = existsSync(absUserWrapperPath) ? (exports) => absRequire(absUserWrapperPath)(exports) : (exports) => exports; + +// Defer to the real prettier your application uses +module.exports = wrapWithUserWrapper(absRequire(`prettier`)); diff --git a/.yarn/sdks/prettier/package.json b/.yarn/sdks/prettier/package.json new file mode 100644 index 0000000..b9ab57f --- /dev/null +++ b/.yarn/sdks/prettier/package.json @@ -0,0 +1,7 @@ +{ + "name": "prettier", + "version": "3.4.2-sdk", + "main": "./index.cjs", + "type": "commonjs", + "bin": "./bin/prettier.cjs" +} diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 0000000..13a7b19 --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1,3 @@ +enableTelemetry: false + +preferInteractive: true diff --git a/package.json b/package.json new file mode 100644 index 0000000..813678a --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "name": "@nexim/actions", + "packageManager": "yarn@4.6.0", + "type": "module", + "scripts": { + "format": "prettier . --write", + "upd": "yarn set version latest && yarn up '*' && yarn up '*' -R && yarn dlx @yarnpkg/sdks vscode && yarn dedupe" + }, + "devDependencies": { + "prettier": "^3.4.2" + } +} diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 0000000..fd80b1f --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,8 @@ +/** + * @type {import('prettier').Options} + */ +const config = { + singleQuote: true, +}; + +export default config; diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..35ff962 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,23 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 8 + cacheKey: 10c0 + +"@nexim/actions@workspace:.": + version: 0.0.0-use.local + resolution: "@nexim/actions@workspace:." + dependencies: + prettier: "npm:^3.4.2" + languageName: unknown + linkType: soft + +"prettier@npm:^3.4.2": + version: 3.4.2 + resolution: "prettier@npm:3.4.2" + bin: + prettier: bin/prettier.cjs + checksum: 10c0/99e076a26ed0aba4ebc043880d0f08bbb8c59a4c6641cdee6cdadf2205bdd87aa1d7823f50c3aea41e015e99878d37c58d7b5f0e663bba0ef047f94e36b96446 + languageName: node + linkType: hard