adapt-cli 3.0.0 → 3.0.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/README.md
CHANGED
@@ -262,5 +262,5 @@ See [Developing plug-ins](https://github.com/adaptlearning/adapt_framework/wiki/
|
|
262
262
|
<div float align=right><a href="#top">Back to Top</a></div>
|
263
263
|
|
264
264
|
----------------------------
|
265
|
-
<a href="https://community.adaptlearning.org/" target="_blank"><img src="https://github.com/adaptlearning/documentation/blob/master/04_wiki_assets/plug-ins/images/adapt-logo-mrgn-lft.jpg" alt="adapt learning logo" align="right"></a>
|
265
|
+
**Version number:** 3.0.2 <a href="https://community.adaptlearning.org/" target="_blank"><img src="https://github.com/adaptlearning/documentation/blob/master/04_wiki_assets/plug-ins/images/adapt-logo-mrgn-lft.jpg" alt="adapt learning logo" align="right"></a>
|
266
266
|
**Author / maintainer:** Adapt Core Team with [contributors](https://github.com/adaptlearning/adapt-contrib-hotgraphic/graphs/contributors)
|
@@ -28,9 +28,12 @@ export default async function adaptBuild ({
|
|
28
28
|
].filter(Boolean).join(' ');
|
29
29
|
exec(cmd, { cwd }, (error, stdout, stderr) => {
|
30
30
|
if(error || stderr) {
|
31
|
+
const matches = stdout.match(/>> Error:\s(.+)\s/);
|
31
32
|
const e = new Error('grunt tasks failed')
|
32
33
|
e.cmd = cmd;
|
33
|
-
e.raw =
|
34
|
+
e.raw = matches?.[1] ?? stdout;
|
35
|
+
e.source = error;
|
36
|
+
e.stderr = stderr;
|
34
37
|
return reject(e)
|
35
38
|
}
|
36
39
|
resolve()
|
@@ -79,6 +79,7 @@ export default class Plugin {
|
|
79
79
|
* @returns {boolean|null}
|
80
80
|
*/
|
81
81
|
get isUpToDate () {
|
82
|
+
if (!this.hasFrameworkCompatibleVersion) return true;
|
82
83
|
const canCheckSourceAgainstProject = (this.latestSourceVersion && this.projectVersion)
|
83
84
|
if (!canCheckSourceAgainstProject) return null
|
84
85
|
const isLatestVersion = (this.projectVersion === this.latestSourceVersion)
|
@@ -129,7 +129,9 @@ async function conflictResolution ({ logger, targets, isInteractive, dev }) {
|
|
129
129
|
canApplyRequested && { name: `requested version [${target.matchedVersion}]`, value: 'r' },
|
130
130
|
target.hasFrameworkCompatibleVersion
|
131
131
|
? { name: `latest compatible version [${target.latestCompatibleSourceVersion}]`, value: 'l' }
|
132
|
-
:
|
132
|
+
: target.latestSourceVersion
|
133
|
+
? { name: `latest version [${target.latestSourceVersion}]`, value: 'l' }
|
134
|
+
: { name: `master [master]`, value: 'm' },
|
133
135
|
{ name: 'skip', value: 's' }
|
134
136
|
].filter(Boolean)
|
135
137
|
const result = await createPromptTask({ message: chalk.reset(target.packageName), choices, type: 'list', default: 's' })
|
@@ -132,7 +132,7 @@ export default class Target extends Plugin {
|
|
132
132
|
}
|
133
133
|
|
134
134
|
markMasterForInstallation () {
|
135
|
-
this.versionToApply = '
|
135
|
+
this.versionToApply = 'master'
|
136
136
|
}
|
137
137
|
|
138
138
|
markRequestedForInstallation () {
|
@@ -226,6 +226,9 @@ export default class Target extends Plugin {
|
|
226
226
|
reject(err)
|
227
227
|
})
|
228
228
|
})
|
229
|
+
const bowerJSON = await fs.readJSON(path.join(pluginPath, 'bower.json'))
|
230
|
+
bowerJSON.version = bowerJSON.version ?? this.versionToApply;
|
231
|
+
await fs.writeJSON(path.join(pluginPath, '.bower.json'), bowerJSON, { spaces: 2, replacer: null })
|
229
232
|
this._projectInfo = null
|
230
233
|
await this.fetchProjectInfo()
|
231
234
|
}
|