@sprucelabs/spruce-cli 14.26.19 → 14.28.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 +38 -0
- package/build/.spruce/errors/errors.types.d.ts +19 -0
- package/build/.spruce/errors/options.types.d.ts +4 -1
- package/build/.spruce/errors/spruceCli/dependencyExists.schema.d.ts +3 -0
- package/build/.spruce/errors/spruceCli/dependencyExists.schema.js +28 -0
- package/build/.spruce/errors/spruceCli/dependencyExists.schema.js.map +1 -0
- package/build/.spruce/events/events.contract.d.ts +4 -621
- package/build/.spruce/events/events.contract.js +1 -35
- package/build/.spruce/events/events.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/didRegisterSkillViews.v2021_02_11.contract.d.ts +0 -15
- package/build/.spruce/events/heartwood/didRegisterSkillViews.v2021_02_11.contract.js +2 -17
- package/build/.spruce/events/heartwood/didRegisterSkillViews.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/generateUrl.v2021_02_11.contract.d.ts +4 -21
- package/build/.spruce/events/heartwood/generateUrl.v2021_02_11.contract.js +7 -24
- package/build/.spruce/events/heartwood/generateUrl.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/getSkillViews.v2021_02_11.contract.d.ts +1 -24
- package/build/.spruce/events/heartwood/getSkillViews.v2021_02_11.contract.js +5 -28
- package/build/.spruce/events/heartwood/getSkillViews.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/events/heartwood/registerSkillViews.v2021_02_11.contract.d.ts +12 -0
- package/build/.spruce/events/heartwood/registerSkillViews.v2021_02_11.contract.js +13 -1
- package/build/.spruce/events/heartwood/registerSkillViews.v2021_02_11.contract.js.map +1 -1
- package/build/.spruce/schemas/schemas.types.d.ts +54 -1142
- package/build/.spruce/schemas/schemas.types.js.map +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/listenEventOptions.schema.js +1 -1
- package/build/.spruce/schemas/spruceCli/v2020_07_22/listenEventOptions.schema.js.map +1 -1
- package/build/.spruce/settings.json +6 -0
- package/build/__tests__/behavioral/AddingADependency.test.d.ts +6 -3
- package/build/__tests__/behavioral/AddingADependency.test.js +116 -44
- package/build/__tests__/behavioral/AddingADependency.test.js.map +1 -1
- package/build/__tests__/behavioral/InstallingASkillAtAnOrg.test.js +2 -2
- package/build/__tests__/behavioral/InstallingASkillAtAnOrg.test.js.map +1 -1
- package/build/__tests__/behavioral/LoggingInAsASkill.test.js +4 -4
- package/build/__tests__/behavioral/LoggingInAsASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/ManagingDependencies.test.js +3 -3
- package/build/__tests__/behavioral/ManagingDependencies.test.js.map +1 -1
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js +1 -1
- package/build/__tests__/behavioral/RememberingUpgradeSelections.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingRemote.test.js +1 -1
- package/build/__tests__/behavioral/SettingRemote.test.js.map +1 -1
- package/build/__tests__/behavioral/SettingUpVscode.test.js +3 -3
- package/build/__tests__/behavioral/SettingUpVscode.test.js.map +1 -1
- package/build/__tests__/behavioral/TestingDataStores.test.js +2 -2
- package/build/__tests__/behavioral/TestingDataStores.test.js.map +1 -1
- package/build/__tests__/behavioral/UpgradingANodeModule.test.d.ts +1 -0
- package/build/__tests__/behavioral/UpgradingANodeModule.test.js +50 -3
- package/build/__tests__/behavioral/UpgradingANodeModule.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAListener.test.js +8 -8
- package/build/__tests__/behavioral/events/CreatingAListener.test.js.map +1 -1
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.d.ts +3 -2
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js +156 -106
- package/build/__tests__/behavioral/events/CreatingAnEvent.test.js.map +1 -1
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js +6 -9
- package/build/__tests__/behavioral/events/KeepingEventsInSync2.test.js.map +1 -1
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js +2 -2
- package/build/__tests__/behavioral/events/SkillEmitsBootEvents.test.js.map +1 -1
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js +7 -4
- package/build/__tests__/behavioral/schemas/KeepingSchemasInSync.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/UpgradingASkill.test.js +7 -7
- package/build/__tests__/behavioral/skill/UpgradingASkill.test.js.map +1 -1
- package/build/__tests__/behavioral/skill/UpgradingASkill3.test.js +2 -2
- package/build/__tests__/behavioral/skill/UpgradingASkill3.test.js.map +1 -1
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js +1 -1
- package/build/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js +3 -3
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js.map +1 -1
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js +2 -2
- package/build/__tests__/behavioral/views/TestingViewControllers.test.js.map +1 -1
- package/build/__tests__/implementation/ActionExecuter2.test.js +3 -3
- package/build/__tests__/implementation/ActionExecuter2.test.js.map +1 -1
- package/build/errors/SpruceError.js +4 -0
- package/build/errors/SpruceError.js.map +1 -1
- package/build/errors/dependencyExists.builder.d.ts +11 -0
- package/build/errors/dependencyExists.builder.js +22 -0
- package/build/errors/dependencyExists.builder.js.map +1 -0
- package/build/features/AbstractAction.js +1 -1
- package/build/features/AbstractAction.js.map +1 -1
- package/build/features/dependencies/actions/AddAction.js +22 -15
- package/build/features/dependencies/actions/AddAction.js.map +1 -1
- package/build/features/event/actions/CreateAction.js +1 -1
- package/build/features/event/actions/CreateAction.js.map +1 -1
- package/build/features/event/actions/ListenAction.js +66 -54
- package/build/features/event/actions/ListenAction.js.map +1 -1
- package/build/features/event/stores/EventStore.js +24 -13
- package/build/features/event/stores/EventStore.js.map +1 -1
- package/build/features/node/NodeFeature.d.ts +1 -0
- package/build/features/node/NodeFeature.js +83 -64
- package/build/features/node/NodeFeature.js.map +1 -1
- package/build/features/node/actions/UpgradeAction.js +20 -9
- package/build/features/node/actions/UpgradeAction.js.map +1 -1
- package/build/features/node/writers/NodeWriter.d.ts +5 -2
- package/build/features/node/writers/NodeWriter.js +37 -22
- package/build/features/node/writers/NodeWriter.js.map +1 -1
- package/build/features/sandbox/actions/SetupAction.js +1 -1
- package/build/features/sandbox/actions/SetupAction.js.map +1 -1
- package/build/features/skill/updaters/Updater.js +3 -1
- package/build/features/skill/updaters/Updater.js.map +1 -1
- package/build/interfaces/SpyInterface.d.ts +1 -1
- package/build/interfaces/SpyInterface.js +2 -2
- package/build/interfaces/SpyInterface.js.map +1 -1
- package/build/schemas/v2020_07_22/listenEventOptions.builder.d.ts +1 -1
- package/build/schemas/v2020_07_22/listenEventOptions.builder.js +1 -1
- package/build/schemas/v2020_07_22/listenEventOptions.builder.js.map +1 -1
- package/build/services/DependencyService.d.ts +1 -0
- package/build/services/DependencyService.js +18 -0
- package/build/services/DependencyService.js.map +1 -1
- package/build/tests/AbstractCliTest.js +1 -1
- package/build/tests/AbstractCliTest.js.map +1 -1
- package/build/tests/utilities/uiAssert.utility.d.ts +7 -0
- package/build/tests/utilities/uiAssert.utility.js +85 -0
- package/build/tests/utilities/uiAssert.utility.js.map +1 -0
- package/build/writers/AbstractWriter.d.ts +10 -10
- package/build/writers/AbstractWriter.js.map +1 -1
- package/package.json +33 -31
- package/src/.spruce/errors/errors.types.ts +29 -0
- package/src/.spruce/errors/options.types.ts +4 -1
- package/src/.spruce/errors/spruceCli/dependencyExists.schema.ts +22 -0
- package/src/.spruce/events/events.contract.ts +0 -102
- package/src/.spruce/events/heartwood/didRegisterSkillViews.v2021_02_11.contract.ts +0 -15
- package/src/.spruce/events/heartwood/generateUrl.v2021_02_11.contract.ts +4 -21
- package/src/.spruce/events/heartwood/getSkillViews.v2021_02_11.contract.ts +1 -24
- package/src/.spruce/events/heartwood/registerSkillViews.v2021_02_11.contract.ts +15 -0
- package/src/.spruce/schemas/schemas.types.ts +59 -1413
- package/src/.spruce/schemas/spruceCli/v2020_07_22/listenEventOptions.schema.ts +1 -1
- package/src/.spruce/settings.json +6 -0
- package/src/__tests__/behavioral/AddingADependency.test.ts +45 -8
- package/src/__tests__/behavioral/InstallingASkillAtAnOrg.test.ts +3 -3
- package/src/__tests__/behavioral/LoggingInAsASkill.test.ts +4 -4
- package/src/__tests__/behavioral/ManagingDependencies.test.ts +3 -3
- package/src/__tests__/behavioral/RememberingUpgradeSelections.test.ts +1 -1
- package/src/__tests__/behavioral/SettingRemote.test.ts +1 -1
- package/src/__tests__/behavioral/SettingUpVscode.test.ts +3 -3
- package/src/__tests__/behavioral/TestingDataStores.test.ts +2 -2
- package/src/__tests__/behavioral/UpgradingANodeModule.test.ts +24 -0
- package/src/__tests__/behavioral/events/CreatingAListener.test.ts +8 -8
- package/src/__tests__/behavioral/events/CreatingAnEvent.test.ts +44 -22
- package/src/__tests__/behavioral/events/KeepingEventsInSync2.test.ts +1 -1
- package/src/__tests__/behavioral/events/SkillEmitsBootEvents.test.ts +2 -2
- package/src/__tests__/behavioral/schemas/KeepingSchemasInSync.test.ts +2 -0
- package/src/__tests__/behavioral/skill/UpgradingASkill.test.ts +7 -7
- package/src/__tests__/behavioral/skill/UpgradingASkill3.test.ts +2 -2
- package/src/__tests__/behavioral/tests/SelectingAnAbstractTestClass.test.ts +1 -1
- package/src/__tests__/behavioral/views/CreatingASkillView.test.ts +3 -3
- package/src/__tests__/behavioral/views/TestingViewControllers.test.ts +2 -2
- package/src/__tests__/implementation/ActionExecuter2.test.ts +3 -3
- package/src/errors/SpruceError.ts +4 -0
- package/src/errors/dependencyExists.builder.ts +12 -0
- package/src/features/AbstractAction.ts +1 -4
- package/src/features/dependencies/actions/AddAction.ts +12 -5
- package/src/features/event/actions/CreateAction.ts +4 -1
- package/src/features/event/actions/ListenAction.ts +30 -20
- package/src/features/event/stores/EventStore.ts +7 -1
- package/src/features/node/NodeFeature.ts +31 -25
- package/src/features/node/actions/UpgradeAction.ts +8 -1
- package/src/features/node/writers/NodeWriter.ts +38 -23
- package/src/features/sandbox/actions/SetupAction.ts +1 -1
- package/src/features/skill/updaters/Updater.ts +2 -1
- package/src/interfaces/SpyInterface.ts +1 -1
- package/src/schemas/v2020_07_22/listenEventOptions.builder.ts +1 -1
- package/src/services/DependencyService.ts +14 -0
- package/src/tests/AbstractCliTest.ts +1 -1
- package/src/tests/utilities/uiAssert.utility.ts +45 -0
- package/src/writers/AbstractWriter.ts +15 -10
- package/build/.spruce/events/appointments/didBookAppointments.v2021_06_23.contract.d.ts +0 -10
- package/build/.spruce/events/appointments/didBookAppointments.v2021_06_23.contract.js +0 -24
- package/build/.spruce/events/appointments/didBookAppointments.v2021_06_23.contract.js.map +0 -1
- package/build/.spruce/events/calendar/createCalendarEventType.v2021_05_19.contract.d.ts +0 -11
- package/build/.spruce/events/calendar/createCalendarEventType.v2021_05_19.contract.js +0 -27
- package/build/.spruce/events/calendar/createCalendarEventType.v2021_05_19.contract.js.map +0 -1
- package/build/.spruce/events/calendar/listCalendarEventTypes.v2021_05_19.contract.d.ts +0 -10
- package/build/.spruce/events/calendar/listCalendarEventTypes.v2021_05_19.contract.js +0 -24
- package/build/.spruce/events/calendar/listCalendarEventTypes.v2021_05_19.contract.js.map +0 -1
- package/build/.spruce/events/forms/convertPdfToForm.v2021_07_02.contract.d.ts +0 -46
- package/build/.spruce/events/forms/convertPdfToForm.v2021_07_02.contract.js +0 -62
- package/build/.spruce/events/forms/convertPdfToForm.v2021_07_02.contract.js.map +0 -1
- package/build/.spruce/events/forms/convertPdfToSchemas.v2021_07_02.contract.d.ts +0 -46
- package/build/.spruce/events/forms/convertPdfToSchemas.v2021_07_02.contract.js +0 -62
- package/build/.spruce/events/forms/convertPdfToSchemas.v2021_07_02.contract.js.map +0 -1
- package/build/.spruce/events/forms/createForm.v2021_07_02.contract.d.ts +0 -46
- package/build/.spruce/events/forms/createForm.v2021_07_02.contract.js +0 -62
- package/build/.spruce/events/forms/createForm.v2021_07_02.contract.js.map +0 -1
- package/build/.spruce/events/forms/deleteCompletedForm.v2021_07_02.contract.d.ts +0 -46
- package/build/.spruce/events/forms/deleteCompletedForm.v2021_07_02.contract.js +0 -62
- package/build/.spruce/events/forms/deleteCompletedForm.v2021_07_02.contract.js.map +0 -1
- package/build/.spruce/events/forms/didUpdateCompletedForm.v2021_07_02.contract.d.ts +0 -10
- package/build/.spruce/events/forms/didUpdateCompletedForm.v2021_07_02.contract.js +0 -24
- package/build/.spruce/events/forms/didUpdateCompletedForm.v2021_07_02.contract.js.map +0 -1
- package/build/.spruce/events/forms/getCompletedForm.v2021_07_02.contract.d.ts +0 -40
- package/build/.spruce/events/forms/getCompletedForm.v2021_07_02.contract.js +0 -56
- package/build/.spruce/events/forms/getCompletedForm.v2021_07_02.contract.js.map +0 -1
- package/build/.spruce/events/forms/listCompletedForms.v2021_07_02.contract.d.ts +0 -45
- package/build/.spruce/events/forms/listCompletedForms.v2021_07_02.contract.js +0 -59
- package/build/.spruce/events/forms/listCompletedForms.v2021_07_02.contract.js.map +0 -1
- package/build/.spruce/events/forms/listForms.v2021_07_02.contract.d.ts +0 -80
- package/build/.spruce/events/forms/listForms.v2021_07_02.contract.js +0 -94
- package/build/.spruce/events/forms/listForms.v2021_07_02.contract.js.map +0 -1
- package/build/.spruce/events/forms/updateCompletedForm.v2021_07_02.contract.d.ts +0 -11
- package/build/.spruce/events/forms/updateCompletedForm.v2021_07_02.contract.js +0 -27
- package/build/.spruce/events/forms/updateCompletedForm.v2021_07_02.contract.js.map +0 -1
- package/build/.spruce/events/mySkill163362874854325100/myCoolEvent.v2021_01_22.contract.d.ts +0 -38
- package/build/.spruce/events/mySkill163362874854325100/myCoolEvent.v2021_01_22.contract.js +0 -48
- package/build/.spruce/events/mySkill163362874854325100/myCoolEvent.v2021_01_22.contract.js.map +0 -1
- package/build/.spruce/events/mySkill163362882591525586/myCoolEvent.v2021_01_22.contract.d.ts +0 -38
- package/build/.spruce/events/mySkill163362882591525586/myCoolEvent.v2021_01_22.contract.js +0 -48
- package/build/.spruce/events/mySkill163362882591525586/myCoolEvent.v2021_01_22.contract.js.map +0 -1
- package/build/.spruce/events/mySkill163459634973936127/myCoolEvent.v2021_01_22.contract.d.ts +0 -38
- package/build/.spruce/events/mySkill163459634973936127/myCoolEvent.v2021_01_22.contract.js +0 -48
- package/build/.spruce/events/mySkill163459634973936127/myCoolEvent.v2021_01_22.contract.js.map +0 -1
- package/build/.spruce/events/mySkill163493473102035607/myCoolEvent.v2021_01_22.contract.d.ts +0 -38
- package/build/.spruce/events/mySkill163493473102035607/myCoolEvent.v2021_01_22.contract.js +0 -48
- package/build/.spruce/events/mySkill163493473102035607/myCoolEvent.v2021_01_22.contract.js.map +0 -1
- package/build/.spruce/events/mySkill163493479880935941/myCoolEvent.v2021_01_22.contract.d.ts +0 -38
- package/build/.spruce/events/mySkill163493479880935941/myCoolEvent.v2021_01_22.contract.js +0 -48
- package/build/.spruce/events/mySkill163493479880935941/myCoolEvent.v2021_01_22.contract.js.map +0 -1
- package/build/.spruce/schemas/appointments/v2021_06_23/appointments.schema.d.ts +0 -3
- package/build/.spruce/schemas/appointments/v2021_06_23/appointments.schema.js +0 -28
- package/build/.spruce/schemas/appointments/v2021_06_23/appointments.schema.js.map +0 -1
- package/build/.spruce/schemas/appointments/v2021_06_23/didBookAppointmentsEmitPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/appointments/v2021_06_23/didBookAppointmentsEmitPayload.schema.js +0 -36
- package/build/.spruce/schemas/appointments/v2021_06_23/didBookAppointmentsEmitPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/appointments/v2021_06_23/didBookAppointmentsEmitTarget.schema.d.ts +0 -3
- package/build/.spruce/schemas/appointments/v2021_06_23/didBookAppointmentsEmitTarget.schema.js +0 -28
- package/build/.spruce/schemas/appointments/v2021_06_23/didBookAppointmentsEmitTarget.schema.js.map +0 -1
- package/build/.spruce/schemas/appointments/v2021_06_23/didBookAppointmentsEmitTargetAndPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/appointments/v2021_06_23/didBookAppointmentsEmitTargetAndPayload.schema.js +0 -56
- package/build/.spruce/schemas/appointments/v2021_06_23/didBookAppointmentsEmitTargetAndPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/calendar/v2021_05_19/createCalendarEventTypeEmitPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/calendar/v2021_05_19/createCalendarEventTypeEmitPayload.schema.js +0 -36
- package/build/.spruce/schemas/calendar/v2021_05_19/createCalendarEventTypeEmitPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/calendar/v2021_05_19/createCalendarEventTypeEmitTargetAndPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/calendar/v2021_05_19/createCalendarEventTypeEmitTargetAndPayload.schema.js +0 -46
- package/build/.spruce/schemas/calendar/v2021_05_19/createCalendarEventTypeEmitTargetAndPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/calendar/v2021_05_19/createCalendarEventTypeResponsePayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/calendar/v2021_05_19/createCalendarEventTypeResponsePayload.schema.js +0 -35
- package/build/.spruce/schemas/calendar/v2021_05_19/createCalendarEventTypeResponsePayload.schema.js.map +0 -1
- package/build/.spruce/schemas/calendar/v2021_05_19/fullCalendarEventType.schema.d.ts +0 -3
- package/build/.spruce/schemas/calendar/v2021_05_19/fullCalendarEventType.schema.js +0 -54
- package/build/.spruce/schemas/calendar/v2021_05_19/fullCalendarEventType.schema.js.map +0 -1
- package/build/.spruce/schemas/calendar/v2021_05_19/listCalendarEventTypesResponsePayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/calendar/v2021_05_19/listCalendarEventTypesResponsePayload.schema.js +0 -37
- package/build/.spruce/schemas/calendar/v2021_05_19/listCalendarEventTypesResponsePayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/builtForm.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/builtForm.schema.js +0 -66
- package/build/.spruce/schemas/forms/v2021_07_02/builtForm.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/completedFormResponse.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/completedFormResponse.schema.js +0 -50
- package/build/.spruce/schemas/forms/v2021_07_02/completedFormResponse.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/completedFormSourceForm.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/completedFormSourceForm.schema.js +0 -59
- package/build/.spruce/schemas/forms/v2021_07_02/completedFormSourceForm.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToFormEmitPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToFormEmitPayload.schema.js +0 -30
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToFormEmitPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToFormEmitTargetAndPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToFormEmitTargetAndPayload.schema.js +0 -46
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToFormEmitTargetAndPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToFormResponsePayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToFormResponsePayload.schema.js +0 -34
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToFormResponsePayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToSchemasEmitPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToSchemasEmitPayload.schema.js +0 -30
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToSchemasEmitPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToSchemasEmitTargetAndPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToSchemasEmitTargetAndPayload.schema.js +0 -46
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToSchemasEmitTargetAndPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToSchemasResponsePayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToSchemasResponsePayload.schema.js +0 -33
- package/build/.spruce/schemas/forms/v2021_07_02/convertPdfToSchemasResponsePayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/createBuiltForm.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/createBuiltForm.schema.js +0 -52
- package/build/.spruce/schemas/forms/v2021_07_02/createBuiltForm.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/createFormEmitTargetAndPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/createFormEmitTargetAndPayload.schema.js +0 -46
- package/build/.spruce/schemas/forms/v2021_07_02/createFormEmitTargetAndPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/createFormResponsePayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/createFormResponsePayload.schema.js +0 -44
- package/build/.spruce/schemas/forms/v2021_07_02/createFormResponsePayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/deleteCompletedFormEmitTarget.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/deleteCompletedFormEmitTarget.schema.js +0 -29
- package/build/.spruce/schemas/forms/v2021_07_02/deleteCompletedFormEmitTarget.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/deleteCompletedFormEmitTargetAndPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/deleteCompletedFormEmitTargetAndPayload.schema.js +0 -46
- package/build/.spruce/schemas/forms/v2021_07_02/deleteCompletedFormEmitTargetAndPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/deleteCompletedFormResponsePayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/deleteCompletedFormResponsePayload.schema.js +0 -29
- package/build/.spruce/schemas/forms/v2021_07_02/deleteCompletedFormResponsePayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/didSaveFormEmitPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/didSaveFormEmitPayload.schema.js +0 -29
- package/build/.spruce/schemas/forms/v2021_07_02/didSaveFormEmitPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/didUpdateCompletedFormEmitTargetAndPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/didUpdateCompletedFormEmitTargetAndPayload.schema.js +0 -46
- package/build/.spruce/schemas/forms/v2021_07_02/didUpdateCompletedFormEmitTargetAndPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/getCompletedFormEmitTarget.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/getCompletedFormEmitTarget.schema.js +0 -29
- package/build/.spruce/schemas/forms/v2021_07_02/getCompletedFormEmitTarget.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/getCompletedFormEmitTargetAndPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/getCompletedFormEmitTargetAndPayload.schema.js +0 -46
- package/build/.spruce/schemas/forms/v2021_07_02/getCompletedFormEmitTargetAndPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/getCompletedFormEventForm.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/getCompletedFormEventForm.schema.js +0 -78
- package/build/.spruce/schemas/forms/v2021_07_02/getCompletedFormEventForm.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/getCompletedFormResponsePayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/getCompletedFormResponsePayload.schema.js +0 -35
- package/build/.spruce/schemas/forms/v2021_07_02/getCompletedFormResponsePayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/listCompletedFormsResponsePayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/listCompletedFormsResponsePayload.schema.js +0 -37
- package/build/.spruce/schemas/forms/v2021_07_02/listCompletedFormsResponsePayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/listFormsForm.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/listFormsForm.schema.js +0 -51
- package/build/.spruce/schemas/forms/v2021_07_02/listFormsForm.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/listFormsResponsePayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/listFormsResponsePayload.schema.js +0 -37
- package/build/.spruce/schemas/forms/v2021_07_02/listFormsResponsePayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/updateCompletedFormEmitPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/updateCompletedFormEmitPayload.schema.js +0 -38
- package/build/.spruce/schemas/forms/v2021_07_02/updateCompletedFormEmitPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/updateCompletedFormEmitTargetAndPayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/updateCompletedFormEmitTargetAndPayload.schema.js +0 -46
- package/build/.spruce/schemas/forms/v2021_07_02/updateCompletedFormEmitTargetAndPayload.schema.js.map +0 -1
- package/build/.spruce/schemas/forms/v2021_07_02/updateCompletedFormResponsePayload.schema.d.ts +0 -3
- package/build/.spruce/schemas/forms/v2021_07_02/updateCompletedFormResponsePayload.schema.js +0 -29
- package/build/.spruce/schemas/forms/v2021_07_02/updateCompletedFormResponsePayload.schema.js.map +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/builderImportExportPage.schema.d.ts +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/builderImportExportPage.schema.js +0 -14
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/builderImportExportPage.schema.js.map +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/formBuilderImportExportObject.schema.d.ts +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/formBuilderImportExportObject.schema.js +0 -14
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/formBuilderImportExportObject.schema.js.map +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/formSection.schema.d.ts +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/formSection.schema.js +0 -14
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/formSection.schema.js.map +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/list.schema.d.ts +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/list.schema.js +0 -14
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/list.schema.js.map +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listCell.schema.d.ts +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listCell.schema.js +0 -14
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listCell.schema.js.map +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listCellButton.schema.d.ts +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listCellButton.schema.js +0 -14
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listCellButton.schema.js.map +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listRow.schema.d.ts +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listRow.schema.js +0 -14
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listRow.schema.js.map +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listSelectInput.schema.d.ts +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listSelectInput.schema.js +0 -14
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listSelectInput.schema.js.map +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listTextInput.schema.d.ts +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listTextInput.schema.js +0 -14
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listTextInput.schema.js.map +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/selectInputChoice.schema.d.ts +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/selectInputChoice.schema.js +0 -14
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/selectInputChoice.schema.js.map +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/text.schema.d.ts +0 -1
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/text.schema.js +0 -14
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/text.schema.js.map +0 -1
- package/src/.spruce/events/appointments/didBookAppointments.v2021_06_23.contract.ts +0 -15
- package/src/.spruce/events/calendar/createCalendarEventType.v2021_05_19.contract.ts +0 -17
- package/src/.spruce/events/calendar/listCalendarEventTypes.v2021_05_19.contract.ts +0 -16
- package/src/.spruce/events/forms/convertPdfToForm.v2021_07_02.contract.ts +0 -54
- package/src/.spruce/events/forms/convertPdfToSchemas.v2021_07_02.contract.ts +0 -55
- package/src/.spruce/events/forms/createForm.v2021_07_02.contract.ts +0 -54
- package/src/.spruce/events/forms/deleteCompletedForm.v2021_07_02.contract.ts +0 -55
- package/src/.spruce/events/forms/didUpdateCompletedForm.v2021_07_02.contract.ts +0 -15
- package/src/.spruce/events/forms/getCompletedForm.v2021_07_02.contract.ts +0 -48
- package/src/.spruce/events/forms/listCompletedForms.v2021_07_02.contract.ts +0 -54
- package/src/.spruce/events/forms/listForms.v2021_07_02.contract.ts +0 -90
- package/src/.spruce/events/forms/updateCompletedForm.v2021_07_02.contract.ts +0 -17
- package/src/.spruce/events/mySkill163362874854325100/myCoolEvent.v2021_01_22.contract.ts +0 -45
- package/src/.spruce/events/mySkill163362882591525586/myCoolEvent.v2021_01_22.contract.ts +0 -45
- package/src/.spruce/events/mySkill163459634973936127/myCoolEvent.v2021_01_22.contract.ts +0 -45
- package/src/.spruce/events/mySkill163493473102035607/myCoolEvent.v2021_01_22.contract.ts +0 -45
- package/src/.spruce/events/mySkill163493479880935941/myCoolEvent.v2021_01_22.contract.ts +0 -45
- package/src/.spruce/schemas/appointments/v2021_06_23/appointments.schema.ts +0 -22
- package/src/.spruce/schemas/appointments/v2021_06_23/didBookAppointmentsEmitPayload.schema.ts +0 -24
- package/src/.spruce/schemas/appointments/v2021_06_23/didBookAppointmentsEmitTarget.schema.ts +0 -22
- package/src/.spruce/schemas/appointments/v2021_06_23/didBookAppointmentsEmitTargetAndPayload.schema.ts +0 -36
- package/src/.spruce/schemas/calendar/v2021_05_19/createCalendarEventTypeEmitPayload.schema.ts +0 -29
- package/src/.spruce/schemas/calendar/v2021_05_19/createCalendarEventTypeEmitTargetAndPayload.schema.ts +0 -30
- package/src/.spruce/schemas/calendar/v2021_05_19/createCalendarEventTypeResponsePayload.schema.ts +0 -23
- package/src/.spruce/schemas/calendar/v2021_05_19/fullCalendarEventType.schema.ts +0 -39
- package/src/.spruce/schemas/calendar/v2021_05_19/listCalendarEventTypesResponsePayload.schema.ts +0 -25
- package/src/.spruce/schemas/forms/v2021_07_02/builtForm.schema.ts +0 -50
- package/src/.spruce/schemas/forms/v2021_07_02/completedFormResponse.schema.ts +0 -41
- package/src/.spruce/schemas/forms/v2021_07_02/completedFormSourceForm.schema.ts +0 -44
- package/src/.spruce/schemas/forms/v2021_07_02/convertPdfToFormEmitPayload.schema.ts +0 -24
- package/src/.spruce/schemas/forms/v2021_07_02/convertPdfToFormEmitTargetAndPayload.schema.ts +0 -30
- package/src/.spruce/schemas/forms/v2021_07_02/convertPdfToFormResponsePayload.schema.ts +0 -22
- package/src/.spruce/schemas/forms/v2021_07_02/convertPdfToSchemasEmitPayload.schema.ts +0 -24
- package/src/.spruce/schemas/forms/v2021_07_02/convertPdfToSchemasEmitTargetAndPayload.schema.ts +0 -30
- package/src/.spruce/schemas/forms/v2021_07_02/convertPdfToSchemasResponsePayload.schema.ts +0 -25
- package/src/.spruce/schemas/forms/v2021_07_02/createBuiltForm.schema.ts +0 -38
- package/src/.spruce/schemas/forms/v2021_07_02/createFormEmitTargetAndPayload.schema.ts +0 -30
- package/src/.spruce/schemas/forms/v2021_07_02/createFormResponsePayload.schema.ts +0 -29
- package/src/.spruce/schemas/forms/v2021_07_02/deleteCompletedFormEmitTarget.schema.ts +0 -23
- package/src/.spruce/schemas/forms/v2021_07_02/deleteCompletedFormEmitTargetAndPayload.schema.ts +0 -30
- package/src/.spruce/schemas/forms/v2021_07_02/deleteCompletedFormResponsePayload.schema.ts +0 -23
- package/src/.spruce/schemas/forms/v2021_07_02/didSaveFormEmitPayload.schema.ts +0 -23
- package/src/.spruce/schemas/forms/v2021_07_02/didUpdateCompletedFormEmitTargetAndPayload.schema.ts +0 -30
- package/src/.spruce/schemas/forms/v2021_07_02/getCompletedFormEmitTarget.schema.ts +0 -23
- package/src/.spruce/schemas/forms/v2021_07_02/getCompletedFormEmitTargetAndPayload.schema.ts +0 -30
- package/src/.spruce/schemas/forms/v2021_07_02/getCompletedFormEventForm.schema.ts +0 -58
- package/src/.spruce/schemas/forms/v2021_07_02/getCompletedFormResponsePayload.schema.ts +0 -23
- package/src/.spruce/schemas/forms/v2021_07_02/listCompletedFormsResponsePayload.schema.ts +0 -25
- package/src/.spruce/schemas/forms/v2021_07_02/listFormsForm.schema.ts +0 -42
- package/src/.spruce/schemas/forms/v2021_07_02/listFormsResponsePayload.schema.ts +0 -25
- package/src/.spruce/schemas/forms/v2021_07_02/updateCompletedFormEmitPayload.schema.ts +0 -29
- package/src/.spruce/schemas/forms/v2021_07_02/updateCompletedFormEmitTargetAndPayload.schema.ts +0 -30
- package/src/.spruce/schemas/forms/v2021_07_02/updateCompletedFormResponsePayload.schema.ts +0 -23
- package/src/.spruce/schemas/heartwoodViewControllers/v2021_02_11/builderImportExportPage.schema.ts +0 -1
- package/src/.spruce/schemas/heartwoodViewControllers/v2021_02_11/formBuilderImportExportObject.schema.ts +0 -1
- package/src/.spruce/schemas/heartwoodViewControllers/v2021_02_11/formSection.schema.ts +0 -1
- package/src/.spruce/schemas/heartwoodViewControllers/v2021_02_11/list.schema.ts +0 -1
- package/src/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listCell.schema.ts +0 -1
- package/src/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listCellButton.schema.ts +0 -1
- package/src/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listRow.schema.ts +0 -1
- package/src/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listSelectInput.schema.ts +0 -1
- package/src/.spruce/schemas/heartwoodViewControllers/v2021_02_11/listTextInput.schema.ts +0 -1
- package/src/.spruce/schemas/heartwoodViewControllers/v2021_02_11/selectInputChoice.schema.ts +0 -1
- package/src/.spruce/schemas/heartwoodViewControllers/v2021_02_11/text.schema.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/writers/AbstractWriter.ts"],"names":["AbstractWriter","options","templates","ui","term","upgradeMode","fileDescriptions","linter","settings","file","isLintingEnabled","startLoading","pathUtil","basename","fix","context","destinationDir","filesToWrite","filesToSkip","shouldConfirmBeforeWriting","firstFileWriteMessage","hasShownFirstWriteMessage","directoryTemplate","kind","code","files","results","generated","shouldWrite","indexOf","filename","shouldSkip","writeFileIfChangedMixinResults","join","relativePath","contents","destination","description","cwd","myResults","desc","name","action","diskUtil","isDir","Error","fileDescription","getFileDescription","doesFileExist","write","confirmPromptOnFirstWrite","stopLoading","confirm","writeFile","isFileDifferent","shouldOverwriteIfChanged","cleanedName","cleanFilename","skipped","get","isAlwaysSkipped","shouldAskForOverwrite","renderLine","prompt","type","label","choices","value","FILE_ACTION_OVERWRITE","FILE_ACTION_SKIP","FILE_ACTION_ALWAYS_SKIP","answer","push","set","replace","path","relativeFile","sep","substr","shouldOverwriteWhenChanged","lower","toLowerCase","d","search","undefined","dirOrFile","fallbackFileName","doesDirExist","fs","lstatSync","isDirectory","extname","length","resolvePath"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;;;;;;;;;IAqB8BA,c;AAY7B,0BAAmBC,OAAnB,EAA2C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+DAPG,EAOH;AAAA,yEANN,IAMM;AAAA;AAAA,wEAHP,KAGO;AAAA;AAC1C,SAAKC,SAAL,GAAiBD,OAAO,CAACC,SAAzB;AACA,SAAKC,EAAL,GAAUF,OAAO,CAACG,IAAlB;AACA,SAAKC,WAAL,GAAmBJ,OAAO,CAACI,WAA3B;AACA,SAAKC,gBAAL,GAAwBL,OAAO,CAACK,gBAAhC;AACA,SAAKC,MAAL,GAAcN,OAAO,CAACM,MAAtB;AACA,SAAKC,QAAL,GAAgBP,OAAO,CAACO,QAAxB;AACA;;;;;gGAED,iBAAqBC,IAArB;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA,qBACKT,cAAc,CAACU,gBADpB;AAAA;AAAA;AAAA;;AAEE,qBAAKP,EAAL,CAAQQ,YAAR,mBAAgCC,iBAASC,QAAT,CAAkBJ,IAAlB,CAAhC;AAFF;AAAA,uCAGQ,KAAKF,MAHb,iDAGQ,aAAaO,GAAb,CAAiBL,IAAjB,WAA6B,YAAM,CAAE,CAArC,CAHR;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;kHAeA,kBAAuCR,OAAvC;AAAA;;AAAA;AAAA;AAAA;AAAA;AAUEc,gBAAAA,OAVF,G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BK,WAAxB,EADA,IAEA9E,iBAAS+E,OAAT,CAAiBN,SAAjB,EAA4BO,MAA5B,KAAuC,CAHxC;AAIA,aAAOhD,KAAK,GAAGD,2BAASkD,WAAT,CAAqBR,SAArB,EAAgCC,gBAAhC,CAAH,GAAuDD,SAAnE;AACA;;;WAxND,0BAA+B;AAC9B,WAAK3E,gBAAL,GAAwB,KAAxB;AACA;;;WAED,yBAA8B;AAC7B,WAAKA,gBAAL,GAAwB,IAAxB;AACA;;;;;;iCAlC4BV,c,sBAOK,I","sourcesContent":["import fs from 'fs'\nimport pathUtil from 'path'\nimport { diskUtil, SettingsService } from '@sprucelabs/spruce-skill-utils'\nimport { DirectoryTemplateCode, Templates } from '@sprucelabs/spruce-templates'\nimport {\n\tFILE_ACTION_ALWAYS_SKIP,\n\tFILE_ACTION_OVERWRITE,\n\tFILE_ACTION_SKIP,\n} from '../constants'\nimport LintService from '../services/LintService'\nimport { FileDescription, GeneratedFile, UpgradeMode } from '../types/cli.types'\nimport { GraphicsInterface } from '../types/cli.types'\n\nexport type WriteResults = GeneratedFile[]\n\nexport interface WriterOptions {\n\ttemplates: Templates\n\tterm: GraphicsInterface\n\taskBeforeUpdating?: boolean\n\tupgradeMode?: UpgradeMode\n\tfileDescriptions: FileDescription[]\n\tlinter?: LintService\n\tsettings: SettingsService\n}\n\nexport default abstract class AbstractWriter {\n\tprotected templates: Templates\n\tprotected ui: GraphicsInterface\n\tprivate linter?: LintService\n\tprivate upgradeMode: UpgradeMode\n\tprivate fileDescriptions: FileDescription[] = []\n\tprivate shouldConfirmBeforeWriting = true\n\tprivate static isLintingEnabled = true\n\tprivate firstFileWriteMessage?: string\n\tprivate hasShownFirstWriteMessage = false\n\tprivate settings: SettingsService<string>\n\n\tpublic constructor(options: WriterOptions) {\n\t\tthis.templates = options.templates\n\t\tthis.ui = options.term\n\t\tthis.upgradeMode = options.upgradeMode\n\t\tthis.fileDescriptions = options.fileDescriptions\n\t\tthis.linter = options.linter\n\t\tthis.settings = options.settings\n\t}\n\n\tprotected async lint(file: string) {\n\t\tif (AbstractWriter.isLintingEnabled) {\n\t\t\tthis.ui.startLoading(`Linting ${pathUtil.basename(file)}...`)\n\t\t\tawait this.linter?.fix(file).catch(() => {})\n\t\t}\n\t}\n\n\tpublic static disableLinting() {\n\t\tthis.isLintingEnabled = false\n\t}\n\n\tpublic static enableLinting() {\n\t\tthis.isLintingEnabled = true\n\t}\n\n\tprotected async writeDirectoryTemplate(options: {\n\t\tdestinationDir: string\n\t\tcode: DirectoryTemplateCode\n\t\tfilesToWrite?: string[]\n\t\tfilesToSkip?: string[]\n\t\tcontext: any\n\t\tshouldConfirmBeforeWriting?: boolean\n\t\tfirstFileWriteMessage?: string\n\t}) {\n\t\tconst {\n\t\t\tcontext,\n\t\t\tdestinationDir,\n\t\t\tfilesToWrite,\n\t\t\tfilesToSkip,\n\t\t\tshouldConfirmBeforeWriting = true,\n\t\t\tfirstFileWriteMessage,\n\t\t} = options\n\n\t\tthis.shouldConfirmBeforeWriting = shouldConfirmBeforeWriting\n\t\tthis.firstFileWriteMessage = firstFileWriteMessage\n\t\tthis.hasShownFirstWriteMessage = false\n\n\t\tconst files = await this.templates.directoryTemplate({\n\t\t\tkind: options.code,\n\t\t\tcontext: context ?? {},\n\t\t})\n\n\t\tlet results: WriteResults = []\n\n\t\tfor (const generated of files) {\n\t\t\tconst shouldWrite =\n\t\t\t\t!filesToWrite || filesToWrite.indexOf(generated.filename) > -1\n\t\t\tconst shouldSkip =\n\t\t\t\tfilesToSkip && filesToSkip.indexOf(generated.filename) > -1\n\t\t\tif (shouldWrite && !shouldSkip) {\n\t\t\t\tresults = await this.writeFileIfChangedMixinResults(\n\t\t\t\t\tpathUtil.join(destinationDir, generated.relativePath),\n\t\t\t\t\tgenerated.contents,\n\t\t\t\t\t'',\n\t\t\t\t\tresults,\n\t\t\t\t\tdestinationDir\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprotected async writeFileIfChangedMixinResults(\n\t\tdestination: string,\n\t\tcontents: string,\n\t\tdescription: string,\n\t\tresults?: WriteResults,\n\t\tcwd = ''\n\t): Promise<WriteResults> {\n\t\tconst myResults: WriteResults = results ?? []\n\t\tlet desc: string | undefined = description\n\n\t\tconst name = pathUtil.basename(destination)\n\t\tlet action: GeneratedFile['action'] = 'skipped'\n\n\t\tif (diskUtil.isDir(destination)) {\n\t\t\tthrow new Error(`Can't write to a directory ${destination}.`)\n\t\t}\n\n\t\tconst fileDescription = this.getFileDescription(destination)\n\n\t\tif (!diskUtil.doesFileExist(destination)) {\n\t\t\tlet write = true\n\t\t\tif (\n\t\t\t\tthis.shouldConfirmBeforeWriting &&\n\t\t\t\tfileDescription?.confirmPromptOnFirstWrite\n\t\t\t) {\n\t\t\t\tthis.ui.stopLoading()\n\t\t\t\twrite = await this.ui.confirm(fileDescription.confirmPromptOnFirstWrite)\n\t\t\t}\n\n\t\t\tif (write) {\n\t\t\t\tdiskUtil.writeFile(destination, contents)\n\t\t\t\taction = 'generated'\n\t\t\t}\n\t\t} else if (\n\t\t\tthis.isFileDifferent(destination, contents) &&\n\t\t\tthis.shouldOverwriteIfChanged(destination)\n\t\t) {\n\t\t\tconst cleanedName = this.cleanFilename(destination, cwd)\n\t\t\tconst settings = { skipped: [], ...this.settings.get('writer') }\n\t\t\tconst isAlwaysSkipped = settings.skipped.indexOf(cleanedName) > -1\n\t\t\tlet write = !isAlwaysSkipped\n\n\t\t\tif (!isAlwaysSkipped && this.shouldAskForOverwrite()) {\n\t\t\t\tif (!this.hasShownFirstWriteMessage && this.firstFileWriteMessage) {\n\t\t\t\t\tthis.hasShownFirstWriteMessage = true\n\t\t\t\t\tthis.ui.renderLine(this.firstFileWriteMessage)\n\t\t\t\t\tthis.ui.renderLine('')\n\t\t\t\t}\n\n\t\t\t\tconst answer = await this.ui.prompt({\n\t\t\t\t\ttype: 'select',\n\t\t\t\t\tlabel: `${cleanedName}`,\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tchoices: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: FILE_ACTION_OVERWRITE,\n\t\t\t\t\t\t\t\tlabel: 'Overwrite',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: FILE_ACTION_SKIP,\n\t\t\t\t\t\t\t\tlabel: 'Skip',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: FILE_ACTION_ALWAYS_SKIP,\n\t\t\t\t\t\t\t\tlabel: 'Always skip',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\tif (answer === FILE_ACTION_ALWAYS_SKIP) {\n\t\t\t\t\tsettings.skipped.push(cleanedName)\n\t\t\t\t\tthis.settings.set('writer', settings)\n\t\t\t\t}\n\n\t\t\t\twrite = answer === FILE_ACTION_OVERWRITE\n\t\t\t}\n\n\t\t\tif (write) {\n\t\t\t\tdiskUtil.writeFile(destination, contents)\n\t\t\t\taction = 'updated'\n\t\t\t}\n\t\t}\n\n\t\tif (!desc) {\n\t\t\tdesc = fileDescription?.description\n\t\t}\n\n\t\tif (!desc) {\n\t\t\tthrow new Error(\n\t\t\t\t`No FileDescription provided for ${destination.replace(\n\t\t\t\t\tcwd,\n\t\t\t\t\t''\n\t\t\t\t)}. Check your feature's fileDescriptions property.`\n\t\t\t)\n\t\t}\n\n\t\tmyResults.push({ name, description: desc, path: destination, action })\n\n\t\treturn myResults\n\t}\n\n\tprivate isFileDifferent(destination: string, contents: string) {\n\t\treturn diskUtil.isFileDifferent(destination, contents)\n\t}\n\n\tprivate cleanFilename(destination: string, cwd: string) {\n\t\tlet relativeFile = destination.replace(cwd, '')\n\t\tif (relativeFile[0] === pathUtil.sep) {\n\t\t\trelativeFile = relativeFile.substr(1)\n\t\t}\n\t\treturn relativeFile\n\t}\n\n\tprivate shouldOverwriteIfChanged(destination: string): boolean {\n\t\tif (!this.upgradeMode) {\n\t\t\treturn true\n\t\t}\n\n\t\tif (this.upgradeMode === 'forceEverything') {\n\t\t\treturn true\n\t\t}\n\n\t\tlet description: FileDescription | undefined =\n\t\t\tthis.getFileDescription(destination)\n\n\t\treturn description?.shouldOverwriteWhenChanged ?? false\n\t}\n\n\tprivate getFileDescription(destination: string): FileDescription | undefined {\n\t\tconst lower = destination.toLowerCase()\n\t\tfor (const d of this.fileDescriptions ?? []) {\n\t\t\tif (lower.search(d.path.toLowerCase()) > -1) {\n\t\t\t\treturn d\n\t\t\t}\n\t\t}\n\n\t\treturn undefined\n\t}\n\n\tprivate shouldAskForOverwrite() {\n\t\tif (\n\t\t\tthis.shouldConfirmBeforeWriting &&\n\t\t\tthis.upgradeMode === 'askForChanged'\n\t\t) {\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\tprotected resolveFilenameWithFallback(\n\t\tdirOrFile: string,\n\t\tfallbackFileName: string\n\t) {\n\t\tconst isDir =\n\t\t\tdiskUtil.doesDirExist(dirOrFile) &&\n\t\t\tfs.lstatSync(dirOrFile).isDirectory() &&\n\t\t\tpathUtil.extname(dirOrFile).length === 0\n\t\treturn isDir ? diskUtil.resolvePath(dirOrFile, fallbackFileName) : dirOrFile\n\t}\n}\n"],"file":"AbstractWriter.js"}
|
|
1
|
+
{"version":3,"sources":["../../src/writers/AbstractWriter.ts"],"names":["AbstractWriter","options","templates","ui","term","upgradeMode","fileDescriptions","linter","settings","file","isLintingEnabled","startLoading","pathUtil","basename","fix","context","destinationDir","filesToWrite","filesToSkip","shouldConfirmBeforeWriting","firstFileWriteMessage","hasShownFirstWriteMessage","directoryTemplate","kind","code","files","results","generated","shouldWrite","indexOf","filename","shouldSkip","writeFileIfChangedMixinResults","join","relativePath","contents","destination","description","cwd","myResults","desc","name","action","diskUtil","isDir","Error","fileDescription","getFileDescription","doesFileExist","write","confirmPromptOnFirstWrite","stopLoading","confirm","writeFile","isFileDifferent","shouldOverwriteIfChanged","cleanedName","cleanFilename","skipped","get","isAlwaysSkipped","shouldAskForOverwrite","renderLine","prompt","type","label","choices","value","FILE_ACTION_OVERWRITE","FILE_ACTION_SKIP","FILE_ACTION_ALWAYS_SKIP","answer","push","set","replace","path","relativeFile","sep","substr","shouldOverwriteWhenChanged","lower","toLowerCase","d","search","undefined","dirOrFile","fallbackFileName","doesDirExist","fs","lstatSync","isDirectory","extname","length","resolvePath"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;;;;;;;;;IA8B8BA,c;AAY7B,0BAAmBC,OAAnB,EAA2C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+DAPG,EAOH;AAAA,yEANN,IAMM;AAAA;AAAA,wEAHP,KAGO;AAAA;AAC1C,SAAKC,SAAL,GAAiBD,OAAO,CAACC,SAAzB;AACA,SAAKC,EAAL,GAAUF,OAAO,CAACG,IAAlB;AACA,SAAKC,WAAL,GAAmBJ,OAAO,CAACI,WAA3B;AACA,SAAKC,gBAAL,GAAwBL,OAAO,CAACK,gBAAhC;AACA,SAAKC,MAAL,GAAcN,OAAO,CAACM,MAAtB;AACA,SAAKC,QAAL,GAAgBP,OAAO,CAACO,QAAxB;AACA;;;;;gGAED,iBAAqBC,IAArB;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA,qBACKT,cAAc,CAACU,gBADpB;AAAA;AAAA;AAAA;;AAEE,qBAAKP,EAAL,CAAQQ,YAAR,mBAAgCC,iBAASC,QAAT,CAAkBJ,IAAlB,CAAhC;AAFF;AAAA,uCAGQ,KAAKF,MAHb,iDAGQ,aAAaO,GAAb,CAAiBL,IAAjB,WAA6B,YAAM,CAAE,CAArC,CAHR;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;kHAeA,kBACCR,OADD;AAAA;;AAAA;AAAA;AAAA;AAAA;AAIEc,gBAAAA,OAJF,GAUKd,OAVL,CAIEc,OAJF,EAKEC,cALF,GAUKf,OAVL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AHxC;AAIA,aAAOhD,KAAK,GAAGD,2BAASkD,WAAT,CAAqBR,SAArB,EAAgCC,gBAAhC,CAAH,GAAuDD,SAAnE;AACA;;;WApND,0BAA+B;AAC9B,WAAK3E,gBAAL,GAAwB,KAAxB;AACA;;;WAED,yBAA8B;AAC7B,WAAKA,gBAAL,GAAwB,IAAxB;AACA;;;;;;iCAlC4BV,c,sBAOK,I","sourcesContent":["import fs from 'fs'\nimport pathUtil from 'path'\nimport { diskUtil, SettingsService } from '@sprucelabs/spruce-skill-utils'\nimport { DirectoryTemplateCode, Templates } from '@sprucelabs/spruce-templates'\nimport {\n\tFILE_ACTION_ALWAYS_SKIP,\n\tFILE_ACTION_OVERWRITE,\n\tFILE_ACTION_SKIP,\n} from '../constants'\nimport LintService from '../services/LintService'\nimport { FileDescription, GeneratedFile, UpgradeMode } from '../types/cli.types'\nimport { GraphicsInterface } from '../types/cli.types'\n\nexport type WriteResults = GeneratedFile[]\n\nexport interface WriterOptions {\n\ttemplates: Templates\n\tterm: GraphicsInterface\n\tupgradeMode?: UpgradeMode\n\tfileDescriptions: FileDescription[]\n\tlinter?: LintService\n\tsettings: SettingsService\n}\n\nexport interface WriteDirectoryTemplateOptions {\n\tdestinationDir: string\n\tcode: DirectoryTemplateCode\n\tfilesToWrite?: string[]\n\tfilesToSkip?: string[]\n\tcontext: any\n\tshouldConfirmBeforeWriting?: boolean\n\tfirstFileWriteMessage?: string\n}\n\nexport default abstract class AbstractWriter {\n\tprotected templates: Templates\n\tprotected ui: GraphicsInterface\n\tprivate linter?: LintService\n\tprivate upgradeMode: UpgradeMode\n\tprivate fileDescriptions: FileDescription[] = []\n\tprivate shouldConfirmBeforeWriting = true\n\tprivate static isLintingEnabled = true\n\tprivate firstFileWriteMessage?: string\n\tprivate hasShownFirstWriteMessage = false\n\tprivate settings: SettingsService<string>\n\n\tpublic constructor(options: WriterOptions) {\n\t\tthis.templates = options.templates\n\t\tthis.ui = options.term\n\t\tthis.upgradeMode = options.upgradeMode\n\t\tthis.fileDescriptions = options.fileDescriptions\n\t\tthis.linter = options.linter\n\t\tthis.settings = options.settings\n\t}\n\n\tprotected async lint(file: string) {\n\t\tif (AbstractWriter.isLintingEnabled) {\n\t\t\tthis.ui.startLoading(`Linting ${pathUtil.basename(file)}...`)\n\t\t\tawait this.linter?.fix(file).catch(() => {})\n\t\t}\n\t}\n\n\tpublic static disableLinting() {\n\t\tthis.isLintingEnabled = false\n\t}\n\n\tpublic static enableLinting() {\n\t\tthis.isLintingEnabled = true\n\t}\n\n\tprotected async writeDirectoryTemplate(\n\t\toptions: WriteDirectoryTemplateOptions\n\t) {\n\t\tconst {\n\t\t\tcontext,\n\t\t\tdestinationDir,\n\t\t\tfilesToWrite,\n\t\t\tfilesToSkip,\n\t\t\tshouldConfirmBeforeWriting = true,\n\t\t\tfirstFileWriteMessage,\n\t\t} = options\n\n\t\tthis.shouldConfirmBeforeWriting = shouldConfirmBeforeWriting\n\t\tthis.firstFileWriteMessage = firstFileWriteMessage\n\t\tthis.hasShownFirstWriteMessage = false\n\n\t\tconst files = await this.templates.directoryTemplate({\n\t\t\tkind: options.code,\n\t\t\tcontext: context ?? {},\n\t\t})\n\n\t\tlet results: WriteResults = []\n\n\t\tfor (const generated of files) {\n\t\t\tconst shouldWrite =\n\t\t\t\t!filesToWrite || filesToWrite.indexOf(generated.filename) > -1\n\t\t\tconst shouldSkip =\n\t\t\t\tfilesToSkip && filesToSkip.indexOf(generated.filename) > -1\n\n\t\t\tif (shouldWrite && !shouldSkip) {\n\t\t\t\tresults = await this.writeFileIfChangedMixinResults(\n\t\t\t\t\tpathUtil.join(destinationDir, generated.relativePath),\n\t\t\t\t\tgenerated.contents,\n\t\t\t\t\t'',\n\t\t\t\t\tresults,\n\t\t\t\t\tdestinationDir\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn results\n\t}\n\n\tprotected async writeFileIfChangedMixinResults(\n\t\tdestination: string,\n\t\tcontents: string,\n\t\tdescription: string,\n\t\tresults?: WriteResults,\n\t\tcwd = ''\n\t): Promise<WriteResults> {\n\t\tconst myResults: WriteResults = results ?? []\n\t\tlet desc: string | undefined = description\n\n\t\tconst name = pathUtil.basename(destination)\n\t\tlet action: GeneratedFile['action'] = 'skipped'\n\n\t\tif (diskUtil.isDir(destination)) {\n\t\t\tthrow new Error(`Can't write to a directory ${destination}.`)\n\t\t}\n\n\t\tconst fileDescription = this.getFileDescription(destination)\n\n\t\tif (!diskUtil.doesFileExist(destination)) {\n\t\t\tlet write = true\n\n\t\t\tif (\n\t\t\t\tthis.shouldConfirmBeforeWriting &&\n\t\t\t\tfileDescription?.confirmPromptOnFirstWrite\n\t\t\t) {\n\t\t\t\tthis.ui.stopLoading()\n\t\t\t\twrite = await this.ui.confirm(fileDescription.confirmPromptOnFirstWrite)\n\t\t\t}\n\n\t\t\tif (write) {\n\t\t\t\tdiskUtil.writeFile(destination, contents)\n\t\t\t\taction = 'generated'\n\t\t\t}\n\t\t} else if (\n\t\t\tthis.isFileDifferent(destination, contents) &&\n\t\t\tthis.shouldOverwriteIfChanged(destination)\n\t\t) {\n\t\t\tconst cleanedName = this.cleanFilename(destination, cwd)\n\t\t\tconst settings = { skipped: [], ...this.settings.get('writer') }\n\t\t\tconst isAlwaysSkipped = settings.skipped.indexOf(cleanedName) > -1\n\t\t\tlet write = !isAlwaysSkipped\n\n\t\t\tif (!isAlwaysSkipped && this.shouldAskForOverwrite()) {\n\t\t\t\tif (!this.hasShownFirstWriteMessage && this.firstFileWriteMessage) {\n\t\t\t\t\tthis.hasShownFirstWriteMessage = true\n\t\t\t\t\tthis.ui.renderLine(this.firstFileWriteMessage)\n\t\t\t\t\tthis.ui.renderLine('')\n\t\t\t\t}\n\n\t\t\t\tconst answer = await this.ui.prompt({\n\t\t\t\t\ttype: 'select',\n\t\t\t\t\tlabel: `${cleanedName}`,\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tchoices: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: FILE_ACTION_OVERWRITE,\n\t\t\t\t\t\t\t\tlabel: 'Overwrite',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: FILE_ACTION_SKIP,\n\t\t\t\t\t\t\t\tlabel: 'Skip',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: FILE_ACTION_ALWAYS_SKIP,\n\t\t\t\t\t\t\t\tlabel: 'Always skip',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\tif (answer === FILE_ACTION_ALWAYS_SKIP) {\n\t\t\t\t\tsettings.skipped.push(cleanedName)\n\t\t\t\t\tthis.settings.set('writer', settings)\n\t\t\t\t}\n\n\t\t\t\twrite = answer === FILE_ACTION_OVERWRITE\n\t\t\t}\n\n\t\t\tif (write) {\n\t\t\t\tdiskUtil.writeFile(destination, contents)\n\t\t\t\taction = 'updated'\n\t\t\t}\n\t\t}\n\n\t\tif (!desc) {\n\t\t\tdesc = fileDescription?.description\n\t\t}\n\n\t\tif (!desc) {\n\t\t\tthrow new Error(\n\t\t\t\t`No FileDescription provided for ${destination.replace(\n\t\t\t\t\tcwd,\n\t\t\t\t\t''\n\t\t\t\t)}. Check your feature's fileDescriptions property.`\n\t\t\t)\n\t\t}\n\n\t\tmyResults.push({ name, description: desc, path: destination, action })\n\n\t\treturn myResults\n\t}\n\n\tprivate isFileDifferent(destination: string, contents: string) {\n\t\treturn diskUtil.isFileDifferent(destination, contents)\n\t}\n\n\tprivate cleanFilename(destination: string, cwd: string) {\n\t\tlet relativeFile = destination.replace(cwd, '')\n\t\tif (relativeFile[0] === pathUtil.sep) {\n\t\t\trelativeFile = relativeFile.substr(1)\n\t\t}\n\t\treturn relativeFile\n\t}\n\n\tprivate shouldOverwriteIfChanged(destination: string): boolean {\n\t\tif (!this.upgradeMode) {\n\t\t\treturn true\n\t\t}\n\n\t\tif (this.upgradeMode === 'forceEverything') {\n\t\t\treturn true\n\t\t}\n\n\t\tlet description: FileDescription | undefined =\n\t\t\tthis.getFileDescription(destination)\n\n\t\treturn description?.shouldOverwriteWhenChanged ?? false\n\t}\n\n\tprivate getFileDescription(destination: string): FileDescription | undefined {\n\t\tconst lower = destination.toLowerCase()\n\t\tfor (const d of this.fileDescriptions ?? []) {\n\t\t\tif (lower.search(d.path.toLowerCase()) > -1) {\n\t\t\t\treturn d\n\t\t\t}\n\t\t}\n\n\t\treturn undefined\n\t}\n\n\tprivate shouldAskForOverwrite() {\n\t\tif (\n\t\t\tthis.shouldConfirmBeforeWriting &&\n\t\t\tthis.upgradeMode === 'askForChanged'\n\t\t) {\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\tprotected resolveFilenameWithFallback(\n\t\tdirOrFile: string,\n\t\tfallbackFileName: string\n\t) {\n\t\tconst isDir =\n\t\t\tdiskUtil.doesDirExist(dirOrFile) &&\n\t\t\tfs.lstatSync(dirOrFile).isDirectory() &&\n\t\t\tpathUtil.extname(dirOrFile).length === 0\n\t\treturn isDir ? diskUtil.resolvePath(dirOrFile, fallbackFileName) : dirOrFile\n\t}\n}\n"],"file":"AbstractWriter.js"}
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"skill": {
|
|
8
8
|
"namespace": "spruce-cli",
|
|
9
9
|
"upgradeIgnoreList": [
|
|
10
|
+
"chalk",
|
|
10
11
|
"emphasize",
|
|
11
12
|
"gifwrap",
|
|
12
13
|
"globby",
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
]
|
|
18
19
|
},
|
|
19
20
|
"license": "MIT",
|
|
20
|
-
"version": "14.
|
|
21
|
+
"version": "14.28.2",
|
|
21
22
|
"bin": {
|
|
22
23
|
"spruce": "./build/index.js"
|
|
23
24
|
},
|
|
@@ -74,26 +75,26 @@
|
|
|
74
75
|
"@babel/cli": "^7.16.0",
|
|
75
76
|
"@babel/plugin-proposal-decorators": "^7.16.4",
|
|
76
77
|
"@babel/runtime": "^7.16.3",
|
|
77
|
-
"@jest/reporters": "^27.
|
|
78
|
-
"@sprucelabs/error": "^5.0.
|
|
79
|
-
"@sprucelabs/heartwood-view-controllers": "^
|
|
80
|
-
"@sprucelabs/jest-json-reporter": "^6.0.
|
|
81
|
-
"@sprucelabs/mercury-client": "^17.
|
|
82
|
-
"@sprucelabs/mercury-event-emitter": "^17.
|
|
83
|
-
"@sprucelabs/mercury-types": "^26.1.
|
|
84
|
-
"@sprucelabs/schema": "^25.4.
|
|
85
|
-
"@sprucelabs/spruce-core-schemas": "^22.6.
|
|
86
|
-
"@sprucelabs/spruce-event-plugin": "^
|
|
87
|
-
"@sprucelabs/spruce-event-utils": "^17.1.
|
|
88
|
-
"@sprucelabs/spruce-skill-booter": "^
|
|
89
|
-
"@sprucelabs/spruce-skill-utils": "^22.
|
|
90
|
-
"@sprucelabs/spruce-templates": "^14.
|
|
78
|
+
"@jest/reporters": "^27.4.2",
|
|
79
|
+
"@sprucelabs/error": "^5.0.308",
|
|
80
|
+
"@sprucelabs/heartwood-view-controllers": "^51.5.9",
|
|
81
|
+
"@sprucelabs/jest-json-reporter": "^6.0.259",
|
|
82
|
+
"@sprucelabs/mercury-client": "^17.2.15",
|
|
83
|
+
"@sprucelabs/mercury-event-emitter": "^17.2.15",
|
|
84
|
+
"@sprucelabs/mercury-types": "^26.1.950",
|
|
85
|
+
"@sprucelabs/schema": "^25.4.47",
|
|
86
|
+
"@sprucelabs/spruce-core-schemas": "^22.6.217",
|
|
87
|
+
"@sprucelabs/spruce-event-plugin": "^15.1.0",
|
|
88
|
+
"@sprucelabs/spruce-event-utils": "^17.1.224",
|
|
89
|
+
"@sprucelabs/spruce-skill-booter": "^15.1.0",
|
|
90
|
+
"@sprucelabs/spruce-skill-utils": "^22.1.27",
|
|
91
|
+
"@sprucelabs/spruce-templates": "^14.28.2",
|
|
91
92
|
"cfonts": "^2.10.0",
|
|
92
93
|
"chalk": "^4.1.2",
|
|
93
94
|
"chokidar": "^3.5.2",
|
|
94
95
|
"cli-table3": "^0.6.0",
|
|
95
96
|
"commander": "^7.2.0",
|
|
96
|
-
"core-js": "^3.19.
|
|
97
|
+
"core-js": "^3.19.2",
|
|
97
98
|
"emphasize": "^4.2.0",
|
|
98
99
|
"fs-extra": "^10.0.0",
|
|
99
100
|
"gifwrap": "SimenB/gifwrap#patch-1",
|
|
@@ -116,16 +117,16 @@
|
|
|
116
117
|
"uuid": "^8.3.2"
|
|
117
118
|
},
|
|
118
119
|
"devDependencies": {
|
|
119
|
-
"@sprucelabs/data-stores": "^7.1.
|
|
120
|
-
"@sprucelabs/jest-sheets-reporter": "^1.2.
|
|
121
|
-
"@sprucelabs/mercury-core-events": "^1.6.
|
|
122
|
-
"@sprucelabs/resolve-path-aliases": "^1.0.
|
|
123
|
-
"@sprucelabs/spruce-conversation-plugin": "^
|
|
124
|
-
"@sprucelabs/spruce-deploy-plugin": "^
|
|
125
|
-
"@sprucelabs/spruce-store-plugin": "^
|
|
126
|
-
"@sprucelabs/spruce-test-fixtures": "^
|
|
127
|
-
"@sprucelabs/test": "^7.7.
|
|
128
|
-
"@sprucelabs/test-utils": "^3.0.
|
|
120
|
+
"@sprucelabs/data-stores": "^7.1.34",
|
|
121
|
+
"@sprucelabs/jest-sheets-reporter": "^1.2.264",
|
|
122
|
+
"@sprucelabs/mercury-core-events": "^1.6.161",
|
|
123
|
+
"@sprucelabs/resolve-path-aliases": "^1.0.233",
|
|
124
|
+
"@sprucelabs/spruce-conversation-plugin": "^15.1.0",
|
|
125
|
+
"@sprucelabs/spruce-deploy-plugin": "^15.1.0",
|
|
126
|
+
"@sprucelabs/spruce-store-plugin": "^15.1.0",
|
|
127
|
+
"@sprucelabs/spruce-test-fixtures": "^15.1.0",
|
|
128
|
+
"@sprucelabs/test": "^7.7.242",
|
|
129
|
+
"@sprucelabs/test-utils": "^3.0.291",
|
|
129
130
|
"@types/blessed": "^0.1.19",
|
|
130
131
|
"@types/eslint": "^8.2.0",
|
|
131
132
|
"@types/fs-extra": "^9.0.13",
|
|
@@ -135,7 +136,7 @@
|
|
|
135
136
|
"@types/lodash": "^4.14.177",
|
|
136
137
|
"@types/md5": "^2.3.1",
|
|
137
138
|
"@types/mkdirp": "^1.0.2",
|
|
138
|
-
"@types/node": "^16.11.
|
|
139
|
+
"@types/node": "^16.11.11",
|
|
139
140
|
"@types/promise.allsettled": "^1.0.3",
|
|
140
141
|
"@types/ps-node": "^0.1.1",
|
|
141
142
|
"@types/rimraf": "^3.0.2",
|
|
@@ -152,11 +153,11 @@
|
|
|
152
153
|
"eslint": "^8.3.0",
|
|
153
154
|
"eslint-config-spruce": "^10.10.16",
|
|
154
155
|
"find-process": "^1.4.7",
|
|
155
|
-
"jest": "^27.
|
|
156
|
-
"jest-circus": "^27.
|
|
156
|
+
"jest": "^27.4.2",
|
|
157
|
+
"jest-circus": "^27.4.2",
|
|
157
158
|
"jest-junit": "^13.0.0",
|
|
158
159
|
"jest-reporters": "^0.0.2",
|
|
159
|
-
"prettier": "^2.
|
|
160
|
+
"prettier": "^2.5.0",
|
|
160
161
|
"ps-node": "^0.1.6",
|
|
161
162
|
"rimraf": "^3.0.2",
|
|
162
163
|
"ts-jest": "^27.0.7",
|
|
@@ -584,6 +585,7 @@
|
|
|
584
585
|
},
|
|
585
586
|
"yarn-upgrade-all": {
|
|
586
587
|
"ignore": [
|
|
588
|
+
"chalk",
|
|
587
589
|
"emphasize",
|
|
588
590
|
"gifwrap",
|
|
589
591
|
"globby",
|
|
@@ -593,5 +595,5 @@
|
|
|
593
595
|
"ora"
|
|
594
596
|
]
|
|
595
597
|
},
|
|
596
|
-
"gitHead": "
|
|
598
|
+
"gitHead": "ce0a3224b4c90a432d6533fa976498e1881ac8fc"
|
|
597
599
|
}
|
|
@@ -968,6 +968,35 @@ export declare namespace SpruceErrors.SpruceCli {
|
|
|
968
968
|
|
|
969
969
|
|
|
970
970
|
|
|
971
|
+
export declare namespace SpruceErrors.SpruceCli {
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
export interface DependencyExists {
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
'namespace': string
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
export interface DependencyExistsSchema extends SpruceSchema.Schema {
|
|
981
|
+
id: 'dependencyExists',
|
|
982
|
+
namespace: 'SpruceCli',
|
|
983
|
+
name: 'Dependency exists',
|
|
984
|
+
fields: {
|
|
985
|
+
/** . */
|
|
986
|
+
'namespace': {
|
|
987
|
+
type: 'text',
|
|
988
|
+
isRequired: true,
|
|
989
|
+
options: undefined
|
|
990
|
+
},
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
export type DependencyExistsEntity = SchemaEntity<SpruceErrors.SpruceCli.DependencyExistsSchema>
|
|
995
|
+
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
|
|
971
1000
|
export declare namespace SpruceErrors.SpruceCli {
|
|
972
1001
|
|
|
973
1002
|
/** Autoloader creation failed */
|
|
@@ -94,6 +94,9 @@ export interface DirectoryEmptyErrorOptions extends SpruceErrors.SpruceCli.Direc
|
|
|
94
94
|
export interface DeployFailedErrorOptions extends SpruceErrors.SpruceCli.DeployFailed, ISpruceErrorOptions {
|
|
95
95
|
code: 'DEPLOY_FAILED'
|
|
96
96
|
}
|
|
97
|
+
export interface DependencyExistsErrorOptions extends SpruceErrors.SpruceCli.DependencyExists, ISpruceErrorOptions {
|
|
98
|
+
code: 'DEPENDENCY_EXISTS'
|
|
99
|
+
}
|
|
97
100
|
export interface CreateAutoloaderFailedErrorOptions extends SpruceErrors.SpruceCli.CreateAutoloaderFailed, ISpruceErrorOptions {
|
|
98
101
|
code: 'CREATE_AUTOLOADER_FAILED'
|
|
99
102
|
}
|
|
@@ -119,6 +122,6 @@ export interface ActionCancelledErrorOptions extends SpruceErrors.SpruceCli.Acti
|
|
|
119
122
|
code: 'ACTION_CANCELLED'
|
|
120
123
|
}
|
|
121
124
|
|
|
122
|
-
type ErrorOptions = | VscodeNotInstalledErrorOptions | TransportAlreadyExistsErrorOptions | ThemeExistsErrorOptions | TestFailedErrorOptions | StoreExistsErrorOptions | SkillViewExistsErrorOptions | SkillNotRegisteredErrorOptions | SkillNotFoundErrorOptions | SchemaTemplateItemBuildingFailedErrorOptions | SchemaFailedToImportErrorOptions | SchemaExistsErrorOptions | NotLoggedInErrorOptions | NotImplementedErrorOptions | NoSkillsRegisteredErrorOptions | NoOrganizationsFoundErrorOptions | MissingDependenciesErrorOptions | MercuryResponseErrorErrorOptions | LintFailedErrorOptions | InvalidTestDirectoryErrorOptions | InvalidFeatureCodeErrorOptions | InvalidEventContractErrorOptions | InvalidCommandErrorOptions | GenericErrorOptions | FileExistsErrorOptions | FeatureNotInstalledErrorOptions | FailedToImportErrorOptions | ExecutingCommandFailedErrorOptions | DockerNotStartedErrorOptions | DirectoryNotSkillErrorOptions | DirectoryEmptyErrorOptions | DeployFailedErrorOptions | CreateAutoloaderFailedErrorOptions | CommandNotImplementedErrorOptions | CommandBlockedErrorOptions | CommandAbortedErrorOptions | CacheNotEnabledErrorOptions | BuildFailedErrorOptions | BootErrorErrorOptions | ActionCancelledErrorOptions
|
|
125
|
+
type ErrorOptions = | VscodeNotInstalledErrorOptions | TransportAlreadyExistsErrorOptions | ThemeExistsErrorOptions | TestFailedErrorOptions | StoreExistsErrorOptions | SkillViewExistsErrorOptions | SkillNotRegisteredErrorOptions | SkillNotFoundErrorOptions | SchemaTemplateItemBuildingFailedErrorOptions | SchemaFailedToImportErrorOptions | SchemaExistsErrorOptions | NotLoggedInErrorOptions | NotImplementedErrorOptions | NoSkillsRegisteredErrorOptions | NoOrganizationsFoundErrorOptions | MissingDependenciesErrorOptions | MercuryResponseErrorErrorOptions | LintFailedErrorOptions | InvalidTestDirectoryErrorOptions | InvalidFeatureCodeErrorOptions | InvalidEventContractErrorOptions | InvalidCommandErrorOptions | GenericErrorOptions | FileExistsErrorOptions | FeatureNotInstalledErrorOptions | FailedToImportErrorOptions | ExecutingCommandFailedErrorOptions | DockerNotStartedErrorOptions | DirectoryNotSkillErrorOptions | DirectoryEmptyErrorOptions | DeployFailedErrorOptions | DependencyExistsErrorOptions | CreateAutoloaderFailedErrorOptions | CommandNotImplementedErrorOptions | CommandBlockedErrorOptions | CommandAbortedErrorOptions | CacheNotEnabledErrorOptions | BuildFailedErrorOptions | BootErrorErrorOptions | ActionCancelledErrorOptions
|
|
123
126
|
|
|
124
127
|
export default ErrorOptions
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SchemaRegistry } from '@sprucelabs/schema'
|
|
2
|
+
import { SpruceErrors } from '../errors.types'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const dependencyExistsSchema: SpruceErrors.SpruceCli.DependencyExistsSchema = {
|
|
7
|
+
id: 'dependencyExists',
|
|
8
|
+
namespace: 'SpruceCli',
|
|
9
|
+
name: 'Dependency exists',
|
|
10
|
+
fields: {
|
|
11
|
+
/** . */
|
|
12
|
+
'namespace': {
|
|
13
|
+
type: 'text',
|
|
14
|
+
isRequired: true,
|
|
15
|
+
options: undefined
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
SchemaRegistry.getInstance().trackSchema(dependencyExistsSchema)
|
|
21
|
+
|
|
22
|
+
export default dependencyExistsSchema
|
|
@@ -1,40 +1,4 @@
|
|
|
1
1
|
import { coreEventContracts } from '@sprucelabs/mercury-core-events'
|
|
2
|
-
import appointmentsDidBookAppointmentsEventContract_v2021_06_23, {
|
|
3
|
-
DidBookAppointmentsEventContract as AppointmentsDidBookAppointmentsEventContract_v2021_06_23,
|
|
4
|
-
} from '#spruce/events/appointments/didBookAppointments.v2021_06_23.contract'
|
|
5
|
-
import calendarCreateCalendarEventTypeEventContract_v2021_05_19, {
|
|
6
|
-
CreateCalendarEventTypeEventContract as CalendarCreateCalendarEventTypeEventContract_v2021_05_19,
|
|
7
|
-
} from '#spruce/events/calendar/createCalendarEventType.v2021_05_19.contract'
|
|
8
|
-
import calendarListCalendarEventTypesEventContract_v2021_05_19, {
|
|
9
|
-
ListCalendarEventTypesEventContract as CalendarListCalendarEventTypesEventContract_v2021_05_19,
|
|
10
|
-
} from '#spruce/events/calendar/listCalendarEventTypes.v2021_05_19.contract'
|
|
11
|
-
import formsConvertPdfToFormEventContract_v2021_07_02, {
|
|
12
|
-
ConvertPdfToFormEventContract as FormsConvertPdfToFormEventContract_v2021_07_02,
|
|
13
|
-
} from '#spruce/events/forms/convertPdfToForm.v2021_07_02.contract'
|
|
14
|
-
import formsConvertPdfToSchemasEventContract_v2021_07_02, {
|
|
15
|
-
ConvertPdfToSchemasEventContract as FormsConvertPdfToSchemasEventContract_v2021_07_02,
|
|
16
|
-
} from '#spruce/events/forms/convertPdfToSchemas.v2021_07_02.contract'
|
|
17
|
-
import formsCreateFormEventContract_v2021_07_02, {
|
|
18
|
-
CreateFormEventContract as FormsCreateFormEventContract_v2021_07_02,
|
|
19
|
-
} from '#spruce/events/forms/createForm.v2021_07_02.contract'
|
|
20
|
-
import formsDeleteCompletedFormEventContract_v2021_07_02, {
|
|
21
|
-
DeleteCompletedFormEventContract as FormsDeleteCompletedFormEventContract_v2021_07_02,
|
|
22
|
-
} from '#spruce/events/forms/deleteCompletedForm.v2021_07_02.contract'
|
|
23
|
-
import formsDidUpdateCompletedFormEventContract_v2021_07_02, {
|
|
24
|
-
DidUpdateCompletedFormEventContract as FormsDidUpdateCompletedFormEventContract_v2021_07_02,
|
|
25
|
-
} from '#spruce/events/forms/didUpdateCompletedForm.v2021_07_02.contract'
|
|
26
|
-
import formsGetCompletedFormEventContract_v2021_07_02, {
|
|
27
|
-
GetCompletedFormEventContract as FormsGetCompletedFormEventContract_v2021_07_02,
|
|
28
|
-
} from '#spruce/events/forms/getCompletedForm.v2021_07_02.contract'
|
|
29
|
-
import formsListCompletedFormsEventContract_v2021_07_02, {
|
|
30
|
-
ListCompletedFormsEventContract as FormsListCompletedFormsEventContract_v2021_07_02,
|
|
31
|
-
} from '#spruce/events/forms/listCompletedForms.v2021_07_02.contract'
|
|
32
|
-
import formsListFormsEventContract_v2021_07_02, {
|
|
33
|
-
ListFormsEventContract as FormsListFormsEventContract_v2021_07_02,
|
|
34
|
-
} from '#spruce/events/forms/listForms.v2021_07_02.contract'
|
|
35
|
-
import formsUpdateCompletedFormEventContract_v2021_07_02, {
|
|
36
|
-
UpdateCompletedFormEventContract as FormsUpdateCompletedFormEventContract_v2021_07_02,
|
|
37
|
-
} from '#spruce/events/forms/updateCompletedForm.v2021_07_02.contract'
|
|
38
2
|
import heartwoodDidRegisterSkillViewsEventContract_v2021_02_11, {
|
|
39
3
|
DidRegisterSkillViewsEventContract as HeartwoodDidRegisterSkillViewsEventContract_v2021_02_11,
|
|
40
4
|
} from '#spruce/events/heartwood/didRegisterSkillViews.v2021_02_11.contract'
|
|
@@ -47,44 +11,12 @@ import heartwoodGetSkillViewsEventContract_v2021_02_11, {
|
|
|
47
11
|
import heartwoodRegisterSkillViewsEventContract_v2021_02_11, {
|
|
48
12
|
RegisterSkillViewsEventContract as HeartwoodRegisterSkillViewsEventContract_v2021_02_11,
|
|
49
13
|
} from '#spruce/events/heartwood/registerSkillViews.v2021_02_11.contract'
|
|
50
|
-
import mySkill163362874854325100MyCoolEventEventContract_v2021_01_22, {
|
|
51
|
-
MyCoolEventEventContract as MySkill163362874854325100MyCoolEventEventContract_v2021_01_22,
|
|
52
|
-
} from '#spruce/events/mySkill163362874854325100/myCoolEvent.v2021_01_22.contract'
|
|
53
|
-
import mySkill163362882591525586MyCoolEventEventContract_v2021_01_22, {
|
|
54
|
-
MyCoolEventEventContract as MySkill163362882591525586MyCoolEventEventContract_v2021_01_22,
|
|
55
|
-
} from '#spruce/events/mySkill163362882591525586/myCoolEvent.v2021_01_22.contract'
|
|
56
|
-
import mySkill163459634973936127MyCoolEventEventContract_v2021_01_22, {
|
|
57
|
-
MyCoolEventEventContract as MySkill163459634973936127MyCoolEventEventContract_v2021_01_22,
|
|
58
|
-
} from '#spruce/events/mySkill163459634973936127/myCoolEvent.v2021_01_22.contract'
|
|
59
|
-
import mySkill163493473102035607MyCoolEventEventContract_v2021_01_22, {
|
|
60
|
-
MyCoolEventEventContract as MySkill163493473102035607MyCoolEventEventContract_v2021_01_22,
|
|
61
|
-
} from '#spruce/events/mySkill163493473102035607/myCoolEvent.v2021_01_22.contract'
|
|
62
|
-
import mySkill163493479880935941MyCoolEventEventContract_v2021_01_22, {
|
|
63
|
-
MyCoolEventEventContract as MySkill163493479880935941MyCoolEventEventContract_v2021_01_22,
|
|
64
|
-
} from '#spruce/events/mySkill163493479880935941/myCoolEvent.v2021_01_22.contract'
|
|
65
14
|
|
|
66
15
|
export default [
|
|
67
16
|
heartwoodDidRegisterSkillViewsEventContract_v2021_02_11,
|
|
68
17
|
heartwoodGenerateUrlEventContract_v2021_02_11,
|
|
69
18
|
heartwoodGetSkillViewsEventContract_v2021_02_11,
|
|
70
19
|
heartwoodRegisterSkillViewsEventContract_v2021_02_11,
|
|
71
|
-
calendarCreateCalendarEventTypeEventContract_v2021_05_19,
|
|
72
|
-
calendarListCalendarEventTypesEventContract_v2021_05_19,
|
|
73
|
-
mySkill163362874854325100MyCoolEventEventContract_v2021_01_22,
|
|
74
|
-
mySkill163362882591525586MyCoolEventEventContract_v2021_01_22,
|
|
75
|
-
formsConvertPdfToFormEventContract_v2021_07_02,
|
|
76
|
-
formsConvertPdfToSchemasEventContract_v2021_07_02,
|
|
77
|
-
formsCreateFormEventContract_v2021_07_02,
|
|
78
|
-
formsDeleteCompletedFormEventContract_v2021_07_02,
|
|
79
|
-
formsDidUpdateCompletedFormEventContract_v2021_07_02,
|
|
80
|
-
formsGetCompletedFormEventContract_v2021_07_02,
|
|
81
|
-
formsListCompletedFormsEventContract_v2021_07_02,
|
|
82
|
-
formsListFormsEventContract_v2021_07_02,
|
|
83
|
-
formsUpdateCompletedFormEventContract_v2021_07_02,
|
|
84
|
-
appointmentsDidBookAppointmentsEventContract_v2021_06_23,
|
|
85
|
-
mySkill163459634973936127MyCoolEventEventContract_v2021_01_22,
|
|
86
|
-
mySkill163493473102035607MyCoolEventEventContract_v2021_01_22,
|
|
87
|
-
mySkill163493479880935941MyCoolEventEventContract_v2021_01_22,
|
|
88
20
|
...coreEventContracts,
|
|
89
21
|
]
|
|
90
22
|
|
|
@@ -97,39 +29,5 @@ declare module '@sprucelabs/mercury-types/build/types/mercury.types' {
|
|
|
97
29
|
'heartwood.get-skill-views::v2021_02_11': HeartwoodGetSkillViewsEventContract_v2021_02_11['eventSignatures']['heartwood.get-skill-views::v2021_02_11']
|
|
98
30
|
|
|
99
31
|
'heartwood.register-skill-views::v2021_02_11': HeartwoodRegisterSkillViewsEventContract_v2021_02_11['eventSignatures']['heartwood.register-skill-views::v2021_02_11']
|
|
100
|
-
|
|
101
|
-
'calendar.create-calendar-event-type::v2021_05_19': CalendarCreateCalendarEventTypeEventContract_v2021_05_19['eventSignatures']['calendar.create-calendar-event-type::v2021_05_19']
|
|
102
|
-
|
|
103
|
-
'calendar.list-calendar-event-types::v2021_05_19': CalendarListCalendarEventTypesEventContract_v2021_05_19['eventSignatures']['calendar.list-calendar-event-types::v2021_05_19']
|
|
104
|
-
|
|
105
|
-
'my-skill-1633628748543-25100.my-cool-event::v2021_01_22': MySkill163362874854325100MyCoolEventEventContract_v2021_01_22['eventSignatures']['my-skill-1633628748543-25100.my-cool-event::v2021_01_22']
|
|
106
|
-
|
|
107
|
-
'my-skill-1633628825915-25586.my-cool-event::v2021_01_22': MySkill163362882591525586MyCoolEventEventContract_v2021_01_22['eventSignatures']['my-skill-1633628825915-25586.my-cool-event::v2021_01_22']
|
|
108
|
-
|
|
109
|
-
'forms.convert-pdf-to-form::v2021_07_02': FormsConvertPdfToFormEventContract_v2021_07_02['eventSignatures']['forms.convert-pdf-to-form::v2021_07_02']
|
|
110
|
-
|
|
111
|
-
'forms.convert-pdf-to-schemas::v2021_07_02': FormsConvertPdfToSchemasEventContract_v2021_07_02['eventSignatures']['forms.convert-pdf-to-schemas::v2021_07_02']
|
|
112
|
-
|
|
113
|
-
'forms.create-form::v2021_07_02': FormsCreateFormEventContract_v2021_07_02['eventSignatures']['forms.create-form::v2021_07_02']
|
|
114
|
-
|
|
115
|
-
'forms.delete-completed-form::v2021_07_02': FormsDeleteCompletedFormEventContract_v2021_07_02['eventSignatures']['forms.delete-completed-form::v2021_07_02']
|
|
116
|
-
|
|
117
|
-
'forms.did-update-completed-form::v2021_07_02': FormsDidUpdateCompletedFormEventContract_v2021_07_02['eventSignatures']['forms.did-update-completed-form::v2021_07_02']
|
|
118
|
-
|
|
119
|
-
'forms.get-completed-form::v2021_07_02': FormsGetCompletedFormEventContract_v2021_07_02['eventSignatures']['forms.get-completed-form::v2021_07_02']
|
|
120
|
-
|
|
121
|
-
'forms.list-completed-forms::v2021_07_02': FormsListCompletedFormsEventContract_v2021_07_02['eventSignatures']['forms.list-completed-forms::v2021_07_02']
|
|
122
|
-
|
|
123
|
-
'forms.list-forms::v2021_07_02': FormsListFormsEventContract_v2021_07_02['eventSignatures']['forms.list-forms::v2021_07_02']
|
|
124
|
-
|
|
125
|
-
'forms.update-completed-form::v2021_07_02': FormsUpdateCompletedFormEventContract_v2021_07_02['eventSignatures']['forms.update-completed-form::v2021_07_02']
|
|
126
|
-
|
|
127
|
-
'appointments.did-book-appointments::v2021_06_23': AppointmentsDidBookAppointmentsEventContract_v2021_06_23['eventSignatures']['appointments.did-book-appointments::v2021_06_23']
|
|
128
|
-
|
|
129
|
-
'my-skill-1634596349739-36127.my-cool-event::v2021_01_22': MySkill163459634973936127MyCoolEventEventContract_v2021_01_22['eventSignatures']['my-skill-1634596349739-36127.my-cool-event::v2021_01_22']
|
|
130
|
-
|
|
131
|
-
'my-skill-1634934731020-35607.my-cool-event::v2021_01_22': MySkill163493473102035607MyCoolEventEventContract_v2021_01_22['eventSignatures']['my-skill-1634934731020-35607.my-cool-event::v2021_01_22']
|
|
132
|
-
|
|
133
|
-
'my-skill-1634934798809-35941.my-cool-event::v2021_01_22': MySkill163493479880935941MyCoolEventEventContract_v2021_01_22['eventSignatures']['my-skill-1634934798809-35941.my-cool-event::v2021_01_22']
|
|
134
32
|
}
|
|
135
33
|
}
|
|
@@ -11,31 +11,16 @@ const didRegisterSkillViewsEventContract = buildEventContract({
|
|
|
11
11
|
listenPermissionContract: buildPermissionContract({
|
|
12
12
|
id: 'didRegisterSkillViewsListenPermissions',
|
|
13
13
|
name: 'did register skill views',
|
|
14
|
-
description: null,
|
|
15
14
|
requireAllPermissions: false,
|
|
16
15
|
permissions: [
|
|
17
16
|
{
|
|
18
17
|
id: 'can-listen-to-did-register-skill-views',
|
|
19
18
|
name: 'Know when skill views are registered',
|
|
20
|
-
description: null,
|
|
21
|
-
requireAllStatuses: null,
|
|
22
19
|
defaults: {
|
|
23
|
-
skill: null,
|
|
24
|
-
owner: null,
|
|
25
|
-
groupManager: null,
|
|
26
|
-
manager: null,
|
|
27
|
-
teammate: null,
|
|
28
|
-
guest: null,
|
|
29
|
-
anonymous: null,
|
|
30
20
|
loggedIn: {
|
|
31
21
|
default: true,
|
|
32
|
-
clockedIn: null,
|
|
33
|
-
clockedOut: null,
|
|
34
|
-
onPrem: null,
|
|
35
|
-
offPrem: null,
|
|
36
22
|
},
|
|
37
23
|
},
|
|
38
|
-
can: null,
|
|
39
24
|
},
|
|
40
25
|
],
|
|
41
26
|
}),
|
|
@@ -12,37 +12,20 @@ const generateUrlEventContract = buildEventContract({
|
|
|
12
12
|
emitPermissionContract: buildPermissionContract({
|
|
13
13
|
id: 'generateUrlEmitPermissions',
|
|
14
14
|
name: 'Generate url',
|
|
15
|
-
description: null,
|
|
16
15
|
requireAllPermissions: false,
|
|
17
16
|
permissions: [
|
|
18
17
|
{
|
|
19
|
-
id: 'can-generate-url',
|
|
20
18
|
name: 'Can generate url',
|
|
21
|
-
|
|
22
|
-
requireAllStatuses: null,
|
|
19
|
+
id: 'can-generate-url',
|
|
23
20
|
defaults: {
|
|
24
|
-
|
|
25
|
-
owner: null,
|
|
26
|
-
groupManager: null,
|
|
27
|
-
manager: null,
|
|
28
|
-
teammate: null,
|
|
29
|
-
guest: null,
|
|
30
|
-
anonymous: {
|
|
21
|
+
loggedIn: {
|
|
31
22
|
default: true,
|
|
32
|
-
clockedIn: null,
|
|
33
|
-
clockedOut: null,
|
|
34
|
-
onPrem: null,
|
|
35
|
-
offPrem: null,
|
|
36
23
|
},
|
|
37
|
-
|
|
24
|
+
anonymous: {
|
|
38
25
|
default: true,
|
|
39
|
-
clockedIn: null,
|
|
40
|
-
clockedOut: null,
|
|
41
|
-
onPrem: null,
|
|
42
|
-
offPrem: null,
|
|
43
26
|
},
|
|
27
|
+
skill: true,
|
|
44
28
|
},
|
|
45
|
-
can: null,
|
|
46
29
|
},
|
|
47
30
|
],
|
|
48
31
|
}),
|
|
@@ -12,43 +12,20 @@ const getSkillViewsEventContract = buildEventContract({
|
|
|
12
12
|
emitPermissionContract: buildPermissionContract({
|
|
13
13
|
id: 'getSkillViewsEmitPermissions',
|
|
14
14
|
name: 'Get skill views',
|
|
15
|
-
description: null,
|
|
16
15
|
requireAllPermissions: false,
|
|
17
16
|
permissions: [
|
|
18
17
|
{
|
|
19
18
|
id: 'can-get-skill-views',
|
|
20
19
|
name: 'Can get skill views',
|
|
21
|
-
description: null,
|
|
22
|
-
requireAllStatuses: null,
|
|
23
20
|
defaults: {
|
|
24
|
-
skill: true,
|
|
25
|
-
owner: null,
|
|
26
|
-
groupManager: null,
|
|
27
|
-
manager: null,
|
|
28
|
-
teammate: null,
|
|
29
|
-
guest: {
|
|
30
|
-
default: true,
|
|
31
|
-
clockedIn: null,
|
|
32
|
-
clockedOut: null,
|
|
33
|
-
onPrem: null,
|
|
34
|
-
offPrem: null,
|
|
35
|
-
},
|
|
36
21
|
anonymous: {
|
|
37
22
|
default: true,
|
|
38
|
-
clockedIn: null,
|
|
39
|
-
clockedOut: null,
|
|
40
|
-
onPrem: null,
|
|
41
|
-
offPrem: null,
|
|
42
23
|
},
|
|
43
24
|
loggedIn: {
|
|
44
25
|
default: true,
|
|
45
|
-
clockedIn: null,
|
|
46
|
-
clockedOut: null,
|
|
47
|
-
onPrem: null,
|
|
48
|
-
offPrem: null,
|
|
49
26
|
},
|
|
27
|
+
skill: true,
|
|
50
28
|
},
|
|
51
|
-
can: null,
|
|
52
29
|
},
|
|
53
30
|
],
|
|
54
31
|
}),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildEventContract } from '@sprucelabs/mercury-types'
|
|
2
|
+
import { buildPermissionContract } from '@sprucelabs/mercury-types'
|
|
2
3
|
import registerSkillViewsEmitTargetAndPayloadSchema from '#spruce/schemas/heartwood/v2021_02_11/registerSkillViewsEmitTargetAndPayload.schema'
|
|
3
4
|
import registerSkillViewsResponsePayloadSchema from '#spruce/schemas/heartwood/v2021_02_11/registerSkillViewsResponsePayload.schema'
|
|
4
5
|
|
|
@@ -8,6 +9,20 @@ const registerSkillViewsEventContract = buildEventContract({
|
|
|
8
9
|
isGlobal: true,
|
|
9
10
|
emitPayloadSchema: registerSkillViewsEmitTargetAndPayloadSchema,
|
|
10
11
|
responsePayloadSchema: registerSkillViewsResponsePayloadSchema,
|
|
12
|
+
emitPermissionContract: buildPermissionContract({
|
|
13
|
+
id: 'registerSkillViewsEmitPermissions',
|
|
14
|
+
name: 'Register skill views',
|
|
15
|
+
requireAllPermissions: false,
|
|
16
|
+
permissions: [
|
|
17
|
+
{
|
|
18
|
+
id: 'can-register-skill-views',
|
|
19
|
+
name: 'Can register skill views',
|
|
20
|
+
defaults: {
|
|
21
|
+
skill: true,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
}),
|
|
11
26
|
},
|
|
12
27
|
},
|
|
13
28
|
})
|