create-minions-bundle 1.0.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 (79) hide show
  1. package/README.md +16 -0
  2. package/package.json +41 -0
  3. package/src/bundle-codegen.js +259 -0
  4. package/src/generator.js +107 -0
  5. package/src/github.js +110 -0
  6. package/src/index.js +144 -0
  7. package/src/manual.js +171 -0
  8. package/src/prompts.js +128 -0
  9. package/src/template.js +62 -0
  10. package/templates/apps/blog/astro.config.mjs +25 -0
  11. package/templates/apps/blog/netlify.toml +3 -0
  12. package/templates/apps/blog/package.json +34 -0
  13. package/templates/apps/blog/public/favicon.svg +4 -0
  14. package/templates/apps/blog/src/layouts/BaseLayout.astro +39 -0
  15. package/templates/apps/blog/src/pages/index.astro +18 -0
  16. package/templates/apps/blog/src/pages/posts/welcome.md +23 -0
  17. package/templates/apps/blog/src/styles/global.css.template +6 -0
  18. package/templates/apps/blog/tsconfig.json +11 -0
  19. package/templates/apps/docs/astro.config.mjs +42 -0
  20. package/templates/apps/docs/netlify.toml +4 -0
  21. package/templates/apps/docs/package.json +21 -0
  22. package/templates/apps/docs/src/content/docs/api/python.md +24 -0
  23. package/templates/apps/docs/src/content/docs/api/typescript.md +24 -0
  24. package/templates/apps/docs/src/content/docs/getting-started/installation.md +27 -0
  25. package/templates/apps/docs/src/content/docs/getting-started/introduction.md +22 -0
  26. package/templates/apps/docs/src/content/docs/getting-started/quick-start.md +28 -0
  27. package/templates/apps/docs/src/content/docs/index.mdx.template +24 -0
  28. package/templates/apps/docs/src/styles/custom.css.template +14 -0
  29. package/templates/apps/docs/tsconfig.json +3 -0
  30. package/templates/apps/web/index.html +17 -0
  31. package/templates/apps/web/netlify.toml +6 -0
  32. package/templates/apps/web/package.json +34 -0
  33. package/templates/apps/web/postcss.config.js +5 -0
  34. package/templates/apps/web/public/favicon.svg +4 -0
  35. package/templates/apps/web/src/App.css +111 -0
  36. package/templates/apps/web/src/App.tsx +46 -0
  37. package/templates/apps/web/src/index.css.template +12 -0
  38. package/templates/apps/web/src/main.tsx +10 -0
  39. package/templates/apps/web/tsconfig.json +36 -0
  40. package/templates/apps/web/tsconfig.node.json +13 -0
  41. package/templates/apps/web/vite.config.ts +21 -0
  42. package/templates/github/CODE_OF_CONDUCT.md +5 -0
  43. package/templates/github/CONTRIBUTING.md +49 -0
  44. package/templates/github/FUNDING.yml +2 -0
  45. package/templates/github/FUNDING.yml.template +1 -0
  46. package/templates/github/ISSUE_TEMPLATE/bug_report.md +20 -0
  47. package/templates/github/ISSUE_TEMPLATE/feature_request.md +18 -0
  48. package/templates/github/workflows/ci.yml +65 -0
  49. package/templates/github/workflows/publish.yml +81 -0
  50. package/templates/github/workflows/release.yml +16 -0
  51. package/templates/packages/cli/README.md +19 -0
  52. package/templates/packages/cli/package.json +38 -0
  53. package/templates/packages/cli/src/index.ts +353 -0
  54. package/templates/packages/cli/tsconfig.json +23 -0
  55. package/templates/packages/python/README.md +21 -0
  56. package/templates/packages/python/__pythonModule__/__init__.py +24 -0
  57. package/templates/packages/python/__pythonModule__/schemas.py.template +8 -0
  58. package/templates/packages/python/pyproject.toml +34 -0
  59. package/templates/packages/python/tests/test_basic.py +20 -0
  60. package/templates/packages/sdk/README.md.template +25 -0
  61. package/templates/packages/sdk/package.json.template +43 -0
  62. package/templates/packages/sdk/src/__tests__/bundle.test.ts.template +18 -0
  63. package/templates/packages/sdk/src/bundle.ts.template +6 -0
  64. package/templates/packages/sdk/src/index.ts.template +13 -0
  65. package/templates/packages/sdk/src/relations.ts.template +6 -0
  66. package/templates/packages/sdk/src/views.ts.template +6 -0
  67. package/templates/packages/sdk/tsconfig.json +26 -0
  68. package/templates/root/.release-please-manifest.json +3 -0
  69. package/templates/root/CHANGELOG.md +15 -0
  70. package/templates/root/CHANGELOG.md.template +10 -0
  71. package/templates/root/LICENSE.template +21 -0
  72. package/templates/root/README.md.template +42 -0
  73. package/templates/root/SECURITY.md +35 -0
  74. package/templates/root/SECURITY.md.template +11 -0
  75. package/templates/root/SKILLS.md.template +10 -0
  76. package/templates/root/package.json.template +28 -0
  77. package/templates/root/pnpm-workspace.yaml +4 -0
  78. package/templates/root/release-please-config.json +61 -0
  79. package/templates/root/tsconfig.json +31 -0
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "{{sdkName}}",
3
+ "version": "0.1.0",
4
+ "description": "{{projectDescription}}",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "README.md"
17
+ ],
18
+ "author": "{{authorName}} <{{authorEmail}}> ({{authorUrl}})",
19
+ "scripts": {
20
+ "build": "tsc",
21
+ "test": "vitest run",
22
+ "test:watch": "vitest",
23
+ "lint": "tsc --noEmit",
24
+ "docs": "typedoc"
25
+ },
26
+ "dependencies": {
27
+ "minions-sdk": "0.2.3"{{dependenciesJson}}
28
+ },
29
+ "devDependencies": {
30
+ "@types/node": "^25.3.0",
31
+ "typedoc": "^0.28.17",
32
+ "typedoc-plugin-markdown": "^4.10.0",
33
+ "typescript": "^5.9.3",
34
+ "vitest": "^4.0.18"
35
+ },
36
+ "keywords": {{keywordsJson}},
37
+ "license": "{{license}}",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/{{githubRepo}}"
41
+ },
42
+ "homepage": "https://{{domainHelp}}"
43
+ }
@@ -0,0 +1,18 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { bundleTypes } from '../bundle.js';
3
+ import { VERSION } from '../index.js';
4
+
5
+ describe('Bundle SDK', () => {
6
+ it('should export a version string', () => {
7
+ expect(VERSION).toBeDefined();
8
+ expect(typeof VERSION).toBe('string');
9
+ });
10
+
11
+ it('should have bundleTypes array populated', () => {
12
+ expect(bundleTypes).toBeDefined();
13
+ expect(Array.isArray(bundleTypes)).toBe(true);
14
+ expect(bundleTypes.length).toBeGreaterThan(0);
15
+ });
16
+
17
+ {{bundleTestsCode}}
18
+ });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @module {{projectName}}/bundle
3
+ * MinionType definitions and imports for {{projectCapitalized}}.
4
+ */
5
+
6
+ {{bundleTypesCode}}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * {{projectCapitalized}}
3
+ *
4
+ * {{projectDescription}}
5
+ *
6
+ * @module {{projectName}}
7
+ */
8
+
9
+ export const VERSION = '0.1.0';
10
+
11
+ export * from './bundle.js';
12
+ export * from './relations.js';
13
+ export * from './views.js';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @module {{projectName}}/relations
3
+ * Relation definitions for {{projectCapitalized}}.
4
+ */
5
+
6
+ {{relationsCode}}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @module {{projectName}}/views
3
+ * Named query filters for {{projectCapitalized}}.
4
+ */
5
+
6
+ {{viewsCode}}
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": [
7
+ "ES2022"
8
+ ],
9
+ "outDir": "./dist",
10
+ "rootDir": "./src",
11
+ "declaration": true,
12
+ "declarationMap": true,
13
+ "sourceMap": true,
14
+ "strict": true,
15
+ "esModuleInterop": true,
16
+ "skipLibCheck": true
17
+ },
18
+ "include": [
19
+ "src/**/*"
20
+ ],
21
+ "exclude": [
22
+ "node_modules",
23
+ "dist",
24
+ "test"
25
+ ]
26
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0"
3
+ }
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [0.1.0] - {{year}}
6
+
7
+ ### Features
8
+
9
+ - Initial project scaffold
10
+ - TypeScript SDK (`{{sdkName}}`)
11
+ - CLI tool (`{{cliName}}`)
12
+ - Python SDK (`{{pythonPackage}}`)
13
+ - Documentation site
14
+ - Blog
15
+ - Web playground
@@ -0,0 +1,10 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [0.1.0] - {{year}}
8
+
9
+ ### Added
10
+ - Initial release of {{projectCapitalized}} bundle.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) {{year}} {{authorName}}
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,42 @@
1
+ # {{projectCapitalized}}
2
+
3
+ {{projectDescription}}
4
+
5
+ This is a Minions ecosystem **bundle**. Bundles are curated assemblies of MinionTypes, relations, and views designed for a specific domain.
6
+
7
+ ## Installation
8
+
9
+ \`\`\`bash
10
+ npm install {{projectName}}
11
+ # or
12
+ pnpm add {{projectName}}
13
+ # or
14
+ yarn add {{projectName}}
15
+ \`\`\`
16
+
17
+ ## Usage
18
+
19
+ \`\`\`typescript
20
+ import { bundleTypes, bundleRelations, bundleViews } from '{{projectName}}';
21
+ import { Minions } from 'minions-sdk';
22
+
23
+ // Initialize a client with this bundle's types and relations
24
+ const core = new Minions();
25
+
26
+ for (const type of bundleTypes) {
27
+ core.registry.register(type);
28
+ }
29
+
30
+ // Ensure relations exist
31
+ for (const rel of bundleRelations) {
32
+ // Implement relation registration logic here if applicable
33
+ }
34
+ \`\`\`
35
+
36
+ ## AI Agent Skills
37
+
38
+ See [SKILLS.md](./SKILLS.md) for instructions on how AI agents should interact with this bundle's schema.
39
+
40
+ ## License
41
+
42
+ {{license}} - Copyright (c) {{year}} {{authorName}}
@@ -0,0 +1,35 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ |---------|-----------|
7
+ | 0.1.x | ✅ |
8
+
9
+ ## Reporting a Vulnerability
10
+
11
+ Please **do not** open a public GitHub issue for security vulnerabilities.
12
+
13
+ Instead, email **security@minions.dev** with:
14
+
15
+ - A description of the vulnerability
16
+ - Steps to reproduce
17
+ - Potential impact
18
+ - Any suggested mitigations
19
+
20
+ You will receive a response within **72 hours**. If the issue is confirmed, we aim to release a patch within **14 days** and will credit you in the release notes (unless you prefer to remain anonymous).
21
+
22
+ ## Scope
23
+
24
+ This security policy covers:
25
+
26
+ - `{{sdkName}}` (npm package)
27
+ - `{{pythonPackage}}` (PyPI package)
28
+ - `{{cliName}}` (npm package)
29
+ - The {{projectName}} web playground
30
+ - The {{projectName}} documentation site
31
+
32
+ ## Out of Scope
33
+
34
+ - Vulnerabilities in third-party dependencies (please report those upstream)
35
+ - Issues without a realistic exploit path
@@ -0,0 +1,11 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ | ------- | ------------------ |
7
+ | 0.1.x | :white_check_mark: |
8
+
9
+ ## Reporting a Vulnerability
10
+
11
+ Please report security issues directly to {{authorEmail}}. Do not open public issues for security vulnerabilities.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: {{projectName}}
3
+ description: "Agent skills and schema rules for {{projectCapitalized}}."
4
+ category: custom
5
+ tags: ["bundle"]
6
+ ---
7
+
8
+ # {{projectCapitalized}} Agent Skills
9
+
10
+ {{skillsCode}}
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "{{projectName}}-workspace",
3
+ "private": true,
4
+ "version": "0.1.0",
5
+ "description": "{{projectDescription}}",
6
+ "type": "module",
7
+ "license": "{{license}}",
8
+ "author": "{{authorName}} <{{authorEmail}}> ({{authorUrl}})",
9
+ "workspaces": [
10
+ "packages/*",
11
+ "apps/*"
12
+ ],
13
+ "scripts": {
14
+ "build": "pnpm --filter {{sdkName}} run build && pnpm --filter {{cliName}} run build && pnpm --filter {{docsName}} run build && pnpm --filter {{blogName}} run build && pnpm --filter {{webName}} run build",
15
+ "deploy:blog": "pnpm --filter {{blogName}} run build && netlify deploy --dir apps/blog/dist --prod",
16
+ "deploy:docs": "pnpm --filter {{docsName}} run build && netlify deploy --dir apps/docs/dist --prod",
17
+ "deploy:web": "pnpm --filter {{webName}} run build && netlify deploy --dir apps/web/dist --prod",
18
+ "test": "pnpm --filter {{sdkName}} run test",
19
+ "lint": "pnpm --filter {{sdkName}} run build && pnpm --filter {{sdkName}} run lint && pnpm --filter {{cliName}} run lint",
20
+ "deploy": "pnpm run deploy:blog"
21
+ },
22
+ "engines": {
23
+ "node": ">=20"
24
+ },
25
+ "devDependencies": {
26
+ "typescript": "^5.9.3"
27
+ }
28
+ }
@@ -0,0 +1,4 @@
1
+ packages:
2
+ - 'packages/sdk'
3
+ - 'packages/cli'
4
+ - apps/*
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3
+ "release-type": "node",
4
+ "include-component-in-tag": false,
5
+ "include-v-in-tag": true,
6
+ "changelog-sections": [
7
+ {
8
+ "type": "feat",
9
+ "section": "Features"
10
+ },
11
+ {
12
+ "type": "fix",
13
+ "section": "Bug Fixes"
14
+ },
15
+ {
16
+ "type": "perf",
17
+ "section": "Performance"
18
+ },
19
+ {
20
+ "type": "refactor",
21
+ "section": "Refactoring"
22
+ },
23
+ {
24
+ "type": "docs",
25
+ "section": "Documentation"
26
+ },
27
+ {
28
+ "type": "chore",
29
+ "section": "Miscellaneous"
30
+ },
31
+ {
32
+ "type": "ci",
33
+ "section": "CI/CD",
34
+ "hidden": true
35
+ },
36
+ {
37
+ "type": "test",
38
+ "section": "Tests",
39
+ "hidden": true
40
+ },
41
+ {
42
+ "type": "style",
43
+ "section": "Styles",
44
+ "hidden": true
45
+ }
46
+ ],
47
+ "packages": {
48
+ ".": {
49
+ "changelog-path": "CHANGELOG.md",
50
+ "extra-files": [
51
+ "packages/core/package.json",
52
+ "packages/cli/package.json",
53
+ {
54
+ "type": "toml",
55
+ "path": "packages/python/pyproject.toml",
56
+ "jsonpath": "$.project.version"
57
+ }
58
+ ]
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
6
+ "lib": [
7
+ "ES2022"
8
+ ],
9
+ "declaration": true,
10
+ "declarationMap": true,
11
+ "sourceMap": true,
12
+ "outDir": "./dist",
13
+ "rootDir": "./src",
14
+ "strict": true,
15
+ "esModuleInterop": true,
16
+ "skipLibCheck": true,
17
+ "forceConsistentCasingInFileNames": true,
18
+ "noUnusedLocals": true,
19
+ "noUnusedParameters": true,
20
+ "noImplicitReturns": true,
21
+ "noFallthroughCasesInSwitch": true
22
+ },
23
+ "include": [
24
+ "src/**/*"
25
+ ],
26
+ "exclude": [
27
+ "node_modules",
28
+ "dist",
29
+ "**/*.test.ts"
30
+ ]
31
+ }