@api-client/ui 0.5.39 → 0.5.40
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/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/.aiexclude +0 -3
- package/.cursor/rules/html-and-css-best-practices.mdc +0 -63
- package/.cursor/rules/lit-best-practices.mdc +0 -89
- package/.editorconfig +0 -29
- package/.github/CONTRIBUTING.md +0 -24
- package/.github/instructions/html-and-css-best-practices.instructions.md +0 -70
- package/.github/instructions/lit-best-practices.instructions.md +0 -90
- package/.github/release.yml +0 -14
- package/.github/stale.yml +0 -23
- package/.github/workflows/auto-release.yml +0 -182
- package/.github/workflows/release.yml +0 -82
- package/.prettierrc.js +0 -14
- package/.vscode/settings.json +0 -18
- package/RELEASE.md +0 -163
- package/RELEASE_SETUP.md +0 -235
- package/build/src/demo/DemoPage.d.ts +0 -81
- package/build/src/demo/DemoPage.d.ts.map +0 -1
- package/build/src/demo/DemoPage.js +0 -175
- package/build/src/demo/DemoPage.js.map +0 -1
- package/build/src/demo/DemoStyles.d.ts +0 -3
- package/build/src/demo/DemoStyles.d.ts.map +0 -1
- package/build/src/demo/DemoStyles.js +0 -60
- package/build/src/demo/DemoStyles.js.map +0 -1
- package/build/test/elements/navigation/Navigation.test.d.ts +0 -3
- package/build/test/elements/navigation/Navigation.test.d.ts.map +0 -1
- package/build/test/elements/navigation/Navigation.test.js +0 -113
- package/build/test/elements/navigation/Navigation.test.js.map +0 -1
- package/commitlint.config.cjs +0 -2
- package/demo/elements/authorization/AuthPlugin.js +0 -57
- package/demo/elements/authorization/AuthProxy.js +0 -215
- package/demo/elements/authorization/api-key.html +0 -27
- package/demo/elements/authorization/api-key.ts +0 -44
- package/demo/elements/authorization/basic.html +0 -27
- package/demo/elements/authorization/basic.ts +0 -43
- package/demo/elements/authorization/bearer.html +0 -27
- package/demo/elements/authorization/bearer.ts +0 -43
- package/demo/elements/authorization/env.js +0 -8
- package/demo/elements/authorization/index.html +0 -44
- package/demo/elements/authorization/ntlm.html +0 -27
- package/demo/elements/authorization/ntlm.ts +0 -43
- package/demo/elements/authorization/oauth-authorize.html +0 -75
- package/demo/elements/authorization/oauth-authorize.ts +0 -40
- package/demo/elements/authorization/oauth-error.html +0 -18
- package/demo/elements/authorization/oauth-error.ts +0 -10
- package/demo/elements/authorization/oauth-popup.html +0 -36
- package/demo/elements/authorization/oauth2.html +0 -27
- package/demo/elements/authorization/oauth2.ts +0 -100
- package/demo/elements/authorization/oidc.html +0 -27
- package/demo/elements/authorization/oidc.ts +0 -139
- package/demo/elements/authorization/private.crt +0 -31
- package/demo/elements/authorization/private.csr +0 -28
- package/demo/elements/authorization/private.key +0 -51
- package/demo/elements/authorization/private.pem +0 -31
- package/demo/elements/authorization/redirect.html +0 -20
- package/demo/elements/authorization/ssl-commands.sh +0 -30
- package/demo/elements/authorization/ssl.conf +0 -24
- package/demo/elements/autocomplete/index.html +0 -64
- package/demo/elements/autocomplete/index.ts +0 -171
- package/demo/elements/code-editor/CodeEditorDemo.ts +0 -173
- package/demo/elements/code-editor/index.html +0 -19
- package/demo/elements/context-menu/DemoIcons.ts +0 -21
- package/demo/elements/context-menu/basic.html +0 -25
- package/demo/elements/context-menu/basic.ts +0 -119
- package/demo/elements/context-menu/custom-data.html +0 -25
- package/demo/elements/context-menu/custom-data.ts +0 -62
- package/demo/elements/context-menu/demo.css +0 -28
- package/demo/elements/context-menu/enabled-state.html +0 -25
- package/demo/elements/context-menu/enabled-state.ts +0 -73
- package/demo/elements/context-menu/icons.html +0 -25
- package/demo/elements/context-menu/icons.ts +0 -64
- package/demo/elements/context-menu/index.html +0 -43
- package/demo/elements/context-menu/nested.html +0 -25
- package/demo/elements/context-menu/nestedt.ts +0 -152
- package/demo/elements/context-menu/no-execute.html +0 -25
- package/demo/elements/context-menu/no-execute.ts +0 -134
- package/demo/elements/context-menu/radio-menu.html +0 -25
- package/demo/elements/context-menu/radio-menu.ts +0 -83
- package/demo/elements/context-menu/separators.html +0 -25
- package/demo/elements/context-menu/separators.ts +0 -172
- package/demo/elements/currency/index.html +0 -91
- package/demo/elements/currency/index.ts +0 -352
- package/demo/elements/environment/environment-editor.html +0 -20
- package/demo/elements/environment/environment-editor.ts +0 -49
- package/demo/elements/environment/index.html +0 -33
- package/demo/elements/environment/server-editor.html +0 -20
- package/demo/elements/environment/server-editor.ts +0 -67
- package/demo/elements/environment/variables-editor.html +0 -20
- package/demo/elements/environment/variables-editor.ts +0 -94
- package/demo/elements/har/har-viewer.html +0 -20
- package/demo/elements/har/har-viewer.ts +0 -76
- package/demo/elements/har/har1.har +0 -3044
- package/demo/elements/har/har2.json +0 -439
- package/demo/elements/har/index.html +0 -26
- package/demo/elements/highlight/example.md +0 -27
- package/demo/elements/highlight/index.html +0 -31
- package/demo/elements/highlight/marked-highlight.html +0 -132
- package/demo/elements/highlight/marked-highlight.ts +0 -22
- package/demo/elements/highlight/prism-highlight.html +0 -62
- package/demo/elements/highlight/prism-highlight.ts +0 -17
- package/demo/elements/http/body-editor.html +0 -17
- package/demo/elements/http/body-editor.ts +0 -115
- package/demo/elements/http/headers.html +0 -17
- package/demo/elements/http/headers.ts +0 -59
- package/demo/elements/http/http-assertions.html +0 -20
- package/demo/elements/http/http-assertions.ts +0 -89
- package/demo/elements/http/http-flows.html +0 -23
- package/demo/elements/http/http-flows.ts +0 -89
- package/demo/elements/http/index.html +0 -45
- package/demo/elements/http/request-editor.html +0 -26
- package/demo/elements/http/request-editor.ts +0 -197
- package/demo/elements/http/request-log.html +0 -16
- package/demo/elements/http/request-log.ts +0 -136
- package/demo/elements/http/url-editing.html +0 -17
- package/demo/elements/http/url-editing.ts +0 -112
- package/demo/elements/icons/index.html +0 -81
- package/demo/elements/icons/index.ts +0 -52
- package/demo/elements/index.html +0 -72
- package/demo/elements/mention-textarea/index.html +0 -19
- package/demo/elements/mention-textarea/index.ts +0 -205
- package/demo/elements/navigation/navigation-item.html +0 -49
- package/demo/elements/navigation/navigation-item.ts +0 -131
- package/demo/elements/navigation/navigation.html +0 -20
- package/demo/elements/navigation/navigation.ts +0 -45
- package/demo/elements/project/index.html +0 -29
- package/demo/elements/project/project-run-report.html +0 -20
- package/demo/elements/project/project-run-report.ts +0 -132
- package/demo/elements/project/request-editor.html +0 -23
- package/demo/elements/project/request-editor.ts +0 -232
- package/demo/elements/user/user-avatar.html +0 -17
- package/demo/elements/user/user-avatar.ts +0 -60
- package/demo/env.js +0 -4
- package/demo/index.html +0 -34
- package/demo/layout/index.html +0 -94
- package/demo/layout/index.ts +0 -190
- package/demo/md/DemoStyles.ts +0 -61
- package/demo/md/UiDemoPage.ts +0 -6
- package/demo/md/buttons/button.html +0 -121
- package/demo/md/buttons/button.ts +0 -246
- package/demo/md/buttons/group.html +0 -36
- package/demo/md/buttons/group.ts +0 -171
- package/demo/md/checkbox/index.html +0 -39
- package/demo/md/checkbox/index.ts +0 -220
- package/demo/md/chip/chip.html +0 -70
- package/demo/md/chip/chip.ts +0 -219
- package/demo/md/chip/pawel6c9a.jpg +0 -0
- package/demo/md/collapse/CustomDetail.ts +0 -89
- package/demo/md/collapse/collapse.html +0 -21
- package/demo/md/collapse/collapse.ts +0 -78
- package/demo/md/date-picker/date-picker.ts +0 -336
- package/demo/md/date-picker/index.html +0 -171
- package/demo/md/dialog/confirm-dialog.html +0 -49
- package/demo/md/dialog/confirm-dialog.ts +0 -121
- package/demo/md/dialog/dialog.html +0 -25
- package/demo/md/dialog/dialog.ts +0 -468
- package/demo/md/dropdown-list/index.html +0 -31
- package/demo/md/dropdown-list/index.ts +0 -158
- package/demo/md/icon-button/index.html +0 -122
- package/demo/md/icon-button/index.ts +0 -132
- package/demo/md/index.html +0 -73
- package/demo/md/inputs/input.html +0 -73
- package/demo/md/inputs/input.ts +0 -278
- package/demo/md/inputs/radio.html +0 -39
- package/demo/md/inputs/radio.ts +0 -156
- package/demo/md/inputs/switch.html +0 -45
- package/demo/md/inputs/switch.ts +0 -144
- package/demo/md/list/list.html +0 -65
- package/demo/md/list/list.ts +0 -204
- package/demo/md/listbox/listbox.html +0 -31
- package/demo/md/listbox/listbox.ts +0 -27
- package/demo/md/menu/index.html +0 -19
- package/demo/md/menu/index.ts +0 -514
- package/demo/md/notification/snack.html +0 -21
- package/demo/md/notification/snack.ts +0 -70
- package/demo/md/progress/progress.html +0 -46
- package/demo/md/progress/progress.ts +0 -161
- package/demo/md/segmented-button/index.html +0 -21
- package/demo/md/segmented-button/index.ts +0 -55
- package/demo/md/select/index.html +0 -16
- package/demo/md/select/index.ts +0 -217
- package/demo/md/tabs/tabs.html +0 -40
- package/demo/md/tabs/tabs.ts +0 -214
- package/demo/oauth-popup.html +0 -36
- package/demo/page.css +0 -8
- package/demo/resources/calendar-month.png +0 -0
- package/demo/resources/favorite.png +0 -0
- package/demo/resources/fingerprint.png +0 -0
- package/demo/resources/home-work.png +0 -0
- package/demo/resources/mood.png +0 -0
- package/demo/resources/print.png +0 -0
- package/demo/resources/stars.png +0 -0
- package/demo/resources/theaters.png +0 -0
- package/demo/tsconfig.json +0 -4
- package/eslint.config.js +0 -97
- package/scripts/copy-assets.js +0 -21
- package/scripts/release.js +0 -66
- package/src/demo/DemoPage.ts +0 -169
- package/src/demo/DemoStyles.ts +0 -60
- package/test/README.md +0 -375
- package/test/contextual-menu/ContextMenu.test.ts +0 -760
- package/test/contextual-menu/ContextMenuElement.test.ts +0 -569
- package/test/core/activity.spec.ts +0 -413
- package/test/core/activity_manager.spec.ts +0 -544
- package/test/core/application.spec.ts +0 -218
- package/test/core/fragment.spec.ts +0 -565
- package/test/core/fragment_manager.spec.ts +0 -404
- package/test/core/live_data.spec.ts +0 -558
- package/test/core/renderer.spec.ts +0 -113
- package/test/dom-assertions.test.ts +0 -182
- package/test/elements/MonacoSetup.ts +0 -65
- package/test/elements/authorization/basic-method.test.ts +0 -177
- package/test/elements/authorization/bearer-method.test.ts +0 -143
- package/test/elements/authorization/ntlm-method.test.ts +0 -219
- package/test/elements/authorization/oauth2-client-credentials-method.test.ts +0 -334
- package/test/elements/authorization/oauth2-code-method.test.ts +0 -320
- package/test/elements/authorization/oauth2-custom-grant-method.test.ts +0 -255
- package/test/elements/authorization/oauth2-device-code-method.test.ts +0 -371
- package/test/elements/authorization/oauth2-implicit-method.test.ts +0 -407
- package/test/elements/authorization/oauth2-jwt-method.test.ts +0 -217
- package/test/elements/authorization/oauth2-password-method.test.ts +0 -275
- package/test/elements/authorization/openid-method.test.ts +0 -591
- package/test/elements/autocomplete/autocomplete-input.spec.ts +0 -646
- package/test/elements/code-editor/code-editor.accessibility.test.ts +0 -298
- package/test/elements/code-editor/code-editor.test.ts +0 -574
- package/test/elements/currency/CurrencyPicker.accessibility.test.ts +0 -328
- package/test/elements/currency/CurrencyPicker.core.test.ts +0 -318
- package/test/elements/currency/CurrencyPicker.integration.test.ts +0 -482
- package/test/elements/currency/CurrencyPicker.test.ts +0 -486
- package/test/elements/data-table/DataTable.browser.test.ts +0 -649
- package/test/elements/har/HarUtils.test.ts +0 -45
- package/test/elements/har/HarViewerElement.test.ts +0 -687
- package/test/elements/har/test-data/har1.har +0 -3044
- package/test/elements/highlight/MarkedHighlightElement.test.ts +0 -452
- package/test/elements/highlight/PrismHighlightElement.test.ts +0 -79
- package/test/elements/highlight/PrismHighlighter.test.ts +0 -94
- package/test/elements/highlight/remoteSanitization.md +0 -1
- package/test/elements/highlight/test.md +0 -3
- package/test/elements/highlight/test1.md +0 -3
- package/test/elements/highlight/test2.md +0 -1
- package/test/elements/http/BodyFormdataEditorElement.test.ts +0 -482
- package/test/elements/http/BodyMultipartEditorElement.test.ts +0 -658
- package/test/elements/http/BodyRawEditorElement.test.ts +0 -90
- package/test/elements/http/CertificateAdd.test.ts +0 -457
- package/test/elements/http/HttpAssertions.test.ts +0 -994
- package/test/elements/http/HttpFlows.test.ts +0 -502
- package/test/elements/http/UrlEncodeUtils.test.ts +0 -202
- package/test/elements/layout/SplitItem.test.ts +0 -440
- package/test/elements/layout/SplitLayoutManager.test.ts +0 -1501
- package/test/elements/layout/SplitPanel.test.ts +0 -1109
- package/test/elements/mention-textarea/MentionTextArea.basic.test.ts +0 -114
- package/test/elements/mention-textarea/MentionTextArea.test.ts +0 -613
- package/test/elements/navigation/Navigation.test.ts +0 -120
- package/test/env.ts +0 -15
- package/test/events/EventTypes.test.ts +0 -363
- package/test/events/EventsTestHelpers.ts +0 -16
- package/test/helpers/TestUtils.ts +0 -243
- package/test/helpers/UiMock.ts +0 -185
- package/test/lib/Dom.test.ts +0 -231
- package/test/md/button/UiButton.test.ts +0 -347
- package/test/md/button/UiIconButton.test.ts +0 -155
- package/test/md/chip/UiChip.test.ts +0 -219
- package/test/md/collapse/UiCollapse.test.ts +0 -250
- package/test/md/collapse/flex-layout.test.ts +0 -105
- package/test/md/date-time/DateTime.test.ts +0 -348
- package/test/md/dialog/UiConfirmDialog.test.ts +0 -131
- package/test/md/dialog/UiDialog.test.ts +0 -759
- package/test/md/menu/Menu.test.ts +0 -855
- package/test/md/menu/MenuIntegration.test.ts +0 -426
- package/test/md/menu/MenuItem.test.ts +0 -652
- package/test/md/menu/SubMenu.test.ts +0 -410
- package/test/md/progress/UiCircularProgressElement.test.ts +0 -481
- package/test/md/progress/UiProgressElement.test.ts +0 -117
- package/test/md/progress/UiRangeElement.test.ts +0 -156
- package/test/md/select/Select.test.ts +0 -925
- package/test/plugins/takeScreenshotPlugin.js +0 -35
- package/test/setup.test.ts +0 -217
- package/test/setup.ts +0 -117
- package/test/tsconfig.json +0 -7
- package/web-dev-server.config.js +0 -21
- package/web-test-runner.config.js +0 -90
package/package.json
CHANGED
package/.aiexclude
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description:
|
|
3
|
-
globs: *.ts,*.css,*html
|
|
4
|
-
alwaysApply: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
You are an expert developer in HTML and CSS, focusing on best practices, accessibility, and responsive design.
|
|
8
|
-
|
|
9
|
-
Key Principles
|
|
10
|
-
- Write semantic HTML to improve accessibility and SEO.
|
|
11
|
-
- Use CSS for styling, avoiding inline styles.
|
|
12
|
-
- Ensure responsive design using media queries and flexible layouts.
|
|
13
|
-
- Prioritize accessibility by using ARIA roles and attributes.
|
|
14
|
-
|
|
15
|
-
HTML
|
|
16
|
-
- Use semantic elements (e.g., <header>, <main>, <footer>, <article>, <section>).
|
|
17
|
-
- Use <button> for clickable elements, not <div> or <span>.
|
|
18
|
-
- Use <a> for links, ensuring href attribute is present.
|
|
19
|
-
- Use <img> with alt attribute for images.
|
|
20
|
-
- Use <form> for forms, with appropriate input types and labels.
|
|
21
|
-
- Avoid using deprecated elements (e.g., <font>, <center>).
|
|
22
|
-
|
|
23
|
-
CSS
|
|
24
|
-
- Use external stylesheets for CSS.
|
|
25
|
-
- Use class selectors over ID selectors for styling.
|
|
26
|
-
- Use Flexbox and Grid for layout.
|
|
27
|
-
- Use rem and em units for scalable and accessible typography.
|
|
28
|
-
- Use CSS variables for consistent theming.
|
|
29
|
-
- Use BEM (Block Element Modifier) methodology for naming classes.
|
|
30
|
-
- Avoid !important; use specificity to manage styles.
|
|
31
|
-
|
|
32
|
-
Responsive Design
|
|
33
|
-
- Use media queries to create responsive layouts.
|
|
34
|
-
- Use mobile-first approach for media queries.
|
|
35
|
-
- Ensure touch targets are large enough for touch devices.
|
|
36
|
-
- Use responsive images with srcset and sizes attributes.
|
|
37
|
-
- Use viewport meta tag for responsive scaling.
|
|
38
|
-
|
|
39
|
-
Accessibility
|
|
40
|
-
- Use ARIA roles and attributes to enhance accessibility.
|
|
41
|
-
- Ensure sufficient color contrast for text.
|
|
42
|
-
- Provide keyboard navigation for interactive elements.
|
|
43
|
-
- Use focus styles to indicate focus state.
|
|
44
|
-
- Use landmarks (e.g., <nav>, <main>, <aside>) for screen readers.
|
|
45
|
-
|
|
46
|
-
Performance
|
|
47
|
-
- Minimize CSS and HTML file sizes.
|
|
48
|
-
- Use CSS minification and compression.
|
|
49
|
-
- Avoid excessive use of animations and transitions.
|
|
50
|
-
- Use lazy loading for images and other media.
|
|
51
|
-
|
|
52
|
-
Testing
|
|
53
|
-
- Test HTML and CSS in multiple browsers and devices.
|
|
54
|
-
- Use tools like Lighthouse for performance and accessibility audits.
|
|
55
|
-
- Validate HTML and CSS using W3C validators.
|
|
56
|
-
|
|
57
|
-
Documentation
|
|
58
|
-
- Comment complex CSS rules and HTML structures.
|
|
59
|
-
- Use consistent naming conventions for classes and IDs.
|
|
60
|
-
- Document responsive breakpoints and design decisions.
|
|
61
|
-
|
|
62
|
-
Refer to MDN Web Docs for HTML and CSS best practices and to the W3C guidelines for accessibility standards.
|
|
63
|
-
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
globs: src/elements/**,src/md/**,src/styles/**,demo/**
|
|
3
|
-
alwaysApply: false
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are an expert developer in web components using the Lit library and Material Design version 3, focusing on best practices, accessibility, and responsive design.
|
|
7
|
-
|
|
8
|
-
Key Principles
|
|
9
|
-
|
|
10
|
-
- Comply with web elements authoring standards when designing a web component.
|
|
11
|
-
- Use accessibility best practices to produce semantically relevant web components.
|
|
12
|
-
- Prioritize web standards over custom implementation.
|
|
13
|
-
- Prioritize APIs that are passing the Web Platform Baseline
|
|
14
|
-
- Minimize external dependencies, but also balance between custom code and widely known and trusted dependencies.
|
|
15
|
-
- Everything must be ES compliant. Use the appropriate standards for module imports.
|
|
16
|
-
|
|
17
|
-
Lit Web Components
|
|
18
|
-
|
|
19
|
-
- Document public properties and public function for authors to understand what these properties and functions do.
|
|
20
|
-
- Ensure the appropriate aria roles are applied to each element.
|
|
21
|
-
- Document all events and their structure (for custom events).
|
|
22
|
-
- Prioritize well-known events (like change, select) over custom events.
|
|
23
|
-
- Provide examples of usage when producing component documentation.
|
|
24
|
-
- Prioritize native elements over custom elements whenever possible.
|
|
25
|
-
- Prioritize composition over attribute passed configuration (a dropdown should have a semantic HTML structure and not auto-generated structure from a complex configuration object).
|
|
26
|
-
- Think of other use-cases and how the custom element can scale for future use cases.
|
|
27
|
-
- Reuse existing components whenever possible.
|
|
28
|
-
- Prefer to put lifecycle methods after the constructor and before the render and other methods.
|
|
29
|
-
- Put render methods at the end of the class.
|
|
30
|
-
- Use `@property` decorator for public properties and `@state` decorator for private properties.
|
|
31
|
-
- Use `@query` decorator for querying elements in the shadow DOM.
|
|
32
|
-
- Use `@queryAssignedElements` decorator for querying slotted elements.
|
|
33
|
-
- Boolean properties should be initialized to `false` in the constructor.
|
|
34
|
-
- Use `@eventOptions` decorator to specify event options like `capture`, `passive`, and `once`.
|
|
35
|
-
- Use `@queryAsync` decorator for querying elements that may not be immediately available in the DOM.
|
|
36
|
-
- Use `@state` decorator for properties that are internal to the component and should not be exposed to the outside world.
|
|
37
|
-
- Avoid passing complex objects as properties. Instead, use simple types like `string`, `number`, or `boolean` and handle complex logic internally.
|
|
38
|
-
- Use lifecycle methods like `connectedCallback`, `disconnectedCallback`, and `update` to manage component state and behavior.
|
|
39
|
-
- Use `willUpdate` method to perform actions before the component updates, such as validating properties or preparing data.
|
|
40
|
-
- Place the component definition under the `internals/` directory of a component folder. The components registration should be done in the component file in the main component directory.
|
|
41
|
-
- Place the base material components under the `src/md/` directory.
|
|
42
|
-
- Place composite components under the `src/elements/` directory.
|
|
43
|
-
|
|
44
|
-
CSS and Styling
|
|
45
|
-
|
|
46
|
-
- Prioritize native CSS over JavaScript implementation. Use Web Platform Baseline even if the editor says it's not supported.
|
|
47
|
-
- Use anchoring and popover API whenever possible and applicable over JavaScript positioning.
|
|
48
|
-
- Place lit component styles in a separate file with the `.styles.ts` extension.
|
|
49
|
-
- Add styles to the component registration class, not the base class.
|
|
50
|
-
- Declare the `part` attributes to expose custom styling.
|
|
51
|
-
- When working on base components, use CSS variables to allow customization of the component styles.
|
|
52
|
-
- Define component states via the `internals.states.add("--state-name")` method. These states can be used as `component-name:state(state-name) {}` in the CSS.
|
|
53
|
-
|
|
54
|
-
Error handling
|
|
55
|
-
|
|
56
|
-
- Components either communicate errors through rendering them internally or dispatch an error event with the error details to the parent component or application.
|
|
57
|
-
- Prefer error states defined on the element internals over custom error styling.
|
|
58
|
-
|
|
59
|
-
Naming Convention
|
|
60
|
-
|
|
61
|
-
- Follow web authoring standards as closely as possible.
|
|
62
|
-
- Minimize the use of "-" in attribute and event names
|
|
63
|
-
- Use camelCase for properties and methods.
|
|
64
|
-
- Do not prefix private or protected properties and methods with an underscore. Use the typescript `private` and `protected` keywords to indicate visibility.
|
|
65
|
-
|
|
66
|
-
Testing
|
|
67
|
-
|
|
68
|
-
- Use @open-wc/testing library.
|
|
69
|
-
- Always add accessibility tests.
|
|
70
|
-
- Create fixtures for different states of a component.
|
|
71
|
-
- To run tests for a specific file, use the `--files` option in the test command. For example:
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
npm test -- --files=".tmp/test/**/[test file name].test.js"
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
- Prefer the Assert API over the Expect API for assertions. The Assert API is more performant and provides better error messages.
|
|
78
|
-
- When updating an element's property, await for the update to complete using `await element.updateComplete` before making assertions. This ensures that the component has fully rendered before checking its state.
|
|
79
|
-
|
|
80
|
-
Component Demoing
|
|
81
|
-
|
|
82
|
-
- Always produce a demo page under the demo/ directory.
|
|
83
|
-
- Use the `DemoPage` class to bootstrap the demo page.
|
|
84
|
-
- Use material styles with the demo page. Minimize custom styling.
|
|
85
|
-
- Try to render each state separately and minimize the use of complex configurations.
|
|
86
|
-
- Start with simple states and progressively enhance the demo with more complex configurations.
|
|
87
|
-
- If a component produces output, ensure that the demo page shows the output in a readable format. Use one output per component.
|
|
88
|
-
- Document the states in a way that is obvious to the user. Use headings and paragraphs to explain the states.
|
|
89
|
-
- Due to the nature how the demo pages are processed, ensure that typescript files that belong to the demo page are imported from the `/.tmp/demo/` directory. This is done automatically by the build process. Imports inside the typescript file should reference files from the `src/` folder directly.
|
package/.editorconfig
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# EditorConfig helps developers define and maintain consistent
|
|
2
|
-
# coding styles between different editors and IDEs
|
|
3
|
-
# editorconfig.org
|
|
4
|
-
|
|
5
|
-
root = true
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[*]
|
|
9
|
-
|
|
10
|
-
# Change these settings to your own preference
|
|
11
|
-
indent_style = space
|
|
12
|
-
indent_size = 2
|
|
13
|
-
|
|
14
|
-
# We recommend you to keep these unchanged
|
|
15
|
-
end_of_line = lf
|
|
16
|
-
charset = utf-8
|
|
17
|
-
trim_trailing_whitespace = true
|
|
18
|
-
insert_final_newline = true
|
|
19
|
-
|
|
20
|
-
[*.md]
|
|
21
|
-
trim_trailing_whitespace = false
|
|
22
|
-
|
|
23
|
-
[*.json]
|
|
24
|
-
indent_size = 2
|
|
25
|
-
|
|
26
|
-
[*.{html,js,md}]
|
|
27
|
-
block_comment_start = /**
|
|
28
|
-
block_comment = *
|
|
29
|
-
block_comment_end = */
|
package/.github/CONTRIBUTING.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Contributing to API Client
|
|
2
|
-
|
|
3
|
-
First of all, we are happy you want to contribute to API Client open source project. API Client is a community driven project and we are open to your input. Before you start lets clear some things first so your contribution is accepted without unnecessary delays.
|
|
4
|
-
|
|
5
|
-
## Start with an issue report
|
|
6
|
-
|
|
7
|
-
Before you start working on any code or architecture, please, report an issue in the corresponding repository. This is crucial for open projects so the community can take a part in the discussion. Also, the project is being developed so we can predict upcoming changes. This way we will also be able to direct you in the right direction, like telling you where you can find relevant code. See below for more information.
|
|
8
|
-
|
|
9
|
-
## Code the change
|
|
10
|
-
|
|
11
|
-
### Code and PR
|
|
12
|
-
|
|
13
|
-
After you have created an issue report and picked the right repository you now are enabled to code the change. After you finish **introduce relevant tests**. We can't accept PRs that contains an untested code. After that create a PR to the relevant repository. We will get back to you as soon as possible. Heel free to mention us directly in the PR so we will get a notification from GitHub.
|
|
14
|
-
|
|
15
|
-
### Things to consider
|
|
16
|
-
|
|
17
|
-
- Introduce changes that other users will benefit from
|
|
18
|
-
- Significant architecture changes make take longer to be accepted giving the complexity of the dependencies. API Client has a shared code with MuleSoft's API Console. We need to ensure the stability of both projects.
|
|
19
|
-
- Understand the reasons for the distributed architecture and honor the structure of the project. Most likely you want to introduce changes to the `core` repository. Less likely others.
|
|
20
|
-
- We are here to help. Ask us questions about the architecture or how stuff work.
|
|
21
|
-
|
|
22
|
-
------
|
|
23
|
-
|
|
24
|
-
That's it. We are thrilled seeing you contributing to the project. Drop us a message in case you have any questions.
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
applyTo: "*.ts,*.css,*html"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# HTML and CSS Best Practices
|
|
6
|
-
|
|
7
|
-
You are an expert developer in HTML and CSS, focusing on best practices, accessibility, and responsive design.
|
|
8
|
-
|
|
9
|
-
## Key Principles
|
|
10
|
-
|
|
11
|
-
- Write semantic HTML to improve accessibility and SEO.
|
|
12
|
-
- Use CSS for styling, avoiding inline styles.
|
|
13
|
-
- Ensure responsive design using media queries and flexible layouts.
|
|
14
|
-
- Prioritize accessibility by using ARIA roles and attributes.
|
|
15
|
-
|
|
16
|
-
## HTML
|
|
17
|
-
|
|
18
|
-
- Use semantic elements (e.g., <header>, <main>, <footer>, <article>, <section>).
|
|
19
|
-
- Use <button> for clickable elements, not <div> or <span>.
|
|
20
|
-
- Use <a> for links, ensuring href attribute is present.
|
|
21
|
-
- Use <img> with alt attribute for images.
|
|
22
|
-
- Use <form> for forms, with appropriate input types and labels.
|
|
23
|
-
- Avoid using deprecated elements (e.g., <font>, <center>).
|
|
24
|
-
|
|
25
|
-
## CSS
|
|
26
|
-
|
|
27
|
-
- Use external stylesheets for CSS.
|
|
28
|
-
- Use class selectors over ID selectors for styling.
|
|
29
|
-
- Use Flexbox and Grid for layout.
|
|
30
|
-
- Use rem and em units for scalable and accessible typography.
|
|
31
|
-
- Use CSS variables for consistent theming.
|
|
32
|
-
- Use BEM (Block Element Modifier) methodology for naming classes.
|
|
33
|
-
- Avoid !important; use specificity to manage styles.
|
|
34
|
-
|
|
35
|
-
## Responsive Design
|
|
36
|
-
|
|
37
|
-
- Use media queries to create responsive layouts.
|
|
38
|
-
- Use mobile-first approach for media queries.
|
|
39
|
-
- Ensure touch targets are large enough for touch devices.
|
|
40
|
-
- Use responsive images with srcset and sizes attributes.
|
|
41
|
-
- Use viewport meta tag for responsive scaling.
|
|
42
|
-
|
|
43
|
-
## Accessibility
|
|
44
|
-
|
|
45
|
-
- Use ARIA roles and attributes to enhance accessibility.
|
|
46
|
-
- Ensure sufficient color contrast for text.
|
|
47
|
-
- Provide keyboard navigation for interactive elements.
|
|
48
|
-
- Use focus styles to indicate focus state.
|
|
49
|
-
- Use landmarks (e.g., <nav>, <main>, <aside>) for screen readers.
|
|
50
|
-
|
|
51
|
-
## Performance
|
|
52
|
-
|
|
53
|
-
- Minimize CSS and HTML file sizes.
|
|
54
|
-
- Use CSS minification and compression.
|
|
55
|
-
- Avoid excessive use of animations and transitions.
|
|
56
|
-
- Use lazy loading for images and other media.
|
|
57
|
-
|
|
58
|
-
## Testing
|
|
59
|
-
|
|
60
|
-
- Test HTML and CSS in multiple browsers and devices.
|
|
61
|
-
- Use tools like Lighthouse for performance and accessibility audits.
|
|
62
|
-
- Validate HTML and CSS using W3C validators.
|
|
63
|
-
|
|
64
|
-
## Documentation
|
|
65
|
-
|
|
66
|
-
- Comment complex CSS rules and HTML structures.
|
|
67
|
-
- Use consistent naming conventions for classes and IDs.
|
|
68
|
-
- Document responsive breakpoints and design decisions.
|
|
69
|
-
|
|
70
|
-
Refer to MDN Web Docs for HTML and CSS best practices and to the W3C guidelines for accessibility standards.
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
applyTo: "src/{elements,md,styles}/**,demo/**"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Lit Element Best Practices
|
|
6
|
-
|
|
7
|
-
You are an expert developer in web components using the Lit library and Material Design version 3, focusing on best practices, accessibility, and responsive design.
|
|
8
|
-
|
|
9
|
-
## Key Principles
|
|
10
|
-
|
|
11
|
-
- Comply with web elements authoring standards when designing a web component.
|
|
12
|
-
- Use accessibility best practices to produce semantically relevant web components.
|
|
13
|
-
- Prioritize web standards over custom implementation.
|
|
14
|
-
- Prioritize APIs that are passing the Web Platform Baseline
|
|
15
|
-
- Minimize external dependencies, but also balance between custom code and widely known and trusted dependencies.
|
|
16
|
-
- Everything must be ES compliant. Use the appropriate standards for module imports.
|
|
17
|
-
|
|
18
|
-
## Lit Web Components
|
|
19
|
-
|
|
20
|
-
- Document public properties and public function for authors to understand what these properties and functions do.
|
|
21
|
-
- Ensure the appropriate aria roles are applied to each element.
|
|
22
|
-
- Document all events and their structure (for custom events).
|
|
23
|
-
- Prioritize well-known events (like change, select) over custom events.
|
|
24
|
-
- Provide examples of usage when producing component documentation.
|
|
25
|
-
- Prioritize native elements over custom elements whenever possible.
|
|
26
|
-
- Prioritize composition over attribute passed configuration (a dropdown should have a semantic HTML structure and not auto-generated structure from a complex configuration object).
|
|
27
|
-
- Think of other use-cases and how the custom element can scale for future use cases.
|
|
28
|
-
- Reuse existing components whenever possible.
|
|
29
|
-
- Prefer to put lifecycle methods after the constructor and before the render and other methods.
|
|
30
|
-
- Put render methods at the end of the class.
|
|
31
|
-
- Use `@property` decorator for public properties and `@state` decorator for private properties.
|
|
32
|
-
- Use `@query` decorator for querying elements in the shadow DOM.
|
|
33
|
-
- Use `@queryAssignedElements` decorator for querying slotted elements.
|
|
34
|
-
- Boolean properties should be initialized to `false` in the constructor.
|
|
35
|
-
- Use `@eventOptions` decorator to specify event options like `capture`, `passive`, and `once`.
|
|
36
|
-
- Use `@queryAsync` decorator for querying elements that may not be immediately available in the DOM.
|
|
37
|
-
- Use `@state` decorator for properties that are internal to the component and should not be exposed to the outside world.
|
|
38
|
-
- Avoid passing complex objects as properties. Instead, use simple types like `string`, `number`, or `boolean` and handle complex logic internally.
|
|
39
|
-
- Use lifecycle methods like `connectedCallback`, `disconnectedCallback`, and `update` to manage component state and behavior.
|
|
40
|
-
- Use `willUpdate` method to perform actions before the component updates, such as validating properties or preparing data.
|
|
41
|
-
- Place the component definition under the `internals/` directory of a component folder. The components registration should be done in the component file in the main component directory.
|
|
42
|
-
- Place the base material components under the `src/md/` directory.
|
|
43
|
-
- Place composite components under the `src/elements/` directory.
|
|
44
|
-
|
|
45
|
-
## CSS and Styling
|
|
46
|
-
|
|
47
|
-
- Prioritize native CSS over JavaScript implementation. Use Web Platform Baseline even if the editor says it's not supported.
|
|
48
|
-
- Use anchoring and popover API whenever possible and applicable over JavaScript positioning.
|
|
49
|
-
- Place lit component styles in a separate file with the `.styles.ts` extension.
|
|
50
|
-
- Add styles to the component registration class, not the base class.
|
|
51
|
-
- Declare the `part` attributes to expose custom styling.
|
|
52
|
-
- When working on base components, use CSS variables to allow customization of the component styles.
|
|
53
|
-
- Define component states via the `internals.states.add("--state-name")` method. These states can be used as `component-name:state(state-name) {}` in the CSS.
|
|
54
|
-
|
|
55
|
-
## Error handling
|
|
56
|
-
|
|
57
|
-
- Components either communicate errors through rendering them internally or dispatch an error event with the error details to the parent component or application.
|
|
58
|
-
- Prefer error states defined on the element internals over custom error styling.
|
|
59
|
-
|
|
60
|
-
## Naming Convention
|
|
61
|
-
|
|
62
|
-
- Follow web authoring standards as closely as possible.
|
|
63
|
-
- Minimize the the of "-" in attribute and event names
|
|
64
|
-
- Use camelCase for properties and methods.
|
|
65
|
-
- Do not prefix private or protected properties and methods with an underscore. Use the typescript `private` and `protected` keywords to indicate visibility.
|
|
66
|
-
|
|
67
|
-
## Testing
|
|
68
|
-
|
|
69
|
-
- Use @open-wc/testing library.
|
|
70
|
-
- Always add accessibility tests.
|
|
71
|
-
- Create fixtures for different states of a component.
|
|
72
|
-
- To run tests for a specific file, use the `--files` option in the test command. For example:
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
npm test -- --files=".tmp/test/**/[test file name].test.js"
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
- Prefer the Assert API over the Expect API for assertions. The Assert API is more performant and provides better error messages.
|
|
79
|
-
- When updating an element's property, await for the update to complete using `await element.updateComplete` before making assertions. This ensures that the component has fully rendered before checking its state.
|
|
80
|
-
|
|
81
|
-
## Component Demoing
|
|
82
|
-
|
|
83
|
-
- Always produce a demo page under the demo/ directory.
|
|
84
|
-
- Use the `DemoPage` class to bootstrap the demo page.
|
|
85
|
-
- Use material styles with the demo page. Minimize custom styling.
|
|
86
|
-
- Try to render each state separately and minimize the use of complex configurations.
|
|
87
|
-
- Start with simple states and progressively enhance the demo with more complex configurations.
|
|
88
|
-
- If a component produces output, ensure that the demo page shows the output in a readable format. Use one output per component.
|
|
89
|
-
- Document the states in a way that is obvious to the user. Use headings and paragraphs to explain the states.
|
|
90
|
-
- Due to the nature how the demo pages are processed, ensure that typescript files that belong to the demo page are imported from the `/.tmp/demo/` directory. This is done automatically by the build process. Imports inside the typescript file should reference files from the `src/` folder directly.
|
package/.github/release.yml
DELETED
package/.github/stale.yml
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Number of days of inactivity before an issue becomes stale
|
|
2
|
-
daysUntilStale: 45
|
|
3
|
-
# Number of days of inactivity before a stale issue is closed
|
|
4
|
-
daysUntilClose: 7
|
|
5
|
-
# Issues with these labels will never be considered stale
|
|
6
|
-
exemptLabels:
|
|
7
|
-
- bug
|
|
8
|
-
- fixme/bug
|
|
9
|
-
- fixme/security
|
|
10
|
-
- blocked
|
|
11
|
-
- needs-review
|
|
12
|
-
- roadmap
|
|
13
|
-
# Label to use when marking an issue as stale
|
|
14
|
-
staleLabel: stale
|
|
15
|
-
# Comment to post when marking an issue as stale. Set to `false` to disable
|
|
16
|
-
markComment: >
|
|
17
|
-
This issue has been automatically marked as stale because it has not had
|
|
18
|
-
recent activity and is not currently prioritized. It will be closed
|
|
19
|
-
in a week if no further activity occurs :)
|
|
20
|
-
# Comment to post when closing a stale issue. Set to `false` to disable
|
|
21
|
-
closeComment: >
|
|
22
|
-
If you still think this issue is relevant, please ping a maintainer or
|
|
23
|
-
leave a comment!
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
name: Auto Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
|
|
8
|
-
env:
|
|
9
|
-
FORCE_COLOR: 1
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
test:
|
|
13
|
-
name: Test
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
steps:
|
|
16
|
-
- name: Checkout code
|
|
17
|
-
uses: actions/checkout@v4
|
|
18
|
-
with:
|
|
19
|
-
fetch-depth: 0
|
|
20
|
-
|
|
21
|
-
- name: Setup Node.js
|
|
22
|
-
uses: actions/setup-node@v4
|
|
23
|
-
with:
|
|
24
|
-
node-version: 24
|
|
25
|
-
cache: 'npm'
|
|
26
|
-
|
|
27
|
-
- uses: google/wireit@setup-github-actions-caching/v2
|
|
28
|
-
|
|
29
|
-
- name: Install dependencies
|
|
30
|
-
run: npm ci
|
|
31
|
-
|
|
32
|
-
- name: Install playwright browsers
|
|
33
|
-
run: npx playwright install --with-deps
|
|
34
|
-
|
|
35
|
-
- name: Run tests
|
|
36
|
-
run: npm test
|
|
37
|
-
|
|
38
|
-
determine-release:
|
|
39
|
-
name: Determine Release Type
|
|
40
|
-
needs: test
|
|
41
|
-
runs-on: ubuntu-latest
|
|
42
|
-
outputs:
|
|
43
|
-
should-release: ${{ steps.release-check.outputs.should-release }}
|
|
44
|
-
release-type: ${{ steps.release-check.outputs.release-type }}
|
|
45
|
-
new-version: ${{ steps.release-check.outputs.new-version }}
|
|
46
|
-
steps:
|
|
47
|
-
- name: Checkout code
|
|
48
|
-
uses: actions/checkout@v4
|
|
49
|
-
with:
|
|
50
|
-
fetch-depth: 0
|
|
51
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
52
|
-
|
|
53
|
-
- name: Setup Node.js
|
|
54
|
-
uses: actions/setup-node@v4
|
|
55
|
-
with:
|
|
56
|
-
node-version: 24
|
|
57
|
-
cache: 'npm'
|
|
58
|
-
|
|
59
|
-
- name: Install dependencies
|
|
60
|
-
run: npm ci
|
|
61
|
-
|
|
62
|
-
- name: Determine release type
|
|
63
|
-
id: release-check
|
|
64
|
-
run: |
|
|
65
|
-
# Get the last tag
|
|
66
|
-
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
|
|
67
|
-
echo "Last tag: $LAST_TAG"
|
|
68
|
-
|
|
69
|
-
# Get commits since last tag
|
|
70
|
-
COMMITS=$(git log --pretty=format:"%s" ${LAST_TAG}..HEAD)
|
|
71
|
-
echo "Commits since last tag:"
|
|
72
|
-
echo "$COMMITS"
|
|
73
|
-
|
|
74
|
-
# Check if there are any commits to release
|
|
75
|
-
if [ -z "$COMMITS" ]; then
|
|
76
|
-
echo "No new commits since last tag"
|
|
77
|
-
echo "should-release=false" >> $GITHUB_OUTPUT
|
|
78
|
-
exit 0
|
|
79
|
-
fi
|
|
80
|
-
|
|
81
|
-
# Determine release type based on commit messages
|
|
82
|
-
RELEASE_TYPE="patch"
|
|
83
|
-
|
|
84
|
-
# Check for breaking changes
|
|
85
|
-
if echo "$COMMITS" | grep -q "BREAKING CHANGE" || echo "$COMMITS" | grep -q '!:'; then
|
|
86
|
-
RELEASE_TYPE="major"
|
|
87
|
-
# Check for new features
|
|
88
|
-
elif echo "$COMMITS" | grep -q "^feat"; then
|
|
89
|
-
RELEASE_TYPE="minor"
|
|
90
|
-
fi
|
|
91
|
-
|
|
92
|
-
echo "Release type: $RELEASE_TYPE"
|
|
93
|
-
|
|
94
|
-
# Calculate new version
|
|
95
|
-
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
|
96
|
-
echo "Current version: $CURRENT_VERSION"
|
|
97
|
-
|
|
98
|
-
# Use semver to calculate new version
|
|
99
|
-
NEW_VERSION=$(node -e "
|
|
100
|
-
const SemVer = require('@pawel-up/semver/classes/semver.js').default || require('@pawel-up/semver/classes/semver.js');
|
|
101
|
-
const ver = new SemVer('$CURRENT_VERSION');
|
|
102
|
-
ver.inc('$RELEASE_TYPE');
|
|
103
|
-
console.log(ver.format());
|
|
104
|
-
" CURRENT_VERSION="$CURRENT_VERSION" RELEASE_TYPE="$RELEASE_TYPE")
|
|
105
|
-
|
|
106
|
-
echo "New version: $NEW_VERSION"
|
|
107
|
-
|
|
108
|
-
echo "should-release=true" >> $GITHUB_OUTPUT
|
|
109
|
-
echo "release-type=$RELEASE_TYPE" >> $GITHUB_OUTPUT
|
|
110
|
-
echo "new-version=$NEW_VERSION" >> $GITHUB_OUTPUT
|
|
111
|
-
|
|
112
|
-
release:
|
|
113
|
-
name: Create Release
|
|
114
|
-
needs: [test, determine-release]
|
|
115
|
-
if: needs.determine-release.outputs.should-release == 'true'
|
|
116
|
-
runs-on: ubuntu-latest
|
|
117
|
-
permissions:
|
|
118
|
-
contents: write
|
|
119
|
-
issues: write
|
|
120
|
-
pull-requests: write
|
|
121
|
-
steps:
|
|
122
|
-
- name: Checkout code
|
|
123
|
-
uses: actions/checkout@v4
|
|
124
|
-
with:
|
|
125
|
-
fetch-depth: 0
|
|
126
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
127
|
-
|
|
128
|
-
- name: Setup Node.js
|
|
129
|
-
uses: actions/setup-node@v4
|
|
130
|
-
with:
|
|
131
|
-
node-version: 24
|
|
132
|
-
cache: 'npm'
|
|
133
|
-
registry-url: 'https://registry.npmjs.org'
|
|
134
|
-
|
|
135
|
-
- name: Install dependencies
|
|
136
|
-
run: npm ci
|
|
137
|
-
|
|
138
|
-
- name: Update version
|
|
139
|
-
run: |
|
|
140
|
-
# Update package.json version
|
|
141
|
-
NEW_VERSION="${{ needs.determine-release.outputs.new-version }}"
|
|
142
|
-
npm version $NEW_VERSION --no-git-tag-version
|
|
143
|
-
git add package.json
|
|
144
|
-
|
|
145
|
-
# Commit version bump
|
|
146
|
-
# git config --local user.email "action@github.com"
|
|
147
|
-
# git config --local user.name "GitHub Action"
|
|
148
|
-
# git add package.json
|
|
149
|
-
# git commit -m "chore: bump version to $NEW_VERSION"
|
|
150
|
-
# git push
|
|
151
|
-
|
|
152
|
-
- uses: qoomon/actions--create-commit@v1
|
|
153
|
-
id: commit
|
|
154
|
-
with:
|
|
155
|
-
message: "chore: bump version to ${{ needs.determine-release.outputs.new-version }}"
|
|
156
|
-
skip-empty: true
|
|
157
|
-
|
|
158
|
-
- run: git push
|
|
159
|
-
|
|
160
|
-
- name: Build
|
|
161
|
-
run: npm run build
|
|
162
|
-
|
|
163
|
-
- name: Generate changelog
|
|
164
|
-
id: changelog
|
|
165
|
-
run: |
|
|
166
|
-
echo "changelog<<EOF" >> $GITHUB_OUTPUT
|
|
167
|
-
npx conventional-changelog-cli@latest release --preset conventionalcommits --release-count 1 >> $GITHUB_OUTPUT
|
|
168
|
-
echo "EOF" >> $GITHUB_OUTPUT
|
|
169
|
-
|
|
170
|
-
- name: Create Release
|
|
171
|
-
uses: softprops/action-gh-release@v2
|
|
172
|
-
with:
|
|
173
|
-
tag_name: v${{ needs.determine-release.outputs.new-version }}
|
|
174
|
-
body: ${{ steps.changelog.outputs.changelog }}
|
|
175
|
-
draft: false
|
|
176
|
-
prerelease: false
|
|
177
|
-
generate_release_notes: false
|
|
178
|
-
|
|
179
|
-
- name: Publish to npm
|
|
180
|
-
run: npm publish --access public
|
|
181
|
-
env:
|
|
182
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|