@pipelab/plugin-steam 1.0.0-beta.13 → 1.0.0-beta.15
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/index.cjs +338 -248
- package/dist/index.mjs +310 -220
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1595,6 +1595,56 @@ function literal(literal_, message) {
|
|
|
1595
1595
|
}
|
|
1596
1596
|
};
|
|
1597
1597
|
}
|
|
1598
|
+
function looseObject(entries, message) {
|
|
1599
|
+
return {
|
|
1600
|
+
kind: "schema",
|
|
1601
|
+
type: "loose_object",
|
|
1602
|
+
reference: looseObject,
|
|
1603
|
+
expects: "Object",
|
|
1604
|
+
async: false,
|
|
1605
|
+
entries,
|
|
1606
|
+
message,
|
|
1607
|
+
_run(dataset, config2) {
|
|
1608
|
+
const input = dataset.value;
|
|
1609
|
+
if (input && typeof input === "object") {
|
|
1610
|
+
dataset.typed = true;
|
|
1611
|
+
dataset.value = {};
|
|
1612
|
+
for (const key in this.entries) {
|
|
1613
|
+
const value2 = input[key];
|
|
1614
|
+
const valueDataset = this.entries[key]._run({
|
|
1615
|
+
typed: false,
|
|
1616
|
+
value: value2
|
|
1617
|
+
}, config2);
|
|
1618
|
+
if (valueDataset.issues) {
|
|
1619
|
+
const pathItem = {
|
|
1620
|
+
type: "object",
|
|
1621
|
+
origin: "value",
|
|
1622
|
+
input,
|
|
1623
|
+
key,
|
|
1624
|
+
value: value2
|
|
1625
|
+
};
|
|
1626
|
+
for (const issue of valueDataset.issues) {
|
|
1627
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
1628
|
+
else issue.path = [pathItem];
|
|
1629
|
+
dataset.issues?.push(issue);
|
|
1630
|
+
}
|
|
1631
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
1632
|
+
if (config2.abortEarly) {
|
|
1633
|
+
dataset.typed = false;
|
|
1634
|
+
break;
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
if (!valueDataset.typed) dataset.typed = false;
|
|
1638
|
+
if (valueDataset.value !== void 0 || key in input) dataset.value[key] = valueDataset.value;
|
|
1639
|
+
}
|
|
1640
|
+
if (!dataset.issues || !config2.abortEarly) {
|
|
1641
|
+
for (const key in input) if (_isValidObjectKey(input, key) && !(key in this.entries)) dataset.value[key] = input[key];
|
|
1642
|
+
}
|
|
1643
|
+
} else _addIssue(this, "type", dataset, config2);
|
|
1644
|
+
return dataset;
|
|
1645
|
+
}
|
|
1646
|
+
};
|
|
1647
|
+
}
|
|
1598
1648
|
function number(message) {
|
|
1599
1649
|
return {
|
|
1600
1650
|
kind: "schema",
|
|
@@ -2132,6 +2182,18 @@ settingsMigratorInternal.createMigrations({
|
|
|
2132
2182
|
})
|
|
2133
2183
|
]
|
|
2134
2184
|
});
|
|
2185
|
+
const connectionsMigratorInternal = createMigrator();
|
|
2186
|
+
const defaultConnections = connectionsMigratorInternal.createDefault({
|
|
2187
|
+
version: "1.0.0",
|
|
2188
|
+
connections: []
|
|
2189
|
+
});
|
|
2190
|
+
connectionsMigratorInternal.createMigrations({
|
|
2191
|
+
defaultValue: defaultConnections,
|
|
2192
|
+
migrations: [createMigration({
|
|
2193
|
+
version: "1.0.0",
|
|
2194
|
+
up: finalVersion
|
|
2195
|
+
})]
|
|
2196
|
+
});
|
|
2135
2197
|
const fileRepoMigratorInternal = createMigrator();
|
|
2136
2198
|
const defaultFileRepo = fileRepoMigratorInternal.createDefault({
|
|
2137
2199
|
version: "2.0.0",
|
|
@@ -2293,11 +2355,51 @@ const LEGACY_ID_MAP = {
|
|
|
2293
2355
|
};
|
|
2294
2356
|
const getStrictPluginId = (pluginId) => {
|
|
2295
2357
|
if (!pluginId) return pluginId;
|
|
2296
|
-
|
|
2297
|
-
if (pluginId.startsWith("@") || pluginId.includes("/") || pluginId.startsWith("pipelab-plugin-")) return pluginId;
|
|
2298
|
-
const prefixed = `@pipelab/plugin-${pluginId}`;
|
|
2299
|
-
return LEGACY_ID_MAP[prefixed] || prefixed;
|
|
2358
|
+
return LEGACY_ID_MAP[pluginId] || pluginId;
|
|
2300
2359
|
};
|
|
2360
|
+
//#endregion
|
|
2361
|
+
//#region ../../packages/shared/src/save-location.ts
|
|
2362
|
+
const SaveLocationInternalValidator = object({
|
|
2363
|
+
id: string(),
|
|
2364
|
+
project: string(),
|
|
2365
|
+
lastModified: string(),
|
|
2366
|
+
type: literal("internal"),
|
|
2367
|
+
configName: string()
|
|
2368
|
+
});
|
|
2369
|
+
const SaveLocationValidator = union([
|
|
2370
|
+
object({
|
|
2371
|
+
id: string(),
|
|
2372
|
+
project: string(),
|
|
2373
|
+
path: string(),
|
|
2374
|
+
lastModified: string(),
|
|
2375
|
+
type: literal("external"),
|
|
2376
|
+
summary: object({
|
|
2377
|
+
plugins: array(string()),
|
|
2378
|
+
name: string(),
|
|
2379
|
+
description: string()
|
|
2380
|
+
})
|
|
2381
|
+
}),
|
|
2382
|
+
SaveLocationInternalValidator,
|
|
2383
|
+
object({
|
|
2384
|
+
id: string(),
|
|
2385
|
+
project: string(),
|
|
2386
|
+
type: literal("pipelab-cloud")
|
|
2387
|
+
})
|
|
2388
|
+
]);
|
|
2389
|
+
object({
|
|
2390
|
+
version: literal("1.0.0"),
|
|
2391
|
+
data: optional(record(string(), SaveLocationValidator), {})
|
|
2392
|
+
});
|
|
2393
|
+
const FileRepoProjectValidatorV2$1 = object({
|
|
2394
|
+
id: string(),
|
|
2395
|
+
name: string(),
|
|
2396
|
+
description: string()
|
|
2397
|
+
});
|
|
2398
|
+
object({
|
|
2399
|
+
version: literal("2.0.0"),
|
|
2400
|
+
projects: array(FileRepoProjectValidatorV2$1),
|
|
2401
|
+
pipelines: optional(array(SaveLocationValidator), [])
|
|
2402
|
+
});
|
|
2301
2403
|
object({
|
|
2302
2404
|
cacheFolder: string(),
|
|
2303
2405
|
theme: union([literal("light"), literal("dark")]),
|
|
@@ -2449,6 +2551,17 @@ object({
|
|
|
2449
2551
|
})),
|
|
2450
2552
|
isInternalMigrationBannerClosed: optional(boolean(), false)
|
|
2451
2553
|
});
|
|
2554
|
+
const ConnectionValidator = looseObject({
|
|
2555
|
+
id: string(),
|
|
2556
|
+
pluginName: string(),
|
|
2557
|
+
name: string(),
|
|
2558
|
+
createdAt: string(),
|
|
2559
|
+
isDefault: boolean()
|
|
2560
|
+
});
|
|
2561
|
+
object({
|
|
2562
|
+
version: literal("1.0.0"),
|
|
2563
|
+
connections: array(ConnectionValidator)
|
|
2564
|
+
});
|
|
2452
2565
|
//#endregion
|
|
2453
2566
|
//#region ../../node_modules/tslog/dist/esm/prettyLogStyles.js
|
|
2454
2567
|
const prettyLogStyles = {
|
|
@@ -2969,7 +3082,7 @@ const useLogger = () => {
|
|
|
2969
3082
|
const OriginValidator = object({
|
|
2970
3083
|
pluginId: string(),
|
|
2971
3084
|
nodeId: string(),
|
|
2972
|
-
version: pipe(
|
|
3085
|
+
version: optional(pipe(string(), description("Pinned version of the plugin for this block. Falls back to \"latest\" when absent.")))
|
|
2973
3086
|
});
|
|
2974
3087
|
const BlockActionValidatorV1 = object({
|
|
2975
3088
|
type: literal("action"),
|
|
@@ -2982,7 +3095,7 @@ const EditorParamValidatorV3 = union([literal("simple"), literal("editor")]);
|
|
|
2982
3095
|
const BlockActionValidatorV3 = object({
|
|
2983
3096
|
type: literal("action"),
|
|
2984
3097
|
uid: string(),
|
|
2985
|
-
name: pipe(
|
|
3098
|
+
name: optional(pipe(string(), description("A custom name provided by the user"))),
|
|
2986
3099
|
disabled: optional(boolean()),
|
|
2987
3100
|
params: record(string(), object({
|
|
2988
3101
|
editor: EditorParamValidatorV3,
|
|
@@ -45282,35 +45395,6 @@ const createPathParam = (value, definition) => {
|
|
|
45282
45395
|
};
|
|
45283
45396
|
};
|
|
45284
45397
|
//#endregion
|
|
45285
|
-
//#region ../../packages/shared/src/save-location.ts
|
|
45286
|
-
const SaveLocationInternalValidator = object({
|
|
45287
|
-
id: string(),
|
|
45288
|
-
project: string(),
|
|
45289
|
-
lastModified: string(),
|
|
45290
|
-
type: literal("internal"),
|
|
45291
|
-
configName: string()
|
|
45292
|
-
});
|
|
45293
|
-
const SaveLocationValidator = union([
|
|
45294
|
-
object({
|
|
45295
|
-
id: string(),
|
|
45296
|
-
project: string(),
|
|
45297
|
-
path: string(),
|
|
45298
|
-
lastModified: string(),
|
|
45299
|
-
type: literal("external"),
|
|
45300
|
-
summary: object({
|
|
45301
|
-
plugins: array(string()),
|
|
45302
|
-
name: string(),
|
|
45303
|
-
description: string()
|
|
45304
|
-
})
|
|
45305
|
-
}),
|
|
45306
|
-
SaveLocationInternalValidator,
|
|
45307
|
-
object({
|
|
45308
|
-
id: string(),
|
|
45309
|
-
project: string(),
|
|
45310
|
-
type: literal("pipelab-cloud")
|
|
45311
|
-
})
|
|
45312
|
-
]);
|
|
45313
|
-
//#endregion
|
|
45314
45398
|
//#region ../../packages/shared/src/websocket.types.ts
|
|
45315
45399
|
var WebSocketError = class extends Error {
|
|
45316
45400
|
constructor(message, code, requestId) {
|
|
@@ -45327,20 +45411,6 @@ object({
|
|
|
45327
45411
|
version: literal("1.0.0"),
|
|
45328
45412
|
data: optional(record(string(), SaveLocationValidator), {})
|
|
45329
45413
|
});
|
|
45330
|
-
const FileRepoProjectValidatorV2$1 = object({
|
|
45331
|
-
id: string(),
|
|
45332
|
-
name: string(),
|
|
45333
|
-
description: string()
|
|
45334
|
-
});
|
|
45335
|
-
object({
|
|
45336
|
-
version: literal("2.0.0"),
|
|
45337
|
-
projects: array(FileRepoProjectValidatorV2$1),
|
|
45338
|
-
pipelines: optional(array(SaveLocationValidator), [])
|
|
45339
|
-
});
|
|
45340
|
-
object({
|
|
45341
|
-
version: literal("1.0.0"),
|
|
45342
|
-
data: optional(record(string(), SaveLocationValidator), {})
|
|
45343
|
-
});
|
|
45344
45414
|
const FileRepoProjectValidatorV2 = object({
|
|
45345
45415
|
id: string(),
|
|
45346
45416
|
name: string(),
|
|
@@ -45360,9 +45430,13 @@ var init_esm_shims = __esmMin((() => {
|
|
|
45360
45430
|
__dirname = /* @__PURE__ */ getDirname();
|
|
45361
45431
|
}));
|
|
45362
45432
|
//#endregion
|
|
45363
|
-
//#region ../../packages/
|
|
45433
|
+
//#region ../../packages/constants/src/index.ts
|
|
45364
45434
|
init_esm_shims();
|
|
45365
|
-
const
|
|
45435
|
+
const websocketPort = 33753;
|
|
45436
|
+
//#endregion
|
|
45437
|
+
//#region ../../packages/core-node/src/context.ts
|
|
45438
|
+
const metaUrl = typeof import.meta !== "undefined" ? import.meta.url : void 0;
|
|
45439
|
+
const _dirname = typeof __dirname !== "undefined" ? __dirname : metaUrl ? dirname(fileURLToPath(metaUrl)) : process.cwd();
|
|
45366
45440
|
const isDev = process.env.NODE_ENV === "development";
|
|
45367
45441
|
/**
|
|
45368
45442
|
* Finds the monorepo root by looking for pnpm-workspace.yaml.
|
|
@@ -48934,9 +49008,6 @@ const useAPI = () => {
|
|
|
48934
49008
|
};
|
|
48935
49009
|
};
|
|
48936
49010
|
//#endregion
|
|
48937
|
-
//#region ../../packages/constants/src/index.ts
|
|
48938
|
-
const websocketPort = 33753;
|
|
48939
|
-
//#endregion
|
|
48940
49011
|
//#region ../../packages/core-node/src/websocket-server.ts
|
|
48941
49012
|
var WebSocketServer = class {
|
|
48942
49013
|
wss = null;
|
|
@@ -155190,119 +155261,120 @@ end tell`;
|
|
|
155190
155261
|
};
|
|
155191
155262
|
//#endregion
|
|
155192
155263
|
//#region src/index.ts
|
|
155193
|
-
var src_default = createNodeDefinition({
|
|
155194
|
-
|
|
155195
|
-
|
|
155196
|
-
|
|
155197
|
-
|
|
155198
|
-
|
|
155199
|
-
|
|
155200
|
-
|
|
155201
|
-
|
|
155202
|
-
|
|
155203
|
-
|
|
155204
|
-
|
|
155205
|
-
|
|
155206
|
-
|
|
155207
|
-
|
|
155208
|
-
|
|
155209
|
-
|
|
155210
|
-
|
|
155211
|
-
|
|
155212
|
-
|
|
155213
|
-
|
|
155214
|
-
|
|
155215
|
-
|
|
155216
|
-
|
|
155217
|
-
|
|
155218
|
-
|
|
155219
|
-
|
|
155220
|
-
|
|
155221
|
-
|
|
155222
|
-
|
|
155223
|
-
|
|
155224
|
-
|
|
155225
|
-
|
|
155226
|
-
|
|
155227
|
-
|
|
155228
|
-
|
|
155229
|
-
|
|
155230
|
-
|
|
155231
|
-
|
|
155232
|
-
|
|
155233
|
-
|
|
155234
|
-
|
|
155235
|
-
outputs: {
|
|
155236
|
-
"script-path": {
|
|
155237
|
-
label: "Script path",
|
|
155238
|
-
value: ""
|
|
155239
|
-
},
|
|
155240
|
-
"output-folder": {
|
|
155241
|
-
label: "Output folder",
|
|
155242
|
-
value: ""
|
|
155264
|
+
var src_default = createNodeDefinition({
|
|
155265
|
+
nodes: [{
|
|
155266
|
+
node: createAction({
|
|
155267
|
+
id: "steam-upload",
|
|
155268
|
+
name: "Upload to Steam",
|
|
155269
|
+
description: "Upload a folder to Steam",
|
|
155270
|
+
icon: "",
|
|
155271
|
+
displayString: "`Upload ${fmt.param(params['folder'], 'primary')} to steam`",
|
|
155272
|
+
meta: {},
|
|
155273
|
+
params: {
|
|
155274
|
+
sdk: createPathParam("", {
|
|
155275
|
+
required: true,
|
|
155276
|
+
label: "Steam Sdk path",
|
|
155277
|
+
control: {
|
|
155278
|
+
type: "path",
|
|
155279
|
+
options: { properties: ["openDirectory"] }
|
|
155280
|
+
}
|
|
155281
|
+
}),
|
|
155282
|
+
username: createStringParam("", {
|
|
155283
|
+
required: true,
|
|
155284
|
+
label: "Steam username"
|
|
155285
|
+
}),
|
|
155286
|
+
appId: createStringParam("", {
|
|
155287
|
+
required: true,
|
|
155288
|
+
label: "App Id"
|
|
155289
|
+
}),
|
|
155290
|
+
depotId: createStringParam("", {
|
|
155291
|
+
required: true,
|
|
155292
|
+
label: "Depot Id"
|
|
155293
|
+
}),
|
|
155294
|
+
description: createStringParam("", {
|
|
155295
|
+
required: true,
|
|
155296
|
+
label: "Description"
|
|
155297
|
+
}),
|
|
155298
|
+
folder: createPathParam("", {
|
|
155299
|
+
required: true,
|
|
155300
|
+
label: "Folder to upload",
|
|
155301
|
+
control: {
|
|
155302
|
+
type: "path",
|
|
155303
|
+
options: { properties: ["openDirectory"] }
|
|
155304
|
+
}
|
|
155305
|
+
})
|
|
155243
155306
|
},
|
|
155244
|
-
|
|
155245
|
-
|
|
155246
|
-
|
|
155307
|
+
outputs: {
|
|
155308
|
+
"script-path": {
|
|
155309
|
+
label: "Script path",
|
|
155310
|
+
value: ""
|
|
155311
|
+
},
|
|
155312
|
+
"output-folder": {
|
|
155313
|
+
label: "Output folder",
|
|
155314
|
+
value: ""
|
|
155315
|
+
},
|
|
155316
|
+
status: {
|
|
155317
|
+
label: "Status",
|
|
155318
|
+
value: ""
|
|
155319
|
+
}
|
|
155247
155320
|
}
|
|
155248
|
-
}
|
|
155249
|
-
|
|
155250
|
-
|
|
155251
|
-
|
|
155252
|
-
|
|
155253
|
-
|
|
155254
|
-
|
|
155255
|
-
|
|
155256
|
-
|
|
155257
|
-
|
|
155258
|
-
|
|
155259
|
-
|
|
155260
|
-
|
|
155261
|
-
|
|
155262
|
-
|
|
155263
|
-
|
|
155264
|
-
|
|
155265
|
-
|
|
155266
|
-
|
|
155267
|
-
".
|
|
155268
|
-
|
|
155269
|
-
|
|
155270
|
-
|
|
155271
|
-
|
|
155272
|
-
|
|
155273
|
-
|
|
155274
|
-
|
|
155275
|
-
|
|
155276
|
-
|
|
155321
|
+
}),
|
|
155322
|
+
runner: createActionRunner(async ({ log, inputs, cwd, abortSignal, setOutput }) => {
|
|
155323
|
+
const folder = inputs.folder;
|
|
155324
|
+
const appId = inputs.appId;
|
|
155325
|
+
const sdk = inputs.sdk;
|
|
155326
|
+
const depotId = inputs.depotId;
|
|
155327
|
+
const username = inputs.username;
|
|
155328
|
+
const description = inputs.description;
|
|
155329
|
+
log(`uploading "${folder}" to steam`);
|
|
155330
|
+
const errorMap = { 6: `No connection to content server. Your depot id (${depotId}) may be invalid` };
|
|
155331
|
+
if (!await fileExists(sdk)) throw new Error(`You must enter a valid path to the Steam SDK`);
|
|
155332
|
+
let builderFolder = "builder";
|
|
155333
|
+
if (platform() === "linux") builderFolder += "_linux";
|
|
155334
|
+
else if (platform() === "darwin") builderFolder += "_osx";
|
|
155335
|
+
const cmd = "steamcmd";
|
|
155336
|
+
const extensions = platform() === "win32" ? [
|
|
155337
|
+
".exe",
|
|
155338
|
+
".cmd",
|
|
155339
|
+
".bat"
|
|
155340
|
+
] : [".sh"];
|
|
155341
|
+
let cmdFinal = "";
|
|
155342
|
+
let steamcmdPath = "";
|
|
155343
|
+
for (const ext of extensions) {
|
|
155344
|
+
const p = join(sdk, "tools", "ContentBuilder", builderFolder, cmd + ext);
|
|
155345
|
+
if (await fileExists(p)) {
|
|
155346
|
+
steamcmdPath = p;
|
|
155347
|
+
cmdFinal = cmd + ext;
|
|
155348
|
+
break;
|
|
155349
|
+
}
|
|
155277
155350
|
}
|
|
155278
|
-
|
|
155279
|
-
|
|
155280
|
-
|
|
155281
|
-
|
|
155282
|
-
|
|
155283
|
-
|
|
155284
|
-
|
|
155285
|
-
|
|
155286
|
-
|
|
155287
|
-
|
|
155288
|
-
|
|
155289
|
-
|
|
155290
|
-
|
|
155291
|
-
|
|
155292
|
-
|
|
155293
|
-
|
|
155294
|
-
|
|
155295
|
-
|
|
155296
|
-
|
|
155297
|
-
|
|
155298
|
-
|
|
155299
|
-
|
|
155300
|
-
|
|
155301
|
-
|
|
155302
|
-
|
|
155303
|
-
|
|
155304
|
-
|
|
155305
|
-
const script = `"AppBuild"
|
|
155351
|
+
if (!steamcmdPath) {
|
|
155352
|
+
if (platform() === "linux" || platform() === "darwin") cmdFinal = "steamcmd.sh";
|
|
155353
|
+
else if (platform() === "win32") cmdFinal = "steamcmd.exe";
|
|
155354
|
+
steamcmdPath = join(sdk, "tools", "ContentBuilder", builderFolder, cmdFinal);
|
|
155355
|
+
}
|
|
155356
|
+
console.log("steamcmdPath", steamcmdPath);
|
|
155357
|
+
if (platform() === "linux" || platform() === "darwin") {
|
|
155358
|
+
if (platform() === "linux") {
|
|
155359
|
+
log("Adding \"execute\" permissions to linux binary");
|
|
155360
|
+
await chmod(join(sdk, "tools", "ContentBuilder", builderFolder, "linux32", cmd), 493);
|
|
155361
|
+
await chmod(join(sdk, "tools", "ContentBuilder", builderFolder, "linux32", "steamerrorreporter"), 493);
|
|
155362
|
+
}
|
|
155363
|
+
if (platform() === "darwin") {
|
|
155364
|
+
const steamcmdBinaryPath = join(sdk, "tools", "ContentBuilder", builderFolder, cmd);
|
|
155365
|
+
log("Adding \"execute\" permissions to darwin binary");
|
|
155366
|
+
await chmod(steamcmdBinaryPath, 493);
|
|
155367
|
+
}
|
|
155368
|
+
log("Adding \"execute\" permissions to binary");
|
|
155369
|
+
await chmod(steamcmdPath, 493);
|
|
155370
|
+
}
|
|
155371
|
+
const buildOutput = join(cwd, "steam", "output");
|
|
155372
|
+
const scriptPath = join(cwd, "steam", "script.vdf");
|
|
155373
|
+
setOutput("script-path", scriptPath);
|
|
155374
|
+
setOutput("output-folder", buildOutput);
|
|
155375
|
+
await mkdir(buildOutput, { recursive: true });
|
|
155376
|
+
await mkdir(dirname(scriptPath), { recursive: true });
|
|
155377
|
+
const script = `"AppBuild"
|
|
155306
155378
|
{
|
|
155307
155379
|
"AppID" "${appId}" // your AppID
|
|
155308
155380
|
"Desc" "${description}" // internal description for this build
|
|
@@ -155323,25 +155395,8 @@ var src_default = createNodeDefinition({ nodes: [{
|
|
|
155323
155395
|
}
|
|
155324
155396
|
}
|
|
155325
155397
|
}`;
|
|
155326
|
-
|
|
155327
|
-
|
|
155328
|
-
context: {
|
|
155329
|
-
log,
|
|
155330
|
-
abortSignal
|
|
155331
|
-
},
|
|
155332
|
-
scriptPath,
|
|
155333
|
-
steamcmdPath,
|
|
155334
|
-
username
|
|
155335
|
-
});
|
|
155336
|
-
log("isAuthenticated", JSON.stringify(isAuthenticated));
|
|
155337
|
-
if (isAuthenticated.success === false) {
|
|
155338
|
-
log("Opening terminal with interactive login");
|
|
155339
|
-
await openExternalTerminal(steamcmdPath, [
|
|
155340
|
-
"+login",
|
|
155341
|
-
username,
|
|
155342
|
-
"+quit"
|
|
155343
|
-
], { cancelSignal: abortSignal });
|
|
155344
|
-
if ((await checkSteamAuth({
|
|
155398
|
+
console.log("script", script);
|
|
155399
|
+
const isAuthenticated = await checkSteamAuth({
|
|
155345
155400
|
context: {
|
|
155346
155401
|
log,
|
|
155347
155402
|
abortSignal
|
|
@@ -155349,43 +155404,78 @@ var src_default = createNodeDefinition({ nodes: [{
|
|
|
155349
155404
|
scriptPath,
|
|
155350
155405
|
steamcmdPath,
|
|
155351
155406
|
username
|
|
155352
|
-
})
|
|
155353
|
-
|
|
155354
|
-
|
|
155355
|
-
|
|
155356
|
-
|
|
155357
|
-
|
|
155358
|
-
|
|
155359
|
-
|
|
155360
|
-
|
|
155361
|
-
|
|
155362
|
-
|
|
155363
|
-
|
|
155364
|
-
|
|
155365
|
-
|
|
155366
|
-
|
|
155367
|
-
|
|
155368
|
-
|
|
155369
|
-
|
|
155370
|
-
|
|
155371
|
-
|
|
155372
|
-
|
|
155373
|
-
|
|
155374
|
-
|
|
155375
|
-
|
|
155376
|
-
|
|
155377
|
-
|
|
155378
|
-
|
|
155379
|
-
|
|
155380
|
-
|
|
155381
|
-
|
|
155382
|
-
|
|
155383
|
-
|
|
155384
|
-
|
|
155385
|
-
|
|
155386
|
-
|
|
155387
|
-
|
|
155388
|
-
|
|
155407
|
+
});
|
|
155408
|
+
log("isAuthenticated", JSON.stringify(isAuthenticated));
|
|
155409
|
+
if (isAuthenticated.success === false) {
|
|
155410
|
+
log("Opening terminal with interactive login");
|
|
155411
|
+
await openExternalTerminal(steamcmdPath, [
|
|
155412
|
+
"+login",
|
|
155413
|
+
username,
|
|
155414
|
+
"+quit"
|
|
155415
|
+
], { cancelSignal: abortSignal });
|
|
155416
|
+
if ((await checkSteamAuth({
|
|
155417
|
+
context: {
|
|
155418
|
+
log,
|
|
155419
|
+
abortSignal
|
|
155420
|
+
},
|
|
155421
|
+
scriptPath,
|
|
155422
|
+
steamcmdPath,
|
|
155423
|
+
username
|
|
155424
|
+
})).success === false) throw new Error("Not authenticated");
|
|
155425
|
+
}
|
|
155426
|
+
log("Writing script");
|
|
155427
|
+
await writeFile(scriptPath, script, {
|
|
155428
|
+
encoding: "utf8",
|
|
155429
|
+
signal: abortSignal
|
|
155430
|
+
});
|
|
155431
|
+
log("Executing steamcmd");
|
|
155432
|
+
try {
|
|
155433
|
+
await runWithLiveLogs(steamcmdPath, [
|
|
155434
|
+
"+login",
|
|
155435
|
+
username,
|
|
155436
|
+
"+run_app_build",
|
|
155437
|
+
scriptPath,
|
|
155438
|
+
"+quit"
|
|
155439
|
+
], { shell: platform() === "win32" }, log, {
|
|
155440
|
+
onStdout: (data) => {
|
|
155441
|
+
log("[steamcmd]", data);
|
|
155442
|
+
},
|
|
155443
|
+
onStderr: (data) => {
|
|
155444
|
+
log("[steamcmd]", data);
|
|
155445
|
+
}
|
|
155446
|
+
}, abortSignal);
|
|
155447
|
+
} catch (e) {
|
|
155448
|
+
if (e instanceof ExternalCommandError) {
|
|
155449
|
+
const code = e.code;
|
|
155450
|
+
const message = code in errorMap ? errorMap[code] : "SteamCmd error:" + e.code + " " + e.message;
|
|
155451
|
+
throw new Error(message);
|
|
155452
|
+
} else if (e instanceof Error) {
|
|
155453
|
+
console.error(e);
|
|
155454
|
+
throw new Error("Error:" + e.message);
|
|
155455
|
+
} else throw new Error("unknwon error");
|
|
155456
|
+
}
|
|
155457
|
+
setOutput("status", "success");
|
|
155458
|
+
log("Done uploading");
|
|
155459
|
+
})
|
|
155460
|
+
}],
|
|
155461
|
+
integrations: [{
|
|
155462
|
+
name: "Steam SDK",
|
|
155463
|
+
fields: [{
|
|
155464
|
+
key: "sdk",
|
|
155465
|
+
label: "Steam SDK Path",
|
|
155466
|
+
type: "directory",
|
|
155467
|
+
placeholder: "e.g., /home/user/steam-sdk"
|
|
155468
|
+
}]
|
|
155469
|
+
}, {
|
|
155470
|
+
name: "Steam Credentials",
|
|
155471
|
+
fields: [{
|
|
155472
|
+
key: "username",
|
|
155473
|
+
label: "Steam Username",
|
|
155474
|
+
type: "text",
|
|
155475
|
+
placeholder: "e.g., steam_user"
|
|
155476
|
+
}]
|
|
155477
|
+
}]
|
|
155478
|
+
});
|
|
155389
155479
|
//#endregion
|
|
155390
155480
|
export { src_default as default };
|
|
155391
155481
|
|