@statezero/core 0.1.29 → 0.1.30
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.
|
@@ -100,8 +100,7 @@ const JS_ACTION_TEMPLATE = `/**
|
|
|
100
100
|
|
|
101
101
|
import axios from 'axios';
|
|
102
102
|
import { z } from 'zod';
|
|
103
|
-
import { configInstance } from '{{modulePath}}';
|
|
104
|
-
import { parseStateZeroError } from '{{modulePath}}/flavours/django/errors.js';
|
|
103
|
+
import { configInstance, parseStateZeroError } from '{{modulePath}}';
|
|
105
104
|
|
|
106
105
|
{{#if inputSchemaString}}
|
|
107
106
|
/**
|
|
@@ -437,6 +436,7 @@ function prepareActionTemplateData(modulePath, functionName, actionName, actionD
|
|
|
437
436
|
}
|
|
438
437
|
async function generateActionFile(backend, actionName, actionDefinition) {
|
|
439
438
|
const functionName = _.camelCase(actionName);
|
|
439
|
+
// Apply the same logic as syncModels.js
|
|
440
440
|
const modulePath = process.env.NODE_ENV === "test" ? "../../../src" : "@statezero/core";
|
|
441
441
|
const appName = (actionDefinition.app || "general").toLowerCase();
|
|
442
442
|
const outDir = path.join(backend.GENERATED_ACTIONS_DIR, appName);
|
package/package.json
CHANGED