@sprucelabs/spruce-cli 20.0.0 → 20.0.1
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 +8 -0
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js +2 -1
- package/build/__tests__/behavioral/EnablingAndDisablingCache.test.js.map +1 -1
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js +1 -1
- package/build/__tests__/behavioral/views/CreatingASkillView.test.js.map +1 -1
- package/build/__tests__/behavioral/views/plugins/CreatingAViewPlugin.test.d.ts +4 -0
- package/build/__tests__/behavioral/views/plugins/CreatingAViewPlugin.test.js +95 -17
- package/build/__tests__/behavioral/views/plugins/CreatingAViewPlugin.test.js.map +1 -1
- package/build/errors/SpruceError.js +2 -2
- package/build/errors/SpruceError.js.map +1 -1
- package/build/features/cache/actions/EnableAction.js +3 -1
- package/build/features/cache/actions/EnableAction.js.map +1 -1
- package/build/features/view/actions/SyncAction.js +2 -0
- package/build/features/view/actions/SyncAction.js.map +1 -1
- package/build/utilities/introspection.utility.d.ts +8 -4
- package/build/utilities/introspection.utility.js +189 -46
- package/build/utilities/introspection.utility.js.map +1 -1
- package/package.json +24 -24
- package/src/__tests__/behavioral/EnablingAndDisablingCache.test.ts +1 -0
- package/src/__tests__/behavioral/views/CreatingASkillView.test.ts +1 -1
- package/src/__tests__/behavioral/views/plugins/CreatingAViewPlugin.test.ts +53 -0
- package/src/errors/SpruceError.ts +3 -1
- package/src/features/cache/actions/EnableAction.ts +6 -1
- package/src/features/view/actions/SyncAction.ts +2 -0
- package/src/utilities/introspection.utility.ts +233 -79
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [20.0.1](https://github.com/sprucelabsai-community/spruce-cli-workspace/compare/v20.0.0...v20.0.1) (2024-03-27)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @sprucelabs/spruce-cli
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [20.0.0](https://github.com/sprucelabsai-community/spruce-cli-workspace/compare/v19.2.4...v20.0.0) (2024-03-22)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -96,7 +96,8 @@ var EnablingAndDisablingCacheTest = exports["default"] = (_dec = (0, _testUtils.
|
|
|
96
96
|
while (1) switch (_context3.prev = _context3.next) {
|
|
97
97
|
case 0:
|
|
98
98
|
_CommandService["default"].fakeCommand(/npm config/gi, {
|
|
99
|
-
code: 1
|
|
99
|
+
code: 1,
|
|
100
|
+
stderr: 'which'
|
|
100
101
|
});
|
|
101
102
|
_context3.next = 3;
|
|
102
103
|
return this.Action('cache', 'enable').execute({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnablingAndDisablingCache.test.js","names":["_testUtils","require","_constants","_CommandService","_interopRequireDefault","_AbstractCliTest2","_dec","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_dec10","_class","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","constructor","apply","Boolean","prototype","valueOf","call","EnablingAndDisablingCacheTest","exports","test","_AbstractCliTest","_classCallCheck2","arguments","_inherits2","_createClass2","key","value","_cacheFeatureIsAlwaysOn","_asyncToGenerator2","_regenerator","mark","_callee","isInstalled","wrap","_callee$","_context","prev","next","featureInstaller","sent","assert","isTrue","stop","cacheFeatureIsAlwaysOn","hasEnableFeature","isFunction","Action","execute","_returnsErrorWhenEnablingIfDockerIsNotInstalled","_callee2","results","_callee2$","_context2","CommandService","fakeCommand","code","isTruthy","errors","errorAssert","assertError","dependencies","name","returnsErrorWhenEnablingIfDockerIsNotInstalled","_returnsErrorWhenDockerNotEnabled","_callee3","_callee3$","_context3","returnsErrorWhenDockerNotEnabled","_canEnableCache","_callee4","_callee4$","_context4","ENABLE_NPM_CACHE_COMMAND","DISABLE_NPM_CACHE_COMMAND","isFalsy","canEnableCache","hasDisableFeature","_returnsErrorWhenDisablingIfDockerIsNotInstalled","_callee5","_callee5$","_context5","returnsErrorWhenDisablingIfDockerIsNotInstalled","_returnsErrorWhenDisablingIfDockerIsNotStarted","_callee6","_callee6$","_context6","returnsErrorWhenDisablingIfDockerIsNotStarted","_returnsErrorIfCacheIsNotInstalled","_callee7","_callee7$","_context7","stderr","returnsErrorIfCacheIsNotInstalled","_canEnableCacheMultipleTimes","_callee8","_callee8$","_context8","canEnableCacheMultipleTimes","AbstractCliTest","_applyDecoratedDescriptor2","Object","getOwnPropertyDescriptor"],"sources":["../../../src/__tests__/behavioral/EnablingAndDisablingCache.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test-utils'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport {\n\tDISABLE_NPM_CACHE_COMMAND,\n\tENABLE_NPM_CACHE_COMMAND,\n} from '../../features/cache/constants'\nimport CommandService from '../../services/CommandService'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class EnablingAndDisablingCacheTest extends AbstractCliTest {\n\t@test()\n\tprotected static async cacheFeatureIsAlwaysOn() {\n\t\tconst isInstalled = await this.featureInstaller.isInstalled('cache')\n\t\tassert.isTrue(isInstalled)\n\t}\n\n\t@test()\n\tprotected static hasEnableFeature() {\n\t\tassert.isFunction(this.Action('cache', 'enable').execute)\n\t}\n\n\t@test()\n\tprotected static async returnsErrorWhenEnablingIfDockerIsNotInstalled() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'enable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'MISSING_DEPENDENCIES', {\n\t\t\tdependencies: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Docker',\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async returnsErrorWhenDockerNotEnabled() {\n\t\tCommandService.fakeCommand(/npm config/gis, {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'enable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'DOCKER_NOT_STARTED')\n\t}\n\n\t@test()\n\tprotected static async canEnableCache() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(ENABLE_NPM_CACHE_COMMAND, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(DISABLE_NPM_CACHE_COMMAND, {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'enable').execute({})\n\t\tassert.isFalsy(results.errors)\n\t}\n\n\t@test()\n\tprotected static hasDisableFeature() {\n\t\tassert.isFunction(this.Action('cache', 'disable').execute)\n\t}\n\n\t@test()\n\tprotected static async returnsErrorWhenDisablingIfDockerIsNotInstalled() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'disable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'MISSING_DEPENDENCIES', {\n\t\t\tdependencies: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Docker',\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async returnsErrorWhenDisablingIfDockerIsNotStarted() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(/npm config/gis, {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'disable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'MISSING_DEPENDENCIES', {\n\t\t\tdependencies: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Docker',\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async returnsErrorIfCacheIsNotInstalled() {\n\t\tCommandService.fakeCommand(/npm config/gis, {\n\t\t\tcode: 1,\n\t\t\tstderr: 'tsanoehusnatohu snatoh No such container staoheu saotnhu ',\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'disable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'CACHE_NOT_ENABLED')\n\t}\n\n\t@test()\n\tprotected static async canEnableCacheMultipleTimes() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(DISABLE_NPM_CACHE_COMMAND, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(ENABLE_NPM_CACHE_COMMAND, {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tawait this.Action('cache', 'enable').execute({})\n\t\tconst results = await this.Action('cache', 'enable').execute({})\n\n\t\tassert.isFalsy(results.errors)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAIA,IAAAE,eAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAD,sBAAA,CAAAH,OAAA;AAAyD,IAAAK,IAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,MAAA,EAAAC,MAAA;AAAA,SAAAC,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,aAAAF,CAAA,OAAAG,2BAAA,aAAAJ,CAAA,EAAAK,yBAAA,KAAAC,OAAA,CAAAC,SAAA,CAAAN,CAAA,EAAAC,CAAA,Y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AAlG,MAAA,6BAAAV,IAAA,GAAA6G,MAAA,CAAAC,wBAAA,CAAApG,MAAA,6BAAAA,MAAA,OAAAkG,0BAAA,aAAAlG,MAAA,uBAAAT,KAAA,GAAA4G,MAAA,CAAAC,wBAAA,CAAApG,MAAA,uBAAAA,MAAA,OAAAkG,0BAAA,aAAAlG,MAAA,qDAAAR,KAAA,GAAA2G,MAAA,CAAAC,wBAAA,CAAApG,MAAA,qDAAAA,MAAA,OAAAkG,0BAAA,aAAAlG,MAAA,uCAAAP,KAAA,GAAA0G,MAAA,CAAAC,wBAAA,CAAApG,MAAA,uCAAAA,MAAA,OAAAkG,0BAAA,aAAAlG,MAAA,qBAAAN,KAAA,GAAAyG,MAAA,CAAAC,wBAAA,CAAApG,MAAA,qBAAAA,MAAA,OAAAkG,0BAAA,aAAAlG,MAAA,wBAAAL,KAAA,GAAAwG,MAAA,CAAAC,wBAAA,CAAApG,MAAA,wBAAAA,MAAA,OAAAkG,0BAAA,aAAAlG,MAAA,sDAAAJ,KAAA,GAAAuG,MAAA,CAAAC,wBAAA,CAAApG,MAAA,sDAAAA,MAAA,OAAAkG,0BAAA,aAAAlG,MAAA,oDAAAH,KAAA,GAAAsG,MAAA,CAAAC,wBAAA,CAAApG,MAAA,oDAAAA,MAAA,OAAAkG,0BAAA,aAAAlG,MAAA,wCAAAF,KAAA,GAAAqG,MAAA,CAAAC,wBAAA,CAAApG,MAAA,wCAAAA,MAAA,OAAAkG,0BAAA,aAAAlG,MAAA,kCAAAD,MAAA,GAAAoG,MAAA,CAAAC,wBAAA,CAAApG,MAAA,kCAAAA,MAAA,IAAAA,MAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"EnablingAndDisablingCache.test.js","names":["_testUtils","require","_constants","_CommandService","_interopRequireDefault","_AbstractCliTest2","_dec","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_dec10","_class","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","constructor","apply","Boolean","prototype","valueOf","call","EnablingAndDisablingCacheTest","exports","test","_AbstractCliTest","_classCallCheck2","arguments","_inherits2","_createClass2","key","value","_cacheFeatureIsAlwaysOn","_asyncToGenerator2","_regenerator","mark","_callee","isInstalled","wrap","_callee$","_context","prev","next","featureInstaller","sent","assert","isTrue","stop","cacheFeatureIsAlwaysOn","hasEnableFeature","isFunction","Action","execute","_returnsErrorWhenEnablingIfDockerIsNotInstalled","_callee2","results","_callee2$","_context2","CommandService","fakeCommand","code","isTruthy","errors","errorAssert","assertError","dependencies","name","returnsErrorWhenEnablingIfDockerIsNotInstalled","_returnsErrorWhenDockerNotEnabled","_callee3","_callee3$","_context3","stderr","returnsErrorWhenDockerNotEnabled","_canEnableCache","_callee4","_callee4$","_context4","ENABLE_NPM_CACHE_COMMAND","DISABLE_NPM_CACHE_COMMAND","isFalsy","canEnableCache","hasDisableFeature","_returnsErrorWhenDisablingIfDockerIsNotInstalled","_callee5","_callee5$","_context5","returnsErrorWhenDisablingIfDockerIsNotInstalled","_returnsErrorWhenDisablingIfDockerIsNotStarted","_callee6","_callee6$","_context6","returnsErrorWhenDisablingIfDockerIsNotStarted","_returnsErrorIfCacheIsNotInstalled","_callee7","_callee7$","_context7","returnsErrorIfCacheIsNotInstalled","_canEnableCacheMultipleTimes","_callee8","_callee8$","_context8","canEnableCacheMultipleTimes","AbstractCliTest","_applyDecoratedDescriptor2","Object","getOwnPropertyDescriptor"],"sources":["../../../src/__tests__/behavioral/EnablingAndDisablingCache.test.ts"],"sourcesContent":["import { test, assert } from '@sprucelabs/test-utils'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport {\n\tDISABLE_NPM_CACHE_COMMAND,\n\tENABLE_NPM_CACHE_COMMAND,\n} from '../../features/cache/constants'\nimport CommandService from '../../services/CommandService'\nimport AbstractCliTest from '../../tests/AbstractCliTest'\n\nexport default class EnablingAndDisablingCacheTest extends AbstractCliTest {\n\t@test()\n\tprotected static async cacheFeatureIsAlwaysOn() {\n\t\tconst isInstalled = await this.featureInstaller.isInstalled('cache')\n\t\tassert.isTrue(isInstalled)\n\t}\n\n\t@test()\n\tprotected static hasEnableFeature() {\n\t\tassert.isFunction(this.Action('cache', 'enable').execute)\n\t}\n\n\t@test()\n\tprotected static async returnsErrorWhenEnablingIfDockerIsNotInstalled() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'enable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'MISSING_DEPENDENCIES', {\n\t\t\tdependencies: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Docker',\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async returnsErrorWhenDockerNotEnabled() {\n\t\tCommandService.fakeCommand(/npm config/gis, {\n\t\t\tcode: 1,\n\t\t\tstderr: 'which',\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'enable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'DOCKER_NOT_STARTED')\n\t}\n\n\t@test()\n\tprotected static async canEnableCache() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(ENABLE_NPM_CACHE_COMMAND, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(DISABLE_NPM_CACHE_COMMAND, {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'enable').execute({})\n\t\tassert.isFalsy(results.errors)\n\t}\n\n\t@test()\n\tprotected static hasDisableFeature() {\n\t\tassert.isFunction(this.Action('cache', 'disable').execute)\n\t}\n\n\t@test()\n\tprotected static async returnsErrorWhenDisablingIfDockerIsNotInstalled() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'disable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'MISSING_DEPENDENCIES', {\n\t\t\tdependencies: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Docker',\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async returnsErrorWhenDisablingIfDockerIsNotStarted() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(/npm config/gis, {\n\t\t\tcode: 1,\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'disable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'MISSING_DEPENDENCIES', {\n\t\t\tdependencies: [\n\t\t\t\t{\n\t\t\t\t\tname: 'Docker',\n\t\t\t\t},\n\t\t\t],\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async returnsErrorIfCacheIsNotInstalled() {\n\t\tCommandService.fakeCommand(/npm config/gis, {\n\t\t\tcode: 1,\n\t\t\tstderr: 'tsanoehusnatohu snatoh No such container staoheu saotnhu ',\n\t\t})\n\n\t\tconst results = await this.Action('cache', 'disable').execute({})\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors[0], 'CACHE_NOT_ENABLED')\n\t}\n\n\t@test()\n\tprotected static async canEnableCacheMultipleTimes() {\n\t\tCommandService.fakeCommand(/which docker/gis, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(DISABLE_NPM_CACHE_COMMAND, {\n\t\t\tcode: 0,\n\t\t})\n\t\tCommandService.fakeCommand(ENABLE_NPM_CACHE_COMMAND, {\n\t\t\tcode: 0,\n\t\t})\n\n\t\tawait this.Action('cache', 'enable').execute({})\n\t\tconst results = await this.Action('cache', 'enable').execute({})\n\n\t\tassert.isFalsy(results.errors)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA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AAsG,MAAA,CAAAC,wBAAA,CAAApG,MAAA,oDAAAA,MAAA,OAAAkG,0BAAA,aAAAlG,MAAA,wCAAAF,KAAA,GAAAqG,MAAA,CAAAC,wBAAA,CAAApG,MAAA,wCAAAA,MAAA,OAAAkG,0BAAA,aAAAlG,MAAA,kCAAAD,MAAA,GAAAoG,MAAA,CAAAC,wBAAA,CAAApG,MAAA,kCAAAA,MAAA,IAAAA,MAAA","ignoreList":[]}
|
|
@@ -419,7 +419,7 @@ var CreatingASkillViewTest = exports["default"] = (_dec = (0, _testUtils.test)()
|
|
|
419
419
|
value: function buildTestfile(options) {
|
|
420
420
|
var code = options.code,
|
|
421
421
|
idInterfaceName = options.idInterfaceName;
|
|
422
|
-
return "\nimport " + "'#spruce/views/views'\nimport {\n\tViewControllerFactory,\n\tAuthenticatorImpl,\n\tStubStorage,\n\t".concat(idInterfaceName, ",\n} from '@sprucelabs/heartwood-view-controllers'\nimport { vcDiskUtil } from '@sprucelabs/spruce-test-fixtures'\n\nAuthenticatorImpl.setStorage(new StubStorage())\n\nconst vcFactory = ViewControllerFactory.Factory({\n\tcontrollerMap: vcDiskUtil.loadViewControllersAndBuildMap('testing-views', __dirname),\n\tdevice: {} as any,\n\tconnectToApi: async () => {\n\t\treturn 'yes' as any\n\t},\n})\n").concat(code, "\n\t\t").trim();
|
|
422
|
+
return "\nimport " + "'#spruce/views/views'\nimport {\n\tViewControllerFactory,\n\tAuthenticatorImpl,\n\tStubStorage,\n\t".concat(idInterfaceName, ",\n} from '@sprucelabs/heartwood-view-controllers'\nimport { vcDiskUtil } from '@sprucelabs/spruce-test-fixtures'\n\nAuthenticatorImpl.setStorage(new StubStorage())\n\nconst vcFactory = ViewControllerFactory.Factory({\n\tcontrollerMap: vcDiskUtil.loadViewControllersAndBuildMap('testing-views', __dirname).map,\n\tdevice: {} as any,\n\tconnectToApi: async () => {\n\t\treturn 'yes' as any\n\t},\n})\n").concat(code, "\n\t\t").trim();
|
|
423
423
|
}
|
|
424
424
|
}]);
|
|
425
425
|
}(_AbstractSkillTest2["default"]), (0, _defineProperty2["default"])(_CreatingASkillViewTest, "skillCacheKey", 'views'), (0, _defineProperty2["default"])(_CreatingASkillViewTest, "action", void 0), (0, _defineProperty2["default"])(_CreatingASkillViewTest, "rootSvc", void 0), (0, _defineProperty2["default"])(_CreatingASkillViewTest, "appointmentsCard", void 0), (0, _defineProperty2["default"])(_CreatingASkillViewTest, "dashboardVc", void 0), _CreatingASkillViewTest), ((0, _applyDecoratedDescriptor2["default"])(_class, "hasCreateAction", [_dec], Object.getOwnPropertyDescriptor(_class, "hasCreateAction"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "viewFeatureHasExpectedDependencies", [_dec2], Object.getOwnPropertyDescriptor(_class, "viewFeatureHasExpectedDependencies"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "asksIfRootSkillViewIfNotYetCreated", [_dec3], Object.getOwnPropertyDescriptor(_class, "asksIfRootSkillViewIfNotYetCreated"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canCreateRootSkillView", [_dec4], Object.getOwnPropertyDescriptor(_class, "canCreateRootSkillView"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "generatesValidRootSkillView", [_dec5], Object.getOwnPropertyDescriptor(_class, "generatesValidRootSkillView"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "rootSkillViewExtendsAbstractSkillViewController", [_dec6], Object.getOwnPropertyDescriptor(_class, "rootSkillViewExtendsAbstractSkillViewController"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "cantCreateTwoRootSvcs", [_dec7], Object.getOwnPropertyDescriptor(_class, "cantCreateTwoRootSvcs"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "asksForNamesIfCreatingSkillViewNotRoot", [_dec8], Object.getOwnPropertyDescriptor(_class, "asksForNamesIfCreatingSkillViewNotRoot"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "asksForViewModelWhenCreatingSkillView", [_dec9], Object.getOwnPropertyDescriptor(_class, "asksForViewModelWhenCreatingSkillView"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "skillViewExtendsAbstractViewControllerWithProperView", [_dec10], Object.getOwnPropertyDescriptor(_class, "skillViewExtendsAbstractViewControllerWithProperView"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "nicelyTypesRootSkillViewController", [_dec11], Object.getOwnPropertyDescriptor(_class, "nicelyTypesRootSkillViewController"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "nicelyTypesViewController", [_dec12], Object.getOwnPropertyDescriptor(_class, "nicelyTypesViewController"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "typesViewControllerOptions", [_dec13], Object.getOwnPropertyDescriptor(_class, "typesViewControllerOptions"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "typesSkillViewControllerLoadOptionsOptions", [_dec14], Object.getOwnPropertyDescriptor(_class, "typesSkillViewControllerLoadOptionsOptions"), _class)), _class));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatingASkillView.test.js","names":["_spruceSkillUtils","require","_testUtils","_AbstractSkillTest2","_interopRequireDefault","_test","_dec","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_dec10","_dec11","_dec12","_dec13","_dec14","_class","_CreatingASkillViewTest","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","constructor","apply","Boolean","prototype","valueOf","call","CreatingASkillViewTest","exports","test","_AbstractSkillTest","_classCallCheck2","arguments","_inherits2","_createClass2","key","value","_beforeEach","_asyncToGenerator2","_regenerator","mark","_callee","wrap","_callee$","_context","prev","next","_get2","action","Action","stop","beforeEach","hasCreateAction","assert","isFunction","execute","_viewFeatureHasExpectedDependencies","_callee2","features","view","_callee2$","_context2","featureInstaller","sent","getFeature","isEqualDeep","dependencies","code","isRequired","viewFeatureHasExpectedDependencies","_asksIfRootSkillViewIfNotYetCreated","_callee3","last","_callee3$","_context3","viewType","waitForInput","ui","getLastInvocation","isEqual","command","reset","asksIfRootSkillViewIfNotYetCreated","_canCreateRootSkillView","_callee4","results","_callee4$","_context4","isRoot","isFalsy","errors","rootSvc","testUtil","assertFileByNameInGeneratedFiles","files","doesInclude","canCreateRootSkillView","_generatesValidRootSkillView","_callee5","_callee5$","_context5","Service","check","generatesValidRootSkillView","_rootSkillViewExtendsAbstractSkillViewController","_callee6","contents","_callee6$","_context6","diskUtil","readFile","rootSkillViewExtendsAbstractSkillViewController","_cantCreateTwoRootSvcs","_callee7","_results$errors","_callee7$","_context7","isTruthy","errorAssert","assertError","name","cantCreateTwoRootSvcs","_asksForNamesIfCreatingSkillViewNotRoot","_callee8","promise","_callee8$","_context8","sendInput","dashboardVc","asksForNamesIfCreatingSkillViewNotRoot","_asksForViewModelWhenCreatingSkillView","_callee9","_callee9$","_context9","nameReadable","options","choices","appointmentsCard","asksForViewModelWhenCreatingSkillView","skillViewExtendsAbstractViewControllerWithProperView","_nicelyTypesRootSkillViewController","_callee10","testFile","imported","_callee10$","_context10","buildTestfile","idInterfaceName","resolvePath","writeFile","importAll","svcModel","svcId","nicelyTypesRootSkillViewController","_nicelyTypesViewController","_callee11","_callee11$","_context11","vcModel","vcId","nicelyTypesViewController","_typesViewControllerOptions","_callee12","viewsFile","viewContents","_callee12$","_context12","resolveHashSprucePath","typesViewControllerOptions","_typesSkillViewControllerLoadOptionsOptions","_callee13","_callee13$","_context13","typesSkillViewControllerLoadOptionsOptions","concat","trim","AbstractSkillTest","_defineProperty2","_applyDecoratedDescriptor2","Object","getOwnPropertyDescriptor"],"sources":["../../../../src/__tests__/behavioral/views/CreatingASkillView.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test-utils'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport CreateAction from '../../../features/view/actions/CreateAction'\nimport AbstractSkillTest from '../../../tests/AbstractSkillTest'\nimport testUtil from '../../../tests/utilities/test.utility'\n\nexport default class CreatingASkillViewTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'views'\n\tprivate static action: CreateAction\n\tprivate static rootSvc: string\n\tpublic static appointmentsCard: string\n\tprivate static dashboardVc: string\n\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tthis.action = this.Action('view', 'create') as CreateAction\n\t}\n\n\t@test()\n\tprotected static hasCreateAction() {\n\t\tassert.isFunction(this.action.execute)\n\t}\n\n\t@test()\n\tprotected static async viewFeatureHasExpectedDependencies() {\n\t\tconst features = await this.featureInstaller\n\t\tconst view = features.getFeature('view')\n\t\tassert.isEqualDeep(view.dependencies, [\n\t\t\t{\n\t\t\t\tcode: 'node',\n\t\t\t\tisRequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tcode: 'schema',\n\t\t\t\tisRequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tcode: 'event',\n\t\t\t\tisRequired: true,\n\t\t\t},\n\t\t])\n\t}\n\n\t@test()\n\tprotected static async asksIfRootSkillViewIfNotYetCreated() {\n\t\tvoid this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t})\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\n\t\tassert.isEqual(last.command, 'confirm')\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async canCreateRootSkillView() {\n\t\tconst results = await this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t\tisRoot: true,\n\t\t})\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.rootSvc = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'Root.svc.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tassert.doesInclude(this.rootSvc, 'skillViewControllers')\n\t}\n\n\t@test()\n\tprotected static async generatesValidRootSkillView() {\n\t\tawait this.Service('typeChecker').check(this.rootSvc)\n\t}\n\n\t@test()\n\tprotected static async rootSkillViewExtendsAbstractSkillViewController() {\n\t\tconst contents = diskUtil.readFile(this.rootSvc)\n\t\tassert.doesInclude(\n\t\t\tcontents,\n\t\t\t'export default class RootSkillViewController extends AbstractSkillViewController'\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async cantCreateTwoRootSvcs() {\n\t\tconst results = await this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t\tisRoot: true,\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors?.[0], 'SKILL_VIEW_EXISTS', {\n\t\t\tname: 'Root',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async asksForNamesIfCreatingSkillViewNotRoot() {\n\t\tconst promise = this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t})\n\n\t\tawait this.waitForInput()\n\n\t\tlet last = this.ui.getLastInvocation()\n\n\t\tassert.isEqual(last.command, 'prompt')\n\n\t\tawait this.ui.sendInput('Dashboard')\n\t\tawait this.ui.sendInput('\\n')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.dashboardVc = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'Dashboard.svc.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tassert.doesInclude(this.dashboardVc, 'skillViewControllers')\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async asksForViewModelWhenCreatingSkillView() {\n\t\tconst promise = this.action.execute({\n\t\t\tviewType: 'view',\n\t\t\tnameReadable: 'Appointments card',\n\t\t})\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\n\t\tassert.isEqual(last.command, 'prompt')\n\t\tassert.doesInclude(last.options.options.choices, {\n\t\t\tvalue: 'Card',\n\t\t})\n\n\t\tawait this.ui.sendInput('Card')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.appointmentsCard = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'AppointmentsCard.vc.ts',\n\t\t\tresults.files\n\t\t)\n\t}\n\n\t@test()\n\tprotected static skillViewExtendsAbstractViewControllerWithProperView() {\n\t\tconst contents = diskUtil.readFile(this.appointmentsCard)\n\t\tassert.doesInclude(\n\t\t\tcontents,\n\t\t\t'export default class AppointmentsCardViewController extends AbstractViewController<Card>'\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async nicelyTypesRootSkillViewController() {\n\t\tconst contents = this.buildTestfile({\n\t\t\tidInterfaceName: 'SkillViewControllerId',\n\t\t\tcode: `\nconst root = vcFactory.Controller('testing-views.root', {})\nexport const svcModel = root.render()\nexport const svcId: SkillViewControllerId = 'testing-views.root'`,\n\t\t})\n\n\t\tconst testFile = this.resolvePath('src', 'test.ts')\n\t\tdiskUtil.writeFile(testFile, contents)\n\n\t\tconst imported = await this.Service('import').importAll(testFile)\n\n\t\tassert.isTruthy(imported.svcModel)\n\t\tassert.isTruthy(imported.svcId)\n\t}\n\n\t@test()\n\tprotected static async nicelyTypesViewController() {\n\t\tconst contents = this.buildTestfile({\n\t\t\tidInterfaceName: 'ViewControllerId',\n\t\t\tcode: `\n\t\tconst apptCard = vcFactory.Controller('testing-views.appointments-card', {})\n\t\texport const vcModel = apptCard.render()\n\t\texport const vcId: ViewControllerId = 'testing-views.appointments-card'`,\n\t\t})\n\n\t\tconst testFile = this.resolvePath('src', 'test.ts')\n\t\tdiskUtil.writeFile(testFile, contents)\n\n\t\tconst imported = await this.Service('import').importAll(testFile)\n\n\t\tassert.isTruthy(imported.vcModel)\n\t\tassert.isTruthy(imported.vcId)\n\t}\n\n\t@test()\n\tprotected static async typesViewControllerOptions() {\n\t\tconst viewsFile = this.resolveHashSprucePath('views', 'views.ts')\n\t\tconst viewContents = diskUtil.readFile(viewsFile)\n\n\t\tassert.doesInclude(viewContents, `interface ViewControllerOptionsMap`)\n\t\tassert.doesInclude(\n\t\t\tviewContents,\n\t\t\t`'testing-views.appointments-card': ConstructorParameters<typeof AppointmentsCardViewController>[0]`\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async typesSkillViewControllerLoadOptionsOptions() {\n\t\tconst viewsFile = this.resolveHashSprucePath('views', 'views.ts')\n\t\tconst viewContents = diskUtil.readFile(viewsFile)\n\n\t\tassert.doesInclude(viewContents, `interface SkillViewControllerArgsMap`)\n\t\tassert.doesInclude(\n\t\t\tviewContents,\n\t\t\t`type LoadOptions<Args extends Record<string,any>[]> = Args[0]['args'] extends Record<string, any> ? Args[0]['args'] : Record<never, any>`\n\t\t)\n\t\tassert.doesInclude(\n\t\t\tviewContents,\n\t\t\t`'testing-views.root': LoadOptions<Parameters<RootSkillViewController['load']>>`\n\t\t)\n\t}\n\n\tprivate static buildTestfile(options: {\n\t\tcode: string\n\t\tidInterfaceName: 'SkillViewControllerId' | 'ViewControllerId'\n\t}) {\n\t\tconst { code, idInterfaceName } = options\n\n\t\treturn (\n\t\t\t`\nimport ` +\n\t\t\t`'#spruce/views/views'\nimport {\n\tViewControllerFactory,\n\tAuthenticatorImpl,\n\tStubStorage,\n\t${idInterfaceName},\n} from '@sprucelabs/heartwood-view-controllers'\nimport { vcDiskUtil } from '@sprucelabs/spruce-test-fixtures'\n\nAuthenticatorImpl.setStorage(new StubStorage())\n\nconst vcFactory = ViewControllerFactory.Factory({\n\tcontrollerMap: vcDiskUtil.loadViewControllersAndBuildMap('testing-views', __dirname),\n\tdevice: {} as any,\n\tconnectToApi: async () => {\n\t\treturn 'yes' as any\n\t},\n})\n${code}\n\t\t`.trim()\n\t\t)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAGA,IAAAE,mBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,KAAA,GAAAD,sBAAA,CAAAH,OAAA;AAA4D,IAAAK,IAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,MAAA,EAAAC,MAAA,EAAA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AwK,0BAAA,aAAAxK,MAAA,gCAAAH,MAAA,GAAA4K,MAAA,CAAAC,wBAAA,CAAA1K,MAAA,gCAAAA,MAAA,OAAAwK,0BAAA,aAAAxK,MAAA,iCAAAF,MAAA,GAAA2K,MAAA,CAAAC,wBAAA,CAAA1K,MAAA,iCAAAA,MAAA,OAAAwK,0BAAA,aAAAxK,MAAA,iDAAAD,MAAA,GAAA0K,MAAA,CAAAC,wBAAA,CAAA1K,MAAA,iDAAAA,MAAA,IAAAA,MAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"CreatingASkillView.test.js","names":["_spruceSkillUtils","require","_testUtils","_AbstractSkillTest2","_interopRequireDefault","_test","_dec","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_dec10","_dec11","_dec12","_dec13","_dec14","_class","_CreatingASkillViewTest","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","constructor","apply","Boolean","prototype","valueOf","call","CreatingASkillViewTest","exports","test","_AbstractSkillTest","_classCallCheck2","arguments","_inherits2","_createClass2","key","value","_beforeEach","_asyncToGenerator2","_regenerator","mark","_callee","wrap","_callee$","_context","prev","next","_get2","action","Action","stop","beforeEach","hasCreateAction","assert","isFunction","execute","_viewFeatureHasExpectedDependencies","_callee2","features","view","_callee2$","_context2","featureInstaller","sent","getFeature","isEqualDeep","dependencies","code","isRequired","viewFeatureHasExpectedDependencies","_asksIfRootSkillViewIfNotYetCreated","_callee3","last","_callee3$","_context3","viewType","waitForInput","ui","getLastInvocation","isEqual","command","reset","asksIfRootSkillViewIfNotYetCreated","_canCreateRootSkillView","_callee4","results","_callee4$","_context4","isRoot","isFalsy","errors","rootSvc","testUtil","assertFileByNameInGeneratedFiles","files","doesInclude","canCreateRootSkillView","_generatesValidRootSkillView","_callee5","_callee5$","_context5","Service","check","generatesValidRootSkillView","_rootSkillViewExtendsAbstractSkillViewController","_callee6","contents","_callee6$","_context6","diskUtil","readFile","rootSkillViewExtendsAbstractSkillViewController","_cantCreateTwoRootSvcs","_callee7","_results$errors","_callee7$","_context7","isTruthy","errorAssert","assertError","name","cantCreateTwoRootSvcs","_asksForNamesIfCreatingSkillViewNotRoot","_callee8","promise","_callee8$","_context8","sendInput","dashboardVc","asksForNamesIfCreatingSkillViewNotRoot","_asksForViewModelWhenCreatingSkillView","_callee9","_callee9$","_context9","nameReadable","options","choices","appointmentsCard","asksForViewModelWhenCreatingSkillView","skillViewExtendsAbstractViewControllerWithProperView","_nicelyTypesRootSkillViewController","_callee10","testFile","imported","_callee10$","_context10","buildTestfile","idInterfaceName","resolvePath","writeFile","importAll","svcModel","svcId","nicelyTypesRootSkillViewController","_nicelyTypesViewController","_callee11","_callee11$","_context11","vcModel","vcId","nicelyTypesViewController","_typesViewControllerOptions","_callee12","viewsFile","viewContents","_callee12$","_context12","resolveHashSprucePath","typesViewControllerOptions","_typesSkillViewControllerLoadOptionsOptions","_callee13","_callee13$","_context13","typesSkillViewControllerLoadOptionsOptions","concat","trim","AbstractSkillTest","_defineProperty2","_applyDecoratedDescriptor2","Object","getOwnPropertyDescriptor"],"sources":["../../../../src/__tests__/behavioral/views/CreatingASkillView.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert } from '@sprucelabs/test-utils'\nimport { errorAssert } from '@sprucelabs/test-utils'\nimport CreateAction from '../../../features/view/actions/CreateAction'\nimport AbstractSkillTest from '../../../tests/AbstractSkillTest'\nimport testUtil from '../../../tests/utilities/test.utility'\n\nexport default class CreatingASkillViewTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'views'\n\tprivate static action: CreateAction\n\tprivate static rootSvc: string\n\tpublic static appointmentsCard: string\n\tprivate static dashboardVc: string\n\n\tprotected static async beforeEach() {\n\t\tawait super.beforeEach()\n\t\tthis.action = this.Action('view', 'create') as CreateAction\n\t}\n\n\t@test()\n\tprotected static hasCreateAction() {\n\t\tassert.isFunction(this.action.execute)\n\t}\n\n\t@test()\n\tprotected static async viewFeatureHasExpectedDependencies() {\n\t\tconst features = await this.featureInstaller\n\t\tconst view = features.getFeature('view')\n\t\tassert.isEqualDeep(view.dependencies, [\n\t\t\t{\n\t\t\t\tcode: 'node',\n\t\t\t\tisRequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tcode: 'schema',\n\t\t\t\tisRequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tcode: 'event',\n\t\t\t\tisRequired: true,\n\t\t\t},\n\t\t])\n\t}\n\n\t@test()\n\tprotected static async asksIfRootSkillViewIfNotYetCreated() {\n\t\tvoid this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t})\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\n\t\tassert.isEqual(last.command, 'confirm')\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async canCreateRootSkillView() {\n\t\tconst results = await this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t\tisRoot: true,\n\t\t})\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.rootSvc = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'Root.svc.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tassert.doesInclude(this.rootSvc, 'skillViewControllers')\n\t}\n\n\t@test()\n\tprotected static async generatesValidRootSkillView() {\n\t\tawait this.Service('typeChecker').check(this.rootSvc)\n\t}\n\n\t@test()\n\tprotected static async rootSkillViewExtendsAbstractSkillViewController() {\n\t\tconst contents = diskUtil.readFile(this.rootSvc)\n\t\tassert.doesInclude(\n\t\t\tcontents,\n\t\t\t'export default class RootSkillViewController extends AbstractSkillViewController'\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async cantCreateTwoRootSvcs() {\n\t\tconst results = await this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t\tisRoot: true,\n\t\t})\n\n\t\tassert.isTruthy(results.errors)\n\n\t\terrorAssert.assertError(results.errors?.[0], 'SKILL_VIEW_EXISTS', {\n\t\t\tname: 'Root',\n\t\t})\n\t}\n\n\t@test()\n\tprotected static async asksForNamesIfCreatingSkillViewNotRoot() {\n\t\tconst promise = this.action.execute({\n\t\t\tviewType: 'skillView',\n\t\t})\n\n\t\tawait this.waitForInput()\n\n\t\tlet last = this.ui.getLastInvocation()\n\n\t\tassert.isEqual(last.command, 'prompt')\n\n\t\tawait this.ui.sendInput('Dashboard')\n\t\tawait this.ui.sendInput('\\n')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.dashboardVc = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'Dashboard.svc.ts',\n\t\t\tresults.files\n\t\t)\n\n\t\tassert.doesInclude(this.dashboardVc, 'skillViewControllers')\n\n\t\tthis.ui.reset()\n\t}\n\n\t@test()\n\tprotected static async asksForViewModelWhenCreatingSkillView() {\n\t\tconst promise = this.action.execute({\n\t\t\tviewType: 'view',\n\t\t\tnameReadable: 'Appointments card',\n\t\t})\n\n\t\tawait this.waitForInput()\n\n\t\tconst last = this.ui.getLastInvocation()\n\n\t\tassert.isEqual(last.command, 'prompt')\n\t\tassert.doesInclude(last.options.options.choices, {\n\t\t\tvalue: 'Card',\n\t\t})\n\n\t\tawait this.ui.sendInput('Card')\n\n\t\tconst results = await promise\n\n\t\tassert.isFalsy(results.errors)\n\n\t\tthis.appointmentsCard = testUtil.assertFileByNameInGeneratedFiles(\n\t\t\t'AppointmentsCard.vc.ts',\n\t\t\tresults.files\n\t\t)\n\t}\n\n\t@test()\n\tprotected static skillViewExtendsAbstractViewControllerWithProperView() {\n\t\tconst contents = diskUtil.readFile(this.appointmentsCard)\n\t\tassert.doesInclude(\n\t\t\tcontents,\n\t\t\t'export default class AppointmentsCardViewController extends AbstractViewController<Card>'\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async nicelyTypesRootSkillViewController() {\n\t\tconst contents = this.buildTestfile({\n\t\t\tidInterfaceName: 'SkillViewControllerId',\n\t\t\tcode: `\nconst root = vcFactory.Controller('testing-views.root', {})\nexport const svcModel = root.render()\nexport const svcId: SkillViewControllerId = 'testing-views.root'`,\n\t\t})\n\n\t\tconst testFile = this.resolvePath('src', 'test.ts')\n\t\tdiskUtil.writeFile(testFile, contents)\n\n\t\tconst imported = await this.Service('import').importAll(testFile)\n\n\t\tassert.isTruthy(imported.svcModel)\n\t\tassert.isTruthy(imported.svcId)\n\t}\n\n\t@test()\n\tprotected static async nicelyTypesViewController() {\n\t\tconst contents = this.buildTestfile({\n\t\t\tidInterfaceName: 'ViewControllerId',\n\t\t\tcode: `\n\t\tconst apptCard = vcFactory.Controller('testing-views.appointments-card', {})\n\t\texport const vcModel = apptCard.render()\n\t\texport const vcId: ViewControllerId = 'testing-views.appointments-card'`,\n\t\t})\n\n\t\tconst testFile = this.resolvePath('src', 'test.ts')\n\t\tdiskUtil.writeFile(testFile, contents)\n\n\t\tconst imported = await this.Service('import').importAll(testFile)\n\n\t\tassert.isTruthy(imported.vcModel)\n\t\tassert.isTruthy(imported.vcId)\n\t}\n\n\t@test()\n\tprotected static async typesViewControllerOptions() {\n\t\tconst viewsFile = this.resolveHashSprucePath('views', 'views.ts')\n\t\tconst viewContents = diskUtil.readFile(viewsFile)\n\n\t\tassert.doesInclude(viewContents, `interface ViewControllerOptionsMap`)\n\t\tassert.doesInclude(\n\t\t\tviewContents,\n\t\t\t`'testing-views.appointments-card': ConstructorParameters<typeof AppointmentsCardViewController>[0]`\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async typesSkillViewControllerLoadOptionsOptions() {\n\t\tconst viewsFile = this.resolveHashSprucePath('views', 'views.ts')\n\t\tconst viewContents = diskUtil.readFile(viewsFile)\n\n\t\tassert.doesInclude(viewContents, `interface SkillViewControllerArgsMap`)\n\t\tassert.doesInclude(\n\t\t\tviewContents,\n\t\t\t`type LoadOptions<Args extends Record<string,any>[]> = Args[0]['args'] extends Record<string, any> ? Args[0]['args'] : Record<never, any>`\n\t\t)\n\t\tassert.doesInclude(\n\t\t\tviewContents,\n\t\t\t`'testing-views.root': LoadOptions<Parameters<RootSkillViewController['load']>>`\n\t\t)\n\t}\n\n\tprivate static buildTestfile(options: {\n\t\tcode: string\n\t\tidInterfaceName: 'SkillViewControllerId' | 'ViewControllerId'\n\t}) {\n\t\tconst { code, idInterfaceName } = options\n\n\t\treturn (\n\t\t\t`\nimport ` +\n\t\t\t`'#spruce/views/views'\nimport {\n\tViewControllerFactory,\n\tAuthenticatorImpl,\n\tStubStorage,\n\t${idInterfaceName},\n} from '@sprucelabs/heartwood-view-controllers'\nimport { vcDiskUtil } from '@sprucelabs/spruce-test-fixtures'\n\nAuthenticatorImpl.setStorage(new StubStorage())\n\nconst vcFactory = ViewControllerFactory.Factory({\n\tcontrollerMap: vcDiskUtil.loadViewControllersAndBuildMap('testing-views', __dirname).map,\n\tdevice: {} as any,\n\tconnectToApi: async () => {\n\t\treturn 'yes' as any\n\t},\n})\n${code}\n\t\t`.trim()\n\t\t)\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAGA,IAAAE,mBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,KAAA,GAAAD,sBAAA,CAAAH,OAAA;AAA4D,IAAAK,IAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,uBAAA;AAAA,SAAAC,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,aAAAF,CAAA,OAAAG,2BAAA,aAAAJ,CAAA,EAAAK,yBAAA,KAAAC,OAAA,CAAAC,SAAA,CAAAN,CAAA,EAAAC,CAAA,YAAAC,gBAAA,aAAAH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,CAAA1K,MAAA,iDAAAA,MAAA,IAAAA,MAAA","ignoreList":[]}
|
|
@@ -12,6 +12,10 @@ export default class CreatingAViewPluginTest extends AbstractSkillTest {
|
|
|
12
12
|
protected static combineViewsFileIsValid(): Promise<void>;
|
|
13
13
|
protected static updatesViewCombinedFileWithTypesAsExpected(): Promise<void>;
|
|
14
14
|
protected static updatesViewCombinedWithPluginsAsExpected(): Promise<void>;
|
|
15
|
+
protected static viewPluginCanImportAnotherViewPlugin(): Promise<void>;
|
|
16
|
+
protected static canImportPluginFromExternalLibrary(): Promise<void>;
|
|
17
|
+
private static syncViews;
|
|
18
|
+
private static writeFile;
|
|
15
19
|
private static assertCombinedFileIncludes;
|
|
16
20
|
private static assertPluginContentsEqualExpected;
|
|
17
21
|
private static assertThrowsAlreadyExists;
|
|
@@ -18,10 +18,10 @@ var _applyDecoratedDescriptor2 = _interopRequireDefault(require("@babel/runtime/
|
|
|
18
18
|
var _spruceSkillUtils = require("@sprucelabs/spruce-skill-utils");
|
|
19
19
|
var _testUtils = require("@sprucelabs/test-utils");
|
|
20
20
|
var _AbstractSkillTest2 = _interopRequireDefault(require("../../../../tests/AbstractSkillTest"));
|
|
21
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _CreatingAViewPluginTest;
|
|
21
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _class, _CreatingAViewPluginTest;
|
|
22
22
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
23
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
|
-
var CreatingAViewPluginTest = exports["default"] = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)('creates expected plugin file 1', 'test', 'test', 'updated'), _dec3 = (0, _testUtils.test)('creates expected plugin file 2', 'another', 'another', 'updated'), _dec4 = (0, _testUtils.test)('creates expected plugin file 3', 'a third', 'aThird', 'generated'), _dec5 = (0, _testUtils.test)(), _dec6 = (0, _testUtils.test)(), _dec7 = (0, _testUtils.test)(), _dec8 = (0, _testUtils.test)(), _dec9 = (0, _testUtils.test)(), _dec10 = (0, _testUtils.test)(), _dec11 = (0, _testUtils.test)(), (_class = (_CreatingAViewPluginTest = /*#__PURE__*/function (_AbstractSkillTest) {
|
|
24
|
+
var CreatingAViewPluginTest = exports["default"] = (_dec = (0, _testUtils.test)(), _dec2 = (0, _testUtils.test)('creates expected plugin file 1', 'test', 'test', 'updated'), _dec3 = (0, _testUtils.test)('creates expected plugin file 2', 'another', 'another', 'updated'), _dec4 = (0, _testUtils.test)('creates expected plugin file 3', 'a third', 'aThird', 'generated'), _dec5 = (0, _testUtils.test)(), _dec6 = (0, _testUtils.test)(), _dec7 = (0, _testUtils.test)(), _dec8 = (0, _testUtils.test)(), _dec9 = (0, _testUtils.test)(), _dec10 = (0, _testUtils.test)(), _dec11 = (0, _testUtils.test)(), _dec12 = (0, _testUtils.test)(), _dec13 = (0, _testUtils.test)(), (_class = (_CreatingAViewPluginTest = /*#__PURE__*/function (_AbstractSkillTest) {
|
|
25
25
|
function CreatingAViewPluginTest() {
|
|
26
26
|
(0, _classCallCheck2["default"])(this, CreatingAViewPluginTest);
|
|
27
27
|
return _callSuper(this, CreatingAViewPluginTest, arguments);
|
|
@@ -252,6 +252,84 @@ var CreatingAViewPluginTest = exports["default"] = (_dec = (0, _testUtils.test)(
|
|
|
252
252
|
}
|
|
253
253
|
return updatesViewCombinedWithPluginsAsExpected;
|
|
254
254
|
}()
|
|
255
|
+
}, {
|
|
256
|
+
key: "viewPluginCanImportAnotherViewPlugin",
|
|
257
|
+
value: function () {
|
|
258
|
+
var _viewPluginCanImportAnotherViewPlugin = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11() {
|
|
259
|
+
var expected;
|
|
260
|
+
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
|
261
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
262
|
+
case 0:
|
|
263
|
+
this.writeFile('export class ExternalViewPlugin {}', 'external.ts');
|
|
264
|
+
this.writeFile("export { ExternalViewPlugin as default } from './external'", 'actual.view.plugin.ts');
|
|
265
|
+
_context11.next = 4;
|
|
266
|
+
return this.syncViews();
|
|
267
|
+
case 4:
|
|
268
|
+
expected = "export const pluginsByName = {\n\tactual: ExternalViewPlugin,\n\taThird: AThirdViewPlugin,\n\tanother: AnotherViewPlugin,\n\ttest: TestViewPlugin,\n\ttestCamel: TestCamelViewPlugin,\n}\n";
|
|
269
|
+
this.assertCombinedFileIncludes(expected);
|
|
270
|
+
case 6:
|
|
271
|
+
case "end":
|
|
272
|
+
return _context11.stop();
|
|
273
|
+
}
|
|
274
|
+
}, _callee11, this);
|
|
275
|
+
}));
|
|
276
|
+
function viewPluginCanImportAnotherViewPlugin() {
|
|
277
|
+
return _viewPluginCanImportAnotherViewPlugin.apply(this, arguments);
|
|
278
|
+
}
|
|
279
|
+
return viewPluginCanImportAnotherViewPlugin;
|
|
280
|
+
}()
|
|
281
|
+
}, {
|
|
282
|
+
key: "canImportPluginFromExternalLibrary",
|
|
283
|
+
value: function () {
|
|
284
|
+
var _canImportPluginFromExternalLibrary = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12() {
|
|
285
|
+
var expected;
|
|
286
|
+
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
|
287
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
288
|
+
case 0:
|
|
289
|
+
this.writeFile("export { CardViewController as default } from '@sprucelabs/heartwood-view-controllers'", 'card.view.plugin.ts');
|
|
290
|
+
_context12.next = 3;
|
|
291
|
+
return this.syncViews();
|
|
292
|
+
case 3:
|
|
293
|
+
expected = "export const pluginsByName = {\n\tactual: ExternalViewPlugin,\n\tcard: CardViewController,\n\taThird: AThirdViewPlugin,\n\tanother: AnotherViewPlugin,\n\ttest: TestViewPlugin,\n\ttestCamel: TestCamelViewPlugin,\n}\n";
|
|
294
|
+
this.assertCombinedFileIncludes(expected);
|
|
295
|
+
case 5:
|
|
296
|
+
case "end":
|
|
297
|
+
return _context12.stop();
|
|
298
|
+
}
|
|
299
|
+
}, _callee12, this);
|
|
300
|
+
}));
|
|
301
|
+
function canImportPluginFromExternalLibrary() {
|
|
302
|
+
return _canImportPluginFromExternalLibrary.apply(this, arguments);
|
|
303
|
+
}
|
|
304
|
+
return canImportPluginFromExternalLibrary;
|
|
305
|
+
}()
|
|
306
|
+
}, {
|
|
307
|
+
key: "syncViews",
|
|
308
|
+
value: function () {
|
|
309
|
+
var _syncViews = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13() {
|
|
310
|
+
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
|
311
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
312
|
+
case 0:
|
|
313
|
+
_context13.next = 2;
|
|
314
|
+
return this.Action('view', 'sync').execute({});
|
|
315
|
+
case 2:
|
|
316
|
+
case "end":
|
|
317
|
+
return _context13.stop();
|
|
318
|
+
}
|
|
319
|
+
}, _callee13, this);
|
|
320
|
+
}));
|
|
321
|
+
function syncViews() {
|
|
322
|
+
return _syncViews.apply(this, arguments);
|
|
323
|
+
}
|
|
324
|
+
return syncViews;
|
|
325
|
+
}()
|
|
326
|
+
}, {
|
|
327
|
+
key: "writeFile",
|
|
328
|
+
value: function writeFile(content, fileName) {
|
|
329
|
+
var actualPlugiContent = content;
|
|
330
|
+
var actualDestination = this.resolvePath('src', fileName);
|
|
331
|
+
_spruceSkillUtils.diskUtil.writeFile(actualDestination, actualPlugiContent);
|
|
332
|
+
}
|
|
255
333
|
}, {
|
|
256
334
|
key: "assertCombinedFileIncludes",
|
|
257
335
|
value: function assertCombinedFileIncludes(expected) {
|
|
@@ -269,26 +347,26 @@ var CreatingAViewPluginTest = exports["default"] = (_dec = (0, _testUtils.test)(
|
|
|
269
347
|
}, {
|
|
270
348
|
key: "assertThrowsAlreadyExists",
|
|
271
349
|
value: function () {
|
|
272
|
-
var _assertThrowsAlreadyExists = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
350
|
+
var _assertThrowsAlreadyExists = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14(name) {
|
|
273
351
|
var results;
|
|
274
|
-
return _regenerator["default"].wrap(function
|
|
275
|
-
while (1) switch (
|
|
352
|
+
return _regenerator["default"].wrap(function _callee14$(_context14) {
|
|
353
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
276
354
|
case 0:
|
|
277
|
-
|
|
355
|
+
_context14.next = 2;
|
|
278
356
|
return this.execute({
|
|
279
357
|
nameReadable: name
|
|
280
358
|
});
|
|
281
359
|
case 2:
|
|
282
|
-
results =
|
|
360
|
+
results = _context14.sent;
|
|
283
361
|
_testUtils.assert.isTruthy(results.errors);
|
|
284
362
|
_testUtils.errorAssert.assertError(results.errors[0], 'VIEW_PLUGIN_ALREADY_EXISTS', {
|
|
285
363
|
name: name
|
|
286
364
|
});
|
|
287
365
|
case 5:
|
|
288
366
|
case "end":
|
|
289
|
-
return
|
|
367
|
+
return _context14.stop();
|
|
290
368
|
}
|
|
291
|
-
},
|
|
369
|
+
}, _callee14, this);
|
|
292
370
|
}));
|
|
293
371
|
function assertThrowsAlreadyExists(_x4) {
|
|
294
372
|
return _assertThrowsAlreadyExists.apply(this, arguments);
|
|
@@ -309,19 +387,19 @@ var CreatingAViewPluginTest = exports["default"] = (_dec = (0, _testUtils.test)(
|
|
|
309
387
|
}, {
|
|
310
388
|
key: "execute",
|
|
311
389
|
value: function () {
|
|
312
|
-
var _execute = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
313
|
-
return _regenerator["default"].wrap(function
|
|
314
|
-
while (1) switch (
|
|
390
|
+
var _execute = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15(options) {
|
|
391
|
+
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
|
392
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
315
393
|
case 0:
|
|
316
|
-
|
|
394
|
+
_context15.next = 2;
|
|
317
395
|
return this.action.execute(options);
|
|
318
396
|
case 2:
|
|
319
|
-
return
|
|
397
|
+
return _context15.abrupt("return", _context15.sent);
|
|
320
398
|
case 3:
|
|
321
399
|
case "end":
|
|
322
|
-
return
|
|
400
|
+
return _context15.stop();
|
|
323
401
|
}
|
|
324
|
-
},
|
|
402
|
+
}, _callee15, this);
|
|
325
403
|
}));
|
|
326
404
|
function execute(_x5) {
|
|
327
405
|
return _execute.apply(this, arguments);
|
|
@@ -350,5 +428,5 @@ var CreatingAViewPluginTest = exports["default"] = (_dec = (0, _testUtils.test)(
|
|
|
350
428
|
return this.resolveHashSprucePath('views', 'views.ts');
|
|
351
429
|
}
|
|
352
430
|
}]);
|
|
353
|
-
}(_AbstractSkillTest2["default"]), (0, _defineProperty2["default"])(_CreatingAViewPluginTest, "skillCacheKey", 'views'), (0, _defineProperty2["default"])(_CreatingAViewPluginTest, "action", void 0), _CreatingAViewPluginTest), ((0, _applyDecoratedDescriptor2["default"])(_class, "hasAction", [_dec], Object.getOwnPropertyDescriptor(_class, "hasAction"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "createsExpectedFile", [_dec2, _dec3, _dec4], Object.getOwnPropertyDescriptor(_class, "createsExpectedFile"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "usesCamelNameIfProvided", [_dec5], Object.getOwnPropertyDescriptor(_class, "usesCamelNameIfProvided"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "actuallyCreatesFile", [_dec6], Object.getOwnPropertyDescriptor(_class, "actuallyCreatesFile"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "throwsIfPluginAlreadyExists", [_dec7], Object.getOwnPropertyDescriptor(_class, "throwsIfPluginAlreadyExists"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "contentsAreEqualToExpected", [_dec8], Object.getOwnPropertyDescriptor(_class, "contentsAreEqualToExpected"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "combineViewsFileIsValid", [_dec9], Object.getOwnPropertyDescriptor(_class, "combineViewsFileIsValid"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "updatesViewCombinedFileWithTypesAsExpected", [_dec10], Object.getOwnPropertyDescriptor(_class, "updatesViewCombinedFileWithTypesAsExpected"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "updatesViewCombinedWithPluginsAsExpected", [_dec11], Object.getOwnPropertyDescriptor(_class, "updatesViewCombinedWithPluginsAsExpected"), _class)), _class));
|
|
431
|
+
}(_AbstractSkillTest2["default"]), (0, _defineProperty2["default"])(_CreatingAViewPluginTest, "skillCacheKey", 'views'), (0, _defineProperty2["default"])(_CreatingAViewPluginTest, "action", void 0), _CreatingAViewPluginTest), ((0, _applyDecoratedDescriptor2["default"])(_class, "hasAction", [_dec], Object.getOwnPropertyDescriptor(_class, "hasAction"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "createsExpectedFile", [_dec2, _dec3, _dec4], Object.getOwnPropertyDescriptor(_class, "createsExpectedFile"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "usesCamelNameIfProvided", [_dec5], Object.getOwnPropertyDescriptor(_class, "usesCamelNameIfProvided"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "actuallyCreatesFile", [_dec6], Object.getOwnPropertyDescriptor(_class, "actuallyCreatesFile"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "throwsIfPluginAlreadyExists", [_dec7], Object.getOwnPropertyDescriptor(_class, "throwsIfPluginAlreadyExists"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "contentsAreEqualToExpected", [_dec8], Object.getOwnPropertyDescriptor(_class, "contentsAreEqualToExpected"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "combineViewsFileIsValid", [_dec9], Object.getOwnPropertyDescriptor(_class, "combineViewsFileIsValid"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "updatesViewCombinedFileWithTypesAsExpected", [_dec10], Object.getOwnPropertyDescriptor(_class, "updatesViewCombinedFileWithTypesAsExpected"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "updatesViewCombinedWithPluginsAsExpected", [_dec11], Object.getOwnPropertyDescriptor(_class, "updatesViewCombinedWithPluginsAsExpected"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "viewPluginCanImportAnotherViewPlugin", [_dec12], Object.getOwnPropertyDescriptor(_class, "viewPluginCanImportAnotherViewPlugin"), _class), (0, _applyDecoratedDescriptor2["default"])(_class, "canImportPluginFromExternalLibrary", [_dec13], Object.getOwnPropertyDescriptor(_class, "canImportPluginFromExternalLibrary"), _class)), _class));
|
|
354
432
|
//# sourceMappingURL=CreatingAViewPlugin.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatingAViewPlugin.test.js","names":["_spruceSkillUtils","require","_testUtils","_AbstractSkillTest2","_interopRequireDefault","_dec","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_dec10","_dec11","_class","_CreatingAViewPluginTest","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","constructor","apply","Boolean","prototype","valueOf","call","CreatingAViewPluginTest","exports","test","_AbstractSkillTest","_classCallCheck2","arguments","_inherits2","_createClass2","key","value","_beforeEach","_asyncToGenerator2","_regenerator","mark","_callee","wrap","_callee$","_context","prev","next","_get2","action","Action","stop","beforeEach","_hasAction","_callee2","_callee2$","_context2","assert","isFunction","execute","hasAction","_createsExpectedFile","_callee3","readable","expected","combinedViewAction","results","_callee3$","_context3","nameReadable","sent","assertExpectedFileCreated","isFalsy","errors","createsExpectedFile","_x","_x2","_x3","_usesCamelNameIfProvided","_callee4","_callee4$","_context4","nameCamel","usesCamelNameIfProvided","_actuallyCreatesFile","_callee5","_callee5$","_context5","assertViewPluginWritten","actuallyCreatesFile","_throwsIfPluginAlreadyExists","_callee6","_callee6$","_context6","assertThrowsAlreadyExists","throwsIfPluginAlreadyExists","_contentsAreEqualToExpected","_callee7","_callee7$","_context7","assertPluginContentsEqualExpected","contentsAreEqualToExpected","_combineViewsFileIsValid","_callee8","combined","_callee8$","_context8","getPathToCombinedViewsFile","Service","check","combineViewsFileIsValid","_updatesViewCombinedFileWithTypesAsExpected","_callee9","_callee9$","_context9","assertCombinedFileIncludes","updatesViewCombinedFileWithTypesAsExpected","_updatesViewCombinedWithPluginsAsExpected","_callee10","_callee10$","_context10","updatesViewCombinedWithPluginsAsExpected","contents","diskUtil","readFile","doesInclude","namePascal","buildPathToViewPlugin","concat","isEqual","trim","_assertThrowsAlreadyExists","_callee11","name","_callee11$","_context11","isTruthy","errorAssert","assertError","_x4","path","isTrue","doesFileExist","resolvePath","_execute","_callee12","options","_callee12$","_context12","abrupt","_x5","_results$files","_results$files2","expectedName","files","resolveHashSprucePath","AbstractSkillTest","_defineProperty2","_applyDecoratedDescriptor2","Object","getOwnPropertyDescriptor"],"sources":["../../../../../src/__tests__/behavioral/views/plugins/CreatingAViewPlugin.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert, errorAssert } from '@sprucelabs/test-utils'\nimport { FeatureActionResponse } from '../../../../features/features.types'\nimport CreatePluginAction from '../../../../features/view/actions/CreatePluginAction'\nimport AbstractSkillTest from '../../../../tests/AbstractSkillTest'\n\nexport default class CreatingAViewPluginTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'views'\n\tprivate static action: CreatePluginAction\n\n\tprotected static async beforeEach(): Promise<void> {\n\t\tawait super.beforeEach()\n\t\tthis.action = this.Action('view', 'createPlugin')\n\t}\n\n\t@test()\n\tprotected static async hasAction() {\n\t\tassert.isFunction(this.action.execute)\n\t}\n\n\t@test('creates expected plugin file 1', 'test', 'test', 'updated')\n\t@test('creates expected plugin file 2', 'another', 'another', 'updated')\n\t@test('creates expected plugin file 3', 'a third', 'aThird', 'generated')\n\tprotected static async createsExpectedFile(\n\t\treadable: string,\n\t\texpected: string,\n\t\tcombinedViewAction: string\n\t) {\n\t\tconst results = await this.execute({ nameReadable: readable })\n\t\tthis.assertExpectedFileCreated(results, expected, combinedViewAction)\n\t\tassert.isFalsy(\n\t\t\tresults.errors,\n\t\t\t'Errors were returned and none were expected!'\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async usesCamelNameIfProvided() {\n\t\tconst results = await this.execute({\n\t\t\tnameReadable: 'test',\n\t\t\tnameCamel: 'testCamel',\n\t\t})\n\n\t\tthis.assertExpectedFileCreated(results, 'testCamel', 'updated')\n\t}\n\n\t@test()\n\tprotected static async actuallyCreatesFile() {\n\t\tthis.assertViewPluginWritten('test')\n\t\tthis.assertViewPluginWritten('another')\n\t\tthis.assertViewPluginWritten('aThird')\n\t}\n\n\t@test()\n\tprotected static async throwsIfPluginAlreadyExists() {\n\t\tawait this.assertThrowsAlreadyExists('test')\n\t\tawait this.assertThrowsAlreadyExists('another')\n\t}\n\n\t@test()\n\tprotected static async contentsAreEqualToExpected() {\n\t\tthis.assertPluginContentsEqualExpected('test', 'Test')\n\t\tthis.assertPluginContentsEqualExpected('another', 'Another')\n\t\tthis.assertPluginContentsEqualExpected('aThird', 'AThird')\n\t}\n\n\t@test()\n\tprotected static async combineViewsFileIsValid() {\n\t\tconst combined = this.getPathToCombinedViewsFile()\n\t\tawait this.Service('typeChecker').check(combined)\n\t}\n\n\t@test()\n\tprotected static async updatesViewCombinedFileWithTypesAsExpected() {\n\t\tconst expected = `\tinterface ViewControllerPlugins {\n\t\taThird: AThirdViewPlugin\n\t\tanother: AnotherViewPlugin\n\t\ttest: TestViewPlugin\n\t\ttestCamel: TestCamelViewPlugin\n\t}`\n\t\tthis.assertCombinedFileIncludes(expected)\n\t}\n\n\t@test()\n\tprotected static async updatesViewCombinedWithPluginsAsExpected() {\n\t\tconst expected = `export const pluginsByName = {\n\taThird: AThirdViewPlugin,\n\tanother: AnotherViewPlugin,\n\ttest: TestViewPlugin,\n\ttestCamel: TestCamelViewPlugin,\n}\n`\n\n\t\tthis.assertCombinedFileIncludes(expected)\n\t\tthis.assertCombinedFileIncludes('heartwood(vcs, pluginsByName)')\n\t}\n\n\tprivate static assertCombinedFileIncludes(expected: string) {\n\t\tconst combined = this.getPathToCombinedViewsFile()\n\t\tconst contents = diskUtil.readFile(combined)\n\t\tassert.doesInclude(contents, expected)\n\t}\n\n\tprivate static assertPluginContentsEqualExpected(\n\t\tnameCamel: string,\n\t\tnamePascal: string\n\t) {\n\t\tconst contents = diskUtil.readFile(this.buildPathToViewPlugin(nameCamel))\n\t\tconst expected = `export default class ${namePascal}ViewPlugin {}`\n\n\t\tassert.isEqual(contents.trim(), expected.trim())\n\t}\n\n\tprivate static async assertThrowsAlreadyExists(name: string) {\n\t\tconst results = await this.execute({ nameReadable: name })\n\t\tassert.isTruthy(results.errors)\n\t\terrorAssert.assertError(results.errors[0], 'VIEW_PLUGIN_ALREADY_EXISTS', {\n\t\t\tname,\n\t\t})\n\t}\n\n\tprivate static assertViewPluginWritten(name: string) {\n\t\tconst path = this.buildPathToViewPlugin(name)\n\t\tassert.isTrue(diskUtil.doesFileExist(path), `File ${path} was not written!`)\n\t}\n\n\tprivate static buildPathToViewPlugin(name: string) {\n\t\treturn this.resolvePath('src', 'viewPlugins', `${name}.view.plugin.ts`)\n\t}\n\n\tprivate static async execute(options: {\n\t\tnameReadable: string\n\t\tnameCamel?: string\n\t}) {\n\t\treturn await this.action.execute(options)\n\t}\n\n\tprivate static assertExpectedFileCreated(\n\t\tresults: FeatureActionResponse,\n\t\texpected: string,\n\t\tcombinedViewAction: string\n\t) {\n\t\tconst expectedName = `${expected}.view.plugin.ts`\n\n\t\tassert.doesInclude(results.files?.[0], {\n\t\t\taction: 'generated',\n\t\t\tname: expectedName,\n\t\t\tpath: this.resolvePath('src', 'viewPlugins', expectedName),\n\t\t})\n\n\t\tassert.doesInclude(results.files?.[1], {\n\t\t\taction: combinedViewAction,\n\t\t\tname: 'views.ts',\n\t\t\tpath: this.getPathToCombinedViewsFile(),\n\t\t})\n\t}\n\n\tprivate static getPathToCombinedViewsFile() {\n\t\treturn this.resolveHashSprucePath('views', 'views.ts')\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAGA,IAAAE,mBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmE,IAAAI,IAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,wBAAA;AAAA,SAAAC,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,aAAAF,CAAA,OAAAG,2BAAA,aAAAJ,CAAA,EAAAK,yBAAA,KAAAC,OAAA,CAAAC,SAAA,CAAAN,CAAA,EAAAC,CAAA,YAAAC,gBAAA,aAAAH,CAAA,EAAAQ,WAAA,IAAAP,CAAA,CAAAQ,KAAA,CAAAT,CAAA,EAAAE,CAAA;AAAA,SAAAG,0BAAA,cAAAL,CAAA,IAAAU,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAP,OAAA,CAAAC,SAAA,CAAAG,OAAA,iCAAAV,CAAA,aAAAK,yBAAA,YAAAA,0BAAA,aAAAL,CAAA;AAAA,IAE9Cc,uBAAuB,GAAAC,OAAA,eAAA7B,IAAA,GAS1C,IAAA8B,eA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AAAmJ,0BAAA,aAAAnJ,MAAA,iDAAAF,MAAA,GAAAsJ,MAAA,CAAAC,wBAAA,CAAArJ,MAAA,iDAAAA,MAAA,OAAAmJ,0BAAA,aAAAnJ,MAAA,+CAAAD,MAAA,GAAAqJ,MAAA,CAAAC,wBAAA,CAAArJ,MAAA,+CAAAA,MAAA,IAAAA,MAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"CreatingAViewPlugin.test.js","names":["_spruceSkillUtils","require","_testUtils","_AbstractSkillTest2","_interopRequireDefault","_dec","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_dec10","_dec11","_dec12","_dec13","_class","_CreatingAViewPluginTest","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","Reflect","construct","constructor","apply","Boolean","prototype","valueOf","call","CreatingAViewPluginTest","exports","test","_AbstractSkillTest","_classCallCheck2","arguments","_inherits2","_createClass2","key","value","_beforeEach","_asyncToGenerator2","_regenerator","mark","_callee","wrap","_callee$","_context","prev","next","_get2","action","Action","stop","beforeEach","_hasAction","_callee2","_callee2$","_context2","assert","isFunction","execute","hasAction","_createsExpectedFile","_callee3","readable","expected","combinedViewAction","results","_callee3$","_context3","nameReadable","sent","assertExpectedFileCreated","isFalsy","errors","createsExpectedFile","_x","_x2","_x3","_usesCamelNameIfProvided","_callee4","_callee4$","_context4","nameCamel","usesCamelNameIfProvided","_actuallyCreatesFile","_callee5","_callee5$","_context5","assertViewPluginWritten","actuallyCreatesFile","_throwsIfPluginAlreadyExists","_callee6","_callee6$","_context6","assertThrowsAlreadyExists","throwsIfPluginAlreadyExists","_contentsAreEqualToExpected","_callee7","_callee7$","_context7","assertPluginContentsEqualExpected","contentsAreEqualToExpected","_combineViewsFileIsValid","_callee8","combined","_callee8$","_context8","getPathToCombinedViewsFile","Service","check","combineViewsFileIsValid","_updatesViewCombinedFileWithTypesAsExpected","_callee9","_callee9$","_context9","assertCombinedFileIncludes","updatesViewCombinedFileWithTypesAsExpected","_updatesViewCombinedWithPluginsAsExpected","_callee10","_callee10$","_context10","updatesViewCombinedWithPluginsAsExpected","_viewPluginCanImportAnotherViewPlugin","_callee11","_callee11$","_context11","writeFile","syncViews","viewPluginCanImportAnotherViewPlugin","_canImportPluginFromExternalLibrary","_callee12","_callee12$","_context12","canImportPluginFromExternalLibrary","_syncViews","_callee13","_callee13$","_context13","content","fileName","actualPlugiContent","actualDestination","resolvePath","diskUtil","contents","readFile","doesInclude","namePascal","buildPathToViewPlugin","concat","isEqual","trim","_assertThrowsAlreadyExists","_callee14","name","_callee14$","_context14","isTruthy","errorAssert","assertError","_x4","path","isTrue","doesFileExist","_execute","_callee15","options","_callee15$","_context15","abrupt","_x5","_results$files","_results$files2","expectedName","files","resolveHashSprucePath","AbstractSkillTest","_defineProperty2","_applyDecoratedDescriptor2","Object","getOwnPropertyDescriptor"],"sources":["../../../../../src/__tests__/behavioral/views/plugins/CreatingAViewPlugin.test.ts"],"sourcesContent":["import { diskUtil } from '@sprucelabs/spruce-skill-utils'\nimport { test, assert, errorAssert } from '@sprucelabs/test-utils'\nimport { FeatureActionResponse } from '../../../../features/features.types'\nimport CreatePluginAction from '../../../../features/view/actions/CreatePluginAction'\nimport AbstractSkillTest from '../../../../tests/AbstractSkillTest'\n\nexport default class CreatingAViewPluginTest extends AbstractSkillTest {\n\tprotected static skillCacheKey = 'views'\n\tprivate static action: CreatePluginAction\n\n\tprotected static async beforeEach(): Promise<void> {\n\t\tawait super.beforeEach()\n\t\tthis.action = this.Action('view', 'createPlugin')\n\t}\n\n\t@test()\n\tprotected static async hasAction() {\n\t\tassert.isFunction(this.action.execute)\n\t}\n\n\t@test('creates expected plugin file 1', 'test', 'test', 'updated')\n\t@test('creates expected plugin file 2', 'another', 'another', 'updated')\n\t@test('creates expected plugin file 3', 'a third', 'aThird', 'generated')\n\tprotected static async createsExpectedFile(\n\t\treadable: string,\n\t\texpected: string,\n\t\tcombinedViewAction: string\n\t) {\n\t\tconst results = await this.execute({ nameReadable: readable })\n\t\tthis.assertExpectedFileCreated(results, expected, combinedViewAction)\n\t\tassert.isFalsy(\n\t\t\tresults.errors,\n\t\t\t'Errors were returned and none were expected!'\n\t\t)\n\t}\n\n\t@test()\n\tprotected static async usesCamelNameIfProvided() {\n\t\tconst results = await this.execute({\n\t\t\tnameReadable: 'test',\n\t\t\tnameCamel: 'testCamel',\n\t\t})\n\n\t\tthis.assertExpectedFileCreated(results, 'testCamel', 'updated')\n\t}\n\n\t@test()\n\tprotected static async actuallyCreatesFile() {\n\t\tthis.assertViewPluginWritten('test')\n\t\tthis.assertViewPluginWritten('another')\n\t\tthis.assertViewPluginWritten('aThird')\n\t}\n\n\t@test()\n\tprotected static async throwsIfPluginAlreadyExists() {\n\t\tawait this.assertThrowsAlreadyExists('test')\n\t\tawait this.assertThrowsAlreadyExists('another')\n\t}\n\n\t@test()\n\tprotected static async contentsAreEqualToExpected() {\n\t\tthis.assertPluginContentsEqualExpected('test', 'Test')\n\t\tthis.assertPluginContentsEqualExpected('another', 'Another')\n\t\tthis.assertPluginContentsEqualExpected('aThird', 'AThird')\n\t}\n\n\t@test()\n\tprotected static async combineViewsFileIsValid() {\n\t\tconst combined = this.getPathToCombinedViewsFile()\n\t\tawait this.Service('typeChecker').check(combined)\n\t}\n\n\t@test()\n\tprotected static async updatesViewCombinedFileWithTypesAsExpected() {\n\t\tconst expected = `\tinterface ViewControllerPlugins {\n\t\taThird: AThirdViewPlugin\n\t\tanother: AnotherViewPlugin\n\t\ttest: TestViewPlugin\n\t\ttestCamel: TestCamelViewPlugin\n\t}`\n\t\tthis.assertCombinedFileIncludes(expected)\n\t}\n\n\t@test()\n\tprotected static async updatesViewCombinedWithPluginsAsExpected() {\n\t\tconst expected = `export const pluginsByName = {\n\taThird: AThirdViewPlugin,\n\tanother: AnotherViewPlugin,\n\ttest: TestViewPlugin,\n\ttestCamel: TestCamelViewPlugin,\n}\n`\n\n\t\tthis.assertCombinedFileIncludes(expected)\n\t\tthis.assertCombinedFileIncludes('heartwood(vcs, pluginsByName)')\n\t}\n\n\t@test()\n\tprotected static async viewPluginCanImportAnotherViewPlugin() {\n\t\tthis.writeFile('export class ExternalViewPlugin {}', 'external.ts')\n\t\tthis.writeFile(\n\t\t\t`export { ExternalViewPlugin as default } from './external'`,\n\t\t\t'actual.view.plugin.ts'\n\t\t)\n\n\t\tawait this.syncViews()\n\n\t\tconst expected = `export const pluginsByName = {\n\tactual: ExternalViewPlugin,\n\taThird: AThirdViewPlugin,\n\tanother: AnotherViewPlugin,\n\ttest: TestViewPlugin,\n\ttestCamel: TestCamelViewPlugin,\n}\n`\n\n\t\tthis.assertCombinedFileIncludes(expected)\n\t}\n\n\t@test()\n\tprotected static async canImportPluginFromExternalLibrary() {\n\t\tthis.writeFile(\n\t\t\t\"export { CardViewController as default } from '@sprucelabs/heartwood-view-controllers'\",\n\t\t\t'card.view.plugin.ts'\n\t\t)\n\n\t\tawait this.syncViews()\n\n\t\tconst expected = `export const pluginsByName = {\n\tactual: ExternalViewPlugin,\n\tcard: CardViewController,\n\taThird: AThirdViewPlugin,\n\tanother: AnotherViewPlugin,\n\ttest: TestViewPlugin,\n\ttestCamel: TestCamelViewPlugin,\n}\n`\n\t\tthis.assertCombinedFileIncludes(expected)\n\t}\n\n\tprivate static async syncViews() {\n\t\tawait this.Action('view', 'sync').execute({})\n\t}\n\n\tprivate static writeFile(content: string, fileName: string) {\n\t\tconst actualPlugiContent = content\n\t\tconst actualDestination = this.resolvePath('src', fileName)\n\t\tdiskUtil.writeFile(actualDestination, actualPlugiContent)\n\t}\n\n\tprivate static assertCombinedFileIncludes(expected: string) {\n\t\tconst combined = this.getPathToCombinedViewsFile()\n\t\tconst contents = diskUtil.readFile(combined)\n\t\tassert.doesInclude(contents, expected)\n\t}\n\n\tprivate static assertPluginContentsEqualExpected(\n\t\tnameCamel: string,\n\t\tnamePascal: string\n\t) {\n\t\tconst contents = diskUtil.readFile(this.buildPathToViewPlugin(nameCamel))\n\t\tconst expected = `export default class ${namePascal}ViewPlugin {}`\n\n\t\tassert.isEqual(contents.trim(), expected.trim())\n\t}\n\n\tprivate static async assertThrowsAlreadyExists(name: string) {\n\t\tconst results = await this.execute({ nameReadable: name })\n\t\tassert.isTruthy(results.errors)\n\t\terrorAssert.assertError(results.errors[0], 'VIEW_PLUGIN_ALREADY_EXISTS', {\n\t\t\tname,\n\t\t})\n\t}\n\n\tprivate static assertViewPluginWritten(name: string) {\n\t\tconst path = this.buildPathToViewPlugin(name)\n\t\tassert.isTrue(diskUtil.doesFileExist(path), `File ${path} was not written!`)\n\t}\n\n\tprivate static buildPathToViewPlugin(name: string) {\n\t\treturn this.resolvePath('src', 'viewPlugins', `${name}.view.plugin.ts`)\n\t}\n\n\tprivate static async execute(options: {\n\t\tnameReadable: string\n\t\tnameCamel?: string\n\t}) {\n\t\treturn await this.action.execute(options)\n\t}\n\n\tprivate static assertExpectedFileCreated(\n\t\tresults: FeatureActionResponse,\n\t\texpected: string,\n\t\tcombinedViewAction: string\n\t) {\n\t\tconst expectedName = `${expected}.view.plugin.ts`\n\n\t\tassert.doesInclude(results.files?.[0], {\n\t\t\taction: 'generated',\n\t\t\tname: expectedName,\n\t\t\tpath: this.resolvePath('src', 'viewPlugins', expectedName),\n\t\t})\n\n\t\tassert.doesInclude(results.files?.[1], {\n\t\t\taction: combinedViewAction,\n\t\t\tname: 'views.ts',\n\t\t\tpath: this.getPathToCombinedViewsFile(),\n\t\t})\n\t}\n\n\tprivate static getPathToCombinedViewsFile() {\n\t\treturn this.resolveHashSprucePath('views', 'views.ts')\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAGA,IAAAE,mBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmE,IAAAI,IAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EA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BAAAA,MAAA,OAAAuK,0BAAA,aAAAvK,MAAA,0BAAAR,KAAA,GAAAgL,MAAA,CAAAC,wBAAA,CAAAzK,MAAA,0BAAAA,MAAA,OAAAuK,0BAAA,aAAAvK,MAAA,kCAAAP,KAAA,GAAA+K,MAAA,CAAAC,wBAAA,CAAAzK,MAAA,kCAAAA,MAAA,OAAAuK,0BAAA,aAAAvK,MAAA,iCAAAN,KAAA,GAAA8K,MAAA,CAAAC,wBAAA,CAAAzK,MAAA,iCAAAA,MAAA,OAAAuK,0BAAA,aAAAvK,MAAA,8BAAAL,KAAA,GAAA6K,MAAA,CAAAC,wBAAA,CAAAzK,MAAA,8BAAAA,MAAA,OAAAuK,0BAAA,aAAAvK,MAAA,iDAAAJ,MAAA,GAAA4K,MAAA,CAAAC,wBAAA,CAAAzK,MAAA,iDAAAA,MAAA,OAAAuK,0BAAA,aAAAvK,MAAA,+CAAAH,MAAA,GAAA2K,MAAA,CAAAC,wBAAA,CAAAzK,MAAA,+CAAAA,MAAA,OAAAuK,0BAAA,aAAAvK,MAAA,2CAAAF,MAAA,GAAA0K,MAAA,CAAAC,wBAAA,CAAAzK,MAAA,2CAAAA,MAAA,OAAAuK,0BAAA,aAAAvK,MAAA,yCAAAD,MAAA,GAAAyK,MAAA,CAAAC,wBAAA,CAAAzK,MAAA,yCAAAA,MAAA,IAAAA,MAAA","ignoreList":[]}
|
|
@@ -29,7 +29,7 @@ var SpruceError = exports["default"] = /*#__PURE__*/function (_AbstractSpruceErr
|
|
|
29
29
|
key: "friendlyMessage",
|
|
30
30
|
value: /** An easy to understand version of the errors */
|
|
31
31
|
function friendlyMessage() {
|
|
32
|
-
var _options$friendlyMess, _options$originalErro2, _options$originalErro3, _options$friendlyMess2, _options$originalErro4, _options$originalErro5, _options$originalErro7, _ref, _options$friendlyMess3, _options$originalErro8, _options$friendlyMess4;
|
|
32
|
+
var _options$friendlyMess, _options$originalErro2, _options$originalErro3, _options$friendlyMess2, _options$originalErro4, _options$originalErro5, _options$originalErro7, _ref, _options$friendlyMess3, _options$originalErro8, _options$friendlyMess4, _options$originalErro9;
|
|
33
33
|
var options = this.options;
|
|
34
34
|
var message;
|
|
35
35
|
switch (options === null || options === void 0 ? void 0 : options.code) {
|
|
@@ -196,7 +196,7 @@ var SpruceError = exports["default"] = /*#__PURE__*/function (_AbstractSpruceErr
|
|
|
196
196
|
message = "Cache is not enabled, so it can't be disabled!";
|
|
197
197
|
break;
|
|
198
198
|
case 'DOCKER_NOT_STARTED':
|
|
199
|
-
message = 'Docker has not been started! Start it and try again!';
|
|
199
|
+
message = 'Docker has not been started (or you are trying to run this command in a monorepo)! Start it and try again (or move out of a monorepo)! Originial error:\n\n' + ((_options$originalErro9 = options.originalError) === null || _options$originalErro9 === void 0 ? void 0 : _options$originalErro9.stack);
|
|
200
200
|
break;
|
|
201
201
|
case 'SCHEMA_TEMPLATE_ITEM_BUILDING_FAILED':
|
|
202
202
|
message = "Failed to build schema template item for '".concat(_spruceSkillUtils.namesUtil.toPascal(options.schemaNamespace), ".").concat(options.schemaId, "'. The field I had an issue on was '").concat(options.fieldName, "'. It's options are:\n\n").concat(JSON.stringify(options.fieldOptions), ".\n\nChances are you have a circular reference in your schemas. You'll need to extract shared fields to a new file and have your schemas mix those in, vs referencing eath other.");
|