@kontur.candy/tools 2.225.1-ci-test-4 → 2.226.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.
@@ -11,6 +11,7 @@ exports.ensureAndGetString = ensureAndGetString;
11
11
  exports.ensureArrayHasLength = ensureArrayHasLength;
12
12
  exports.ensureArrayIsNotEmpty = ensureArrayIsNotEmpty;
13
13
  exports.ensureArrayLengthGreaterThenOrEqual = ensureArrayLengthGreaterThenOrEqual;
14
+ exports.ensureHasFunctionType = ensureHasFunctionType;
14
15
  exports.ensureIsArray = ensureIsArray;
15
16
  exports.ensureNever = ensureNever;
16
17
  exports.ensureNotNullOrUndefined = ensureNotNullOrUndefined;
@@ -37,9 +38,14 @@ function stringifyUnknownError(error) {
37
38
  // eslint-disable-next-line @typescript-eslint/no-unsafe-return
38
39
  return typeof error === "object" && (error === null || error === void 0 ? void 0 : error["message"]);
39
40
  }
40
- function ensureNotNullOrUndefined(input) {
41
+ function ensureNotNullOrUndefined(input, message) {
41
42
  if (!isNotNullOrUndefined(input)) {
42
- throw new Error(`Value must be defined`);
43
+ throw new Error(message !== null && message !== void 0 ? message : `Value must be defined`);
44
+ }
45
+ }
46
+ function ensureHasFunctionType(input, message) {
47
+ if (typeof input !== "function") {
48
+ throw new Error(message !== null && message !== void 0 ? message : `Value must be defined`);
43
49
  }
44
50
  }
45
51
  function noop() {
@@ -1 +1 @@
1
- {"version":3,"file":"TypingUtils.js","names":["isNotNullOrUndefined","input","undefined","stringifyUnknownError","error","ensureNotNullOrUndefined","Error","noop","reject","message","isLengthGreaterThenOrEqual","items","minLength","length","minLengthOrUndefined","ensureIsArray","Array","isArray","arrayHasLength","arrayIsNotEmpty","arrayHasAtLeastOneItem","ensureArrayIsNotEmpty","ensureArrayHasLength","ensureArrayLengthGreaterThenOrEqual","ensureNever","_neverArgument","ensureAndGetString","neverArgument","runAsyncAction","action","isNullOrEmpty","isNotNullOrEmpty","isNullOrWhiteSpace","trim","trimLastSlash","url","slice","assertIs","_"],"sources":["../../../Common/TypingUtils.ts"],"sourcesContent":["/***\n * Строготипизированная замена для Boolean(...)\n * Обычно используется для [...].filter(isNotNullOrUndefined)\n */\nexport function isNotNullOrUndefined<T>(input: T): input is NonNullable<T> {\n return input != undefined;\n}\n\nexport function stringifyUnknownError(error: unknown): undefined | string {\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return typeof error === \"object\" && error?.[\"message\"];\n}\n\nexport function ensureNotNullOrUndefined<T>(input: T): asserts input is NonNullable<T> {\n if (!isNotNullOrUndefined(input)) {\n throw new Error(`Value must be defined`);\n }\n}\n\nexport function noop(): void {\n // noop\n}\n\nexport type ErrorFirstCallback<T> = (...args: [Error, null | undefined] | [null | undefined, T] | [Error]) => void;\n\nexport function reject(message?: string | Error): never {\n if (typeof message === \"string\" || message == undefined) {\n throw new Error(message ?? \"Undefined is not allowed\");\n } else {\n throw message;\n }\n}\n\ntype ArrayOfLength<TItem, TLength extends number, TRest extends TItem[] = []> = TRest extends { length: TLength }\n ? TRest\n : ArrayOfLength<TItem, TLength, [TItem, ...TRest]>;\n\nexport type MinLengthArray<TItem, TLength extends number, TRest extends TItem[] = []> = TRest extends {\n length: TLength;\n}\n ? [...TRest, ...TItem[]]\n : MinLengthArray<TItem, TLength, [...TRest, TItem]>;\n\nexport function isLengthGreaterThenOrEqual<T, TNum extends number>(\n items: readonly T[],\n minLength: TNum\n): items is MinLengthArray<T, TNum> {\n return items.length >= minLength;\n}\n\nexport function minLengthOrUndefined<T, TNum extends number>(\n items: T[],\n minLength: TNum\n): undefined | MinLengthArray<T, TNum> {\n if (isLengthGreaterThenOrEqual(items, minLength)) {\n return items;\n }\n return undefined;\n}\n\nexport function ensureIsArray<T>(items: unknown): T[] {\n if (!Array.isArray(items)) {\n throw new Error(`Must be an array!`);\n }\n return items as T[];\n}\n\nexport function arrayHasLength<T, TNum extends number>(\n items: readonly T[],\n length: TNum\n): items is ArrayOfLength<T, TNum> {\n return items.length === length;\n}\n\nexport function arrayIsNotEmpty<T>(items: readonly T[]): items is MinLengthArray<T, 1> {\n return items.length > 0;\n}\n\nexport function arrayHasAtLeastOneItem<T>(items: readonly T[]): items is MinLengthArray<T, 1> {\n return items.length > 0;\n}\n\nexport function ensureArrayIsNotEmpty<T>(items: readonly T[], message?: string): asserts items is MinLengthArray<T, 1> {\n if (!arrayIsNotEmpty(items)) {\n throw new Error(message ?? `Array must be not empty`);\n }\n}\n\nexport function ensureArrayHasLength<T, TNum extends number>(\n items: readonly T[],\n length: TNum\n): asserts items is ArrayOfLength<T, TNum> {\n if (!arrayHasLength(items, length)) {\n throw new Error(`Array should has length ${length}`);\n }\n}\n\nexport function ensureArrayLengthGreaterThenOrEqual<T, TNum extends number>(\n items: readonly T[],\n length: TNum\n): asserts items is ArrayOfLength<T, TNum> {\n if (!isLengthGreaterThenOrEqual(items, length)) {\n throw new Error(`Array must have minimal length ${length}`);\n }\n}\n\nexport function ensureNever(_neverArgument: never): void {\n // noop\n}\n\nexport function ensureAndGetString(neverArgument: never): string {\n return `${neverArgument}`;\n}\n\nexport function runAsyncAction(action: () => Promise<void>): void {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n action();\n}\n\nexport function isNullOrEmpty(input: string | undefined): input is undefined {\n return input == undefined || input === \"\";\n}\n\nexport function isNotNullOrEmpty(input: string | undefined): input is string {\n return !isNullOrEmpty(input);\n}\n\nexport function isNullOrWhiteSpace(input: string | undefined | null): input is undefined | null {\n return input == undefined || input.trim() === \"\";\n}\n\nexport function trimLastSlash(url: string): string {\n return url.slice(-1) === \"/\" ? url.slice(0, -1) : url;\n}\n\nexport function assertIs<T>(_: T): void {\n // noop\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACO,SAASA,oBAAoBA,CAAIC,KAAQ,EAA2B;EACvE,OAAOA,KAAK,IAAIC,SAAS;AAC7B;AAEO,SAASC,qBAAqBA,CAACC,KAAc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W,EAAU;EAC/C,OAAOA,GAAG,CAACC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,GAAGD,GAAG,CAACC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAGD,GAAG;AACzD;AAEO,SAASE,QAAQA,CAAIC,CAAI,EAAQ;EACpC;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"TypingUtils.js","names":["isNotNullOrUndefined","input","undefined","stringifyUnknownError","error","ensureNotNullOrUndefined","message","Error","ensureHasFunctionType","noop","reject","isLengthGreaterThenOrEqual","items","minLength","length","minLengthOrUndefined","ensureIsArray","Array","isArray","arrayHasLength","arrayIsNotEmpty","arrayHasAtLeastOneItem","ensureArrayIsNotEmpty","ensureArrayHasLength","ensureArrayLengthGreaterThenOrEqual","ensureNever","_neverArgument","ensureAndGetString","neverArgument","runAsyncAction","action","isNullOrEmpty","isNotNullOrEmpty","isNullOrWhiteSpace","trim","trimLastSlash","url","slice","assertIs","_"],"sources":["../../../Common/TypingUtils.ts"],"sourcesContent":["/***\n * Строготипизированная замена для Boolean(...)\n * Обычно используется для [...].filter(isNotNullOrUndefined)\n */\nexport function isNotNullOrUndefined<T>(input: T): input is NonNullable<T> {\n return input != undefined;\n}\n\nexport function stringifyUnknownError(error: unknown): undefined | string {\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return typeof error === \"object\" && error?.[\"message\"];\n}\n\nexport function ensureNotNullOrUndefined<T>(input: T, message?: string): asserts input is NonNullable<T> {\n if (!isNotNullOrUndefined(input)) {\n throw new Error(message ?? `Value must be defined`);\n }\n}\n\nexport function ensureHasFunctionType(input: unknown, message?: string): asserts input is Function {\n if (typeof input !== \"function\") {\n throw new Error(message ?? `Value must be defined`);\n }\n}\n\nexport function noop(): void {\n // noop\n}\n\nexport type ErrorFirstCallback<T> = (...args: [Error, null | undefined] | [null | undefined, T] | [Error]) => void;\n\nexport function reject(message?: string | Error): never {\n if (typeof message === \"string\" || message == undefined) {\n throw new Error(message ?? \"Undefined is not allowed\");\n } else {\n throw message;\n }\n}\n\ntype ArrayOfLength<TItem, TLength extends number, TRest extends TItem[] = []> = TRest extends { length: TLength }\n ? TRest\n : ArrayOfLength<TItem, TLength, [TItem, ...TRest]>;\n\nexport type MinLengthArray<TItem, TLength extends number, TRest extends TItem[] = []> = TRest extends {\n length: TLength;\n}\n ? [...TRest, ...TItem[]]\n : MinLengthArray<TItem, TLength, [...TRest, TItem]>;\n\nexport function isLengthGreaterThenOrEqual<T, TNum extends number>(\n items: readonly T[],\n minLength: TNum\n): items is MinLengthArray<T, TNum> {\n return items.length >= minLength;\n}\n\nexport function minLengthOrUndefined<T, TNum extends number>(\n items: T[],\n minLength: TNum\n): undefined | MinLengthArray<T, TNum> {\n if (isLengthGreaterThenOrEqual(items, minLength)) {\n return items;\n }\n return undefined;\n}\n\nexport function ensureIsArray<T>(items: unknown): T[] {\n if (!Array.isArray(items)) {\n throw new Error(`Must be an array!`);\n }\n return items as T[];\n}\n\nexport function arrayHasLength<T, TNum extends number>(\n items: readonly T[],\n length: TNum\n): items is ArrayOfLength<T, TNum> {\n return items.length === length;\n}\n\nexport function arrayIsNotEmpty<T>(items: readonly T[]): items is MinLengthArray<T, 1> {\n return items.length > 0;\n}\n\nexport function arrayHasAtLeastOneItem<T>(items: readonly T[]): items is MinLengthArray<T, 1> {\n return items.length > 0;\n}\n\nexport function ensureArrayIsNotEmpty<T>(items: readonly T[], message?: string): asserts items is MinLengthArray<T, 1> {\n if (!arrayIsNotEmpty(items)) {\n throw new Error(message ?? `Array must be not empty`);\n }\n}\n\nexport function ensureArrayHasLength<T, TNum extends number>(\n items: readonly T[],\n length: TNum\n): asserts items is ArrayOfLength<T, TNum> {\n if (!arrayHasLength(items, length)) {\n throw new Error(`Array should has length ${length}`);\n }\n}\n\nexport function ensureArrayLengthGreaterThenOrEqual<T, TNum extends number>(\n items: readonly T[],\n length: TNum\n): asserts items is ArrayOfLength<T, TNum> {\n if (!isLengthGreaterThenOrEqual(items, length)) {\n throw new Error(`Array must have minimal length ${length}`);\n }\n}\n\nexport function ensureNever(_neverArgument: never): void {\n // noop\n}\n\nexport function ensureAndGetString(neverArgument: never): string {\n return `${neverArgument}`;\n}\n\nexport function runAsyncAction(action: () => Promise<void>): void {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n action();\n}\n\nexport function isNullOrEmpty(input: string | undefined): input is undefined {\n return input == undefined || input === \"\";\n}\n\nexport function isNotNullOrEmpty(input: string | undefined): input is string {\n return !isNullOrEmpty(input);\n}\n\nexport function isNullOrWhiteSpace(input: string | undefined | null): input is undefined | null {\n return input == undefined || input.trim() === \"\";\n}\n\nexport function trimLastSlash(url: string): string {\n return url.slice(-1) === \"/\" ? url.slice(0, -1) : url;\n}\n\nexport function assertIs<T>(_: T): void {\n // noop\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACO,SAASA,oBAAoBA,CAAIC,KAAQ,EAA2B;EACvE,OAAOA,KAAK,IAAIC,SAAS;AAC7B;AAEO,SAASC,qBAAqBA,CAACC,KAAc,EAAsB;EACtE;EACA;EACA,OAAO,OAAOA,KAAK,KAAK,QAAQ,KAAIA,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAG,SAAS,CAAC;AAC1D;AAEO,SAASC,wBAAwBA,CAAIJ,KAAQ,EAAEK,OAAgB,EAAmC;EACrG,IAAI,CAACN,oBAAoB,CAACC,KAAK,CAAC,EAAE;IAC9B,MAAM,IAAIM,KAAK,CAACD,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAI,uBAAuB,CAAC;EACvD;AACJ;AAEO,SAASE,qBAAqBA,CAACP,KAAc,EAAEK,OAAgB,EAA6B;EAC/F,IAAI,OAAOL,KAAK,KAAK,UAAU,EAAE;IAC7B,MAAM,IAAIM,KAAK,CAACD,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAI,uBAAuB,CAAC;EACvD;AACJ;AAEO,SAASG,IAAI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Utils = void 0;
7
7
  class EngineVersionUtils {
8
- static extractVersionFromEngineFileName(engineFileName) {
9
- const regex = /candy_v(\d+)_(\d+)_(\d+)(?:_([\w\d_]+?)_([^_\.]+))?(?:\.(?:[\d\w-]+))?(?:\.test)?(?:\.min)?(?:(?:\.js)|(?:\.css))(?:\.map)?$/;
8
+ static extractVersionFromFileName(engineFileName, fileNamePrefix) {
9
+ const regex = new RegExp(`${fileNamePrefix}(\\d+)_(\\d+)_(\\d+)(?:_([\\w\\d_]+?)_([^_\\.]+))?(?:\\.(?:[\\d\\w-]+))?(?:\\.test)?(?:\\.min)?(?:(?:\\.js)|(?:\\.css))(?:\\.map)?$`);
10
10
  const match = regex.exec(engineFileName);
11
11
  if (match == undefined) {
12
12
  throw new Error(`Cannot extract engine version from '${engineFileName}'`);
@@ -22,6 +22,12 @@ class EngineVersionUtils {
22
22
  }
23
23
  return result;
24
24
  }
25
+ static extractVersionFromEngineFileName(engineFileName) {
26
+ return EngineVersionUtils.extractVersionFromFileName(engineFileName, "candy_v");
27
+ }
28
+ static extractVersionFromEngineLoaderFileName(engineFileName) {
29
+ return EngineVersionUtils.extractVersionFromFileName(engineFileName, "engineLoader_v");
30
+ }
25
31
  static engineVersionToName(engineVersion) {
26
32
  return `v${engineVersion.replace(/[\.\-]/gi, "_")}`;
27
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EngineVersionUtils.js","names":["EngineVersionUtils","extractVersionFromEngineFileName","engineFileName","regex","match","exec","undefined","Error","major","minor","patch","preId","prereleaseNumber","result","replace","engineVersionToName","engineVersion","exports"],"sources":["../../../../src/BuildTasks/EngineVersionUtils.ts"],"sourcesContent":["export class EngineVersionUtils {\n public static extractVersionFromEngineFileName(engineFileName: string): string {\n const regex =\n /candy_v(\\d+)_(\\d+)_(\\d+)(?:_([\\w\\d_]+?)_([^_\\.]+))?(?:\\.(?:[\\d\\w-]+))?(?:\\.test)?(?:\\.min)?(?:(?:\\.js)|(?:\\.css))(?:\\.map)?$/;\n const match = regex.exec(engineFileName);\n if (match == undefined) {\n throw new Error(`Cannot extract engine version from '${engineFileName}'`);\n }\n const major = match[1];\n const minor = match[2];\n const patch = match[3];\n const preId = match[4];\n const prereleaseNumber = match[5];\n let result = `${major}.${minor}.${patch}`;\n if (preId != undefined) {\n result += `-${preId.replace(/_/g, \"-\")}.${prereleaseNumber}`;\n }\n return result;\n }\n\n public static engineVersionToName(engineVersion: string): string {\n return `v${engineVersion.replace(/[\\.\\-]/gi, \"_\")}`;\n }\n}\n"],"mappings":";;;;;;AAAO,MAAMA,kBAAkB,CAAC;EAC5B,OAAcC,gCAAgCA,CAACC,cAAsB,EAAU;IAC3E,MAAMC,KAAK,GACP,8HAA8H;IAClI,MAAMC,KAAK,GAAGD,KAAK,CAACE,IAAI,CAACH,cAAc,CAAC;IACxC,IAAIE,KAAK,IAAIE,SAAS,EAAE;MACpB,MAAM,IAAIC,KAAK,CAAC,uCAAuCL,cAAc,GAAG,CAAC;IAC7E;IACA,MAAMM,KAAK,GAAGJ,KAAK,CAAC,CAAC,CAAC;IACtB,MAAMK,KAAK,GAAGL,KAAK,CAAC,CAAC,CAAC;IACtB,MAAMM,KAAK,GAAGN,KAAK,CAAC,CAAC,CAAC;IACtB,MAAMO,KAAK,GAAGP,KAAK,CAAC,CAAC,CAAC;IACtB,MAAMQ,gBAAgB,GAAGR,KAAK,CAAC,CAAC,CAAC;IACjC,IAAIS,MAAM,GAAG,GAAGL,KAAK,IAAIC,KAAK,IAAIC,KAAK,EAAE;IACzC,IAAIC,KAAK,IAAIL,SAAS,EAAE;MACpBO,MAAM,IAAI,IAAIF,KAAK,CAACG,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,IAAIF,gBAAgB,EAAE;IAChE;IACA,OAAOC,MAAM;EACjB;EAEA,OAAcE,mBAAmBA,CAACC,aAAqB,EAAU;IAC7D,OAAO,IAAIA,aAAa,CAACF,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE;EACvD;AACJ;AAACG,OAAA,CAAAjB,kBAAA,GAAAA,kBAAA","ignoreList":[]}
1
+ {"version":3,"file":"EngineVersionUtils.js","names":["EngineVersionUtils","extractVersionFromFileName","engineFileName","fileNamePrefix","regex","RegExp","match","exec","undefined","Error","major","minor","patch","preId","prereleaseNumber","result","replace","extractVersionFromEngineFileName","extractVersionFromEngineLoaderFileName","engineVersionToName","engineVersion","exports"],"sources":["../../../../src/BuildTasks/EngineVersionUtils.ts"],"sourcesContent":["export class EngineVersionUtils {\n public static extractVersionFromFileName(engineFileName: string, fileNamePrefix: string): string {\n const regex = new RegExp(\n `${fileNamePrefix}(\\\\d+)_(\\\\d+)_(\\\\d+)(?:_([\\\\w\\\\d_]+?)_([^_\\\\.]+))?(?:\\\\.(?:[\\\\d\\\\w-]+))?(?:\\\\.test)?(?:\\\\.min)?(?:(?:\\\\.js)|(?:\\\\.css))(?:\\\\.map)?$`\n );\n const match = regex.exec(engineFileName);\n if (match == undefined) {\n throw new Error(`Cannot extract engine version from '${engineFileName}'`);\n }\n const major = match[1];\n const minor = match[2];\n const patch = match[3];\n const preId = match[4];\n const prereleaseNumber = match[5];\n let result = `${major}.${minor}.${patch}`;\n if (preId != undefined) {\n result += `-${preId.replace(/_/g, \"-\")}.${prereleaseNumber}`;\n }\n return result;\n }\n\n public static extractVersionFromEngineFileName(engineFileName: string): string {\n return EngineVersionUtils.extractVersionFromFileName(engineFileName, \"candy_v\");\n }\n\n public static extractVersionFromEngineLoaderFileName(engineFileName: string): string {\n return EngineVersionUtils.extractVersionFromFileName(engineFileName, \"engineLoader_v\");\n }\n\n public static engineVersionToName(engineVersion: string): string {\n return `v${engineVersion.replace(/[\\.\\-]/gi, \"_\")}`;\n }\n}\n"],"mappings":";;;;;;AAAO,MAAMA,kBAAkB,CAAC;EAC5B,OAAcC,0BAA0BA,CAACC,cAAsB,EAAEC,cAAsB,EAAU;IAC7F,MAAMC,KAAK,GAAG,IAAIC,MAAM,CACpB,GAAGF,cAAc,qIACrB,CAAC;IACD,MAAMG,KAAK,GAAGF,KAAK,CAACG,IAAI,CAACL,cAAc,CAAC;IACxC,IAAII,KAAK,IAAIE,SAAS,EAAE;MACpB,MAAM,IAAIC,KAAK,CAAC,uCAAuCP,cAAc,GAAG,CAAC;IAC7E;IACA,MAAMQ,KAAK,GAAGJ,KAAK,CAAC,CAAC,CAAC;IACtB,MAAMK,KAAK,GAAGL,KAAK,CAAC,CAAC,CAAC;IACtB,MAAMM,KAAK,GAAGN,KAAK,CAAC,CAAC,CAAC;IACtB,MAAMO,KAAK,GAAGP,KAAK,CAAC,CAAC,CAAC;IACtB,MAAMQ,gBAAgB,GAAGR,KAAK,CAAC,CAAC,CAAC;IACjC,IAAIS,MAAM,GAAG,GAAGL,KAAK,IAAIC,KAAK,IAAIC,KAAK,EAAE;IACzC,IAAIC,KAAK,IAAIL,SAAS,EAAE;MACpBO,MAAM,IAAI,IAAIF,KAAK,CAACG,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,IAAIF,gBAAgB,EAAE;IAChE;IACA,OAAOC,MAAM;EACjB;EAEA,OAAcE,gCAAgCA,CAACf,cAAsB,EAAU;IAC3E,OAAOF,kBAAkB,CAACC,0BAA0B,CAACC,cAAc,EAAE,SAAS,CAAC;EACnF;EAEA,OAAcgB,sCAAsCA,CAAChB,cAAsB,EAAU;IACjF,OAAOF,kBAAkB,CAACC,0BAA0B,CAACC,cAAc,EAAE,gBAAgB,CAAC;EAC1F;EAEA,OAAciB,mBAAmBA,CAACC,aAAqB,EAAU;IAC7D,OAAO,IAAIA,aAAa,CAACJ,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE;EACvD;AACJ;AAACK,OAAA,CAAArB,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -14,8 +14,8 @@ var _Results = require("../../../Commons/HttpServer/AttributeRouting/Results");
14
14
  var _StreamResultHandler = require("../../../Commons/HttpServer/AttributeRouting/Results/StreamResultHandler");
15
15
  var _SingletonController = require("../../../Commons/HttpServer/ExpressWrapper/SingletonController");
16
16
  var _EngineDevServer = require("./DevServers/EngineDevServer");
17
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _class;
18
- let BuildServerLocalSourcesEngineController = exports.BuildServerLocalSourcesEngineController = (_dec = (0, _Methods.httpGet)("/:update.hot-update.json", _Results.httpReturn.StreamWithMime("application/json"), (0, _Params.httpUrlParam)("update", _Params.httpType.String)), _dec2 = (0, _Methods.httpGet)("/:update.hot-update.js", _Results.httpReturn.StreamWithMime("application/json"), (0, _Params.httpUrlParam)("update", _Params.httpType.String)), _dec3 = (0, _Methods.httpGet)("/public/scripts/candy_local.js", _Results.httpReturn.StreamWithMime("application/javascript")), _dec4 = (0, _Methods.httpGet)("/public/scripts/:chunkname.candy_local.js", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("chunkname", _Params.httpType.String)), _dec5 = (0, _Methods.httpGet)("/public/styles/candy_local.css", _Results.httpReturn.StreamWithMime("text/css")), _dec6 = (0, _Methods.httpGet)("/public/scripts/candy_local.min.js", _Results.httpReturn.StreamWithMime("application/javascript")), _dec7 = (0, _Methods.httpGet)("/public/scripts/:chunkname.candy_local.min.js", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("chunkname", _Params.httpType.String)), _dec8 = (0, _Methods.httpGet)("/public/styles/candy_local.min.css", _Results.httpReturn.StreamWithMime("text/css")), _dec9 = (0, _Methods.httpGet)("/public/scripts/candy_local.js.map", _Results.httpReturn.StreamWithMime("application/octet-stream")), _dec10 = (0, _Methods.httpGet)("/public/scripts/:chunkname.candy_local.js.map", _Results.httpReturn.StreamWithMime("application/octet-stream"), (0, _Params.httpUrlParam)("chunkname", _Params.httpType.String)), _dec11 = (0, _Methods.httpGet)("/public/styles/candy_local.css.map", _Results.httpReturn.StreamWithMime("application/octet-stream")), _dec12 = (0, _Methods.httpGet)("/public/scripts/candy_local.min.js.map", _Results.httpReturn.StreamWithMime("application/octet-stream")), _dec13 = (0, _Methods.httpGet)("/public/styles/candy_local.min.css.map", _Results.httpReturn.StreamWithMime("application/octet-stream")), _dec14 = (0, _Methods.httpGet)("/public/scripts/candy_local.:theme.js", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("theme", _Params.httpType.String)), _dec15 = (0, _Methods.httpGet)("/public/styles/candy_local.:theme.css", _Results.httpReturn.StreamWithMime("text/css"), (0, _Params.httpUrlParam)("theme", _Params.httpType.String)), _dec16 = (0, _Methods.httpGet)("/public/scripts/candy_local.:theme.min.js", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("theme", _Params.httpType.String)), _dec17 = (0, _Methods.httpGet)("/public/styles/candy_local.:theme.min.css", _Results.httpReturn.StreamWithMime("text/css"), (0, _Params.httpUrlParam)("theme", _Params.httpType.String)), _dec18 = (0, _Methods.httpGet)("/public/scripts/candy_local.:theme.js.map", _Results.httpReturn.StreamWithMime("application/octet-stream"), (0, _Params.httpUrlParam)("theme", _Params.httpType.String)), _dec19 = (0, _Methods.httpGet)("/public/styles/candy_local.:theme.css.map", _Results.httpReturn.StreamWithMime("application/octet-stream"), (0, _Params.httpUrlParam)("theme", _Params.httpType.String)), _dec20 = (0, _Methods.httpGet)("/public/scripts/candy_local.:theme.min.js.map", _Results.httpReturn.StreamWithMime("application/octet-stream"), (0, _Params.httpUrlParam)("theme", _Params.httpType.String)), _dec21 = (0, _Methods.httpGet)("/public/styles/candy_local.:theme.min.css.map", _Results.httpReturn.StreamWithMime("application/octet-stream")), _dec22 = (0, _Methods.httpGet)("/public/fonts/:filename", _Results.httpReturn.Stream, (0, _Params.httpUrlParam)("filename", _Params.httpType.String)), _dec23 = (0, _Methods.httpGet)("/public/images/:filename", _Results.httpReturn.Stream, (0, _Params.httpUrlParam)("filename", _Params.httpType.String)), (_class = class BuildServerLocalSourcesEngineController extends _SingletonController.SingletonController {
17
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _class;
18
+ let BuildServerLocalSourcesEngineController = exports.BuildServerLocalSourcesEngineController = (_dec = (0, _Methods.httpGet)("/:update.hot-update.json", _Results.httpReturn.StreamWithMime("application/json"), (0, _Params.httpUrlParam)("update", _Params.httpType.String)), _dec2 = (0, _Methods.httpGet)("/:update.hot-update.js", _Results.httpReturn.StreamWithMime("application/json"), (0, _Params.httpUrlParam)("update", _Params.httpType.String)), _dec3 = (0, _Methods.httpGet)("/public/scripts/candy_local.js", _Results.httpReturn.StreamWithMime("application/javascript")), _dec4 = (0, _Methods.httpGet)("/public/scripts/:hash.skbkontur.js", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("hash", _Params.httpType.String)), _dec5 = (0, _Methods.httpGet)("/public/scripts/:hash.skbkontur.js.map", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("hash", _Params.httpType.String)), _dec6 = (0, _Methods.httpGet)("/public/scripts/:hash.skbkontur.min.js", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("hash", _Params.httpType.String)), _dec7 = (0, _Methods.httpGet)("/public/scripts/:hash.skbkontur.min.js.map", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("hash", _Params.httpType.String)), _dec8 = (0, _Methods.httpGet)("/public/scripts/:hash.vendor.js", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("hash", _Params.httpType.String)), _dec9 = (0, _Methods.httpGet)("/public/scripts/:hash.vendor.js.map", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("hash", _Params.httpType.String)), _dec10 = (0, _Methods.httpGet)("/public/scripts/:hash.vendor.min.js", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("hash", _Params.httpType.String)), _dec11 = (0, _Methods.httpGet)("/public/scripts/:hash.vendor.min.js.map", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("hash", _Params.httpType.String)), _dec12 = (0, _Methods.httpGet)("/public/scripts/:hash.runtime.js", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("hash", _Params.httpType.String)), _dec13 = (0, _Methods.httpGet)("/public/scripts/:hash.runtime.js.map", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("hash", _Params.httpType.String)), _dec14 = (0, _Methods.httpGet)("/public/scripts/:hash.runtime.min.js", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("hash", _Params.httpType.String)), _dec15 = (0, _Methods.httpGet)("/public/scripts/:hash.runtime.min.js.map", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("hash", _Params.httpType.String)), _dec16 = (0, _Methods.httpGet)("/public/scripts/engineLoader_local.js", _Results.httpReturn.StreamWithMime("application/javascript")), _dec17 = (0, _Methods.httpGet)("/public/scripts/engineLoader_local.min.js", _Results.httpReturn.StreamWithMime("application/javascript")), _dec18 = (0, _Methods.httpGet)("/public/scripts/:chunkname.candy_local.js", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("chunkname", _Params.httpType.String)), _dec19 = (0, _Methods.httpGet)("/public/styles/candy_local.css", _Results.httpReturn.StreamWithMime("text/css")), _dec20 = (0, _Methods.httpGet)("/public/scripts/candy_local.min.js", _Results.httpReturn.StreamWithMime("application/javascript")), _dec21 = (0, _Methods.httpGet)("/public/scripts/:chunkname.candy_local.min.js", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("chunkname", _Params.httpType.String)), _dec22 = (0, _Methods.httpGet)("/public/styles/candy_local.min.css", _Results.httpReturn.StreamWithMime("text/css")), _dec23 = (0, _Methods.httpGet)("/public/scripts/candy_local.js.map", _Results.httpReturn.StreamWithMime("application/octet-stream")), _dec24 = (0, _Methods.httpGet)("/public/scripts/:chunkname.candy_local.js.map", _Results.httpReturn.StreamWithMime("application/octet-stream"), (0, _Params.httpUrlParam)("chunkname", _Params.httpType.String)), _dec25 = (0, _Methods.httpGet)("/public/styles/candy_local.css.map", _Results.httpReturn.StreamWithMime("application/octet-stream")), _dec26 = (0, _Methods.httpGet)("/public/scripts/candy_local.min.js.map", _Results.httpReturn.StreamWithMime("application/octet-stream")), _dec27 = (0, _Methods.httpGet)("/public/styles/candy_local.min.css.map", _Results.httpReturn.StreamWithMime("application/octet-stream")), _dec28 = (0, _Methods.httpGet)("/public/scripts/candy_local.:theme.js", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("theme", _Params.httpType.String)), _dec29 = (0, _Methods.httpGet)("/public/styles/candy_local.:theme.css", _Results.httpReturn.StreamWithMime("text/css"), (0, _Params.httpUrlParam)("theme", _Params.httpType.String)), _dec30 = (0, _Methods.httpGet)("/public/scripts/candy_local.:theme.min.js", _Results.httpReturn.StreamWithMime("application/javascript"), (0, _Params.httpUrlParam)("theme", _Params.httpType.String)), _dec31 = (0, _Methods.httpGet)("/public/styles/candy_local.:theme.min.css", _Results.httpReturn.StreamWithMime("text/css"), (0, _Params.httpUrlParam)("theme", _Params.httpType.String)), _dec32 = (0, _Methods.httpGet)("/public/scripts/candy_local.:theme.js.map", _Results.httpReturn.StreamWithMime("application/octet-stream"), (0, _Params.httpUrlParam)("theme", _Params.httpType.String)), _dec33 = (0, _Methods.httpGet)("/public/styles/candy_local.:theme.css.map", _Results.httpReturn.StreamWithMime("application/octet-stream"), (0, _Params.httpUrlParam)("theme", _Params.httpType.String)), _dec34 = (0, _Methods.httpGet)("/public/scripts/candy_local.:theme.min.js.map", _Results.httpReturn.StreamWithMime("application/octet-stream"), (0, _Params.httpUrlParam)("theme", _Params.httpType.String)), _dec35 = (0, _Methods.httpGet)("/public/styles/candy_local.:theme.min.css.map", _Results.httpReturn.StreamWithMime("application/octet-stream")), _dec36 = (0, _Methods.httpGet)("/public/fonts/:filename", _Results.httpReturn.Stream, (0, _Params.httpUrlParam)("filename", _Params.httpType.String)), _dec37 = (0, _Methods.httpGet)("/public/images/:filename", _Results.httpReturn.Stream, (0, _Params.httpUrlParam)("filename", _Params.httpType.String)), (_class = class BuildServerLocalSourcesEngineController extends _SingletonController.SingletonController {
19
19
  constructor(engineDirectory, buildDebugOnly) {
20
20
  super();
21
21
  this.engineDirectory = void 0;
@@ -26,82 +26,129 @@ let BuildServerLocalSourcesEngineController = exports.BuildServerLocalSourcesEng
26
26
  this.buildDebugOnly = buildDebugOnly;
27
27
  }
28
28
  async getDevServerUpdateJson(updateName) {
29
- return (await this.getOrCreateDevServer(undefined)).getFileAsStream(`${updateName}.hot-update.json`);
29
+ return this.getFileAsStream(`${updateName}.hot-update.json`);
30
30
  }
31
31
  async getDevServerUpdateJs(updateName) {
32
- return (await this.getOrCreateDevServer(undefined)).getFileAsStream(`${updateName}.hot-update.js`);
32
+ return this.getFileAsStream(`${updateName}.hot-update.js`);
33
33
  }
34
34
  async getLocalEngineScript() {
35
- return (await this.getOrCreateDevServer(undefined)).getFileAsStream("public/scripts/candy_local.js");
35
+ return this.getFileAsStream("public/scripts/candy_local.js");
36
+ }
37
+ async getEngineSkbkonturScript(hash) {
38
+ return this.getFileAsStream(`public/scripts/${hash}.skbkontur.js`);
39
+ }
40
+ async getEngineSkbkonturMapScript(hash) {
41
+ return this.getFileAsStream(`public/scripts/${hash}.skbkontur.js.map`);
42
+ }
43
+ async getEngineSkbkonturMinScript(hash) {
44
+ return this.getFileAsStream(`public/scripts/${hash}.skbkontur.min.js`);
45
+ }
46
+ async getEngineSkbkonturMinMapScript(hash) {
47
+ return this.getFileAsStream(`public/scripts/${hash}.skbkontur.min.js.map`);
48
+ }
49
+ async getEngineVendorScript(hash) {
50
+ return this.getFileAsStream(`public/scripts/${hash}.vendor.js`);
51
+ }
52
+ async getEngineVendorMapScript(hash) {
53
+ return this.getFileAsStream(`public/scripts/${hash}.vendor.js.map`);
54
+ }
55
+ async getEngineVendorMinScript(hash) {
56
+ return this.getFileAsStream(`public/scripts/${hash}.vendor.min.js`);
57
+ }
58
+ async getEngineVendorMinMapScript(hash) {
59
+ return this.getFileAsStream(`public/scripts/${hash}.vendor.min.js.map`);
60
+ }
61
+ async getWebpackRuntimeScript(hash) {
62
+ return this.getFileAsStream(`public/scripts/${hash}.runtime.js`);
63
+ }
64
+ async getWebpackRuntimeMapScript(hash) {
65
+ return this.getFileAsStream(`public/scripts/${hash}.runtime.js.map`);
66
+ }
67
+ async getWebpackRuntimeMinScript(hash) {
68
+ return this.getFileAsStream(`public/scripts/${hash}.runtime.min.js`);
69
+ }
70
+ async getWebpackRuntimeMinMapScript(hash) {
71
+ return this.getFileAsStream(`public/scripts/${hash}.runtime.min.js.map`);
72
+ }
73
+ async getEngineLoaderScript() {
74
+ return this.getFileAsStream("public/scripts/engineLoader_local.js");
75
+ }
76
+ async getEngineLoaderMinScript() {
77
+ return this.getFileAsStream("public/scripts/engineLoader_local.min.js");
36
78
  }
37
79
  async getLocalEngineChunk(chunkname) {
38
- return (await this.getOrCreateDevServer(undefined)).getFileAsStream(`public/scripts/${chunkname}.candy_local.js`);
80
+ return this.getFileAsStream(`public/scripts/${chunkname}.candy_local.js`);
39
81
  }
40
82
  async getLocalEngineStyles() {
41
- return (await this.getOrCreateDevServer(undefined)).getFileAsStream("public/styles/candy_local.css");
83
+ return this.getFileAsStream("public/styles/candy_local.css");
42
84
  }
43
85
  async getLocalEngineScriptMinified() {
44
- return (await this.getOrCreateDevServer(undefined)).getFileAsStream("public/scripts/candy_local.min.js");
86
+ return this.getFileAsStream("public/scripts/candy_local.min.js");
45
87
  }
46
88
  async getLocalEngineChunkMinified(chunkname) {
47
- return (await this.getOrCreateDevServer(undefined)).getFileAsStream(`public/scripts/${chunkname}.candy_local.min.js`);
89
+ return this.getFileAsStream(`public/scripts/${chunkname}.candy_local.min.js`);
48
90
  }
49
91
  async getLocalEngineStylesMinified() {
50
- return (await this.getOrCreateDevServer(undefined)).getFileAsStream("public/styles/candy_local.min.css");
92
+ return this.getFileAsStream("public/styles/candy_local.min.css");
51
93
  }
52
94
  async getLocalEngineScriptSourceMap() {
53
- return (await this.getOrCreateDevServer(undefined)).getFileAsStream("public/scripts/candy_local.js.map");
95
+ return this.getFileAsStream("public/scripts/candy_local.js.map");
54
96
  }
55
97
  async getLocalEngineChunkSourceMap(chunkname) {
56
- return (await this.getOrCreateDevServer(undefined)).getFileAsStream(`public/scripts/${chunkname}.candy_local.js.map`);
98
+ return this.getFileAsStream(`public/scripts/${chunkname}.candy_local.js.map`);
57
99
  }
58
100
  async getLocalEngineStylesSourceMap() {
59
- return (await this.getOrCreateDevServer(undefined)).getFileAsStream("public/styles/candy_local.css.map");
101
+ return this.getFileAsStream("public/styles/candy_local.css.map");
60
102
  }
61
103
  async getLocalEngineScriptMinifiedSourceMap() {
62
- return (await this.getOrCreateDevServer(undefined)).getFileAsStream("public/scripts/candy_local.min.js.map");
104
+ return this.getFileAsStream("public/scripts/candy_local.min.js.map");
63
105
  }
64
106
  async getLocalEngineStylesMinifiedSourceMap() {
65
- return (await this.getOrCreateDevServer(undefined)).getFileAsStream("public/styles/candy_local.min.css.map");
107
+ return this.getFileAsStream("public/styles/candy_local.min.css.map");
66
108
  }
67
109
  async getThemedLocalEngineScript() {
68
- return (await this.getOrCreateDevServer(undefined)).getFileAsStream("public/scripts/candy_local.js");
110
+ return this.getFileAsStream("public/scripts/candy_local.js");
69
111
  }
70
112
  async getThemedLocalEngineStyles(theme) {
71
- return (await this.getOrCreateDevServer(theme)).getFileAsStream(`public/styles/candy_local.${theme}.css`);
113
+ return this.getFileAsStream(`public/styles/candy_local.${theme}.css`, theme);
72
114
  }
73
115
  async getThemedLocalEngineScriptMinified(theme) {
74
- return (await this.getOrCreateDevServer(theme)).getFileAsStream("public/scripts/candy_local.min.js");
116
+ return this.getFileAsStream("public/scripts/candy_local.min.js", theme);
75
117
  }
76
118
  async getThemedLocalEngineStylesMinified(theme) {
77
- return (await this.getOrCreateDevServer(theme)).getFileAsStream(`public/styles/candy_local.${theme}.min.css`);
119
+ return this.getFileAsStream(`public/styles/candy_local.${theme}.min.css`, theme);
78
120
  }
79
121
  async getThemedLocalEngineScriptSourceMap(theme) {
80
- return (await this.getOrCreateDevServer(theme)).getFileAsStream("public/scripts/candy_local.js.map");
122
+ return this.getFileAsStream("public/scripts/candy_local.js.map", theme);
81
123
  }
82
124
  async getThemedLocalEngineStylesSourceMap(theme) {
83
- return (await this.getOrCreateDevServer(theme)).getFileAsStream(`public/styles/candy_local.${theme}.css.map`);
125
+ return this.getFileAsStream(`public/styles/candy_local.${theme}.css.map`, theme);
84
126
  }
85
127
  async getThemedLocalEngineScriptMinifiedSourceMap(theme) {
86
- return (await this.getOrCreateDevServer(theme)).getFileAsStream(`public/scripts/candy_local.${theme}.min.js.map`);
128
+ return this.getFileAsStream(`public/scripts/candy_local.${theme}.min.js.map`, theme);
87
129
  }
88
130
  async getThemedLocalEngineStylesMinifiedSourceMap(theme) {
89
- return (await this.getOrCreateDevServer(theme)).getFileAsStream(`public/styles/candy_local.${theme}.min.css.map`);
131
+ return this.getFileAsStream(`public/styles/candy_local.${theme}.min.css.map`, theme);
90
132
  }
91
133
  async getFormFont(fileName) {
92
134
  try {
93
- return new _StreamResultHandler.StreamResult(await (await this.getOrCreateDevServer(undefined)).getFileAsStream(`public/fonts/${fileName}`), _mimeTypes.default.lookup(fileName));
135
+ const stream = await this.getFileAsStream(`public/fonts/${fileName}`);
136
+ return new _StreamResultHandler.StreamResult(stream, _mimeTypes.default.lookup(fileName));
94
137
  } catch {
95
138
  throw new _NotFoundWebError.NotFoundWebError("File not found", true);
96
139
  }
97
140
  }
98
141
  async getFormImages(fileName) {
99
142
  try {
100
- return new _StreamResultHandler.StreamResult(await (await this.getOrCreateDevServer(undefined)).getFileAsStream(`public/images/${fileName}`), _mimeTypes.default.lookup(fileName));
143
+ const stream = await this.getFileAsStream(`public/images/${fileName}`);
144
+ return new _StreamResultHandler.StreamResult(stream, _mimeTypes.default.lookup(fileName));
101
145
  } catch {
102
146
  throw new _NotFoundWebError.NotFoundWebError("File not found", true);
103
147
  }
104
148
  }
149
+ async getFileAsStream(name, theme) {
150
+ return (await this.getOrCreateDevServer(theme)).getFileAsStream(name);
151
+ }
105
152
  async getOrCreateDevServer(theme) {
106
153
  let devServer = this.devServers.get(theme !== null && theme !== void 0 ? theme : "Default");
107
154
  if (devServer == undefined) {
@@ -113,5 +160,5 @@ let BuildServerLocalSourcesEngineController = exports.BuildServerLocalSourcesEng
113
160
  }
114
161
  return devServer;
115
162
  }
116
- }, ((0, _applyDecoratedDescriptor2.default)(_class.prototype, "getDevServerUpdateJson", [_dec], Object.getOwnPropertyDescriptor(_class.prototype, "getDevServerUpdateJson"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getDevServerUpdateJs", [_dec2], Object.getOwnPropertyDescriptor(_class.prototype, "getDevServerUpdateJs"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineScript", [_dec3], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineChunk", [_dec4], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineChunk"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineStyles", [_dec5], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineStyles"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineScriptMinified", [_dec6], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineScriptMinified"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineChunkMinified", [_dec7], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineChunkMinified"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineStylesMinified", [_dec8], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineStylesMinified"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineScriptSourceMap", [_dec9], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineScriptSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineChunkSourceMap", [_dec10], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineChunkSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineStylesSourceMap", [_dec11], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineStylesSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineScriptMinifiedSourceMap", [_dec12], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineScriptMinifiedSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineStylesMinifiedSourceMap", [_dec13], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineStylesMinifiedSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineScript", [_dec14], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineStyles", [_dec15], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineStyles"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineScriptMinified", [_dec16], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineScriptMinified"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineStylesMinified", [_dec17], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineStylesMinified"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineScriptSourceMap", [_dec18], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineScriptSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineStylesSourceMap", [_dec19], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineStylesSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineScriptMinifiedSourceMap", [_dec20], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineScriptMinifiedSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineStylesMinifiedSourceMap", [_dec21], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineStylesMinifiedSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getFormFont", [_dec22], Object.getOwnPropertyDescriptor(_class.prototype, "getFormFont"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getFormImages", [_dec23], Object.getOwnPropertyDescriptor(_class.prototype, "getFormImages"), _class.prototype)), _class));
163
+ }, ((0, _applyDecoratedDescriptor2.default)(_class.prototype, "getDevServerUpdateJson", [_dec], Object.getOwnPropertyDescriptor(_class.prototype, "getDevServerUpdateJson"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getDevServerUpdateJs", [_dec2], Object.getOwnPropertyDescriptor(_class.prototype, "getDevServerUpdateJs"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineScript", [_dec3], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getEngineSkbkonturScript", [_dec4], Object.getOwnPropertyDescriptor(_class.prototype, "getEngineSkbkonturScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getEngineSkbkonturMapScript", [_dec5], Object.getOwnPropertyDescriptor(_class.prototype, "getEngineSkbkonturMapScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getEngineSkbkonturMinScript", [_dec6], Object.getOwnPropertyDescriptor(_class.prototype, "getEngineSkbkonturMinScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getEngineSkbkonturMinMapScript", [_dec7], Object.getOwnPropertyDescriptor(_class.prototype, "getEngineSkbkonturMinMapScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getEngineVendorScript", [_dec8], Object.getOwnPropertyDescriptor(_class.prototype, "getEngineVendorScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getEngineVendorMapScript", [_dec9], Object.getOwnPropertyDescriptor(_class.prototype, "getEngineVendorMapScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getEngineVendorMinScript", [_dec10], Object.getOwnPropertyDescriptor(_class.prototype, "getEngineVendorMinScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getEngineVendorMinMapScript", [_dec11], Object.getOwnPropertyDescriptor(_class.prototype, "getEngineVendorMinMapScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getWebpackRuntimeScript", [_dec12], Object.getOwnPropertyDescriptor(_class.prototype, "getWebpackRuntimeScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getWebpackRuntimeMapScript", [_dec13], Object.getOwnPropertyDescriptor(_class.prototype, "getWebpackRuntimeMapScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getWebpackRuntimeMinScript", [_dec14], Object.getOwnPropertyDescriptor(_class.prototype, "getWebpackRuntimeMinScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getWebpackRuntimeMinMapScript", [_dec15], Object.getOwnPropertyDescriptor(_class.prototype, "getWebpackRuntimeMinMapScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getEngineLoaderScript", [_dec16], Object.getOwnPropertyDescriptor(_class.prototype, "getEngineLoaderScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getEngineLoaderMinScript", [_dec17], Object.getOwnPropertyDescriptor(_class.prototype, "getEngineLoaderMinScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineChunk", [_dec18], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineChunk"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineStyles", [_dec19], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineStyles"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineScriptMinified", [_dec20], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineScriptMinified"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineChunkMinified", [_dec21], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineChunkMinified"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineStylesMinified", [_dec22], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineStylesMinified"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineScriptSourceMap", [_dec23], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineScriptSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineChunkSourceMap", [_dec24], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineChunkSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineStylesSourceMap", [_dec25], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineStylesSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineScriptMinifiedSourceMap", [_dec26], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineScriptMinifiedSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getLocalEngineStylesMinifiedSourceMap", [_dec27], Object.getOwnPropertyDescriptor(_class.prototype, "getLocalEngineStylesMinifiedSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineScript", [_dec28], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineScript"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineStyles", [_dec29], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineStyles"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineScriptMinified", [_dec30], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineScriptMinified"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineStylesMinified", [_dec31], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineStylesMinified"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineScriptSourceMap", [_dec32], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineScriptSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineStylesSourceMap", [_dec33], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineStylesSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineScriptMinifiedSourceMap", [_dec34], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineScriptMinifiedSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getThemedLocalEngineStylesMinifiedSourceMap", [_dec35], Object.getOwnPropertyDescriptor(_class.prototype, "getThemedLocalEngineStylesMinifiedSourceMap"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getFormFont", [_dec36], Object.getOwnPropertyDescriptor(_class.prototype, "getFormFont"), _class.prototype), (0, _applyDecoratedDescriptor2.default)(_class.prototype, "getFormImages", [_dec37], Object.getOwnPropertyDescriptor(_class.prototype, "getFormImages"), _class.prototype)), _class));
117
164
  //# sourceMappingURL=BuildServerLocalSourcesEngineController.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BuildServerLocalSourcesEngineController.js","names":["_mimeTypes","_interopRequireDefault","require","_Methods","_NotFoundWebError","_Params","_Results","_StreamResultHandler","_SingletonController","_EngineDevServer","_dec","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_dec10","_dec11","_dec12","_dec13","_dec14","_dec15","_dec16","_dec17","_dec18","_dec19","_dec20","_dec21","_dec22","_dec23","_class","BuildServerLocalSourcesEngineController","exports","httpGet","httpReturn","StreamWithMime","httpUrlParam","httpType","String","Stream","SingletonController","constructor","engineDirectory","buildDebugOnly","devServers","Map","portCounter","getDevServerUpdateJson","updateName","getOrCreateDevServer","undefined","getFileAsStream","getDevServerUpdateJs","getLocalEngineScript","getLocalEngineChunk","chunkname","getLocalEngineStyles","getLocalEngineScriptMinified","getLocalEngineChunkMinified","getLocalEngineStylesMinified","getLocalEngineScriptSourceMap","getLocalEngineChunkSourceMap","getLocalEngineStylesSourceMap","getLocalEngineScriptMinifiedSourceMap","getLocalEngineStylesMinifiedSourceMap","getThemedLocalEngineScript","getThemedLocalEngineStyles","theme","getThemedLocalEngineScriptMinified","getThemedLocalEngineStylesMinified","getThemedLocalEngineScriptSourceMap","getThemedLocalEngineStylesSourceMap","getThemedLocalEngineScriptMinifiedSourceMap","getThemedLocalEngineStylesMinifiedSourceMap","getFormFont","fileName","StreamResult","mime","lookup","NotFoundWebError","getFormImages","devServer","get","EngineDevServer","set","start","_applyDecoratedDescriptor2","default","prototype","Object","getOwnPropertyDescriptor"],"sources":["../../../../../../src/CLICommands/BuildServer/ResourcesControllers/BuildServerLocalSourcesEngineController.ts"],"sourcesContent":["import mime from \"mime-types\";\n\nimport { httpGet } from \"../../../Commons/HttpServer/AttributeRouting/Methods\";\nimport { NotFoundWebError } from \"../../../Commons/HttpServer/AttributeRouting/NotFoundWebError\";\nimport { httpType, httpUrlParam } from \"../../../Commons/HttpServer/AttributeRouting/Params\";\nimport { httpReturn } from \"../../../Commons/HttpServer/AttributeRouting/Results\";\nimport {\n StreamResult,\n StreamReturnResult,\n} from \"../../../Commons/HttpServer/AttributeRouting/Results/StreamResultHandler\";\nimport { SingletonController } from \"../../../Commons/HttpServer/ExpressWrapper/SingletonController\";\n\nimport { EngineDevServer } from \"./DevServers/EngineDevServer\";\n\nexport class BuildServerLocalSourcesEngineController extends SingletonController {\n private readonly engineDirectory: string;\n private readonly devServers: Map<string, EngineDevServer> = new Map<string, EngineDevServer>();\n private portCounter = 14001;\n private readonly buildDebugOnly: boolean;\n\n public constructor(engineDirectory: string, buildDebugOnly: boolean) {\n super();\n this.engineDirectory = engineDirectory;\n this.buildDebugOnly = buildDebugOnly;\n }\n\n @httpGet(\n \"/:update.hot-update.json\",\n httpReturn.StreamWithMime(\"application/json\"),\n httpUrlParam(\"update\", httpType.String)\n )\n public async getDevServerUpdateJson(updateName: string): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(undefined)).getFileAsStream(`${updateName}.hot-update.json`);\n }\n\n @httpGet(\n \"/:update.hot-update.js\",\n httpReturn.StreamWithMime(\"application/json\"),\n httpUrlParam(\"update\", httpType.String)\n )\n public async getDevServerUpdateJs(updateName: string): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(undefined)).getFileAsStream(`${updateName}.hot-update.js`);\n }\n\n @httpGet(\"/public/scripts/candy_local.js\", httpReturn.StreamWithMime(\"application/javascript\"))\n public async getLocalEngineScript(): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(undefined)).getFileAsStream(\"public/scripts/candy_local.js\");\n }\n\n @httpGet(\n \"/public/scripts/:chunkname.candy_local.js\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"chunkname\", httpType.String)\n )\n public async getLocalEngineChunk(chunkname: string): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(undefined)).getFileAsStream(\n `public/scripts/${chunkname}.candy_local.js`\n );\n }\n\n @httpGet(\"/public/styles/candy_local.css\", httpReturn.StreamWithMime(\"text/css\"))\n public async getLocalEngineStyles(): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(undefined)).getFileAsStream(\"public/styles/candy_local.css\");\n }\n\n @httpGet(\"/public/scripts/candy_local.min.js\", httpReturn.StreamWithMime(\"application/javascript\"))\n public async getLocalEngineScriptMinified(): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(undefined)).getFileAsStream(\"public/scripts/candy_local.min.js\");\n }\n\n @httpGet(\n \"/public/scripts/:chunkname.candy_local.min.js\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"chunkname\", httpType.String)\n )\n public async getLocalEngineChunkMinified(chunkname: string): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(undefined)).getFileAsStream(\n `public/scripts/${chunkname}.candy_local.min.js`\n );\n }\n\n @httpGet(\"/public/styles/candy_local.min.css\", httpReturn.StreamWithMime(\"text/css\"))\n public async getLocalEngineStylesMinified(): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(undefined)).getFileAsStream(\"public/styles/candy_local.min.css\");\n }\n\n @httpGet(\"/public/scripts/candy_local.js.map\", httpReturn.StreamWithMime(\"application/octet-stream\"))\n public async getLocalEngineScriptSourceMap(): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(undefined)).getFileAsStream(\"public/scripts/candy_local.js.map\");\n }\n\n @httpGet(\n \"/public/scripts/:chunkname.candy_local.js.map\",\n httpReturn.StreamWithMime(\"application/octet-stream\"),\n httpUrlParam(\"chunkname\", httpType.String)\n )\n public async getLocalEngineChunkSourceMap(chunkname: string): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(undefined)).getFileAsStream(\n `public/scripts/${chunkname}.candy_local.js.map`\n );\n }\n\n @httpGet(\"/public/styles/candy_local.css.map\", httpReturn.StreamWithMime(\"application/octet-stream\"))\n public async getLocalEngineStylesSourceMap(): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(undefined)).getFileAsStream(\"public/styles/candy_local.css.map\");\n }\n\n @httpGet(\"/public/scripts/candy_local.min.js.map\", httpReturn.StreamWithMime(\"application/octet-stream\"))\n public async getLocalEngineScriptMinifiedSourceMap(): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(undefined)).getFileAsStream(\"public/scripts/candy_local.min.js.map\");\n }\n\n @httpGet(\"/public/styles/candy_local.min.css.map\", httpReturn.StreamWithMime(\"application/octet-stream\"))\n public async getLocalEngineStylesMinifiedSourceMap(): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(undefined)).getFileAsStream(\"public/styles/candy_local.min.css.map\");\n }\n\n @httpGet(\n \"/public/scripts/candy_local.:theme.js\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"theme\", httpType.String)\n )\n public async getThemedLocalEngineScript(): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(undefined)).getFileAsStream(\"public/scripts/candy_local.js\");\n }\n\n @httpGet(\n \"/public/styles/candy_local.:theme.css\",\n httpReturn.StreamWithMime(\"text/css\"),\n httpUrlParam(\"theme\", httpType.String)\n )\n public async getThemedLocalEngineStyles(theme: string): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(theme)).getFileAsStream(`public/styles/candy_local.${theme}.css`);\n }\n\n @httpGet(\n \"/public/scripts/candy_local.:theme.min.js\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"theme\", httpType.String)\n )\n public async getThemedLocalEngineScriptMinified(theme: string): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(theme)).getFileAsStream(\"public/scripts/candy_local.min.js\");\n }\n\n @httpGet(\n \"/public/styles/candy_local.:theme.min.css\",\n httpReturn.StreamWithMime(\"text/css\"),\n httpUrlParam(\"theme\", httpType.String)\n )\n public async getThemedLocalEngineStylesMinified(theme: string): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(theme)).getFileAsStream(`public/styles/candy_local.${theme}.min.css`);\n }\n\n @httpGet(\n \"/public/scripts/candy_local.:theme.js.map\",\n httpReturn.StreamWithMime(\"application/octet-stream\"),\n httpUrlParam(\"theme\", httpType.String)\n )\n public async getThemedLocalEngineScriptSourceMap(theme: string): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(theme)).getFileAsStream(\"public/scripts/candy_local.js.map\");\n }\n\n @httpGet(\n \"/public/styles/candy_local.:theme.css.map\",\n httpReturn.StreamWithMime(\"application/octet-stream\"),\n httpUrlParam(\"theme\", httpType.String)\n )\n public async getThemedLocalEngineStylesSourceMap(theme: string): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(theme)).getFileAsStream(`public/styles/candy_local.${theme}.css.map`);\n }\n\n @httpGet(\n \"/public/scripts/candy_local.:theme.min.js.map\",\n httpReturn.StreamWithMime(\"application/octet-stream\"),\n httpUrlParam(\"theme\", httpType.String)\n )\n public async getThemedLocalEngineScriptMinifiedSourceMap(theme: string): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(theme)).getFileAsStream(\n `public/scripts/candy_local.${theme}.min.js.map`\n );\n }\n\n @httpGet(\"/public/styles/candy_local.:theme.min.css.map\", httpReturn.StreamWithMime(\"application/octet-stream\"))\n public async getThemedLocalEngineStylesMinifiedSourceMap(theme: string): Promise<StreamReturnResult> {\n return (await this.getOrCreateDevServer(theme)).getFileAsStream(\n `public/styles/candy_local.${theme}.min.css.map`\n );\n }\n\n @httpGet(\"/public/fonts/:filename\", httpReturn.Stream, httpUrlParam(\"filename\", httpType.String))\n public async getFormFont(fileName: string): Promise<StreamReturnResult> {\n try {\n return new StreamResult(\n await (await this.getOrCreateDevServer(undefined)).getFileAsStream(`public/fonts/${fileName}`),\n mime.lookup(fileName)\n );\n } catch {\n throw new NotFoundWebError(\"File not found\", true);\n }\n }\n\n @httpGet(\"/public/images/:filename\", httpReturn.Stream, httpUrlParam(\"filename\", httpType.String))\n public async getFormImages(fileName: string): Promise<StreamReturnResult> {\n try {\n return new StreamResult(\n await (await this.getOrCreateDevServer(undefined)).getFileAsStream(`public/images/${fileName}`),\n mime.lookup(fileName)\n );\n } catch {\n throw new NotFoundWebError(\"File not found\", true);\n }\n }\n\n private async getOrCreateDevServer(theme: undefined | string): Promise<EngineDevServer> {\n let devServer = this.devServers.get(theme ?? \"Default\");\n if (devServer == undefined) {\n devServer = new EngineDevServer(this.portCounter, this.engineDirectory, this.buildDebugOnly, theme);\n this.portCounter++;\n this.devServers.set(theme ?? \"Default\", devServer);\n await devServer.start();\n return devServer;\n }\n return devServer;\n }\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAL,OAAA;AAIA,IAAAM,oBAAA,GAAAN,OAAA;AAEA,IAAAO,gBAAA,GAAAP,OAAA;AAA+D,IAAAQ,IAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA,EAAAC,MAAA;AAAA,IAElDC,uCAAuC,GAAAC,OAAA,CAA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D,MAAA,CAAA0D,SAAA,kDAAA9D,MAAA,GAAA+D,MAAA,CAAAC,wBAAA,CAAA5D,MAAA,CAAA0D,SAAA,kDAAA1D,MAAA,CAAA0D,SAAA,OAAAF,0BAAA,CAAAC,OAAA,EAAAzD,MAAA,CAAA0D,SAAA,kDAAA7D,MAAA,GAAA8D,MAAA,CAAAC,wBAAA,CAAA5D,MAAA,CAAA0D,SAAA,kDAAA1D,MAAA,CAAA0D,SAAA,OAAAF,0BAAA,CAAAC,OAAA,EAAAzD,MAAA,CAAA0D,SAAA,kBAAA5D,MAAA,GAAA6D,MAAA,CAAAC,wBAAA,CAAA5D,MAAA,CAAA0D,SAAA,kBAAA1D,MAAA,CAAA0D,SAAA,OAAAF,0BAAA,CAAAC,OAAA,EAAAzD,MAAA,CAAA0D,SAAA,oBAAA3D,MAAA,GAAA4D,MAAA,CAAAC,wBAAA,CAAA5D,MAAA,CAAA0D,SAAA,oBAAA1D,MAAA,CAAA0D,SAAA,IAAA1D,MAAA","ignoreList":[]}
1
+ {"version":3,"file":"BuildServerLocalSourcesEngineController.js","names":["_mimeTypes","_interopRequireDefault","require","_Methods","_NotFoundWebError","_Params","_Results","_StreamResultHandler","_SingletonController","_EngineDevServer","_dec","_dec2","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_dec10","_dec11","_dec12","_dec13","_dec14","_dec15","_dec16","_dec17","_dec18","_dec19","_dec20","_dec21","_dec22","_dec23","_dec24","_dec25","_dec26","_dec27","_dec28","_dec29","_dec30","_dec31","_dec32","_dec33","_dec34","_dec35","_dec36","_dec37","_class","BuildServerLocalSourcesEngineController","exports","httpGet","httpReturn","StreamWithMime","httpUrlParam","httpType","String","Stream","SingletonController","constructor","engineDirectory","buildDebugOnly","devServers","Map","portCounter","getDevServerUpdateJson","updateName","getFileAsStream","getDevServerUpdateJs","getLocalEngineScript","getEngineSkbkonturScript","hash","getEngineSkbkonturMapScript","getEngineSkbkonturMinScript","getEngineSkbkonturMinMapScript","getEngineVendorScript","getEngineVendorMapScript","getEngineVendorMinScript","getEngineVendorMinMapScript","getWebpackRuntimeScript","getWebpackRuntimeMapScript","getWebpackRuntimeMinScript","getWebpackRuntimeMinMapScript","getEngineLoaderScript","getEngineLoaderMinScript","getLocalEngineChunk","chunkname","getLocalEngineStyles","getLocalEngineScriptMinified","getLocalEngineChunkMinified","getLocalEngineStylesMinified","getLocalEngineScriptSourceMap","getLocalEngineChunkSourceMap","getLocalEngineStylesSourceMap","getLocalEngineScriptMinifiedSourceMap","getLocalEngineStylesMinifiedSourceMap","getThemedLocalEngineScript","getThemedLocalEngineStyles","theme","getThemedLocalEngineScriptMinified","getThemedLocalEngineStylesMinified","getThemedLocalEngineScriptSourceMap","getThemedLocalEngineStylesSourceMap","getThemedLocalEngineScriptMinifiedSourceMap","getThemedLocalEngineStylesMinifiedSourceMap","getFormFont","fileName","stream","StreamResult","mime","lookup","NotFoundWebError","getFormImages","name","getOrCreateDevServer","devServer","get","undefined","EngineDevServer","set","start","_applyDecoratedDescriptor2","default","prototype","Object","getOwnPropertyDescriptor"],"sources":["../../../../../../src/CLICommands/BuildServer/ResourcesControllers/BuildServerLocalSourcesEngineController.ts"],"sourcesContent":["import mime from \"mime-types\";\n\nimport { httpGet } from \"../../../Commons/HttpServer/AttributeRouting/Methods\";\nimport { NotFoundWebError } from \"../../../Commons/HttpServer/AttributeRouting/NotFoundWebError\";\nimport { httpType, httpUrlParam } from \"../../../Commons/HttpServer/AttributeRouting/Params\";\nimport { httpReturn } from \"../../../Commons/HttpServer/AttributeRouting/Results\";\nimport {\n StreamResult,\n StreamReturnResult,\n} from \"../../../Commons/HttpServer/AttributeRouting/Results/StreamResultHandler\";\nimport { SingletonController } from \"../../../Commons/HttpServer/ExpressWrapper/SingletonController\";\n\nimport { EngineDevServer } from \"./DevServers/EngineDevServer\";\n\nexport class BuildServerLocalSourcesEngineController extends SingletonController {\n private readonly engineDirectory: string;\n private readonly devServers: Map<string, EngineDevServer> = new Map<string, EngineDevServer>();\n private portCounter = 14001;\n private readonly buildDebugOnly: boolean;\n\n public constructor(engineDirectory: string, buildDebugOnly: boolean) {\n super();\n this.engineDirectory = engineDirectory;\n this.buildDebugOnly = buildDebugOnly;\n }\n\n @httpGet(\n \"/:update.hot-update.json\",\n httpReturn.StreamWithMime(\"application/json\"),\n httpUrlParam(\"update\", httpType.String)\n )\n public async getDevServerUpdateJson(updateName: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`${updateName}.hot-update.json`);\n }\n\n @httpGet(\n \"/:update.hot-update.js\",\n httpReturn.StreamWithMime(\"application/json\"),\n httpUrlParam(\"update\", httpType.String)\n )\n public async getDevServerUpdateJs(updateName: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`${updateName}.hot-update.js`);\n }\n\n @httpGet(\"/public/scripts/candy_local.js\", httpReturn.StreamWithMime(\"application/javascript\"))\n public async getLocalEngineScript(): Promise<StreamReturnResult> {\n return this.getFileAsStream(\"public/scripts/candy_local.js\");\n }\n\n @httpGet(\n \"/public/scripts/:hash.skbkontur.js\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"hash\", httpType.String)\n )\n public async getEngineSkbkonturScript(hash: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${hash}.skbkontur.js`);\n }\n\n @httpGet(\n \"/public/scripts/:hash.skbkontur.js.map\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"hash\", httpType.String)\n )\n public async getEngineSkbkonturMapScript(hash: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${hash}.skbkontur.js.map`);\n }\n\n @httpGet(\n \"/public/scripts/:hash.skbkontur.min.js\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"hash\", httpType.String)\n )\n public async getEngineSkbkonturMinScript(hash: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${hash}.skbkontur.min.js`);\n }\n\n @httpGet(\n \"/public/scripts/:hash.skbkontur.min.js.map\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"hash\", httpType.String)\n )\n public async getEngineSkbkonturMinMapScript(hash: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${hash}.skbkontur.min.js.map`);\n }\n\n @httpGet(\n \"/public/scripts/:hash.vendor.js\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"hash\", httpType.String)\n )\n public async getEngineVendorScript(hash: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${hash}.vendor.js`);\n }\n\n @httpGet(\n \"/public/scripts/:hash.vendor.js.map\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"hash\", httpType.String)\n )\n public async getEngineVendorMapScript(hash: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${hash}.vendor.js.map`);\n }\n\n @httpGet(\n \"/public/scripts/:hash.vendor.min.js\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"hash\", httpType.String)\n )\n public async getEngineVendorMinScript(hash: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${hash}.vendor.min.js`);\n }\n\n @httpGet(\n \"/public/scripts/:hash.vendor.min.js.map\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"hash\", httpType.String)\n )\n public async getEngineVendorMinMapScript(hash: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${hash}.vendor.min.js.map`);\n }\n\n @httpGet(\n \"/public/scripts/:hash.runtime.js\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"hash\", httpType.String)\n )\n public async getWebpackRuntimeScript(hash: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${hash}.runtime.js`);\n }\n\n @httpGet(\n \"/public/scripts/:hash.runtime.js.map\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"hash\", httpType.String)\n )\n public async getWebpackRuntimeMapScript(hash: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${hash}.runtime.js.map`);\n }\n\n @httpGet(\n \"/public/scripts/:hash.runtime.min.js\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"hash\", httpType.String)\n )\n public async getWebpackRuntimeMinScript(hash: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${hash}.runtime.min.js`);\n }\n\n @httpGet(\n \"/public/scripts/:hash.runtime.min.js.map\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"hash\", httpType.String)\n )\n public async getWebpackRuntimeMinMapScript(hash: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${hash}.runtime.min.js.map`);\n }\n\n @httpGet(\"/public/scripts/engineLoader_local.js\", httpReturn.StreamWithMime(\"application/javascript\"))\n public async getEngineLoaderScript(): Promise<StreamReturnResult> {\n return this.getFileAsStream(\"public/scripts/engineLoader_local.js\");\n }\n\n @httpGet(\"/public/scripts/engineLoader_local.min.js\", httpReturn.StreamWithMime(\"application/javascript\"))\n public async getEngineLoaderMinScript(): Promise<StreamReturnResult> {\n return this.getFileAsStream(\"public/scripts/engineLoader_local.min.js\");\n }\n\n @httpGet(\n \"/public/scripts/:chunkname.candy_local.js\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"chunkname\", httpType.String)\n )\n public async getLocalEngineChunk(chunkname: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${chunkname}.candy_local.js`);\n }\n\n @httpGet(\"/public/styles/candy_local.css\", httpReturn.StreamWithMime(\"text/css\"))\n public async getLocalEngineStyles(): Promise<StreamReturnResult> {\n return this.getFileAsStream(\"public/styles/candy_local.css\");\n }\n\n @httpGet(\"/public/scripts/candy_local.min.js\", httpReturn.StreamWithMime(\"application/javascript\"))\n public async getLocalEngineScriptMinified(): Promise<StreamReturnResult> {\n return this.getFileAsStream(\"public/scripts/candy_local.min.js\");\n }\n\n @httpGet(\n \"/public/scripts/:chunkname.candy_local.min.js\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"chunkname\", httpType.String)\n )\n public async getLocalEngineChunkMinified(chunkname: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${chunkname}.candy_local.min.js`);\n }\n\n @httpGet(\"/public/styles/candy_local.min.css\", httpReturn.StreamWithMime(\"text/css\"))\n public async getLocalEngineStylesMinified(): Promise<StreamReturnResult> {\n return this.getFileAsStream(\"public/styles/candy_local.min.css\");\n }\n\n @httpGet(\"/public/scripts/candy_local.js.map\", httpReturn.StreamWithMime(\"application/octet-stream\"))\n public async getLocalEngineScriptSourceMap(): Promise<StreamReturnResult> {\n return this.getFileAsStream(\"public/scripts/candy_local.js.map\");\n }\n\n @httpGet(\n \"/public/scripts/:chunkname.candy_local.js.map\",\n httpReturn.StreamWithMime(\"application/octet-stream\"),\n httpUrlParam(\"chunkname\", httpType.String)\n )\n public async getLocalEngineChunkSourceMap(chunkname: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/${chunkname}.candy_local.js.map`);\n }\n\n @httpGet(\"/public/styles/candy_local.css.map\", httpReturn.StreamWithMime(\"application/octet-stream\"))\n public async getLocalEngineStylesSourceMap(): Promise<StreamReturnResult> {\n return this.getFileAsStream(\"public/styles/candy_local.css.map\");\n }\n\n @httpGet(\"/public/scripts/candy_local.min.js.map\", httpReturn.StreamWithMime(\"application/octet-stream\"))\n public async getLocalEngineScriptMinifiedSourceMap(): Promise<StreamReturnResult> {\n return this.getFileAsStream(\"public/scripts/candy_local.min.js.map\");\n }\n\n @httpGet(\"/public/styles/candy_local.min.css.map\", httpReturn.StreamWithMime(\"application/octet-stream\"))\n public async getLocalEngineStylesMinifiedSourceMap(): Promise<StreamReturnResult> {\n return this.getFileAsStream(\"public/styles/candy_local.min.css.map\");\n }\n\n @httpGet(\n \"/public/scripts/candy_local.:theme.js\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"theme\", httpType.String)\n )\n public async getThemedLocalEngineScript(): Promise<StreamReturnResult> {\n return this.getFileAsStream(\"public/scripts/candy_local.js\");\n }\n\n @httpGet(\n \"/public/styles/candy_local.:theme.css\",\n httpReturn.StreamWithMime(\"text/css\"),\n httpUrlParam(\"theme\", httpType.String)\n )\n public async getThemedLocalEngineStyles(theme: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/styles/candy_local.${theme}.css`, theme);\n }\n\n @httpGet(\n \"/public/scripts/candy_local.:theme.min.js\",\n httpReturn.StreamWithMime(\"application/javascript\"),\n httpUrlParam(\"theme\", httpType.String)\n )\n public async getThemedLocalEngineScriptMinified(theme: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(\"public/scripts/candy_local.min.js\", theme);\n }\n\n @httpGet(\n \"/public/styles/candy_local.:theme.min.css\",\n httpReturn.StreamWithMime(\"text/css\"),\n httpUrlParam(\"theme\", httpType.String)\n )\n public async getThemedLocalEngineStylesMinified(theme: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/styles/candy_local.${theme}.min.css`, theme);\n }\n\n @httpGet(\n \"/public/scripts/candy_local.:theme.js.map\",\n httpReturn.StreamWithMime(\"application/octet-stream\"),\n httpUrlParam(\"theme\", httpType.String)\n )\n public async getThemedLocalEngineScriptSourceMap(theme: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(\"public/scripts/candy_local.js.map\", theme);\n }\n\n @httpGet(\n \"/public/styles/candy_local.:theme.css.map\",\n httpReturn.StreamWithMime(\"application/octet-stream\"),\n httpUrlParam(\"theme\", httpType.String)\n )\n public async getThemedLocalEngineStylesSourceMap(theme: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/styles/candy_local.${theme}.css.map`, theme);\n }\n\n @httpGet(\n \"/public/scripts/candy_local.:theme.min.js.map\",\n httpReturn.StreamWithMime(\"application/octet-stream\"),\n httpUrlParam(\"theme\", httpType.String)\n )\n public async getThemedLocalEngineScriptMinifiedSourceMap(theme: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/scripts/candy_local.${theme}.min.js.map`, theme);\n }\n\n @httpGet(\"/public/styles/candy_local.:theme.min.css.map\", httpReturn.StreamWithMime(\"application/octet-stream\"))\n public async getThemedLocalEngineStylesMinifiedSourceMap(theme: string): Promise<StreamReturnResult> {\n return this.getFileAsStream(`public/styles/candy_local.${theme}.min.css.map`, theme);\n }\n\n @httpGet(\"/public/fonts/:filename\", httpReturn.Stream, httpUrlParam(\"filename\", httpType.String))\n public async getFormFont(fileName: string): Promise<StreamReturnResult> {\n try {\n const stream = await this.getFileAsStream(`public/fonts/${fileName}`);\n return new StreamResult(stream, mime.lookup(fileName));\n } catch {\n throw new NotFoundWebError(\"File not found\", true);\n }\n }\n\n @httpGet(\"/public/images/:filename\", httpReturn.Stream, httpUrlParam(\"filename\", httpType.String))\n public async getFormImages(fileName: string): Promise<StreamReturnResult> {\n try {\n const stream = await this.getFileAsStream(`public/images/${fileName}`);\n return new StreamResult(stream, mime.lookup(fileName));\n } catch {\n throw new NotFoundWebError(\"File not found\", true);\n }\n }\n\n private async getFileAsStream(name: string, theme?: string): Promise<NodeJS.ReadableStream> {\n return (await this.getOrCreateDevServer(theme)).getFileAsStream(name);\n }\n\n private async getOrCreateDevServer(theme: undefined | string): Promise<EngineDevServer> {\n let devServer = this.devServers.get(theme ?? \"Default\");\n if (devServer == undefined) {\n devServer = new EngineDevServer(this.portCounter, this.engineDirectory, this.buildDebugOnly, theme);\n this.portCounter++;\n this.devServers.set(theme ?? \"Default\", devServer);\n await devServer.start();\n return devServer;\n }\n return devServer;\n }\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAL,OAAA;AAIA,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