@byline/cli 1.0.0 → 1.1.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.
@@ -23,7 +23,7 @@ export interface DepSpec {
23
23
  /** Short human-readable reason this is on the list. */
24
24
  note: string;
25
25
  }
26
- export declare const BYLINE_VERSION = "^0.10.0";
26
+ export declare const BYLINE_VERSION = "^1.0.0";
27
27
  export declare const HOST_TANSTACK_VERSION = "^1.0.0";
28
28
  export declare const DEP_SPECS: readonly DepSpec[];
29
29
  //# sourceMappingURL=deps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../src/manifest/deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,KAAK,CAAA;AAEnD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,QAAQ,CAAA;IACf,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAA;CACb;AAED,eAAO,MAAM,cAAc,YAAY,CAAA;AACvC,eAAO,MAAM,qBAAqB,WAAW,CAAA;AAE7C,eAAO,MAAM,SAAS,EAAE,SAAS,OAAO,EA4G9B,CAAA"}
1
+ {"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../src/manifest/deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,KAAK,CAAA;AAEnD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,QAAQ,CAAA;IACf,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAA;CACb;AAED,eAAO,MAAM,cAAc,WAAW,CAAA;AACtC,eAAO,MAAM,qBAAqB,WAAW,CAAA;AAE7C,eAAO,MAAM,SAAS,EAAE,SAAS,OAAO,EAgG9B,CAAA"}
@@ -15,7 +15,7 @@
15
15
  * `src/routes/_byline/`, `src/ui/byline/`). Transitive deps reach the
16
16
  * user via the `@byline/*` package boundary and don't need declaring.
17
17
  */
18
- export const BYLINE_VERSION = '^0.10.0';
18
+ export const BYLINE_VERSION = '^1.0.0';
19
19
  export const HOST_TANSTACK_VERSION = '^1.0.0';
