@zentered/issue-forms-body-parser 1.4.0 → 1.4.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/dist/package.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }
package/test/issue.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "action": "opened",
3
- "issue": {
4
- "body": "### List Item Checked\n\n* [x] I agree to follow this project's\n [Code of Conduct](https://berlincodeofconduct.org)\n"
5
- }
6
- }
@@ -1,104 +0,0 @@
1
- 'use strict'
2
-
3
- import t from 'tap'
4
- import fn from '../src/parse.js'
5
- import { readFile } from 'fs/promises'
6
- import { join } from 'path'
7
-
8
- const test = t.test
9
-
10
- test('parse(md) should parse GitHub Issue Form data into useful, structured data', async (t) => {
11
- const expected = {
12
- 'event-description': {
13
- title: 'Event Description',
14
- content: [
15
- 'Welcome to the CDC - Cyprus Developer Community! Join us for our monthly Larnaka\nmeet & greet event. Meet likeminded people, discuss topics we would like to hear\nabout in upcoming talks, welcome potential speakers, discuss all things tech and\nhave fun!',
16
- 'Notice with regards to COVID:',
17
- 'All attendees must follow measures in accordance with Ministry of Health\ndirectives. <https://www.pio.gov.cy/coronavirus/eng>'
18
- ],
19
- text: 'Welcome to the CDC - Cyprus Developer Community! Join us for our monthly Larnaka\nmeet & greet event. Meet likeminded people, discuss topics we would like to hear\nabout in upcoming talks, welcome potential speakers, discuss all things tech and\nhave fun!\n\nNotice with regards to COVID:\n\nAll attendees must follow measures in accordance with Ministry of Health\ndirectives. <https://www.pio.gov.cy/coronavirus/eng>'
20
- },
21
- location: {
22
- title: 'Location',
23
- content: [
24
- '[Cafe Nero Finikoudes, Larnaka](https://goo.gl/maps/Bzjxdeat3BSdsUSVA)'
25
- ],
26
- text: '[Cafe Nero Finikoudes, Larnaka](https://goo.gl/maps/Bzjxdeat3BSdsUSVA)'
27
- },
28
- date: {
29
- title: 'Date',
30
- content: ['11.03.2022'],
31
- date: '2022-03-11',
32
- text: '11.03.2022'
33
- },
34
- time: { title: 'Time', content: ['16:00'], time: '16:00', text: '16:00' },
35
- duration: {
36
- title: 'Duration',
37
- content: ['2h'],
38
- duration: { hours: 2, minutes: 0 },
39
- text: '2h'
40
- },
41
- 'list-item-checked': {
42
- title: 'List Item Checked',
43
- content: [],
44
- text: "* [x] I agree to follow this project's\n [Code of Conduct](https://berlincodeofconduct.org)",
45
- list: [
46
- {
47
- checked: true,
48
- text: "I agree to follow this project's\nCode of Conduct"
49
- }
50
- ]
51
- },
52
- 'list-item-unchecked': {
53
- title: 'List Item Unchecked',
54
- content: [],
55
- text: "* [ ] I agree to follow this project's\n [Code of Conduct](https://berlincodeofconduct.org)",
56
- list: [
57
- {
58
- checked: false,
59
- text: "I agree to follow this project's\nCode of Conduct"
60
- }
61
- ]
62
- },
63
- 'mixed-task-list': {
64
- title: 'Mixed Task List',
65
- content: [],
66
- text: '* [x] checked\n* [ ] unchecked\n* [x] checked 2\n* [x] checked 3\n* [ ] unchecked 2',
67
- list: [
68
- { checked: true, text: 'checked' },
69
- { checked: false, text: 'unchecked' },
70
- { checked: true, text: 'checked 2' },
71
- { checked: true, text: 'checked 3' },
72
- { checked: false, text: 'unchecked 2' }
73
- ]
74
- },
75
- repositories: {
76
- title: 'Repositories',
77
- content: [],
78
- lang: 'csv',
79
- text: '```csv\nhttps://example.com/repository-1\nhttps://example.com/repository-2\n```'
80
- },
81
- visibility: { title: 'Visibility', content: ['Internal'], text: 'Internal' }
82
- }
83
-
84
- const md = await readFile(
85
- join(process.cwd(), 'test', 'test-issue-1.md'),
86
- 'utf8'
87
- )
88
- const actual = await fn(md)
89
- // console.log(JSON.stringify(actual, null, 0))
90
-
91
- t.same(actual, expected)
92
- })
93
-
94
- test('parse(md) return nothing', async (t) => {
95
- const expected = {}
96
-
97
- const md = await readFile(
98
- join(process.cwd(), 'test', 'test-issue-2.md'),
99
- 'utf8'
100
- )
101
- const actual = await fn(md)
102
- // console.log(JSON.stringify(actual, null, 0))
103
- t.same(actual, expected)
104
- })
@@ -1,58 +0,0 @@
1
- ### Event Description
2
-
3
- <img width="1107" alt="The Brewery Larnaka" src="https://user-images.githubusercontent.com/3581331/162574191-3c023b32-34d9-4035-90bf-7297cdccaf06.png">
4
-
5
- Welcome to the CDC - Cyprus Developer Community! Join us for our monthly Larnaka
6
- meet & greet event. Meet likeminded people, discuss topics we would like to hear
7
- about in upcoming talks, welcome potential speakers, discuss all things tech and
8
- have fun!
9
-
10
- #### Notice with regards to COVID:
11
-
12
- All attendees must follow measures in accordance with Ministry of Health
13
- directives. https://www.pio.gov.cy/coronavirus/eng
14
-
15
- ### Location
16
-
17
- [Cafe Nero Finikoudes, Larnaka](https://goo.gl/maps/Bzjxdeat3BSdsUSVA)
18
-
19
- ### Date
20
-
21
- 11.03.2022
22
-
23
- ### Time
24
-
25
- 16:00
26
-
27
- ### Duration
28
-
29
- 2h
30
-
31
- ### List Item Checked
32
-
33
- - [x] I agree to follow this project's
34
- [Code of Conduct](https://berlincodeofconduct.org)
35
-
36
- ### List Item Unchecked
37
-
38
- - [ ] I agree to follow this project's
39
- [Code of Conduct](https://berlincodeofconduct.org)
40
-
41
- ### Mixed Task List
42
-
43
- - [x] checked
44
- - [ ] unchecked
45
- - [x] checked 2
46
- - [x] checked 3
47
- - [ ] unchecked 2
48
-
49
- ### Repositories
50
-
51
- ```csv
52
- https://example.com/repository-1
53
- https://example.com/repository-2
54
- ```
55
-
56
- ### Visibility
57
-
58
- Internal
@@ -1,10 +0,0 @@
1
- ---
2
- startDate: 10.03.2022
3
- startTime: 10.00
4
- duration: 1h
5
- location: online
6
- ---
7
-
8
- Let's chat about tech, coding and Cyprus.
9
-
10
- https://discord.gg/qA7wHjbs?event=948887583507755048