@skyramp/skyramp 0.4.65 → 0.4.67

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.
Binary file
@@ -122,10 +122,10 @@ extern char* newRestEndpointWrapper(char* name, char* openApiTag, GoInt port, ch
122
122
  extern char* getEndpointWrapper(char* service, GoInt port, char* restPath);
123
123
  extern char* writeMockDescriptionWrapper(char* mockDescription, char* kubernetesService);
124
124
  extern char* writeTestDescriptionWrapper(char* testDescription, char* testName);
125
- extern char* applyMockDescriptionWrapper(char* namespace, char* address, char* mockDescription);
125
+ extern char* applyMockDescriptionWrapper(char* namespace, char* address, char* mockDescription, char* mockPath, char* projectPath);
126
126
  extern char* buildRequestsWrapper(char* mockDescription);
127
127
  extern char* runTesterStartWrapper(char* namespace, char* address, char* testDescription, GoUint8 generateResult);
128
- extern char* runTesterStartWrapperWithGlobalHeaders(char* namespace, char* address, char* testDescription, char* testName, char* globalJsonHeaders, GoUint8 generateResult, GoUint8 isDockerEnv);
128
+ extern char* runTesterStartWrapperWithGlobalHeaders(char* namespace, char* address, char* testDescription, char* testFileName, char* testName, char* globalJsonHeaders, GoUint8 generateResult, char* projectPath, char* overrideFile);
129
129
  extern char* runTesterStatusWrapper(char* namespace, char* address);
130
130
 
131
131
  #ifdef __cplusplus
Binary file
@@ -122,10 +122,10 @@ extern char* newRestEndpointWrapper(char* name, char* openApiTag, GoInt port, ch
122
122
  extern char* getEndpointWrapper(char* service, GoInt port, char* restPath);
123
123
  extern char* writeMockDescriptionWrapper(char* mockDescription, char* kubernetesService);
124
124
  extern char* writeTestDescriptionWrapper(char* testDescription, char* testName);
125
- extern char* applyMockDescriptionWrapper(char* namespace, char* address, char* mockDescription);
125
+ extern char* applyMockDescriptionWrapper(char* namespace, char* address, char* mockDescription, char* mockPath, char* projectPath);
126
126
  extern char* buildRequestsWrapper(char* mockDescription);
127
127
  extern char* runTesterStartWrapper(char* namespace, char* address, char* testDescription, GoUint8 generateResult);
128
- extern char* runTesterStartWrapperWithGlobalHeaders(char* namespace, char* address, char* testDescription, char* testName, char* globalJsonHeaders, GoUint8 generateResult, GoUint8 isDockerEnv);
128
+ extern char* runTesterStartWrapperWithGlobalHeaders(char* namespace, char* address, char* testDescription, char* testFileName, char* testName, char* globalJsonHeaders, GoUint8 generateResult, char* projectPath, char* overrideFile);
129
129
  extern char* runTesterStatusWrapper(char* namespace, char* address);
130
130
 
131
131
  #ifdef __cplusplus
@@ -122,10 +122,10 @@ extern char* newRestEndpointWrapper(char* name, char* openApiTag, GoInt port, ch
122
122
  extern char* getEndpointWrapper(char* service, GoInt port, char* restPath);
123
123
  extern char* writeMockDescriptionWrapper(char* mockDescription, char* kubernetesService);
124
124
  extern char* writeTestDescriptionWrapper(char* testDescription, char* testName);
125
- extern char* applyMockDescriptionWrapper(char* namespace, char* address, char* mockDescription);
125
+ extern char* applyMockDescriptionWrapper(char* namespace, char* address, char* mockDescription, char* mockPath, char* projectPath);
126
126
  extern char* buildRequestsWrapper(char* mockDescription);
127
127
  extern char* runTesterStartWrapper(char* namespace, char* address, char* testDescription, GoUint8 generateResult);
128
- extern char* runTesterStartWrapperWithGlobalHeaders(char* namespace, char* address, char* testDescription, char* testName, char* globalJsonHeaders, GoUint8 generateResult, GoUint8 isDockerEnv);
128
+ extern char* runTesterStartWrapperWithGlobalHeaders(char* namespace, char* address, char* testDescription, char* testFileName, char* testName, char* globalJsonHeaders, GoUint8 generateResult, char* projectPath, char* overrideFile);
129
129
  extern char* runTesterStatusWrapper(char* namespace, char* address);
130
130
 
131
131
  #ifdef __cplusplus
Binary file
@@ -122,10 +122,10 @@ extern char* newRestEndpointWrapper(char* name, char* openApiTag, GoInt port, ch
122
122
  extern char* getEndpointWrapper(char* service, GoInt port, char* restPath);
123
123
  extern char* writeMockDescriptionWrapper(char* mockDescription, char* kubernetesService);
124
124
  extern char* writeTestDescriptionWrapper(char* testDescription, char* testName);
125
- extern char* applyMockDescriptionWrapper(char* namespace, char* address, char* mockDescription);
125
+ extern char* applyMockDescriptionWrapper(char* namespace, char* address, char* mockDescription, char* mockPath, char* projectPath);
126
126
  extern char* buildRequestsWrapper(char* mockDescription);
127
127
  extern char* runTesterStartWrapper(char* namespace, char* address, char* testDescription, GoUint8 generateResult);
128
- extern char* runTesterStartWrapperWithGlobalHeaders(char* namespace, char* address, char* testDescription, char* testName, char* globalJsonHeaders, GoUint8 generateResult, GoUint8 isDockerEnv);
128
+ extern char* runTesterStartWrapperWithGlobalHeaders(char* namespace, char* address, char* testDescription, char* testFileName, char* testName, char* globalJsonHeaders, GoUint8 generateResult, char* projectPath, char* overrideFile);
129
129
  extern char* runTesterStatusWrapper(char* namespace, char* address);
130
130
 
131
131
  #ifdef __cplusplus
Binary file
Binary file
@@ -122,10 +122,10 @@ extern __declspec(dllexport) char* newRestEndpointWrapper(char* name, char* open
122
122
  extern __declspec(dllexport) char* getEndpointWrapper(char* service, GoInt port, char* restPath);
123
123
  extern __declspec(dllexport) char* writeMockDescriptionWrapper(char* mockDescription, char* kubernetesService);
124
124
  extern __declspec(dllexport) char* writeTestDescriptionWrapper(char* testDescription, char* testName);
125
- extern __declspec(dllexport) char* applyMockDescriptionWrapper(char* namespace, char* address, char* mockDescription);
125
+ extern __declspec(dllexport) char* applyMockDescriptionWrapper(char* namespace, char* address, char* mockDescription, char* mockPath, char* projectPath);
126
126
  extern __declspec(dllexport) char* buildRequestsWrapper(char* mockDescription);
127
127
  extern __declspec(dllexport) char* runTesterStartWrapper(char* namespace, char* address, char* testDescription, GoUint8 generateResult);
128
- extern __declspec(dllexport) char* runTesterStartWrapperWithGlobalHeaders(char* namespace, char* address, char* testDescription, char* testName, char* globalJsonHeaders, GoUint8 generateResult, GoUint8 isDockerEnv);
128
+ extern __declspec(dllexport) char* runTesterStartWrapperWithGlobalHeaders(char* namespace, char* address, char* testDescription, char* testFileName, char* testName, char* globalJsonHeaders, GoUint8 generateResult, char* projectPath, char* overrideFile);
129
129
  extern __declspec(dllexport) char* runTesterStatusWrapper(char* namespace, char* address);
130
130
 
131
131
  #ifdef __cplusplus
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyramp/skyramp",
3
- "version": "0.4.65",
3
+ "version": "0.4.67",
4
4
  "description": "module for leveraging skyramp cli functionality",
5
5
  "scripts": {
6
6
  "lint": "eslint 'src/**/*.js' 'src/**/*.ts' --fix",
@@ -40,8 +40,8 @@ const newDeleteDockerSkyrampWorkerWrapper = lib.func('newDeleteDockerSkyrampWork
40
40
  // tester related
41
41
  const runTesterStartWrapper = lib.func('runTesterStartWrapper', 'string', ['string', 'string', 'string', 'bool']);
42
42
  // mocker related
43
- const runTesterStartWrapperv1 = lib.func('runTesterStartWrapperWithGlobalHeaders', 'string', ['string', 'string', 'string', 'string', 'string', 'bool', 'bool']);
44
- const applyMockDescriptionWrapper = lib.func('applyMockDescriptionWrapper', 'string', ['string', 'string', 'string']);
43
+ const runTesterStartWrapperv1 = lib.func('runTesterStartWrapperWithGlobalHeaders', 'string', ['string', 'string', 'string', 'string', 'string', 'string', 'bool', 'string', 'string']);
44
+ const applyMockDescriptionWrapper = lib.func('applyMockDescriptionWrapper', 'string', ['string', 'string', 'string', 'string', 'string']);
45
45
  // NPM only: for VS code extension use
46
46
  const initTargetWrapper = lib.func('initTargetWrapper', 'string', ['string']);
47
47
  const deployTargetWrapper = lib.func('deployTargetWrapper', 'string', ['string', 'string', 'string', 'bool']);
@@ -256,7 +256,7 @@ class SkyrampClient {
256
256
  * @returns {Promise} - A Promise that resolves if deployment is successful, and rejects with an error if any error occurs during deployment.
257
257
  * @throws {Error} - If there is no cluster to deploy the worker to.
258
258
  */
259
- async deploySkyrampWorker(namespace, workerImage='', localImage=false) {
259
+ async deploySkyrampWorker(namespace, workerImage = '', localImage = false) {
260
260
  if (this.kubeConfigPath === null) {
261
261
  throw new Error('No cluster to deploy worker to.');
262
262
  }
@@ -312,7 +312,7 @@ class SkyrampClient {
312
312
  * @param {string} targetNetworkName - The name of the network to connect the Docker worker to.
313
313
  * @returns {Promise} - A Promise that resolves if the Docker worker starts successfully and rejects if there is an error starting the worker.
314
314
  */
315
- async runDockerSkyrampWorker(workerImage=WORKER_URL, workerTag=WORKER_TAG, hostPost=CONTAINER_PORT, targetNetworkName="") {
315
+ async runDockerSkyrampWorker(workerImage = WORKER_URL, workerTag = WORKER_TAG, hostPost = CONTAINER_PORT, targetNetworkName = "") {
316
316
  return new Promise((resolve, reject) => {
317
317
  newStartDockerSkyrampWorkerWrapper.async(workerImage, workerTag, hostPost, targetNetworkName, (err, res) => {
318
318
  if (err) {
@@ -375,11 +375,11 @@ class SkyrampClient {
375
375
  async mockerApplyFromFile(namespace, address, filepath) {
376
376
  const yamlContent = getYamlBytes(readDataFromFile(filepath)[0]);
377
377
  return this.applyMockDescription(namespace, address, yamlContent);
378
- }
378
+ }
379
379
 
380
380
  async applyMockDescription(namespace, address, yamlContent) {
381
381
  return new Promise((resolve, reject) => {
382
- applyMockDescriptionWrapper.async(namespace, address, yamlContent, (err, res) => {
382
+ applyMockDescriptionWrapper.async(namespace, address, yamlContent, '', '', (err, res) => {
383
383
  if (err) {
384
384
  reject(err);
385
385
  } else if (res) {
@@ -410,14 +410,14 @@ class SkyrampClient {
410
410
  *
411
411
  * @returns {Promise} - A promise that resolves when the test scenario is started.
412
412
  */
413
- async testerStartV1(namespace, address, scenario, testName, globalHeaders, generateTestReport=false, isDockerenv=false) {
414
- const testDescription = createTestDescriptionFromScenario(scenario);
415
- const testYamlContent = getYamlBytes(testDescription);
416
- if (globalHeaders !== undefined && globalHeaders !== null) {
417
- globalHeaders = JSON.stringify(globalHeaders);
418
- }
419
- return this.runTesterStartv1(namespace, address, testYamlContent, testName, globalHeaders, generateTestReport, isDockerenv);
413
+ async testerStartV1(namespace, address, scenario, testName, globalHeaders, generateTestReport = false) {
414
+ const testDescription = createTestDescriptionFromScenario(scenario);
415
+ const testYamlContent = getYamlBytes(testDescription);
416
+ if (globalHeaders !== undefined && globalHeaders !== null) {
417
+ globalHeaders = JSON.stringify(globalHeaders);
420
418
  }
419
+ return this.runTesterStartv1(namespace, address, testYamlContent, testName, globalHeaders, generateTestReport);
420
+ }
421
421
 
422
422
  // NPM only: for VS code extension use
423
423
  async testerStartFromFile(namespace, address, filepath) {
@@ -440,9 +440,9 @@ class SkyrampClient {
440
440
  });
441
441
  }
442
442
 
443
- async runTesterStartv1(namespace, address, testYamlContent, testName, globalHeaders, generateReport=true, isDockerEnvironment=false) {
443
+ async runTesterStartv1(namespace, address, testYamlContent, testName, globalHeaders, generateReport = true) {
444
444
  return new Promise((resolve, reject) => {
445
- runTesterStartWrapperv1.async(namespace, address, testYamlContent, testName, globalHeaders, generateReport, isDockerEnvironment, (err, res) => {
445
+ runTesterStartWrapperv1.async(namespace, address, testYamlContent, "", testName, globalHeaders, generateReport, "", "", (err, res) => {
446
446
  if (err) {
447
447
  reject(err);
448
448
  } else if (res) {