@sprucelabs/spruce-cli 27.0.4 → 27.1.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/build/.spruce/schemas/schemas.types.d.ts +10 -0
  3. package/build/.spruce/schemas/spruceCli/v2020_07_22/upgradeSkillOptions.schema.js +8 -0
  4. package/build/.spruce/schemas/spruceCli/v2020_07_22/upgradeSkillOptions.schema.js.map +1 -1
  5. package/build/GlobalEmitter.d.ts +6 -0
  6. package/build/GlobalEmitter.js +6 -0
  7. package/build/GlobalEmitter.js.map +1 -1
  8. package/build/InFlightEntertainment.d.ts +2 -2
  9. package/build/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceMigrator.test.js +4 -0
  10. package/build/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceMigrator.test.js.map +1 -1
  11. package/build/__tests__/behavioral/upgrading/UpgradingASkillSkippingBuild.test.d.ts +5 -0
  12. package/build/__tests__/behavioral/upgrading/UpgradingASkillSkippingBuild.test.js +29 -0
  13. package/build/__tests__/behavioral/upgrading/UpgradingASkillSkippingBuild.test.js.map +1 -0
  14. package/build/features/ActionExecuter.js +1 -0
  15. package/build/features/ActionExecuter.js.map +1 -1
  16. package/build/features/node/NodeFeature.js +5 -3
  17. package/build/features/node/NodeFeature.js.map +1 -1
  18. package/build/schemas/v2020_07_22/upgradeSkillOptions.builder.d.ts +6 -0
  19. package/build/schemas/v2020_07_22/upgradeSkillOptions.builder.js +6 -0
  20. package/build/schemas/v2020_07_22/upgradeSkillOptions.builder.js.map +1 -1
  21. package/build/services/BuildService.d.ts +2 -2
  22. package/build/services/BuildService.js +2 -2
  23. package/build/services/BuildService.js.map +1 -1
  24. package/build/services/CommandService.d.ts +5 -1
  25. package/build/services/CommandService.js +6 -0
  26. package/build/services/CommandService.js.map +1 -1
  27. package/build/services/GameService.d.ts +2 -2
  28. package/build/services/GameService.js +1 -1
  29. package/build/services/GameService.js.map +1 -1
  30. package/build/tests/CommandFaker.js +1 -1
  31. package/build/tests/CommandFaker.js.map +1 -1
  32. package/package.json +9 -9
  33. package/src/.spruce/schemas/schemas.types.ts +147 -137
  34. package/src/.spruce/schemas/spruceCli/v2020_07_22/upgradeSkillOptions.schema.ts +8 -0
  35. package/src/GlobalEmitter.ts +6 -0
  36. package/src/InFlightEntertainment.ts +2 -2
  37. package/src/__tests__/behavioral/tests/migrationToInstance/StaticToInstanceMigrator.test.ts +5 -0
  38. package/src/__tests__/behavioral/upgrading/UpgradingASkillSkippingBuild.test.ts +17 -0
  39. package/src/features/ActionExecuter.ts +1 -0
  40. package/src/features/node/NodeFeature.ts +5 -3
  41. package/src/schemas/v2020_07_22/upgradeSkillOptions.builder.ts +6 -0
  42. package/src/services/BuildService.ts +5 -5
  43. package/src/services/CommandService.ts +11 -1
  44. package/src/services/GameService.ts +4 -4
  45. package/src/tests/CommandFaker.ts +1 -1
@@ -27,7 +27,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
27
27
 
28
28
  'path': string
29
29
 
30
- 'description'?: string| undefined | null
30
+ 'description'?: string | undefined | null
31
31
 
32
32
  'action': ("skipped" | "generated" | "updated" | "deleted")
33
33
  }
@@ -104,8 +104,10 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
104
104
  /** Upgrade. Everything. Heads up, this can take a few minutes. ⏱ */
105
105
  interface UpgradeSkillOptions {
106
106
 
107
+ /** Build after upgrade. Should I build your source after the upgrade? */
108
+ 'shouldBuild'?: boolean | undefined | null
107
109
  /** Upgrade mode. */
108
- 'upgradeMode'?: ("askForChanged" | "forceEverything" | "forceRequiredSkipRest")| undefined | null
110
+ 'upgradeMode'?: ("askForChanged" | "forceEverything" | "forceRequiredSkipRest") | undefined | null
109
111
  }
110
112
 
