dynamo-bao 0.4.1 → 0.4.2
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/bin/generators/model.js +2 -5
- package/package.json +1 -1
package/bin/generators/model.js
CHANGED
|
@@ -15,11 +15,8 @@ function generateModelClass(
|
|
|
15
15
|
outputDir,
|
|
16
16
|
moduleSystem = 'commonjs',
|
|
17
17
|
) {
|
|
18
|
-
//
|
|
19
|
-
const
|
|
20
|
-
const srcPath = path.join(projectRoot, 'src');
|
|
21
|
-
const relativeSrcPath = path.relative(outputDir, srcPath).replace(/\\/g, '/');
|
|
22
|
-
const srcImportPrefix = relativeSrcPath.startsWith('.') ? relativeSrcPath : './' + relativeSrcPath;
|
|
18
|
+
// Use bare package specifier so imports survive version bumps
|
|
19
|
+
const srcImportPrefix = 'dynamo-bao/src';
|
|
23
20
|
if (!modelConfig || !modelConfig.fields) {
|
|
24
21
|
throw new Error(
|
|
25
22
|
`Invalid model configuration for ${modelName}: missing fields`,
|