@transcend-io/cli 4.95.0 → 4.97.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ai/TranscendAiPrompt.d.ts +54 -0
- package/build/ai/TranscendAiPrompt.d.ts.map +1 -0
- package/build/ai/TranscendAiPrompt.js +103 -0
- package/build/ai/TranscendAiPrompt.js.map +1 -0
- package/build/ai/createHandlebarsWithHelpers.d.ts +25 -0
- package/build/ai/createHandlebarsWithHelpers.d.ts.map +1 -0
- package/build/ai/createHandlebarsWithHelpers.js +125 -0
- package/build/ai/createHandlebarsWithHelpers.js.map +1 -0
- package/build/ai/index.d.ts +3 -0
- package/build/ai/index.d.ts.map +1 -0
- package/build/ai/index.js +19 -0
- package/build/ai/index.js.map +1 -0
- package/build/cli-create-assessment.js +3 -2
- package/build/cli-create-assessment.js.map +1 -1
- package/build/codecs.d.ts +5 -0
- package/build/codecs.d.ts.map +1 -1
- package/build/graphql/fetchAssessments.d.ts +8 -2
- package/build/graphql/fetchAssessments.d.ts.map +1 -1
- package/build/graphql/fetchAssessments.js +3 -1
- package/build/graphql/fetchAssessments.js.map +1 -1
- package/build/graphql/gqls/assessment.d.ts.map +1 -1
- package/build/graphql/gqls/assessment.js +7 -1
- package/build/graphql/gqls/assessment.js.map +1 -1
- package/build/helpers/getVariablesFromHandlebarsTemplate.d.ts.map +1 -1
- package/build/helpers/getVariablesFromHandlebarsTemplate.js +6 -9
- package/build/helpers/getVariablesFromHandlebarsTemplate.js.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/tsbuildinfo +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ObjByString } from '@transcend-io/type-utils';
|
|
2
|
+
import type handlebars from 'handlebars';
|
|
3
|
+
import { Secret } from '@transcend-io/secret-value';
|
|
4
|
+
import * as t from 'io-ts';
|
|
5
|
+
import { HandlebarsInput } from './createHandlebarsWithHelpers';
|
|
6
|
+
export declare const EXPECTED_ATTRIBUTE_PREFIX = "attribute-";
|
|
7
|
+
/**
|
|
8
|
+
* Define an AI prompt that can be loaded from Transcend
|
|
9
|
+
*/
|
|
10
|
+
export declare class TranscendAiPrompt<TParams extends ObjByString, TOutputCodec extends t.Any> {
|
|
11
|
+
/** Title of prompt */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Codec to validate output response */
|
|
14
|
+
codec: TOutputCodec;
|
|
15
|
+
/** Handlebars compiler */
|
|
16
|
+
handlebars: typeof handlebars;
|
|
17
|
+
/**
|
|
18
|
+
* Constructor
|
|
19
|
+
*
|
|
20
|
+
* @param options - Options
|
|
21
|
+
*/
|
|
22
|
+
constructor({ title, codec, handlebarsOptions, }: {
|
|
23
|
+
/** Title of prompt in transcend */
|
|
24
|
+
title: string;
|
|
25
|
+
/** Codec to validate output shape of the prompt */
|
|
26
|
+
codec: TOutputCodec;
|
|
27
|
+
/** Options for configuring handlebars */
|
|
28
|
+
handlebarsOptions?: HandlebarsInput;
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Fetch prompt from Transcend
|
|
32
|
+
*
|
|
33
|
+
* @param options - Additional options
|
|
34
|
+
* @returns A function that can be used to call the prompt
|
|
35
|
+
*/
|
|
36
|
+
fetchPromptFromTranscend({ fillTemplateWithAttributes, transcendUrl, transcendApiKey, requireApproval, }: {
|
|
37
|
+
/** The Transcend API key */
|
|
38
|
+
transcendApiKey: string | Secret<string>;
|
|
39
|
+
/** When true, template in any attribute definitions in the prompt */
|
|
40
|
+
fillTemplateWithAttributes?: boolean;
|
|
41
|
+
/** API of Transcend to call */
|
|
42
|
+
transcendUrl?: string;
|
|
43
|
+
/** When true, throw an error if the prompt is not approved */
|
|
44
|
+
requireApproval?: boolean;
|
|
45
|
+
}): Promise<(params: TParams) => string>;
|
|
46
|
+
/**
|
|
47
|
+
* Validate the shape of the response from AI
|
|
48
|
+
*
|
|
49
|
+
* @param response - AI response as string
|
|
50
|
+
* @returns Parsed content
|
|
51
|
+
*/
|
|
52
|
+
parseAiResponse(response: string): t.TypeOf<TOutputCodec>;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=TranscendAiPrompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TranscendAiPrompt.d.ts","sourceRoot":"","sources":["../../src/ai/TranscendAiPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAK3B,OAAO,EACL,eAAe,EAEhB,MAAM,+BAA+B,CAAC;AAIvC,eAAO,MAAM,yBAAyB,eAAe,CAAC;AAEtD;;GAEG;AACH,qBAAa,iBAAiB,CAC5B,OAAO,SAAS,WAAW,EAC3B,YAAY,SAAS,CAAC,CAAC,GAAG;IAE1B,sBAAsB;IACf,KAAK,EAAE,MAAM,CAAC;IAErB,wCAAwC;IACjC,KAAK,EAAE,YAAY,CAAC;IAE3B,0BAA0B;IACnB,UAAU,EAAE,OAAO,UAAU,CAAC;IAErC;;;;OAIG;gBACS,EACV,KAAK,EACL,KAAK,EACL,iBAAiB,GAClB,EAAE;QACD,mCAAmC;QACnC,KAAK,EAAE,MAAM,CAAC;QACd,mDAAmD;QACnD,KAAK,EAAE,YAAY,CAAC;QACpB,yCAAyC;QACzC,iBAAiB,CAAC,EAAE,eAAe,CAAC;KACrC;IAMD;;;;;OAKG;IACG,wBAAwB,CAAC,EAC7B,0BAAiC,EACjC,YAAoC,EACpC,eAAe,EACf,eAAe,GAChB,EAAE;QACD,4BAA4B;QAC5B,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QACzC,qEAAqE;QACrE,0BAA0B,CAAC,EAAE,OAAO,CAAC;QACrC,+BAA+B;QAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,8DAA8D;QAC9D,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,GAAG,OAAO,CAAC,CAAC,MAAM,EAAE,OAAO,KAAK,MAAM,CAAC;IA+ExC;;;;;OAKG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;CAG1D"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TranscendAiPrompt = exports.EXPECTED_ATTRIBUTE_PREFIX = void 0;
|
|
7
|
+
const type_utils_1 = require("@transcend-io/type-utils");
|
|
8
|
+
const privacy_types_1 = require("@transcend-io/privacy-types");
|
|
9
|
+
const fetchAssessments_1 = require("../graphql/fetchAssessments");
|
|
10
|
+
const constants_1 = require("../constants");
|
|
11
|
+
const graphql_1 = require("../graphql");
|
|
12
|
+
const getVariablesFromHandlebarsTemplate_1 = require("../helpers/getVariablesFromHandlebarsTemplate");
|
|
13
|
+
const createHandlebarsWithHelpers_1 = require("./createHandlebarsWithHelpers");
|
|
14
|
+
const camelCase_1 = __importDefault(require("lodash/camelCase"));
|
|
15
|
+
const keyBy_1 = __importDefault(require("lodash/keyBy"));
|
|
16
|
+
exports.EXPECTED_ATTRIBUTE_PREFIX = 'attribute-';
|
|
17
|
+
/**
|
|
18
|
+
* Define an AI prompt that can be loaded from Transcend
|
|
19
|
+
*/
|
|
20
|
+
class TranscendAiPrompt {
|
|
21
|
+
/**
|
|
22
|
+
* Constructor
|
|
23
|
+
*
|
|
24
|
+
* @param options - Options
|
|
25
|
+
*/
|
|
26
|
+
constructor({ title, codec, handlebarsOptions, }) {
|
|
27
|
+
this.title = title;
|
|
28
|
+
this.codec = codec;
|
|
29
|
+
this.handlebars = (0, createHandlebarsWithHelpers_1.createHandlebarsWithHelpers)(handlebarsOptions);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Fetch prompt from Transcend
|
|
33
|
+
*
|
|
34
|
+
* @param options - Additional options
|
|
35
|
+
* @returns A function that can be used to call the prompt
|
|
36
|
+
*/
|
|
37
|
+
async fetchPromptFromTranscend({ fillTemplateWithAttributes = true, transcendUrl = constants_1.DEFAULT_TRANSCEND_API, transcendApiKey, requireApproval, }) {
|
|
38
|
+
// construct GraphQL client
|
|
39
|
+
const client = (0, graphql_1.buildTranscendGraphQLClient)(transcendUrl, typeof transcendApiKey === 'string'
|
|
40
|
+
? transcendApiKey
|
|
41
|
+
: transcendApiKey.release());
|
|
42
|
+
// Fetch the assessments
|
|
43
|
+
const assessments = await (0, fetchAssessments_1.fetchAllAssessments)(client, { text: this.title });
|
|
44
|
+
// Ensure assessment exists with specified title
|
|
45
|
+
const assessment = assessments.find((row) => row.title === this.title);
|
|
46
|
+
if (!assessment) {
|
|
47
|
+
throw new Error(`Failed to find assessment with title: "${this.title}"`);
|
|
48
|
+
}
|
|
49
|
+
// Ensure assessment is approved
|
|
50
|
+
if (requireApproval && assessment.status !== privacy_types_1.AssessmentStatus.Approved) {
|
|
51
|
+
throw new Error(`Assessment "${this.title}" cannot be used because its in status: "${assessment.status}"`);
|
|
52
|
+
}
|
|
53
|
+
// If assessment is rejected, throw error
|
|
54
|
+
if (assessment.status === privacy_types_1.AssessmentStatus.Rejected) {
|
|
55
|
+
throw new Error(`Assessment "${this.title}" cannot be used because it's in status: "${assessment.status}"`);
|
|
56
|
+
}
|
|
57
|
+
// Template attributes into the template string
|
|
58
|
+
const extraParams = {};
|
|
59
|
+
if (fillTemplateWithAttributes) {
|
|
60
|
+
// pull out the variables from the handlebar string
|
|
61
|
+
const schema = (0, getVariablesFromHandlebarsTemplate_1.getVariablesFromHandlebarsTemplate)(assessment.content);
|
|
62
|
+
// pull out the attributes to fetch
|
|
63
|
+
const attributeToFetch = Object.keys(schema).filter((key) => key.startsWith(exports.EXPECTED_ATTRIBUTE_PREFIX));
|
|
64
|
+
// Fetch attributes if there are template variables to fill
|
|
65
|
+
if (attributeToFetch.length > 0) {
|
|
66
|
+
// TODO: https://transcend.height.app/T-29886 - only fetch attributes needed
|
|
67
|
+
const attributeKeys = await (0, graphql_1.fetchAllAttributes)(client);
|
|
68
|
+
const attributeKeysAsCamel = attributeKeys.map((key) => ({
|
|
69
|
+
...key,
|
|
70
|
+
camelName: (0, camelCase_1.default)(key.name),
|
|
71
|
+
}));
|
|
72
|
+
const lookupAttributeKey = (0, keyBy_1.default)(attributeKeysAsCamel, 'camelName');
|
|
73
|
+
attributeToFetch.forEach((attributeNameWithPrefix) => {
|
|
74
|
+
const attributeName = attributeNameWithPrefix.replace(exports.EXPECTED_ATTRIBUTE_PREFIX, '');
|
|
75
|
+
const existingAttribute = lookupAttributeKey[attributeName];
|
|
76
|
+
if (!existingAttribute) {
|
|
77
|
+
throw new Error(`Failed to find attribute with name: "${attributeName}"`);
|
|
78
|
+
}
|
|
79
|
+
extraParams[attributeNameWithPrefix] = existingAttribute.values;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
// Return function that can compile template with attributes
|
|
84
|
+
// and provided parameters
|
|
85
|
+
return (params) => this.handlebars.compile(assessment.content)({
|
|
86
|
+
// template in currentDate by default
|
|
87
|
+
currentDate: new Date().toISOString(),
|
|
88
|
+
...extraParams,
|
|
89
|
+
...params,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Validate the shape of the response from AI
|
|
94
|
+
*
|
|
95
|
+
* @param response - AI response as string
|
|
96
|
+
* @returns Parsed content
|
|
97
|
+
*/
|
|
98
|
+
parseAiResponse(response) {
|
|
99
|
+
return (0, type_utils_1.decodeCodec)(this.codec, response);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.TranscendAiPrompt = TranscendAiPrompt;
|
|
103
|
+
//# sourceMappingURL=TranscendAiPrompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TranscendAiPrompt.js","sourceRoot":"","sources":["../../src/ai/TranscendAiPrompt.ts"],"names":[],"mappings":";;;;;;AAAA,yDAAoE;AAEpE,+DAA+D;AAG/D,kEAAkE;AAClE,4CAAqD;AACrD,wCAA6E;AAC7E,sGAAmG;AACnG,+EAGuC;AACvC,iEAAyC;AACzC,yDAAiC;AAEpB,QAAA,yBAAyB,GAAG,YAAY,CAAC;AAEtD;;GAEG;AACH,MAAa,iBAAiB;IAa5B;;;;OAIG;IACH,YAAY,EACV,KAAK,EACL,KAAK,EACL,iBAAiB,GAQlB;QACC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,IAAA,yDAA2B,EAAC,iBAAiB,CAAC,CAAC;IACnE,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,wBAAwB,CAAC,EAC7B,0BAA0B,GAAG,IAAI,EACjC,YAAY,GAAG,iCAAqB,EACpC,eAAe,EACf,eAAe,GAUhB;QACC,2BAA2B;QAC3B,MAAM,MAAM,GAAG,IAAA,qCAA2B,EACxC,YAAY,EACZ,OAAO,eAAe,KAAK,QAAQ;YACjC,CAAC,CAAC,eAAe;YACjB,CAAC,CAAC,eAAe,CAAC,OAAO,EAAE,CAC9B,CAAC;QAEF,wBAAwB;QACxB,MAAM,WAAW,GAAG,MAAM,IAAA,sCAAmB,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAE5E,gDAAgD;QAChD,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,KAAK,IAAI,C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AAA,eAAK,EAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC;gBACpE,gBAAgB,CAAC,OAAO,CAAC,CAAC,uBAAuB,EAAE,EAAE;oBACnD,MAAM,aAAa,GAAG,uBAAuB,CAAC,OAAO,CACnD,iCAAyB,EACzB,EAAE,CACH,CAAC;oBACF,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;oBAC5D,IAAI,CAAC,iBAAiB,EAAE;wBACtB,MAAM,IAAI,KAAK,CACb,wCAAwC,aAAa,GAAG,CACzD,CAAC;qBACH;oBACD,WAAW,CAAC,uBAAuB,CAAC,GAAG,iBAAiB,CAAC,MAAM,CAAC;gBAClE,CAAC,CAAC,CAAC;aACJ;SACF;QAED,4DAA4D;QAC5D,0BAA0B;QAC1B,OAAO,CAAC,MAAM,EAAE,EAAE,CAChB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YAC1C,qCAAqC;YACrC,WAAW,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACrC,GAAG,WAAW;YACd,GAAG,MAAM;SACV,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACH,eAAe,CAAC,QAAgB;QAC9B,OAAO,IAAA,wBAAW,EAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;CACF;AA/ID,8CA+IC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import Handlebars from 'handlebars';
|
|
2
|
+
/**
|
|
3
|
+
* Input for creating a handlebars instance
|
|
4
|
+
*/
|
|
5
|
+
export interface HandlebarsInput {
|
|
6
|
+
/** The handlebars templates */
|
|
7
|
+
templates?: {
|
|
8
|
+
/** Name of template */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Content of template */
|
|
11
|
+
content: string;
|
|
12
|
+
}[];
|
|
13
|
+
/** Helper functions to register */
|
|
14
|
+
helpers?: {
|
|
15
|
+
[name in string]: Handlebars.HelperDelegate;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Create an instance of handlebars, loading partial templates and adding utilities
|
|
20
|
+
*
|
|
21
|
+
* @param input - Input to define the handlebars instance
|
|
22
|
+
* @returns The instantiated instance of handlebars
|
|
23
|
+
*/
|
|
24
|
+
export declare function createHandlebarsWithHelpers({ templates, helpers, }?: HandlebarsInput): typeof Handlebars;
|
|
25
|
+
//# sourceMappingURL=createHandlebarsWithHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createHandlebarsWithHelpers.d.ts","sourceRoot":"","sources":["../../src/ai/createHandlebarsWithHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AAqBpC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,SAAS,CAAC,EAAE;QACV,uBAAuB;QACvB,IAAI,EAAE,MAAM,CAAC;QACb,0BAA0B;QAC1B,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;IACJ,mCAAmC;IACnC,OAAO,CAAC,EAAE;SAAG,IAAI,IAAI,MAAM,GAAG,UAAU,CAAC,cAAc;KAAE,CAAC;CAC3D;AAgHD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,SAAc,EACd,OAAY,GACb,GAAE,eAAoB,GAAG,OAAO,UAAU,CAc1C"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createHandlebarsWithHelpers = void 0;
|
|
7
|
+
const handlebars_1 = __importDefault(require("handlebars"));
|
|
8
|
+
const change_case_1 = require("change-case");
|
|
9
|
+
const camelCase_1 = __importDefault(require("lodash/camelCase"));
|
|
10
|
+
const kebabCase_1 = __importDefault(require("lodash/kebabCase"));
|
|
11
|
+
const lowerCase_1 = __importDefault(require("lodash/lowerCase"));
|
|
12
|
+
const lowerFirst_1 = __importDefault(require("lodash/lowerFirst"));
|
|
13
|
+
const startCase_1 = __importDefault(require("lodash/startCase"));
|
|
14
|
+
const upperCase_1 = __importDefault(require("lodash/upperCase"));
|
|
15
|
+
const upperFirst_1 = __importDefault(require("lodash/upperFirst"));
|
|
16
|
+
/**
|
|
17
|
+
* Default helper functions to register
|
|
18
|
+
*/
|
|
19
|
+
const DEFAULT_HELPERS = {
|
|
20
|
+
capitalCase: change_case_1.capitalCase,
|
|
21
|
+
constantCase: change_case_1.constantCase,
|
|
22
|
+
dotCase: change_case_1.dotCase,
|
|
23
|
+
lowerCase: lowerCase_1.default,
|
|
24
|
+
paramCase: kebabCase_1.default,
|
|
25
|
+
upperFirst: upperFirst_1.default,
|
|
26
|
+
camelCase: camelCase_1.default,
|
|
27
|
+
titleCase: startCase_1.default,
|
|
28
|
+
lowerFirst: lowerFirst_1.default,
|
|
29
|
+
headerCase: change_case_1.headerCase,
|
|
30
|
+
upperCase: upperCase_1.default,
|
|
31
|
+
noCase: change_case_1.noCase,
|
|
32
|
+
pascalCase: change_case_1.pascalCase,
|
|
33
|
+
pathCase: change_case_1.pathCase,
|
|
34
|
+
sentenceCase: change_case_1.sentenceCase,
|
|
35
|
+
snakeCase: change_case_1.snakeCase,
|
|
36
|
+
/**
|
|
37
|
+
* Pad with back slashes
|
|
38
|
+
*
|
|
39
|
+
* @param word - The word to pad
|
|
40
|
+
* @returns Slashes the length of the word
|
|
41
|
+
*/
|
|
42
|
+
pad: (word) => '/'.repeat(word.length),
|
|
43
|
+
/**
|
|
44
|
+
* Render if equality is met
|
|
45
|
+
*
|
|
46
|
+
* @param this - This context
|
|
47
|
+
* @param arg1 - First arg
|
|
48
|
+
* @param arg2 - Second arg
|
|
49
|
+
* @param options - Handlebars options
|
|
50
|
+
* @returns The template if args are equal
|
|
51
|
+
*/
|
|
52
|
+
ifEqual: function ifNotEqual(arg1, arg2, options) {
|
|
53
|
+
return arg1 === arg2 ? options.fn(this) : options.inverse(this);
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* Render if equality is not met
|
|
57
|
+
*
|
|
58
|
+
* @param this - This context
|
|
59
|
+
* @param arg1 - First arg
|
|
60
|
+
* @param arg2 - Second arg
|
|
61
|
+
* @param options - Handlebars options
|
|
62
|
+
* @returns The template if args are not equal
|
|
63
|
+
*/
|
|
64
|
+
ifNotEqual: function ifNotEqual(arg1, arg2, options) {
|
|
65
|
+
return arg1 !== arg2 ? options.fn(this) : options.inverse(this);
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
* Uri encode a string
|
|
69
|
+
*
|
|
70
|
+
* @param word - The word to encode
|
|
71
|
+
* @returns The URI encoded word
|
|
72
|
+
*/
|
|
73
|
+
safeString: (word) => encodeURI(word),
|
|
74
|
+
/**
|
|
75
|
+
* Get the length of a list
|
|
76
|
+
*
|
|
77
|
+
* @param list - The list in question
|
|
78
|
+
* @returns The length of the list
|
|
79
|
+
*/
|
|
80
|
+
listLen: (list) => list.length,
|
|
81
|
+
/**
|
|
82
|
+
* Convert a JSON object to string
|
|
83
|
+
*
|
|
84
|
+
* @param obj - The object to convert
|
|
85
|
+
* @returns The object stringified
|
|
86
|
+
*/
|
|
87
|
+
toJSON: (obj) => JSON.stringify(obj, (k, v) => {
|
|
88
|
+
// Necessary, else functions don't get written.
|
|
89
|
+
if (typeof v === 'function') {
|
|
90
|
+
return v.toString();
|
|
91
|
+
}
|
|
92
|
+
return v;
|
|
93
|
+
}, 2),
|
|
94
|
+
/**
|
|
95
|
+
* Compares two string to see if they're sorted
|
|
96
|
+
*
|
|
97
|
+
* @param arg1 - Some string
|
|
98
|
+
* @param arg2 - Some other string to compare against
|
|
99
|
+
* @param options - Handlebar options
|
|
100
|
+
* @returns boolean
|
|
101
|
+
*/
|
|
102
|
+
ifSorted: function ifSorted(arg1, arg2, options) {
|
|
103
|
+
return arg1 <= arg2 ? options.fn(this) : options.inverse(this);
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Create an instance of handlebars, loading partial templates and adding utilities
|
|
108
|
+
*
|
|
109
|
+
* @param input - Input to define the handlebars instance
|
|
110
|
+
* @returns The instantiated instance of handlebars
|
|
111
|
+
*/
|
|
112
|
+
function createHandlebarsWithHelpers({ templates = [], helpers = {}, } = {}) {
|
|
113
|
+
if (templates.length > 0) {
|
|
114
|
+
// Register partials
|
|
115
|
+
templates.forEach(({ name, content }) => handlebars_1.default.registerPartial(name, content));
|
|
116
|
+
}
|
|
117
|
+
// Register helpers
|
|
118
|
+
Object.entries({
|
|
119
|
+
...DEFAULT_HELPERS,
|
|
120
|
+
...helpers,
|
|
121
|
+
}).forEach(([key, func]) => handlebars_1.default.registerHelper(key, func));
|
|
122
|
+
return handlebars_1.default;
|
|
123
|
+
}
|
|
124
|
+
exports.createHandlebarsWithHelpers = createHandlebarsWithHelpers;
|
|
125
|
+
//# sourceMappingURL=createHandlebarsWithHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createHandlebarsWithHelpers.js","sourceRoot":"","sources":["../../src/ai/createHandlebarsWithHelpers.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAoC;AACpC,6CAUqB;AACrB,iEAAyC;AACzC,iEAAyC;AACzC,iEAAyC;AACzC,mEAA2C;AAC3C,iEAAyC;AACzC,iEAAyC;AACzC,mEAA2C;AAkB3C;;GAEG;AACH,MAAM,eAAe,GAAG;IACtB,WAAW,EAAX,yBAAW;IACX,YAAY,EAAZ,0BAAY;IACZ,OAAO,EAAP,qBAAO;IACP,SAAS,EAAT,mBAAS;IACT,SAAS,EAAT,mBAAS;IACT,UAAU,EAAV,oBAAU;IACV,SAAS,EAAT,mBAAS;IACT,SAAS,EAAT,mBAAS;IACT,UAAU,EAAV,oBAAU;IACV,UAAU,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;;;;;OAOG;IACH,QAAQ,EAAE,SAAS,QAAQ,CACzB,IAAY,EACZ,IAAY,EACZ,OAAiC;QAEjC,OAAO,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,CAAC;CACF,CAAC;AAEF;;;;;GAKG;AACH,SAAgB,2BAA2B,CAAC,EAC1C,SAAS,GAAG,EAAE,EACd,OAAO,GAAG,EAAE,MACO,EAAE;IACrB,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;QACxB,oBAAoB;QACpB,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CACtC,oBAAU,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAC1C,CAAC;KACH;IAED,mBAAmB;IACnB,MAAM,CAAC,OAAO,CAAC;QACb,GAAG,eAAe;QAClB,GAAG,OAAO;KACX,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,oBAAU,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IAClE,OAAO,oBAAU,CAAC;AACpB,CAAC;AAjBD,kEAiBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./TranscendAiPrompt"), exports);
|
|
18
|
+
__exportStar(require("./createHandlebarsWithHelpers"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,gEAA8C"}
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const handlebars_1 = __importDefault(require("handlebars"));
|
|
8
7
|
const yargs_parser_1 = __importDefault(require("yargs-parser"));
|
|
9
8
|
const colors_1 = __importDefault(require("colors"));
|
|
10
9
|
const logger_1 = require("./logger");
|
|
@@ -16,6 +15,7 @@ const bluebird_1 = require("bluebird");
|
|
|
16
15
|
const inquirer_1 = require("./helpers/inquirer");
|
|
17
16
|
const parseVariablesFromString_1 = require("./helpers/parseVariablesFromString");
|
|
18
17
|
const syncAssessments_1 = require("./graphql/syncAssessments");
|
|
18
|
+
const ai_1 = require("./ai");
|
|
19
19
|
/**
|
|
20
20
|
* Create a new assessment from an assessment template
|
|
21
21
|
*
|
|
@@ -141,7 +141,8 @@ async function main() {
|
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
143
|
// Create new assessment
|
|
144
|
-
const
|
|
144
|
+
const handlebars = (0, ai_1.createHandlebarsWithHelpers)();
|
|
145
|
+
const content = handlebars
|
|
145
146
|
.compile(assessmentTemplate.content)(results)
|
|
146
147
|
// remove empty lines
|
|
147
148
|
.split('\n')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-create-assessment.js","sourceRoot":"","sources":["../src/cli-create-assessment.ts"],"names":[],"mappings":";;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"cli-create-assessment.js","sourceRoot":"","sources":["../src/cli-create-assessment.ts"],"names":[],"mappings":";;;;;;AACA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,2CAAoD;AACpD,iFAAiF;AACjF,uCAAwD;AACxD,qGAAkG;AAClG,uCAAqC;AACrC,iDAI4B;AAC5B,iFAA8E;AAC9E,+DAA+E;AAC/E,6BAAmD;AAEnD;;;;;;;;;;;;;;;GAeG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM;IACJ,4BAA4B;IAC5B,YAAY,GAAG,iCAAqB;IACpC,cAAc;IACd,IAAI;IACJ,iDAAiD;IACjD,QAAQ,GAAG,EAAE;IACb,oCAAoC;IACpC,KAAK,GAAG,EAAE;IACV,kCAAkC;IAClC,SAAS,GAAG,EAAE,GACf,GAAG,IAAA,sBAAK,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAA8B,CAAC;IAE9D,wBAAwB;IACxB,IAAI,CAAC,IAAI,EAAE;QACT,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,uFAAuF,CACxF,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,8CAA8C;IAC9C,IAAI,aAAa,GAAG,KAAK,CAAC;IAC1B,IAAI,CAAC,aAAa,E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X,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;SAClC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,wBAAwB;IACxB,MAAM,YAAY,GAAG,MAAM,IAAA,kCAAgB,EAAC,MAAM,EAAE;QAClD,KAAK,EAAE,aAAa;QACpB,oBAAoB,EAAE,kBAAkB,CAAC,EAAE;KAC5C,CAAC,CAAC;IACH,MAAM,IAAA,kCAAgB,EAAC,MAAM,EAAE;QAC7B,EAAE,EAAE,YAAY;QAChB,OAAO;KACR,CAAC,CAAC;IACH,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,gEAAgE,YAAY,EAAE,CAC/E,CACF,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/build/codecs.d.ts
CHANGED
|
@@ -5577,6 +5577,7 @@ export declare const DataCategoryInput: t.IntersectionC<[t.TypeC<{
|
|
|
5577
5577
|
DEVICE: unknown;
|
|
5578
5578
|
SURVEY: unknown;
|
|
5579
5579
|
NOT_PERSONAL_DATA: unknown;
|
|
5580
|
+
INTEGRATION_IDENTIFIER: unknown;
|
|
5580
5581
|
}>;
|
|
5581
5582
|
}>, t.PartialC<{
|
|
5582
5583
|
/** User-defined name for this sub category */
|
|
@@ -5733,6 +5734,7 @@ export declare const FieldInput: t.IntersectionC<[t.TypeC<{
|
|
|
5733
5734
|
DEVICE: unknown;
|
|
5734
5735
|
SURVEY: unknown;
|
|
5735
5736
|
NOT_PERSONAL_DATA: unknown;
|
|
5737
|
+
INTEGRATION_IDENTIFIER: unknown;
|
|
5736
5738
|
}>;
|
|
5737
5739
|
}>, t.PartialC<{
|
|
5738
5740
|
/** User-defined name for this sub category */
|
|
@@ -5906,6 +5908,7 @@ export declare const DatapointInput: t.IntersectionC<[t.TypeC<{
|
|
|
5906
5908
|
DEVICE: unknown;
|
|
5907
5909
|
SURVEY: unknown;
|
|
5908
5910
|
NOT_PERSONAL_DATA: unknown;
|
|
5911
|
+
INTEGRATION_IDENTIFIER: unknown;
|
|
5909
5912
|
}>;
|
|
5910
5913
|
}>, t.PartialC<{
|
|
5911
5914
|
/** User-defined name for this sub category */
|
|
@@ -34901,6 +34904,7 @@ export declare const DataSiloInput: t.IntersectionC<[t.TypeC<{
|
|
|
34901
34904
|
DEVICE: unknown;
|
|
34902
34905
|
SURVEY: unknown;
|
|
34903
34906
|
NOT_PERSONAL_DATA: unknown;
|
|
34907
|
+
INTEGRATION_IDENTIFIER: unknown;
|
|
34904
34908
|
}>;
|
|
34905
34909
|
}>, t.PartialC<{
|
|
34906
34910
|
/** User-defined name for this sub category */
|
|
@@ -62422,6 +62426,7 @@ export declare const TranscendInput: t.PartialC<{
|
|
|
62422
62426
|
DEVICE: unknown;
|
|
62423
62427
|
SURVEY: unknown;
|
|
62424
62428
|
NOT_PERSONAL_DATA: unknown;
|
|
62429
|
+
INTEGRATION_IDENTIFIER: unknown;
|
|
62425
62430
|
}>;
|
|
62426
62431
|
}>, t.PartialC<{
|
|
62427
62432
|
/** User-defined name for this sub category */
|