silgi 0.16.4 → 0.16.6
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/_chunks/index.mjs +1 -1
- package/dist/cli/prepare.mjs +76 -32
- package/dist/kit/index.mjs +8 -2
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/types/index.d.mts +15 -17
- package/dist/types/index.d.ts +15 -17
- package/package.json +2 -2
package/dist/_chunks/index.mjs
CHANGED
package/dist/cli/prepare.mjs
CHANGED
|
@@ -40,46 +40,90 @@ import 'pathe/utils';
|
|
|
40
40
|
import 'untyped';
|
|
41
41
|
import './types.mjs';
|
|
42
42
|
|
|
43
|
-
function
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
${
|
|
59
|
-
|
|
43
|
+
function serializeRules(rules, options = {}) {
|
|
44
|
+
try {
|
|
45
|
+
const config = {
|
|
46
|
+
indent: 2,
|
|
47
|
+
functionIndent: 2,
|
|
48
|
+
// Daha tutarlı indentasyon için değiştirildi
|
|
49
|
+
...options
|
|
50
|
+
};
|
|
51
|
+
const uniqueId = Date.now().toString(36) + Math.random().toString(36).substring(2, 7);
|
|
52
|
+
const FUNCTION_MARKER = `__SILGI_FUNCTION_${uniqueId}_`;
|
|
53
|
+
const FUNCTION_MARKER_END = `_FUNCTION_END_${uniqueId}__`;
|
|
54
|
+
const safeStringify = (obj) => {
|
|
55
|
+
const cache = [];
|
|
56
|
+
const serialized2 = JSON.stringify(obj, (key, value) => {
|
|
57
|
+
if (typeof value === "function") {
|
|
58
|
+
return `${FUNCTION_MARKER}${value.toString()}${FUNCTION_MARKER_END}`;
|
|
59
|
+
}
|
|
60
|
+
if (typeof value === "object" && value !== null) {
|
|
61
|
+
if (cache.includes(value)) {
|
|
62
|
+
return "[Circular Reference]";
|
|
63
|
+
}
|
|
64
|
+
cache.push(value);
|
|
65
|
+
}
|
|
66
|
+
return value;
|
|
67
|
+
}, config.indent);
|
|
68
|
+
return serialized2;
|
|
69
|
+
};
|
|
70
|
+
const serialized = safeStringify(rules);
|
|
71
|
+
const getIndentLevel = (matchIndex) => {
|
|
72
|
+
const beforeMatch = serialized.substring(0, matchIndex);
|
|
73
|
+
const lastNewline = beforeMatch.lastIndexOf("\n");
|
|
74
|
+
if (lastNewline === -1)
|
|
75
|
+
return 0;
|
|
76
|
+
const lineStart = beforeMatch.substring(lastNewline + 1);
|
|
77
|
+
return lineStart.match(/^\s*/)?.[0].length ?? 0;
|
|
78
|
+
};
|
|
79
|
+
const result = serialized.replace(
|
|
80
|
+
new RegExp(`"${FUNCTION_MARKER}(.*?)${FUNCTION_MARKER_END}"`, "gs"),
|
|
81
|
+
(match, fnContent, offset) => {
|
|
82
|
+
const baseIndent = getIndentLevel(offset);
|
|
83
|
+
const functionBodyIndent = " ".repeat(baseIndent + config.functionIndent);
|
|
84
|
+
return fnContent.replace(/\\n/g, "\n").replace(/\\"/g, '"').replace(/\\\\/g, "\\").split("\n").map((line, i) => {
|
|
85
|
+
if (i === 0)
|
|
86
|
+
return line;
|
|
87
|
+
const trimmedLine = line.trimStart();
|
|
88
|
+
return trimmedLine ? `${functionBodyIndent}${trimmedLine}` : "";
|
|
89
|
+
}).filter(Boolean).join("\n");
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
return result;
|
|
93
|
+
} catch (error) {
|
|
94
|
+
console.error("Error serializing rules:", error);
|
|
95
|
+
return JSON.stringify(rules, null, 2);
|
|
60
96
|
}
|
|
61
|
-
const entries = Object.entries(obj);
|
|
62
|
-
if (entries.length === 0)
|
|
63
|
-
return "{}";
|
|
64
|
-
const props = entries.map(
|
|
65
|
-
([key, value]) => `${innerSpacing}"${key}": ${serializeToString(value, indent + 4)}`
|
|
66
|
-
);
|
|
67
|
-
return `{
|
|
68
|
-
${props.join(",\n")}
|
|
69
|
-
${spacing}}`;
|
|
70
97
|
}
|
|
71
98
|
async function prepareBuild(silgi) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
99
|
+
try {
|
|
100
|
+
if (!silgi?.routeRules?.exportRules) {
|
|
101
|
+
throw new Error("Invalid silgi configuration: routeRules or exportRules is undefined");
|
|
102
|
+
}
|
|
103
|
+
const exportedRules = silgi.routeRules.exportRules();
|
|
104
|
+
if (!exportedRules || typeof exportedRules !== "object") {
|
|
105
|
+
throw new Error("No valid route rules to export");
|
|
106
|
+
}
|
|
107
|
+
const serialized = serializeRules(exportedRules);
|
|
108
|
+
const content = `/* eslint-disable */
|
|
75
109
|
// @ts-nocheck
|
|
76
|
-
// This file is auto-generated at build time
|
|
110
|
+
// This file is auto-generated at build time by Silgi
|
|
77
111
|
// Contains route rules with preserved functions
|
|
112
|
+
// Generated: ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
78
113
|
|
|
79
114
|
export const routeRules = ${serialized}
|
|
80
115
|
`;
|
|
81
|
-
|
|
82
|
-
|
|
116
|
+
const serverDir = silgi.options.silgi.serverDir;
|
|
117
|
+
if (!serverDir) {
|
|
118
|
+
throw new Error("Server directory not defined in configuration");
|
|
119
|
+
}
|
|
120
|
+
const file = join(serverDir, "rules.ts");
|
|
121
|
+
await writeFile(file, content);
|
|
122
|
+
console.log(`\u2705 Route rules written to ${file}`);
|
|
123
|
+
} catch (error) {
|
|
124
|
+
console.error("\u274C Failed to prepare build:", error instanceof Error ? error.message : String(error));
|
|
125
|
+
throw error;
|
|
126
|
+
}
|
|
83
127
|
}
|
|
84
128
|
|
|
85
129
|
const prepare = defineCommand({
|
package/dist/kit/index.mjs
CHANGED
|
@@ -201,13 +201,19 @@ const parseGraphQLServices = serviceParseModule(({
|
|
|
201
201
|
const parseRouteRules = serviceParseModule(({
|
|
202
202
|
node,
|
|
203
203
|
basePath,
|
|
204
|
-
silgi
|
|
204
|
+
silgi,
|
|
205
|
+
pathLength
|
|
205
206
|
}) => {
|
|
206
207
|
const routeRules = node.routeRules;
|
|
207
208
|
if (!routeRules)
|
|
208
209
|
return;
|
|
209
210
|
let removeMethod = "";
|
|
210
211
|
removeMethod = withLeadingSlash(basePath);
|
|
212
|
+
if (pathLength === 1 || pathLength === 2 || pathLength === 3) {
|
|
213
|
+
if (routeRules.doubleSplat === void 0) {
|
|
214
|
+
routeRules.doubleSplat = true;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
211
217
|
if (routeRules.splat)
|
|
212
218
|
removeMethod = `${removeMethod}/*`;
|
|
213
219
|
else if (routeRules.doubleSplat)
|
|
@@ -228,7 +234,7 @@ function parseServices(silgi, pathLength = [4, 3, 2, 1], servicesObject, current
|
|
|
228
234
|
if (pathLengths.includes(path.length)) {
|
|
229
235
|
const basePath = path.join("/");
|
|
230
236
|
for (const handler of silgi.options.serviceParseModules) {
|
|
231
|
-
handler({ node, basePath, silgi, modulesURIs });
|
|
237
|
+
handler({ node, basePath, silgi, modulesURIs, pathLength: path.length });
|
|
232
238
|
}
|
|
233
239
|
}
|
|
234
240
|
for (const key in node) {
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
package/dist/types/index.d.mts
CHANGED
|
@@ -819,9 +819,6 @@ interface DefaultRouteRules extends SilgiRuntimeRouteRules {
|
|
|
819
819
|
[key: string]: any;
|
|
820
820
|
}
|
|
821
821
|
type SilgiRouteRules = Record<DefaultRouteRules extends string ? DefaultRouteRules : string, DefaultRouteConfig>;
|
|
822
|
-
type RouteConfig<T extends Record<string, any> = DefaultRouteConfig> = T;
|
|
823
|
-
type RouteRulesConfig<T extends Record<string, any> = DefaultRouteConfig> = Record<string, T>;
|
|
824
|
-
type MergedRulesCache<T extends Record<string, any> = DefaultRouteConfig> = Record<string, T>;
|
|
825
822
|
interface SilgiRuntimeRouteRules {
|
|
826
823
|
}
|
|
827
824
|
interface SilgiRuntimeRouteRulesConfig {
|
|
@@ -829,30 +826,30 @@ interface SilgiRuntimeRouteRulesConfig {
|
|
|
829
826
|
/**
|
|
830
827
|
* Interface for the object returned by createRouteRules
|
|
831
828
|
*/
|
|
832
|
-
interface RouteRules
|
|
833
|
-
readonly rules:
|
|
834
|
-
readonly mergedRules:
|
|
835
|
-
importRules: (config:
|
|
836
|
-
exportRules: () =>
|
|
837
|
-
addRule: (pattern: string, config:
|
|
838
|
-
updateRule: (pattern: string, config: Partial<
|
|
829
|
+
interface RouteRules {
|
|
830
|
+
readonly rules: Record<string, DefaultRouteConfig>;
|
|
831
|
+
readonly mergedRules: Record<string, DefaultRouteConfig>;
|
|
832
|
+
importRules: (config: Record<string, DefaultRouteConfig>) => void;
|
|
833
|
+
exportRules: () => Record<string, DefaultRouteConfig>;
|
|
834
|
+
addRule: (pattern: string, config: DefaultRouteConfig) => void;
|
|
835
|
+
updateRule: (pattern: string, config: Partial<DefaultRouteConfig>) => void;
|
|
839
836
|
removeRule: (pattern: string) => void;
|
|
840
837
|
matchesRule: (url: string, pattern: string) => boolean;
|
|
841
838
|
getMatchingPatterns: (url: string) => string[];
|
|
842
|
-
getConfig: (url: string) =>
|
|
839
|
+
getConfig: (url: string) => DefaultRouteConfig | null;
|
|
843
840
|
getParams: (url: string, pattern: string) => Record<string, string> | null;
|
|
844
841
|
match: (url: string) => {
|
|
845
842
|
pattern: string;
|
|
846
|
-
config:
|
|
843
|
+
config: DefaultRouteConfig;
|
|
847
844
|
params: Record<string, string> | null;
|
|
848
845
|
} | null;
|
|
849
846
|
clear: () => void;
|
|
850
847
|
clearMergedRules: () => void;
|
|
851
848
|
precomputeMergedRules: (urls: string[]) => void;
|
|
852
|
-
setMergedRule: (url: string, config:
|
|
853
|
-
getMergedRules: () =>
|
|
854
|
-
configure: (config:
|
|
855
|
-
updateMergeRules: () =>
|
|
849
|
+
setMergedRule: (url: string, config: DefaultRouteConfig) => void;
|
|
850
|
+
getMergedRules: () => Record<string, DefaultRouteConfig>;
|
|
851
|
+
configure: (config: Record<string, DefaultRouteConfig>) => void;
|
|
852
|
+
updateMergeRules: () => Record<string, DefaultRouteConfig>;
|
|
856
853
|
}
|
|
857
854
|
|
|
858
855
|
type CustomDriverName = string & {
|
|
@@ -1125,6 +1122,7 @@ interface ServiceParse {
|
|
|
1125
1122
|
basePath: string;
|
|
1126
1123
|
silgi: SilgiCLI;
|
|
1127
1124
|
modulesURIs: Record<string, Record<string, any>>;
|
|
1125
|
+
pathLength: number;
|
|
1128
1126
|
}
|
|
1129
1127
|
interface ServiceParseModule {
|
|
1130
1128
|
(params: ServiceParse): Awaited<void> | void;
|
|
@@ -1132,4 +1130,4 @@ interface ServiceParseModule {
|
|
|
1132
1130
|
|
|
1133
1131
|
declare const autoImportTypes: string[];
|
|
1134
1132
|
|
|
1135
|
-
export { type AppConfig, type Awaitable, type BaseNamespaceType, type BaseSchemaType, type BaseSilgiMethodType, type CaptureError, type CapturedErrorContext, type CommandType, type CreateScope, type DeepPartial, type DefaultHooks, type DefaultNamespaces, type DefaultRouteConfig, type DefaultRouteRules, type DotenvOptions, type EnvOptions, type EventHandlerResponse, type ExtendContext, type ExtendShared, type ExtractInputFromURI, type ExtractOutputFromURI, type ExtractPathParamsFromURI, type ExtractQueryParamsFromURI, type ExtractSourceFromURI, type FrameworkContext, type GenerateAppOptions, type GraphQLJSON, type HookResult, type ImportItem, type LoadConfigOptions, type
|
|
1133
|
+
export { type AppConfig, type Awaitable, type BaseNamespaceType, type BaseSchemaType, type BaseSilgiMethodType, type CaptureError, type CapturedErrorContext, type CommandType, type CreateScope, type DeepPartial, type DefaultHooks, type DefaultNamespaces, type DefaultRouteConfig, type DefaultRouteRules, type DotenvOptions, type EnvOptions, type EventHandlerResponse, type ExtendContext, type ExtendShared, type ExtractInputFromURI, type ExtractOutputFromURI, type ExtractPathParamsFromURI, type ExtractQueryParamsFromURI, type ExtractSourceFromURI, type FrameworkContext, type GenerateAppOptions, type GraphQLJSON, type HookResult, type ImportItem, type LoadConfigOptions, type MergedSilgiSchema, type MethodHandlerType, type ModuleDefinition, type ModuleHookContext, type ModuleMeta, type ModuleOptionsCustom, type ModuleSetupInstallResult, type ModuleSetupReturn, type Namespaces, type NitroBuildInfo, type PrepareCore, type RequiredServiceType, type ResolvedMethodHandlerType, type ResolvedModuleMeta, type ResolvedModuleOptions, type ResolvedServiceType, type ResolvedSilgiTemplate, type RouteRules, type ScanFile, type SchemaPreparationOptions, type ServiceParse, type ServiceParseModule, type ServiceType, type Silgi, type SilgiAppPlugin, type SilgiCLI, type SilgiCLIConfig, type SilgiCLIDynamicConfig, type SilgiCLIHooks, type SilgiCLIOptions, type SilgiCompatibility, type SilgiCompatibilityIssue, type SilgiCompatibilityIssues, type SilgiConfig, type SilgiEvents, type SilgiFrameworkInfo, type SilgiFunction, type SilgiHooks, type SilgiModule, type SilgiModuleInput, type SilgiModuleOptions, type SilgiNamespaces, type SilgiOperation, type SilgiOptions, type SilgiPreset, type SilgiPresetMeta, type SilgiRouteRules, type SilgiRouterTypes, type SilgiRuntimeActions, type SilgiRuntimeConfig, type SilgiRuntimeContext, type SilgiRuntimeHooks, type SilgiRuntimeMethods, type SilgiRuntimeOptions, type SilgiRuntimeRouteRules, type SilgiRuntimeRouteRulesConfig, type SilgiRuntimeSharedExtends, type SilgiRuntimeShareds, type SilgiSchema, type SilgiServiceInterface, type SilgiStorageBase, type SilgiTemplate, type SilgiURIs, type StorageConfig, type StorageKeyGenerator, type StorageKeyParams, type StorageMounts, type TSReference, type URIsTypes, autoImportTypes };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -819,9 +819,6 @@ interface DefaultRouteRules extends SilgiRuntimeRouteRules {
|
|
|
819
819
|
[key: string]: any;
|
|
820
820
|
}
|
|
821
821
|
type SilgiRouteRules = Record<DefaultRouteRules extends string ? DefaultRouteRules : string, DefaultRouteConfig>;
|
|
822
|
-
type RouteConfig<T extends Record<string, any> = DefaultRouteConfig> = T;
|
|
823
|
-
type RouteRulesConfig<T extends Record<string, any> = DefaultRouteConfig> = Record<string, T>;
|
|
824
|
-
type MergedRulesCache<T extends Record<string, any> = DefaultRouteConfig> = Record<string, T>;
|
|
825
822
|
interface SilgiRuntimeRouteRules {
|
|
826
823
|
}
|
|
827
824
|
interface SilgiRuntimeRouteRulesConfig {
|
|
@@ -829,30 +826,30 @@ interface SilgiRuntimeRouteRulesConfig {
|
|
|
829
826
|
/**
|
|
830
827
|
* Interface for the object returned by createRouteRules
|
|
831
828
|
*/
|
|
832
|
-
interface RouteRules
|
|
833
|
-
readonly rules:
|
|
834
|
-
readonly mergedRules:
|
|
835
|
-
importRules: (config:
|
|
836
|
-
exportRules: () =>
|
|
837
|
-
addRule: (pattern: string, config:
|
|
838
|
-
updateRule: (pattern: string, config: Partial<
|
|
829
|
+
interface RouteRules {
|
|
830
|
+
readonly rules: Record<string, DefaultRouteConfig>;
|
|
831
|
+
readonly mergedRules: Record<string, DefaultRouteConfig>;
|
|
832
|
+
importRules: (config: Record<string, DefaultRouteConfig>) => void;
|
|
833
|
+
exportRules: () => Record<string, DefaultRouteConfig>;
|
|
834
|
+
addRule: (pattern: string, config: DefaultRouteConfig) => void;
|
|
835
|
+
updateRule: (pattern: string, config: Partial<DefaultRouteConfig>) => void;
|
|
839
836
|
removeRule: (pattern: string) => void;
|
|
840
837
|
matchesRule: (url: string, pattern: string) => boolean;
|
|
841
838
|
getMatchingPatterns: (url: string) => string[];
|
|
842
|
-
getConfig: (url: string) =>
|
|
839
|
+
getConfig: (url: string) => DefaultRouteConfig | null;
|
|
843
840
|
getParams: (url: string, pattern: string) => Record<string, string> | null;
|
|
844
841
|
match: (url: string) => {
|
|
845
842
|
pattern: string;
|
|
846
|
-
config:
|
|
843
|
+
config: DefaultRouteConfig;
|
|
847
844
|
params: Record<string, string> | null;
|
|
848
845
|
} | null;
|
|
849
846
|
clear: () => void;
|
|
850
847
|
clearMergedRules: () => void;
|
|
851
848
|
precomputeMergedRules: (urls: string[]) => void;
|
|
852
|
-
setMergedRule: (url: string, config:
|
|
853
|
-
getMergedRules: () =>
|
|
854
|
-
configure: (config:
|
|
855
|
-
updateMergeRules: () =>
|
|
849
|
+
setMergedRule: (url: string, config: DefaultRouteConfig) => void;
|
|
850
|
+
getMergedRules: () => Record<string, DefaultRouteConfig>;
|
|
851
|
+
configure: (config: Record<string, DefaultRouteConfig>) => void;
|
|
852
|
+
updateMergeRules: () => Record<string, DefaultRouteConfig>;
|
|
856
853
|
}
|
|
857
854
|
|
|
858
855
|
type CustomDriverName = string & {
|
|
@@ -1125,6 +1122,7 @@ interface ServiceParse {
|
|
|
1125
1122
|
basePath: string;
|
|
1126
1123
|
silgi: SilgiCLI;
|
|
1127
1124
|
modulesURIs: Record<string, Record<string, any>>;
|
|
1125
|
+
pathLength: number;
|
|
1128
1126
|
}
|
|
1129
1127
|
interface ServiceParseModule {
|
|
1130
1128
|
(params: ServiceParse): Awaited<void> | void;
|
|
@@ -1132,4 +1130,4 @@ interface ServiceParseModule {
|
|
|
1132
1130
|
|
|
1133
1131
|
declare const autoImportTypes: string[];
|
|
1134
1132
|
|
|
1135
|
-
export { type AppConfig, type Awaitable, type BaseNamespaceType, type BaseSchemaType, type BaseSilgiMethodType, type CaptureError, type CapturedErrorContext, type CommandType, type CreateScope, type DeepPartial, type DefaultHooks, type DefaultNamespaces, type DefaultRouteConfig, type DefaultRouteRules, type DotenvOptions, type EnvOptions, type EventHandlerResponse, type ExtendContext, type ExtendShared, type ExtractInputFromURI, type ExtractOutputFromURI, type ExtractPathParamsFromURI, type ExtractQueryParamsFromURI, type ExtractSourceFromURI, type FrameworkContext, type GenerateAppOptions, type GraphQLJSON, type HookResult, type ImportItem, type LoadConfigOptions, type
|
|
1133
|
+
export { type AppConfig, type Awaitable, type BaseNamespaceType, type BaseSchemaType, type BaseSilgiMethodType, type CaptureError, type CapturedErrorContext, type CommandType, type CreateScope, type DeepPartial, type DefaultHooks, type DefaultNamespaces, type DefaultRouteConfig, type DefaultRouteRules, type DotenvOptions, type EnvOptions, type EventHandlerResponse, type ExtendContext, type ExtendShared, type ExtractInputFromURI, type ExtractOutputFromURI, type ExtractPathParamsFromURI, type ExtractQueryParamsFromURI, type ExtractSourceFromURI, type FrameworkContext, type GenerateAppOptions, type GraphQLJSON, type HookResult, type ImportItem, type LoadConfigOptions, type MergedSilgiSchema, type MethodHandlerType, type ModuleDefinition, type ModuleHookContext, type ModuleMeta, type ModuleOptionsCustom, type ModuleSetupInstallResult, type ModuleSetupReturn, type Namespaces, type NitroBuildInfo, type PrepareCore, type RequiredServiceType, type ResolvedMethodHandlerType, type ResolvedModuleMeta, type ResolvedModuleOptions, type ResolvedServiceType, type ResolvedSilgiTemplate, type RouteRules, type ScanFile, type SchemaPreparationOptions, type ServiceParse, type ServiceParseModule, type ServiceType, type Silgi, type SilgiAppPlugin, type SilgiCLI, type SilgiCLIConfig, type SilgiCLIDynamicConfig, type SilgiCLIHooks, type SilgiCLIOptions, type SilgiCompatibility, type SilgiCompatibilityIssue, type SilgiCompatibilityIssues, type SilgiConfig, type SilgiEvents, type SilgiFrameworkInfo, type SilgiFunction, type SilgiHooks, type SilgiModule, type SilgiModuleInput, type SilgiModuleOptions, type SilgiNamespaces, type SilgiOperation, type SilgiOptions, type SilgiPreset, type SilgiPresetMeta, type SilgiRouteRules, type SilgiRouterTypes, type SilgiRuntimeActions, type SilgiRuntimeConfig, type SilgiRuntimeContext, type SilgiRuntimeHooks, type SilgiRuntimeMethods, type SilgiRuntimeOptions, type SilgiRuntimeRouteRules, type SilgiRuntimeRouteRulesConfig, type SilgiRuntimeSharedExtends, type SilgiRuntimeShareds, type SilgiSchema, type SilgiServiceInterface, type SilgiStorageBase, type SilgiTemplate, type SilgiURIs, type StorageConfig, type StorageKeyGenerator, type StorageKeyParams, type StorageMounts, type TSReference, type URIsTypes, autoImportTypes };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "silgi",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.16.
|
|
4
|
+
"version": "0.16.6",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
"lint": "eslint .",
|
|
181
181
|
"lint:fix": "eslint . --fix",
|
|
182
182
|
"silgi": "tsx cli/index.ts",
|
|
183
|
-
"release": "pnpm gen-presets && pnpm unbuild && pnpm publish --no-git-checks --access public",
|
|
183
|
+
"release": "pnpm vitest run && pnpm gen-presets && pnpm unbuild && pnpm publish --no-git-checks --access public",
|
|
184
184
|
"generate": "pnpm --filter './examples/**' silgi:prepare",
|
|
185
185
|
"gen-presets": "pnpm jiti scripts/gen-presets.ts",
|
|
186
186
|
"all:delete": "find . -type d \\( -name \"node_modules\" -o -name \"dist\" \\) -prune -exec rm -rf {} +"
|