sim 2.2.22-dev.262.1 → 2.2.22-preview.263.1
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/generated/v2-api.d.ts +1 -1
- package/dist/index.js +6 -3
- package/dist/runtime.js +6 -3
- package/package.json +1 -1
|
@@ -14426,7 +14426,7 @@ export declare const V2_OPERATIONS: {
|
|
|
14426
14426
|
readonly path: '/api/v2/files/[fileId]';
|
|
14427
14427
|
readonly pathParams: readonly ['fileId'];
|
|
14428
14428
|
readonly pathParamDocs: {
|
|
14429
|
-
readonly fileId: 'File identifier.';
|
|
14429
|
+
readonly fileId: 'File identifier, or the VFS path of a live file: `files/<folder>/<name>`. Pass the id when two files in a folder have names that display alike.';
|
|
14430
14430
|
};
|
|
14431
14431
|
readonly responseMode: 'binary';
|
|
14432
14432
|
readonly summary: 'Download file';
|
package/dist/index.js
CHANGED
|
@@ -11827,7 +11827,9 @@ var V2_OPERATIONS = {
|
|
|
11827
11827
|
method: "GET",
|
|
11828
11828
|
path: "/api/v2/files/[fileId]",
|
|
11829
11829
|
pathParams: ["fileId"],
|
|
11830
|
-
pathParamDocs: {
|
|
11830
|
+
pathParamDocs: {
|
|
11831
|
+
fileId: "File identifier, or the VFS path of a live file: `files/<folder>/<name>`. Pass the id when two files in a folder have names that display alike."
|
|
11832
|
+
},
|
|
11831
11833
|
responseMode: "binary",
|
|
11832
11834
|
summary: "Download file",
|
|
11833
11835
|
query: {
|
|
@@ -23116,8 +23118,9 @@ async function downloadToOutput(connect, operation, pathParams, options, scope,
|
|
|
23116
23118
|
return;
|
|
23117
23119
|
}
|
|
23118
23120
|
const savedTarget = await saveToFile(response.body, target, Boolean(options.force));
|
|
23121
|
+
const fileId = pathParams.fileId?.startsWith("files/") ? undefined : pathParams.fileId;
|
|
23119
23122
|
printProtocolResult(profile.output, {
|
|
23120
|
-
...
|
|
23123
|
+
...fileId ? { id: fileId } : {},
|
|
23121
23124
|
path: savedTarget,
|
|
23122
23125
|
status: "saved"
|
|
23123
23126
|
});
|
|
@@ -23140,7 +23143,7 @@ function attachProjectFileSnapshotExport(files) {
|
|
|
23140
23143
|
}
|
|
23141
23144
|
function attachFileGet(files) {
|
|
23142
23145
|
const [command, connect] = apiCommand(files, "get", ["downloadFile"]);
|
|
23143
|
-
command.argument("<fileId>", "File whose content to read").allowExcessArguments(false).description("Download a file’s content to stdout or a local file").option("-o, --output-file <path>", "Write content to a file instead of stdout").option("--force", "Overwrite --output-file if it already exists").action((fileId, options) => downloadToOutput(connect, "downloadFile", { fileId }, options, "workspace", {}, { metadataCommand: `files describe ${fileId}` }));
|
|
23146
|
+
command.argument("<fileId>", "File whose content to read: its id, or its `files/<folder>/<name>` VFS path").allowExcessArguments(false).description("Download a file’s content to stdout or a local file").option("-o, --output-file <path>", "Write content to a file instead of stdout").option("--force", "Overwrite --output-file if it already exists").action((fileId, options) => downloadToOutput(connect, "downloadFile", { fileId }, options, "workspace", {}, { metadataCommand: `files describe ${fileId}` }));
|
|
23144
23147
|
}
|
|
23145
23148
|
function attachFileVersionDownload(versions) {
|
|
23146
23149
|
const [command, connect] = apiCommand(versions, "download", ["downloadFileVersion"]);
|
package/dist/runtime.js
CHANGED
|
@@ -11876,7 +11876,9 @@ var V2_OPERATIONS = {
|
|
|
11876
11876
|
method: "GET",
|
|
11877
11877
|
path: "/api/v2/files/[fileId]",
|
|
11878
11878
|
pathParams: ["fileId"],
|
|
11879
|
-
pathParamDocs: {
|
|
11879
|
+
pathParamDocs: {
|
|
11880
|
+
fileId: "File identifier, or the VFS path of a live file: `files/<folder>/<name>`. Pass the id when two files in a folder have names that display alike."
|
|
11881
|
+
},
|
|
11880
11882
|
responseMode: "binary",
|
|
11881
11883
|
summary: "Download file",
|
|
11882
11884
|
query: {
|
|
@@ -23165,8 +23167,9 @@ async function downloadToOutput(connect, operation, pathParams, options, scope,
|
|
|
23165
23167
|
return;
|
|
23166
23168
|
}
|
|
23167
23169
|
const savedTarget = await saveToFile(response.body, target, Boolean(options.force));
|
|
23170
|
+
const fileId = pathParams.fileId?.startsWith("files/") ? undefined : pathParams.fileId;
|
|
23168
23171
|
printProtocolResult(profile.output, {
|
|
23169
|
-
...
|
|
23172
|
+
...fileId ? { id: fileId } : {},
|
|
23170
23173
|
path: savedTarget,
|
|
23171
23174
|
status: "saved"
|
|
23172
23175
|
});
|
|
@@ -23189,7 +23192,7 @@ function attachProjectFileSnapshotExport(files) {
|
|
|
23189
23192
|
}
|
|
23190
23193
|
function attachFileGet(files) {
|
|
23191
23194
|
const [command, connect] = apiCommand(files, "get", ["downloadFile"]);
|
|
23192
|
-
command.argument("<fileId>", "File whose content to read").allowExcessArguments(false).description("Download a file’s content to stdout or a local file").option("-o, --output-file <path>", "Write content to a file instead of stdout").option("--force", "Overwrite --output-file if it already exists").action((fileId, options) => downloadToOutput(connect, "downloadFile", { fileId }, options, "workspace", {}, { metadataCommand: `files describe ${fileId}` }));
|
|
23195
|
+
command.argument("<fileId>", "File whose content to read: its id, or its `files/<folder>/<name>` VFS path").allowExcessArguments(false).description("Download a file’s content to stdout or a local file").option("-o, --output-file <path>", "Write content to a file instead of stdout").option("--force", "Overwrite --output-file if it already exists").action((fileId, options) => downloadToOutput(connect, "downloadFile", { fileId }, options, "workspace", {}, { metadataCommand: `files describe ${fileId}` }));
|
|
23193
23196
|
}
|
|
23194
23197
|
function attachFileVersionDownload(versions) {
|
|
23195
23198
|
const [command, connect] = apiCommand(versions, "download", ["downloadFileVersion"]);
|