111
113
  interface UpgradeSkillOptionsSchema extends SpruceSchema.Schema {
@@ -115,6 +117,14 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
115
117
  name: 'Upgrade skill action',
116
118
  description: 'Upgrade. Everything. Heads up, this can take a few minutes. ⏱',
117
119
  fields: {
120
+ /** Build after upgrade. Should I build your source after the upgrade? */
121
+ 'shouldBuild': {
122
+ label: 'Build after upgrade',
123
+ type: 'boolean',
124
+ hint: 'Should I build your source after the upgrade?',
125
+ defaultValue: true,
126
+ options: undefined
127
+ },
118
128
  /** Upgrade mode. */
119
129
  'upgradeMode': {
120
130
  label: 'Upgrade mode',
@@ -136,17 +146,17 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
136
146
  interface TestOptions {
137
147
 
138
148
  /** Report while running. Should I output the test results while they are running? */
139
- 'shouldReportWhileRunning'?: boolean| undefined | null
149
+ 'shouldReportWhileRunning'?: boolean | undefined | null
140
150
  /** Pattern. I'll filter all tests that match this pattern */
141
- 'pattern'?: string| undefined | null
151
+ 'pattern'?: string | undefined | null
142
152
  /** Inspect. Pass --inspect related args to test process. */
143
- 'inspect'?: number| undefined | null
153
+ 'inspect'?: number | undefined | null
144
154
  /** Should wait for manual start?. */
145
- 'shouldHoldAtStart'?: boolean| undefined | null
155
+ 'shouldHoldAtStart'?: boolean | undefined | null
146
156
  /** Wait until tests are finished. For testing. Returns immediately after executing test so the running process can be managed programatically. */
147
- 'shouldReturnImmediately'?: boolean| undefined | null
157
+ 'shouldReturnImmediately'?: boolean | undefined | null
148
158
  /** Watch. */
149
- 'watchMode'?: ("off" | "standard" | "smart")| undefined | null
159
+ 'watchMode'?: ("off" | "standard" | "smart") | undefined | null
150
160
  }
151
161
 
152
162
  interface TestOptionsSchema extends SpruceSchema.Schema {
@@ -214,41 +224,41 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
214
224
  interface SyncSchemasOptions {
215
225
 
216
226
  /** Field types directory. Where field types and interfaces will be generated. */
217
- 'fieldTypesDestinationDir'?: string| undefined | null
227
+ 'fieldTypesDestinationDir'?: string | undefined | null
218
228
  /** Addons lookup directory. Where I'll look for new schema fields to be registered. */
219
- 'addonsLookupDir'?: string| undefined | null
229
+ 'addonsLookupDir'?: string | undefined | null
220
230
  /** Generate field types. Should I generate field types too? */
221
- 'generateFieldTypes'?: boolean| undefined | null
231
+ 'generateFieldTypes'?: boolean | undefined | null
222
232
  /** Schema types destination directory. Where I will generate schema types and interfaces. */
223
- 'schemaTypesDestinationDirOrFile'?: string| undefined | null
233
+ 'schemaTypesDestinationDirOrFile'?: string | undefined | null
224
234
  /** . Where I should look for your schema builders? */
225
- 'schemaLookupDir'?: string| undefined | null
235
+ 'schemaLookupDir'?: string | undefined | null
226
236
  /** Module import. When other skills use your schemas, will they import them from a module? */
227
- 'moduleToImportFromWhenRemote'?: string| undefined | null
237
+ 'moduleToImportFromWhenRemote'?: string | undefined | null
228
238
  /** Auto install missing dependencies. */
229
- 'shouldInstallMissingDependencies'?: boolean| undefined | null
239
+ 'shouldInstallMissingDependencies'?: boolean | undefined | null
230
240
  /** Enable versioning. Should we use versioning? */
231
- 'shouldEnableVersioning'?: boolean| undefined | null
241
+ 'shouldEnableVersioning'?: boolean | undefined | null
232
242
  /** Global namespace. The name you'll use when accessing these schemas, e.g. SpruceSchemas */
233
- 'globalSchemaNamespace'?: string| undefined | null
243
+ 'globalSchemaNamespace'?: string | undefined | null
234
244
  /** Fetch remote schemas. I will pull in schemas from other features. */
235
- 'shouldFetchRemoteSchemas'?: boolean| undefined | null
245
+ 'shouldFetchRemoteSchemas'?: boolean | undefined | null
236
246
  /** Fetch local schemas. I will look in schemaLookupDir to load local schemas. */
237
- 'shouldFetchLocalSchemas'?: boolean| undefined | null
247
+ 'shouldFetchLocalSchemas'?: boolean | undefined | null
238
248
  /** Fetch core schemas. Should I pull in core schemas too? */
239
- 'shouldFetchCoreSchemas'?: boolean| undefined | null
249
+ 'shouldFetchCoreSchemas'?: boolean | undefined | null
240
250
  /** Generate core schemas. Used only for updating the @sprucelabs/spruce-core-schemas. Ensures core schemas are generated like local schemas. Also an alias for `--shouldFetchRemoteSchemas=false --shouldFetchCoreSchemas=false --generateStandaloneTypesFile. */
241
- 'shouldGenerateCoreSchemaTypes'?: boolean| undefined | null
251
+ 'shouldGenerateCoreSchemaTypes'?: boolean | undefined | null
242
252
  /** Register built schemas. Should the schemas use the SchemaRegistry for tracking? */
243
- 'registerBuiltSchemas'?: boolean| undefined | null
253
+ 'registerBuiltSchemas'?: boolean | undefined | null
244
254
  /** Delete directory if no schemas. Should I delete the schema directory if no schemas are found? */
245
- 'deleteDestinationDirIfNoSchemas'?: boolean| undefined | null
255
+ 'deleteDestinationDirIfNoSchemas'?: boolean | undefined | null
246
256
  /** Delete orphaned schemas. Should I delete schemas where the builders are missing? */
247
- 'deleteOrphanedSchemas'?: boolean| undefined | null
257
+ 'deleteOrphanedSchemas'?: boolean | undefined | null
248
258
  /** Generate standalone types file. By default, I'll generate a types file that augments core types from @sprucelabs/spruce-core-schemas. Setting this to true will generate a stand alone types file. */
249
- 'generateStandaloneTypesFile'?: boolean| undefined | null
259
+ 'generateStandaloneTypesFile'?: boolean | undefined | null
250
260
  /** message. */
251
- 'syncingMessage'?: string| undefined | null
261
+ 'syncingMessage'?: string | undefined | null
252
262
  }
253
263
 
254
264
  interface SyncSchemasOptionsSchema extends SpruceSchema.Schema {
@@ -423,11 +433,11 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
423
433
  interface SyncSchemaFieldsOptions {
424
434
 
425
435
  /** Field types directory. Where field types and interfaces will be generated. */
426
- 'fieldTypesDestinationDir'?: string| undefined | null
436
+ 'fieldTypesDestinationDir'?: string | undefined | null
427
437
  /** Addons lookup directory. Where I'll look for new schema fields to be registered. */
428
- 'addonsLookupDir'?: string| undefined | null
438
+ 'addonsLookupDir'?: string | undefined | null
429
439
  /** Generate field types. Should I generate field types too? */
430
- 'generateFieldTypes'?: boolean| undefined | null
440
+ 'generateFieldTypes'?: boolean | undefined | null
431
441
  }
432
442
 
433
443
  interface SyncSchemaFieldsOptionsSchema extends SpruceSchema.Schema {
@@ -477,15 +487,15 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
477
487
  interface SyncEventOptions {
478
488
 
479
489
  /** Contract destination. Where I will generate event contracts. */
480
- 'contractDestinationDir'?: string| undefined | null
490
+ 'contractDestinationDir'?: string | undefined | null
481
491
  /** Schema types lookup directory. Where I will lookup schema types and interfaces. */
482
- 'schemaTypesLookupDir'?: string| undefined | null
492
+ 'schemaTypesLookupDir'?: string | undefined | null
483
493
  /** Sync only core events. For use in @sprucelabs/mercury-types */
484
- 'shouldSyncOnlyCoreEvents'?: boolean| undefined | null
494
+ 'shouldSyncOnlyCoreEvents'?: boolean | undefined | null
485
495
  /** Event signature types file. */
486
- 'skillEventContractTypesFile'?: string| undefined | null
496
+ 'skillEventContractTypesFile'?: string | undefined | null
487
497
  /** Event builder file. */
488
- 'eventBuilderFile'?: string| undefined | null
498
+ 'eventBuilderFile'?: string | undefined | null
489
499
  }
490
500
 
491
501
  interface SyncEventOptionsSchema extends SpruceSchema.Schema {
@@ -546,43 +556,43 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
546
556
  interface SyncErrorOptions {
547
557
 
548
558
  /** Field types directory. Where field types and interfaces will be generated. */
549
- 'fieldTypesDestinationDir'?: string| undefined | null
559
+ 'fieldTypesDestinationDir'?: string | undefined | null
550
560
  /** Addons lookup directory. Where I'll look for new schema fields to be registered. */
551
- 'addonsLookupDir'?: string| undefined | null
561
+ 'addonsLookupDir'?: string | undefined | null
552
562
  /** Generate field types. Should I generate field types too? */
553
- 'generateFieldTypes'?: boolean| undefined | null
563
+ 'generateFieldTypes'?: boolean | undefined | null
554
564
  /** Schema types destination directory. Where I will generate schema types and interfaces. */
555
- 'schemaTypesDestinationDirOrFile'?: string| undefined | null
565
+ 'schemaTypesDestinationDirOrFile'?: string | undefined | null
556
566
  /** . Where I should look for your schema builders? */
557
- 'schemaLookupDir'?: string| undefined | null
567
+ 'schemaLookupDir'?: string | undefined | null
558
568
  /** Module import. When other skills use your schemas, will they import them from a module? */
559
- 'moduleToImportFromWhenRemote'?: string| undefined | null
569
+ 'moduleToImportFromWhenRemote'?: string | undefined | null
560
570
  /** Auto install missing dependencies. */
561
- 'shouldInstallMissingDependencies'?: boolean| undefined | null
571
+ 'shouldInstallMissingDependencies'?: boolean | undefined | null
562
572
  /** Enable versioning. Should we use versioning? */
563
- 'shouldEnableVersioning'?: boolean| undefined | null
573
+ 'shouldEnableVersioning'?: boolean | undefined | null
564
574
  /** Global namespace. The name you'll use when accessing these schemas, e.g. SpruceSchemas */
565
- 'globalSchemaNamespace'?: string| undefined | null
575
+ 'globalSchemaNamespace'?: string | undefined | null
566
576
  /** Fetch remote schemas. I will pull in schemas from other features. */
567
- 'shouldFetchRemoteSchemas'?: boolean| undefined | null
577
+ 'shouldFetchRemoteSchemas'?: boolean | undefined | null
568
578
  /** Fetch local schemas. I will look in schemaLookupDir to load local schemas. */
569
- 'shouldFetchLocalSchemas'?: boolean| undefined | null
579
+ 'shouldFetchLocalSchemas'?: boolean | undefined | null
570
580
  /** Fetch core schemas. Should I pull in core schemas too? */
571
- 'shouldFetchCoreSchemas'?: boolean| undefined | null
581
+ 'shouldFetchCoreSchemas'?: boolean | undefined | null
572
582
  /** Generate core schemas. Used only for updating the @sprucelabs/spruce-core-schemas. Ensures core schemas are generated like local schemas. Also an alias for `--shouldFetchRemoteSchemas=false --shouldFetchCoreSchemas=false --generateStandaloneTypesFile. */
573
- 'shouldGenerateCoreSchemaTypes'?: boolean| undefined | null
583
+ 'shouldGenerateCoreSchemaTypes'?: boolean | undefined | null
574
584
  /** Register built schemas. Should the schemas use the SchemaRegistry for tracking? */
575
- 'registerBuiltSchemas'?: boolean| undefined | null
585
+ 'registerBuiltSchemas'?: boolean | undefined | null
576
586
  /** Generate standalone types file. By default, I'll generate a types file that augments core types from @sprucelabs/spruce-core-schemas. Setting this to true will generate a stand alone types file. */
577
- 'generateStandaloneTypesFile'?: boolean| undefined | null
587
+ 'generateStandaloneTypesFile'?: boolean | undefined | null
578
588
  /** message. */
579
- 'syncingMessage'?: string| undefined | null
589
+ 'syncingMessage'?: string | undefined | null
580
590
  /** Error class destination. Where I'll save your new Error class file? */
581
591
  'errorClassDestinationDir': string
582
592
  /** . Where I should look for your error builders? */
583
- 'errorLookupDir'?: string| undefined | null
593
+ 'errorLookupDir'?: string | undefined | null
584
594
  /** Types destination dir. This is where error options and type information will be written */
585
- 'errorTypesDestinationDir'?: string| undefined | null
595
+ 'errorTypesDestinationDir'?: string | undefined | null
586
596
  }
587
597
 
588
598
  interface SyncErrorOptionsSchema extends SpruceSchema.Schema {
@@ -764,7 +774,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
764
774
  interface SkillFeature {
765
775
 
766
776
 
767
- 'destination'?: string| undefined | null
777
+ 'destination'?: string | undefined | null
768
778
  /** What's the name of your skill?. This marketing focused, like "8-bit Stories" or "Adventures". */
769
779
  'name': string
770
780
  /** How would you describe your skill?. */
@@ -812,7 +822,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
812
822
  interface SetupVscodeOptions {
813
823
 
814
824
  /** Install everything. */
815
- 'all'?: boolean| undefined | null
825
+ 'all'?: boolean | undefined | null
816
826
  }
817
827
 
818
828
  interface SetupVscodeOptionsSchema extends SpruceSchema.Schema {
@@ -882,7 +892,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
882
892
  interface RegisterDashboardWidgetsEmitPayloadSchema {
883
893
 
884
894
 
885
- 'widgets'?: (BaseWidget)| undefined | null
895
+ 'widgets'?: (BaseWidget) | undefined | null
886
896
  }
887
897
 
888
898
  interface RegisterDashboardWidgetsEmitPayloadSchemaSchema extends SpruceSchema.Schema {
@@ -916,7 +926,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
916
926
 
917
927
  'token': string
918
928
  /** Logged in. */
919
- 'isLoggedIn'?: boolean| undefined | null
929
+ 'isLoggedIn'?: boolean | undefined | null
920
930
  }
921
931
 
922
932
  interface PersonWithTokenSchema extends SpruceSchema.Schema {
@@ -969,7 +979,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
969
979
  /** mode. */
970
980
  'mode': ("short" | "immersive" | "off")
971
981
  /** Stage. */
972
- 'stage'?: ("create.skill" | "test")| undefined | null
982
+ 'stage'?: ("create.skill" | "test") | undefined | null
973
983
  }
974
984
 
975
985
  interface OnboardingSchema extends SpruceSchema.Schema {
@@ -1028,7 +1038,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
1028
1038
  interface NodeFeatureOptions {
1029
1039
 
1030
1040
 
1031
- 'destination'?: string| undefined | null
1041
+ 'destination'?: string | undefined | null
1032
1042
  /** What's the name of your module?. */
1033
1043
  'name': string
1034
1044
  /** How would you describe your module?. */
@@ -1082,21 +1092,21 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
1082
1092
  /** Camel case name. camelCase version of the name */
1083
1093
  'nameCamel': string
1084
1094
  /** Plural camel case name. camelCase version of the name */
1085
- 'nameCamelPlural'?: string| undefined | null
1095
+ 'nameCamelPlural'?: string | undefined | null
1086
1096
  /** Pascal case name. PascalCase of the name */
1087
- 'namePascal'?: string| undefined | null
1097
+ 'namePascal'?: string | undefined | null
1088
1098
  /** Plural Pascal case name. PascalCase of the name */
1089
- 'namePascalPlural'?: string| undefined | null
1099
+ 'namePascalPlural'?: string | undefined | null
1090
1100
  /** Constant case name. CONST_CASE of the name */
1091
- 'nameConst'?: string| undefined | null
1101
+ 'nameConst'?: string | undefined | null
1092
1102
  /** Kebab case name. kebab-case of the name */
1093
- 'nameKebab'?: string| undefined | null
1103
+ 'nameKebab'?: string | undefined | null
1094
1104
  /** Snake case name. snake_case of the name */
1095
- 'nameSnake'?: string| undefined | null
1105
+ 'nameSnake'?: string | undefined | null
1096
1106
  /** Snake case name (plural). snakes_case of the name */
1097
- 'nameSnakePlural'?: string| undefined | null
1107
+ 'nameSnakePlural'?: string | undefined | null
1098
1108
  /** Description. Describe a bit more here */
1099
- 'description'?: string| undefined | null
1109
+ 'description'?: string | undefined | null
1100
1110
  }
1101
1111
 
1102
1112
  interface NamedTemplateItemSchema extends SpruceSchema.Schema {
@@ -1200,23 +1210,23 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
1200
1210
  interface ListenEventOptions {
1201
1211
 
1202
1212
  /** Contract destination. Where I will generate event contracts. */
1203
- 'contractDestinationDir'?: string| undefined | null
1213
+ 'contractDestinationDir'?: string | undefined | null
1204
1214
  /** Schema types lookup directory. Where I will lookup schema types and interfaces. */
1205
- 'schemaTypesLookupDir'?: string| undefined | null
1215
+ 'schemaTypesLookupDir'?: string | undefined | null
1206
1216
  /** Sync only core events. For use in @sprucelabs/mercury-types */
1207
- 'shouldSyncOnlyCoreEvents'?: boolean| undefined | null
1217
+ 'shouldSyncOnlyCoreEvents'?: boolean | undefined | null
1208
1218
  /** Event signature types file. */
1209
- 'skillEventContractTypesFile'?: string| undefined | null
1219
+ 'skillEventContractTypesFile'?: string | undefined | null
1210
1220
  /** Event builder file. */
1211
- 'eventBuilderFile'?: string| undefined | null
1221
+ 'eventBuilderFile'?: string | undefined | null
1212
1222
  /** Namespace. */
1213
- 'namespace'?: string| undefined | null
1223
+ 'namespace'?: string | undefined | null
1214
1224
  /** Event name. */
1215
- 'eventName'?: string| undefined | null
1225
+ 'eventName'?: string | undefined | null
1216
1226
  /** Events destination directory. Where should I add your listeners? */
1217
- 'listenerDestinationDir'?: string| undefined | null
1227
+ 'listenerDestinationDir'?: string | undefined | null
1218
1228
  /** Version. Set a version yourself instead of letting me generate one for you */
1219
- 'version'?: string| undefined | null
1229
+ 'version'?: string | undefined | null
1220
1230
  }
1221
1231
 
1222
1232
  interface ListenEventOptionsSchema extends SpruceSchema.Schema {
@@ -1305,7 +1315,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
1305
1315
  interface InstallSkillAtOrganizationOptions {
1306
1316
 
1307
1317
  /** Organization id. */
1308
- 'organizationId'?: string| undefined | null
1318
+ 'organizationId'?: string | undefined | null
1309
1319
  }
1310
1320
 
1311
1321
  interface InstallSkillAtOrganizationOptionsSchema extends SpruceSchema.Schema {
@@ -1339,11 +1349,11 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
1339
1349
  /** What are you testing?. E.g. Todo Card or Systems List */
1340
1350
  'nameReadable': string
1341
1351
  /** Test destination directory. Where I'll save your new test. */
1342
- 'testDestinationDir'?: string| undefined | null
1352
+ 'testDestinationDir'?: string | undefined | null
1343
1353
  /** Camel case name. camelCase version of the name */
1344
1354
  'nameCamel': string
1345
1355
  /** Pascal case name. PascalCase of the name */
1346
- 'namePascal'?: string| undefined | null
1356
+ 'namePascal'?: string | undefined | null
1347
1357
  }
1348
1358
 
1349
1359
  interface CreateTestOptionsSchema extends SpruceSchema.Schema {
@@ -1405,57 +1415,57 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
1405
1415
  interface CreateSchemaOptions {
1406
1416
 
1407
1417
  /** Field types directory. Where field types and interfaces will be generated. */
1408
- 'fieldTypesDestinationDir'?: string| undefined | null
1418
+ 'fieldTypesDestinationDir'?: string | undefined | null
1409
1419
  /** Addons lookup directory. Where I'll look for new schema fields to be registered. */
1410
- 'addonsLookupDir'?: string| undefined | null
1420
+ 'addonsLookupDir'?: string | undefined | null
1411
1421
  /** Generate field types. Should I generate field types too? */
1412
- 'generateFieldTypes'?: boolean| undefined | null
1422
+ 'generateFieldTypes'?: boolean | undefined | null
1413
1423
  /** Schema types destination directory. Where I will generate schema types and interfaces. */
1414
- 'schemaTypesDestinationDirOrFile'?: string| undefined | null
1424
+ 'schemaTypesDestinationDirOrFile'?: string | undefined | null
1415
1425
  /** . Where I should look for your schema builders? */
1416
- 'schemaLookupDir'?: string| undefined | null
1426
+ 'schemaLookupDir'?: string | undefined | null
1417
1427
  /** Source module. If this schema should be imported from a node module vs generated locally. */
1418
- 'moduleToImportFromWhenRemote'?: string| undefined | null
1428
+ 'moduleToImportFromWhenRemote'?: string | undefined | null
1419
1429
  /** Auto install missing dependencies. */
1420
- 'shouldInstallMissingDependencies'?: boolean| undefined | null
1430
+ 'shouldInstallMissingDependencies'?: boolean | undefined | null
1421
1431
  /** Enable versioning. Should we use versioning? */
1422
- 'shouldEnableVersioning'?: boolean| undefined | null
1432
+ 'shouldEnableVersioning'?: boolean | undefined | null
1423
1433
  /** Global namespace. The name you'll use when accessing these schemas, e.g. SpruceSchemas */
1424
- 'globalSchemaNamespace'?: string| undefined | null
1434
+ 'globalSchemaNamespace'?: string | undefined | null
1425
1435
  /** Fetch remote schemas. I will pull in schemas from other features. */
1426
- 'shouldFetchRemoteSchemas'?: boolean| undefined | null
1436
+ 'shouldFetchRemoteSchemas'?: boolean | undefined | null
1427
1437
  /** Fetch local schemas. I will look in schemaLookupDir to load local schemas. */
1428
- 'shouldFetchLocalSchemas'?: boolean| undefined | null
1438
+ 'shouldFetchLocalSchemas'?: boolean | undefined | null
1429
1439
  /** Fetch core schemas. Should I pull in core schemas too? */
1430
- 'shouldFetchCoreSchemas'?: boolean| undefined | null
1440
+ 'shouldFetchCoreSchemas'?: boolean | undefined | null
1431
1441
  /** Generate core schemas. Used only for updating the @sprucelabs/spruce-core-schemas. Ensures core schemas are generated like local schemas. Also an alias for `--shouldFetchRemoteSchemas=false --shouldFetchCoreSchemas=false --generateStandaloneTypesFile. */
1432
- 'shouldGenerateCoreSchemaTypes'?: boolean| undefined | null
1442
+ 'shouldGenerateCoreSchemaTypes'?: boolean | undefined | null
1433
1443
  /** Register built schemas. Should the schemas use the SchemaRegistry for tracking? */
1434
- 'registerBuiltSchemas'?: boolean| undefined | null
1444
+ 'registerBuiltSchemas'?: boolean | undefined | null
1435
1445
  /** Delete directory if no schemas. Should I delete the schema directory if no schemas are found? */
1436
- 'deleteDestinationDirIfNoSchemas'?: boolean| undefined | null
1446
+ 'deleteDestinationDirIfNoSchemas'?: boolean | undefined | null
1437
1447
  /** Delete orphaned schemas. Should I delete schemas where the builders are missing? */
1438
- 'deleteOrphanedSchemas'?: boolean| undefined | null
1448
+ 'deleteOrphanedSchemas'?: boolean | undefined | null
1439
1449
  /** Generate standalone types file. By default, I'll generate a types file that augments core types from @sprucelabs/spruce-core-schemas. Setting this to true will generate a stand alone types file. */
1440
- 'generateStandaloneTypesFile'?: boolean| undefined | null
1450
+ 'generateStandaloneTypesFile'?: boolean | undefined | null
1441
1451
  /** message. */
1442
- 'syncingMessage'?: string| undefined | null
1452
+ 'syncingMessage'?: string | undefined | null
1443
1453
  /** Schema builder destination directory. Where I'll save the new schema builder. */
1444
- 'schemaBuilderDestinationDir'?: string| undefined | null
1454
+ 'schemaBuilderDestinationDir'?: string | undefined | null
1445
1455
  /** Builder function. The function that builds this schema */
1446
- 'builderFunction'?: string| undefined | null
1456
+ 'builderFunction'?: string | undefined | null
1447
1457
  /** Sync after creation. This will ensure types and schemas are in sync after you create your builder. */
1448
- 'syncAfterCreate'?: boolean| undefined | null
1458
+ 'syncAfterCreate'?: boolean | undefined | null
1449
1459
  /** Version. Set a version yourself instead of letting me generate one for you */
1450
- 'version'?: string| undefined | null
1460
+ 'version'?: string | undefined | null
1451
1461
  /** Readable name. The name people will read */
1452
1462
  'nameReadable': string
1453
1463
  /** Pascal case name. PascalCase of the name */
1454
- 'namePascal'?: string| undefined | null
1464
+ 'namePascal'?: string | undefined | null
1455
1465
  /** Camel case name. camelCase version of the name */
1456
1466
  'nameCamel': string
1457
1467
  /** Description. Describe a bit more here */
1458
- 'description'?: string| undefined | null
1468
+ 'description'?: string | undefined | null
1459
1469
  }
1460
1470
 
1461
1471
  interface CreateSchemaOptionsSchema extends SpruceSchema.Schema {
@@ -1696,7 +1706,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
1696
1706
  /** Name. The name people will read */
1697
1707
  'nameReadable': string
1698
1708
  /** Slug. kebab-case of the name */
1699
- 'nameKebab'?: string| undefined | null
1709
+ 'nameKebab'?: string | undefined | null
1700
1710
  }
1701
1711
 
1702
1712
  interface CreateOrganizationOptionsSchema extends SpruceSchema.Schema {
@@ -1735,53 +1745,53 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
1735
1745
  interface CreateErrorOptions {
1736
1746
 
1737
1747
  /** Field types directory. Where field types and interfaces will be generated. */
1738
- 'fieldTypesDestinationDir'?: string| undefined | null
1748
+ 'fieldTypesDestinationDir'?: string | undefined | null
1739
1749
  /** Addons lookup directory. Where I'll look for new schema fields to be registered. */
1740
- 'addonsLookupDir'?: string| undefined | null
1750
+ 'addonsLookupDir'?: string | undefined | null
1741
1751
  /** Generate field types. Should I generate field types too? */
1742
- 'generateFieldTypes'?: boolean| undefined | null
1752
+ 'generateFieldTypes'?: boolean | undefined | null
1743
1753
  /** Schema types destination directory. Where I will generate schema types and interfaces. */
1744
- 'schemaTypesDestinationDirOrFile'?: string| undefined | null
1754
+ 'schemaTypesDestinationDirOrFile'?: string | undefined | null
1745
1755
  /** . Where I should look for your schema builders? */
1746
- 'schemaLookupDir'?: string| undefined | null
1756
+ 'schemaLookupDir'?: string | undefined | null
1747
1757
  /** Module import. When other skills use your schemas, will they import them from a module? */
1748
- 'moduleToImportFromWhenRemote'?: string| undefined | null
1758
+ 'moduleToImportFromWhenRemote'?: string | undefined | null
1749
1759
  /** Auto install missing dependencies. */
1750
- 'shouldInstallMissingDependencies'?: boolean| undefined | null
1760
+ 'shouldInstallMissingDependencies'?: boolean | undefined | null
1751
1761
  /** Enable versioning. Should we use versioning? */
1752
- 'shouldEnableVersioning'?: boolean| undefined | null
1762
+ 'shouldEnableVersioning'?: boolean | undefined | null
1753
1763
  /** Global namespace. The name you'll use when accessing these schemas, e.g. SpruceSchemas */
1754
- 'globalSchemaNamespace'?: string| undefined | null
1764
+ 'globalSchemaNamespace'?: string | undefined | null
1755
1765
  /** Fetch remote schemas. I will pull in schemas from other features. */
1756
- 'shouldFetchRemoteSchemas'?: boolean| undefined | null
1766
+ 'shouldFetchRemoteSchemas'?: boolean | undefined | null
1757
1767
  /** Fetch local schemas. I will look in schemaLookupDir to load local schemas. */
1758
- 'shouldFetchLocalSchemas'?: boolean| undefined | null
1768
+ 'shouldFetchLocalSchemas'?: boolean | undefined | null
1759
1769
  /** Fetch core schemas. Should I pull in core schemas too? */
1760
- 'shouldFetchCoreSchemas'?: boolean| undefined | null
1770
+ 'shouldFetchCoreSchemas'?: boolean | undefined | null
1761
1771
  /** Generate core schemas. Used only for updating the @sprucelabs/spruce-core-schemas. Ensures core schemas are generated like local schemas. Also an alias for `--shouldFetchRemoteSchemas=false --shouldFetchCoreSchemas=false --generateStandaloneTypesFile. */
1762
- 'shouldGenerateCoreSchemaTypes'?: boolean| undefined | null
1772
+ 'shouldGenerateCoreSchemaTypes'?: boolean | undefined | null
1763
1773
  /** Register built schemas. Should the schemas use the SchemaRegistry for tracking? */
1764
- 'registerBuiltSchemas'?: boolean| undefined | null
1774
+ 'registerBuiltSchemas'?: boolean | undefined | null
1765
1775
  /** Generate standalone types file. By default, I'll generate a types file that augments core types from @sprucelabs/spruce-core-schemas. Setting this to true will generate a stand alone types file. */
1766
- 'generateStandaloneTypesFile'?: boolean| undefined | null
1776
+ 'generateStandaloneTypesFile'?: boolean | undefined | null
1767
1777
  /** message. */
1768
- 'syncingMessage'?: string| undefined | null
1778
+ 'syncingMessage'?: string | undefined | null
1769
1779
  /** Error class destination. Where I'll save your new Error class file? */
1770
1780
  'errorClassDestinationDir': string
1771
1781
  /** . Where I should look for your error builders? */
1772
- 'errorLookupDir'?: string| undefined | null
1782
+ 'errorLookupDir'?: string | undefined | null
1773
1783
  /** Types destination dir. This is where error options and type information will be written */
1774
- 'errorTypesDestinationDir'?: string| undefined | null
1784
+ 'errorTypesDestinationDir'?: string | undefined | null
1775
1785
  /** Error builder destination directory. Where I'll save your new builder file? */
1776
1786
  'errorBuilderDestinationDir': string
1777
1787
  /** Readable name. The name people will read */
1778
1788
  'nameReadable': string
1779
1789
  /** Pascal case name. PascalCase of the name */
1780
- 'namePascal'?: string| undefined | null
1790
+ 'namePascal'?: string | undefined | null
1781
1791
  /** Camel case name. camelCase version of the name */
1782
1792
  'nameCamel': string
1783
1793
  /** Description. Describe a bit more here */
1784
- 'description'?: string| undefined | null
1794
+ 'description'?: string | undefined | null
1785
1795
  }
1786
1796
 
1787
1797
  interface CreateErrorOptionsSchema extends SpruceSchema.Schema {
@@ -2045,13 +2055,13 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
2045
2055
  interface BootSkillOptions {
2046
2056
 
2047
2057
  /** Run local. Will run using ts-node and typescript directly. Longer boot times */
2048
- 'local'?: boolean| undefined | null
2058
+ 'local'?: boolean | undefined | null
2049
2059
 
2050
- 'onData'?: ((msg: string) => void)| undefined | null
2060
+ 'onData'?: ((msg: string) => void) | undefined | null
2051
2061
 
2052
- 'onError'?: ((msg: string) => void)| undefined | null
2062
+ 'onError'?: ((msg: string) => void) | undefined | null
2053
2063
  /** Wait until skill is booted. For testing. Returns immediately after executing test so the running tests can be managed programatically. */
2054
- 'shouldReturnImmediately'?: boolean| undefined | null
2064
+ 'shouldReturnImmediately'?: boolean | undefined | null
2055
2065
  }
2056
2066
 
2057
2067
  interface BootSkillOptionsSchema extends SpruceSchema.Schema {
@@ -2103,9 +2113,9 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
2103
2113
 
2104
2114
  'name': string
2105
2115
 
2106
- 'version'?: string| undefined | null
2116
+ 'version'?: string | undefined | null
2107
2117
 
2108
- 'isDev'?: boolean| undefined | null
2118
+ 'isDev'?: boolean | undefined | null
2109
2119
  }
2110
2120
 
2111
2121
  interface NpmPackageSchema extends SpruceSchema.Schema {
@@ -2148,7 +2158,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
2148
2158
 
2149
2159
  'path': string
2150
2160
 
2151
- 'description'?: string| undefined | null
2161
+ 'description'?: string | undefined | null
2152
2162
 
2153
2163
  'action': ("skipped" | "generated" | "updated" | "deleted")
2154
2164
  }
@@ -2196,19 +2206,19 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
2196
2206
  interface ActionResponse {
2197
2207
 
2198
2208
 
2199
- 'files'?: SpruceSchemas.SpruceCli.v2020_07_22.GeneratedFile[]| undefined | null
2209
+ 'files'?: SpruceSchemas.SpruceCli.v2020_07_22.GeneratedFile[] | undefined | null
2200
2210
 
2201
- 'headline'?: string| undefined | null
2211
+ 'headline'?: string | undefined | null
2202
2212
 
2203
- 'hints'?: string[]| undefined | null
2213
+ 'hints'?: string[] | undefined | null
2204
2214
 
2205
- 'summaryLines'?: string[]| undefined | null
2215
+ 'summaryLines'?: string[] | undefined | null
2206
2216
 
2207
- 'errors'?: (AbstractSpruceError<any>)[]| undefined | null
2217
+ 'errors'?: (AbstractSpruceError<any>)[] | undefined | null
2208
2218
 
2209
- 'meta'?: (Record<string, any>)| undefined | null
2219
+ 'meta'?: (Record<string, any>) | undefined | null
2210
2220
 
2211
- 'packagesInstalled'?: SpruceSchemas.SpruceCli.v2020_07_22.NpmPackage[]| undefined | null
2221
+ 'packagesInstalled'?: SpruceSchemas.SpruceCli.v2020_07_22.NpmPackage[] | undefined | null
2212
2222
  }
2213
2223
 
2214
2224
  interface ActionResponseSchema extends SpruceSchema.Schema {
@@ -10,6 +10,14 @@ const upgradeSkillOptionsSchema: SpruceSchemas.SpruceCli.v2020_07_22.UpgradeSkil
10
10
  name: 'Upgrade skill action',
11
11
  description: 'Upgrade. Everything. Heads up, this can take a few minutes. ⏱',
12
12
  fields: {
13
+ /** Build after upgrade. Should I build your source after the upgrade? */
14
+ 'shouldBuild': {
15
+ label: 'Build after upgrade',
16
+ type: 'boolean',
17
+ hint: 'Should I build your source after the upgrade?',
18
+ defaultValue: true,
19
+ options: undefined
20
+ },
13
21
  /** Upgrade mode. */
14
22
  'upgradeMode': {
15
23
  label: 'Upgrade mode',
@@ -120,6 +120,12 @@ export const globalContract = buildEventContract({
120
120
  valueType: 'FeatureActionResponse',
121
121
  },
122
122
  },
123
+ options: {
124
+ type: 'raw',
125
+ options: {
126
+ valueType: 'Record<string, any>',
127
+ },
128
+ },
123
129
  },
124
130
  }),
125
131
  responsePayloadSchema: buildSchema({
@@ -1,5 +1,5 @@
1
1
  import TerminalInterface from './interfaces/TerminalInterface'
2
- import CommandServiceImpl from './services/CommandService'
2
+ import { CommandService } from './services/CommandService'
3
3
  import GameService from './services/GameService'
4
4
 
5
5
  export default class InFlightEntertainment {
@@ -7,7 +7,7 @@ export default class InFlightEntertainment {
7
7
  private static game?: GameService
8
8
 
9
9
  public static setup(options: {
10
- command: CommandServiceImpl
10
+ command: CommandService
11
11
  ui: TerminalInterface
12
12
  }) {
13
13
  this.game = new GameService(options.command, options.ui)
@@ -303,6 +303,11 @@ class SpyCommandService implements CommandService {
303
303
  stdout: generateId(),
304
304
  }
305
305
  }
306
+ public getCwd(): string {
307
+ return ''
308
+ }
309
+
310
+ public setCwd(_cwd: string): void {}
306
311
  public kill(): void {}
307
312
  public pid(): number | undefined {
308
313
  return 0