UNPKG

zephyr-agent

Version:
545 lines (544 loc) • 28.7 kB
"use strict"; var __webpack_require__ = {}; (()=>{ __webpack_require__.d = (exports1, getters, values)=>{ var define = (defs, kind)=>{ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, { enumerable: true, [kind]: defs[key] }); }; define(getters, "get"); define(values, "value"); }; })(); (()=>{ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop); })(); (()=>{ __webpack_require__.r = (exports1)=>{ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, { value: 'Module' }); Object.defineProperty(exports1, '__esModule', { value: true }); }; })(); var __webpack_exports__ = {}; __webpack_require__.r(__webpack_exports__); __webpack_require__.d(__webpack_exports__, { ApplicationContext: ()=>external_application_context_js_namespaceObject.ApplicationContext, ApplicationContextRegistry: ()=>external_application_context_js_namespaceObject.ApplicationContextRegistry, BuildParticipantFailedError: ()=>external_build_session_js_namespaceObject.BuildParticipantFailedError, BuildSession: ()=>external_build_session_js_namespaceObject.BuildSession, BuildSessionAbortedError: ()=>external_build_session_js_namespaceObject.BuildSessionAbortedError, BuildSessionAssetCollisionError: ()=>external_build_session_js_namespaceObject.BuildSessionAssetCollisionError, BuildSessionNotReadyError: ()=>external_build_session_js_namespaceObject.BuildSessionNotReadyError, BuildSessionRollbackError: ()=>external_build_session_js_namespaceObject.BuildSessionRollbackError, BuildSessionStateError: ()=>external_build_session_js_namespaceObject.BuildSessionStateError, ZephyrEngine: ()=>ZephyrEngine, is_zephyr_dependency_pair: ()=>is_zephyr_dependency_pair, is_zephyr_resolved_dependency: ()=>is_zephyr_resolved_dependency, readPackageJson: ()=>readPackageJson }); const external_ci_info_namespaceObject = require("ci-info"); const external_node_fs_namespaceObject = require("node:fs"); const external_node_path_namespaceObject = require("node:path"); const external_zephyr_edge_contract_namespaceObject = require("zephyr-edge-contract"); const login_js_namespaceObject = require("../lib/auth/login.js"); const ze_util_get_git_info_js_namespaceObject = require("../lib/build-context/ze-util-get-git-info.js"); const ze_util_read_package_json_js_namespaceObject = require("../lib/build-context/ze-util-read-package-json.js"); const zephyr_config_js_namespaceObject = require("../lib/build-context/zephyr-config.js"); const get_upload_strategy_js_namespaceObject = require("../lib/deployment/get-upload-strategy.js"); const distributed_hash_control_js_namespaceObject = require("../lib/edge-hash-list/distributed-hash-control.js"); const get_missing_assets_js_namespaceObject = require("../lib/edge-hash-list/get-missing-assets.js"); const get_application_configuration_js_namespaceObject = require("../lib/edge-requests/get-application-configuration.js"); const get_build_id_js_namespaceObject = require("../lib/edge-requests/get-build-id.js"); const index_js_namespaceObject = require("../lib/errors/index.js"); const logging_index_js_namespaceObject = require("../lib/logging/index.js"); const picocolor_js_namespaceObject = require("../lib/logging/picocolor.js"); const ze_log_event_js_namespaceObject = require("../lib/logging/ze-log-event.js"); const app_deploy_result_cache_js_namespaceObject = require("../lib/node-persist/app-deploy-result-cache.js"); const ze_build_assets_js_namespaceObject = require("../lib/transformers/ze-build-assets.js"); const ze_build_snapshot_js_namespaceObject = require("../lib/transformers/ze-build-snapshot.js"); const ze_create_manifest_js_namespaceObject = require("../lib/transformers/ze-create-manifest.js"); const outdated_plugin_warning_js_namespaceObject = require("../lib/version/outdated-plugin-warning.js"); const plugin_package_name_js_namespaceObject = require("../lib/version/plugin-package-name.js"); const zephyr_agent_version_js_namespaceObject = require("../lib/version/zephyr-agent-version.js"); const external_resolve_remote_dependency_js_namespaceObject = require("./resolve_remote_dependency.js"); const external_application_context_js_namespaceObject = require("./application-context.js"); const external_build_session_js_namespaceObject = require("./build-session.js"); function is_zephyr_dependency_pair(dep) { return !!dep; } function is_zephyr_resolved_dependency(dep) { return null !== dep; } class ZephyrEngine { npmProperties; gitProperties; zephyrConfig; application_uid; application_configuration; applicationProperties; logger; env = { isCI: external_ci_info_namespaceObject.isCI, target: 'web', env: (0, external_zephyr_edge_contract_namespaceObject.ZE_ENV)(), ssr: false }; buildProperties = { output: './dist' }; builder; federated_dependencies = null; build_start_time = null; build_id = null; snapshotId = null; hash_list = null; resolved_hash_list = null; version_url = null; target_urls = null; build_stats_time = null; snapshot_with_envs = null; ze_env_vars = null; ze_env_vars_hash = null; worker_version = null; get hasActiveBuild() { return null !== this.build_start_time || null !== this.build_id || null !== this.snapshotId; } get zephyr_dependencies() { return (0, ze_create_manifest_js_namespaceObject.convertResolvedDependencies)(this.federated_dependencies ?? []); } constructor(options){ this.builder = options.builder; } static defer_create() { let resolve; let reject; let creationStarted = false; const zephyr_engine_defer = new Promise((res, rej)=>{ resolve = res; reject = rej; }); zephyr_engine_defer.catch(()=>void 0); return { zephyr_engine_defer, zephyr_defer_create (options) { if (creationStarted) return; creationStarted = true; ZephyrEngine.create(options).then(resolve, reject); } }; } static async create(options) { if (void 0 !== options.target) (0, external_zephyr_edge_contract_namespaceObject.assertZephyrBuildTarget)(options.target, 'ZephyrEngine.create({ target })'); const context = options.context || process.cwd(); const zephyrConfig = (0, zephyr_config_js_namespaceObject.getZephyrConfig)(context); logging_index_js_namespaceObject.ze_log.init(`Initializing: Zephyr Engine for ${context}...`); const ze = new ZephyrEngine({ context, builder: options.builder }); if (void 0 !== options.target) ze.env.target = options.target; ze.zephyrConfig = zephyrConfig; logging_index_js_namespaceObject.ze_log.init('Initializing: npm package info...'); ze.npmProperties = await (0, ze_util_read_package_json_js_namespaceObject.getPackageJson)(context, zephyrConfig); const pluginPackageName = (0, plugin_package_name_js_namespaceObject.resolveZephyrPluginPackageName)(ze.npmProperties, options.builder); (0, outdated_plugin_warning_js_namespaceObject.maybeShowOutdatedPluginWarning)(pluginPackageName); logging_index_js_namespaceObject.ze_log.init('Initializing: git info...'); ze.gitProperties = await (0, ze_util_get_git_info_js_namespaceObject.getGitInfo)(context, zephyrConfig); mut_zephyr_app_uid(ze); const application_uid = ze.application_uid; logging_index_js_namespaceObject.ze_log.init('Initializing: checking authentication...'); await (0, login_js_namespaceObject.checkAuth)(ze.gitProperties); logging_index_js_namespaceObject.ze_log.init('Initialized: loading application configuration...'); ze.application_configuration = (0, get_application_configuration_js_namespaceObject.getApplicationConfiguration)({ application_uid }); ze.application_configuration.then((appConfig)=>{ const { username, email, EDGE_URL } = appConfig; logging_index_js_namespaceObject.ze_log.init('Loaded: application configuration', { username, email, EDGE_URL }); }).catch((err)=>logging_index_js_namespaceObject.ze_log.init(`Failed to get application configuration: ${err}`)); try { await ze.start_new_build(); const [initializedLogger, { username }, buildId] = await Promise.all([ ze.logger, ze.application_configuration, ze.build_id ]); initializedLogger({ level: 'info', action: 'build:info:user', ignore: true, message: `Hi ${(0, picocolor_js_namespaceObject.cyanBright)(username)}!\n${(0, picocolor_js_namespaceObject.white)(application_uid)}${(0, picocolor_js_namespaceObject.yellow)(`#${buildId}`)}\n` }); return ze; } catch (error) { if (ze.hasActiveBuild) ze.build_failed(); throw error; } } async resolve_remote_dependencies(deps, defaultLibraryType = 'var') { if (!deps) return null; const app_config = await this.application_configuration; const ze_dependencies = this.npmProperties.zephyrDependencies; const platform = this.env.target ?? 'web'; (0, external_zephyr_edge_contract_namespaceObject.assertZephyrBuildTarget)(platform, 'ZephyrEngine.env.target'); const build_context_json = { target: platform, isCI: external_ci_info_namespaceObject.isCI, branch: this.gitProperties.git.branch, username: app_config.username, env: this.env.env }; if (this.env.env) logging_index_js_namespaceObject.ze_log.config('Using environment:', this.env.env); const build_context = Buffer.from(JSON.stringify(build_context_json)).toString('base64'); logging_index_js_namespaceObject.ze_log.remotes('resolve_remote_dependencies.deps', deps, 'platform', platform, 'ze_dependencies', ze_dependencies); const resolution_errors = []; const tasks = deps.map(async (dep)=>{ const [app_name, project_name, org_name] = dep.name.split('.', 3); const ze_dependency = ze_dependencies?.[dep.name]; const [ze_app_name, ze_project_name, ze_org_name] = ze_dependency?.app_uid?.split('.') ?? []; const dep_application_uid = (0, external_zephyr_edge_contract_namespaceObject.createApplicationUid)({ org: ze_org_name ?? org_name ?? this.gitProperties.app.org, project: ze_project_name ?? project_name ?? this.gitProperties.app.project, name: ze_app_name ?? app_name }); const tuple = await external_zephyr_edge_contract_namespaceObject.ZeUtils.PromiseTuple((0, external_resolve_remote_dependency_js_namespaceObject.resolve_remote_dependency)({ application_uid: dep_application_uid, version: ze_dependency?.version ?? dep.version, platform, build_context, dependencyUrlMode: this.zephyrConfig.dependencyUrlMode })); if (!external_zephyr_edge_contract_namespaceObject.ZeUtils.isSuccessTuple(tuple)) { logging_index_js_namespaceObject.ze_log.remotes(`Failed to resolve remote dependency: ${dep.name}@${dep.version}`, 'skipping...'); resolution_errors.push({ dep, error: tuple[0] }); return null; } logging_index_js_namespaceObject.ze_log.remotes(`Resolved dependency: ${tuple[1].default_url}`); if (dep.name === tuple[1].name) return tuple[1]; return Object.assign({ library_type: defaultLibraryType }, tuple[1], { name: dep.name, version: dep.version }); }); const resolution_results = await Promise.all(tasks); if (resolution_errors.length > 0) { const logger = await this.logger; const errorSummary = resolution_errors.map(({ dep, error })=>{ const errorMessage = index_js_namespaceObject.ZephyrError.is(error) ? `Error code: ${error.code}` : "Unknown error"; const version = index_js_namespaceObject.ZephyrError.is(error) && error.template && 'version' in error.template ? error.template.version : dep.version; return ` - ${dep.name}@${version} -> ${errorMessage}`; }).join('\n'); logger({ level: 'warn', action: 'build:error:dependency_resolution', message: `Failed to resolve remote dependencies: ${errorSummary}\n More information on remote dependency resolution please check: https://docs.zephyr-cloud.io/features/remote-dependencies` }); } this.federated_dependencies = resolution_results.filter(is_zephyr_resolved_dependency); if (this.federated_dependencies.length > 0) { const remotesList = this.federated_dependencies.map((dep)=>` ${dep.name} → ${dep.remote_entry_url}`).join('\n'); (0, ze_log_event_js_namespaceObject.logFn)('info', `Resolved remotes:\n${remotesList}`); } return this.federated_dependencies; } async start_new_build() { logging_index_js_namespaceObject.ze_log.init('Starting new build'); const ze = this; ze.build_start_time = Date.now(); if (ze.build_id && ze.snapshotId && await ze.build_id && await ze.snapshotId) return void logging_index_js_namespaceObject.ze_log.init('Skip: creating new build because no assets was uploaded'); const application_uid = ze.application_uid; logging_index_js_namespaceObject.ze_log.init('Initializing: loading of hash list'); const hashList = (0, distributed_hash_control_js_namespaceObject.get_hash_list)(application_uid); ze.hash_list = hashList; hashList.then((hash_set)=>{ if (ze.hash_list === hashList) { ze.resolved_hash_list = hash_set; logging_index_js_namespaceObject.ze_log.app(`Loaded: hash list with ${hash_set.hash_set.size} entries`); } }).catch((err)=>logging_index_js_namespaceObject.ze_log.app(`Failed to get hash list: ${err}`)); logging_index_js_namespaceObject.ze_log.init('Initializing: loading of build id'); const buildId = (0, get_build_id_js_namespaceObject.getBuildId)(application_uid); ze.build_id = buildId; buildId.then((buildId)=>logging_index_js_namespaceObject.ze_log.app(`Loaded build id "${buildId}"`)).catch((err)=>logging_index_js_namespaceObject.ze_log.app(`Failed to get build id: ${err}`)); logging_index_js_namespaceObject.ze_log.init('Initializing: logger'); const initializedLogger = Promise.all([ ze.application_configuration, buildId ]).then((record)=>{ const resolvedBuildId = record[1]; logging_index_js_namespaceObject.ze_log.init('Initialized: application configuration, build id and hash list'); return (0, ze_log_event_js_namespaceObject.logger)({ application_uid, buildId: resolvedBuildId, git: ze.gitProperties.git }); }); ze.logger = initializedLogger; const snapshotId = Promise.all([ ze.application_configuration, buildId ]).then((record)=>(0, external_zephyr_edge_contract_namespaceObject.flatCreateSnapshotId)({ ...ze.applicationProperties, buildId: record[1], username: record[0].username })); ze.snapshotId = snapshotId; try { await Promise.all([ initializedLogger, snapshotId ]); } catch (error) { if (ze.build_id === buildId) resetBuildState(ze); throw error; } } async build_finished() { const zephyr_engine = this; try { const logger = await zephyr_engine.logger; const zeStart = zephyr_engine.build_start_time; const buildStatsTime = zephyr_engine.build_stats_time; const versionUrl = zephyr_engine.version_url; const targetUrls = zephyr_engine.target_urls; const dependencies = zephyr_engine.federated_dependencies; const if_target_is_react_native = 'ios' === zephyr_engine.env.target || 'android' === zephyr_engine.env.target; const ze_env = (0, external_zephyr_edge_contract_namespaceObject.ZE_ENV)(); if (ze_env) { logger({ level: 'info', action: 'build:info:env', ignore: true, message: `Using environment: ${(0, picocolor_js_namespaceObject.cyanBright)(ze_env)}` }); zephyr_engine.env.env = ze_env; } if (zeStart && versionUrl) { if (dependencies && dependencies.length > 0) logger({ level: 'info', action: 'build:info:user', ignore: true, message: if_target_is_react_native ? `Resolved zephyr dependencies: ${dependencies.map((dep)=>dep.name).join(', ')} for platform: ${zephyr_engine.env.target}` : `Resolved zephyr dependencies: ${dependencies.map((dep)=>dep.name).join(', ')}` }); logger({ level: 'trace', action: 'deploy:url', message: `Deployed to ${(0, picocolor_js_namespaceObject.cyanBright)('Zephyr')}'s edge in ${(0, picocolor_js_namespaceObject.yellow)(`${Date.now() - zeStart}`)}ms.\n\n${(0, picocolor_js_namespaceObject.cyanBright)(versionUrl)}` }); } if (targetUrls?.length && buildStatsTime) logger({ level: 'trace', action: 'deploy:url', message: `\nUpdated ${(0, picocolor_js_namespaceObject.greenBright)(targetUrls.length.toString())} targets in ${(0, picocolor_js_namespaceObject.yellow)(buildStatsTime?.toString())}ms\n- ${targetUrls.join('\n- ')}` }); } finally{ resetBuildState(this); } } build_failed() { resetBuildState(this); } async upload_assets(props) { const zephyr_engine = this; try { logging_index_js_namespaceObject.ze_log.upload('Initializing: upload assets'); const { assetsMap: providedAssetsMap, buildStats, mfConfig, mfConfigs, snapshotType, entrypoint } = props; const target = zephyr_engine.env?.target ?? 'web'; (0, external_zephyr_edge_contract_namespaceObject.assertZephyrBuildTarget)(target, 'ZephyrEngine.env.target'); const assetsMap = Object.isFrozen(providedAssetsMap) ? { ...providedAssetsMap } : providedAssetsMap; const assetsByPath = indexAssetsBySnapshotPath(assetsMap); const emittedManifest = assetsByPath.get(external_zephyr_edge_contract_namespaceObject.ZEPHYR_MANIFEST_FILENAME); if (!emittedManifest) { const manifest = { filepath: external_zephyr_edge_contract_namespaceObject.ZEPHYR_MANIFEST_FILENAME, content: (0, ze_create_manifest_js_namespaceObject.createManifestContent)(zephyr_engine.federated_dependencies ?? []) }; const manifestAsset = (0, ze_build_assets_js_namespaceObject.zeBuildAssets)(manifest); if (assetsMap[manifestAsset.hash]) throw new index_js_namespaceObject.ZephyrError(index_js_namespaceObject.ZeErrors.ERR_DEPLOY_LOCAL_BUILD, { message: `Generated ${external_zephyr_edge_contract_namespaceObject.ZEPHYR_MANIFEST_FILENAME} hash ${manifestAsset.hash} collides with an existing asset map entry.` }); assetsMap[manifestAsset.hash] = manifestAsset; } if (!zephyr_engine.application_uid || !zephyr_engine.build_id) throw new index_js_namespaceObject.ZephyrError(index_js_namespaceObject.ZeErrors.ERR_DEPLOY_LOCAL_BUILD, { message: 'ZephyrEngine cannot upload before application_uid and build_id are initialized.' }); await zephyr_engine.build_id; let hash_set = zephyr_engine.resolved_hash_list; if (!hash_set && zephyr_engine.hash_list) try { hash_set = await zephyr_engine.hash_list; zephyr_engine.resolved_hash_list = hash_set; } catch (error) { logging_index_js_namespaceObject.ze_log.upload(`Failed to load hash list; uploading all assets: ${error}`); hash_set = { hash_set: new Set() }; } const missingAssets = (0, get_missing_assets_js_namespaceObject.get_missing_assets)({ assetsMap, hash_set: hash_set ?? { hash_set: new Set() } }); const snapshot = await (0, ze_build_snapshot_js_namespaceObject.createSnapshot)(zephyr_engine, { assets: assetsMap, mfConfig, mfConfigs, snapshotType, entrypoint }); const waitForCompletion = !!process.env['ZE_WAIT_FOR_DEPLOYMENTS']?.trim(); if (waitForCompletion) { const logger = await this.logger; logger({ action: 'deploy:wait', level: 'info', message: "Waiting for deployment to complete..." }); } const upload_options = { snapshot, getDashData: (engine)=>{ const dash_data = buildStats.ze_envs || buildStats.ze_envs_hash ? buildStats : { ...buildStats, ze_envs: (engine || zephyr_engine).ze_env_vars || void 0, ze_envs_hash: (engine || zephyr_engine).ze_env_vars_hash || void 0 }; return { ...dash_data, builder: dash_data.builder ?? zephyr_engine.builder, plugin_version: dash_data.plugin_version ?? (0, zephyr_agent_version_js_namespaceObject.getZephyrAgentVersion)(), worker_version: dash_data.worker_version ?? zephyr_engine.worker_version ?? void 0, waitForCompletion }; }, assets: { assetsMap, missingAssets } }; const platform = (await zephyr_engine.application_configuration).PLATFORM; const strategy = (0, get_upload_strategy_js_namespaceObject.getUploadStrategy)(platform); zephyr_engine.version_url = await strategy(zephyr_engine, upload_options); const application_uid = zephyr_engine.application_uid; await (0, app_deploy_result_cache_js_namespaceObject.setAppDeployResult)(application_uid, { urls: [ zephyr_engine.version_url ], snapshot }); if (props.hooks?.onDeployComplete && zephyr_engine.version_url) try { const snapshotId = await zephyr_engine.snapshotId; const deploymentInfo = { url: zephyr_engine.version_url, snapshotId, snapshot, federatedDependencies: zephyr_engine.federated_dependencies || [], buildStats: upload_options.getDashData(zephyr_engine) }; await props.hooks.onDeployComplete(deploymentInfo); } catch (error) { logging_index_js_namespaceObject.ze_log.upload('Warning: deployment hook failed', error); } } catch (error) { zephyr_engine.build_failed(); throw error; } } } function indexAssetsBySnapshotPath(assetsMap) { const assetsByPath = new Map(); for (const asset of Object.values(assetsMap)){ const canonicalPath = asset.path.replaceAll('\\', '/'); const existing = assetsByPath.get(canonicalPath); if (existing) throw new index_js_namespaceObject.ZephyrError(index_js_namespaceObject.ZeErrors.ERR_DEPLOY_LOCAL_BUILD, { message: `Ambiguous asset path "${canonicalPath}": ${existing.hash} and ${asset.hash} would publish to the same location.` }); assetsByPath.set(canonicalPath, asset); } return assetsByPath; } function resetBuildState(zephyr_engine) { zephyr_engine.build_id = null; zephyr_engine.snapshotId = null; zephyr_engine.hash_list = null; zephyr_engine.resolved_hash_list = null; zephyr_engine.version_url = null; zephyr_engine.target_urls = null; zephyr_engine.build_start_time = null; zephyr_engine.build_stats_time = null; zephyr_engine.snapshot_with_envs = null; zephyr_engine.ze_env_vars = null; zephyr_engine.ze_env_vars_hash = null; zephyr_engine.worker_version = null; } function mut_zephyr_app_uid(ze) { ze.applicationProperties = { org: ze.gitProperties.app.org, project: ze.gitProperties.app.project, name: ze.zephyrConfig.appName ?? ze.npmProperties.name, version: ze.npmProperties.version }; ze.application_uid = (0, external_zephyr_edge_contract_namespaceObject.createApplicationUid)(ze.applicationProperties); } function readPackageJson(root, zephyrConfig = (0, zephyr_config_js_namespaceObject.getZephyrConfig)(root)) { const packageJsonPath = (0, external_node_path_namespaceObject.join)(root, 'package.json'); const packageJsonContent = (0, external_node_fs_namespaceObject.existsSync)(packageJsonPath) ? (0, external_node_fs_namespaceObject.readFileSync)(packageJsonPath, 'utf-8') : '{}'; const packageJson = JSON.parse(packageJsonContent); const zephyrDependencies = (0, zephyr_config_js_namespaceObject.mergeRemoteDependencies)(packageJson.zephyrDependencies ?? packageJson['zephyr:dependencies'], zephyrConfig); return zephyrDependencies ? { ...packageJson, zephyrDependencies } : packageJson; } exports.ApplicationContext = __webpack_exports__.ApplicationContext; exports.ApplicationContextRegistry = __webpack_exports__.ApplicationContextRegistry; exports.BuildParticipantFailedError = __webpack_exports__.BuildParticipantFailedError; exports.BuildSession = __webpack_exports__.BuildSession; exports.BuildSessionAbortedError = __webpack_exports__.BuildSessionAbortedError; exports.BuildSessionAssetCollisionError = __webpack_exports__.BuildSessionAssetCollisionError; exports.BuildSessionNotReadyError = __webpack_exports__.BuildSessionNotReadyError; exports.BuildSessionRollbackError = __webpack_exports__.BuildSessionRollbackError; exports.BuildSessionStateError = __webpack_exports__.BuildSessionStateError; exports.ZephyrEngine = __webpack_exports__.ZephyrEngine; exports.is_zephyr_dependency_pair = __webpack_exports__.is_zephyr_dependency_pair; exports.is_zephyr_resolved_dependency = __webpack_exports__.is_zephyr_resolved_dependency; exports.readPackageJson = __webpack_exports__.readPackageJson; for(var __rspack_i in __webpack_exports__)if (-1 === [ "ApplicationContext", "ApplicationContextRegistry", "BuildParticipantFailedError", "BuildSession", "BuildSessionAbortedError", "BuildSessionAssetCollisionError", "BuildSessionNotReadyError", "BuildSessionRollbackError", "BuildSessionStateError", "ZephyrEngine", "is_zephyr_dependency_pair", "is_zephyr_resolved_dependency", "readPackageJson" ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i]; Object.defineProperty(exports, '__esModule', { value: true }); //# sourceMappingURL=index.js.map