@pixpilot/scaffoldfy-configs 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.
Files changed (35) hide show
  1. package/.cache/.eslintcache +1 -0
  2. package/.cache/.prettiercache +1 -0
  3. package/.turbo/turbo-format.log +6 -0
  4. package/.turbo/turbo-lint.log +4 -0
  5. package/CHANGELOG.md +7 -0
  6. package/LICENSE +21 -0
  7. package/README.md +3 -0
  8. package/eslint.config.mjs +6 -0
  9. package/license-file/licenses/agpl-3.0.hbs +661 -0
  10. package/license-file/licenses/apache-2.0.hbs +201 -0
  11. package/license-file/licenses/bsd-2-clause.hbs +9 -0
  12. package/license-file/licenses/bsd-3-clause.hbs +11 -0
  13. package/license-file/licenses/gpl-2.0.hbs +338 -0
  14. package/license-file/licenses/gpl-3.0.hbs +674 -0
  15. package/license-file/licenses/isc.hbs +7 -0
  16. package/license-file/licenses/mit.hbs +21 -0
  17. package/license-file/licenses/mpl-2.0.hbs +376 -0
  18. package/license-file/licenses/unlicense.hbs +27 -0
  19. package/license-file/scaffoldfy.json +153 -0
  20. package/monorepo-generate-packages-section/generate-packages-section.js +65 -0
  21. package/monorepo-generate-packages-section/scaffoldfy.json +60 -0
  22. package/package.json +39 -0
  23. package/pixpilot-changesets-release/release.yml +50 -0
  24. package/pixpilot-changesets-release/scaffoldfy.json +21 -0
  25. package/pixpilot-copilot-instructions/copilot-instructions.md +23 -0
  26. package/pixpilot-copilot-instructions/scaffoldfy.json +21 -0
  27. package/pixpilot-info/scaffoldfy.json +17 -0
  28. package/project-info/scaffoldfy.json +96 -0
  29. package/security-policy/SECURITY.hbs +6 -0
  30. package/security-policy/scaffoldfy.json +49 -0
  31. package/tsdown.config.ts +8 -0
  32. package/turbo-workspace-package-generator/scaffoldfy.json +31 -0
  33. package/turbo-workspace-package-generator/turbo-generator.ts.hbs +9 -0
  34. package/update-root-package-json/scaffoldfy.json +26 -0
  35. package/vitest.config.ts +3 -0
