create-mirta 0.4.3 → 0.4.4

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 (24) hide show
  1. package/dist/resolver.mjs +14 -1
  2. package/package.json +4 -4
  3. package/templates/classic/starter/content/package.json +4 -0
  4. package/templates/classic/starter/features/examples/src/wb-rules-modules/counter.ts +5 -11
  5. package/templates/classic/starter/features/examples-vitest/tests/wb-rules-modules/counter.test.ts +0 -12
  6. package/templates/classic/starter/template.json +1 -2
  7. package/templates/classic/store/content/package.json +1 -1
  8. package/templates/mono/package/content/package.json +6 -0
  9. package/templates/mono/package/features/package/packages/{{package}}/package.json.tt +3 -0
  10. package/templates/mono/sites/content/package.json +6 -0
  11. package/templates/mono/sites/content/sites/home-staging/package.json +1 -1
  12. package/templates/mono/sites/features/examples/sites/home/package.json +17 -0
  13. package/templates/mono/sites/features/examples/sites/home/src/wb-rules/01-startup.ts +1 -0
  14. package/templates/mono/sites/features/examples/sites/home/src/wb-rules-modules/.gitkeep +0 -0
  15. package/templates/mono/sites/features/examples/sites/home-staging/package.json +17 -0
  16. package/templates/mono/sites/features/examples/sites/home-staging/src/wb-rules/01-startup.ts +1 -0
  17. package/templates/mono/sites/features/examples/sites/home-staging/src/wb-rules-modules/.gitkeep +0 -0
  18. package/templates/mono/sites/template.json +0 -5
  19. package/templates/shared/base/content/package.json +5 -8
  20. package/templates/{classic/starter → shared/base}/features/vitest/package.json +1 -1
  21. package/templates/shared/base/template.json +2 -1
  22. package/templates/mono/core/features/vitest/package.json +0 -10
  23. /package/templates/{classic/starter → shared/base}/features/vitest/tsconfig.json +0 -0
  24. /package/templates/{classic/starter → shared/base}/features/vitest-eslint/package.json +0 -0
package/dist/resolver.mjs CHANGED
@@ -666,6 +666,15 @@ async function resolveConnectionStringAsync(input, rutoken) {
666
666
  });
667
667
  }
668
668
 
669
+ /**
670
+ * Режим `stdio`: ввод и вывод наследуются от родительского процесса (терминал), `stderr` перехватывается.
671
+ *
672
+ * Используется, когда важно видеть прогресс команды (например, `rsync`).
673
+ *
674
+ * @since 0.4.0
675
+ *
676
+ **/
677
+ const STDIO_INTERACTIVE = ['inherit', 'inherit', 'pipe'];
669
678
  /**
670
679
  * Режим `stdio`: ввод игнорируется, `stdout` и `stderr` перехватываются.
671
680
  *
@@ -789,7 +798,11 @@ async function promptInstallDependenciesAsync(cwd) {
789
798
  });
790
799
  if (!manager)
791
800
  return;
792
- await runCommandAsync(manager, ['install'], { cwd, shell: true });
801
+ await runCommandAsync(manager, ['install'], {
802
+ cwd,
803
+ shell: true,
804
+ stdio: STDIO_INTERACTIVE,
805
+ });
793
806
  }
794
807
 
795
808
  const DEFAULT_BRANCH = 'main';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-mirta",
3
3
  "description": "🛠️ The recommended way to start a Mirta project",
4
- "version": "0.4.3",
4
+ "version": "0.4.4",
5
5
  "license": "Unlicense",
6
6
  "keywords": [
7
7
  "mirta",
@@ -41,9 +41,9 @@
41
41
  "chalk": "^5.6.2",
42
42
  "gradient-string": "^3.0.0",
43
43
  "jsonc-parser": "^3.3.1",
44
- "@mirta/i18n": "0.4.3",
45
- "@mirta/staged-args": "0.4.3",
46
- "@mirta/basics": "0.4.3"
44
+ "@mirta/basics": "0.4.4",
45
+ "@mirta/i18n": "0.4.4",
46
+ "@mirta/staged-args": "0.4.4"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/prompts": "^2.4.9"
@@ -7,5 +7,9 @@
7
7
  "build": "cross-env NODE_ENV=production rollup -c node:@mirta/rollup/config",
8
8
  "build:dev": "rollup -c node:@mirta/rollup/config",
9
9
  "wb:deploy": "mirta deploy"
10
+ },
11
+ "dependencies": {
12
+ "@mirta/basics": "0.4.4",
13
+ "mirta": "0.4.4"
10
14
  }
11
15
  }
@@ -5,7 +5,7 @@
5
5
  export interface Counter {
6
6
 
7
7
  /** Позволяет прочесть значение счётчика. */
8
- get count(): number
8
+ count: number
9
9
 
10
10
  /** Увеличивает значение счётчика на единицу. */
11
11
  increment(): void
