ember-cli 4.7.0 → 4.8.0-beta.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/CHANGELOG.md +21 -0
- package/blueprints/addon/files/.github/workflows/ci.yml +1 -1
- package/blueprints/addon/files/.travis.yml +1 -1
- package/blueprints/addon/files/README.md +2 -2
- package/blueprints/addon/files/addon-config/ember-try.js +4 -4
- package/blueprints/addon/files/ember-cli-build.js +1 -1
- package/blueprints/app/files/config/environment.js +1 -1
- package/blueprints/app/files/ember-cli-build.js +1 -1
- package/blueprints/app/files/package.json +6 -6
- package/docs/build/data.json +113 -70
- package/lib/models/blueprint.js +44 -27
- package/lib/tasks/generate-from-blueprint.js +43 -32
- package/lib/tasks/npm-task.js +5 -1
- package/lib/utilities/load-config.js +2 -2
- package/package.json +17 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# ember-cli Changelog
|
|
2
2
|
|
|
3
|
+
## v4.8.0-beta.0
|
|
4
|
+
|
|
5
|
+
#### Blueprint Changes
|
|
6
|
+
|
|
7
|
+
- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v4.7.0...v4.8.0-beta.0)
|
|
8
|
+
- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v4.7.0...v4.8.0-beta.0)
|
|
9
|
+
|
|
10
|
+
#### Changelog
|
|
11
|
+
|
|
12
|
+
- [#9920](https://github.com/ember-cli/ember-cli/pull/9920) [BUGFIX] Make sure a blueprint’s options object and project instance are always available for all public hooks [@bertdeblock](https://github.com/bertdeblock)
|
|
13
|
+
- [#9945](https://github.com/ember-cli/ember-cli/pull/9945) [ENHANCEMENT/BREAKING] Add Node v18 to `engines` in `app` and `addon` blueprint (removes support for Node v17) [@bertdeblock](https://github.com/bertdeblock)
|
|
14
|
+
- [#9946](https://github.com/ember-cli/ember-cli/pull/9946) [INTERNAL] Unskip `package-info-cache` tests [@bertdeblock](https://github.com/bertdeblock)
|
|
15
|
+
- [#9951](https://github.com/ember-cli/ember-cli/pull/9951) Update `js-yaml` to v4 [@bertdeblock](https://github.com/bertdeblock)
|
|
16
|
+
- [#9952](https://github.com/ember-cli/ember-cli/pull/9952) Update `walk-sync` to v3 [@bertdeblock](https://github.com/bertdeblock)
|
|
17
|
+
- [#9971](https://github.com/ember-cli/ember-cli/pull/9971) Add Ember 4.4 LTS to addon blueprint, remove 3.24 [@simonihmig](https://github.com/simonihmig)
|
|
18
|
+
- [#9975](https://github.com/ember-cli/ember-cli/pull/9975) [ENHANCEMENT] Fix `prefer-const` lint violations in `app` and `addon` blueprints [@bmish](https://github.com/bmish)
|
|
19
|
+
- [#9987](https://github.com/ember-cli/ember-cli/pull/9987) [BUGFIX] Handle rebuild failures without exiting [@bendemboski](https://github.com/bendemboski)
|
|
20
|
+
- [#9988](https://github.com/ember-cli/ember-cli/pull/9988) [BUGFIX] - Address npm-run-all and Yarn 3 conflict & Removed warning [@christianarty](https://github.com/christianarty)
|
|
21
|
+
|
|
22
|
+
Thank you to all who took the time to contribute!
|
|
23
|
+
|
|
3
24
|
## v4.7.0
|
|
4
25
|
|
|
5
26
|
#### Blueprint Changes
|
|
@@ -51,8 +51,8 @@ jobs:
|
|
|
51
51
|
|
|
52
52
|
# we recommend new addons test the current and previous LTS
|
|
53
53
|
# as well as latest stable release (bonus points to beta/canary)
|
|
54
|
-
- env: EMBER_TRY_SCENARIO=ember-lts-3.24
|
|
55
54
|
- env: EMBER_TRY_SCENARIO=ember-lts-3.28
|
|
55
|
+
- env: EMBER_TRY_SCENARIO=ember-lts-4.4
|
|
56
56
|
- env: EMBER_TRY_SCENARIO=ember-release
|
|
57
57
|
- env: EMBER_TRY_SCENARIO=ember-beta
|
|
58
58
|
- env: EMBER_TRY_SCENARIO=ember-canary
|
|
@@ -8,18 +8,18 @@ module.exports = async function () {
|
|
|
8
8
|
<% if (yarn) { %>useYarn: true,
|
|
9
9
|
<% } %>scenarios: [
|
|
10
10
|
{
|
|
11
|
-
name: 'ember-lts-3.
|
|
11
|
+
name: 'ember-lts-3.28',
|
|
12
12
|
npm: {
|
|
13
13
|
devDependencies: {
|
|
14
|
-
'ember-source': '~3.
|
|
14
|
+
'ember-source': '~3.28.0',
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
name: 'ember-lts-
|
|
19
|
+
name: 'ember-lts-4.4',
|
|
20
20
|
npm: {
|
|
21
21
|
devDependencies: {
|
|
22
|
-
'ember-source': '~
|
|
22
|
+
'ember-source': '~4.4.0',
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
},
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "ember build --environment=production",
|
|
15
|
-
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
|
|
16
|
-
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
|
|
15
|
+
"lint": "npm-run-all --print-name --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
|
|
16
|
+
"lint:fix": "npm-run-all --print-name --aggregate-output --continue-on-error --parallel \"lint:*:fix\"",
|
|
17
17
|
"lint:hbs": "ember-template-lint .",
|
|
18
18
|
"lint:hbs:fix": "ember-template-lint . --fix",
|
|
19
19
|
"lint:js": "eslint . --cache",
|
|
20
20
|
"lint:js:fix": "eslint . --fix",
|
|
21
21
|
"start": "ember serve",
|
|
22
|
-
"test": "npm-run-all lint test
|
|
22
|
+
"test": "npm-run-all --print-name \"lint\" \"test:*\"",
|
|
23
23
|
"test:ember": "ember test"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"ember-cli-inject-live-reload": "^2.1.0",
|
|
42
42
|
"ember-cli-sri": "^2.1.1",
|
|
43
43
|
"ember-cli-terser": "^4.0.2",
|
|
44
|
-
"ember-data": "~4.
|
|
44
|
+
"ember-data": "~4.8.0-beta.0",
|
|
45
45
|
"ember-fetch": "^8.1.2",
|
|
46
46
|
"ember-load-initializers": "^2.1.2",
|
|
47
47
|
"ember-page-title": "^7.0.0",
|
|
48
48
|
"ember-qunit": "^5.1.5",
|
|
49
49
|
"ember-resolver": "^8.0.3",
|
|
50
|
-
"ember-source": "~4.
|
|
50
|
+
"ember-source": "~4.8.0-beta.1",
|
|
51
51
|
"ember-template-lint": "^4.14.0<% if (welcome) { %>",
|
|
52
52
|
"ember-welcome-page": "^6.2.0<% } %>",
|
|
53
53
|
"eslint": "^7.32.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"webpack": "^5.74.0"
|
|
65
65
|
},
|
|
66
66
|
"engines": {
|
|
67
|
-
"node": "14.* || >=
|
|
67
|
+
"node": "14.* || 16.* || >= 18"
|
|
68
68
|
},
|
|
69
69
|
"ember": {
|
|
70
70
|
"edition": "octane"
|
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": "4.
|
|
6
|
+
"version": "4.8.0-beta.0-beta-2b7d76957a"
|
|
7
7
|
},
|
|
8
8
|
"files": {
|
|
9
9
|
"lib/broccoli/default-packager.js": {
|
|
@@ -623,6 +623,12 @@
|
|
|
623
623
|
"description": "",
|
|
624
624
|
"type": "String",
|
|
625
625
|
"optional": true
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"name": "blueprintOptions",
|
|
629
|
+
"description": "",
|
|
630
|
+
"type": "Object",
|
|
631
|
+
"optional": true
|
|
626
632
|
}
|
|
627
633
|
]
|
|
628
634
|
},
|
|
@@ -3655,7 +3661,7 @@
|
|
|
3655
3661
|
},
|
|
3656
3662
|
{
|
|
3657
3663
|
"file": "lib/models/blueprint.js",
|
|
3658
|
-
"line":
|
|
3664
|
+
"line": 201,
|
|
3659
3665
|
"description": "Indicates whether or not a blueprint is a candidate for automatic transpilation from TS to JS.\nThis property could be false in the case that the blueprint is written in JS and is not intended\nto work with TS at all, OR in the case that the blueprint is written in TS and the author does\nnot intend to support transpilation to JS.",
|
|
3660
3666
|
"access": "public",
|
|
3661
3667
|
"tagname": "",
|
|
@@ -3667,7 +3673,25 @@
|
|
|
3667
3673
|
},
|
|
3668
3674
|
{
|
|
3669
3675
|
"file": "lib/models/blueprint.js",
|
|
3670
|
-
"line":
|
|
3676
|
+
"line": 222,
|
|
3677
|
+
"description": "Process the options object coming from either\nthe `init`, `install` or `uninstall` hook.",
|
|
3678
|
+
"access": "private",
|
|
3679
|
+
"tagname": "",
|
|
3680
|
+
"itemtype": "method",
|
|
3681
|
+
"name": "_processOptions",
|
|
3682
|
+
"params": [
|
|
3683
|
+
{
|
|
3684
|
+
"name": "options",
|
|
3685
|
+
"description": "",
|
|
3686
|
+
"type": "Object"
|
|
3687
|
+
}
|
|
3688
|
+
],
|
|
3689
|
+
"class": "Blueprint",
|
|
3690
|
+
"module": "ember-cli"
|
|
3691
|
+
},
|
|
3692
|
+
{
|
|
3693
|
+
"file": "lib/models/blueprint.js",
|
|
3694
|
+
"line": 238,
|
|
3671
3695
|
"description": "Hook to specify the path to the blueprint's files. By default this is\n`path.join(this.path, 'files)`.\n\nThis can be used to customize which set of files to install based on options\nor environmental variables. It defaults to the `files` directory within the\nblueprint's folder.",
|
|
3672
3696
|
"access": "public",
|
|
3673
3697
|
"tagname": "",
|
|
@@ -3689,12 +3713,19 @@
|
|
|
3689
3713
|
},
|
|
3690
3714
|
{
|
|
3691
3715
|
"file": "lib/models/blueprint.js",
|
|
3692
|
-
"line":
|
|
3716
|
+
"line": 255,
|
|
3693
3717
|
"description": "Used to retrieve files for blueprint.",
|
|
3694
3718
|
"access": "public",
|
|
3695
3719
|
"tagname": "",
|
|
3696
3720
|
"itemtype": "method",
|
|
3697
3721
|
"name": "files",
|
|
3722
|
+
"params": [
|
|
3723
|
+
{
|
|
3724
|
+
"name": "options",
|
|
3725
|
+
"description": "",
|
|
3726
|
+
"type": "Object"
|
|
3727
|
+
}
|
|
3728
|
+
],
|
|
3698
3729
|
"return": {
|
|
3699
3730
|
"description": "Contents of the blueprint's files directory",
|
|
3700
3731
|
"type": "Array"
|
|
@@ -3704,7 +3735,7 @@
|
|
|
3704
3735
|
},
|
|
3705
3736
|
{
|
|
3706
3737
|
"file": "lib/models/blueprint.js",
|
|
3707
|
-
"line":
|
|
3738
|
+
"line": 278,
|
|
3708
3739
|
"itemtype": "method",
|
|
3709
3740
|
"name": "srcPath",
|
|
3710
3741
|
"params": [
|
|
@@ -3723,7 +3754,7 @@
|
|
|
3723
3754
|
},
|
|
3724
3755
|
{
|
|
3725
3756
|
"file": "lib/models/blueprint.js",
|
|
3726
|
-
"line":
|
|
3757
|
+
"line": 287,
|
|
3727
3758
|
"description": "Hook for normalizing entity name\n\nUse the `normalizeEntityName` hook to add custom normalization and\nvalidation of the provided entity name. The default hook does not\nmake any changes to the entity name, but makes sure an entity name\nis present and that it doesn't have a trailing slash.\n\nThis hook receives the entity name as its first argument. The string\nreturned by this hook will be used as the new entity name.",
|
|
3728
3759
|
"access": "public",
|
|
3729
3760
|
"tagname": "",
|
|
@@ -3745,7 +3776,7 @@
|
|
|
3745
3776
|
},
|
|
3746
3777
|
{
|
|
3747
3778
|
"file": "lib/models/blueprint.js",
|
|
3748
|
-
"line":
|
|
3779
|
+
"line": 307,
|
|
3749
3780
|
"description": "Write a status and message to the UI",
|
|
3750
3781
|
"access": "private",
|
|
3751
3782
|
"tagname": "",
|
|
@@ -3773,7 +3804,7 @@
|
|
|
3773
3804
|
},
|
|
3774
3805
|
{
|
|
3775
3806
|
"file": "lib/models/blueprint.js",
|
|
3776
|
-
"line":
|
|
3807
|
+
"line": 321,
|
|
3777
3808
|
"access": "private",
|
|
3778
3809
|
"tagname": "",
|
|
3779
3810
|
"itemtype": "method",
|
|
@@ -3794,7 +3825,7 @@
|
|
|
3794
3825
|
},
|
|
3795
3826
|
{
|
|
3796
3827
|
"file": "lib/models/blueprint.js",
|
|
3797
|
-
"line":
|
|
3828
|
+
"line": 333,
|
|
3798
3829
|
"description": "Actions lookup",
|
|
3799
3830
|
"access": "private",
|
|
3800
3831
|
"tagname": "",
|
|
@@ -3806,7 +3837,7 @@
|
|
|
3806
3837
|
},
|
|
3807
3838
|
{
|
|
3808
3839
|
"file": "lib/models/blueprint.js",
|
|
3809
|
-
"line":
|
|
3840
|
+
"line": 371,
|
|
3810
3841
|
"description": "Calls an action.",
|
|
3811
3842
|
"access": "private",
|
|
3812
3843
|
"tagname": "",
|
|
@@ -3832,7 +3863,7 @@
|
|
|
3832
3863
|
},
|
|
3833
3864
|
{
|
|
3834
3865
|
"file": "lib/models/blueprint.js",
|
|
3835
|
-
"line":
|
|
3866
|
+
"line": 389,
|
|
3836
3867
|
"description": "Prints warning for pod unsupported.",
|
|
3837
3868
|
"access": "private",
|
|
3838
3869
|
"tagname": "",
|
|
@@ -3843,7 +3874,7 @@
|
|
|
3843
3874
|
},
|
|
3844
3875
|
{
|
|
3845
3876
|
"file": "lib/models/blueprint.js",
|
|
3846
|
-
"line":
|
|
3877
|
+
"line": 406,
|
|
3847
3878
|
"access": "private",
|
|
3848
3879
|
"tagname": "",
|
|
3849
3880
|
"itemtype": "method",
|
|
@@ -3860,7 +3891,7 @@
|
|
|
3860
3891
|
},
|
|
3861
3892
|
{
|
|
3862
3893
|
"file": "lib/models/blueprint.js",
|
|
3863
|
-
"line":
|
|
3894
|
+
"line": 417,
|
|
3864
3895
|
"access": "private",
|
|
3865
3896
|
"tagname": "",
|
|
3866
3897
|
"itemtype": "method",
|
|
@@ -3877,7 +3908,7 @@
|
|
|
3877
3908
|
},
|
|
3878
3909
|
{
|
|
3879
3910
|
"file": "lib/models/blueprint.js",
|
|
3880
|
-
"line":
|
|
3911
|
+
"line": 446,
|
|
3881
3912
|
"access": "private",
|
|
3882
3913
|
"tagname": "",
|
|
3883
3914
|
"itemtype": "method",
|
|
@@ -3909,7 +3940,7 @@
|
|
|
3909
3940
|
},
|
|
3910
3941
|
{
|
|
3911
3942
|
"file": "lib/models/blueprint.js",
|
|
3912
|
-
"line":
|
|
3943
|
+
"line": 472,
|
|
3913
3944
|
"access": "private",
|
|
3914
3945
|
"tagname": "",
|
|
3915
3946
|
"itemtype": "method",
|
|
@@ -3935,7 +3966,7 @@
|
|
|
3935
3966
|
},
|
|
3936
3967
|
{
|
|
3937
3968
|
"file": "lib/models/blueprint.js",
|
|
3938
|
-
"line":
|
|
3969
|
+
"line": 526,
|
|
3939
3970
|
"access": "private",
|
|
3940
3971
|
"tagname": "",
|
|
3941
3972
|
"itemtype": "method",
|
|
@@ -3956,7 +3987,7 @@
|
|
|
3956
3987
|
},
|
|
3957
3988
|
{
|
|
3958
3989
|
"file": "lib/models/blueprint.js",
|
|
3959
|
-
"line":
|
|
3990
|
+
"line": 545,
|
|
3960
3991
|
"itemtype": "method",
|
|
3961
3992
|
"name": "install",
|
|
3962
3993
|
"params": [
|
|
@@ -3975,7 +4006,7 @@
|
|
|
3975
4006
|
},
|
|
3976
4007
|
{
|
|
3977
4008
|
"file": "lib/models/blueprint.js",
|
|
3978
|
-
"line":
|
|
4009
|
+
"line": 572,
|
|
3979
4010
|
"itemtype": "method",
|
|
3980
4011
|
"name": "uninstall",
|
|
3981
4012
|
"params": [
|
|
@@ -3994,7 +4025,7 @@
|
|
|
3994
4025
|
},
|
|
3995
4026
|
{
|
|
3996
4027
|
"file": "lib/models/blueprint.js",
|
|
3997
|
-
"line":
|
|
4028
|
+
"line": 594,
|
|
3998
4029
|
"description": "Hook for running operations before install.",
|
|
3999
4030
|
"itemtype": "method",
|
|
4000
4031
|
"name": "beforeInstall",
|
|
@@ -4007,7 +4038,7 @@
|
|
|
4007
4038
|
},
|
|
4008
4039
|
{
|
|
4009
4040
|
"file": "lib/models/blueprint.js",
|
|
4010
|
-
"line":
|
|
4041
|
+
"line": 601,
|
|
4011
4042
|
"description": "Hook for running operations after install.",
|
|
4012
4043
|
"itemtype": "method",
|
|
4013
4044
|
"name": "afterInstall",
|
|
@@ -4020,7 +4051,7 @@
|
|
|
4020
4051
|
},
|
|
4021
4052
|
{
|
|
4022
4053
|
"file": "lib/models/blueprint.js",
|
|
4023
|
-
"line":
|
|
4054
|
+
"line": 608,
|
|
4024
4055
|
"description": "Hook for running operations before uninstall.",
|
|
4025
4056
|
"itemtype": "method",
|
|
4026
4057
|
"name": "beforeUninstall",
|
|
@@ -4033,7 +4064,7 @@
|
|
|
4033
4064
|
},
|
|
4034
4065
|
{
|
|
4035
4066
|
"file": "lib/models/blueprint.js",
|
|
4036
|
-
"line":
|
|
4067
|
+
"line": 615,
|
|
4037
4068
|
"description": "Hook for running operations after uninstall.",
|
|
4038
4069
|
"itemtype": "method",
|
|
4039
4070
|
"name": "afterUninstall",
|
|
@@ -4046,7 +4077,7 @@
|
|
|
4046
4077
|
},
|
|
4047
4078
|
{
|
|
4048
4079
|
"file": "lib/models/blueprint.js",
|
|
4049
|
-
"line":
|
|
4080
|
+
"line": 624,
|
|
4050
4081
|
"description": "Hook for adding custom template variables.\n\nWhen the following is called on the command line:\n\n```sh\nember generate controller foo --type=array --dry-run isAdmin:true\n```\n\nThe object passed to `locals` looks like this:\n\n```js\n{\n entity: {\n name: 'foo',\n options: {\n isAdmin: true\n }\n },\n dryRun: true\n type: \"array\"\n // more keys\n}\n```\n\nThis hook must return an object or a Promise which resolves to an object.\nThe resolved object will be merged with the aforementioned default locals.",
|
|
4051
4082
|
"access": "public",
|
|
4052
4083
|
"tagname": "",
|
|
@@ -4068,7 +4099,7 @@
|
|
|
4068
4099
|
},
|
|
4069
4100
|
{
|
|
4070
4101
|
"file": "lib/models/blueprint.js",
|
|
4071
|
-
"line":
|
|
4102
|
+
"line": 659,
|
|
4072
4103
|
"description": "Hook to add additional or override existing fileMap tokens.\n\nUse `fileMapTokens` to add custom fileMap tokens for use\nin the `mapFile` method. The hook must return an object in the\nfollowing pattern:\n\n```js\n{\n __token__(options){\n // logic to determine value goes here\n return 'value';\n }\n}\n```\n\nIt will be merged with the default `fileMapTokens`, and can be used\nto override any of the default tokens.\n\nTokens are used in the files folder (see `files`), and get replaced with\nvalues when the `mapFile` method is called.",
|
|
4073
4104
|
"access": "public",
|
|
4074
4105
|
"tagname": "",
|
|
@@ -4083,7 +4114,7 @@
|
|
|
4083
4114
|
},
|
|
4084
4115
|
{
|
|
4085
4116
|
"file": "lib/models/blueprint.js",
|
|
4086
|
-
"line":
|
|
4117
|
+
"line": 687,
|
|
4087
4118
|
"access": "private",
|
|
4088
4119
|
"tagname": "",
|
|
4089
4120
|
"itemtype": "method",
|
|
@@ -4104,7 +4135,7 @@
|
|
|
4104
4135
|
},
|
|
4105
4136
|
{
|
|
4106
4137
|
"file": "lib/models/blueprint.js",
|
|
4107
|
-
"line":
|
|
4138
|
+
"line": 743,
|
|
4108
4139
|
"description": "Used to generate fileMap tokens for mapFile.",
|
|
4109
4140
|
"itemtype": "method",
|
|
4110
4141
|
"name": "generateFileMap",
|
|
@@ -4124,7 +4155,7 @@
|
|
|
4124
4155
|
},
|
|
4125
4156
|
{
|
|
4126
4157
|
"file": "lib/models/blueprint.js",
|
|
4127
|
-
"line":
|
|
4158
|
+
"line": 758,
|
|
4128
4159
|
"itemtype": "method",
|
|
4129
4160
|
"name": "buildFileInfo",
|
|
4130
4161
|
"params": [
|
|
@@ -4153,7 +4184,7 @@
|
|
|
4153
4184
|
},
|
|
4154
4185
|
{
|
|
4155
4186
|
"file": "lib/models/blueprint.js",
|
|
4156
|
-
"line":
|
|
4187
|
+
"line": 779,
|
|
4157
4188
|
"itemtype": "method",
|
|
4158
4189
|
"name": "isUpdate",
|
|
4159
4190
|
"return": {
|
|
@@ -4165,7 +4196,7 @@
|
|
|
4165
4196
|
},
|
|
4166
4197
|
{
|
|
4167
4198
|
"file": "lib/models/blueprint.js",
|
|
4168
|
-
"line":
|
|
4199
|
+
"line": 789,
|
|
4169
4200
|
"access": "private",
|
|
4170
4201
|
"tagname": "",
|
|
4171
4202
|
"itemtype": "method",
|
|
@@ -4196,7 +4227,7 @@
|
|
|
4196
4227
|
},
|
|
4197
4228
|
{
|
|
4198
4229
|
"file": "lib/models/blueprint.js",
|
|
4199
|
-
"line":
|
|
4230
|
+
"line": 801,
|
|
4200
4231
|
"description": "Add update files to ignored files or reset them",
|
|
4201
4232
|
"access": "private",
|
|
4202
4233
|
"tagname": "",
|
|
@@ -4207,7 +4238,7 @@
|
|
|
4207
4238
|
},
|
|
4208
4239
|
{
|
|
4209
4240
|
"file": "lib/models/blueprint.js",
|
|
4210
|
-
"line":
|
|
4241
|
+
"line": 814,
|
|
4211
4242
|
"access": "private",
|
|
4212
4243
|
"tagname": "",
|
|
4213
4244
|
"itemtype": "method",
|
|
@@ -4228,7 +4259,7 @@
|
|
|
4228
4259
|
},
|
|
4229
4260
|
{
|
|
4230
4261
|
"file": "lib/models/blueprint.js",
|
|
4231
|
-
"line":
|
|
4262
|
+
"line": 827,
|
|
4232
4263
|
"access": "private",
|
|
4233
4264
|
"tagname": "",
|
|
4234
4265
|
"itemtype": "method",
|
|
@@ -4250,7 +4281,7 @@
|
|
|
4250
4281
|
},
|
|
4251
4282
|
{
|
|
4252
4283
|
"file": "lib/models/blueprint.js",
|
|
4253
|
-
"line":
|
|
4284
|
+
"line": 841,
|
|
4254
4285
|
"itemtype": "method",
|
|
4255
4286
|
"name": "processFiles",
|
|
4256
4287
|
"params": [
|
|
@@ -4274,7 +4305,7 @@
|
|
|
4274
4305
|
},
|
|
4275
4306
|
{
|
|
4276
4307
|
"file": "lib/models/blueprint.js",
|
|
4277
|
-
"line":
|
|
4308
|
+
"line": 874,
|
|
4278
4309
|
"itemtype": "method",
|
|
4279
4310
|
"name": "processFilesForUninstall",
|
|
4280
4311
|
"params": [
|
|
@@ -4294,7 +4325,7 @@
|
|
|
4294
4325
|
},
|
|
4295
4326
|
{
|
|
4296
4327
|
"file": "lib/models/blueprint.js",
|
|
4297
|
-
"line":
|
|
4328
|
+
"line": 925,
|
|
4298
4329
|
"itemtype": "method",
|
|
4299
4330
|
"name": "mapFile",
|
|
4300
4331
|
"params": [
|
|
@@ -4317,7 +4348,7 @@
|
|
|
4317
4348
|
},
|
|
4318
4349
|
{
|
|
4319
4350
|
"file": "lib/models/blueprint.js",
|
|
4320
|
-
"line":
|
|
4351
|
+
"line": 942,
|
|
4321
4352
|
"description": "Looks for a __root__ token in the files folder. Must be present for\nthe blueprint to support addon tokens. The `server`, `blueprints`, and `test`",
|
|
4322
4353
|
"access": "private",
|
|
4323
4354
|
"tagname": "",
|
|
@@ -4332,7 +4363,7 @@
|
|
|
4332
4363
|
},
|
|
4333
4364
|
{
|
|
4334
4365
|
"file": "lib/models/blueprint.js",
|
|
4335
|
-
"line":
|
|
4366
|
+
"line": 954,
|
|
4336
4367
|
"access": "private",
|
|
4337
4368
|
"tagname": "",
|
|
4338
4369
|
"itemtype": "method",
|
|
@@ -4362,7 +4393,7 @@
|
|
|
4362
4393
|
},
|
|
4363
4394
|
{
|
|
4364
4395
|
"file": "lib/models/blueprint.js",
|
|
4365
|
-
"line":
|
|
4396
|
+
"line": 984,
|
|
4366
4397
|
"access": "private",
|
|
4367
4398
|
"tagname": "",
|
|
4368
4399
|
"itemtype": "method",
|
|
@@ -4383,7 +4414,7 @@
|
|
|
4383
4414
|
},
|
|
4384
4415
|
{
|
|
4385
4416
|
"file": "lib/models/blueprint.js",
|
|
4386
|
-
"line":
|
|
4417
|
+
"line": 1017,
|
|
4387
4418
|
"description": "Used to add a package to the project's `package.json`.\n\nGenerally, this would be done from the `afterInstall` hook, to\nensure that a package that is required by a given blueprint is\navailable.",
|
|
4388
4419
|
"itemtype": "method",
|
|
4389
4420
|
"name": "addPackageToProject",
|
|
@@ -4408,7 +4439,7 @@
|
|
|
4408
4439
|
},
|
|
4409
4440
|
{
|
|
4410
4441
|
"file": "lib/models/blueprint.js",
|
|
4411
|
-
"line":
|
|
4442
|
+
"line": 1039,
|
|
4412
4443
|
"description": "Used to add multiple packages to the project's `package.json`.\n\nGenerally, this would be done from the `afterInstall` hook, to\nensure that a package that is required by a given blueprint is\navailable.\n\nExpects each array item to be an object with a `name`. Each object\nmay optionally have a `target` to specify a specific version.",
|
|
4413
4444
|
"itemtype": "method",
|
|
4414
4445
|
"name": "addPackagesToProject",
|
|
@@ -4431,7 +4462,7 @@
|
|
|
4431
4462
|
},
|
|
4432
4463
|
{
|
|
4433
4464
|
"file": "lib/models/blueprint.js",
|
|
4434
|
-
"line":
|
|
4465
|
+
"line": 1088,
|
|
4435
4466
|
"description": "Used to remove a package from the project's `package.json`.\n\nGenerally, this would be done from the `afterInstall` hook, to\nensure that any package conflicts can be resolved before the\naddon is used.",
|
|
4436
4467
|
"itemtype": "method",
|
|
4437
4468
|
"name": "removePackageFromProject",
|
|
@@ -4451,7 +4482,7 @@
|
|
|
4451
4482
|
},
|
|
4452
4483
|
{
|
|
4453
4484
|
"file": "lib/models/blueprint.js",
|
|
4454
|
-
"line":
|
|
4485
|
+
"line": 1105,
|
|
4455
4486
|
"description": "Used to remove multiple packages from the project's `package.json`.\n\nGenerally, this would be done from the `afterInstall` hook, to\nensure that any package conflicts can be resolved before the\naddon is used.\n\nExpects each array item to be an object with a `name` property.",
|
|
4456
4487
|
"itemtype": "method",
|
|
4457
4488
|
"name": "removePackagesFromProject",
|
|
@@ -4471,8 +4502,8 @@
|
|
|
4471
4502
|
},
|
|
4472
4503
|
{
|
|
4473
4504
|
"file": "lib/models/blueprint.js",
|
|
4474
|
-
"line":
|
|
4475
|
-
"description": "Used to add a Bower package to the projects `bower.json`.\n\nBower is a package manager that is no longer recommended
|
|
4505
|
+
"line": 1146,
|
|
4506
|
+
"description": "Used to add a Bower package to the projects `bower.json`.\n\nBower is a package manager that is no longer recommended\nfor new projects, but you may find this hook used in older\naddons.\n\nGenerally, this would be done from the `afterInstall` hook, to\nensure that a package that is required by a given blueprint is\navailable.\n\n`localPackageName` and `target` may be thought of as equivalent\nto the key-value pairs in the `dependency` or `devDepencency`\nobjects contained within a bower.json file.",
|
|
4476
4507
|
"itemtype": "method",
|
|
4477
4508
|
"name": "addBowerPackageToProject",
|
|
4478
4509
|
"params": [
|
|
@@ -4504,8 +4535,8 @@
|
|
|
4504
4535
|
},
|
|
4505
4536
|
{
|
|
4506
4537
|
"file": "lib/models/blueprint.js",
|
|
4507
|
-
"line":
|
|
4508
|
-
"description": "Used to add an array of packages to the projects `bower.json`.\n\nBower is a package manager that is no longer recommended
|
|
4538
|
+
"line": 1199,
|
|
4539
|
+
"description": "Used to add an array of packages to the projects `bower.json`.\n\nBower is a package manager that is no longer recommended\nfor new projects, but you may find this hook used in older\naddons.\n\nGenerally, this would be done from the `afterInstall` hook, to\nensure that a package that is required by a given blueprint is\navailable.\n\nExpects each array item to be an object with a `name`. Each object\nmay optionally have a `target` to specify a specific version, or a\n`source` to specify a non-local name to be resolved.",
|
|
4509
4540
|
"itemtype": "method",
|
|
4510
4541
|
"name": "addBowerPackagesToProject",
|
|
4511
4542
|
"params": [
|
|
@@ -4529,7 +4560,7 @@
|
|
|
4529
4560
|
},
|
|
4530
4561
|
{
|
|
4531
4562
|
"file": "lib/models/blueprint.js",
|
|
4532
|
-
"line":
|
|
4563
|
+
"line": 1259,
|
|
4533
4564
|
"description": "Used to add an addon to the project's `package.json` and run it's\n`defaultBlueprint` if it provides one.\n\nGenerally, this would be done from the `afterInstall` hook, to\nensure that a package that is required by a given blueprint is\navailable.",
|
|
4534
4565
|
"itemtype": "method",
|
|
4535
4566
|
"name": "addAddonToProject",
|
|
@@ -4549,7 +4580,7 @@
|
|
|
4549
4580
|
},
|
|
4550
4581
|
{
|
|
4551
4582
|
"file": "lib/models/blueprint.js",
|
|
4552
|
-
"line":
|
|
4583
|
+
"line": 1279,
|
|
4553
4584
|
"description": "Used to add multiple addons to the project's `package.json` and run their\n`defaultBlueprint` if they provide one.\n\nGenerally, this would be done from the `afterInstall` hook, to\nensure that a package that is required by a given blueprint is\navailable.",
|
|
4554
4585
|
"itemtype": "method",
|
|
4555
4586
|
"name": "addAddonsToProject",
|
|
@@ -4569,7 +4600,7 @@
|
|
|
4569
4600
|
},
|
|
4570
4601
|
{
|
|
4571
4602
|
"file": "lib/models/blueprint.js",
|
|
4572
|
-
"line":
|
|
4603
|
+
"line": 1325,
|
|
4573
4604
|
"description": "Used to retrieve a task with the given name. Passes the new task\nthe standard information available (like `ui`, `analytics`, `project`, etc).",
|
|
4574
4605
|
"itemtype": "method",
|
|
4575
4606
|
"name": "taskFor",
|
|
@@ -4586,7 +4617,7 @@
|
|
|
4586
4617
|
},
|
|
4587
4618
|
{
|
|
4588
4619
|
"file": "lib/models/blueprint.js",
|
|
4589
|
-
"line":
|
|
4620
|
+
"line": 1343,
|
|
4590
4621
|
"description": "Inserts the given content into a file. If the `contentsToInsert` string is already\npresent in the current contents, the file will not be changed unless `force` option\nis passed.\n\nIf `options.before` is specified, `contentsToInsert` will be inserted before\nthe first instance of that string. If `options.after` is specified, the\ncontents will be inserted after the first instance of that string.\nIf the string specified by options.before or options.after is not in the file,\nno change will be made.\n\nIf neither `options.before` nor `options.after` are present, `contentsToInsert`\nwill be inserted at the end of the file.\n\nExample:\n```\n// app/router.js\nRouter.map(function () {\n});\n```\n\n```\ninsertIntoFile('app/router.js', ' this.route(\"admin\");', {\n after: 'Router.map(function () {' + EOL\n}).then(function() {\n // file has been inserted into!\n});\n\n\n```\n\n```\n// app/router.js\nRouter.map(function () {\n this.route(\"admin\");\n});\n```",
|
|
4591
4622
|
"itemtype": "method",
|
|
4592
4623
|
"name": "insertIntoFile",
|
|
@@ -4616,7 +4647,7 @@
|
|
|
4616
4647
|
},
|
|
4617
4648
|
{
|
|
4618
4649
|
"file": "lib/models/blueprint.js",
|
|
4619
|
-
"line":
|
|
4650
|
+
"line": 1447,
|
|
4620
4651
|
"description": "Used to retrieve a blueprint with the given name.",
|
|
4621
4652
|
"itemtype": "method",
|
|
4622
4653
|
"name": "lookupBlueprint",
|
|
@@ -4638,7 +4669,7 @@
|
|
|
4638
4669
|
},
|
|
4639
4670
|
{
|
|
4640
4671
|
"file": "lib/models/blueprint.js",
|
|
4641
|
-
"line":
|
|
4672
|
+
"line": 1464,
|
|
4642
4673
|
"static": 1,
|
|
4643
4674
|
"itemtype": "method",
|
|
4644
4675
|
"name": "lookup",
|
|
@@ -4665,6 +4696,12 @@
|
|
|
4665
4696
|
"description": "Throw a `SilentError` if a\n matching Blueprint could not be found",
|
|
4666
4697
|
"type": "Boolean",
|
|
4667
4698
|
"optional": true
|
|
4699
|
+
},
|
|
4700
|
+
{
|
|
4701
|
+
"name": "blueprintOptions",
|
|
4702
|
+
"description": "Options object that will be passed\n along to the Blueprint instance on creation.",
|
|
4703
|
+
"type": "Object",
|
|
4704
|
+
"optional": true
|
|
4668
4705
|
}
|
|
4669
4706
|
]
|
|
4670
4707
|
}
|
|
@@ -4679,7 +4716,7 @@
|
|
|
4679
4716
|
},
|
|
4680
4717
|
{
|
|
4681
4718
|
"file": "lib/models/blueprint.js",
|
|
4682
|
-
"line":
|
|
4719
|
+
"line": 1513,
|
|
4683
4720
|
"description": "Loads a blueprint from given path.",
|
|
4684
4721
|
"static": 1,
|
|
4685
4722
|
"itemtype": "method",
|
|
@@ -4689,6 +4726,12 @@
|
|
|
4689
4726
|
"name": "blueprintPath",
|
|
4690
4727
|
"description": "",
|
|
4691
4728
|
"type": "String"
|
|
4729
|
+
},
|
|
4730
|
+
{
|
|
4731
|
+
"name": "blueprintOptions",
|
|
4732
|
+
"description": "",
|
|
4733
|
+
"type": "Object",
|
|
4734
|
+
"optional": true
|
|
4692
4735
|
}
|
|
4693
4736
|
],
|
|
4694
4737
|
"return": {
|
|
@@ -4701,7 +4744,7 @@
|
|
|
4701
4744
|
},
|
|
4702
4745
|
{
|
|
4703
4746
|
"file": "lib/models/blueprint.js",
|
|
4704
|
-
"line":
|
|
4747
|
+
"line": 1541,
|
|
4705
4748
|
"static": 1,
|
|
4706
4749
|
"itemtype": "method",
|
|
4707
4750
|
"name": "list",
|
|
@@ -4731,7 +4774,7 @@
|
|
|
4731
4774
|
},
|
|
4732
4775
|
{
|
|
4733
4776
|
"file": "lib/models/blueprint.js",
|
|
4734
|
-
"line":
|
|
4777
|
+
"line": 1590,
|
|
4735
4778
|
"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.",
|
|
4736
4779
|
"static": 1,
|
|
4737
4780
|
"itemtype": "property",
|
|
@@ -4742,7 +4785,7 @@
|
|
|
4742
4785
|
},
|
|
4743
4786
|
{
|
|
4744
4787
|
"file": "lib/models/blueprint.js",
|
|
4745
|
-
"line":
|
|
4788
|
+
"line": 1605,
|
|
4746
4789
|
"static": 1,
|
|
4747
4790
|
"itemtype": "property",
|
|
4748
4791
|
"name": "ignoredFiles",
|
|
@@ -4752,7 +4795,7 @@
|
|
|
4752
4795
|
},
|
|
4753
4796
|
{
|
|
4754
4797
|
"file": "lib/models/blueprint.js",
|
|
4755
|
-
"line":
|
|
4798
|
+
"line": 1611,
|
|
4756
4799
|
"static": 1,
|
|
4757
4800
|
"itemtype": "property",
|
|
4758
4801
|
"name": "ignoredUpdateFiles",
|
|
@@ -4762,7 +4805,7 @@
|
|
|
4762
4805
|
},
|
|
4763
4806
|
{
|
|
4764
4807
|
"file": "lib/models/blueprint.js",
|
|
4765
|
-
"line":
|
|
4808
|
+
"line": 1617,
|
|
4766
4809
|
"static": 1,
|
|
4767
4810
|
"itemtype": "property",
|
|
4768
4811
|
"name": "defaultLookupPaths",
|
|
@@ -4772,7 +4815,7 @@
|
|
|
4772
4815
|
},
|
|
4773
4816
|
{
|
|
4774
4817
|
"file": "lib/models/blueprint.js",
|
|
4775
|
-
"line":
|
|
4818
|
+
"line": 1625,
|
|
4776
4819
|
"access": "private",
|
|
4777
4820
|
"tagname": "",
|
|
4778
4821
|
"itemtype": "method",
|
|
@@ -4794,7 +4837,7 @@
|
|
|
4794
4837
|
},
|
|
4795
4838
|
{
|
|
4796
4839
|
"file": "lib/models/blueprint.js",
|
|
4797
|
-
"line":
|
|
4840
|
+
"line": 1638,
|
|
4798
4841
|
"access": "private",
|
|
4799
4842
|
"tagname": "",
|
|
4800
4843
|
"itemtype": "method",
|
|
@@ -4812,7 +4855,7 @@
|
|
|
4812
4855
|
},
|
|
4813
4856
|
{
|
|
4814
4857
|
"file": "lib/models/blueprint.js",
|
|
4815
|
-
"line":
|
|
4858
|
+
"line": 1649,
|
|
4816
4859
|
"access": "private",
|
|
4817
4860
|
"tagname": "",
|
|
4818
4861
|
"itemtype": "method",
|
|
@@ -4830,7 +4873,7 @@
|
|
|
4830
4873
|
},
|
|
4831
4874
|
{
|
|
4832
4875
|
"file": "lib/models/blueprint.js",
|
|
4833
|
-
"line":
|
|
4876
|
+
"line": 1658,
|
|
4834
4877
|
"access": "private",
|
|
4835
4878
|
"tagname": "",
|
|
4836
4879
|
"itemtype": "method",
|
|
@@ -4857,7 +4900,7 @@
|
|
|
4857
4900
|
},
|
|
4858
4901
|
{
|
|
4859
4902
|
"file": "lib/models/blueprint.js",
|
|
4860
|
-
"line":
|
|
4903
|
+
"line": 1672,
|
|
4861
4904
|
"access": "private",
|
|
4862
4905
|
"tagname": "",
|
|
4863
4906
|
"itemtype": "method",
|
|
@@ -4879,7 +4922,7 @@
|
|
|
4879
4922
|
},
|
|
4880
4923
|
{
|
|
4881
4924
|
"file": "lib/models/blueprint.js",
|
|
4882
|
-
"line":
|
|
4925
|
+
"line": 1684,
|
|
4883
4926
|
"description": "Combines provided lookup paths with defaults and removes\nduplicates.",
|
|
4884
4927
|
"access": "private",
|
|
4885
4928
|
"tagname": "",
|
|
@@ -4902,7 +4945,7 @@
|
|
|
4902
4945
|
},
|
|
4903
4946
|
{
|
|
4904
4947
|
"file": "lib/models/blueprint.js",
|
|
4905
|
-
"line":
|
|
4948
|
+
"line": 1699,
|
|
4906
4949
|
"description": "Looks for a __path__ token in the files folder. Must be present for\nthe blueprint to support pod tokens.",
|
|
4907
4950
|
"access": "private",
|
|
4908
4951
|
"tagname": "",
|
|
@@ -4925,7 +4968,7 @@
|
|
|
4925
4968
|
},
|
|
4926
4969
|
{
|
|
4927
4970
|
"file": "lib/models/blueprint.js",
|
|
4928
|
-
"line":
|
|
4971
|
+
"line": 1738,
|
|
4929
4972
|
"access": "private",
|
|
4930
4973
|
"tagname": "",
|
|
4931
4974
|
"itemtype": "method",
|
|
@@ -4947,7 +4990,7 @@
|
|
|
4947
4990
|
},
|
|
4948
4991
|
{
|
|
4949
4992
|
"file": "lib/models/blueprint.js",
|
|
4950
|
-
"line":
|
|
4993
|
+
"line": 1752,
|
|
4951
4994
|
"access": "private",
|
|
4952
4995
|
"tagname": "",
|
|
4953
4996
|
"itemtype": "method",
|
|
@@ -4969,7 +5012,7 @@
|
|
|
4969
5012
|
},
|
|
4970
5013
|
{
|
|
4971
5014
|
"file": "lib/models/blueprint.js",
|
|
4972
|
-
"line":
|
|
5015
|
+
"line": 1762,
|
|
4973
5016
|
"access": "private",
|
|
4974
5017
|
"tagname": "",
|
|
4975
5018
|
"itemtype": "method",
|
|
@@ -4984,7 +5027,7 @@
|
|
|
4984
5027
|
},
|
|
4985
5028
|
{
|
|
4986
5029
|
"file": "lib/models/blueprint.js",
|
|
4987
|
-
"line":
|
|
5030
|
+
"line": 1775,
|
|
4988
5031
|
"access": "private",
|
|
4989
5032
|
"tagname": "",
|
|
4990
5033
|
"itemtype": "method",
|
|
@@ -6379,7 +6422,7 @@
|
|
|
6379
6422
|
},
|
|
6380
6423
|
{
|
|
6381
6424
|
"file": "lib/tasks/npm-task.js",
|
|
6382
|
-
"line":
|
|
6425
|
+
"line": 151,
|
|
6383
6426
|
"description": "This method will determine what package manager (npm or yarn) should be\nused to install the npm dependencies.\n\nSetting `this.useYarn` to `true` or `false` will force the use of yarn\nor npm respectively.\n\nIf `this.useYarn` is not set we check if `yarn.lock` exists and if\n`yarn` is available and in that case set `useYarn` to `true`.",
|
|
6384
6427
|
"access": "private",
|
|
6385
6428
|
"tagname": "",
|
package/lib/models/blueprint.js
CHANGED
|
@@ -190,6 +190,7 @@ const initialIgnoredFiles = ['.DS_Store'];
|
|
|
190
190
|
@constructor
|
|
191
191
|
@extends CoreObject
|
|
192
192
|
@param {String} [blueprintPath]
|
|
193
|
+
@param {Object} [blueprintOptions]
|
|
193
194
|
*/
|
|
194
195
|
let Blueprint = CoreObject.extend({
|
|
195
196
|
availableOptions: [],
|
|
@@ -209,11 +210,29 @@ let Blueprint = CoreObject.extend({
|
|
|
209
210
|
*/
|
|
210
211
|
shouldTransformTypeScript: false,
|
|
211
212
|
|
|
212
|
-
init(blueprintPath) {
|
|
213
|
+
init(blueprintPath, blueprintOptions) {
|
|
213
214
|
this._super();
|
|
214
215
|
|
|
215
216
|
this.path = blueprintPath;
|
|
216
217
|
this.name = path.basename(blueprintPath);
|
|
218
|
+
|
|
219
|
+
this._processOptions(blueprintOptions);
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
Process the options object coming from either
|
|
224
|
+
the `init`, `install` or `uninstall` hook.
|
|
225
|
+
|
|
226
|
+
@private
|
|
227
|
+
@method _processOptions
|
|
228
|
+
@param {Object} options
|
|
229
|
+
*/
|
|
230
|
+
_processOptions(options = {}) {
|
|
231
|
+
this.options = options;
|
|
232
|
+
this.dryRun = options.dryRun;
|
|
233
|
+
this.pod = options.pod;
|
|
234
|
+
this.project = options.project;
|
|
235
|
+
this.ui = options.ui;
|
|
217
236
|
},
|
|
218
237
|
|
|
219
238
|
/**
|
|
@@ -238,9 +257,10 @@ let Blueprint = CoreObject.extend({
|
|
|
238
257
|
|
|
239
258
|
@public
|
|
240
259
|
@method files
|
|
260
|
+
@param {Object} options
|
|
241
261
|
@return {Array} Contents of the blueprint's files directory
|
|
242
262
|
*/
|
|
243
|
-
files() {
|
|
263
|
+
files(/* options */) {
|
|
244
264
|
if (this._files) {
|
|
245
265
|
return this._files;
|
|
246
266
|
}
|
|
@@ -528,17 +548,14 @@ let Blueprint = CoreObject.extend({
|
|
|
528
548
|
@return {Promise}
|
|
529
549
|
*/
|
|
530
550
|
install(options) {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
this.project = options.project;
|
|
534
|
-
this.pod = options.pod;
|
|
535
|
-
this.options = options;
|
|
551
|
+
this._processOptions(options);
|
|
552
|
+
|
|
536
553
|
this.hasPathToken = hasPathToken(this.files(this.options));
|
|
537
554
|
|
|
538
|
-
ui.writeLine(`installing ${this.name}`);
|
|
555
|
+
this.ui.writeLine(`installing ${this.name}`);
|
|
539
556
|
|
|
540
|
-
if (dryRun) {
|
|
541
|
-
ui.writeLine(chalk.yellow('You specified the dry-run flag, so no
|
|
557
|
+
if (this.dryRun) {
|
|
558
|
+
this.ui.writeLine(chalk.yellow('You specified the `dry-run` flag, so no changes will be written.'));
|
|
542
559
|
}
|
|
543
560
|
|
|
544
561
|
this._normalizeEntityName(options.entity);
|
|
@@ -558,17 +575,14 @@ let Blueprint = CoreObject.extend({
|
|
|
558
575
|
@return {Promise}
|
|
559
576
|
*/
|
|
560
577
|
uninstall(options) {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
this.project = options.project;
|
|
564
|
-
this.pod = options.pod;
|
|
565
|
-
this.options = options;
|
|
578
|
+
this._processOptions(options);
|
|
579
|
+
|
|
566
580
|
this.hasPathToken = hasPathToken(this.files(this.options));
|
|
567
581
|
|
|
568
|
-
ui.writeLine(`uninstalling ${this.name}`);
|
|
582
|
+
this.ui.writeLine(`uninstalling ${this.name}`);
|
|
569
583
|
|
|
570
|
-
if (dryRun) {
|
|
571
|
-
ui.writeLine(chalk.yellow('You specified the dry-run flag, so no
|
|
584
|
+
if (this.dryRun) {
|
|
585
|
+
this.ui.writeLine(chalk.yellow('You specified the `dry-run` flag, so no files will be deleted.'));
|
|
572
586
|
}
|
|
573
587
|
|
|
574
588
|
this._normalizeEntityName(options.entity);
|
|
@@ -934,7 +948,7 @@ let Blueprint = CoreObject.extend({
|
|
|
934
948
|
@return {Boolean}
|
|
935
949
|
*/
|
|
936
950
|
supportsAddon() {
|
|
937
|
-
return /__root__/.test(this.files().join());
|
|
951
|
+
return /__root__/.test(this.files(this.options).join());
|
|
938
952
|
},
|
|
939
953
|
|
|
940
954
|
/**
|
|
@@ -1131,8 +1145,8 @@ let Blueprint = CoreObject.extend({
|
|
|
1131
1145
|
|
|
1132
1146
|
/**
|
|
1133
1147
|
Used to add a Bower package to the projects `bower.json`.
|
|
1134
|
-
|
|
1135
|
-
Bower is a package manager that is no longer recommended
|
|
1148
|
+
|
|
1149
|
+
Bower is a package manager that is no longer recommended
|
|
1136
1150
|
for new projects, but you may find this hook used in older
|
|
1137
1151
|
addons.
|
|
1138
1152
|
|
|
@@ -1184,8 +1198,8 @@ let Blueprint = CoreObject.extend({
|
|
|
1184
1198
|
|
|
1185
1199
|
/**
|
|
1186
1200
|
Used to add an array of packages to the projects `bower.json`.
|
|
1187
|
-
|
|
1188
|
-
Bower is a package manager that is no longer recommended
|
|
1201
|
+
|
|
1202
|
+
Bower is a package manager that is no longer recommended
|
|
1189
1203
|
for new projects, but you may find this hook used in older
|
|
1190
1204
|
addons.
|
|
1191
1205
|
|
|
@@ -1456,6 +1470,8 @@ let Blueprint = CoreObject.extend({
|
|
|
1456
1470
|
@param {Array} [options.paths] Extra paths to search for blueprints
|
|
1457
1471
|
@param {Boolean} [options.ignoreMissing] Throw a `SilentError` if a
|
|
1458
1472
|
matching Blueprint could not be found
|
|
1473
|
+
@param {Object} [options.blueprintOptions] Options object that will be passed
|
|
1474
|
+
along to the Blueprint instance on creation.
|
|
1459
1475
|
@return {Blueprint}
|
|
1460
1476
|
*/
|
|
1461
1477
|
Blueprint.lookup = function (name, options) {
|
|
@@ -1467,7 +1483,7 @@ Blueprint.lookup = function (name, options) {
|
|
|
1467
1483
|
|
|
1468
1484
|
if (isNameAPath) {
|
|
1469
1485
|
if (Blueprint._existsSync(blueprintPath)) {
|
|
1470
|
-
return Blueprint.load(blueprintPath);
|
|
1486
|
+
return Blueprint.load(blueprintPath, options.blueprintOptions);
|
|
1471
1487
|
}
|
|
1472
1488
|
|
|
1473
1489
|
if (!options.ignoreMissing) {
|
|
@@ -1485,7 +1501,7 @@ Blueprint.lookup = function (name, options) {
|
|
|
1485
1501
|
let blueprintPath = path.resolve(lookupPath, name);
|
|
1486
1502
|
|
|
1487
1503
|
if (Blueprint._existsSync(blueprintPath)) {
|
|
1488
|
-
return Blueprint.load(blueprintPath);
|
|
1504
|
+
return Blueprint.load(blueprintPath, options.blueprintOptions);
|
|
1489
1505
|
}
|
|
1490
1506
|
}
|
|
1491
1507
|
|
|
@@ -1500,9 +1516,10 @@ Blueprint.lookup = function (name, options) {
|
|
|
1500
1516
|
@method load
|
|
1501
1517
|
@namespace Blueprint
|
|
1502
1518
|
@param {String} blueprintPath
|
|
1519
|
+
@param {Object} [blueprintOptions]
|
|
1503
1520
|
@return {Blueprint} blueprint instance
|
|
1504
1521
|
*/
|
|
1505
|
-
Blueprint.load = function (blueprintPath) {
|
|
1522
|
+
Blueprint.load = function (blueprintPath, blueprintOptions) {
|
|
1506
1523
|
if (fs.lstatSync(blueprintPath).isDirectory()) {
|
|
1507
1524
|
let Constructor = Blueprint;
|
|
1508
1525
|
|
|
@@ -1517,7 +1534,7 @@ Blueprint.load = function (blueprintPath) {
|
|
|
1517
1534
|
}
|
|
1518
1535
|
}
|
|
1519
1536
|
|
|
1520
|
-
return new Constructor(blueprintPath);
|
|
1537
|
+
return new Constructor(blueprintPath, blueprintOptions);
|
|
1521
1538
|
}
|
|
1522
1539
|
};
|
|
1523
1540
|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
const Blueprint = require('../models/blueprint');
|
|
4
4
|
const Task = require('../models/task');
|
|
5
5
|
const parseOptions = require('../utilities/parse-options');
|
|
6
|
-
const { merge } = require('ember-cli-lodash-subset');
|
|
7
6
|
const logger = require('heimdalljs-logger')('ember-cli:generate-from-blueprint');
|
|
8
7
|
const lintFix = require('../utilities/lint-fix');
|
|
9
8
|
|
|
@@ -29,18 +28,51 @@ class GenerateTask extends Task {
|
|
|
29
28
|
let name = options.args[0];
|
|
30
29
|
let noAddonBlueprint = ['mixin', 'blueprint-test'];
|
|
31
30
|
|
|
32
|
-
let
|
|
33
|
-
|
|
31
|
+
let entity = {
|
|
32
|
+
name: options.args[1],
|
|
33
|
+
options: parseOptions(options.args.slice(2)),
|
|
34
|
+
};
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
let baseBlueprintOptions = {
|
|
37
|
+
target: this.project.root,
|
|
38
|
+
entity,
|
|
39
|
+
ui: this.ui,
|
|
40
|
+
analytics: this.analytics,
|
|
41
|
+
project: this.project,
|
|
42
|
+
settings: this.settings,
|
|
43
|
+
testing: this.testing,
|
|
44
|
+
taskOptions: options,
|
|
45
|
+
originBlueprintName: name,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
let mainBlueprintOptions = { ...baseBlueprintOptions, ...options };
|
|
49
|
+
let testBlueprintOptions = { ...mainBlueprintOptions, installingTest: true };
|
|
50
|
+
let addonBlueprintOptions = { ...mainBlueprintOptions, installingAddon: true };
|
|
51
|
+
|
|
52
|
+
let mainBlueprint = this.lookupBlueprint(name, {
|
|
53
|
+
blueprintOptions: mainBlueprintOptions,
|
|
54
|
+
ignoreMissing: options.ignoreMissingMain,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
let testBlueprint = this.lookupBlueprint(`${name}-test`, {
|
|
58
|
+
blueprintOptions: testBlueprintOptions,
|
|
59
|
+
ignoreMissing: true,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
let addonBlueprint = this.lookupBlueprint(`${name}-addon`, {
|
|
63
|
+
blueprintOptions: addonBlueprintOptions,
|
|
64
|
+
ignoreMissing: true,
|
|
65
|
+
});
|
|
37
66
|
|
|
38
67
|
// otherwise, use default addon-import
|
|
39
68
|
if (noAddonBlueprint.indexOf(name) < 0 && !addonBlueprint && options.args[1]) {
|
|
40
69
|
let mainBlueprintSupportsAddon = mainBlueprint && mainBlueprint.supportsAddon();
|
|
41
70
|
|
|
42
71
|
if (mainBlueprintSupportsAddon) {
|
|
43
|
-
addonBlueprint = this.lookupBlueprint('addon-import',
|
|
72
|
+
addonBlueprint = this.lookupBlueprint('addon-import', {
|
|
73
|
+
blueprintOptions: addonBlueprintOptions,
|
|
74
|
+
ignoreMissing: true,
|
|
75
|
+
});
|
|
44
76
|
}
|
|
45
77
|
}
|
|
46
78
|
|
|
@@ -56,26 +88,7 @@ class GenerateTask extends Task {
|
|
|
56
88
|
}
|
|
57
89
|
}
|
|
58
90
|
|
|
59
|
-
|
|
60
|
-
name: options.args[1],
|
|
61
|
-
options: parseOptions(options.args.slice(2)),
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
let blueprintOptions = {
|
|
65
|
-
target: this.project.root,
|
|
66
|
-
entity,
|
|
67
|
-
ui: this.ui,
|
|
68
|
-
analytics: this.analytics,
|
|
69
|
-
project: this.project,
|
|
70
|
-
settings: this.settings,
|
|
71
|
-
testing: this.testing,
|
|
72
|
-
taskOptions: options,
|
|
73
|
-
originBlueprintName: name,
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
blueprintOptions = merge(blueprintOptions, options || {});
|
|
77
|
-
|
|
78
|
-
await mainBlueprint[this.blueprintFunction](blueprintOptions);
|
|
91
|
+
await mainBlueprint[this.blueprintFunction](mainBlueprintOptions);
|
|
79
92
|
if (testBlueprint) {
|
|
80
93
|
if (testBlueprint.locals === Blueprint.prototype.locals) {
|
|
81
94
|
testBlueprint.locals = function (options) {
|
|
@@ -83,14 +96,13 @@ class GenerateTask extends Task {
|
|
|
83
96
|
};
|
|
84
97
|
}
|
|
85
98
|
|
|
86
|
-
let testBlueprintOptions = merge({}, blueprintOptions, { installingTest: true });
|
|
87
99
|
await testBlueprint[this.blueprintFunction](testBlueprintOptions);
|
|
88
100
|
}
|
|
89
101
|
|
|
90
102
|
if (!addonBlueprint || name.match(/-addon/)) {
|
|
91
103
|
return;
|
|
92
104
|
}
|
|
93
|
-
if (!this.project.isEmberCLIAddon() &&
|
|
105
|
+
if (!this.project.isEmberCLIAddon() && mainBlueprintOptions.inRepoAddon === null) {
|
|
94
106
|
return;
|
|
95
107
|
}
|
|
96
108
|
|
|
@@ -100,15 +112,14 @@ class GenerateTask extends Task {
|
|
|
100
112
|
};
|
|
101
113
|
}
|
|
102
114
|
|
|
103
|
-
let addonBlueprintOptions = merge({}, blueprintOptions, { installingAddon: true });
|
|
104
|
-
|
|
105
115
|
return addonBlueprint[this.blueprintFunction](addonBlueprintOptions);
|
|
106
116
|
}
|
|
107
117
|
|
|
108
|
-
lookupBlueprint(name, ignoreMissing) {
|
|
118
|
+
lookupBlueprint(name, { blueprintOptions, ignoreMissing }) {
|
|
109
119
|
return Blueprint.lookup(name, {
|
|
110
|
-
|
|
120
|
+
blueprintOptions,
|
|
111
121
|
ignoreMissing,
|
|
122
|
+
paths: this.project.blueprintLookupPaths(),
|
|
112
123
|
});
|
|
113
124
|
}
|
|
114
125
|
}
|
package/lib/tasks/npm-task.js
CHANGED
|
@@ -63,7 +63,11 @@ class NpmTask extends Task {
|
|
|
63
63
|
|
|
64
64
|
if (semver.gte(version, '2.0.0')) {
|
|
65
65
|
logger.warn('yarn --version: %s', version);
|
|
66
|
-
|
|
66
|
+
let yarnConfig = await this.yarn(['config', 'get', 'nodeLinker']);
|
|
67
|
+
let nodeLinker = yarnConfig.stdout.trim();
|
|
68
|
+
if (nodeLinker !== 'node-modules') {
|
|
69
|
+
this.ui.writeWarnLine(`Yarn v2 is not fully supported. Proceeding with yarn: ${version}`);
|
|
70
|
+
}
|
|
67
71
|
} else {
|
|
68
72
|
logger.info('yarn --version: %s', version);
|
|
69
73
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0-beta.0",
|
|
4
4
|
"description": "Command line tool for developing ambitious ember.js apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"test:slow": "node --unhandled-rejections=strict tests/runner slow"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@babel/core": "^7.18.
|
|
40
|
+
"@babel/core": "^7.18.13",
|
|
41
41
|
"@babel/plugin-transform-modules-amd": "^7.18.6",
|
|
42
42
|
"amd-name-resolver": "^1.3.1",
|
|
43
43
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"calculate-cache-key-for-tree": "^2.0.0",
|
|
62
62
|
"capture-exit": "^2.0.0",
|
|
63
63
|
"chalk": "^4.1.2",
|
|
64
|
-
"ci-info": "^3.3.
|
|
64
|
+
"ci-info": "^3.3.2",
|
|
65
65
|
"clean-base-url": "^1.0.0",
|
|
66
66
|
"compression": "^1.7.4",
|
|
67
67
|
"configstore": "^5.0.1",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"is-git-url": "^1.0.0",
|
|
98
98
|
"is-language-code": "^3.1.0",
|
|
99
99
|
"isbinaryfile": "^5.0.0",
|
|
100
|
-
"js-yaml": "^
|
|
100
|
+
"js-yaml": "^4.1.0",
|
|
101
101
|
"leek": "0.0.24",
|
|
102
102
|
"lodash.template": "^4.5.0",
|
|
103
103
|
"markdown-it": "^13.0.1",
|
|
@@ -105,9 +105,9 @@
|
|
|
105
105
|
"minimatch": "^5.1.0",
|
|
106
106
|
"morgan": "^1.10.0",
|
|
107
107
|
"nopt": "^3.0.6",
|
|
108
|
-
"npm-package-arg": "^9.0
|
|
108
|
+
"npm-package-arg": "^9.1.0",
|
|
109
109
|
"p-defer": "^3.0.0",
|
|
110
|
-
"portfinder": "^1.0.
|
|
110
|
+
"portfinder": "^1.0.29",
|
|
111
111
|
"promise-map-series": "^0.3.0",
|
|
112
112
|
"promise.hash.helper": "^1.0.8",
|
|
113
113
|
"quick-temp": "^0.1.8",
|
|
@@ -121,18 +121,18 @@
|
|
|
121
121
|
"sort-package-json": "^1.57.0",
|
|
122
122
|
"symlink-or-copy": "^1.3.1",
|
|
123
123
|
"temp": "0.9.4",
|
|
124
|
-
"testem": "^3.
|
|
124
|
+
"testem": "^3.8.0",
|
|
125
125
|
"tiny-lr": "^2.0.0",
|
|
126
126
|
"tree-sync": "^2.1.0",
|
|
127
127
|
"uuid": "^8.3.2",
|
|
128
|
-
"walk-sync": "^
|
|
129
|
-
"watch-detector": "^1.0.
|
|
128
|
+
"walk-sync": "^3.0.0",
|
|
129
|
+
"watch-detector": "^1.0.2",
|
|
130
130
|
"workerpool": "^6.2.1",
|
|
131
131
|
"yam": "^1.0.0"
|
|
132
132
|
},
|
|
133
133
|
"devDependencies": {
|
|
134
134
|
"@ember/edition-utils": "^1.2.0",
|
|
135
|
-
"@octokit/rest": "^
|
|
135
|
+
"@octokit/rest": "^19.0.4",
|
|
136
136
|
"broccoli-plugin": "^4.0.3",
|
|
137
137
|
"broccoli-test-helper": "^2.0.0",
|
|
138
138
|
"chai": "^4.3.6",
|
|
@@ -141,24 +141,24 @@
|
|
|
141
141
|
"chai-jest-snapshot": "^2.0.0",
|
|
142
142
|
"ember-cli-blueprint-test-helpers": "^0.19.2",
|
|
143
143
|
"ember-cli-internal-test-helpers": "^0.9.1",
|
|
144
|
-
"eslint": "^8.
|
|
144
|
+
"eslint": "^8.23.0",
|
|
145
145
|
"eslint-config-prettier": "^8.5.0",
|
|
146
146
|
"eslint-plugin-chai-expect": "^3.0.0",
|
|
147
|
-
"eslint-plugin-mocha": "^10.0
|
|
147
|
+
"eslint-plugin-mocha": "^10.1.0",
|
|
148
148
|
"eslint-plugin-node": "^11.1.0",
|
|
149
149
|
"eslint-plugin-prettier": "^4.2.1",
|
|
150
150
|
"fixturify": "^2.1.0",
|
|
151
151
|
"jsdom": "^20.0.0",
|
|
152
152
|
"latest-version": "^5.1.0",
|
|
153
153
|
"mocha": "^10.0.0",
|
|
154
|
-
"nock": "^13.2.
|
|
154
|
+
"nock": "^13.2.9",
|
|
155
155
|
"nyc": "^15.1.0",
|
|
156
|
-
"prettier": "2.
|
|
157
|
-
"release-it": "^15.
|
|
156
|
+
"prettier": "2.7.1",
|
|
157
|
+
"release-it": "^15.4.1",
|
|
158
158
|
"rimraf": "^3.0.2",
|
|
159
159
|
"strip-ansi": "^6.0.0",
|
|
160
|
-
"supertest": "^6.2.
|
|
161
|
-
"testdouble": "^3.16.
|
|
160
|
+
"supertest": "^6.2.4",
|
|
161
|
+
"testdouble": "^3.16.6",
|
|
162
162
|
"tmp": "^0.2.1",
|
|
163
163
|
"websocket": "^1.0.32",
|
|
164
164
|
"which": "2.0.2",
|