create-mistri 0.0.0-stage → 1.0.0-rc.10

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 (5) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +14 -2
  3. package/bin.js +22 -0
  4. package/mark.svg +1 -0
  5. package/package.json +35 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Baljinder Randhawa
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.
package/README.md CHANGED
@@ -1,3 +1,15 @@
1
- # Temporary Holding Version
1
+ <img src="mark.svg" alt="mistri" width="48" height="48" />
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ # create-mistri
4
+
5
+ Starts a [mistri](https://mistriwork.dev) App: `npm create mistri my-app` is `mistri new my-app`, run by the
6
+ `@mistriwork/mistri` this package depends on, at its own version. Arguments go to `mistri new` as they are typed; npm
7
+ wants `--` before a flag:
8
+
9
+ ```bash
10
+ npm create mistri # a starter App
11
+ npm create mistri my-app -- --brief BRIEF.md # an App drafted from a brief
12
+ ```
13
+
14
+ Node 24.22.1 or newer. The App framework, its command and its reference are in
15
+ [`@mistriwork/mistri`](https://www.npmjs.com/package/@mistriwork/mistri).
package/bin.js ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ /*
3
+ * `npm create mistri <args>` runs this as `create-mistri <args>`: it is `mistri new <args>`, run by the mistri this
4
+ * package depends on at its own version. Nothing is parsed here, so a flag the App framework learns works the
5
+ * day it ships (`npm create mistri my-app -- --brief BRIEF.md`).
6
+ */
7
+ import { spawnSync } from 'node:child_process';
8
+ import { readFileSync } from 'node:fs';
9
+ import { createRequire } from 'node:module';
10
+ import { dirname, join } from 'node:path';
11
+
12
+ const manifestPath = createRequire(import.meta.url).resolve('@mistriwork/mistri/package.json');
13
+ const { bin } = JSON.parse(readFileSync(manifestPath, 'utf8'));
14
+ const entry = join(dirname(manifestPath), typeof bin === 'string' ? bin : bin.mistri);
15
+
16
+ const run = spawnSync(process.execPath, [entry, 'new', ...process.argv.slice(2)], { stdio: 'inherit' });
17
+ if (run.error) {
18
+ console.error(`create-mistri: could not run ${entry}: ${run.error.message}`);
19
+ process.exit(1);
20
+ }
21
+ /* A child ended by a signal has no status: say it failed, as a shell would. */
22
+ process.exit(run.status ?? 1);
package/mark.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><style>.i{fill:#1c1a17}.a{fill:#6b3fd4}@media (prefers-color-scheme:dark){.i{fill:#f2f0ec}.a{fill:#a88bff}}</style><path class="i" d="M2 4H26V18H22V10H18V28H12V10H8V28H2Z"/><rect class="a" x="20" y="20" width="10" height="8"/></svg>
package/package.json CHANGED
@@ -1,6 +1,37 @@
1
1
  {
2
2
  "name": "create-mistri",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0-rc.10",
4
+ "description": "npm create mistri: scaffold a mistri App, the same as `mistri new`.",
5
+ "keywords": [
6
+ "create",
7
+ "mistri",
8
+ "scaffold"
9
+ ],
10
+ "homepage": "https://mistriwork.dev",
11
+ "bugs": {
12
+ "url": "https://github.com/rbaljinder/mistri/issues"
13
+ },
14
+ "license": "MIT",
15
+ "author": "Baljinder Randhawa",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/rbaljinder/mistri.git",
19
+ "directory": "packages/create-mistri"
20
+ },
21
+ "bin": {
22
+ "create-mistri": "bin.js"
23
+ },
24
+ "files": [
25
+ "bin.js",
26
+ "README.md",
27
+ "mark.svg",
28
+ "LICENSE"
29
+ ],
30
+ "type": "module",
31
+ "dependencies": {
32
+ "@mistriwork/mistri": "1.0.0-rc.10"
33
+ },
34
+ "engines": {
35
+ "node": ">=24.22.1"
36
+ }
37
+ }