nginx-lint-plugin 0.8.2 → 0.8.3

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/README.md CHANGED
@@ -122,7 +122,7 @@ The WIT definition file is bundled with this package, so `jco componentize` can
122
122
  "test": "tsc && node --test dist/plugin.test.js"
123
123
  },
124
124
  "dependencies": {
125
- "nginx-lint-plugin": "^0.8.2"
125
+ "nginx-lint-plugin": "^0.8.3"
126
126
  },
127
127
  "devDependencies": {
128
128
  "@bytecodealliance/componentize-js": "^0.19",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nginx-lint-plugin",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -16,6 +16,7 @@
16
16
  },
17
17
  "files": [
18
18
  "dist",
19
+ "wasm",
19
20
  "wit"
20
21
  ],
21
22
  "scripts": {
@@ -0,0 +1,60 @@
1
+ /** @module Interface nginx-lint:plugin/data-types@3.0.0 **/
2
+ /**
3
+ * # Variants
4
+ *
5
+ * ## `"literal"`
6
+ *
7
+ * ## `"quoted-string"`
8
+ *
9
+ * ## `"single-quoted-string"`
10
+ *
11
+ * ## `"variable"`
12
+ */
13
+ export type ArgumentType = 'literal' | 'quoted-string' | 'single-quoted-string' | 'variable';
14
+ export interface ArgumentInfo {
15
+ value: string,
16
+ raw: string,
17
+ argType: ArgumentType,
18
+ line: number,
19
+ column: number,
20
+ startOffset: number,
21
+ endOffset: number,
22
+ }
23
+ export interface DirectiveData {
24
+ name: string,
25
+ args: Array<ArgumentInfo>,
26
+ line: number,
27
+ column: number,
28
+ startOffset: number,
29
+ endOffset: number,
30
+ endLine: number,
31
+ endColumn: number,
32
+ leadingWhitespace: string,
33
+ trailingWhitespace: string,
34
+ spaceBeforeTerminator: string,
35
+ hasBlock: boolean,
36
+ blockIsRaw: boolean,
37
+ blockRawContent?: string,
38
+ closingBraceLeadingWhitespace?: string,
39
+ blockTrailingWhitespace?: string,
40
+ trailingCommentText?: string,
41
+ nameEndColumn: number,
42
+ nameEndOffset: number,
43
+ blockStartLine?: number,
44
+ blockStartColumn?: number,
45
+ blockStartOffset?: number,
46
+ }
47
+ export interface CommentInfo {
48
+ text: string,
49
+ line: number,
50
+ column: number,
51
+ leadingWhitespace: string,
52
+ trailingWhitespace: string,
53
+ startOffset: number,
54
+ endOffset: number,
55
+ }
56
+ export interface BlankLineInfo {
57
+ line: number,
58
+ content: string,
59
+ startOffset: number,
60
+ }
@@ -0,0 +1,33 @@
1
+ /** @module Interface nginx-lint:plugin/parser-types@3.0.0 **/
2
+ export type DirectiveData = import('./nginx-lint-plugin-data-types.js').DirectiveData;
3
+ export interface DirectiveContext {
4
+ data: DirectiveData,
5
+ blockItemIndices: Uint32Array,
6
+ parentStack: Array<string>,
7
+ depth: number,
8
+ }
9
+ export type CommentInfo = import('./nginx-lint-plugin-data-types.js').CommentInfo;
10
+ export type BlankLineInfo = import('./nginx-lint-plugin-data-types.js').BlankLineInfo;
11
+ export type ConfigItemValue = ConfigItemValueDirectiveItem | ConfigItemValueCommentItem | ConfigItemValueBlankLineItem;
12
+ export interface ConfigItemValueDirectiveItem {
13
+ tag: 'directive-item',
14
+ val: DirectiveData,
15
+ }
16
+ export interface ConfigItemValueCommentItem {
17
+ tag: 'comment-item',
18
+ val: CommentInfo,
19
+ }
20
+ export interface ConfigItemValueBlankLineItem {
21
+ tag: 'blank-line-item',
22
+ val: BlankLineInfo,
23
+ }
24
+ export interface ConfigItem {
25
+ value: ConfigItemValue,
26
+ childIndices: Uint32Array,
27
+ }
28
+ export interface ParseOutput {
29
+ directivesWithContext: Array<DirectiveContext>,
30
+ includeContext: Array<string>,
31
+ allItems: Array<ConfigItem>,
32
+ topLevelIndices: Uint32Array,
33
+ }
Binary file
@@ -0,0 +1,5 @@
1
+ // world root:component/root
2
+ export type ParseOutput = import('./interfaces/nginx-lint-plugin-parser-types.js').ParseOutput;
3
+ export type * as NginxLintPluginDataTypes300 from './interfaces/nginx-lint-plugin-data-types.js'; // import nginx-lint:plugin/data-types@3.0.0
4
+ export type * as NginxLintPluginParserTypes300 from './interfaces/nginx-lint-plugin-parser-types.js'; // import nginx-lint:plugin/parser-types@3.0.0
5
+ export function parseConfig(source: string, includeContext: Array<string>): ParseOutput;