@powerhousedao/builder-tools 6.0.0-dev.105 → 6.0.0-dev.106
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.d.mts +193 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +696 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +20 -17
- package/dist/bundle.d.ts +0 -2
- package/dist/bundle.d.ts.map +0 -1
- package/dist/connect-utils/build.d.ts +0 -3
- package/dist/connect-utils/build.d.ts.map +0 -1
- package/dist/connect-utils/constants.d.ts +0 -5
- package/dist/connect-utils/constants.d.ts.map +0 -1
- package/dist/connect-utils/helpers.d.ts +0 -48
- package/dist/connect-utils/helpers.d.ts.map +0 -1
- package/dist/connect-utils/index.d.ts +0 -15
- package/dist/connect-utils/index.d.ts.map +0 -1
- package/dist/connect-utils/preview.d.ts +0 -3
- package/dist/connect-utils/preview.d.ts.map +0 -1
- package/dist/connect-utils/studio.d.ts +0 -7
- package/dist/connect-utils/studio.d.ts.map +0 -1
- package/dist/connect-utils/types.d.ts +0 -37
- package/dist/connect-utils/types.d.ts.map +0 -1
- package/dist/connect-utils/vite-config.d.ts +0 -61
- package/dist/connect-utils/vite-config.d.ts.map +0 -1
- package/dist/connect-utils/vite-plugins/base.d.ts +0 -10
- package/dist/connect-utils/vite-plugins/base.d.ts.map +0 -1
- package/dist/connect-utils/vite-plugins/document-models-hmr.d.ts +0 -3
- package/dist/connect-utils/vite-plugins/document-models-hmr.d.ts.map +0 -1
- package/dist/connect-utils/vite-plugins/editors-hmr.d.ts +0 -3
- package/dist/connect-utils/vite-plugins/editors-hmr.d.ts.map +0 -1
- package/dist/connect-utils/vite-plugins/external-packages.d.ts +0 -3
- package/dist/connect-utils/vite-plugins/external-packages.d.ts.map +0 -1
- package/dist/connect-utils/vite-plugins/importmap.d.ts +0 -23
- package/dist/connect-utils/vite-plugins/importmap.d.ts.map +0 -1
- package/dist/connect-utils/vite-plugins/ph-external-packages.d.ts +0 -2
- package/dist/connect-utils/vite-plugins/ph-external-packages.d.ts.map +0 -1
- package/dist/connect-utils/vite-plugins/studio.d.ts +0 -3
- package/dist/connect-utils/vite-plugins/studio.d.ts.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -111943
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["fs","fs"],"sources":["../connect-utils/constants.ts","../connect-utils/helpers.ts","../connect-utils/vite-config.ts","../connect-utils/vite-plugins/base.ts","../connect-utils/vite-plugins/importmap.ts","../connect-utils/vite-plugins/studio.ts"],"sourcesContent":["export const EXTERNAL_PACKAGES_IMPORT = \"PH:EXTERNAL_PACKAGES\";\nexport const IMPORT_SCRIPT_FILE = \"external-packages.js\";\nexport const LOCAL_PACKAGE_ID = \"ph:local-package\";\nexport const PH_DIR_NAME = \".ph\";\n","import type { PowerhouseConfig } from \"@powerhousedao/config\";\nimport { exec, execSync } from \"node:child_process\";\nimport fs, { existsSync } from \"node:fs\";\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { createRequire } from \"node:module\";\nimport path, { join, resolve } from \"node:path\";\nimport { cwd } from \"node:process\";\nimport type { Plugin } from \"vite\";\nimport { LOCAL_PACKAGE_ID } from \"./constants.js\";\nimport { setConnectEnv } from \"@powerhousedao/shared/connect\";\nimport type { ConnectCommonOptions } from \"./types.js\";\n\nexport const DEFAULT_CONNECT_OUTDIR = \".ph/connect-build/dist/\" as const;\n\nexport function commonConnectOptionsToEnv(options: ConnectCommonOptions) {\n const {\n base,\n configFile,\n defaultDrivesUrl,\n drivesPreserveStrategy,\n disableLocalPackage,\n } = options;\n\n if (base) {\n setConnectEnv({\n PH_CONNECT_BASE_PATH: base,\n });\n }\n\n if (configFile) {\n setConnectEnv({\n PH_CONFIG_PATH: configFile,\n });\n }\n if (defaultDrivesUrl) {\n setConnectEnv({\n PH_CONNECT_DEFAULT_DRIVES_URL: defaultDrivesUrl.join(\",\"),\n });\n }\n if (drivesPreserveStrategy) {\n setConnectEnv({\n PH_CONNECT_DRIVES_PRESERVE_STRATEGY: drivesPreserveStrategy,\n });\n }\n if (disableLocalPackage) {\n setConnectEnv({\n PH_DISABLE_LOCAL_PACKAGE: true,\n });\n }\n}\n\nexport function resolveViteConfigPath(\n options: Pick<ConnectCommonOptions, \"projectRoot\" | \"viteConfigFile\">,\n) {\n const { projectRoot = cwd(), viteConfigFile } = options;\n return viteConfigFile || join(projectRoot, \"vite.config.ts\");\n}\n\nexport function resolvePackage(packageName: string, root = process.cwd()) {\n // find connect installation\n const require = createRequire(root);\n return require.resolve(packageName, { paths: [root] });\n}\n\nexport function resolveConnectPackageJson(root = process.cwd()) {\n try {\n const connectPackageJsonPath = resolvePackage(\n \"@powerhousedao/connect/package.json\",\n root,\n );\n const fileContents = fs.readFileSync(connectPackageJsonPath, \"utf-8\");\n return JSON.parse(fileContents) as JSON;\n } catch (error) {\n console.error(`Error reading Connect package.json:`, error);\n return null;\n }\n}\n\n/**\n * Finds the dist dir of Connect on the local machine\n */\nexport function resolveConnectBundle(root = process.cwd()) {\n const connectIndexPath = resolvePackage(\"@powerhousedao/connect\", root);\n const connectRootPath = connectIndexPath.substring(\n 0,\n connectIndexPath.indexOf(\"connect\") + \"connect\".length,\n );\n return join(connectRootPath, \"dist/\");\n}\n\nexport function resolveConnectPublicDir(root = process.cwd()) {\n const connectIconPath = resolvePackage(\n \"@powerhousedao/connect/public/icon.ico\",\n root,\n );\n return path.join(connectIconPath, \"../\");\n}\n\n/**\n * Copies the Connect dist dir to the target path\n */\nexport function copyConnect(sourcePath: string, targetPath: string) {\n try {\n // Ensure targetPath is removed before copying\n fs.rmSync(targetPath, { recursive: true, force: true });\n\n // Copy everything from sourcePath to targetPath\n fs.cpSync(sourcePath, targetPath, { recursive: true });\n } catch (error) {\n console.error(`❌ Error copying ${sourcePath} to ${targetPath}:`, error);\n }\n}\n\n/**\n * Backs up the index.html file\n *\n * Needed when running the Connect Studio dev server on Windows\n */\nexport function backupIndexHtml(appPath: string, restore = false) {\n const filePath = join(appPath, \"index.html\");\n const backupPath = join(appPath, \"index.html.bak\");\n\n const paths = restore ? [backupPath, filePath] : [filePath, backupPath];\n\n if (fs.existsSync(paths[0])) {\n fs.copyFileSync(paths[0], paths[1]);\n }\n}\n\nexport function removeBase64EnvValues(appPath: string) {\n backupIndexHtml(appPath);\n\n const filePath = join(appPath, \"index.html\");\n\n // Read the HTML file\n fs.readFile(filePath, \"utf-8\", (err, data) => {\n if (err) {\n console.error(\"Error reading file:\", err);\n return;\n }\n\n // Use regex to replace the dynamic Base64 values with empty strings\n // TODO is this needed?\n const modifiedData = data\n .replace(\n /\"LOCAL_DOCUMENT_MODELS\":\\s*\".*?\",/,\n `\"LOCAL_DOCUMENT_MODELS\": \"\",`,\n )\n .replace(\n /\"LOCAL_DOCUMENT_EDITORS\":\\s*\".*?\"/,\n `\"LOCAL_DOCUMENT_EDITORS\": \"\"`,\n );\n\n console.log(\"Modified data:\", modifiedData);\n // Write the modified content back to the file\n fs.writeFile(filePath, modifiedData, \"utf-8\", (err) => {\n if (err) {\n console.error(\"Error writing file:\", err);\n return;\n }\n });\n });\n}\n\nexport function readJsonFile(filePath: string): PowerhouseConfig | null {\n try {\n const absolutePath = resolve(filePath);\n const fileContents = fs.readFileSync(absolutePath, \"utf-8\");\n return JSON.parse(fileContents) as PowerhouseConfig;\n } catch (error) {\n console.error(`Error reading file: ${filePath}`);\n return null;\n }\n}\n\n/**\n * Takes a list of Powerhouse project packages and optionally local Powerhouse packages and outputs a js file which exports those packages for use in Connect Studio.\n */\nexport function makeImportScriptFromPackages(args: {\n packages: string[];\n importStyles?: boolean;\n localJsPath?: string;\n localCssPath?: string;\n}) {\n const { packages, localJsPath, localCssPath, importStyles = true } = args;\n const imports: string[] = [];\n const moduleNames: string[] = [];\n let counter = 0;\n\n for (const packageName of packages) {\n const moduleName = `module${counter}`;\n moduleNames.push(moduleName);\n imports.push(`import * as ${moduleName} from '${packageName}';`);\n if (importStyles) {\n imports.push(`import '${packageName}/style.css';`);\n }\n counter++;\n }\n\n const exports = moduleNames.map(\n (name, index) => `{\n id: \"${packages[index]}\",\n ...${name},\n }`,\n );\n\n const hasModule = localJsPath !== undefined;\n const hasStyles = importStyles && localCssPath !== undefined;\n const hasLocalPackage = hasModule || hasStyles;\n\n if (hasLocalPackage) {\n if (hasStyles) {\n imports.push(`import '${localCssPath}';`);\n }\n if (hasModule) {\n const moduleName = `module${counter}`;\n imports.push(`import * as ${moduleName} from '${localJsPath}';`);\n exports.push(`{\n id: \"${LOCAL_PACKAGE_ID}\",\n ...${moduleName},\n }`);\n }\n }\n const exportsString = exports.length\n ? `\n ${exports.join(\",\\n\")}\n `\n : \"\";\n\n const exportStatement = `export default [${exportsString}];`;\n\n const fileContent = `${imports.join(\"\\n\")}\\n\\n${exportStatement}`;\n\n return fileContent;\n}\n\nexport function ensureNodeVersion(minVersion = \"24\") {\n const version = process.versions.node;\n if (!version) {\n return;\n }\n\n if (version < minVersion) {\n console.error(\n `Node version ${minVersion} or higher is required. Current version: ${version}`,\n );\n process.exit(1);\n }\n}\n\nexport function runShellScriptPlugin(\n scriptName: string,\n connectPath: string,\n): Plugin {\n return {\n name: \"vite-plugin-run-shell-script\",\n buildStart() {\n const scriptPath = join(connectPath, scriptName);\n if (fs.existsSync(scriptPath)) {\n exec(`sh ${scriptPath}`, (error, stdout, stderr) => {\n if (error) {\n console.error(`Error executing the script: ${error.message}`);\n removeBase64EnvValues(connectPath);\n return;\n }\n if (stderr) {\n console.error(stderr);\n }\n });\n }\n },\n };\n}\n\n/**\n * Shared helper to modify the <head> tag of an HTML file by transforming its contents.\n */\nasync function modifyHtmlHead(\n pathToHtml: string,\n contents: string,\n transform: (html: string, contents: string) => string,\n) {\n if (!existsSync(pathToHtml)) {\n throw new Error(`File ${pathToHtml} does not exist.`);\n }\n let html = await readFile(pathToHtml, \"utf8\");\n html = transform(html, contents);\n await writeFile(pathToHtml, html, \"utf8\");\n}\n\n/**\n * Appends the contents to the <head> tag of the index.html file\n */\nexport async function appendToHtmlHead(pathToHtml: string, contents: string) {\n return modifyHtmlHead(pathToHtml, contents, (html, contents) => {\n if (!html.includes(\"</head>\")) {\n throw new Error(\"No </head> tag found in the HTML file.\");\n }\n return html.replace(\"</head>\", `\\n${contents}\\n</head>`);\n });\n}\n\n/**\n * Prepends the contents to the <head> tag of the index.html file\n */\nexport async function prependToHtmlHead(pathToHtml: string, contents: string) {\n return modifyHtmlHead(pathToHtml, contents, (html, contents) => {\n if (!html.includes(\"</head>\")) {\n throw new Error(\"No </head> tag found in the HTML file.\");\n }\n return html.replace(\"<head>\", `<head>\\n${contents}\\n`);\n });\n}\n\nexport function runTsc(outDir: string) {\n execSync(`npx tsc --outDir ${outDir}`, { stdio: \"inherit\" });\n}\n\n// Helper function to remove version suffix from package name\n// Handles formats like: @scope/package@version -> @scope/package\nexport function stripVersionFromPackage(packageName: string): string {\n const trimmed = packageName.trim();\n if (!trimmed) return \"\";\n const lastAtIndex = trimmed.lastIndexOf(\"@\");\n if (lastAtIndex > 0) {\n return trimmed.substring(0, lastAtIndex);\n }\n\n return trimmed;\n}\n","import type { PowerhouseConfig } from \"@powerhousedao/config\";\nimport { getConfig } from \"@powerhousedao/config/node\";\nimport { loadConnectEnv, setConnectEnv } from \"@powerhousedao/shared/connect\";\nimport { sentryVitePlugin } from \"@sentry/vite-plugin\";\nimport tailwind from \"@tailwindcss/vite\";\nimport react from \"@vitejs/plugin-react\";\nimport { join } from \"node:path\";\nimport {\n createLogger,\n loadEnv,\n type HtmlTagDescriptor,\n type InlineConfig,\n type PluginOption,\n} from \"vite\";\nimport { createHtmlPlugin } from \"vite-plugin-html\";\nimport tsconfigPaths from \"vite-tsconfig-paths\";\nimport type { IConnectOptions } from \"./types.js\";\n\nconst isLocalDev = true;\nconst esmShUrl = isLocalDev ? \"http://localhost:8080\" : \"https://esm.sh\";\n\nexport const connectClientConfig = {\n meta: [\n {\n tag: \"meta\",\n attrs: {\n \"http-equiv\": \"Content-Security-Policy\",\n content:\n \"script-src 'self' 'unsafe-inline' 'unsafe-eval' https://esm.sh http://localhost:8080; object-src 'none'; base-uri 'self';\",\n },\n },\n {\n tag: \"meta\",\n attrs: {\n property: \"og:title\",\n content: \"Connect\",\n },\n },\n {\n tag: \"meta\",\n attrs: {\n property: \"og:type\",\n content: \"website\",\n },\n },\n {\n tag: \"meta\",\n attrs: {\n property: \"og:url\",\n content: \"https://apps.powerhouse.io/powerhouse/connect/\",\n },\n },\n {\n tag: \"meta\",\n attrs: {\n property: \"og:description\",\n content:\n \"Navigate your organisation’s toughest operational challenges and steer your contributors to success with Connect. A navigation, collaboration and reporting tool for decentralised and open organisation.\",\n },\n },\n {\n tag: \"meta\",\n attrs: {\n property: \"og:image\",\n content:\n \"https://cf-ipfs.com/ipfs/bafkreigrmclndf2jpbolaq22535q2sw5t44uad3az3dpvkzrnt4lpjt63e\",\n },\n },\n {\n tag: \"meta\",\n attrs: {\n name: \"twitter:card\",\n content: \"summary_large_image\",\n },\n },\n {\n tag: \"meta\",\n attrs: {\n name: \"twitter:image\",\n content:\n \"https://cf-ipfs.com/ipfs/bafkreigrmclndf2jpbolaq22535q2sw5t44uad3az3dpvkzrnt4lpjt63e\",\n },\n },\n {\n tag: \"meta\",\n attrs: {\n name: \"twitter:title\",\n content: \"Connect\",\n },\n },\n {\n tag: \"meta\",\n attrs: {\n name: \"twitter:description\",\n content:\n \"Navigate your organisation’s toughest operational challenges and steer your contributors to success with Connect. A navigation, collaboration and reporting tool for decentralised and open organisation.\",\n },\n },\n ],\n} as const;\n\nfunction viteLogger({\n silence,\n}: {\n silence?: { warnings?: string[]; errors?: string[] };\n}) {\n const logger = createLogger();\n const loggerWarn = logger.warn.bind(logger);\n const loggerError = logger.error.bind(logger);\n\n logger.warn = (msg, options) => {\n if (silence?.warnings?.some((warning) => msg.includes(warning))) {\n return;\n }\n loggerWarn(msg, options);\n };\n\n logger.error = (msg, options) => {\n if (silence?.errors?.some((error) => msg.includes(error))) {\n return;\n }\n loggerError(msg, options);\n };\n\n return logger;\n}\n\nfunction getPackageNamesFromPowerhouseConfig({ packages }: PowerhouseConfig) {\n if (!packages) return [];\n return packages.map((p) => p.packageName);\n}\n\nexport function getConnectBaseViteConfig(options: IConnectOptions) {\n const mode = options.mode;\n const envDir = options.envDir ?? options.dirname;\n const fileEnv = loadEnv(mode, envDir, \"PH_\");\n\n // Load and validate environment with priority: process.env > options > fileEnv > defaults\n const env = loadConnectEnv({\n processEnv: process.env,\n fileEnv,\n });\n\n // set the resolved env to process.env so it's loaded by vite\n setConnectEnv(env);\n\n // load powerhouse config\n const phConfigPath =\n env.PH_CONFIG_PATH ?? join(options.dirname, \"powerhouse.config.json\");\n\n const phConfig = options.powerhouseConfig ?? getConfig(phConfigPath);\n\n const packagesFromConfig = getPackageNamesFromPowerhouseConfig(phConfig);\n const phPackagesStr = env.PH_PACKAGES;\n const envPhPackages = phPackagesStr?.split(\",\");\n\n const phPackages = envPhPackages ?? packagesFromConfig;\n\n const phPackageRegistryUrl =\n env.PH_CONNECT_PACKAGES_REGISTRY ?? phConfig.packageRegistryUrl ?? null;\n\n const authToken = env.PH_SENTRY_AUTH_TOKEN;\n const org = env.PH_SENTRY_ORG;\n const project = env.PH_SENTRY_PROJECT;\n const release = env.PH_CONNECT_SENTRY_RELEASE || env.PH_CONNECT_VERSION;\n const uploadSentrySourcemaps = authToken && org && project;\n\n const plugins: PluginOption[] = [\n tsconfigPaths(),\n tailwind(),\n react(),\n createHtmlPlugin({\n minify: false,\n inject: {\n tags: [\n ...(connectClientConfig.meta.map((meta) => ({\n ...meta,\n injectTo: \"head\",\n })) as HtmlTagDescriptor[]),\n {\n tag: \"script\",\n attrs: { type: \"importmap\" },\n children: JSON.stringify(\n {\n imports: {\n react: \"https://esm.sh/react@19.2.0\",\n \"react/\": \"https://esm.sh/react@19.2.0/\",\n \"react-dom\": \"https://esm.sh/react-dom@19.2.0\",\n \"react-dom/\": \"https://esm.sh/react-dom@19.2.0/\",\n },\n },\n null,\n 2,\n ),\n injectTo: \"head-prepend\",\n },\n ],\n },\n }),\n ] as const;\n\n if (uploadSentrySourcemaps) {\n plugins.push(\n sentryVitePlugin({\n release: {\n name: release ?? \"unknown\",\n inject: false, // prevent it from injecting the release id in the service worker code, this is done in 'src/app/sentry.ts' instead\n },\n authToken,\n org,\n project,\n bundleSizeOptimizations: {\n excludeDebugStatements: true,\n },\n reactComponentAnnotation: {\n enabled: true,\n },\n }) as PluginOption,\n );\n }\n\n // hide warnings unless LOG_LEVEL is set to debug\n const isDebug =\n process.env.LOG_LEVEL === \"debug\" || env.PH_CONNECT_LOG_LEVEL === \"debug\";\n const customLogger = isDebug\n ? undefined\n : viteLogger({\n silence: {\n warnings: [\n \"@import must precede all other statements (besides @charset or empty @layer)\", // tailwindcss error when importing font file\n ],\n errors: [\"Unterminated string literal\"],\n },\n });\n\n const config: InlineConfig = {\n configFile: false,\n mode,\n define: {\n PH_PACKAGES: phPackages,\n PH_PACKAGE_REGISTRY_URL: `\"${phPackageRegistryUrl}\"`,\n },\n customLogger,\n envPrefix: [\"PH_CONNECT_\"],\n optimizeDeps: {\n exclude: [\"@electric-sql/pglite\", \"@electric-sql/pglite-tools\"],\n },\n build: {\n rollupOptions: {\n // Externalize React so both Connect and dynamically loaded registry\n // packages share the same React instance via the import map in index.html.\n // Without this, Vite bundles React into Connect's chunks while registry\n // packages resolve React from the import map (esm.sh), creating two\n // separate React instances that don't share context/state.\n external: [\n \"react\",\n \"react-dom\",\n \"react/jsx-runtime\",\n \"react-dom/client\",\n ],\n },\n },\n plugins,\n worker: {\n format: \"es\",\n },\n };\n return config;\n}\n","import fs from \"fs/promises\";\nimport MagicString from \"magic-string\";\nimport { createRequire } from \"node:module\";\nimport { basename, dirname } from \"node:path\";\nimport type { Package } from \"resolve.exports\";\nimport type { Alias, AliasOptions, Plugin, PluginOption } from \"vite\";\n\n// matches @powerhousedao/connect, react, react-dom and all their sub-imports like react-dom/client\nexport const externalIds = [/^react(-dom)?(\\/.*)?$/, /^node:.*$/];\n\n// https://github.com/vitejs/vite/issues/6393#issuecomment-1006819717\n// vite dev server doesn't support setting dependencies as external\n// as when building the app.\nexport function viteIgnoreStaticImport(\n _importKeys: (string | RegExp | false | undefined)[],\n): Plugin {\n const importKeys = _importKeys.filter(\n (key) => typeof key === \"string\" || key instanceof RegExp,\n );\n return {\n name: \"vite-plugin-ignore-static-import\",\n enforce: \"pre\",\n // vite will still append /@id/ to an external import\n // so this will rewrite the 'vite:import-analysis' prefix\n configResolved(resolvedConfig) {\n const values = importKeys.map((key) =>\n typeof key === \"string\" ? key : key.source,\n );\n const reg = new RegExp(\n `(\"|')\\\\/@id\\\\/(${values.join(\"|\")})(\\\\/[^\"'\\\\\\\\]*)?\\\\1`,\n \"g\",\n );\n\n (resolvedConfig.plugins as Plugin[]).push({\n name: \"vite-plugin-ignore-static-import-replace-idprefix\",\n transform: (code) => {\n const s = new MagicString(code);\n const matches = code.matchAll(reg);\n let modified = false;\n\n for (const match of matches) {\n s.overwrite(\n match.index,\n match.index + match[0].length,\n match[0].replace(\"/@id/\", \"\"),\n );\n modified = true;\n }\n\n if (!modified) return null;\n\n return {\n code: s.toString(),\n map: s.generateMap({ hires: true }), // Generate an accurate source map\n };\n },\n });\n },\n // prevents the external import from being transformed to 'node_modules/...'\n resolveId: (id) => {\n if (\n importKeys.some((key) =>\n typeof key === \"string\" ? key === id : key.test(id),\n )\n ) {\n return { id, external: true };\n }\n },\n // returns empty string to prevent \"Pre-transform error: Failed to load url\"\n load(id) {\n if (\n importKeys.some((key) =>\n typeof key === \"string\" ? key === id : key.test(id),\n )\n ) {\n return \"\";\n }\n },\n };\n}\n\nexport function viteReplaceImports(\n imports: Record<string, string>,\n): PluginOption {\n const importKeys = Object.keys(imports);\n return {\n name: \"vite-plugin-connect-replace-imports\",\n enforce: \"pre\",\n config(config) {\n // adds the provided paths to be resolved by vite\n const resolve = config.resolve ?? {};\n const alias = resolve.alias;\n let resolvedAlias: AliasOptions | undefined;\n if (Array.isArray(alias)) {\n const arrayAlias = [...(alias as Alias[])];\n\n arrayAlias.push(\n ...Object.entries(imports).map(([find, replacement]) => ({\n find,\n replacement,\n })),\n );\n\n resolvedAlias = arrayAlias;\n } else if (typeof alias === \"object\") {\n resolvedAlias = {\n ...(alias as Record<string, string>),\n ...imports,\n };\n } else if (typeof alias === \"undefined\") {\n resolvedAlias = { ...imports };\n } else {\n console.error(\"resolve.alias was not recognized\");\n }\n\n if (resolvedAlias) {\n resolve.alias = resolvedAlias;\n config.resolve = resolve;\n }\n },\n resolveId: (id) => {\n // if the path was not provided then declares the local\n // imports as external so that vite ignores them\n if (importKeys.includes(id)) {\n return {\n id,\n external: true,\n };\n }\n },\n };\n}\n\nexport async function findPackageJson(packageName: string) {\n let packagePath;\n try {\n // Locate the package entry point\n const require = createRequire(process.cwd());\n packagePath = require.resolve(packageName, { paths: [process.cwd()] });\n } catch (err) {\n throw new Error(`Failed to resolve package: ${packageName}`, {\n cause: err,\n });\n }\n\n // Walk up the directory tree to find package.json\n let dir = dirname(packagePath);\n while (dir !== \"/\" && dir !== \".\" && dir !== \"node_modules\") {\n if (basename(dir) === \"dist\") {\n dir = dirname(dir);\n }\n const pkgJsonPath = `${dir}/package.json`;\n try {\n await fs.access(pkgJsonPath);\n const file = await fs.readFile(pkgJsonPath, \"utf-8\");\n return { packageJson: JSON.parse(file) as Package, path: dir };\n } catch {\n dir = dirname(dir); // Move up one level\n }\n }\n\n throw new Error(`package.json not found for ${packageName}`);\n}\n","import type { BuildResult } from \"esbuild\";\nimport { build } from \"esbuild\";\nimport fg from \"fast-glob\";\nimport fs from \"node:fs/promises\";\nimport { builtinModules } from \"node:module\";\nimport path from \"node:path\";\nimport type { Package } from \"resolve.exports\";\nimport { exports } from \"resolve.exports\";\nimport type { PluginOption } from \"vite\";\nimport { findPackageJson } from \"./base.js\";\n\nexport type Provider = \"node_modules\" | \"esm.sh\";\n\nexport type Dependency = {\n name: string;\n version?: string;\n provider: Provider;\n dependencies?: string[];\n};\n\nconst nodeModules = builtinModules.concat(\n builtinModules.map((m) => `node:${m}`),\n);\n\n/**\n * Resolves glob exports like `\"./*\": \"./dist/*.js\"` and `\"./utils/*\": \"./dist/utils/*.js\"`\n * into actual file mappings.\n *\n * @param {string} exportName - The export pattern (e.g., `\"./*\"` or `\"./utils/*\"`).\n * @param {string} exportPath - The actual path pattern (e.g., `\"./dist/*.js\"`).\n * @param {string} srcPath - The package root directory where the exports are located.\n * @returns {Promise<Record<string, string>>} - A mapping of export names to resolved paths.\n */\nasync function resolveGlobExport(\n exportName: string,\n exportPath: string,\n srcPath: string,\n) {\n const resolvedExports = new Map<string, { export: string; file: string }>();\n\n const hasGloblExport = exportName.endsWith(\"/*\");\n const globPath = hasGloblExport\n ? exportPath.replace(\"*\", \"**/*\")\n : exportPath;\n\n const distPath = exportPath.substring(0, exportPath.lastIndexOf(\"/*\"));\n const resolvedSrcPath = hasGloblExport\n ? path.join(srcPath.replace(\"*\", \"\"), distPath)\n : srcPath;\n\n const files = await fg(path.join(srcPath, globPath));\n\n for (const file of files) {\n const relativeSrcFilePath = path.relative(resolvedSrcPath, file); // Relative to the dist folder\n const exportFilePath = path.relative(srcPath, file); // Relative to package root\n const exportKey = relativeSrcFilePath.replace(path.extname(file), \"\"); // Remove .js extension\n const mappedExport = exportName.replace(\"*\", exportKey); // Replace glob `*` with actual name\n resolvedExports.set(mappedExport, {\n export: `./${relativeSrcFilePath}`,\n file: exportFilePath,\n }); // Final mapped entry\n }\n return resolvedExports;\n}\n\nasync function addExportToMap(\n exportName: string,\n exportPath: string,\n srcPath: string,\n map: Map<string, { export: string; file: string }>,\n) {\n if (exportName.includes(\"*\")) {\n const exports = await resolveGlobExport(exportName, exportPath, srcPath);\n exports.forEach((value, key) => map.set(key, value));\n } else {\n map.set(exportName, { export: exportPath, file: exportPath });\n }\n}\n\nasync function getPackageExports(\n name: string,\n packageJson: Package,\n srcPath: string,\n) {\n const entries = new Map<string, { export: string; file: string }>();\n const mainExport = exports(packageJson, \".\", {\n browser: true,\n });\n if (mainExport) {\n for (const entry of mainExport) {\n await addExportToMap(\".\", entry, srcPath, entries);\n }\n }\n\n if (!packageJson.exports) {\n return entries;\n }\n if (typeof packageJson.exports === \"string\") {\n await addExportToMap(name, packageJson.exports, srcPath, entries);\n return entries;\n }\n\n for (const [key, entry] of Object.entries(packageJson.exports)) {\n if (typeof entry === \"string\") {\n await addExportToMap(key, entry, srcPath, entries);\n } else {\n const exportEntry = exports(packageJson, key, {\n browser: true,\n });\n\n const exportResult = exportEntry?.at(0);\n if (exportResult) {\n await addExportToMap(key, exportResult, srcPath, entries);\n } else {\n console.warn(`No browser exports found for ${name}/${key}`);\n }\n }\n }\n\n // if the main entry file was resolved to a shorter path then updates it\n const main = entries.get(\".\");\n const resolvedEntry = main\n ? Array.from(entries.entries()).find(\n ([key, entry]) =>\n key != \".\" && [entry.file, `./${entry.file}`].includes(main.file),\n )\n : undefined;\n const resolvedExport = resolvedEntry?.at(1) as\n | {\n export: string;\n file: string;\n }\n | undefined;\n if (resolvedExport) {\n entries.set(\".\", {\n export: resolvedExport.export,\n file: resolvedExport.file,\n });\n }\n\n return entries;\n}\n\nfunction importFromEsmSh(\n name: string,\n version?: string,\n dependencies?: string[],\n) {\n const lib = `${name}${version ? `@${version}` : \"\"}`;\n const query = dependencies?.length ? `&deps=${dependencies.join(\",\")}` : \"\";\n return {\n [name]: `https://esm.sh/${lib}${query}`,\n [`${name}/`]: `https://esm.sh/${lib}${query}/`,\n };\n}\n\ntype BuildModule = () => Promise<BuildResult>;\n\nasync function importFromNodeModules(\n name: string,\n modulesDir: string,\n importMapDeps: Set<string>,\n baseUrl: string,\n): Promise<{ importMap: Record<string, string>; buildModule: BuildModule }> {\n const importMap: Record<string, string> = {};\n\n const { packageJson, path: srcPath } = await findPackageJson(name);\n const entries = await getPackageExports(name, packageJson, srcPath);\n\n if (!entries.size) {\n throw new Error(`No browser exports found for ${name}`);\n }\n\n const indexFile = entries.get(\"\")?.export || \"index\";\n const fileName = path.basename(\n entries.get(\"\")?.export || \"index\",\n path.extname(indexFile),\n );\n const outputPath = path.join(modulesDir, name);\n\n // Bundle and tree-shake only dependencies (exclude the actual library code)\n const buildModule = () => {\n console.log(`Bundling dependency: ${name}`);\n return build({\n entryPoints: Array.from(entries.values()).map((value) =>\n path.join(srcPath, value.file),\n ),\n outdir: outputPath,\n bundle: true,\n format: \"esm\",\n platform: \"browser\",\n target: \"esnext\",\n splitting: true,\n external: nodeModules.concat(Array.from(importMapDeps)), // Exclude dependencies already in import map\n sourcemap: true,\n minify: false,\n });\n };\n\n // Add entry to import map\n importMap[name] = `./modules/${name}/${fileName}.js`;\n\n entries.forEach((entry, key) => {\n importMap[path.join(name, key)] = path.join(\n baseUrl,\n `./modules/${path.join(name, entry.export)}`,\n );\n });\n\n return { importMap, buildModule };\n}\n\nasync function generateImportMap(\n outputDir: string,\n dependencies: (string | Dependency)[],\n baseUrl: string,\n): Promise<{\n importMap: Record<string, string>;\n buildModules: undefined | (() => Promise<void>);\n}> {\n const modulesDir = path.join(outputDir, \"/modules\");\n await fs.mkdir(modulesDir, { recursive: true });\n const importMapDeps = new Set(\n dependencies.map((dep) => (typeof dep === \"string\" ? dep : dep.name)),\n );\n\n let importMap: Record<string, string> = {};\n\n const buildModules: BuildModule[] = [];\n\n for (const dependency of dependencies) {\n const isString = typeof dependency === \"string\";\n const name = isString ? dependency : dependency.name;\n const version = isString ? undefined : dependency.version;\n const provider = isString ? \"node_modules\" : dependency.provider;\n const subDependencies = isString ? undefined : dependency.dependencies;\n\n if (provider === \"esm.sh\") {\n const imports = importFromEsmSh(name, version, subDependencies);\n importMap = { ...importMap, ...imports };\n // TODO: this does not make sense.\n // We need to give this the actual correct type, or if we really don't know what it is, then make it `unknown`\n } else if (provider.toString() === \"node_modules\") {\n const { importMap: imports, buildModule } = await importFromNodeModules(\n name,\n modulesDir,\n importMapDeps,\n baseUrl,\n );\n importMap = { ...importMap, ...imports };\n buildModules.push(buildModule);\n } else {\n throw new Error(`Unsupported provider: ${provider as string}`);\n }\n }\n\n return {\n importMap,\n buildModules: async () => {\n await Promise.all(buildModules.map((build) => build()));\n },\n };\n}\n\nfunction addImportMapToHTML(importMap: Record<string, string>, html: string) {\n let newHtml = \"\";\n\n // Regex to find existing import map\n const importMapRegex = /<script type=\"importmap\">(.*?)<\\/script>/s;\n const match = importMapRegex.exec(html);\n\n // If an import map exists, merge the imports\n if (match) {\n try {\n const existingImportMap = JSON.parse(match[1]) as {\n imports: Record<string, string>;\n };\n existingImportMap.imports = {\n ...existingImportMap.imports,\n ...importMap,\n };\n\n const mergedImportMapString = JSON.stringify(existingImportMap, null, 2);\n\n newHtml = html.replace(\n importMapRegex,\n `<script type=\"importmap\">${mergedImportMapString}</script>`,\n );\n } catch (error) {\n console.error(\"⚠️ Error parsing existing import map:\", error);\n }\n } else {\n const importMapString = JSON.stringify({ imports: importMap }, null, 2);\n const importMapScript = `<script type=\"importmap\">${importMapString}</script>`;\n newHtml = html.replace(\"</head>\", `${importMapScript}\\n</head>`);\n }\n return newHtml;\n}\n\n/**\n * Vite plugin to bundle or copy dependencies and inject an import map into `index.html`.\n *\n * @param {string} outputDir - The directory where the modules should be placed.\n * @param {(string | { name: string; provider: string })[]} dependencies -\n * List of dependencies to process. Can be:\n * - A string (dependency is copied as is).\n * - An object `{ name, provide }` where:\n * - `name` (string): The module name.\n * - `provider` (string): Where to retrieve the module bundle. Defaults to node_modules.\n *\n * @returns {Plugin} A Vite plugin that processes dependencies and injects an import map.\n */\nexport function generateImportMapPlugin(\n outputDir: string,\n dependencies: (string | Dependency)[],\n): PluginOption[] {\n let buildModules: (() => Promise<void>) | undefined = undefined;\n let importMap: Record<string, string> = {};\n return [\n {\n name: \"vite-plugin-importmap\",\n enforce: \"post\",\n // generates import map according to the base url\n // and collects build method for each dependency\n async configResolved(config) {\n const result = await generateImportMap(\n outputDir,\n dependencies,\n config.base,\n );\n importMap = result.importMap;\n buildModules = result.buildModules;\n },\n // builds modules when building the bundle\n closeBundle() {\n return buildModules?.();\n },\n // builds modules when starting the dev server\n configureServer() {\n return buildModules?.();\n },\n // adds importmap to the html\n transformIndexHtml(html) {\n const newHtml = addImportMapToHTML(importMap, html);\n return newHtml || html;\n },\n },\n ];\n}\n","import fs from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { PluginOption } from \"vite\";\nimport { externalIds, viteIgnoreStaticImport } from \"./base.js\";\n\nexport function viteConnectDevStudioPlugin(\n enabled = false,\n connectPath: string,\n env?: Record<string, string>,\n): PluginOption[] {\n return [\n enabled && viteIgnoreStaticImport([\"react\", \"react-dom\", ...externalIds]),\n {\n name: \"vite-plugin-connect-dev-studio\",\n enforce: \"pre\",\n config(config) {\n if (!config.build) {\n config.build = {};\n }\n if (!config.build.rollupOptions) {\n config.build.rollupOptions = {};\n }\n if (!Array.isArray(config.build.rollupOptions.external)) {\n config.build.rollupOptions.external = [];\n }\n\n if (enabled) {\n config.build.rollupOptions.external.push(...externalIds);\n }\n },\n closeBundle() {\n if (!enabled) {\n // Copy the .env file to the dist folder\n fs.copyFileSync(\n join(connectPath, \"../.env\"),\n join(connectPath, \".env\"),\n );\n }\n },\n },\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,MAAa,2BAA2B;AACxC,MAAa,qBAAqB;AAClC,MAAa,mBAAmB;AAChC,MAAa,cAAc;;;ACS3B,MAAa,yBAAyB;AAEtC,SAAgB,0BAA0B,SAA+B;CACvE,MAAM,EACJ,MACA,YACA,kBACA,wBACA,wBACE;AAEJ,KAAI,KACF,eAAc,EACZ,sBAAsB,MACvB,CAAC;AAGJ,KAAI,WACF,eAAc,EACZ,gBAAgB,YACjB,CAAC;AAEJ,KAAI,iBACF,eAAc,EACZ,+BAA+B,iBAAiB,KAAK,IAAI,EAC1D,CAAC;AAEJ,KAAI,uBACF,eAAc,EACZ,qCAAqC,wBACtC,C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H,IAAG,aACD,KAAK,aAAa,UAAU,EAC5B,KAAK,aAAa,OAAO,CAC1B;;EAGN,CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/builder-tools",
|
|
3
|
-
"version": "6.0.0-dev.
|
|
3
|
+
"version": "6.0.0-dev.106",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,38 +15,41 @@
|
|
|
15
15
|
],
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
18
|
-
"types": "./dist/index.d.
|
|
19
|
-
"import": "./dist/index.
|
|
18
|
+
"types": "./dist/index.d.mts",
|
|
19
|
+
"import": "./dist/index.mjs"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"dependencies": {
|
|
24
|
+
"@sentry/vite-plugin": "^4.3.0",
|
|
24
25
|
"@tailwindcss/vite": "4.1.18",
|
|
25
26
|
"@vitejs/plugin-basic-ssl": "2.1.4",
|
|
26
27
|
"@vitejs/plugin-react": "5.1.4",
|
|
27
|
-
"vite": "7.3.1",
|
|
28
|
-
"vite-plugin-html": "3.2.2",
|
|
29
|
-
"vite-plugin-svgr": "4.5.0",
|
|
30
|
-
"document-model": "6.0.0-dev.105"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@types/bun": "1.3.8",
|
|
34
|
-
"tsx": "4.21.0",
|
|
35
|
-
"@sentry/vite-plugin": "^4.3.0",
|
|
36
|
-
"esbuild-plugins-node-modules-polyfill": "1.8.1",
|
|
37
|
-
"vite-envs": "4.6.2",
|
|
38
28
|
"esbuild": "^0.25.5",
|
|
29
|
+
"esbuild-plugins-node-modules-polyfill": "1.8.1",
|
|
39
30
|
"fast-glob": "^3.3.3",
|
|
31
|
+
"identify-monorepo-root": "^1.0.9",
|
|
40
32
|
"magic-string": "^0.30.17",
|
|
41
33
|
"read-pkg": "10.1.0",
|
|
42
34
|
"resolve.exports": "^2.0.3",
|
|
35
|
+
"vite": "7.3.1",
|
|
36
|
+
"vite-envs": "4.6.2",
|
|
37
|
+
"vite-plugin-html": "3.2.2",
|
|
38
|
+
"vite-plugin-node-polyfills": "0.25.0",
|
|
39
|
+
"vite-plugin-svgr": "4.5.0",
|
|
40
|
+
"vite-tsconfig-paths": "6.1.1",
|
|
43
41
|
"zod": "4.3.6",
|
|
44
|
-
"@powerhousedao/
|
|
45
|
-
"
|
|
42
|
+
"@powerhousedao/config": "6.0.0-dev.106",
|
|
43
|
+
"document-model": "6.0.0-dev.106",
|
|
44
|
+
"@powerhousedao/shared": "6.0.0-dev.106"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"tsdown": "0.21.0",
|
|
48
|
+
"tsx": "4.21.0"
|
|
46
49
|
},
|
|
47
50
|
"scripts": {
|
|
48
51
|
"tsc": "tsc",
|
|
49
52
|
"lint": "eslint",
|
|
50
|
-
"build:bundle": "
|
|
53
|
+
"build:bundle": "tsdown"
|
|
51
54
|
}
|
|
52
55
|
}
|
package/dist/bundle.d.ts
DELETED
package/dist/bundle.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../bundle.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../connect-utils/build.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,wBAAsB,YAAY,CAAC,OAAO,GAAE,mBAAwB,iBAgCnE"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const EXTERNAL_PACKAGES_IMPORT = "PH:EXTERNAL_PACKAGES";
|
|
2
|
-
export declare const IMPORT_SCRIPT_FILE = "external-packages.js";
|
|
3
|
-
export declare const LOCAL_PACKAGE_ID = "ph:local-package";
|
|
4
|
-
export declare const PH_DIR_NAME = ".ph";
|
|
5
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../connect-utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,yBAAyB,CAAC;AAC/D,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,WAAW,QAAQ,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { PowerhouseConfig } from "@powerhousedao/config";
|
|
2
|
-
import type { Plugin } from "vite";
|
|
3
|
-
import type { ConnectCommonOptions } from "./types.js";
|
|
4
|
-
export declare const DEFAULT_CONNECT_OUTDIR: ".ph/connect-build/dist/";
|
|
5
|
-
export declare function loadVite(): Promise<typeof import("vite")>;
|
|
6
|
-
export declare function commonConnectOptionsToEnv(options: ConnectCommonOptions): void;
|
|
7
|
-
export declare function resolveViteConfigPath(options: Pick<ConnectCommonOptions, "projectRoot" | "viteConfigFile">): string;
|
|
8
|
-
export declare function resolvePackage(packageName: string, root?: string): string;
|
|
9
|
-
export declare function resolveConnectPackageJson(root?: string): JSON | null;
|
|
10
|
-
/**
|
|
11
|
-
* Finds the dist dir of Connect on the local machine
|
|
12
|
-
*/
|
|
13
|
-
export declare function resolveConnectBundle(root?: string): string;
|
|
14
|
-
export declare function resolveConnectPublicDir(root?: string): string;
|
|
15
|
-
/**
|
|
16
|
-
* Copies the Connect dist dir to the target path
|
|
17
|
-
*/
|
|
18
|
-
export declare function copyConnect(sourcePath: string, targetPath: string): void;
|
|
19
|
-
/**
|
|
20
|
-
* Backs up the index.html file
|
|
21
|
-
*
|
|
22
|
-
* Needed when running the Connect Studio dev server on Windows
|
|
23
|
-
*/
|
|
24
|
-
export declare function backupIndexHtml(appPath: string, restore?: boolean): void;
|
|
25
|
-
export declare function removeBase64EnvValues(appPath: string): void;
|
|
26
|
-
export declare function readJsonFile(filePath: string): PowerhouseConfig | null;
|
|
27
|
-
/**
|
|
28
|
-
* Takes a list of Powerhouse project packages and optionally local Powerhouse packages and outputs a js file which exports those packages for use in Connect Studio.
|
|
29
|
-
*/
|
|
30
|
-
export declare function makeImportScriptFromPackages(args: {
|
|
31
|
-
packages: string[];
|
|
32
|
-
importStyles?: boolean;
|
|
33
|
-
localJsPath?: string;
|
|
34
|
-
localCssPath?: string;
|
|
35
|
-
}): string;
|
|
36
|
-
export declare function ensureNodeVersion(minVersion?: string): void;
|
|
37
|
-
export declare function runShellScriptPlugin(scriptName: string, connectPath: string): Plugin;
|
|
38
|
-
/**
|
|
39
|
-
* Appends the contents to the <head> tag of the index.html file
|
|
40
|
-
*/
|
|
41
|
-
export declare function appendToHtmlHead(pathToHtml: string, contents: string): Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* Prepends the contents to the <head> tag of the index.html file
|
|
44
|
-
*/
|
|
45
|
-
export declare function prependToHtmlHead(pathToHtml: string, contents: string): Promise<void>;
|
|
46
|
-
export declare function runTsc(outDir: string): void;
|
|
47
|
-
export declare function stripVersionFromPackage(packageName: string): string;
|
|
48
|
-
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../connect-utils/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAO9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,eAAO,MAAM,sBAAsB,EAAG,yBAAkC,CAAC;AAEzE,wBAAsB,QAAQ,mCAU7B;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,oBAAoB,QAmCtE;A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AC,WAAW,EAAE,MAAM,GAAG,MAAM,CASnE"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * from "./build.js";
|
|
2
|
-
export * from "./constants.js";
|
|
3
|
-
export * from "./helpers.js";
|
|
4
|
-
export * from "./preview.js";
|
|
5
|
-
export * from "./studio.js";
|
|
6
|
-
export * from "./types.js";
|
|
7
|
-
export * from "./vite-config.js";
|
|
8
|
-
export * from "./vite-plugins/base.js";
|
|
9
|
-
export * from "./vite-plugins/document-models-hmr.js";
|
|
10
|
-
export * from "./vite-plugins/editors-hmr.js";
|
|
11
|
-
export * from "./vite-plugins/external-packages.js";
|
|
12
|
-
export * from "./vite-plugins/importmap.js";
|
|
13
|
-
export * from "./vite-plugins/ph-external-packages.js";
|
|
14
|
-
export * from "./vite-plugins/studio.js";
|
|
15
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../connect-utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,0BAA0B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../connect-utils/preview.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD,wBAAsB,cAAc,CAAC,OAAO,GAAE,qBAA0B,iBA6CvE"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ConnectStudioOptions } from "./types.js";
|
|
2
|
-
export declare const ConnectStudioDefaultOptions: {
|
|
3
|
-
readonly printUrls: true;
|
|
4
|
-
readonly bindCLIShortcuts: true;
|
|
5
|
-
};
|
|
6
|
-
export declare function startConnectStudio(options?: ConnectStudioOptions): Promise<void>;
|
|
7
|
-
//# sourceMappingURL=studio.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"studio.d.ts","sourceRoot":"","sources":["../../connect-utils/studio.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,eAAO,MAAM,2BAA2B;;;CAGC,CAAC;AAE1C,wBAAsB,kBAAkB,CACtC,OAAO,GAAE,oBAAkD,iBA0C5D"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { PowerhouseConfig } from "@powerhousedao/config";
|
|
2
|
-
import type { CommonServerOptions } from "vite";
|
|
3
|
-
export type IConnectOptions = {
|
|
4
|
-
mode: string;
|
|
5
|
-
dirname: string;
|
|
6
|
-
envDir?: string;
|
|
7
|
-
powerhouseConfig?: PowerhouseConfig;
|
|
8
|
-
localPackage?: string | false;
|
|
9
|
-
watchTimeout?: number;
|
|
10
|
-
};
|
|
11
|
-
export type ConnectCommonOptions = {
|
|
12
|
-
base?: string;
|
|
13
|
-
mode?: string;
|
|
14
|
-
configFile?: string;
|
|
15
|
-
projectRoot?: string;
|
|
16
|
-
viteConfigFile?: string;
|
|
17
|
-
disableLocalPackage?: boolean;
|
|
18
|
-
defaultDrivesUrl?: string[];
|
|
19
|
-
drivesPreserveStrategy?: "preserve-all" | "preserve-by-url-and-detach";
|
|
20
|
-
};
|
|
21
|
-
export type ViteDevOptions = Pick<CommonServerOptions, "port" | "host" | "open" | "cors" | "strictPort"> & {
|
|
22
|
-
force?: boolean;
|
|
23
|
-
};
|
|
24
|
-
export type ConnectStudioOptions = ConnectCommonOptions & {
|
|
25
|
-
devServerOptions?: ViteDevOptions;
|
|
26
|
-
printUrls?: boolean;
|
|
27
|
-
bindCLIShortcuts?: boolean;
|
|
28
|
-
};
|
|
29
|
-
export type ConnectBuildOptions = ConnectCommonOptions & {
|
|
30
|
-
outDir?: string;
|
|
31
|
-
};
|
|
32
|
-
export type ConnectPreviewOptions = ConnectCommonOptions & Omit<ViteDevOptions, "cors"> & {
|
|
33
|
-
outDir?: string;
|
|
34
|
-
printUrls?: boolean;
|
|
35
|
-
bindCLIShortcuts?: boolean;
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../connect-utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAEhD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAEjC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE5B,sBAAsB,CAAC,EAAE,cAAc,GAAG,4BAA4B,CAAC;CACxE,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,mBAAmB,EACnB,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CACjD,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAExB,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,GAAG;IACxD,gBAAgB,CAAC,EAAE,cAAc,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,GAAG;IAEvD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,oBAAoB,GACtD,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG;IAE7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { type UserConfig } from "vite";
|
|
2
|
-
import type { IConnectOptions } from "./types.js";
|
|
3
|
-
export declare const connectClientConfig: {
|
|
4
|
-
readonly meta: readonly [{
|
|
5
|
-
readonly tag: "meta";
|
|
6
|
-
readonly attrs: {
|
|
7
|
-
readonly property: "og:title";
|
|
8
|
-
readonly content: "Connect";
|
|
9
|
-
};
|
|
10
|
-
}, {
|
|
11
|
-
readonly tag: "meta";
|
|
12
|
-
readonly attrs: {
|
|
13
|
-
readonly property: "og:type";
|
|
14
|
-
readonly content: "website";
|
|
15
|
-
};
|
|
16
|
-
}, {
|
|
17
|
-
readonly tag: "meta";
|
|
18
|
-
readonly attrs: {
|
|
19
|
-
readonly property: "og:url";
|
|
20
|
-
readonly content: "https://apps.powerhouse.io/powerhouse/connect/";
|
|
21
|
-
};
|
|
22
|
-
}, {
|
|
23
|
-
readonly tag: "meta";
|
|
24
|
-
readonly attrs: {
|
|
25
|
-
readonly property: "og:description";
|
|
26
|
-
readonly content: "Navigate your organisation’s toughest operational challenges and steer your contributors to success with Connect. A navigation, collaboration and reporting tool for decentralised and open organisation.";
|
|
27
|
-
};
|
|
28
|
-
}, {
|
|
29
|
-
readonly tag: "meta";
|
|
30
|
-
readonly attrs: {
|
|
31
|
-
readonly property: "og:image";
|
|
32
|
-
readonly content: "https://cf-ipfs.com/ipfs/bafkreigrmclndf2jpbolaq22535q2sw5t44uad3az3dpvkzrnt4lpjt63e";
|
|
33
|
-
};
|
|
34
|
-
}, {
|
|
35
|
-
readonly tag: "meta";
|
|
36
|
-
readonly attrs: {
|
|
37
|
-
readonly name: "twitter:card";
|
|
38
|
-
readonly content: "summary_large_image";
|
|
39
|
-
};
|
|
40
|
-
}, {
|
|
41
|
-
readonly tag: "meta";
|
|
42
|
-
readonly attrs: {
|
|
43
|
-
readonly name: "twitter:image";
|
|
44
|
-
readonly content: "https://cf-ipfs.com/ipfs/bafkreigrmclndf2jpbolaq22535q2sw5t44uad3az3dpvkzrnt4lpjt63e";
|
|
45
|
-
};
|
|
46
|
-
}, {
|
|
47
|
-
readonly tag: "meta";
|
|
48
|
-
readonly attrs: {
|
|
49
|
-
readonly name: "twitter:title";
|
|
50
|
-
readonly content: "Connect";
|
|
51
|
-
};
|
|
52
|
-
}, {
|
|
53
|
-
readonly tag: "meta";
|
|
54
|
-
readonly attrs: {
|
|
55
|
-
readonly name: "twitter:description";
|
|
56
|
-
readonly content: "Navigate your organisation’s toughest operational challenges and steer your contributors to success with Connect. A navigation, collaboration and reporting tool for decentralised and open organisation.";
|
|
57
|
-
};
|
|
58
|
-
}];
|
|
59
|
-
};
|
|
60
|
-
export declare function getConnectBaseViteConfig(options: IConnectOptions): UserConfig;
|
|
61
|
-
//# sourceMappingURL=vite-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vite-config.d.ts","sourceRoot":"","sources":["../../connect-utils/vite-config.ts"],"names":[],"mappings":"AAYA,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,MAAM,CAAC;AAId,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEtB,CAAC;AAyCX,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,eAAe,cAqKhE"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Package } from "resolve.exports";
|
|
2
|
-
import type { Plugin, PluginOption } from "vite";
|
|
3
|
-
export declare const externalIds: RegExp[];
|
|
4
|
-
export declare function viteIgnoreStaticImport(_importKeys: (string | RegExp | false | undefined)[]): Plugin;
|
|
5
|
-
export declare function viteReplaceImports(imports: Record<string, string>): PluginOption;
|
|
6
|
-
export declare function findPackageJson(packageName: string): Promise<{
|
|
7
|
-
packageJson: Package;
|
|
8
|
-
path: string;
|
|
9
|
-
}>;
|
|
10
|
-
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../connect-utils/vite-plugins/base.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAuB,MAAM,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAGtE,eAAO,MAAM,WAAW,UAAyC,CAAC;AAKlE,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC,EAAE,GACnD,MAAM,CAgER;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,YAAY,CAgDd;AAED,wBAAsB,eAAe,CAAC,WAAW,EAAE,MAAM;iBAsBT,OAAO;;GAOtD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"document-models-hmr.d.ts","sourceRoot":"","sources":["../../../connect-utils/vite-plugins/document-models-hmr.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,MAAM,CAAC;AAGxD,eAAO,MAAM,qBAAqB,GAAI,WAAW,MAAM,KAAG,YAwEzD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editors-hmr.d.ts","sourceRoot":"","sources":["../../../connect-utils/vite-plugins/editors-hmr.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,MAAM,CAAC;AAGxD,eAAO,MAAM,cAAc,GAAI,WAAW,MAAM,KAAG,YAsElD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"external-packages.d.ts","sourceRoot":"","sources":["../../../connect-utils/vite-plugins/external-packages.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,MAAM,CAAC;AA6FxD,eAAO,MAAM,wBAAwB,GACnC,cAAc,OAAO,EACrB,UAAU,MAAM,EAAE,GAAG,SAAS,EAC9B,WAAW,MAAM,KAChB,YAAY,EAgEd,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { PluginOption } from "vite";
|
|
2
|
-
export type Provider = "node_modules" | "esm.sh";
|
|
3
|
-
export type Dependency = {
|
|
4
|
-
name: string;
|
|
5
|
-
version?: string;
|
|
6
|
-
provider: Provider;
|
|
7
|
-
dependencies?: string[];
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Vite plugin to bundle or copy dependencies and inject an import map into `index.html`.
|
|
11
|
-
*
|
|
12
|
-
* @param {string} outputDir - The directory where the modules should be placed.
|
|
13
|
-
* @param {(string | { name: string; provider: string })[]} dependencies -
|
|
14
|
-
* List of dependencies to process. Can be:
|
|
15
|
-
* - A string (dependency is copied as is).
|
|
16
|
-
* - An object `{ name, provide }` where:
|
|
17
|
-
* - `name` (string): The module name.
|
|
18
|
-
* - `provider` (string): Where to retrieve the module bundle. Defaults to node_modules.
|
|
19
|
-
*
|
|
20
|
-
* @returns {Plugin} A Vite plugin that processes dependencies and injects an import map.
|
|
21
|
-
*/
|
|
22
|
-
export declare function generateImportMapPlugin(outputDir: string, dependencies: (string | Dependency)[]): PluginOption[];
|
|
23
|
-
//# sourceMappingURL=importmap.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"importmap.d.ts","sourceRoot":"","sources":["../../../connect-utils/vite-plugins/importmap.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAGzC,MAAM,MAAM,QAAQ,GAAG,cAAc,GAAG,QAAQ,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAyRF;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,CAAC,MAAM,GAAG,UAAU,CAAC,EAAE,GACpC,YAAY,EAAE,CAiChB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ph-external-packages.d.ts","sourceRoot":"","sources":["../../../connect-utils/vite-plugins/ph-external-packages.ts"],"names":[],"mappings":"AAiDA,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,EAAE,EACpB,YAAY,CAAC,EAAE,MAAM,8BAyDtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"studio.d.ts","sourceRoot":"","sources":["../../../connect-utils/vite-plugins/studio.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAGzC,wBAAgB,0BAA0B,CACxC,OAAO,qBAAQ,EACf,WAAW,EAAE,MAAM,EACnB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B,YAAY,EAAE,CAgChB"}
|
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|