@slicemachine/manager 0.25.6 → 0.25.7-alpha.jp-figma-to-prismic.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_node_modules/cross-spawn/lib/parse.cjs +2 -2
- package/dist/_node_modules/cross-spawn/lib/parse.cjs.map +1 -1
- package/dist/_node_modules/cross-spawn/lib/parse.js +2 -2
- package/dist/_node_modules/cross-spawn/lib/parse.js.map +1 -1
- package/dist/_node_modules/cross-spawn/lib/util/resolveCommand.cjs +2 -2
- package/dist/_node_modules/cross-spawn/lib/util/resolveCommand.cjs.map +1 -1
- package/dist/_node_modules/cross-spawn/lib/util/resolveCommand.js +2 -2
- package/dist/_node_modules/cross-spawn/lib/util/resolveCommand.js.map +1 -1
- package/dist/_node_modules/which/which.cjs +2 -2
- package/dist/_node_modules/which/which.cjs.map +1 -1
- package/dist/_node_modules/which/which.js +2 -2
- package/dist/_node_modules/which/which.js.map +1 -1
- package/dist/constants/API_ENDPOINTS.cjs +8 -4
- package/dist/constants/API_ENDPOINTS.cjs.map +1 -1
- package/dist/constants/API_ENDPOINTS.d.ts +1 -0
- package/dist/constants/API_ENDPOINTS.js +8 -4
- package/dist/constants/API_ENDPOINTS.js.map +1 -1
- package/dist/managers/customTypes/CustomTypesManager.cjs +273 -23
- package/dist/managers/customTypes/CustomTypesManager.cjs.map +1 -1
- package/dist/managers/customTypes/CustomTypesManager.d.ts +7 -2
- package/dist/managers/customTypes/CustomTypesManager.js +273 -23
- package/dist/managers/customTypes/CustomTypesManager.js.map +1 -1
- package/package.json +5 -3
- package/src/constants/API_ENDPOINTS.ts +8 -0
- package/src/managers/customTypes/CustomTypesManager.ts +322 -24
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const path$1 = require("path");
|
|
4
4
|
const resolveCommand$1 = require("./util/resolveCommand.cjs");
|
|
5
5
|
require("./util/escape.cjs");
|
|
6
6
|
const readShebang$1 = require("./util/readShebang.cjs");
|
|
7
7
|
const escape$1 = require("../../../_virtual/escape.cjs");
|
|
8
|
-
const path =
|
|
8
|
+
const path = path$1;
|
|
9
9
|
const resolveCommand = resolveCommand$1.resolveCommand_1;
|
|
10
10
|
const escape = escape$1.__exports;
|
|
11
11
|
const readShebang = readShebang$1.readShebang_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.cjs","sources":["../../../../../../node_modules/cross-spawn/lib/parse.js"],"sourcesContent":["'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n"],"names":["require$$1","require$$2","require$$3"],"mappings":";;;;;;;AAEA,MAAM,
|
|
1
|
+
{"version":3,"file":"parse.cjs","sources":["../../../../../../node_modules/cross-spawn/lib/parse.js"],"sourcesContent":["'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n"],"names":["require$$0","require$$1","require$$2","require$$3"],"mappings":";;;;;;;AAEA,MAAM,OAAOA;AACb,MAAM,iBAAiBC,iBAAAA;AACvB,MAAM,SAASC,SAAAA;AACf,MAAM,cAAcC,cAAAA;AAEpB,MAAM,QAAQ,QAAQ,aAAa;AACnC,MAAM,qBAAqB;AAC3B,MAAM,kBAAkB;AAExB,SAAS,cAA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AS,cAAc,MAAM;AACxD;AAEA,IAAA,UAAiB;;","x_google_ignoreList":[0]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import path$1 from "path";
|
|
2
2
|
import { r as resolveCommand_1 } from "./util/resolveCommand.js";
|
|
3
3
|
import "./util/escape.js";
|
|
4
4
|
import { r as readShebang_1 } from "./util/readShebang.js";
|
|
5
5
|
import { __exports as _escape } from "../../../_virtual/escape.js";
|
|
6
|
-
const path =
|
|
6
|
+
const path = path$1;
|
|
7
7
|
const resolveCommand = resolveCommand_1;
|
|
8
8
|
const escape = _escape;
|
|
9
9
|
const readShebang = readShebang_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.js","sources":["../../../../../../node_modules/cross-spawn/lib/parse.js"],"sourcesContent":["'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n"],"names":["require$$1","require$$2","require$$3"],"mappings":";;;;;AAEA,MAAM,
|
|
1
|
+
{"version":3,"file":"parse.js","sources":["../../../../../../node_modules/cross-spawn/lib/parse.js"],"sourcesContent":["'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n"],"names":["require$$0","require$$1","require$$2","require$$3"],"mappings":";;;;;AAEA,MAAM,OAAOA;AACb,MAAM,iBAAiBC;AACvB,MAAM,SAASC;AACf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AAA,IACA,MAAM;AAAA,IACN,UAAU;AAAA,MACN;AAAA,MACA;AAAA,IACZ;AAAA,EACA;AAGI,SAAO,QAAQ,QAAQ,SAAS,cAAc,MAAM;AACxD;AAEA,IAAA,UAAiB;","x_google_ignoreList":[0]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const path$1 = require("path");
|
|
4
4
|
const which$1 = require("../../../which/which.cjs");
|
|
5
5
|
const index = require("../../../path-key/index.cjs");
|
|
6
|
-
const path =
|
|
6
|
+
const path = path$1;
|
|
7
7
|
const which = which$1.which_1;
|
|
8
8
|
const getPathKey = index.pathKeyExports;
|
|
9
9
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveCommand.cjs","sources":["../../../../../../../node_modules/cross-spawn/lib/util/resolveCommand.js"],"sourcesContent":["'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n"],"names":["require$$1","require$$2"],"mappings":";;;;;AAEA,MAAM,
|
|
1
|
+
{"version":3,"file":"resolveCommand.cjs","sources":["../../../../../../../node_modules/cross-spawn/lib/util/resolveCommand.js"],"sourcesContent":["'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n"],"names":["require$$0","require$$1","require$$2"],"mappings":";;;;;AAEA,MAAM,OAAOA;AACb,MAAM,QAAQC,QAAAA;AACd,MAAM,aAAaC,MAAAA;AAEnB,SAAS,sBAAsB,QAAQ,gBAAgB;AACnD,QAAM,MAAM,OAAO,QAAQ,OAAO,QAAQ;AAC1C,QAAM,MAAM,QAAQ,IAAG;AACvB,QAAM,eAAe,OAAO,QAAQ,OAAO;AAE3C,QAAM,kBAAkB,gBAAgB,QAAQ,UAAU,UAAa,CAAC,QAAQ,MAAM;AAItF,MAAI,iBAAiB;AACjB,QAAI;AACA,cAAQ,MAAM,OAAO,QAAQ,GAAG;AAAA,IAC5C,SAAiB,KAAK;AAAA,IAEtB;AAAA,EACA;AAEI,MAAI;AAEJ,MAAI;AACA,eAAW,MAAM,KAAK,OAAO,SAAS;AAAA,MAClC,MAAM,IAAI,WAAW,EAAE,IAAG,CAAE,CAAC;AAAA,MAC7B,SAAS,iBAAiB,KAAK,YAAY;AAAA,IACvD,CAAS;AAAA,EACT,SAAa,GAAG;AAAA,EAEhB,UAAK;AACG,QAAI,iBAAiB;AACjB,cAAQ,MAAM,GAAG;AAAA,IAC7B;AAAA,EACA;AAII,MAAI,UAAU;AACV,eAAW,KAAK,QAAQ,eAAe,OAAO,QAAQ,MAAM,IAAI,QAAQ;AAAA,EAChF;AAEI,SAAO;AACX;AAEA,SAAS,eAAe,QAAQ;AAC5B,SAAO,sBAAsB,MAAM,KAAK,sBAAsB,QAAQ,IAAI;AAC9E;AAEA,IAAA,mBAAiB;;","x_google_ignoreList":[0]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import path$1 from "path";
|
|
2
2
|
import { w as which_1 } from "../../../which/which.js";
|
|
3
3
|
import { p as pathKeyExports } from "../../../path-key/index.js";
|
|
4
|
-
const path =
|
|
4
|
+
const path = path$1;
|
|
5
5
|
const which = which_1;
|
|
6
6
|
const getPathKey = pathKeyExports;
|
|
7
7
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveCommand.js","sources":["../../../../../../../node_modules/cross-spawn/lib/util/resolveCommand.js"],"sourcesContent":["'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n"],"names":["require$$1","require$$2"],"mappings":";;;AAEA,MAAM,
|
|
1
|
+
{"version":3,"file":"resolveCommand.js","sources":["../../../../../../../node_modules/cross-spawn/lib/util/resolveCommand.js"],"sourcesContent":["'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n"],"names":["require$$0","require$$1","require$$2"],"mappings":";;;AAEA,MAAM,OAAOA;AACb,MAAM,QAAQC;AACd,MAAM,aAAaC;AAEnB,SAAS,sBAAsB,QAAQ,gBAAgB;AACnD,QAAM,MAAM,OAAO,QAAQ,OAAO,QAAQ;AAC1C,QAAM,MAAM,QAAQ,IAAG;AACvB,QAAM,eAAe,OAAO,QAAQ,OAAO;AAE3C,QAAM,kBAAkB,gBAAgB,QAAQ,UAAU,UAAa,CAAC,QAAQ,MAAM;AAItF,MAAI,iBAAiB;AACjB,QAAI;AACA,cAAQ,MAAM,OAAO,QAAQ,GAAG;AAAA,IAC5C,SAAiB,KAAK;AAAA,IAEtB;AAAA,EACA;AAEI,MAAI;AAEJ,MAAI;AACA,eAAW,MAAM,KAAK,OAAO,SAAS;AAAA,MAClC,MAAM,IAAI,WAAW,EAAE,IAAG,CAAE,CAAC;AAAA,MAC7B,SAAS,iBAAiB,KAAK,YAAY;AAAA,IACvD,CAAS;AAAA,EACT,SAAa,GAAG;AAAA,EAEhB,UAAK;AACG,QAAI,iBAAiB;AACjB,cAAQ,MAAM,GAAG;AAAA,IAC7B;AAAA,EACA;AAII,MAAI,UAAU;AACV,eAAW,KAAK,QAAQ,eAAe,OAAO,QAAQ,MAAM,IAAI,QAAQ;AAAA,EAChF;AAEI,SAAO;AACX;AAEA,SAAS,eAAe,QAAQ;AAC5B,SAAO,sBAAsB,MAAM,KAAK,sBAAsB,QAAQ,IAAI;AAC9E;AAEA,IAAA,mBAAiB;","x_google_ignoreList":[0]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const path$1 = require("path");
|
|
4
4
|
const index = require("../isexe/index.cjs");
|
|
5
5
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
6
|
-
const path =
|
|
6
|
+
const path = path$1;
|
|
7
7
|
const COLON = isWindows ? ";" : ":";
|
|
8
8
|
const isexe = index.isexe_1;
|
|
9
9
|
const getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"which.cjs","sources":["../../../../../node_modules/which/which.js"],"sourcesContent":["const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n"],"names":["require$$1"],"mappings":";;;;AAAA,MAAM,YAAY,QAAQ,aAAa,WACnC,QAAQ,IAAI,WAAW,YACvB,QAAQ,IAAI,WAAW;AAE3B,MAAM,
|
|
1
|
+
{"version":3,"file":"which.cjs","sources":["../../../../../node_modules/which/which.js"],"sourcesContent":["const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n"],"names":["require$$0","require$$1"],"mappings":";;;;AAAA,MAAM,YAAY,QAAQ,aAAa,WACnC,QAAQ,IAAI,WAAW,YACvB,QAAQ,IAAI,WAAW;AAE3B,MAAM,OAAOA;AACb,MAAM,QAAQ,YAAY,MAAM;AAChC,MAAM,QAAQC,MAAAA;AAEd,MAAM,mBAAmB,CAAC,QACxB,OAAO,OAAO,IAAI,MAAM,cAAc,GAAG,EAAE,G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MAAM,KAAK,KAAK,EAAE,SAAS,WAAU,CAAE;AAClD,YAAI,IAAI;AACN,cAAI,IAAI;AACN,kBAAM,KAAK,GAAG;AAAA;AAEd,mBAAO;AAAA,QACnB;AAAA,MACA,SAAe,IAAI;AAAA,MAAA;AAAA,IACnB;AAAA,EACA;AAEE,MAAI,IAAI,OAAO,MAAM;AACnB,WAAO;AAET,MAAI,IAAI;AACN,WAAO;AAET,QAAM,iBAAiB,GAAG;AAC5B;AAEA,IAAA,UAAiB;AACjB,MAAM,OAAO;;","x_google_ignoreList":[0]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import path$1 from "path";
|
|
2
2
|
import { i as isexe_1 } from "../isexe/index.js";
|
|
3
3
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
4
|
-
const path =
|
|
4
|
+
const path = path$1;
|
|
5
5
|
const COLON = isWindows ? ";" : ":";
|
|
6
6
|
const isexe = isexe_1;
|
|
7
7
|
const getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"which.js","sources":["../../../../../node_modules/which/which.js"],"sourcesContent":["const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n"],"names":["require$$1"],"mappings":";;AAAA,MAAM,YAAY,QAAQ,aAAa,WACnC,QAAQ,IAAI,WAAW,YACvB,QAAQ,IAAI,WAAW;AAE3B,MAAM,
|
|
1
|
+
{"version":3,"file":"which.js","sources":["../../../../../node_modules/which/which.js"],"sourcesContent":["const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n"],"names":["require$$0","require$$1"],"mappings":";;AAAA,MAAM,YAAY,QAAQ,aAAa,WACnC,QAAQ,IAAI,WAAW,YACvB,QAAQ,IAAI,WA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MAAM,GAAG,CAAC,IAAI,OAC7D;AAEJ,aAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAM;AACxC,YAAM,MAAM,IAAI,QAAQ,CAAC;AACzB,UAAI;AACF,cAAM,KAAK,MAAM,KAAK,KAAK,EAAE,SAAS,WAAU,CAAE;AAClD,YAAI,IAAI;AACN,cAAI,IAAI;AACN,kBAAM,KAAK,GAAG;AAAA;AAEd,mBAAO;AAAA,QACnB;AAAA,MACA,SAAe,IAAI;AAAA,MAAA;AAAA,IACnB;AAAA,EACA;AAEE,MAAI,IAAI,OAAO,MAAM;AACnB,WAAO;AAET,MAAI,IAAI;AACN,WAAO;AAET,QAAM,iBAAiB,GAAG;AAC5B;AAEA,IAAA,UAAiB;AACjB,MAAM,OAAO;","x_google_ignoreList":[0]}
|
|
@@ -16,7 +16,8 @@ const API_ENDPOINTS = (() => {
|
|
|
16
16
|
SliceMachineV1: trailingSlash.addTrailingSlash(process.env.slice_machine_v1_endpoint ?? "https://sm-api.wroom.io/v1/"),
|
|
17
17
|
RepositoryService: trailingSlash.addTrailingSlash(process.env.repository_api ?? "https://api.internal.wroom.io/repository/"),
|
|
18
18
|
LocaleService: trailingSlash.addTrailingSlash(process.env.locale_api ?? "https://api.internal.wroom.io/locale/"),
|
|
19
|
-
CustomTypeService: trailingSlash.addTrailingSlash(process.env.custom_type_api ?? "https://api.internal.wroom.io/custom-type/")
|
|
19
|
+
CustomTypeService: trailingSlash.addTrailingSlash(process.env.custom_type_api ?? "https://api.internal.wroom.io/custom-type/"),
|
|
20
|
+
LlmProxyTypeService: trailingSlash.addTrailingSlash(process.env.llm_proxy_api ?? "https://api.internal.wroom.io/llm-proxy/")
|
|
20
21
|
};
|
|
21
22
|
const missingAPIEndpoints = Object.keys(apiEndpoints).filter((key) => {
|
|
22
23
|
return !apiEndpoints[key];
|
|
@@ -51,7 +52,8 @@ If you didn't intend to run Slice Machine this way, stop it immediately and unse
|
|
|
51
52
|
SliceMachineV1: "https://sm-api.wroom.io/v1/",
|
|
52
53
|
RepositoryService: "https://api.internal.wroom.io/repository/",
|
|
53
54
|
LocaleService: "https://api.internal.wroom.io/locale/",
|
|
54
|
-
CustomTypeService: "https://api.internal.wroom.io/custom-type/"
|
|
55
|
+
CustomTypeService: "https://api.internal.wroom.io/custom-type/",
|
|
56
|
+
LlmProxyTypeService: "https://api.internal.wroom.io/llm-proxy/"
|
|
55
57
|
};
|
|
56
58
|
}
|
|
57
59
|
case APPLICATION_MODE.APPLICATION_MODE.DevTools:
|
|
@@ -68,7 +70,8 @@ If you didn't intend to run Slice Machine this way, stop it immediately and unse
|
|
|
68
70
|
SliceMachineV1: `https://sm-api.${process.env.SM_ENV}-wroom.com/v1/`,
|
|
69
71
|
RepositoryService: `https://api.internal.${process.env.SM_ENV}-wroom.com/repository/`,
|
|
70
72
|
LocaleService: `https://api.internal.${process.env.SM_ENV}-wroom.com/locale/`,
|
|
71
|
-
CustomTypeService: `https://api.internal.${process.env.SM_ENV}-wroom.com/custom-type
|
|
73
|
+
CustomTypeService: `https://api.internal.${process.env.SM_ENV}-wroom.com/custom-type/`,
|
|
74
|
+
LlmProxyTypeService: `https://api.internal.${process.env.SM_ENV}-wroom.com/llm-proxy/`
|
|
72
75
|
};
|
|
73
76
|
}
|
|
74
77
|
case APPLICATION_MODE.APPLICATION_MODE.Production:
|
|
@@ -84,7 +87,8 @@ If you didn't intend to run Slice Machine this way, stop it immediately and unse
|
|
|
84
87
|
SliceMachineV1: "https://sm-api.prismic.io/v1/",
|
|
85
88
|
RepositoryService: "https://api.internal.prismic.io/repository/",
|
|
86
89
|
LocaleService: "https://api.internal.prismic.io/locale/",
|
|
87
|
-
CustomTypeService: "https://api.internal.prismic.io/custom-type/"
|
|
90
|
+
CustomTypeService: "https://api.internal.prismic.io/custom-type/",
|
|
91
|
+
LlmProxyTypeService: "https://api.internal.prismic.io/llm-proxy/"
|
|
88
92
|
};
|
|
89
93
|
}
|
|
90
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"API_ENDPOINTS.cjs","sources":["../../../src/constants/API_ENDPOINTS.ts"],"sourcesContent":["import { addTrailingSlash, removeTrailingSlash } from \"../lib/trailingSlash\";\nimport { APPLICATION_MODE } from \"./APPLICATION_MODE\";\n\nexport type APIEndpoints = {\n\tPrismicWroom: string;\n\tPrismicAuthentication: string;\n\tPrismicModels: string;\n\tPrismicUser: string;\n\tAwsAclProvider: string;\n\tPrismicEmbed: string;\n\tPrismicUnsplash: string;\n\tSliceMachineV1: string;\n\tRepositoryService: string;\n\tLocaleService: string;\n\tCustomTypeService: string;\n};\n\nexport const API_ENDPOINTS: APIEndpoints = (() => {\n\tswitch (process.env.SM_ENV) {\n\t\tcase APPLICATION_MODE.Development: {\n\t\t\tconst apiEndpoints = {\n\t\t\t\tPrismicWroom: addTrailingSlash(process.env.wroom_endpoint),\n\t\t\t\tPrismicAuthentication: addTrailingSlash(\n\t\t\t\t\tprocess.env.authentication_server_endpoint,\n\t\t\t\t),\n\t\t\t\tPrismicModels: addTrailingSlash(process.env.customtypesapi_endpoint),\n\t\t\t\tPrismicUser: addTrailingSlash(process.env.user_service_endpoint),\n\t\t\t\tAwsAclProvider: addTrailingSlash(process.env.acl_provider_endpoint),\n\t\t\t\tPrismicEmbed: removeTrailingSlash(\n\t\t\t\t\tprocess.env.oembed_endpoint ?? \"https://oembed.wroom.io\",\n\t\t\t\t),\n\t\t\t\tPrismicUnsplash: addTrailingSlash(\n\t\t\t\t\tprocess.env.unsplash_endpoint ?? \"https://unsplash.wroom.io/\",\n\t\t\t\t),\n\t\t\t\tSliceMachineV1: addTrailingSlash(\n\t\t\t\t\tprocess.env.slice_machine_v1_endpoint ??\n\t\t\t\t\t\t\"https://sm-api.wroom.io/v1/\",\n\t\t\t\t),\n\t\t\t\tRepositoryService: addTrailingSlash(\n\t\t\t\t\tprocess.env.repository_api ??\n\t\t\t\t\t\t\"https://api.internal.wroom.io/repository/\",\n\t\t\t\t),\n\t\t\t\tLocaleService: addTrailingSlash(\n\t\t\t\t\tprocess.env.locale_api ?? \"https://api.internal.wroom.io/locale/\",\n\t\t\t\t),\n\t\t\t\tCustomTypeService: addTrailingSlash(\n\t\t\t\t\tprocess.env.custom_type_api ??\n\t\t\t\t\t\t\"https://api.internal.wroom.io/custom-type/\",\n\t\t\t\t),\n\t\t\t};\n\n\t\t\tconst missingAPIEndpoints = Object.keys(apiEndpoints).filter((key) => {\n\t\t\t\treturn !apiEndpoints[key as keyof typeof apiEndpoints];\n\t\t\t});\n\n\t\t\tif (missingAPIEndpoints.length > 0) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t\t\t}) where API endpoints are configured via environment variables.\n\nThe following endpoints were not configured: ${missingAPIEndpoints.join(\", \")}.\n\nConfigure them before continuing.`,\n\t\t\t\t);\n\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\n\t\t\tconsole.warn(`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t}).\n\nThe following API endpoints were configured via environment variables:\n${Object.entries(apiEndpoints)\n\t.map(([name, endpoint]) => ` - ${name}: ${endpoint}`)\n\t.join(\"\\n\")}\n\nThese endpoints are different than Slice Machine's normal endpoints and are not trusted.\n\nIf you didn't intend to run Slice Machine this way, stop it immediately and unset the SM_ENV environment variable.`);\n\n\t\t\treturn apiEndpoints as APIEndpoints;\n\t\t}\n\n\t\tcase APPLICATION_MODE.Staging: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://wroom.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.wroom.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.wroom.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.wroom.io/\",\n\t\t\t\tAwsAclProvider: \"https://acl-provider.wroom.io/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.wroom.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.wroom.io/\",\n\t\t\t\tSliceMachineV1: \"https://sm-api.wroom.io/v1/\",\n\t\t\t\tRepositoryService: \"https://api.internal.wroom.io/repository/\",\n\t\t\t\tLocaleService: \"https://api.internal.wroom.io/locale/\",\n\t\t\t\tCustomTypeService: \"https://api.internal.wroom.io/custom-type/\",\n\t\t\t};\n\t\t}\n\n\t\tcase APPLICATION_MODE.DevTools:\n\t\tcase APPLICATION_MODE.MarketingTools:\n\t\tcase APPLICATION_MODE.Platform: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: `https://${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicAuthentication: `https://auth.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicModels: `https://customtypes.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicUser: `https://user-service.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tAwsAclProvider: `https://acl-provider.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicEmbed: `https://oembed.${process.env.SM_ENV}-wroom.com`,\n\t\t\t\tPrismicUnsplash: `https://unsplash.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tSliceMachineV1: `https://sm-api.${process.env.SM_ENV}-wroom.com/v1/`,\n\t\t\t\tRepositoryService: `https://api.internal.${process.env.SM_ENV}-wroom.com/repository/`,\n\t\t\t\tLocaleService: `https://api.internal.${process.env.SM_ENV}-wroom.com/locale/`,\n\t\t\t\tCustomTypeService: `https://api.internal.${process.env.SM_ENV}-wroom.com/custom-type/`,\n\t\t\t};\n\t\t}\n\n\t\tcase APPLICATION_MODE.Production:\n\t\tdefault: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://prismic.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.prismic.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.prismic.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.prismic.io/\",\n\t\t\t\tAwsAclProvider: \"https://acl-provider.prismic.io/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.prismic.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.prismic.io/\",\n\t\t\t\tSliceMachineV1: \"https://sm-api.prismic.io/v1/\",\n\t\t\t\tRepositoryService: \"https://api.internal.prismic.io/repository/\",\n\t\t\t\tLocaleService: \"https://api.internal.prismic.io/locale/\",\n\t\t\t\tCustomTypeService: \"https://api.internal.prismic.io/custom-type/\",\n\t\t\t};\n\t\t}\n\t}\n})();\n"],"names":["APPLICATION_MODE","addTrailingSlash","removeTrailingSlash"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"API_ENDPOINTS.cjs","sources":["../../../src/constants/API_ENDPOINTS.ts"],"sourcesContent":["import { addTrailingSlash, removeTrailingSlash } from \"../lib/trailingSlash\";\nimport { APPLICATION_MODE } from \"./APPLICATION_MODE\";\n\nexport type APIEndpoints = {\n\tPrismicWroom: string;\n\tPrismicAuthentication: string;\n\tPrismicModels: string;\n\tPrismicUser: string;\n\tAwsAclProvider: string;\n\tPrismicEmbed: string;\n\tPrismicUnsplash: string;\n\tSliceMachineV1: string;\n\tRepositoryService: string;\n\tLocaleService: string;\n\tCustomTypeService: string;\n\tLlmProxyTypeService: string;\n};\n\nexport const API_ENDPOINTS: APIEndpoints = (() => {\n\tswitch (process.env.SM_ENV) {\n\t\tcase APPLICATION_MODE.Development: {\n\t\t\tconst apiEndpoints = {\n\t\t\t\tPrismicWroom: addTrailingSlash(process.env.wroom_endpoint),\n\t\t\t\tPrismicAuthentication: addTrailingSlash(\n\t\t\t\t\tprocess.env.authentication_server_endpoint,\n\t\t\t\t),\n\t\t\t\tPrismicModels: addTrailingSlash(process.env.customtypesapi_endpoint),\n\t\t\t\tPrismicUser: addTrailingSlash(process.env.user_service_endpoint),\n\t\t\t\tAwsAclProvider: addTrailingSlash(process.env.acl_provider_endpoint),\n\t\t\t\tPrismicEmbed: removeTrailingSlash(\n\t\t\t\t\tprocess.env.oembed_endpoint ?? \"https://oembed.wroom.io\",\n\t\t\t\t),\n\t\t\t\tPrismicUnsplash: addTrailingSlash(\n\t\t\t\t\tprocess.env.unsplash_endpoint ?? \"https://unsplash.wroom.io/\",\n\t\t\t\t),\n\t\t\t\tSliceMachineV1: addTrailingSlash(\n\t\t\t\t\tprocess.env.slice_machine_v1_endpoint ??\n\t\t\t\t\t\t\"https://sm-api.wroom.io/v1/\",\n\t\t\t\t),\n\t\t\t\tRepositoryService: addTrailingSlash(\n\t\t\t\t\tprocess.env.repository_api ??\n\t\t\t\t\t\t\"https://api.internal.wroom.io/repository/\",\n\t\t\t\t),\n\t\t\t\tLocaleService: addTrailingSlash(\n\t\t\t\t\tprocess.env.locale_api ?? \"https://api.internal.wroom.io/locale/\",\n\t\t\t\t),\n\t\t\t\tCustomTypeService: addTrailingSlash(\n\t\t\t\t\tprocess.env.custom_type_api ??\n\t\t\t\t\t\t\"https://api.internal.wroom.io/custom-type/\",\n\t\t\t\t),\n\t\t\t\tLlmProxyTypeService: addTrailingSlash(\n\t\t\t\t\tprocess.env.llm_proxy_api ??\n\t\t\t\t\t\t\"https://api.internal.wroom.io/llm-proxy/\",\n\t\t\t\t),\n\t\t\t};\n\n\t\t\tconst missingAPIEndpoints = Object.keys(apiEndpoints).filter((key) => {\n\t\t\t\treturn !apiEndpoints[key as keyof typeof apiEndpoints];\n\t\t\t});\n\n\t\t\tif (missingAPIEndpoints.length > 0) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t\t\t}) where API endpoints are configured via environment variables.\n\nThe following endpoints were not configured: ${missingAPIEndpoints.join(\", \")}.\n\nConfigure them before continuing.`,\n\t\t\t\t);\n\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\n\t\t\tconsole.warn(`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t}).\n\nThe following API endpoints were configured via environment variables:\n${Object.entries(apiEndpoints)\n\t.map(([name, endpoint]) => ` - ${name}: ${endpoint}`)\n\t.join(\"\\n\")}\n\nThese endpoints are different than Slice Machine's normal endpoints and are not trusted.\n\nIf you didn't intend to run Slice Machine this way, stop it immediately and unset the SM_ENV environment variable.`);\n\n\t\t\treturn apiEndpoints as APIEndpoints;\n\t\t}\n\n\t\tcase APPLICATION_MODE.Staging: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://wroom.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.wroom.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.wroom.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.wroom.io/\",\n\t\t\t\tAwsAclProvider: \"https://acl-provider.wroom.io/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.wroom.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.wroom.io/\",\n\t\t\t\tSliceMachineV1: \"https://sm-api.wroom.io/v1/\",\n\t\t\t\tRepositoryService: \"https://api.internal.wroom.io/repository/\",\n\t\t\t\tLocaleService: \"https://api.internal.wroom.io/locale/\",\n\t\t\t\tCustomTypeService: \"https://api.internal.wroom.io/custom-type/\",\n\t\t\t\tLlmProxyTypeService: \"https://api.internal.wroom.io/llm-proxy/\",\n\t\t\t};\n\t\t}\n\n\t\tcase APPLICATION_MODE.DevTools:\n\t\tcase APPLICATION_MODE.MarketingTools:\n\t\tcase APPLICATION_MODE.Platform: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: `https://${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicAuthentication: `https://auth.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicModels: `https://customtypes.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicUser: `https://user-service.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tAwsAclProvider: `https://acl-provider.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicEmbed: `https://oembed.${process.env.SM_ENV}-wroom.com`,\n\t\t\t\tPrismicUnsplash: `https://unsplash.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tSliceMachineV1: `https://sm-api.${process.env.SM_ENV}-wroom.com/v1/`,\n\t\t\t\tRepositoryService: `https://api.internal.${process.env.SM_ENV}-wroom.com/repository/`,\n\t\t\t\tLocaleService: `https://api.internal.${process.env.SM_ENV}-wroom.com/locale/`,\n\t\t\t\tCustomTypeService: `https://api.internal.${process.env.SM_ENV}-wroom.com/custom-type/`,\n\t\t\t\tLlmProxyTypeService: `https://api.internal.${process.env.SM_ENV}-wroom.com/llm-proxy/`,\n\t\t\t};\n\t\t}\n\n\t\tcase APPLICATION_MODE.Production:\n\t\tdefault: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://prismic.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.prismic.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.prismic.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.prismic.io/\",\n\t\t\t\tAwsAclProvider: \"https://acl-provider.prismic.io/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.prismic.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.prismic.io/\",\n\t\t\t\tSliceMachineV1: \"https://sm-api.prismic.io/v1/\",\n\t\t\t\tRepositoryService: \"https://api.internal.prismic.io/repository/\",\n\t\t\t\tLocaleService: \"https://api.internal.prismic.io/locale/\",\n\t\t\t\tCustomTypeService: \"https://api.internal.prismic.io/custom-type/\",\n\t\t\t\tLlmProxyTypeService: \"https://api.internal.prismic.io/llm-proxy/\",\n\t\t\t};\n\t\t}\n\t}\n})();\n"],"names":["APPLICATION_MODE","addTrailingSlash","removeTrailingSlash"],"mappings":";;;;AAkBO,MAAM,iBAA+B,MAAK;AAChD,UAAQ,QAAQ,IAAI,QAAA;AAAA,IACnB,KAAKA,iBAAAA,iBAAiB,aAAa;AAClC,YAAM,eAAe;AAAA,QACpB,cAAcC,cAAAA,iBAAiB,QAAQ,IA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AAiB;AAAA,QACjB,gBAAgB;AAAA,QAChB,mBAAmB;AAAA,QACnB,eAAe;AAAA,QACf,mBAAmB;AAAA,QACnB,qBAAqB;AAAA,MAAA;AAAA,IAEvB;AAAA,EAAA;AAEF,GAAA;;"}
|
|
@@ -14,7 +14,8 @@ const API_ENDPOINTS = (() => {
|
|
|
14
14
|
SliceMachineV1: addTrailingSlash(process.env.slice_machine_v1_endpoint ?? "https://sm-api.wroom.io/v1/"),
|
|
15
15
|
RepositoryService: addTrailingSlash(process.env.repository_api ?? "https://api.internal.wroom.io/repository/"),
|
|
16
16
|
LocaleService: addTrailingSlash(process.env.locale_api ?? "https://api.internal.wroom.io/locale/"),
|
|
17
|
-
CustomTypeService: addTrailingSlash(process.env.custom_type_api ?? "https://api.internal.wroom.io/custom-type/")
|
|
17
|
+
CustomTypeService: addTrailingSlash(process.env.custom_type_api ?? "https://api.internal.wroom.io/custom-type/"),
|
|
18
|
+
LlmProxyTypeService: addTrailingSlash(process.env.llm_proxy_api ?? "https://api.internal.wroom.io/llm-proxy/")
|
|
18
19
|
};
|
|
19
20
|
const missingAPIEndpoints = Object.keys(apiEndpoints).filter((key) => {
|
|
20
21
|
return !apiEndpoints[key];
|
|
@@ -49,7 +50,8 @@ If you didn't intend to run Slice Machine this way, stop it immediately and unse
|
|
|
49
50
|
SliceMachineV1: "https://sm-api.wroom.io/v1/",
|
|
50
51
|
RepositoryService: "https://api.internal.wroom.io/repository/",
|
|
51
52
|
LocaleService: "https://api.internal.wroom.io/locale/",
|
|
52
|
-
CustomTypeService: "https://api.internal.wroom.io/custom-type/"
|
|
53
|
+
CustomTypeService: "https://api.internal.wroom.io/custom-type/",
|
|
54
|
+
LlmProxyTypeService: "https://api.internal.wroom.io/llm-proxy/"
|
|
53
55
|
};
|
|
54
56
|
}
|
|
55
57
|
case APPLICATION_MODE.DevTools:
|
|
@@ -66,7 +68,8 @@ If you didn't intend to run Slice Machine this way, stop it immediately and unse
|
|
|
66
68
|
SliceMachineV1: `https://sm-api.${process.env.SM_ENV}-wroom.com/v1/`,
|
|
67
69
|
RepositoryService: `https://api.internal.${process.env.SM_ENV}-wroom.com/repository/`,
|
|
68
70
|
LocaleService: `https://api.internal.${process.env.SM_ENV}-wroom.com/locale/`,
|
|
69
|
-
CustomTypeService: `https://api.internal.${process.env.SM_ENV}-wroom.com/custom-type
|
|
71
|
+
CustomTypeService: `https://api.internal.${process.env.SM_ENV}-wroom.com/custom-type/`,
|
|
72
|
+
LlmProxyTypeService: `https://api.internal.${process.env.SM_ENV}-wroom.com/llm-proxy/`
|
|
70
73
|
};
|
|
71
74
|
}
|
|
72
75
|
case APPLICATION_MODE.Production:
|
|
@@ -82,7 +85,8 @@ If you didn't intend to run Slice Machine this way, stop it immediately and unse
|
|
|
82
85
|
SliceMachineV1: "https://sm-api.prismic.io/v1/",
|
|
83
86
|
RepositoryService: "https://api.internal.prismic.io/repository/",
|
|
84
87
|
LocaleService: "https://api.internal.prismic.io/locale/",
|
|
85
|
-
CustomTypeService: "https://api.internal.prismic.io/custom-type/"
|
|
88
|
+
CustomTypeService: "https://api.internal.prismic.io/custom-type/",
|
|
89
|
+
LlmProxyTypeService: "https://api.internal.prismic.io/llm-proxy/"
|
|
86
90
|
};
|
|
87
91
|
}
|
|
88
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"API_ENDPOINTS.js","sources":["../../../src/constants/API_ENDPOINTS.ts"],"sourcesContent":["import { addTrailingSlash, removeTrailingSlash } from \"../lib/trailingSlash\";\nimport { APPLICATION_MODE } from \"./APPLICATION_MODE\";\n\nexport type APIEndpoints = {\n\tPrismicWroom: string;\n\tPrismicAuthentication: string;\n\tPrismicModels: string;\n\tPrismicUser: string;\n\tAwsAclProvider: string;\n\tPrismicEmbed: string;\n\tPrismicUnsplash: string;\n\tSliceMachineV1: string;\n\tRepositoryService: string;\n\tLocaleService: string;\n\tCustomTypeService: string;\n};\n\nexport const API_ENDPOINTS: APIEndpoints = (() => {\n\tswitch (process.env.SM_ENV) {\n\t\tcase APPLICATION_MODE.Development: {\n\t\t\tconst apiEndpoints = {\n\t\t\t\tPrismicWroom: addTrailingSlash(process.env.wroom_endpoint),\n\t\t\t\tPrismicAuthentication: addTrailingSlash(\n\t\t\t\t\tprocess.env.authentication_server_endpoint,\n\t\t\t\t),\n\t\t\t\tPrismicModels: addTrailingSlash(process.env.customtypesapi_endpoint),\n\t\t\t\tPrismicUser: addTrailingSlash(process.env.user_service_endpoint),\n\t\t\t\tAwsAclProvider: addTrailingSlash(process.env.acl_provider_endpoint),\n\t\t\t\tPrismicEmbed: removeTrailingSlash(\n\t\t\t\t\tprocess.env.oembed_endpoint ?? \"https://oembed.wroom.io\",\n\t\t\t\t),\n\t\t\t\tPrismicUnsplash: addTrailingSlash(\n\t\t\t\t\tprocess.env.unsplash_endpoint ?? \"https://unsplash.wroom.io/\",\n\t\t\t\t),\n\t\t\t\tSliceMachineV1: addTrailingSlash(\n\t\t\t\t\tprocess.env.slice_machine_v1_endpoint ??\n\t\t\t\t\t\t\"https://sm-api.wroom.io/v1/\",\n\t\t\t\t),\n\t\t\t\tRepositoryService: addTrailingSlash(\n\t\t\t\t\tprocess.env.repository_api ??\n\t\t\t\t\t\t\"https://api.internal.wroom.io/repository/\",\n\t\t\t\t),\n\t\t\t\tLocaleService: addTrailingSlash(\n\t\t\t\t\tprocess.env.locale_api ?? \"https://api.internal.wroom.io/locale/\",\n\t\t\t\t),\n\t\t\t\tCustomTypeService: addTrailingSlash(\n\t\t\t\t\tprocess.env.custom_type_api ??\n\t\t\t\t\t\t\"https://api.internal.wroom.io/custom-type/\",\n\t\t\t\t),\n\t\t\t};\n\n\t\t\tconst missingAPIEndpoints = Object.keys(apiEndpoints).filter((key) => {\n\t\t\t\treturn !apiEndpoints[key as keyof typeof apiEndpoints];\n\t\t\t});\n\n\t\t\tif (missingAPIEndpoints.length > 0) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t\t\t}) where API endpoints are configured via environment variables.\n\nThe following endpoints were not configured: ${missingAPIEndpoints.join(\", \")}.\n\nConfigure them before continuing.`,\n\t\t\t\t);\n\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\n\t\t\tconsole.warn(`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t}).\n\nThe following API endpoints were configured via environment variables:\n${Object.entries(apiEndpoints)\n\t.map(([name, endpoint]) => ` - ${name}: ${endpoint}`)\n\t.join(\"\\n\")}\n\nThese endpoints are different than Slice Machine's normal endpoints and are not trusted.\n\nIf you didn't intend to run Slice Machine this way, stop it immediately and unset the SM_ENV environment variable.`);\n\n\t\t\treturn apiEndpoints as APIEndpoints;\n\t\t}\n\n\t\tcase APPLICATION_MODE.Staging: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://wroom.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.wroom.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.wroom.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.wroom.io/\",\n\t\t\t\tAwsAclProvider: \"https://acl-provider.wroom.io/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.wroom.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.wroom.io/\",\n\t\t\t\tSliceMachineV1: \"https://sm-api.wroom.io/v1/\",\n\t\t\t\tRepositoryService: \"https://api.internal.wroom.io/repository/\",\n\t\t\t\tLocaleService: \"https://api.internal.wroom.io/locale/\",\n\t\t\t\tCustomTypeService: \"https://api.internal.wroom.io/custom-type/\",\n\t\t\t};\n\t\t}\n\n\t\tcase APPLICATION_MODE.DevTools:\n\t\tcase APPLICATION_MODE.MarketingTools:\n\t\tcase APPLICATION_MODE.Platform: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: `https://${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicAuthentication: `https://auth.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicModels: `https://customtypes.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicUser: `https://user-service.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tAwsAclProvider: `https://acl-provider.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicEmbed: `https://oembed.${process.env.SM_ENV}-wroom.com`,\n\t\t\t\tPrismicUnsplash: `https://unsplash.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tSliceMachineV1: `https://sm-api.${process.env.SM_ENV}-wroom.com/v1/`,\n\t\t\t\tRepositoryService: `https://api.internal.${process.env.SM_ENV}-wroom.com/repository/`,\n\t\t\t\tLocaleService: `https://api.internal.${process.env.SM_ENV}-wroom.com/locale/`,\n\t\t\t\tCustomTypeService: `https://api.internal.${process.env.SM_ENV}-wroom.com/custom-type/`,\n\t\t\t};\n\t\t}\n\n\t\tcase APPLICATION_MODE.Production:\n\t\tdefault: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://prismic.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.prismic.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.prismic.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.prismic.io/\",\n\t\t\t\tAwsAclProvider: \"https://acl-provider.prismic.io/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.prismic.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.prismic.io/\",\n\t\t\t\tSliceMachineV1: \"https://sm-api.prismic.io/v1/\",\n\t\t\t\tRepositoryService: \"https://api.internal.prismic.io/repository/\",\n\t\t\t\tLocaleService: \"https://api.internal.prismic.io/locale/\",\n\t\t\t\tCustomTypeService: \"https://api.internal.prismic.io/custom-type/\",\n\t\t\t};\n\t\t}\n\t}\n})();\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"API_ENDPOINTS.js","sources":["../../../src/constants/API_ENDPOINTS.ts"],"sourcesContent":["import { addTrailingSlash, removeTrailingSlash } from \"../lib/trailingSlash\";\nimport { APPLICATION_MODE } from \"./APPLICATION_MODE\";\n\nexport type APIEndpoints = {\n\tPrismicWroom: string;\n\tPrismicAuthentication: string;\n\tPrismicModels: string;\n\tPrismicUser: string;\n\tAwsAclProvider: string;\n\tPrismicEmbed: string;\n\tPrismicUnsplash: string;\n\tSliceMachineV1: string;\n\tRepositoryService: string;\n\tLocaleService: string;\n\tCustomTypeService: string;\n\tLlmProxyTypeService: string;\n};\n\nexport const API_ENDPOINTS: APIEndpoints = (() => {\n\tswitch (process.env.SM_ENV) {\n\t\tcase APPLICATION_MODE.Development: {\n\t\t\tconst apiEndpoints = {\n\t\t\t\tPrismicWroom: addTrailingSlash(process.env.wroom_endpoint),\n\t\t\t\tPrismicAuthentication: addTrailingSlash(\n\t\t\t\t\tprocess.env.authentication_server_endpoint,\n\t\t\t\t),\n\t\t\t\tPrismicModels: addTrailingSlash(process.env.customtypesapi_endpoint),\n\t\t\t\tPrismicUser: addTrailingSlash(process.env.user_service_endpoint),\n\t\t\t\tAwsAclProvider: addTrailingSlash(process.env.acl_provider_endpoint),\n\t\t\t\tPrismicEmbed: removeTrailingSlash(\n\t\t\t\t\tprocess.env.oembed_endpoint ?? \"https://oembed.wroom.io\",\n\t\t\t\t),\n\t\t\t\tPrismicUnsplash: addTrailingSlash(\n\t\t\t\t\tprocess.env.unsplash_endpoint ?? \"https://unsplash.wroom.io/\",\n\t\t\t\t),\n\t\t\t\tSliceMachineV1: addTrailingSlash(\n\t\t\t\t\tprocess.env.slice_machine_v1_endpoint ??\n\t\t\t\t\t\t\"https://sm-api.wroom.io/v1/\",\n\t\t\t\t),\n\t\t\t\tRepositoryService: addTrailingSlash(\n\t\t\t\t\tprocess.env.repository_api ??\n\t\t\t\t\t\t\"https://api.internal.wroom.io/repository/\",\n\t\t\t\t),\n\t\t\t\tLocaleService: addTrailingSlash(\n\t\t\t\t\tprocess.env.locale_api ?? \"https://api.internal.wroom.io/locale/\",\n\t\t\t\t),\n\t\t\t\tCustomTypeService: addTrailingSlash(\n\t\t\t\t\tprocess.env.custom_type_api ??\n\t\t\t\t\t\t\"https://api.internal.wroom.io/custom-type/\",\n\t\t\t\t),\n\t\t\t\tLlmProxyTypeService: addTrailingSlash(\n\t\t\t\t\tprocess.env.llm_proxy_api ??\n\t\t\t\t\t\t\"https://api.internal.wroom.io/llm-proxy/\",\n\t\t\t\t),\n\t\t\t};\n\n\t\t\tconst missingAPIEndpoints = Object.keys(apiEndpoints).filter((key) => {\n\t\t\t\treturn !apiEndpoints[key as keyof typeof apiEndpoints];\n\t\t\t});\n\n\t\t\tif (missingAPIEndpoints.length > 0) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t\t\t}) where API endpoints are configured via environment variables.\n\nThe following endpoints were not configured: ${missingAPIEndpoints.join(\", \")}.\n\nConfigure them before continuing.`,\n\t\t\t\t);\n\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\n\t\t\tconsole.warn(`You are running Slice Machine in development mode (SM_ENV=${\n\t\t\t\tAPPLICATION_MODE.Development\n\t\t\t}).\n\nThe following API endpoints were configured via environment variables:\n${Object.entries(apiEndpoints)\n\t.map(([name, endpoint]) => ` - ${name}: ${endpoint}`)\n\t.join(\"\\n\")}\n\nThese endpoints are different than Slice Machine's normal endpoints and are not trusted.\n\nIf you didn't intend to run Slice Machine this way, stop it immediately and unset the SM_ENV environment variable.`);\n\n\t\t\treturn apiEndpoints as APIEndpoints;\n\t\t}\n\n\t\tcase APPLICATION_MODE.Staging: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://wroom.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.wroom.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.wroom.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.wroom.io/\",\n\t\t\t\tAwsAclProvider: \"https://acl-provider.wroom.io/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.wroom.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.wroom.io/\",\n\t\t\t\tSliceMachineV1: \"https://sm-api.wroom.io/v1/\",\n\t\t\t\tRepositoryService: \"https://api.internal.wroom.io/repository/\",\n\t\t\t\tLocaleService: \"https://api.internal.wroom.io/locale/\",\n\t\t\t\tCustomTypeService: \"https://api.internal.wroom.io/custom-type/\",\n\t\t\t\tLlmProxyTypeService: \"https://api.internal.wroom.io/llm-proxy/\",\n\t\t\t};\n\t\t}\n\n\t\tcase APPLICATION_MODE.DevTools:\n\t\tcase APPLICATION_MODE.MarketingTools:\n\t\tcase APPLICATION_MODE.Platform: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: `https://${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicAuthentication: `https://auth.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicModels: `https://customtypes.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicUser: `https://user-service.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tAwsAclProvider: `https://acl-provider.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tPrismicEmbed: `https://oembed.${process.env.SM_ENV}-wroom.com`,\n\t\t\t\tPrismicUnsplash: `https://unsplash.${process.env.SM_ENV}-wroom.com/`,\n\t\t\t\tSliceMachineV1: `https://sm-api.${process.env.SM_ENV}-wroom.com/v1/`,\n\t\t\t\tRepositoryService: `https://api.internal.${process.env.SM_ENV}-wroom.com/repository/`,\n\t\t\t\tLocaleService: `https://api.internal.${process.env.SM_ENV}-wroom.com/locale/`,\n\t\t\t\tCustomTypeService: `https://api.internal.${process.env.SM_ENV}-wroom.com/custom-type/`,\n\t\t\t\tLlmProxyTypeService: `https://api.internal.${process.env.SM_ENV}-wroom.com/llm-proxy/`,\n\t\t\t};\n\t\t}\n\n\t\tcase APPLICATION_MODE.Production:\n\t\tdefault: {\n\t\t\treturn {\n\t\t\t\tPrismicWroom: \"https://prismic.io/\",\n\t\t\t\tPrismicAuthentication: \"https://auth.prismic.io/\",\n\t\t\t\tPrismicModels: \"https://customtypes.prismic.io/\",\n\t\t\t\tPrismicUser: \"https://user-service.prismic.io/\",\n\t\t\t\tAwsAclProvider: \"https://acl-provider.prismic.io/\",\n\t\t\t\tPrismicEmbed: \"https://oembed.prismic.io\",\n\t\t\t\tPrismicUnsplash: \"https://unsplash.prismic.io/\",\n\t\t\t\tSliceMachineV1: \"https://sm-api.prismic.io/v1/\",\n\t\t\t\tRepositoryService: \"https://api.internal.prismic.io/repository/\",\n\t\t\t\tLocaleService: \"https://api.internal.prismic.io/locale/\",\n\t\t\t\tCustomTypeService: \"https://api.internal.prismic.io/custom-type/\",\n\t\t\t\tLlmProxyTypeService: \"https://api.internal.prismic.io/llm-proxy/\",\n\t\t\t};\n\t\t}\n\t}\n})();\n"],"names":[],"mappings":";;AAkBO,MAAM,iBAA+B,MAAK;AAChD,UAAQ,QAAQ,IAAI,QAAA;AAAA,IACnB,KAAK,iBAAiB,aAAa;AAClC,YAAM,eAAe;AAAA,QACpB,cAAc,iBAAiB,QAAQ,IAAI,cAAc;AAAA,QACzD,uBAAuB,iBACtB,QAAQ,IAAI,8BAA8B;AAAA,QAE3C,eAAe,iBAAiB,QAAQ,IAAI,uBAAuB;AAAA,QACnE,aAAa,iBAAiB,QAAQ,IAAI,qBAAqB;AAAA,QAC/D,gBAAgB,iBAAiB,QAAQ,IAAI,qBAAqB;AAAA,QAClE,cAAc,oBACb,QAAQ,IAAI,mBAAmB,yBAAyB;AAAA,QAEzD,iBAAiB,iBAChB,QAAQ,IAAI,qBAAqB,4BAA4B;AAAA,QAE9D,gBAAgB,iBACf,QAAQ,IAAI,6BACX,6BAA6B;AAAA,QAE/B,mBAAmB,iBAClB,QAAQ,IAAI,kBACX,2CAA2C;AAAA,QAE7C,eAAe,iBACd,QAAQ,IAAI,cAAc,uCAAuC;AAAA,QAElE,mBAAmB,iBAClB,QA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