@ms-cloudpack/api-server 0.65.10 → 0.65.11
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/lib/utilities/TaskRunner.d.ts.map +1 -1
- package/lib/utilities/TaskRunner.js +1 -4
- package/lib/utilities/TaskRunner.js.map +1 -1
- package/lib/utilities/isValidBundleEntry.d.ts.map +1 -1
- package/lib/utilities/isValidBundleEntry.js +6 -21
- package/lib/utilities/isValidBundleEntry.js.map +1 -1
- package/lib/utilities/toNormalizedEntryKey.d.ts.map +1 -1
- package/lib/utilities/toNormalizedEntryKey.js +2 -7
- package/lib/utilities/toNormalizedEntryKey.js.map +1 -1
- package/package.json +17 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskRunner.d.ts","sourceRoot":"","sources":["../../src/utilities/TaskRunner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAGtD,OAAO,KAAK,EAAE,IAAI,EAAsB,MAAM,kBAAkB,CAAC;AAGjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AASvD;;;;;;;GAOG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,IAAI,CAAsB;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,2EAA2E;IAC3E,OAAO,CAAC,WAAW,CAAiB;IACpC;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgC;IAC9D,gCAAgC;IAChC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAuB;IACvD;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAc;IAC7C,sDAAsD;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA6B;;IAWvD;;;OAGG;IACH,IAAI,UAAU,IAAI,QAAQ,CAAC,SAAS,CAAC,CAQpC;IAED;;;;OAIG;IACI,YAAY,CAAC,GAAG,E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AC,OAAO,CAAC;IAoEnB;;OAEG;IAGH,OAAO,IAAI,IAAI;IAYf;;;OAGG;IACG,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoB5C;;;;;OAKG;IACG,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IActC;;;OAGG;IACH,MAAM,IAAI,IAAI;IAId;;;OAGG;IACH,MAAM,IAAI,IAAI;IAId,2EAA2E;IAC3E,OAAO,CAAC,iBAAiB;IAOzB;;OAEG;IACH,OAAO,CAAC,YAAY;IAqBpB;;OAEG;IACH,OAAO,CAAC,UAAU;IA2ClB,sEAAsE;IACtE,OAAO,CAAC,iBAAiB;IAMzB;;OAEG;IACH,OAAO,CAAC,eAAe;CAMxB"}
|
|
@@ -92,10 +92,7 @@ export class TaskRunner {
|
|
|
92
92
|
do {
|
|
93
93
|
// Delete from rerun list (if present).
|
|
94
94
|
this._requiresRerun.delete(id);
|
|
95
|
-
taskResult = await this._queue.add(execute,
|
|
96
|
-
// Removes void from return type.
|
|
97
|
-
// Read more on: https://github.com/sindresorhus/p-queue/issues/175
|
|
98
|
-
{ throwOnTimeout: true, priority });
|
|
95
|
+
taskResult = await this._queue.add(execute, { priority });
|
|
99
96
|
} while (this._requiresRerun.has(id));
|
|
100
97
|
}
|
|
101
98
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskRunner.js","sourceRoot":"","sources":["../../src/utilities/TaskRunner.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAaxE;;;;;;;GAOG;AACH,MAAM,OAAO,UAAU;IACb,IAAI,CAAsB;IACjB,MAAM,CAAS;IAChC,2EAA2E;IACnE,WAAW,CAAiB;IACpC;;;OAGG;IACc,aAAa,CAAgC;IAC9D,gCAAgC;IACf,eAAe,CAAuB;IACvD;;;OAGG;IACc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,CAAC;CACF","sourcesContent":["import type { DataBus } from '@ms-cloudpack/data-bus';\nimport PQueue from 'p-queue';\nimport { taskListSource, taskStatsSource } from '../data/busSources.js';\nimport type { Task, TaskEndDescription } from '../types/Task.js';\nimport type { TaskDescription } from '../types/TaskDescription.js';\nimport type { TaskList } from '../types/TaskList.js';\nimport type { TaskStats } from '../types/TaskStats.js';\n\ninterface TaskIssueStats extends Pick<TaskStats, 'totalErrors' | 'totalWarnings'> {\n /** Mapping from ID to count */\n taskWarnings: Record<string, number>;\n /** Mapping from ID to count */\n taskErrors: Record<string, number>;\n}\n\n/**\n * TaskRunner tracks the status of tasks, manages concurrency, allows reusing task results,\n * and sends notifications about task status to the data bus (currently just used for `start`).\n *\n * NOTE: To enable data bus notifications, you must call `connectToBus()`.\n * `createApiContext` does this with the `taskRunner` passed in.\n * (`createPartialApiContext` does not create or connect a data bus.)\n */\nexport class TaskRunner {\n private _bus: DataBus | undefined;\n private readonly _queue: PQueue;\n /** Stats about task errors/warnings, only updated if a bus is connected */\n private _taskIssues: TaskIssueStats;\n /**\n * Tasks that are currently either running or waiting. (Note that `PQeueue`'s definition of\n * \"pending\" is slightly different: it only counts tasks that are currently running.)\n */\n private readonly _pendingTasks: Map<string, Promise<unknown>>;\n /** Tasks that have completed */\n private readonly _completedTasks: Map<string, unknown>;\n /**\n * Task IDs where a re-run was requested while the task was running.\n * We let the current task finish, and then re-run it.\n */\n private readonly _requiresRerun: Set<string>;\n /** All previously-seen tasks (regardless of state) */\n private readonly _allTasks: Map<string, Task<unknown>>;\n\n constructor() {\n this._queue = new PQueue({ concurrency: 10 });\n this._taskIssues = { totalErrors: 0, totalWarnings: 0, taskWarnings: {}, taskErrors: {} };\n this._pendingTasks = new Map();\n this._completedTasks = new Map();\n this._requiresRerun = new Set();\n this._allTasks = new Map();\n }\n\n /**\n * Get current task stats. Public for testing.\n * @internal\n */\n get _taskStats(): Readonly<TaskStats> {\n return {\n status: this._pendingTasks.size ? 'pending' : 'idle',\n remainingTasks: this._pendingTasks.size,\n totalTasks: this._allTasks.size,\n totalErrors: this._taskIssues.totalErrors,\n totalWarnings: this._taskIssues.totalWarnings,\n };\n }\n\n /**\n * Connects the TaskRunner to the data bus. Tasks will still run without this, but they won't\n * send any notifications to a client (which only matters if a client is listening, e.g.\n * the browser while running `start`).\n */\n public connectToBus(bus: DataBus): void {\n this._bus = bus;\n }\n\n /**\n * Enqueue a task and return its result promise.\n *\n * If a task with the same `id` was already added, it returns either the previous result\n * (if completed) or the promise (if pending). Pass `options.rerun` to force re-running.\n *\n * (Note that any re-runs will use the *original* task function, not the new one.\n * If something has changed that requires a new task function, you should incorporate this\n * into the `id`.)\n */\n add<TReturn>(\n task: Task<TReturn>,\n options?: {\n rerun?: boolean;\n priority?: number;\n },\n ): Promise<TReturn> {\n const { name, id, execute } = task;\n const { rerun, priority } = options || {};\n\n if (!this._allTasks.has(id)) {\n this._allTasks.set(id, task as Task<unknown>);\n }\n\n // Check if we are already completed the task with that id.\n const action = this._completedTasks.get(id) as TReturn | undefined;\n if (action !== undefined && !rerun) {\n return Promise.resolve(action);\n }\n\n // Check if we are already running the task with that id.\n const pending = this._pendingTasks.get(id) as Promise<TReturn> | undefined;\n if (pending !== undefined) {\n if (rerun) {\n this._requiresRerun.add(id);\n }\n return pending;\n }\n\n const resultPromise: Promise<TReturn> = (async () => {\n let taskResult: TReturn | undefined;\n let taskError: unknown;\n\n try {\n do {\n // Delete from rerun list (if present).\n this._requiresRerun.delete(id);\n\n taskResult = await this._queue.add(\n execute,\n // Removes void from return type.\n // Read more on: https://github.com/sindresorhus/p-queue/issues/175\n { throwOnTimeout: true, priority },\n );\n } while (this._requiresRerun.has(id));\n } catch (error) {\n taskError = error;\n // Re-throw the error, but `finally` will handle completion\n throw error;\n } finally {\n // Delete from pending list.\n this._pendingTasks.delete(id);\n\n this._reportEnd(task, taskResult, taskError);\n }\n\n // Extra check to ensure that the task returned a value.\n // It should never throw, if it does we have a bug.\n if (taskResult === undefined) {\n throw new Error(`Task \"${name}:${id}\" returned undefined, without throwing an error, which was unexpected.`);\n }\n\n // Update finished Tasks.\n this._completedTasks.set(id, taskResult);\n\n return taskResult;\n })();\n\n this._pendingTasks.set(id, resultPromise);\n const wasCompleted = this._completedTasks.delete(id);\n if (wasCompleted) {\n this._removeTaskIssues(task.id);\n }\n\n this._reportStart<TReturn>(task);\n\n return resultPromise;\n }\n\n /**\n * Dispose in-memory resources of all tasks and clear the TaskRunner's state.\n */\n // NOTE: This is also used by clearAllResults(), so if it's updated to do anything that\n // renders the TaskRunner unusable/finished, the common parts should be refactored out.\n dispose(): void {\n this._queue.clear();\n for (const task of this._allTasks.values()) {\n task.dispose?.();\n }\n this._allTasks.clear();\n this._pendingTasks.clear();\n this._completedTasks.clear();\n this._requiresRerun.clear();\n this._taskIssues = { totalErrors: 0, totalWarnings: 0, taskWarnings: {}, taskErrors: {} };\n }\n\n /**\n * Clear the result of a specific task (could involve deleting files from disk) and remove\n * it from the TaskRunner's task records.\n */\n async clearResult(id: string): Promise<void> {\n const task = this._allTasks.get(id);\n task?.dispose?.();\n await task?.clear?.();\n\n this._allTasks.delete(id);\n this._requiresRerun.delete(id);\n this._pendingTasks.delete(id);\n this._completedTasks.delete(id);\n this._removeTaskIssues(id);\n\n if (this._bus) {\n const { tasks, index } = this._findFromTaskList(id);\n if (index !== -1) {\n tasks.splice(index, 1);\n this._publishUpdates({ tasks, stats: true });\n }\n }\n }\n\n /**\n * Clear the results of all tasks (might include deleting files on disk) and clear the\n * TaskRunner's task records.\n *\n * (To only dispose in-memory resources, use `dispose()`.)\n */\n async clearAllResults(): Promise<void> {\n // Publish the empty task list first since deleting things might take awhile.\n this._publishUpdates({ tasks: [] });\n\n for (const task of this._allTasks.values()) {\n task.dispose?.();\n await task.clear?.();\n }\n this.dispose();\n\n // Publish new stats after clearing everything (otherwise the calculated values will be wrong)\n this._publishUpdates({ stats: true });\n }\n\n /**\n * Pauses the TaskRunner (for testing).\n * @internal\n */\n _pause(): void {\n this._queue.pause();\n }\n\n /**\n * Starts or resumes the TaskRunner (for testing).\n * @internal\n */\n _start(): void {\n this._queue.start();\n }\n\n /** Remove any records of previous issues with this task from the totals */\n private _removeTaskIssues(id: string): void {\n this._taskIssues.totalErrors -= this._taskIssues.taskErrors[id] || 0;\n this._taskIssues.totalWarnings -= this._taskIssues.taskWarnings[id] || 0;\n delete this._taskIssues.taskErrors[id];\n delete this._taskIssues.taskWarnings[id];\n }\n\n /**\n * Internal method to report the start of a task to the bus.\n */\n private _reportStart<TReturn>(task: Task<TReturn>): void {\n if (!this._bus || !task.getStartDescription) return;\n\n const { tasks, index } = this._findFromTaskList(task.id);\n\n const taskDesc: TaskDescription = {\n id: task.id,\n name: task.name,\n ...task.getStartDescription(),\n status: 'pending',\n startTime: Date.now(),\n };\n if (index === -1) {\n tasks.push(taskDesc);\n } else {\n tasks[index] = taskDesc;\n }\n\n this._publishUpdates({ tasks, stats: true });\n }\n\n /**\n * Internal method to report the end of a task to the bus.\n */\n private _reportEnd<TReturn>(task: Task<TReturn>, taskResult: TReturn | undefined, taskError: unknown): void {\n if (!this._bus || !task.getEndDescription) return;\n\n // Replace the usual description with an error if relevant\n const description: TaskEndDescription = taskError\n ? {\n errors: [\n {\n source: 'running task',\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n text: taskError instanceof Error ? taskError.stack || taskError.message : String(taskError),\n },\n ],\n }\n : task.getEndDescription(taskResult);\n const errorCount = description.errors?.length || 0;\n const warningCount = description.warnings?.length || 0;\n if (errorCount) {\n this._taskIssues.taskErrors[task.id] = errorCount;\n this._taskIssues.totalErrors += errorCount;\n }\n if (warningCount) {\n this._taskIssues.taskWarnings[task.id] = warningCount;\n this._taskIssues.totalWarnings += warningCount;\n }\n\n const { tasks, index } = this._findFromTaskList(task.id);\n const startDescription = tasks[index];\n\n if (startDescription) {\n const now = Date.now();\n tasks[index] = {\n ...startDescription,\n ...description,\n status: 'complete',\n duration: now - startDescription.startTime,\n lastUpdated: now,\n };\n\n this._publishUpdates({ tasks, stats: true });\n }\n }\n\n /** Get the task list from the data bus, and find the task's index. */\n private _findFromTaskList(id: string): { tasks: TaskDescription[]; index: number } {\n const tasks = this._bus?.getData<TaskList>(taskListSource.path)?.tasks || [];\n const index = tasks.findIndex((t) => t.id === id);\n return { tasks, index };\n }\n\n /**\n * Publish tasks and/or stats to the data bus.\n */\n private _publishUpdates(params: { tasks?: TaskDescription[]; stats?: boolean }): void {\n const { tasks, stats } = params;\n // Publish using .path for easier testing\n stats && this._bus?.publish<TaskStats>(taskStatsSource.path, this._taskStats);\n tasks && this._bus?.publish<TaskList>(taskListSource.path, { tasks });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TaskRunner.js","sourceRoot":"","sources":["../../src/utilities/TaskRunner.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAaxE;;;;;;;GAOG;AACH,MAAM,OAAO,UAAU;IACb,IAAI,CAAsB;IACjB,MAAM,CAAS;IAChC,2EAA2E;IACnE,WAAW,CAAiB;IACpC;;;OAGG;IACc,aAAa,CAAgC;IAC9D,gCAAgC;IACf,eAAe,CAAuB;IACvD;;;OAGG;IACc,cAAc,CAAc;IAC7C,sDAAsD;IACrC,SAAS,CAA6B;IAEvD;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;QAC9C,IAAI,CAAC,WAAW,GAAG,EAAE,WAAW,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;QAC1F,IAAI,CAAC,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC;QAC/B,IAAI,CAAC,eAAe,GAAG,IAAI,GAAG,EAAE,CAAC;QACjC,IAAI,CAAC,cAAc,GAAG,IAAI,GAAG,EAAE,C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,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAED,sEAAsE;IAC9D,iBAAiB,CAAC,EAAU;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,OAAO,CAAW,cAAc,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;QAC7E,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAClD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAC1B,CAAC;IAED;;OAEG;IACK,eAAe,CAAC,MAAsD;QAC5E,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QAChC,yCAAyC;QACzC,KAAK,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,CAAY,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC9E,KAAK,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,CAAW,cAAc,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACxE,CAAC;CACF","sourcesContent":["import type { DataBus } from '@ms-cloudpack/data-bus';\nimport PQueue from 'p-queue';\nimport { taskListSource, taskStatsSource } from '../data/busSources.js';\nimport type { Task, TaskEndDescription } from '../types/Task.js';\nimport type { TaskDescription } from '../types/TaskDescription.js';\nimport type { TaskList } from '../types/TaskList.js';\nimport type { TaskStats } from '../types/TaskStats.js';\n\ninterface TaskIssueStats extends Pick<TaskStats, 'totalErrors' | 'totalWarnings'> {\n /** Mapping from ID to count */\n taskWarnings: Record<string, number>;\n /** Mapping from ID to count */\n taskErrors: Record<string, number>;\n}\n\n/**\n * TaskRunner tracks the status of tasks, manages concurrency, allows reusing task results,\n * and sends notifications about task status to the data bus (currently just used for `start`).\n *\n * NOTE: To enable data bus notifications, you must call `connectToBus()`.\n * `createApiContext` does this with the `taskRunner` passed in.\n * (`createPartialApiContext` does not create or connect a data bus.)\n */\nexport class TaskRunner {\n private _bus: DataBus | undefined;\n private readonly _queue: PQueue;\n /** Stats about task errors/warnings, only updated if a bus is connected */\n private _taskIssues: TaskIssueStats;\n /**\n * Tasks that are currently either running or waiting. (Note that `PQeueue`'s definition of\n * \"pending\" is slightly different: it only counts tasks that are currently running.)\n */\n private readonly _pendingTasks: Map<string, Promise<unknown>>;\n /** Tasks that have completed */\n private readonly _completedTasks: Map<string, unknown>;\n /**\n * Task IDs where a re-run was requested while the task was running.\n * We let the current task finish, and then re-run it.\n */\n private readonly _requiresRerun: Set<string>;\n /** All previously-seen tasks (regardless of state) */\n private readonly _allTasks: Map<string, Task<unknown>>;\n\n constructor() {\n this._queue = new PQueue({ concurrency: 10 });\n this._taskIssues = { totalErrors: 0, totalWarnings: 0, taskWarnings: {}, taskErrors: {} };\n this._pendingTasks = new Map();\n this._completedTasks = new Map();\n this._requiresRerun = new Set();\n this._allTasks = new Map();\n }\n\n /**\n * Get current task stats. Public for testing.\n * @internal\n */\n get _taskStats(): Readonly<TaskStats> {\n return {\n status: this._pendingTasks.size ? 'pending' : 'idle',\n remainingTasks: this._pendingTasks.size,\n totalTasks: this._allTasks.size,\n totalErrors: this._taskIssues.totalErrors,\n totalWarnings: this._taskIssues.totalWarnings,\n };\n }\n\n /**\n * Connects the TaskRunner to the data bus. Tasks will still run without this, but they won't\n * send any notifications to a client (which only matters if a client is listening, e.g.\n * the browser while running `start`).\n */\n public connectToBus(bus: DataBus): void {\n this._bus = bus;\n }\n\n /**\n * Enqueue a task and return its result promise.\n *\n * If a task with the same `id` was already added, it returns either the previous result\n * (if completed) or the promise (if pending). Pass `options.rerun` to force re-running.\n *\n * (Note that any re-runs will use the *original* task function, not the new one.\n * If something has changed that requires a new task function, you should incorporate this\n * into the `id`.)\n */\n add<TReturn>(\n task: Task<TReturn>,\n options?: {\n rerun?: boolean;\n priority?: number;\n },\n ): Promise<TReturn> {\n const { name, id, execute } = task;\n const { rerun, priority } = options || {};\n\n if (!this._allTasks.has(id)) {\n this._allTasks.set(id, task as Task<unknown>);\n }\n\n // Check if we are already completed the task with that id.\n const action = this._completedTasks.get(id) as TReturn | undefined;\n if (action !== undefined && !rerun) {\n return Promise.resolve(action);\n }\n\n // Check if we are already running the task with that id.\n const pending = this._pendingTasks.get(id) as Promise<TReturn> | undefined;\n if (pending !== undefined) {\n if (rerun) {\n this._requiresRerun.add(id);\n }\n return pending;\n }\n\n const resultPromise: Promise<TReturn> = (async () => {\n let taskResult: TReturn | undefined;\n let taskError: unknown;\n\n try {\n do {\n // Delete from rerun list (if present).\n this._requiresRerun.delete(id);\n\n taskResult = await this._queue.add(execute, { priority });\n } while (this._requiresRerun.has(id));\n } catch (error) {\n taskError = error;\n // Re-throw the error, but `finally` will handle completion\n throw error;\n } finally {\n // Delete from pending list.\n this._pendingTasks.delete(id);\n\n this._reportEnd(task, taskResult, taskError);\n }\n\n // Extra check to ensure that the task returned a value.\n // It should never throw, if it does we have a bug.\n if (taskResult === undefined) {\n throw new Error(`Task \"${name}:${id}\" returned undefined, without throwing an error, which was unexpected.`);\n }\n\n // Update finished Tasks.\n this._completedTasks.set(id, taskResult);\n\n return taskResult;\n })();\n\n this._pendingTasks.set(id, resultPromise);\n const wasCompleted = this._completedTasks.delete(id);\n if (wasCompleted) {\n this._removeTaskIssues(task.id);\n }\n\n this._reportStart<TReturn>(task);\n\n return resultPromise;\n }\n\n /**\n * Dispose in-memory resources of all tasks and clear the TaskRunner's state.\n */\n // NOTE: This is also used by clearAllResults(), so if it's updated to do anything that\n // renders the TaskRunner unusable/finished, the common parts should be refactored out.\n dispose(): void {\n this._queue.clear();\n for (const task of this._allTasks.values()) {\n task.dispose?.();\n }\n this._allTasks.clear();\n this._pendingTasks.clear();\n this._completedTasks.clear();\n this._requiresRerun.clear();\n this._taskIssues = { totalErrors: 0, totalWarnings: 0, taskWarnings: {}, taskErrors: {} };\n }\n\n /**\n * Clear the result of a specific task (could involve deleting files from disk) and remove\n * it from the TaskRunner's task records.\n */\n async clearResult(id: string): Promise<void> {\n const task = this._allTasks.get(id);\n task?.dispose?.();\n await task?.clear?.();\n\n this._allTasks.delete(id);\n this._requiresRerun.delete(id);\n this._pendingTasks.delete(id);\n this._completedTasks.delete(id);\n this._removeTaskIssues(id);\n\n if (this._bus) {\n const { tasks, index } = this._findFromTaskList(id);\n if (index !== -1) {\n tasks.splice(index, 1);\n this._publishUpdates({ tasks, stats: true });\n }\n }\n }\n\n /**\n * Clear the results of all tasks (might include deleting files on disk) and clear the\n * TaskRunner's task records.\n *\n * (To only dispose in-memory resources, use `dispose()`.)\n */\n async clearAllResults(): Promise<void> {\n // Publish the empty task list first since deleting things might take awhile.\n this._publishUpdates({ tasks: [] });\n\n for (const task of this._allTasks.values()) {\n task.dispose?.();\n await task.clear?.();\n }\n this.dispose();\n\n // Publish new stats after clearing everything (otherwise the calculated values will be wrong)\n this._publishUpdates({ stats: true });\n }\n\n /**\n * Pauses the TaskRunner (for testing).\n * @internal\n */\n _pause(): void {\n this._queue.pause();\n }\n\n /**\n * Starts or resumes the TaskRunner (for testing).\n * @internal\n */\n _start(): void {\n this._queue.start();\n }\n\n /** Remove any records of previous issues with this task from the totals */\n private _removeTaskIssues(id: string): void {\n this._taskIssues.totalErrors -= this._taskIssues.taskErrors[id] || 0;\n this._taskIssues.totalWarnings -= this._taskIssues.taskWarnings[id] || 0;\n delete this._taskIssues.taskErrors[id];\n delete this._taskIssues.taskWarnings[id];\n }\n\n /**\n * Internal method to report the start of a task to the bus.\n */\n private _reportStart<TReturn>(task: Task<TReturn>): void {\n if (!this._bus || !task.getStartDescription) return;\n\n const { tasks, index } = this._findFromTaskList(task.id);\n\n const taskDesc: TaskDescription = {\n id: task.id,\n name: task.name,\n ...task.getStartDescription(),\n status: 'pending',\n startTime: Date.now(),\n };\n if (index === -1) {\n tasks.push(taskDesc);\n } else {\n tasks[index] = taskDesc;\n }\n\n this._publishUpdates({ tasks, stats: true });\n }\n\n /**\n * Internal method to report the end of a task to the bus.\n */\n private _reportEnd<TReturn>(task: Task<TReturn>, taskResult: TReturn | undefined, taskError: unknown): void {\n if (!this._bus || !task.getEndDescription) return;\n\n // Replace the usual description with an error if relevant\n const description: TaskEndDescription = taskError\n ? {\n errors: [\n {\n source: 'running task',\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n text: taskError instanceof Error ? taskError.stack || taskError.message : String(taskError),\n },\n ],\n }\n : task.getEndDescription(taskResult);\n const errorCount = description.errors?.length || 0;\n const warningCount = description.warnings?.length || 0;\n if (errorCount) {\n this._taskIssues.taskErrors[task.id] = errorCount;\n this._taskIssues.totalErrors += errorCount;\n }\n if (warningCount) {\n this._taskIssues.taskWarnings[task.id] = warningCount;\n this._taskIssues.totalWarnings += warningCount;\n }\n\n const { tasks, index } = this._findFromTaskList(task.id);\n const startDescription = tasks[index];\n\n if (startDescription) {\n const now = Date.now();\n tasks[index] = {\n ...startDescription,\n ...description,\n status: 'complete',\n duration: now - startDescription.startTime,\n lastUpdated: now,\n };\n\n this._publishUpdates({ tasks, stats: true });\n }\n }\n\n /** Get the task list from the data bus, and find the task's index. */\n private _findFromTaskList(id: string): { tasks: TaskDescription[]; index: number } {\n const tasks = this._bus?.getData<TaskList>(taskListSource.path)?.tasks || [];\n const index = tasks.findIndex((t) => t.id === id);\n return { tasks, index };\n }\n\n /**\n * Publish tasks and/or stats to the data bus.\n */\n private _publishUpdates(params: { tasks?: TaskDescription[]; stats?: boolean }): void {\n const { tasks, stats } = params;\n // Publish using .path for easier testing\n stats && this._bus?.publish<TaskStats>(taskStatsSource.path, this._taskStats);\n tasks && this._bus?.publish<TaskList>(taskListSource.path, { tasks });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isValidBundleEntry.d.ts","sourceRoot":"","sources":["../../src/utilities/isValidBundleEntry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isValidBundleEntry.d.ts","sourceRoot":"","sources":["../../src/utilities/isValidBundleEntry.ts"],"names":[],"mappings":"AAcA;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAW5D"}
|
|
@@ -1,23 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { nonJsSourceExtensions, base64AssetExtensions, sourceRegex, textExtensions, } from '@ms-cloudpack/path-utilities';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
const
|
|
4
|
-
'.bmp',
|
|
5
|
-
'.gif',
|
|
6
|
-
'.jpeg',
|
|
7
|
-
'.jpg',
|
|
8
|
-
'.mp3',
|
|
9
|
-
'.mp4',
|
|
10
|
-
'.otf',
|
|
11
|
-
'.png',
|
|
12
|
-
'.svg',
|
|
13
|
-
'.ttf',
|
|
14
|
-
'.webp',
|
|
15
|
-
'.woff',
|
|
16
|
-
'.woff2',
|
|
17
|
-
];
|
|
18
|
-
const nonJsSourceExtensions = ['.json', '.css', '.scss', '.wasm'];
|
|
19
|
-
const textExtensions = ['.htm', '.html', '.txt'];
|
|
20
|
-
const supportedExtensions = [...resourceExtensions, ...sourceExtensions, ...nonJsSourceExtensions, ...textExtensions];
|
|
3
|
+
const supportedNonJsExtensions = [...base64AssetExtensions, ...nonJsSourceExtensions, ...textExtensions];
|
|
21
4
|
// Note: excluded extensions only need to contain things that are allowed by supportedExtensions but using
|
|
22
5
|
// an extended syntax that we don't want to support. For example, we want to support .ts files but not .d.ts.
|
|
23
6
|
const excludedExtensions = ['.d.ts'];
|
|
@@ -29,11 +12,13 @@ const excludedExtensions = ['.d.ts'];
|
|
|
29
12
|
* provided by the plugin itself so that it owns what's "supported".
|
|
30
13
|
*/
|
|
31
14
|
export function isValidBundleEntry(filePath) {
|
|
32
|
-
|
|
15
|
+
filePath = filePath.toLowerCase();
|
|
16
|
+
const ext = path.extname(filePath);
|
|
17
|
+
const isSupported = sourceRegex.test(ext) || supportedNonJsExtensions.includes(ext);
|
|
33
18
|
const isExcluded = excludedExtensions.some((excludedExt) => filePath.endsWith(excludedExt)) ||
|
|
34
19
|
// Exclude files that start with an underscore, as they are typically partials or other non-entry files.
|
|
35
20
|
// https://sass-lang.com/documentation/at-rules/import/#partials
|
|
36
|
-
(
|
|
21
|
+
(ext === '.scss' && path.basename(filePath).startsWith('_'));
|
|
37
22
|
return isSupported && !isExcluded;
|
|
38
23
|
}
|
|
39
24
|
//# sourceMappingURL=isValidBundleEntry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isValidBundleEntry.js","sourceRoot":"","sources":["../../src/utilities/isValidBundleEntry.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"isValidBundleEntry.js","sourceRoot":"","sources":["../../src/utilities/isValidBundleEntry.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,EACX,cAAc,GACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,wBAAwB,GAAG,CAAC,GAAG,qBAAqB,EAAE,GAAG,qBAAqB,EAAE,GAAG,cAAc,CAAC,CAAC;AAEzG,0GAA0G;AAC1G,6GAA6G;AAC7G,MAAM,kBAAkB,GAAG,CAAC,OAAO,CAAC,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAgB;IACjD,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IAClC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACnC,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,wBAAwB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IACpF,MAAM,UAAU,GACd,kBAAkB,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QACxE,wGAAwG;QACxG,gEAAgE;QAChE,CAAC,GAAG,KAAK,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAE/D,OAAO,WAAW,IAAI,CAAC,UAAU,CAAC;AACpC,CAAC","sourcesContent":["import {\n nonJsSourceExtensions,\n base64AssetExtensions,\n sourceRegex,\n textExtensions,\n} from '@ms-cloudpack/path-utilities';\nimport path from 'path';\n\nconst supportedNonJsExtensions = [...base64AssetExtensions, ...nonJsSourceExtensions, ...textExtensions];\n\n// Note: excluded extensions only need to contain things that are allowed by supportedExtensions but using\n// an extended syntax that we don't want to support. For example, we want to support .ts files but not .d.ts.\nconst excludedExtensions = ['.d.ts'];\n\n/**\n * Returns true if the file path is a valid bundle-able file extension. This is used to filter exports maps out\n * to ensure we prevent trying to bundle things that bundlers don't support. We can bundle things like TS,\n * JS, CSS, SCSS, JSON, and even text extensions like .txt and .html. These formats all will produce javascript\n * modules. \"Valid\" is defined by what the bundler abstraction expects. In the future we may want this code to be\n * provided by the plugin itself so that it owns what's \"supported\".\n */\nexport function isValidBundleEntry(filePath: string): boolean {\n filePath = filePath.toLowerCase();\n const ext = path.extname(filePath);\n const isSupported = sourceRegex.test(ext) || supportedNonJsExtensions.includes(ext);\n const isExcluded =\n excludedExtensions.some((excludedExt) => filePath.endsWith(excludedExt)) ||\n // Exclude files that start with an underscore, as they are typically partials or other non-entry files.\n // https://sass-lang.com/documentation/at-rules/import/#partials\n (ext === '.scss' && path.basename(filePath).startsWith('_'));\n\n return isSupported && !isExcluded;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toNormalizedEntryKey.d.ts","sourceRoot":"","sources":["../../src/utilities/toNormalizedEntryKey.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toNormalizedEntryKey.d.ts","sourceRoot":"","sources":["../../src/utilities/toNormalizedEntryKey.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE1D"}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import path from 'path';
|
|
1
|
+
import { sourceRegex } from '@ms-cloudpack/path-utilities';
|
|
3
2
|
/**
|
|
4
3
|
* When we derive keys, we want to preserve unknown script extensions. For others, remove them as the bundler
|
|
5
4
|
* will add back `'.js'` for us in the output.
|
|
6
5
|
*/
|
|
7
6
|
export function toNormalizedEntryKey(entry) {
|
|
8
|
-
|
|
9
|
-
if (sourceExtensions.includes(extension)) {
|
|
10
|
-
return entry.slice(0, -extension.length);
|
|
11
|
-
}
|
|
12
|
-
return entry;
|
|
7
|
+
return entry.replace(sourceRegex, '');
|
|
13
8
|
}
|
|
14
9
|
//# sourceMappingURL=toNormalizedEntryKey.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toNormalizedEntryKey.js","sourceRoot":"","sources":["../../src/utilities/toNormalizedEntryKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"toNormalizedEntryKey.js","sourceRoot":"","sources":["../../src/utilities/toNormalizedEntryKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,OAAO,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACxC,CAAC","sourcesContent":["import { sourceRegex } from '@ms-cloudpack/path-utilities';\n\n/**\n * When we derive keys, we want to preserve unknown script extensions. For others, remove them as the bundler\n * will add back `'.js'` for us in the output.\n */\nexport function toNormalizedEntryKey(entry: string): string {\n return entry.replace(sourceRegex, '');\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/api-server",
|
|
3
|
-
"version": "0.65.
|
|
3
|
+
"version": "0.65.11",
|
|
4
4
|
"description": "Internal API server for Cloudpack",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -35,34 +35,34 @@
|
|
|
35
35
|
"test": "cloudpack-scripts test"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ms-cloudpack/bundler": "^0.27.
|
|
39
|
-
"@ms-cloudpack/common-types": "^0.33.
|
|
40
|
-
"@ms-cloudpack/config": "^0.38.
|
|
41
|
-
"@ms-cloudpack/create-express-app": "^1.10.
|
|
42
|
-
"@ms-cloudpack/data-bus": "^0.5.
|
|
38
|
+
"@ms-cloudpack/bundler": "^0.27.1",
|
|
39
|
+
"@ms-cloudpack/common-types": "^0.33.1",
|
|
40
|
+
"@ms-cloudpack/config": "^0.38.21",
|
|
41
|
+
"@ms-cloudpack/create-express-app": "^1.10.66",
|
|
42
|
+
"@ms-cloudpack/data-bus": "^0.5.1",
|
|
43
43
|
"@ms-cloudpack/environment": "^0.1.1",
|
|
44
|
-
"@ms-cloudpack/esm-stub-utilities": "^0.15.
|
|
45
|
-
"@ms-cloudpack/file-watcher": "^0.4.
|
|
46
|
-
"@ms-cloudpack/import-map": "^0.10.
|
|
44
|
+
"@ms-cloudpack/esm-stub-utilities": "^0.15.35",
|
|
45
|
+
"@ms-cloudpack/file-watcher": "^0.4.24",
|
|
46
|
+
"@ms-cloudpack/import-map": "^0.10.62",
|
|
47
47
|
"@ms-cloudpack/json-utilities": "^0.1.11",
|
|
48
|
-
"@ms-cloudpack/package-hashes": "^0.8.
|
|
49
|
-
"@ms-cloudpack/package-utilities": "^13.2.
|
|
48
|
+
"@ms-cloudpack/package-hashes": "^0.8.45",
|
|
49
|
+
"@ms-cloudpack/package-utilities": "^13.2.5",
|
|
50
50
|
"@ms-cloudpack/path-string-parsing": "^1.2.7",
|
|
51
|
-
"@ms-cloudpack/path-utilities": "^3.2.
|
|
52
|
-
"@ms-cloudpack/remote-cache": "^0.11.
|
|
51
|
+
"@ms-cloudpack/path-utilities": "^3.2.2",
|
|
52
|
+
"@ms-cloudpack/remote-cache": "^0.11.57",
|
|
53
53
|
"@ms-cloudpack/task-reporter": "^0.17.4",
|
|
54
|
-
"@ms-cloudpack/telemetry": "^0.11.
|
|
54
|
+
"@ms-cloudpack/telemetry": "^0.11.57",
|
|
55
55
|
"@trpc/client": "^11.1.1",
|
|
56
56
|
"@trpc/server": "^11.1.1",
|
|
57
57
|
"cors": "^2.8.5",
|
|
58
58
|
"es-module-lexer": "^1.4.1",
|
|
59
|
-
"filenamify": "^
|
|
59
|
+
"filenamify": "^7.0.0",
|
|
60
60
|
"get-port": "^7.0.0",
|
|
61
61
|
"object-hash": "^3.0.0",
|
|
62
|
-
"p-queue": "^
|
|
62
|
+
"p-queue": "^9.0.0",
|
|
63
63
|
"source-map": "^0.7.0",
|
|
64
64
|
"ws": "^8.16.0",
|
|
65
|
-
"zod": "^
|
|
65
|
+
"zod": "^4.0.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
|