@ms-cloudpack/api-server 0.35.0 → 0.36.0

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.
Files changed (42) hide show
  1. package/lib/apis/ensurePackageBundled.d.ts.map +1 -1
  2. package/lib/apis/ensurePackageBundled.js +24 -4
  3. package/lib/apis/ensurePackageBundled.js.map +1 -1
  4. package/lib/data/busSources.d.ts +14 -0
  5. package/lib/data/busSources.d.ts.map +1 -1
  6. package/lib/types/BundleTaskOptions.d.ts +8 -0
  7. package/lib/types/BundleTaskOptions.d.ts.map +1 -1
  8. package/lib/types/BundleTaskOptions.js.map +1 -1
  9. package/lib/types/TaskDescription.d.ts +10 -0
  10. package/lib/types/TaskDescription.d.ts.map +1 -1
  11. package/lib/types/TaskEndDescription.d.ts +10 -0
  12. package/lib/types/TaskEndDescription.d.ts.map +1 -1
  13. package/lib/types/TaskMessage.d.ts +3 -0
  14. package/lib/types/TaskMessage.d.ts.map +1 -1
  15. package/lib/types/TaskMessage.js +1 -0
  16. package/lib/types/TaskMessage.js.map +1 -1
  17. package/lib/types/TaskResponse.d.ts +14 -0
  18. package/lib/types/TaskResponse.d.ts.map +1 -1
  19. package/lib/types/TaskResult.d.ts +10 -0
  20. package/lib/types/TaskResult.d.ts.map +1 -1
  21. package/lib/utilities/TaskRunner.d.ts.map +1 -1
  22. package/lib/utilities/TaskRunner.js +21 -35
  23. package/lib/utilities/TaskRunner.js.map +1 -1
  24. package/lib/utilities/addOverride.js +1 -1
  25. package/lib/utilities/addOverride.js.map +1 -1
  26. package/lib/utilities/bundleTask.d.ts.map +1 -1
  27. package/lib/utilities/bundleTask.js +10 -8
  28. package/lib/utilities/bundleTask.js.map +1 -1
  29. package/lib/utilities/createBundleRequestForPackage.d.ts +2 -4
  30. package/lib/utilities/createBundleRequestForPackage.d.ts.map +1 -1
  31. package/lib/utilities/createBundleRequestForPackage.js +3 -10
  32. package/lib/utilities/createBundleRequestForPackage.js.map +1 -1
  33. package/lib/utilities/createBundleTask.d.ts.map +1 -1
  34. package/lib/utilities/createBundleTask.js +4 -3
  35. package/lib/utilities/createBundleTask.js.map +1 -1
  36. package/lib/utilities/formatBundleErrors.js +5 -9
  37. package/lib/utilities/formatBundleErrors.js.map +1 -1
  38. package/lib/utilities/getBundleLocation.d.ts +1 -0
  39. package/lib/utilities/getBundleLocation.d.ts.map +1 -1
  40. package/lib/utilities/getBundleLocation.js +11 -10
  41. package/lib/utilities/getBundleLocation.js.map +1 -1
  42. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"ensurePackageBundled.d.ts","sourceRoot":"","sources":["../../src/apis/ensurePackageBundled.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAI/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAMvD;;GAEG;AACH,MAAM,WAAW,yBACf,SAAQ,IAAI,CAAC,aAAa,EAAE,YAAY,GAAG,SAAS,GAAG,aAAa,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;IACnH,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,wCAAwC;IACxC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mCAAmC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kCAAkC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wFAAwF;IACxF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAkBD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACnH,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,iEAAiE;IACjE,UAAU,EAAE,OAAO,CAAC;CACrB;AA0CD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,sCAAsC;IACtC,MAAM,EAAE,0BAA0B,CAAC;IACnC,uCAAuC;IACvC,YAAY,EAAE,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC;CACrD;AAOD;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,SAAS,CACf,yBAAyB,EACvB,KAAK,GACL,YAAY,GACZ,SAAS,GACT,SAAS,GACT,UAAU,GACV,UAAU,GACV,iBAAiB,GACjB,oBAAoB,GACpB,eAAe,CAClB,GACA,OAAO,CAAC,0BAA0B,CAAC,CAmCrC;yBAhDqB,oBAAoB;;;;;;;;;;;;;;;;AA6K1C,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"ensurePackageBundled.d.ts","sourceRoot":"","sources":["../../src/apis/ensurePackageBundled.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAI/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAMvD;;GAEG;AACH,MAAM,WAAW,yBACf,SAAQ,IAAI,CAAC,aAAa,EAAE,YAAY,GAAG,SAAS,GAAG,aAAa,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;IACnH,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,wCAAwC;IACxC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mCAAmC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kCAAkC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wFAAwF;IACxF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAkBD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACnH,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,iEAAiE;IACjE,UAAU,EAAE,OAAO,CAAC;CACrB;AA0CD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,sCAAsC;IACtC,MAAM,EAAE,0BAA0B,CAAC;IACnC,uCAAuC;IACvC,YAAY,EAAE,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC;CACrD;AAOD;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,SAAS,CACf,yBAAyB,EACvB,KAAK,GACL,YAAY,GACZ,SAAS,GACT,SAAS,GACT,UAAU,GACV,UAAU,GACV,iBAAiB,GACjB,oBAAoB,GACpB,eAAe,CAClB,GACA,OAAO,CAAC,0BAA0B,CAAC,CAmCrC;yBAhDqB,oBAAoB;;;;;;;;;;;;;;;;AAkM1C,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC"}
@@ -112,7 +112,28 @@ async function ensurePackageBundledInternal(params) {
112
112
  if (!packageEntry) {
113
113
  throw new Error(`Could not find package ${name} in the resolve map.`);
114
114
  }
115
- const bundleRequest = await createBundleRequestForPackage({
115
+ let hash = undefined;
116
+ let sourceHash = undefined;
117
+ if (useHashAsId) {
118
+ // If we are using the hash as the task id, we need to calculate it one and pass it through the task
119
+ // to prevent a race condition in which we get a different hash than the one used in the task id.
120
+ hash = await packageHashes.get({
121
+ packagePath: packageEntry.path,
122
+ isSourceHashingEnabled: false,
123
+ shouldRecalculate: true,
124
+ });
125
+ if (!packageEntry.isExternal) {
126
+ // We only need the source hash for internal packages for cache validation.
127
+ sourceHash = await packageHashes.get({
128
+ packagePath: packageEntry.path,
129
+ isSourceHashingEnabled: true,
130
+ shouldRecalculate: true,
131
+ });
132
+ }
133
+ }
134
+ const bundleRequest = createBundleRequestForPackage({
135
+ // Use the hash as the id if useHashAsId is enabled.
136
+ id: hash ?? packageEntry.path,
116
137
  packageEntry,
117
138
  bundlerType,
118
139
  disableSourceMaps,
@@ -120,9 +141,8 @@ async function ensurePackageBundledInternal(params) {
120
141
  shouldGetBundleInfo: shouldGetBundleInfo || enqueueDependencies,
121
142
  disableCache,
122
143
  isIncremental,
123
- useHashAsId,
124
- }, { config, packageHashes });
125
- const task = createBundleTask({ bundleRequest, context: ctx, options: { force: shouldForce } });
144
+ }, { config });
145
+ const task = createBundleTask({ bundleRequest, context: ctx, options: { force: shouldForce, hash, sourceHash } });
126
146
  // TODO: Add lage scheduling back.
127
147
  const { result } = await taskRunner.add(task, { rerun: shouldRerun });
128
148
  if (!result) {
@@ -1 +1 @@
1
- {"version":3,"file":"ensurePackageBundled.js","sourceRoot":"","sources":["../../src/apis/ensurePackageBundled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,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,CAAC;gBAC/C,YAAY,CAAC,GAAG,CAAC,CAAC;YACpB,CAAC;QACH,CAAC,CAAC;QACF,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,GAAG,EAAE;YAC/B,KAAK,eAAe,EAAE,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,oCAAoC;IACpC,IAAI,mBAAmB,IAAI,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC/C,KAAK,MAAM,cAAc,IAAI,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;YAClE,MAAM,iBAAiB,GAAG,YAAY,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;YAEpE,uEAAuE;YACvE,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,cAAc,IAAI,iBAAiB,EAAE,CAAC,EAAE,CAAC;gBAC1D,SAAS;YACX,CAAC;YAED,gBAAgB,CAAC,IAAI,CAAC;gBACpB,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE,iBAAiB;gBAC1B,WAAW;gBACX,mBAAmB;aACpB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO;QACL,MAAM,EAAE;YACN,OAAO;YACP,IAAI;YACJ,UAAU;YACV,GAAG,MAAM;SACV;QACD,gBAAgB;KACjB,CAAC;AACJ,CAAC;AAED,2CAA2C;AAC3C,oBAAoB,CAAC,SAAS,GAAG,eAAe;KAC7C,KAAK,CAAC,4BAA4B,CAAC;KACnC,MAAM,CAAC,6BAA6B,CAAC;KACrC,QAAQ,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { findResolveMapEntry } from '@ms-cloudpack/package-utilities';\nimport { publicProcedure } from '../trpc/common.js';\nimport { notifyReload } from '../utilities/notifyReload.js';\nimport type { BundleRequest } from '../types/BundleRequest.js';\nimport { createBundleTask } from '../utilities/createBundleTask.js';\nimport { createBundleRequestForPackage } from '../utilities/createBundleRequestForPackage.js';\nimport { ZodTaskMessage } from '../types/TaskMessage.js';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport { matchingZodObject } from '../utilities/matchingZodObject.js';\nimport { getPackageSettings } from '@ms-cloudpack/config';\nimport type { WatchOptions } from '@ms-cloudpack/file-watcher';\nimport { getConsumedDependencies } from '../utilities/getConsumedDependencies.js';\n\n/**\n * Input for `ensurePackageBundled`.\n */\nexport interface EnsurePackageBundledInput\n extends Pick<BundleRequest, 'outputPath' | 'version' | 'bundlerType' | 'disableSourceMaps' | 'shouldGetBundleInfo'> {\n /** Package name */\n name: string;\n /** Whether to also ensure dependencies are bundled */\n enqueueDependencies?: boolean;\n /** Whether to re-run the bundle task */\n shouldRerun?: boolean;\n /** Whether to watch for changes (internal packages only) */\n shouldWatch?: boolean;\n /** Whether to force re-bundling */\n shouldForce?: boolean;\n /** Whether to disable caching. */\n disableCache?: boolean;\n /** Whether to support incremental rebuilds. Defaults to true for internal libraries. */\n isIncremental?: boolean;\n /**\n * Whether to use a hash as the bundle id instead of the path.\n * Reduces performance when used with shouldForce as it hashes twice,\n * but eliminates task cache artifacts when handling many apps.\n */\n useHashAsId?: boolean;\n}\n\nconst ZodEnsurePackageBundledInput = matchingZodObject<EnsurePackageBundledInput>({\n name: z.string(),\n version: z.string(),\n outputPath: z.string().optional(),\n bundlerType: z.string().optional(),\n disableSourceMaps: z.boolean().optional(),\n enqueueDependencies: z.boolean().optional(),\n shouldGetBundleInfo: z.boolean().optional(),\n shouldRerun: z.boolean().optional(),\n shouldWatch: z.boolean().optional(),\n shouldForce: z.boolean().optional(),\n disableCache: z.boolean().optional(),\n isIncremental: z.boolean().optional(),\n useHashAsId: z.boolean().optional(),\n});\n\n/**\n * Result of ensuring a single package is bundled.\n */\nexport interface EnsurePackageBundledResult extends Omit<NonNullable<BundleRequest['result']>, 'rebuild' | 'dispose'> {\n /** Package name */\n name: string;\n /** Package version */\n version: string;\n /** Package dependency names (prod and peer) */\n dependencies?: string[];\n /** Whether the package is external (not defined in this repo) */\n isExternal: boolean;\n}\n\nconst ZodEnsurePackageBundledResult = matchingZodObject<EnsurePackageBundledResult>({\n name: z.string(),\n version: z.string(),\n bundlerName: z.string().optional(),\n inputPath: z.string(),\n outputPath: z.string(),\n entries: z.record(z.string()).optional(),\n dependencies: z.array(z.string()).optional(),\n hash: z.string().optional(),\n outputFiles: z\n .array(\n z.object({\n outputPath: z.string(),\n entryPoint: z.string().optional(),\n exports: z.array(z.string()).optional(),\n }),\n )\n .optional(),\n errors: z.array(ZodTaskMessage).optional(),\n warnings: z.array(ZodTaskMessage).optional(),\n isExternal: z.boolean(),\n info: z\n .object({\n entry: z.record(\n z.object({\n bundlePath: z.string(),\n produces: z.array(z.string()),\n consumes: z.array(\n z.object({\n packageName: z.string(),\n importPath: z.string(),\n names: z.array(z.string()),\n }),\n ),\n }),\n ),\n })\n .optional(),\n});\n\n/**\n * Complete output for `ensurePackageBundled`.\n */\nexport interface EnsurePackageBundledOutput {\n /** Result of bundling this package */\n result: EnsurePackageBundledResult;\n /** Results of bundling dependencies */\n dependencies: Promise<EnsurePackageBundledResult[]>;\n}\n\nconst ZodEnsurePackageBundledOutput = matchingZodObject<EnsurePackageBundledOutput>({\n result: ZodEnsurePackageBundledResult,\n dependencies: z.promise(ZodEnsurePackageBundledResult.array()),\n});\n\n/**\n * Checks if the package is bundled or needs bundling, and returns the result. For internal packages,\n * we also notify the watcher to monitor for code changes.\n */\nexport async function ensurePackageBundled(\n params: ApiParams<\n EnsurePackageBundledInput,\n | 'bus'\n | 'taskRunner'\n | 'session'\n | 'watcher'\n | 'packages'\n | 'reporter'\n | 'telemetryClient'\n | 'packageImportPaths'\n | 'packageHashes'\n >,\n): Promise<EnsurePackageBundledOutput> {\n const { input, ctx } = params;\n const results: EnsurePackageBundledResult[] = [];\n const visited = new Set<`${string}@${string}`>();\n const bundleResult = await ensurePackageBundledInternal({ input, ctx, visited });\n const { result } = bundleResult;\n const mainDependencies = bundleResult.dependencyInputs;\n\n let pending = 0;\n const dependencies = new Promise<EnsurePackageBundledResult[]>((resolve) => {\n const enqueue = (dependencyInputs: EnsurePackageBundledInput[]) => {\n for (const dependencyInput of dependencyInputs) {\n pending++;\n void ensurePackageBundledInternal({\n input: dependencyInput,\n ctx,\n visited,\n }).then((dependencyBundleResult) => {\n pending--;\n results.push(dependencyBundleResult.result);\n enqueue(dependencyBundleResult.dependencyInputs);\n if (!pending) {\n resolve(results);\n }\n });\n }\n };\n\n enqueue(mainDependencies);\n });\n\n return {\n result,\n dependencies,\n };\n}\n\nasync function ensurePackageBundledInternal(\n params: Parameters<typeof ensurePackageBundled>[0] & {\n visited: Set<`${string}@${string}`>;\n },\n): Promise<{ result: EnsurePackageBundledResult; dependencyInputs: EnsurePackageBundledInput[] }> {\n const { input, ctx, visited } = params;\n const {\n name,\n version,\n shouldWatch,\n bundlerType,\n disableSourceMaps,\n outputPath,\n shouldGetBundleInfo,\n shouldRerun,\n shouldForce,\n disableCache,\n isIncremental,\n useHashAsId,\n } = input;\n const { taskRunner, session, watcher, packageHashes } = ctx;\n const { resolveMap, config } = session;\n const { features } = config;\n const enqueueDependencies = input.enqueueDependencies ?? features?.enqueueDependencies;\n const dependencyInputs: EnsurePackageBundledInput[] = [];\n\n visited.add(`${name}@${version}`);\n\n // First, we find the resolve map entry. This helps us resolve the physical location of the package\n // according to the resolveMap used in the session. (This can change based on linking.)\n const packageEntry = findResolveMapEntry({ packageName: name, version, resolveMap });\n\n if (!packageEntry) {\n throw new Error(`Could not find package ${name} in the resolve map.`);\n }\n\n const bundleRequest = await createBundleRequestForPackage(\n {\n packageEntry,\n bundlerType,\n disableSourceMaps,\n outputPath,\n shouldGetBundleInfo: shouldGetBundleInfo || enqueueDependencies,\n disableCache,\n isIncremental,\n useHashAsId,\n },\n { config, packageHashes },\n );\n\n const task = createBundleTask({ bundleRequest, context: ctx, options: { force: shouldForce } });\n\n // TODO: Add lage scheduling back.\n const { result } = await taskRunner.add<BundleRequest>(task, { rerun: shouldRerun });\n\n if (!result) {\n throw new Error('Bundle failed, no result');\n }\n\n const { isExternal } = bundleRequest;\n\n const { userPackageSettings } =\n getPackageSettings({\n name: bundleRequest.packageName,\n version: bundleRequest.version,\n config,\n }) || {};\n const { inputPaths } = userPackageSettings || {};\n const watchOptions: WatchOptions = {\n path: packageEntry.path,\n watchPaths: inputPaths,\n };\n // For internal packages, make sure we're watching the source to re-trigger bundling.\n if (shouldWatch && !isExternal) {\n const onPackageChange = async () => {\n const watchedResult = await taskRunner.add<BundleRequest>(task, { rerun: true });\n\n // If the result was successful, notify potential clients for reload.\n if (watchedResult.result?.errors?.length === 0) {\n notifyReload(ctx);\n }\n };\n watcher.watch(watchOptions, () => {\n void onPackageChange();\n });\n }\n\n // If enabled, enqueue dependencies.\n if (enqueueDependencies && result?.info?.entry) {\n for (const dependencyName of getConsumedDependencies(result.info)) {\n const dependencyVersion = packageEntry.dependencies[dependencyName];\n\n // If we've already visited this package from another package, skip it.\n if (visited.has(`${dependencyName}@${dependencyVersion}`)) {\n continue;\n }\n\n dependencyInputs.push({\n name: dependencyName,\n version: dependencyVersion,\n shouldWatch,\n enqueueDependencies,\n });\n }\n }\n\n return {\n result: {\n version,\n name,\n isExternal,\n ...result,\n },\n dependencyInputs,\n };\n}\n\n// Attach a trpc procedure to the function.\nensurePackageBundled.procedure = publicProcedure\n .input(ZodEnsurePackageBundledInput)\n .output(ZodEnsurePackageBundledOutput)\n .mutation(ensurePackageBundled);\n\nexport type EnsurePackageBundledContext = Parameters<typeof ensurePackageBundled>[0]['ctx'];\n"]}
1
+ {"version":3,"file":"ensurePackageBundled.js","sourceRoot":"","sources":["../../src/apis/ensurePackageBundled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5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;gBACpB,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE,iBAAiB;gBAC1B,WAAW;gBACX,mBAAmB;aACpB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO;QACL,MAAM,EAAE;YACN,OAAO;YACP,IAAI;YACJ,UAAU;YACV,GAAG,MAAM;SACV;QACD,gBAAgB;KACjB,CAAC;AACJ,CAAC;AAED,2CAA2C;AAC3C,oBAAoB,CAAC,SAAS,GAAG,eAAe;KAC7C,KAAK,CAAC,4BAA4B,CAAC;KACnC,MAAM,CAAC,6BAA6B,CAAC;KACrC,QAAQ,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { findResolveMapEntry } from '@ms-cloudpack/package-utilities';\nimport { publicProcedure } from '../trpc/common.js';\nimport { notifyReload } from '../utilities/notifyReload.js';\nimport type { BundleRequest } from '../types/BundleRequest.js';\nimport { createBundleTask } from '../utilities/createBundleTask.js';\nimport { createBundleRequestForPackage } from '../utilities/createBundleRequestForPackage.js';\nimport { ZodTaskMessage } from '../types/TaskMessage.js';\nimport type { ApiParams } from '../types/ApiParams.js';\nimport { matchingZodObject } from '../utilities/matchingZodObject.js';\nimport { getPackageSettings } from '@ms-cloudpack/config';\nimport type { WatchOptions } from '@ms-cloudpack/file-watcher';\nimport { getConsumedDependencies } from '../utilities/getConsumedDependencies.js';\n\n/**\n * Input for `ensurePackageBundled`.\n */\nexport interface EnsurePackageBundledInput\n extends Pick<BundleRequest, 'outputPath' | 'version' | 'bundlerType' | 'disableSourceMaps' | 'shouldGetBundleInfo'> {\n /** Package name */\n name: string;\n /** Whether to also ensure dependencies are bundled */\n enqueueDependencies?: boolean;\n /** Whether to re-run the bundle task */\n shouldRerun?: boolean;\n /** Whether to watch for changes (internal packages only) */\n shouldWatch?: boolean;\n /** Whether to force re-bundling */\n shouldForce?: boolean;\n /** Whether to disable caching. */\n disableCache?: boolean;\n /** Whether to support incremental rebuilds. Defaults to true for internal libraries. */\n isIncremental?: boolean;\n /**\n * Whether to use a hash as the bundle id instead of the path.\n * Reduces performance when used with shouldForce as it hashes twice,\n * but eliminates task cache artifacts when handling many apps.\n */\n useHashAsId?: boolean;\n}\n\nconst ZodEnsurePackageBundledInput = matchingZodObject<EnsurePackageBundledInput>({\n name: z.string(),\n version: z.string(),\n outputPath: z.string().optional(),\n bundlerType: z.string().optional(),\n disableSourceMaps: z.boolean().optional(),\n enqueueDependencies: z.boolean().optional(),\n shouldGetBundleInfo: z.boolean().optional(),\n shouldRerun: z.boolean().optional(),\n shouldWatch: z.boolean().optional(),\n shouldForce: z.boolean().optional(),\n disableCache: z.boolean().optional(),\n isIncremental: z.boolean().optional(),\n useHashAsId: z.boolean().optional(),\n});\n\n/**\n * Result of ensuring a single package is bundled.\n */\nexport interface EnsurePackageBundledResult extends Omit<NonNullable<BundleRequest['result']>, 'rebuild' | 'dispose'> {\n /** Package name */\n name: string;\n /** Package version */\n version: string;\n /** Package dependency names (prod and peer) */\n dependencies?: string[];\n /** Whether the package is external (not defined in this repo) */\n isExternal: boolean;\n}\n\nconst ZodEnsurePackageBundledResult = matchingZodObject<EnsurePackageBundledResult>({\n name: z.string(),\n version: z.string(),\n bundlerName: z.string().optional(),\n inputPath: z.string(),\n outputPath: z.string(),\n entries: z.record(z.string()).optional(),\n dependencies: z.array(z.string()).optional(),\n hash: z.string().optional(),\n outputFiles: z\n .array(\n z.object({\n outputPath: z.string(),\n entryPoint: z.string().optional(),\n exports: z.array(z.string()).optional(),\n }),\n )\n .optional(),\n errors: z.array(ZodTaskMessage).optional(),\n warnings: z.array(ZodTaskMessage).optional(),\n isExternal: z.boolean(),\n info: z\n .object({\n entry: z.record(\n z.object({\n bundlePath: z.string(),\n produces: z.array(z.string()),\n consumes: z.array(\n z.object({\n packageName: z.string(),\n importPath: z.string(),\n names: z.array(z.string()),\n }),\n ),\n }),\n ),\n })\n .optional(),\n});\n\n/**\n * Complete output for `ensurePackageBundled`.\n */\nexport interface EnsurePackageBundledOutput {\n /** Result of bundling this package */\n result: EnsurePackageBundledResult;\n /** Results of bundling dependencies */\n dependencies: Promise<EnsurePackageBundledResult[]>;\n}\n\nconst ZodEnsurePackageBundledOutput = matchingZodObject<EnsurePackageBundledOutput>({\n result: ZodEnsurePackageBundledResult,\n dependencies: z.promise(ZodEnsurePackageBundledResult.array()),\n});\n\n/**\n * Checks if the package is bundled or needs bundling, and returns the result. For internal packages,\n * we also notify the watcher to monitor for code changes.\n */\nexport async function ensurePackageBundled(\n params: ApiParams<\n EnsurePackageBundledInput,\n | 'bus'\n | 'taskRunner'\n | 'session'\n | 'watcher'\n | 'packages'\n | 'reporter'\n | 'telemetryClient'\n | 'packageImportPaths'\n | 'packageHashes'\n >,\n): Promise<EnsurePackageBundledOutput> {\n const { input, ctx } = params;\n const results: EnsurePackageBundledResult[] = [];\n const visited = new Set<`${string}@${string}`>();\n const bundleResult = await ensurePackageBundledInternal({ input, ctx, visited });\n const { result } = bundleResult;\n const mainDependencies = bundleResult.dependencyInputs;\n\n let pending = 0;\n const dependencies = new Promise<EnsurePackageBundledResult[]>((resolve) => {\n const enqueue = (dependencyInputs: EnsurePackageBundledInput[]) => {\n for (const dependencyInput of dependencyInputs) {\n pending++;\n void ensurePackageBundledInternal({\n input: dependencyInput,\n ctx,\n visited,\n }).then((dependencyBundleResult) => {\n pending--;\n results.push(dependencyBundleResult.result);\n enqueue(dependencyBundleResult.dependencyInputs);\n if (!pending) {\n resolve(results);\n }\n });\n }\n };\n\n enqueue(mainDependencies);\n });\n\n return {\n result,\n dependencies,\n };\n}\n\nasync function ensurePackageBundledInternal(\n params: Parameters<typeof ensurePackageBundled>[0] & {\n visited: Set<`${string}@${string}`>;\n },\n): Promise<{ result: EnsurePackageBundledResult; dependencyInputs: EnsurePackageBundledInput[] }> {\n const { input, ctx, visited } = params;\n const {\n name,\n version,\n shouldWatch,\n bundlerType,\n disableSourceMaps,\n outputPath,\n shouldGetBundleInfo,\n shouldRerun,\n shouldForce,\n disableCache,\n isIncremental,\n useHashAsId,\n } = input;\n const { taskRunner, session, watcher, packageHashes } = ctx;\n const { resolveMap, config } = session;\n const { features } = config;\n const enqueueDependencies = input.enqueueDependencies ?? features?.enqueueDependencies;\n const dependencyInputs: EnsurePackageBundledInput[] = [];\n\n visited.add(`${name}@${version}`);\n\n // First, we find the resolve map entry. This helps us resolve the physical location of the package\n // according to the resolveMap used in the session. (This can change based on linking.)\n const packageEntry = findResolveMapEntry({ packageName: name, version, resolveMap });\n\n if (!packageEntry) {\n throw new Error(`Could not find package ${name} in the resolve map.`);\n }\n\n let hash: string | undefined = undefined;\n let sourceHash: string | undefined = undefined;\n if (useHashAsId) {\n // If we are using the hash as the task id, we need to calculate it one and pass it through the task\n // to prevent a race condition in which we get a different hash than the one used in the task id.\n hash = await packageHashes.get({\n packagePath: packageEntry.path,\n isSourceHashingEnabled: false,\n shouldRecalculate: true,\n });\n if (!packageEntry.isExternal) {\n // We only need the source hash for internal packages for cache validation.\n sourceHash = await packageHashes.get({\n packagePath: packageEntry.path,\n isSourceHashingEnabled: true,\n shouldRecalculate: true,\n });\n }\n }\n\n const bundleRequest = createBundleRequestForPackage(\n {\n // Use the hash as the id if useHashAsId is enabled.\n id: hash ?? packageEntry.path,\n packageEntry,\n bundlerType,\n disableSourceMaps,\n outputPath,\n shouldGetBundleInfo: shouldGetBundleInfo || enqueueDependencies,\n disableCache,\n isIncremental,\n },\n { config },\n );\n\n const task = createBundleTask({ bundleRequest, context: ctx, options: { force: shouldForce, hash, sourceHash } });\n\n // TODO: Add lage scheduling back.\n const { result } = await taskRunner.add<BundleRequest>(task, { rerun: shouldRerun });\n\n if (!result) {\n throw new Error('Bundle failed, no result');\n }\n\n const { isExternal } = bundleRequest;\n\n const { userPackageSettings } =\n getPackageSettings({\n name: bundleRequest.packageName,\n version: bundleRequest.version,\n config,\n }) || {};\n const { inputPaths } = userPackageSettings || {};\n const watchOptions: WatchOptions = {\n path: packageEntry.path,\n watchPaths: inputPaths,\n };\n // For internal packages, make sure we're watching the source to re-trigger bundling.\n if (shouldWatch && !isExternal) {\n const onPackageChange = async () => {\n const watchedResult = await taskRunner.add<BundleRequest>(task, { rerun: true });\n\n // If the result was successful, notify potential clients for reload.\n if (watchedResult.result?.errors?.length === 0) {\n notifyReload(ctx);\n }\n };\n watcher.watch(watchOptions, () => {\n void onPackageChange();\n });\n }\n\n // If enabled, enqueue dependencies.\n if (enqueueDependencies && result?.info?.entry) {\n for (const dependencyName of getConsumedDependencies(result.info)) {\n const dependencyVersion = packageEntry.dependencies[dependencyName];\n\n // If we've already visited this package from another package, skip it.\n if (visited.has(`${dependencyName}@${dependencyVersion}`)) {\n continue;\n }\n\n dependencyInputs.push({\n name: dependencyName,\n version: dependencyVersion,\n shouldWatch,\n enqueueDependencies,\n });\n }\n }\n\n return {\n result: {\n version,\n name,\n isExternal,\n ...result,\n },\n dependencyInputs,\n };\n}\n\n// Attach a trpc procedure to the function.\nensurePackageBundled.procedure = publicProcedure\n .input(ZodEnsurePackageBundledInput)\n .output(ZodEnsurePackageBundledOutput)\n .mutation(ensurePackageBundled);\n\nexport type EnsurePackageBundledContext = Parameters<typeof ensurePackageBundled>[0]['ctx'];\n"]}
@@ -56,6 +56,7 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
56
56
  id: z.ZodString;
57
57
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
58
58
  text: z.ZodString;
59
+ source: z.ZodString;
59
60
  location: z.ZodOptional<z.ZodObject<{
60
61
  file: z.ZodString;
61
62
  line: z.ZodNumber;
@@ -101,6 +102,7 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
101
102
  }>, "many">>;
102
103
  }, "strip", z.ZodTypeAny, {
103
104
  text: string;
105
+ source: string;
104
106
  location?: {
105
107
  file: string;
106
108
  line: number;
@@ -116,6 +118,7 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
116
118
  }[] | undefined;
117
119
  }, {
118
120
  text: string;
121
+ source: string;
119
122
  location?: {
120
123
  file: string;
121
124
  line: number;
@@ -132,6 +135,7 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
132
135
  }>, "many">>;
133
136
  warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
134
137
  text: z.ZodString;
138
+ source: z.ZodString;
135
139
  location: z.ZodOptional<z.ZodObject<{
136
140
  file: z.ZodString;
137
141
  line: z.ZodNumber;
@@ -177,6 +181,7 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
177
181
  }>, "many">>;
178
182
  }, "strip", z.ZodTypeAny, {
179
183
  text: string;
184
+ source: string;
180
185
  location?: {
181
186
  file: string;
182
187
  line: number;
@@ -192,6 +197,7 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
192
197
  }[] | undefined;
193
198
  }, {
194
199
  text: string;
200
+ source: string;
195
201
  location?: {
196
202
  file: string;
197
203
  line: number;
@@ -223,6 +229,7 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
223
229
  lastUpdated?: number | undefined;
224
230
  errors?: {
225
231
  text: string;
232
+ source: string;
226
233
  location?: {
227
234
  file: string;
228
235
  line: number;
@@ -239,6 +246,7 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
239
246
  }[] | undefined;
240
247
  warnings?: {
241
248
  text: string;
249
+ source: string;
242
250
  location?: {
243
251
  file: string;
244
252
  line: number;
@@ -270,6 +278,7 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
270
278
  lastUpdated?: number | undefined;
271
279
  errors?: {
272
280
  text: string;
281
+ source: string;
273
282
  location?: {
274
283
  file: string;
275
284
  line: number;
@@ -286,6 +295,7 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
286
295
  }[] | undefined;
287
296
  warnings?: {
288
297
  text: string;
298
+ source: string;
289
299
  location?: {
290
300
  file: string;
291
301
  line: number;
@@ -319,6 +329,7 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
319
329
  lastUpdated?: number | undefined;
320
330
  errors?: {
321
331
  text: string;
332
+ source: string;
322
333
  location?: {
323
334
  file: string;
324
335
  line: number;
@@ -335,6 +346,7 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
335
346
  }[] | undefined;
336
347
  warnings?: {
337
348
  text: string;
349
+ source: string;
338
350
  location?: {
339
351
  file: string;
340
352
  line: number;
@@ -368,6 +380,7 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
368
380
  lastUpdated?: number | undefined;
369
381
  errors?: {
370
382
  text: string;
383
+ source: string;
371
384
  location?: {
372
385
  file: string;
373
386
  line: number;
@@ -384,6 +397,7 @@ export declare const taskListSource: import("@ms-cloudpack/data-bus").DataBusPat
384
397
  }[] | undefined;
385
398
  warnings?: {
386
399
  text: string;
400
+ source: string;
387
401
  location?: {
388
402
  file: string;
389
403
  line: number;
@@ -1 +1 @@
1
- {"version":3,"file":"busSources.d.ts","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAKpB;;GAEG;AACH,eAAO,MAAM,iBAAiB,2DAG5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;GAG1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAKzB,CAAC"}
1
+ {"version":3,"file":"busSources.d.ts","sourceRoot":"","sources":["../../src/data/busSources.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAKpB;;GAEG;AACH,eAAO,MAAM,iBAAiB,2DAG5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;GAG1B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAKzB,CAAC"}
@@ -1,4 +1,12 @@
1
+ /**
2
+ * Options for a bundle task.
3
+ */
1
4
  export interface BundleTaskOptions {
5
+ /** Force a bundle to be rerun */
2
6
  force?: boolean;
7
+ /** Hash to avoid re-computing */
8
+ hash?: string;
9
+ /** Source hash to avoid recomputing */
10
+ sourceHash?: string;
3
11
  }
4
12
  //# sourceMappingURL=BundleTaskOptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BundleTaskOptions.d.ts","sourceRoot":"","sources":["../../src/types/BundleTaskOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB"}
1
+ {"version":3,"file":"BundleTaskOptions.d.ts","sourceRoot":"","sources":["../../src/types/BundleTaskOptions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,iCAAiC;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"BundleTaskOptions.js","sourceRoot":"","sources":["../../src/types/BundleTaskOptions.ts"],"names":[],"mappings":"","sourcesContent":["export interface BundleTaskOptions {\n force?: boolean;\n}\n"]}
1
+ {"version":3,"file":"BundleTaskOptions.js","sourceRoot":"","sources":["../../src/types/BundleTaskOptions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Options for a bundle task.\n */\nexport interface BundleTaskOptions {\n /** Force a bundle to be rerun */\n force?: boolean;\n /** Hash to avoid re-computing */\n hash?: string;\n /** Source hash to avoid recomputing */\n sourceHash?: string;\n}\n"]}
@@ -26,6 +26,7 @@ export declare const ZodTaskDescription: z.ZodObject<{
26
26
  id: z.ZodString;
27
27
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
28
28
  text: z.ZodString;
29
+ source: z.ZodString;
29
30
  location: z.ZodOptional<z.ZodObject<{
30
31
  file: z.ZodString;
31
32
  line: z.ZodNumber;
@@ -71,6 +72,7 @@ export declare const ZodTaskDescription: z.ZodObject<{
71
72
  }>, "many">>;
72
73
  }, "strip", z.ZodTypeAny, {
73
74
  text: string;
75
+ source: string;
74
76
  location?: {
75
77
  file: string;
76
78
  line: number;
@@ -86,6 +88,7 @@ export declare const ZodTaskDescription: z.ZodObject<{
86
88
  }[] | undefined;
87
89
  }, {
88
90
  text: string;
91
+ source: string;
89
92
  location?: {
90
93
  file: string;
91
94
  line: number;
@@ -102,6 +105,7 @@ export declare const ZodTaskDescription: z.ZodObject<{
102
105
  }>, "many">>;
103
106
  warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
104
107
  text: z.ZodString;
108
+ source: z.ZodString;
105
109
  location: z.ZodOptional<z.ZodObject<{
106
110
  file: z.ZodString;
107
111
  line: z.ZodNumber;
@@ -147,6 +151,7 @@ export declare const ZodTaskDescription: z.ZodObject<{
147
151
  }>, "many">>;
148
152
  }, "strip", z.ZodTypeAny, {
149
153
  text: string;
154
+ source: string;
150
155
  location?: {
151
156
  file: string;
152
157
  line: number;
@@ -162,6 +167,7 @@ export declare const ZodTaskDescription: z.ZodObject<{
162
167
  }[] | undefined;
163
168
  }, {
164
169
  text: string;
170
+ source: string;
165
171
  location?: {
166
172
  file: string;
167
173
  line: number;
@@ -193,6 +199,7 @@ export declare const ZodTaskDescription: z.ZodObject<{
193
199
  lastUpdated?: number | undefined;
194
200
  errors?: {
195
201
  text: string;
202
+ source: string;
196
203
  location?: {
197
204
  file: string;
198
205
  line: number;
@@ -209,6 +216,7 @@ export declare const ZodTaskDescription: z.ZodObject<{
209
216
  }[] | undefined;
210
217
  warnings?: {
211
218
  text: string;
219
+ source: string;
212
220
  location?: {
213
221
  file: string;
214
222
  line: number;
@@ -240,6 +248,7 @@ export declare const ZodTaskDescription: z.ZodObject<{
240
248
  lastUpdated?: number | undefined;
241
249
  errors?: {
242
250
  text: string;
251
+ source: string;
243
252
  location?: {
244
253
  file: string;
245
254
  line: number;
@@ -256,6 +265,7 @@ export declare const ZodTaskDescription: z.ZodObject<{
256
265
  }[] | undefined;
257
266
  warnings?: {
258
267
  text: string;
268
+ source: string;
259
269
  location?: {
260
270
  file: string;
261
271
  line: number;
@@ -1 +1 @@
1
- {"version":3,"file":"TaskDescription.d.ts","sourceRoot":"","sources":["../../src/types/TaskDescription.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAKpB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASO,CAAC;AAEvC,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
1
+ {"version":3,"file":"TaskDescription.d.ts","sourceRoot":"","sources":["../../src/types/TaskDescription.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAKpB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASO,CAAC;AAEvC,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -3,6 +3,7 @@ export declare const ZodTaskEndDescription: z.ZodObject<{
3
3
  id: z.ZodString;
4
4
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
5
5
  text: z.ZodString;
6
+ source: z.ZodString;
6
7
  location: z.ZodOptional<z.ZodObject<{
7
8
  file: z.ZodString;
8
9
  line: z.ZodNumber;
@@ -48,6 +49,7 @@ export declare const ZodTaskEndDescription: z.ZodObject<{
48
49
  }>, "many">>;
49
50
  }, "strip", z.ZodTypeAny, {
50
51
  text: string;
52
+ source: string;
51
53
  location?: {
52
54
  file: string;
53
55
  line: number;
@@ -63,6 +65,7 @@ export declare const ZodTaskEndDescription: z.ZodObject<{
63
65
  }[] | undefined;
64
66
  }, {
65
67
  text: string;
68
+ source: string;
66
69
  location?: {
67
70
  file: string;
68
71
  line: number;
@@ -79,6 +82,7 @@ export declare const ZodTaskEndDescription: z.ZodObject<{
79
82
  }>, "many">>;
80
83
  warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
81
84
  text: z.ZodString;
85
+ source: z.ZodString;
82
86
  location: z.ZodOptional<z.ZodObject<{
83
87
  file: z.ZodString;
84
88
  line: z.ZodNumber;
@@ -124,6 +128,7 @@ export declare const ZodTaskEndDescription: z.ZodObject<{
124
128
  }>, "many">>;
125
129
  }, "strip", z.ZodTypeAny, {
126
130
  text: string;
131
+ source: string;
127
132
  location?: {
128
133
  file: string;
129
134
  line: number;
@@ -139,6 +144,7 @@ export declare const ZodTaskEndDescription: z.ZodObject<{
139
144
  }[] | undefined;
140
145
  }, {
141
146
  text: string;
147
+ source: string;
142
148
  location?: {
143
149
  file: string;
144
150
  line: number;
@@ -157,6 +163,7 @@ export declare const ZodTaskEndDescription: z.ZodObject<{
157
163
  id: string;
158
164
  errors?: {
159
165
  text: string;
166
+ source: string;
160
167
  location?: {
161
168
  file: string;
162
169
  line: number;
@@ -173,6 +180,7 @@ export declare const ZodTaskEndDescription: z.ZodObject<{
173
180
  }[] | undefined;
174
181
  warnings?: {
175
182
  text: string;
183
+ source: string;
176
184
  location?: {
177
185
  file: string;
178
186
  line: number;
@@ -191,6 +199,7 @@ export declare const ZodTaskEndDescription: z.ZodObject<{
191
199
  id: string;
192
200
  errors?: {
193
201
  text: string;
202
+ source: string;
194
203
  location?: {
195
204
  file: string;
196
205
  line: number;
@@ -207,6 +216,7 @@ export declare const ZodTaskEndDescription: z.ZodObject<{
207
216
  }[] | undefined;
208
217
  warnings?: {
209
218
  text: string;
219
+ source: string;
210
220
  location?: {
211
221
  file: string;
212
222
  line: number;
@@ -1 +1 @@
1
- {"version":3,"file":"TaskEndDescription.d.ts","sourceRoot":"","sources":["../../src/types/TaskEndDescription.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIhC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"TaskEndDescription.d.ts","sourceRoot":"","sources":["../../src/types/TaskEndDescription.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIhC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -31,6 +31,7 @@ export declare const ZodTaskNote: z.ZodObject<{
31
31
  }>;
32
32
  export declare const ZodTaskMessage: z.ZodObject<{
33
33
  text: z.ZodString;
34
+ source: z.ZodString;
34
35
  location: z.ZodOptional<z.ZodObject<{
35
36
  file: z.ZodString;
36
37
  line: z.ZodNumber;
@@ -76,6 +77,7 @@ export declare const ZodTaskMessage: z.ZodObject<{
76
77
  }>, "many">>;
77
78
  }, "strip", z.ZodTypeAny, {
78
79
  text: string;
80
+ source: string;
79
81
  location?: {
80
82
  file: string;
81
83
  line: number;
@@ -91,6 +93,7 @@ export declare const ZodTaskMessage: z.ZodObject<{
91
93
  }[] | undefined;
92
94
  }, {
93
95
  text: string;
96
+ source: string;
94
97
  location?: {
95
98
  file: string;
96
99
  line: number;
@@ -1 +1 @@
1
- {"version":3,"file":"TaskMessage.d.ts","sourceRoot":"","sources":["../../src/types/TaskMessage.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIzB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"TaskMessage.d.ts","sourceRoot":"","sources":["../../src/types/TaskMessage.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKzB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -6,6 +6,7 @@ export const ZodTaskNote = z.object({
6
6
  });
7
7
  export const ZodTaskMessage = z.object({
8
8
  text: z.string(),
9
+ source: z.string(),
9
10
  location: ZodTaskMessageLocation.optional(),
10
11
  notes: z.array(ZodTaskNote).optional(),
11
12
  });
@@ -1 +1 @@
1
- {"version":3,"file":"TaskMessage.js","sourceRoot":"","sources":["../../src/types/TaskMessage.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,sBAAsB,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,sBAAsB,CAAC,QAAQ,EAAE;IAC3C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC","sourcesContent":["import z from 'zod';\nimport { ZodTaskMessageLocation } from './TaskMessageLocation.js';\n\nexport const ZodTaskNote = z.object({\n text: z.string(),\n location: ZodTaskMessageLocation.optional(),\n});\n\nexport const ZodTaskMessage = z.object({\n text: z.string(),\n location: ZodTaskMessageLocation.optional(),\n notes: z.array(ZodTaskNote).optional(),\n});\n\nexport type TaskMessage = z.infer<typeof ZodTaskMessage>;\n"]}
1
+ {"version":3,"file":"TaskMessage.js","sourceRoot":"","sources":["../../src/types/TaskMessage.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,sBAAsB,CAAC,QAAQ,EAAE;CAC5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,sBAAsB,CAAC,QAAQ,EAAE;IAC3C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC","sourcesContent":["import z from 'zod';\nimport { ZodTaskMessageLocation } from './TaskMessageLocation.js';\n\nexport const ZodTaskNote = z.object({\n text: z.string(),\n location: ZodTaskMessageLocation.optional(),\n});\n\nexport const ZodTaskMessage = z.object({\n text: z.string(),\n source: z.string(),\n location: ZodTaskMessageLocation.optional(),\n notes: z.array(ZodTaskNote).optional(),\n});\n\nexport type TaskMessage = z.infer<typeof ZodTaskMessage>;\n"]}
@@ -3,6 +3,7 @@ export declare const ZodTaskResponse: z.ZodObject<{
3
3
  result: z.ZodObject<{
4
4
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
5
5
  text: z.ZodString;
6
+ source: z.ZodString;
6
7
  location: z.ZodOptional<z.ZodObject<{
7
8
  file: z.ZodString;
8
9
  line: z.ZodNumber;
@@ -48,6 +49,7 @@ export declare const ZodTaskResponse: z.ZodObject<{
48
49
  }>, "many">>;
49
50
  }, "strip", z.ZodTypeAny, {
50
51
  text: string;
52
+ source: string;
51
53
  location?: {
52
54
  file: string;
53
55
  line: number;
@@ -63,6 +65,7 @@ export declare const ZodTaskResponse: z.ZodObject<{
63
65
  }[] | undefined;
64
66
  }, {
65
67
  text: string;
68
+ source: string;
66
69
  location?: {
67
70
  file: string;
68
71
  line: number;
@@ -79,6 +82,7 @@ export declare const ZodTaskResponse: z.ZodObject<{
79
82
  }>, "many">>;
80
83
  warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
81
84
  text: z.ZodString;
85
+ source: z.ZodString;
82
86
  location: z.ZodOptional<z.ZodObject<{
83
87
  file: z.ZodString;
84
88
  line: z.ZodNumber;
@@ -124,6 +128,7 @@ export declare const ZodTaskResponse: z.ZodObject<{
124
128
  }>, "many">>;
125
129
  }, "strip", z.ZodTypeAny, {
126
130
  text: string;
131
+ source: string;
127
132
  location?: {
128
133
  file: string;
129
134
  line: number;
@@ -139,6 +144,7 @@ export declare const ZodTaskResponse: z.ZodObject<{
139
144
  }[] | undefined;
140
145
  }, {
141
146
  text: string;
147
+ source: string;
142
148
  location?: {
143
149
  file: string;
144
150
  line: number;
@@ -156,6 +162,7 @@ export declare const ZodTaskResponse: z.ZodObject<{
156
162
  }, "strip", z.ZodTypeAny, {
157
163
  errors?: {
158
164
  text: string;
165
+ source: string;
159
166
  location?: {
160
167
  file: string;
161
168
  line: number;
@@ -172,6 +179,7 @@ export declare const ZodTaskResponse: z.ZodObject<{
172
179
  }[] | undefined;
173
180
  warnings?: {
174
181
  text: string;
182
+ source: string;
175
183
  location?: {
176
184
  file: string;
177
185
  line: number;
@@ -189,6 +197,7 @@ export declare const ZodTaskResponse: z.ZodObject<{
189
197
  }, {
190
198
  errors?: {
191
199
  text: string;
200
+ source: string;
192
201
  location?: {
193
202
  file: string;
194
203
  line: number;
@@ -205,6 +214,7 @@ export declare const ZodTaskResponse: z.ZodObject<{
205
214
  }[] | undefined;
206
215
  warnings?: {
207
216
  text: string;
217
+ source: string;
208
218
  location?: {
209
219
  file: string;
210
220
  line: number;
@@ -240,6 +250,7 @@ export declare const ZodTaskResponse: z.ZodObject<{
240
250
  result: {
241
251
  errors?: {
242
252
  text: string;
253
+ source: string;
243
254
  location?: {
244
255
  file: string;
245
256
  line: number;
@@ -256,6 +267,7 @@ export declare const ZodTaskResponse: z.ZodObject<{
256
267
  }[] | undefined;
257
268
  warnings?: {
258
269
  text: string;
270
+ source: string;
259
271
  location?: {
260
272
  file: string;
261
273
  line: number;
@@ -281,6 +293,7 @@ export declare const ZodTaskResponse: z.ZodObject<{
281
293
  result: {
282
294
  errors?: {
283
295
  text: string;
296
+ source: string;
284
297
  location?: {
285
298
  file: string;
286
299
  line: number;
@@ -297,6 +310,7 @@ export declare const ZodTaskResponse: z.ZodObject<{
297
310
  }[] | undefined;
298
311
  warnings?: {
299
312
  text: string;
313
+ source: string;
300
314
  location?: {
301
315
  file: string;
302
316
  line: number;
@@ -1 +1 @@
1
- {"version":3,"file":"TaskResponse.d.ts","sourceRoot":"","sources":["../../src/types/TaskResponse.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAIpB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG1B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"TaskResponse.d.ts","sourceRoot":"","sources":["../../src/types/TaskResponse.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAIpB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG1B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}