From 0b6218f5f8865be957c4326cb93290b8fb8222f3 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Mon, 16 Feb 2026 10:21:14 +0100 Subject: [PATCH 01/39] Update CLI --- .github/workflows/dev-publish.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/dev-publish.yml b/.github/workflows/dev-publish.yml index 2b0a7c6..207e8b7 100644 --- a/.github/workflows/dev-publish.yml +++ b/.github/workflows/dev-publish.yml @@ -27,7 +27,7 @@ jobs: run: | DATE=$(date +"%Y%m%d%H%M%S") for pkg in packages/*/package.json; do - jq ".version |= sub("-dev\\.[0-9]+"; "") | .version += "-dev.$DATE"" $pkg > tmp.$$.json && mv tmp.$$.json $pkg + jq '.version |= sub("-dev\\.[0-9]+"; "") | .version += "-dev.'"$DATE"'"' $pkg > tmp.$$.json && mv tmp.$$.json $pkg done shell: bash @@ -42,4 +42,3 @@ jobs: fi done shell: bash - From a8663d9c9769f9bfa6c13acbbde84273b817d049 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Mon, 16 Feb 2026 10:29:34 +0100 Subject: [PATCH 02/39] Update CLI --- .github/workflows/dev-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev-publish.yml b/.github/workflows/dev-publish.yml index 207e8b7..4dbd082 100644 --- a/.github/workflows/dev-publish.yml +++ b/.github/workflows/dev-publish.yml @@ -38,7 +38,7 @@ jobs: for pkg in packages/*/package.json; do pkgdir=$(dirname $pkg) if ! grep -q '"private"\s*:\s*true' $pkg; then - npm publish --tag dev --access public --workspace $(basename $pkgdir) + npm publish --tag dev --access public --workspace $pkgdir fi done shell: bash From b2e8947dfccd9540b01082d5b532e37624faf1ad Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Mon, 16 Feb 2026 11:06:33 +0100 Subject: [PATCH 03/39] Update CLI --- packages/cli/README.md | 98 ++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 52 deletions(-) diff --git a/packages/cli/README.md b/packages/cli/README.md index 7db3292..5a6825d 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -8,55 +8,49 @@ # Localess Command Line -This client SDK is designed to work with the Localess API. It provides a simple way to interact with the Localess API from your JavaScript or TypeScript application. - -> **Important:** -> The Client is designed to be used on the server side only, as it requires your **Localess API Token** to be kept secret. -> Do not use this client in your frontend application, as it exposes your API Token to the public. - -## Installation - -### NPM -````bash -npm install @localess/js-client@latest -```` - -### Yarn -````bash -yarn add @localess/js-client@latest -```` - -## Client - -````ts -import {localessClient} from "@localess/js-client"; - -const llClient = localessClient({ - // A fully qualified domain name with protocol (http/https) and port. - origin: 'https://my-localess.web.app', - // Localess space ID, cna be found in the Localess Space settings - spaceId: 'I1LoVe2LocaLess4Rever', - // Localess API token, can be found in the Localess Space settings - token: 'Baz00KaT0KeN8S3CureLL' -}); - -// Fetch all Content Links -llClient.getLinks() -// Fetch content by SLUG -llClient.getContentBySlug('docs/overview') -// Fetch content by ID -llClient.getContentById('FRnIT7CUABoRCdSVVGGs') -// Fetch translations by locale -llClient.getTranslations('en') -```` - -## Sync with Visual Editor - -It will automatically inject Localess Sync Script in to the HTML page. - -````ts -import {loadLocalessSync} from "@localess/js-client"; - -// A fully qualified domain name with protocol (http/https) and port. -loadLocalessSync('https://my-localess.web.app') -```` +A powerful CLI tool to interact with your Localess spaces. + +## Features + +- 🔐 **Authentication** - Secure login system and CI environments. +- 🛡️ **Type Safety** - Generate TypeScript type definitions for your Localess content schemas, ensuring type safety in your frontend applications. +- 🌐 **Translations** - Sync and manage translations for your Localess space. + + +## Login +The CLI provides a `login` command to authenticate with your Localess account. This command prompts you for your email and password, and securely stores an authentication token for future API requests. +### Usage + +#### Login with your Localess from CLI: +```bash +localess login --origin --space --token +``` +#### Login with your Localess with environment variables: +```bash +export LOCALESS_ORIGIN= +export LOCALESS_SPACE= +export LOCALESS_TOKEN= +localess login +``` + +## Logout +The CLI provides a `logout` command to clear your authentication token and log you out of your Localess account. +### Usage +```bash +localess logout +``` + +## Generate TypeScript Types + +The CLI provides a `types` command to generate TypeScript definitions for your Localess content schemas. This command fetches your space's OpenAPI schema and writes a `localess.d.ts` file to your project, allowing for strong typing in your codebase. + +### Usage + +```bash +localess types +``` + +- You must be logged in (`localess login`) before running this command. +- The generated types file will be saved as `./.localess/localess.d.ts` in your current working directory. + +You can then import these types in your TypeScript project for improved type safety when working with Localess content. From 61da35db91dc8251196a3266bc6d61956c39e5a7 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Mon, 16 Feb 2026 11:13:51 +0100 Subject: [PATCH 04/39] Update CLI --- packages/cli/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/cli/README.md b/packages/cli/README.md index 5a6825d..5bf083a 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -16,6 +16,11 @@ A powerful CLI tool to interact with your Localess spaces. - 🛡️ **Type Safety** - Generate TypeScript type definitions for your Localess content schemas, ensuring type safety in your frontend applications. - 🌐 **Translations** - Sync and manage translations for your Localess space. +## Setup + +```bash +npm install @localess/cli -D +``` ## Login The CLI provides a `login` command to authenticate with your Localess account. This command prompts you for your email and password, and securely stores an authentication token for future API requests. From a39382d100c9e20aa2cbc540c6f734431f5cd785 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Mon, 16 Feb 2026 12:11:59 +0100 Subject: [PATCH 05/39] Update CLI --- packages/cli/src/commands/login/index.ts | 2 -- packages/cli/src/session.ts | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/cli/src/commands/login/index.ts b/packages/cli/src/commands/login/index.ts index 878de31..fd91d0d 100644 --- a/packages/cli/src/commands/login/index.ts +++ b/packages/cli/src/commands/login/index.ts @@ -14,8 +14,6 @@ export const loginCommand = new Command('login') .option('-s, --space ', 'Space ID to login to') .option('-o, --origin ', 'Origin of the Localess instance') .action(async (options: LoginOptions) => { - console.log('Logging in with options:', options); - const session = await getSession() if (session.isLoggedIn && session.method === 'file') { diff --git a/packages/cli/src/session.ts b/packages/cli/src/session.ts index ba3fa78..a1e8287 100644 --- a/packages/cli/src/session.ts +++ b/packages/cli/src/session.ts @@ -69,9 +69,8 @@ export async function getSession(): Promise { }; } } catch (e) { - console.error('No credentials found. Please log in using the "localess login" command.'); + // console.error('No credentials found. Please log in using the "localess login" command.'); } - console.debug('Not logged in.'); return session; } From 879e889b6f4e3a14e22e467b9909ab2539b8ac77 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Mon, 16 Feb 2026 16:42:40 +0100 Subject: [PATCH 06/39] Update CLI --- package-lock.json | 12 ++++- packages/cli/package.json | 3 +- .../cli/src/commands/translations/index.ts | 6 +++ .../src/commands/translations/push/index.ts | 48 +++++++++++++++++++ packages/cli/src/commands/types/index.ts | 4 +- packages/cli/src/file.ts | 10 ++-- packages/cli/src/models/translation.zod.ts | 9 ++++ packages/cli/src/models/translations.ts | 4 ++ packages/cli/src/program.ts | 2 + packages/cli/src/session.ts | 6 +-- 10 files changed, 94 insertions(+), 10 deletions(-) create mode 100644 packages/cli/src/commands/translations/index.ts create mode 100644 packages/cli/src/commands/translations/push/index.ts create mode 100644 packages/cli/src/models/translation.zod.ts diff --git a/package-lock.json b/package-lock.json index d4ce8b6..d4be3c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3169,6 +3169,15 @@ "node": ">=12" } }, + "node_modules/zod": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", + "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, "packages/cli": { "name": "@localess/cli", "version": "0.0.1", @@ -3176,7 +3185,8 @@ "dependencies": { "chalk": "^5.6.2", "commander": "^14.0.3", - "openapi-typescript": "^7.12.0" + "openapi-typescript": "^7.12.0", + "zod": "^4.3.6" }, "bin": { "localess": "dist/index.mjs" diff --git a/packages/cli/package.json b/packages/cli/package.json index 1155b1c..5a95c24 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -43,7 +43,8 @@ "dependencies": { "commander": "^14.0.3", "chalk": "^5.6.2", - "openapi-typescript": "^7.12.0" + "openapi-typescript": "^7.12.0", + "zod": "^4.3.6" }, "devDependencies": { "@types/node": "^20", diff --git a/packages/cli/src/commands/translations/index.ts b/packages/cli/src/commands/translations/index.ts new file mode 100644 index 0000000..6c6b0e1 --- /dev/null +++ b/packages/cli/src/commands/translations/index.ts @@ -0,0 +1,6 @@ +import {Command} from "commander"; +import {translationsPushCommand} from "./push"; + +export const translationsCommand = new Command('translations') + .description('Manage translations') + .addCommand(translationsPushCommand); diff --git a/packages/cli/src/commands/translations/push/index.ts b/packages/cli/src/commands/translations/push/index.ts new file mode 100644 index 0000000..e23fcb5 --- /dev/null +++ b/packages/cli/src/commands/translations/push/index.ts @@ -0,0 +1,48 @@ +import {Command} from "commander"; +import {getSession} from "../../../session"; +import {localessClient} from "../../../client"; +import {isTranslationUpdateType, Translations, TranslationUpdateType} from "../../../models"; +import {readFile} from "../../../file"; +import {zLocaleTranslationsSchema} from "../../../models/translation.zod"; + +export type TranslationsPushOptions = { + file: string; + type: TranslationUpdateType +} + +export const translationsPushCommand = new Command('push [locale]') + .description('Push locale translations to Localess') + .requiredOption('-f, --file ', 'Path to the translations file to push') + .option('-t, --type ', `Push type. Possible values are : ${Object.values(TranslationUpdateType)}`, TranslationUpdateType.ADD_MISSING) + .action(async (locale: string, options: TranslationsPushOptions) => { + console.log('Pushing translations with arguments:', locale); + console.log('Pushing translations with options:', options); + if (!isTranslationUpdateType(options.type)) { + console.error('Invalid type provided. Possible values are :', Object.values(TranslationUpdateType)); + return; + } + + const session = await getSession() + if (!session.isLoggedIn) { + console.error('Not logged in'); + console.error('Please log in first using "localess login" command'); + return; + } + const client = localessClient({ + origin: session.origin, + spaceId: session.space, + token: session.token, + }); + + console.log('Reading translations file from:', options.file); + const fileContent = await readFile(options.file); + const translationValues: Translations = JSON.parse(fileContent); + const pResult = zLocaleTranslationsSchema.safeParse(translationValues) + if (!pResult.success) { + console.error('Invalid translations file format:', pResult.error); + return; + } + console.log('Pushing translations to Localess with locale:', locale, 'and type:', options.type); + await client.updateTranslations(locale, options.type, translationValues); + console.log('Successfully pushed translations to Localess'); + }); diff --git a/packages/cli/src/commands/types/index.ts b/packages/cli/src/commands/types/index.ts index 598890a..88ed197 100644 --- a/packages/cli/src/commands/types/index.ts +++ b/packages/cli/src/commands/types/index.ts @@ -4,7 +4,7 @@ import {getSession} from "../../session"; import openapiTS, { astToString } from "openapi-typescript"; import {join} from "node:path"; import process from "node:process"; -import {DEFAULT_CONFIG_DIR, writeToFile} from "../../file"; +import {DEFAULT_CONFIG_DIR, writeFile} from "../../file"; const TYPES_PATH = join(process.cwd(), DEFAULT_CONFIG_DIR, 'localess.d.ts'); @@ -40,7 +40,7 @@ export const typesCommand = new Command('types') }; const ast = await openapiTS(minimalSpec, {exportType: true, rootTypes: true, rootTypesNoSchemaPrefix: true}) const contents = astToString(ast); - await writeToFile(TYPES_PATH, contents); + await writeFile(TYPES_PATH, contents); console.log(`Types generated successfully at ${TYPES_PATH}`); } catch (e) { console.error(e); diff --git a/packages/cli/src/file.ts b/packages/cli/src/file.ts index 5d921d8..4e3873e 100644 --- a/packages/cli/src/file.ts +++ b/packages/cli/src/file.ts @@ -1,4 +1,4 @@ -import {access, constants, mkdir, writeFile} from "node:fs/promises"; +import {access, constants, mkdir, writeFile as nodeWriteFile, readFile as nodeReadFile} from "node:fs/promises"; import {parse} from "node:path"; export const DEFAULT_CONFIG_DIR = '.localess' @@ -13,7 +13,7 @@ export async function fileExists(path: string) { } } -export async function writeToFile(filePath: string, data: string, option? : {mode? : number}) { +export async function writeFile(filePath: string, data: string, option? : {mode? : number}) { // Get the directory path const resolvedPath = parse(filePath).dir; // Ensure the directory exists @@ -24,8 +24,12 @@ export async function writeToFile(filePath: string, data: string, option? : {mod } // Write the file try { - await writeFile(filePath, data, option); + await nodeWriteFile(filePath, data, option); } catch (writeError) { } } + +export async function readFile(filePath: string): Promise { + return nodeReadFile(filePath, 'utf-8'); +} diff --git a/packages/cli/src/models/translation.zod.ts b/packages/cli/src/models/translation.zod.ts new file mode 100644 index 0000000..7e76298 --- /dev/null +++ b/packages/cli/src/models/translation.zod.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const zLocaleTranslationsSchema = z.record(z.string(), z.string()); +export const zTranslationUpdateTypeSchema = z.enum(['add-missing', 'update-existing']) + +export const zTranslationUpdateSchema = z.object({ + type: zTranslationUpdateTypeSchema, + values: zLocaleTranslationsSchema, +}); diff --git a/packages/cli/src/models/translations.ts b/packages/cli/src/models/translations.ts index 5ff209c..8ee0f85 100644 --- a/packages/cli/src/models/translations.ts +++ b/packages/cli/src/models/translations.ts @@ -15,3 +15,7 @@ export enum TranslationUpdateType { ADD_MISSING = 'add-missing', UPDATE_EXISTING = 'update-existing', } + +export function isTranslationUpdateType(value: string): boolean { + return value in TranslationUpdateType; +} diff --git a/packages/cli/src/program.ts b/packages/cli/src/program.ts index 9c3a81d..d554ac2 100644 --- a/packages/cli/src/program.ts +++ b/packages/cli/src/program.ts @@ -2,6 +2,7 @@ import {Command} from "commander"; import {loginCommand} from "./commands/login"; import {logoutCommand} from "./commands/logout"; import {typesCommand} from "./commands/types"; +import {translationsCommand} from "./commands/translations"; export const program = new Command(); @@ -13,4 +14,5 @@ program program.addCommand(loginCommand) program.addCommand(logoutCommand) +program.addCommand(translationsCommand) program.addCommand(typesCommand) diff --git a/packages/cli/src/session.ts b/packages/cli/src/session.ts index a1e8287..a725b05 100644 --- a/packages/cli/src/session.ts +++ b/packages/cli/src/session.ts @@ -1,7 +1,7 @@ import {access, readFile} from 'node:fs/promises'; import {join} from 'node:path'; import * as process from "node:process"; -import {DEFAULT_CONFIG_DIR, writeToFile} from "./file"; +import {DEFAULT_CONFIG_DIR, writeFile} from "./file"; export type SessionData = { token: string; @@ -76,7 +76,7 @@ export async function getSession(): Promise { export async function persistSession(data:SessionOptions) { if (data.origin && data.token && data.space) { - await writeToFile(CREDENTIALS_PATH, JSON.stringify(data, null, 2), { mode: 0o600 }); + await writeFile(CREDENTIALS_PATH, JSON.stringify(data, null, 2), { mode: 0o600 }); console.log('Add session credentials to file system.'); console.log('Add .localess to .gitignore to avoid committing them to your repository.'); } else { @@ -88,7 +88,7 @@ export async function clearSession() { // Write empty JSON to the file try { await access(CREDENTIALS_PATH) - await writeToFile(CREDENTIALS_PATH, '{}', { mode: 0o600 }); + await writeFile(CREDENTIALS_PATH, '{}', { mode: 0o600 }); } catch (error) { throw new Error('Failed to clear session credentials.'); From d0d939d9abe68cc140b3fd0fb458a51740646add Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Mon, 16 Feb 2026 16:53:25 +0100 Subject: [PATCH 07/39] Update CLI --- packages/cli/src/commands/translations/push/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/commands/translations/push/index.ts b/packages/cli/src/commands/translations/push/index.ts index e23fcb5..7832547 100644 --- a/packages/cli/src/commands/translations/push/index.ts +++ b/packages/cli/src/commands/translations/push/index.ts @@ -10,7 +10,8 @@ export type TranslationsPushOptions = { type: TranslationUpdateType } -export const translationsPushCommand = new Command('push [locale]') +export const translationsPushCommand = new Command('push') + .argument('', 'Locale to push') .description('Push locale translations to Localess') .requiredOption('-f, --file ', 'Path to the translations file to push') .option('-t, --type ', `Push type. Possible values are : ${Object.values(TranslationUpdateType)}`, TranslationUpdateType.ADD_MISSING) From 6e007e0a6de39abf9a0f3c8026a33f79d9f57acf Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Tue, 17 Feb 2026 10:05:32 +0100 Subject: [PATCH 08/39] Update CLI --- packages/cli/src/commands/translations/push/index.ts | 6 +++--- packages/cli/src/models/translations.ts | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/cli/src/commands/translations/push/index.ts b/packages/cli/src/commands/translations/push/index.ts index 7832547..bef1ac5 100644 --- a/packages/cli/src/commands/translations/push/index.ts +++ b/packages/cli/src/commands/translations/push/index.ts @@ -1,9 +1,9 @@ import {Command} from "commander"; import {getSession} from "../../../session"; import {localessClient} from "../../../client"; -import {isTranslationUpdateType, Translations, TranslationUpdateType} from "../../../models"; +import {Translations, TranslationUpdateType} from "../../../models"; import {readFile} from "../../../file"; -import {zLocaleTranslationsSchema} from "../../../models/translation.zod"; +import {zLocaleTranslationsSchema, zTranslationUpdateTypeSchema} from "../../../models/translation.zod"; export type TranslationsPushOptions = { file: string; @@ -18,7 +18,7 @@ export const translationsPushCommand = new Command('push') .action(async (locale: string, options: TranslationsPushOptions) => { console.log('Pushing translations with arguments:', locale); console.log('Pushing translations with options:', options); - if (!isTranslationUpdateType(options.type)) { + if (zTranslationUpdateTypeSchema.safeParse(options.type).success!) { console.error('Invalid type provided. Possible values are :', Object.values(TranslationUpdateType)); return; } diff --git a/packages/cli/src/models/translations.ts b/packages/cli/src/models/translations.ts index 8ee0f85..5ff209c 100644 --- a/packages/cli/src/models/translations.ts +++ b/packages/cli/src/models/translations.ts @@ -15,7 +15,3 @@ export enum TranslationUpdateType { ADD_MISSING = 'add-missing', UPDATE_EXISTING = 'update-existing', } - -export function isTranslationUpdateType(value: string): boolean { - return value in TranslationUpdateType; -} From fdd16a7ea9f12d3d627a1ba1b8bde009fbae1666 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Tue, 17 Feb 2026 10:09:21 +0100 Subject: [PATCH 09/39] Update CLI --- packages/cli/src/commands/translations/push/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/commands/translations/push/index.ts b/packages/cli/src/commands/translations/push/index.ts index bef1ac5..64fb2bc 100644 --- a/packages/cli/src/commands/translations/push/index.ts +++ b/packages/cli/src/commands/translations/push/index.ts @@ -18,7 +18,7 @@ export const translationsPushCommand = new Command('push') .action(async (locale: string, options: TranslationsPushOptions) => { console.log('Pushing translations with arguments:', locale); console.log('Pushing translations with options:', options); - if (zTranslationUpdateTypeSchema.safeParse(options.type).success!) { + if (!zTranslationUpdateTypeSchema.safeParse(options.type).success) { console.error('Invalid type provided. Possible values are :', Object.values(TranslationUpdateType)); return; } From ea4e2142fff4686df40cfd1cc6efbe96eb012a5c Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Tue, 17 Feb 2026 10:44:38 +0100 Subject: [PATCH 10/39] Update CLI --- packages/cli/src/client.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cli/src/client.ts b/packages/cli/src/client.ts index 1753afc..f5527d8 100644 --- a/packages/cli/src/client.ts +++ b/packages/cli/src/client.ts @@ -393,6 +393,7 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { }, body: JSON.stringify(body), }); + console.log(LOG_GROUP, 'updateTranslations : ', await response.json()); if (options.debug) { console.log(LOG_GROUP, 'updateTranslations status : ', response.status); } From 7b6255c11b713ad5bc996064b740b0ec3866d1d2 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Tue, 17 Feb 2026 11:49:40 +0100 Subject: [PATCH 11/39] Update CLI --- packages/cli/src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/client.ts b/packages/cli/src/client.ts index f5527d8..bbce090 100644 --- a/packages/cli/src/client.ts +++ b/packages/cli/src/client.ts @@ -386,10 +386,10 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { } try { const response = await fetch(url, { - ...fetchOptions, method: 'POST', headers: { 'X-API-KEY': options.token, + ...fetchOptions.headers }, body: JSON.stringify(body), }); From 1f6f503aad7dd446567716cf57317c0aa562ba70 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Tue, 17 Feb 2026 12:17:41 +0100 Subject: [PATCH 12/39] Update CLI --- packages/cli/src/client.ts | 7 ++++--- packages/cli/src/commands/translations/push/index.ts | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/client.ts b/packages/cli/src/client.ts index bbce090..3ba42af 100644 --- a/packages/cli/src/client.ts +++ b/packages/cli/src/client.ts @@ -88,6 +88,7 @@ export interface LocalessClient { * @returns {Promise} */ getSpace(): Promise + /** * Get all links * @param params{LinksFetchParams} - Fetch parameters @@ -124,7 +125,7 @@ export interface LocalessClient { * @param values - Key-Value Object. Where Key is Translation ID and Value is Translated Content * @returns {Promise} */ - updateTranslations(locale: string, type: TranslationUpdateType, values: Translations): Promise; + updateTranslations(locale: string, type: TranslationUpdateType, values: Translations): Promise; /** * Get OpenAPI specification @@ -370,7 +371,7 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { } }, - async updateTranslations(locale: string, type: TranslationUpdateType, values: Translations): Promise { + async updateTranslations(locale: string, type: TranslationUpdateType, values: Translations): Promise { if (options.debug) { console.log(LOG_GROUP, 'updateTranslations() locale : ', locale); console.log(LOG_GROUP, 'updateTranslations() type : ', type); @@ -393,10 +394,10 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { }, body: JSON.stringify(body), }); - console.log(LOG_GROUP, 'updateTranslations : ', await response.json()); if (options.debug) { console.log(LOG_GROUP, 'updateTranslations status : ', response.status); } + return response.json(); } catch (error: any) { console.error(LOG_GROUP, 'updateTranslations error : ', error); } diff --git a/packages/cli/src/commands/translations/push/index.ts b/packages/cli/src/commands/translations/push/index.ts index 64fb2bc..06405ac 100644 --- a/packages/cli/src/commands/translations/push/index.ts +++ b/packages/cli/src/commands/translations/push/index.ts @@ -44,6 +44,7 @@ export const translationsPushCommand = new Command('push') return; } console.log('Pushing translations to Localess with locale:', locale, 'and type:', options.type); - await client.updateTranslations(locale, options.type, translationValues); + const message = await client.updateTranslations(locale, options.type, translationValues); console.log('Successfully pushed translations to Localess'); + console.log('Summary:', message); }); From ce477042ffe36e2f73ec28f6656f8048e4e40f34 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Tue, 17 Feb 2026 13:02:35 +0100 Subject: [PATCH 13/39] Update CLI --- packages/cli/src/client.ts | 6 +++--- packages/cli/src/commands/translations/push/index.ts | 11 +++++++++-- packages/cli/src/models/translations.ts | 5 +++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/packages/cli/src/client.ts b/packages/cli/src/client.ts index 3ba42af..3de72d5 100644 --- a/packages/cli/src/client.ts +++ b/packages/cli/src/client.ts @@ -6,7 +6,7 @@ import { Links, Space, Translations, - TranslationUpdate, + TranslationUpdate, TranslationUpdateResponse, TranslationUpdateType } from "./models"; import {ICache, NoCache, TTLCache} from "./cache"; @@ -125,7 +125,7 @@ export interface LocalessClient { * @param values - Key-Value Object. Where Key is Translation ID and Value is Translated Content * @returns {Promise} */ - updateTranslations(locale: string, type: TranslationUpdateType, values: Translations): Promise; + updateTranslations(locale: string, type: TranslationUpdateType, values: Translations): Promise; /** * Get OpenAPI specification @@ -371,7 +371,7 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { } }, - async updateTranslations(locale: string, type: TranslationUpdateType, values: Translations): Promise { + async updateTranslations(locale: string, type: TranslationUpdateType, values: Translations): Promise { if (options.debug) { console.log(LOG_GROUP, 'updateTranslations() locale : ', locale); console.log(LOG_GROUP, 'updateTranslations() type : ', type); diff --git a/packages/cli/src/commands/translations/push/index.ts b/packages/cli/src/commands/translations/push/index.ts index 06405ac..c9e56c5 100644 --- a/packages/cli/src/commands/translations/push/index.ts +++ b/packages/cli/src/commands/translations/push/index.ts @@ -45,6 +45,13 @@ export const translationsPushCommand = new Command('push') } console.log('Pushing translations to Localess with locale:', locale, 'and type:', options.type); const message = await client.updateTranslations(locale, options.type, translationValues); - console.log('Successfully pushed translations to Localess'); - console.log('Summary:', message); + if (message) { + console.log('Successfully pushed translations to Localess'); + console.log('Summary:', message.message); + if (message.ids) { + console.log('Updated translation IDs:', message.ids); + } + } else { + console.log('Something went wrong while pushing translations to Localess'); + } }); diff --git a/packages/cli/src/models/translations.ts b/packages/cli/src/models/translations.ts index 5ff209c..f0a3149 100644 --- a/packages/cli/src/models/translations.ts +++ b/packages/cli/src/models/translations.ts @@ -15,3 +15,8 @@ export enum TranslationUpdateType { ADD_MISSING = 'add-missing', UPDATE_EXISTING = 'update-existing', } + +export type TranslationUpdateResponse = { + message: string; + ids?: string[]; +} From f85dbe226faa40718f730801da89fc7b45eaebaf Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Wed, 18 Feb 2026 09:36:47 +0100 Subject: [PATCH 14/39] Add Translation Draft version fetch --- packages/cli/src/client.ts | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/client.ts b/packages/cli/src/client.ts index 3de72d5..ae16453 100644 --- a/packages/cli/src/client.ts +++ b/packages/cli/src/client.ts @@ -82,6 +82,14 @@ export type ContentFetchParams = { resolveLink?: boolean; } +export type TranslationFetchParams = { + /** + * Translation version to fetch, leave empty for 'published' or 'draft' for the latest draft. + * Overrides the version set in the client options. + */ + version?: 'draft' | string; +} + export interface LocalessClient { /** * Get space information @@ -115,8 +123,10 @@ export interface LocalessClient { /** * Get translations for the given locale * @param locale{string} - Locale identifier (ISO 639-1) + * @param params{ContentFetchParams} - Fetch parameters + * @returns {Promise} */ - getTranslations(locale: string): Promise; + getTranslations(locale: string, params?: TranslationFetchParams): Promise; /** * Update translations for the given locale @@ -337,11 +347,21 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { } }, - async getTranslations(locale: string): Promise { + async getTranslations(locale: string, params?: TranslationFetchParams): Promise { if (options.debug) { console.log(LOG_GROUP, 'getTranslations() locale : ', locale); + console.log(LOG_GROUP, 'getTranslations() params : ', JSON.stringify(params)); + } + let version = ''; + // Options + if (options?.version && options.version == 'draft') { + version = `&version=${options.version}`; + } + // Params + if (params?.version && params.version == 'draft') { + version = `&version=${params.version}`; } - let url = `${options.origin}/api/v1/spaces/${options.spaceId}/translations/${locale}?token=${options.token}`; + let url = `${options.origin}/api/v1/spaces/${options.spaceId}/translations/${locale}?token=${options.token}${version}`; if (options.debug) { console.log(LOG_GROUP, 'getTranslations fetch url : ', url); } From d8e91ce9ec9ca6037adcaabcb864fa552cbeb2bb Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Fri, 20 Feb 2026 09:02:15 +0100 Subject: [PATCH 15/39] Add fetch retry --- packages/cli/src/client.ts | 58 ++++++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/packages/cli/src/client.ts b/packages/cli/src/client.ts index ae16453..999194a 100644 --- a/packages/cli/src/client.ts +++ b/packages/cli/src/client.ts @@ -40,6 +40,14 @@ export type LocalessClientOptions = { * Set to false to disable caching. */ cacheTTL?: number | false; // in milliseconds + /** + * Number of times to retry failed fetch requests (network errors or 5xx). Default: 3 + */ + retryCount?: number; + /** + * Delay in ms between retries. Default: 500ms + */ + retryDelay?: number; } export type LinksFetchParams = { @@ -150,6 +158,40 @@ export interface LocalessClient { const LOG_GROUP = `${FG_BLUE}[Localess:Client]${RESET}` +/** + * Helper: fetch with retry logic + */ +async function fetchWithRetry(url: string, options: RequestInit, retryCount: number = 3, retryDelay: number = 500, debug?: boolean): Promise { + let attempt = 0; + let lastError: any; + while (attempt <= retryCount) { + try { + const response = await fetch(url, options); + // Only retry on network error or 5xx + if (!response.ok && response.status >= 500) { + if (debug) { + console.log(LOG_GROUP, `fetchWithRetry: HTTP ${response.status} on attempt ${attempt + 1}`); + } + lastError = new Error(`HTTP ${response.status}`); + // fall through to retry + } else { + return response; + } + } catch (err) { + if (debug) { + console.log(LOG_GROUP, `fetchWithRetry: network error on attempt ${attempt + 1}`, err); + } + lastError = err; + // fall through to retry + } + attempt++; + if (attempt <= retryCount) { + await new Promise(res => setTimeout(res, retryDelay)); + } + } + throw lastError; +} + /** * Create a Localess API Client * @param {LocalessClientOptions} options connection details @@ -191,7 +233,7 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { } try { - const response = await fetch(url, fetchOptions) + const response = await fetchWithRetry(url, fetchOptions, options.retryCount, options.retryDelay, options.debug); if (options.debug) { console.log(LOG_GROUP, 'getSpace status : ', response.status); } @@ -237,7 +279,7 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { } try { - const response = await fetch(url, fetchOptions) + const response = await fetchWithRetry(url, fetchOptions, options.retryCount, options.retryDelay, options.debug); if (options.debug) { console.log(LOG_GROUP, 'getLinks status : ', response.status); } @@ -284,7 +326,7 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { } try { - const response = await fetch(url, fetchOptions) + const response = await fetchWithRetry(url, fetchOptions, options.retryCount, options.retryDelay, options.debug); if (options.debug) { console.log(LOG_GROUP, 'getContentBySlug status : ', response.status); } @@ -331,7 +373,7 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { } try { - const response = await fetch(url, fetchOptions) + const response = await fetchWithRetry(url, fetchOptions, options.retryCount, options.retryDelay, options.debug); if (options.debug) { console.log(LOG_GROUP, 'getContentById status : ', response.status); } @@ -375,7 +417,7 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { } try { - const response = await fetch(url, fetchOptions) + const response = await fetchWithRetry(url, fetchOptions, options.retryCount, options.retryDelay, options.debug); if (options.debug) { console.log(LOG_GROUP, 'getTranslations status : ', response.status); } @@ -406,14 +448,14 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { values, } try { - const response = await fetch(url, { + const response = await fetchWithRetry(url, { method: 'POST', headers: { 'X-API-KEY': options.token, ...fetchOptions.headers }, body: JSON.stringify(body), - }); + }, options.retryCount, options.retryDelay, options.debug); if (options.debug) { console.log(LOG_GROUP, 'updateTranslations status : ', response.status); } @@ -441,7 +483,7 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { } try { - const response = await fetch(url, fetchOptions) + const response = await fetchWithRetry(url, fetchOptions, options.retryCount, options.retryDelay, options.debug); if (options.debug) { console.log(LOG_GROUP, 'getOpenApi status : ', response.status); } From c1a30630ae981029a371923d950ff564e935457b Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Fri, 20 Feb 2026 23:18:49 +0100 Subject: [PATCH 16/39] update Type command --- .../cli/src/commands/types/generate/index.ts | 49 +++++++++++++++++++ packages/cli/src/commands/types/index.ts | 45 +---------------- 2 files changed, 51 insertions(+), 43 deletions(-) create mode 100644 packages/cli/src/commands/types/generate/index.ts diff --git a/packages/cli/src/commands/types/generate/index.ts b/packages/cli/src/commands/types/generate/index.ts new file mode 100644 index 0000000..07e590c --- /dev/null +++ b/packages/cli/src/commands/types/generate/index.ts @@ -0,0 +1,49 @@ +import {Command} from "commander"; +import {localessClient} from "../../../client"; +import {getSession} from "../../../session"; +import openapiTS, { astToString } from "openapi-typescript"; +import {join} from "node:path"; +import process from "node:process"; +import {DEFAULT_CONFIG_DIR, writeFile} from "../../../file"; + +const TYPES_PATH = join(process.cwd(), DEFAULT_CONFIG_DIR, 'localess.d.ts'); + +type TypesOptions = { + file: string; +}; + +export const typesGenerateCommand = new Command('generate') + .description('Generate types for your schemas') + .option('-f, --file ', 'Path to the file where to save the generated types. Default is .localess/localess.d.ts', TYPES_PATH) + .action(async (options: TypesOptions) => { + console.log('Types in with options:', options); + + const session = await getSession() + if (!session.isLoggedIn) { + console.error('Not logged in'); + console.error('Please log in first using "localess login" command'); + return; + } + const client = localessClient({ + origin: session.origin, + spaceId: session.space, + token: session.token, + }); + + console.log('Fetching OpenAPI specification from Localess...'); + const specification = await client.getOpenApi(); + console.log('Generating types from OpenAPI specification...'); + try { + const minimalSpec = { + openapi: '3.0.0', + info: { title: 'Schemas Only', version: '1.0.0' }, + components: { schemas: specification.components?.schemas || {} }, + }; + const ast = await openapiTS(minimalSpec, {exportType: true, rootTypes: true, rootTypesNoSchemaPrefix: true}) + const contents = astToString(ast); + await writeFile(options.file, contents); + console.log(`Types generated successfully at ${options.file}`); + } catch (e) { + console.error(e); + } + }); diff --git a/packages/cli/src/commands/types/index.ts b/packages/cli/src/commands/types/index.ts index 88ed197..d3970c9 100644 --- a/packages/cli/src/commands/types/index.ts +++ b/packages/cli/src/commands/types/index.ts @@ -1,48 +1,7 @@ import {Command} from "commander"; -import {localessClient} from "../../client"; -import {getSession} from "../../session"; -import openapiTS, { astToString } from "openapi-typescript"; -import {join} from "node:path"; -import process from "node:process"; -import {DEFAULT_CONFIG_DIR, writeFile} from "../../file"; - -const TYPES_PATH = join(process.cwd(), DEFAULT_CONFIG_DIR, 'localess.d.ts'); - -type TypesOptions = { - -}; +import {typesGenerateCommand} from "./generate"; export const typesCommand = new Command('types') .description('Generate types for your schemas') - .action(async (options: TypesOptions) => { - console.log('Types in with options:', options); - - const session = await getSession() - if (!session.isLoggedIn) { - console.error('Not logged in'); - console.error('Please log in first using "localess login" command'); - return; - } - const client = localessClient({ - origin: session.origin, - spaceId: session.space, - token: session.token, - }); + .addCommand(typesGenerateCommand); - console.log('Fetching OpenAPI specification from Localess...'); - const specification = await client.getOpenApi(); - console.log('Generating types from OpenAPI specification...'); - try { - const minimalSpec = { - openapi: '3.0.0', - info: { title: 'Schemas Only', version: '1.0.0' }, - components: { schemas: specification.components?.schemas || {} }, - }; - const ast = await openapiTS(minimalSpec, {exportType: true, rootTypes: true, rootTypesNoSchemaPrefix: true}) - const contents = astToString(ast); - await writeFile(TYPES_PATH, contents); - console.log(`Types generated successfully at ${TYPES_PATH}`); - } catch (e) { - console.error(e); - } - }); From 42272ede7b6c67d0c90a9194d1a2d6850e046120 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sat, 21 Feb 2026 23:09:54 +0100 Subject: [PATCH 17/39] Add Translations Pull --- .../cli/src/commands/translations/index.ts | 4 +- .../src/commands/translations/pull/index.ts | 49 +++++++++++++++++++ .../src/commands/translations/push/index.ts | 16 +++--- packages/cli/src/models/translations.ts | 5 ++ 4 files changed, 67 insertions(+), 7 deletions(-) create mode 100644 packages/cli/src/commands/translations/pull/index.ts diff --git a/packages/cli/src/commands/translations/index.ts b/packages/cli/src/commands/translations/index.ts index 6c6b0e1..7658cd2 100644 --- a/packages/cli/src/commands/translations/index.ts +++ b/packages/cli/src/commands/translations/index.ts @@ -1,6 +1,8 @@ import {Command} from "commander"; import {translationsPushCommand} from "./push"; +import {translationsPullCommand} from "./pull"; export const translationsCommand = new Command('translations') .description('Manage translations') - .addCommand(translationsPushCommand); + .addCommand(translationsPushCommand) + .addCommand(translationsPullCommand); diff --git a/packages/cli/src/commands/translations/pull/index.ts b/packages/cli/src/commands/translations/pull/index.ts new file mode 100644 index 0000000..e584b12 --- /dev/null +++ b/packages/cli/src/commands/translations/pull/index.ts @@ -0,0 +1,49 @@ +import {Command} from "commander"; +import {getSession} from "../../../session"; +import {localessClient} from "../../../client"; +import {TranslationFileFormat} from "../../../models"; +import {writeFile} from "../../../file"; +import {dotToNestedObject} from "../../../utils"; + +export type TranslationsPullOptions = { + path: string; + format: TranslationFileFormat; +} + +export const translationsPullCommand = new Command('pull') + .argument('', 'Locale to pull') + .description('Pull locale translations from Localess') + .requiredOption('-p, --path ', 'Path where the translations file will be saved') + .option('-f, --format ', `File format. Possible values are : ${Object.values(TranslationFileFormat)}`, TranslationFileFormat.FLAT) + .action(async (locale: string, options: TranslationsPullOptions) => { + console.log('Pulling translations with arguments:', locale); + console.log('Pulling translations with options:', options); + if (!Object.values(TranslationFileFormat).includes(options.format)) { + console.error('Invalid format provided. Possible values are :', Object.values(TranslationFileFormat)); + return; + } + + const session = await getSession() + if (!session.isLoggedIn) { + console.error('Not logged in'); + console.error('Please log in first using "localess login" command'); + return; + } + const client = localessClient({ + origin: session.origin, + spaceId: session.space, + token: session.token, + }); + + console.log('Pulling translations from Localess for locale:', locale); + const translations = await client.getTranslations(locale) + + console.log('Saving translations in file:', options.path); + if (options.format === TranslationFileFormat.FLAT) { + await writeFile(options.path, JSON.stringify(translations, null, 2)); + } else if (options.format === TranslationFileFormat.NESTED) { + const nestedTranslations = dotToNestedObject(translations); + await writeFile(options.path, JSON.stringify(nestedTranslations, null, 2)); + } + console.log('Successfully saved translations from Localess'); + }); diff --git a/packages/cli/src/commands/translations/push/index.ts b/packages/cli/src/commands/translations/push/index.ts index c9e56c5..1611150 100644 --- a/packages/cli/src/commands/translations/push/index.ts +++ b/packages/cli/src/commands/translations/push/index.ts @@ -1,19 +1,21 @@ import {Command} from "commander"; import {getSession} from "../../../session"; import {localessClient} from "../../../client"; -import {Translations, TranslationUpdateType} from "../../../models"; +import {TranslationFileFormat, Translations, TranslationUpdateType} from "../../../models"; import {readFile} from "../../../file"; import {zLocaleTranslationsSchema, zTranslationUpdateTypeSchema} from "../../../models/translation.zod"; export type TranslationsPushOptions = { - file: string; + path: string; + format: TranslationFileFormat; type: TranslationUpdateType } export const translationsPushCommand = new Command('push') .argument('', 'Locale to push') .description('Push locale translations to Localess') - .requiredOption('-f, --file ', 'Path to the translations file to push') + .requiredOption('-p, --path ', 'Path to the translations file to push') + .option('-f, --format ', `File format. Possible values are : ${Object.values(TranslationFileFormat)}`, TranslationFileFormat.FLAT) .option('-t, --type ', `Push type. Possible values are : ${Object.values(TranslationUpdateType)}`, TranslationUpdateType.ADD_MISSING) .action(async (locale: string, options: TranslationsPushOptions) => { console.log('Pushing translations with arguments:', locale); @@ -34,9 +36,11 @@ export const translationsPushCommand = new Command('push') spaceId: session.space, token: session.token, }); - - console.log('Reading translations file from:', options.file); - const fileContent = await readFile(options.file); + if (options.format === TranslationFileFormat.NESTED) { + console.error('Nested format is not implemented yet. Please use flat format for now.'); + } + console.log('Reading translations file from:', options.path); + const fileContent = await readFile(options.path); const translationValues: Translations = JSON.parse(fileContent); const pResult = zLocaleTranslationsSchema.safeParse(translationValues) if (!pResult.success) { diff --git a/packages/cli/src/models/translations.ts b/packages/cli/src/models/translations.ts index f0a3149..0b9bd09 100644 --- a/packages/cli/src/models/translations.ts +++ b/packages/cli/src/models/translations.ts @@ -16,6 +16,11 @@ export enum TranslationUpdateType { UPDATE_EXISTING = 'update-existing', } +export enum TranslationFileFormat { + FLAT = 'flat', + NESTED = 'nested', +} + export type TranslationUpdateResponse = { message: string; ids?: string[]; From 355307039e6fe588b2abacf80a975d21d7f843f3 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sat, 21 Feb 2026 23:41:28 +0100 Subject: [PATCH 18/39] Update Readme --- packages/cli/README.md | 34 ++++++++++++++++--- .../cli/src/commands/types/generate/index.ts | 8 ++--- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/packages/cli/README.md b/packages/cli/README.md index 5bf083a..4793eb1 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -13,8 +13,8 @@ A powerful CLI tool to interact with your Localess spaces. ## Features - 🔐 **Authentication** - Secure login system and CI environments. -- 🛡️ **Type Safety** - Generate TypeScript type definitions for your Localess content schemas, ensuring type safety in your frontend applications. - 🌐 **Translations** - Sync and manage translations for your Localess space. +- 🛡️ **Type Safety** - Generate TypeScript type definitions for your Localess content schemas, ensuring type safety in your frontend applications. ## Setup @@ -45,17 +45,43 @@ The CLI provides a `logout` command to clear your authentication token and log y localess logout ``` +## Translations Management + +The CLI provides a `translations` command with `push` and `pull` subcommands to sync and manage translations for your Localess space. + +### Push Translations +Push local translation files to Localess. + +```bash +localess translations push --path [--format ] [--type ] +``` +- ``: Locale code (e.g., `en`) +- `--path`: Path to the translations file to push (required) +- `--format`: File format (`flat` or `nested`, default: `flat`). **Note:** Only `flat` format is currently supported for push. +- `--type`: Push type (`add-missing`, `replace`, etc., default: `add-missing`) + +### Pull Translations +Pull translations from Localess and save locally. + +```bash +localess translations pull --path [--format ] +``` +- ``: Locale code (e.g., `en`) +- `--path`: Path where the translations file will be saved (required) +- `--format`: File format (`flat` or `nested`, default: `flat`) + ## Generate TypeScript Types -The CLI provides a `types` command to generate TypeScript definitions for your Localess content schemas. This command fetches your space's OpenAPI schema and writes a `localess.d.ts` file to your project, allowing for strong typing in your codebase. +The CLI provides a `types generate` command to generate TypeScript definitions for your Localess content schemas. This command fetches your space's OpenAPI schema and writes a `localess.d.ts` file to your project, allowing for strong typing in your codebase. ### Usage ```bash -localess types +localess types generate [--path ] ``` +- `--path`: Path to the file where to save the generated types. Default is `.localess/localess.d.ts` in your current working directory. - You must be logged in (`localess login`) before running this command. -- The generated types file will be saved as `./.localess/localess.d.ts` in your current working directory. +- The generated types file will be saved as `./.localess/localess.d.ts` by default. You can then import these types in your TypeScript project for improved type safety when working with Localess content. diff --git a/packages/cli/src/commands/types/generate/index.ts b/packages/cli/src/commands/types/generate/index.ts index 07e590c..67926e7 100644 --- a/packages/cli/src/commands/types/generate/index.ts +++ b/packages/cli/src/commands/types/generate/index.ts @@ -9,12 +9,12 @@ import {DEFAULT_CONFIG_DIR, writeFile} from "../../../file"; const TYPES_PATH = join(process.cwd(), DEFAULT_CONFIG_DIR, 'localess.d.ts'); type TypesOptions = { - file: string; + path: string; }; export const typesGenerateCommand = new Command('generate') .description('Generate types for your schemas') - .option('-f, --file ', 'Path to the file where to save the generated types. Default is .localess/localess.d.ts', TYPES_PATH) + .option('-p, --path ', 'Path to the file where to save the generated types. Default is .localess/localess.d.ts', TYPES_PATH) .action(async (options: TypesOptions) => { console.log('Types in with options:', options); @@ -41,8 +41,8 @@ export const typesGenerateCommand = new Command('generate') }; const ast = await openapiTS(minimalSpec, {exportType: true, rootTypes: true, rootTypesNoSchemaPrefix: true}) const contents = astToString(ast); - await writeFile(options.file, contents); - console.log(`Types generated successfully at ${options.file}`); + await writeFile(options.path, contents); + console.log(`Types generated successfully at ${options.path}`); } catch (e) { console.error(e); } From 53d860023224492404787015b320a9c95c0cd053 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sun, 22 Feb 2026 01:05:09 +0100 Subject: [PATCH 19/39] Update Push Type --- packages/cli/README.md | 2 +- packages/cli/src/models/translations.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/README.md b/packages/cli/README.md index 4793eb1..f59be21 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -58,7 +58,7 @@ localess translations push --path [--format ] [--ty - ``: Locale code (e.g., `en`) - `--path`: Path to the translations file to push (required) - `--format`: File format (`flat` or `nested`, default: `flat`). **Note:** Only `flat` format is currently supported for push. -- `--type`: Push type (`add-missing`, `replace`, etc., default: `add-missing`) +- `--type`: Push type (`add-missing`, `update-existing`, `delete-missing`. Default: `add-missing`) ### Pull Translations Pull translations from Localess and save locally. diff --git a/packages/cli/src/models/translations.ts b/packages/cli/src/models/translations.ts index 0b9bd09..b464f48 100644 --- a/packages/cli/src/models/translations.ts +++ b/packages/cli/src/models/translations.ts @@ -14,6 +14,7 @@ export type TranslationUpdate = { export enum TranslationUpdateType { ADD_MISSING = 'add-missing', UPDATE_EXISTING = 'update-existing', + DELETE_MISSING = 'delete-missing', } export enum TranslationFileFormat { From 2bed97b64e91c06320ebe47a7ed3a39ea9ec3b05 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sun, 22 Feb 2026 18:42:33 +0100 Subject: [PATCH 20/39] Add Dry Run for Translations push --- packages/cli/src/client.ts | 6 ++++-- packages/cli/src/commands/translations/push/index.ts | 11 +++++++++-- packages/cli/src/models/translations.ts | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/client.ts b/packages/cli/src/client.ts index 999194a..f0b693a 100644 --- a/packages/cli/src/client.ts +++ b/packages/cli/src/client.ts @@ -141,9 +141,10 @@ export interface LocalessClient { * @param locale - Locale identifier (ISO 639-1) * @param type{TranslationUpdateType} - Type of update to perform (add-missing or update-existing) * @param values - Key-Value Object. Where Key is Translation ID and Value is Translated Content + * @param dryRun - If true, the API will return the changes that would be made without actually applying them * @returns {Promise} */ - updateTranslations(locale: string, type: TranslationUpdateType, values: Translations): Promise; + updateTranslations(locale: string, type: TranslationUpdateType, values: Translations, dryRun?: boolean): Promise; /** * Get OpenAPI specification @@ -433,7 +434,7 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { } }, - async updateTranslations(locale: string, type: TranslationUpdateType, values: Translations): Promise { + async updateTranslations(locale: string, type: TranslationUpdateType, values: Translations, dryRun?: boolean): Promise { if (options.debug) { console.log(LOG_GROUP, 'updateTranslations() locale : ', locale); console.log(LOG_GROUP, 'updateTranslations() type : ', type); @@ -446,6 +447,7 @@ export function localessClient(options: LocalessClientOptions): LocalessClient { const body: TranslationUpdate = { type, values, + dryRun, } try { const response = await fetchWithRetry(url, { diff --git a/packages/cli/src/commands/translations/push/index.ts b/packages/cli/src/commands/translations/push/index.ts index 1611150..42ea759 100644 --- a/packages/cli/src/commands/translations/push/index.ts +++ b/packages/cli/src/commands/translations/push/index.ts @@ -8,7 +8,8 @@ import {zLocaleTranslationsSchema, zTranslationUpdateTypeSchema} from "../../../ export type TranslationsPushOptions = { path: string; format: TranslationFileFormat; - type: TranslationUpdateType + type: TranslationUpdateType; + dryRun?: boolean; } export const translationsPushCommand = new Command('push') @@ -17,6 +18,7 @@ export const translationsPushCommand = new Command('push') .requiredOption('-p, --path ', 'Path to the translations file to push') .option('-f, --format ', `File format. Possible values are : ${Object.values(TranslationFileFormat)}`, TranslationFileFormat.FLAT) .option('-t, --type ', `Push type. Possible values are : ${Object.values(TranslationUpdateType)}`, TranslationUpdateType.ADD_MISSING) + .option('-dr, --dry-run', 'Preview changes without applying them to Localess') .action(async (locale: string, options: TranslationsPushOptions) => { console.log('Pushing translations with arguments:', locale); console.log('Pushing translations with options:', options); @@ -36,6 +38,11 @@ export const translationsPushCommand = new Command('push') spaceId: session.space, token: session.token, }); + + if (options.dryRun) { + console.warn('Dry run mode enabled: No changes will be made.'); + } + if (options.format === TranslationFileFormat.NESTED) { console.error('Nested format is not implemented yet. Please use flat format for now.'); } @@ -48,7 +55,7 @@ export const translationsPushCommand = new Command('push') return; } console.log('Pushing translations to Localess with locale:', locale, 'and type:', options.type); - const message = await client.updateTranslations(locale, options.type, translationValues); + const message = await client.updateTranslations(locale, options.type, translationValues, options.dryRun); if (message) { console.log('Successfully pushed translations to Localess'); console.log('Summary:', message.message); diff --git a/packages/cli/src/models/translations.ts b/packages/cli/src/models/translations.ts index b464f48..5317b96 100644 --- a/packages/cli/src/models/translations.ts +++ b/packages/cli/src/models/translations.ts @@ -7,6 +7,7 @@ export interface Translations { } export type TranslationUpdate = { + dryRun?: boolean; type: TranslationUpdateType; values: Translations; } From 01522e00443b7bba8b7e38cfa74cc5a1308be6e5 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sun, 22 Feb 2026 18:46:57 +0100 Subject: [PATCH 21/39] Add Dry Run for Translations push --- .../cli/src/commands/translations/push/index.ts | 13 ++++++++----- packages/cli/src/models/translations.ts | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/cli/src/commands/translations/push/index.ts b/packages/cli/src/commands/translations/push/index.ts index 42ea759..b721fbd 100644 --- a/packages/cli/src/commands/translations/push/index.ts +++ b/packages/cli/src/commands/translations/push/index.ts @@ -55,12 +55,15 @@ export const translationsPushCommand = new Command('push') return; } console.log('Pushing translations to Localess with locale:', locale, 'and type:', options.type); - const message = await client.updateTranslations(locale, options.type, translationValues, options.dryRun); - if (message) { + const response = await client.updateTranslations(locale, options.type, translationValues, options.dryRun); + if (response) { + if (response.dryRun) { + console.log('Dry run results:'); + } console.log('Successfully pushed translations to Localess'); - console.log('Summary:', message.message); - if (message.ids) { - console.log('Updated translation IDs:', message.ids); + console.log('Summary:', response.message); + if (response.ids) { + console.log('Updated translation IDs:', response.ids); } } else { console.log('Something went wrong while pushing translations to Localess'); diff --git a/packages/cli/src/models/translations.ts b/packages/cli/src/models/translations.ts index 5317b96..4d35c18 100644 --- a/packages/cli/src/models/translations.ts +++ b/packages/cli/src/models/translations.ts @@ -26,4 +26,5 @@ export enum TranslationFileFormat { export type TranslationUpdateResponse = { message: string; ids?: string[]; + dryRun?: boolean; } From 44531d778f3c0c0cbba28c46e03a7dea427dfbe4 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Tue, 24 Feb 2026 12:50:44 +0100 Subject: [PATCH 22/39] update Type command --- packages/cli/src/commands/translations/push/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/commands/translations/push/index.ts b/packages/cli/src/commands/translations/push/index.ts index b721fbd..5b8b66a 100644 --- a/packages/cli/src/commands/translations/push/index.ts +++ b/packages/cli/src/commands/translations/push/index.ts @@ -18,7 +18,7 @@ export const translationsPushCommand = new Command('push') .requiredOption('-p, --path ', 'Path to the translations file to push') .option('-f, --format ', `File format. Possible values are : ${Object.values(TranslationFileFormat)}`, TranslationFileFormat.FLAT) .option('-t, --type ', `Push type. Possible values are : ${Object.values(TranslationUpdateType)}`, TranslationUpdateType.ADD_MISSING) - .option('-dr, --dry-run', 'Preview changes without applying them to Localess') + .option('--dry-run', 'Preview changes without applying them to Localess') .action(async (locale: string, options: TranslationsPushOptions) => { console.log('Pushing translations with arguments:', locale); console.log('Pushing translations with options:', options); From ef03ff219f08a55d5f308eaa55ff6ac7746b6659 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sat, 7 Mar 2026 16:49:09 +0100 Subject: [PATCH 23/39] Update References --- package-lock.json | 243 ++++++++++----------- packages/client/package.json | 1 - packages/react/package.json | 38 ++-- packages/react/src/localess-componenet.tsx | 9 +- 4 files changed, 141 insertions(+), 150 deletions(-) diff --git a/package-lock.json b/package-lock.json index d4be3c4..84c2b2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -946,9 +946,9 @@ "license": "MIT" }, "node_modules/@tiptap/core": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-3.18.0.tgz", - "integrity": "sha512-Gczd4GbK1DNgy/QUPElMVozoa0GW9mW8E31VIi7Q4a9PHHz8PcrxPmuWwtJ2q0PF8MWpOSLuBXoQTWaXZRPRnQ==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-3.20.1.tgz", + "integrity": "sha512-SwkPEWIfaDEZjC8SEIi4kZjqIYUbRgLUHUuQezo5GbphUNC8kM1pi3C3EtoOPtxXrEbY6e4pWEzW54Pcrd+rVA==", "license": "MIT", "peer": true, "funding": { @@ -956,52 +956,52 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/pm": "^3.18.0" + "@tiptap/pm": "^3.20.1" } }, "node_modules/@tiptap/extension-bold": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-3.18.0.tgz", - "integrity": "sha512-xUgOvHCdGXh9Lfxd7DtgsSr0T/egIwBllWHIBWDjQEQQ0b+ICn+0+i703btHMB4hjdduZtgVDrhK8jAW3U6swA==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-3.20.1.tgz", + "integrity": "sha512-fz++Qv6Rk/Hov0IYG/r7TJ1Y4zWkuGONe0UN5g0KY32NIMg3HeOHicbi4xsNWTm9uAOl3eawWDkezEMrleObMw==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0" + "@tiptap/core": "^3.20.1" } }, "node_modules/@tiptap/extension-bullet-list": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-3.18.0.tgz", - "integrity": "sha512-8sEpY0nxAGGFDYlF+WVFPKX00X2dAAjmoi0+2eWvK990PdQqwXrQsRs7pkUbpE2mDtATV8+GlDXk9KDkK/ZXhA==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-3.20.1.tgz", + "integrity": "sha512-mbrlvOZo5OF3vLhp+3fk9KuL/6J/wsN0QxF6ZFRAHzQ9NkJdtdfARcBeBnkWXGN8inB6YxbTGY1/E4lmBkOpOw==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-list": "^3.18.0" + "@tiptap/extension-list": "^3.20.1" } }, "node_modules/@tiptap/extension-code": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-3.18.0.tgz", - "integrity": "sha512-0SU53O0NRmdtRM2Hgzm372dVoHjs2F40o/dtB7ls4kocf4W89FyWeC2R6ZsFQqcXisNh9RTzLtYfbNyizGuZIw==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-3.20.1.tgz", + "integrity": "sha512-509DHINIA/Gg+eTG7TEkfsS8RUiPLH5xZNyLRT0A1oaoaJmECKfrV6aAm05IdfTyqDqz6LW5pbnX6DdUC4keug==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0" + "@tiptap/core": "^3.20.1" } }, "node_modules/@tiptap/extension-code-block": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-3.18.0.tgz", - "integrity": "sha512-fCx1oT95ikGfoizw+XCjeglQxlLK4lWgUcB4Dcn5TdaCoFBQMEaZs7Q0jVajxxxULnyArkg60uarc1ac/IF2Hw==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-3.20.1.tgz", + "integrity": "sha512-vKejwBq+Nlj4Ybd3qOyDxIQKzYymdNH+8eXkKwGShk2nfLJIxq69DCyGvmuHgipIO1qcYPJ149UNpGN+YGcdmA==", "license": "MIT", "peer": true, "funding": { @@ -1009,83 +1009,83 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0", - "@tiptap/pm": "^3.18.0" + "@tiptap/core": "^3.20.1", + "@tiptap/pm": "^3.20.1" } }, "node_modules/@tiptap/extension-code-block-lowlight": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block-lowlight/-/extension-code-block-lowlight-3.18.0.tgz", - "integrity": "sha512-euUvh9r1KNSua9X4VdMS6lcWgUkcd0YznCFhp4b5gSqT5/5F7tGlvEg5mNpBeNhOIreDQV6zfBc7HvLfh7cLEA==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block-lowlight/-/extension-code-block-lowlight-3.20.1.tgz", + "integrity": "sha512-QJXZGN43HArGNl5HeiPF1fXZZs6FWJwG3wTr9v+OwsM8EX3ixyblIoeY0/nmFBlQqci49ZA/KfCqVwfGNlRj5A==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0", - "@tiptap/extension-code-block": "^3.18.0", - "@tiptap/pm": "^3.18.0", + "@tiptap/core": "^3.20.1", + "@tiptap/extension-code-block": "^3.20.1", + "@tiptap/pm": "^3.20.1", "highlight.js": "^11", "lowlight": "^2 || ^3" } }, "node_modules/@tiptap/extension-document": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-3.18.0.tgz", - "integrity": "sha512-e0hOGrjTMpCns8IC5p+c5CEiE1BBmFBFL+RpIxU/fjT2SaZ7q2xsFguBu94lQDT0cD6fdZokFRpGwEMxZNVGCg==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-3.20.1.tgz", + "integrity": "sha512-9vrqdGmRV7bQCSY3NLgu7UhIwgOCDp4sKqMNsoNRX0aZ021QQMTvBQDPkiRkCf7MNsnWrNNnr52PVnULEn3vFQ==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0" + "@tiptap/core": "^3.20.1" } }, "node_modules/@tiptap/extension-heading": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-3.18.0.tgz", - "integrity": "sha512-MTamVnYsFWVndLSq5PRQ7ZmbF6AExsFS9uIvGtUAwuhzvR4of/WHh6wpvWYjA+BLXTWRrfuGHaZTl7UXBN13fg==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-3.20.1.tgz", + "integrity": "sha512-unudyfQP6FxnyWinxvPqe/51DG91J6AaJm666RnAubgYMCgym+33kBftx4j4A6qf+ddWYbD00thMNKOnVLjAEQ==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0" + "@tiptap/core": "^3.20.1" } }, "node_modules/@tiptap/extension-history": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-3.18.0.tgz", - "integrity": "sha512-xIOxVPmQqqfVzt3zLTRahjTX0pAnfNVqIThYyNCP9/cgIjLJ8QuMjczurjVtVYHWdt6Fr0+d5KYUU6EmcyAmQQ==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-3.20.1.tgz", + "integrity": "sha512-ejETpNSByEZd6CtPIwOtACwG+FiCm0FD5hi/qMA01xWFkEO20B2EyGpc4NfKMQEfjbVOi+QY1QlXjqJXgOEx4w==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extensions": "^3.18.0" + "@tiptap/extensions": "^3.20.1" } }, "node_modules/@tiptap/extension-italic": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-3.18.0.tgz", - "integrity": "sha512-1C4nB08psiRo0BPxAbpYq8peUOKnjQWtBCLPbE6B9ToTK3vmUk0AZTqLO11FvokuM1GF5l2Lg3sKrKFuC2hcjQ==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-3.20.1.tgz", + "integrity": "sha512-ZYRX13Kt8tR8JOzSXirH3pRpi8x30o7LHxZY58uXBdUvr3tFzOkh03qbN523+diidSVeHP/aMd/+IrplHRkQug==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0" + "@tiptap/core": "^3.20.1" } }, "node_modules/@tiptap/extension-link": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-link/-/extension-link-3.18.0.tgz", - "integrity": "sha512-1J28C4+fKAMQi7q/UsTjAmgmKTnzjExXY98hEBneiVzFDxqF69n7+Vb7nVTNAIhmmJkZMA0DEcMhSiQC/1/u4A==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-link/-/extension-link-3.20.1.tgz", + "integrity": "sha512-oYTTIgsQMqpkSnJAuAc+UtIKMuI4lv9e1y4LfI1iYm6NkEUHhONppU59smhxHLzb3Ww7YpDffbp5IgDTAiJztA==", "license": "MIT", "dependencies": { "linkifyjs": "^4.3.2" @@ -1095,14 +1095,14 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0", - "@tiptap/pm": "^3.18.0" + "@tiptap/core": "^3.20.1", + "@tiptap/pm": "^3.20.1" } }, "node_modules/@tiptap/extension-list": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-list/-/extension-list-3.18.0.tgz", - "integrity": "sha512-9lQBo45HNqIFcLEHAk+CY3W51eMMxIJjWbthm2CwEWr4PB3+922YELlvq8JcLH1nVFkBVpmBFmQe/GxgnCkzwQ==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list/-/extension-list-3.20.1.tgz", + "integrity": "sha512-euBRAn0mkV7R2VEE+AuOt3R0j9RHEMFXamPFmtvTo8IInxDClusrm6mJoDjS8gCGAXsQCRiAe1SCQBPgGbOOwg==", "license": "MIT", "peer": true, "funding": { @@ -1110,92 +1110,92 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0", - "@tiptap/pm": "^3.18.0" + "@tiptap/core": "^3.20.1", + "@tiptap/pm": "^3.20.1" } }, "node_modules/@tiptap/extension-list-item": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-3.18.0.tgz", - "integrity": "sha512-auTSt+NXoUnT0xofzFa+FnXsrW1TPdT1OB3U1OqQCIWkumZqL45A8OK9kpvyQsWj/xJ8fy1iZwFlKXPtxjLd2w==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-3.20.1.tgz", + "integrity": "sha512-tzgnyTW82lYJkUnadYbatwkI9dLz/OWRSWuFpQPRje/ItmFMWuQ9c9NDD8qLbXPdEYnvrgSAA+ipCD/1G0qA0Q==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-list": "^3.18.0" + "@tiptap/extension-list": "^3.20.1" } }, "node_modules/@tiptap/extension-ordered-list": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-3.18.0.tgz", - "integrity": "sha512-5bUAfklYLS5o6qvLLfreGyGvD1JKXqOQF0YntLyPuCGrXv7+XjPWQL2BmEf59fOn2UPT2syXLQ1WN5MHTArRzg==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-3.20.1.tgz", + "integrity": "sha512-Y+3Ad7OwAdagqdYwCnbqf7/to5ypD4NnUNHA0TXRCs7cAHRA8AdgPoIcGFpaaSpV86oosNU3yfeJouYeroffog==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/extension-list": "^3.18.0" + "@tiptap/extension-list": "^3.20.1" } }, "node_modules/@tiptap/extension-paragraph": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-3.18.0.tgz", - "integrity": "sha512-uvFhdwiur4NhhUdBmDsajxjGAIlg5qga55fYag2DzOXxIQE2M7/aVMRkRpuJzb88GY4EHSh8rY34HgMK2FJt2Q==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-3.20.1.tgz", + "integrity": "sha512-QFrAtXNyv7JSnomMQc1nx5AnG9mMznfbYJAbdOQYVdbLtAzTfiTuNPNbQrufy5ZGtGaHxDCoaygu2QEfzaKG+Q==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0" + "@tiptap/core": "^3.20.1" } }, "node_modules/@tiptap/extension-strike": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-3.18.0.tgz", - "integrity": "sha512-kl/fa68LZg8NWUqTkRTfgyCx+IGqozBmzJxQDc1zxurrIU+VFptDV9UuZim587sbM2KGjCi/PNPjPGk1Uu0PVg==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-3.20.1.tgz", + "integrity": "sha512-EYgyma10lpsY+rwbVQL9u+gA7hBlKLSMFH7Zgd37FSxukOjr+HE8iKPQQ+SwbGejyDsPlLT8Z5Jnuxo5Ng90Pg==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0" + "@tiptap/core": "^3.20.1" } }, "node_modules/@tiptap/extension-text": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-3.18.0.tgz", - "integrity": "sha512-9TvctdnBCwK/zyTi9kS7nGFNl5OvGM8xE0u38ZmQw5t79JOqJHgOroyqMjw8LHK/1PWrozfNCmsZbpq4IZuKXw==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-3.20.1.tgz", + "integrity": "sha512-7PlIbYW8UenV6NPOXHmv8IcmPGlGx6HFq66RmkJAOJRPXPkTLAiX0N8rQtzUJ6jDEHqoJpaHFEHJw0xzW1yF+A==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0" + "@tiptap/core": "^3.20.1" } }, "node_modules/@tiptap/extension-underline": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-3.18.0.tgz", - "integrity": "sha512-009IeXURNJ/sm1pBqbj+2YQgjQaBtNlJR3dbl6xu49C+qExqCmI7klhKQuwsVVGLR7ahsYlp7d9RlftnhCXIcQ==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-3.20.1.tgz", + "integrity": "sha512-fmHvDKzwCgnZUwRreq8tYkb1YyEwgzZ6QQkAQ0CsCRtvRMqzerr3Duz0Als4i8voZTuGDEL3VR6nAJbLAb/wPg==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0" + "@tiptap/core": "^3.20.1" } }, "node_modules/@tiptap/extensions": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/extensions/-/extensions-3.18.0.tgz", - "integrity": "sha512-uSRIE9HGshBN6NRFR3LX2lZqBLvX92SgU5A9AvUbJD4MqU63E+HdruJnRjsVlX3kPrmbIDowxrzXlUcg3K0USQ==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/extensions/-/extensions-3.20.1.tgz", + "integrity": "sha512-JRc/v+OBH0qLTdvQ7HvHWTxGJH73QOf1MC0R8NhOX2QnAbg2mPFv1h+FjGa2gfLGuCXBdWQomjekWkUKbC4e5A==", "license": "MIT", "peer": true, "funding": { @@ -1203,29 +1203,29 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0", - "@tiptap/pm": "^3.18.0" + "@tiptap/core": "^3.20.1", + "@tiptap/pm": "^3.20.1" } }, "node_modules/@tiptap/html": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/html/-/html-3.18.0.tgz", - "integrity": "sha512-27A+N3im8pKxlirm7lDZRwgku6xMoDuGwt2cP/G59LrCh208G1oR/RTRBAKwrOQLfA1T/fTv08ZRt2enMYnmkw==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/html/-/html-3.20.1.tgz", + "integrity": "sha512-vElmnCWIqIj8DIS1lIxKKlN8pQEZVNiRfh4RZ2TL4tdZDsfS29US2lbgWEeI8lZdgr5C5JuoC/X1Nv+N8tJn6A==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0", - "@tiptap/pm": "^3.18.0", + "@tiptap/core": "^3.20.1", + "@tiptap/pm": "^3.20.1", "happy-dom": "^20.0.2" } }, "node_modules/@tiptap/pm": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-3.18.0.tgz", - "integrity": "sha512-8RoI5gW0xBVCsuxahpK8vx7onAw6k2/uR3hbGBBnH+HocDMaAZKot3nTyY546ij8ospIC1mnQ7k4BhVUZesZDQ==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-3.20.1.tgz", + "integrity": "sha512-6kCiGLvpES4AxcEuOhb7HR7/xIeJWMjZlb6J7e8zpiIh5BoQc7NoRdctsnmFEjZvC19bIasccshHQ7H2zchWqw==", "license": "MIT", "peer": true, "dependencies": { @@ -1254,17 +1254,17 @@ } }, "node_modules/@tiptap/static-renderer": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@tiptap/static-renderer/-/static-renderer-3.18.0.tgz", - "integrity": "sha512-eC0GQ77mgeki224a6+nImfoXikoynfLZKcryw/PJ9LyUdpSy8F3U23jwgQyrfZo+mX6o4Px/eP7mGhaffDW2fA==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/@tiptap/static-renderer/-/static-renderer-3.20.1.tgz", + "integrity": "sha512-zl5zlnQmUlEyfoboqiYm5okXbpT/kO5z7FiJSm+VQ2z22bduipirnQvfGVGDc0puc+IH77w5dhGaNlbKPWbqVA==", "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^3.18.0", - "@tiptap/pm": "^3.18.0", + "@tiptap/core": "^3.20.1", + "@tiptap/pm": "^3.20.1", "react": "^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" } @@ -2168,15 +2168,6 @@ "typescript": "^5.x" } }, - "node_modules/openapi3-ts": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/openapi3-ts/-/openapi3-ts-4.5.0.tgz", - "integrity": "sha512-jaL+HgTq2Gj5jRcfdutgRGLosCy/hT8sQf6VOy+P+g36cZOjI1iukdPnijC+4CmeRzg/jEllJUboEic2FhxhtQ==", - "license": "MIT", - "dependencies": { - "yaml": "^2.8.0" - } - }, "node_modules/orderedmap": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/orderedmap/-/orderedmap-2.1.1.tgz", @@ -3143,7 +3134,10 @@ "version": "2.8.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==", + "dev": true, "license": "ISC", + "optional": true, + "peer": true, "bin": { "yaml": "bin.mjs" }, @@ -3213,9 +3207,6 @@ "name": "@localess/client", "version": "0.9.2", "license": "MIT", - "dependencies": { - "openapi3-ts": "^4.5.0" - }, "devDependencies": { "@types/node": "^20", "tsup": "^8.5.1", @@ -3231,31 +3222,31 @@ "license": "MIT", "dependencies": { "@localess/client": "*", - "@tiptap/extension-bold": "^3.14.0", - "@tiptap/extension-bullet-list": "^3.14.0", - "@tiptap/extension-code": "^3.14.0", - "@tiptap/extension-code-block-lowlight": "^3.14.0", - "@tiptap/extension-document": "^3.14.0", - "@tiptap/extension-heading": "^3.14.0", - "@tiptap/extension-history": "^3.14.0", - "@tiptap/extension-italic": "^3.14.0", - "@tiptap/extension-link": "^3.14.0", - "@tiptap/extension-list-item": "^3.14.0", - "@tiptap/extension-ordered-list": "^3.14.0", - "@tiptap/extension-paragraph": "^3.14.0", - "@tiptap/extension-strike": "^3.14.0", - "@tiptap/extension-text": "^3.14.0", - "@tiptap/extension-underline": "^3.14.0", - "@tiptap/html": "^3.14.0", - "@tiptap/static-renderer": "^3.14.0" + "@tiptap/extension-bold": "^3.20.1", + "@tiptap/extension-bullet-list": "^3.20.1", + "@tiptap/extension-code": "^3.20.1", + "@tiptap/extension-code-block-lowlight": "^3.20.1", + "@tiptap/extension-document": "^3.20.1", + "@tiptap/extension-heading": "^3.20.1", + "@tiptap/extension-history": "^3.20.1", + "@tiptap/extension-italic": "^3.20.1", + "@tiptap/extension-link": "^3.20.1", + "@tiptap/extension-list-item": "^3.20.1", + "@tiptap/extension-ordered-list": "^3.20.1", + "@tiptap/extension-paragraph": "^3.20.1", + "@tiptap/extension-strike": "^3.20.1", + "@tiptap/extension-text": "^3.20.1", + "@tiptap/extension-underline": "^3.20.1", + "@tiptap/html": "^3.20.1", + "@tiptap/static-renderer": "^3.20.1" }, "devDependencies": { - "@types/node": "^20.12.12", + "@types/node": "^20", "@types/react": "^19.0.0", "react": "^19.0.0", "react-dom": "^19.0.0", "tsup": "^8.5.1", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "engines": { "node": ">= 20.0.0" diff --git a/packages/client/package.json b/packages/client/package.json index 158b923..5af0552 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -39,7 +39,6 @@ }, "license": "MIT", "dependencies": { - "openapi3-ts": "^4.5.0" }, "devDependencies": { "@types/node": "^20", diff --git a/packages/react/package.json b/packages/react/package.json index 124de62..55385a7 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -46,31 +46,31 @@ }, "dependencies": { "@localess/client": "*", - "@tiptap/static-renderer": "^3.14.0", - "@tiptap/html": "^3.14.0", - "@tiptap/extension-bold": "^3.14.0", - "@tiptap/extension-italic": "^3.14.0", - "@tiptap/extension-strike": "^3.14.0", - "@tiptap/extension-underline": "^3.14.0", - "@tiptap/extension-document": "^3.14.0", - "@tiptap/extension-text": "^3.14.0", - "@tiptap/extension-paragraph": "^3.14.0", - "@tiptap/extension-history": "^3.14.0", - "@tiptap/extension-list-item": "^3.14.0", - "@tiptap/extension-bullet-list": "^3.14.0", - "@tiptap/extension-ordered-list": "^3.14.0", - "@tiptap/extension-code": "^3.14.0", - "@tiptap/extension-code-block-lowlight": "^3.14.0", - "@tiptap/extension-link": "^3.14.0", - "@tiptap/extension-heading": "^3.14.0" + "@tiptap/static-renderer": "^3.20.1", + "@tiptap/html": "^3.20.1", + "@tiptap/extension-bold": "^3.20.1", + "@tiptap/extension-italic": "^3.20.1", + "@tiptap/extension-strike": "^3.20.1", + "@tiptap/extension-underline": "^3.20.1", + "@tiptap/extension-document": "^3.20.1", + "@tiptap/extension-text": "^3.20.1", + "@tiptap/extension-paragraph": "^3.20.1", + "@tiptap/extension-history": "^3.20.1", + "@tiptap/extension-list-item": "^3.20.1", + "@tiptap/extension-bullet-list": "^3.20.1", + "@tiptap/extension-ordered-list": "^3.20.1", + "@tiptap/extension-code": "^3.20.1", + "@tiptap/extension-code-block-lowlight": "^3.20.1", + "@tiptap/extension-link": "^3.20.1", + "@tiptap/extension-heading": "^3.20.1" }, "devDependencies": { "@types/react": "^19.0.0", - "@types/node": "^20.12.12", + "@types/node": "^20", "react": "^19.0.0", "react-dom": "^19.0.0", "tsup": "^8.5.1", - "typescript": "^5.8.3" + "typescript": "^5.9.3" }, "engines": { "node": ">= 20.0.0" diff --git a/packages/react/src/localess-componenet.tsx b/packages/react/src/localess-componenet.tsx index f72b191..7ac1088 100644 --- a/packages/react/src/localess-componenet.tsx +++ b/packages/react/src/localess-componenet.tsx @@ -1,14 +1,15 @@ import {forwardRef} from "react"; -import {ContentData, Links, localessEditable} from "@localess/client"; +import {ContentData, Links, localessEditable, References} from "@localess/client"; import {FONT_BOLD, FONT_NORMAL} from "./console"; import {getComponent, getFallbackComponent, isSyncEnabled} from "./index"; export type LocalessComponentProps = { data: T links?: Links + references?: References; } -export const LocalessComponent = forwardRef(({data, links, ...restProps}, ref) => { +export const LocalessComponent = forwardRef(({data, links, references, ...restProps}, ref) => { if (!data) { console.error('LocalessComponent property %cdata%c is not provided.', FONT_BOLD, FONT_NORMAL) return
LocalessComponent property data is not provided.
@@ -17,12 +18,12 @@ export const LocalessComponent = forwardRef const Comp = getComponent(data._schema || data.schema); if (Comp) { const attr = isSyncEnabled() ? localessEditable(data) : {}; - return ; + return ; } // Try to use Fallback Component const FallbackComponent = getFallbackComponent() if (FallbackComponent) { - return + return } // Missing Configuration case return ( From 9fae2c045a6924fa09f08e74f49375e4912bf807 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sat, 7 Mar 2026 17:17:03 +0100 Subject: [PATCH 24/39] Update Build --- .github/workflows/dev-publish.yml | 33 +- package-lock.json | 1209 ++++++++++++++++++++++++++++- package.json | 5 +- 3 files changed, 1235 insertions(+), 12 deletions(-) diff --git a/.github/workflows/dev-publish.yml b/.github/workflows/dev-publish.yml index 4dbd082..37424ef 100644 --- a/.github/workflows/dev-publish.yml +++ b/.github/workflows/dev-publish.yml @@ -20,24 +20,41 @@ jobs: - name: Install dependencies run: npm ci - - name: Build all packages - run: npm run build + - name: Find changed packages + id: changed + run: | + # Find changed package.json files in packages/ since last commit on dev + git fetch origin dev --depth=2 + CHANGED=$(git diff --name-only origin/dev...HEAD -- packages/*/package.json | xargs -n1 dirname | sort -u) + echo "changed_packages<> $GITHUB_OUTPUT + echo "$CHANGED" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT - - name: Set snapshot version for all packages + - name: Set snapshot version for changed packages + if: steps.changed.outputs.changed_packages != '' run: | DATE=$(date +"%Y%m%d%H%M%S") - for pkg in packages/*/package.json; do + for pkgdir in ${{ steps.changed.outputs.changed_packages }}; do + pkg="$pkgdir/package.json" jq '.version |= sub("-dev\\.[0-9]+"; "") | .version += "-dev.'"$DATE"'"' $pkg > tmp.$$.json && mv tmp.$$.json $pkg done shell: bash - - name: Publish snapshot to npm with tag 'dev' + - name: Build changed packages + if: steps.changed.outputs.changed_packages != '' + run: | + for pkgdir in ${{ steps.changed.outputs.changed_packages }}; do + npm run build --workspace $pkgdir + done + shell: bash + + - name: Publish changed packages to npm with tag 'dev' + if: steps.changed.outputs.changed_packages != '' env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | - for pkg in packages/*/package.json; do - pkgdir=$(dirname $pkg) - if ! grep -q '"private"\s*:\s*true' $pkg; then + for pkgdir in ${{ steps.changed.outputs.changed_packages }}; do + if ! grep -q '"private"\s*:\s*true' $pkgdir/package.json; then npm publish --tag dev --access public --workspace $pkgdir fi done diff --git a/package-lock.json b/package-lock.json index 84c2b2d..82066db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "playgrounds/*" ], "devDependencies": { + "@changesets/cli": "^2.30.0", "@types/node": "^20.12.12", "tsup": "^8.5.1", "typescript": "^5.8.3", @@ -45,6 +46,258 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/runtime": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", + "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@changesets/apply-release-plan": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.1.0.tgz", + "integrity": "sha512-yq8ML3YS7koKQ/9bk1PqO0HMzApIFNwjlwCnwFEXMzNe8NpzeeYYKCmnhWJGkN8g7E51MnWaSbqRcTcdIxUgnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/config": "^3.1.3", + "@changesets/get-version-range-type": "^0.4.0", + "@changesets/git": "^3.0.4", + "@changesets/should-skip-package": "^0.1.2", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "detect-indent": "^6.0.0", + "fs-extra": "^7.0.1", + "lodash.startcase": "^4.4.0", + "outdent": "^0.5.0", + "prettier": "^2.7.1", + "resolve-from": "^5.0.0", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/assemble-release-plan": { + "version": "6.0.9", + "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.9.tgz", + "integrity": "sha512-tPgeeqCHIwNo8sypKlS3gOPmsS3wP0zHt67JDuL20P4QcXiw/O4Hl7oXiuLnP9yg+rXLQ2sScdV1Kkzde61iSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.3", + "@changesets/should-skip-package": "^0.1.2", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/changelog-git": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@changesets/changelog-git/-/changelog-git-0.2.1.tgz", + "integrity": "sha512-x/xEleCFLH28c3bQeQIyeZf8lFXyDFVn1SgcBiR2Tw/r4IAWlk1fzxCEZ6NxQAjF2Nwtczoen3OA2qR+UawQ8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0" + } + }, + "node_modules/@changesets/cli": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.30.0.tgz", + "integrity": "sha512-5D3Nk2JPqMI1wK25pEymeWRSlSMdo5QOGlyfrKg0AOufrUcjEE3RQgaCpHoBiM31CSNrtSgdJ0U6zL1rLDDfBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/apply-release-plan": "^7.1.0", + "@changesets/assemble-release-plan": "^6.0.9", + "@changesets/changelog-git": "^0.2.1", + "@changesets/config": "^3.1.3", + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.3", + "@changesets/get-release-plan": "^4.0.15", + "@changesets/git": "^3.0.4", + "@changesets/logger": "^0.1.1", + "@changesets/pre": "^2.0.2", + "@changesets/read": "^0.6.7", + "@changesets/should-skip-package": "^0.1.2", + "@changesets/types": "^6.1.0", + "@changesets/write": "^0.4.0", + "@inquirer/external-editor": "^1.0.2", + "@manypkg/get-packages": "^1.1.3", + "ansi-colors": "^4.1.3", + "enquirer": "^2.4.1", + "fs-extra": "^7.0.1", + "mri": "^1.2.0", + "package-manager-detector": "^0.2.0", + "picocolors": "^1.1.0", + "resolve-from": "^5.0.0", + "semver": "^7.5.3", + "spawndamnit": "^3.0.1", + "term-size": "^2.1.0" + }, + "bin": { + "changeset": "bin.js" + } + }, + "node_modules/@changesets/config": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@changesets/config/-/config-3.1.3.tgz", + "integrity": "sha512-vnXjcey8YgBn2L1OPWd3ORs0bGC4LoYcK/ubpgvzNVr53JXV5GiTVj7fWdMRsoKUH7hhhMAQnsJUqLr21EncNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.3", + "@changesets/logger": "^0.1.1", + "@changesets/should-skip-package": "^0.1.2", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1", + "micromatch": "^4.0.8" + } + }, + "node_modules/@changesets/errors": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@changesets/errors/-/errors-0.2.0.tgz", + "integrity": "sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==", + "dev": true, + "license": "MIT", + "dependencies": { + "extendable-error": "^0.1.5" + } + }, + "node_modules/@changesets/get-dependents-graph": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-2.1.3.tgz", + "integrity": "sha512-gphr+v0mv2I3Oxt19VdWRRUxq3sseyUpX9DaHpTUmLj92Y10AGy+XOtV+kbM6L/fDcpx7/ISDFK6T8A/P3lOdQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "picocolors": "^1.1.0", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/get-release-plan": { + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-4.0.15.tgz", + "integrity": "sha512-Q04ZaRPuEVZtA+auOYgFaVQQSA98dXiVe/yFaZfY7hoSmQICHGvP0TF4u3EDNHWmmCS4ekA/XSpKlSM2PyTS2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/assemble-release-plan": "^6.0.9", + "@changesets/config": "^3.1.3", + "@changesets/pre": "^2.0.2", + "@changesets/read": "^0.6.7", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3" + } + }, + "node_modules/@changesets/get-version-range-type": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@changesets/get-version-range-type/-/get-version-range-type-0.4.0.tgz", + "integrity": "sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@changesets/git": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@changesets/git/-/git-3.0.4.tgz", + "integrity": "sha512-BXANzRFkX+XcC1q/d27NKvlJ1yf7PSAgi8JG6dt8EfbHFHi4neau7mufcSca5zRhwOL8j9s6EqsxmT+s+/E6Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@manypkg/get-packages": "^1.1.3", + "is-subdir": "^1.1.1", + "micromatch": "^4.0.8", + "spawndamnit": "^3.0.1" + } + }, + "node_modules/@changesets/logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@changesets/logger/-/logger-0.1.1.tgz", + "integrity": "sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.1.0" + } + }, + "node_modules/@changesets/parse": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@changesets/parse/-/parse-0.4.3.tgz", + "integrity": "sha512-ZDmNc53+dXdWEv7fqIUSgRQOLYoUom5Z40gmLgmATmYR9NbL6FJJHwakcCpzaeCy+1D0m0n7mT4jj2B/MQPl7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0", + "js-yaml": "^4.1.1" + } + }, + "node_modules/@changesets/pre": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-2.0.2.tgz", + "integrity": "sha512-HaL/gEyFVvkf9KFg6484wR9s0qjAXlZ8qWPDkTyKF6+zqjBe/I2mygg3MbpZ++hdi0ToqNUF8cjj7fBy0dg8Ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1" + } + }, + "node_modules/@changesets/read": { + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.6.7.tgz", + "integrity": "sha512-D1G4AUYGrBEk8vj8MGwf75k9GpN6XL3wg8i42P2jZZwFLXnlr2Pn7r9yuQNbaMCarP7ZQWNJbV6XLeysAIMhTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/git": "^3.0.4", + "@changesets/logger": "^0.1.1", + "@changesets/parse": "^0.4.3", + "@changesets/types": "^6.1.0", + "fs-extra": "^7.0.1", + "p-filter": "^2.1.0", + "picocolors": "^1.1.0" + } + }, + "node_modules/@changesets/should-skip-package": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@changesets/should-skip-package/-/should-skip-package-0.1.2.tgz", + "integrity": "sha512-qAK/WrqWLNCP22UDdBTMPH5f41elVDlsNyat180A33dWxuUDyNpg6fPi/FyTZwRriVjg0L8gnjJn2F9XAoF0qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0", + "@manypkg/get-packages": "^1.1.3" + } + }, + "node_modules/@changesets/types": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-6.1.0.tgz", + "integrity": "sha512-rKQcJ+o1nKNgeoYRHKOS07tAMNd3YSN0uHaJOZYjBAgxfV7TUE7JE+z4BzZdQwb5hKaYbayKN5KrYV7ODb2rAA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@changesets/write": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@changesets/write/-/write-0.4.0.tgz", + "integrity": "sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.1.0", + "fs-extra": "^7.0.1", + "human-id": "^4.1.1", + "prettier": "^2.7.1" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.27.2", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz", @@ -487,6 +740,28 @@ "node": ">=18" } }, + "node_modules/@inquirer/external-editor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz", + "integrity": "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^2.1.1", + "iconv-lite": "^0.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", @@ -538,6 +813,116 @@ "resolved": "packages/react", "link": true }, + "node_modules/@manypkg/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.5.5", + "@types/node": "^12.7.1", + "find-up": "^4.1.0", + "fs-extra": "^8.1.0" + } + }, + "node_modules/@manypkg/find-root/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@manypkg/find-root/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@manypkg/get-packages": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.3.tgz", + "integrity": "sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.5.5", + "@changesets/types": "^4.0.1", + "@manypkg/find-root": "^1.1.0", + "fs-extra": "^8.1.0", + "globby": "^11.0.0", + "read-yaml-file": "^1.1.0" + } + }, + "node_modules/@manypkg/get-packages/node_modules/@changesets/types": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-4.1.0.tgz", + "integrity": "sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@manypkg/get-packages/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@redocly/ajv": { "version": "8.17.3", "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.17.3.tgz", @@ -1514,6 +1899,16 @@ "node": ">=6" } }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", @@ -1527,6 +1922,16 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "license": "Python-2.0" }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/assertion-error": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", @@ -1543,6 +1948,19 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "license": "MIT" }, + "node_modules/better-path-resolve": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz", + "integrity": "sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-windows": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/brace-expansion": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", @@ -1552,6 +1970,19 @@ "balanced-match": "^1.0.0" } }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/bundle-require": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz", @@ -1606,6 +2037,13 @@ "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", "license": "MIT" }, + "node_modules/chardet": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", + "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", + "dev": true, + "license": "MIT" + }, "node_modules/chokidar": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", @@ -1662,6 +2100,21 @@ "license": "MIT", "peer": true }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/csstype": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", @@ -1696,6 +2149,16 @@ "node": ">=6" } }, + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/devlop": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", @@ -1710,6 +2173,33 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -1785,6 +2275,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/estree-walker": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", @@ -1805,12 +2309,36 @@ "node": ">=12.0.0" } }, + "node_modules/extendable-error": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", + "integrity": "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "license": "MIT" }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, "node_modules/fast-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", @@ -1827,6 +2355,16 @@ ], "license": "BSD-3-Clause" }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -1845,6 +2383,33 @@ } } }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/fix-dts-default-cjs-exports": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz", @@ -1857,8 +2422,23 @@ "rollup": "^4.34.8" } }, - "node_modules/fsevents": { - "version": "2.3.3", + "node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, @@ -1872,6 +2452,47 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, "node_modules/happy-dom": { "version": "20.4.0", "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-20.4.0.tgz", @@ -1913,6 +2534,43 @@ "node": ">= 14" } }, + "node_modules/human-id": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/human-id/-/human-id-4.1.3.tgz", + "integrity": "sha512-tsYlhAYpjCKa//8rXZ9DqKEawhPoSytweBC2eNvcaDK+57RZLHGqNs3PZTQO6yekLFSuvA6AlnAfrw1uBvtb+Q==", + "dev": true, + "license": "MIT", + "bin": { + "human-id": "dist/cli.js" + } + }, + "node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/index-to-position": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.2.0.tgz", @@ -1925,6 +2583,69 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-subdir": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-subdir/-/is-subdir-1.2.0.tgz", + "integrity": "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "better-path-resolve": "1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, "node_modules/joycon": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", @@ -1968,6 +2689,16 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "license": "MIT" }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/lilconfig": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", @@ -2014,6 +2745,26 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "dev": true, + "license": "MIT" + }, "node_modules/lowlight": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-3.3.0.tgz", @@ -2065,6 +2816,43 @@ "license": "MIT", "peer": true }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", @@ -2090,6 +2878,16 @@ "ufo": "^1.6.1" } }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -2175,6 +2973,85 @@ "license": "MIT", "peer": true }, + "node_modules/outdent": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", + "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/p-filter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", + "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-map": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/package-manager-detector": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.11.tgz", + "integrity": "sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "quansync": "^0.2.7" + } + }, "node_modules/parse-json": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz", @@ -2192,6 +3069,36 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/pathe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", @@ -2218,6 +3125,16 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/pirates": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", @@ -2321,6 +3238,22 @@ } } }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/prosemirror-changeset": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/prosemirror-changeset/-/prosemirror-changeset-2.3.1.tgz", @@ -2544,6 +3477,44 @@ "node": ">=6" } }, + "node_modules/quansync": { + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.11.tgz", + "integrity": "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/antfu" + }, + { + "type": "individual", + "url": "https://github.com/sponsors/sxzz" + } + ], + "license": "MIT" + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/react": { "version": "19.2.4", "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", @@ -2565,6 +3536,46 @@ "react": "^19.2.4" } }, + "node_modules/read-yaml-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", + "integrity": "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.5", + "js-yaml": "^3.6.1", + "pify": "^4.0.1", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/read-yaml-file/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/read-yaml-file/node_modules/js-yaml": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/readdirp": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", @@ -2598,6 +3609,17 @@ "node": ">=8" } }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rollup": { "version": "4.57.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.57.1.tgz", @@ -2650,12 +3672,79 @@ "license": "MIT", "peer": true }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, "node_modules/scheduler": { "version": "0.27.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", "license": "MIT" }, + "node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", @@ -2663,6 +3752,29 @@ "dev": true, "license": "ISC" }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", @@ -2683,6 +3795,24 @@ "node": ">=0.10.0" } }, + "node_modules/spawndamnit": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-3.0.1.tgz", + "integrity": "sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==", + "dev": true, + "license": "SEE LICENSE IN LICENSE", + "dependencies": { + "cross-spawn": "^7.0.5", + "signal-exit": "^4.0.1" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -2697,6 +3827,29 @@ "dev": true, "license": "MIT" }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/sucrase": { "version": "3.35.1", "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", @@ -2732,6 +3885,19 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -2796,6 +3962,19 @@ "node": ">=14.0.0" } }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", @@ -2911,6 +4090,16 @@ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "license": "MIT" }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/vite": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.1.tgz", @@ -3091,6 +4280,22 @@ "node": ">=12" } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/why-is-node-running": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", diff --git a/package.json b/package.json index 4862bd0..26cfc2b 100644 --- a/package.json +++ b/package.json @@ -24,10 +24,11 @@ }, "homepage": "https://github.com/Lessify/localess-js#readme", "devDependencies": { + "@changesets/cli": "^2.30.0", "@types/node": "^20.12.12", - "vitest": "^4.0.18", "tsup": "^8.5.1", - "typescript": "^5.8.3" + "typescript": "^5.8.3", + "vitest": "^4.0.18" }, "engines": { "node": ">= 20.0.0" From 9b528124ce73429a37db0c16a5c75ba822071498 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sat, 7 Mar 2026 17:18:23 +0100 Subject: [PATCH 25/39] Update Build --- packages/cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 5a95c24..418727a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@localess/cli", - "version": "0.0.1", + "version": "0.0.2", "description": "Localess Command Line.", "keywords": [ "localess", From 7a4cd9b311ccee6068155a13d7acfa704d63ab0e Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sat, 7 Mar 2026 17:20:56 +0100 Subject: [PATCH 26/39] Update Build --- .github/workflows/dev-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev-publish.yml b/.github/workflows/dev-publish.yml index 37424ef..f6e714a 100644 --- a/.github/workflows/dev-publish.yml +++ b/.github/workflows/dev-publish.yml @@ -23,12 +23,12 @@ jobs: - name: Find changed packages id: changed run: | - # Find changed package.json files in packages/ since last commit on dev git fetch origin dev --depth=2 - CHANGED=$(git diff --name-only origin/dev...HEAD -- packages/*/package.json | xargs -n1 dirname | sort -u) + CHANGED=$(git diff --name-only origin/dev...HEAD -- packages/*/package.json | xargs -r -n1 dirname | sort -u) echo "changed_packages<> $GITHUB_OUTPUT echo "$CHANGED" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT + shell: bash - name: Set snapshot version for changed packages if: steps.changed.outputs.changed_packages != '' From b82e55c89e3e2a6f487698d24f259b28e6267e45 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sat, 7 Mar 2026 17:21:42 +0100 Subject: [PATCH 27/39] Update Build --- packages/cli/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 418727a..d81fbed 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@localess/cli", - "version": "0.0.2", + "version": "0.0.3", "description": "Localess Command Line.", "keywords": [ "localess", From 6aaefd6b9cca26ceea891b2df484385e7892569a Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sat, 7 Mar 2026 17:22:39 +0100 Subject: [PATCH 28/39] Update Build --- packages/cli/src/program.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/program.ts b/packages/cli/src/program.ts index d554ac2..0e28e43 100644 --- a/packages/cli/src/program.ts +++ b/packages/cli/src/program.ts @@ -9,7 +9,7 @@ export const program = new Command(); program .name('Localess CLI') .description('CLI tool for Localess platform management') - .version('0.0.1'); + .version('0.0.2'); program.addCommand(loginCommand) From 1fffe7662991d72fed14941a19b96301e19fe68b Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sat, 7 Mar 2026 17:25:11 +0100 Subject: [PATCH 29/39] Update Build --- .github/workflows/dev-publish.yml | 12 +++++------- packages/cli/package.json | 2 +- packages/cli/src/program.ts | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dev-publish.yml b/.github/workflows/dev-publish.yml index f6e714a..6d1d8e5 100644 --- a/.github/workflows/dev-publish.yml +++ b/.github/workflows/dev-publish.yml @@ -24,14 +24,12 @@ jobs: id: changed run: | git fetch origin dev --depth=2 - CHANGED=$(git diff --name-only origin/dev...HEAD -- packages/*/package.json | xargs -r -n1 dirname | sort -u) - echo "changed_packages<> $GITHUB_OUTPUT - echo "$CHANGED" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT + CHANGED=$(git diff --name-only origin/dev...HEAD -- packages/*/package.json | xargs -r -n1 dirname | sort -u | tr '\n' ' ') + echo "changed_packages=$CHANGED" >> $GITHUB_OUTPUT shell: bash - name: Set snapshot version for changed packages - if: steps.changed.outputs.changed_packages != '' + if: steps.changed.outputs.changed_packages run: | DATE=$(date +"%Y%m%d%H%M%S") for pkgdir in ${{ steps.changed.outputs.changed_packages }}; do @@ -41,7 +39,7 @@ jobs: shell: bash - name: Build changed packages - if: steps.changed.outputs.changed_packages != '' + if: steps.changed.outputs.changed_packages run: | for pkgdir in ${{ steps.changed.outputs.changed_packages }}; do npm run build --workspace $pkgdir @@ -49,7 +47,7 @@ jobs: shell: bash - name: Publish changed packages to npm with tag 'dev' - if: steps.changed.outputs.changed_packages != '' + if: steps.changed.outputs.changed_packages env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | diff --git a/packages/cli/package.json b/packages/cli/package.json index d81fbed..6d994d5 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@localess/cli", - "version": "0.0.3", + "version": "0.0.4", "description": "Localess Command Line.", "keywords": [ "localess", diff --git a/packages/cli/src/program.ts b/packages/cli/src/program.ts index 0e28e43..8739d05 100644 --- a/packages/cli/src/program.ts +++ b/packages/cli/src/program.ts @@ -9,7 +9,7 @@ export const program = new Command(); program .name('Localess CLI') .description('CLI tool for Localess platform management') - .version('0.0.2'); + .version('0.0.4'); program.addCommand(loginCommand) From 65cef472105b4e4205de2c98ce07d684bcaf0a34 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sat, 7 Mar 2026 17:26:59 +0100 Subject: [PATCH 30/39] Update Build --- .github/workflows/dev-publish.yml | 2 +- packages/cli/package.json | 2 +- packages/cli/src/program.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev-publish.yml b/.github/workflows/dev-publish.yml index 6d1d8e5..915e469 100644 --- a/.github/workflows/dev-publish.yml +++ b/.github/workflows/dev-publish.yml @@ -24,7 +24,7 @@ jobs: id: changed run: | git fetch origin dev --depth=2 - CHANGED=$(git diff --name-only origin/dev...HEAD -- packages/*/package.json | xargs -r -n1 dirname | sort -u | tr '\n' ' ') + CHANGED=$(git diff --name-only origin/dev...HEAD -- packages/*/** | awk -F/ '{print $2}' | sort -u | sed 's|^|packages/|' | tr '\n' ' ') echo "changed_packages=$CHANGED" >> $GITHUB_OUTPUT shell: bash diff --git a/packages/cli/package.json b/packages/cli/package.json index 6d994d5..a0f0138 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@localess/cli", - "version": "0.0.4", + "version": "0.0.5", "description": "Localess Command Line.", "keywords": [ "localess", diff --git a/packages/cli/src/program.ts b/packages/cli/src/program.ts index 8739d05..6cf0580 100644 --- a/packages/cli/src/program.ts +++ b/packages/cli/src/program.ts @@ -9,7 +9,7 @@ export const program = new Command(); program .name('Localess CLI') .description('CLI tool for Localess platform management') - .version('0.0.4'); + .version('0.0.5'); program.addCommand(loginCommand) From 03ce0afa51b0e5bf00a894cfcdb751fe0e401f69 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sat, 7 Mar 2026 17:33:02 +0100 Subject: [PATCH 31/39] Update Build --- .github/workflows/dev-publish.yml | 11 +++++++++-- packages/cli/package.json | 2 +- packages/cli/src/program.ts | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dev-publish.yml b/.github/workflows/dev-publish.yml index 915e469..dab0ec1 100644 --- a/.github/workflows/dev-publish.yml +++ b/.github/workflows/dev-publish.yml @@ -23,8 +23,15 @@ jobs: - name: Find changed packages id: changed run: | - git fetch origin dev --depth=2 - CHANGED=$(git diff --name-only origin/dev...HEAD -- packages/*/** | awk -F/ '{print $2}' | sort -u | sed 's|^|packages/|' | tr '\n' ' ') + BEFORE="${{ github.event.before }}" + SHA="${{ github.sha }}" + if [[ "$BEFORE" == "0000000000000000000000000000000000000000" || -z "$BEFORE" ]]; then + # Initial push to branch — treat all packages as changed + CHANGED=$(ls packages/ | sed 's|^|packages/|' | tr '\n' ' ') + else + git fetch --depth=2 origin dev + CHANGED=$(git diff --name-only "$BEFORE" "$SHA" -- 'packages/' | awk -F/ '{print $2}' | sort -u | sed 's|^|packages/|' | tr '\n' ' ') + fi echo "changed_packages=$CHANGED" >> $GITHUB_OUTPUT shell: bash diff --git a/packages/cli/package.json b/packages/cli/package.json index a0f0138..aba1843 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@localess/cli", - "version": "0.0.5", + "version": "0.0.6", "description": "Localess Command Line.", "keywords": [ "localess", diff --git a/packages/cli/src/program.ts b/packages/cli/src/program.ts index 6cf0580..50e1ecb 100644 --- a/packages/cli/src/program.ts +++ b/packages/cli/src/program.ts @@ -9,7 +9,7 @@ export const program = new Command(); program .name('Localess CLI') .description('CLI tool for Localess platform management') - .version('0.0.5'); + .version('0.0.6'); program.addCommand(loginCommand) From 8091d5e5c7f24b656bdb95a60b769a4421d78542 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sat, 7 Mar 2026 17:36:26 +0100 Subject: [PATCH 32/39] Update Build --- package-lock.json | 1207 +--------------------------------- package.json | 1 - packages/client/package.json | 2 +- packages/react/package.json | 2 +- 4 files changed, 3 insertions(+), 1209 deletions(-) diff --git a/package-lock.json b/package-lock.json index 82066db..34c8249 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,6 @@ "playgrounds/*" ], "devDependencies": { - "@changesets/cli": "^2.30.0", "@types/node": "^20.12.12", "tsup": "^8.5.1", "typescript": "^5.8.3", @@ -46,258 +45,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/runtime": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", - "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@changesets/apply-release-plan": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.1.0.tgz", - "integrity": "sha512-yq8ML3YS7koKQ/9bk1PqO0HMzApIFNwjlwCnwFEXMzNe8NpzeeYYKCmnhWJGkN8g7E51MnWaSbqRcTcdIxUgnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/config": "^3.1.3", - "@changesets/get-version-range-type": "^0.4.0", - "@changesets/git": "^3.0.4", - "@changesets/should-skip-package": "^0.1.2", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "detect-indent": "^6.0.0", - "fs-extra": "^7.0.1", - "lodash.startcase": "^4.4.0", - "outdent": "^0.5.0", - "prettier": "^2.7.1", - "resolve-from": "^5.0.0", - "semver": "^7.5.3" - } - }, - "node_modules/@changesets/assemble-release-plan": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.9.tgz", - "integrity": "sha512-tPgeeqCHIwNo8sypKlS3gOPmsS3wP0zHt67JDuL20P4QcXiw/O4Hl7oXiuLnP9yg+rXLQ2sScdV1Kkzde61iSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.3", - "@changesets/should-skip-package": "^0.1.2", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "semver": "^7.5.3" - } - }, - "node_modules/@changesets/changelog-git": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@changesets/changelog-git/-/changelog-git-0.2.1.tgz", - "integrity": "sha512-x/xEleCFLH28c3bQeQIyeZf8lFXyDFVn1SgcBiR2Tw/r4IAWlk1fzxCEZ6NxQAjF2Nwtczoen3OA2qR+UawQ8Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0" - } - }, - "node_modules/@changesets/cli": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.30.0.tgz", - "integrity": "sha512-5D3Nk2JPqMI1wK25pEymeWRSlSMdo5QOGlyfrKg0AOufrUcjEE3RQgaCpHoBiM31CSNrtSgdJ0U6zL1rLDDfBA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/apply-release-plan": "^7.1.0", - "@changesets/assemble-release-plan": "^6.0.9", - "@changesets/changelog-git": "^0.2.1", - "@changesets/config": "^3.1.3", - "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.3", - "@changesets/get-release-plan": "^4.0.15", - "@changesets/git": "^3.0.4", - "@changesets/logger": "^0.1.1", - "@changesets/pre": "^2.0.2", - "@changesets/read": "^0.6.7", - "@changesets/should-skip-package": "^0.1.2", - "@changesets/types": "^6.1.0", - "@changesets/write": "^0.4.0", - "@inquirer/external-editor": "^1.0.2", - "@manypkg/get-packages": "^1.1.3", - "ansi-colors": "^4.1.3", - "enquirer": "^2.4.1", - "fs-extra": "^7.0.1", - "mri": "^1.2.0", - "package-manager-detector": "^0.2.0", - "picocolors": "^1.1.0", - "resolve-from": "^5.0.0", - "semver": "^7.5.3", - "spawndamnit": "^3.0.1", - "term-size": "^2.1.0" - }, - "bin": { - "changeset": "bin.js" - } - }, - "node_modules/@changesets/config": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@changesets/config/-/config-3.1.3.tgz", - "integrity": "sha512-vnXjcey8YgBn2L1OPWd3ORs0bGC4LoYcK/ubpgvzNVr53JXV5GiTVj7fWdMRsoKUH7hhhMAQnsJUqLr21EncNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/errors": "^0.2.0", - "@changesets/get-dependents-graph": "^2.1.3", - "@changesets/logger": "^0.1.1", - "@changesets/should-skip-package": "^0.1.2", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "fs-extra": "^7.0.1", - "micromatch": "^4.0.8" - } - }, - "node_modules/@changesets/errors": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@changesets/errors/-/errors-0.2.0.tgz", - "integrity": "sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==", - "dev": true, - "license": "MIT", - "dependencies": { - "extendable-error": "^0.1.5" - } - }, - "node_modules/@changesets/get-dependents-graph": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-2.1.3.tgz", - "integrity": "sha512-gphr+v0mv2I3Oxt19VdWRRUxq3sseyUpX9DaHpTUmLj92Y10AGy+XOtV+kbM6L/fDcpx7/ISDFK6T8A/P3lOdQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "picocolors": "^1.1.0", - "semver": "^7.5.3" - } - }, - "node_modules/@changesets/get-release-plan": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-4.0.15.tgz", - "integrity": "sha512-Q04ZaRPuEVZtA+auOYgFaVQQSA98dXiVe/yFaZfY7hoSmQICHGvP0TF4u3EDNHWmmCS4ekA/XSpKlSM2PyTS2g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/assemble-release-plan": "^6.0.9", - "@changesets/config": "^3.1.3", - "@changesets/pre": "^2.0.2", - "@changesets/read": "^0.6.7", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3" - } - }, - "node_modules/@changesets/get-version-range-type": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@changesets/get-version-range-type/-/get-version-range-type-0.4.0.tgz", - "integrity": "sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@changesets/git": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@changesets/git/-/git-3.0.4.tgz", - "integrity": "sha512-BXANzRFkX+XcC1q/d27NKvlJ1yf7PSAgi8JG6dt8EfbHFHi4neau7mufcSca5zRhwOL8j9s6EqsxmT+s+/E6Sw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/errors": "^0.2.0", - "@manypkg/get-packages": "^1.1.3", - "is-subdir": "^1.1.1", - "micromatch": "^4.0.8", - "spawndamnit": "^3.0.1" - } - }, - "node_modules/@changesets/logger": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@changesets/logger/-/logger-0.1.1.tgz", - "integrity": "sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "picocolors": "^1.1.0" - } - }, - "node_modules/@changesets/parse": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@changesets/parse/-/parse-0.4.3.tgz", - "integrity": "sha512-ZDmNc53+dXdWEv7fqIUSgRQOLYoUom5Z40gmLgmATmYR9NbL6FJJHwakcCpzaeCy+1D0m0n7mT4jj2B/MQPl7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0", - "js-yaml": "^4.1.1" - } - }, - "node_modules/@changesets/pre": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-2.0.2.tgz", - "integrity": "sha512-HaL/gEyFVvkf9KFg6484wR9s0qjAXlZ8qWPDkTyKF6+zqjBe/I2mygg3MbpZ++hdi0ToqNUF8cjj7fBy0dg8Ug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/errors": "^0.2.0", - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3", - "fs-extra": "^7.0.1" - } - }, - "node_modules/@changesets/read": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.6.7.tgz", - "integrity": "sha512-D1G4AUYGrBEk8vj8MGwf75k9GpN6XL3wg8i42P2jZZwFLXnlr2Pn7r9yuQNbaMCarP7ZQWNJbV6XLeysAIMhTA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/git": "^3.0.4", - "@changesets/logger": "^0.1.1", - "@changesets/parse": "^0.4.3", - "@changesets/types": "^6.1.0", - "fs-extra": "^7.0.1", - "p-filter": "^2.1.0", - "picocolors": "^1.1.0" - } - }, - "node_modules/@changesets/should-skip-package": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@changesets/should-skip-package/-/should-skip-package-0.1.2.tgz", - "integrity": "sha512-qAK/WrqWLNCP22UDdBTMPH5f41elVDlsNyat180A33dWxuUDyNpg6fPi/FyTZwRriVjg0L8gnjJn2F9XAoF0qw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0", - "@manypkg/get-packages": "^1.1.3" - } - }, - "node_modules/@changesets/types": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@changesets/types/-/types-6.1.0.tgz", - "integrity": "sha512-rKQcJ+o1nKNgeoYRHKOS07tAMNd3YSN0uHaJOZYjBAgxfV7TUE7JE+z4BzZdQwb5hKaYbayKN5KrYV7ODb2rAA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@changesets/write": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@changesets/write/-/write-0.4.0.tgz", - "integrity": "sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@changesets/types": "^6.1.0", - "fs-extra": "^7.0.1", - "human-id": "^4.1.1", - "prettier": "^2.7.1" - } - }, "node_modules/@esbuild/aix-ppc64": { "version": "0.27.2", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz", @@ -740,28 +487,6 @@ "node": ">=18" } }, - "node_modules/@inquirer/external-editor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.3.tgz", - "integrity": "sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==", - "dev": true, - "license": "MIT", - "dependencies": { - "chardet": "^2.1.1", - "iconv-lite": "^0.7.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@types/node": ">=18" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - } - } - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", @@ -813,116 +538,6 @@ "resolved": "packages/react", "link": true }, - "node_modules/@manypkg/find-root": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.5.5", - "@types/node": "^12.7.1", - "find-up": "^4.1.0", - "fs-extra": "^8.1.0" - } - }, - "node_modules/@manypkg/find-root/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@manypkg/find-root/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@manypkg/get-packages": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.3.tgz", - "integrity": "sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.5.5", - "@changesets/types": "^4.0.1", - "@manypkg/find-root": "^1.1.0", - "fs-extra": "^8.1.0", - "globby": "^11.0.0", - "read-yaml-file": "^1.1.0" - } - }, - "node_modules/@manypkg/get-packages/node_modules/@changesets/types": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@changesets/types/-/types-4.1.0.tgz", - "integrity": "sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@manypkg/get-packages/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/@redocly/ajv": { "version": "8.17.3", "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.17.3.tgz", @@ -1899,16 +1514,6 @@ "node": ">=6" } }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", @@ -1922,16 +1527,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "license": "Python-2.0" }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/assertion-error": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", @@ -1948,19 +1543,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "license": "MIT" }, - "node_modules/better-path-resolve": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz", - "integrity": "sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-windows": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/brace-expansion": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", @@ -1970,19 +1552,6 @@ "balanced-match": "^1.0.0" } }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/bundle-require": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz", @@ -2037,13 +1606,6 @@ "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", "license": "MIT" }, - "node_modules/chardet": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", - "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", - "dev": true, - "license": "MIT" - }, "node_modules/chokidar": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", @@ -2100,21 +1662,6 @@ "license": "MIT", "peer": true }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/csstype": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", @@ -2149,16 +1696,6 @@ "node": ">=6" } }, - "node_modules/detect-indent": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", - "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/devlop": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", @@ -2173,33 +1710,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/enquirer": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", - "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "^4.1.1", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -2275,20 +1785,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/estree-walker": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", @@ -2309,36 +1805,12 @@ "node": ">=12.0.0" } }, - "node_modules/extendable-error": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", - "integrity": "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==", - "dev": true, - "license": "MIT" - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "license": "MIT" }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, "node_modules/fast-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", @@ -2355,16 +1827,6 @@ ], "license": "BSD-3-Clause" }, - "node_modules/fastq": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", - "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -2383,33 +1845,6 @@ } } }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/fix-dts-default-cjs-exports": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz", @@ -2422,21 +1857,6 @@ "rollup": "^4.34.8" } }, - "node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2452,47 +1872,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" - }, "node_modules/happy-dom": { "version": "20.4.0", "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-20.4.0.tgz", @@ -2534,43 +1913,6 @@ "node": ">= 14" } }, - "node_modules/human-id": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/human-id/-/human-id-4.1.3.tgz", - "integrity": "sha512-tsYlhAYpjCKa//8rXZ9DqKEawhPoSytweBC2eNvcaDK+57RZLHGqNs3PZTQO6yekLFSuvA6AlnAfrw1uBvtb+Q==", - "dev": true, - "license": "MIT", - "bin": { - "human-id": "dist/cli.js" - } - }, - "node_modules/iconv-lite": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", - "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, "node_modules/index-to-position": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.2.0.tgz", @@ -2583,69 +1925,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-subdir": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-subdir/-/is-subdir-1.2.0.tgz", - "integrity": "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==", - "dev": true, - "license": "MIT", - "dependencies": { - "better-path-resolve": "1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, "node_modules/joycon": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", @@ -2689,16 +1968,6 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "license": "MIT" }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, "node_modules/lilconfig": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", @@ -2745,26 +2014,6 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lodash.startcase": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", - "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", - "dev": true, - "license": "MIT" - }, "node_modules/lowlight": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-3.3.0.tgz", @@ -2816,43 +2065,6 @@ "license": "MIT", "peer": true }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", @@ -2878,16 +2090,6 @@ "ufo": "^1.6.1" } }, - "node_modules/mri": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", - "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -2973,85 +2175,6 @@ "license": "MIT", "peer": true }, - "node_modules/outdent": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", - "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/p-filter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", - "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-map": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-map": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", - "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/package-manager-detector": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.11.tgz", - "integrity": "sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "quansync": "^0.2.7" - } - }, "node_modules/parse-json": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz", @@ -3069,36 +2192,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/pathe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", @@ -3125,16 +2218,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/pirates": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", @@ -3238,22 +2321,6 @@ } } }, - "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, "node_modules/prosemirror-changeset": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/prosemirror-changeset/-/prosemirror-changeset-2.3.1.tgz", @@ -3477,44 +2544,6 @@ "node": ">=6" } }, - "node_modules/quansync": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.11.tgz", - "integrity": "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/antfu" - }, - { - "type": "individual", - "url": "https://github.com/sponsors/sxzz" - } - ], - "license": "MIT" - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/react": { "version": "19.2.4", "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", @@ -3536,46 +2565,6 @@ "react": "^19.2.4" } }, - "node_modules/read-yaml-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", - "integrity": "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.5", - "js-yaml": "^3.6.1", - "pify": "^4.0.1", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/read-yaml-file/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/read-yaml-file/node_modules/js-yaml": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", - "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/readdirp": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", @@ -3609,17 +2598,6 @@ "node": ">=8" } }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, "node_modules/rollup": { "version": "4.57.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.57.1.tgz", @@ -3672,79 +2650,12 @@ "license": "MIT", "peer": true }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true, - "license": "MIT" - }, "node_modules/scheduler": { "version": "0.27.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", "license": "MIT" }, - "node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", @@ -3752,29 +2663,6 @@ "dev": true, "license": "ISC" }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", @@ -3795,24 +2683,6 @@ "node": ">=0.10.0" } }, - "node_modules/spawndamnit": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-3.0.1.tgz", - "integrity": "sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==", - "dev": true, - "license": "SEE LICENSE IN LICENSE", - "dependencies": { - "cross-spawn": "^7.0.5", - "signal-exit": "^4.0.1" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -3827,29 +2697,6 @@ "dev": true, "license": "MIT" }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/sucrase": { "version": "3.35.1", "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", @@ -3885,19 +2732,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/term-size": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", - "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -3962,19 +2796,6 @@ "node": ">=14.0.0" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", @@ -4090,16 +2911,6 @@ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "license": "MIT" }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/vite": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.1.tgz", @@ -4280,22 +3091,6 @@ "node": ">=12" } }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/why-is-node-running": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", @@ -4379,7 +3174,7 @@ }, "packages/cli": { "name": "@localess/cli", - "version": "0.0.1", + "version": "0.0.6", "license": "MIT", "dependencies": { "chalk": "^5.6.2", diff --git a/package.json b/package.json index 26cfc2b..662724b 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ }, "homepage": "https://github.com/Lessify/localess-js#readme", "devDependencies": { - "@changesets/cli": "^2.30.0", "@types/node": "^20.12.12", "tsup": "^8.5.1", "typescript": "^5.8.3", diff --git a/packages/client/package.json b/packages/client/package.json index 5af0552..67a8d00 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@localess/client", - "version": "0.9.2", + "version": "0.9.3", "description": "Universal JavaScript/TypeScript SDK for Localess's API.", "keywords": [ "localess", diff --git a/packages/react/package.json b/packages/react/package.json index 55385a7..9911d62 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@localess/react", - "version": "0.9.2", + "version": "0.9.5", "description": "ReactJS JavaScript/TypeScript SDK for Localess's API.", "keywords": [ "localess", From 0b423a2eace656d0a785f440d3621e3459d470ae Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sat, 7 Mar 2026 17:53:33 +0100 Subject: [PATCH 33/39] Update Documentation --- .github/copilot-instructions.md | 59 ++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 033ff05..efa55de 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -27,15 +27,24 @@ npm run build --workspace=@localess/react npm run build --workspace=@localess/cli ``` -All packages use `tsup` for building with the command: +All packages use `tsup` for building: +- `@localess/client` and `@localess/react`: `tsup src/index.ts --format cjs,esm --dts` → `dist/index.js`, `dist/index.mjs`, `dist/index.d.ts` +- `@localess/cli`: `tsup src/index.ts --format cjs,esm --dts --shims` → ESM only (`dist/index.mjs`), `--shims` adds Node.js polyfills for the CLI executable + +## Test Commands + +Tests only exist in `@localess/cli`. Run from the workspace root: + ```bash -tsup src/index.ts --format cjs,esm --dts -``` +# Run all CLI tests +npm test --workspace=@localess/cli -This generates: -- `dist/index.js` (CommonJS) -- `dist/index.mjs` (ESM) -- `dist/index.d.ts` (TypeScript declarations) +# Run a single test file +npx vitest run packages/cli/src/commands/login/login.test.ts + +# Run tests in watch mode +npx vitest --workspace=@localess/cli +``` ### Requirements @@ -140,8 +149,8 @@ The component: ```tsx const MyComponent = ({ data, links }) => { return ( -
-

