-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
figma-bot
committed
Nov 5, 2024
1 parent
60b9be4
commit 245eacf
Showing
43 changed files
with
1,002 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
1 change: 1 addition & 0 deletions
1
cli/src/connect/__test__/e2e/e2e_parse_command/custom_parser/OtherFile.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
OtherFile |
1 change: 1 addition & 0 deletions
1
cli/src/connect/__test__/e2e/e2e_parse_command/custom_parser/Test.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test |
8 changes: 8 additions & 0 deletions
8
cli/src/connect/__test__/e2e/e2e_parse_command/custom_parser/figma.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"codeConnect": { | ||
"parser": "custom", | ||
"parserCommand": "node parser/custom_parser.js", | ||
"include": ["*.test"], | ||
"exclude": ["Excluded.test"] | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
cli/src/connect/__test__/e2e/e2e_parse_command/custom_parser/parser/custom_parser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
let data = '' | ||
|
||
process.stdin.on('data', function (chunk) { | ||
data += chunk | ||
}) | ||
|
||
process.stdin.on('end', function () { | ||
const parsed = JSON.parse(data) | ||
// Fake result which passes back the input, formatted to match the expected | ||
// schema, so we can validate it was passed in correctly | ||
const result = { | ||
docs: parsed.paths.map((path) => ({ | ||
figmaNode: path, | ||
template: JSON.stringify({ | ||
config: parsed.config, | ||
mode: parsed.mode, | ||
}), | ||
source: path, | ||
templateData: { props: {} }, | ||
language: 'test', | ||
label: 'Test', | ||
})), | ||
messages: [ | ||
{ level: 'DEBUG', message: 'Debug message from parser!' }, | ||
{ level: 'INFO', message: 'Success from parser!' }, | ||
], | ||
} | ||
|
||
process.stdout.write(JSON.stringify(result)) | ||
}) |
1 change: 1 addition & 0 deletions
1
cli/src/connect/__test__/e2e/e2e_parse_command/custom_parser_error/Test.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test |
8 changes: 8 additions & 0 deletions
8
cli/src/connect/__test__/e2e/e2e_parse_command/custom_parser_error/figma.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"codeConnect": { | ||
"parser": "custom", | ||
"parserCommand": "node parser/custom_parser.js", | ||
"include": ["*.test"], | ||
"exclude": ["Excluded.test"] | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
cli/src/connect/__test__/e2e/e2e_parse_command/custom_parser_error/parser/custom_parser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
let data = '' | ||
|
||
process.stdin.on('data', function (chunk) { | ||
data += chunk | ||
}) | ||
|
||
process.stdin.on('end', function () { | ||
const parsed = JSON.parse(data) | ||
const result = { | ||
docs: [], | ||
messages: [{ level: 'ERROR', message: 'Error from parser!' }], | ||
} | ||
|
||
process.stdout.write(JSON.stringify(result)) | ||
}) |
1 change: 1 addition & 0 deletions
1
cli/src/connect/__test__/e2e/e2e_parse_command/custom_parser_error_empty_include/Test.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test |
8 changes: 8 additions & 0 deletions
8
...onnect/__test__/e2e/e2e_parse_command/custom_parser_error_empty_include/figma.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"codeConnect": { | ||
"parser": "custom", | ||
"parserCommand": "node parser/custom_parser.js", | ||
"include": [], | ||
"exclude": ["Excluded.test"] | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
.../__test__/e2e/e2e_parse_command/custom_parser_error_empty_include/parser/custom_parser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
let data = '' | ||
|
||
process.stdin.on('data', function (chunk) { | ||
data += chunk | ||
}) | ||
|
||
process.stdin.on('end', function () { | ||
const parsed = JSON.parse(data) | ||
const result = { | ||
docs: [], | ||
messages: [{ level: 'ERROR', message: 'Error from parser!' }], | ||
} | ||
|
||
process.stdout.write(JSON.stringify(result)) | ||
}) |
1 change: 1 addition & 0 deletions
1
cli/src/connect/__test__/e2e/e2e_parse_command/custom_parser_error_no_include/Test.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test |
7 changes: 7 additions & 0 deletions
7
...c/connect/__test__/e2e/e2e_parse_command/custom_parser_error_no_include/figma.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"codeConnect": { | ||
"parser": "custom", | ||
"parserCommand": "node parser/custom_parser.js", | ||
"exclude": ["Excluded.test"] | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...ect/__test__/e2e/e2e_parse_command/custom_parser_error_no_include/parser/custom_parser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
let data = '' | ||
|
||
process.stdin.on('data', function (chunk) { | ||
data += chunk | ||
}) | ||
|
||
process.stdin.on('end', function () { | ||
const parsed = JSON.parse(data) | ||
const result = { | ||
docs: [], | ||
messages: [{ level: 'ERROR', message: 'Error from parser!' }], | ||
} | ||
|
||
process.stdout.write(JSON.stringify(result)) | ||
}) |
Empty file.
1 change: 1 addition & 0 deletions
1
...onnect/__test__/e2e/e2e_parse_command/custom_parser_error_no_parsercommand/OtherFile.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
OtherFile |
1 change: 1 addition & 0 deletions
1
...src/connect/__test__/e2e/e2e_parse_command/custom_parser_error_no_parsercommand/Test.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test |
7 changes: 7 additions & 0 deletions
7
...ect/__test__/e2e/e2e_parse_command/custom_parser_error_no_parsercommand/figma.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"codeConnect": { | ||
"parser": "custom", | ||
"include": ["*.test"], | ||
"exclude": ["Excluded.test"] | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...test__/e2e/e2e_parse_command/custom_parser_error_no_parsercommand/parser/custom_parser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
let data = '' | ||
|
||
process.stdin.on('data', function (chunk) { | ||
data += chunk | ||
}) | ||
|
||
process.stdin.on('end', function () { | ||
const parsed = JSON.parse(data) | ||
// Fake result which passes back the input, formatted to match the expected | ||
// schema, so we can validate it was passed in correctly | ||
const result = { | ||
docs: parsed.paths.map((path) => ({ | ||
figmaNode: path, | ||
template: JSON.stringify({ | ||
config: parsed.config, | ||
mode: parsed.mode, | ||
}), | ||
source: path, | ||
templateData: { props: {} }, | ||
language: 'test', | ||
label: 'Test', | ||
})), | ||
messages: [ | ||
{ level: 'DEBUG', message: 'Debug message from parser!' }, | ||
{ level: 'INFO', message: 'Success from parser!' }, | ||
], | ||
} | ||
|
||
process.stdout.write(JSON.stringify(result)) | ||
}) |
1 change: 1 addition & 0 deletions
1
cli/src/connect/__test__/e2e/e2e_parse_command/custom_parser_invalid_response/Test.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test |
8 changes: 8 additions & 0 deletions
8
...c/connect/__test__/e2e/e2e_parse_command/custom_parser_invalid_response/figma.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"codeConnect": { | ||
"parser": "custom", | ||
"parserCommand": "node parser/custom_parser.js", | ||
"include": ["*.test"], | ||
"exclude": ["Excluded.test"] | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...ect/__test__/e2e/e2e_parse_command/custom_parser_invalid_response/parser/custom_parser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
let data = '' | ||
|
||
process.stdin.on('data', function (chunk) { | ||
data += chunk | ||
}) | ||
|
||
process.stdin.on('end', function () { | ||
const parsed = JSON.parse(data) | ||
// Fake result which passes back the input, formatted to match the expected | ||
// schema, so we can validate it was passed in correctly | ||
const result = { | ||
docs: parsed.paths.map((path) => ({ | ||
test: 123, | ||
})), | ||
messages: [ | ||
{ level: 'DEBUG', message: 'Debug message from parser!' }, | ||
{ level: 'INFO', message: 'Success from parser!' }, | ||
], | ||
} | ||
|
||
process.stdout.write(JSON.stringify(result)) | ||
}) |
Empty file.
1 change: 1 addition & 0 deletions
1
cli/src/connect/__test__/e2e/e2e_parse_command/custom_parser_warning/OtherFile.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
OtherFile |
1 change: 1 addition & 0 deletions
1
cli/src/connect/__test__/e2e/e2e_parse_command/custom_parser_warning/Test.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test |
8 changes: 8 additions & 0 deletions
8
cli/src/connect/__test__/e2e/e2e_parse_command/custom_parser_warning/figma.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"codeConnect": { | ||
"parser": "custom", | ||
"parserCommand": "node parser/custom_parser.js", | ||
"include": ["*.test"], | ||
"exclude": ["Excluded.test"] | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
cli/src/connect/__test__/e2e/e2e_parse_command/custom_parser_warning/parser/custom_parser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
let data = '' | ||
|
||
process.stdin.on('data', function (chunk) { | ||
data += chunk | ||
}) | ||
|
||
process.stdin.on('end', function () { | ||
const parsed = JSON.parse(data) | ||
// Fake result which passes back the input, formatted to match the expected | ||
// schema, so we can validate it was passed in correctly | ||
const result = { | ||
docs: parsed.paths.map((path) => ({ | ||
figmaNode: path, | ||
template: JSON.stringify({ | ||
config: parsed.config, | ||
mode: parsed.mode, | ||
}), | ||
source: path, | ||
templateData: { props: {} }, | ||
language: 'test', | ||
label: 'Test', | ||
})), | ||
messages: [{ level: 'WARN', message: 'Warning from parser!' }], | ||
} | ||
|
||
process.stdout.write(JSON.stringify(result)) | ||
}) |
Oops, something went wrong.