ember-cli 7.1.0 → 7.2.0-alpha.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 +91 -25
- package/RELEASE.md +6 -5
- package/blueprints/http-mock/index.js +1 -1
- package/blueprints/http-proxy/index.js +1 -1
- package/docs/build/data.json +128 -1598
- package/lib/commands/generate.js +1 -1
- package/lib/models/command.js +1 -1
- package/lib/models/package-info-cache/package-info.js +1 -1
- package/lib/models/project.js +13 -5
- package/lib/tasks/generate-from-blueprint.js +1 -1
- package/lib/tasks/install-blueprint.js +4 -2
- package/lib/utilities/merge-blueprint-options.js +1 -1
- package/lib/utilities/version-utils.js +6 -1
- package/package.json +23 -14
- package/packages/addon-blueprint/files/README.md +10 -0
- package/packages/addon-blueprint/package.json +10 -2
- package/packages/app-blueprint/files/package.json +14 -14
- package/packages/app-blueprint/package.json +10 -2
- package/packages/blueprint-blueprint/files/blueprints/__name__/files/.gitkeep +0 -0
- package/packages/blueprint-blueprint/files/blueprints/__name__/index.js +16 -0
- package/packages/blueprint-blueprint/index.js +5 -0
- package/packages/blueprint-blueprint/package.json +13 -0
- package/{lib/models/blueprint.js → packages/blueprint-model/index.js} +19 -35
- package/packages/blueprint-model/node_modules/.bin/markdown-it +21 -0
- package/packages/blueprint-model/package.json +31 -0
- package/packages/blueprint-model/utilities/directory-for-package-name.js +31 -0
- package/packages/blueprint-model/utilities/edit-file-diff.js +64 -0
- package/packages/blueprint-model/utilities/experiments.js +63 -0
- package/packages/blueprint-model/utilities/file-info.js +170 -0
- package/packages/blueprint-model/utilities/open-editor.js +44 -0
- package/packages/blueprint-model/utilities/prepend-emoji.js +12 -0
- package/packages/blueprint-model/utilities/process-template.js +10 -0
- package/patches/ember-cli-blueprint-test-helpers.patch +15 -0
- package/tests/helpers/acceptance.js +6 -5
- package/tests/helpers/fixturify-project.js +29 -137
- package/tests/helpers/per-bundle-addon-cache.js +17 -23
- /package/{lib → packages/blueprint-model}/utilities/clean-remove.js +0 -0
- /package/{lib → packages/blueprint-model}/utilities/insert-into-file.js +0 -0
- /package/{lib → packages/blueprint-model}/utilities/is-addon.js +0 -0
- /package/{lib → packages/blueprint-model}/utilities/markdown-color.js +0 -0
- /package/{lib → packages/blueprint-model}/utilities/print-command.js +0 -0
- /package/{lib → packages/blueprint-model}/utilities/sequence.js +0 -0
- /package/{lib → packages/blueprint-model}/utilities/walk-up-path.js +0 -0
package/lib/commands/generate.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const path = require('path');
|
|
4
4
|
const { default: chalk } = require('chalk');
|
|
5
5
|
const Command = require('../models/command');
|
|
6
|
-
const Blueprint = require('
|
|
6
|
+
const Blueprint = require('@ember-tooling/blueprint-model');
|
|
7
7
|
const mergeBlueprintOptions = require('../utilities/merge-blueprint-options');
|
|
8
8
|
const merge = require('lodash/merge');
|
|
9
9
|
const reject = require('lodash/reject');
|
package/lib/models/command.js
CHANGED
|
@@ -6,7 +6,7 @@ const path = require('path');
|
|
|
6
6
|
const isGitRepo = require('is-git-url');
|
|
7
7
|
const camelize = require('ember-cli-string-utils').camelize;
|
|
8
8
|
const getCallerFile = require('get-caller-file');
|
|
9
|
-
const printCommand = require('
|
|
9
|
+
const printCommand = require('@ember-tooling/blueprint-model/utilities/print-command');
|
|
10
10
|
const union = require('lodash/union');
|
|
11
11
|
const defaults = require('lodash/defaults');
|
|
12
12
|
const uniq = require('lodash/uniq');
|
|
@@ -4,7 +4,7 @@ const path = require('path');
|
|
|
4
4
|
const ErrorList = require('./error-list');
|
|
5
5
|
const Errors = require('./errors');
|
|
6
6
|
const AddonInfo = require('../addon-info');
|
|
7
|
-
const isAddon = require('
|
|
7
|
+
const isAddon = require('@ember-tooling/blueprint-model/utilities/is-addon');
|
|
8
8
|
const isEngine = require('../../utilities/is-engine');
|
|
9
9
|
const isLazyEngine = require('../../utilities/is-lazy-engine');
|
|
10
10
|
const logger = require('heimdalljs-logger')('ember-cli:package-info-cache:package-info');
|
package/lib/models/project.js
CHANGED
|
@@ -523,15 +523,23 @@ class Project {
|
|
|
523
523
|
*/
|
|
524
524
|
blueprintLookupPaths() {
|
|
525
525
|
if (this.isEmberCLIProject()) {
|
|
526
|
-
|
|
527
|
-
let addonLookupPaths = this.addonBlueprintLookupPaths();
|
|
528
|
-
|
|
529
|
-
return lookupPaths.concat(addonLookupPaths);
|
|
526
|
+
return [this.localBlueprintLookupPath(), ...this.addonBlueprintLookupPaths(), this.builtInLookupPath()];
|
|
530
527
|
} else {
|
|
531
|
-
return this.addonBlueprintLookupPaths();
|
|
528
|
+
return [...this.addonBlueprintLookupPaths(), this.builtInLookupPath()];
|
|
532
529
|
}
|
|
533
530
|
}
|
|
534
531
|
|
|
532
|
+
/**
|
|
533
|
+
* Returns the built-in ember-cli path for looking up blueprints
|
|
534
|
+
*
|
|
535
|
+
* @private
|
|
536
|
+
* @method builtInLookupPath
|
|
537
|
+
* @return {string} path to the ember-cli built-in blueprints
|
|
538
|
+
*/
|
|
539
|
+
builtInLookupPath() {
|
|
540
|
+
return path.resolve(__dirname, '..', '..', 'blueprints');
|
|
541
|
+
}
|
|
542
|
+
|
|
535
543
|
/**
|
|
536
544
|
Returns a list of addon paths where blueprints will be looked up.
|
|
537
545
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const Blueprint = require('
|
|
3
|
+
const Blueprint = require('@ember-tooling/blueprint-model');
|
|
4
4
|
const Task = require('../models/task');
|
|
5
5
|
const parseOptions = require('../utilities/parse-options');
|
|
6
6
|
const logger = require('heimdalljs-logger')('ember-cli:generate-from-blueprint');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const fs = require('fs-extra');
|
|
4
|
-
const Blueprint = require('
|
|
4
|
+
const Blueprint = require('@ember-tooling/blueprint-model');
|
|
5
5
|
const Task = require('../models/task');
|
|
6
6
|
const os = require('os');
|
|
7
7
|
const path = require('path');
|
|
@@ -186,7 +186,9 @@ class InstallBlueprintTask extends Task {
|
|
|
186
186
|
logger.info(`Checking for "ember-blueprint" keyword in "${packageName}" module ...`);
|
|
187
187
|
let pkg = require(this._resolvePackageJSON(modulePath));
|
|
188
188
|
if (!pkg || !pkg.keywords || pkg.keywords.indexOf('ember-blueprint') === -1) {
|
|
189
|
-
throw new SilentError(
|
|
189
|
+
throw new SilentError(
|
|
190
|
+
`The package '${packageName}' is not a valid Ember CLI blueprint. The package.json keywords list must include "ember-blueprint".`
|
|
191
|
+
);
|
|
190
192
|
}
|
|
191
193
|
}
|
|
192
194
|
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const getRepoInfo = require('git-repo-info');
|
|
6
|
+
const version = require('../../package.json').version;
|
|
6
7
|
|
|
7
8
|
module.exports = {
|
|
8
9
|
emberCLIVersion() {
|
|
9
10
|
let gitPath = path.join(__dirname, '..', '..', '.git');
|
|
10
|
-
let output = [
|
|
11
|
+
let output = [version];
|
|
11
12
|
|
|
12
13
|
if (fs.existsSync(gitPath)) {
|
|
13
14
|
let { branch, abbreviatedSha } = getRepoInfo(gitPath);
|
|
@@ -21,6 +22,10 @@ module.exports = {
|
|
|
21
22
|
return output.join('-');
|
|
22
23
|
},
|
|
23
24
|
|
|
25
|
+
emberCLIBareVersion() {
|
|
26
|
+
return version;
|
|
27
|
+
},
|
|
28
|
+
|
|
24
29
|
isDevelopment(version) {
|
|
25
30
|
// match postfix SHA in dev version
|
|
26
31
|
return /\b[0-9a-f]{5,40}\b/.test(version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-cli",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0-alpha.2",
|
|
4
4
|
"description": "Command line tool for developing ambitious ember.js apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -26,10 +26,16 @@
|
|
|
26
26
|
"bin": {
|
|
27
27
|
"ember": "./bin/ember"
|
|
28
28
|
},
|
|
29
|
+
"release-plan": {
|
|
30
|
+
"semverIncrementAs": {
|
|
31
|
+
"minor": "prerelease",
|
|
32
|
+
"patch": "prerelease"
|
|
33
|
+
},
|
|
34
|
+
"semverIncrementTag": "alpha",
|
|
35
|
+
"publishTag": "alpha"
|
|
36
|
+
},
|
|
29
37
|
"dependencies": {
|
|
30
|
-
"@ember
|
|
31
|
-
"@ember-tooling/blueprint-model": "^0.7.0",
|
|
32
|
-
"@ember/app-blueprint": "~7.1.0",
|
|
38
|
+
"@ember/app-blueprint": "~7.2.0-alpha.1",
|
|
33
39
|
"@pnpm/find-workspace-dir": "^1000.1.5",
|
|
34
40
|
"babel-remove-types": "^2.0.0",
|
|
35
41
|
"broccoli": "^4.0.0",
|
|
@@ -82,10 +88,10 @@
|
|
|
82
88
|
"is-git-url": "^1.0.0",
|
|
83
89
|
"is-language-code": "^5.1.3",
|
|
84
90
|
"lodash": "^4.18.1",
|
|
85
|
-
"markdown-it": "^14.
|
|
91
|
+
"markdown-it": "^14.1.1",
|
|
86
92
|
"markdown-it-terminal": "^0.4.0",
|
|
87
93
|
"minimatch": "^10.2.5",
|
|
88
|
-
"morgan": "^1.
|
|
94
|
+
"morgan": "^1.10.1",
|
|
89
95
|
"nopt": "^3.0.6",
|
|
90
96
|
"npm-package-arg": "^13.0.2",
|
|
91
97
|
"os-locale": "^6.0.2",
|
|
@@ -98,20 +104,22 @@
|
|
|
98
104
|
"resolve-package-path": "^4.0.3",
|
|
99
105
|
"safe-stable-stringify": "^2.5.0",
|
|
100
106
|
"sane": "^5.0.1",
|
|
101
|
-
"semver": "^7.8.
|
|
107
|
+
"semver": "^7.8.1",
|
|
102
108
|
"semver-deprecate": "^1.1.0",
|
|
103
109
|
"silent-error": "^1.1.1",
|
|
104
|
-
"sort-package-json": "^3.
|
|
110
|
+
"sort-package-json": "^3.6.1",
|
|
105
111
|
"symlink-or-copy": "^1.3.1",
|
|
106
|
-
"testem": "^3.20.
|
|
112
|
+
"testem": "^3.20.0",
|
|
107
113
|
"tiny-lr": "^2.0.0",
|
|
108
114
|
"tree-sync": "^2.1.0",
|
|
109
115
|
"walk-sync": "^4.0.2",
|
|
110
116
|
"watch-detector": "^1.0.2",
|
|
111
117
|
"workerpool": "^10.0.2",
|
|
112
118
|
"yam": "^1.0.0",
|
|
113
|
-
"@ember-tooling/
|
|
114
|
-
"@ember-tooling/
|
|
119
|
+
"@ember-tooling/blueprint-blueprint": "0.3.0",
|
|
120
|
+
"@ember-tooling/blueprint-model": "0.7.1",
|
|
121
|
+
"@ember-tooling/classic-build-app-blueprint": "7.2.0-alpha.2",
|
|
122
|
+
"@ember-tooling/classic-build-addon-blueprint": "7.2.0-alpha.2"
|
|
115
123
|
},
|
|
116
124
|
"devDependencies": {
|
|
117
125
|
"broccoli-plugin": "^4.0.7",
|
|
@@ -120,7 +128,8 @@
|
|
|
120
128
|
"chai-as-promised": "^8.0.2",
|
|
121
129
|
"chai-files": "^1.4.0",
|
|
122
130
|
"chai-jest-snapshot": "^2.0.0",
|
|
123
|
-
"concurrently": "^9.2.
|
|
131
|
+
"concurrently": "^9.2.1",
|
|
132
|
+
"ember-cli": "link:.",
|
|
124
133
|
"ember-cli-blueprint-test-helpers": "^0.19.2",
|
|
125
134
|
"ember-cli-internal-test-helpers": "^0.9.1",
|
|
126
135
|
"eslint": "^8.57.1",
|
|
@@ -129,7 +138,7 @@
|
|
|
129
138
|
"eslint-plugin-mocha": "^10.5.0",
|
|
130
139
|
"eslint-plugin-n": "^17.24.0",
|
|
131
140
|
"fixturify": "^3.0.0",
|
|
132
|
-
"fixturify-project": "^
|
|
141
|
+
"fixturify-project": "^7.1.3",
|
|
133
142
|
"jsdom": "^21.1.2",
|
|
134
143
|
"latest-version": "^9.0.0",
|
|
135
144
|
"mocha": "^11.7.6",
|
|
@@ -140,7 +149,7 @@
|
|
|
140
149
|
"strip-ansi": "^7.2.0",
|
|
141
150
|
"supertest": "^7.2.2",
|
|
142
151
|
"testdouble": "^3.20.2",
|
|
143
|
-
"tmp": "^0.2.
|
|
152
|
+
"tmp": "^0.2.5",
|
|
144
153
|
"tmp-promise": "^3.0.3",
|
|
145
154
|
"websocket": "^1.0.35",
|
|
146
155
|
"which": "6.0.0",
|
|
@@ -18,6 +18,16 @@ ember install <%= addonName %>
|
|
|
18
18
|
|
|
19
19
|
[Longer description of how to use the addon in apps.]
|
|
20
20
|
|
|
21
|
+
> TODO: Document the package's public API.
|
|
22
|
+
>
|
|
23
|
+
> For each public api (including components, helpers, modifiers, and other apis) include:
|
|
24
|
+
>
|
|
25
|
+
> - The import path for a consumer (e.g. `import MyAddonsComponent from 'my-addon/components/my-addons-component'`)
|
|
26
|
+
> - What it does
|
|
27
|
+
> - Parameters/options
|
|
28
|
+
> - Return value
|
|
29
|
+
> - Example usage
|
|
30
|
+
|
|
21
31
|
## Contributing
|
|
22
32
|
|
|
23
33
|
See the [Contributing](CONTRIBUTING.md) guide for details.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-tooling/classic-build-addon-blueprint",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0-alpha.2",
|
|
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": "workspace:*",
|
|
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",
|
|
@@ -20,5 +20,13 @@
|
|
|
20
20
|
"silent-error": "^1.1.1",
|
|
21
21
|
"sort-package-json": "^2.15.1",
|
|
22
22
|
"walk-sync": "^3.0.0"
|
|
23
|
+
},
|
|
24
|
+
"release-plan": {
|
|
25
|
+
"semverIncrementAs": {
|
|
26
|
+
"minor": "prerelease",
|
|
27
|
+
"patch": "prerelease"
|
|
28
|
+
},
|
|
29
|
+
"semverIncrementTag": "alpha",
|
|
30
|
+
"publishTag": "alpha"
|
|
23
31
|
}
|
|
24
32
|
}
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"test:ember": "ember test"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@babel/core": "^7.29.
|
|
32
|
-
"@babel/eslint-parser": "^7.
|
|
33
|
-
"@babel/plugin-proposal-decorators": "^7.29.
|
|
31
|
+
"@babel/core": "^7.29.0",
|
|
32
|
+
"@babel/eslint-parser": "^7.28.6",
|
|
33
|
+
"@babel/plugin-proposal-decorators": "^7.29.0<% if (typescript && emberData) { %>",
|
|
34
34
|
"@ember-data/adapter": "~5.8.2",
|
|
35
35
|
"@ember-data/graph": "~5.8.2",
|
|
36
36
|
"@ember-data/json-api": "~5.8.2",
|
|
@@ -42,17 +42,17 @@
|
|
|
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.
|
|
45
|
+
"@ember/test-helpers": "^5.4.2<% if (embroider) { %>",
|
|
46
46
|
"@embroider/compat": "^3.9.4",
|
|
47
47
|
"@embroider/core": "^3.5.10<% } %>",
|
|
48
|
-
"@embroider/macros": "^1.20.
|
|
48
|
+
"@embroider/macros": "^1.20.2<% if (embroider) { %>",
|
|
49
49
|
"@embroider/webpack": "^4.1.2<% } %>",
|
|
50
50
|
"@eslint/js": "^9.39.4",
|
|
51
51
|
"@glimmer/component": "^2.1.1",
|
|
52
52
|
"@glimmer/tracking": "^1.1.2<% if (typescript) { %>",
|
|
53
53
|
"@glint/environment-ember-loose": "^1.5.2",
|
|
54
54
|
"@glint/environment-ember-template-imports": "^1.5.2",
|
|
55
|
-
"@glint/template": "^1.7.
|
|
55
|
+
"@glint/template": "^1.7.7",
|
|
56
56
|
"@tsconfig/ember": "^3.0.12",
|
|
57
57
|
"@types/qunit": "^2.19.14",
|
|
58
58
|
"@types/rsvp": "^4.0.9<% } %><% if (warpDrive) { %>",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"@warp-drive/legacy": "~5.8.2",
|
|
62
62
|
"@warp-drive/utilities": "~5.8.2<% } %>",
|
|
63
63
|
"broccoli-asset-rev": "^3.0.0",
|
|
64
|
-
"concurrently": "^9.2.
|
|
64
|
+
"concurrently": "^9.2.1",
|
|
65
65
|
"ember-auto-import": "^2.13.1",
|
|
66
|
-
"ember-cli": "~7.
|
|
66
|
+
"ember-cli": "~7.2.0-alpha.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",
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
"ember-load-initializers": "^3.0.1",
|
|
78
78
|
"ember-modifier": "^4.3.0",
|
|
79
79
|
"ember-page-title": "^9.0.3",
|
|
80
|
-
"ember-qunit": "^9.
|
|
80
|
+
"ember-qunit": "^9.0.4",
|
|
81
81
|
"ember-resolver": "^13.2.0",
|
|
82
|
-
"ember-source": "~7.
|
|
82
|
+
"ember-source": "~7.2.0-alpha.3",
|
|
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<% } %>",
|
|
@@ -91,15 +91,15 @@
|
|
|
91
91
|
"eslint-plugin-warp-drive": "^5.8.2<% } %>",
|
|
92
92
|
"globals": "^15.15.0",
|
|
93
93
|
"loader.js": "^4.7.0",
|
|
94
|
-
"prettier": "^3.8.
|
|
94
|
+
"prettier": "^3.8.3",
|
|
95
95
|
"prettier-plugin-ember-template-tag": "^2.1.6",
|
|
96
|
-
"qunit": "^2.
|
|
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.
|
|
102
|
-
"webpack": "^5.107.
|
|
101
|
+
"typescript-eslint": "^8.59.4<% } %>",
|
|
102
|
+
"webpack": "^5.107.1"
|
|
103
103
|
},
|
|
104
104
|
"engines": {
|
|
105
105
|
"node": ">= 20.19"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-tooling/classic-build-app-blueprint",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0-alpha.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/ember-cli/ember-cli.git",
|
|
@@ -11,8 +11,16 @@
|
|
|
11
11
|
"ember-blueprint"
|
|
12
12
|
],
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@ember-tooling/blueprint-model": "
|
|
14
|
+
"@ember-tooling/blueprint-model": "workspace:*",
|
|
15
15
|
"chalk": "^5.6.2",
|
|
16
16
|
"ember-cli-string-utils": "^1.1.0"
|
|
17
|
+
},
|
|
18
|
+
"release-plan": {
|
|
19
|
+
"semverIncrementAs": {
|
|
20
|
+
"minor": "prerelease",
|
|
21
|
+
"patch": "prerelease"
|
|
22
|
+
},
|
|
23
|
+
"semverIncrementTag": "alpha",
|
|
24
|
+
"publishTag": "alpha"
|
|
17
25
|
}
|
|
18
26
|
}
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
}
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
const FileInfo = require('@ember-tooling/blueprint-model/utilities/file-info');
|
|
7
7
|
const { default: chalk } = require('chalk');
|
|
8
|
-
const MarkdownColor = require('
|
|
9
|
-
const sequence = require('
|
|
10
|
-
const printCommand = require('
|
|
11
|
-
const insertIntoFile = require('
|
|
12
|
-
const cleanRemove = require('
|
|
8
|
+
const MarkdownColor = require('@ember-tooling/blueprint-model/utilities/markdown-color');
|
|
9
|
+
const sequence = require('./utilities/sequence');
|
|
10
|
+
const printCommand = require('@ember-tooling/blueprint-model/utilities/print-command');
|
|
11
|
+
const insertIntoFile = require('@ember-tooling/blueprint-model/utilities/insert-into-file');
|
|
12
|
+
const cleanRemove = require('@ember-tooling/blueprint-model/utilities/clean-remove');
|
|
13
13
|
const fs = require('fs-extra');
|
|
14
14
|
const { pluralize } = require('inflection');
|
|
15
15
|
const { minimatch } = require('minimatch');
|
|
@@ -20,7 +20,6 @@ const zipObject = require('lodash/zipObject');
|
|
|
20
20
|
const intersection = require('lodash/intersection');
|
|
21
21
|
const cloneDeep = require('lodash/cloneDeep');
|
|
22
22
|
const compact = require('lodash/compact');
|
|
23
|
-
const uniq = require('lodash/uniq');
|
|
24
23
|
const sortBy = require('lodash/sortBy');
|
|
25
24
|
const walkSync = require('walk-sync');
|
|
26
25
|
const SilentError = require('silent-error');
|
|
@@ -28,7 +27,7 @@ const CoreObject = require('core-object');
|
|
|
28
27
|
const EOL = require('os').EOL;
|
|
29
28
|
const logger = require('heimdalljs-logger')('ember-cli:blueprint');
|
|
30
29
|
const normalizeEntityName = require('ember-cli-normalize-entity-name');
|
|
31
|
-
const isAddon = require('
|
|
30
|
+
const isAddon = require('@ember-tooling/blueprint-model/utilities/is-addon');
|
|
32
31
|
|
|
33
32
|
const initialIgnoredFiles = ['.DS_Store'];
|
|
34
33
|
|
|
@@ -1425,10 +1424,13 @@ const builtInBlueprints = new Map([
|
|
|
1425
1424
|
Blueprint.lookup = function (name, options) {
|
|
1426
1425
|
options = options || {};
|
|
1427
1426
|
|
|
1428
|
-
let lookupPaths =
|
|
1427
|
+
let lookupPaths = new Set(options.paths);
|
|
1429
1428
|
|
|
1430
|
-
let
|
|
1431
|
-
|
|
1429
|
+
for (let path of options?.project?.blueprintLookupPaths() ?? []) {
|
|
1430
|
+
lookupPaths.add(path);
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
for (let lookupPath of lookupPaths) {
|
|
1432
1434
|
let blueprintPath = path.resolve(lookupPath, name);
|
|
1433
1435
|
|
|
1434
1436
|
if (Blueprint._existsSync(blueprintPath)) {
|
|
@@ -1502,10 +1504,15 @@ Blueprint.load = function (blueprintPath, blueprintOptions) {
|
|
|
1502
1504
|
Blueprint.list = function (options) {
|
|
1503
1505
|
options = options || {};
|
|
1504
1506
|
|
|
1505
|
-
let lookupPaths =
|
|
1507
|
+
let lookupPaths = new Set(options.paths);
|
|
1508
|
+
|
|
1509
|
+
for (let path of options?.project?.blueprintLookupPaths() ?? []) {
|
|
1510
|
+
lookupPaths.add(path);
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1506
1513
|
let seen = [];
|
|
1507
1514
|
|
|
1508
|
-
return lookupPaths.map((lookupPath) => {
|
|
1515
|
+
return Array.from(lookupPaths).map((lookupPath) => {
|
|
1509
1516
|
let source;
|
|
1510
1517
|
let packagePath = path.join(lookupPath, '../package.json');
|
|
1511
1518
|
if (Blueprint._existsSync(packagePath)) {
|
|
@@ -1582,14 +1589,6 @@ Blueprint.ignoredFiles = initialIgnoredFiles;
|
|
|
1582
1589
|
*/
|
|
1583
1590
|
Blueprint.ignoredUpdateFiles = ['.gitkeep', 'app.css', 'LICENSE.md'];
|
|
1584
1591
|
|
|
1585
|
-
/**
|
|
1586
|
-
@static
|
|
1587
|
-
@property defaultLookupPaths
|
|
1588
|
-
*/
|
|
1589
|
-
Blueprint.defaultLookupPaths = function () {
|
|
1590
|
-
return [path.resolve(__dirname, '..', '..', 'blueprints')];
|
|
1591
|
-
};
|
|
1592
|
-
|
|
1593
1592
|
/**
|
|
1594
1593
|
@private
|
|
1595
1594
|
@method prepareConfirm
|
|
@@ -1649,21 +1648,6 @@ function isIgnored(info) {
|
|
|
1649
1648
|
return Blueprint.ignoredFiles.some((ignoredFile) => minimatch(fn, ignoredFile, { matchBase: true }));
|
|
1650
1649
|
}
|
|
1651
1650
|
|
|
1652
|
-
/**
|
|
1653
|
-
Combines provided lookup paths with defaults and removes
|
|
1654
|
-
duplicates.
|
|
1655
|
-
|
|
1656
|
-
@private
|
|
1657
|
-
@method generateLookupPaths
|
|
1658
|
-
@param {Array} lookupPaths
|
|
1659
|
-
@return {Array}
|
|
1660
|
-
*/
|
|
1661
|
-
function generateLookupPaths(lookupPaths) {
|
|
1662
|
-
lookupPaths = lookupPaths || [];
|
|
1663
|
-
lookupPaths = lookupPaths.concat(Blueprint.defaultLookupPaths());
|
|
1664
|
-
return uniq(lookupPaths);
|
|
1665
|
-
}
|
|
1666
|
-
|
|
1667
1651
|
/**
|
|
1668
1652
|
Looks for a __path__ token in the files folder. Must be present for
|
|
1669
1653
|
the blueprint to support pod tokens.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/runner/work/ember-cli/ember-cli/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/bin/node_modules:/home/runner/work/ember-cli/ember-cli/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/node_modules:/home/runner/work/ember-cli/ember-cli/node_modules/.pnpm/markdown-it@14.1.1/node_modules:/home/runner/work/ember-cli/ember-cli/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/runner/work/ember-cli/ember-cli/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/bin/node_modules:/home/runner/work/ember-cli/ember-cli/node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/node_modules:/home/runner/work/ember-cli/ember-cli/node_modules/.pnpm/markdown-it@14.1.1/node_modules:/home/runner/work/ember-cli/ember-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../markdown-it/bin/markdown-it.mjs" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../markdown-it/bin/markdown-it.mjs" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ember-tooling/blueprint-model",
|
|
3
|
+
"version": "0.7.1",
|
|
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
|
+
"babel-remove-types": "^2.0.0",
|
|
12
|
+
"chalk": "^5.6.2",
|
|
13
|
+
"content-tag": "^4.0.0",
|
|
14
|
+
"core-object": "^3.1.5",
|
|
15
|
+
"diff": "^8.0.4",
|
|
16
|
+
"ember-cli-normalize-entity-name": "^1.0.0",
|
|
17
|
+
"ember-cli-string-utils": "^1.1.0",
|
|
18
|
+
"fs-extra": "^11.3.4",
|
|
19
|
+
"heimdalljs-logger": "^0.1.10",
|
|
20
|
+
"inflection": "^3.0.2",
|
|
21
|
+
"isbinaryfile": "^5.0.7",
|
|
22
|
+
"lodash": "^4.17.23",
|
|
23
|
+
"markdown-it": "^14.1.0",
|
|
24
|
+
"markdown-it-terminal": "^0.4.0",
|
|
25
|
+
"minimatch": "^10.1.1",
|
|
26
|
+
"promise.hash.helper": "^1.0.8",
|
|
27
|
+
"quick-temp": "^0.1.9",
|
|
28
|
+
"silent-error": "^1.1.1",
|
|
29
|
+
"walk-sync": "^4.0.0"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
};
|