{data.title}

+
+

{data.title}

{data.children?.map(child => ( ))} @@ -151,9 +160,10 @@ const MyComponent = ({ data, links }) => { ``` **Visual Editor Integration**: -- `llEditable(content)` - Adds `data-ll-id` and `data-ll-schema` attributes to root element -- `llEditableField(fieldName)` - Adds `data-ll-field` attribute to specific fields +- `localessEditable(content)` - Adds `data-ll-id` and `data-ll-schema` attributes to root element +- `localessEditableField(fieldName)` - Adds `data-ll-field` attribute to specific fields; generic type `T` restricts `fieldName` to valid content keys - Only applied when `enableSync: true` +- `llEditable` / `llEditableField` are deprecated aliases — prefer `localessEditable` / `localessEditableField` - Listen to editor events: `window.localess.on(['input', 'change'], callback)` **Rich Text Rendering**: @@ -180,9 +190,16 @@ resolveAsset(asset) // Returns: {origin}/api/v1/spaces/{spaceId}/assets/{uri} ### CLI Package (@localess/cli) -**Status**: Early development - only `login` command implemented. +**Status**: Early development (v0.0.6). Built with Commander.js. Entry point: `src/index.ts` with shebang `#!/usr/bin/env node`. -Built with Commander.js. Entry point: `src/index.ts` with shebang `#!/usr/bin/env node`. +**Implemented commands**: +- `login --origin --space --token ` — persists credentials to `.localess/credentials.json` +- `logout` — clears stored credentials +- `translations push --path [--format flat|nested] [--type add-missing|replace]` +- `translations pull --path [--format flat|nested]` +- `types generate [--path ]` — generates TypeScript types from OpenAPI schema (default output: `.localess/localess.d.ts`) + +**CLI-specific client** (`src/client.ts`) extends the base client with retry logic (`fetchWithRetry`, 3 retries/500ms delay on 5xx), `getSpace()`, `updateTranslations()`, and `getOpenApi()`. Uses `zod` for input validation and `openapi-typescript` for type generation. ## Content Data Model @@ -220,10 +237,10 @@ components: { ### Editable Attributes Pattern -When `enableSync: true`, always spread editable attributes on the root element and field elements: +When `enableSync: true`, always spread editable attributes on the root element and field elements. Use the preferred (non-deprecated) API: ```tsx -
-

{data.title}

+
+

{data.title}

``` @@ -251,8 +268,9 @@ All packages use dual exports (CJS + ESM): ### Version Management Packages follow semantic versioning: -- `@localess/client` and `@localess/react`: v0.9.2 -- `@localess/cli`: v0.0.1 (early stage) +- `@localess/client`: v0.9.3 +- `@localess/react`: v0.9.5 +- `@localess/cli`: v0.0.6 (early stage) ## Common Patterns @@ -288,16 +306,17 @@ useEffect(() => { } } window.localess.on(['input', 'change'], handler) - return () => window.localess.off(['input', 'change'], handler) } }, []) ``` +Note: `window.localess` only provides `.on()` and `.onChange()` — there is no `.off()` method. + ### Nested Components Pattern Content often has nested structures. Use recursive `LocalessComponent`: ```tsx -
+
{data.sections?.map(section => ( ))} From cf7f2d97f697866ecff6927b8aaea2be52a6c422 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Sun, 8 Mar 2026 23:48:44 +0100 Subject: [PATCH 34/39] update Type command --- package-lock.json | 415 ++++++++++++++++++++++- packages/cli/package.json | 1 + packages/cli/src/commands/login/index.ts | 63 ++-- 3 files changed, 449 insertions(+), 30 deletions(-) diff --git a/package-lock.json b/package-lock.json index 34c8249..0723a88 100644 --- a/package-lock.json +++ b/package-lock.json @@ -487,6 +487,334 @@ "node": ">=18" } }, + "node_modules/@inquirer/ansi": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.3.tgz", + "integrity": "sha512-g44zhR3NIKVs0zUesa4iMzExmZpLUdTLRMCStqX3GE5NT6VkPcxQGJ+uC8tDgBUC/vB1rUhUd55cOf++4NZcmw==", + "license": "MIT", + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + } + }, + "node_modules/@inquirer/checkbox": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-5.1.0.tgz", + "integrity": "sha512-/HjF1LN0a1h4/OFsbGKHNDtWICFU/dqXCdym719HFTyJo9IG7Otr+ziGWc9S0iQuohRZllh+WprSgd5UW5Fw0g==", + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^2.0.3", + "@inquirer/core": "^11.1.5", + "@inquirer/figures": "^2.0.3", + "@inquirer/type": "^4.0.3" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/confirm": { + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.0.8.tgz", + "integrity": "sha512-Di6dgmiZ9xCSUxWUReWTqDtbhXCuG2MQm2xmgSAIruzQzBqNf49b8E07/vbCYY506kDe8BiwJbegXweG8M1klw==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^11.1.5", + "@inquirer/type": "^4.0.3" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/core": { + "version": "11.1.5", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-11.1.5.tgz", + "integrity": "sha512-QQPAX+lka8GyLcZ7u7Nb1h6q72iZ/oy0blilC3IB2nSt1Qqxp7akt94Jqhi/DzARuN3Eo9QwJRvtl4tmVe4T5A==", + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^2.0.3", + "@inquirer/figures": "^2.0.3", + "@inquirer/type": "^4.0.3", + "cli-width": "^4.1.0", + "fast-wrap-ansi": "^0.2.0", + "mute-stream": "^3.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/editor": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-5.0.8.tgz", + "integrity": "sha512-sLcpbb9B3XqUEGrj1N66KwhDhEckzZ4nI/W6SvLXyBX8Wic3LDLENlWRvkOGpCPoserabe+MxQkpiMoI8irvyA==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^11.1.5", + "@inquirer/external-editor": "^2.0.3", + "@inquirer/type": "^4.0.3" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/expand": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-5.0.8.tgz", + "integrity": "sha512-QieW3F1prNw3j+hxO7/NKkG1pk3oz7pOB6+5Upwu3OIwADfPX0oZVppsqlL+Vl/uBHHDSOBY0BirLctLnXwGGg==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^11.1.5", + "@inquirer/type": "^4.0.3" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/external-editor": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-2.0.3.tgz", + "integrity": "sha512-LgyI7Agbda74/cL5MvA88iDpvdXI2KuMBCGRkbCl2Dg1vzHeOgs+s0SDcXV7b+WZJrv2+ERpWSM65Fpi9VfY3w==", + "license": "MIT", + "dependencies": { + "chardet": "^2.1.1", + "iconv-lite": "^0.7.2" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/figures": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.3.tgz", + "integrity": "sha512-y09iGt3JKoOCBQ3w4YrSJdokcD8ciSlMIWsD+auPu+OZpfxLuyz+gICAQ6GCBOmJJt4KEQGHuZSVff2jiNOy7g==", + "license": "MIT", + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + } + }, + "node_modules/@inquirer/input": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-5.0.8.tgz", + "integrity": "sha512-p0IJslw0AmedLEkOU+yrEX3Aj2RTpQq7ZOf8nc1DIhjzaxRWrrgeuE5Kyh39fVRgtcACaMXx/9WNo8+GjgBOfw==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^11.1.5", + "@inquirer/type": "^4.0.3" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/number": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-4.0.8.tgz", + "integrity": "sha512-uGLiQah9A0F9UIvJBX52m0CnqtLaym0WpT9V4YZrjZ+YRDKZdwwoEPz06N6w8ChE2lrnsdyhY9sL+Y690Kh9gQ==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^11.1.5", + "@inquirer/type": "^4.0.3" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/password": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-5.0.8.tgz", + "integrity": "sha512-zt1sF4lYLdvPqvmvHdmjOzuUUjuCQ897pdUCO8RbXMUDKXJTTyOQgtn23le+jwcb+MpHl3VAFvzIdxRAf6aPlA==", + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^2.0.3", + "@inquirer/core": "^11.1.5", + "@inquirer/type": "^4.0.3" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/prompts": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-8.3.0.tgz", + "integrity": "sha512-JAj66kjdH/F1+B7LCigjARbwstt3SNUOSzMdjpsvwJmzunK88gJeXmcm95L9nw1KynvFVuY4SzXh/3Y0lvtgSg==", + "license": "MIT", + "dependencies": { + "@inquirer/checkbox": "^5.1.0", + "@inquirer/confirm": "^6.0.8", + "@inquirer/editor": "^5.0.8", + "@inquirer/expand": "^5.0.8", + "@inquirer/input": "^5.0.8", + "@inquirer/number": "^4.0.8", + "@inquirer/password": "^5.0.8", + "@inquirer/rawlist": "^5.2.4", + "@inquirer/search": "^4.1.4", + "@inquirer/select": "^5.1.0" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/rawlist": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-5.2.4.tgz", + "integrity": "sha512-fTuJ5Cq9W286isLxwj6GGyfTjx1Zdk4qppVEPexFuA6yioCCXS4V1zfKroQqw7QdbDPN73xs2DiIAlo55+kBqg==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^11.1.5", + "@inquirer/type": "^4.0.3" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/search": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-4.1.4.tgz", + "integrity": "sha512-9yPTxq7LPmYjrGn3DRuaPuPbmC6u3fiWcsE9ggfLcdgO/ICHYgxq7mEy1yJ39brVvgXhtOtvDVjDh9slJxE4LQ==", + "license": "MIT", + "dependencies": { + "@inquirer/core": "^11.1.5", + "@inquirer/figures": "^2.0.3", + "@inquirer/type": "^4.0.3" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-5.1.0.tgz", + "integrity": "sha512-OyYbKnchS1u+zRe14LpYrN8S0wH1vD0p2yKISvSsJdH2TpI87fh4eZdWnpdbrGauCRWDph3NwxRmM4Pcm/hx1Q==", + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^2.0.3", + "@inquirer/core": "^11.1.5", + "@inquirer/figures": "^2.0.3", + "@inquirer/type": "^4.0.3" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/type": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.0.3.tgz", + "integrity": "sha512-cKZN7qcXOpj1h+1eTTcGDVLaBIHNMT1Rz9JqJP5MnEJ0JhgVWllx7H/tahUp5YEK1qaByH2Itb8wLG/iScD5kw==", + "license": "MIT", + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", @@ -1606,6 +1934,12 @@ "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", "license": "MIT" }, + "node_modules/chardet": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", + "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", + "license": "MIT" + }, "node_modules/chokidar": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", @@ -1622,6 +1956,15 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, "node_modules/colorette": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", @@ -1811,6 +2154,21 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "license": "MIT" }, + "node_modules/fast-string-truncated-width": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz", + "integrity": "sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==", + "license": "MIT" + }, + "node_modules/fast-string-width": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/fast-string-width/-/fast-string-width-3.0.2.tgz", + "integrity": "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==", + "license": "MIT", + "dependencies": { + "fast-string-truncated-width": "^3.0.2" + } + }, "node_modules/fast-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", @@ -1827,6 +2185,15 @@ ], "license": "BSD-3-Clause" }, + "node_modules/fast-wrap-ansi": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/fast-wrap-ansi/-/fast-wrap-ansi-0.2.0.tgz", + "integrity": "sha512-rLV8JHxTyhVmFYhBJuMujcrHqOT2cnO5Zxj37qROj23CP39GXubJRBUFF0z8KFK77Uc0SukZUf7JZhsVEQ6n8w==", + "license": "MIT", + "dependencies": { + "fast-string-width": "^3.0.2" + } + }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -1913,6 +2280,22 @@ "node": ">= 14" } }, + "node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/index-to-position": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.2.0.tgz", @@ -2096,6 +2479,15 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, + "node_modules/mute-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-3.0.0.tgz", + "integrity": "sha512-dkEJPVvun4FryqBmZ5KhDo0K9iDXAwn08tMLDinNdRBNPcYEDiWYysLcc6k3mjTMlbP9KyylvRpd4wFtwrT9rw==", + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, "node_modules/mz": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", @@ -2650,6 +3042,12 @@ "license": "MIT", "peer": true }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, "node_modules/scheduler": { "version": "0.27.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", @@ -2663,6 +3061,18 @@ "dev": true, "license": "ISC" }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/source-map": { "version": "0.7.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", @@ -3177,6 +3587,7 @@ "version": "0.0.6", "license": "MIT", "dependencies": { + "@inquirer/prompts": "^8.3.0", "chalk": "^5.6.2", "commander": "^14.0.3", "openapi-typescript": "^7.12.0", @@ -3205,7 +3616,7 @@ }, "packages/client": { "name": "@localess/client", - "version": "0.9.2", + "version": "0.9.3", "license": "MIT", "devDependencies": { "@types/node": "^20", @@ -3218,7 +3629,7 @@ }, "packages/react": { "name": "@localess/react", - "version": "0.9.2", + "version": "0.9.5", "license": "MIT", "dependencies": { "@localess/client": "*", diff --git a/packages/cli/package.json b/packages/cli/package.json index aba1843..7b28d6d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -41,6 +41,7 @@ }, "license": "MIT", "dependencies": { + "@inquirer/prompts": "^8.3.0", "commander": "^14.0.3", "chalk": "^5.6.2", "openapi-typescript": "^7.12.0", diff --git a/packages/cli/src/commands/login/index.ts b/packages/cli/src/commands/login/index.ts index fd91d0d..f5d4091 100644 --- a/packages/cli/src/commands/login/index.ts +++ b/packages/cli/src/commands/login/index.ts @@ -1,47 +1,54 @@ import {Command} from "commander"; +import {input, password} from "@inquirer/prompts"; import {localessClient} from "../../client"; import {getSession, persistSession} from "../../session"; type LoginOptions = { - token?: string; - space?: string; origin?: string; + space?: string; + token?: string; }; export const loginCommand = new Command('login') .description('Login to Localess CLI') - .option('-t, --token ', 'Token to login to Localess CLI') - .option('-s, --space ', 'Space ID to login to') .option('-o, --origin ', 'Origin of the Localess instance') + .option('-s, --space ', 'Space ID to login to') + .option('-t, --token ', 'Token to login to Localess CLI') .action(async (options: LoginOptions) => { const session = await getSession() if (session.isLoggedIn && session.method === 'file') { - console.log('Already logged in. If you want to log in with different credentials, please log out first using "localess logout" command.'); + console.log('Already logged in.'); + console.log('If you want to log in with different credentials, please log out first using "localess logout" command.'); return; } - if (options.origin && options.space && options.token) { - const client = localessClient({ - origin: options.origin, - spaceId: options.space, - token: options.token, - }); - try { - const space = await client.getSpace(); - console.log(`Successfully logged in to space: ${space.name} (${space.id})`); - await persistSession({ - origin: options.origin, - space: options.space, - token: options.token, - }) - } catch (e) { - console.error('Login failed'); - } - } else if(session.isLoggedIn && session.method === 'env') { - console.log('Already logged in with environment variables.'); - console.log('If you want to log in with different credentials, Please provide all required options: --origin, --space, and --token'); - } else { - console.log('Please provide all required options: --origin, --space, and --token'); - console.log('Or set the following environment variables: LOCALESS_ORIGIN, LOCALESS_SPACE, and LOCALESS_TOKEN'); + + const origin = options.origin ?? await input({ + message: 'Origin of the Localess instance:', + required: true, + }); + + const space = options.space ?? await input({ + message: 'Space ID:', + required: true, + }); + + const token = options.token ?? await password({ + message: 'Token:', + mask: true, + }); + + const client = localessClient({ + origin, + spaceId: space, + token, + }); + + try { + const spaceData = await client.getSpace(); + console.log(`Successfully logged in to space: ${spaceData.name} (${spaceData.id})`); + await persistSession({origin, space, token}); + } catch (e) { + console.error('Login failed'); } }); From b7b8be373bdbe85d616a9d3c640ceeeab83ef630 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Mon, 9 Mar 2026 00:10:12 +0100 Subject: [PATCH 35/39] update Type command --- .github/workflows/publish.yml | 53 ++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2cb6437..f6dd7ae 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,41 +1,56 @@ -name: Publish to npm +name: Publish to npm (master branch) on: push: - tags: - - 'v*' + branches: [master] jobs: publish: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20.x, 22.x] steps: - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 20.x uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: 20.x registry-url: 'https://registry.npmjs.org/' cache: 'npm' - name: Install dependencies run: npm ci - - name: Build all packages - run: npm run build + - name: Find changed packages + id: changed + run: | + BEFORE="${{ github.event.before }}" + SHA="${{ github.sha }}" + if [[ "$BEFORE" == "0000000000000000000000000000000000000000" || -z "$BEFORE" ]]; then + # Initial push to branch — treat all packages as changed + CHANGED=$(ls packages/ | sed 's|^|packages/|' | tr '\n' ' ') + else + git fetch --depth=2 origin master + CHANGED=$(git diff --name-only "$BEFORE" "$SHA" -- 'packages/' | awk -F/ '{print $2}' | sort -u | sed 's|^|packages/|' | tr '\n' ' ') + fi + echo "changed_packages=$CHANGED" >> $GITHUB_OUTPUT + shell: bash + + - name: Build changed packages + if: steps.changed.outputs.changed_packages + run: | + for pkgdir in ${{ steps.changed.outputs.changed_packages }}; do + npm run build --workspace $pkgdir + done + shell: bash - - name: Publish packages to npm + - name: Publish changed packages to npm + if: steps.changed.outputs.changed_packages env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | - npm publish --workspaces --access public - - - name: Verify published versions - run: | - npm info @localess/client | grep version - npm info @localess/react | grep version - npm info @localess/cli | grep version - + for pkgdir in ${{ steps.changed.outputs.changed_packages }}; do + if ! grep -q '"private"\s*:\s*true' $pkgdir/package.json; then + npm publish --access public --workspace $pkgdir + fi + done + shell: bash From d4e7a8628726270d9692ad9dfce75959cda6dfb2 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Fri, 13 Mar 2026 09:34:41 +0100 Subject: [PATCH 36/39] Update Version --- package-lock.json | 10 +++++----- package.json | 2 +- packages/cli/package.json | 2 +- packages/client/package.json | 2 +- packages/react/package.json | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0723a88..23d1669 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "localess-js", - "version": "1.0.0", + "version": "3.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "localess-js", - "version": "1.0.0", + "version": "3.0.0", "license": "MIT", "workspaces": [ "packages/*", @@ -3584,7 +3584,7 @@ }, "packages/cli": { "name": "@localess/cli", - "version": "0.0.6", + "version": "3.0.0", "license": "MIT", "dependencies": { "@inquirer/prompts": "^8.3.0", @@ -3616,7 +3616,7 @@ }, "packages/client": { "name": "@localess/client", - "version": "0.9.3", + "version": "3.0.0", "license": "MIT", "devDependencies": { "@types/node": "^20", @@ -3629,7 +3629,7 @@ }, "packages/react": { "name": "@localess/react", - "version": "0.9.5", + "version": "3.0.0", "license": "MIT", "dependencies": { "@localess/client": "*", diff --git a/package.json b/package.json index 662724b..e5be57f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "localess-js", - "version": "1.0.0", + "version": "3.0.0", "description": "", "main": "index.js", "workspaces": [ diff --git a/packages/cli/package.json b/packages/cli/package.json index 7b28d6d..bb90f5f 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@localess/cli", - "version": "0.0.6", + "version": "3.0.0", "description": "Localess Command Line.", "keywords": [ "localess", diff --git a/packages/client/package.json b/packages/client/package.json index 67a8d00..7db8c81 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@localess/client", - "version": "0.9.3", + "version": "3.0.0", "description": "Universal JavaScript/TypeScript SDK for Localess's API.", "keywords": [ "localess", diff --git a/packages/react/package.json b/packages/react/package.json index 9911d62..08ed0bd 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@localess/react", - "version": "0.9.5", + "version": "3.0.0", "description": "ReactJS JavaScript/TypeScript SDK for Localess's API.", "keywords": [ "localess", From d42771ac85ab0449e8e954b506920431900fa193 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Fri, 13 Mar 2026 09:48:36 +0100 Subject: [PATCH 37/39] Unification NPM Publish --- .github/workflows/dev-publish.yml | 52 ++++++++++++------------------- .github/workflows/publish.yml | 45 +++++++++++++------------- 2 files changed, 41 insertions(+), 56 deletions(-) diff --git a/.github/workflows/dev-publish.yml b/.github/workflows/dev-publish.yml index dab0ec1..c4c58d0 100644 --- a/.github/workflows/dev-publish.yml +++ b/.github/workflows/dev-publish.yml @@ -20,47 +20,35 @@ jobs: - name: Install dependencies run: npm ci - - name: Find changed packages - id: changed - run: | - BEFORE="${{ github.event.before }}" - SHA="${{ github.sha }}" - if [[ "$BEFORE" == "0000000000000000000000000000000000000000" || -z "$BEFORE" ]]; then - # Initial push to branch — treat all packages as changed - CHANGED=$(ls packages/ | sed 's|^|packages/|' | tr '\n' ' ') - else - git fetch --depth=2 origin dev - CHANGED=$(git diff --name-only "$BEFORE" "$SHA" -- 'packages/' | awk -F/ '{print $2}' | sort -u | sed 's|^|packages/|' | tr '\n' ' ') - fi - echo "changed_packages=$CHANGED" >> $GITHUB_OUTPUT - shell: bash - - - name: Set snapshot version for changed packages - if: steps.changed.outputs.changed_packages + - name: Set snapshot version from root package.json run: | DATE=$(date +"%Y%m%d%H%M%S") - for pkgdir in ${{ steps.changed.outputs.changed_packages }}; do - pkg="$pkgdir/package.json" - jq '.version |= sub("-dev\\.[0-9]+"; "") | .version += "-dev.'"$DATE"'"' $pkg > tmp.$$.json && mv tmp.$$.json $pkg + VERSION="$(node -p "require('./package.json').version")-dev.${DATE}" + echo "Publishing snapshot version: $VERSION" + for pkgdir in packages/*/; do + pkg="${pkgdir}package.json" + jq --arg v "$VERSION" ' + .version = $v | + if .dependencies then + .dependencies |= with_entries(if .key | startswith("@localess/") then .value = $v else . end) + else . end | + if .peerDependencies then + .peerDependencies |= with_entries(if .key | startswith("@localess/") then .value = $v else . end) + else . end + ' "$pkg" > tmp.json && mv tmp.json "$pkg" done shell: bash - - name: Build changed packages - if: steps.changed.outputs.changed_packages - run: | - for pkgdir in ${{ steps.changed.outputs.changed_packages }}; do - npm run build --workspace $pkgdir - done - shell: bash + - name: Build all packages + run: npm run build - - name: Publish changed packages to npm with tag 'dev' - if: steps.changed.outputs.changed_packages + - name: Publish all packages to npm with tag 'dev' env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | - for pkgdir in ${{ steps.changed.outputs.changed_packages }}; do - if ! grep -q '"private"\s*:\s*true' $pkgdir/package.json; then - npm publish --tag dev --access public --workspace $pkgdir + for pkgdir in packages/*/; do + if ! grep -q '"private"\s*:\s*true' "${pkgdir}package.json"; then + npm publish --tag dev --access public --workspace "$pkgdir" fi done shell: bash diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f6dd7ae..147c4f4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,37 +20,34 @@ jobs: - name: Install dependencies run: npm ci - - name: Find changed packages - id: changed + - name: Sync versions from root package.json run: | - BEFORE="${{ github.event.before }}" - SHA="${{ github.sha }}" - if [[ "$BEFORE" == "0000000000000000000000000000000000000000" || -z "$BEFORE" ]]; then - # Initial push to branch — treat all packages as changed - CHANGED=$(ls packages/ | sed 's|^|packages/|' | tr '\n' ' ') - else - git fetch --depth=2 origin master - CHANGED=$(git diff --name-only "$BEFORE" "$SHA" -- 'packages/' | awk -F/ '{print $2}' | sort -u | sed 's|^|packages/|' | tr '\n' ' ') - fi - echo "changed_packages=$CHANGED" >> $GITHUB_OUTPUT - shell: bash - - - name: Build changed packages - if: steps.changed.outputs.changed_packages - run: | - for pkgdir in ${{ steps.changed.outputs.changed_packages }}; do - npm run build --workspace $pkgdir + VERSION=$(node -p "require('./package.json').version") + echo "Publishing version: $VERSION" + for pkgdir in packages/*/; do + pkg="${pkgdir}package.json" + jq --arg v "$VERSION" ' + .version = $v | + if .dependencies then + .dependencies |= with_entries(if .key | startswith("@localess/") then .value = $v else . end) + else . end | + if .peerDependencies then + .peerDependencies |= with_entries(if .key | startswith("@localess/") then .value = $v else . end) + else . end + ' "$pkg" > tmp.json && mv tmp.json "$pkg" done shell: bash - - name: Publish changed packages to npm - if: steps.changed.outputs.changed_packages + - name: Build all packages + run: npm run build + + - name: Publish all packages to npm env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} run: | - for pkgdir in ${{ steps.changed.outputs.changed_packages }}; do - if ! grep -q '"private"\s*:\s*true' $pkgdir/package.json; then - npm publish --access public --workspace $pkgdir + for pkgdir in packages/*/; do + if ! grep -q '"private"\s*:\s*true' "${pkgdir}package.json"; then + npm publish --access public --workspace "$pkgdir" fi done shell: bash From 7acef41543833d71bc73138b1c87c780ea6242e5 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Fri, 13 Mar 2026 09:51:07 +0100 Subject: [PATCH 38/39] Unification NPM Publish --- .github/workflows/build.yml | 6 +++--- .github/workflows/dev-publish.yml | 4 ++-- .github/workflows/publish.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8597416..b5df62e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,13 +12,13 @@ jobs: strategy: matrix: - node-version: [20.x, 22.x] + node-version: [20.x, 22.x, 24.x] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version }} cache: 'npm' diff --git a/.github/workflows/dev-publish.yml b/.github/workflows/dev-publish.yml index c4c58d0..2bdbcb9 100644 --- a/.github/workflows/dev-publish.yml +++ b/.github/workflows/dev-publish.yml @@ -8,10 +8,10 @@ jobs: publish-snapshot: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Use Node.js 20.x - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: 20.x registry-url: 'https://registry.npmjs.org/' diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 147c4f4..77c8524 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,10 +8,10 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Use Node.js 20.x - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: 20.x registry-url: 'https://registry.npmjs.org/' From 9165effb2a20badc58f59e7794c2b73cea5cee41 Mon Sep 17 00:00:00 2001 From: alexcibotari Date: Fri, 13 Mar 2026 12:44:46 +0100 Subject: [PATCH 39/39] Update Documentation --- README.md | 166 ++++++++++++++++ packages/cli/README.md | 249 ++++++++++++++++++++---- packages/cli/src/utils.ts | 10 - packages/client/README.md | 393 ++++++++++++++++++++++++++++++++++---- packages/react/README.md | 365 +++++++++++++++++++++++++++++------ 5 files changed, 1040 insertions(+), 143 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..3f803b6 --- /dev/null +++ b/README.md @@ -0,0 +1,166 @@ +
+
+Localess logo +
+
+ +---- + +# localess-js + +Official JavaScript/TypeScript SDK monorepo for the [Localess](https://github.com/Lessify/localess) headless CMS platform. + +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) +[![Node.js >= 20](https://img.shields.io/badge/node-%3E%3D20-brightgreen)](https://nodejs.org) + +--- + +## Overview + +Localess is a headless CMS designed for teams that need flexible content management with multi-locale support, a Visual Editor, and a developer-friendly API. This repository houses all official JavaScript and TypeScript integrations as a single npm workspaces monorepo. + +Keeping all packages together in one repository ensures that shared types and interfaces remain consistent, changes to the core SDK are immediately reflected in framework-specific packages, and versioning stays synchronized across the entire SDK surface. + +--- + +## Packages + +| Package | Version | Description | +|---------|---------|-------------| +| [`@localess/client`](packages/client) | 3.0.0 | Core JavaScript/TypeScript SDK. Fetch content, translations, and assets from the Localess API. **Server-side only.** | +| [`@localess/react`](packages/react) | 3.0.0 | React integration. Dynamic component mapping, rich text rendering, and Visual Editor sync. | +| [`@localess/cli`](packages/cli) | 3.0.0 | Command-line interface. Manage translations and generate TypeScript types from your content schemas. | + +### Package Dependency Graph + +``` +@localess/react ──┐ + ├──▶ @localess/client (core SDK) +@localess/cli ──┘ +``` + +`@localess/client` is the foundational layer. Both `@localess/react` and `@localess/cli` depend on it for API communication, caching, and shared type definitions. + +--- + +## Quick Start + +Choose the package that fits your use case: + +### Server-side / Framework-agnostic + +```bash +npm install @localess/client +``` + +```ts +import { localessClient } from "@localess/client"; + +const client = localessClient({ + origin: 'https://my-localess.web.app', + spaceId: 'YOUR_SPACE_ID', + token: 'YOUR_API_TOKEN', // Keep secret — server-side only +}); + +const content = await client.getContentBySlug('home'); +const translations = await client.getTranslations('en'); +``` + +→ See the full [`@localess/client` documentation](packages/client/README.md) + +--- + +### React (including Next.js) + +```bash +npm install @localess/react +``` + +```tsx +import { localessInit, getLocalessClient, LocalessComponent } from "@localess/react"; + +localessInit({ + origin: process.env.LOCALESS_ORIGIN, + spaceId: process.env.LOCALESS_SPACE_ID, + token: process.env.LOCALESS_TOKEN, + enableSync: true, + components: { 'hero': HeroBlock, 'footer': Footer }, +}); +``` + +→ See the full [`@localess/react` documentation](packages/react/README.md) + +--- + +### CLI (Translations & Type Generation) + +```bash +npm install @localess/cli -D + +localess login +localess translations pull en --path ./locales/en.json +localess types generate +``` + +→ See the full [`@localess/cli` documentation](packages/cli/README.md) + +--- + +## Repository Structure + +``` +localess-js/ +├── packages/ +│ ├── client/ # @localess/client +│ ├── react/ # @localess/react +│ └── cli/ # @localess/cli +├── package.json # Workspace root (npm workspaces) +└── LICENSE +``` + +--- + +## Development + +### Requirements + +- Node.js >= 20.0.0 +- npm >= 10 (for workspaces support) + +### Install Dependencies + +```bash +npm install +``` + +### Build All Packages + +```bash +# Build all packages in dependency order +npm run build + +# Build individual packages +npm run build:client +npm run build:react +npm run build:cli +``` + +### Run Tests + +Tests are currently provided for `@localess/cli`: + +```bash +npm test --workspace=@localess/cli +``` + +--- + +## Contributing + +Contributions are welcome! Please open an issue or pull request on [GitHub](https://github.com/Lessify/localess-js/issues). + +--- + +## License + +[MIT](LICENSE) © [Lessify](https://github.com/Lessify) \ No newline at end of file diff --git a/packages/cli/README.md b/packages/cli/README.md index f59be21..48224a8 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -6,82 +6,249 @@ ---- -# Localess Command Line +# Localess CLI -A powerful CLI tool to interact with your Localess spaces. +The `@localess/cli` package is the official command-line interface for the [Localess](https://github.com/Lessify/localess) headless CMS platform. It provides commands to authenticate with your Localess instance, synchronize translations, and generate TypeScript type definitions from your content schemas. -## Features +## Requirements -- 🔐 **Authentication** - Secure login system and CI environments. -- 🌐 **Translations** - Sync and manage translations for your Localess space. -- 🛡️ **Type Safety** - Generate TypeScript type definitions for your Localess content schemas, ensuring type safety in your frontend applications. +- Node.js >= 20.0.0 -## Setup +## Installation ```bash +# Install as a project dev dependency (recommended) npm install @localess/cli -D + +# Or install globally +npm install @localess/cli -g ``` -## Login -The CLI provides a `login` command to authenticate with your Localess account. This command prompts you for your email and password, and securely stores an authentication token for future API requests. -### Usage +--- + +## Features + +- 🔐 **Authentication** — Secure credential storage for CLI and CI/CD environments +- 🌐 **Translations** — Push and pull translation files to/from your Localess space +- 🛡️ **Type Generation** — Generate TypeScript type definitions from your Localess content schemas for end-to-end type safety + +--- + +## Authentication + +### `localess login` + +Authenticate with your Localess instance. Credentials are validated immediately and stored securely in `.localess/credentials.json` with restricted file permissions (`0600`). -#### Login with your Localess from CLI: ```bash -localess login --origin --space --token +localess login --origin --space --token ``` -#### Login with your Localess with environment variables: + +If any option is omitted, the CLI will interactively prompt for the missing values. + +**Options:** + +| Flag | Description | +|------|-------------| +| `-o, --origin ` | Localess instance URL (e.g., `https://my-localess.web.app`) | +| `-s, --space ` | Space ID (found in Localess Space settings) | +| `-t, --token ` | API token (input is masked for security) | + +**Examples:** + ```bash -export LOCALESS_ORIGIN= -export LOCALESS_SPACE= -export LOCALESS_TOKEN= +# Interactive login (prompts for any missing values) localess login + +# Non-interactive login (CI/CD) +localess login --origin https://my-localess.web.app --space MY_SPACE_ID --token MY_API_TOKEN +``` + +#### Authentication via Environment Variables + +For CI/CD pipelines, you can provide credentials through environment variables instead of running `localess login`. The CLI automatically reads these variables and skips the file-based credentials: + +```bash +export LOCALESS_ORIGIN=https://my-localess.web.app +export LOCALESS_SPACE=MY_SPACE_ID +export LOCALESS_TOKEN=MY_API_TOKEN + +localess translations pull en --path ./public/locales/en.json ``` -## Logout -The CLI provides a `logout` command to clear your authentication token and log you out of your Localess account. -### Usage +| Variable | Description | +|----------|-------------| +| `LOCALESS_ORIGIN` | Localess instance URL | +| `LOCALESS_SPACE` | Space ID | +| `LOCALESS_TOKEN` | API token | + +--- + +### `localess logout` + +Clear stored credentials from `.localess/credentials.json`. + ```bash localess logout ``` +> If you authenticated via environment variables, those must be unset manually — `logout` only affects file-based credentials. + +--- + ## Translations Management -The CLI provides a `translations` command with `push` and `pull` subcommands to sync and manage translations for your Localess space. +### `localess translations push ` + +Push a local JSON translation file to your Localess space. Only keys present in the file are affected, based on the selected update type. + +```bash +localess translations push --path [options] +``` + +**Arguments:** + +| Argument | Description | +|----------|-------------| +| `` | ISO 639-1 locale code (e.g., `en`, `de`, `fr`) | + +**Options:** + +| Flag | Default | Description | +|------|---------|-------------| +| `-p, --path ` | *(required)* | Path to the JSON translations file | +| `-f, --format ` | `flat` | File format: `flat` or `nested` | +| `-t, --type ` | `add-missing` | Update strategy: `add-missing` or `update-existing` | +| `--dry-run` | `false` | Preview changes without applying them | + +**Update Strategies:** -### Push Translations -Push local translation files to Localess. +| Type | Description | +|------|-------------| +| `add-missing` | Adds translations for keys that do not yet exist in Localess | +| `update-existing` | Updates translations for keys that already exist in Localess | + +**File Formats:** + +- **`flat`** — A flat JSON object where keys may use dot notation: + ```json + { + "common.submit": "Submit", + "nav.home": "Home" + } + ``` + +- **`nested`** — A nested JSON object that is automatically flattened before uploading: + ```json + { + "common": { "submit": "Submit" }, + "nav": { "home": "Home" } + } + ``` + +**Examples:** + +```bash +# Push English translations (add missing keys only) +localess translations push en --path ./locales/en.json + +# Push with update-existing strategy +localess translations push en --path ./locales/en.json --type update-existing + +# Preview changes without applying (dry run) +localess translations push en --path ./locales/en.json --dry-run + +# Push nested-format translations +localess translations push de --path ./locales/de.json --format nested +``` + +--- + +### `localess translations pull ` + +Pull translations from your Localess space and save them to a local file. + +```bash +localess translations pull --path [options] +``` + +**Arguments:** + +| Argument | Description | +|----------|-------------| +| `` | ISO 639-1 locale code (e.g., `en`, `de`, `fr`) | + +**Options:** + +| Flag | Default | Description | +|------|---------|-------------| +| `-p, --path ` | *(required)* | Output file path | +| `-f, --format ` | `flat` | File format: `flat` or `nested` | + +**Examples:** ```bash -localess translations push --path [--format ] [--type ] +# Pull English translations as flat JSON +localess translations pull en --path ./locales/en.json + +# Pull German translations as nested JSON +localess translations pull de --path ./locales/de.json --format nested ``` -- ``: Locale code (e.g., `en`) -- `--path`: Path to the translations file to push (required) -- `--format`: File format (`flat` or `nested`, default: `flat`). **Note:** Only `flat` format is currently supported for push. -- `--type`: Push type (`add-missing`, `update-existing`, `delete-missing`. Default: `add-missing`) -### Pull Translations -Pull translations from Localess and save locally. +--- + +## TypeScript Type Generation + +### `localess types generate` + +Fetch your space's OpenAPI schema from Localess and generate TypeScript type definitions. The output file provides full type safety when working with Localess content in your TypeScript projects. ```bash -localess translations pull --path [--format ] +localess types generate [--path ] ``` -- ``: Locale code (e.g., `en`) -- `--path`: Path where the translations file will be saved (required) -- `--format`: File format (`flat` or `nested`, default: `flat`) -## Generate TypeScript Types +**Options:** -The CLI provides a `types generate` command to generate TypeScript definitions for your Localess content schemas. This command fetches your space's OpenAPI schema and writes a `localess.d.ts` file to your project, allowing for strong typing in your codebase. +| Flag | Default | Description | +|------|---------|-------------| +| `-p, --path ` | `.localess/localess.d.ts` | Path to write the generated TypeScript definitions file | -### Usage +> **Note:** Your API token must have **Development Tools** permission enabled in Localess Space settings. + +**Example:** ```bash -localess types generate [--path ] +# Generate types to the default location +localess types generate + +# Generate types to a custom path +localess types generate --path src/types/localess.d.ts ``` -- `--path`: Path to the file where to save the generated types. Default is `.localess/localess.d.ts` in your current working directory. -- You must be logged in (`localess login`) before running this command. -- The generated types file will be saved as `./.localess/localess.d.ts` by default. +**Using generated types:** + +```ts +import type { Page, HeroBlock } from './.localess/localess'; +import { getLocalessClient } from "@localess/react"; + +const client = getLocalessClient(); +const content = await client.getContentBySlug('home', { locale: 'en' }); +// content.data is now fully typed as Page +``` + +--- + +## Stored Files + +| File | Description | +|------|-------------| +| `.localess/credentials.json` | Stored login credentials (created by `localess login`) | +| `.localess/localess.d.ts` | Generated TypeScript definitions (created by `localess types generate`) | + +> It is recommended to add `.localess/credentials.json` to your `.gitignore` to avoid committing sensitive credentials. + +--- + +## License -You can then import these types in your TypeScript project for improved type safety when working with Localess content. +[MIT](../../LICENSE) diff --git a/packages/cli/src/utils.ts b/packages/cli/src/utils.ts index 1c09eb3..5c86916 100644 --- a/packages/cli/src/utils.ts +++ b/packages/cli/src/utils.ts @@ -1,13 +1,3 @@ -export function proxyURIFromEnv(): string | undefined { - return ( - process.env.HTTPS_PROXY || - process.env.https_proxy || - process.env.HTTP_PROXY || - process.env.http_proxy || - undefined - ); -} - export const RESET = "\x1b[0m" export const BRIGHT = "\x1b[1m" export const DIM = "\x1b[2m" diff --git a/packages/client/README.md b/packages/client/README.md index af4ec60..af218f5 100644 --- a/packages/client/README.md +++ b/packages/client/README.md @@ -8,55 +8,372 @@ # Localess JavaScript / TypeScript Client SDK -This client SDK is designed to work with the Localess API. It provides a simple way to interact with the Localess API from your JavaScript or TypeScript application. +The `@localess/client` package is the core JavaScript/TypeScript SDK for the [Localess](https://github.com/Lessify/localess) headless CMS platform. It provides a type-safe API client for fetching content, translations, and assets, along with Visual Editor integration utilities. -> **Important:** -> The Client is designed to be used on the server side only, as it requires your **Localess API Token** to be kept secret. -> Do not use this client in your frontend application, as it exposes your API Token to the public. +> **⚠️ Security Notice:** +> This SDK is designed for **server-side use only**. It requires a Localess API Token that must be kept secret. +> Never use this package in browser/client-side code, as it would expose your API token to the public. +> In React applications, always fetch data server-side (e.g., Next.js Server Components, API routes, or server-side rendering). + +## Requirements + +- Node.js >= 20.0.0 ## Installation -### NPM -````bash -npm install @localess/client@latest -```` +```bash +# npm +npm install @localess/client + +# yarn +yarn add @localess/client + +# pnpm +pnpm add @localess/client +``` + +--- + +## Getting Started + +### Initializing the Client + +```ts +import { localessClient } from "@localess/client"; + +const client = localessClient({ + origin: 'https://my-localess.web.app', // Fully qualified domain with protocol + spaceId: 'YOUR_SPACE_ID', // Found in Localess Space settings + token: 'YOUR_API_TOKEN', // Found in Localess Space settings (keep secret!) +}); +``` + +### Client Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `origin` | `string` | ✅ | — | Fully qualified domain with protocol (e.g., `https://my-localess.web.app`) | +| `spaceId` | `string` | ✅ | — | Localess Space ID, found in Space settings | +| `token` | `string` | ✅ | — | Localess API token, found in Space settings | +| `version` | `'draft' \| string` | ❌ | `'published'` | Default content version to fetch | +| `debug` | `boolean` | ❌ | `false` | Enable debug logging | +| `cacheTTL` | `number \| false` | ❌ | `300000` | Cache TTL in milliseconds (5 minutes). Set `false` to disable caching | + +--- -### Yarn -````bash -yarn add @localess/client@latest -```` +## Fetching Content -## Client +### `getContentBySlug(slug, params?)` -````ts -import {localessClient} from "@localess/client"; +Fetch a content document by its slug path. Supports generic typing for full type safety. -const llClient = localessClient({ - // A fully qualified domain name with protocol (http/https) and port. - origin: 'https://my-localess.web.app', - // Localess space ID, cna be found in the Localess Space settings - spaceId: 'I1LoVe2LocaLess4Rever', - // Localess API token, can be found in the Localess Space settings - token: 'Baz00KaT0KeN8S3CureLL' +```ts +// Basic usage +const content = await client.getContentBySlug('docs/overview'); + +// With type safety (requires generated types from @localess/cli) +import type { Page } from './.localess/localess'; + +const content = await client.getContentBySlug('home', { + locale: 'en', + resolveReference: true, + resolveLink: true, }); +``` + +### `getContentById(id, params?)` + +Fetch a content document by its unique ID. Accepts the same parameters as `getContentBySlug`. + +```ts +const content = await client.getContentById('FRnIT7CUABoRCdSVVGGs', { + locale: 'de', + version: 'draft', +}); +``` + +### Content Fetch Parameters + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| `version` | `'draft' \| string` | Client default | Override the client's default content version | +| `locale` | `string` | — | ISO 639-1 locale code (e.g., `'en'`, `'de'`) | +| `resolveReference` | `boolean` | `false` | Resolve content references inline | +| `resolveLink` | `boolean` | `false` | Resolve content links inline | + +--- + +## Fetching Content Links + +### `getLinks(params?)` + +Fetch all content links from the space, optionally filtered by type or parent. + +```ts +// Fetch all links +const links = await client.getLinks(); + +// Fetch only documents under a specific parent +const legalLinks = await client.getLinks({ + kind: 'DOCUMENT', + parentSlug: 'legal', + excludeChildren: false, +}); +``` + +| Parameter | Type | Description | +|-----------|------|-------------| +| `kind` | `'DOCUMENT' \| 'FOLDER'` | Filter results by content kind | +| `parentSlug` | `string` | Filter by parent slug (e.g., `'legal/policy'`) | +| `excludeChildren` | `boolean` | When `true`, excludes nested sub-slugs from results | + +--- + +## Fetching Translations + +### `getTranslations(locale)` + +Fetch all translations for a given locale. Returns a flat key-value map. + +```ts +const translations = await client.getTranslations('en'); +// { "common.submit": "Submit", "nav.home": "Home", ... } +``` + +--- + +## Assets + +### `assetLink(asset)` + +Generate a fully qualified URL for a content asset. + +```ts +import { localessClient } from "@localess/client"; + +const client = localessClient({ origin, spaceId, token }); + +// From a ContentAsset object +const url = client.assetLink(content.data.image); + +// From a URI string +const url = client.assetLink('/spaces/abc/assets/photo.jpg'); +``` + +--- + +## Visual Editor Integration + +### `loadLocalessSync(origin, force?)` + +Injects the Localess Visual Editor sync script into the document ``. This enables live-editing capabilities when your site is opened inside the Localess Visual Editor. + +```ts +import { loadLocalessSync } from "@localess/client"; + +loadLocalessSync('https://my-localess.web.app'); + +// Force injection even when not running inside an iframe +loadLocalessSync('https://my-localess.web.app', true); +``` + +### `syncScriptUrl()` + +Returns the URL of the Localess sync script, useful for manual script injection. + +```ts +const scriptUrl = client.syncScriptUrl(); +``` + +### Marking Editable Content + +Use these helpers to add Localess editable attributes to your HTML elements, enabling element selection and highlighting in the Visual Editor. + +#### `localessEditable(content)` + +Marks a content block as editable. + +```ts +import { localessEditable } from "@localess/client"; + +// Returns: { 'data-ll-id': '...', 'data-ll-schema': '...' } +
...
+``` + +#### `localessEditableField(fieldName)` + +Marks a specific field within a content block as editable, with type-safe field name inference. + +```ts +import { localessEditableField } from "@localess/client"; + +// Returns: { 'data-ll-field': 'title' } +

('title')}>...

+``` + +> **Deprecated:** `llEditable()` and `llEditableField()` are deprecated aliases. Use `localessEditable()` and `localessEditableField()` instead. + +--- + +## Listening to Visual Editor Events + +When your application is loaded inside the Localess Visual Editor, you can subscribe to editing events via `window.localess`. + +```ts +if (window.localess) { + // Subscribe to a single event + window.localess.on('change', (event) => { + if (event.type === 'change') { + setPageData(event.data); + } + }); + + // Subscribe to multiple events + window.localess.on(['input', 'change'], (event) => { + if (event.type === 'input' || event.type === 'change') { + setPageData(event.data); + } + }); +} +``` + +### Available Event Types + +| Event | Payload | Description | +|-------|---------|-------------| +| `input` | `{ type: 'input', data: any }` | Fired while a field is being edited (real-time) | +| `change` | `{ type: 'change', data: any }` | Fired after a field value is confirmed | +| `save` | `{ type: 'save' }` | Fired when content is saved | +| `publish` | `{ type: 'publish' }` | Fired when content is published | +| `pong` | `{ type: 'pong' }` | Heartbeat response from the editor | +| `enterSchema` | `{ type: 'enterSchema', id, schema, field? }` | Fired when hovering over a schema element | +| `hoverSchema` | `{ type: 'hoverSchema', id, schema, field? }` | Fired when entering a schema element | + +--- + +## Caching + +All API responses are cached by default using a TTL (time-to-live) cache. You can configure caching when initializing the client. + +```ts +// Default: 5-minute TTL cache +const client = localessClient({ origin, spaceId, token }); + +// Custom TTL (e.g., 10 minutes) +const client = localessClient({ origin, spaceId, token, cacheTTL: 600000 }); + +// Disable caching entirely +const client = localessClient({ origin, spaceId, token, cacheTTL: false }); +``` + +--- + +## Type Reference + +### `Content` + +```ts +interface Content extends ContentMetadata { + data?: T; + links?: Links; // Populated when resolveLink: true + references?: References; // Populated when resolveReference: true +} +``` + +### `ContentMetadata` + +```ts +interface ContentMetadata { + id: string; + name: string; + kind: 'FOLDER' | 'DOCUMENT'; + slug: string; + fullSlug: string; + parentSlug: string; + publishedAt?: string; + createdAt: string; + updatedAt: string; +} +``` + +### `ContentData` + +Base type for all content schema data objects. + +```ts +interface ContentDataSchema { + _id: string; + _schema?: string; + schema: string; +} + +interface ContentData extends ContentDataSchema { + [field: string]: ContentDataField | undefined; +} +``` + +### `ContentAsset` + +```ts +interface ContentAsset { + kind: 'ASSET'; + uri: string; +} +``` + +### `ContentLink` + +```ts +interface ContentLink { + kind: 'LINK'; + type: 'url' | 'content'; + target: '_blank' | '_self'; + uri: string; +} +``` + +### `ContentReference` + +```ts +interface ContentReference { + kind: 'REFERENCE'; + uri: string; +} +``` + +### `ContentRichText` + +```ts +interface ContentRichText { + type?: string; + content?: ContentRichText[]; +} +``` + +### `Links` + +A key-value map of content IDs to `ContentMetadata` objects. + +### `References` + +A key-value map of reference IDs to `Content` objects. + +### `Translations` + +A key-value map of translation keys to translated string values. + +--- -// Fetch all Content Links -llClient.getLinks() -// Fetch content by SLUG -llClient.getContentBySlug('docs/overview') -// Fetch content by ID -llClient.getContentById('FRnIT7CUABoRCdSVVGGs') -// Fetch translations by locale -llClient.getTranslations('en') -```` +## Utility Functions -## Sync with Visual Editor +| Function | Returns | Description | +|----------|---------|-------------| +| `isBrowser()` | `boolean` | Returns `true` if code is running in a browser environment | +| `isServer()` | `boolean` | Returns `true` if code is running in a server/Node.js environment | +| `isIframe()` | `boolean` | Returns `true` if the page is rendered inside an iframe | -It will automatically inject Localess Sync Script in to the HTML page. +--- -````ts -import {loadLocalessSync} from "@localess/client"; +## License -// A fully qualified domain name with protocol (http/https) and port. -loadLocalessSync('https://my-localess.web.app') -```` +[MIT](../../LICENSE) diff --git a/packages/react/README.md b/packages/react/README.md index 3f862ef..ba61d42 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -6,89 +6,346 @@ ---- -# Localess React +# Localess React SDK -This client SDK is designed to work with the Localess API. It provides a simple way to interact with the Localess API from your React application. +The `@localess/react` package is the official React integration for the [Localess](https://github.com/Lessify/localess) headless CMS platform. It provides component mapping, rich text rendering, and Visual Editor synchronization support for React applications. + +> **⚠️ Security Notice:** +> This package uses `@localess/client` internally, which requires an API token for server-side data fetching. +> Always fetch Localess content server-side (e.g., Next.js Server Components, API routes, or `getServerSideProps`) and never expose your token in client-side code. + +## Requirements + +- Node.js >= 20.0.0 +- React 17, 18, or 19 ## Installation -### NPM -````bash +```bash +# npm npm install @localess/react -```` -### Yarn -````bash +# yarn yarn add @localess/react -```` -## Usage +# pnpm +pnpm add @localess/react +``` + +--- + +## Getting Started + +### 1. Initialize the SDK -### Initialize and Visual Editor -````tsx +Call `localessInit` once at application startup (e.g., in your root layout or `_app.tsx`) to configure the client, register your components, and optionally enable the Visual Editor. + +```tsx import { localessInit } from "@localess/react"; -import { Page, Header, Teaser, Footer } from "@/components" +import { Page, Header, Teaser, Footer } from "@/components"; localessInit({ origin: "https://my-localess.web.app", - spaceId: "I1LoVe2LocaLess4Rever", - token: "Baz00KaT0KeN8S3CureLL", - enableSync: true, //Enable Visual Editor Sync Script, + spaceId: "YOUR_SPACE_ID", + token: "YOUR_API_TOKEN", + enableSync: true, // Enable Visual Editor sync script components: { 'page': Page, 'header': Header, 'teaser': Teaser, 'footer': Footer, }, -}) -```` +}); +``` + +### Initialization Options + +| Option | Type | Required | Default | Description | +|--------|------|----------|---------|-------------| +| `origin` | `string` | ✅ | — | Fully qualified domain with protocol (e.g., `https://my-localess.web.app`) | +| `spaceId` | `string` | ✅ | — | Localess Space ID, found in Space settings | +| `token` | `string` | ✅ | — | Localess API token (keep secret — server-side only) | +| `version` | `'draft' \| string` | ❌ | `'published'` | Default content version | +| `debug` | `boolean` | ❌ | `false` | Enable debug logging | +| `cacheTTL` | `number \| false` | ❌ | `300000` | Cache TTL in milliseconds. Set `false` to disable | +| `components` | `Record` | ❌ | `{}` | Map of schema keys to React components | +| `fallbackComponent` | `React.ElementType` | ❌ | — | Component rendered when a schema key has no registered component | +| `enableSync` | `boolean` | ❌ | `false` | Load the Visual Editor sync script for live-editing support | + +--- + +## `LocalessComponent` + +`LocalessComponent` is a dynamic renderer that maps Localess content data to your registered React components by schema key. It automatically applies Visual Editor attributes when sync is enabled. + +```tsx +import { LocalessComponent } from "@localess/react"; + +// Render a single content block + + +// Render a list of nested blocks +{data.body.map(item => ( + +))} +``` + +### Props + +| Prop | Type | Required | Description | +|------|------|----------|-------------| +| `data` | `ContentData` | ✅ | Content data object from Localess. The component looks up `data._schema` or `data.schema` in the component registry | +| `links` | `Links` | ❌ | Resolved content links map, forwarded to the rendered component | +| `references` | `References` | ❌ | Resolved references map, forwarded to the rendered component | +| `ref` | `React.Ref` | ❌ | Ref forwarded to the rendered component's root element | +| `...rest` | `any` | ❌ | Any additional props are forwarded to the rendered component | + +> If a schema key is not registered and no `fallbackComponent` is configured, `LocalessComponent` renders an error message in the DOM. + +--- + +## Marking Editable Content + +Use these helpers to add Visual Editor attributes to your JSX elements. They enable element highlighting and selection in the Localess Visual Editor. + +### `localessEditable(content)` -### React Component -Example of Header Component with Menu Items +Marks a content block root element as editable. -````tsx -import { llEditable, LocalessComponent } from "@localess/react"; +```tsx +import { localessEditable } from "@localess/react"; + +const Header = ({ data }) => ( + +); +``` + +### `localessEditableField(fieldName)` + +Marks a specific field within a content block as editable, with type-safe field name inference when combined with generated types. + +```tsx +import { localessEditableField } from "@localess/react"; + +const Hero = ({ data }: { data: HeroBlock }) => ( +
+

('title')}>{data.title}

+

('subtitle')}>{data.subtitle}

+
+); +``` + +> **Deprecated:** `llEditable()` and `llEditableField()` are deprecated aliases. Use `localessEditable()` and `localessEditableField()` instead. + +--- + +## Rich Text Rendering + +### `renderRichTextToReact(content)` + +Converts a Localess `ContentRichText` object to a React node tree. Supports the full range of rich text formatting produced by the Localess editor. + +```tsx +import { renderRichTextToReact } from "@localess/react"; + +const Article = ({ data }) => ( +
+

{data.title}

+
{renderRichTextToReact(data.body)}
+
+); +``` + +**Supported rich text elements:** + +- Document structure +- Headings (h1–h6) +- Paragraphs +- Text formatting: **bold**, *italic*, ~~strikethrough~~, underline +- Ordered and unordered lists +- Code blocks (with syntax highlighting support) +- Links (inline) + +--- + +## Accessing the Client + +### `getLocalessClient()` + +Returns the `LocalessClient` instance created during `localessInit`. Use this in server-side data-fetching functions. + +```ts +import { getLocalessClient } from "@localess/react"; + +async function fetchPageData(locale?: string) { + const client = getLocalessClient(); + return client.getContentBySlug('home', { locale }); +} +``` + +> Throws an error if called before `localessInit` has been executed. + +--- + +## Component Registry API + +These functions allow dynamic management of the component registry after initialization. + +```ts +import { + registerComponent, + unregisterComponent, + setComponents, + getComponent, + setFallbackComponent, + getFallbackComponent, + isSyncEnabled, +} from "@localess/react"; + +// Register a new component +registerComponent('hero-block', HeroBlock); + +// Unregister a component +unregisterComponent('hero-block'); + +// Replace the entire registry +setComponents({ 'page': Page, 'hero': Hero }); + +// Retrieve a component by schema key +const Component = getComponent('hero'); + +// Configure the fallback component +setFallbackComponent(UnknownComponent); + +// Get the current fallback component +const fallback = getFallbackComponent(); + +// Check if Visual Editor sync is enabled +const syncEnabled = isSyncEnabled(); +``` + +--- + +## Assets + +### `resolveAsset(asset)` + +Resolves a `ContentAsset` object to a fully qualified URL using the initialized client's origin. + +```tsx +import { resolveAsset } from "@localess/react"; + +const Image = ({ data }) => ( + {data.imageAlt} +); +``` + +--- + +## Visual Editor Events + +When your application is opened inside the Localess Visual Editor, subscribe to live-editing events via `window.localess`. + +```tsx +'use client'; + +import { useEffect, useState } from "react"; +import { getLocalessClient } from "@localess/react"; +import type { Content } from "@localess/react"; + +export function PageClient({ initialData }: { initialData: Content }) { + const [pageData, setPageData] = useState(initialData.data); + + useEffect(() => { + if (window.localess) { + window.localess.on(['input', 'change'], (event) => { + if (event.type === 'input' || event.type === 'change') { + setPageData(event.data); + } + }); + } + }, []); -const Header = ({data}) => { return ( - - ) +
+ {pageData.body.map(item => ( + + ))} +
+ ); } -```` +``` + +--- -### Listen for Visual Editor Events -Your application can subscribe to the Localess Visual Editor Events. -Example from NextJS 15 +## Full Example (Next.js 15 App Router) -````tsx -import { llEditable, LocalessComponent, getLocalessClient } from "@localess/react"; +```tsx +// app/layout.tsx (Server Component — safe to use API token here) +import { localessInit } from "@localess/react"; +import { Page, Header, Teaser, Footer } from "@/components"; + +localessInit({ + origin: process.env.LOCALESS_ORIGIN!, + spaceId: process.env.LOCALESS_SPACE_ID!, + token: process.env.LOCALESS_TOKEN!, + enableSync: process.env.NODE_ENV === 'development', + components: { Page, Header, Teaser, Footer }, +}); + +export default function RootLayout({ children }) { + return {children}; +} +``` -export default async function Page({searchParams}: { - searchParams: Promise<{ [key: string]: string | string[] | undefined }> +```tsx +// app/page.tsx (Server Component) +import { getLocalessClient, LocalessComponent, localessEditable } from "@localess/react"; +import type { Page } from "./.localess/localess"; + +export default async function HomePage({ + searchParams, +}: { + searchParams: Promise<{ locale?: string }>; }) { - const {locale} = await searchParams - const {data} = await fetchData(locale?.toString()); - const [ pageData, setPageData ] = useState(data); - - - if (window.localess) { - window.localess.on(['input', 'change'], (event) => { - if (event.type === 'input' || event.type === 'change') { - setPageData(event.data); - } - }); - } + const { locale } = await searchParams; + const client = getLocalessClient(); + const content = await client.getContentBySlug('home', { locale }); + return ( -
- {data.body.map(item => )} +
+ {content.data?.body.map(item => ( + + ))}
- ) + ); } +``` -async function fetchData(locale?: string): Promise> { - const client = getLocalessClient(); // Get LocalessClient Initlialized before - return client.getContentBySlug('home', {locale: locale ? locale : undefined}); -} -```` +--- + +## Re-exported from `@localess/client` + +The following are re-exported for convenience so you only need to import from `@localess/react`: + +**Types:** `Content`, `ContentData`, `ContentMetadata`, `ContentDataSchema`, `ContentDataField`, `ContentAsset`, `ContentRichText`, `ContentLink`, `ContentReference`, `Links`, `References`, `Translations`, `LocalessClient`, `LocalessSync`, `EventToApp`, `EventCallback`, `EventToAppType` + +**Functions:** `localessEditable`, `localessEditableField`, `llEditable` *(deprecated)*, `llEditableField` *(deprecated)*, `isBrowser`, `isServer`, `isIframe` + +--- + +## License + +[MIT](../../LICENSE)