20
20
  export const DEP_SPECS = [
21
21
  // ---- @byline/* — released in lockstep at BYLINE_VERSION -----------------
@@ -75,16 +75,16 @@ export const DEP_SPECS = [
75
75
  },
76
76
  // ---- Runtime third-party ------------------------------------------------
77
77
  {
78
- name: 'dotenv',
79
- version: '^17.4.2',
78
+ name: 'classnames',
79
+ version: '^2.5.1',
80
80
  group: 'runtime',
81
- note: 'used by byline/seed',
81
+ note: 'utility for conditionally joining classNames; imported by ui/byline templates',
82
82
  },
83
83
  {
84
- name: 'lodash-es',
85
- version: '^4.17.21',
84
+ name: 'dotenv',
85
+ version: '^17.4.2',
86
86
  group: 'runtime',
87
- note: 'used by byline/ config helpers',
87
+ note: 'used by byline/seed',
88
88
  },
89
89
  {
90
90
  name: 'pino',
@@ -105,18 +105,6 @@ export const DEP_SPECS = [
105
105
  group: 'dev',
106
106
  note: 'TanStack devtools Vite plugin (used by canonical vite.config.ts)',
107
107
  },
108
- {
109
- name: '@types/lodash-es',
110
- version: '^4.17.12',
111
- group: 'dev',
112
- note: 'types for lodash-es',
113
- },
114
- {
115
- name: 'classnames',
116
- version: '^2.5.1',
117
- group: 'dev',
118
- note: 'utility for conditionally joining classNames',
119
- },
120
108
  {
121
109
  name: 'tsx',
122
110
  version: '^4.21.0',
@@ -1 +1 @@
1
- {"version":3,"file":"deps.js","sourceRoot":"","sources":["../../src/manifest/deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAYH,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CA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SAAS;QAChB,IAAI,EAAE,4EAA4E;KACnF;IAED,2EAA2E;IAC3E;QACE,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE,QAAQ;QACjB,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,kEAAkE;KACzE;IACD;QACE,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,+DAA+D;KACtE;CACO,CAAA"}
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { type CollectionAdminConfig, type ColumnDefinition, defineAdmin } from '@byline/core'
10
- import { DateTimeFormatter } from '@byline/ui/react/fields'
10
+ import { DateTimeFormatter } from '@byline/ui/react'
11
11
 
12
12
  import { SummaryLength } from '~/components/summary-length.js'
13
13
 
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { type CollectionAdminConfig, type ColumnDefinition, defineAdmin } from '@byline/core'
10
- import { DateTimeFormatter } from '@byline/ui/react/fields'
10
+ import { DateTimeFormatter } from '@byline/ui/react'
11
11
 
12
12
  import { DocsCategories } from './schema.js'
13
13
 
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { type CollectionAdminConfig, type ColumnDefinition, defineAdmin } from '@byline/core'
10
- import { DateTimeFormatter } from '@byline/ui/react/fields'
10
+ import { DateTimeFormatter } from '@byline/ui/react'
11
11
 
12
12
  import { MediaListView } from './components/media-list-view.js'
13
13
  import { MediaThumbnail } from './components/media-thumbnail.js'
@@ -25,7 +25,7 @@ import type { ListViewComponentProps, StoredFileValue, WorkflowStatus } from '@b
25
25
  import type { AnyCollectionSchemaTypes } from '@byline/core/zod-schemas'
26
26
  import { RouterPager } from '@byline/host-tanstack-start/admin-shell/chrome/router-pager'
27
27
  import { Container, IconButton, LoaderRing, PlusIcon, Search, Section, Select } from '@byline/ui'
28
- import { LocalDateTime } from '@byline/ui/react/fields'
28
+ import { LocalDateTime } from '@byline/ui/react'
29
29
 
30
30
  import { FormatBadge } from './media-thumbnail'
31
31
 
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { type CollectionAdminConfig, type ColumnDefinition, defineAdmin } from '@byline/core'
10
- import { DateTimeFormatter } from '@byline/ui/react/fields'
10
+ import { DateTimeFormatter } from '@byline/ui/react'
11
11
 
12
12
  import { SummaryLength } from '~/components/summary-length.js'
13
13
 
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { type CollectionAdminConfig, type ColumnDefinition, defineAdmin } from '@byline/core'
10
- import { DateTimeFormatter } from '@byline/ui/react/fields'
10
+ import { DateTimeFormatter } from '@byline/ui/react'
11
11
 
12
12
  import { NewsCategories } from './schema.js'
13
13
 
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { type CollectionAdminConfig, type ColumnDefinition, defineAdmin } from '@byline/core'
10
- import { DateTimeFormatter } from '@byline/ui/react/fields'
10
+ import { DateTimeFormatter } from '@byline/ui/react'
11
11
 
12
12
  import { SummaryLength } from '~/components/summary-length.js'
13
13
 
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import type { FieldHelpTextSlotProps, SlotComponent } from '@byline/core'
10
- import { useFieldValue } from '@byline/ui/react/forms'
10
+ import { useFieldValue } from '@byline/ui/react'
11
11
 
12
12
  import { LengthIndicator } from './length-indicator'
13
13
 
@@ -8,7 +8,6 @@
8
8
 
9
9
  import type { RichTextField } from '@byline/core'
10
10
  import { defaultEditorConfig, type EditorConfig } from '@byline/richtext-lexical'
11
- import { cloneDeep } from 'lodash-es'
12
11
 
13
12
  type Options = Partial<Omit<RichTextField, 'type' | 'editorConfig'>> & {
14
13
  /**
@@ -75,7 +74,7 @@ function applyCompactPreset(config: EditorConfig): EditorConfig {
75
74
  */
76
75
  export function lexicalRichTextCompact(options: Options = {}): RichTextField {
77
76
  const { configure, ...rest } = options
78
- const base = applyCompactPreset(cloneDeep(defaultEditorConfig))
77
+ const base = applyCompactPreset(structuredClone(defaultEditorConfig))
79
78
  const editorConfig = configure ? configure(base) : base
80
79
 
81
80
  return {
@@ -89,8 +89,8 @@ const config = defineConfig({
89
89
  ],
90
90
  },
91
91
  include: [
92
- // Force pre-bundling of these @byline/ui subpaths so the dep
93
- // optimizer walks into them and inlines their CJS deps — notably
92
+ // Force pre-bundling of @byline/ui so Vite's dep optimizer walks
93
+ // into it and inlines its CJS deps — notably
94
94
  // `@base-ui/utils/store/useStore` and `use-sync-external-store/shim`.
95
95
  //
96
96
  // Without this, those CJS modules are reached via Vite's regular
@@ -99,21 +99,19 @@ const config = defineConfig({
99
99
  // The browser then throws a SyntaxError, the route never hydrates,
100
100
  // and forms fall back to native GET behaviour.
101
101
  //
102
- // A workspace consumer (e.g. apps/webapp inside the bylinecms.dev
103
- // monorepo) doesn't strictly need this list Vite's scanner walks
104
- // workspace source directly and auto-discovers each @base-ui/react
105
- // subpath. Published @byline/ui pre-bundles as a single artifact,
106
- // so the scanner never sees those subpaths and they leak through to
107
- // runtime CJS interop. Listing the subpaths here is harmless in the
108
- // workspace case and required in the published case.
102
+ // @byline/ui ships React-side code through a single
103
+ // `@byline/ui/react` entry point there are no per-area subpaths
104
+ // to pre-bundle individually. That single-entry shape is also why
105
+ // pre-bundling here is now safe: the React Contexts in
106
+ // `services/*` resolve to one module instance regardless of which
107
+ // file in @byline/ui imports them.
109
108
  //
110
109
  // We intentionally do NOT pre-bundle @byline/host-tanstack-start
111
110
  // subpaths — they transitively pull in @tanstack/start-server-core,
112
111
  // which references Vite-virtual modules (e.g.
113
112
  // `tanstack-start-injected-head-scripts:v`) that the dep optimizer
114
113
  // cannot resolve.
115
- '@byline/ui/react/admin',
116
- '@byline/ui/react/services',
114
+ '@byline/ui/react',
117
115
  ],
118
116
  },
119
117
  },
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@byline/cli",
3
3
  "private": false,
4
4
  "license": "MPL-2.0",
5
- "version": "1.0.0",
5
+ "version": "1.1.0",
6
6
  "engines": {
7
7
  "node": ">=20.9.0"
8
8
  },
@@ -1,19 +0,0 @@
1
- /**
2
- * This Source Code is subject to the terms of the Mozilla Public
3
- * License, v. 2.0. If a copy of the MPL was not distributed with this
4
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
- *
6
- * Copyright (c) Infonomic Company Limited
7
- */
8
-
9
- // Initialize Byline config by importing the server config
10
- import 'dotenv/config'
11
- import './server.config.js'
12
-
13
- import { seedAdmin } from './seeds/admin.js'
14
-
15
- async function run() {
16
- await seedAdmin()
17
- }
18
-
19
- run()
@@ -1,25 +0,0 @@
1
- /**
2
- * This Source Code is subject to the terms of the Mozilla Public
3
- * License, v. 2.0. If a copy of the MPL was not distributed with this
4
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
- *
6
- * Copyright (c) Infonomic Company Limited
7
- */
8
-
9
- // Initialize Byline config by importing the server config
10
- import 'dotenv/config'
11
- import './server.config.js'
12
-
13
- import { seedAdmin } from './seeds/admin.js'
14
- import { seedDocsCategories } from './seeds/doc-categories.js'
15
- import { seedDocs } from './seeds/docs.js'
16
- import { seedNewsCategories } from './seeds/news-categories.js'
17
-
18
- async function run() {
19
- await seedAdmin()
20
- await seedDocsCategories()
21
- await seedNewsCategories()
22
- await seedDocs()
23
- }
24
-
25
- run()
@@ -1,62 +0,0 @@
1
- /**
2
- * This Source Code is subject to the terms of the Mozilla Public
3
- * License, v. 2.0. If a copy of the MPL was not distributed with this
4
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
- *
6
- * Copyright (c) Infonomic Company Limited
7
- */
8
-
9
- /**
10
- * Super-admin bootstrap seed.
11
- *
12
- * Idempotent. Reads credentials from env (`BYLINE_SUPERADMIN_EMAIL`,
13
- * `BYLINE_SUPERADMIN_PASSWORD`) and calls the built-in
14
- * `seedSuperAdmin` helper from `@byline/admin/admin-users` against an
15
- * `AdminStore` built on the application's single connection pool.
16
- *
17
- * The admin account it produces:
18
- * - `is_super_admin: true` — bypasses every ability check
19
- * - `is_enabled: true` — ready to sign in immediately
20
- * - `is_email_verified: true` — skip the verification gate for bootstrap
21
- *
22
- * In any non-dev deployment: change the credentials in env, run the seed
23
- * once, then immediately change the password from inside the admin UI.
24
- */
25
-
26
- import type { AdminStore } from '@byline/admin'
27
- import { seedSuperAdmin } from '@byline/admin/admin-users'
28
- import { getBylineCore } from '@byline/core'
29
-
30
- export async function seedAdmin() {
31
- const email = process.env.BYLINE_SUPERADMIN_EMAIL
32
- const password = process.env.BYLINE_SUPERADMIN_PASSWORD
33
-
34
- if (!email || !password) {
35
- console.warn(
36
- 'Skipping admin seed: BYLINE_SUPERADMIN_EMAIL and BYLINE_SUPERADMIN_PASSWORD ' +
37
- 'must both be set (see .env.example).'
38
- )
39
- return
40
- }
41
-
42
- const bylineCore = getBylineCore<AdminStore>()
43
-
44
- if (!bylineCore.adminStore) {
45
- throw new Error(
46
- 'seedAdmin: bylineCore.adminStore is not configured. ' +
47
- 'Pass adminStore to initBylineCore() in byline/server.config.ts.'
48
- )
49
- }
50
-
51
- const result = await seedSuperAdmin(bylineCore.adminStore, { email, password })
52
-
53
- const parts: string[] = []
54
- if (result.created.role) parts.push('role')
55
- if (result.created.user) parts.push('user')
56
- if (result.created.assignment) parts.push('assignment')
57
- if (parts.length === 0) {
58
- console.log(`Super-admin already present (${email}) — no changes.`)
59
- } else {
60
- console.log(`Super-admin seed: created ${parts.join(', ')} for ${email}.`)
61
- }
62
- }