authup 1.0.0-beta.30 → 1.0.0-beta.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -148,8 +148,8 @@ function parseProcessOutputData(input) {
148
148
  }
149
149
  const lines = input.split(/\r?\n/).filter((element)=>element);
150
150
  const items = [];
151
- for(let i = 0; i < lines.length; i++){
152
- const line = removeLineBreaks(lines[i]).trim();
151
+ for (const line_ of lines){
152
+ const line = removeLineBreaks(line_).trim();
153
153
  if (line.length === 0) {
154
154
  continue;
155
155
  }
@@ -159,7 +159,7 @@ function parseProcessOutputData(input) {
159
159
  items.push(parsed.message);
160
160
  continue;
161
161
  }
162
- } catch (e) {
162
+ } catch {
163
163
  // no json :/
164
164
  }
165
165
  items.push(line);
@@ -175,8 +175,8 @@ function parseProcessOutputData(input) {
175
175
  */ function stringifyObjectArgs(ob) {
176
176
  const parts = [];
177
177
  const keys = Object.keys(ob);
178
- for(let i = 0; i < keys.length; i++){
179
- parts.push(`--${keys[i]} ${ob[keys[i]]}`);
178
+ for (const key of keys){
179
+ parts.push(`--${key} ${ob[key]}`);
180
180
  }
181
181
  return parts.join(' ');
182
182
  }
@@ -216,8 +216,8 @@ async function execShellCommand(command, ctx = {}) {
216
216
  return;
217
217
  }
218
218
  const lines = parseProcessOutputData(data);
219
- for(let i = 0; i < lines.length; i++){
220
- ctx.logDataStream(lines[i]);
219
+ for (const line of lines){
220
+ ctx.logDataStream(line);
221
221
  }
222
222
  });
223
223
  }
@@ -308,10 +308,10 @@ class ClientWebPackage {
308
308
  extendEnvKeys(input) {
309
309
  const env = {};
310
310
  const keys = Object.keys(input);
311
- for(let i = 0; i < keys.length; i++){
312
- env[keys[i]] = input[keys[i]];
313
- if (!keys[i].match(/^(?:NUXT|NITRO)_.*$/)) {
314
- env[`NUXT_PUBLIC_${keys[i]}`] = input[keys[i]];
311
+ for (const key of keys){
312
+ env[key] = input[key];
313
+ if (!key.match(/^(?:NUXT|NITRO)_.*$/)) {
314
+ env[`NUXT_PUBLIC_${key}`] = input[key];
315
315
  }
316
316
  }
317
317
  return env;
@@ -431,8 +431,8 @@ async function createCLIEntryPointCommand() {
431
431
  packages = Object.values(PackageID);
432
432
  }
433
433
  const promises = [];
434
- for(let i = 0; i < packages.length; i++){
435
- promises.push(executePackageCommand(packages[i], ctx.args.command, {
434
+ for (const package_ of packages){
435
+ promises.push(executePackageCommand(package_, ctx.args.command, {
436
436
  configFile: ctx.args.configFile,
437
437
  configDirectory: ctx.args.configDirectory
438
438
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/packages/client-web/config/parse.ts","../src/packages/client-web/config/build.ts","../src/packages/client-web/config/read/env.ts","../src/packages/client-web/config/read/fs.ts","../src/packages/client-web/config/read/module.ts","../src/utils/line-breaks.ts","../src/utils/process-output.ts","../src/utils/stringify-object-args.ts","../src/utils/shell.ts","../src/constants.ts","../src/utils/modules-path.ts","../src/packages/constants.ts","../src/packages/client-web/module.ts","../src/packages/server-core/module.ts","../src/packages/execute.ts","../src/packages/normalize.ts","../src/module.ts","../src/index.ts"],"sourcesContent":["/*\n * Copyright (c) 2023-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport zod from 'zod';\nimport type { ClientWebConfigInput } from './type';\n\nexport function parseClientWebConfig(input: unknown = {}) : ClientWebConfigInput {\n const schema = zod.object({\n port: zod.number().nonnegative().optional(),\n host: zod.string().optional(),\n apiUrl: zod.string().url().optional(),\n publicUrl: zod.string().url().optional(),\n });\n\n return schema.parse(input);\n}\n","/*\n * Copyright (c) 2023-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { extendObject, makeURLPublicAccessible } from '@authup/kit';\nimport { defineGetter, dycraft } from 'dycraft';\nimport { parseClientWebConfig } from './parse';\nimport type { ClientWebConfig, ClientWebConfigInput } from './type';\n\nexport function buildClientWebConfig(raw: ClientWebConfigInput): ClientWebConfig {\n const config = dycraft({\n defaults: {\n port: 3000,\n host: '0.0.0.0',\n apiUrl: 'http://127.0.0.1:3001/',\n },\n getters: {\n publicUrl: defineGetter((\n context,\n ) => `http://${makeURLPublicAccessible(context.get('host'))}:${context.get('port')}/`),\n },\n });\n\n return extendObject(config, parseClientWebConfig(raw));\n}\n","/*\n * Copyright (c) 2023-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { oneOf, read, readInt } from 'envix';\nimport type { ClientWebConfigInput } from '../type';\n\nexport function readClientWebConfigFromEnv() : ClientWebConfigInput {\n const config : ClientWebConfigInput = {};\n\n const port = oneOf([\n readInt('UI_PORT'),\n readInt('NITRO_UI_PORT'),\n readInt('NUXT_UI_PORT'),\n readInt('NUXT_PUBLIC_UI_PORT'),\n readInt('PORT'),\n readInt('NITRO_PORT'),\n readInt('NUXT_PORT'),\n readInt('NUXT_PUBLIC_PORT'),\n ]);\n\n if (typeof port !== 'undefined') {\n config.port = port;\n }\n\n const host = oneOf([\n read('HOST'),\n read('NITRO_HOST'),\n read('NUXT_HOST'),\n ]);\n\n if (host) {\n config.host = host;\n }\n\n const apiUrl = oneOf([\n read('API_URL'),\n read('NUXT_API_URL'),\n read('NUXT_PUBLIC_API_URL'),\n ]);\n\n if (apiUrl) {\n config.apiUrl = apiUrl;\n }\n\n const publicURL = oneOf([\n read('PUBLIC_URL'),\n read('NUXT_PUBLIC_URL'),\n read('NUXT_PUBLIC_PUBLIC_URL'),\n ]);\n\n if (publicURL) {\n config.publicUrl = publicURL;\n }\n\n return config;\n}\n","/*\n * Copyright (c) 2024-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { makeURLPublicAccessible } from '@authup/kit';\nimport { Container } from 'confinity';\nimport type { ClientWebConfigInput } from '../type';\n\nexport type ClientWebConfigReadFsOptions = {\n cwd?: string,\n file?: string | string[]\n};\n\nexport async function readClientWebConfigFromFS(options: ClientWebConfigReadFsOptions = {}) : Promise<ClientWebConfigInput> {\n const container = new Container({\n prefix: 'authup',\n cwd: options.cwd,\n });\n\n if (options.file) {\n await container.loadFile(options.file);\n } else {\n await container.load();\n }\n\n const clientRaw = container.get('client.web') || {};\n const serverRaw = container.get('server.core') || {};\n if (serverRaw) {\n if (\n !clientRaw.apiUrl &&\n typeof serverRaw.publicUrl === 'string'\n ) {\n clientRaw.apiUrl = makeURLPublicAccessible(serverRaw.publicUrl);\n }\n\n if (\n !clientRaw.publicUrl &&\n typeof serverRaw.authorizeRedirectUrl === 'string'\n ) {\n clientRaw.apiUrl = makeURLPublicAccessible(serverRaw.authorizeRedirectUrl);\n }\n }\n\n return clientRaw;\n}\n","/*\n * Copyright (c) 2024-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { merge } from 'smob';\nimport type { ClientWebConfigInput } from '../type';\nimport { readClientWebConfigFromEnv } from './env';\nimport type { ClientWebConfigReadFsOptions } from './fs';\nimport { readClientWebConfigFromFS } from './fs';\n\nexport type ClientWebConfigRawReadOptions = {\n fs?: boolean | ClientWebConfigReadFsOptions,\n env?: boolean,\n};\n\nexport async function readClientWebConfigRaw(options: ClientWebConfigRawReadOptions = {}) : Promise<ClientWebConfigInput> {\n if (options.fs && options.env) {\n const fsOptions = boolableToObject(options.fs);\n const fs = await readClientWebConfigFromFS(fsOptions);\n const env = readClientWebConfigFromEnv();\n\n return merge(env, fs);\n }\n\n if (options.fs) {\n const fsOptions = boolableToObject(options.fs);\n return readClientWebConfigFromFS(fsOptions);\n }\n\n if (options.env) {\n return readClientWebConfigFromEnv();\n }\n\n return {};\n}\n\nfunction boolableToObject<T>(input: T | boolean) : T {\n if (typeof input === 'boolean') {\n return {} as T;\n }\n\n return input;\n}\n","/*\n * Copyright (c) 2022-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport function removeLineBreaks(input: string) {\n return input.replace(/(\\r\\n|\\n|\\r)/gm, '');\n}\n","/*\n * Copyright (c) 2022-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { hasOwnProperty, isObject } from '@authup/kit';\nimport { removeLineBreaks } from './line-breaks';\n\nexport function parseProcessOutputData(input: unknown) : string[] {\n if (typeof input !== 'string') {\n return [];\n }\n\n const lines = input\n .split(/\\r?\\n/)\n .filter((element) => element);\n\n const items : string[] = [];\n\n for (let i = 0; i < lines.length; i++) {\n const line = removeLineBreaks(lines[i]).trim();\n if (line.length === 0) {\n continue;\n }\n\n try {\n const parsed = JSON.parse(line);\n\n if (\n isObject(parsed) &&\n hasOwnProperty(parsed, 'message') &&\n typeof parsed.message === 'string'\n ) {\n items.push(parsed.message);\n continue;\n }\n } catch (e) {\n // no json :/\n }\n\n items.push(line);\n }\n\n return items;\n}\n","/*\n * Copyright (c) 2022-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport function stringifyObjectArgs(ob: Record<string, any>) {\n const parts : string[] = [];\n\n const keys = Object.keys(ob);\n for (let i = 0; i < keys.length; i++) {\n parts.push(`--${keys[i]} ${ob[keys[i]]}`);\n }\n\n return parts.join(' ');\n}\n","/*\n * Copyright (c) 2023-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { ChildProcess } from 'node:child_process';\nimport { exec } from 'node:child_process';\nimport process from 'node:process';\nimport { parseProcessOutputData } from './process-output';\nimport { stringifyObjectArgs } from './stringify-object-args';\n\nexport type ShellCommandExecOptions = {\n configFile?: string,\n configDirectory?: string,\n\n env?: Record<string, string | undefined>,\n envFromProcess?: boolean,\n args?: Record<string, any>,\n logErrorStream?: (content: string) => void,\n logDataStream?: (content: string) => void\n};\n\nexport async function execShellCommand(\n command: string,\n ctx: ShellCommandExecOptions = {},\n) {\n return new Promise<ChildProcess>((resolve, reject) => {\n const childProcess = exec(`${command} ${stringifyObjectArgs(ctx.args || {})}`, {\n env: {\n PATH: process.env.PATH,\n ...(ctx.envFromProcess ? process.env : {}),\n ...(ctx.env ? ctx.env : {}),\n },\n });\n\n childProcess.on('error', (data) => {\n reject(data);\n });\n\n childProcess.on('spawn', () => {\n resolve(childProcess);\n });\n\n if (childProcess.stderr) {\n childProcess.stderr.setEncoding('utf-8');\n childProcess.stderr.on('data', (data) => {\n if (typeof data !== 'string' || data.length === 0) {\n return;\n }\n\n if (ctx.logErrorStream) {\n ctx.logErrorStream(data);\n }\n });\n }\n if (childProcess.stdout) {\n childProcess.stdout.on('data', (data) => {\n if (typeof data !== 'string' || data.length === 0) {\n return;\n }\n\n if (!ctx.logDataStream) {\n return;\n }\n\n const lines = parseProcessOutputData(data);\n for (let i = 0; i < lines.length; i++) {\n ctx.logDataStream(lines[i]);\n }\n });\n }\n });\n}\n","/*\n * Copyright (c) 2024-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport path from 'node:path';\n\nexport const PACKAGE_DIRECTORY = path.join(__dirname, '..');\n","/*\n * Copyright (c) 2022-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport process from 'node:process';\nimport findUpPackagePath from 'resolve-package-path';\nimport { PACKAGE_DIRECTORY } from '../constants';\n\nexport function findModulePath(module: string) : string | undefined {\n let modulePath = findUpPackagePath(module, PACKAGE_DIRECTORY);\n if (PACKAGE_DIRECTORY !== process.cwd()) {\n modulePath = findUpPackagePath(module, process.cwd());\n }\n\n if (!modulePath) {\n return undefined;\n }\n\n return modulePath;\n}\n","/*\n * Copyright (c) 2023-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport enum PackageName {\n CLIENT_WEB = '@authup/client-web',\n SERVER_CORE = '@authup/server-core',\n}\n\nexport enum PackageID {\n CLIENT_WEB = 'client.web',\n SERVER_CORE = 'server.core',\n}\n","/*\n * Copyright (c) 2024-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport consola from 'consola';\nimport type { ChildProcess } from 'node:child_process';\nimport path from 'node:path';\nimport { execShellCommand, findModulePath } from '../../utils';\nimport { PackageID, PackageName } from '../constants';\nimport type { Package, PackageExecuteOptions } from '../types';\nimport { buildClientWebConfig, readClientWebConfigRaw } from './config';\n\nexport class ClientWebPackage implements Package {\n async execute(command: string, options: PackageExecuteOptions = {}) : Promise<ChildProcess> {\n const shellCommand = await this.buildShellCommand();\n const env = await this.buildEnv({\n configDirectory: options.configDirectory,\n configFile: options.configFile,\n });\n\n return execShellCommand(shellCommand, {\n env,\n logDataStream(line) {\n consola.info(`${PackageID.CLIENT_WEB}: ${line}`);\n },\n logErrorStream(line) {\n consola.warn(`${PackageID.CLIENT_WEB}: ${line}`);\n },\n });\n }\n\n protected async buildShellCommand() {\n let shellCommand : string;\n\n const modulePath = findModulePath(PackageName.CLIENT_WEB);\n if (typeof modulePath === 'string') {\n const directory = path.dirname(modulePath);\n const outputPath = path.join(directory, '.output', 'server', 'index.mjs');\n shellCommand = `node ${outputPath}`;\n } else {\n shellCommand = `npx ${PackageName.CLIENT_WEB}`;\n }\n\n return shellCommand;\n }\n\n protected async buildEnv(ctx: PackageExecuteOptions) {\n const env : Record<string, any> = {};\n\n const configRaw = await readClientWebConfigRaw({\n fs: {\n file: ctx.configFile,\n cwd: ctx.configDirectory,\n },\n });\n const config = buildClientWebConfig(configRaw);\n\n if (config.host) {\n env.HOST = config.host;\n }\n\n if (config.port) {\n env.PORT = `${config.port}`;\n }\n\n if (config.apiUrl) {\n env.API_URL = config.apiUrl;\n }\n\n if (config.publicUrl) {\n env.PUBLIC_URL = config.publicUrl;\n }\n\n return this.extendEnvKeys(env);\n }\n\n extendEnvKeys(input: Record<string, string | undefined>) {\n const env : Record<string, any> = {};\n\n const keys = Object.keys(input);\n for (let i = 0; i < keys.length; i++) {\n env[keys[i]] = input[keys[i]];\n\n if (!keys[i].match(/^(?:NUXT|NITRO)_.*$/)) {\n env[`NUXT_PUBLIC_${keys[i]}`] = input[keys[i]];\n }\n }\n\n return env;\n }\n}\n","/*\n * Copyright (c) 2024-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport consola from 'consola';\nimport path from 'node:path';\nimport type { ShellCommandExecOptions } from '../../utils';\nimport { execShellCommand, findModulePath } from '../../utils';\nimport { PackageID, PackageName } from '../constants';\nimport type { Package, PackageExecuteOptions } from '../types';\n\nexport class ServerCorePackage implements Package {\n async execute(command: string, options: PackageExecuteOptions = {}) {\n const shellCommand = await this.buildShellCommand(command, {\n configDirectory: options.configDirectory,\n configFile: options.configFile,\n });\n\n return execShellCommand(shellCommand, {\n logDataStream(line) {\n consola.info(`${PackageID.SERVER_CORE}: ${line}`);\n },\n logErrorStream(line) {\n consola.warn(`${PackageID.SERVER_CORE}: ${line}`);\n },\n });\n }\n\n protected async buildShellCommand(command: string, options: ShellCommandExecOptions) {\n const parts : string[] = [];\n\n const modulePath = findModulePath(PackageName.SERVER_CORE);\n if (typeof modulePath === 'string') {\n const directory = path.dirname(modulePath);\n const outputPath = path.join(directory, 'dist', 'cli', 'index.js');\n parts.push(`node ${outputPath}`);\n } else {\n parts.push(`npx ${PackageName.SERVER_CORE}`);\n }\n\n parts.push(command);\n\n if (options.configFile) {\n parts.push(`--configFile=${options.configFile}`);\n }\n\n if (options.configDirectory) {\n parts.push(`--configDirectory=${options.configDirectory}`);\n }\n\n return parts.join(' ');\n }\n}\n","/*\n * Copyright (c) 2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { ChildProcess } from 'node:child_process';\nimport { ClientWebPackage } from './client-web';\nimport { PackageID } from './constants';\nimport { ServerCorePackage } from './server-core';\nimport type { PackageExecuteOptions } from './types';\n\nexport async function executePackageCommand(\n pkg: string,\n command: string,\n options: PackageExecuteOptions = {},\n) : Promise<ChildProcess> {\n switch (pkg) {\n case PackageID.CLIENT_WEB: {\n const serverCore = new ClientWebPackage();\n\n return serverCore.execute(\n command,\n options,\n );\n }\n case PackageID.SERVER_CORE: {\n const serverCore = new ServerCorePackage();\n\n return serverCore.execute(\n command,\n options,\n );\n }\n }\n\n throw new Error(`The package ${pkg} is not supported.`);\n}\n","/*\n * Copyright (c) 2024-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { PackageID } from './constants';\n\nexport function normalizePackageID(input: string) : `${PackageID}` | null {\n const value = input.trim().toLowerCase();\n\n switch (value) {\n case 'client.web':\n case 'client/web':\n case 'client-web': {\n return PackageID.CLIENT_WEB;\n }\n case 'server.core':\n case 'server/core':\n case 'server-core': {\n return PackageID.SERVER_CORE;\n }\n }\n\n return null;\n}\n","/*\n * Copyright (c) 2024-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { defineCommand } from 'citty';\nimport type { ChildProcess } from 'node:child_process';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport process from 'node:process';\nimport { PackageID, executePackageCommand, normalizePackageID } from './packages';\n\nexport async function createCLIEntryPointCommand() {\n const pkgRaw = await fs.promises.readFile(\n path.join(process.cwd(), 'package.json'),\n { encoding: 'utf8' },\n );\n const pkg = JSON.parse(pkgRaw);\n\n return defineCommand({\n meta: {\n name: pkg.name,\n version: pkg.version,\n description: pkg.description,\n },\n args: {\n command: {\n type: 'positional',\n description: 'The command which should be forwarded to the package.',\n required: true,\n },\n package: {\n type: 'positional',\n description: 'The package, which should be targeted.',\n required: false,\n },\n configDirectory: {\n type: 'string',\n description: 'Config directory path',\n alias: 'cD',\n },\n configFile: {\n type: 'string',\n description: 'Name of one or more configuration files.',\n alias: 'cF',\n },\n },\n async run(ctx) {\n let packages = ctx.args.package ?\n ctx.args.package.split(',') :\n [];\n\n if (packages.length > 0) {\n packages = packages\n .map((pkg) => normalizePackageID(pkg))\n .filter((pkg) => Boolean(pkg))\n .map((pkg) => `${pkg}`);\n }\n\n if (packages.length === 0) {\n packages = Object.values(PackageID);\n }\n\n const promises : Promise<ChildProcess>[] = [];\n for (let i = 0; i < packages.length; i++) {\n promises.push(executePackageCommand(\n packages[i],\n ctx.args.command,\n {\n configFile: ctx.args.configFile,\n configDirectory: ctx.args.configDirectory,\n },\n ));\n }\n\n await Promise.all(promises);\n },\n });\n}\n","#!/usr/bin/env node\n\nimport { runMain } from 'citty';\nimport { createCLIEntryPointCommand } from './module';\n\nPromise.resolve()\n .then(() => createCLIEntryPointCommand())\n .then((command) => runMain(command));\n"],"names":["port","apiUrl","publicUrl","config","cwd","clientRaw","items","parts","childProcess","ctx","PackageName","PackageID","configDirectory","configFile","env","logDataStream","logErrorStream","shellCommand","file","extendEnvKeys","name","version","description","packages","Promise"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAUO;;AAECA;;AAEAC;AACAC;AACJ;;AAGJ;;ACPO;AACH;;;;;AAKI;;AAEIA;AAGJ;AACJ;;AAGJ;;ACjBO;AACH;AAEA;;;;;;;;;AASC;;AAGGC;AACJ;AAEA;;;;AAIC;AAED;AACIA;AACJ;AAEA;;;;AAIC;AAED;AACIA;AACJ;AAEA;;;;AAIC;AAED;AACIA;AACJ;;AAGJ;;AC3CO;;;AAGCC;AACJ;;AAGI;;AAEA;AACJ;AAEA;AACA;AACA;;AAKQC;AACJ;;AAMIA;AACJ;AACJ;;AAGJ;;AC7BO;AACH;;;AAGI;AAEA;AACJ;;;AAII;AACJ;;;AAIA;AAEA;AACJ;AAEA;;AAEQ;AACJ;;AAGJ;;AC7CA;;;;;;;AASA;;ACCO;;AAEC;AACJ;;AAMA;AAEA;AACI;;AAEI;AACJ;;;;;AAWQ;AACJ;AACJ;;AAEA;AAEAC;AACJ;;AAGJ;;AC9CA;;;;;;AAQI;;AAGA;AACIC;AACJ;;AAGJ;;ACQO;;AAKC;;;AAGQ;AACA;AACJ;AACJ;;;AAIA;;;AAIA;;;AAIIC;AACI;AACI;AACJ;;AAGIC;AACJ;AACJ;AACJ;;AAEID;AACI;AACI;AACJ;;AAGI;AACJ;AAEA;AACA;AACIC;AACJ;AACJ;AACJ;AACJ;AACJ;;ACjEO;;ACEA;;;;AAIH;AAEA;;AAEA;;AAGJ;;ACtBA;;;;;;;;AAOYC;AAGX;AAEM;;;AAAKC;AAGX;;ACAM;AACH;AACI;AACA;AACIC;AACAC;AACJ;AAEA;AACIC;AACAC;;AAEA;AACAC;;AAEA;AACJ;AACJ;AAEA;;;;;AAMQ;;;AAGAC;AACJ;;AAGJ;;AAGI;;;AAIQC;AACAd;AACJ;AACJ;AACA;;;AAIA;;AAGIU;AACJ;;;AAIA;;;AAIA;;AAGJ;AAEAK;AACI;;AAGA;;AAGI;AACIL;AACJ;AACJ;;AAGJ;AACJ;;AC/EO;AACH;AACI;AACIF;AACAC;AACJ;AAEA;AACIE;;AAEA;AACAC;;AAEA;AACJ;AACJ;AAEA;AACI;;;;AAKI;AACAT;;AAEAA;AACJ;AAEAA;;AAGIA;AACJ;;AAGIA;AACJ;;AAGJ;AACJ;;AC1CO;;AAMC;AAA2B;AACvB;;AAMJ;AACA;AAA4B;AACxB;;AAMJ;AACJ;AAEA;AACJ;;AC7BO;AACH;;;;;AAKuB;AACf;AACJ;;;;AAGoB;AAChB;AACJ;AACJ;;AAGJ;;ACZO;AACH;;AAEuB;;AAIvB;;AAEQa;AACAC;AACAC;AACJ;;;;;;AAMI;;;;;AAKA;;;;;AAKA;;;;;AAKA;AACJ;AACA;AACI;;AAKIC;AAIJ;;;AAIA;AAEA;AACA;;;;AAOQ;AAER;;AAGJ;AACJ;AACJ;;AC3EAC"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/packages/client-web/config/parse.ts","../src/packages/client-web/config/build.ts","../src/packages/client-web/config/read/env.ts","../src/packages/client-web/config/read/fs.ts","../src/packages/client-web/config/read/module.ts","../src/utils/line-breaks.ts","../src/utils/process-output.ts","../src/utils/stringify-object-args.ts","../src/utils/shell.ts","../src/constants.ts","../src/utils/modules-path.ts","../src/packages/constants.ts","../src/packages/client-web/module.ts","../src/packages/server-core/module.ts","../src/packages/execute.ts","../src/packages/normalize.ts","../src/module.ts","../src/index.ts"],"sourcesContent":["/*\n * Copyright (c) 2023-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport zod from 'zod';\nimport type { ClientWebConfigInput } from './type';\n\nexport function parseClientWebConfig(input: unknown = {}) : ClientWebConfigInput {\n const schema = zod.object({\n port: zod.number().nonnegative().optional(),\n host: zod.string().optional(),\n apiUrl: zod.string().url().optional(),\n publicUrl: zod.string().url().optional(),\n });\n\n return schema.parse(input);\n}\n","/*\n * Copyright (c) 2023-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { extendObject, makeURLPublicAccessible } from '@authup/kit';\nimport { defineGetter, dycraft } from 'dycraft';\nimport { parseClientWebConfig } from './parse';\nimport type { ClientWebConfig, ClientWebConfigInput } from './type';\n\nexport function buildClientWebConfig(raw: ClientWebConfigInput): ClientWebConfig {\n const config = dycraft({\n defaults: {\n port: 3000,\n host: '0.0.0.0',\n apiUrl: 'http://127.0.0.1:3001/',\n },\n getters: {\n publicUrl: defineGetter((\n context,\n ) => `http://${makeURLPublicAccessible(context.get('host'))}:${context.get('port')}/`),\n },\n });\n\n return extendObject(config, parseClientWebConfig(raw));\n}\n","/*\n * Copyright (c) 2023-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { oneOf, read, readInt } from 'envix';\nimport type { ClientWebConfigInput } from '../type';\n\nexport function readClientWebConfigFromEnv() : ClientWebConfigInput {\n const config : ClientWebConfigInput = {};\n\n const port = oneOf([\n readInt('UI_PORT'),\n readInt('NITRO_UI_PORT'),\n readInt('NUXT_UI_PORT'),\n readInt('NUXT_PUBLIC_UI_PORT'),\n readInt('PORT'),\n readInt('NITRO_PORT'),\n readInt('NUXT_PORT'),\n readInt('NUXT_PUBLIC_PORT'),\n ]);\n\n if (typeof port !== 'undefined') {\n config.port = port;\n }\n\n const host = oneOf([\n read('HOST'),\n read('NITRO_HOST'),\n read('NUXT_HOST'),\n ]);\n\n if (host) {\n config.host = host;\n }\n\n const apiUrl = oneOf([\n read('API_URL'),\n read('NUXT_API_URL'),\n read('NUXT_PUBLIC_API_URL'),\n ]);\n\n if (apiUrl) {\n config.apiUrl = apiUrl;\n }\n\n const publicURL = oneOf([\n read('PUBLIC_URL'),\n read('NUXT_PUBLIC_URL'),\n read('NUXT_PUBLIC_PUBLIC_URL'),\n ]);\n\n if (publicURL) {\n config.publicUrl = publicURL;\n }\n\n return config;\n}\n","/*\n * Copyright (c) 2024-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { makeURLPublicAccessible } from '@authup/kit';\nimport { Container } from 'confinity';\nimport type { ClientWebConfigInput } from '../type';\n\nexport type ClientWebConfigReadFsOptions = {\n cwd?: string,\n file?: string | string[]\n};\n\nexport async function readClientWebConfigFromFS(options: ClientWebConfigReadFsOptions = {}) : Promise<ClientWebConfigInput> {\n const container = new Container({\n prefix: 'authup',\n cwd: options.cwd,\n });\n\n if (options.file) {\n await container.loadFile(options.file);\n } else {\n await container.load();\n }\n\n const clientRaw = container.get('client.web') || {};\n const serverRaw = container.get('server.core') || {};\n if (serverRaw) {\n if (\n !clientRaw.apiUrl &&\n typeof serverRaw.publicUrl === 'string'\n ) {\n clientRaw.apiUrl = makeURLPublicAccessible(serverRaw.publicUrl);\n }\n\n if (\n !clientRaw.publicUrl &&\n typeof serverRaw.authorizeRedirectUrl === 'string'\n ) {\n clientRaw.apiUrl = makeURLPublicAccessible(serverRaw.authorizeRedirectUrl);\n }\n }\n\n return clientRaw;\n}\n","/*\n * Copyright (c) 2024-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { merge } from 'smob';\nimport type { ClientWebConfigInput } from '../type';\nimport { readClientWebConfigFromEnv } from './env';\nimport type { ClientWebConfigReadFsOptions } from './fs';\nimport { readClientWebConfigFromFS } from './fs';\n\nexport type ClientWebConfigRawReadOptions = {\n fs?: boolean | ClientWebConfigReadFsOptions,\n env?: boolean,\n};\n\nexport async function readClientWebConfigRaw(options: ClientWebConfigRawReadOptions = {}) : Promise<ClientWebConfigInput> {\n if (options.fs && options.env) {\n const fsOptions = boolableToObject(options.fs);\n const fs = await readClientWebConfigFromFS(fsOptions);\n const env = readClientWebConfigFromEnv();\n\n return merge(env, fs);\n }\n\n if (options.fs) {\n const fsOptions = boolableToObject(options.fs);\n return readClientWebConfigFromFS(fsOptions);\n }\n\n if (options.env) {\n return readClientWebConfigFromEnv();\n }\n\n return {};\n}\n\nfunction boolableToObject<T>(input: T | boolean) : T {\n if (typeof input === 'boolean') {\n return {} as T;\n }\n\n return input;\n}\n","/*\n * Copyright (c) 2022-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport function removeLineBreaks(input: string) {\n return input.replace(/(\\r\\n|\\n|\\r)/gm, '');\n}\n","/*\n * Copyright (c) 2022-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { hasOwnProperty, isObject } from '@authup/kit';\nimport { removeLineBreaks } from './line-breaks';\n\nexport function parseProcessOutputData(input: unknown) : string[] {\n if (typeof input !== 'string') {\n return [];\n }\n\n const lines = input\n .split(/\\r?\\n/)\n .filter((element) => element);\n\n const items : string[] = [];\n\n for (const line_ of lines) {\n const line = removeLineBreaks(line_).trim();\n if (line.length === 0) {\n continue;\n }\n\n try {\n const parsed = JSON.parse(line);\n\n if (\n isObject(parsed) &&\n hasOwnProperty(parsed, 'message') &&\n typeof parsed.message === 'string'\n ) {\n items.push(parsed.message);\n continue;\n }\n } catch {\n // no json :/\n }\n\n items.push(line);\n }\n\n return items;\n}\n","/*\n * Copyright (c) 2022-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport function stringifyObjectArgs(ob: Record<string, any>) {\n const parts : string[] = [];\n\n const keys = Object.keys(ob);\n for (const key of keys) {\n parts.push(`--${key} ${ob[key]}`);\n }\n\n return parts.join(' ');\n}\n","/*\n * Copyright (c) 2023-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { ChildProcess } from 'node:child_process';\nimport { exec } from 'node:child_process';\nimport process from 'node:process';\nimport { parseProcessOutputData } from './process-output';\nimport { stringifyObjectArgs } from './stringify-object-args';\n\nexport type ShellCommandExecOptions = {\n configFile?: string,\n configDirectory?: string,\n\n env?: Record<string, string | undefined>,\n envFromProcess?: boolean,\n args?: Record<string, any>,\n logErrorStream?: (content: string) => void,\n logDataStream?: (content: string) => void\n};\n\nexport async function execShellCommand(\n command: string,\n ctx: ShellCommandExecOptions = {},\n) {\n return new Promise<ChildProcess>((resolve, reject) => {\n const childProcess = exec(`${command} ${stringifyObjectArgs(ctx.args || {})}`, {\n env: {\n PATH: process.env.PATH,\n ...(ctx.envFromProcess ? process.env : {}),\n ...(ctx.env ? ctx.env : {}),\n },\n });\n\n childProcess.on('error', (data) => {\n reject(data);\n });\n\n childProcess.on('spawn', () => {\n resolve(childProcess);\n });\n\n if (childProcess.stderr) {\n childProcess.stderr.setEncoding('utf-8');\n childProcess.stderr.on('data', (data) => {\n if (typeof data !== 'string' || data.length === 0) {\n return;\n }\n\n if (ctx.logErrorStream) {\n ctx.logErrorStream(data);\n }\n });\n }\n if (childProcess.stdout) {\n childProcess.stdout.on('data', (data) => {\n if (typeof data !== 'string' || data.length === 0) {\n return;\n }\n\n if (!ctx.logDataStream) {\n return;\n }\n\n const lines = parseProcessOutputData(data);\n for (const line of lines) {\n ctx.logDataStream(line);\n }\n });\n }\n });\n}\n","/*\n * Copyright (c) 2024-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport path from 'node:path';\n\nexport const PACKAGE_DIRECTORY = path.join(__dirname, '..');\n","/*\n * Copyright (c) 2022-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport process from 'node:process';\nimport findUpPackagePath from 'resolve-package-path';\nimport { PACKAGE_DIRECTORY } from '../constants';\n\nexport function findModulePath(module: string) : string | undefined {\n let modulePath = findUpPackagePath(module, PACKAGE_DIRECTORY);\n if (PACKAGE_DIRECTORY !== process.cwd()) {\n modulePath = findUpPackagePath(module, process.cwd());\n }\n\n if (!modulePath) {\n return undefined;\n }\n\n return modulePath;\n}\n","/*\n * Copyright (c) 2023-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport enum PackageName {\n CLIENT_WEB = '@authup/client-web',\n SERVER_CORE = '@authup/server-core',\n}\n\nexport enum PackageID {\n CLIENT_WEB = 'client.web',\n SERVER_CORE = 'server.core',\n}\n","/*\n * Copyright (c) 2024-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport consola from 'consola';\nimport type { ChildProcess } from 'node:child_process';\nimport path from 'node:path';\nimport { execShellCommand, findModulePath } from '../../utils';\nimport { PackageID, PackageName } from '../constants';\nimport type { Package, PackageExecuteOptions } from '../types';\nimport { buildClientWebConfig, readClientWebConfigRaw } from './config';\n\nexport class ClientWebPackage implements Package {\n async execute(command: string, options: PackageExecuteOptions = {}) : Promise<ChildProcess> {\n const shellCommand = await this.buildShellCommand();\n const env = await this.buildEnv({\n configDirectory: options.configDirectory,\n configFile: options.configFile,\n });\n\n return execShellCommand(shellCommand, {\n env,\n logDataStream(line) {\n consola.info(`${PackageID.CLIENT_WEB}: ${line}`);\n },\n logErrorStream(line) {\n consola.warn(`${PackageID.CLIENT_WEB}: ${line}`);\n },\n });\n }\n\n protected async buildShellCommand() {\n let shellCommand : string;\n\n const modulePath = findModulePath(PackageName.CLIENT_WEB);\n if (typeof modulePath === 'string') {\n const directory = path.dirname(modulePath);\n const outputPath = path.join(directory, '.output', 'server', 'index.mjs');\n shellCommand = `node ${outputPath}`;\n } else {\n shellCommand = `npx ${PackageName.CLIENT_WEB}`;\n }\n\n return shellCommand;\n }\n\n protected async buildEnv(ctx: PackageExecuteOptions) {\n const env : Record<string, any> = {};\n\n const configRaw = await readClientWebConfigRaw({\n fs: {\n file: ctx.configFile,\n cwd: ctx.configDirectory,\n },\n });\n const config = buildClientWebConfig(configRaw);\n\n if (config.host) {\n env.HOST = config.host;\n }\n\n if (config.port) {\n env.PORT = `${config.port}`;\n }\n\n if (config.apiUrl) {\n env.API_URL = config.apiUrl;\n }\n\n if (config.publicUrl) {\n env.PUBLIC_URL = config.publicUrl;\n }\n\n return this.extendEnvKeys(env);\n }\n\n extendEnvKeys(input: Record<string, string | undefined>) {\n const env : Record<string, any> = {};\n\n const keys = Object.keys(input);\n for (const key of keys) {\n env[key] = input[key];\n\n if (!key.match(/^(?:NUXT|NITRO)_.*$/)) {\n env[`NUXT_PUBLIC_${key}`] = input[key];\n }\n }\n\n return env;\n }\n}\n","/*\n * Copyright (c) 2024-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport consola from 'consola';\nimport path from 'node:path';\nimport type { ShellCommandExecOptions } from '../../utils';\nimport { execShellCommand, findModulePath } from '../../utils';\nimport { PackageID, PackageName } from '../constants';\nimport type { Package, PackageExecuteOptions } from '../types';\n\nexport class ServerCorePackage implements Package {\n async execute(command: string, options: PackageExecuteOptions = {}) {\n const shellCommand = await this.buildShellCommand(command, {\n configDirectory: options.configDirectory,\n configFile: options.configFile,\n });\n\n return execShellCommand(shellCommand, {\n logDataStream(line) {\n consola.info(`${PackageID.SERVER_CORE}: ${line}`);\n },\n logErrorStream(line) {\n consola.warn(`${PackageID.SERVER_CORE}: ${line}`);\n },\n });\n }\n\n protected async buildShellCommand(command: string, options: ShellCommandExecOptions) {\n const parts : string[] = [];\n\n const modulePath = findModulePath(PackageName.SERVER_CORE);\n if (typeof modulePath === 'string') {\n const directory = path.dirname(modulePath);\n const outputPath = path.join(directory, 'dist', 'cli', 'index.js');\n parts.push(`node ${outputPath}`);\n } else {\n parts.push(`npx ${PackageName.SERVER_CORE}`);\n }\n\n parts.push(command);\n\n if (options.configFile) {\n parts.push(`--configFile=${options.configFile}`);\n }\n\n if (options.configDirectory) {\n parts.push(`--configDirectory=${options.configDirectory}`);\n }\n\n return parts.join(' ');\n }\n}\n","/*\n * Copyright (c) 2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { ChildProcess } from 'node:child_process';\nimport { ClientWebPackage } from './client-web';\nimport { PackageID } from './constants';\nimport { ServerCorePackage } from './server-core';\nimport type { PackageExecuteOptions } from './types';\n\nexport async function executePackageCommand(\n pkg: string,\n command: string,\n options: PackageExecuteOptions = {},\n) : Promise<ChildProcess> {\n switch (pkg) {\n case PackageID.CLIENT_WEB: {\n const serverCore = new ClientWebPackage();\n\n return serverCore.execute(\n command,\n options,\n );\n }\n case PackageID.SERVER_CORE: {\n const serverCore = new ServerCorePackage();\n\n return serverCore.execute(\n command,\n options,\n );\n }\n }\n\n throw new Error(`The package ${pkg} is not supported.`);\n}\n","/*\n * Copyright (c) 2024-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { PackageID } from './constants';\n\nexport function normalizePackageID(input: string) : `${PackageID}` | null {\n const value = input.trim().toLowerCase();\n\n switch (value) {\n case 'client.web':\n case 'client/web':\n case 'client-web': {\n return PackageID.CLIENT_WEB;\n }\n case 'server.core':\n case 'server/core':\n case 'server-core': {\n return PackageID.SERVER_CORE;\n }\n }\n\n return null;\n}\n","/*\n * Copyright (c) 2024-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport { defineCommand } from 'citty';\nimport type { ChildProcess } from 'node:child_process';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport process from 'node:process';\nimport { PackageID, executePackageCommand, normalizePackageID } from './packages';\n\nexport async function createCLIEntryPointCommand() {\n const pkgRaw = await fs.promises.readFile(\n path.join(process.cwd(), 'package.json'),\n { encoding: 'utf8' },\n );\n const pkg = JSON.parse(pkgRaw);\n\n return defineCommand({\n meta: {\n name: pkg.name,\n version: pkg.version,\n description: pkg.description,\n },\n args: {\n command: {\n type: 'positional',\n description: 'The command which should be forwarded to the package.',\n required: true,\n },\n package: {\n type: 'positional',\n description: 'The package, which should be targeted.',\n required: false,\n },\n configDirectory: {\n type: 'string',\n description: 'Config directory path',\n alias: 'cD',\n },\n configFile: {\n type: 'string',\n description: 'Name of one or more configuration files.',\n alias: 'cF',\n },\n },\n async run(ctx) {\n let packages = ctx.args.package ?\n ctx.args.package.split(',') :\n [];\n\n if (packages.length > 0) {\n packages = packages\n .map((pkg) => normalizePackageID(pkg))\n .filter((pkg) => Boolean(pkg))\n .map((pkg) => `${pkg}`);\n }\n\n if (packages.length === 0) {\n packages = Object.values(PackageID);\n }\n\n const promises : Promise<ChildProcess>[] = [];\n for (const package_ of packages) {\n promises.push(executePackageCommand(\n package_,\n ctx.args.command,\n {\n configFile: ctx.args.configFile,\n configDirectory: ctx.args.configDirectory,\n },\n ));\n }\n\n await Promise.all(promises);\n },\n });\n}\n","#!/usr/bin/env node\n\nimport { runMain } from 'citty';\nimport { createCLIEntryPointCommand } from './module';\n\nPromise.resolve()\n .then(() => createCLIEntryPointCommand())\n .then((command) => runMain(command));\n"],"names":["port","apiUrl","publicUrl","config","cwd","clientRaw","items","childProcess","ctx","PackageName","PackageID","configDirectory","configFile","env","logDataStream","logErrorStream","shellCommand","file","extendEnvKeys","parts","name","version","description","packages","Promise"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAUO;;AAECA;;AAEAC;AACAC;AACJ;;AAGJ;;ACPO;AACH;;;;;AAKI;;AAEIA;AAGJ;AACJ;;AAGJ;;ACjBO;AACH;AAEA;;;;;;;;;AASC;;AAGGC;AACJ;AAEA;;;;AAIC;AAED;AACIA;AACJ;AAEA;;;;AAIC;AAED;AACIA;AACJ;AAEA;;;;AAIC;AAED;AACIA;AACJ;;AAGJ;;AC3CO;;;AAGCC;AACJ;;AAGI;;AAEA;AACJ;AAEA;AACA;AACA;;AAKQC;AACJ;;AAMIA;AACJ;AACJ;;AAGJ;;AC7BO;AACH;;;AAGI;AAEA;AACJ;;;AAII;AACJ;;;AAIA;AAEA;AACJ;AAEA;;AAEQ;AACJ;;AAGJ;;AC7CA;;;;;;;AASA;;ACCO;;AAEC;AACJ;;AAMA;;;;AAKQ;AACJ;;;;;AAWQ;AACJ;AACJ;;AAEA;AAEAC;AACJ;;AAGJ;;AC9CA;;;;;;AAQI;;;;AAKA;;AAGJ;;ACQO;;AAKC;;;AAGQ;AACA;AACJ;AACJ;;;AAIA;;;AAIA;;;AAIIC;AACI;AACI;AACJ;;AAGIC;AACJ;AACJ;AACJ;;AAEID;AACI;AACI;AACJ;;AAGI;AACJ;AAEA;;AAEIC;AACJ;AACJ;AACJ;AACJ;AACJ;;ACjEO;;ACEA;;;;AAIH;AAEA;;AAEA;;AAGJ;;ACtBA;;;;;;;;AAOYC;AAGX;AAEM;;;AAAKC;AAGX;;ACAM;AACH;AACI;AACA;AACIC;AACAC;AACJ;AAEA;AACIC;AACAC;;AAEA;AACAC;;AAEA;AACJ;AACJ;AAEA;;;;;AAMQ;;;AAGAC;AACJ;;AAGJ;;AAGI;;;AAIQC;AACAb;AACJ;AACJ;AACA;;;AAIA;;AAGIS;AACJ;;;AAIA;;;AAIA;;AAGJ;AAEAK;AACI;;;AAIIL;AAEA;;AAEA;AACJ;;AAGJ;AACJ;;AC/EO;AACH;AACI;AACIF;AACAC;AACJ;AAEA;AACIE;;AAEA;AACAC;;AAEA;AACJ;AACJ;AAEA;AACI;;;;AAKI;AACAI;;AAEAA;AACJ;AAEAA;;AAGIA;AACJ;;AAGIA;AACJ;;AAGJ;AACJ;;AC1CO;;AAMC;AAA2B;AACvB;;AAMJ;AACA;AAA4B;AACxB;;AAMJ;AACJ;AAEA;AACJ;;AC7BO;AACH;;;;;AAKuB;AACf;AACJ;;;;AAGoB;AAChB;AACJ;AACJ;;AAGJ;;ACZO;AACH;;AAEuB;;AAIvB;;AAEQC;AACAC;AACAC;AACJ;;;;;;AAMI;;;;;AAKA;;;;;AAKA;;;;;AAKA;AACJ;AACA;AACI;;AAKIC;AAIJ;;;AAIA;AAEA;;;;;AAQQ;AAER;;AAGJ;AACJ;AACJ;;AC3EAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "authup",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.30",
4
+ "version": "1.0.0-beta.33",
5
5
  "description": "This is the CLI for the authup ecosystem.",
6
6
  "license": "Apache-2.0",
7
7
  "exports": {
@@ -29,7 +29,16 @@
29
29
  "bin": {
30
30
  "authup": "dist/index.mjs"
31
31
  },
32
- "keywords": [],
32
+ "keywords": [
33
+ "auth",
34
+ "authentication",
35
+ "authorization",
36
+ "cli",
37
+ "command-line",
38
+ "oauth2",
39
+ "server",
40
+ "identity"
41
+ ],
33
42
  "author": {
34
43
  "name": "Peter Placzek",
35
44
  "email": "contact@tada5hi.net",
@@ -45,11 +54,11 @@
45
54
  },
46
55
  "homepage": "https://github.com/authup/authup#readme",
47
56
  "dependencies": {
48
- "@authup/client-web": "^1.0.0-beta.30",
49
- "@authup/kit": "^1.0.0-beta.30",
50
- "@authup/core-kit": "^1.0.0-beta.30",
51
- "@authup/server-core": "^1.0.0-beta.30",
52
- "citty": "^0.2.1",
57
+ "@authup/client-web": "^1.0.0-beta.33",
58
+ "@authup/kit": "^1.0.0-beta.33",
59
+ "@authup/core-kit": "^1.0.0-beta.33",
60
+ "@authup/server-core": "^1.0.0-beta.33",
61
+ "citty": "^0.2.2",
53
62
  "chalk": "^5.6.2",
54
63
  "confinity": "^1.0.0-beta.1",
55
64
  "consola": "^3.4.0",