@mindees/cli 0.9.0 → 0.11.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.
- package/dist/templates.d.ts.map +1 -1
- package/dist/templates.js +31 -0
- package/dist/templates.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +4 -4
package/dist/templates.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","names":[],"sources":["../src/templates.ts"],"mappings":";;AAaA;;;;;;;;;UAAiB,QAAA;EACf,IAAA;EACA,WAAA;EACA,KAAA,EAAO,MAAM;AAAA;
|
|
1
|
+
{"version":3,"file":"templates.d.ts","names":[],"sources":["../src/templates.ts"],"mappings":";;AAaA;;;;;;;;;UAAiB,QAAA;EACf,IAAA;EACA,WAAA;EACA,KAAA,EAAO,MAAM;AAAA;AA4JgC;AAAA,cAAlC,SAAA,EAAW,MAAM,SAAS,QAAA;;cAO1B,gBAAA;;iBAGG,WAAA,CAAY,IAAA,WAAe,QAAQ;AAAnD;AAAA,iBAKgB,aAAA;;;AALmC;AAKnD;iBAQgB,WAAA,CAAY,QAAA,EAAU,QAAA,EAAU,OAAA,WAAkB,MAAM"}
|
package/dist/templates.js
CHANGED
|
@@ -100,6 +100,37 @@ export function App() {
|
|
|
100
100
|
"src/main.tsx": `import { createDomBackend, render } from '@mindees/renderer'
|
|
101
101
|
import { App } from './App'
|
|
102
102
|
|
|
103
|
+
const root = document.getElementById('app')
|
|
104
|
+
if (root) render(App, {}, createDomBackend(), root)
|
|
105
|
+
`
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
app: {
|
|
109
|
+
name: "app",
|
|
110
|
+
description: "A polished starter — Atlas components, hooks, and theming (batteries included).",
|
|
111
|
+
files: {
|
|
112
|
+
"package.json": appPackageJson("{{appName}}", { "@mindees/atlas": PKG_VERSION }),
|
|
113
|
+
".gitignore": GITIGNORE,
|
|
114
|
+
"tsconfig.json": TSCONFIG,
|
|
115
|
+
"README.md": `# {{appName}}\n\nA MindeesNative app using the Atlas UI kit. Run \`mindees dev\`.\n`,
|
|
116
|
+
"src/App.tsx": `import { createElement } from '@mindees/core'
|
|
117
|
+
import { Button, Card, Switch, Text, useToggle } from '@mindees/atlas'
|
|
118
|
+
|
|
119
|
+
export function App() {
|
|
120
|
+
const dark = useToggle(false)
|
|
121
|
+
return (
|
|
122
|
+
<Card style={{ gap: 12, maxWidth: 360 }}>
|
|
123
|
+
<Text style={{ fontSize: 24, fontWeight: 700 }}>Welcome to {{appName}} ✨</Text>
|
|
124
|
+
<Text>Signals, native UI, and batteries included — from one TypeScript codebase.</Text>
|
|
125
|
+
<Switch value={dark.value} onValueChange={dark.set} />
|
|
126
|
+
<Button title="Get started" onPress={() => console.log('Let us build!')} />
|
|
127
|
+
</Card>
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
`,
|
|
131
|
+
"src/main.tsx": `import { createDomBackend, render } from '@mindees/renderer'
|
|
132
|
+
import { App } from './App'
|
|
133
|
+
|
|
103
134
|
const root = document.getElementById('app')
|
|
104
135
|
if (root) render(App, {}, createDomBackend(), root)
|
|
105
136
|
`
|
package/dist/templates.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","names":[],"sources":["../src/templates.ts"],"sourcesContent":["/**\n * Project templates for `mindees create` / `create-mindees`.\n *\n * Templates are in-memory maps of relative path → file contents, so they're\n * deterministic and need no on-disk fixtures. Each scaffolds a runnable\n * MindeesNative app skeleton wired to the current `@mindees/*` packages.\n *\n * @module\n */\n\nimport { VERSION } from './version'\n\n/** A template: a name, a description, and its files (relative path → contents). */\nexport interface Template {\n name: string\n description: string\n files: Record<string, string>\n}\n\n/**\n * Version pinned for scaffolded apps. Derives from the CLI's own\n * {@link VERSION} (the single locked `@mindees/*` version line) so generated\n * projects always pin the framework packages to the same release that\n * scaffolded them, instead of a hardcoded literal.\n */\nconst PKG_VERSION = VERSION\n\nfunction appPackageJson(appName: string, extraDeps: Record<string, string> = {}): string {\n const deps = {\n '@mindees/core': PKG_VERSION,\n '@mindees/renderer': PKG_VERSION,\n ...extraDeps,\n }\n // The `dev`/`build` scripts invoke the `mindees` binary, so the CLI must be a\n // (dev) dependency of the generated app — otherwise the commands only resolve\n // when the CLI happens to be installed globally.\n const devDeps = {\n '@mindees/cli': PKG_VERSION,\n }\n return `${JSON.stringify(\n {\n name: appName,\n version: '0.1.0',\n private: true,\n type: 'module',\n scripts: {\n dev: 'mindees dev',\n build: 'mindees build',\n },\n dependencies: deps,\n devDependencies: devDeps,\n },\n null,\n 2,\n )}\\n`\n}\n\nconst GITIGNORE = 'node_modules/\\ndist/\\n*.log\\n'\n\nconst TSCONFIG = `${JSON.stringify(\n {\n compilerOptions: {\n strict: true,\n module: 'esnext',\n moduleResolution: 'bundler',\n target: 'es2023',\n jsx: 'react',\n jsxFactory: 'createElement',\n jsxFragmentFactory: 'Fragment',\n verbatimModuleSyntax: true,\n },\n include: ['src'],\n },\n null,\n 2,\n)}\\n`\n\n/** The `blank` template: the minimal runnable app. */\nconst blank: Template = {\n name: 'blank',\n description: 'A minimal MindeesNative app (one screen).',\n files: {\n 'package.json': appPackageJson('{{appName}}'),\n '.gitignore': GITIGNORE,\n 'tsconfig.json': TSCONFIG,\n 'README.md': `# {{appName}}\\n\\nA MindeesNative app. Start with \\`mindees dev\\`.\\n`,\n 'src/App.tsx': `import { createElement } from '@mindees/core'\n\nexport function App() {\n return (\n <view>\n <text>Hello from {{appName}} 👋</text>\n </view>\n )\n}\n`,\n 'src/main.tsx': `import { createDomBackend, render } from '@mindees/renderer'\nimport { App } from './App'\n\nconst root = document.getElementById('app')\nif (root) render(App, {}, createDomBackend(), root)\n`,\n },\n}\n\n/** The `counter` template: shows fine-grained reactivity (signals). */\nconst counter: Template = {\n name: 'counter',\n description: 'A reactive counter — demonstrates signals + fine-grained updates.',\n files: {\n 'package.json': appPackageJson('{{appName}}'),\n '.gitignore': GITIGNORE,\n 'tsconfig.json': TSCONFIG,\n 'README.md': `# {{appName}}\\n\\nA reactive counter built with MindeesNative signals.\\n`,\n 'src/App.tsx': `import { createElement, signal } from '@mindees/core'\n\nexport function App() {\n const count = signal(0)\n return (\n <view>\n <text>{() => \\`Count: \\${count()}\\`}</text>\n <button onClick={() => count.set(count() + 1)}>Increment</button>\n </view>\n )\n}\n`,\n 'src/main.tsx': `import { createDomBackend, render } from '@mindees/renderer'\nimport { App } from './App'\n\nconst root = document.getElementById('app')\nif (root) render(App, {}, createDomBackend(), root)\n`,\n },\n}\n\n/** All built-in templates, keyed by name. */\nexport const TEMPLATES: Record<string, Template> = {\n blank,\n counter,\n}\n\n/** The default template name used when none is specified. */\nexport const DEFAULT_TEMPLATE = 'blank'\n\n/** Look up a template by name, or `undefined` if unknown. */\nexport function getTemplate(name: string): Template | undefined {\n return TEMPLATES[name]\n}\n\n/** Names of all available templates. */\nexport function templateNames(): string[] {\n return Object.keys(TEMPLATES)\n}\n\n/**\n * Materialize a template's files for `appName`: substitutes the `{{appName}}`\n * placeholder and returns a fresh path → contents map. Pure (no I/O).\n */\nexport function materialize(template: Template, appName: string): Record<string, string> {\n const out: Record<string, string> = {}\n for (const [path, contents] of Object.entries(template.files)) {\n out[path] = contents.replaceAll('{{appName}}', appName)\n }\n return out\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAyBA,MAAM,cAAc;AAEpB,SAAS,eAAe,SAAiB,YAAoC,CAAC,GAAW;CACvF,MAAM,OAAO;EACX,iBAAiB;EACjB,qBAAqB;EACrB,GAAG;CACL;CAOA,OAAO,GAAG,KAAK,UACb;EACE,MAAM;EACN,SAAS;EACT,SAAS;EACT,MAAM;EACN,SAAS;GACP,KAAK;GACL,OAAO;EACT;EACA,cAAc;EACd,iBAAiB,EAbnB,gBAAgB,YAaS;CACzB,GACA,MACA,CACF,EAAE;AACJ;AAEA,MAAM,YAAY;AAElB,MAAM,WAAW,GAAG,KAAK,UACvB;CACE,iBAAiB;EACf,QAAQ;EACR,QAAQ;EACR,kBAAkB;EAClB,QAAQ;EACR,KAAK;EACL,YAAY;EACZ,oBAAoB;EACpB,sBAAsB;CACxB;CACA,SAAS,CAAC,KAAK;AACjB,GACA,MACA,CACF,EAAE;;
|
|
1
|
+
{"version":3,"file":"templates.js","names":[],"sources":["../src/templates.ts"],"sourcesContent":["/**\n * Project templates for `mindees create` / `create-mindees`.\n *\n * Templates are in-memory maps of relative path → file contents, so they're\n * deterministic and need no on-disk fixtures. Each scaffolds a runnable\n * MindeesNative app skeleton wired to the current `@mindees/*` packages.\n *\n * @module\n */\n\nimport { VERSION } from './version'\n\n/** A template: a name, a description, and its files (relative path → contents). */\nexport interface Template {\n name: string\n description: string\n files: Record<string, string>\n}\n\n/**\n * Version pinned for scaffolded apps. Derives from the CLI's own\n * {@link VERSION} (the single locked `@mindees/*` version line) so generated\n * projects always pin the framework packages to the same release that\n * scaffolded them, instead of a hardcoded literal.\n */\nconst PKG_VERSION = VERSION\n\nfunction appPackageJson(appName: string, extraDeps: Record<string, string> = {}): string {\n const deps = {\n '@mindees/core': PKG_VERSION,\n '@mindees/renderer': PKG_VERSION,\n ...extraDeps,\n }\n // The `dev`/`build` scripts invoke the `mindees` binary, so the CLI must be a\n // (dev) dependency of the generated app — otherwise the commands only resolve\n // when the CLI happens to be installed globally.\n const devDeps = {\n '@mindees/cli': PKG_VERSION,\n }\n return `${JSON.stringify(\n {\n name: appName,\n version: '0.1.0',\n private: true,\n type: 'module',\n scripts: {\n dev: 'mindees dev',\n build: 'mindees build',\n },\n dependencies: deps,\n devDependencies: devDeps,\n },\n null,\n 2,\n )}\\n`\n}\n\nconst GITIGNORE = 'node_modules/\\ndist/\\n*.log\\n'\n\nconst TSCONFIG = `${JSON.stringify(\n {\n compilerOptions: {\n strict: true,\n module: 'esnext',\n moduleResolution: 'bundler',\n target: 'es2023',\n jsx: 'react',\n jsxFactory: 'createElement',\n jsxFragmentFactory: 'Fragment',\n verbatimModuleSyntax: true,\n },\n include: ['src'],\n },\n null,\n 2,\n)}\\n`\n\n/** The `blank` template: the minimal runnable app. */\nconst blank: Template = {\n name: 'blank',\n description: 'A minimal MindeesNative app (one screen).',\n files: {\n 'package.json': appPackageJson('{{appName}}'),\n '.gitignore': GITIGNORE,\n 'tsconfig.json': TSCONFIG,\n 'README.md': `# {{appName}}\\n\\nA MindeesNative app. Start with \\`mindees dev\\`.\\n`,\n 'src/App.tsx': `import { createElement } from '@mindees/core'\n\nexport function App() {\n return (\n <view>\n <text>Hello from {{appName}} 👋</text>\n </view>\n )\n}\n`,\n 'src/main.tsx': `import { createDomBackend, render } from '@mindees/renderer'\nimport { App } from './App'\n\nconst root = document.getElementById('app')\nif (root) render(App, {}, createDomBackend(), root)\n`,\n },\n}\n\n/** The `counter` template: shows fine-grained reactivity (signals). */\nconst counter: Template = {\n name: 'counter',\n description: 'A reactive counter — demonstrates signals + fine-grained updates.',\n files: {\n 'package.json': appPackageJson('{{appName}}'),\n '.gitignore': GITIGNORE,\n 'tsconfig.json': TSCONFIG,\n 'README.md': `# {{appName}}\\n\\nA reactive counter built with MindeesNative signals.\\n`,\n 'src/App.tsx': `import { createElement, signal } from '@mindees/core'\n\nexport function App() {\n const count = signal(0)\n return (\n <view>\n <text>{() => \\`Count: \\${count()}\\`}</text>\n <button onClick={() => count.set(count() + 1)}>Increment</button>\n </view>\n )\n}\n`,\n 'src/main.tsx': `import { createDomBackend, render } from '@mindees/renderer'\nimport { App } from './App'\n\nconst root = document.getElementById('app')\nif (root) render(App, {}, createDomBackend(), root)\n`,\n },\n}\n\n/**\n * The `app` template: a polished starter showing the batteries — Atlas components,\n * a standard hook, and theming — so an ordinary developer has a real screen in seconds.\n */\nconst app: Template = {\n name: 'app',\n description: 'A polished starter — Atlas components, hooks, and theming (batteries included).',\n files: {\n 'package.json': appPackageJson('{{appName}}', { '@mindees/atlas': PKG_VERSION }),\n '.gitignore': GITIGNORE,\n 'tsconfig.json': TSCONFIG,\n 'README.md': `# {{appName}}\\n\\nA MindeesNative app using the Atlas UI kit. Run \\`mindees dev\\`.\\n`,\n 'src/App.tsx': `import { createElement } from '@mindees/core'\nimport { Button, Card, Switch, Text, useToggle } from '@mindees/atlas'\n\nexport function App() {\n const dark = useToggle(false)\n return (\n <Card style={{ gap: 12, maxWidth: 360 }}>\n <Text style={{ fontSize: 24, fontWeight: 700 }}>Welcome to {{appName}} ✨</Text>\n <Text>Signals, native UI, and batteries included — from one TypeScript codebase.</Text>\n <Switch value={dark.value} onValueChange={dark.set} />\n <Button title=\"Get started\" onPress={() => console.log('Let us build!')} />\n </Card>\n )\n}\n`,\n 'src/main.tsx': `import { createDomBackend, render } from '@mindees/renderer'\nimport { App } from './App'\n\nconst root = document.getElementById('app')\nif (root) render(App, {}, createDomBackend(), root)\n`,\n },\n}\n\n/** All built-in templates, keyed by name. */\nexport const TEMPLATES: Record<string, Template> = {\n blank,\n counter,\n app,\n}\n\n/** The default template name used when none is specified. */\nexport const DEFAULT_TEMPLATE = 'blank'\n\n/** Look up a template by name, or `undefined` if unknown. */\nexport function getTemplate(name: string): Template | undefined {\n return TEMPLATES[name]\n}\n\n/** Names of all available templates. */\nexport function templateNames(): string[] {\n return Object.keys(TEMPLATES)\n}\n\n/**\n * Materialize a template's files for `appName`: substitutes the `{{appName}}`\n * placeholder and returns a fresh path → contents map. Pure (no I/O).\n */\nexport function materialize(template: Template, appName: string): Record<string, string> {\n const out: Record<string, string> = {}\n for (const [path, contents] of Object.entries(template.files)) {\n out[path] = contents.replaceAll('{{appName}}', appName)\n }\n return out\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAyBA,MAAM,cAAc;AAEpB,SAAS,eAAe,SAAiB,YAAoC,CAAC,GAAW;CACvF,MAAM,OAAO;EACX,iBAAiB;EACjB,qBAAqB;EACrB,GAAG;CACL;CAOA,OAAO,GAAG,KAAK,UACb;EACE,MAAM;EACN,SAAS;EACT,SAAS;EACT,MAAM;EACN,SAAS;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GED
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","names":[],"sources":["../src/version.ts"],"sourcesContent":["/**\n * Single source of truth for the `@mindees/cli` package version.\n *\n * All `@mindees/*` packages share one locked version line (Changesets, fixed\n * group). Keeping it in its own dependency-free module lets both the public\n * package metadata ({@link index}) and the scaffolder's generated\n * `package.json` ({@link templates}) pin to the same value without a circular\n * import.\n *\n * @module\n */\n\n/** The package version. All `@mindees/*` packages share one locked version line. */\nexport const VERSION = '0.
|
|
1
|
+
{"version":3,"file":"version.js","names":[],"sources":["../src/version.ts"],"sourcesContent":["/**\n * Single source of truth for the `@mindees/cli` package version.\n *\n * All `@mindees/*` packages share one locked version line (Changesets, fixed\n * group). Keeping it in its own dependency-free module lets both the public\n * package metadata ({@link index}) and the scaffolder's generated\n * `package.json` ({@link templates}) pin to the same value without a circular\n * import.\n *\n * @module\n */\n\n/** The package version. All `@mindees/*` packages share one locked version line. */\nexport const VERSION = '0.11.0'\n"],"mappings":";;;;;;;;;;;;;AAaA,MAAa,UAAU"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindees/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "MindeesNative Forge — the `mindees` CLI: create, build (via the compiler), dev (rebuild orchestrator), doctor, info.",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"directory": "packages/cli"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@mindees/core": "0.
|
|
31
|
-
"@mindees/compiler": "0.
|
|
32
|
-
"@mindees/ai": "0.
|
|
30
|
+
"@mindees/core": "0.11.0",
|
|
31
|
+
"@mindees/compiler": "0.11.0",
|
|
32
|
+
"@mindees/ai": "0.11.0"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "tsdown",
|