@featherk/icons 0.15.7 → 0.15.8
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/bin/featherk-fontawesome-setup.mjs +4 -0
- package/dist/docs-manifest.js +5 -5
- package/dist/fontawesome/chunks/manifest-BB3q10t1.mjs +20 -0
- package/dist/fontawesome/chunks/manifest-C15Xa22L.cjs +19 -0
- package/dist/fontawesome/cli.cjs +5 -17
- package/dist/fontawesome/cli.mjs +5 -17
- package/dist/fontawesome/manifest.d.ts +14 -0
- package/dist/fontawesome/setup.cjs +477 -0
- package/dist/fontawesome/setup.d.ts +39 -0
- package/dist/fontawesome/setup.mjs +477 -0
- package/docs/ICONS.md +1 -1
- package/docs/fontawesome/FontAwesomeCLI.md +2 -0
- package/docs/fontawesome/LICENSING.md +132 -14
- package/package.json +5 -4
- package/dist/fontawesome/catalog.test.d.ts +0 -1
- package/dist/fontawesome/cli.test.d.ts +0 -1
- package/dist/fontawesome/fontawesome-service.test.d.ts +0 -1
- package/dist/fontawesome/generate.test.d.ts +0 -1
- package/dist/fontawesome/normalize.test.d.ts +0 -1
- package/dist/fontawesome/vite.test.d.ts +0 -1
- package/dist/icon-service.test.d.ts +0 -1
- /package/{scripts/fontawesome.mjs → bin/featherk-fontawesome.mjs} +0 -0
|
@@ -42,6 +42,8 @@ Do not replace the placeholder with a token or move this private registry config
|
|
|
42
42
|
From the repository root, after confirming Steps 1-2:
|
|
43
43
|
|
|
44
44
|
```sh
|
|
45
|
+
# The Font Awesome commands run from the built package; build it first.
|
|
46
|
+
npm run build --workspace=@featherk/icons
|
|
45
47
|
# Step 3: Authenticated installation runs only inside demos/pro.
|
|
46
48
|
npm run setup:fontawesome:pro --workspace=@featherk/demos
|
|
47
49
|
# Step 4: Start the explicitly licensed local profile.
|
|
@@ -50,7 +52,7 @@ npm run dev:pro --workspace=@featherk/demos
|
|
|
50
52
|
npm run build:pro --workspace=@featherk/demos
|
|
51
53
|
```
|
|
52
54
|
|
|
53
|
-
The installer checks for the token without printing it. Initial installation creates an isolated lockfile; later runs use `npm ci` when it exists. Review and commit dependency/integrity metadata for reproducible CI, ensuring it contains no credentials. Source `node_modules` and application artifacts remain ignored. No paid installation has been performed as part of implementing this setup.
|
|
55
|
+
FeatherK's demos use the [isolated source project](#optional-pro-isolated-source-project) layout: `setup:fontawesome:pro` runs `featherk-fontawesome-setup --source-root pro`. The installer checks for the token without printing it. Initial installation creates an isolated lockfile; later runs use `npm ci` when it exists. Review and commit dependency/integrity metadata for reproducible CI, ensuring it contains no credentials. Source `node_modules` and application artifacts remain ignored. No paid installation has been performed as part of implementing this setup.
|
|
54
56
|
|
|
55
57
|
The UX-approved Pro manifest requests Regular Rocket, Light Feather, and Light Heart. These pins are requested examples, not verified downloads. If entitlement, releases, or exports are unavailable, Dev must stop installation/generation and return to UX/Design for approval before changing the manifest or dependencies; never substitute silently.
|
|
56
58
|
|
|
@@ -62,18 +64,17 @@ Routes are `/icons/fontawesome/free` and `/icons/fontawesome/pro`; `/icons/fonta
|
|
|
62
64
|
|
|
63
65
|
### Private Local Token Input
|
|
64
66
|
|
|
65
|
-
Run one option in your own terminal. Secret input stays in the terminal, not the assistant.
|
|
67
|
+
In an interactive terminal, the installer prompts for the token with hidden input when `FONTAWESOME_PACKAGE_TOKEN` is not set. Use the options below to manage the variable yourself instead. Run one option in your own terminal. Secret input stays in the terminal, not the assistant.
|
|
66
68
|
|
|
67
69
|
Git Bash:
|
|
68
70
|
|
|
69
71
|
```bash
|
|
70
72
|
# Step 2: Type the token at the hidden prompt.
|
|
71
|
-
read -r -s -p "Font Awesome package token: "
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
npm run setup:fontawesome:pro --workspace=@featherk/demos
|
|
73
|
+
read -r -s -p "Font Awesome package token: " fa_token; echo
|
|
74
|
+
# Step 3: Pass the token to the install command only, then discard it.
|
|
75
|
+
FONTAWESOME_PACKAGE_TOKEN="$fa_token" npm run setup:fontawesome:pro --workspace=@featherk/demos
|
|
75
76
|
setup_status=$?
|
|
76
|
-
unset
|
|
77
|
+
unset fa_token
|
|
77
78
|
# Step 4: Start only after successful installation.
|
|
78
79
|
if [[ $setup_status -eq 0 ]]; then
|
|
79
80
|
npm run dev:pro --workspace=@featherk/demos
|
|
@@ -104,16 +105,104 @@ Do not continue after an install error. `401`/`403` can indicate invalid/revoked
|
|
|
104
105
|
|
|
105
106
|
Consumers need their own covered access or an enterprise agreement that actually covers them. The public FeatherK package grants no Pro rights.
|
|
106
107
|
|
|
107
|
-
|
|
108
|
+
`@featherk/icons` provides `featherk-fontawesome-setup` for consumer setup. Run it through `npx` or an npm script from the application root, once per application, on a developer machine. It reads the UX-provided keys-only manifest (or `--keys a,b`) and pins each package to the exact catalog version. The manifest is the same file the Vite plugin and CLI use: a `free` array of catalog keys plus an optional `pro` array.
|
|
109
|
+
|
|
110
|
+
### Standard: Free and Pro Together
|
|
111
|
+
|
|
112
|
+
Most applications use both tiers, so the standard setup installs Free and Pro packages together as ordinary `devDependencies`:
|
|
113
|
+
|
|
114
|
+
```sh
|
|
115
|
+
npx featherk-fontawesome-setup --manifest fontawesome.keys.json
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The command:
|
|
119
|
+
|
|
120
|
+
1. Adds these lines to the application's `.npmrc`, creating it if needed. Existing settings are kept, and the lines are not duplicated on later runs:
|
|
121
|
+
|
|
122
|
+
```ini
|
|
123
|
+
@fortawesome:registry=https://npm.fontawesome.com/
|
|
124
|
+
//npm.fontawesome.com/:_authToken=${FONTAWESOME_PACKAGE_TOKEN}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
2. Installs the exact Free and Pro pins with `npm install --save-dev --save-exact`, using the token from `FONTAWESOME_PACKAGE_TOKEN` or a hidden prompt.
|
|
128
|
+
|
|
129
|
+
Commit `.npmrc`, `package.json`, and `package-lock.json`. Then configure the Vite plugin with `allowPro: true` and the manifest's Free and Pro keys, without `sourceRoot` or separate Pro scripts.
|
|
130
|
+
|
|
131
|
+
The scope line routes **all** `@fortawesome` packages, Free included, to the Font Awesome registry. Every install therefore needs `FONTAWESOME_PACKAGE_TOKEN`, and everyone who installs the application needs an applicable seat.
|
|
132
|
+
|
|
133
|
+
#### Token-Scoped Installs
|
|
134
|
+
|
|
135
|
+
`npm ci` runs lifecycle scripts from the application and every dependency, and later build tools run arbitrary Node code. Any of them can read a token in their environment. Log masking and Vite's `VITE_` client-variable filter do not prevent this. Do not export the token persistently or for a whole CI build. Give it only to an install that skips scripts, then run anything that needs scripts without it:
|
|
136
|
+
|
|
137
|
+
1. With the token: `npm ci --ignore-scripts`.
|
|
138
|
+
2. Without the token, run any install scripts the application needs:
|
|
139
|
+
- `npm rebuild` runs the dependency install scripts that step 1 skipped. On npm 12 and later, dependency scripts run only when approved in the application's `allowScripts` (`npm install-scripts approve <pkg>`), and `npm rebuild` follows the same approvals. Older npm versions run all of them.
|
|
140
|
+
- `npm rebuild` does not run the application's own lifecycle scripts. Run those explicitly, for example `npm run prepare --if-present`.
|
|
141
|
+
3. Without the token: `npm run dev`, `npm run build`, tests, and deployment. npm runs normally when the `.npmrc` placeholder is unset; only `@fortawesome` registry requests need it.
|
|
142
|
+
|
|
143
|
+
Git Bash:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
read -r -s -p "Font Awesome package token: " fa_token; echo
|
|
147
|
+
FONTAWESOME_PACKAGE_TOKEN="$fa_token" npm ci --ignore-scripts
|
|
148
|
+
install_status=$?
|
|
149
|
+
unset fa_token
|
|
150
|
+
[[ $install_status -eq 0 ]] && npm rebuild
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
PowerShell:
|
|
154
|
+
|
|
155
|
+
```powershell
|
|
156
|
+
$env:FONTAWESOME_PACKAGE_TOKEN = [System.Net.NetworkCredential]::new(
|
|
157
|
+
"", (Read-Host "Font Awesome package token" -AsSecureString)
|
|
158
|
+
).Password
|
|
159
|
+
try {
|
|
160
|
+
npm ci --ignore-scripts
|
|
161
|
+
if ($LASTEXITCODE -ne 0) { throw "Font Awesome package installation failed." }
|
|
162
|
+
} finally {
|
|
163
|
+
Remove-Item Env:FONTAWESOME_PACKAGE_TOKEN -ErrorAction SilentlyContinue
|
|
164
|
+
}
|
|
165
|
+
npm rebuild
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
The setup command follows the same rule. It installs with `--ignore-scripts` and passes the token only to that npm process. For CI, see [TeamCity](#teamcity).
|
|
108
169
|
|
|
109
|
-
|
|
110
|
-
- **Isolated optional source project:** install sources separately and pass `sourceRoot` to the Vite plugin. Keep application output within the consumer project.
|
|
170
|
+
Before supplying the token, the command checks `.npmrc`. It refuses any of the following:
|
|
111
171
|
|
|
112
|
-
|
|
172
|
+
- a `@fortawesome` registry other than `https://npm.fontawesome.com/`
|
|
173
|
+
- any reference to `FONTAWESOME_PACKAGE_TOKEN` outside `//npm.fontawesome.com/:_authToken`
|
|
174
|
+
- any other `npm.fontawesome.com` credential, including a literal token
|
|
113
175
|
|
|
114
|
-
|
|
176
|
+
It also pins the Font Awesome registry on the npm command line, which overrides other npm configuration. The token therefore can only be sent to Font Awesome. The command refuses to run in CI, because it changes `package.json`. It installs with `--ignore-scripts`, so lifecycle scripts never run while the token is present, and it never prints the token. The isolated source-project install applies the same checks, and also requires both Font Awesome lines.
|
|
115
177
|
|
|
116
|
-
|
|
178
|
+
### Exception: Free Only
|
|
179
|
+
|
|
180
|
+
For an application that will use only Free icons:
|
|
181
|
+
|
|
182
|
+
```sh
|
|
183
|
+
npx featherk-fontawesome-setup --manifest fontawesome.keys.json --free-only
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Free packages come from public npm. The command writes no `.npmrc` lines and needs no token or CI configuration. It fails if the manifest contains Pro keys, or if `.npmrc` already routes `@fortawesome` to a registry. Leave `allowPro` unset.
|
|
187
|
+
|
|
188
|
+
Free-only is a per-application choice, not a per-developer one. In a Free and Pro application, the lockfile resolves Free packages through the Font Awesome registry, so a developer without the token cannot install that application. To move a Free-only application to Pro later, add the Pro keys to the manifest and rerun the command without `--free-only`, then add the CI token parameter.
|
|
189
|
+
|
|
190
|
+
### Optional Pro: Isolated Source Project
|
|
191
|
+
|
|
192
|
+
Some projects must keep Pro optional so normal installs never need a token. FeatherK's own demos work this way. They install Pro packages into a separate private project and pass `sourceRoot` to the Vite plugin only in an authorized profile, for example `featherkFontAwesome({ keys, allowPro: true, sourceRoot: "pro" })`. The same command supports this layout:
|
|
193
|
+
|
|
194
|
+
```sh
|
|
195
|
+
# Scaffold .npmrc (token placeholder only), package.json with exact Pro pins, and .gitignore.
|
|
196
|
+
npx featherk-fontawesome-setup --source-root fontawesome-pro-sources --init --manifest fontawesome.keys.json
|
|
197
|
+
# Install with the token; this creates fontawesome-pro-sources/package-lock.json.
|
|
198
|
+
npx featherk-fontawesome-setup --source-root fontawesome-pro-sources
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Commit the scaffolded files and the lockfile. `--init` pins only Pro keys, because Free packages belong in the application's own `devDependencies`. It refuses to overwrite existing files unless you pass `--force`, and it needs no token. When `--init --force` changes the dependencies, for example by adding a Pro package, it removes the now-stale `package-lock.json`. The next install then regenerates it with `npm install`; review and commit the new lockfile. After editing the source project's `package.json` by hand, run the install with `--refresh-lock` to update the lockfile. Later runs use `npm ci` in the source project and remove npm workspace settings, so `--workspace` invocations target only that project. In CI, `--init` and `--refresh-lock` are refused and the lockfile is required. The application's own `npm ci` needs no token. CI adds a separate token-scoped install step for the source project before the Pro build.
|
|
202
|
+
|
|
203
|
+
Keep Pro keys in the manifest's `pro` group and include them only in the authorized profile. Optional profiles must not silently include paid inputs in public/uncredentialed builds. The `dev:pro`/`build:pro` profile scripts above are repository demo helpers.
|
|
204
|
+
|
|
205
|
+
For non-Vite applications or declaration generation before a standalone type check, follow [CLI and non-Vite setup](FontAwesomeCLI.md). Registry authentication still belongs to the authorized package installation environment; the generator and browser never receive the token. The `allowPro` option prevents accidental selection; it does not verify license entitlement. Follow the [generated-output ignore guidance](FontAwesome.md#generated-output-and-source-checks): exclude generated files from ESLint/Prettier/Git while retaining TypeScript checks.
|
|
117
206
|
|
|
118
207
|
## CI and Deployment
|
|
119
208
|
|
|
@@ -131,9 +220,38 @@ Use a dedicated trusted Actions job with a protected Environment and approval/br
|
|
|
131
220
|
run: npm run build:pro --workspace=@featherk/demos
|
|
132
221
|
```
|
|
133
222
|
|
|
223
|
+
In CI, detected from `CI`, `TEAMCITY_VERSION`, or `GITHUB_ACTIONS`, the setup command refuses app-root setup and `--init`, and an isolated install requires the committed `package-lock.json`. Unattended jobs therefore only run a locked `npm ci` and never resolve new versions. In every layout, supply the token only to the install step that skips lifecycle scripts, never to the whole job. See [Token-Scoped Installs](#token-scoped-installs). With no token and no interactive terminal, the command fails instead of prompting.
|
|
224
|
+
|
|
134
225
|
Configure the protected Environment separately; this fragment grants no license rights. Restrict paid caches/archives/artifacts, and never execute untrusted PR code with the token, including via `pull_request_target`. Normal public FeatherK publishing must not receive Pro credentials or use the licensed profile.
|
|
135
226
|
|
|
136
|
-
|
|
227
|
+
### TeamCity
|
|
228
|
+
|
|
229
|
+
Do not define the token as an `env.` parameter. TeamCity passes `env.` parameters to every step in the build, so build tools and lifecycle scripts could read the token. Instead, scope it to the install step:
|
|
230
|
+
|
|
231
|
+
1. In the build configuration, add a parameter named `fontawesome.package.token` with type **Password**. Use no `env.` prefix, so TeamCity does not export it to the steps' environment.
|
|
232
|
+
2. Change the existing install step to a Command Line step that sets the variable for the install command only. Each Command Line step runs in its own process, so the variable does not carry into later steps.
|
|
233
|
+
|
|
234
|
+
Linux agent:
|
|
235
|
+
|
|
236
|
+
```sh
|
|
237
|
+
FONTAWESOME_PACKAGE_TOKEN='%fontawesome.package.token%' npm ci --ignore-scripts
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Windows agent:
|
|
241
|
+
|
|
242
|
+
```bat
|
|
243
|
+
set "FONTAWESOME_PACKAGE_TOKEN=%fontawesome.package.token%"
|
|
244
|
+
npm ci --ignore-scripts
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
3. If the application or its dependencies need install scripts, add a step without the token. Use `npm rebuild` for dependency scripts, which follows `allowScripts` approvals on npm 12 and later. Run the application's own scripts explicitly, for example `npm run prepare --if-present`, because `npm rebuild` does not run them. See [Token-Scoped Installs](#token-scoped-installs).
|
|
248
|
+
4. Leave the build, test, and deploy steps unchanged. They never reference the parameter.
|
|
249
|
+
|
|
250
|
+
Password parameters are masked in build logs, but masking does not stop code running in a step from reading the value. TeamCity also writes the step script, with the substituted value, to a temporary file on the agent. Limit the parameter to trusted build configurations and agents, and never run untrusted pull-request code in a build that defines it. Build agents must be able to reach `npm.fontawesome.com`.
|
|
251
|
+
|
|
252
|
+
This applies to the [standard Free and Pro setup](#standard-free-and-pro-together). For the [isolated source project](#optional-pro-isolated-source-project), the app's normal install needs no token. Add a separate token-scoped step that runs the source install script, for example `npm run fontawesome:install:pro`, before the Pro build. [Free-only](#exception-free-only) applications need no TeamCity configuration.
|
|
253
|
+
|
|
254
|
+
Tokens do not expand Creator seats.
|
|
137
255
|
|
|
138
256
|
Enterprise Pages must enforce authentication on deployed URLs/static assets; repository privacy alone is insufficient. Rendered SVGs remain extractable by authorized viewers. Preserve notices and distribute an application, not a standalone paid-icon catalog. Actual license terms govern permitted deployment.
|
|
139
257
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@featherk/icons",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.8",
|
|
4
4
|
"main": "dist/featherk-icons.umd.js",
|
|
5
5
|
"module": "dist/featherk-icons.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -40,10 +40,11 @@
|
|
|
40
40
|
"files": [
|
|
41
41
|
"dist",
|
|
42
42
|
"docs",
|
|
43
|
-
"
|
|
43
|
+
"bin"
|
|
44
44
|
],
|
|
45
45
|
"bin": {
|
|
46
|
-
"featherk-fontawesome": "
|
|
46
|
+
"featherk-fontawesome": "bin/featherk-fontawesome.mjs",
|
|
47
|
+
"featherk-fontawesome-setup": "bin/featherk-fontawesome-setup.mjs"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
50
|
"vite": "^7.0.0 || ^8.0.0"
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
"scripts": {
|
|
57
58
|
"build": "vite build && npm run build:fontawesome && npm run build:types && npm run build:docs-manifest",
|
|
58
59
|
"build:fontawesome": "vite build --config vite.fontawesome.config.ts",
|
|
59
|
-
"build:types": "vue-tsc --emitDeclarationOnly --declaration --declarationDir dist",
|
|
60
|
+
"build:types": "vue-tsc -p tsconfig.build.json --emitDeclarationOnly --declaration --declarationDir dist",
|
|
60
61
|
"build:docs-manifest": "node ../../scripts/generate-docs-manifest.mjs",
|
|
61
62
|
"test": "vitest --config vitest.config.ts",
|
|
62
63
|
"test:unit": "vitest run --config vitest.config.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|