@slicemachine/manager 0.25.2-alpha.jp-revert-section-naming-experiment.2 → 0.25.2-alpha.jp-revert-section-naming-experiment.4
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/@amplitude/experiment-node-server/dist/src/local/client.cjs +1 -1
- package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/local/client.js +1 -1
- package/dist/_node_modules/cross-spawn/index.cjs +1 -1
- package/dist/_node_modules/cross-spawn/index.js +1 -1
- package/dist/_node_modules/execa/index.cjs +8 -70
- package/dist/_node_modules/execa/index.cjs.map +1 -1
- package/dist/_node_modules/execa/index.js +2 -64
- package/dist/_node_modules/execa/index.js.map +1 -1
- package/dist/_node_modules/execa/lib/stream.cjs +0 -15
- package/dist/_node_modules/execa/lib/stream.cjs.map +1 -1
- package/dist/_node_modules/execa/lib/stream.js +1 -16
- package/dist/_node_modules/execa/lib/stream.js.map +1 -1
- package/dist/_virtual/index2.cjs +4 -3
- package/dist/_virtual/index2.cjs.map +1 -1
- package/dist/_virtual/index2.js +4 -2
- package/dist/_virtual/index2.js.map +1 -1
- package/dist/_virtual/index3.cjs +3 -4
- package/dist/_virtual/index3.cjs.map +1 -1
- package/dist/_virtual/index3.js +2 -4
- package/dist/_virtual/index3.js.map +1 -1
- package/dist/client/index.d.ts +0 -1
- package/dist/client.cjs +0 -2
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +0 -2
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/managers/SliceMachineManager.cjs +0 -3
- package/dist/managers/SliceMachineManager.cjs.map +1 -1
- package/dist/managers/SliceMachineManager.d.ts +0 -2
- package/dist/managers/SliceMachineManager.js +0 -3
- package/dist/managers/SliceMachineManager.js.map +1 -1
- package/dist/managers/telemetry/types.cjs.map +1 -1
- package/dist/managers/telemetry/types.d.ts +0 -1
- package/dist/managers/telemetry/types.js.map +1 -1
- package/package.json +2 -2
- package/src/client/index.ts +0 -2
- package/src/index.ts +0 -2
- package/src/managers/SliceMachineManager.ts +0 -4
- package/src/managers/telemetry/types.ts +0 -1
- package/dist/constants/GIT_PROVIDER.cjs +0 -7
- package/dist/constants/GIT_PROVIDER.cjs.map +0 -1
- package/dist/constants/GIT_PROVIDER.d.ts +0 -4
- package/dist/constants/GIT_PROVIDER.js +0 -7
- package/dist/constants/GIT_PROVIDER.js.map +0 -1
- package/dist/constants/GIT_PROVIDER_APP_SLUGS.cjs +0 -26
- package/dist/constants/GIT_PROVIDER_APP_SLUGS.cjs.map +0 -1
- package/dist/constants/GIT_PROVIDER_APP_SLUGS.d.ts +0 -3
- package/dist/constants/GIT_PROVIDER_APP_SLUGS.js +0 -26
- package/dist/constants/GIT_PROVIDER_APP_SLUGS.js.map +0 -1
- package/dist/managers/git/GitManager.cjs +0 -334
- package/dist/managers/git/GitManager.cjs.map +0 -1
- package/dist/managers/git/GitManager.d.ts +0 -89
- package/dist/managers/git/GitManager.js +0 -316
- package/dist/managers/git/GitManager.js.map +0 -1
- package/dist/managers/git/buildGitRepoSpecifier.cjs +0 -7
- package/dist/managers/git/buildGitRepoSpecifier.cjs.map +0 -1
- package/dist/managers/git/buildGitRepoSpecifier.d.ts +0 -19
- package/dist/managers/git/buildGitRepoSpecifier.js +0 -7
- package/dist/managers/git/buildGitRepoSpecifier.js.map +0 -1
- package/dist/managers/git/types.d.ts +0 -20
- package/src/constants/GIT_PROVIDER.ts +0 -5
- package/src/constants/GIT_PROVIDER_APP_SLUGS.ts +0 -28
- package/src/managers/git/GitManager.ts +0 -502
- package/src/managers/git/buildGitRepoSpecifier.ts +0 -24
- package/src/managers/git/types.ts +0 -26
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
const _commonjsHelpers = require("../../../../../../_virtual/_commonjsHelpers.cjs");
|
3
3
|
const client = require("../../../../../../_virtual/client2.cjs");
|
4
|
-
const index = require("../../../../../../_virtual/
|
4
|
+
const index = require("../../../../../../_virtual/index2.cjs");
|
5
5
|
const experimentCore_esm = require("../../../../../../_virtual/experiment-core.esm.cjs");
|
6
6
|
require("../assignment/assignment.cjs");
|
7
7
|
require("../assignment/assignment-filter.cjs");
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { commonjsGlobal } from "../../../../../../_virtual/_commonjsHelpers.js";
|
2
2
|
import { __exports as client } from "../../../../../../_virtual/client2.js";
|
3
|
-
import require$$0 from "../../../../../../_virtual/
|
3
|
+
import require$$0 from "../../../../../../_virtual/index2.js";
|
4
4
|
import require$$1 from "../../../../../../_virtual/experiment-core.esm.js";
|
5
5
|
import "../assignment/assignment.js";
|
6
6
|
import "../assignment/assignment-filter.js";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
const _commonjsHelpers = require("../../_virtual/_commonjsHelpers.cjs");
|
3
|
-
const index = require("../../_virtual/
|
3
|
+
const index = require("../../_virtual/index3.cjs");
|
4
4
|
const require$$0 = require("child_process");
|
5
5
|
const parse$1 = require("./lib/parse.cjs");
|
6
6
|
const enoent$1 = require("./lib/enoent.cjs");
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { getDefaultExportFromCjs } from "../../_virtual/_commonjsHelpers.js";
|
2
|
-
import { __module as crossSpawn$1 } from "../../_virtual/
|
2
|
+
import { __module as crossSpawn$1 } from "../../_virtual/index3.js";
|
3
3
|
import require$$0 from "child_process";
|
4
4
|
import { p as parse_1 } from "./lib/parse.js";
|
5
5
|
import { e as enoent$1 } from "./lib/enoent.js";
|
@@ -4,10 +4,10 @@ const node_buffer = require("node:buffer");
|
|
4
4
|
const path = require("node:path");
|
5
5
|
const childProcess = require("node:child_process");
|
6
6
|
const process = require("node:process");
|
7
|
-
const index = require("../cross-spawn/index.cjs");
|
8
|
-
const index$
|
9
|
-
const index$
|
10
|
-
const index
|
7
|
+
const index$1 = require("../cross-spawn/index.cjs");
|
8
|
+
const index$3 = require("../strip-final-newline/index.cjs");
|
9
|
+
const index$2 = require("../npm-run-path/index.cjs");
|
10
|
+
const index = require("../onetime/index.cjs");
|
11
11
|
const error = require("./lib/error.cjs");
|
12
12
|
const stdio = require("./lib/stdio.cjs");
|
13
13
|
const kill = require("./lib/kill.cjs");
|
@@ -20,12 +20,12 @@ const DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
|
|
20
20
|
const getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
|
21
21
|
const env = extendEnv ? { ...process.env, ...envOption } : envOption;
|
22
22
|
if (preferLocal) {
|
23
|
-
return index$
|
23
|
+
return index$2.npmRunPathEnv({ env, cwd: localDir, execPath });
|
24
24
|
}
|
25
25
|
return env;
|
26
26
|
};
|
27
27
|
const handleArguments = (file, args, options = {}) => {
|
28
|
-
const parsed = index._parse(file, args, options);
|
28
|
+
const parsed = index$1._parse(file, args, options);
|
29
29
|
file = parsed.command;
|
30
30
|
args = parsed.args;
|
31
31
|
options = parsed.options;
|
@@ -57,7 +57,7 @@ const handleOutput = (options, value, error2) => {
|
|
57
57
|
return error2 === void 0 ? void 0 : "";
|
58
58
|
}
|
59
59
|
if (options.stripFinalNewline) {
|
60
|
-
return index$
|
60
|
+
return index$3(value);
|
61
61
|
}
|
62
62
|
return value;
|
63
63
|
};
|
@@ -131,79 +131,17 @@ function execa(file, args, options) {
|
|
131
131
|
killed: false
|
132
132
|
};
|
133
133
|
};
|
134
|
-
const handlePromiseOnce = index
|
134
|
+
const handlePromiseOnce = index(handlePromise);
|
135
135
|
stream.handleInput(spawned, parsed.options);
|
136
136
|
spawned.all = stream.makeAllStream(spawned, parsed.options);
|
137
137
|
pipe.addPipeMethods(spawned);
|
138
138
|
promise.mergePromise(spawned, handlePromiseOnce);
|
139
139
|
return spawned;
|
140
140
|
}
|
141
|
-
function execaSync(file, args, options) {
|
142
|
-
const parsed = handleArguments(file, args, options);
|
143
|
-
const command$1 = command.joinCommand(file, args);
|
144
|
-
const escapedCommand = command.getEscapedCommand(file, args);
|
145
|
-
verbose.logCommand(escapedCommand, parsed.options);
|
146
|
-
const input = stream.handleInputSync(parsed.options);
|
147
|
-
let result;
|
148
|
-
try {
|
149
|
-
result = childProcess.spawnSync(parsed.file, parsed.args, { ...parsed.options, input });
|
150
|
-
} catch (error$1) {
|
151
|
-
throw error.makeError({
|
152
|
-
error: error$1,
|
153
|
-
stdout: "",
|
154
|
-
stderr: "",
|
155
|
-
all: "",
|
156
|
-
command: command$1,
|
157
|
-
escapedCommand,
|
158
|
-
parsed,
|
159
|
-
timedOut: false,
|
160
|
-
isCanceled: false,
|
161
|
-
killed: false
|
162
|
-
});
|
163
|
-
}
|
164
|
-
const stdout = handleOutput(parsed.options, result.stdout, result.error);
|
165
|
-
const stderr = handleOutput(parsed.options, result.stderr, result.error);
|
166
|
-
if (result.error || result.status !== 0 || result.signal !== null) {
|
167
|
-
const error$1 = error.makeError({
|
168
|
-
stdout,
|
169
|
-
stderr,
|
170
|
-
error: result.error,
|
171
|
-
signal: result.signal,
|
172
|
-
exitCode: result.status,
|
173
|
-
command: command$1,
|
174
|
-
escapedCommand,
|
175
|
-
parsed,
|
176
|
-
timedOut: result.error && result.error.code === "ETIMEDOUT",
|
177
|
-
isCanceled: false,
|
178
|
-
killed: result.signal !== null
|
179
|
-
});
|
180
|
-
if (!parsed.options.reject) {
|
181
|
-
return error$1;
|
182
|
-
}
|
183
|
-
throw error$1;
|
184
|
-
}
|
185
|
-
return {
|
186
|
-
command: command$1,
|
187
|
-
escapedCommand,
|
188
|
-
exitCode: 0,
|
189
|
-
stdout,
|
190
|
-
stderr,
|
191
|
-
failed: false,
|
192
|
-
timedOut: false,
|
193
|
-
isCanceled: false,
|
194
|
-
killed: false
|
195
|
-
};
|
196
|
-
}
|
197
141
|
function execaCommand(command$1, options) {
|
198
142
|
const [file, ...args] = command.parseCommand(command$1);
|
199
143
|
return execa(file, args, options);
|
200
144
|
}
|
201
|
-
function execaCommandSync(command$1, options) {
|
202
|
-
const [file, ...args] = command.parseCommand(command$1);
|
203
|
-
return execaSync(file, args, options);
|
204
|
-
}
|
205
145
|
exports.execa = execa;
|
206
146
|
exports.execaCommand = execaCommand;
|
207
|
-
exports.execaCommandSync = execaCommandSync;
|
208
|
-
exports.execaSync = execaSync;
|
209
147
|
//# sourceMappingURL=index.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../../node_modules/execa/index.js"],"sourcesContent":["import {Buffer} from 'node:buffer';\nimport path from 'node:path';\nimport childProcess from 'node:child_process';\nimport process from 'node:process';\nimport crossSpawn from 'cross-spawn';\nimport stripFinalNewline from 'strip-final-newline';\nimport {npmRunPathEnv} from 'npm-run-path';\nimport onetime from 'onetime';\nimport {makeError} from './lib/error.js';\nimport {normalizeStdio, normalizeStdioNode} from './lib/stdio.js';\nimport {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} from './lib/kill.js';\nimport {addPipeMethods} from './lib/pipe.js';\nimport {handleInput, getSpawnedResult, makeAllStream, handleInputSync} from './lib/stream.js';\nimport {mergePromise, getSpawnedPromise} from './lib/promise.js';\nimport {joinCommand, parseCommand, parseTemplates, getEscapedCommand} from './lib/command.js';\nimport {logCommand, verboseDefault} from './lib/verbose.js';\n\nconst DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;\n\nconst getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {\n\tconst env = extendEnv ? {...process.env, ...envOption} : envOption;\n\n\tif (preferLocal) {\n\t\treturn npmRunPathEnv({env, cwd: localDir, execPath});\n\t}\n\n\treturn env;\n};\n\nconst handleArguments = (file, args, options = {}) => {\n\tconst parsed = crossSpawn._parse(file, args, options);\n\tfile = parsed.command;\n\targs = parsed.args;\n\toptions = parsed.options;\n\n\toptions = {\n\t\tmaxBuffer: DEFAULT_MAX_BUFFER,\n\t\tbuffer: true,\n\t\tstripFinalNewline: true,\n\t\textendEnv: true,\n\t\tpreferLocal: false,\n\t\tlocalDir: options.cwd || process.cwd(),\n\t\texecPath: process.execPath,\n\t\tencoding: 'utf8',\n\t\treject: true,\n\t\tcleanup: true,\n\t\tall: false,\n\t\twindowsHide: true,\n\t\tverbose: verboseDefault,\n\t\t...options,\n\t};\n\n\toptions.env = getEnv(options);\n\n\toptions.stdio = normalizeStdio(options);\n\n\tif (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {\n\t\t// #116\n\t\targs.unshift('/q');\n\t}\n\n\treturn {file, args, options, parsed};\n};\n\nconst handleOutput = (options, value, error) => {\n\tif (typeof value !== 'string' && !Buffer.isBuffer(value)) {\n\t\t// When `execaSync()` errors, we normalize it to '' to mimic `execa()`\n\t\treturn error === undefined ? undefined : '';\n\t}\n\n\tif (options.stripFinalNewline) {\n\t\treturn stripFinalNewline(value);\n\t}\n\n\treturn value;\n};\n\nexport function execa(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tvalidateTimeout(parsed.options);\n\n\tlet spawned;\n\ttry {\n\t\tspawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);\n\t} catch (error) {\n\t\t// Ensure the returned error is always both a promise and a child process\n\t\tconst dummySpawned = new childProcess.ChildProcess();\n\t\tconst errorPromise = Promise.reject(makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t}));\n\t\tmergePromise(dummySpawned, errorPromise);\n\t\treturn dummySpawned;\n\t}\n\n\tconst spawnedPromise = getSpawnedPromise(spawned);\n\tconst timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);\n\tconst processDone = setExitHandler(spawned, parsed.options, timedPromise);\n\n\tconst context = {isCanceled: false};\n\n\tspawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));\n\tspawned.cancel = spawnedCancel.bind(null, spawned, context);\n\n\tconst handlePromise = async () => {\n\t\tconst [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);\n\t\tconst stdout = handleOutput(parsed.options, stdoutResult);\n\t\tconst stderr = handleOutput(parsed.options, stderrResult);\n\t\tconst all = handleOutput(parsed.options, allResult);\n\n\t\tif (error || exitCode !== 0 || signal !== null) {\n\t\t\tconst returnedError = makeError({\n\t\t\t\terror,\n\t\t\t\texitCode,\n\t\t\t\tsignal,\n\t\t\t\tstdout,\n\t\t\t\tstderr,\n\t\t\t\tall,\n\t\t\t\tcommand,\n\t\t\t\tescapedCommand,\n\t\t\t\tparsed,\n\t\t\t\ttimedOut,\n\t\t\t\tisCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),\n\t\t\t\tkilled: spawned.killed,\n\t\t\t});\n\n\t\t\tif (!parsed.options.reject) {\n\t\t\t\treturn returnedError;\n\t\t\t}\n\n\t\t\tthrow returnedError;\n\t\t}\n\n\t\treturn {\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\texitCode: 0,\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\tall,\n\t\t\tfailed: false,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t};\n\t};\n\n\tconst handlePromiseOnce = onetime(handlePromise);\n\n\thandleInput(spawned, parsed.options);\n\n\tspawned.all = makeAllStream(spawned, parsed.options);\n\n\taddPipeMethods(spawned);\n\tmergePromise(spawned, handlePromiseOnce);\n\treturn spawned;\n}\n\nexport function execaSync(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tconst input = handleInputSync(parsed.options);\n\n\tlet result;\n\ttry {\n\t\tresult = childProcess.spawnSync(parsed.file, parsed.args, {...parsed.options, input});\n\t} catch (error) {\n\t\tthrow makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t});\n\t}\n\n\tconst stdout = handleOutput(parsed.options, result.stdout, result.error);\n\tconst stderr = handleOutput(parsed.options, result.stderr, result.error);\n\n\tif (result.error || result.status !== 0 || result.signal !== null) {\n\t\tconst error = makeError({\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\terror: result.error,\n\t\t\tsignal: result.signal,\n\t\t\texitCode: result.status,\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: result.error && result.error.code === 'ETIMEDOUT',\n\t\t\tisCanceled: false,\n\t\t\tkilled: result.signal !== null,\n\t\t});\n\n\t\tif (!parsed.options.reject) {\n\t\t\treturn error;\n\t\t}\n\n\t\tthrow error;\n\t}\n\n\treturn {\n\t\tcommand,\n\t\tescapedCommand,\n\t\texitCode: 0,\n\t\tstdout,\n\t\tstderr,\n\t\tfailed: false,\n\t\ttimedOut: false,\n\t\tisCanceled: false,\n\t\tkilled: false,\n\t};\n}\n\nconst normalizeScriptStdin = ({input, inputFile, stdio}) => input === undefined && inputFile === undefined && stdio === undefined\n\t? {stdin: 'inherit'}\n\t: {};\n\nconst normalizeScriptOptions = (options = {}) => ({\n\tpreferLocal: true,\n\t...normalizeScriptStdin(options),\n\t...options,\n});\n\nfunction create$(options) {\n\tfunction $(templatesOrOptions, ...expressions) {\n\t\tif (!Array.isArray(templatesOrOptions)) {\n\t\t\treturn create$({...options, ...templatesOrOptions});\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templatesOrOptions, expressions);\n\t\treturn execa(file, args, normalizeScriptOptions(options));\n\t}\n\n\t$.sync = (templates, ...expressions) => {\n\t\tif (!Array.isArray(templates)) {\n\t\t\tthrow new TypeError('Please use $(options).sync`command` instead of $.sync(options)`command`.');\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templates, expressions);\n\t\treturn execaSync(file, args, normalizeScriptOptions(options));\n\t};\n\n\treturn $;\n}\n\nexport const $ = create$();\n\nexport function execaCommand(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execa(file, args, options);\n}\n\nexport function execaCommandSync(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execaSync(file, args, options);\n}\n\nexport function execaNode(scriptPath, args, options = {}) {\n\tif (args && !Array.isArray(args) && typeof args === 'object') {\n\t\toptions = args;\n\t\targs = [];\n\t}\n\n\tconst stdio = normalizeStdioNode(options);\n\tconst defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));\n\n\tconst {\n\t\tnodePath = process.execPath,\n\t\tnodeOptions = defaultExecArgv,\n\t} = options;\n\n\treturn execa(\n\t\tnodePath,\n\t\t[\n\t\t\t...nodeOptions,\n\t\t\tscriptPath,\n\t\t\t...(Array.isArray(args) ? args : []),\n\t\t],\n\t\t{\n\t\t\t...options,\n\t\t\tstdin: undefined,\n\t\t\tstdout: undefined,\n\t\t\tstderr: undefined,\n\t\t\tstdio,\n\t\t\tshell: false,\n\t\t},\n\t);\n}\n"],"names":["npmRunPathEnv","crossSpawn","verboseDefault","normalizeStdio","error","Buffer","stripFinalNewline","command","joinCommand","getEscapedCommand","logCommand","validateTimeout","makeError","mergePromise","getSpawnedPromise","setupTimeout","setExitHandler","spawnedKill","spawnedCancel","getSpawnedResult","onetime","handleInput","makeAllStream","addPipeMethods","handleInputSync","parseCommand"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,MAAM,qBAAqB,MAAO,MAAO;AAEzC,MAAM,SAAS,CAAC,EAAC,KAAK,WAAW,WAAW,aAAa,UAAU,SAAQ,MAAM;AAChF,QAAM,MAAM,YAAY,EAAC,GAAG,QAAQ,KAAK,GAAG,UAAS,IAAI;AAEzD,MAAI,aAAa;AAChB,WAAOA,QAAAA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AAO,QAAQ,OAAO,KAAK;AACvE,QAAM,SAAS,aAAa,OAAO,SAAS,OAAO,QAAQ,OAAO,KAAK;AAEvE,MAAI,OAAO,SAAS,OAAO,WAAW,KAAK,OAAO,WAAW,MAAM;AAClE,UAAMH,UAAQQ,MAAAA,UAAU;AAAA,MACvB;AAAA,MACA;AAAA,MACA,OAAO,OAAO;AAAA,MACd,QAAQ,OAAO;AAAA,MACf,UAAU,OAAO;AAAA,MACpB,SAAGL;AAAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU,OAAO,SAAS,OAAO,MAAM,SAAS;AAAA,MAChD,YAAY;AAAA,MACZ,QAAQ,OAAO,WAAW;AAAA,IAC7B,CAAG;AAED,QAAI,CAAC,OAAO,QAAQ,QAAQ;AAC3B,aAAOH;AAAAA,IACP;AAED,UAAMA;AAAAA,EACN;AAED,SAAO;AAAA,IACR,SAAEG;AAAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,QAAQ;AAAA,EACV;AACA;AAoCO,SAAS,aAAaA,WAAS,SAAS;AAC9C,QAAM,CAAC,MAAM,GAAG,IAAI,IAAIkB,QAAY,aAAClB,SAAO;AAC5C,SAAO,MAAM,MAAM,MAAM,OAAO;AACjC;AAEO,SAAS,iBAAiBA,WAAS,SAAS;AAClD,QAAM,CAAC,MAAM,GAAG,IAAI,IAAIkB,QAAY,aAAClB,SAAO;AAC5C,SAAO,UAAU,MAAM,MAAM,OAAO;AACrC;;;;;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../node_modules/execa/index.js"],"sourcesContent":["import {Buffer} from 'node:buffer';\nimport path from 'node:path';\nimport childProcess from 'node:child_process';\nimport process from 'node:process';\nimport crossSpawn from 'cross-spawn';\nimport stripFinalNewline from 'strip-final-newline';\nimport {npmRunPathEnv} from 'npm-run-path';\nimport onetime from 'onetime';\nimport {makeError} from './lib/error.js';\nimport {normalizeStdio, normalizeStdioNode} from './lib/stdio.js';\nimport {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} from './lib/kill.js';\nimport {addPipeMethods} from './lib/pipe.js';\nimport {handleInput, getSpawnedResult, makeAllStream, handleInputSync} from './lib/stream.js';\nimport {mergePromise, getSpawnedPromise} from './lib/promise.js';\nimport {joinCommand, parseCommand, parseTemplates, getEscapedCommand} from './lib/command.js';\nimport {logCommand, verboseDefault} from './lib/verbose.js';\n\nconst DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;\n\nconst getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {\n\tconst env = extendEnv ? {...process.env, ...envOption} : envOption;\n\n\tif (preferLocal) {\n\t\treturn npmRunPathEnv({env, cwd: localDir, execPath});\n\t}\n\n\treturn env;\n};\n\nconst handleArguments = (file, args, options = {}) => {\n\tconst parsed = crossSpawn._parse(file, args, options);\n\tfile = parsed.command;\n\targs = parsed.args;\n\toptions = parsed.options;\n\n\toptions = {\n\t\tmaxBuffer: DEFAULT_MAX_BUFFER,\n\t\tbuffer: true,\n\t\tstripFinalNewline: true,\n\t\textendEnv: true,\n\t\tpreferLocal: false,\n\t\tlocalDir: options.cwd || process.cwd(),\n\t\texecPath: process.execPath,\n\t\tencoding: 'utf8',\n\t\treject: true,\n\t\tcleanup: true,\n\t\tall: false,\n\t\twindowsHide: true,\n\t\tverbose: verboseDefault,\n\t\t...options,\n\t};\n\n\toptions.env = getEnv(options);\n\n\toptions.stdio = normalizeStdio(options);\n\n\tif (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {\n\t\t// #116\n\t\targs.unshift('/q');\n\t}\n\n\treturn {file, args, options, parsed};\n};\n\nconst handleOutput = (options, value, error) => {\n\tif (typeof value !== 'string' && !Buffer.isBuffer(value)) {\n\t\t// When `execaSync()` errors, we normalize it to '' to mimic `execa()`\n\t\treturn error === undefined ? undefined : '';\n\t}\n\n\tif (options.stripFinalNewline) {\n\t\treturn stripFinalNewline(value);\n\t}\n\n\treturn value;\n};\n\nexport function execa(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tvalidateTimeout(parsed.options);\n\n\tlet spawned;\n\ttry {\n\t\tspawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);\n\t} catch (error) {\n\t\t// Ensure the returned error is always both a promise and a child process\n\t\tconst dummySpawned = new childProcess.ChildProcess();\n\t\tconst errorPromise = Promise.reject(makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t}));\n\t\tmergePromise(dummySpawned, errorPromise);\n\t\treturn dummySpawned;\n\t}\n\n\tconst spawnedPromise = getSpawnedPromise(spawned);\n\tconst timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);\n\tconst processDone = setExitHandler(spawned, parsed.options, timedPromise);\n\n\tconst context = {isCanceled: false};\n\n\tspawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));\n\tspawned.cancel = spawnedCancel.bind(null, spawned, context);\n\n\tconst handlePromise = async () => {\n\t\tconst [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);\n\t\tconst stdout = handleOutput(parsed.options, stdoutResult);\n\t\tconst stderr = handleOutput(parsed.options, stderrResult);\n\t\tconst all = handleOutput(parsed.options, allResult);\n\n\t\tif (error || exitCode !== 0 || signal !== null) {\n\t\t\tconst returnedError = makeError({\n\t\t\t\terror,\n\t\t\t\texitCode,\n\t\t\t\tsignal,\n\t\t\t\tstdout,\n\t\t\t\tstderr,\n\t\t\t\tall,\n\t\t\t\tcommand,\n\t\t\t\tescapedCommand,\n\t\t\t\tparsed,\n\t\t\t\ttimedOut,\n\t\t\t\tisCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),\n\t\t\t\tkilled: spawned.killed,\n\t\t\t});\n\n\t\t\tif (!parsed.options.reject) {\n\t\t\t\treturn returnedError;\n\t\t\t}\n\n\t\t\tthrow returnedError;\n\t\t}\n\n\t\treturn {\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\texitCode: 0,\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\tall,\n\t\t\tfailed: false,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t};\n\t};\n\n\tconst handlePromiseOnce = onetime(handlePromise);\n\n\thandleInput(spawned, parsed.options);\n\n\tspawned.all = makeAllStream(spawned, parsed.options);\n\n\taddPipeMethods(spawned);\n\tmergePromise(spawned, handlePromiseOnce);\n\treturn spawned;\n}\n\nexport function execaSync(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tconst input = handleInputSync(parsed.options);\n\n\tlet result;\n\ttry {\n\t\tresult = childProcess.spawnSync(parsed.file, parsed.args, {...parsed.options, input});\n\t} catch (error) {\n\t\tthrow makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t});\n\t}\n\n\tconst stdout = handleOutput(parsed.options, result.stdout, result.error);\n\tconst stderr = handleOutput(parsed.options, result.stderr, result.error);\n\n\tif (result.error || result.status !== 0 || result.signal !== null) {\n\t\tconst error = makeError({\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\terror: result.error,\n\t\t\tsignal: result.signal,\n\t\t\texitCode: result.status,\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: result.error && result.error.code === 'ETIMEDOUT',\n\t\t\tisCanceled: false,\n\t\t\tkilled: result.signal !== null,\n\t\t});\n\n\t\tif (!parsed.options.reject) {\n\t\t\treturn error;\n\t\t}\n\n\t\tthrow error;\n\t}\n\n\treturn {\n\t\tcommand,\n\t\tescapedCommand,\n\t\texitCode: 0,\n\t\tstdout,\n\t\tstderr,\n\t\tfailed: false,\n\t\ttimedOut: false,\n\t\tisCanceled: false,\n\t\tkilled: false,\n\t};\n}\n\nconst normalizeScriptStdin = ({input, inputFile, stdio}) => input === undefined && inputFile === undefined && stdio === undefined\n\t? {stdin: 'inherit'}\n\t: {};\n\nconst normalizeScriptOptions = (options = {}) => ({\n\tpreferLocal: true,\n\t...normalizeScriptStdin(options),\n\t...options,\n});\n\nfunction create$(options) {\n\tfunction $(templatesOrOptions, ...expressions) {\n\t\tif (!Array.isArray(templatesOrOptions)) {\n\t\t\treturn create$({...options, ...templatesOrOptions});\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templatesOrOptions, expressions);\n\t\treturn execa(file, args, normalizeScriptOptions(options));\n\t}\n\n\t$.sync = (templates, ...expressions) => {\n\t\tif (!Array.isArray(templates)) {\n\t\t\tthrow new TypeError('Please use $(options).sync`command` instead of $.sync(options)`command`.');\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templates, expressions);\n\t\treturn execaSync(file, args, normalizeScriptOptions(options));\n\t};\n\n\treturn $;\n}\n\nexport const $ = create$();\n\nexport function execaCommand(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execa(file, args, options);\n}\n\nexport function execaCommandSync(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execaSync(file, args, options);\n}\n\nexport function execaNode(scriptPath, args, options = {}) {\n\tif (args && !Array.isArray(args) && typeof args === 'object') {\n\t\toptions = args;\n\t\targs = [];\n\t}\n\n\tconst stdio = normalizeStdioNode(options);\n\tconst defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));\n\n\tconst {\n\t\tnodePath = process.execPath,\n\t\tnodeOptions = defaultExecArgv,\n\t} = options;\n\n\treturn execa(\n\t\tnodePath,\n\t\t[\n\t\t\t...nodeOptions,\n\t\t\tscriptPath,\n\t\t\t...(Array.isArray(args) ? args : []),\n\t\t],\n\t\t{\n\t\t\t...options,\n\t\t\tstdin: undefined,\n\t\t\tstdout: undefined,\n\t\t\tstderr: undefined,\n\t\t\tstdio,\n\t\t\tshell: false,\n\t\t},\n\t);\n}\n"],"names":["npmRunPathEnv","crossSpawn","verboseDefault","normalizeStdio","error","Buffer","stripFinalNewline","command","joinCommand","getEscapedCommand","logCommand","validateTimeout","makeError","mergePromise","getSpawnedPromise","setupTimeout","setExitHandler","spawnedKill","spawnedCancel","getSpawnedResult","onetime","handleInput","makeAllStream","addPipeMethods","parseCommand"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,MAAM,qBAAqB,MAAO,MAAO;AAEzC,MAAM,SAAS,CAAC,EAAC,KAAK,WAAW,WAAW,aAAa,UAAU,SAAQ,MAAM;AAChF,QAAM,MAAM,YAAY,EAAC,GAAG,QAAQ,KAAK,GAAG,UAAS,IAAI;AAEzD,MAAI,aAAa;AAChB,WAAOA,QAAAA,cAAc,EAAC,KAAK,KAAK,UAAU,SAAQ,CAAC;AAAA,EACnD;AAED,SAAO;AACR;AAEA,MAAM,kBAAkB,CAAC,MAAM,MAAM,UAAU,CAAA,MAAO;AACrD,QAAM,SAASC,QAAW,OAAO,MAAM,MAAM,OAAO;AACpD,SAAO,OAAO;AACd,SAAO,OAAO;AACd,YAAU,OAAO;AAEjB,YAAU;AAAA,IACT,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,mBAAmB;AAAA,IACnB,WAAW;AAAA,IACX,aAAa;AAAA,IACb,UAAU,QAAQ,OAAO,QAAQ,IAAK;AAAA,IACtC,UAAU,QAAQ;AAAA,IAClB,UAAU;AAAA,IACV,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AA,YAAY,SAAS,OAAO,OAAO;AAEnC,UAAQ,MAAMC,OAAa,cAAC,SAAS,OAAO,OAAO;AAEnDC,OAAc,eAAC,OAAO;AACtBV,uBAAa,SAAS,iBAAiB;AACvC,SAAO;AACR;AAoGO,SAAS,aAAaN,WAAS,SAAS;AAC9C,QAAM,CAAC,MAAM,GAAG,IAAI,IAAIiB,QAAY,aAACjB,SAAO;AAC5C,SAAO,MAAM,MAAM,MAAM,OAAO;AACjC;;;","x_google_ignoreList":[0]}
|
@@ -10,7 +10,7 @@ import { makeError } from "./lib/error.js";
|
|
10
10
|
import { normalizeStdio } from "./lib/stdio.js";
|
11
11
|
import { validateTimeout, setupTimeout, setExitHandler, spawnedKill, spawnedCancel } from "./lib/kill.js";
|
12
12
|
import { addPipeMethods } from "./lib/pipe.js";
|
13
|
-
import {
|
13
|
+
import { handleInput, makeAllStream, getSpawnedResult } from "./lib/stream.js";
|
14
14
|
import { mergePromise, getSpawnedPromise } from "./lib/promise.js";
|
15
15
|
import { parseCommand, joinCommand, getEscapedCommand } from "./lib/command.js";
|
16
16
|
import { logCommand, verboseDefault } from "./lib/verbose.js";
|
@@ -136,74 +136,12 @@ function execa(file, args, options) {
|
|
136
136
|
mergePromise(spawned, handlePromiseOnce);
|
137
137
|
return spawned;
|
138
138
|
}
|
139
|
-
function execaSync(file, args, options) {
|
140
|
-
const parsed = handleArguments(file, args, options);
|
141
|
-
const command = joinCommand(file, args);
|
142
|
-
const escapedCommand = getEscapedCommand(file, args);
|
143
|
-
logCommand(escapedCommand, parsed.options);
|
144
|
-
const input = handleInputSync(parsed.options);
|
145
|
-
let result;
|
146
|
-
try {
|
147
|
-
result = childProcess.spawnSync(parsed.file, parsed.args, { ...parsed.options, input });
|
148
|
-
} catch (error) {
|
149
|
-
throw makeError({
|
150
|
-
error,
|
151
|
-
stdout: "",
|
152
|
-
stderr: "",
|
153
|
-
all: "",
|
154
|
-
command,
|
155
|
-
escapedCommand,
|
156
|
-
parsed,
|
157
|
-
timedOut: false,
|
158
|
-
isCanceled: false,
|
159
|
-
killed: false
|
160
|
-
});
|
161
|
-
}
|
162
|
-
const stdout = handleOutput(parsed.options, result.stdout, result.error);
|
163
|
-
const stderr = handleOutput(parsed.options, result.stderr, result.error);
|
164
|
-
if (result.error || result.status !== 0 || result.signal !== null) {
|
165
|
-
const error = makeError({
|
166
|
-
stdout,
|
167
|
-
stderr,
|
168
|
-
error: result.error,
|
169
|
-
signal: result.signal,
|
170
|
-
exitCode: result.status,
|
171
|
-
command,
|
172
|
-
escapedCommand,
|
173
|
-
parsed,
|
174
|
-
timedOut: result.error && result.error.code === "ETIMEDOUT",
|
175
|
-
isCanceled: false,
|
176
|
-
killed: result.signal !== null
|
177
|
-
});
|
178
|
-
if (!parsed.options.reject) {
|
179
|
-
return error;
|
180
|
-
}
|
181
|
-
throw error;
|
182
|
-
}
|
183
|
-
return {
|
184
|
-
command,
|
185
|
-
escapedCommand,
|
186
|
-
exitCode: 0,
|
187
|
-
stdout,
|
188
|
-
stderr,
|
189
|
-
failed: false,
|
190
|
-
timedOut: false,
|
191
|
-
isCanceled: false,
|
192
|
-
killed: false
|
193
|
-
};
|
194
|
-
}
|
195
139
|
function execaCommand(command, options) {
|
196
140
|
const [file, ...args] = parseCommand(command);
|
197
141
|
return execa(file, args, options);
|
198
142
|
}
|
199
|
-
function execaCommandSync(command, options) {
|
200
|
-
const [file, ...args] = parseCommand(command);
|
201
|
-
return execaSync(file, args, options);
|
202
|
-
}
|
203
143
|
export {
|
204
144
|
execa,
|
205
|
-
execaCommand
|
206
|
-
execaCommandSync,
|
207
|
-
execaSync
|
145
|
+
execaCommand
|
208
146
|
};
|
209
147
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/execa/index.js"],"sourcesContent":["import {Buffer} from 'node:buffer';\nimport path from 'node:path';\nimport childProcess from 'node:child_process';\nimport process from 'node:process';\nimport crossSpawn from 'cross-spawn';\nimport stripFinalNewline from 'strip-final-newline';\nimport {npmRunPathEnv} from 'npm-run-path';\nimport onetime from 'onetime';\nimport {makeError} from './lib/error.js';\nimport {normalizeStdio, normalizeStdioNode} from './lib/stdio.js';\nimport {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} from './lib/kill.js';\nimport {addPipeMethods} from './lib/pipe.js';\nimport {handleInput, getSpawnedResult, makeAllStream, handleInputSync} from './lib/stream.js';\nimport {mergePromise, getSpawnedPromise} from './lib/promise.js';\nimport {joinCommand, parseCommand, parseTemplates, getEscapedCommand} from './lib/command.js';\nimport {logCommand, verboseDefault} from './lib/verbose.js';\n\nconst DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;\n\nconst getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {\n\tconst env = extendEnv ? {...process.env, ...envOption} : envOption;\n\n\tif (preferLocal) {\n\t\treturn npmRunPathEnv({env, cwd: localDir, execPath});\n\t}\n\n\treturn env;\n};\n\nconst handleArguments = (file, args, options = {}) => {\n\tconst parsed = crossSpawn._parse(file, args, options);\n\tfile = parsed.command;\n\targs = parsed.args;\n\toptions = parsed.options;\n\n\toptions = {\n\t\tmaxBuffer: DEFAULT_MAX_BUFFER,\n\t\tbuffer: true,\n\t\tstripFinalNewline: true,\n\t\textendEnv: true,\n\t\tpreferLocal: false,\n\t\tlocalDir: options.cwd || process.cwd(),\n\t\texecPath: process.execPath,\n\t\tencoding: 'utf8',\n\t\treject: true,\n\t\tcleanup: true,\n\t\tall: false,\n\t\twindowsHide: true,\n\t\tverbose: verboseDefault,\n\t\t...options,\n\t};\n\n\toptions.env = getEnv(options);\n\n\toptions.stdio = normalizeStdio(options);\n\n\tif (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {\n\t\t// #116\n\t\targs.unshift('/q');\n\t}\n\n\treturn {file, args, options, parsed};\n};\n\nconst handleOutput = (options, value, error) => {\n\tif (typeof value !== 'string' && !Buffer.isBuffer(value)) {\n\t\t// When `execaSync()` errors, we normalize it to '' to mimic `execa()`\n\t\treturn error === undefined ? undefined : '';\n\t}\n\n\tif (options.stripFinalNewline) {\n\t\treturn stripFinalNewline(value);\n\t}\n\n\treturn value;\n};\n\nexport function execa(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tvalidateTimeout(parsed.options);\n\n\tlet spawned;\n\ttry {\n\t\tspawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);\n\t} catch (error) {\n\t\t// Ensure the returned error is always both a promise and a child process\n\t\tconst dummySpawned = new childProcess.ChildProcess();\n\t\tconst errorPromise = Promise.reject(makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t}));\n\t\tmergePromise(dummySpawned, errorPromise);\n\t\treturn dummySpawned;\n\t}\n\n\tconst spawnedPromise = getSpawnedPromise(spawned);\n\tconst timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);\n\tconst processDone = setExitHandler(spawned, parsed.options, timedPromise);\n\n\tconst context = {isCanceled: false};\n\n\tspawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));\n\tspawned.cancel = spawnedCancel.bind(null, spawned, context);\n\n\tconst handlePromise = async () => {\n\t\tconst [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);\n\t\tconst stdout = handleOutput(parsed.options, stdoutResult);\n\t\tconst stderr = handleOutput(parsed.options, stderrResult);\n\t\tconst all = handleOutput(parsed.options, allResult);\n\n\t\tif (error || exitCode !== 0 || signal !== null) {\n\t\t\tconst returnedError = makeError({\n\t\t\t\terror,\n\t\t\t\texitCode,\n\t\t\t\tsignal,\n\t\t\t\tstdout,\n\t\t\t\tstderr,\n\t\t\t\tall,\n\t\t\t\tcommand,\n\t\t\t\tescapedCommand,\n\t\t\t\tparsed,\n\t\t\t\ttimedOut,\n\t\t\t\tisCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),\n\t\t\t\tkilled: spawned.killed,\n\t\t\t});\n\n\t\t\tif (!parsed.options.reject) {\n\t\t\t\treturn returnedError;\n\t\t\t}\n\n\t\t\tthrow returnedError;\n\t\t}\n\n\t\treturn {\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\texitCode: 0,\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\tall,\n\t\t\tfailed: false,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t};\n\t};\n\n\tconst handlePromiseOnce = onetime(handlePromise);\n\n\thandleInput(spawned, parsed.options);\n\n\tspawned.all = makeAllStream(spawned, parsed.options);\n\n\taddPipeMethods(spawned);\n\tmergePromise(spawned, handlePromiseOnce);\n\treturn spawned;\n}\n\nexport function execaSync(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tconst input = handleInputSync(parsed.options);\n\n\tlet result;\n\ttry {\n\t\tresult = childProcess.spawnSync(parsed.file, parsed.args, {...parsed.options, input});\n\t} catch (error) {\n\t\tthrow makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t});\n\t}\n\n\tconst stdout = handleOutput(parsed.options, result.stdout, result.error);\n\tconst stderr = handleOutput(parsed.options, result.stderr, result.error);\n\n\tif (result.error || result.status !== 0 || result.signal !== null) {\n\t\tconst error = makeError({\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\terror: result.error,\n\t\t\tsignal: result.signal,\n\t\t\texitCode: result.status,\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: result.error && result.error.code === 'ETIMEDOUT',\n\t\t\tisCanceled: false,\n\t\t\tkilled: result.signal !== null,\n\t\t});\n\n\t\tif (!parsed.options.reject) {\n\t\t\treturn error;\n\t\t}\n\n\t\tthrow error;\n\t}\n\n\treturn {\n\t\tcommand,\n\t\tescapedCommand,\n\t\texitCode: 0,\n\t\tstdout,\n\t\tstderr,\n\t\tfailed: false,\n\t\ttimedOut: false,\n\t\tisCanceled: false,\n\t\tkilled: false,\n\t};\n}\n\nconst normalizeScriptStdin = ({input, inputFile, stdio}) => input === undefined && inputFile === undefined && stdio === undefined\n\t? {stdin: 'inherit'}\n\t: {};\n\nconst normalizeScriptOptions = (options = {}) => ({\n\tpreferLocal: true,\n\t...normalizeScriptStdin(options),\n\t...options,\n});\n\nfunction create$(options) {\n\tfunction $(templatesOrOptions, ...expressions) {\n\t\tif (!Array.isArray(templatesOrOptions)) {\n\t\t\treturn create$({...options, ...templatesOrOptions});\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templatesOrOptions, expressions);\n\t\treturn execa(file, args, normalizeScriptOptions(options));\n\t}\n\n\t$.sync = (templates, ...expressions) => {\n\t\tif (!Array.isArray(templates)) {\n\t\t\tthrow new TypeError('Please use $(options).sync`command` instead of $.sync(options)`command`.');\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templates, expressions);\n\t\treturn execaSync(file, args, normalizeScriptOptions(options));\n\t};\n\n\treturn $;\n}\n\nexport const $ = create$();\n\nexport function execaCommand(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execa(file, args, options);\n}\n\nexport function execaCommandSync(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execaSync(file, args, options);\n}\n\nexport function execaNode(scriptPath, args, options = {}) {\n\tif (args && !Array.isArray(args) && typeof args === 'object') {\n\t\toptions = args;\n\t\targs = [];\n\t}\n\n\tconst stdio = normalizeStdioNode(options);\n\tconst defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));\n\n\tconst {\n\t\tnodePath = process.execPath,\n\t\tnodeOptions = defaultExecArgv,\n\t} = options;\n\n\treturn execa(\n\t\tnodePath,\n\t\t[\n\t\t\t...nodeOptions,\n\t\t\tscriptPath,\n\t\t\t...(Array.isArray(args) ? args : []),\n\t\t],\n\t\t{\n\t\t\t...options,\n\t\t\tstdin: undefined,\n\t\t\tstdout: undefined,\n\t\t\tstderr: undefined,\n\t\t\tstdio,\n\t\t\tshell: false,\n\t\t},\n\t);\n}\n"],"names":["path"],"mappings":";;;;;;;;;;;;;;;;AAiBA,MAAM,qBAAqB,MAAO,MAAO;AAEzC,MAAM,SAAS,CAAC,EAAC,KAAK,WAAW,WAAW,aAAa,UAAU,SAAQ,MAAM;AAChF,QAAM,MAAM,YAAY,EAAC,GAAG,QAAQ,KAAK,GAAG,UAAS,IAAI;AAEzD,MAAI,aAAa;AAChB,WAAO,cAAc,EAAC,KAAK,KAAK,UAAU,SAAQ,CAAC;AAAA,EACnD;AAED,SAAO;AACR;AAEA,MAAM,kBAAkB,CAAC,MAAM,MAAM,UAAU,CAAA,MAAO;AACrD,QAAM,SAAS,WAAW,OAAO,MAAM,MAAM,OAAO;AACpD,SAAO,OAAO;AACd,SAAO,OAAO;AACd,YAAU,OAAO;AAEjB,YAAU;AAAA,IACT,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,mBAAmB;AAAA,IACnB,WAAW;AAAA,IACX,aAAa;AAAA,IACb,UAAU,QAAQ,OAAO,QAAQ,IAAK;AAAA,IACtC,UAAU,QAAQ;AAAA,IAClB,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,KAAK;AAAA,IACL,aAAa;AAAA,IACb,SAAS;AAAA,IACT,GAAG;AAAA,EACL;AAEC,UAAQ,MAAM,OAAO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ACjC;AAEO,SAAS,iBAAiB,SAAS,SAAS;AAClD,QAAM,CAAC,MAAM,GAAG,IAAI,IAAI,aAAa,OAAO;AAC5C,SAAO,UAAU,MAAM,MAAM,OAAO;AACrC;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/execa/index.js"],"sourcesContent":["import {Buffer} from 'node:buffer';\nimport path from 'node:path';\nimport childProcess from 'node:child_process';\nimport process from 'node:process';\nimport crossSpawn from 'cross-spawn';\nimport stripFinalNewline from 'strip-final-newline';\nimport {npmRunPathEnv} from 'npm-run-path';\nimport onetime from 'onetime';\nimport {makeError} from './lib/error.js';\nimport {normalizeStdio, normalizeStdioNode} from './lib/stdio.js';\nimport {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} from './lib/kill.js';\nimport {addPipeMethods} from './lib/pipe.js';\nimport {handleInput, getSpawnedResult, makeAllStream, handleInputSync} from './lib/stream.js';\nimport {mergePromise, getSpawnedPromise} from './lib/promise.js';\nimport {joinCommand, parseCommand, parseTemplates, getEscapedCommand} from './lib/command.js';\nimport {logCommand, verboseDefault} from './lib/verbose.js';\n\nconst DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;\n\nconst getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {\n\tconst env = extendEnv ? {...process.env, ...envOption} : envOption;\n\n\tif (preferLocal) {\n\t\treturn npmRunPathEnv({env, cwd: localDir, execPath});\n\t}\n\n\treturn env;\n};\n\nconst handleArguments = (file, args, options = {}) => {\n\tconst parsed = crossSpawn._parse(file, args, options);\n\tfile = parsed.command;\n\targs = parsed.args;\n\toptions = parsed.options;\n\n\toptions = {\n\t\tmaxBuffer: DEFAULT_MAX_BUFFER,\n\t\tbuffer: true,\n\t\tstripFinalNewline: true,\n\t\textendEnv: true,\n\t\tpreferLocal: false,\n\t\tlocalDir: options.cwd || process.cwd(),\n\t\texecPath: process.execPath,\n\t\tencoding: 'utf8',\n\t\treject: true,\n\t\tcleanup: true,\n\t\tall: false,\n\t\twindowsHide: true,\n\t\tverbose: verboseDefault,\n\t\t...options,\n\t};\n\n\toptions.env = getEnv(options);\n\n\toptions.stdio = normalizeStdio(options);\n\n\tif (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {\n\t\t// #116\n\t\targs.unshift('/q');\n\t}\n\n\treturn {file, args, options, parsed};\n};\n\nconst handleOutput = (options, value, error) => {\n\tif (typeof value !== 'string' && !Buffer.isBuffer(value)) {\n\t\t// When `execaSync()` errors, we normalize it to '' to mimic `execa()`\n\t\treturn error === undefined ? undefined : '';\n\t}\n\n\tif (options.stripFinalNewline) {\n\t\treturn stripFinalNewline(value);\n\t}\n\n\treturn value;\n};\n\nexport function execa(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tvalidateTimeout(parsed.options);\n\n\tlet spawned;\n\ttry {\n\t\tspawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);\n\t} catch (error) {\n\t\t// Ensure the returned error is always both a promise and a child process\n\t\tconst dummySpawned = new childProcess.ChildProcess();\n\t\tconst errorPromise = Promise.reject(makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t}));\n\t\tmergePromise(dummySpawned, errorPromise);\n\t\treturn dummySpawned;\n\t}\n\n\tconst spawnedPromise = getSpawnedPromise(spawned);\n\tconst timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);\n\tconst processDone = setExitHandler(spawned, parsed.options, timedPromise);\n\n\tconst context = {isCanceled: false};\n\n\tspawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));\n\tspawned.cancel = spawnedCancel.bind(null, spawned, context);\n\n\tconst handlePromise = async () => {\n\t\tconst [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);\n\t\tconst stdout = handleOutput(parsed.options, stdoutResult);\n\t\tconst stderr = handleOutput(parsed.options, stderrResult);\n\t\tconst all = handleOutput(parsed.options, allResult);\n\n\t\tif (error || exitCode !== 0 || signal !== null) {\n\t\t\tconst returnedError = makeError({\n\t\t\t\terror,\n\t\t\t\texitCode,\n\t\t\t\tsignal,\n\t\t\t\tstdout,\n\t\t\t\tstderr,\n\t\t\t\tall,\n\t\t\t\tcommand,\n\t\t\t\tescapedCommand,\n\t\t\t\tparsed,\n\t\t\t\ttimedOut,\n\t\t\t\tisCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),\n\t\t\t\tkilled: spawned.killed,\n\t\t\t});\n\n\t\t\tif (!parsed.options.reject) {\n\t\t\t\treturn returnedError;\n\t\t\t}\n\n\t\t\tthrow returnedError;\n\t\t}\n\n\t\treturn {\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\texitCode: 0,\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\tall,\n\t\t\tfailed: false,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t};\n\t};\n\n\tconst handlePromiseOnce = onetime(handlePromise);\n\n\thandleInput(spawned, parsed.options);\n\n\tspawned.all = makeAllStream(spawned, parsed.options);\n\n\taddPipeMethods(spawned);\n\tmergePromise(spawned, handlePromiseOnce);\n\treturn spawned;\n}\n\nexport function execaSync(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tconst input = handleInputSync(parsed.options);\n\n\tlet result;\n\ttry {\n\t\tresult = childProcess.spawnSync(parsed.file, parsed.args, {...parsed.options, input});\n\t} catch (error) {\n\t\tthrow makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t});\n\t}\n\n\tconst stdout = handleOutput(parsed.options, result.stdout, result.error);\n\tconst stderr = handleOutput(parsed.options, result.stderr, result.error);\n\n\tif (result.error || result.status !== 0 || result.signal !== null) {\n\t\tconst error = makeError({\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\terror: result.error,\n\t\t\tsignal: result.signal,\n\t\t\texitCode: result.status,\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: result.error && result.error.code === 'ETIMEDOUT',\n\t\t\tisCanceled: false,\n\t\t\tkilled: result.signal !== null,\n\t\t});\n\n\t\tif (!parsed.options.reject) {\n\t\t\treturn error;\n\t\t}\n\n\t\tthrow error;\n\t}\n\n\treturn {\n\t\tcommand,\n\t\tescapedCommand,\n\t\texitCode: 0,\n\t\tstdout,\n\t\tstderr,\n\t\tfailed: false,\n\t\ttimedOut: false,\n\t\tisCanceled: false,\n\t\tkilled: false,\n\t};\n}\n\nconst normalizeScriptStdin = ({input, inputFile, stdio}) => input === undefined && inputFile === undefined && stdio === undefined\n\t? {stdin: 'inherit'}\n\t: {};\n\nconst normalizeScriptOptions = (options = {}) => ({\n\tpreferLocal: true,\n\t...normalizeScriptStdin(options),\n\t...options,\n});\n\nfunction create$(options) {\n\tfunction $(templatesOrOptions, ...expressions) {\n\t\tif (!Array.isArray(templatesOrOptions)) {\n\t\t\treturn create$({...options, ...templatesOrOptions});\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templatesOrOptions, expressions);\n\t\treturn execa(file, args, normalizeScriptOptions(options));\n\t}\n\n\t$.sync = (templates, ...expressions) => {\n\t\tif (!Array.isArray(templates)) {\n\t\t\tthrow new TypeError('Please use $(options).sync`command` instead of $.sync(options)`command`.');\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templates, expressions);\n\t\treturn execaSync(file, args, normalizeScriptOptions(options));\n\t};\n\n\treturn $;\n}\n\nexport const $ = create$();\n\nexport function execaCommand(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execa(file, args, options);\n}\n\nexport function execaCommandSync(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execaSync(file, args, options);\n}\n\nexport function execaNode(scriptPath, args, options = {}) {\n\tif (args && !Array.isArray(args) && typeof args === 'object') {\n\t\toptions = args;\n\t\targs = [];\n\t}\n\n\tconst stdio = normalizeStdioNode(options);\n\tconst defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));\n\n\tconst {\n\t\tnodePath = process.execPath,\n\t\tnodeOptions = defaultExecArgv,\n\t} = options;\n\n\treturn execa(\n\t\tnodePath,\n\t\t[\n\t\t\t...nodeOptions,\n\t\t\tscriptPath,\n\t\t\t...(Array.isArray(args) ? args : []),\n\t\t],\n\t\t{\n\t\t\t...options,\n\t\t\tstdin: undefined,\n\t\t\tstdout: undefined,\n\t\t\tstderr: undefined,\n\t\t\tstdio,\n\t\t\tshell: false,\n\t\t},\n\t);\n}\n"],"names":["path"],"mappings":";;;;;;;;;;;;;;;;AAiBA,MAAM,qBAAqB,MAAO,MAAO;AAEzC,MAAM,SAAS,CAAC,EAAC,KAAK,WAAW,WAAW,aAAa,UAAU,SAAQ,MAAM;AAChF,QAAM,MAAM,YAAY,EAAC,GAAG,QAAQ,KAAK,GAAG,UAAS,IAAI;AAEzD,MAAI,aAAa;AAChB,WAAO,cAAc,EAAC,KAAK,KAAK,UAAU,SAAQ,CAAC;AAAA,EACnD;AAED,SAAO;AACR;AAEA,MAAM,kBAAkB,CAAC,MAAM,MAAM,UAAU,CAAA,MAAO;AACrD,QAAM,SAAS,WAAW,OAAO,MAAM,MAAM,OAAO;AACpD,SAAO,OAAO;AACd,SAAO,OAAO;AACd,YAAU,OAAO;AAEjB,YAAU;A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,QAAM,oBAAoB,QAAQ,aAAa;AAE/C,cAAY,SAAS,OAAO,OAAO;AAEnC,UAAQ,MAAM,cAAc,SAAS,OAAO,OAAO;AAEnD,iBAAe,OAAO;AACtB,eAAa,SAAS,iBAAiB;AACvC,SAAO;AACR;AAoGO,SAAS,aAAa,SAAS,SAAS;AAC9C,QAAM,CAAC,MAAM,GAAG,IAAI,IAAI,aAAa,OAAO;AAC5C,SAAO,MAAM,MAAM,MAAM,OAAO;AACjC;","x_google_ignoreList":[0]}
|
@@ -9,20 +9,6 @@ const validateInputOptions = (input) => {
|
|
9
9
|
throw new TypeError("The `input` and `inputFile` options cannot be both set.");
|
10
10
|
}
|
11
11
|
};
|
12
|
-
const getInputSync = ({ input, inputFile }) => {
|
13
|
-
if (typeof inputFile !== "string") {
|
14
|
-
return input;
|
15
|
-
}
|
16
|
-
validateInputOptions(input);
|
17
|
-
return node_fs.readFileSync(inputFile);
|
18
|
-
};
|
19
|
-
const handleInputSync = (options) => {
|
20
|
-
const input = getInputSync(options);
|
21
|
-
if (index.isStream(input)) {
|
22
|
-
throw new TypeError("The `input` option cannot be a stream in sync mode");
|
23
|
-
}
|
24
|
-
return input;
|
25
|
-
};
|
26
12
|
const getInput = ({ input, inputFile }) => {
|
27
13
|
if (typeof inputFile !== "string") {
|
28
14
|
return input;
|
@@ -91,6 +77,5 @@ const getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, max
|
|
91
77
|
};
|
92
78
|
exports.getSpawnedResult = getSpawnedResult;
|
93
79
|
exports.handleInput = handleInput;
|
94
|
-
exports.handleInputSync = handleInputSync;
|
95
80
|
exports.makeAllStream = makeAllStream;
|
96
81
|
//# sourceMappingURL=stream.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stream.cjs","sources":["../../../../../../node_modules/execa/lib/stream.js"],"sourcesContent":["import {createReadStream, readFileSync} from 'node:fs';\nimport {isStream} from 'is-stream';\nimport getStream from 'get-stream';\nimport mergeStream from 'merge-stream';\n\nconst validateInputOptions = input => {\n\tif (input !== undefined) {\n\t\tthrow new TypeError('The `input` and `inputFile` options cannot be both set.');\n\t}\n};\n\nconst getInputSync = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn readFileSync(inputFile);\n};\n\n// `input` and `inputFile` option in sync mode\nexport const handleInputSync = options => {\n\tconst input = getInputSync(options);\n\n\tif (isStream(input)) {\n\t\tthrow new TypeError('The `input` option cannot be a stream in sync mode');\n\t}\n\n\treturn input;\n};\n\nconst getInput = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn createReadStream(inputFile);\n};\n\n// `input` and `inputFile` option in async mode\nexport const handleInput = (spawned, options) => {\n\tconst input = getInput(options);\n\n\tif (input === undefined) {\n\t\treturn;\n\t}\n\n\tif (isStream(input)) {\n\t\tinput.pipe(spawned.stdin);\n\t} else {\n\t\tspawned.stdin.end(input);\n\t}\n};\n\n// `all` interleaves `stdout` and `stderr`\nexport const makeAllStream = (spawned, {all}) => {\n\tif (!all || (!spawned.stdout && !spawned.stderr)) {\n\t\treturn;\n\t}\n\n\tconst mixed = mergeStream();\n\n\tif (spawned.stdout) {\n\t\tmixed.add(spawned.stdout);\n\t}\n\n\tif (spawned.stderr) {\n\t\tmixed.add(spawned.stderr);\n\t}\n\n\treturn mixed;\n};\n\n// On failure, `result.stdout|stderr|all` should contain the currently buffered stream\nconst getBufferedData = async (stream, streamPromise) => {\n\t// When `buffer` is `false`, `streamPromise` is `undefined` and there is no buffered data to retrieve\n\tif (!stream || streamPromise === undefined) {\n\t\treturn;\n\t}\n\n\tstream.destroy();\n\n\ttry {\n\t\treturn await streamPromise;\n\t} catch (error) {\n\t\treturn error.bufferedData;\n\t}\n};\n\nconst getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {\n\tif (!stream || !buffer) {\n\t\treturn;\n\t}\n\n\tif (encoding) {\n\t\treturn getStream(stream, {encoding, maxBuffer});\n\t}\n\n\treturn getStream.buffer(stream, {maxBuffer});\n};\n\n// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)\nexport const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {\n\tconst stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});\n\tconst stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});\n\tconst allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});\n\n\ttry {\n\t\treturn await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);\n\t} catch (error) {\n\t\treturn Promise.all([\n\t\t\t{error, signal: error.signal, timedOut: error.timedOut},\n\t\t\tgetBufferedData(stdout, stdoutPromise),\n\t\t\tgetBufferedData(stderr, stderrPromise),\n\t\t\tgetBufferedData(all, allPromise),\n\t\t]);\n\t}\n};\n"],"names":["
|
1
|
+
{"version":3,"file":"stream.cjs","sources":["../../../../../../node_modules/execa/lib/stream.js"],"sourcesContent":["import {createReadStream, readFileSync} from 'node:fs';\nimport {isStream} from 'is-stream';\nimport getStream from 'get-stream';\nimport mergeStream from 'merge-stream';\n\nconst validateInputOptions = input => {\n\tif (input !== undefined) {\n\t\tthrow new TypeError('The `input` and `inputFile` options cannot be both set.');\n\t}\n};\n\nconst getInputSync = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn readFileSync(inputFile);\n};\n\n// `input` and `inputFile` option in sync mode\nexport const handleInputSync = options => {\n\tconst input = getInputSync(options);\n\n\tif (isStream(input)) {\n\t\tthrow new TypeError('The `input` option cannot be a stream in sync mode');\n\t}\n\n\treturn input;\n};\n\nconst getInput = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn createReadStream(inputFile);\n};\n\n// `input` and `inputFile` option in async mode\nexport const handleInput = (spawned, options) => {\n\tconst input = getInput(options);\n\n\tif (input === undefined) {\n\t\treturn;\n\t}\n\n\tif (isStream(input)) {\n\t\tinput.pipe(spawned.stdin);\n\t} else {\n\t\tspawned.stdin.end(input);\n\t}\n};\n\n// `all` interleaves `stdout` and `stderr`\nexport const makeAllStream = (spawned, {all}) => {\n\tif (!all || (!spawned.stdout && !spawned.stderr)) {\n\t\treturn;\n\t}\n\n\tconst mixed = mergeStream();\n\n\tif (spawned.stdout) {\n\t\tmixed.add(spawned.stdout);\n\t}\n\n\tif (spawned.stderr) {\n\t\tmixed.add(spawned.stderr);\n\t}\n\n\treturn mixed;\n};\n\n// On failure, `result.stdout|stderr|all` should contain the currently buffered stream\nconst getBufferedData = async (stream, streamPromise) => {\n\t// When `buffer` is `false`, `streamPromise` is `undefined` and there is no buffered data to retrieve\n\tif (!stream || streamPromise === undefined) {\n\t\treturn;\n\t}\n\n\tstream.destroy();\n\n\ttry {\n\t\treturn await streamPromise;\n\t} catch (error) {\n\t\treturn error.bufferedData;\n\t}\n};\n\nconst getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {\n\tif (!stream || !buffer) {\n\t\treturn;\n\t}\n\n\tif (encoding) {\n\t\treturn getStream(stream, {encoding, maxBuffer});\n\t}\n\n\treturn getStream.buffer(stream, {maxBuffer});\n};\n\n// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)\nexport const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {\n\tconst stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});\n\tconst stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});\n\tconst allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});\n\n\ttry {\n\t\treturn await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);\n\t} catch (error) {\n\t\treturn Promise.all([\n\t\t\t{error, signal: error.signal, timedOut: error.timedOut},\n\t\t\tgetBufferedData(stdout, stdoutPromise),\n\t\t\tgetBufferedData(stderr, stderrPromise),\n\t\t\tgetBufferedData(all, allPromise),\n\t\t]);\n\t}\n};\n"],"names":["createReadStream","isStream","mergeStream","getStream"],"mappings":";;;;;;AAKA,MAAM,uBAAuB,WAAS;AACrC,MAAI,UAAU,QAAW;AACxB,UAAM,IAAI,UAAU,yDAAyD;AAAA,EAC7E;AACF;AAsBA,MAAM,WAAW,CAAC,EAAC,OAAO,UAAS,MAAM;AACxC,MAAI,OAAO,cAAc,UAAU;AAClC,WAAO;AAAA,EACP;AAED,uBAAqB,KAAK;AAC1B,SAAOA,QAAAA,iBAAiB,SAAS;AAClC;AAGY,MAAC,cAAc,CAAC,SAAS,YAAY;AAChD,QAAM,QAAQ,SAAS,OAAO;AAE9B,MAAI,UAAU,QAAW;AACxB;AAAA,EACA;AAED,MAAIC,MAAAA,SAAS,KAAK,GAAG;AACpB,UAAM,KAAK,QAAQ,KAAK;AAAA,EAC1B,OAAQ;AACN,YAAQ,MAAM,IAAI,KAAK;AAAA,EACvB;AACF;AAGY,MAAC,gBAAgB,CAAC,SAAS,EAAC,IAAG,MAAM;AAChD,MAAI,CAAC,OAAQ,CAAC,QAAQ,UAAU,CAAC,QAAQ,QAAS;AACjD;AAAA,EACA;AAED,QAAM,QAAQC;AAEd,MAAI,QAAQ,QAAQ;AACnB,UAAM,IAAI,QAAQ,MAAM;AAAA,EACxB;AAED,MAAI,QAAQ,QAAQ;AACnB,UAAM,IAAI,QAAQ,MAAM;AAAA,EACxB;AAED,SAAO;AACR;AAGA,MAAM,kBAAkB,OAAO,QAAQ,kBAAkB;AAExD,MAAI,CAAC,UAAU,kBAAkB,QAAW;AAC3C;AAAA,EACA;AAED,SAAO,QAAO;AAEd,MAAI;AACH,WAAO,MAAM;AAAA,EACb,SAAQ,OAAO;AACf,WAAO,MAAM;AAAA,EACb;AACF;AAEA,MAAM,mBAAmB,CAAC,QAAQ,EAAC,UAAU,QAAQ,UAAS,MAAM;AACnE,MAAI,CAAC,UAAU,CAAC,QAAQ;AACvB;AAAA,EACA;AAED,MAAI,UAAU;AACb,WAAOC,QAAU,QAAQ,EAAC,UAAU,UAAS,CAAC;AAAA,EAC9C;AAED,SAAOA,QAAU,OAAO,QAAQ,EAAC,UAAS,CAAC;AAC5C;AAGY,MAAC,mBAAmB,OAAO,EAAC,QAAQ,QAAQ,IAAG,GAAG,EAAC,UAAU,QAAQ,UAAS,GAAG,gBAAgB;AAC5G,QAAM,gBAAgB,iBAAiB,QAAQ,EAAC,UAAU,QAAQ,UAAS,CAAC;AAC5E,QAAM,gBAAgB,iBAAiB,QAAQ,EAAC,UAAU,QAAQ,UAAS,CAAC;AAC5E,QAAM,aAAa,iBAAiB,KAAK,EAAC,UAAU,QAAQ,WAAW,YAAY,EAAC,CAAC;AAErF,MAAI;AACH,WAAO,MAAM,QAAQ,IAAI,CAAC,aAAa,eAAe,eAAe,UAAU,CAAC;AAAA,EAChF,SAAQ,OAAO;AACf,WAAO,QAAQ,IAAI;AAAA,MAClB,EAAC,OAAO,QAAQ,MAAM,QAAQ,UAAU,MAAM,SAAQ;AAAA,MACtD,gBAAgB,QAAQ,aAAa;AAAA,MACrC,gBAAgB,QAAQ,aAAa;AAAA,MACrC,gBAAgB,KAAK,UAAU;AAAA,IAClC,CAAG;AAAA,EACD;AACF;;;;","x_google_ignoreList":[0]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { createReadStream } from "node:fs";
|
2
2
|
import { isStream } from './../_node_modules/is-stream/index.js';
|
3
3
|
import getStream from "../../get-stream/index.js";
|
4
4
|
import mergeStream from "../../merge-stream/index.js";
|
@@ -7,20 +7,6 @@ const validateInputOptions = (input) => {
|
|
7
7
|
throw new TypeError("The `input` and `inputFile` options cannot be both set.");
|
8
8
|
}
|
9
9
|
};
|
10
|
-
const getInputSync = ({ input, inputFile }) => {
|
11
|
-
if (typeof inputFile !== "string") {
|
12
|
-
return input;
|
13
|
-
}
|
14
|
-
validateInputOptions(input);
|
15
|
-
return readFileSync(inputFile);
|
16
|
-
};
|
17
|
-
const handleInputSync = (options) => {
|
18
|
-
const input = getInputSync(options);
|
19
|
-
if (isStream(input)) {
|
20
|
-
throw new TypeError("The `input` option cannot be a stream in sync mode");
|
21
|
-
}
|
22
|
-
return input;
|
23
|
-
};
|
24
10
|
const getInput = ({ input, inputFile }) => {
|
25
11
|
if (typeof inputFile !== "string") {
|
26
12
|
return input;
|
@@ -90,7 +76,6 @@ const getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, max
|
|
90
76
|
export {
|
91
77
|
getSpawnedResult,
|
92
78
|
handleInput,
|
93
|
-
handleInputSync,
|
94
79
|
makeAllStream
|
95
80
|
};
|
96
81
|
//# sourceMappingURL=stream.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stream.js","sources":["../../../../../../node_modules/execa/lib/stream.js"],"sourcesContent":["import {createReadStream, readFileSync} from 'node:fs';\nimport {isStream} from 'is-stream';\nimport getStream from 'get-stream';\nimport mergeStream from 'merge-stream';\n\nconst validateInputOptions = input => {\n\tif (input !== undefined) {\n\t\tthrow new TypeError('The `input` and `inputFile` options cannot be both set.');\n\t}\n};\n\nconst getInputSync = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn readFileSync(inputFile);\n};\n\n// `input` and `inputFile` option in sync mode\nexport const handleInputSync = options => {\n\tconst input = getInputSync(options);\n\n\tif (isStream(input)) {\n\t\tthrow new TypeError('The `input` option cannot be a stream in sync mode');\n\t}\n\n\treturn input;\n};\n\nconst getInput = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn createReadStream(inputFile);\n};\n\n// `input` and `inputFile` option in async mode\nexport const handleInput = (spawned, options) => {\n\tconst input = getInput(options);\n\n\tif (input === undefined) {\n\t\treturn;\n\t}\n\n\tif (isStream(input)) {\n\t\tinput.pipe(spawned.stdin);\n\t} else {\n\t\tspawned.stdin.end(input);\n\t}\n};\n\n// `all` interleaves `stdout` and `stderr`\nexport const makeAllStream = (spawned, {all}) => {\n\tif (!all || (!spawned.stdout && !spawned.stderr)) {\n\t\treturn;\n\t}\n\n\tconst mixed = mergeStream();\n\n\tif (spawned.stdout) {\n\t\tmixed.add(spawned.stdout);\n\t}\n\n\tif (spawned.stderr) {\n\t\tmixed.add(spawned.stderr);\n\t}\n\n\treturn mixed;\n};\n\n// On failure, `result.stdout|stderr|all` should contain the currently buffered stream\nconst getBufferedData = async (stream, streamPromise) => {\n\t// When `buffer` is `false`, `streamPromise` is `undefined` and there is no buffered data to retrieve\n\tif (!stream || streamPromise === undefined) {\n\t\treturn;\n\t}\n\n\tstream.destroy();\n\n\ttry {\n\t\treturn await streamPromise;\n\t} catch (error) {\n\t\treturn error.bufferedData;\n\t}\n};\n\nconst getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {\n\tif (!stream || !buffer) {\n\t\treturn;\n\t}\n\n\tif (encoding) {\n\t\treturn getStream(stream, {encoding, maxBuffer});\n\t}\n\n\treturn getStream.buffer(stream, {maxBuffer});\n};\n\n// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)\nexport const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {\n\tconst stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});\n\tconst stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});\n\tconst allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});\n\n\ttry {\n\t\treturn await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);\n\t} catch (error) {\n\t\treturn Promise.all([\n\t\t\t{error, signal: error.signal, timedOut: error.timedOut},\n\t\t\tgetBufferedData(stdout, stdoutPromise),\n\t\t\tgetBufferedData(stderr, stderrPromise),\n\t\t\tgetBufferedData(all, allPromise),\n\t\t]);\n\t}\n};\n"],"names":[],"mappings":";;;;AAKA,MAAM,uBAAuB,WAAS;AACrC,MAAI,UAAU,QAAW;AACxB,UAAM,IAAI,UAAU,yDAAyD;AAAA,EAC7E;AACF;
|
1
|
+
{"version":3,"file":"stream.js","sources":["../../../../../../node_modules/execa/lib/stream.js"],"sourcesContent":["import {createReadStream, readFileSync} from 'node:fs';\nimport {isStream} from 'is-stream';\nimport getStream from 'get-stream';\nimport mergeStream from 'merge-stream';\n\nconst validateInputOptions = input => {\n\tif (input !== undefined) {\n\t\tthrow new TypeError('The `input` and `inputFile` options cannot be both set.');\n\t}\n};\n\nconst getInputSync = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn readFileSync(inputFile);\n};\n\n// `input` and `inputFile` option in sync mode\nexport const handleInputSync = options => {\n\tconst input = getInputSync(options);\n\n\tif (isStream(input)) {\n\t\tthrow new TypeError('The `input` option cannot be a stream in sync mode');\n\t}\n\n\treturn input;\n};\n\nconst getInput = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn createReadStream(inputFile);\n};\n\n// `input` and `inputFile` option in async mode\nexport const handleInput = (spawned, options) => {\n\tconst input = getInput(options);\n\n\tif (input === undefined) {\n\t\treturn;\n\t}\n\n\tif (isStream(input)) {\n\t\tinput.pipe(spawned.stdin);\n\t} else {\n\t\tspawned.stdin.end(input);\n\t}\n};\n\n// `all` interleaves `stdout` and `stderr`\nexport const makeAllStream = (spawned, {all}) => {\n\tif (!all || (!spawned.stdout && !spawned.stderr)) {\n\t\treturn;\n\t}\n\n\tconst mixed = mergeStream();\n\n\tif (spawned.stdout) {\n\t\tmixed.add(spawned.stdout);\n\t}\n\n\tif (spawned.stderr) {\n\t\tmixed.add(spawned.stderr);\n\t}\n\n\treturn mixed;\n};\n\n// On failure, `result.stdout|stderr|all` should contain the currently buffered stream\nconst getBufferedData = async (stream, streamPromise) => {\n\t// When `buffer` is `false`, `streamPromise` is `undefined` and there is no buffered data to retrieve\n\tif (!stream || streamPromise === undefined) {\n\t\treturn;\n\t}\n\n\tstream.destroy();\n\n\ttry {\n\t\treturn await streamPromise;\n\t} catch (error) {\n\t\treturn error.bufferedData;\n\t}\n};\n\nconst getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {\n\tif (!stream || !buffer) {\n\t\treturn;\n\t}\n\n\tif (encoding) {\n\t\treturn getStream(stream, {encoding, maxBuffer});\n\t}\n\n\treturn getStream.buffer(stream, {maxBuffer});\n};\n\n// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)\nexport const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {\n\tconst stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});\n\tconst stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});\n\tconst allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});\n\n\ttry {\n\t\treturn await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);\n\t} catch (error) {\n\t\treturn Promise.all([\n\t\t\t{error, signal: error.signal, timedOut: error.timedOut},\n\t\t\tgetBufferedData(stdout, stdoutPromise),\n\t\t\tgetBufferedData(stderr, stderrPromise),\n\t\t\tgetBufferedData(all, allPromise),\n\t\t]);\n\t}\n};\n"],"names":[],"mappings":";;;;AAKA,MAAM,uBAAuB,WAAS;AACrC,MAAI,UAAU,QAAW;AACxB,UAAM,IAAI,UAAU,yDAAyD;AAAA,EAC7E;AACF;AAsBA,MAAM,WAAW,CAAC,EAAC,OAAO,UAAS,MAAM;AACxC,MAAI,OAAO,cAAc,UAAU;AAClC,WAAO;AAAA,EACP;AAED,uBAAqB,KAAK;AAC1B,SAAO,iBAAiB,SAAS;AAClC;AAGY,MAAC,cAAc,CAAC,SAAS,YAAY;AAChD,QAAM,QAAQ,SAAS,OAAO;AAE9B,M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AErF,MAAI;AACH,WAAO,MAAM,QAAQ,IAAI,CAAC,aAAa,eAAe,eAAe,UAAU,CAAC;AAAA,EAChF,SAAQ,OAAO;AACf,WAAO,QAAQ,IAAI;AAAA,MAClB,EAAC,OAAO,QAAQ,MAAM,QAAQ,UAAU,MAAM,SAAQ;AAAA,MACtD,gBAAgB,QAAQ,aAAa;AAAA,MACrC,gBAAgB,QAAQ,aAAa;AAAA,MACrC,gBAAgB,KAAK,UAAU;AAAA,IAClC,CAAG;AAAA,EACD;AACF;","x_google_ignoreList":[0]}
|
package/dist/_virtual/index2.cjs
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
const _commonjsHelpers = require("./_commonjsHelpers.cjs");
|
3
|
+
const index = require('./../_node_modules/@amplitude/analytics-node/lib/esm/index.cjs');
|
4
|
+
const require$$0 = /* @__PURE__ */ _commonjsHelpers.getAugmentedNamespace(index);
|
5
|
+
module.exports = require$$0;
|
5
6
|
//# sourceMappingURL=index2.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
package/dist/_virtual/index2.js
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
|
1
|
+
import { getAugmentedNamespace } from "./_commonjsHelpers.js";
|
2
|
+
import * as index from './../_node_modules/@amplitude/analytics-node/lib/esm/index.js';
|
3
|
+
const require$$0 = /* @__PURE__ */ getAugmentedNamespace(index);
|
2
4
|
export {
|
3
|
-
|
5
|
+
require$$0 as default
|
4
6
|
};
|
5
7
|
//# sourceMappingURL=index2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index2.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
package/dist/_virtual/index3.cjs
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
module.exports = require$$0;
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
var crossSpawn = { exports: {} };
|
4
|
+
exports.__module = crossSpawn;
|
6
5
|
//# sourceMappingURL=index3.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index3.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index3.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/_virtual/index3.js
CHANGED
@@ -1,7 +1,5 @@
|
|
1
|
-
|
2
|
-
import * as index from './../_node_modules/@amplitude/analytics-node/lib/esm/index.js';
|
3
|
-
const require$$0 = /* @__PURE__ */ getAugmentedNamespace(index);
|
1
|
+
var crossSpawn = { exports: {} };
|
4
2
|
export {
|
5
|
-
|
3
|
+
crossSpawn as __module
|
6
4
|
};
|
7
5
|
//# sourceMappingURL=index3.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/client/index.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
export { createSliceMachineManagerClient } from "../managers/createSliceMachineManagerClient";
|
2
2
|
export type { CreateSliceMachineManagerClientArgs, SliceMachineManagerClient, } from "../managers/createSliceMachineManagerClient";
|
3
|
-
export { GIT_PROVIDER, type GitProvider } from "../constants/GIT_PROVIDER";
|
4
3
|
export type { Environment } from "../managers/prismicRepository/types";
|
5
4
|
export type { SliceMachineManagerPushSliceReturnType } from "../managers/slices/SlicesManager";
|
6
5
|
export { InternalError, NotFoundError, SliceMachineError, UnauthenticatedError, UnauthorizedError, UnexpectedDataError, isInternalError, isNotFoundError, isPluginError, isSliceMachineError, isUnauthenticatedError, isUnauthorizedError, isUnexpectedDataError, isInvalidActiveEnvironmentError, isUnsupportedError, } from "../errors";
|
package/dist/client.cjs
CHANGED
@@ -1,11 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
3
|
const createSliceMachineManagerClient = require("./managers/createSliceMachineManagerClient.cjs");
|
4
|
-
const GIT_PROVIDER = require("./constants/GIT_PROVIDER.cjs");
|
5
4
|
const errors = require("./errors.cjs");
|
6
5
|
const DecodeError = require("./lib/DecodeError.cjs");
|
7
6
|
exports.createSliceMachineManagerClient = createSliceMachineManagerClient.createSliceMachineManagerClient;
|
8
|
-
exports.GIT_PROVIDER = GIT_PROVIDER.GIT_PROVIDER;
|
9
7
|
exports.InternalError = errors.InternalError;
|
10
8
|
exports.NotFoundError = errors.NotFoundError;
|
11
9
|
exports.SliceMachineError = errors.SliceMachineError;
|
package/dist/client.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"client.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/client.js
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
import { createSliceMachineManagerClient } from "./managers/createSliceMachineManagerClient.js";
|
2
|
-
import { GIT_PROVIDER } from "./constants/GIT_PROVIDER.js";
|
3
2
|
import { InternalError, NotFoundError, SliceMachineError, UnauthenticatedError, UnauthorizedError, UnexpectedDataError, isInternalError, isInvalidActiveEnvironmentError, isNotFoundError, isPluginError, isSliceMachineError, isUnauthenticatedError, isUnauthorizedError, isUnexpectedDataError, isUnsupportedError } from "./errors.js";
|
4
3
|
import { DecodeError } from "./lib/DecodeError.js";
|
5
4
|
export {
|
6
5
|
DecodeError,
|
7
|
-
GIT_PROVIDER,
|
8
6
|
InternalError,
|
9
7
|
NotFoundError,
|
10
8
|
SliceMachineError,
|
package/dist/client.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"client.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
package/dist/index.d.ts
CHANGED
@@ -4,7 +4,6 @@ export type { SliceMachineManager } from "./managers/SliceMachineManager";
|
|
4
4
|
export { createSliceMachineManager } from "./managers/createSliceMachineManager";
|
5
5
|
export { createSliceMachineManagerMiddleware } from "./managers/createSliceMachineManagerMiddleware";
|
6
6
|
export type { CreateSliceMachineManagerMiddlewareArgs } from "./managers/createSliceMachineManagerMiddleware";
|
7
|
-
export type { GitOwner, GitRepo, GitRepoSpecifier } from "./managers/git/types";
|
8
7
|
export type { Environment, PushChangesLimit, } from "./managers/prismicRepository/types";
|
9
8
|
export type { PrismicAuthManager, PrismicUserProfile, PrismicAuthState, } from "./auth/PrismicAuthManager";
|
10
9
|
export { createPrismicAuthManager } from "./auth/createPrismicAuthManager";
|
@@ -25,7 +25,6 @@ const TelemetryManager = require("./telemetry/TelemetryManager.cjs");
|
|
25
25
|
const buildPrismicRepositoryAPIEndpoint = require("../lib/buildPrismicRepositoryAPIEndpoint.cjs");
|
26
26
|
const DocumentationManager = require("./documentation/DocumentationManager.cjs");
|
27
27
|
const SliceTemplateLibraryManager = require("./sliceTemplateLibrary/SliceTemplateLibraryManager.cjs");
|
28
|
-
const GitManager = require("./git/GitManager.cjs");
|
29
28
|
function _interopNamespaceDefault(e) {
|
30
29
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
31
30
|
if (e) {
|
@@ -61,7 +60,6 @@ class SliceMachineManager {
|
|
61
60
|
__publicField(this, "telemetry");
|
62
61
|
__publicField(this, "user");
|
63
62
|
__publicField(this, "versions");
|
64
|
-
__publicField(this, "git");
|
65
63
|
this._prismicAuthManager = createPrismicAuthManager.createPrismicAuthManager();
|
66
64
|
this.user = new UserManager.UserManager(this);
|
67
65
|
this.prismicRepository = new PrismicRepositoryManager.PrismicRepositoryManager(this);
|
@@ -78,7 +76,6 @@ class SliceMachineManager {
|
|
78
76
|
this.sliceTemplateLibrary = new SliceTemplateLibraryManager.SliceTemplateLibraryManager(this);
|
79
77
|
this.versions = new VersionsManager.VersionsManager(this);
|
80
78
|
this.telemetry = new TelemetryManager.TelemetryManager(this);
|
81
|
-
this.git = new GitManager.GitManager(this);
|
82
79
|
this.cwd = (args == null ? void 0 : args.cwd) ?? process.cwd();
|
83
80
|
}
|
84
81
|
// The `_sliceMachinePluginRunner` property is hidden behind a function to
|