Skip to content

Commit 85a8d5d

Browse files
authored
fix: don't use package name starting with dot (#1854)
1 parent 3134f0d commit 85a8d5d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/schema/src/plugins/plugin-utils.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { DEFAULT_RUNTIME_LOAD_PATH, type PolicyOperationKind } from '@zenstackhq/runtime';
2-
import { PluginGlobalOptions, ensureEmptyDir, getLiteral } from '@zenstackhq/sdk';
2+
import { ensureEmptyDir, getLiteral, PluginGlobalOptions } from '@zenstackhq/sdk';
3+
import { isPlugin, Model, Plugin } from '@zenstackhq/sdk/ast';
34
import fs from 'fs';
45
import path from 'path';
56
import { PluginRunnerOptions } from '../cli/plugin-runner';
6-
import { isPlugin, Model, Plugin } from '@zenstackhq/sdk/ast';
7+
import { getVersion } from '../utils/version-utils';
78

89
export const ALL_OPERATION_KINDS: PolicyOperationKind[] = ['create', 'update', 'postUpdate', 'read', 'delete'];
910

@@ -33,8 +34,8 @@ export function ensureDefaultOutputFolder(options: PluginRunnerOptions) {
3334
ensureEmptyDir(output);
3435
if (!options.output) {
3536
const pkgJson = {
36-
name: '.zenstack',
37-
version: '1.0.0',
37+
name: 'zenstack-generated',
38+
version: getVersion() ?? '1.0.0',
3839
exports: {
3940
'./enhance': {
4041
types: './enhance.d.ts',

0 commit comments

Comments
 (0)