@7365admin1/layer-common 3.2.2-staging.122 → 3.2.2-staging.124
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/assets/css/primitives.css +39 -0
- package/components/EntryPass/QrTemplatePreview.vue +27 -16
- package/components/Feedback/Form.vue +26 -12
- package/components/HygieneUpdateMoreAction.vue +44 -44
- package/components/IncidentReport/affectedEntities.vue +41 -20
- package/components/NumberSettingField.vue +9 -2
- package/components/Signature.vue +40 -34
- package/components/UnitPersonCard.vue +42 -13
- package/nuxt.config.ts +6 -1
- package/package.json +22 -1
- package/plugins/vuetify.ts +37 -1
- package/utils/materialSymbols.ts +363 -0
- package/.changeset/README.md +0 -8
- package/.changeset/camera-wall-gated-endpoint.md +0 -47
- package/.changeset/camera-wall-plain-english.md +0 -60
- package/.changeset/camera-wall-selection-and-guidance.md +0 -65
- package/.changeset/config.json +0 -11
- package/.changeset/dark-primary-contrast.md +0 -39
- package/.changeset/dashboard-dark-theme-contrast.md +0 -15
- package/.changeset/notification-preferences.md +0 -17
- package/.changeset/pm-sidebar-grouping-and-list-scaffold.md +0 -27
- package/.changeset/service-provider-invitation-actions.md +0 -28
- package/.editorconfig +0 -12
- package/.github/workflows/main.yml +0 -17
- package/.github/workflows/publish-staging.yml +0 -47
- package/.github/workflows/publish.yml +0 -39
- package/PUBLISHING.md +0 -269
- package/components/ScheduleTaskAreaFormDialog.vue +0 -141
- package/components/ScheduleTaskAreaUpdateMoreAction.vue +0 -104
- package/components/TableWithButton.vue +0 -94
- package/test/visitor-socket.test.mjs +0 -36
- package/tools/render-harness/README.md +0 -87
- package/tools/render-harness/baselines.json +0 -117
- package/tools/render-harness/harness-init.ps1 +0 -127
- package/tools/render-harness/probe.mjs +0 -229
- package/tools/render-harness/render-check.mjs +0 -306
- package/tools/render-harness/render-check.selftest.mjs +0 -129
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
"@7365admin1/layer-common": patch
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Rewrite the camera wall's detail panel for the people who read it, and stop
|
|
6
|
-
repeating the same sentence four times.
|
|
7
|
-
|
|
8
|
-
The panel under the tiles was written for a developer. On the live wall it
|
|
9
|
-
read:
|
|
10
|
-
|
|
11
|
-
> BBQ AREA
|
|
12
|
-
> The video page loaded, but this browser cannot confirm a picture is arriving.
|
|
13
|
-
> The player belongs to the video service and a browser cannot look inside it.
|
|
14
|
-
> Judge the tile by what you can see, and report a blank or frozen picture.
|
|
15
|
-
> ● Recorder responding Last picture this server received: none yet
|
|
16
|
-
> Firmware and device clock are not available: this recorder is reachable over
|
|
17
|
-
> video only.
|
|
18
|
-
|
|
19
|
-
Every one of those statements is true, and the screen was still wrong: it
|
|
20
|
-
explained cross-origin isolation to a guard, repeated the camera's name the
|
|
21
|
-
tile already showed, put a green light beside the words "none yet", and printed
|
|
22
|
-
the same reason on four capability cards in a row.
|
|
23
|
-
|
|
24
|
-
Changes, all copy and layout — **no behaviour, no capability gating and no
|
|
25
|
-
permission check is touched**:
|
|
26
|
-
|
|
27
|
-
- **The badge reads "Not confirmed"**, not "Not verified". "Not verified"
|
|
28
|
-
describes a check we failed to make; "Not confirmed" describes the picture,
|
|
29
|
-
which is the thing the reader cares about. Same claim, and the wall still
|
|
30
|
-
refuses to say "Live" until the video service reports a decoded frame.
|
|
31
|
-
- **The sentence behind it is now an instruction**: "This page cannot confirm
|
|
32
|
-
the picture is arriving, so check the tile yourself. If it is blank or frozen,
|
|
33
|
-
report the camera." Why the software cannot confirm it is our problem, and it
|
|
34
|
-
has been removed from the product.
|
|
35
|
-
- **The camera's name is no longer a heading of its own.** It is the subject of
|
|
36
|
-
the status line — "BBQ AREA · Recorder responding" — so a reader on a 3x3 wall
|
|
37
|
-
still knows which tile the panel describes, without a second caption under the
|
|
38
|
-
first one.
|
|
39
|
-
- **"Last picture" is drawn only when there has been one.** A green "Recorder
|
|
40
|
-
responding" beside "none yet" read as a contradiction. They were never in
|
|
41
|
-
conflict, but a screen that has to be explained is wrong. The tile's own
|
|
42
|
-
health line has always behaved this way; the panel now matches it.
|
|
43
|
-
- **The firmware-and-device-clock sentence is gone**, from the panel and from
|
|
44
|
-
the tile's tooltip. This screen never showed either value, so explaining their
|
|
45
|
-
absence gave the reader nothing to do. The server still sends
|
|
46
|
-
`detailUnavailableReason`; nothing draws it.
|
|
47
|
-
- **One reason for the group instead of four copies.** When every switched-off
|
|
48
|
-
control is off for the same reason, that reason and its next step are stated
|
|
49
|
-
once above the row and each card keeps only its title and its state. When the
|
|
50
|
-
reasons differ — "the recorder is unreachable" and "this camera cannot move"
|
|
51
|
-
are two problems with two different people to ask — the group note is refused
|
|
52
|
-
and each card carries its own again. New rule 7, in `camera-wall.ts`, with
|
|
53
|
-
four tests.
|
|
54
|
-
- Shorter next-step and no-signal wording, and a subject on the recorder's
|
|
55
|
-
status labels ("Recorder not checked yet" rather than "Health not checked
|
|
56
|
-
yet").
|
|
57
|
-
|
|
58
|
-
Rules 3 and 6 are intact: the server's own sentence is still shown verbatim and
|
|
59
|
-
never rewritten, and the recorder's state is still a separate fact from the
|
|
60
|
-
tile's badge.
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
"@7365admin1/layer-common": patch
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Mark the selected camera on the wall, and stop telling the reader to raise a
|
|
6
|
-
ticket without saying what for.
|
|
7
|
-
|
|
8
|
-
Two things the owner found on the live wall after the last copy pass. Both are
|
|
9
|
-
copy and presentation only — **no behaviour, no capability gating, no permission
|
|
10
|
-
check and no request is changed.**
|
|
11
|
-
|
|
12
|
-
**1. The camera's name was still printed twice.**
|
|
13
|
-
|
|
14
|
-
The tile said `BBQ AREA` and the panel underneath said it again. The last pass
|
|
15
|
-
merged the panel's heading into its status line, which changed the layout and
|
|
16
|
-
left the repetition exactly where it was.
|
|
17
|
-
|
|
18
|
-
The name was there to answer "which of these nine tiles is this panel about?".
|
|
19
|
-
That is a real question and a name is the wrong answer to it — it makes the
|
|
20
|
-
reader scan the wall for a matching caption. So:
|
|
21
|
-
|
|
22
|
-
- **the selected tile is now visibly selected**: a 3 px accent ring with a scrim
|
|
23
|
-
hairline inside it, so the ring holds against a bright picture as well as a
|
|
24
|
-
dark one, plus the accent underline on the name chip that the toolbar already
|
|
25
|
-
uses to mark a selected tool. Both read at 1x1, 2x2 and 3x3;
|
|
26
|
-
- **the camera's name is removed from the panel entirely**. The panel opens on
|
|
27
|
-
the recorder's state — "● Recorder responding";
|
|
28
|
-
- `aria-current` marks the same tile for anyone not looking at the ring.
|
|
29
|
-
|
|
30
|
-
The highlight had never worked in the most common case, which is why the name
|
|
31
|
-
was load-bearing: it was bound to the raw clicked id, and before anyone clicks —
|
|
32
|
-
or after paging — nothing on the wall was marked while the panel was already
|
|
33
|
-
describing the first tile. It is now bound to the tile the panel actually
|
|
34
|
-
resolves to, so the two can never disagree.
|
|
35
|
-
|
|
36
|
-
**The panel can never be about a tile that is off screen**, so it never needs to
|
|
37
|
-
name one: the focused camera is resolved out of the current PAGE, so paging away
|
|
38
|
-
from a selection re-resolves to the first tile of the page in front of you and
|
|
39
|
-
the ring follows. Paging back restores the original selection. Extracted as
|
|
40
|
-
`focusedCamera()` in `camera-wall.ts` with four tests, including the 5-cameras
|
|
41
|
-
-across-2-pages case.
|
|
42
|
-
|
|
43
|
-
**2. "Ask your Seven365 administrator" was a dead end.**
|
|
44
|
-
|
|
45
|
-
It was the whole of the advice under every switched-off control, and it tells
|
|
46
|
-
the administrator nothing and a property manager only to go and wait. The screen
|
|
47
|
-
never said what the request should ask for.
|
|
48
|
-
|
|
49
|
-
The advice now names the two changes that are actually missing, because they are
|
|
50
|
-
two different jobs for two different people: **the site's network has to let our
|
|
51
|
-
server reach the camera recorder**, and **that recorder then has to be added to
|
|
52
|
-
the server's configuration**. Both are stated in plain words, with who arranges
|
|
53
|
-
them, and with the fact that neither is switchable from this page.
|
|
54
|
-
|
|
55
|
-
No environment variable name appears in any of it — those belong in
|
|
56
|
-
`iservice365-core/docs/camera-integration-config.md`, not on a property
|
|
57
|
-
manager's screen — and there is a test that keeps it that way. The other reason
|
|
58
|
-
codes (`device-http-disabled`, `device-http-unreachable`, `device-http-locked-out`,
|
|
59
|
-
`control-not-enabled`, `no-recorder-configured`, and the unknown-code fallback)
|
|
60
|
-
get the same treatment; the Site Settings ones already said what to do and are
|
|
61
|
-
unchanged.
|
|
62
|
-
|
|
63
|
-
The truthful-status rules are untouched: the wall still refuses to say "Live"
|
|
64
|
-
until the video service reports a decoded frame, and the recorder's state is
|
|
65
|
-
still a separate fact from the tile's badge.
|
package/.changeset/config.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://unpkg.com/@changesets/config@3.0.5/schema.json",
|
|
3
|
-
"changelog": "@changesets/cli/changelog",
|
|
4
|
-
"commit": false,
|
|
5
|
-
"fixed": [],
|
|
6
|
-
"linked": [],
|
|
7
|
-
"access": "public",
|
|
8
|
-
"baseBranch": "main",
|
|
9
|
-
"updateInternalDependencies": "patch",
|
|
10
|
-
"ignore": []
|
|
11
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
"@7365admin1/layer-common": patch
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Split the dark theme's `primary` into a foreground colour and a fill, so text
|
|
6
|
-
using it is readable again.
|
|
7
|
-
|
|
8
|
-
Dark `primary` was set to the brand navy `#17506F` so the navigation drawer
|
|
9
|
-
would read as a surface. That is the right value for a fill — a white label on
|
|
10
|
-
it measures 8.70:1 — but Vuetify emits `.text-primary` from the same token, so
|
|
11
|
-
every `class="text-primary"` sentence and every `color="primary"` icon, spinner
|
|
12
|
-
and text button rendered navy on a dark background:
|
|
13
|
-
|
|
14
|
-
| | before | now |
|
|
15
|
-
|---|---|---|
|
|
16
|
-
| `primary` as text on the dark page `#0E1319` | 2.14:1 | **6.40:1** |
|
|
17
|
-
| `primary` as text on a dark card `#1B242F` | 1.80:1 | **5.38:1** |
|
|
18
|
-
| `primary` as text on `surface-bright` `#26313E`| 1.52:1 | **4.53:1** |
|
|
19
|
-
|
|
20
|
-
Dark `primary` is now `#5B9BE0`. That is not a new colour: it is the blue the
|
|
21
|
-
camera wall already draws its accents in (`--vms-accent`), so the two dark
|
|
22
|
-
surfaces in this product agree on one blue.
|
|
23
|
-
|
|
24
|
-
The navigation drawer no longer depends on `primary`. Both themes gain a
|
|
25
|
-
`brand-surface` colour — `#042134` light (identical to light `primary`, so
|
|
26
|
-
light mode renders exactly as before) and `#17506F` dark — and
|
|
27
|
-
`Layout/NavigationDrawer.vue` is painted with it. Its white label still reads
|
|
28
|
-
16.51:1 light and 8.70:1 dark. `floating` was dropped from the drawer so it
|
|
29
|
-
draws its own edge: the fill is 2.14:1 against the dark page, under the 3:1 a
|
|
30
|
-
boundary wants, and the border at `border-opacity` 0.35 is 3.22:1.
|
|
31
|
-
|
|
32
|
-
Where `primary` is still used as a fill, Vuetify derives `on-primary` from it
|
|
33
|
-
and picks black, which reads at 7.21:1. What a light `primary` cannot carry is
|
|
34
|
-
a hardcoded white label, and a handful of app-side sites still set one — see
|
|
35
|
-
the pull request for the list.
|
|
36
|
-
|
|
37
|
-
The light theme is unchanged. The colours moved to `utils/theme.ts` and
|
|
38
|
-
`utils/theme.test.ts` now measures them, so a token cannot be moved for one use
|
|
39
|
-
and quietly broken for the other again.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
"@7365admin1/layer-common": patch
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Dashboard and filled-primary surfaces now follow the theme in dark mode.
|
|
6
|
-
|
|
7
|
-
- `DashboardMain` painted its panels, list rows and text with fixed hex values,
|
|
8
|
-
so the ACTIVE PATROL / STAFF STATUS / Feedbacks cards rendered white on the
|
|
9
|
-
dark page and the heading and KPI figures were dark grey on near-black
|
|
10
|
-
(1.19:1). They now use the theme's surface and foreground tokens.
|
|
11
|
-
- `DARK_THEME` had no `on-primary`, so Vuetify derived white for every filled
|
|
12
|
-
`primary` button, chip, alert, tab bar and snackbar - 2.91:1. It is now set
|
|
13
|
-
explicitly and measures 6.40:1.
|
|
14
|
-
|
|
15
|
-
The print / PDF / Word export styles are unchanged and stay ink-on-white.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
"@7365admin1/layer-common": patch
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Add a Notification Settings screen, shared by every web app.
|
|
6
|
-
|
|
7
|
-
A person can now choose, per module and per delivery route, what they hear
|
|
8
|
-
about: in the app, on their phone, or by email. The screen only lists modules
|
|
9
|
-
their role actually gives them, and a route a module cannot use is shown dimmed
|
|
10
|
-
with the reason in plain words rather than hidden.
|
|
11
|
-
|
|
12
|
-
Modules are collapsed by default with a one-line summary of what is on, so
|
|
13
|
-
somebody with many modules gets a short list instead of thirty switches. There
|
|
14
|
-
is a master control for everything and one per module.
|
|
15
|
-
|
|
16
|
-
The choices are enforced where notifications are sent, in `@7365admin1/core` and
|
|
17
|
-
in the API, so a switch here actually stops the message.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
"@7365admin1/layer-common": patch
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Group the sidebar's sections and give the list screens the design's page
|
|
6
|
-
scaffold.
|
|
7
|
-
|
|
8
|
-
- `withSections()` walked each application's menu in the order it was given and
|
|
9
|
-
printed a heading whenever the section changed, so Property Management drew
|
|
10
|
-
SERVICE DESK, PROPERTY and SECURITY OPERATIONS **twice each**. Items are now
|
|
11
|
-
grouped under one heading per section, in the order the design lists them,
|
|
12
|
-
with the application's own order kept inside each section. No menu item is
|
|
13
|
-
added, hidden, renamed, re-routed or re-gated.
|
|
14
|
-
- `ServiceProviderMain`, `FeedbackMain`, `InvitationMain` and `WorkOrder/Main`
|
|
15
|
-
had no page title, put their primary action top-left, floated the search
|
|
16
|
-
outside the card, and stacked the refresh/pager on a bar above the tabs. They
|
|
17
|
-
now use `PageHeader` / `AppCard` / `CardToolbar` / `AppButton` / `AppField`:
|
|
18
|
-
a 22px title with the action on the right, then one in-card row with the tabs
|
|
19
|
-
on the left and search, count and pager on the right.
|
|
20
|
-
- `SwitchContext` and the rail's application name print in full instead of
|
|
21
|
-
truncating to "Seventh Cond…" / "Property Managem…".
|
|
22
|
-
- The security dashboard's `ACTIVE PATROL` / `STAFF STATUS` panel headings are
|
|
23
|
-
written the way the design writes them, matching their sibling panels.
|
|
24
|
-
|
|
25
|
-
Placement and wording only: the same buttons open the same dialogs under the
|
|
26
|
-
same permissions, the same tabs load the same lists, and the tables, columns,
|
|
27
|
-
filters and row menus are untouched.
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
"@7365admin1/layer-common": minor
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Make the Pending tab's invitation actions reachable, and say which state an invitation is really in
|
|
6
|
-
|
|
7
|
-
The row menu in the service-provider list was drawn only for provider rows, so a
|
|
8
|
-
pending invitation offered no actions at all — including the cancel that was
|
|
9
|
-
already wired up behind it. Invitation rows now carry Cancel, Resend and Delete,
|
|
10
|
-
each behind a confirmation that names the company and the site, and Resend is
|
|
11
|
-
disabled with the reason while Seven365 has not approved the invitation yet.
|
|
12
|
-
|
|
13
|
-
Every invitation also used to read "Pending" whatever had happened to it. Rows
|
|
14
|
-
now show the state they are actually in — Waiting for Seven365, Waiting for the
|
|
15
|
-
provider, Not approved, Declined, Cancelled, Expired — in those words, with
|
|
16
|
-
Seven365's reason shown underneath a rejected one.
|
|
17
|
-
|
|
18
|
-
Also here: a new ServiceProviderInvitationPrompt, which is how an existing
|
|
19
|
-
provider answers an invitation from inside the app they already use, with no
|
|
20
|
-
sign-up and no one-time code.
|
|
21
|
-
|
|
22
|
-
Three contrast fixes found while rendering these screens: the list's tab strip
|
|
23
|
-
was a hardcoded light grey that turned into a white slab in dark mode and took
|
|
24
|
-
the tab labels with it; the service type column read the raw stored slug
|
|
25
|
-
("security_agency") instead of "Security"; and `on-warning`, `on-info` and
|
|
26
|
-
dark's `on-error` are now set explicitly, because Vuetify derives white for them
|
|
27
|
-
and that measures 2.37:1, 3.12:1 and 3.60:1 on those fills — every filled
|
|
28
|
-
warning, info and error chip, alert and button in the product.
|
package/.editorconfig
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- "**"
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
build:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v4
|
|
12
|
-
- uses: actions/setup-node@v4
|
|
13
|
-
with:
|
|
14
|
-
node-version: 20.x
|
|
15
|
-
cache: "yarn"
|
|
16
|
-
- run: yarn install --frozen-lockfile && yarn dev:prepare
|
|
17
|
-
- run: yarn build
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
name: Publish Staging
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- staging
|
|
6
|
-
|
|
7
|
-
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
publish:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v4
|
|
14
|
-
|
|
15
|
-
- uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
node-version: 20.x
|
|
18
|
-
cache: "yarn"
|
|
19
|
-
cache-dependency-path: yarn.lock
|
|
20
|
-
|
|
21
|
-
- run: yarn install --immutable
|
|
22
|
-
|
|
23
|
-
- run: yarn build
|
|
24
|
-
|
|
25
|
-
- name: Create .npmrc for publishing
|
|
26
|
-
run: |
|
|
27
|
-
echo '//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}' > ~/.npmrc
|
|
28
|
-
|
|
29
|
-
- name: Set staging prerelease version
|
|
30
|
-
run: |
|
|
31
|
-
BASE=$(node -p "const [x,y,z]=require('./package.json').version.split('-')[0].split('.'); [x,y,+z+1].join('.')")
|
|
32
|
-
npm version "$BASE-staging.${{ github.run_number }}" --no-git-tag-version
|
|
33
|
-
node -p "'Publishing ' + require('./package.json').version"
|
|
34
|
-
|
|
35
|
-
- name: Publish to npm with staging tag
|
|
36
|
-
run: npm publish --tag staging --registry https://registry.npmjs.org
|
|
37
|
-
|
|
38
|
-
- name: Notify Discord on failure
|
|
39
|
-
if: failure()
|
|
40
|
-
env:
|
|
41
|
-
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
42
|
-
run: |
|
|
43
|
-
MESSAGE="@everyone :rotating_light: **Publish Staging** failed in \`${{ github.repository }}\` (\`${{ github.workflow }}\`)
|
|
44
|
-
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
45
|
-
curl -s -X POST -H "Content-Type: application/json" \
|
|
46
|
-
-d "$(jq -n --arg content "$MESSAGE" '{content: $content}')" \
|
|
47
|
-
"$DISCORD_WEBHOOK_URL"
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
name: Publish
|
|
2
|
-
on:
|
|
3
|
-
workflow_run:
|
|
4
|
-
workflows: [CI]
|
|
5
|
-
branches: [main]
|
|
6
|
-
types: [completed]
|
|
7
|
-
|
|
8
|
-
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
-
|
|
10
|
-
permissions:
|
|
11
|
-
contents: write
|
|
12
|
-
pull-requests: write
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
publish:
|
|
16
|
-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
17
|
-
runs-on: ubuntu-latest
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v4
|
|
20
|
-
|
|
21
|
-
- uses: actions/setup-node@v4
|
|
22
|
-
with:
|
|
23
|
-
node-version: 20.x
|
|
24
|
-
cache: "yarn" # Use yarn for caching
|
|
25
|
-
cache-dependency-path: yarn.lock # Cache Yarn lockfile
|
|
26
|
-
|
|
27
|
-
- run: yarn install --immutable # Install dependencies with immutable lockfile
|
|
28
|
-
|
|
29
|
-
- name: Create .npmrc for publishing
|
|
30
|
-
run: |
|
|
31
|
-
echo '//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}' > ~/.npmrc
|
|
32
|
-
|
|
33
|
-
- name: Create Release Pull Request or Publish
|
|
34
|
-
id: changesets
|
|
35
|
-
uses: changesets/action@v1
|
|
36
|
-
with:
|
|
37
|
-
publish: yarn release # Use yarn for publishing
|
|
38
|
-
env:
|
|
39
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
package/PUBLISHING.md
DELETED
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
# Publishing Guide
|
|
2
|
-
|
|
3
|
-
This document explains how to publish new versions of `@7365admin1/layer-common` to npm using changesets and GitHub Actions.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
The package uses an automated publishing workflow powered by [Changesets](https://github.com/changesets/changesets) and GitHub Actions. When you make changes and create a changeset, the workflow automatically:
|
|
8
|
-
|
|
9
|
-
1. Creates a "Version Packages" PR with version bumps
|
|
10
|
-
2. Publishes to npm when you merge that PR
|
|
11
|
-
|
|
12
|
-
## Quick Start
|
|
13
|
-
|
|
14
|
-
### 1. Make Your Changes
|
|
15
|
-
|
|
16
|
-
Make your code changes in a new branch as usual.
|
|
17
|
-
|
|
18
|
-
### 2. Create a Changeset
|
|
19
|
-
|
|
20
|
-
Before committing, create a changeset to document your changes:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npx changeset
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
You'll be prompted to:
|
|
27
|
-
- Select the type of change: `patch`, `minor`, or `major`
|
|
28
|
-
- Write a summary of your changes
|
|
29
|
-
|
|
30
|
-
This creates a `.changeset/[random-name].md` file.
|
|
31
|
-
|
|
32
|
-
### 3. Commit and Push
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
git add .
|
|
36
|
-
git commit -m "feat: your feature description"
|
|
37
|
-
git push
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### 4. Create a Pull Request
|
|
41
|
-
|
|
42
|
-
Create a PR to merge your branch into `main`.
|
|
43
|
-
|
|
44
|
-
### 5. Merge Your PR
|
|
45
|
-
|
|
46
|
-
Once approved, merge your PR to `main`.
|
|
47
|
-
|
|
48
|
-
### 6. Bot Creates Version PR (Automatic)
|
|
49
|
-
|
|
50
|
-
After merging, the GitHub Actions bot will automatically:
|
|
51
|
-
- Detect your changeset
|
|
52
|
-
- Create a new PR titled "Version Packages"
|
|
53
|
-
- Update `package.json` with the new version
|
|
54
|
-
- Update `CHANGELOG.md`
|
|
55
|
-
- Remove the changeset file
|
|
56
|
-
|
|
57
|
-
### 7. Merge the Version PR
|
|
58
|
-
|
|
59
|
-
Review and merge the "Version Packages" PR. This will:
|
|
60
|
-
- Bump the version in `package.json`
|
|
61
|
-
- Automatically publish to npm 🚀
|
|
62
|
-
|
|
63
|
-
## Workflow Diagram
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
You: Make changes + create changeset
|
|
67
|
-
↓
|
|
68
|
-
You: Push and create PR
|
|
69
|
-
↓
|
|
70
|
-
You: Merge PR to main
|
|
71
|
-
↓
|
|
72
|
-
Bot: Creates "Version Packages" PR (automatic)
|
|
73
|
-
↓
|
|
74
|
-
You: Merge "Version Packages" PR
|
|
75
|
-
↓
|
|
76
|
-
Bot: Publishes to npm (automatic)
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Version Types
|
|
80
|
-
|
|
81
|
-
When creating a changeset, you'll choose a version bump type:
|
|
82
|
-
|
|
83
|
-
- **patch** (1.8.0 → 1.8.1): Bug fixes, minor changes
|
|
84
|
-
- **minor** (1.8.0 → 1.9.0): New features, backward compatible
|
|
85
|
-
- **major** (1.8.0 → 2.0.0): Breaking changes
|
|
86
|
-
|
|
87
|
-
## Common Commands
|
|
88
|
-
|
|
89
|
-
### Create a Changeset
|
|
90
|
-
```bash
|
|
91
|
-
npx changeset
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Create an Empty Changeset
|
|
95
|
-
```bash
|
|
96
|
-
npx changeset add --empty
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### Check Which Packages Would Be Published
|
|
100
|
-
```bash
|
|
101
|
-
npx changeset status
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Manually Version (Local Testing Only)
|
|
105
|
-
```bash
|
|
106
|
-
npx changeset version
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Manually Publish (Not Recommended)
|
|
110
|
-
```bash
|
|
111
|
-
yarn run release
|
|
112
|
-
```
|
|
113
|
-
> ⚠️ **Note**: Manual publishing requires 2FA or an automation token. Use GitHub Actions instead.
|
|
114
|
-
|
|
115
|
-
## GitHub Setup
|
|
116
|
-
|
|
117
|
-
### Required Secrets
|
|
118
|
-
|
|
119
|
-
The repository needs the following GitHub secret:
|
|
120
|
-
|
|
121
|
-
**`NPM_TOKEN`**
|
|
122
|
-
- Location: Settings → Secrets and variables → Actions
|
|
123
|
-
- Type: Granular Access Token (Automation)
|
|
124
|
-
- Value: Your npm automation token
|
|
125
|
-
- Permissions: Read and Write for packages, with 2FA bypass enabled
|
|
126
|
-
|
|
127
|
-
### Workflow Files
|
|
128
|
-
|
|
129
|
-
- `.github/workflows/main.yml` - CI workflow (builds and tests)
|
|
130
|
-
- `.github/workflows/publish.yml` - Publish workflow (creates PRs and publishes)
|
|
131
|
-
|
|
132
|
-
## Configuration Files
|
|
133
|
-
|
|
134
|
-
### `.changeset/config.json`
|
|
135
|
-
|
|
136
|
-
```json
|
|
137
|
-
{
|
|
138
|
-
"$schema": "https://unpkg.com/@changesets/config@3.0.5/schema.json",
|
|
139
|
-
"changelog": "@changesets/cli/changelog",
|
|
140
|
-
"commit": false,
|
|
141
|
-
"access": "public",
|
|
142
|
-
"baseBranch": "main"
|
|
143
|
-
}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
Key settings:
|
|
147
|
-
- `"access": "public"` - Package is published as public (free)
|
|
148
|
-
- `"baseBranch": "main"` - PRs are created against main
|
|
149
|
-
|
|
150
|
-
### `package.json`
|
|
151
|
-
|
|
152
|
-
```json
|
|
153
|
-
{
|
|
154
|
-
"name": "@7365admin1/layer-common",
|
|
155
|
-
"version": "1.8.1",
|
|
156
|
-
"author": "7365admin1",
|
|
157
|
-
"publishConfig": {
|
|
158
|
-
"access": "public"
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
Key settings:
|
|
164
|
-
- `"publishConfig.access": "public"` - Ensures scoped package is public
|
|
165
|
-
|
|
166
|
-
## Troubleshooting
|
|
167
|
-
|
|
168
|
-
### "Version didn't update on npm"
|
|
169
|
-
|
|
170
|
-
**Solution**: Make sure you merged the bot's "Version Packages" PR. The version only publishes after merging that PR, not your original PR.
|
|
171
|
-
|
|
172
|
-
### "No Version Packages PR was created"
|
|
173
|
-
|
|
174
|
-
**Possible causes**:
|
|
175
|
-
1. No changeset file was committed
|
|
176
|
-
2. CI workflow failed
|
|
177
|
-
3. Check GitHub Actions logs for errors
|
|
178
|
-
|
|
179
|
-
**Solution**: Run `npx changeset status` locally to verify changesets exist.
|
|
180
|
-
|
|
181
|
-
### "402 Payment Required" Error
|
|
182
|
-
|
|
183
|
-
**Cause**: Scoped packages (`@username/package`) are private by default and require payment.
|
|
184
|
-
|
|
185
|
-
**Solution**: Ensure `publishConfig.access` is set to `"public"` in `package.json`.
|
|
186
|
-
|
|
187
|
-
### "403 Forbidden" or "401 Unauthorized"
|
|
188
|
-
|
|
189
|
-
**Cause**: Invalid or expired npm token.
|
|
190
|
-
|
|
191
|
-
**Solution**:
|
|
192
|
-
1. Generate a new Granular Access Token (Automation type) on npmjs.com
|
|
193
|
-
2. Update the `NPM_TOKEN` secret in GitHub
|
|
194
|
-
3. Ensure token has "Bypass 2FA" enabled
|
|
195
|
-
|
|
196
|
-
### "Changeset not found" Error
|
|
197
|
-
|
|
198
|
-
**Cause**: Changeset file wasn't committed or was deleted.
|
|
199
|
-
|
|
200
|
-
**Solution**: Run `npx changeset` again and commit the generated `.changeset/*.md` file.
|
|
201
|
-
|
|
202
|
-
## Best Practices
|
|
203
|
-
|
|
204
|
-
### 1. Always Create Changesets
|
|
205
|
-
|
|
206
|
-
Never merge code changes without a changeset. It ensures:
|
|
207
|
-
- Version tracking
|
|
208
|
-
- Changelog updates
|
|
209
|
-
- Proper npm publishing
|
|
210
|
-
|
|
211
|
-
### 2. Write Clear Changeset Summaries
|
|
212
|
-
|
|
213
|
-
Your changeset summary becomes the changelog entry. Make it:
|
|
214
|
-
- Clear and concise
|
|
215
|
-
- User-focused (what changed, not how)
|
|
216
|
-
- Action-oriented (e.g., "Added X feature" not "Adding X feature")
|
|
217
|
-
|
|
218
|
-
### 3. Don't Skip the Version PR
|
|
219
|
-
|
|
220
|
-
Always review and merge the "Version Packages" PR. It shows exactly what will be published.
|
|
221
|
-
|
|
222
|
-
### 4. Use Yarn for Local Development
|
|
223
|
-
|
|
224
|
-
The project uses Yarn for dependency management:
|
|
225
|
-
|
|
226
|
-
```bash
|
|
227
|
-
yarn install
|
|
228
|
-
yarn dev
|
|
229
|
-
yarn build
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
### 5. Keep `.npmrc` Private
|
|
233
|
-
|
|
234
|
-
The `.npmrc` file contains your authentication token. It's in `.gitignore` - **never commit it!**
|
|
235
|
-
|
|
236
|
-
## Security
|
|
237
|
-
|
|
238
|
-
### npm Authentication
|
|
239
|
-
|
|
240
|
-
- **GitHub Actions**: Uses `NPM_TOKEN` secret (automation token)
|
|
241
|
-
- **Local Publishing**: Uses `.npmrc` file (not committed to git)
|
|
242
|
-
|
|
243
|
-
### Token Types
|
|
244
|
-
|
|
245
|
-
- **Automation tokens**: Bypass 2FA, designed for CI/CD
|
|
246
|
-
- **Publish tokens**: Require 2FA, for manual publishing
|
|
247
|
-
|
|
248
|
-
Always use automation tokens for GitHub Actions.
|
|
249
|
-
|
|
250
|
-
## Package Information
|
|
251
|
-
|
|
252
|
-
- **Name**: `@7365admin1/layer-common`
|
|
253
|
-
- **Registry**: https://registry.npmjs.org/
|
|
254
|
-
- **Package Page**: https://www.npmjs.com/package/@7365admin1/layer-common
|
|
255
|
-
- **Author**: 7365admin1
|
|
256
|
-
- **License**: MIT
|
|
257
|
-
|
|
258
|
-
## Need Help?
|
|
259
|
-
|
|
260
|
-
If you encounter issues:
|
|
261
|
-
|
|
262
|
-
1. Check the [Changesets documentation](https://github.com/changesets/changesets)
|
|
263
|
-
2. Review GitHub Actions workflow logs
|
|
264
|
-
3. Verify npm token is valid and has correct permissions
|
|
265
|
-
4. Ensure `.changeset/config.json` has `"access": "public"`
|
|
266
|
-
|
|
267
|
-
---
|
|
268
|
-
|
|
269
|
-
**Last Updated**: January 2026
|