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.
- package/dist/resolver.mjs +14 -1
- package/package.json +4 -4
- package/templates/classic/starter/content/package.json +4 -0
- package/templates/classic/starter/features/examples/src/wb-rules-modules/counter.ts +5 -11
- package/templates/classic/starter/features/examples-vitest/tests/wb-rules-modules/counter.test.ts +0 -12
- package/templates/classic/starter/template.json +1 -2
- package/templates/classic/store/content/package.json +1 -1
- package/templates/mono/package/content/package.json +6 -0
- package/templates/mono/package/features/package/packages/{{package}}/package.json.tt +3 -0
- package/templates/mono/sites/content/package.json +6 -0
- package/templates/mono/sites/content/sites/home-staging/package.json +1 -1
- package/templates/mono/sites/features/examples/sites/home/package.json +17 -0
- package/templates/mono/sites/features/examples/sites/home/src/wb-rules/01-startup.ts +1 -0
- package/templates/mono/sites/features/examples/sites/home/src/wb-rules-modules/.gitkeep +0 -0
- package/templates/mono/sites/features/examples/sites/home-staging/package.json +17 -0
- package/templates/mono/sites/features/examples/sites/home-staging/src/wb-rules/01-startup.ts +1 -0
- package/templates/mono/sites/features/examples/sites/home-staging/src/wb-rules-modules/.gitkeep +0 -0
- package/templates/mono/sites/template.json +0 -5
- package/templates/shared/base/content/package.json +5 -8
- package/templates/{classic/starter → shared/base}/features/vitest/package.json +1 -1
- package/templates/shared/base/template.json +2 -1
- package/templates/mono/core/features/vitest/package.json +0 -10
- /package/templates/{classic/starter → shared/base}/features/vitest/tsconfig.json +0 -0
- /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'], {
|
|
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.
|
|
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/
|
|
45
|
-
"@mirta/
|
|
46
|
-
"@mirta/
|
|
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"
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export interface Counter {
|
|
6
6
|
|
|
7
7
|
/** Позволяет прочесть значение счётчика. */
|
|
8
|
-
|
|
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
|
-
|
|
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
|
|
package/templates/classic/starter/features/examples-vitest/tests/wb-rules-modules/counter.test.ts
CHANGED
|
@@ -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()
|
|
@@ -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 @@
|
|
|
1
|
+
log('This is fine.')
|
|
File without changes
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
log('This is fine staging.')
|
package/templates/mono/sites/features/examples/sites/home-staging/src/wb-rules-modules/.gitkeep
ADDED
|
File without changes
|
|
@@ -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.
|
|
11
|
-
"@mirta/globals": "0.4.
|
|
12
|
-
"@mirta/rollup": "0.4.
|
|
13
|
-
"@mirta/tsconfig": "0.4.
|
|
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",
|
|
File without changes
|
|
File without changes
|