ember-cli 7.1.0-alpha.3 → 7.1.0-beta.2
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/CHANGELOG.md +33 -39
- package/docs/build/data.json +18 -18
- package/lib/models/blueprint.js +5 -1
- package/package.json +41 -41
- package/packages/addon-blueprint/package.json +5 -5
- package/packages/app-blueprint/files/package.json +8 -8
- package/packages/app-blueprint/package.json +4 -4
- package/packages/blueprint-blueprint/files/blueprints/__name__/files/.gitkeep +0 -0
- package/packages/blueprint-blueprint/files/blueprints/__name__/index.js +0 -16
- package/packages/blueprint-blueprint/index.js +0 -5
- package/packages/blueprint-blueprint/package.json +0 -13
- package/packages/blueprint-model/package.json +0 -19
- package/packages/blueprint-model/utilities/directory-for-package-name.js +0 -31
- package/packages/blueprint-model/utilities/edit-file-diff.js +0 -64
- package/packages/blueprint-model/utilities/experiments.js +0 -63
- package/packages/blueprint-model/utilities/file-info.js +0 -170
- package/packages/blueprint-model/utilities/open-editor.js +0 -44
- package/packages/blueprint-model/utilities/prepend-emoji.js +0 -12
- package/packages/blueprint-model/utilities/process-template.js +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,41 @@
|
|
|
1
1
|
# ember-cli Changelog
|
|
2
2
|
|
|
3
|
-
## Release (2026-05-
|
|
3
|
+
## Release (2026-05-30)
|
|
4
4
|
|
|
5
|
-
* ember-cli 7.1.0-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
5
|
+
* ember-cli 7.1.0-beta.2 (patch)
|
|
6
|
+
|
|
7
|
+
#### :bug: Bug Fix
|
|
8
|
+
* `ember-cli`
|
|
9
|
+
* [#11028](https://github.com/ember-cli/ember-cli/pull/11028) [BUGFIX release] fix require(esm) of blueprint indexes ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
|
|
10
|
+
|
|
11
|
+
#### :house: Internal
|
|
12
|
+
* `ember-cli`
|
|
13
|
+
* [#11033](https://github.com/ember-cli/ember-cli/pull/11033) Merge release into beta ([@mansona](https://github.com/mansona))
|
|
14
|
+
|
|
15
|
+
#### Committers: 2
|
|
16
|
+
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
17
|
+
- [@NullVoxPopuli](https://github.com/NullVoxPopuli)
|
|
18
|
+
|
|
19
|
+
## Release (2026-05-22)
|
|
20
|
+
|
|
21
|
+
* ember-cli 7.1.0-beta.1 (minor)
|
|
22
|
+
* @ember-tooling/classic-build-addon-blueprint 7.1.0-beta.1 (minor)
|
|
23
|
+
* @ember-tooling/classic-build-app-blueprint 7.1.0-beta.1 (minor)
|
|
9
24
|
|
|
10
25
|
#### :rocket: Enhancement
|
|
26
|
+
* `ember-cli`, `@ember-tooling/classic-build-addon-blueprint`, `@ember-tooling/classic-build-app-blueprint`
|
|
27
|
+
* [#11026](https://github.com/ember-cli/ember-cli/pull/11026) Prepare 7.1 beta ([@mansona](https://github.com/mansona))
|
|
11
28
|
* `ember-cli`
|
|
12
29
|
* [#10610](https://github.com/ember-cli/ember-cli/pull/10610) use semver-deprecate instead of internal code ([@mansona](https://github.com/mansona))
|
|
13
30
|
* [#11008](https://github.com/ember-cli/ember-cli/pull/11008) update babel-remove-types to v2 ([@mansona](https://github.com/mansona))
|
|
14
31
|
* [#11009](https://github.com/ember-cli/ember-cli/pull/11009) update configstore to v8 ([@mansona](https://github.com/mansona))
|
|
32
|
+
* `@ember-tooling/classic-build-app-blueprint`, `ember-cli`
|
|
33
|
+
* [#11006](https://github.com/ember-cli/ember-cli/pull/11006) update ember-welcome-page to v8 in app blueprint ([@mansona](https://github.com/mansona))
|
|
34
|
+
* [#11005](https://github.com/ember-cli/ember-cli/pull/11005) update ember-cli-deprecation-workflow to v4 ([@mansona](https://github.com/mansona))
|
|
35
|
+
* [#11003](https://github.com/ember-cli/ember-cli/pull/11003) update @ember/optional-features to v3 ([@mansona](https://github.com/mansona))
|
|
15
36
|
|
|
16
37
|
#### :bug: Bug Fix
|
|
17
|
-
* `ember-cli
|
|
38
|
+
* `ember-cli`
|
|
18
39
|
* [#11020](https://github.com/ember-cli/ember-cli/pull/11020) Update diff to latest v8.x ([@mkszepp](https://github.com/mkszepp))
|
|
19
40
|
|
|
20
41
|
#### :house: Internal
|
|
@@ -29,42 +50,15 @@
|
|
|
29
50
|
- Katie Gengler ([@kategengler](https://github.com/kategengler))
|
|
30
51
|
- Markus Sanin ([@mkszepp](https://github.com/mkszepp))
|
|
31
52
|
|
|
32
|
-
## Release (2026-
|
|
33
|
-
|
|
34
|
-
* ember-cli 7.1.0-alpha.2 (minor)
|
|
35
|
-
* @ember-tooling/classic-build-app-blueprint 7.1.0-alpha.2 (minor)
|
|
53
|
+
## Release (2026-05-15)
|
|
36
54
|
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
|
|
40
|
-
* [#11005](https://github.com/ember-cli/ember-cli/pull/11005) update ember-cli-deprecation-workflow to v4 ([@mansona](https://github.com/mansona))
|
|
41
|
-
* [#11003](https://github.com/ember-cli/ember-cli/pull/11003) update @ember/optional-features to v3 ([@mansona](https://github.com/mansona))
|
|
42
|
-
|
|
43
|
-
#### Committers: 1
|
|
44
|
-
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
45
|
-
|
|
46
|
-
## Release (2026-04-24)
|
|
47
|
-
|
|
48
|
-
* ember-cli 7.1.0-alpha.1 (minor)
|
|
49
|
-
* @ember-tooling/classic-build-addon-blueprint 7.1.0-alpha.1 (minor)
|
|
50
|
-
* @ember-tooling/classic-build-app-blueprint 7.1.0-alpha.1 (minor)
|
|
55
|
+
* ember-cli 7.0.0 (major)
|
|
56
|
+
* @ember-tooling/classic-build-addon-blueprint 7.0.0 (major)
|
|
57
|
+
* @ember-tooling/classic-build-app-blueprint 7.0.0 (major)
|
|
51
58
|
|
|
52
|
-
#### :
|
|
53
|
-
* `ember-cli`, `@ember-tooling/classic-build-addon-blueprint`, `@ember-tooling/classic-build-app-blueprint`
|
|
54
|
-
* [#11001](https://github.com/ember-cli/ember-cli/pull/11001) Prepare 7.1 Alpha ([@mansona](https://github.com/mansona))
|
|
55
|
-
|
|
56
|
-
#### Committers: 1
|
|
57
|
-
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
58
|
-
|
|
59
|
-
## Release (2026-04-21)
|
|
60
|
-
|
|
61
|
-
* ember-cli 7.0.0-beta.1 (minor)
|
|
62
|
-
* @ember-tooling/classic-build-addon-blueprint 7.0.0-beta.1 (minor)
|
|
63
|
-
* @ember-tooling/classic-build-app-blueprint 7.0.0-beta.1 (minor)
|
|
64
|
-
|
|
65
|
-
#### :rocket: Enhancement
|
|
59
|
+
#### :boom: Breaking Change
|
|
66
60
|
* `ember-cli`, `@ember-tooling/classic-build-addon-blueprint`, `@ember-tooling/classic-build-app-blueprint`
|
|
67
|
-
* [#
|
|
61
|
+
* [#11022](https://github.com/ember-cli/ember-cli/pull/11022) Promote Beta and update all dependencies for 7.0 release ([@mansona](https://github.com/mansona))
|
|
68
62
|
|
|
69
63
|
#### Committers: 1
|
|
70
64
|
- Chris Manson ([@mansona](https://github.com/mansona))
|
package/docs/build/data.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"logo": "https://ember-cli.com/assets/images/ember-cli-logo-small-dark.png",
|
|
4
4
|
"name": "ember-cli",
|
|
5
5
|
"description": "Command line tool for developing ambitious ember.js apps",
|
|
6
|
-
"version": "7.1.0-
|
|
6
|
+
"version": "7.1.0-beta.2-beta-27b546bfdd"
|
|
7
7
|
},
|
|
8
8
|
"files": {
|
|
9
9
|
"lib/broccoli/default-packager.js": {
|
|
@@ -4624,7 +4624,7 @@
|
|
|
4624
4624
|
},
|
|
4625
4625
|
{
|
|
4626
4626
|
"file": "lib/models/blueprint.js",
|
|
4627
|
-
"line":
|
|
4627
|
+
"line": 1494,
|
|
4628
4628
|
"static": 1,
|
|
4629
4629
|
"itemtype": "method",
|
|
4630
4630
|
"name": "list",
|
|
@@ -4654,7 +4654,7 @@
|
|
|
4654
4654
|
},
|
|
4655
4655
|
{
|
|
4656
4656
|
"file": "lib/models/blueprint.js",
|
|
4657
|
-
"line":
|
|
4657
|
+
"line": 1558,
|
|
4658
4658
|
"description": "Files that are renamed when installed into the target directory.\nThis allows including files in the blueprint that would have an effect\non another process, such as a file named `.gitignore`.\n\nThe keys are the filenames used in the files folder.\nThe values are the filenames used in the target directory.",
|
|
4659
4659
|
"static": 1,
|
|
4660
4660
|
"itemtype": "property",
|
|
@@ -4665,7 +4665,7 @@
|
|
|
4665
4665
|
},
|
|
4666
4666
|
{
|
|
4667
4667
|
"file": "lib/models/blueprint.js",
|
|
4668
|
-
"line":
|
|
4668
|
+
"line": 1573,
|
|
4669
4669
|
"static": 1,
|
|
4670
4670
|
"itemtype": "property",
|
|
4671
4671
|
"name": "ignoredFiles",
|
|
@@ -4675,7 +4675,7 @@
|
|
|
4675
4675
|
},
|
|
4676
4676
|
{
|
|
4677
4677
|
"file": "lib/models/blueprint.js",
|
|
4678
|
-
"line":
|
|
4678
|
+
"line": 1579,
|
|
4679
4679
|
"static": 1,
|
|
4680
4680
|
"itemtype": "property",
|
|
4681
4681
|
"name": "ignoredUpdateFiles",
|
|
@@ -4685,7 +4685,7 @@
|
|
|
4685
4685
|
},
|
|
4686
4686
|
{
|
|
4687
4687
|
"file": "lib/models/blueprint.js",
|
|
4688
|
-
"line":
|
|
4688
|
+
"line": 1585,
|
|
4689
4689
|
"static": 1,
|
|
4690
4690
|
"itemtype": "property",
|
|
4691
4691
|
"name": "defaultLookupPaths",
|
|
@@ -4695,7 +4695,7 @@
|
|
|
4695
4695
|
},
|
|
4696
4696
|
{
|
|
4697
4697
|
"file": "lib/models/blueprint.js",
|
|
4698
|
-
"line":
|
|
4698
|
+
"line": 1593,
|
|
4699
4699
|
"access": "private",
|
|
4700
4700
|
"tagname": "",
|
|
4701
4701
|
"itemtype": "method",
|
|
@@ -4717,7 +4717,7 @@
|
|
|
4717
4717
|
},
|
|
4718
4718
|
{
|
|
4719
4719
|
"file": "lib/models/blueprint.js",
|
|
4720
|
-
"line":
|
|
4720
|
+
"line": 1606,
|
|
4721
4721
|
"access": "private",
|
|
4722
4722
|
"tagname": "",
|
|
4723
4723
|
"itemtype": "method",
|
|
@@ -4735,7 +4735,7 @@
|
|
|
4735
4735
|
},
|
|
4736
4736
|
{
|
|
4737
4737
|
"file": "lib/models/blueprint.js",
|
|
4738
|
-
"line":
|
|
4738
|
+
"line": 1617,
|
|
4739
4739
|
"access": "private",
|
|
4740
4740
|
"tagname": "",
|
|
4741
4741
|
"itemtype": "method",
|
|
@@ -4753,7 +4753,7 @@
|
|
|
4753
4753
|
},
|
|
4754
4754
|
{
|
|
4755
4755
|
"file": "lib/models/blueprint.js",
|
|
4756
|
-
"line":
|
|
4756
|
+
"line": 1626,
|
|
4757
4757
|
"access": "private",
|
|
4758
4758
|
"tagname": "",
|
|
4759
4759
|
"itemtype": "method",
|
|
@@ -4780,7 +4780,7 @@
|
|
|
4780
4780
|
},
|
|
4781
4781
|
{
|
|
4782
4782
|
"file": "lib/models/blueprint.js",
|
|
4783
|
-
"line":
|
|
4783
|
+
"line": 1640,
|
|
4784
4784
|
"access": "private",
|
|
4785
4785
|
"tagname": "",
|
|
4786
4786
|
"itemtype": "method",
|
|
@@ -4802,7 +4802,7 @@
|
|
|
4802
4802
|
},
|
|
4803
4803
|
{
|
|
4804
4804
|
"file": "lib/models/blueprint.js",
|
|
4805
|
-
"line":
|
|
4805
|
+
"line": 1652,
|
|
4806
4806
|
"description": "Combines provided lookup paths with defaults and removes\nduplicates.",
|
|
4807
4807
|
"access": "private",
|
|
4808
4808
|
"tagname": "",
|
|
@@ -4825,7 +4825,7 @@
|
|
|
4825
4825
|
},
|
|
4826
4826
|
{
|
|
4827
4827
|
"file": "lib/models/blueprint.js",
|
|
4828
|
-
"line":
|
|
4828
|
+
"line": 1667,
|
|
4829
4829
|
"description": "Looks for a __path__ token in the files folder. Must be present for\nthe blueprint to support pod tokens.",
|
|
4830
4830
|
"access": "private",
|
|
4831
4831
|
"tagname": "",
|
|
@@ -4848,7 +4848,7 @@
|
|
|
4848
4848
|
},
|
|
4849
4849
|
{
|
|
4850
4850
|
"file": "lib/models/blueprint.js",
|
|
4851
|
-
"line":
|
|
4851
|
+
"line": 1706,
|
|
4852
4852
|
"access": "private",
|
|
4853
4853
|
"tagname": "",
|
|
4854
4854
|
"itemtype": "method",
|
|
@@ -4870,7 +4870,7 @@
|
|
|
4870
4870
|
},
|
|
4871
4871
|
{
|
|
4872
4872
|
"file": "lib/models/blueprint.js",
|
|
4873
|
-
"line":
|
|
4873
|
+
"line": 1720,
|
|
4874
4874
|
"access": "private",
|
|
4875
4875
|
"tagname": "",
|
|
4876
4876
|
"itemtype": "method",
|
|
@@ -4892,7 +4892,7 @@
|
|
|
4892
4892
|
},
|
|
4893
4893
|
{
|
|
4894
4894
|
"file": "lib/models/blueprint.js",
|
|
4895
|
-
"line":
|
|
4895
|
+
"line": 1730,
|
|
4896
4896
|
"access": "private",
|
|
4897
4897
|
"tagname": "",
|
|
4898
4898
|
"itemtype": "method",
|
|
@@ -4907,7 +4907,7 @@
|
|
|
4907
4907
|
},
|
|
4908
4908
|
{
|
|
4909
4909
|
"file": "lib/models/blueprint.js",
|
|
4910
|
-
"line":
|
|
4910
|
+
"line": 1743,
|
|
4911
4911
|
"access": "private",
|
|
4912
4912
|
"tagname": "",
|
|
4913
4913
|
"itemtype": "method",
|
|
@@ -4929,7 +4929,7 @@
|
|
|
4929
4929
|
},
|
|
4930
4930
|
{
|
|
4931
4931
|
"file": "lib/models/blueprint.js",
|
|
4932
|
-
"line":
|
|
4932
|
+
"line": 1793,
|
|
4933
4933
|
"description": "Takes a substring of a string based on byte offsets.",
|
|
4934
4934
|
"access": "private",
|
|
4935
4935
|
"tagname": "",
|
package/lib/models/blueprint.js
CHANGED
|
@@ -1474,7 +1474,11 @@ Blueprint.load = function (blueprintPath, blueprintOptions) {
|
|
|
1474
1474
|
|
|
1475
1475
|
let constructorPath = path.resolve(blueprintPath, 'index.js');
|
|
1476
1476
|
if (Blueprint._existsSync(constructorPath)) {
|
|
1477
|
-
|
|
1477
|
+
let blueprintModule = require(constructorPath);
|
|
1478
|
+
|
|
1479
|
+
if (blueprintModule.__esModule) {
|
|
1480
|
+
blueprintModule = blueprintModule.default;
|
|
1481
|
+
}
|
|
1478
1482
|
|
|
1479
1483
|
if (typeof blueprintModule === 'function') {
|
|
1480
1484
|
Constructor = blueprintModule;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-cli",
|
|
3
|
-
"version": "7.1.0-
|
|
3
|
+
"version": "7.1.0-beta.2",
|
|
4
4
|
"description": "Command line tool for developing ambitious ember.js apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -31,34 +31,36 @@
|
|
|
31
31
|
"minor": "prerelease",
|
|
32
32
|
"patch": "prerelease"
|
|
33
33
|
},
|
|
34
|
-
"semverIncrementTag": "
|
|
35
|
-
"publishTag": "
|
|
34
|
+
"semverIncrementTag": "beta",
|
|
35
|
+
"publishTag": "beta"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ember/
|
|
39
|
-
"@
|
|
38
|
+
"@ember-tooling/blueprint-blueprint": "^0.3.0",
|
|
39
|
+
"@ember-tooling/blueprint-model": "^0.6.3",
|
|
40
|
+
"@ember/app-blueprint": "~7.1.0-beta.1",
|
|
41
|
+
"@pnpm/find-workspace-dir": "^1000.1.5",
|
|
40
42
|
"babel-remove-types": "^2.0.0",
|
|
41
43
|
"broccoli": "^4.0.0",
|
|
42
|
-
"broccoli-concat": "^4.2.
|
|
44
|
+
"broccoli-concat": "^4.2.7",
|
|
43
45
|
"broccoli-config-loader": "^1.0.1",
|
|
44
|
-
"broccoli-config-replace": "^1.1.
|
|
46
|
+
"broccoli-config-replace": "^1.1.3",
|
|
45
47
|
"broccoli-debug": "^0.6.5",
|
|
46
48
|
"broccoli-funnel": "^3.0.8",
|
|
47
49
|
"broccoli-funnel-reducer": "^1.0.0",
|
|
48
50
|
"broccoli-merge-trees": "^4.2.0",
|
|
49
|
-
"broccoli-middleware": "^2.1.
|
|
51
|
+
"broccoli-middleware": "^2.1.2",
|
|
50
52
|
"broccoli-slow-trees": "^3.1.0",
|
|
51
53
|
"broccoli-source": "^3.0.1",
|
|
52
54
|
"broccoli-stew": "^3.0.0",
|
|
53
55
|
"calculate-cache-key-for-tree": "^2.0.0",
|
|
54
56
|
"capture-exit": "^2.0.0",
|
|
55
57
|
"chalk": "^5.6.2",
|
|
56
|
-
"ci-info": "^4.
|
|
58
|
+
"ci-info": "^4.4.0",
|
|
57
59
|
"clean-base-url": "^1.0.0",
|
|
58
60
|
"compression": "^1.8.1",
|
|
59
61
|
"configstore": "^8.0.0",
|
|
60
62
|
"console-ui": "^3.1.2",
|
|
61
|
-
"content-tag": "^4.
|
|
63
|
+
"content-tag": "^4.2.0",
|
|
62
64
|
"core-object": "^3.1.5",
|
|
63
65
|
"dag-map": "^2.0.2",
|
|
64
66
|
"diff": "^8.0.4",
|
|
@@ -70,87 +72,85 @@
|
|
|
70
72
|
"execa": "^9.6.1",
|
|
71
73
|
"exit": "^0.1.2",
|
|
72
74
|
"express": "^5.2.1",
|
|
73
|
-
"filesize": "^11.0.
|
|
75
|
+
"filesize": "^11.0.17",
|
|
74
76
|
"find-up": "^8.0.0",
|
|
75
77
|
"find-yarn-workspace-root": "^2.0.0",
|
|
76
|
-
"fs-extra": "^11.3.
|
|
78
|
+
"fs-extra": "^11.3.5",
|
|
77
79
|
"fs-tree-diff": "^2.0.1",
|
|
78
80
|
"get-caller-file": "^2.0.5",
|
|
79
81
|
"git-repo-info": "^2.1.1",
|
|
80
|
-
"glob": "^13.0.
|
|
82
|
+
"glob": "^13.0.6",
|
|
81
83
|
"heimdalljs": "^0.2.6",
|
|
82
84
|
"heimdalljs-fs-monitor": "^1.1.2",
|
|
83
85
|
"heimdalljs-graph": "^1.0.0",
|
|
84
86
|
"heimdalljs-logger": "^0.1.10",
|
|
85
87
|
"http-proxy": "^1.18.1",
|
|
86
88
|
"inflection": "^3.0.2",
|
|
87
|
-
"inquirer": "^13.
|
|
89
|
+
"inquirer": "^13.4.3",
|
|
88
90
|
"is-git-url": "^1.0.0",
|
|
89
|
-
"is-language-code": "^5.1.
|
|
90
|
-
"lodash": "^4.
|
|
91
|
-
"markdown-it": "^14.1.
|
|
91
|
+
"is-language-code": "^5.1.3",
|
|
92
|
+
"lodash": "^4.18.1",
|
|
93
|
+
"markdown-it": "^14.1.1",
|
|
92
94
|
"markdown-it-terminal": "^0.4.0",
|
|
93
|
-
"minimatch": "^10.
|
|
95
|
+
"minimatch": "^10.2.5",
|
|
94
96
|
"morgan": "^1.10.1",
|
|
95
97
|
"nopt": "^3.0.6",
|
|
96
98
|
"npm-package-arg": "^13.0.2",
|
|
97
99
|
"os-locale": "^6.0.2",
|
|
98
100
|
"p-defer": "^4.0.1",
|
|
99
|
-
"portfinder": "^1.0.
|
|
101
|
+
"portfinder": "^1.0.38",
|
|
100
102
|
"promise-map-series": "^0.3.0",
|
|
101
103
|
"promise.hash.helper": "^1.0.8",
|
|
102
104
|
"quick-temp": "^0.1.9",
|
|
103
|
-
"resolve": "^1.22.
|
|
105
|
+
"resolve": "^1.22.12",
|
|
104
106
|
"resolve-package-path": "^4.0.3",
|
|
105
|
-
"safe-stable-stringify": "^2.
|
|
107
|
+
"safe-stable-stringify": "^2.5.0",
|
|
106
108
|
"sane": "^5.0.1",
|
|
107
|
-
"semver": "^7.
|
|
109
|
+
"semver": "^7.8.0",
|
|
108
110
|
"semver-deprecate": "^1.1.0",
|
|
109
111
|
"silent-error": "^1.1.1",
|
|
110
|
-
"sort-package-json": "^3.6.
|
|
112
|
+
"sort-package-json": "^3.6.1",
|
|
111
113
|
"symlink-or-copy": "^1.3.1",
|
|
112
|
-
"testem": "^3.
|
|
114
|
+
"testem": "^3.20.0",
|
|
113
115
|
"tiny-lr": "^2.0.0",
|
|
114
116
|
"tree-sync": "^2.1.0",
|
|
115
117
|
"walk-sync": "^4.0.1",
|
|
116
118
|
"watch-detector": "^1.0.2",
|
|
117
|
-
"workerpool": "^10.0.
|
|
119
|
+
"workerpool": "^10.0.2",
|
|
118
120
|
"yam": "^1.0.0",
|
|
119
|
-
"@ember-tooling/
|
|
120
|
-
"@ember-tooling/blueprint
|
|
121
|
-
"@ember-tooling/classic-build-app-blueprint": "7.1.0-alpha.3",
|
|
122
|
-
"@ember-tooling/classic-build-addon-blueprint": "7.1.0-alpha.2"
|
|
121
|
+
"@ember-tooling/classic-build-addon-blueprint": "7.1.0-beta.1",
|
|
122
|
+
"@ember-tooling/classic-build-app-blueprint": "7.1.0-beta.1"
|
|
123
123
|
},
|
|
124
124
|
"devDependencies": {
|
|
125
|
-
"broccoli-plugin": "^4.0.
|
|
125
|
+
"broccoli-plugin": "^4.0.7",
|
|
126
126
|
"broccoli-test-helper": "^2.0.0",
|
|
127
|
-
"chai": "^6.2.
|
|
127
|
+
"chai": "^6.2.2",
|
|
128
128
|
"chai-as-promised": "^8.0.2",
|
|
129
129
|
"chai-files": "^1.4.0",
|
|
130
130
|
"chai-jest-snapshot": "^2.0.0",
|
|
131
131
|
"concurrently": "^9.2.1",
|
|
132
132
|
"ember-cli-blueprint-test-helpers": "^0.19.2",
|
|
133
133
|
"ember-cli-internal-test-helpers": "^0.9.1",
|
|
134
|
-
"eslint": "^8.
|
|
134
|
+
"eslint": "^8.57.1",
|
|
135
135
|
"eslint-config-prettier": "^10.1.8",
|
|
136
|
-
"eslint-plugin-chai-expect": "^3.
|
|
136
|
+
"eslint-plugin-chai-expect": "^3.1.0",
|
|
137
137
|
"eslint-plugin-mocha": "^10.5.0",
|
|
138
|
-
"eslint-plugin-n": "^17.
|
|
138
|
+
"eslint-plugin-n": "^17.24.0",
|
|
139
139
|
"fixturify": "^3.0.0",
|
|
140
140
|
"fixturify-project": "^2.1.1",
|
|
141
|
-
"jsdom": "^21.1.
|
|
141
|
+
"jsdom": "^21.1.2",
|
|
142
142
|
"latest-version": "^9.0.0",
|
|
143
143
|
"mocha": "^11.7.5",
|
|
144
|
-
"nock": "^14.0.
|
|
144
|
+
"nock": "^14.0.15",
|
|
145
145
|
"nyc": "^17.1.0",
|
|
146
146
|
"prettier": "3.7.4",
|
|
147
|
-
"release-plan": "^0.17.
|
|
148
|
-
"strip-ansi": "^7.
|
|
149
|
-
"supertest": "^7.
|
|
150
|
-
"testdouble": "^3.
|
|
147
|
+
"release-plan": "^0.17.4",
|
|
148
|
+
"strip-ansi": "^7.2.0",
|
|
149
|
+
"supertest": "^7.2.2",
|
|
150
|
+
"testdouble": "^3.20.2",
|
|
151
151
|
"tmp": "^0.2.5",
|
|
152
152
|
"tmp-promise": "^3.0.3",
|
|
153
|
-
"websocket": "^1.0.
|
|
153
|
+
"websocket": "^1.0.35",
|
|
154
154
|
"which": "6.0.0",
|
|
155
155
|
"yuidoc-ember-cli-theme": "^1.0.4",
|
|
156
156
|
"yuidocjs": "0.10.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-tooling/classic-build-addon-blueprint",
|
|
3
|
-
"version": "7.1.0-
|
|
3
|
+
"version": "7.1.0-beta.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/ember-cli/ember-cli.git",
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"ember-blueprint"
|
|
12
12
|
],
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@ember-tooling/blueprint-model": "
|
|
14
|
+
"@ember-tooling/blueprint-model": "^0.6.3",
|
|
15
15
|
"chalk": "^5.6.2",
|
|
16
16
|
"ember-cli-normalize-entity-name": "^1.0.0",
|
|
17
17
|
"ember-cli-string-utils": "^1.1.0",
|
|
18
|
-
"fs-extra": "^11.3.
|
|
18
|
+
"fs-extra": "^11.3.5",
|
|
19
19
|
"lodash": "^4.18.1",
|
|
20
20
|
"silent-error": "^1.1.1",
|
|
21
21
|
"sort-package-json": "^2.15.1",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"minor": "prerelease",
|
|
27
27
|
"patch": "prerelease"
|
|
28
28
|
},
|
|
29
|
-
"semverIncrementTag": "
|
|
30
|
-
"publishTag": "
|
|
29
|
+
"semverIncrementTag": "beta",
|
|
30
|
+
"publishTag": "beta"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"@ember-data/store": "~5.8.2",
|
|
43
43
|
"@warp-drive/ember": "~5.8.2<% } %>",
|
|
44
44
|
"@ember/optional-features": "^3.0.0",
|
|
45
|
-
"@ember/test-helpers": "^5.4.
|
|
46
|
-
"@embroider/compat": "^3.9.
|
|
47
|
-
"@embroider/core": "^3.5.
|
|
45
|
+
"@ember/test-helpers": "^5.4.2<% if (embroider) { %>",
|
|
46
|
+
"@embroider/compat": "^3.9.4",
|
|
47
|
+
"@embroider/core": "^3.5.10<% } %>",
|
|
48
48
|
"@embroider/macros": "^1.20.2<% if (embroider) { %>",
|
|
49
49
|
"@embroider/webpack": "^4.1.2<% } %>",
|
|
50
50
|
"@eslint/js": "^9.39.4",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@glint/environment-ember-template-imports": "^1.5.2",
|
|
55
55
|
"@glint/template": "^1.7.7",
|
|
56
56
|
"@tsconfig/ember": "^3.0.12",
|
|
57
|
-
"@types/qunit": "^2.19.
|
|
57
|
+
"@types/qunit": "^2.19.14",
|
|
58
58
|
"@types/rsvp": "^4.0.9<% } %><% if (warpDrive) { %>",
|
|
59
59
|
"@warp-drive/core": "~5.8.2",
|
|
60
60
|
"@warp-drive/json-api": "~5.8.2",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"broccoli-asset-rev": "^3.0.0",
|
|
64
64
|
"concurrently": "^9.2.1",
|
|
65
65
|
"ember-auto-import": "^2.13.1",
|
|
66
|
-
"ember-cli": "~7.1.0-
|
|
66
|
+
"ember-cli": "~7.1.0-beta.2",
|
|
67
67
|
"ember-cli-app-version": "^7.0.0",
|
|
68
68
|
"ember-cli-babel": "^8.3.1",
|
|
69
69
|
"ember-cli-clean-css": "^3.0.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"ember-page-title": "^9.0.3",
|
|
80
80
|
"ember-qunit": "^9.0.4",
|
|
81
81
|
"ember-resolver": "^13.2.0",
|
|
82
|
-
"ember-source": "~7.1.0-
|
|
82
|
+
"ember-source": "~7.1.0-beta.1",
|
|
83
83
|
"ember-template-imports": "^4.4.0",
|
|
84
84
|
"ember-template-lint": "^6.1.0<% if (welcome) { %>",
|
|
85
85
|
"ember-welcome-page": "^8.0.5<% } %>",
|
|
@@ -92,13 +92,13 @@
|
|
|
92
92
|
"globals": "^15.15.0",
|
|
93
93
|
"loader.js": "^4.7.0",
|
|
94
94
|
"prettier": "^3.8.3",
|
|
95
|
-
"prettier-plugin-ember-template-tag": "^2.1.
|
|
95
|
+
"prettier-plugin-ember-template-tag": "^2.1.6",
|
|
96
96
|
"qunit": "^2.25.0",
|
|
97
97
|
"qunit-dom": "^3.5.1",
|
|
98
98
|
"stylelint": "^16.26.1",
|
|
99
99
|
"stylelint-config-standard": "^36.0.1<% if (typescript) { %>",
|
|
100
100
|
"typescript": "^5.9.3",
|
|
101
|
-
"typescript-eslint": "^8.59.
|
|
101
|
+
"typescript-eslint": "^8.59.3<% } %>",
|
|
102
102
|
"webpack": "^5.106.2"
|
|
103
103
|
},
|
|
104
104
|
"engines": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-tooling/classic-build-app-blueprint",
|
|
3
|
-
"version": "7.1.0-
|
|
3
|
+
"version": "7.1.0-beta.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/ember-cli/ember-cli.git",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"ember-blueprint"
|
|
12
12
|
],
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@ember-tooling/blueprint-model": "
|
|
14
|
+
"@ember-tooling/blueprint-model": "^0.6.3",
|
|
15
15
|
"chalk": "^5.6.2",
|
|
16
16
|
"ember-cli-string-utils": "^1.1.0"
|
|
17
17
|
},
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"minor": "prerelease",
|
|
21
21
|
"patch": "prerelease"
|
|
22
22
|
},
|
|
23
|
-
"semverIncrementTag": "
|
|
24
|
-
"publishTag": "
|
|
23
|
+
"semverIncrementTag": "beta",
|
|
24
|
+
"publishTag": "beta"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
File without changes
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
description: ''
|
|
5
|
-
|
|
6
|
-
// locals(options) {
|
|
7
|
-
// // Return custom template variables here.
|
|
8
|
-
// return {
|
|
9
|
-
// foo: options.entity.options.foo
|
|
10
|
-
// };
|
|
11
|
-
// }
|
|
12
|
-
|
|
13
|
-
// afterInstall(options) {
|
|
14
|
-
// // Perform extra work here.
|
|
15
|
-
// }
|
|
16
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@ember-tooling/blueprint-blueprint",
|
|
3
|
-
"version": "0.3.0",
|
|
4
|
-
"repository": {
|
|
5
|
-
"type": "git",
|
|
6
|
-
"url": "https://github.com/ember-cli/ember-cli.git",
|
|
7
|
-
"directory": "packages/blueprint-blueprint"
|
|
8
|
-
},
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"keywords": [
|
|
11
|
-
"ember-blueprint"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@ember-tooling/blueprint-model",
|
|
3
|
-
"version": "0.6.3",
|
|
4
|
-
"repository": {
|
|
5
|
-
"type": "git",
|
|
6
|
-
"url": "https://github.com/ember-cli/ember-cli.git",
|
|
7
|
-
"directory": "packages/blueprint-model"
|
|
8
|
-
},
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"chalk": "^5.6.2",
|
|
12
|
-
"diff": "^8.0.4",
|
|
13
|
-
"isbinaryfile": "^5.0.7",
|
|
14
|
-
"lodash": "^4.17.23",
|
|
15
|
-
"promise.hash.helper": "^1.0.8",
|
|
16
|
-
"quick-temp": "^0.1.9",
|
|
17
|
-
"silent-error": "^1.1.1"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const path = require('path');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Derive a directory name from a package name.
|
|
7
|
-
* Takes scoped packages into account.
|
|
8
|
-
*
|
|
9
|
-
* @method directoryForPackageName
|
|
10
|
-
* @param {String} packageName
|
|
11
|
-
* @return {String} Derived directory name.
|
|
12
|
-
*/
|
|
13
|
-
module.exports = function directoryForPackageName(packageName) {
|
|
14
|
-
let isScoped = packageName[0] === '@' && packageName.includes('/');
|
|
15
|
-
|
|
16
|
-
if (isScoped) {
|
|
17
|
-
let slashIndex = packageName.indexOf('/');
|
|
18
|
-
let scopeName = packageName.substring(1, slashIndex);
|
|
19
|
-
let packageNameWithoutScope = packageName.substring(slashIndex + 1);
|
|
20
|
-
let pathParts = process.cwd().split(path.sep);
|
|
21
|
-
let parentDirectoryContainsScopeName = pathParts.includes(scopeName);
|
|
22
|
-
|
|
23
|
-
if (parentDirectoryContainsScopeName) {
|
|
24
|
-
return packageNameWithoutScope;
|
|
25
|
-
} else {
|
|
26
|
-
return `${scopeName}-${packageNameWithoutScope}`;
|
|
27
|
-
}
|
|
28
|
-
} else {
|
|
29
|
-
return packageName;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const util = require('util');
|
|
5
|
-
const { applyPatch, createPatch } = require('diff');
|
|
6
|
-
const quickTemp = require('quick-temp');
|
|
7
|
-
const path = require('path');
|
|
8
|
-
const SilentError = require('silent-error');
|
|
9
|
-
const openEditor = require('./open-editor');
|
|
10
|
-
const hash = require('promise.hash.helper');
|
|
11
|
-
|
|
12
|
-
const readFile = util.promisify(fs.readFile);
|
|
13
|
-
const writeFile = util.promisify(fs.writeFile);
|
|
14
|
-
|
|
15
|
-
class EditFileDiff {
|
|
16
|
-
constructor(options) {
|
|
17
|
-
this.info = options.info;
|
|
18
|
-
|
|
19
|
-
quickTemp.makeOrRemake(this, 'tmpDifferenceDir');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
edit() {
|
|
23
|
-
return hash({
|
|
24
|
-
input: this.info.render(),
|
|
25
|
-
output: readFile(this.info.outputPath),
|
|
26
|
-
})
|
|
27
|
-
.then(this.invokeEditor.bind(this))
|
|
28
|
-
.then(this.applyPatch.bind(this))
|
|
29
|
-
.finally(this.cleanUp.bind(this));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
cleanUp() {
|
|
33
|
-
quickTemp.remove(this, 'tmpDifferenceDir');
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
applyPatch(resultHash) {
|
|
37
|
-
return hash({
|
|
38
|
-
diffString: readFile(resultHash.diffPath),
|
|
39
|
-
currentString: readFile(resultHash.outputPath),
|
|
40
|
-
}).then((result) => {
|
|
41
|
-
let appliedDiff = applyPatch(result.currentString.toString(), result.diffString.toString());
|
|
42
|
-
|
|
43
|
-
if (!appliedDiff) {
|
|
44
|
-
let message = 'Patch was not cleanly applied.';
|
|
45
|
-
this.info.ui.writeLine(`${message} Please choose another action.`);
|
|
46
|
-
throw new SilentError(message);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return writeFile(resultHash.outputPath, appliedDiff);
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
invokeEditor(result) {
|
|
54
|
-
let info = this.info;
|
|
55
|
-
let diff = createPatch(info.outputPath, result.output.toString(), result.input);
|
|
56
|
-
let diffPath = path.join(this.tmpDifferenceDir, 'currentDiff.diff');
|
|
57
|
-
|
|
58
|
-
return writeFile(diffPath, diff)
|
|
59
|
-
.then(() => openEditor(diffPath))
|
|
60
|
-
.then(() => ({ outputPath: info.outputPath, diffPath }));
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
module.exports = EditFileDiff;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const { default: chalk } = require('chalk');
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
If you're here to remove the VITE experiment flag in favor of it being
|
|
7
|
-
permanently on, you can't do that until addressing
|
|
8
|
-
https://github.com/ember-cli/ember-cli/pull/10781#pullrequestreview-3230644293
|
|
9
|
-
|
|
10
|
-
A lot of test coverage would otherwise be lost, because valid tests are being
|
|
11
|
-
run only when the VITE experiment is off.
|
|
12
|
-
*/
|
|
13
|
-
const availableExperiments = Object.freeze(['EMBROIDER', 'CLASSIC', 'VITE']);
|
|
14
|
-
|
|
15
|
-
const deprecatedExperiments = Object.freeze([]);
|
|
16
|
-
const enabledExperiments = Object.freeze(['VITE']);
|
|
17
|
-
const deprecatedExperimentsDeprecationsIssued = [];
|
|
18
|
-
|
|
19
|
-
function isExperimentEnabled(experimentName) {
|
|
20
|
-
if (!availableExperiments.includes(experimentName)) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (process.env.EMBER_CLI_ENABLE_ALL_EXPERIMENTS && deprecatedExperiments.includes(experimentName)) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (process.env.EMBER_CLI_ENABLE_ALL_EXPERIMENTS) {
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (process.env.EMBER_CLI_CLASSIC && experimentName === 'EMBROIDER') {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
let experimentEnvironmentVariable = `EMBER_CLI_${experimentName}`;
|
|
37
|
-
let experimentValue = process.env[experimentEnvironmentVariable];
|
|
38
|
-
|
|
39
|
-
if (deprecatedExperiments.includes(experimentName)) {
|
|
40
|
-
let deprecationPreviouslyIssued = deprecatedExperimentsDeprecationsIssued.includes(experimentName);
|
|
41
|
-
let isSpecifiedByUser = experimentValue !== undefined;
|
|
42
|
-
|
|
43
|
-
if (!deprecationPreviouslyIssued && isSpecifiedByUser) {
|
|
44
|
-
console.warn(
|
|
45
|
-
chalk.yellow(`The ${experimentName} experiment in ember-cli has been deprecated and will be removed.`)
|
|
46
|
-
);
|
|
47
|
-
deprecatedExperimentsDeprecationsIssued.push(experimentName);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (enabledExperiments.includes(experimentName)) {
|
|
52
|
-
return experimentValue !== 'false';
|
|
53
|
-
} else {
|
|
54
|
-
return experimentValue !== undefined && experimentValue !== 'false';
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
module.exports = {
|
|
59
|
-
isExperimentEnabled,
|
|
60
|
-
|
|
61
|
-
// exported for testing purposes
|
|
62
|
-
_deprecatedExperimentsDeprecationsIssued: deprecatedExperimentsDeprecationsIssued,
|
|
63
|
-
};
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const util = require('util');
|
|
5
|
-
const { default: chalk } = require('chalk');
|
|
6
|
-
const EditFileDiff = require('./edit-file-diff');
|
|
7
|
-
const EOL = require('os').EOL;
|
|
8
|
-
const rxEOL = new RegExp(EOL, 'g');
|
|
9
|
-
const isBinaryFile = require('isbinaryfile').isBinaryFileSync;
|
|
10
|
-
const hash = require('promise.hash.helper');
|
|
11
|
-
const canEdit = require('./open-editor').canEdit;
|
|
12
|
-
const processTemplate = require('./process-template');
|
|
13
|
-
|
|
14
|
-
const readFile = util.promisify(fs.readFile);
|
|
15
|
-
const lstat = util.promisify(fs.stat);
|
|
16
|
-
|
|
17
|
-
function diffHighlight(line) {
|
|
18
|
-
if (line[0] === '+') {
|
|
19
|
-
return chalk.green(line);
|
|
20
|
-
} else if (line[0] === '-') {
|
|
21
|
-
return chalk.red(line);
|
|
22
|
-
} else if (/^@@/.test(line)) {
|
|
23
|
-
return chalk.cyan(line);
|
|
24
|
-
} else {
|
|
25
|
-
return line;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const NOOP = (_) => _;
|
|
30
|
-
class FileInfo {
|
|
31
|
-
constructor(options) {
|
|
32
|
-
this.action = options.action;
|
|
33
|
-
this.outputBasePath = options.outputBasePath;
|
|
34
|
-
this.outputPath = options.outputPath;
|
|
35
|
-
this.displayPath = options.displayPath;
|
|
36
|
-
this.inputPath = options.inputPath;
|
|
37
|
-
this.templateVariables = options.templateVariables;
|
|
38
|
-
this.replacer = options.replacer || NOOP;
|
|
39
|
-
this.ui = options.ui;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
confirmOverwrite(path) {
|
|
43
|
-
let promptOptions = {
|
|
44
|
-
type: 'expand',
|
|
45
|
-
name: 'answer',
|
|
46
|
-
default: false,
|
|
47
|
-
message: `${chalk.red('Overwrite')} ${path}?`,
|
|
48
|
-
choices: [
|
|
49
|
-
{ key: 'y', name: 'Yes, overwrite', value: 'overwrite' },
|
|
50
|
-
{ key: 'n', name: 'No, skip', value: 'skip' },
|
|
51
|
-
],
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
let outputPathIsFile = false;
|
|
55
|
-
try {
|
|
56
|
-
outputPathIsFile = fs.statSync(this.outputPath).isFile();
|
|
57
|
-
} catch (err) {
|
|
58
|
-
/* ignore */
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
let canDiff = !isBinaryFile(this.inputPath) && (!outputPathIsFile || !isBinaryFile(this.outputPath));
|
|
62
|
-
|
|
63
|
-
if (canDiff) {
|
|
64
|
-
promptOptions.choices.push({ key: 'd', name: 'Diff', value: 'diff' });
|
|
65
|
-
|
|
66
|
-
if (canEdit()) {
|
|
67
|
-
promptOptions.choices.push({ key: 'e', name: 'Edit', value: 'edit' });
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return this.ui.prompt(promptOptions).then((response) => response.answer);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
displayDiff() {
|
|
75
|
-
let info = this,
|
|
76
|
-
{ createPatch } = require('diff');
|
|
77
|
-
return hash({
|
|
78
|
-
input: this.render(),
|
|
79
|
-
output: readFile(info.outputPath),
|
|
80
|
-
}).then((result) => {
|
|
81
|
-
let diff = createPatch(
|
|
82
|
-
info.outputPath,
|
|
83
|
-
result.output.toString().replace(rxEOL, '\n'),
|
|
84
|
-
result.input.replace(rxEOL, '\n')
|
|
85
|
-
);
|
|
86
|
-
let lines = diff.split('\n');
|
|
87
|
-
|
|
88
|
-
for (let i = 0; i < lines.length; i++) {
|
|
89
|
-
info.ui.write(diffHighlight(lines[i] + EOL));
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
async render() {
|
|
95
|
-
if (!this.rendered) {
|
|
96
|
-
let result = await this._render();
|
|
97
|
-
this.rendered = this.replacer(result, this);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return this.rendered;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
_render() {
|
|
104
|
-
let path = this.inputPath;
|
|
105
|
-
let context = this.templateVariables;
|
|
106
|
-
|
|
107
|
-
return readFile(path).then((content) =>
|
|
108
|
-
lstat(path).then((fileStat) => {
|
|
109
|
-
if (isBinaryFile(content, fileStat.size)) {
|
|
110
|
-
return content;
|
|
111
|
-
} else {
|
|
112
|
-
try {
|
|
113
|
-
return processTemplate(content.toString(), context);
|
|
114
|
-
} catch (err) {
|
|
115
|
-
err.message += ` (Error in blueprint template: ${path})`;
|
|
116
|
-
throw err;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
})
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
checkForConflict() {
|
|
124
|
-
return this.render().then((input) => {
|
|
125
|
-
input = input.toString().replace(rxEOL, '\n');
|
|
126
|
-
|
|
127
|
-
return readFile(this.outputPath)
|
|
128
|
-
.then((output) => {
|
|
129
|
-
output = output.toString().replace(rxEOL, '\n');
|
|
130
|
-
|
|
131
|
-
return input === output ? 'identical' : 'confirm';
|
|
132
|
-
})
|
|
133
|
-
.catch((e) => {
|
|
134
|
-
if (e.code === 'ENOENT') {
|
|
135
|
-
return 'none';
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
throw e;
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
confirmOverwriteTask() {
|
|
144
|
-
let info = this;
|
|
145
|
-
|
|
146
|
-
return function () {
|
|
147
|
-
function doConfirm() {
|
|
148
|
-
return info.confirmOverwrite(info.displayPath).then((action) => {
|
|
149
|
-
if (action === 'diff') {
|
|
150
|
-
return info.displayDiff().then(doConfirm);
|
|
151
|
-
} else if (action === 'edit') {
|
|
152
|
-
let editFileDiff = new EditFileDiff({ info });
|
|
153
|
-
return editFileDiff
|
|
154
|
-
.edit()
|
|
155
|
-
.then(() => (info.action = action))
|
|
156
|
-
.catch(() => doConfirm())
|
|
157
|
-
.then(() => info);
|
|
158
|
-
} else {
|
|
159
|
-
info.action = action;
|
|
160
|
-
return info;
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
return doConfirm();
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
module.exports = FileInfo;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const spawn = require('child_process').spawn;
|
|
4
|
-
|
|
5
|
-
function openEditor(file) {
|
|
6
|
-
if (!openEditor.canEdit()) {
|
|
7
|
-
throw new Error('EDITOR environment variable is not set');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
if (!file) {
|
|
11
|
-
throw new Error('No `file` option provided');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
let editorArgs = openEditor._env().EDITOR.split(' ');
|
|
15
|
-
let editor = editorArgs.shift();
|
|
16
|
-
const args = [file].concat(editorArgs);
|
|
17
|
-
let editProcess = openEditor._spawn(editor, args, { stdio: 'inherit' });
|
|
18
|
-
|
|
19
|
-
return new Promise((resolve, reject) => {
|
|
20
|
-
editProcess.on('close', (code) => {
|
|
21
|
-
if (code === 0) {
|
|
22
|
-
resolve();
|
|
23
|
-
} else {
|
|
24
|
-
reject(
|
|
25
|
-
new Error(`Spawn('${editor}', [${args.join(',')}]) exited with a non zero error status code: '${code}'`)
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
openEditor.canEdit = function () {
|
|
33
|
-
return openEditor._env().EDITOR !== undefined;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
openEditor._env = function () {
|
|
37
|
-
return process.env;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
openEditor._spawn = function () {
|
|
41
|
-
return spawn.apply(this, arguments);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
module.exports = openEditor;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function supportEmoji() {
|
|
4
|
-
const hasEmojiTurnedOff = process.argv.indexOf('--no-emoji') > -1;
|
|
5
|
-
return process.stdout.isTTY && process.platform !== 'win32' && !hasEmojiTurnedOff;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const areEmojiSupported = supportEmoji();
|
|
9
|
-
|
|
10
|
-
module.exports = function prependEmoji(emoji, msg) {
|
|
11
|
-
return areEmojiSupported ? `${emoji} ${msg}` : msg;
|
|
12
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
module.exports = function processTemplate(content, context) {
|
|
4
|
-
let options = {
|
|
5
|
-
evaluate: /<%([\s\S]+?)%>/g,
|
|
6
|
-
interpolate: /<%=([\s\S]+?)%>/g,
|
|
7
|
-
escape: /<%-([\s\S]+?)%>/g,
|
|
8
|
-
};
|
|
9
|
-
return require('lodash/template')(content, options)(context);
|
|
10
|
-
};
|