@@ -0,0 +1,60 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@pixpilot/scaffoldfy/schema",
3
+ "description": "Generates packages section in monorepo README by reading package.json files",
4
+ "name": "pixpilot-generate-packages-section",
5
+ "dependencies": ["pixpilot-info"],
6
+ "enabled": "pixpilot_project",
7
+ "variables": [
8
+ {
9
+ "id": "pixpilot_generate_packages_section_pre_commit_content",
10
+ "value": {
11
+ "type": "exec",
12
+ "value": "node -e \"const fs = require('fs'); const preCommitPath = '.husky/pre-commit'; let content = ''; try { content = fs.readFileSync(preCommitPath, 'utf8').trim(); } catch (e) {} process.stdout.write('pnpm run generate-packages\\n' + (content ? content + '\\n' : ''));\""
13
+ }
14
+ }
15
+ ],
16
+
17
+ "tasks": [
18
+ {
19
+ "id": "pixpilot-generate-packages-section-file",
20
+ "name": "Generate Packages Section",
21
+ "description": "Runs the generate-packages-section.js script to update README.md with package information",
22
+ "type": "create",
23
+ "config": {
24
+ "file": "scripts/generate-packages-section.js",
25
+ "templateFile": "./generate-packages-section.js"
26
+ }
27
+ },
28
+ {
29
+ "id": "pixpilot-generate-packages-section-script",
30
+ "name": "Add generate-packages script to package.json",
31
+ "description": "Adds the generate-packages script to the root package.json scripts section",
32
+ "type": "update-json",
33
+ "config": {
34
+ "file": "package.json",
35
+ "updates": {
36
+ "scripts.generate-packages": "node scripts/generate-packages-section.js"
37
+ }
38
+ }
39
+ },
40
+ {
41
+ "id": "pixpilot-generate-packages-section-delete-old-pre-commit",
42
+ "name": "Delete old pre-commit hook",
43
+ "description": "Deletes the existing .husky/pre-commit file",
44
+ "type": "delete",
45
+ "config": {
46
+ "paths": [".husky/pre-commit"]
47
+ }
48
+ },
49
+ {
50
+ "id": "pixpilot-generate-packages-section-create-new-pre-commit",
51
+ "name": "Create new pre-commit hook",
52
+ "description": "Creates a new .husky/pre-commit file with generate-packages command",
53
+ "type": "create",
54
+ "config": {
55
+ "file": ".husky/pre-commit",
56
+ "template": "{{pixpilot_generate_packages_section_pre_commit_content}}"
57
+ }
58
+ }
59
+ ]
60
+ }
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@pixpilot/scaffoldfy-configs",
3
+ "type": "module",
4
+ "version": "0.1.0",
5
+ "author": "PixPilot <m.doaie@hotmail.com>",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/pixpilot/scaffoldfy.git",
10
+ "directory": "packages/scaffoldfy-configs"
11
+ },
12
+ "keywords": [
13
+ "scaffoldfy",
14
+ "templates",
15
+ "scaffolding",
16
+ "project-init",
17
+ "license",
18
+ "oss"
19
+ ],
20
+ "files": [
21
+ "*"
22
+ ],
23
+ "devDependencies": {
24
+ "@types/node": "^22.18.11",
25
+ "eslint": "^9.38.0",
26
+ "@internal/eslint-config": "0.3.0",
27
+ "@internal/vitest-config": "0.1.0",
28
+ "@internal/tsdown-config": "0.1.0",
29
+ "@internal/prettier-config": "0.0.1"
30
+ },
31
+ "prettier": "@internal/prettier-config",
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "scripts": {
36
+ "lint": "eslint",
37
+ "format": "prettier --check . --ignore-path ../../.gitignore --ignore-path ../../.prettierignore"
38
+ }
39
+ }
@@ -0,0 +1,50 @@
1
+ # .github/workflows/release.yml
2
+
3
+ name: Release Package
4
+
5
+ on:
6
+ push:
7
+ branches:
8
+ - main
9
+ - next
10
+ workflow_dispatch:
11
+
12
+ jobs:
13
+ ci:
14
+ name: Run CI Checks
15
+ uses: ./.github/workflows/ci.yml
16
+
17
+ release:
18
+ name: Create Release and Publish
19
+ runs-on: ubuntu-latest
20
+ needs: ci
21
+ permissions:
22
+ contents: write
23
+ pull-requests: write
24
+ id-token: write
25
+
26
+ steps:
27
+ - name: Generate bot app token
28
+ id: app_token
29
+ uses: actions/create-github-app-token@v2
30
+ with:
31
+ app-id: ${{ secrets.RELEASER_ID }}
32
+ private-key: ${{ secrets.RELEASER_PRIVATE_KEY }}
33
+
34
+ - name: Checkout repository
35
+ uses: actions/checkout@v4
36
+ with:
37
+ fetch-depth: 0
38
+ token: ${{ steps.app_token.outputs.token }}
39
+
40
+ - name: Setup project
41
+ uses: ./.github/actions/setup-project
42
+ with:
43
+ registry-url: 'https://registry.npmjs.org'
44
+ build: 'false'
45
+
46
+ - name: Release
47
+ uses: pixpilot/changesets-autopilot@v1
48
+ with:
49
+ GITHUB_TOKEN: ${{ steps.app_token.outputs.token }}
50
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@pixpilot/scaffoldfy/schema",
3
+ "description": "Pixpilot workspace package generator template for pnpm + Turbo monorepo. Provides project info prompts and config tasks.",
4
+ "name": "github-pixpilot-owner-changesets-release",
5
+ "dependencies": ["pixpilot-info"],
6
+ "enabled": "pixpilot_project",
7
+ "tasks": [
8
+ {
9
+ "id": "github-pixpilot-admin-changesets-release-create",
10
+ "name": "Setup Changesets Release Workflow",
11
+ "description": "Adds a GitHub Actions workflow for Changesets-based releases",
12
+ "required": true,
13
+ "enabled": true,
14
+ "type": "write",
15
+ "config": {
16
+ "templateFile": "release.yml",
17
+ "file": ".github/workflows/release.yml"
18
+ }
19
+ }
20
+ ]
21
+ }
@@ -0,0 +1,23 @@
1
+ # Copilot Instructions
2
+
3
+ - Only use pnpm for installing or managing dependencies in this project. Do not use npm, yarn, or any other package manager.
4
+ - This is a monorepo powered by Turbo and pnpm.
5
+
6
+ ## Commenting
7
+
8
+ - If a comment is long, write it as a multi-line comment and break lines for readability.
9
+
10
+ ## Testing
11
+
12
+ This project uses Vitest for testing.
13
+
14
+ # File Naming Conventions
15
+
16
+ ## JavaScript/TypeScript
17
+
18
+ - **File Naming:** Use kebab-case for almost all files, including those whose main export is a PascalCase class.
19
+ - Example: `my-module.ts`, `helper-functions.js`, `data-handler.js`
20
+ - **Frontend UI Components (React/Vue only):** Use PascalCase for component files (e.g., `MyButton.tsx`).
21
+ - Example: `MyButton.tsx`, `UserProfile.vue`
22
+ - **Config files:** Use kebab-case unless the framework or library has a different standard—follow the convention for that tool.
23
+ - Example: `tsconfig.json`
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@pixpilot/scaffoldfy/schema",
3
+ "description": "Security policy template with configurable contact email",
4
+ "name": "security-policy",
5
+ "dependencies": ["project-info", "pixpilot-info"],
6
+ "enabled": {
7
+ "condition": "pixpilot_project == true"
8
+ },
9
+ "tasks": [
10
+ {
11
+ "id": "pixpilot-copilot-instructions",
12
+ "name": "Create copilot-instructions.md",
13
+ "description": "Create copilot-instructions.md file with Pixpilot Copilot instructions",
14
+ "type": "write",
15
+ "config": {
16
+ "file": "copilot-instructions.md",
17
+ "templateFile": "copilot-instructions.md"
18
+ }
19
+ }
20
+ ]
21
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@pixpilot/scaffoldfy/schema",
3
+ "description": "Project information prompts for pnpm-turbo-monorepo-template",
4
+ "name": "pixpilot-info",
5
+ "dependencies": ["project-info"],
6
+ "variables": [
7
+ {
8
+ "id": "pixpilot_project",
9
+ "value": {
10
+ "type": "conditional",
11
+ "condition": "repoOwner === 'ccpu' || repoOwner === 'pixpilot' || orgName === 'pixpilot'",
12
+ "ifTrue": true,
13
+ "ifFalse": false
14
+ }
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,96 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@pixpilot/scaffoldfy/schema",
3
+ "description": "Project information prompts for pnpm-turbo-monorepo-template",
4
+ "name": "project-info",
5
+ "variables": [
6
+ {
7
+ "id": "currentYear",
8
+ "value": {
9
+ "type": "exec",
10
+ "value": "node -e \"process.stdout.write(String(new Date().getFullYear()))\""
11
+ }
12
+ }
13
+ ],
14
+ "prompts": [
15
+ {
16
+ "id": "projectName",
17
+ "type": "input",
18
+ "required": true,
19
+ "message": "What is your project name?",
20
+ "default": {
21
+ "type": "exec",
22
+ "value": "node -p \"require('path').basename(process.cwd())\""
23
+ }
24
+ },
25
+ {
26
+ "id": "repoOwner",
27
+ "type": "input",
28
+ "message": "Repository owner (GitHub username or organization)",
29
+ "default": {
30
+ "type": "exec",
31
+ "value": "git remote get-url origin | node -e \"const url=require('fs').readFileSync(0,'utf-8'); console.log(url.match(/[:/]([^/]+)\\/[^/]+(?:\\.git)?$/)[1])\""
32
+ },
33
+ "required": true
34
+ },
35
+ {
36
+ "id": "orgName",
37
+ "type": "input",
38
+ "message": "Organization name for packages (used in package scopes)",
39
+ "default": {
40
+ "type": "exec",
41
+ "value": "git remote get-url origin | node -e \"const url=require('fs').readFileSync(0,'utf-8'); console.log(url.match(/[:/]([^/]+)\\/[^/]+(?:\\.git)?$/)[1])\""
42
+ },
43
+ "required": false
44
+ },
45
+ {
46
+ "id": "author",
47
+ "type": "input",
48
+ "message": "Author name",
49
+ "default": {
50
+ "type": "exec",
51
+ "value": "git config user.name"
52
+ },
53
+ "required": true
54
+ },
55
+ {
56
+ "id": "authorEmail",
57
+ "type": "input",
58
+ "message": "Author email",
59
+ "default": {
60
+ "type": "exec",
61
+ "value": "git config user.email"
62
+ },
63
+ "required": false
64
+ },
65
+ {
66
+ "id": "repoUrl",
67
+ "type": "input",
68
+ "message": "Repository URL",
69
+ "default": {
70
+ "type": "exec",
71
+ "value": "git config --get remote.origin.url"
72
+ },
73
+ "required": false
74
+ },
75
+ {
76
+ "id": "repoName",
77
+ "type": "input",
78
+ "message": "Repository name",
79
+ "default": {
80
+ "type": "exec",
81
+ "value": "git remote get-url origin | node -e \"const url=require('fs').readFileSync(0,'utf-8').trim(); console.log(url.match(/[:/]([^/]+)\\/([^/]+?)(?:\\.git)?$/)[2])\""
82
+ },
83
+ "required": true
84
+ },
85
+ {
86
+ "id": "baseRepoUrl",
87
+ "type": "input",
88
+ "message": "Base repository URL",
89
+ "default": {
90
+ "type": "exec",
91
+ "value": "git remote get-url origin | node -e \"const url=require('fs').readFileSync(0,'utf-8').trim(); const match=url.match(/^(?:https?:\\/\\/|git@)([^/:]+)[:/](.+?)(?:\\.git)?$/); console.log(match ? `https://${match[1]}/${match[2]}` : '')\""
92
+ },
93
+ "required": false
94
+ }
95
+ ]
96
+ }
@@ -0,0 +1,6 @@
1
+ # Security Policy
2
+
3
+ If you discover a security vulnerability, please report it by opening an issue or contacting the maintainers directly. We will address all security concerns promptly.
4
+
5
+ - Do not disclose security issues publicly until they are resolved.
6
+ - For critical issues, please email {{securityEmail}} (replace with your actual contact if needed).
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@pixpilot/scaffoldfy/schema",
3
+ "description": "Security policy template with configurable contact email",
4
+ "name": "security-policy",
5
+ "dependencies": ["project-info"],
6
+ "prompts": [
7
+ {
8
+ "id": "addSecurityFile",
9
+ "type": "confirm",
10
+ "message": "Add a SECURITY.md file?",
11
+ "default": true,
12
+ "required": true
13
+ },
14
+ {
15
+ "id": "securityEmail",
16
+ "type": "input",
17
+ "message": "Security contact email",
18
+
19
+ "enabled": {
20
+ "type": "condition",
21
+ "condition": "addSecurityFile === true"
22
+ },
23
+ "default": {
24
+ "type": "conditional",
25
+ "condition": "orgName === 'pixpilot'",
26
+ "ifTrue": "security@pixpilot.com",
27
+ "ifFalse": "{{authorEmail}}"
28
+ },
29
+ "required": true
30
+ }
31
+ ],
32
+
33
+ "tasks": [
34
+ {
35
+ "id": "create-security-policy",
36
+ "name": "Create SECURITY.md",
37
+ "description": "Create security policy file with contact email",
38
+ "type": "write",
39
+ "enabled": {
40
+ "type": "condition",
41
+ "condition": "addSecurityFile === true"
42
+ },
43
+ "config": {
44
+ "file": "SECURITY.md",
45
+ "templateFile": "SECURITY.hbs"
46
+ }
47
+ }
48
+ ]
49
+ }
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from '@internal/tsdown-config';
2
+
3
+ export default defineConfig({
4
+ entry: 'src/index.ts',
5
+ dts: true,
6
+ minify: true,
7
+ clean: true,
8
+ });
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@pixpilot/scaffoldfy/schema",
3
+ "description": "Pixpilot workspace package generator template for pnpm + Turbo monorepo. Provides project info prompts and config tasks.",
4
+ "name": "turbo-workspace-package-generator",
5
+ "tasks": [
6
+ {
7
+ "id": "update-turbo-generator",
8
+ "name": "Update Turbo generator config",
9
+ "description": "Update the turbo generator configuration with user settings",
10
+ "required": true,
11
+ "enabled": true,
12
+ "type": "write",
13
+ "prompts": [
14
+ {
15
+ "id": "defaultBundler",
16
+ "type": "select",
17
+ "message": "Select your default bundler",
18
+ "choices": [
19
+ { "name": "TypeScript Compiler (tsc)", "value": "tsc" },
20
+ { "name": "TSDown", "value": "tsdown" }
21
+ ],
22
+ "default": "tsc"
23
+ }
24
+ ],
25
+ "config": {
26
+ "file": "turbo/generators/config.ts",
27
+ "templateFile": "./turbo-generator.ts.hbs"
28
+ }
29
+ }
30
+ ]
31
+ }
@@ -0,0 +1,9 @@
1
+ import { packageGenerator } from '@pixpilot/workspace-package-generator';
2
+
3
+ module.exports = function generator(plop: unknown) {
4
+ packageGenerator(plop, {
5
+ author: 'ccpu',
6
+ defaultBundler: 'tsdown',
7
+ orgName: 'pixpilot',
8
+ });
9
+ };
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@pixpilot/scaffoldfy/schema",
3
+ "description": "Update root package.json with repository information",
4
+ "name": "update-root-package-json",
5
+ "dependencies": ["project-info"],
6
+ "tasks": [
7
+ {
8
+ "id": "update-root-package",
9
+ "name": "Update root package.json",
10
+ "description": "Update repository information in root package.json",
11
+ "type": "update-json",
12
+ "config": {
13
+ "file": "package.json",
14
+ "updates": {
15
+ "name": "{{repoName}}",
16
+ "author": "{{author}} <{{authorEmail}}>",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "{{repoUrl}}"
20
+ },
21
+ "homepage": "{{baseRepoUrl}}"
22
+ }
23
+ }
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,3 @@
1
+ import baseConfig from '@internal/vitest-config';
2
+
3
+ export default baseConfig;