@sprucelabs/spruce-templates 17.0.17 → 17.1.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/build/index.d.ts CHANGED
@@ -76,6 +76,7 @@ export declare const templates: {
76
76
  skillEventContractTypesFile: string;
77
77
  }): string;
78
78
  sandboxWillBootListener(): string;
79
+ polish(): string;
79
80
  directoryTemplate<K extends DirectoryTemplateCode>(options: {
80
81
  kind: K;
81
82
  context: DirectoryTemplateContextMap[K];
package/build/index.js CHANGED
@@ -181,6 +181,10 @@ exports.templates = {
181
181
  const template = templateImporter_utility_1.default.getTemplate('sandbox/will-boot.listener.ts.hbs');
182
182
  return template({});
183
183
  },
184
+ polish() {
185
+ const template = templateImporter_utility_1.default.getTemplate('polish/polish.ts.hbs');
186
+ return template({});
187
+ },
184
188
  async directoryTemplate(options) {
185
189
  return DirectoryTemplateUtility_1.default.build(options);
186
190
  },
@@ -3,12 +3,6 @@ import { SpruceEvent, SpruceEventResponse } from '@sprucelabs/spruce-event-utils
3
3
  {{#if emitPayloadSchemaTemplateItem}}import { SkillEventContract } from '@sprucelabs/mercury-types'{{/if}}
4
4
  {{#if shouldImportGlobalSchema}}import { {{globalSchemaNamespace}} } from '{{schemaTypesFile}}'{{/if}}
5
5
 
6
- {{#if emitPayloadSchemaTemplateItem}}
7
- type EmitPayload = {{{ schemaNamespacePath schemaTemplateItem=emitPayloadSchemaTemplateItem }}}
8
- {{/if}}{{#if responsePayloadSchemaTemplateItem}}
9
- type ResponsePayload = {{{ schemaNamespacePath schemaTemplateItem=responsePayloadSchemaTemplateItem }}}
10
- {{/if}}
11
-
12
6
  export default async (event: SpruceEvent{{#if emitPayloadSchemaTemplateItem}}<SkillEventContract, EmitPayload>{{/if}}): SpruceEventResponse{{#if responsePayloadSchemaTemplateItem}}<ResponsePayload>{{/if}} => {
13
7
  console.log(event)
14
8
 
@@ -21,3 +15,9 @@ export default async (event: SpruceEvent{{#if emitPayloadSchemaTemplateItem}}<Sk
21
15
 
22
16
  //return {}
23
17
  }
18
+
19
+ {{#if emitPayloadSchemaTemplateItem}}
20
+ type EmitPayload = {{{ schemaNamespacePath schemaTemplateItem=emitPayloadSchemaTemplateItem }}}
21
+ {{/if}}{{#if responsePayloadSchemaTemplateItem}}
22
+ type ResponsePayload = {{{ schemaNamespacePath schemaTemplateItem=responsePayloadSchemaTemplateItem }}}
23
+ {{/if}}
@@ -0,0 +1,67 @@
1
+ import { PolishStep } from '@sprucelabs/heartwood-polish'
2
+
3
+ // Documentation: https://developer.spruce.ai/#/polish/index
4
+
5
+ const script: PolishStep[] = [
6
+ /**{
7
+ redirect: {
8
+ id: 'heartwood.root',
9
+ },
10
+ },
11
+ {
12
+ typeText: {
13
+ target: [['Field', 'phone']],
14
+ text: '5555555555',
15
+ },
16
+ },
17
+ {
18
+ assert: {
19
+ target: [['Field', 'phone']],
20
+ inputValue: {
21
+ equals: '+1 555-555-5555',
22
+ },
23
+ },
24
+ },
25
+ {
26
+ click: {
27
+ target: [['Button', 'primary']],
28
+ },
29
+ },
30
+ {
31
+ typeText: {
32
+ target: [['Field', 'code']],
33
+ text: '5555',
34
+ },
35
+ },
36
+ {
37
+ click: {
38
+ target: [['NavMenu', 'settings']],
39
+ },
40
+ },
41
+ {
42
+ click: {
43
+ target: [['NavLink', 'logout']],
44
+ },
45
+ },
46
+ {
47
+ click: {
48
+ target: [['Dialog', 'primary']],
49
+ },
50
+ },
51
+ {
52
+ typeText: {
53
+ target: [['Field', 'phone']],
54
+ text: '555-555-2323',
55
+ },
56
+ },
57
+ {
58
+ assert: {
59
+ target: [['Field', 'phone']],
60
+ inputValue: {
61
+ equals: '+1 555-555-2323',
62
+ },
63
+ },
64
+ },**/
65
+ ]
66
+
67
+ export default script
@@ -33,7 +33,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
33
33
  {{> schemaBody namespace=namespace schema=schema renderAs="type" }}
34
34
  }
35
35
 
36
- type {{namePascal}}Entity = SchemaEntity<{{../globalSchemaNamespace}}.{{namespace}}{{#if (isDefined schema.version)}}.{{schema.version}}{{/if}}.{{namePascal}}Schema>
36
+ interface {{namePascal}}Entity extends SchemaEntity<{{../globalSchemaNamespace}}.{{namespace}}{{#if (isDefined schema.version)}}.{{schema.version}}{{/if}}.{{namePascal}}Schema> {}
37
37
 
38
38
  }
39
39
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "17.0.17",
6
+ "version": "17.1.2",
7
7
  "files": [
8
8
  "build/**/*",
9
9
  "tsconfig.json",
@@ -79,5 +79,5 @@
79
79
  "globby"
80
80
  ]
81
81
  },
82
- "gitHead": "7afbeaf171496cd15e1057d07ae1524bbfbddd9b"
82
+ "gitHead": "dd59e470e34ad2dd6729caf3325c90695d5f1a82"
83
83
  }