@ossy/cli 1.17.4 → 1.17.6
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 +4 -4
- package/src/app/publish.js +25 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ossy/cli",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/ossy-se/packages.git"
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/parser": "^7.28.6",
|
|
23
|
-
"@ossy/app": "^1.17.
|
|
24
|
-
"@ossy/sdk": "^1.17.
|
|
23
|
+
"@ossy/app": "^1.17.6",
|
|
24
|
+
"@ossy/sdk": "^1.17.6",
|
|
25
25
|
"arg": "^5.0.2",
|
|
26
26
|
"glob": "^10.3.10"
|
|
27
27
|
},
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"/src",
|
|
34
34
|
"README.md"
|
|
35
35
|
],
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "236f9e8bddf2ae3ca992aea39e7d1a70c9377ea6"
|
|
37
37
|
}
|
package/src/app/publish.js
CHANGED
|
@@ -239,6 +239,31 @@ export async function publish (options) {
|
|
|
239
239
|
process.exit(1)
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
+
// Step 3: register domain → workspace mapping in the apps registry
|
|
243
|
+
if (domain) {
|
|
244
|
+
try {
|
|
245
|
+
const registerRes = await fetch(`${apiBaseUrl}/apps/domains`, {
|
|
246
|
+
method: 'POST',
|
|
247
|
+
headers: {
|
|
248
|
+
'Content-Type': 'application/json',
|
|
249
|
+
authorization: authToken,
|
|
250
|
+
workspaceid: workspaceId,
|
|
251
|
+
},
|
|
252
|
+
body: JSON.stringify({ domain }),
|
|
253
|
+
})
|
|
254
|
+
if (!registerRes.ok) {
|
|
255
|
+
const text = await registerRes.text().catch(() => '')
|
|
256
|
+
logError({
|
|
257
|
+
message: `[@ossy/cli] app publish: domain registration failed: HTTP ${registerRes.status}${text ? ` — ${text.slice(0, 200)}` : ''}`,
|
|
258
|
+
})
|
|
259
|
+
} else {
|
|
260
|
+
logInfo({ message: `[@ossy/cli] app publish: domain registered (${domain} → workspace ${workspaceId})` })
|
|
261
|
+
}
|
|
262
|
+
} catch (err) {
|
|
263
|
+
logError({ message: `[@ossy/cli] app publish: domain registration failed: ${err?.message ?? err}` })
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
242
267
|
logInfo({
|
|
243
268
|
message: `[@ossy/cli] app publish: done — ${files.length} file${files.length === 1 ? '' : 's'} uploaded to ${remoteDest}`,
|
|
244
269
|
})
|