@sasjs/api 0.42.0 → 0.43.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/browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @sasjs/api 0.
|
|
1
|
+
/* @sasjs/api 0.43.0 - the SASjs Server API, for a service worker. https://github.com/sasjs/api */
|
|
2
2
|
"use strict";
|
|
3
3
|
var SASjsApi = (() => {
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -50,7 +50,9 @@ const createCodeService = (options = {}) => {
|
|
|
50
50
|
},
|
|
51
51
|
async format(caller, body) {
|
|
52
52
|
requireCaller(caller);
|
|
53
|
-
return (0, lint_1.formatText)(codeOf(body), await configFor(body.filePath)
|
|
53
|
+
return (0, lint_1.formatText)(codeOf(body), await configFor(body.filePath), {
|
|
54
|
+
reprint: options.reprint
|
|
55
|
+
});
|
|
54
56
|
}
|
|
55
57
|
};
|
|
56
58
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Diagnostic, LintConfig } from '@sasjs/lint';
|
|
1
|
+
import type { Diagnostic, FormatOptions, LintConfig } from '@sasjs/lint';
|
|
2
2
|
import type { Subject } from '../identity/types.js';
|
|
3
3
|
/** What both code routes take: a buffer, and where it came from when it has a file. */
|
|
4
4
|
export interface CodeRequest {
|
|
@@ -7,6 +7,12 @@ export interface CodeRequest {
|
|
|
7
7
|
filePath?: string;
|
|
8
8
|
}
|
|
9
9
|
export interface CodeServiceOptions {
|
|
10
|
+
/**
|
|
11
|
+
* Optional host-supplied layout engine, run before the lint rules. Without it,
|
|
12
|
+
* formatting applies lint fixes only, as before. Browser hosts must provide
|
|
13
|
+
* the engine and serve its vocabulary themselves.
|
|
14
|
+
*/
|
|
15
|
+
reprint?: FormatOptions['reprint'];
|
|
10
16
|
/**
|
|
11
17
|
* The lint configuration that applies to a file.
|
|
12
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/code/service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/code/service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEnD,uFAAuF;AACvF,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAA;IAClC;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,EAAE,CACX,QAAQ,CAAC,EAAE,MAAM,KACd,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;CAC9D;AAED,MAAM,WAAW,WAAW;IAC1B,gFAAgF;IAChF,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IAC3E,4BAA4B;IAC5B,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;CACxE;AAmBD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAS,kBAAuB,KAC/B,WAuBF,CAAA"}
|
|
@@ -47,7 +47,9 @@ export const createCodeService = (options = {}) => {
|
|
|
47
47
|
},
|
|
48
48
|
async format(caller, body) {
|
|
49
49
|
requireCaller(caller);
|
|
50
|
-
return formatText(codeOf(body), await configFor(body.filePath)
|
|
50
|
+
return formatText(codeOf(body), await configFor(body.filePath), {
|
|
51
|
+
reprint: options.reprint
|
|
52
|
+
});
|
|
51
53
|
}
|
|
52
54
|
};
|
|
53
55
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sasjs/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "The SASjs Server API, described once - a generated route table, the services behind it, and the conformance corpus both hosts run",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SASjs",
|
|
@@ -76,6 +76,6 @@
|
|
|
76
76
|
"minimatch": "11.0.4"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@sasjs/lint": "
|
|
79
|
+
"@sasjs/lint": "5.5.7"
|
|
80
80
|
}
|
|
81
81
|
}
|