@retter/rio-generator
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -19,3 +19,3 @@ "use strict"; | ||
} | ||
return ("\nexport class " + classId + " {\n public readonly _obj: RetterCloudObject\n\n private constructor(obj: RetterCloudObject) {\n this._obj = obj\n }\n\n static async getInstance(rio: Retter, options?: Omit<RetterCloudObjectConfig, 'classId'>): Promise<" + classId + "> {\n return new " + classId + "(await rio.getCloudObject({ ...options, classId: '" + classId + "' }))\n }\n\n " + methods.join('\n\n') + "\n}\n ").trim(); | ||
return ("\nexport class " + classId + " {\n public readonly _obj: RetterCloudObject\n\n private constructor(obj: RetterCloudObject) {\n this._obj = obj\n }\n\n static async getInstance(rio: Retter, options?: Omit<RetterCloudObjectConfig, 'classId'>): Promise<" + classId + "> {\n const params = { ...options, classId: '" + classId + "' }\n if (params.instanceId) params['useLocal'] = true\n return new " + classId + "(await rio.getCloudObject(params))\n }\n\n " + methods.join('\n\n') + "\n}\n ").trim(); | ||
} | ||
@@ -22,0 +22,0 @@ exports.renderClass = renderClass; |
{ | ||
"name": "@retter/rio-generator", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "retter io proxy class helper generator", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -28,3 +28,5 @@ import YAML from 'yaml' | ||
static async getInstance(rio: Retter, options?: Omit<RetterCloudObjectConfig, 'classId'>): Promise<${classId}> { | ||
return new ${classId}(await rio.getCloudObject({ ...options, classId: '${classId}' })) | ||
const params = { ...options, classId: '${classId}' } | ||
if (params.instanceId) params['useLocal'] = true | ||
return new ${classId}(await rio.getCloudObject(params)) | ||
} | ||
@@ -31,0 +33,0 @@ |
Sorry, the diff of this file is not supported yet
107447
1592