Updated cmp files in the JS Code Gen tests

This commit is contained in:
Darren Gehring 2021-03-26 14:37:45 -07:00
Родитель cd74bb3c29
Коммит af2ece47dc
9 изменённых файлов: 24 добавлений и 218 удалений

Просмотреть файл

@ -56,25 +56,13 @@ export namespace Test
*
* Example of a [post] method that uses custom types.
*/
export function makeName_PostFork(callContextData: any, firstName?: string, lastName?: string): void
export function makeName_Post(callContextData: any, firstName?: string, lastName?: string): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "makeName", 1, POST_TIMEOUT_IN_MS, callContextData,
IC.arg("firstName?", firstName),
IC.arg("lastName?", lastName));
}
/**
* *Note: The result (Names) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* Example of a [post] method that uses custom types.
*/
export function makeName_PostImpulse(callContextData: any, firstName?: string, lastName?: string): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "makeName", 1, POST_TIMEOUT_IN_MS, callContextData,
IC.arg("firstName?", firstName),
IC.arg("lastName?", lastName));
}
/**
* Example of a [non-post] method
*/

Просмотреть файл

@ -15,130 +15,67 @@ Test File to test all the the ways that the ambrosia tag can be set and still wo
export namespace Test
{
/** *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().* */
export function OneLineNoComment_PostFork(callContextData: any): void
export function OneLineNoComment_Post(callContextData: any): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "OneLineNoComment", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/** *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().* */
export function OneLineNoComment_PostImpulse(callContextData: any): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "OneLineNoComment", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* Multi Line with Comment before Tag
* but still before tag
*/
export function MultiLineCommentBeforeTag_PostFork(callContextData: any): void
export function MultiLineCommentBeforeTag_Post(callContextData: any): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "MultiLineCommentBeforeTag", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* Multi Line with Comment before Tag
* but still before tag
*/
export function MultiLineCommentBeforeTag_PostImpulse(callContextData: any): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "MultiLineCommentBeforeTag", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/** *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().* */
export function MultiSeparateLinesCommentBeforeTag_PostFork(callContextData: any): void
export function MultiSeparateLinesCommentBeforeTag_Post(callContextData: any): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "MultiSeparateLinesCommentBeforeTag", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/** *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().* */
export function MultiSeparateLinesCommentBeforeTag_PostImpulse(callContextData: any): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "MultiSeparateLinesCommentBeforeTag", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* ************ Have a space after the tag before function declaration
*/
export function EmptyLineBetweenTagAndFctn_PostFork(callContextData: any): void
export function EmptyLineBetweenTagAndFctn_Post(callContextData: any): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "EmptyLineBetweenTagAndFctn", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* ************ Have a space after the tag before function declaration
*/
export function EmptyLineBetweenTagAndFctn_PostImpulse(callContextData: any): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "EmptyLineBetweenTagAndFctn", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* **** Spacing around the tag
*/
export function SpacingAroundTag_PostFork(callContextData: any): void
export function SpacingAroundTag_Post(callContextData: any): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "SpacingAroundTag", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* **** Spacing around the tag
*/
export function SpacingAroundTag_PostImpulse(callContextData: any): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "SpacingAroundTag", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* JS Doc
*/
export function JSDOcTag_PostFork(callContextData: any): void
export function JSDOcTag_Post(callContextData: any): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "JSDOcTag", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* JS Doc
*/
export function JSDOcTag_PostImpulse(callContextData: any): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "JSDOcTag", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* The ambrosia tag must be on the implementation of an overloaded function
*/
export function fnOverload_PostFork(callContextData: any, name?: string): void
export function fnOverload_Post(callContextData: any, name?: string): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "fnOverload", 1, POST_TIMEOUT_IN_MS, callContextData, IC.arg("name?", name));
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* The ambrosia tag must be on the implementation of an overloaded function
*/
export function fnOverload_PostImpulse(callContextData: any, name?: string): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "fnOverload", 1, POST_TIMEOUT_IN_MS, callContextData, IC.arg("name?", name));
}
}
/**

Просмотреть файл

@ -10,17 +10,11 @@ let DESTINATION_INSTANCE_NAME: string = "server";
let POST_TIMEOUT_IN_MS: number = 8000; // -1 = Infinite
/** *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().* */
export function unused_PostFork(callContextData: any): void
export function unused_Post(callContextData: any): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "unused", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/** *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().* */
export function unused_PostImpulse(callContextData: any): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "unused", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/**
* Handler for the results of previously called post methods (in Ambrosia, only 'post' methods return values). See Messages.PostResultDispatcher.\
* Must return true only if the result (or error) was handled.

Просмотреть файл

@ -16,20 +16,10 @@ export namespace Test
*
* Fake Event Handler due to case in the name so this will be generated
*/
export function onbecomingprimary_PostFork(callContextData: any): void
export function onbecomingprimary_Post(callContextData: any): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "onbecomingprimary", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* Fake Event Handler due to case in the name so this will be generated
*/
export function onbecomingprimary_PostImpulse(callContextData: any): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "onbecomingprimary", 1, POST_TIMEOUT_IN_MS, callContextData);
}
}
/**

Просмотреть файл

@ -13,16 +13,10 @@ let POST_TIMEOUT_IN_MS: number = 8000; // -1 = Infinite
export namespace StaticStuff
{
/** *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().* */
export function hello_PostFork(callContextData: any, name: string): void
export function hello_Post(callContextData: any, name: string): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "hello", 1, POST_TIMEOUT_IN_MS, callContextData, IC.arg("name", name));
}
/** *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().* */
export function hello_PostImpulse(callContextData: any, name: string): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "hello", 1, POST_TIMEOUT_IN_MS, callContextData, IC.arg("name", name));
}
}
/**

Просмотреть файл

@ -19,20 +19,10 @@ export namespace Test
*
* Correctly handle line-breaks and comments
*/
export function myComplexReturnFunction_PostFork(callContextData: any): void
export function myComplexReturnFunction_Post(callContextData: any): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "myComplexReturnFunction", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/**
* *Note: The result ({ r1: string, r2: string }) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* Correctly handle line-breaks and comments
*/
export function myComplexReturnFunction_PostImpulse(callContextData: any): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "myComplexReturnFunction", 1, POST_TIMEOUT_IN_MS, callContextData);
}
}
/**

Просмотреть файл

@ -12,16 +12,10 @@ let POST_TIMEOUT_IN_MS: number = 8000; // -1 = Infinite
export namespace StaticStuff
{
/** *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().* */
export function hello_PostFork(callContextData: any, name: string): void
export function hello_Post(callContextData: any, name: string): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "hello", 1, POST_TIMEOUT_IN_MS, callContextData, IC.arg("name", name));
}
/** *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().* */
export function hello_PostImpulse(callContextData: any, name: string): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "hello", 1, POST_TIMEOUT_IN_MS, callContextData, IC.arg("name", name));
}
}
/**

Просмотреть файл

@ -76,7 +76,7 @@ export namespace Test
*
* *********** Primitives - bool, string, number, array
*/
export function BasicTypes_PostFork(callContextData: any, isFalse: boolean, height: number, mystring?: string, mystring2?: string, my_array?: number[], notSure?: any): void
export function BasicTypes_Post(callContextData: any, isFalse: boolean, height: number, mystring?: string, mystring2?: string, my_array?: number[], notSure?: any): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "BasicTypes", 1, POST_TIMEOUT_IN_MS, callContextData,
IC.arg("isFalse", isFalse),
@ -87,151 +87,70 @@ export namespace Test
IC.arg("notSure?", notSure));
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* *********** Primitives - bool, string, number, array
*/
export function BasicTypes_PostImpulse(callContextData: any, isFalse: boolean, height: number, mystring?: string, mystring2?: string, my_array?: number[], notSure?: any): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "BasicTypes", 1, POST_TIMEOUT_IN_MS, callContextData,
IC.arg("isFalse", isFalse),
IC.arg("height", height),
IC.arg("mystring?", mystring),
IC.arg("mystring2?", mystring2),
IC.arg("my_array?", my_array),
IC.arg("notSure?", notSure));
}
/**
* *Note: The result (PrintMedia) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* ******* Function using / returning Numeric Enum
*/
export function getMedia_PostFork(callContextData: any, mediaName: string): void
export function getMedia_Post(callContextData: any, mediaName: string): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "getMedia", 1, POST_TIMEOUT_IN_MS, callContextData, IC.arg("mediaName", mediaName));
}
/**
* *Note: The result (PrintMedia) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* ******* Function using / returning Numeric Enum
*/
export function getMedia_PostImpulse(callContextData: any, mediaName: string): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "getMedia", 1, POST_TIMEOUT_IN_MS, callContextData, IC.arg("mediaName", mediaName));
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* *********** Void type
*/
export function warnUser_PostFork(callContextData: any): void
export function warnUser_Post(callContextData: any): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "warnUser", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* *********** Void type
*/
export function warnUser_PostImpulse(callContextData: any): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "warnUser", 1, POST_TIMEOUT_IN_MS, callContextData);
}
/**
* *Note: The result (Names) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* ************ Example of a [post] method that uses custom types.
*/
export function makeName_PostFork(callContextData: any, firstName?: string, lastName?: string): void
export function makeName_Post(callContextData: any, firstName?: string, lastName?: string): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "makeName", 1, POST_TIMEOUT_IN_MS, callContextData,
IC.arg("firstName?", firstName),
IC.arg("lastName?", lastName));
}
/**
* *Note: The result (Names) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* ************ Example of a [post] method that uses custom types.
*/
export function makeName_PostImpulse(callContextData: any, firstName?: string, lastName?: string): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "makeName", 1, POST_TIMEOUT_IN_MS, callContextData,
IC.arg("firstName?", firstName),
IC.arg("lastName?", lastName));
}
/**
* *Note: The result (number) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* ******* Function returning number
*/
export function return_number_PostFork(callContextData: any, strvalue: string): void
export function return_number_Post(callContextData: any, strvalue: string): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "return_number", 1, POST_TIMEOUT_IN_MS, callContextData, IC.arg("strvalue", strvalue));
}
/**
* *Note: The result (number) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* ******* Function returning number
*/
export function return_number_PostImpulse(callContextData: any, strvalue: string): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "return_number", 1, POST_TIMEOUT_IN_MS, callContextData, IC.arg("strvalue", strvalue));
}
/**
* *Note: The result (string) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* ******* Function returning string
*/
export function returnstring_PostFork(callContextData: any, numvalue: number): void
export function returnstring_Post(callContextData: any, numvalue: number): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "returnstring", 1, POST_TIMEOUT_IN_MS, callContextData, IC.arg("numvalue", numvalue));
}
/**
* *Note: The result (string) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* ******* Function returning string
*/
export function returnstring_PostImpulse(callContextData: any, numvalue: number): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "returnstring", 1, POST_TIMEOUT_IN_MS, callContextData, IC.arg("numvalue", numvalue));
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* ******* Function with missing types ****
* Function with missing type information
*/
export function fnWithMissingType_PostFork(callContextData: any, p1: any, p2: number): void
export function fnWithMissingType_Post(callContextData: any, p1: any, p2: number): void
{
IC.postFork(DESTINATION_INSTANCE_NAME, "fnWithMissingType", 1, POST_TIMEOUT_IN_MS, callContextData,
IC.arg("p1", p1),
IC.arg("p2", p2));
}
/**
* *Note: The result (void) produced by this post method is received via the PostResultDispatcher provided to IC.start().*
*
* ******* Function with missing types ****
* Function with missing type information
*/
export function fnWithMissingType_PostImpulse(callContextData: any, p1: any, p2: number): void
{
IC.postImpulse(DESTINATION_INSTANCE_NAME, "fnWithMissingType", 1, POST_TIMEOUT_IN_MS, callContextData,
IC.arg("p1", p1),
IC.arg("p2", p2));
}
}
/**

8
AmbrosiaTest/JSCodeGen/package-lock.json сгенерированный
Просмотреть файл

@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@types/node": {
"version": "14.14.35",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.35.tgz",
"integrity": "sha512-Lt+wj8NVPx0zUmUwumiVXapmaLUcAk3yPuHCFVXras9k5VT9TdhJqKqGVUQCD60OTMCl0qxJ57OiTL0Mic3Iag=="
"version": "14.14.36",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.36.tgz",
"integrity": "sha512-kjivUwDJfIjngzbhooRnOLhGYz6oRFi+L+EpMjxroDYXwDw9lHrJJ43E+dJ6KAd3V3WxWAJ/qZE9XKYHhjPOFQ=="
},
"ajv": {
"version": "6.12.6",
@ -22,7 +22,7 @@
},
"ambrosia-node": {
"version": "file:ambrosia-node-0.0.77.tgz",
"integrity": "sha512-6gEAqg+QGedoSVzaIXTZ/2OTcknVG22IYrrEjw7fm5bLp2DWfIJWZDZ6NOqtzvQJPXsQgRKD5RZzKa+eXUWO4A==",
"integrity": "sha512-KqWu5xGf2vevrL1JfpA9/TqlezctrOcC6Ul2Ft3PFNZxQkciSB1V+aH/wBB3Mu/eS79BVHdyzCt6Uqd61Hql6w==",
"requires": {
"@types/node": "^14.14.25",
"azure-storage": "^2.10.3",