@@ -20,22 +20,16 @@ export interface Counter {
20
20
  **/
21
21
  export function useCounter(): Counter {
22
22
 
23
- // Значение счётчика - его индивидуальное состояние
24
- let count = 0
25
-
26
23
  return {
27
24
 
28
- get count() {
29
-
30
- return count
31
-
32
- },
25
+ // Значение счётчика - его индивидуальное состояние
26
+ count: 0,
33
27
 
34
28
  increment() {
35
29
 
36
- count += 1
30
+ this.count += 1
37
31
 
38
- }
32
+ },
39
33
 
40
34
  }
41
35
 
@@ -26,18 +26,6 @@ describe('Counter', () => {
26
26
 
27
27
  })
28
28
 
29
- it('should not allow direct modification of count', () => {
30
-
31
- const initial = counter.count
32
-
33
- // @ts-expect-error – подавляем ошибку этапа компиляции
34
- counter.count = 100
35
-
36
- // Значение не должно измениться
37
- expect(counter.count).toBe(initial)
38
-
39
- })
40
-
41
29
  it('should have independent state for each instance', () => {
42
30
 
43
31
  const counter1 = useCounter()
@@ -2,8 +2,7 @@
2
2
  "extends": "base",
3
3
  "features": {
4
4
  "compound": [
5
- "examples-vitest",
6
- "vitest-eslint"
5
+ "examples-vitest"
7
6
  ]
8
7
  },
9
8
  "order": 1010
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "dependencies": {
3
- "@mirta/store": "0.4.3"
3
+ "@mirta/store": "0.4.4"
4
4
  }
5
5
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "scripts": {
3
+ "build": "cross-env NODE_ENV=production pnpm --filter ./packages/* --filter ./sites/* run build:mono",
4
+ "build:dev": "pnpm --filter ./packages/* --filter ./sites/* run build:mono"
5
+ }
6
+ }
@@ -21,5 +21,8 @@
21
21
  },
22
22
  "imports": {
23
23
  "#src/*": "./src/*.js"
24
+ },
25
+ "scripts": {
26
+ "build:mono": "rollup -c node:@mirta/rollup/config-package"
24
27
  }
25
28
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "scripts": {
3
+ "build": "cross-env NODE_ENV=production pnpm --filter ./sites/* run build:mono",
4
+ "build:dev": "pnpm --filter ./sites/* run build:mono"
5
+ }
6
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "work",
2
+ "name": "home-staging",
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "imports": {
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "home",
3
+ "private": true,
4
+ "type": "module",
5
+ "imports": {
6
+ "#wb/*": [
7
+ "./src/wb-rules/*.js"
8
+ ],
9
+ "#wbm/*": [
10
+ "./src/wb-rules-modules/*.js"
11
+ ]
12
+ },
13
+ "scripts": {
14
+ "build:mono": "rollup -c node:@mirta/rollup/config",
15
+ "wb:deploy": "mirta deploy --profile=home"
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "work",
3
+ "private": true,
4
+ "type": "module",
5
+ "imports": {
6
+ "#wb/*": [
7
+ "./src/wb-rules/*.js"
8
+ ],
9
+ "#wbm/*": [
10
+ "./src/wb-rules-modules/*.js"
11
+ ]
12
+ },
13
+ "scripts": {
14
+ "build:mono": "rollup -c node:@mirta/rollup/config",
15
+ "wb:deploy": "mirta deploy --profile=home-staging"
16
+ }
17
+ }
@@ -1,9 +1,4 @@
1
1
  {
2
2
  "extends": "core",
3
- "features": {
4
- "global": {
5
- "examples": "blocked"
6
- }
7
- },
8
3
  "order": 2010
9
4
  }
@@ -2,15 +2,12 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "scripts": {},
5
- "dependencies": {
6
- "@mirta/basics": "0.4.3",
7
- "mirta": "0.4.3"
8
- },
5
+ "dependencies": {},
9
6
  "devDependencies": {
10
- "@mirta/cli": "0.4.3",
11
- "@mirta/globals": "0.4.3",
12
- "@mirta/rollup": "0.4.3",
13
- "@mirta/tsconfig": "0.4.3",
7
+ "@mirta/cli": "0.4.4",
8
+ "@mirta/globals": "0.4.4",
9
+ "@mirta/rollup": "0.4.4",
10
+ "@mirta/tsconfig": "0.4.4",
14
11
  "@types/node": "^24.10.1",
15
12
  "cross-env": "^10.1.0",
16
13
  "rollup": "^4.55.1",
@@ -3,7 +3,7 @@
3
3
  "test": "vitest run --config @mirta/testing/config"
4
4
  },
5
5
  "devDependencies": {
6
- "@mirta/testing": "0.4.3",
6
+ "@mirta/testing": "0.4.4",
7
7
  "vitest": "^4.0.8",
8
8
  "vitest-mock-extended": "^3.1.0"
9
9
  }
@@ -9,7 +9,8 @@
9
9
  "github": "optional"
10
10
  },
11
11
  "compound": [
12
- "github-vitest"
12
+ "github-vitest",
13
+ "vitest-eslint"
13
14
  ]
14
15
  },
15
16
  "order": 0
@@ -1,10 +0,0 @@
1
- {
2
- "scripts": {
3
- "test": "vitest run --config @mirta/testing/config"
4
- },
5
- "devDependencies": {
6
- "@mirta/testing": "0.4.3",
7
- "vitest": "^4.0.8",
8
- "vitest-mock-extended": "^3.1.0"
9
- }
10
- }