@sasjs/adapter 4.1.0 → 4.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/package.json CHANGED
@@ -79,12 +79,12 @@
79
79
  },
80
80
  "main": "index.js",
81
81
  "dependencies": {
82
- "@sasjs/utils": "2.48.2",
82
+ "@sasjs/utils": "2.52.0",
83
83
  "axios": "0.26.0",
84
84
  "axios-cookiejar-support": "1.0.1",
85
85
  "form-data": "4.0.0",
86
86
  "https": "1.0.0",
87
87
  "tough-cookie": "4.0.0"
88
88
  },
89
- "version": "4.1.0"
89
+ "version": "4.1.2"
90
90
  }
@@ -1,5 +1,4 @@
1
1
  import * as NodeFormData from 'form-data'
2
- import { createReadStream } from '@sasjs/utils/file'
3
2
  import { AuthConfig, ServerType, ServicePackSASjs } from '@sasjs/utils/types'
4
3
  import { ExecutionQuery } from './types'
5
4
  import { RequestClient } from './request/RequestClient'
@@ -62,6 +61,7 @@ export class SASjsApiClient {
62
61
  * @param authConfig - (optional) a valid client, secret, refresh and access tokens that are authorised to execute compute jobs.
63
62
  */
64
63
  public async deployZipFile(zipFilePath: string, authConfig?: AuthConfig) {
64
+ const { createReadStream } = require('@sasjs/utils/file')
65
65
  const access_token = await this.getAccessTokenForRequest(authConfig)
66
66
 
67
67
  const file = await createReadStream(zipFilePath)
@@ -691,7 +691,9 @@ const parseError = (data: string) => {
691
691
  const parts = data.split(/stored process not found: /i)
692
692
  if (parts.length > 1) {
693
693
  const storedProcessPath = parts[1].split('<i>')[1].split('</i>')[0]
694
- const message = `Stored process not found: ${storedProcessPath}`
694
+ const message = storedProcessPath.endsWith('runner')
695
+ ? `SASJS runner not found. Here's the link (https://cli.sasjs.io/auth/#sasjs-runner) to the SAS code for registering the SASjs runner`
696
+ : `Stored process not found: ${storedProcessPath}`
695
697
  return new JobExecutionError(500, message, '')
696
698
  }
697
699
  }