@port60/template-kit 0.14.0 → 0.14.2
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/package.json +1 -1
- package/src/commands/publish.mjs +6 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@port60/template-kit",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "Build Port60 site templates locally: scaffold, live-preview, validate against the platform contract, and package for studio upload. AI-agent ready \u2014 every scaffold ships AGENTS.md and validate emits machine-readable JSON.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/commands/publish.mjs
CHANGED
|
@@ -15,7 +15,8 @@ import { accessToken, api, apiBase, loadCredentials, requireCredentials } from '
|
|
|
15
15
|
* package steps, but inside GitHub Actions there is no person to sign in. The workflow's own
|
|
16
16
|
* OIDC token, minted by GitHub for the platform's audience, is the credential; the platform
|
|
17
17
|
* verifies GitHub's signature and the repository trust the developer registered in the studio.
|
|
18
|
-
*
|
|
18
|
+
* A trusted workflow does what a signed-in terminal does (a new name creates the template, an
|
|
19
|
+
* owned name gains a version); review still decides.
|
|
19
20
|
* Auto-detected inside Actions when this machine holds no stored login.
|
|
20
21
|
*/
|
|
21
22
|
export async function publish(args) {
|
|
@@ -124,12 +125,14 @@ async function publishFromCi(args, zip) {
|
|
|
124
125
|
if (!res.ok) {
|
|
125
126
|
console.error(`✗ Publish refused (${res.status}): ${await errorMessage(res)}`);
|
|
126
127
|
if (res.status === 403) {
|
|
127
|
-
console.error(' Trust this repository under Automate
|
|
128
|
-
console.error(' and check the workflow runs from a ref the trust allows (refs/tags/v* by default).');
|
|
128
|
+
console.error(' Trust this repository under Automate in your studio (one field: owner/name).');
|
|
129
129
|
}
|
|
130
130
|
process.exit(1);
|
|
131
131
|
}
|
|
132
132
|
const result = await res.json();
|
|
133
|
+
if (result.templateCreated) {
|
|
134
|
+
console.log(`✓ ${result.templateLabel ?? result.templateName} created from its manifest.`);
|
|
135
|
+
}
|
|
133
136
|
console.log(`✓ ${result.templateName} accepted this run from ${result.repository} (${result.ref}).`);
|
|
134
137
|
if (!printUpload(result.upload ?? {})) process.exit(1);
|
|
135
138
|
if (result.submitted) {
|