@ossy/cli 1.17.4 → 1.17.5

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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. 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.4",
3
+ "version": "1.17.5",
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.4",
24
- "@ossy/sdk": "^1.17.4",
23
+ "@ossy/app": "^1.17.5",
24
+ "@ossy/sdk": "^1.17.5",
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": "45251429b7b1f4cdf7f81a5046419905c3c118c9"
36
+ "gitHead": "81baa12dad845ec3f48438d2c4ba139a3a271770"
37
37
  }
@@ -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
  })