@quadient/skillshare 1.6.1 → 1.6.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/README.md CHANGED
@@ -21,6 +21,9 @@ bun run index.ts install --skill-version-id 42 --target ./installed
21
21
 
22
22
  ## Behavior
23
23
 
24
+ - Starting with 1.6.2, `login`, `git configure` and API commands without a stored session default to `https://skillshare.quadientcloudpreprod.eu`. `login local` and `git configure local` still select `http://localhost:5050`.
25
+ - Existing sessions keep their saved server. After preprod cutover, run `skillshare login` again to replace a UAT session with a preprod session; stored tokens are not reused across hosts.
26
+ - Uploaded/installed records retain their registry URL. Legacy records without a URL still belong to UAT and are not silently reassigned to preprod.
24
27
  - Upload and publish commands show progress while scanning and reading local files, then keep a timed upload status visible until the registry call finishes.
25
28
  - `update` reads the centralized install registry and refreshes recorded installs to the latest published registry versions.
26
29
  - `update` can be narrowed to one skill or one target directory, and `--dry-run` prints planned changes without downloading or overwriting files.
@@ -36,7 +39,7 @@ flowchart TD
36
39
  B -- Yes --> D{Which command?}
37
40
 
38
41
  D -->|login local| E[login LOCAL_URL]
39
- D -->|login| F[login PROD_URL]
42
+ D -->|login| F[login DEFAULT_URL]
40
43
  D -->|logout| G[logoutSession]
41
44
  D -->|whoami list show upload install update| H[createClient using active baseUrl]
42
45
 
@@ -148,7 +151,7 @@ export SKILLSHARE_TOKEN="<personal-access-token>"
148
151
  npx @quadient/skillshare whoami
149
152
  ```
150
153
 
151
- Register the production or local SkillShare host as a generic OAuth provider in Git Credential
154
+ Register the default preprod or local SkillShare host as a generic OAuth provider in Git Credential
152
155
  Manager 2.0.931 or newer:
153
156
 
154
157
  ```bash
@@ -179,7 +182,7 @@ npx @quadient/skillshare pages show release-notes
179
182
  ```
180
183
 
181
184
  The page is then available at
182
- `https://skillshare.inspireclouduat.net/p/release-notes/` after SSO sign-in.
185
+ `https://skillshare.quadientcloudpreprod.eu/p/release-notes/` after SSO sign-in.
183
186
 
184
187
  ## Package Distribution
185
188
 
package/dist/index.js CHANGED
@@ -8,7 +8,9 @@ import { mkdir, open, readFile, readdir, rm, stat, writeFile } from 'node:fs/pro
8
8
  import { basename, dirname, join, relative, resolve } from 'node:path';
9
9
  import { homedir } from 'node:os';
10
10
  import { cancel, confirm, intro, isCancel, multiselect, outro, progress, select, spinner, text } from '@clack/prompts';
11
- const PROD_URL = 'https://skillshare.inspireclouduat.net';
11
+ const DEFAULT_URL = 'https://skillshare.quadientcloudpreprod.eu';
12
+ // Records without a registry URL were created against UAT before the preprod migration.
13
+ const LEGACY_UAT_URL = 'https://skillshare.inspireclouduat.net';
12
14
  const LOCAL_URL = 'http://localhost:5050';
13
15
  const APP_DIR = getAppDir();
14
16
  const SESSION_PATH = join(APP_DIR, 'session.json');
@@ -91,6 +93,9 @@ Commands:
91
93
 
92
94
  Options:
93
95
  --token <token> Bearer token for API requests (overrides SKILLSHARE_TOKEN)
96
+
97
+ Default server: ${DEFAULT_URL}
98
+ A stored session keeps its server; run "skillshare login" to switch to the default.
94
99
  `;
95
100
  async function main() {
96
101
  const args = process.argv.slice(2);
@@ -110,7 +115,7 @@ async function main() {
110
115
  }
111
116
  switch (command) {
112
117
  case 'login': {
113
- await login(options.positionals[0] === 'local' ? LOCAL_URL : PROD_URL);
118
+ await login(options.positionals[0] === 'local' ? LOCAL_URL : DEFAULT_URL);
114
119
  return;
115
120
  }
116
121
  case 'logout': {
@@ -119,7 +124,7 @@ async function main() {
119
124
  }
120
125
  case 'git': {
121
126
  const action = options.positionals[0];
122
- const baseUrl = options.positionals[1] === 'local' ? LOCAL_URL : PROD_URL;
127
+ const baseUrl = options.positionals[1] === 'local' ? LOCAL_URL : DEFAULT_URL;
123
128
  if (action === 'configure') {
124
129
  await configureGitCredentialManager(baseUrl);
125
130
  return;
@@ -1455,7 +1460,7 @@ async function resolveActiveBaseUrl() {
1455
1460
  if (session?.baseUrl) {
1456
1461
  return normalizeBaseUrl(session.baseUrl);
1457
1462
  }
1458
- return PROD_URL;
1463
+ return DEFAULT_URL;
1459
1464
  }
1460
1465
  async function createClient(baseUrl, explicitToken) {
1461
1466
  const resolvedBaseUrl = normalizeBaseUrl(baseUrl);
@@ -1823,7 +1828,7 @@ async function readUploadedSkillRecords() {
1823
1828
  const normalizedSkillId = Number.isInteger(skillId) && skillId > 0 ? skillId : undefined;
1824
1829
  return [{
1825
1830
  directory: typeof entry.directory === 'string' ? resolve(entry.directory) : '',
1826
- baseUrl: typeof entry.baseUrl === 'string' ? normalizeBaseUrl(entry.baseUrl) : PROD_URL,
1831
+ baseUrl: typeof entry.baseUrl === 'string' ? normalizeBaseUrl(entry.baseUrl) : LEGACY_UAT_URL,
1827
1832
  updatedAt: typeof entry.updatedAt === 'string' ? entry.updatedAt : '',
1828
1833
  skillId: normalizedSkillId,
1829
1834
  skillName: typeof entry.skillName === 'string' ? entry.skillName : '',
@@ -1844,7 +1849,7 @@ async function readInstalledSkillRecords() {
1844
1849
  }
1845
1850
  return [{
1846
1851
  targetRoot: typeof entry.targetRoot === 'string' ? resolve(entry.targetRoot) : '',
1847
- baseUrl: typeof entry.baseUrl === 'string' ? normalizeBaseUrl(entry.baseUrl) : PROD_URL,
1852
+ baseUrl: typeof entry.baseUrl === 'string' ? normalizeBaseUrl(entry.baseUrl) : LEGACY_UAT_URL,
1848
1853
  updatedAt: typeof entry.updatedAt === 'string' ? entry.updatedAt : '',
1849
1854
  skillId,
1850
1855
  skillName: typeof entry.skillName === 'string' ? entry.skillName : '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quadient/skillshare",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Skillshare CLI for installing and publishing Quadient skills",
5
5
  "type": "module",
6
6
  "bin": {