@sprucelabs/spruce-cli 14.24.9 → 14.26.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 +39 -0
- package/build/__tests__/behavioral/InstallingASkillAtAnOrg.test.js +1 -1
- package/build/__tests__/behavioral/InstallingASkillAtAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAListener.test.js +1 -1
- package/build/__tests__/behavioral/events/CreatingAListener.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/UpgradingASkill.test.js +1 -1
- package/build/__tests__/behavioral/skill/UpgradingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/UpgradingASkill4.test.d.ts +3 -0
- package/build/__tests__/behavioral/skill/UpgradingASkill4.test.js +129 -8
- package/build/__tests__/behavioral/skill/UpgradingASkill4.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingASkillView.test.d.ts +1 -0
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js +33 -3
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js.map +1 -1
- package/build/features/node/NodeFeature.js +1 -1
- package/build/features/node/NodeFeature.js.map +1 -1
- package/build/features/node/actions/UpdateDependenciesAction.js +21 -10
- package/build/features/node/actions/UpdateDependenciesAction.js.map +1 -1
- package/build/features/skill/actions/BootAction.js +9 -5
- package/build/features/skill/actions/BootAction.js.map +1 -1
- package/package.json +27 -27
- package/src/__tests__/behavioral/InstallingASkillAtAnOrg.test.ts +2 -5
- package/src/__tests__/behavioral/events/CreatingAListener.test.ts +2 -2
- package/src/__tests__/behavioral/skill/UpgradingASkill.test.ts +1 -1
- package/src/__tests__/behavioral/skill/UpgradingASkill4.test.ts +45 -0
- package/src/__tests__/behavioral/views/CreatingASkillView.test.ts +12 -0
- package/src/features/node/NodeFeature.ts +3 -3
- package/src/features/node/actions/UpdateDependenciesAction.ts +12 -6
- package/src/features/skill/actions/BootAction.ts +5 -2
|
@@ -19,7 +19,7 @@ type Options = SchemaValues<OptionsSchema>
|
|
|
19
19
|
export default class UpdateDependenciesAction extends AbstractAction<OptionsSchema> {
|
|
20
20
|
public code = 'updateDependencies'
|
|
21
21
|
public optionsSchema = optionsSchema
|
|
22
|
-
public commandAliases = ['update.dependencies']
|
|
22
|
+
public commandAliases = ['update.dependencies', 'upgrade.dependencies']
|
|
23
23
|
public invocationMessage = 'Updating dependencies... 💪'
|
|
24
24
|
|
|
25
25
|
public async execute(_options: Options): Promise<FeatureActionResponse> {
|
|
@@ -71,15 +71,21 @@ export default class UpdateDependenciesAction extends AbstractAction<OptionsSche
|
|
|
71
71
|
|
|
72
72
|
for (const feature of features) {
|
|
73
73
|
for (const dep of feature.packageDependencies as NpmPackage[]) {
|
|
74
|
-
|
|
74
|
+
const stripped = pkg.stripLatest(dep.name)
|
|
75
|
+
const name = pkg.buildPackageName(dep)
|
|
76
|
+
const isDev =
|
|
77
|
+
(dep.isDev || devDependencies.find((d) => d.stripped === stripped)) &&
|
|
78
|
+
!dependencies.find((d) => d.stripped === stripped)
|
|
79
|
+
|
|
80
|
+
if (isDev) {
|
|
75
81
|
devDependencies.unshift({
|
|
76
|
-
stripped
|
|
77
|
-
name
|
|
82
|
+
stripped,
|
|
83
|
+
name,
|
|
78
84
|
})
|
|
79
85
|
} else {
|
|
80
86
|
dependencies.unshift({
|
|
81
|
-
stripped
|
|
82
|
-
name
|
|
87
|
+
stripped,
|
|
88
|
+
name,
|
|
83
89
|
})
|
|
84
90
|
}
|
|
85
91
|
}
|
|
@@ -40,6 +40,8 @@ export default class BootAction extends AbstractAction<OptionsSchema> {
|
|
|
40
40
|
runningPromise = this.boot(command, script, resolve, reject)
|
|
41
41
|
})
|
|
42
42
|
|
|
43
|
+
const hints = ['Skill booted succesfully!', 'Skill torn down cleanly!']
|
|
44
|
+
|
|
43
45
|
const meta = {
|
|
44
46
|
isBooted: false,
|
|
45
47
|
kill: command.kill.bind(command),
|
|
@@ -52,7 +54,7 @@ export default class BootAction extends AbstractAction<OptionsSchema> {
|
|
|
52
54
|
bootPromise = bootPromise
|
|
53
55
|
.then(() => {
|
|
54
56
|
meta.isBooted = true
|
|
55
|
-
return { meta }
|
|
57
|
+
return { meta, hints }
|
|
56
58
|
})
|
|
57
59
|
.catch((err) => {
|
|
58
60
|
reject(err)
|
|
@@ -60,12 +62,13 @@ export default class BootAction extends AbstractAction<OptionsSchema> {
|
|
|
60
62
|
})
|
|
61
63
|
|
|
62
64
|
if (!options.shouldReturnImmediately) {
|
|
63
|
-
void bootPromise.then(() => resolve({ meta }))
|
|
65
|
+
void bootPromise.then(() => resolve({ meta, hints }))
|
|
64
66
|
} else {
|
|
65
67
|
meta.bootPromise = bootPromise
|
|
66
68
|
|
|
67
69
|
resolve({
|
|
68
70
|
meta,
|
|
71
|
+
hints,
|
|
69
72
|
})
|
|
70
73
|
}
|
|
71
74
|
})
|