@opentiny/tiny-robot-cli 0.5.2-alpha.16 → 1.0.0-beta.0

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.
@@ -182,6 +182,15 @@ function insertDependencyOrdered(dependencies, name, version) {
182
182
  return next
183
183
  }
184
184
 
185
+ function hasStableBranchAtOrAbove(range, targetVersion) {
186
+ if (semver.prerelease(targetVersion) !== null) return false
187
+
188
+ return new semver.Range(range).set.some((comparators) => {
189
+ const minimum = semver.minVersion(comparators.map((comparator) => comparator.value).join(' '))
190
+ return minimum !== null && semver.gte(minimum, targetVersion)
191
+ })
192
+ }
193
+
185
194
  function ensureDependency(pkg, name, targetSpecifier) {
186
195
  const targetMinimum = semver.minVersion(targetSpecifier)
187
196
  invariant(targetMinimum, `${name} has an invalid target version specifier (${targetSpecifier})`)
@@ -227,13 +236,7 @@ function ensureDependency(pkg, name, targetSpecifier) {
227
236
 
228
237
  if (satisfies) return { type: 'skipped', section: dependency.section, version: dependency.version }
229
238
 
230
- const minimum = typeof dependency.version === 'string' ? semver.minVersion(dependency.version) : null
231
- if (
232
- semver.prerelease(targetVersion) === null &&
233
- typeof dependency.version === 'string' &&
234
- ((semver.valid(dependency.version) && semver.gte(dependency.version, targetVersion)) ||
235
- (minimum && semver.gte(minimum, targetVersion)))
236
- ) {
239
+ if (hasStableBranchAtOrAbove(dependency.version, targetVersion)) {
237
240
  return { type: 'skipped', section: dependency.section, version: dependency.version }
238
241
  }
239
242
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/tiny-robot-cli",
3
- "version": "0.5.2-alpha.16",
3
+ "version": "1.0.0-beta.0",
4
4
  "description": "CLI to scaffold TinyRobot product projects",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,5 +34,5 @@
34
34
  "semver": "^7.8.1",
35
35
  "yaml": "^2.9.0"
36
36
  },
37
- "gitHead": "1bad8116c3bf83194a44bcde3dbd970cb8aacdd2"
37
+ "gitHead": "30a225596e22a9f9f51d70333901c0ebcf0fccd1"
38
38
  }
@@ -100,7 +100,6 @@ const chatUi = {
100
100
  rightAside: {
101
101
  mode: 'dock',
102
102
  width: 400,
103
- defaultOpen: false,
104
103
  },
105
104
  },
106
105
  } satisfies ChatUIOptions
@@ -270,7 +270,6 @@ export function createChatUi(options: ChatUiConfigOptions): ChatUIOptions {
270
270
  rightAside: {
271
271
  mode: 'drawer',
272
272
  width: 400,
273
- defaultOpen: false,
274
273
  },
275
274
  surface: { mode: 'floating', floatingOptions: options.floatingOptions },
276
275
  emptyState: 'center',
@@ -36,13 +36,13 @@
36
36
  padding: 0;
37
37
  border: 0;
38
38
  border-radius: 50%;
39
- background: var(--tr-color-primary);
40
- color: #fff;
39
+ background: var(--tr-container-bg-default);
40
+ color: var(--tr-color-primary);
41
41
  box-shadow: 0 8px 24px rgb(0 0 0 / 20%);
42
42
  cursor: pointer;
43
43
  }
44
44
  .chat-add-launcher:hover {
45
- background: var(--tr-color-primary-hover);
45
+ background: var(--tr-color-primary-light);
46
46
  }
47
47
  .chat-add-launcher:focus-visible {
48
48
  outline: 2px solid var(--tr-color-primary);