authup 1.0.0-beta.35 → 1.0.0-beta.37
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 +12 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -176,11 +176,6 @@ function findModulePath(module) {
|
|
|
176
176
|
}
|
|
177
177
|
//#endregion
|
|
178
178
|
//#region src/packages/constants.ts
|
|
179
|
-
let PackageName = /* @__PURE__ */ function(PackageName) {
|
|
180
|
-
PackageName["CLIENT_WEB"] = "@authup/client-web";
|
|
181
|
-
PackageName["SERVER_CORE"] = "@authup/server-core";
|
|
182
|
-
return PackageName;
|
|
183
|
-
}({});
|
|
184
179
|
let PackageID = /* @__PURE__ */ function(PackageID) {
|
|
185
180
|
PackageID["CLIENT_WEB"] = "client.web";
|
|
186
181
|
PackageID["SERVER_CORE"] = "server.core";
|
|
@@ -196,20 +191,20 @@ var ClientWebPackage = class {
|
|
|
196
191
|
configFile: options.configFile
|
|
197
192
|
}),
|
|
198
193
|
logDataStream(line) {
|
|
199
|
-
consola.info(
|
|
194
|
+
consola.info(`client.web: ${line}`);
|
|
200
195
|
},
|
|
201
196
|
logErrorStream(line) {
|
|
202
|
-
consola.warn(
|
|
197
|
+
consola.warn(`client.web: ${line}`);
|
|
203
198
|
}
|
|
204
199
|
});
|
|
205
200
|
}
|
|
206
201
|
async buildShellCommand() {
|
|
207
202
|
let shellCommand;
|
|
208
|
-
const modulePath = findModulePath(
|
|
203
|
+
const modulePath = findModulePath("@authup/client-web");
|
|
209
204
|
if (typeof modulePath === "string") {
|
|
210
205
|
const directory = path.dirname(modulePath);
|
|
211
206
|
shellCommand = `node ${path.join(directory, ".output", "server", "index.mjs")}`;
|
|
212
|
-
} else shellCommand = `npx
|
|
207
|
+
} else shellCommand = `npx @authup/client-web`;
|
|
213
208
|
return shellCommand;
|
|
214
209
|
}
|
|
215
210
|
async buildEnv(ctx) {
|
|
@@ -243,21 +238,21 @@ var ServerCorePackage = class {
|
|
|
243
238
|
configFile: options.configFile
|
|
244
239
|
}), {
|
|
245
240
|
logDataStream(line) {
|
|
246
|
-
consola.info(
|
|
241
|
+
consola.info(`server.core: ${line}`);
|
|
247
242
|
},
|
|
248
243
|
logErrorStream(line) {
|
|
249
|
-
consola.warn(
|
|
244
|
+
consola.warn(`server.core: ${line}`);
|
|
250
245
|
}
|
|
251
246
|
});
|
|
252
247
|
}
|
|
253
248
|
async buildShellCommand(command, options) {
|
|
254
249
|
const parts = [];
|
|
255
|
-
const modulePath = findModulePath(
|
|
250
|
+
const modulePath = findModulePath("@authup/server-core");
|
|
256
251
|
if (typeof modulePath === "string") {
|
|
257
252
|
const directory = path.dirname(modulePath);
|
|
258
253
|
const outputPath = path.join(directory, "dist", "cli.mjs");
|
|
259
254
|
parts.push(`node ${outputPath}`);
|
|
260
|
-
} else parts.push(`npx
|
|
255
|
+
} else parts.push(`npx @authup/server-core`);
|
|
261
256
|
parts.push(command);
|
|
262
257
|
if (options.configFile) parts.push(`--configFile=${options.configFile}`);
|
|
263
258
|
if (options.configDirectory) parts.push(`--configDirectory=${options.configDirectory}`);
|
|
@@ -268,8 +263,8 @@ var ServerCorePackage = class {
|
|
|
268
263
|
//#region src/packages/execute.ts
|
|
269
264
|
async function executePackageCommand(pkg, command, options = {}) {
|
|
270
265
|
switch (pkg) {
|
|
271
|
-
case
|
|
272
|
-
case
|
|
266
|
+
case "client.web": return new ClientWebPackage().execute(command, options);
|
|
267
|
+
case "server.core": return new ServerCorePackage().execute(command, options);
|
|
273
268
|
}
|
|
274
269
|
throw new Error(`The package ${pkg} is not supported.`);
|
|
275
270
|
}
|
|
@@ -279,10 +274,10 @@ function normalizePackageID(input) {
|
|
|
279
274
|
switch (input.trim().toLowerCase()) {
|
|
280
275
|
case "client.web":
|
|
281
276
|
case "client/web":
|
|
282
|
-
case "client-web": return
|
|
277
|
+
case "client-web": return "client.web";
|
|
283
278
|
case "server.core":
|
|
284
279
|
case "server/core":
|
|
285
|
-
case "server-core": return
|
|
280
|
+
case "server-core": return "server.core";
|
|
286
281
|
}
|
|
287
282
|
return null;
|
|
288
283
|
}
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"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-2026.\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.mjs');\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-2026.\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"],"mappings":";;;;;;;;;;;;;;;AAUA,SAAgB,qBAAqB,QAAiB,EAAE,EAAyB;AAQ7E,QAPe,IAAI,OAAO;EACtB,MAAM,IAAI,QAAQ,CAAC,aAAa,CAAC,UAAU;EAC3C,MAAM,IAAI,QAAQ,CAAC,UAAU;EAC7B,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC,UAAU;EACrC,WAAW,IAAI,QAAQ,CAAC,KAAK,CAAC,UAAU;EAC3C,CAAC,CAEY,MAAM,MAAM;;;;ACN9B,SAAgB,qBAAqB,KAA4C;AAc7E,QAAO,aAbQ,QAAQ;EACnB,UAAU;GACN,MAAM;GACN,MAAM;GACN,QAAQ;GACX;EACD,SAAS,EACL,WAAW,cACP,YACC,UAAU,wBAAwB,QAAQ,IAAI,OAAO,CAAC,CAAC,GAAG,QAAQ,IAAI,OAAO,CAAC,GAAG,EACzF;EACJ,CAAC,EAE0B,qBAAqB,IAAI,CAAC;;;;AChB1D,SAAgB,6BAAoD;CAChE,MAAM,SAAgC,EAAE;CAExC,MAAM,OAAO,MAAM;EACf,QAAQ,UAAU;EAClB,QAAQ,gBAAgB;EACxB,QAAQ,eAAe;EACvB,QAAQ,sBAAsB;EAC9B,QAAQ,OAAO;EACf,QAAQ,aAAa;EACrB,QAAQ,YAAY;EACpB,QAAQ,mBAAmB;EAC9B,CAAC;AAEF,KAAI,OAAO,SAAS,YAChB,QAAO,OAAO;CAGlB,MAAM,OAAO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ACD,MAAM,IAAI,KAAK;GACX,IAAI,WAAW,IAAI,KAAK,UACpB,IAAI,KAAK,QAAQ,MAAM,IAAI,GAC3B,EAAE;AAEN,OAAI,SAAS,SAAS,EAClB,YAAW,SACN,KAAK,QAAQ,mBAAmB,IAAI,CAAC,CACrC,QAAQ,QAAQ,QAAQ,IAAI,CAAC,CAC7B,KAAK,QAAQ,GAAG,MAAM;AAG/B,OAAI,SAAS,WAAW,EACpB,YAAW,OAAO,OAAO,UAAU;GAGvC,MAAM,WAAqC,EAAE;AAC7C,QAAK,MAAM,YAAY,SACnB,UAAS,KAAK,sBACV,UACA,IAAI,KAAK,SACT;IACI,YAAY,IAAI,KAAK;IACrB,iBAAiB,IAAI,KAAK;IAC7B,CACJ,CAAC;AAGN,SAAM,QAAQ,IAAI,SAAS;;EAElC,CAAC;;;;AC1EN,QAAQ,SAAS,CACZ,WAAW,4BAA4B,CAAC,CACxC,MAAM,YAAY,QAAQ,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"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-2026.\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.mjs');\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-2026.\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-2026.\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\n"],"mappings":";;;;;;;;;;;;;;;AAUA,SAAgB,qBAAqB,QAAiB,EAAE,EAAyB;AAQ7E,QAPe,IAAI,OAAO;EACtB,MAAM,IAAI,QAAQ,CAAC,aAAa,CAAC,UAAU;EAC3C,MAAM,IAAI,QAAQ,CAAC,UAAU;EAC7B,QAAQ,IAAI,QAAQ,CAAC,KAAK,CAAC,UAAU;EACrC,WAAW,IAAI,QAAQ,CAAC,KAAK,CAAC,UAAU;EAC3C,CAEY,CAAC,MAAM,MAAM;;;;ACN9B,SAAgB,qBAAqB,KAA4C;AAc7E,QAAO,aAbQ,QAAQ;EACnB,UAAU;GACN,MAAM;GACN,MAAM;GACN,QAAQ;GACX;EACD,SAAS,EACL,WAAW,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AI;GACV,SAAS,IAAI;GACb,aAAa,IAAI;GACpB;EACD,MAAM;GACF,SAAS;IACL,MAAM;IACN,aAAa;IACb,UAAU;IACb;GACD,SAAS;IACL,MAAM;IACN,aAAa;IACb,UAAU;IACb;GACD,iBAAiB;IACb,MAAM;IACN,aAAa;IACb,OAAO;IACV;GACD,YAAY;IACR,MAAM;IACN,aAAa;IACb,OAAO;IACV;GACJ;EACD,MAAM,IAAI,KAAK;GACX,IAAI,WAAW,IAAI,KAAK,UACpB,IAAI,KAAK,QAAQ,MAAM,IAAI,GAC3B,EAAE;AAEN,OAAI,SAAS,SAAS,EAClB,YAAW,SACN,KAAK,QAAQ,mBAAmB,IAAI,CAAC,CACrC,QAAQ,QAAQ,QAAQ,IAAI,CAAC,CAC7B,KAAK,QAAQ,GAAG,MAAM;AAG/B,OAAI,SAAS,WAAW,EACpB,YAAW,OAAO,OAAO,UAAU;GAGvC,MAAM,WAAqC,EAAE;AAC7C,QAAK,MAAM,YAAY,SACnB,UAAS,KAAK,sBACV,UACA,IAAI,KAAK,SACT;IACI,YAAY,IAAI,KAAK;IACrB,iBAAiB,IAAI,KAAK;IAC7B,CACJ,CAAC;AAGN,SAAM,QAAQ,IAAI,SAAS;;EAElC,CAAC;;;;AC1EN,QAAQ,SAAS,CACZ,WAAW,4BAA4B,CAAC,CACxC,MAAM,YAAY,QAAQ,QAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "authup",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.37",
|
|
5
5
|
"description": "This is the CLI for the authup ecosystem.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"exports": {
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
},
|
|
55
55
|
"homepage": "https://github.com/authup/authup#readme",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@authup/client-web": "^1.0.0-beta.
|
|
58
|
-
"@authup/kit": "^1.0.0-beta.
|
|
59
|
-
"@authup/core-kit": "^1.0.0-beta.
|
|
60
|
-
"@authup/server-core": "^1.0.0-beta.
|
|
57
|
+
"@authup/client-web": "^1.0.0-beta.37",
|
|
58
|
+
"@authup/kit": "^1.0.0-beta.37",
|
|
59
|
+
"@authup/core-kit": "^1.0.0-beta.37",
|
|
60
|
+
"@authup/server-core": "^1.0.0-beta.37",
|
|
61
61
|
"citty": "^0.2.2",
|
|
62
62
|
"chalk": "^5.6.2",
|
|
63
63
|
"confinity": "^1.0.0-beta.1",
|